@wix/site-ui 1.346.0 → 1.348.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{6706.js → 1093.js} +3 -3
- package/dist/{8724.js → 1219.js} +2 -2
- package/dist/{7373.js → 1288.js} +8 -2
- package/dist/{5299.js → 1381.js} +98 -127
- package/dist/{3056.js → 1607.js} +32 -34
- package/dist/1629.js +2 -0
- package/dist/1669.js +75 -0
- package/dist/1718.js +26 -0
- package/dist/{1477.js → 201.js} +17 -26
- package/dist/2221.js +9 -0
- package/dist/{2445.js → 226.js} +12 -48
- package/dist/2387.js +7 -0
- package/dist/2580.js +6 -0
- package/dist/{1500.js → 2859.js} +10 -34
- package/dist/3014.js +178 -0
- package/dist/{6247.js → 3054.js} +3 -3
- package/dist/{7642.js → 3093.js} +1 -1
- package/dist/3189.js +5 -0
- package/dist/{7564.js → 331.js} +2 -2
- package/dist/3357.js +7 -0
- package/dist/{487.js → 3398.js} +38 -39
- package/dist/3502.js +224 -0
- package/dist/3695.js +50 -0
- package/dist/3829.js +1 -1
- package/dist/{6588.js → 3859.js} +115 -92
- package/dist/{3670.js → 3910.js} +28 -21
- package/dist/392.js +7 -0
- package/dist/{4549.js → 4155.js} +11 -3
- package/dist/4226.js +7 -0
- package/dist/{6329.js → 4229.js} +1 -1
- package/dist/4293.js +3 -0
- package/dist/4346.js +853 -2
- package/dist/{285.js → 4472.js} +3 -3
- package/dist/4605.js +207 -0
- package/dist/{7366.js → 488.js} +60 -7
- package/dist/{8750.js → 497.js} +190 -375
- package/dist/4989.js +35 -0
- package/dist/{6270.js → 510.js} +157 -196
- package/dist/5258.js +26 -0
- package/dist/{5036.js → 5275.js} +0 -3
- package/dist/{8171.js → 5298.js} +90 -102
- package/dist/5473.js +11 -0
- package/dist/{4745.js → 5490.js} +3 -1
- package/dist/{6089.js → 5561.js} +869 -786
- package/dist/{8996.js → 5595.js} +4 -3
- package/dist/5890.js +25 -0
- package/dist/{6046.js → 5969.js} +1 -1
- package/dist/5984.js +38 -0
- package/dist/{8527.js → 6006.js} +3 -3
- package/dist/6040.js +97 -0
- package/dist/{8758.js → 6137.js} +10 -8
- package/dist/{4281.js → 6140.js} +18 -10
- package/dist/{8960.js → 6191.js} +2 -2
- package/dist/6240.js +121 -0
- package/dist/{4490.js → 6373.js} +7 -5
- package/dist/{904.js → 6487.js} +19 -17
- package/dist/{9635.js → 6498.js} +1 -1
- package/dist/6499.js +4 -7
- package/dist/6508.js +7 -0
- package/dist/{8225.js → 6540.js} +1 -0
- package/dist/6551.js +46 -0
- package/dist/{9369.js → 6620.js} +35 -34
- package/dist/{4143.js → 6838.js} +19 -10
- package/dist/6902.js +48 -0
- package/dist/6904.js +51 -0
- package/dist/70.js +24 -0
- package/dist/7024.js +39 -0
- package/dist/{6882.js → 721.js} +737 -362
- package/dist/{951.js → 7270.js} +4 -4
- package/dist/{3485.js → 7323.js} +143 -111
- package/dist/{7541.js → 7488.js} +2 -2
- package/dist/{4863.js → 7542.js} +7 -6
- package/dist/7551.js +28 -0
- package/dist/{7021.js → 7640.js} +1 -1
- package/dist/{353.js → 7692.js} +3 -7
- package/dist/{4707.js → 7930.js} +2 -2
- package/dist/{8052.js → 8.js} +80 -64
- package/dist/{6914.js → 8129.js} +3 -15
- package/dist/{3319.js → 8358.js} +62 -63
- package/dist/{5864.js → 8407.js} +13 -13
- package/dist/8488.js +15 -0
- package/dist/{4768.js → 8495.js} +1 -1
- package/dist/8734.js +171 -0
- package/dist/{1763.js → 9018.js} +205 -331
- package/dist/9053.js +29 -0
- package/dist/9067.js +41 -0
- package/dist/{2861.js → 9120.js} +2 -2
- package/dist/{42.js → 9197.js} +2 -2
- package/dist/{9189.js → 9248.js} +36 -17
- package/dist/{2801.js → 9252.js} +4 -9
- package/dist/9295.js +7 -0
- package/dist/9303.js +8 -0
- package/dist/{167.js → 9374.js} +1 -1
- package/dist/{9352.js → 9540.js} +17 -47
- package/dist/9576.js +51 -0
- package/dist/{8272.js → 9591.js} +36 -46
- package/dist/{6107.js → 9770.js} +2 -2
- package/dist/{5085.js → 9880.js} +6 -3
- package/dist/Accordion/index.d.ts +207 -41
- package/dist/Accordion/index.js +75 -177
- package/dist/AlertDialog/index.d.ts +440 -140
- package/dist/AlertDialog/index.js +3 -13
- package/dist/Autocomplete/index.d.ts +722 -150
- package/dist/Autocomplete/index.js +16 -29
- package/dist/Avatar/index.d.ts +38 -3
- package/dist/Avatar/index.js +82 -28
- package/dist/Breadcrumbs/index.d.ts +63 -91
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/Button/index.d.ts +11 -0
- package/dist/Button/index.js +2 -2
- package/dist/Checkbox/index.d.ts +206 -36
- package/dist/Checkbox/index.js +293 -8
- package/dist/CheckboxField/index.css +1 -1
- package/dist/CheckboxField/index.d.ts +40 -36
- package/dist/CheckboxGroup/index.d.ts +50 -36
- package/dist/CheckboxGroup/index.js +87 -58
- package/dist/CheckboxGroupField/index.css +1 -1
- package/dist/Collapsible/index.d.ts +128 -36
- package/dist/Collapsible/index.js +21 -25
- package/dist/Combobox/index.d.ts +801 -158
- package/dist/Combobox/index.js +70 -114
- package/dist/ContextMenu/index.d.ts +1162 -195
- package/dist/ContextMenu/index.js +46 -36
- package/dist/Dialog/index.d.ts +425 -133
- package/dist/Dialog/index.js +8 -4
- package/dist/Drawer/index.d.ts +589 -144
- package/dist/Drawer/index.js +482 -562
- package/dist/Field/index.css +1 -1
- package/dist/Field/index.d.ts +341 -42
- package/dist/Field/index.js +123 -273
- package/dist/Fieldset/index.d.ts +11 -0
- package/dist/Fieldset/index.js +10 -17
- package/dist/Form/index.d.ts +43 -39
- package/dist/Form/index.js +58 -50
- package/dist/Input/index.css +1 -1
- package/dist/Input/index.d.ts +94 -42
- package/dist/Input/index.js +1 -1
- package/dist/Menu/index.d.ts +1140 -175
- package/dist/Menu/index.js +51 -67
- package/dist/Menubar/index.d.ts +651 -173
- package/dist/Menubar/index.js +12 -16
- package/dist/Meter/index.js +21 -18
- package/dist/NavigationMenu/index.d.ts +370 -86
- package/dist/NavigationMenu/index.js +144 -178
- package/dist/NumberField/index.css +1 -1
- package/dist/NumberField/index.d.ts +507 -47
- package/dist/NumberField/index.js +434 -718
- package/dist/Popover/index.d.ts +561 -142
- package/dist/Popover/index.js +181 -252
- package/dist/PreviewCard/index.d.ts +507 -143
- package/dist/PreviewCard/index.js +97 -151
- package/dist/Progress/index.d.ts +117 -3
- package/dist/Progress/index.js +37 -36
- package/dist/Radio/index.d.ts +177 -7
- package/dist/Radio/index.js +54 -70
- package/dist/RadioField/index.css +1 -1
- package/dist/RadioField/index.d.ts +23 -7
- package/dist/RadioGroup/index.d.ts +51 -37
- package/dist/RadioGroup/index.js +60 -51
- package/dist/RadioGroupField/index.css +1 -1
- package/dist/RadioGroupField/index.d.ts +40 -37
- package/dist/ScrollArea/index.d.ts +295 -1
- package/dist/ScrollArea/index.js +256 -324
- package/dist/Select/index.d.ts +516 -123
- package/dist/Select/index.js +513 -635
- package/dist/SelectField/index.css +1 -1
- package/dist/SelectField/index.d.ts +109 -134
- package/dist/SelectField/index.js +5 -1
- package/dist/Separator/index.d.ts +12 -0
- package/dist/Separator/index.js +1 -1
- package/dist/Slider/index.d.ts +383 -64
- package/dist/Slider/index.js +298 -374
- package/dist/Switch/index.d.ts +184 -37
- package/dist/Switch/index.js +44 -58
- package/dist/Tabs/index.d.ts +220 -35
- package/dist/Tabs/index.js +199 -193
- package/dist/Toast/index.d.ts +280 -64
- package/dist/Toast/index.js +299 -374
- package/dist/Toggle/index.d.ts +55 -35
- package/dist/Toggle/index.js +19 -13
- package/dist/ToggleGroup/index.d.ts +62 -35
- package/dist/ToggleGroup/index.js +13 -31
- package/dist/Toolbar/index.d.ts +117 -2
- package/dist/Toolbar/index.js +31 -43
- package/dist/Tooltip/index.d.ts +507 -150
- package/dist/Tooltip/index.js +163 -213
- package/dist/index.d.ts +12912 -5382
- package/package.json +3 -3
- package/dist/2205.js +0 -26
- package/dist/2274.js +0 -34
- package/dist/2287.js +0 -17
- package/dist/3020.js +0 -7
- package/dist/3021.js +0 -72
- package/dist/3140.js +0 -4
- package/dist/3248.js +0 -307
- package/dist/4026.js +0 -12
- package/dist/4922.js +0 -15
- package/dist/5659.js +0 -4
- package/dist/5992.js +0 -447
- package/dist/6330.js +0 -30
- package/dist/6535.js +0 -72
- package/dist/6917.js +0 -55
- package/dist/7725.js +0 -10
- package/dist/7871.js +0 -38
- package/dist/8106.js +0 -239
- package/dist/8685.js +0 -102
- package/dist/8935.js +0 -8
- package/dist/8971.js +0 -40
- package/dist/8979.js +0 -10
- package/dist/9048.js +0 -52
- package/dist/9087.js +0 -256
- package/dist/9255.js +0 -136
- /package/dist/{1457.js → 1068.js} +0 -0
- /package/dist/{6003.js → 1234.js} +0 -0
- /package/dist/{4723.js → 1282.js} +0 -0
- /package/dist/{6825.js → 1876.js} +0 -0
- /package/dist/{5778.js → 1885.js} +0 -0
- /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
- /package/dist/{1279.js → 3278.js} +0 -0
- /package/dist/{3296.js → 5568.js} +0 -0
- /package/dist/{8685.css → 6240.css} +0 -0
- /package/dist/{9829.js → 6488.js} +0 -0
- /package/dist/{9863.js → 6534.js} +0 -0
- /package/dist/{4495.js → 7718.js} +0 -0
- /package/dist/{3395.js → 8866.js} +0 -0
- /package/dist/{2418.js → 9837.js} +0 -0
package/dist/Menu/index.d.ts
CHANGED
|
@@ -8,27 +8,161 @@ import { ContextMenuItemProps } from '@base-ui/react';
|
|
|
8
8
|
import { ContextMenuLinkItemProps } from '@base-ui/react';
|
|
9
9
|
import { ContextMenuPopupProps } from '@base-ui/react';
|
|
10
10
|
import { ContextMenuPortalProps } from '@base-ui/react';
|
|
11
|
-
import { ContextMenuPositionerProps } from '@base-ui/react';
|
|
12
11
|
import { ContextMenuRadioGroupProps } from '@base-ui/react';
|
|
13
12
|
import { ContextMenuRadioItemIndicatorProps } from '@base-ui/react';
|
|
14
13
|
import { ContextMenuRadioItemProps } from '@base-ui/react';
|
|
15
14
|
import { ContextMenuSubmenuTriggerProps } from '@base-ui/react';
|
|
16
|
-
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.
|
|
17
|
-
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.
|
|
15
|
+
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.mjs';
|
|
16
|
+
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.mjs';
|
|
18
17
|
import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
19
18
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
20
|
-
import {
|
|
19
|
+
import { MenuPositionerProps as MenuPositionerProps_2 } from '@base-ui/react';
|
|
20
|
+
import { MenuRootChangeEventReason as MenuRootChangeEventReason_2 } from '../index.mjs';
|
|
21
|
+
import { MenuViewportProps as MenuViewportProps_2 } from '@base-ui/react';
|
|
21
22
|
import { Padding } from '@floating-ui/react-dom';
|
|
22
23
|
import * as React_2 from 'react';
|
|
23
24
|
import { ReactStore } from '@base-ui/utils/store';
|
|
24
|
-
import { Rect } from '@floating-ui/utils';
|
|
25
|
+
import type { Rect } from '@floating-ui/utils';
|
|
25
26
|
import { SeparatorProps as SeparatorProps_2 } from '@base-ui/react';
|
|
26
|
-
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.
|
|
27
|
+
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
|
|
27
28
|
import type { UseFloatingReturn } from '@floating-ui/react-dom';
|
|
28
29
|
import { VirtualElement } from '@floating-ui/react-dom';
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Indicates the direction from which the popup was activated.
|
|
33
|
+
* This can be used to create directional animations based on how the popup was triggered.
|
|
34
|
+
* Contains space-separated values for both horizontal and vertical axes.
|
|
35
|
+
* @type {`${'left' | 'right' | ''} ${'down' | 'up' | ''}`}
|
|
36
|
+
*/
|
|
37
|
+
declare const activationDirection = "data-activation-direction";
|
|
38
|
+
|
|
39
|
+
declare type AdaptiveOriginMiddleware = {
|
|
40
|
+
name: string;
|
|
41
|
+
fn: (...args: any[]) => any;
|
|
42
|
+
};
|
|
43
|
+
|
|
30
44
|
declare type Align = 'start' | 'center' | 'end';
|
|
31
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
48
|
+
* @type {'start' | 'center' | 'end'}
|
|
49
|
+
*/
|
|
50
|
+
declare const align = "data-align";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
54
|
+
* @type {'start' | 'center' | 'end'}
|
|
55
|
+
*/
|
|
56
|
+
declare const align_2 = "data-align";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Indicates how the popup is aligned relative to the specified side.
|
|
60
|
+
* @type {'start' | 'center' | 'end'}
|
|
61
|
+
*/
|
|
62
|
+
declare const align_3 = "data-align";
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The anchor's height.
|
|
66
|
+
* @type {number}
|
|
67
|
+
*/
|
|
68
|
+
declare const anchorHeight = "--anchor-height";
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Present when the anchor is hidden.
|
|
72
|
+
*/
|
|
73
|
+
declare const anchorHidden = "data-anchor-hidden";
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The anchor's width.
|
|
77
|
+
* @type {number}
|
|
78
|
+
*/
|
|
79
|
+
declare const anchorWidth = "--anchor-width";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The available height between the anchor and the edge of the viewport.
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
declare const availableHeight = "--available-height";
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The available width between the anchor and the edge of the viewport.
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
declare const availableWidth = "--available-width";
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Shared implementation for popup handles that coordinate detached triggers with a mounted root.
|
|
95
|
+
*
|
|
96
|
+
* Subclasses provide the component-specific imperative methods, while this base class owns the
|
|
97
|
+
* fallback store, root store attachment stack, subscriber notifications, and development warning for
|
|
98
|
+
* overlapping roots.
|
|
99
|
+
*
|
|
100
|
+
* @template HandleStore Store shape exposed to detached triggers.
|
|
101
|
+
* @template Store Root-owned store attached by the component root.
|
|
102
|
+
*/
|
|
103
|
+
declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
|
|
104
|
+
protected readonly fallbackStore: HandleStore;
|
|
105
|
+
private readonly componentName;
|
|
106
|
+
private readonly throwOnMissingTrigger;
|
|
107
|
+
/**
|
|
108
|
+
* Stores of every root currently using this handle, in attach order. A handle is meant to be used
|
|
109
|
+
* by a single mounted root, but roots can transiently overlap (e.g. during an animated route
|
|
110
|
+
* transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
|
|
111
|
+
* leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
|
|
112
|
+
*/
|
|
113
|
+
private readonly attachedStores;
|
|
114
|
+
/**
|
|
115
|
+
* Store of the root that currently controls the handle: the most recently attached one still
|
|
116
|
+
* mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
|
|
117
|
+
*/
|
|
118
|
+
private attachedStoreValue;
|
|
119
|
+
/**
|
|
120
|
+
* Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
|
|
121
|
+
*/
|
|
122
|
+
private readonly storeListeners;
|
|
123
|
+
/**
|
|
124
|
+
* Creates a handle backed by the store used while no root is attached.
|
|
125
|
+
*
|
|
126
|
+
* @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
|
|
127
|
+
* so they can render and register without a mounted root. Triggers register into whichever store
|
|
128
|
+
* `store` currently resolves to, so while detached they live in this store's trigger map and
|
|
129
|
+
* migrate themselves to the root's store (and back) as it attaches/detaches.
|
|
130
|
+
* @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
|
|
131
|
+
* `MenuHandle.open()` in warning text.
|
|
132
|
+
* @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
|
|
133
|
+
* registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
|
|
134
|
+
* so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
|
|
135
|
+
*/
|
|
136
|
+
constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
|
|
137
|
+
protected get attachedStore(): Store | null;
|
|
138
|
+
/**
|
|
139
|
+
* Sets the store that currently controls the handle and notifies subscribers when it changes, so
|
|
140
|
+
* detached triggers re-render and migrate their registration to the new store.
|
|
141
|
+
*/
|
|
142
|
+
private setActiveStore;
|
|
143
|
+
/**
|
|
144
|
+
* Opens the attached root's store and associates it with the trigger with the given id, or a
|
|
145
|
+
* no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
|
|
146
|
+
* `open()` method, which only narrows the parameter type.
|
|
147
|
+
*
|
|
148
|
+
* When a trigger id is given but no matching trigger is registered, anchored popups throw (see
|
|
149
|
+
* `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
|
|
150
|
+
*
|
|
151
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
152
|
+
*
|
|
153
|
+
* @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
|
|
154
|
+
* without associating any trigger.
|
|
155
|
+
*/
|
|
156
|
+
protected openByTrigger(triggerId: string | null | undefined): void;
|
|
157
|
+
/**
|
|
158
|
+
* Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
|
|
159
|
+
* while no root is attached. Shared by every concrete handle's public `close()` method.
|
|
160
|
+
*
|
|
161
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
162
|
+
*/
|
|
163
|
+
protected closePopup(): void;
|
|
164
|
+
}
|
|
165
|
+
|
|
32
166
|
declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
33
167
|
/**
|
|
34
168
|
* The reason for the event.
|
|
@@ -94,17 +228,79 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
|
|
|
94
228
|
readonly baseUIHandlerPrevented?: boolean | undefined;
|
|
95
229
|
};
|
|
96
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Details of custom generic events emitted by Base UI components.
|
|
233
|
+
*/
|
|
234
|
+
declare type BaseUIGenericEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
235
|
+
/**
|
|
236
|
+
* The reason for the event.
|
|
237
|
+
*/
|
|
238
|
+
reason: Reason;
|
|
239
|
+
/**
|
|
240
|
+
* The native event associated with the custom event.
|
|
241
|
+
*/
|
|
242
|
+
event: ReasonToEvent<Reason>;
|
|
243
|
+
} & CustomProperties;
|
|
244
|
+
|
|
245
|
+
declare type BaseUIGenericEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIGenericEventDetail<Reason, CustomProperties> & {} : never;
|
|
246
|
+
|
|
247
|
+
/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */
|
|
248
|
+
declare type BaseUIHighlightEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends typeof REASONS.pointer ? {
|
|
249
|
+
reason: Reason;
|
|
250
|
+
event: MouseEvent | PointerEvent;
|
|
251
|
+
} & CustomProperties : BaseUIGenericEventDetails<Reason, CustomProperties>;
|
|
252
|
+
|
|
97
253
|
declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
|
|
98
254
|
|
|
99
|
-
declare const cancelOpen:
|
|
255
|
+
declare const cancelOpen: 'cancel-open';
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Present when the menu checkbox item is checked.
|
|
259
|
+
*/
|
|
260
|
+
declare const checked = "data-checked";
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Present when the menu checkbox item is checked.
|
|
264
|
+
*/
|
|
265
|
+
declare const checked_2 = "data-checked";
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Present when the menu radio item is selected.
|
|
269
|
+
*/
|
|
270
|
+
declare const checked_3 = "data-checked";
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Present when the menu radio item is selected.
|
|
274
|
+
*/
|
|
275
|
+
declare const checked_4 = "data-checked";
|
|
276
|
+
|
|
277
|
+
declare const chipRemovePress: 'chip-remove-press';
|
|
100
278
|
|
|
101
|
-
declare const
|
|
279
|
+
declare const clearPress: 'clear-press';
|
|
102
280
|
|
|
103
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Present when the menu popup is closed.
|
|
283
|
+
*/
|
|
284
|
+
declare const closed_2 = "data-closed";
|
|
104
285
|
|
|
105
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Present when the menu is closed.
|
|
288
|
+
*/
|
|
289
|
+
declare const closed_3 = "data-closed";
|
|
106
290
|
|
|
107
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Present when the menu is closed.
|
|
293
|
+
*/
|
|
294
|
+
declare const closed_4 = "data-closed";
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Present when the menu popup is closed.
|
|
298
|
+
*/
|
|
299
|
+
declare const closed_5 = "data-closed";
|
|
300
|
+
|
|
301
|
+
declare const closePress: 'close-press';
|
|
302
|
+
|
|
303
|
+
declare const closeWatcher: 'close-watcher';
|
|
108
304
|
|
|
109
305
|
declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
|
|
110
306
|
|
|
@@ -122,8 +318,19 @@ declare type Context = PopupStoreContext<MenuRoot.ChangeEventDetails> & {
|
|
|
122
318
|
readonly typingRef: React_2.RefObject<boolean>;
|
|
123
319
|
readonly itemDomElements: React_2.RefObject<(HTMLElement | null)[]>;
|
|
124
320
|
readonly itemLabels: React_2.RefObject<(string | null)[]>;
|
|
321
|
+
/** Why the next `activeIndex` write happens, consumed by `onItemHighlighted` on commit. */
|
|
322
|
+
highlightReason: MenuRoot.HighlightEventReason;
|
|
323
|
+
/** The event that caused the next `activeIndex` write, reported along with `highlightReason`. */
|
|
324
|
+
highlightEvent: Event | undefined;
|
|
325
|
+
/** The item last committed as highlighted, kept in every menu so reasons compare against it. */
|
|
326
|
+
reportedItem: HTMLElement | undefined;
|
|
125
327
|
allowMouseUpTriggerRef: React_2.RefObject<boolean>;
|
|
328
|
+
/** The element that holds real focus while virtual list navigation is active. */
|
|
329
|
+
virtualFocusRef: React_2.RefObject<HTMLElement | null> | undefined;
|
|
330
|
+
/** Whether a filterable menu's trigger was last pressed by a screen reader. */
|
|
331
|
+
virtualPress?: boolean | undefined;
|
|
126
332
|
readonly triggerFocusTargetRef: React_2.RefObject<HTMLElement | null>;
|
|
333
|
+
readonly beforeTriggerFocusGuardRef: React_2.RefObject<HTMLElement | null>;
|
|
127
334
|
readonly beforeContentFocusGuardRef: React_2.RefObject<HTMLElement | null>;
|
|
128
335
|
};
|
|
129
336
|
|
|
@@ -139,7 +346,7 @@ declare interface ContextData {
|
|
|
139
346
|
*
|
|
140
347
|
* Documentation: [Base UI Context Menu](https://base-ui.com/react/components/context-menu)
|
|
141
348
|
*/
|
|
142
|
-
declare function ContextMenuRoot(props: ContextMenuRoot.Props):
|
|
349
|
+
declare function ContextMenuRoot(props: ContextMenuRoot.Props): React_2.JSX.Element;
|
|
143
350
|
|
|
144
351
|
declare namespace ContextMenuRoot {
|
|
145
352
|
type State = ContextMenuRootState;
|
|
@@ -176,11 +383,17 @@ declare interface ContextMenuRootContext {
|
|
|
176
383
|
|
|
177
384
|
declare const ContextMenuRootContext: React_2.Context<ContextMenuRootContext | undefined>;
|
|
178
385
|
|
|
179
|
-
declare interface ContextMenuRootProps extends Omit<Menu_2.Root.Props, 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'onOpenChange'> {
|
|
386
|
+
declare interface ContextMenuRootProps extends Omit<Menu_2.Root.Props, 'handle' | 'triggerId' | 'defaultTriggerId' | 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'closeParentOnEsc' | 'onOpenChange' | 'children'> {
|
|
180
387
|
/**
|
|
181
388
|
* Event handler called when the menu is opened or closed.
|
|
182
389
|
*/
|
|
183
390
|
onOpenChange?: ((open: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void) | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* @ignore
|
|
393
|
+
* @deprecated This prop has no effect on Context Menu.
|
|
394
|
+
*/
|
|
395
|
+
closeParentOnEsc?: Menu_2.Root.Props['closeParentOnEsc'] | undefined;
|
|
396
|
+
children?: React_2.ReactNode | undefined;
|
|
184
397
|
}
|
|
185
398
|
|
|
186
399
|
declare interface ContextMenuRootState {}
|
|
@@ -190,13 +403,78 @@ declare interface ContextMenuRootState {}
|
|
|
190
403
|
*/
|
|
191
404
|
declare function createMenuHandle<Payload>(): MenuHandle<Payload>;
|
|
192
405
|
|
|
193
|
-
|
|
406
|
+
/**
|
|
407
|
+
* Applied to the direct child of the viewport when no transitions are present or the new content when it's entering.
|
|
408
|
+
*/
|
|
409
|
+
declare const current = "data-current";
|
|
194
410
|
|
|
195
|
-
declare const
|
|
411
|
+
declare const decrementPress: 'decrement-press';
|
|
196
412
|
|
|
197
|
-
declare const
|
|
413
|
+
declare const disabled: 'disabled';
|
|
198
414
|
|
|
199
|
-
|
|
415
|
+
/**
|
|
416
|
+
* Present when the menu checkbox item is disabled.
|
|
417
|
+
*/
|
|
418
|
+
declare const disabled_2 = "data-disabled";
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Present when the menu checkbox item is disabled.
|
|
422
|
+
*/
|
|
423
|
+
declare const disabled_3 = "data-disabled";
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Present when the menu item is disabled.
|
|
427
|
+
*/
|
|
428
|
+
declare const disabled_4 = "data-disabled";
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Present when the menu radio item is disabled.
|
|
432
|
+
*/
|
|
433
|
+
declare const disabled_5 = "data-disabled";
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Present when the menu radio item is disabled.
|
|
437
|
+
*/
|
|
438
|
+
declare const disabled_6 = "data-disabled";
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Present when the trigger is disabled.
|
|
442
|
+
*/
|
|
443
|
+
declare const disabled_7 = "data-disabled";
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Present when the submenu trigger is disabled.
|
|
447
|
+
*/
|
|
448
|
+
declare const disabled_8 = "data-disabled";
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Present when the button is disabled.
|
|
452
|
+
*/
|
|
453
|
+
declare const disabled_9 = "data-disabled";
|
|
454
|
+
|
|
455
|
+
declare const drag: 'drag';
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Present when the menu is animating out.
|
|
459
|
+
*/
|
|
460
|
+
declare const endingStyle = "data-ending-style";
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Present when the indicator is animating out.
|
|
464
|
+
*/
|
|
465
|
+
declare const endingStyle_2 = "data-ending-style";
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Present when the menu is animating out.
|
|
469
|
+
*/
|
|
470
|
+
declare const endingStyle_3 = "data-ending-style";
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Present when the radio indicator is animating out.
|
|
474
|
+
*/
|
|
475
|
+
declare const endingStyle_4 = "data-ending-style";
|
|
476
|
+
|
|
477
|
+
declare const escapeKey: 'escape-key';
|
|
200
478
|
|
|
201
479
|
declare interface ExtendedElements {
|
|
202
480
|
reference: ReferenceType | null;
|
|
@@ -213,6 +491,44 @@ declare interface ExtendedRefs {
|
|
|
213
491
|
setPositionReference(node: ReferenceType | null): void;
|
|
214
492
|
}
|
|
215
493
|
|
|
494
|
+
declare interface FilterDropdownClearProps extends NativeButtonProps, BaseUIComponentProps<'button', FilterDropdownClearState> {
|
|
495
|
+
/**
|
|
496
|
+
* Whether the component should ignore user interaction.
|
|
497
|
+
* @default false
|
|
498
|
+
*/
|
|
499
|
+
disabled?: boolean | undefined;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
declare interface FilterDropdownClearState {
|
|
503
|
+
/**
|
|
504
|
+
* Whether the component should ignore user interaction.
|
|
505
|
+
*/
|
|
506
|
+
disabled: boolean;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
declare interface FilterDropdownEmptyProps extends BaseUIComponentProps<'div', FilterDropdownEmptyState> {}
|
|
510
|
+
|
|
511
|
+
declare interface FilterDropdownEmptyState {}
|
|
512
|
+
|
|
513
|
+
declare interface FilterDropdownInputProps extends BaseUIComponentProps<'input', FilterDropdownInputState> {}
|
|
514
|
+
|
|
515
|
+
declare interface FilterDropdownInputState {
|
|
516
|
+
/**
|
|
517
|
+
* Whether the input shows its focus ring.
|
|
518
|
+
* Cleared when keyboard navigation highlights an item.
|
|
519
|
+
*/
|
|
520
|
+
highlighted: boolean;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare namespace FilterDropdownRoot {
|
|
524
|
+
type ChangeEventReason = FilterDropdownRootChangeEventReason;
|
|
525
|
+
type ChangeEventDetails = FilterDropdownRootChangeEventDetails;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
declare type FilterDropdownRootChangeEventDetails = BaseUIChangeEventDetails<FilterDropdownRootChangeEventReason>;
|
|
529
|
+
|
|
530
|
+
declare type FilterDropdownRootChangeEventReason = typeof REASONS.inputChange | typeof REASONS.inputClear | typeof REASONS.clearPress | typeof REASONS.popupClose;
|
|
531
|
+
|
|
216
532
|
declare type FloatingContext = Omit<UseFloatingReturn<ReferenceType>, 'refs' | 'elements'> & {
|
|
217
533
|
open: boolean;
|
|
218
534
|
onOpenChange(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void;
|
|
@@ -237,31 +553,6 @@ declare interface FloatingNodeType {
|
|
|
237
553
|
context?: FloatingContext | undefined;
|
|
238
554
|
}
|
|
239
555
|
|
|
240
|
-
/**
|
|
241
|
-
* Portals the floating element into a given container element — by default,
|
|
242
|
-
* outside of the app root and into the body.
|
|
243
|
-
* This is necessary to ensure the floating element can appear outside any
|
|
244
|
-
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
245
|
-
* while retaining its location in the React tree.
|
|
246
|
-
* @see https://floating-ui.com/docs/FloatingPortal
|
|
247
|
-
* @internal
|
|
248
|
-
*/
|
|
249
|
-
declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
250
|
-
renderGuards?: boolean | undefined;
|
|
251
|
-
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
252
|
-
|
|
253
|
-
declare namespace FloatingPortal {
|
|
254
|
-
type State = FloatingPortalState;
|
|
255
|
-
interface Props<TState> extends BaseUIComponentProps<'div', TState> {
|
|
256
|
-
/**
|
|
257
|
-
* A parent element to render the portal element into.
|
|
258
|
-
*/
|
|
259
|
-
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
declare interface FloatingPortalState {}
|
|
264
|
-
|
|
265
556
|
declare type FloatingRootContext = FloatingRootStore;
|
|
266
557
|
|
|
267
558
|
declare interface FloatingRootState {
|
|
@@ -332,35 +623,80 @@ declare class FloatingTreeStore {
|
|
|
332
623
|
removeNode(node: FloatingNodeType): void;
|
|
333
624
|
}
|
|
334
625
|
|
|
335
|
-
declare const focusOut:
|
|
626
|
+
declare const focusOut: 'focus-out';
|
|
627
|
+
|
|
628
|
+
declare function getFilter(options?: MenuFilterOptions): MenuFilter;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Present when the menu checkbox item is highlighted.
|
|
632
|
+
*/
|
|
633
|
+
declare const highlighted = "data-highlighted";
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Present when the menu item is highlighted.
|
|
637
|
+
*/
|
|
638
|
+
declare const highlighted_2 = "data-highlighted";
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Present when the link is highlighted.
|
|
642
|
+
*/
|
|
643
|
+
declare const highlighted_3 = "data-highlighted";
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Present when the menu radio item is highlighted.
|
|
647
|
+
*/
|
|
648
|
+
declare const highlighted_4 = "data-highlighted";
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Present when the submenu trigger is highlighted.
|
|
652
|
+
*/
|
|
653
|
+
declare const highlighted_5 = "data-highlighted";
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Present while the input shows its focus ring.
|
|
657
|
+
* Cleared when keyboard navigation highlights an item.
|
|
658
|
+
*/
|
|
659
|
+
declare const highlighted_6 = "data-highlighted";
|
|
336
660
|
|
|
337
661
|
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
338
662
|
ref?: React_2.Ref<T> | undefined;
|
|
339
663
|
};
|
|
340
664
|
|
|
341
|
-
declare const imperativeAction:
|
|
665
|
+
declare const imperativeAction: 'imperative-action';
|
|
342
666
|
|
|
343
|
-
declare const incrementPress:
|
|
667
|
+
declare const incrementPress: 'increment-press';
|
|
344
668
|
|
|
345
|
-
declare const initial:
|
|
669
|
+
declare const initial: 'initial';
|
|
346
670
|
|
|
347
|
-
declare const inputBlur:
|
|
671
|
+
declare const inputBlur: 'input-blur';
|
|
348
672
|
|
|
349
|
-
declare const inputChange:
|
|
673
|
+
declare const inputChange: 'input-change';
|
|
350
674
|
|
|
351
|
-
declare const inputClear:
|
|
675
|
+
declare const inputClear: 'input-clear';
|
|
352
676
|
|
|
353
|
-
declare const inputPaste:
|
|
677
|
+
declare const inputPaste: 'input-paste';
|
|
354
678
|
|
|
355
|
-
declare const inputPress:
|
|
679
|
+
declare const inputPress: 'input-press';
|
|
356
680
|
|
|
357
|
-
|
|
681
|
+
/**
|
|
682
|
+
* Present if animations should be instant.
|
|
683
|
+
* @type {'click' | 'dismiss' | 'group' | 'trigger-change'}
|
|
684
|
+
*/
|
|
685
|
+
declare const instant = "data-instant";
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Present if animations should be instant.
|
|
689
|
+
* @type {'click' | 'dismiss' | 'group' | 'trigger-change'}
|
|
690
|
+
*/
|
|
691
|
+
declare const instant_2 = "data-instant";
|
|
692
|
+
|
|
693
|
+
declare const itemPress: 'item-press';
|
|
358
694
|
|
|
359
|
-
declare const keyboard:
|
|
695
|
+
declare const keyboard: 'keyboard';
|
|
360
696
|
|
|
361
|
-
declare const linkPress:
|
|
697
|
+
declare const linkPress: 'link-press';
|
|
362
698
|
|
|
363
|
-
declare const listNavigation:
|
|
699
|
+
declare const listNavigation: 'list-navigation';
|
|
364
700
|
|
|
365
701
|
export declare const Menu: {
|
|
366
702
|
Arrow: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuArrowProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
@@ -390,7 +726,7 @@ export declare const Menu: {
|
|
|
390
726
|
Popup: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuPopupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
391
727
|
className?: string;
|
|
392
728
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
393
|
-
Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
729
|
+
Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<MenuPositionerProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
394
730
|
className?: string;
|
|
395
731
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
396
732
|
RadioGroup: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuRadioGroupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
@@ -405,10 +741,10 @@ export declare const Menu: {
|
|
|
405
741
|
SubmenuTrigger: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuSubmenuTriggerProps, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
406
742
|
className?: string;
|
|
407
743
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
408
|
-
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
744
|
+
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<MenuViewportProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
409
745
|
className?: string;
|
|
410
746
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
411
|
-
Root:
|
|
747
|
+
Root: typeof Menu_2.Root;
|
|
412
748
|
Trigger: typeof Trigger;
|
|
413
749
|
SubmenuRoot: typeof Menu_2.SubmenuRoot;
|
|
414
750
|
Portal: React_2.ForwardRefExoticComponent<Omit<ContextMenuPortalProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -442,7 +778,13 @@ export declare namespace Menu_2 {
|
|
|
442
778
|
Separator,
|
|
443
779
|
MenuSubmenuTrigger as SubmenuTrigger,
|
|
444
780
|
MenuHandle as Handle,
|
|
445
|
-
createMenuHandle as createHandle
|
|
781
|
+
createMenuHandle as createHandle,
|
|
782
|
+
MenuFilterProvider as FilterProvider,
|
|
783
|
+
MenuInput as Input,
|
|
784
|
+
MenuList as List,
|
|
785
|
+
MenuClear as Clear,
|
|
786
|
+
MenuEmpty as Empty,
|
|
787
|
+
getFilter as useFilter
|
|
446
788
|
}
|
|
447
789
|
}
|
|
448
790
|
|
|
@@ -459,6 +801,16 @@ export declare namespace MenuArrow {
|
|
|
459
801
|
export type Props = MenuArrowProps;
|
|
460
802
|
}
|
|
461
803
|
|
|
804
|
+
export declare namespace MenuArrowDataAttributes {
|
|
805
|
+
export {
|
|
806
|
+
open_2 as open,
|
|
807
|
+
closed_2 as closed,
|
|
808
|
+
side,
|
|
809
|
+
align,
|
|
810
|
+
uncentered
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
462
814
|
export declare interface MenuArrowProps extends BaseUIComponentProps<'div', MenuArrowState> {}
|
|
463
815
|
|
|
464
816
|
export declare interface MenuArrowState {
|
|
@@ -493,6 +845,15 @@ export declare namespace MenuBackdrop {
|
|
|
493
845
|
export type Props = MenuBackdropProps;
|
|
494
846
|
}
|
|
495
847
|
|
|
848
|
+
export declare namespace MenuBackdropDataAttributes {
|
|
849
|
+
export {
|
|
850
|
+
open_3 as open,
|
|
851
|
+
closed_3 as closed,
|
|
852
|
+
startingStyle,
|
|
853
|
+
endingStyle
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
496
857
|
export declare interface MenuBackdropProps extends BaseUIComponentProps<'div', MenuBackdropState> {}
|
|
497
858
|
|
|
498
859
|
export declare interface MenuBackdropState {
|
|
@@ -539,6 +900,15 @@ export declare type MenuCheckboxItemChangeEventDetails = MenuRoot.ChangeEventDet
|
|
|
539
900
|
|
|
540
901
|
export declare type MenuCheckboxItemChangeEventReason = MenuRoot.ChangeEventReason;
|
|
541
902
|
|
|
903
|
+
export declare namespace MenuCheckboxItemDataAttributes {
|
|
904
|
+
export {
|
|
905
|
+
checked,
|
|
906
|
+
unchecked,
|
|
907
|
+
disabled_2 as disabled,
|
|
908
|
+
highlighted
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
542
912
|
/**
|
|
543
913
|
* Indicates whether the checkbox item is ticked.
|
|
544
914
|
* Renders a `<span>` element.
|
|
@@ -552,6 +922,16 @@ export declare namespace MenuCheckboxItemIndicator {
|
|
|
552
922
|
export type State = MenuCheckboxItemIndicatorState;
|
|
553
923
|
}
|
|
554
924
|
|
|
925
|
+
export declare namespace MenuCheckboxItemIndicatorDataAttributes {
|
|
926
|
+
export {
|
|
927
|
+
checked_2 as checked,
|
|
928
|
+
unchecked_2 as unchecked,
|
|
929
|
+
disabled_3 as disabled,
|
|
930
|
+
startingStyle_2 as startingStyle,
|
|
931
|
+
endingStyle_2 as endingStyle
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
555
935
|
export declare interface MenuCheckboxItemIndicatorProps extends BaseUIComponentProps<'span', MenuCheckboxItemIndicatorState> {
|
|
556
936
|
/**
|
|
557
937
|
* Whether to keep the HTML element in the DOM when the checkbox item is not checked.
|
|
@@ -607,7 +987,8 @@ export declare interface MenuCheckboxItemProps extends NonNativeButtonProps, Bas
|
|
|
607
987
|
*/
|
|
608
988
|
disabled?: boolean | undefined;
|
|
609
989
|
/**
|
|
610
|
-
* Overrides the text
|
|
990
|
+
* Overrides the text used for keyboard text navigation and filtering.
|
|
991
|
+
* Falls back to the rendered text when not provided.
|
|
611
992
|
*/
|
|
612
993
|
label?: string | undefined;
|
|
613
994
|
/**
|
|
@@ -636,6 +1017,138 @@ export declare interface MenuCheckboxItemState {
|
|
|
636
1017
|
checked: boolean;
|
|
637
1018
|
}
|
|
638
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* A button that clears the input text.
|
|
1022
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1023
|
+
* Renders a `<button>` element when the input has text.
|
|
1024
|
+
*
|
|
1025
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1026
|
+
*/
|
|
1027
|
+
export declare const MenuClear: React_2.ForwardRefExoticComponent<Omit<MenuClearProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1028
|
+
|
|
1029
|
+
export declare namespace MenuClear {
|
|
1030
|
+
export type State = MenuClearState;
|
|
1031
|
+
export type Props = MenuClearProps;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
export declare namespace MenuClearDataAttributes {
|
|
1035
|
+
export {
|
|
1036
|
+
disabled_9 as disabled
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export declare interface MenuClearProps extends FilterDropdownClearProps {}
|
|
1041
|
+
|
|
1042
|
+
export declare interface MenuClearState extends FilterDropdownClearState {}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* A message shown when the menu has no matching items.
|
|
1046
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1047
|
+
* Renders a `<div>` element.
|
|
1048
|
+
*
|
|
1049
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1050
|
+
*/
|
|
1051
|
+
export declare const MenuEmpty: React_2.ForwardRefExoticComponent<Omit<MenuEmptyProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1052
|
+
|
|
1053
|
+
export declare namespace MenuEmpty {
|
|
1054
|
+
export type State = MenuEmptyState;
|
|
1055
|
+
export type Props = MenuEmptyProps;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export declare interface MenuEmptyProps extends FilterDropdownEmptyProps {}
|
|
1059
|
+
|
|
1060
|
+
export declare interface MenuEmptyState extends FilterDropdownEmptyState {}
|
|
1061
|
+
|
|
1062
|
+
export declare interface MenuFilter {
|
|
1063
|
+
/** Returns whether the item matches the query anywhere. */
|
|
1064
|
+
contains: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
|
|
1065
|
+
/** Returns whether the item starts with the query. */
|
|
1066
|
+
startsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
|
|
1067
|
+
/** Returns whether the item ends with the query. */
|
|
1068
|
+
endsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
export declare interface MenuFilterOptions extends Intl.CollatorOptions {
|
|
1072
|
+
/**
|
|
1073
|
+
* The locale to use for string comparison.
|
|
1074
|
+
* Defaults to the user's runtime locale.
|
|
1075
|
+
*/
|
|
1076
|
+
locale?: Intl.LocalesArgument | undefined;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Enables filtering for the menu or submenu it wraps. Add `Menu.Input` to the popup and place
|
|
1081
|
+
* its items in `Menu.List`.
|
|
1082
|
+
* Wrap each searchable submenu in its own provider.
|
|
1083
|
+
* Doesn't render its own HTML element.
|
|
1084
|
+
*
|
|
1085
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1086
|
+
*/
|
|
1087
|
+
export declare function MenuFilterProvider(props: MenuFilterProvider.Props): React_2.JSX.Element;
|
|
1088
|
+
|
|
1089
|
+
export declare namespace MenuFilterProvider {
|
|
1090
|
+
export type State = MenuFilterProviderState;
|
|
1091
|
+
export type Props = MenuFilterProviderProps;
|
|
1092
|
+
export type ChangeEventReason = MenuFilterProviderChangeEventReason;
|
|
1093
|
+
export type ChangeEventDetails = MenuFilterProviderChangeEventDetails;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
export declare type MenuFilterProviderChangeEventDetails = FilterDropdownRoot.ChangeEventDetails;
|
|
1097
|
+
|
|
1098
|
+
export declare type MenuFilterProviderChangeEventReason = FilterDropdownRoot.ChangeEventReason;
|
|
1099
|
+
|
|
1100
|
+
/** The filtering props of `Menu.FilterProvider`, applied to the root directly inside it. */
|
|
1101
|
+
declare interface MenuFilterProviderOptions {
|
|
1102
|
+
/**
|
|
1103
|
+
* Filter function used to match items against the query. Receives each item's `label` (or its
|
|
1104
|
+
* rendered text) and the trimmed query, and keeps the item when it returns `true`.
|
|
1105
|
+
* By default, items match when they contain the query, ignoring case, accents, and punctuation.
|
|
1106
|
+
* Pass `null` when rendering filtered items yourself.
|
|
1107
|
+
*/
|
|
1108
|
+
filter?: ((text: string, query: string) => boolean) | null | undefined;
|
|
1109
|
+
/**
|
|
1110
|
+
* Whether filtering highlights the first matching item automatically.
|
|
1111
|
+
* - `true`: highlight it while the query is not empty.
|
|
1112
|
+
* - `'always'`: highlight it even when the query is empty.
|
|
1113
|
+
*
|
|
1114
|
+
* Opening the menu from the keyboard highlights the first item either way, and the arrow keys
|
|
1115
|
+
* can move the highlight to another item. With either value, the arrow keys wrap within the
|
|
1116
|
+
* list rather than returning to the input, and with `'always'` a pointer highlight stays when
|
|
1117
|
+
* the pointer leaves.
|
|
1118
|
+
* @default false
|
|
1119
|
+
*/
|
|
1120
|
+
autoHighlight?: boolean | 'always' | undefined;
|
|
1121
|
+
/**
|
|
1122
|
+
* The locale the default `filter` uses for string comparison.
|
|
1123
|
+
* Defaults to the user's runtime locale.
|
|
1124
|
+
*/
|
|
1125
|
+
locale?: Intl.LocalesArgument | undefined;
|
|
1126
|
+
/**
|
|
1127
|
+
* The uncontrolled filter query when the menu is initially rendered.
|
|
1128
|
+
* To render a controlled query, use the `value` prop instead.
|
|
1129
|
+
*/
|
|
1130
|
+
defaultValue?: string | undefined;
|
|
1131
|
+
/**
|
|
1132
|
+
* The filter query. Use when controlled.
|
|
1133
|
+
* When the popup closes, `onValueChange` is called with an empty query. The controlled
|
|
1134
|
+
* value changes only when the consumer updates this prop.
|
|
1135
|
+
*/
|
|
1136
|
+
value?: string | undefined;
|
|
1137
|
+
/**
|
|
1138
|
+
* Event handler called when the filter query changes.
|
|
1139
|
+
*/
|
|
1140
|
+
onValueChange?: ((value: string, eventDetails: MenuFilterProvider.ChangeEventDetails) => void) | undefined;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
export declare interface MenuFilterProviderProps extends MenuFilterProviderOptions {
|
|
1144
|
+
/**
|
|
1145
|
+
* The `<Menu.Root>` or `<Menu.SubmenuRoot>` to make filterable.
|
|
1146
|
+
*/
|
|
1147
|
+
children?: React_2.ReactNode;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
export declare interface MenuFilterProviderState {}
|
|
1151
|
+
|
|
639
1152
|
/**
|
|
640
1153
|
* Groups related menu items with the corresponding label.
|
|
641
1154
|
* Renders a `<div>` element.
|
|
@@ -675,30 +1188,70 @@ export declare interface MenuGroupProps extends BaseUIComponentProps<'div', Menu
|
|
|
675
1188
|
|
|
676
1189
|
export declare interface MenuGroupState {}
|
|
677
1190
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
1191
|
+
/**
|
|
1192
|
+
* Controls a Menu imperatively and associates detached `Menu.Trigger` components with a `Menu.Root`.
|
|
1193
|
+
* Create one with `Menu.createHandle()` and pass it to the `handle` prop of the root and of any
|
|
1194
|
+
* triggers rendered outside of it.
|
|
1195
|
+
*
|
|
1196
|
+
* The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
1197
|
+
* before a root attaches (or after it unmounts) are ignored.
|
|
1198
|
+
*/
|
|
1199
|
+
declare class MenuHandle<Payload> extends BasePopupHandle<MenuHandleStore<Payload>, MenuStore<Payload>> {
|
|
684
1200
|
constructor();
|
|
685
1201
|
/**
|
|
686
1202
|
* Opens the menu and associates it with the trigger with the given id.
|
|
687
|
-
* The trigger must be a Menu.Trigger component with this handle passed as a prop.
|
|
688
1203
|
*
|
|
689
|
-
*
|
|
1204
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
1205
|
+
*
|
|
1206
|
+
* @param triggerId ID of the trigger to associate with the menu. The trigger must be a matching
|
|
1207
|
+
* `Menu.Trigger` with this handle passed as a prop.
|
|
690
1208
|
*/
|
|
691
1209
|
open(triggerId: string): void;
|
|
692
1210
|
/**
|
|
693
1211
|
* Closes the menu.
|
|
1212
|
+
*
|
|
1213
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
694
1214
|
*/
|
|
695
1215
|
close(): void;
|
|
696
1216
|
/**
|
|
697
|
-
*
|
|
1217
|
+
* Whether the menu is currently open. Returns `false` while no root is attached to the handle.
|
|
698
1218
|
*/
|
|
699
1219
|
get isOpen(): boolean;
|
|
700
1220
|
}
|
|
701
1221
|
|
|
1222
|
+
/**
|
|
1223
|
+
* The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the
|
|
1224
|
+
* inert fallback store satisfy it, so a trigger can read from whichever store the handle currently
|
|
1225
|
+
* exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`
|
|
1226
|
+
* (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on
|
|
1227
|
+
* the detached fallback store every one of these mutations is a no-op.
|
|
1228
|
+
*/
|
|
1229
|
+
declare type MenuHandleStore<Payload> = Pick<MenuStore<Payload>, PopupTriggerStoreKeys | 'setOpen'>;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* A search field that filters the menu items.
|
|
1233
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1234
|
+
* Renders an `<input>` element.
|
|
1235
|
+
*
|
|
1236
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1237
|
+
*/
|
|
1238
|
+
export declare const MenuInput: React_2.ForwardRefExoticComponent<Omit<MenuInputProps, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
|
|
1239
|
+
|
|
1240
|
+
export declare namespace MenuInput {
|
|
1241
|
+
export type State = MenuInputState;
|
|
1242
|
+
export type Props = MenuInputProps;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
export declare namespace MenuInputDataAttributes {
|
|
1246
|
+
export {
|
|
1247
|
+
highlighted_6 as highlighted
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
export declare interface MenuInputProps extends FilterDropdownInputProps {}
|
|
1252
|
+
|
|
1253
|
+
export declare interface MenuInputState extends FilterDropdownInputState {}
|
|
1254
|
+
|
|
702
1255
|
/**
|
|
703
1256
|
* An individual interactive item in the menu.
|
|
704
1257
|
* Renders a `<div>` element.
|
|
@@ -712,6 +1265,13 @@ export declare namespace MenuItem {
|
|
|
712
1265
|
export type Props = MenuItemProps;
|
|
713
1266
|
}
|
|
714
1267
|
|
|
1268
|
+
export declare namespace MenuItemDataAttributes {
|
|
1269
|
+
export {
|
|
1270
|
+
highlighted_2 as highlighted,
|
|
1271
|
+
disabled_4 as disabled
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
|
|
715
1275
|
export declare interface MenuItemProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuItemState> {
|
|
716
1276
|
/**
|
|
717
1277
|
* The click handler for the menu item.
|
|
@@ -723,7 +1283,8 @@ export declare interface MenuItemProps extends NonNativeButtonProps, BaseUICompo
|
|
|
723
1283
|
*/
|
|
724
1284
|
disabled?: boolean | undefined;
|
|
725
1285
|
/**
|
|
726
|
-
* Overrides the text
|
|
1286
|
+
* Overrides the text used for keyboard text navigation and filtering.
|
|
1287
|
+
* Falls back to the rendered text when not provided.
|
|
727
1288
|
*/
|
|
728
1289
|
label?: string | undefined;
|
|
729
1290
|
/**
|
|
@@ -762,9 +1323,16 @@ export declare namespace MenuLinkItem {
|
|
|
762
1323
|
export type Props = MenuLinkItemProps;
|
|
763
1324
|
}
|
|
764
1325
|
|
|
765
|
-
export declare
|
|
1326
|
+
export declare namespace MenuLinkItemDataAttributes {
|
|
1327
|
+
export {
|
|
1328
|
+
highlighted_3 as highlighted
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
export declare interface MenuLinkItemProps extends BaseUIComponentProps<'a', MenuLinkItemState, React_2.ComponentPropsWithRef<'a'>> {
|
|
766
1333
|
/**
|
|
767
|
-
* Overrides the text
|
|
1334
|
+
* Overrides the text used for keyboard text navigation and filtering.
|
|
1335
|
+
* Falls back to the rendered text when not provided.
|
|
768
1336
|
*/
|
|
769
1337
|
label?: string | undefined;
|
|
770
1338
|
/**
|
|
@@ -785,6 +1353,23 @@ export declare interface MenuLinkItemState {
|
|
|
785
1353
|
highlighted: boolean;
|
|
786
1354
|
}
|
|
787
1355
|
|
|
1356
|
+
/**
|
|
1357
|
+
* Groups menu items so other content, such as a filter input, can share the popup.
|
|
1358
|
+
* Renders a `<div>` element.
|
|
1359
|
+
*
|
|
1360
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1361
|
+
*/
|
|
1362
|
+
export declare const MenuList: React_2.ForwardRefExoticComponent<Omit<MenuListProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1363
|
+
|
|
1364
|
+
export declare namespace MenuList {
|
|
1365
|
+
export type Props = MenuListProps;
|
|
1366
|
+
export type State = MenuListState;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
export declare interface MenuListProps extends BaseUIComponentProps<'div', MenuListState> {}
|
|
1370
|
+
|
|
1371
|
+
export declare interface MenuListState {}
|
|
1372
|
+
|
|
788
1373
|
export declare type MenuParent = {
|
|
789
1374
|
type: 'menu';
|
|
790
1375
|
store: MenuStore<unknown>;
|
|
@@ -815,6 +1400,18 @@ export declare namespace MenuPopup {
|
|
|
815
1400
|
export type State = MenuPopupState;
|
|
816
1401
|
}
|
|
817
1402
|
|
|
1403
|
+
export declare namespace MenuPopupDataAttributes {
|
|
1404
|
+
export {
|
|
1405
|
+
open_4 as open,
|
|
1406
|
+
closed_4 as closed,
|
|
1407
|
+
startingStyle_3 as startingStyle,
|
|
1408
|
+
endingStyle_3 as endingStyle,
|
|
1409
|
+
side_2 as side,
|
|
1410
|
+
align_2 as align,
|
|
1411
|
+
instant
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
|
|
818
1415
|
export declare interface MenuPopupProps extends BaseUIComponentProps<'div', MenuPopupState> {
|
|
819
1416
|
children?: React_2.ReactNode;
|
|
820
1417
|
/**
|
|
@@ -874,12 +1471,16 @@ export declare namespace MenuPortal {
|
|
|
874
1471
|
export type Props = MenuPortalProps;
|
|
875
1472
|
}
|
|
876
1473
|
|
|
877
|
-
export declare interface MenuPortalProps extends
|
|
1474
|
+
export declare interface MenuPortalProps extends BaseUIComponentProps<'div', MenuPortalState> {
|
|
878
1475
|
/**
|
|
879
1476
|
* Whether to keep the portal mounted in the DOM while the popup is hidden.
|
|
880
1477
|
* @default false
|
|
881
1478
|
*/
|
|
882
1479
|
keepMounted?: boolean | undefined;
|
|
1480
|
+
/**
|
|
1481
|
+
* A parent element to render the portal element into.
|
|
1482
|
+
*/
|
|
1483
|
+
container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
|
|
883
1484
|
}
|
|
884
1485
|
|
|
885
1486
|
export declare interface MenuPortalState {}
|
|
@@ -897,7 +1498,45 @@ export declare namespace MenuPositioner {
|
|
|
897
1498
|
export type Props = MenuPositionerProps;
|
|
898
1499
|
}
|
|
899
1500
|
|
|
900
|
-
export declare
|
|
1501
|
+
export declare namespace MenuPositionerCssVariables {
|
|
1502
|
+
export {
|
|
1503
|
+
availableWidth,
|
|
1504
|
+
availableHeight,
|
|
1505
|
+
anchorWidth,
|
|
1506
|
+
anchorHeight,
|
|
1507
|
+
transformOrigin,
|
|
1508
|
+
positionerWidth,
|
|
1509
|
+
positionerHeight
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export declare namespace MenuPositionerDataAttributes {
|
|
1514
|
+
export {
|
|
1515
|
+
open_5 as open,
|
|
1516
|
+
closed_5 as closed,
|
|
1517
|
+
anchorHidden,
|
|
1518
|
+
side_3 as side,
|
|
1519
|
+
align_3 as align
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
export declare interface MenuPositionerProps extends Omit<UseAnchorPositioningSharedParameters, 'side' | 'align'>, BaseUIComponentProps<'div', MenuPositionerState> {
|
|
1524
|
+
/**
|
|
1525
|
+
* How to align the popup relative to the specified side.
|
|
1526
|
+
*
|
|
1527
|
+
* Submenus and menubars default to `'start'`.
|
|
1528
|
+
* @default 'center'
|
|
1529
|
+
*/
|
|
1530
|
+
align?: UseAnchorPositioningSharedParameters['align'] | undefined;
|
|
1531
|
+
/**
|
|
1532
|
+
* Which side of the anchor element to align the popup against.
|
|
1533
|
+
* May automatically change to avoid collisions.
|
|
1534
|
+
*
|
|
1535
|
+
* Submenus and vertical menubars default to `'inline-end'`.
|
|
1536
|
+
* @default 'bottom'
|
|
1537
|
+
*/
|
|
1538
|
+
side?: UseAnchorPositioningSharedParameters['side'] | undefined;
|
|
1539
|
+
}
|
|
901
1540
|
|
|
902
1541
|
export declare interface MenuPositionerState {
|
|
903
1542
|
/**
|
|
@@ -994,6 +1633,15 @@ export declare namespace MenuRadioItem {
|
|
|
994
1633
|
export type Props = MenuRadioItemProps;
|
|
995
1634
|
}
|
|
996
1635
|
|
|
1636
|
+
export declare namespace MenuRadioItemDataAttributes {
|
|
1637
|
+
export {
|
|
1638
|
+
checked_3 as checked,
|
|
1639
|
+
unchecked_3 as unchecked,
|
|
1640
|
+
disabled_5 as disabled,
|
|
1641
|
+
highlighted_4 as highlighted
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
|
|
997
1645
|
/**
|
|
998
1646
|
* Indicates whether the radio item is selected.
|
|
999
1647
|
* Renders a `<span>` element.
|
|
@@ -1007,6 +1655,16 @@ export declare namespace MenuRadioItemIndicator {
|
|
|
1007
1655
|
export type State = MenuRadioItemIndicatorState;
|
|
1008
1656
|
}
|
|
1009
1657
|
|
|
1658
|
+
export declare namespace MenuRadioItemIndicatorDataAttributes {
|
|
1659
|
+
export {
|
|
1660
|
+
checked_4 as checked,
|
|
1661
|
+
unchecked_4 as unchecked,
|
|
1662
|
+
disabled_6 as disabled,
|
|
1663
|
+
startingStyle_4 as startingStyle,
|
|
1664
|
+
endingStyle_4 as endingStyle
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1010
1668
|
export declare interface MenuRadioItemIndicatorProps extends BaseUIComponentProps<'span', MenuRadioItemIndicatorState> {
|
|
1011
1669
|
/**
|
|
1012
1670
|
* Whether to keep the HTML element in the DOM when the radio item is inactive.
|
|
@@ -1050,7 +1708,8 @@ export declare interface MenuRadioItemProps extends NonNativeButtonProps, BaseUI
|
|
|
1050
1708
|
*/
|
|
1051
1709
|
disabled?: boolean | undefined;
|
|
1052
1710
|
/**
|
|
1053
|
-
* Overrides the text
|
|
1711
|
+
* Overrides the text used for keyboard text navigation and filtering.
|
|
1712
|
+
* Falls back to the rendered text when not provided.
|
|
1054
1713
|
*/
|
|
1055
1714
|
label?: string | undefined;
|
|
1056
1715
|
/**
|
|
@@ -1085,7 +1744,7 @@ export declare interface MenuRadioItemState {
|
|
|
1085
1744
|
*
|
|
1086
1745
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1087
1746
|
*/
|
|
1088
|
-
export declare
|
|
1747
|
+
export declare function MenuRoot<Payload>(props: MenuRoot.Props<Payload>): React_2.JSX.Element;
|
|
1089
1748
|
|
|
1090
1749
|
export declare namespace MenuRoot {
|
|
1091
1750
|
export type State = MenuRootState;
|
|
@@ -1093,6 +1752,8 @@ export declare namespace MenuRoot {
|
|
|
1093
1752
|
export type Actions = MenuRootActions;
|
|
1094
1753
|
export type ChangeEventReason = MenuRootChangeEventReason;
|
|
1095
1754
|
export type ChangeEventDetails = MenuRootChangeEventDetails;
|
|
1755
|
+
export type HighlightEventReason = MenuRootHighlightEventReason;
|
|
1756
|
+
export type HighlightEventDetails = MenuRootHighlightEventDetails;
|
|
1096
1757
|
export type Orientation = MenuRootOrientation;
|
|
1097
1758
|
}
|
|
1098
1759
|
|
|
@@ -1102,7 +1763,8 @@ export declare interface MenuRootActions {
|
|
|
1102
1763
|
}
|
|
1103
1764
|
|
|
1104
1765
|
export declare type MenuRootChangeEventDetails = BaseUIChangeEventDetails<MenuRoot.ChangeEventReason> & {
|
|
1105
|
-
|
|
1766
|
+
/** Prevents the popup from unmounting until the `unmount` action is called. */
|
|
1767
|
+
preventUnmountOnClose: () => void;
|
|
1106
1768
|
};
|
|
1107
1769
|
|
|
1108
1770
|
export declare type MenuRootChangeEventReason = 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;
|
|
@@ -1110,10 +1772,30 @@ export declare type MenuRootChangeEventReason = typeof REASONS.triggerHover | ty
|
|
|
1110
1772
|
declare interface MenuRootContext<Payload = unknown> {
|
|
1111
1773
|
store: MenuStore<Payload>;
|
|
1112
1774
|
parent: MenuParent;
|
|
1775
|
+
orientation: MenuRoot.Orientation;
|
|
1776
|
+
loopFocus: boolean;
|
|
1777
|
+
/** Whether arrow keys can step from either end of the list back to a virtual focus owner. */
|
|
1778
|
+
allowEscape: boolean;
|
|
1779
|
+
defaultFloatingId: string | undefined;
|
|
1780
|
+
/** Records the id the popup rendered with, when it differs from `defaultFloatingId`. */
|
|
1781
|
+
setRenderedFloatingId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
|
|
1782
|
+
virtualFocus: boolean;
|
|
1783
|
+
parentVirtualFocus: boolean;
|
|
1784
|
+
/** Re-emits `onItemHighlighted` after the item registry settles. */
|
|
1785
|
+
syncHighlightedItem: () => void;
|
|
1113
1786
|
}
|
|
1114
1787
|
|
|
1115
1788
|
declare const MenuRootContext: React_2.Context<MenuRootContext<unknown> | undefined>;
|
|
1116
1789
|
|
|
1790
|
+
export declare type MenuRootHighlightEventDetails = BaseUIHighlightEventDetails<MenuRoot.HighlightEventReason, {
|
|
1791
|
+
/**
|
|
1792
|
+
* The highlighted item's `label` prop, or its text content when the prop is not set.
|
|
1793
|
+
*/
|
|
1794
|
+
label: string | undefined;
|
|
1795
|
+
}>;
|
|
1796
|
+
|
|
1797
|
+
export declare type MenuRootHighlightEventReason = typeof REASONS.keyboard | typeof REASONS.pointer | typeof REASONS.none;
|
|
1798
|
+
|
|
1117
1799
|
export declare type MenuRootOrientation = 'horizontal' | 'vertical';
|
|
1118
1800
|
|
|
1119
1801
|
export declare interface MenuRootProps<Payload = unknown> {
|
|
@@ -1140,6 +1822,10 @@ export declare interface MenuRootProps<Payload = unknown> {
|
|
|
1140
1822
|
* Determines if the menu enters a modal state when open.
|
|
1141
1823
|
* - `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.
|
|
1142
1824
|
* - `false`: user interaction with the rest of the document is allowed.
|
|
1825
|
+
*
|
|
1826
|
+
* On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.
|
|
1827
|
+
*
|
|
1828
|
+
* Nested menus ignore this prop, and menus opened by hover are never modal.
|
|
1143
1829
|
* @default true
|
|
1144
1830
|
*/
|
|
1145
1831
|
modal?: boolean | undefined;
|
|
@@ -1148,9 +1834,21 @@ export declare interface MenuRootProps<Payload = unknown> {
|
|
|
1148
1834
|
*/
|
|
1149
1835
|
onOpenChange?: ((open: boolean, eventDetails: MenuRoot.ChangeEventDetails) => void) | undefined;
|
|
1150
1836
|
/**
|
|
1151
|
-
* Event handler called after any animations complete when the menu is closed.
|
|
1837
|
+
* Event handler called after any animations complete when the menu is opened or closed.
|
|
1152
1838
|
*/
|
|
1153
1839
|
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
1840
|
+
/**
|
|
1841
|
+
* Callback fired when an item is highlighted or unhighlighted.
|
|
1842
|
+
* Receives the highlighted item element (or `undefined` if no item is highlighted) and details
|
|
1843
|
+
* containing the reason for the change, the event, and the item's text label.
|
|
1844
|
+
* The `reason` can be:
|
|
1845
|
+
* - `'keyboard'`: the highlight changed due to keyboard navigation.
|
|
1846
|
+
* - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent`
|
|
1847
|
+
* rather than a `PointerEvent`.
|
|
1848
|
+
* - `'none'`: the highlight changed for another reason, such as automatic highlighting while
|
|
1849
|
+
* filtering, the item list changing, or the popup opening or closing.
|
|
1850
|
+
*/
|
|
1851
|
+
onItemHighlighted?: ((highlightedItem: HTMLElement | undefined, eventDetails: MenuRoot.HighlightEventDetails) => void) | undefined;
|
|
1154
1852
|
/**
|
|
1155
1853
|
* Whether the menu is currently open.
|
|
1156
1854
|
*/
|
|
@@ -1174,21 +1872,21 @@ export declare interface MenuRootProps<Payload = unknown> {
|
|
|
1174
1872
|
closeParentOnEsc?: boolean | undefined;
|
|
1175
1873
|
/**
|
|
1176
1874
|
* A ref to imperative actions.
|
|
1177
|
-
* - `unmount`:
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
* - `close`:
|
|
1875
|
+
* - `unmount`: Ends the closing phase of the menu after an externally controlled closing animation finishes.
|
|
1876
|
+
* Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the menu completes closing on its own.
|
|
1877
|
+
* Whether it leaves the DOM is decided by `keepMounted` on the portal.
|
|
1878
|
+
* - `close`: Closes the menu imperatively when called.
|
|
1181
1879
|
*/
|
|
1182
1880
|
actionsRef?: React_2.RefObject<MenuRoot.Actions | null> | undefined;
|
|
1183
1881
|
/**
|
|
1184
|
-
* ID of the trigger that the
|
|
1185
|
-
* This is useful in conjunction with the `open` prop to create a controlled
|
|
1186
|
-
* There's no need to specify this prop when the
|
|
1882
|
+
* ID of the trigger that the menu is associated with.
|
|
1883
|
+
* This is useful in conjunction with the `open` prop to create a controlled menu.
|
|
1884
|
+
* There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set).
|
|
1187
1885
|
*/
|
|
1188
1886
|
triggerId?: string | null | undefined;
|
|
1189
1887
|
/**
|
|
1190
|
-
* ID of the trigger that the
|
|
1191
|
-
* This is useful in conjunction with the `defaultOpen` prop to create an initially open
|
|
1888
|
+
* ID of the trigger that the menu is associated with.
|
|
1889
|
+
* This is useful in conjunction with the `defaultOpen` prop to create an initially open menu.
|
|
1192
1890
|
*/
|
|
1193
1891
|
defaultTriggerId?: string | null | undefined;
|
|
1194
1892
|
/**
|
|
@@ -1197,7 +1895,7 @@ export declare interface MenuRootProps<Payload = unknown> {
|
|
|
1197
1895
|
*/
|
|
1198
1896
|
handle?: MenuHandle<Payload> | undefined;
|
|
1199
1897
|
/**
|
|
1200
|
-
* The content of the
|
|
1898
|
+
* The content of the menu.
|
|
1201
1899
|
* This can be a regular React node or a render function that receives the `payload` of the active trigger.
|
|
1202
1900
|
*/
|
|
1203
1901
|
children?: React_2.ReactNode | PayloadChildRenderFunction<Payload>;
|
|
@@ -1205,11 +1903,24 @@ export declare interface MenuRootProps<Payload = unknown> {
|
|
|
1205
1903
|
|
|
1206
1904
|
export declare interface MenuRootState {}
|
|
1207
1905
|
|
|
1208
|
-
declare
|
|
1209
|
-
|
|
1906
|
+
export declare namespace MenuSeparatorDataAttributes {
|
|
1907
|
+
export {
|
|
1908
|
+
orientation_2 as orientation
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
|
|
1913
|
+
constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
|
|
1914
|
+
/**
|
|
1915
|
+
* Propagates changes of the parent menu's shared tree state to this store's subscribers.
|
|
1916
|
+
* The owning `Menu.Root` calls it from an effect so the parent store subscription is released
|
|
1917
|
+
* when the submenu unmounts.
|
|
1918
|
+
* @returns A function that removes the parent store subscription.
|
|
1919
|
+
*/
|
|
1920
|
+
subscribeToParentMenu(): (() => void) | undefined;
|
|
1210
1921
|
setOpen(open: boolean, eventDetails: Omit<MenuRoot.ChangeEventDetails, 'preventUnmountOnClose'>): void;
|
|
1211
|
-
|
|
1212
|
-
|
|
1922
|
+
setActiveIndex(activeIndex: number | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
|
|
1923
|
+
highlightItem(element: Element | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
|
|
1213
1924
|
}
|
|
1214
1925
|
|
|
1215
1926
|
/**
|
|
@@ -1218,7 +1929,7 @@ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Co
|
|
|
1218
1929
|
*
|
|
1219
1930
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1220
1931
|
*/
|
|
1221
|
-
export declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props):
|
|
1932
|
+
export declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): React_2.JSX.Element;
|
|
1222
1933
|
|
|
1223
1934
|
export declare namespace MenuSubmenuRoot {
|
|
1224
1935
|
export type Props = MenuSubmenuRootProps;
|
|
@@ -1234,10 +1945,13 @@ export declare type MenuSubmenuRootChangeEventReason = MenuRoot.ChangeEventReaso
|
|
|
1234
1945
|
declare const MenuSubmenuRootContext: React_2.Context<MenuSubmenuRootContext | undefined>;
|
|
1235
1946
|
|
|
1236
1947
|
declare interface MenuSubmenuRootContext {
|
|
1237
|
-
|
|
1948
|
+
/** The element that receives focus when the submenu closes; `false` leaves focus where it is. */
|
|
1949
|
+
getReturnElement?: (() => HTMLElement | null | false) | undefined;
|
|
1950
|
+
onTriggerKeyDown?: ((event: BaseUIEvent<React_2.KeyboardEvent<HTMLElement>>) => void) | undefined;
|
|
1951
|
+
onPopupKeyDown?: ((event: React_2.KeyboardEvent) => void) | undefined;
|
|
1238
1952
|
}
|
|
1239
1953
|
|
|
1240
|
-
export declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange'> {
|
|
1954
|
+
export declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange' | 'handle' | 'triggerId' | 'defaultTriggerId' | 'children'> {
|
|
1241
1955
|
/**
|
|
1242
1956
|
* Event handler called when the menu is opened or closed.
|
|
1243
1957
|
*/
|
|
@@ -1248,6 +1962,10 @@ export declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'moda
|
|
|
1248
1962
|
* @default false
|
|
1249
1963
|
*/
|
|
1250
1964
|
closeParentOnEsc?: boolean | undefined;
|
|
1965
|
+
/**
|
|
1966
|
+
* The content of the submenu.
|
|
1967
|
+
*/
|
|
1968
|
+
children?: React_2.ReactNode;
|
|
1251
1969
|
}
|
|
1252
1970
|
|
|
1253
1971
|
export declare interface MenuSubmenuRootState {}
|
|
@@ -1265,10 +1983,19 @@ export declare namespace MenuSubmenuTrigger {
|
|
|
1265
1983
|
export type State = MenuSubmenuTriggerState;
|
|
1266
1984
|
}
|
|
1267
1985
|
|
|
1986
|
+
export declare namespace MenuSubmenuTriggerDataAttributes {
|
|
1987
|
+
export {
|
|
1988
|
+
popupOpen_2 as popupOpen,
|
|
1989
|
+
highlighted_5 as highlighted,
|
|
1990
|
+
disabled_8 as disabled
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1268
1994
|
export declare interface MenuSubmenuTriggerProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuSubmenuTriggerState> {
|
|
1269
1995
|
onClick?: BaseUIComponentProps<'div', MenuSubmenuTriggerState>['onClick'] | undefined;
|
|
1270
1996
|
/**
|
|
1271
|
-
* Overrides the text
|
|
1997
|
+
* Overrides the text used for keyboard text navigation and filtering.
|
|
1998
|
+
* Falls back to the rendered text when not provided.
|
|
1272
1999
|
*/
|
|
1273
2000
|
label?: string | undefined;
|
|
1274
2001
|
/**
|
|
@@ -1297,6 +2024,7 @@ export declare interface MenuSubmenuTriggerProps extends NonNativeButtonProps, B
|
|
|
1297
2024
|
closeDelay?: number | undefined;
|
|
1298
2025
|
/**
|
|
1299
2026
|
* Whether the menu should also open when the trigger is hovered.
|
|
2027
|
+
* @default true
|
|
1300
2028
|
*/
|
|
1301
2029
|
openOnHover?: boolean | undefined;
|
|
1302
2030
|
}
|
|
@@ -1333,6 +2061,14 @@ export declare namespace MenuTrigger {
|
|
|
1333
2061
|
export type State = MenuTriggerState;
|
|
1334
2062
|
}
|
|
1335
2063
|
|
|
2064
|
+
export declare namespace MenuTriggerDataAttributes {
|
|
2065
|
+
export {
|
|
2066
|
+
popupOpen,
|
|
2067
|
+
pressed,
|
|
2068
|
+
disabled_7 as disabled
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
|
|
1336
2072
|
export declare interface MenuTriggerProps<Payload = unknown> extends NativeButtonProps, BaseUIComponentProps<'button', MenuTriggerState> {
|
|
1337
2073
|
children?: React_2.ReactNode;
|
|
1338
2074
|
/**
|
|
@@ -1371,7 +2107,7 @@ export declare interface MenuTriggerProps<Payload = unknown> extends NativeButto
|
|
|
1371
2107
|
|
|
1372
2108
|
export declare interface MenuTriggerState {
|
|
1373
2109
|
/**
|
|
1374
|
-
* Whether the menu is currently open.
|
|
2110
|
+
* Whether the menu is currently open and was opened by this trigger.
|
|
1375
2111
|
*/
|
|
1376
2112
|
open: boolean;
|
|
1377
2113
|
/**
|
|
@@ -1388,29 +2124,53 @@ export declare interface MenuTriggerState {
|
|
|
1388
2124
|
*
|
|
1389
2125
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1390
2126
|
*/
|
|
1391
|
-
export declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<
|
|
2127
|
+
export declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1392
2128
|
|
|
1393
2129
|
export declare namespace MenuViewport {
|
|
1394
|
-
export
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
2130
|
+
export type Props = MenuViewportProps;
|
|
2131
|
+
export type State = MenuViewportState;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
export declare namespace MenuViewportCssVariables {
|
|
2135
|
+
export {
|
|
2136
|
+
popupWidth,
|
|
2137
|
+
popupHeight
|
|
1399
2138
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
export declare namespace MenuViewportDataAttributes {
|
|
2142
|
+
export {
|
|
2143
|
+
current,
|
|
2144
|
+
previous,
|
|
2145
|
+
activationDirection,
|
|
2146
|
+
transitioning,
|
|
2147
|
+
instant_2 as instant
|
|
1410
2148
|
}
|
|
1411
2149
|
}
|
|
1412
2150
|
|
|
1413
|
-
declare
|
|
2151
|
+
export declare interface MenuViewportProps extends BaseUIComponentProps<'div', MenuViewportState> {
|
|
2152
|
+
/**
|
|
2153
|
+
* The content to render inside the transition container.
|
|
2154
|
+
*/
|
|
2155
|
+
children?: React_2.ReactNode;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
export declare interface MenuViewportState {
|
|
2159
|
+
/**
|
|
2160
|
+
* The activation direction of the transitioned content.
|
|
2161
|
+
*/
|
|
2162
|
+
activationDirection: string | undefined;
|
|
2163
|
+
/**
|
|
2164
|
+
* Whether the viewport is currently transitioning between contents.
|
|
2165
|
+
*/
|
|
2166
|
+
transitioning: boolean;
|
|
2167
|
+
/**
|
|
2168
|
+
* Present if animations should be instant.
|
|
2169
|
+
*/
|
|
2170
|
+
instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
declare const missing: 'missing';
|
|
1414
2174
|
|
|
1415
2175
|
declare type NarrowedElement<T> = T extends Element ? T : Element;
|
|
1416
2176
|
|
|
@@ -1424,7 +2184,7 @@ declare interface NativeButtonProps {
|
|
|
1424
2184
|
nativeButton?: boolean | undefined;
|
|
1425
2185
|
}
|
|
1426
2186
|
|
|
1427
|
-
declare const none:
|
|
2187
|
+
declare const none: 'none';
|
|
1428
2188
|
|
|
1429
2189
|
declare interface NonNativeButtonProps {
|
|
1430
2190
|
/**
|
|
@@ -1449,15 +2209,79 @@ declare type OffsetFunction = (data: {
|
|
|
1449
2209
|
};
|
|
1450
2210
|
}) => number;
|
|
1451
2211
|
|
|
2212
|
+
/**
|
|
2213
|
+
* Present when the menu popup is open.
|
|
2214
|
+
*/
|
|
2215
|
+
declare const open_2 = "data-open";
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Present when the menu is open.
|
|
2219
|
+
*/
|
|
2220
|
+
declare const open_3 = "data-open";
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* Present when the menu is open.
|
|
2224
|
+
*/
|
|
2225
|
+
declare const open_4 = "data-open";
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* Present when the menu popup is open.
|
|
2229
|
+
*/
|
|
2230
|
+
declare const open_5 = "data-open";
|
|
2231
|
+
|
|
1452
2232
|
declare type Orientation = 'horizontal' | 'vertical';
|
|
1453
2233
|
|
|
1454
|
-
|
|
2234
|
+
/**
|
|
2235
|
+
* Indicates the orientation of the separator.
|
|
2236
|
+
* @type {'horizontal' | 'vertical'}
|
|
2237
|
+
*/
|
|
2238
|
+
declare const orientation_2 = "data-orientation";
|
|
2239
|
+
|
|
2240
|
+
declare const outsidePress: 'outside-press';
|
|
1455
2241
|
|
|
1456
2242
|
declare type PayloadChildRenderFunction<Payload> = (arg: {
|
|
1457
2243
|
payload: Payload | undefined;
|
|
1458
2244
|
}) => React_2.ReactNode;
|
|
1459
2245
|
|
|
1460
|
-
declare const pointer:
|
|
2246
|
+
declare const pointer: 'pointer';
|
|
2247
|
+
|
|
2248
|
+
declare const popupClose: 'popup-close';
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
|
|
2252
|
+
* Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
|
|
2253
|
+
* omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
|
|
2254
|
+
*/
|
|
2255
|
+
declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
|
|
2256
|
+
setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
/**
|
|
2260
|
+
* Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
|
|
2261
|
+
* trigger element by id on both the attached root's store and the fallback store.
|
|
2262
|
+
*/
|
|
2263
|
+
declare interface PopupHandleStoreWithTriggers {
|
|
2264
|
+
readonly context: {
|
|
2265
|
+
readonly triggerElements: PopupTriggerMap;
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* The height of the parent popup.
|
|
2271
|
+
* This variable is placed on the 'previous' container and stores the height of the popup when the previous content was rendered.
|
|
2272
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
2273
|
+
*/
|
|
2274
|
+
declare const popupHeight = "--popup-height";
|
|
2275
|
+
|
|
2276
|
+
/**
|
|
2277
|
+
* Present when the corresponding menu is open.
|
|
2278
|
+
*/
|
|
2279
|
+
declare const popupOpen = "data-popup-open";
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* Present when the corresponding submenu is open.
|
|
2283
|
+
*/
|
|
2284
|
+
declare const popupOpen_2 = "data-popup-open";
|
|
1461
2285
|
|
|
1462
2286
|
declare type PopupStoreContext<ChangeEventDetails> = {
|
|
1463
2287
|
/**
|
|
@@ -1522,6 +2346,13 @@ declare type PopupStoreState<Payload> = {
|
|
|
1522
2346
|
* The currently active trigger DOM element.
|
|
1523
2347
|
*/
|
|
1524
2348
|
activeTriggerElement: Element | null;
|
|
2349
|
+
/**
|
|
2350
|
+
* Whether the popup is open because of a request that deliberately carried no trigger, such as a
|
|
2351
|
+
* handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
|
|
2352
|
+
* implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
|
|
2353
|
+
* forwarded. Reset by the Root once the popup is effectively closed.
|
|
2354
|
+
*/
|
|
2355
|
+
openedWithoutTrigger: boolean;
|
|
1525
2356
|
/**
|
|
1526
2357
|
* ID of the trigger (external prop).
|
|
1527
2358
|
*/
|
|
@@ -1550,12 +2381,12 @@ declare type PopupStoreState<Payload> = {
|
|
|
1550
2381
|
|
|
1551
2382
|
/**
|
|
1552
2383
|
* Data structure to keep track of popup trigger elements by their IDs.
|
|
1553
|
-
*
|
|
2384
|
+
*
|
|
2385
|
+
* Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
|
|
2386
|
+
* while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
|
|
1554
2387
|
*/
|
|
1555
2388
|
declare class PopupTriggerMap {
|
|
1556
|
-
private elementsSet;
|
|
1557
2389
|
private idMap;
|
|
1558
|
-
constructor();
|
|
1559
2390
|
/**
|
|
1560
2391
|
* Adds a trigger element with the given ID.
|
|
1561
2392
|
*
|
|
@@ -1592,6 +2423,46 @@ declare class PopupTriggerMap {
|
|
|
1592
2423
|
get size(): number;
|
|
1593
2424
|
}
|
|
1594
2425
|
|
|
2426
|
+
/**
|
|
2427
|
+
* Store members a detached handle-backed trigger reads or invokes for trigger registration and data
|
|
2428
|
+
* forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
|
|
2429
|
+
* detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
|
|
2430
|
+
* be durable. Component handle-store views Pick these from their concrete store (preserving its
|
|
2431
|
+
* context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
|
|
2432
|
+
*/
|
|
2433
|
+
declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* The width of the parent popup.
|
|
2437
|
+
* This variable is placed on the 'previous' container and stores the width of the popup when the previous content was rendered.
|
|
2438
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
2439
|
+
*/
|
|
2440
|
+
declare const popupWidth = "--popup-width";
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* The height of the menu's positioner.
|
|
2444
|
+
* It is important to set `height` to this value when using CSS to animate size changes.
|
|
2445
|
+
* @type {number}
|
|
2446
|
+
*/
|
|
2447
|
+
declare const positionerHeight = "--positioner-height";
|
|
2448
|
+
|
|
2449
|
+
/**
|
|
2450
|
+
* The width of the menu's positioner.
|
|
2451
|
+
* It is important to set `width` to this value when using CSS to animate size changes.
|
|
2452
|
+
* @type {number}
|
|
2453
|
+
*/
|
|
2454
|
+
declare const positionerWidth = "--positioner-width";
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Present when the trigger is pressed.
|
|
2458
|
+
*/
|
|
2459
|
+
declare const pressed = "data-pressed";
|
|
2460
|
+
|
|
2461
|
+
/**
|
|
2462
|
+
* Applied to the direct child of the viewport that contains the exiting content when transitions are present.
|
|
2463
|
+
*/
|
|
2464
|
+
declare const previous = "data-previous";
|
|
2465
|
+
|
|
1595
2466
|
declare namespace REASONS {
|
|
1596
2467
|
export {
|
|
1597
2468
|
none,
|
|
@@ -1621,6 +2492,7 @@ declare namespace REASONS {
|
|
|
1621
2492
|
drag,
|
|
1622
2493
|
wheel,
|
|
1623
2494
|
scrub,
|
|
2495
|
+
popupClose,
|
|
1624
2496
|
cancelOpen,
|
|
1625
2497
|
siblingOpen,
|
|
1626
2498
|
disabled,
|
|
@@ -1677,7 +2549,9 @@ declare interface ReasonToEventMap {
|
|
|
1677
2549
|
|
|
1678
2550
|
declare type ReferenceType = Element | VirtualElement;
|
|
1679
2551
|
|
|
1680
|
-
declare const scrub:
|
|
2552
|
+
declare const scrub: 'scrub';
|
|
2553
|
+
|
|
2554
|
+
declare type Selectors = typeof selectors_2;
|
|
1681
2555
|
|
|
1682
2556
|
declare const selectors: {
|
|
1683
2557
|
open: (state: FloatingRootState) => boolean;
|
|
@@ -1689,25 +2563,6 @@ declare const selectors: {
|
|
|
1689
2563
|
};
|
|
1690
2564
|
|
|
1691
2565
|
declare const selectors_2: {
|
|
1692
|
-
disabled: (state: State<unknown>) => boolean;
|
|
1693
|
-
modal: (state: State<unknown>) => boolean;
|
|
1694
|
-
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
1695
|
-
allowMouseEnter: (state: State<unknown>) => boolean;
|
|
1696
|
-
stickIfOpen: (state: State<unknown>) => boolean;
|
|
1697
|
-
parent: (state: State<unknown>) => MenuParent;
|
|
1698
|
-
rootId: (state: State<unknown>) => string | undefined;
|
|
1699
|
-
activeIndex: (state: State<unknown>) => number | null;
|
|
1700
|
-
isActive: (state: State<unknown>, itemIndex: number) => boolean;
|
|
1701
|
-
hoverEnabled: (state: State<unknown>) => boolean;
|
|
1702
|
-
instantType: (state: State<unknown>) => "group" | "click" | "dismiss" | "trigger-change" | undefined;
|
|
1703
|
-
lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason_2 | null;
|
|
1704
|
-
floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
|
|
1705
|
-
floatingNodeId: (state: State<unknown>) => string | undefined;
|
|
1706
|
-
floatingParentNodeId: (state: State<unknown>) => string | null;
|
|
1707
|
-
itemProps: (state: State<unknown>) => HTMLProps;
|
|
1708
|
-
closeDelay: (state: State<unknown>) => number;
|
|
1709
|
-
hasViewport: (state: State<unknown>) => boolean;
|
|
1710
|
-
keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
|
|
1711
2566
|
open: (state: {
|
|
1712
2567
|
open: boolean;
|
|
1713
2568
|
readonly openProp: boolean | undefined;
|
|
@@ -1720,6 +2575,7 @@ declare const selectors_2: {
|
|
|
1720
2575
|
payload: unknown;
|
|
1721
2576
|
activeTriggerId: string | null;
|
|
1722
2577
|
activeTriggerElement: Element | null;
|
|
2578
|
+
openedWithoutTrigger: boolean;
|
|
1723
2579
|
readonly triggerIdProp: string | null | undefined;
|
|
1724
2580
|
popupElement: HTMLElement | null;
|
|
1725
2581
|
positionerElement: HTMLElement | null;
|
|
@@ -1739,6 +2595,7 @@ declare const selectors_2: {
|
|
|
1739
2595
|
payload: unknown;
|
|
1740
2596
|
activeTriggerId: string | null;
|
|
1741
2597
|
activeTriggerElement: Element | null;
|
|
2598
|
+
openedWithoutTrigger: boolean;
|
|
1742
2599
|
readonly triggerIdProp: string | null | undefined;
|
|
1743
2600
|
popupElement: HTMLElement | null;
|
|
1744
2601
|
positionerElement: HTMLElement | null;
|
|
@@ -1758,6 +2615,7 @@ declare const selectors_2: {
|
|
|
1758
2615
|
payload: unknown;
|
|
1759
2616
|
activeTriggerId: string | null;
|
|
1760
2617
|
activeTriggerElement: Element | null;
|
|
2618
|
+
openedWithoutTrigger: boolean;
|
|
1761
2619
|
readonly triggerIdProp: string | null | undefined;
|
|
1762
2620
|
popupElement: HTMLElement | null;
|
|
1763
2621
|
positionerElement: HTMLElement | null;
|
|
@@ -1777,6 +2635,7 @@ declare const selectors_2: {
|
|
|
1777
2635
|
payload: unknown;
|
|
1778
2636
|
activeTriggerId: string | null;
|
|
1779
2637
|
activeTriggerElement: Element | null;
|
|
2638
|
+
openedWithoutTrigger: boolean;
|
|
1780
2639
|
readonly triggerIdProp: string | null | undefined;
|
|
1781
2640
|
popupElement: HTMLElement | null;
|
|
1782
2641
|
positionerElement: HTMLElement | null;
|
|
@@ -1796,6 +2655,7 @@ declare const selectors_2: {
|
|
|
1796
2655
|
payload: unknown;
|
|
1797
2656
|
activeTriggerId: string | null;
|
|
1798
2657
|
activeTriggerElement: Element | null;
|
|
2658
|
+
openedWithoutTrigger: boolean;
|
|
1799
2659
|
readonly triggerIdProp: string | null | undefined;
|
|
1800
2660
|
popupElement: HTMLElement | null;
|
|
1801
2661
|
positionerElement: HTMLElement | null;
|
|
@@ -1815,6 +2675,7 @@ declare const selectors_2: {
|
|
|
1815
2675
|
payload: unknown;
|
|
1816
2676
|
activeTriggerId: string | null;
|
|
1817
2677
|
activeTriggerElement: Element | null;
|
|
2678
|
+
openedWithoutTrigger: boolean;
|
|
1818
2679
|
readonly triggerIdProp: string | null | undefined;
|
|
1819
2680
|
popupElement: HTMLElement | null;
|
|
1820
2681
|
positionerElement: HTMLElement | null;
|
|
@@ -1834,6 +2695,7 @@ declare const selectors_2: {
|
|
|
1834
2695
|
payload: unknown;
|
|
1835
2696
|
activeTriggerId: string | null;
|
|
1836
2697
|
activeTriggerElement: Element | null;
|
|
2698
|
+
openedWithoutTrigger: boolean;
|
|
1837
2699
|
readonly triggerIdProp: string | null | undefined;
|
|
1838
2700
|
popupElement: HTMLElement | null;
|
|
1839
2701
|
positionerElement: HTMLElement | null;
|
|
@@ -1853,6 +2715,7 @@ declare const selectors_2: {
|
|
|
1853
2715
|
payload: unknown;
|
|
1854
2716
|
activeTriggerId: string | null;
|
|
1855
2717
|
activeTriggerElement: Element | null;
|
|
2718
|
+
openedWithoutTrigger: boolean;
|
|
1856
2719
|
readonly triggerIdProp: string | null | undefined;
|
|
1857
2720
|
popupElement: HTMLElement | null;
|
|
1858
2721
|
positionerElement: HTMLElement | null;
|
|
@@ -1872,6 +2735,7 @@ declare const selectors_2: {
|
|
|
1872
2735
|
payload: unknown;
|
|
1873
2736
|
activeTriggerId: string | null;
|
|
1874
2737
|
activeTriggerElement: Element | null;
|
|
2738
|
+
openedWithoutTrigger: boolean;
|
|
1875
2739
|
readonly triggerIdProp: string | null | undefined;
|
|
1876
2740
|
popupElement: HTMLElement | null;
|
|
1877
2741
|
positionerElement: HTMLElement | null;
|
|
@@ -1891,6 +2755,7 @@ declare const selectors_2: {
|
|
|
1891
2755
|
payload: unknown;
|
|
1892
2756
|
activeTriggerId: string | null;
|
|
1893
2757
|
activeTriggerElement: Element | null;
|
|
2758
|
+
openedWithoutTrigger: boolean;
|
|
1894
2759
|
readonly triggerIdProp: string | null | undefined;
|
|
1895
2760
|
popupElement: HTMLElement | null;
|
|
1896
2761
|
positionerElement: HTMLElement | null;
|
|
@@ -1910,6 +2775,7 @@ declare const selectors_2: {
|
|
|
1910
2775
|
payload: unknown;
|
|
1911
2776
|
activeTriggerId: string | null;
|
|
1912
2777
|
activeTriggerElement: Element | null;
|
|
2778
|
+
openedWithoutTrigger: boolean;
|
|
1913
2779
|
readonly triggerIdProp: string | null | undefined;
|
|
1914
2780
|
popupElement: HTMLElement | null;
|
|
1915
2781
|
positionerElement: HTMLElement | null;
|
|
@@ -1929,6 +2795,7 @@ declare const selectors_2: {
|
|
|
1929
2795
|
payload: unknown;
|
|
1930
2796
|
activeTriggerId: string | null;
|
|
1931
2797
|
activeTriggerElement: Element | null;
|
|
2798
|
+
openedWithoutTrigger: boolean;
|
|
1932
2799
|
readonly triggerIdProp: string | null | undefined;
|
|
1933
2800
|
popupElement: HTMLElement | null;
|
|
1934
2801
|
positionerElement: HTMLElement | null;
|
|
@@ -1948,6 +2815,7 @@ declare const selectors_2: {
|
|
|
1948
2815
|
payload: unknown;
|
|
1949
2816
|
activeTriggerId: string | null;
|
|
1950
2817
|
activeTriggerElement: Element | null;
|
|
2818
|
+
openedWithoutTrigger: boolean;
|
|
1951
2819
|
readonly triggerIdProp: string | null | undefined;
|
|
1952
2820
|
popupElement: HTMLElement | null;
|
|
1953
2821
|
positionerElement: HTMLElement | null;
|
|
@@ -1967,6 +2835,7 @@ declare const selectors_2: {
|
|
|
1967
2835
|
payload: unknown;
|
|
1968
2836
|
activeTriggerId: string | null;
|
|
1969
2837
|
activeTriggerElement: Element | null;
|
|
2838
|
+
openedWithoutTrigger: boolean;
|
|
1970
2839
|
readonly triggerIdProp: string | null | undefined;
|
|
1971
2840
|
popupElement: HTMLElement | null;
|
|
1972
2841
|
positionerElement: HTMLElement | null;
|
|
@@ -1986,6 +2855,7 @@ declare const selectors_2: {
|
|
|
1986
2855
|
payload: unknown;
|
|
1987
2856
|
activeTriggerId: string | null;
|
|
1988
2857
|
activeTriggerElement: Element | null;
|
|
2858
|
+
openedWithoutTrigger: boolean;
|
|
1989
2859
|
readonly triggerIdProp: string | null | undefined;
|
|
1990
2860
|
popupElement: HTMLElement | null;
|
|
1991
2861
|
positionerElement: HTMLElement | null;
|
|
@@ -2005,6 +2875,7 @@ declare const selectors_2: {
|
|
|
2005
2875
|
payload: unknown;
|
|
2006
2876
|
activeTriggerId: string | null;
|
|
2007
2877
|
activeTriggerElement: Element | null;
|
|
2878
|
+
openedWithoutTrigger: boolean;
|
|
2008
2879
|
readonly triggerIdProp: string | null | undefined;
|
|
2009
2880
|
popupElement: HTMLElement | null;
|
|
2010
2881
|
positionerElement: HTMLElement | null;
|
|
@@ -2024,6 +2895,7 @@ declare const selectors_2: {
|
|
|
2024
2895
|
payload: unknown;
|
|
2025
2896
|
activeTriggerId: string | null;
|
|
2026
2897
|
activeTriggerElement: Element | null;
|
|
2898
|
+
openedWithoutTrigger: boolean;
|
|
2027
2899
|
readonly triggerIdProp: string | null | undefined;
|
|
2028
2900
|
popupElement: HTMLElement | null;
|
|
2029
2901
|
positionerElement: HTMLElement | null;
|
|
@@ -2043,6 +2915,7 @@ declare const selectors_2: {
|
|
|
2043
2915
|
payload: unknown;
|
|
2044
2916
|
activeTriggerId: string | null;
|
|
2045
2917
|
activeTriggerElement: Element | null;
|
|
2918
|
+
openedWithoutTrigger: boolean;
|
|
2046
2919
|
readonly triggerIdProp: string | null | undefined;
|
|
2047
2920
|
popupElement: HTMLElement | null;
|
|
2048
2921
|
positionerElement: HTMLElement | null;
|
|
@@ -2050,6 +2923,33 @@ declare const selectors_2: {
|
|
|
2050
2923
|
inactiveTriggerProps: HTMLProps;
|
|
2051
2924
|
popupProps: HTMLProps;
|
|
2052
2925
|
}) => HTMLElement | null;
|
|
2926
|
+
disabled: (state: State<unknown>) => boolean;
|
|
2927
|
+
modal: (state: State<unknown>) => boolean;
|
|
2928
|
+
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
2929
|
+
keyboardOpen: (state: State<unknown>) => boolean;
|
|
2930
|
+
allowMouseEnter: (state: State<unknown>) => boolean;
|
|
2931
|
+
highlightItemOnHover: (state: State<unknown>) => boolean;
|
|
2932
|
+
parent: (state: State<unknown>) => MenuParent;
|
|
2933
|
+
rootId: (state: State<unknown>) => string | undefined;
|
|
2934
|
+
activeIndex: (state: State<unknown>) => number | null;
|
|
2935
|
+
listElement: (state: State<unknown>) => HTMLElement | null;
|
|
2936
|
+
/** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */
|
|
2937
|
+
triggerControlsId: (state: State<unknown>, triggerId: string | undefined) => string | undefined;
|
|
2938
|
+
filterTriggerProps: (state: State<unknown>) => HTMLProps;
|
|
2939
|
+
inputProps: (state: State<unknown>) => HTMLProps;
|
|
2940
|
+
webkitAriaSelected: (state: State<unknown>, highlighted: boolean) => true | undefined;
|
|
2941
|
+
highlightedItemId: (state: State<unknown>) => string | undefined;
|
|
2942
|
+
isActive: (state: State<unknown>, itemIndex: number) => boolean;
|
|
2943
|
+
hoverEnabled: (state: State<unknown>) => boolean;
|
|
2944
|
+
instantType: (state: State<unknown>) => "click" | "dismiss" | "group" | "trigger-change" | undefined;
|
|
2945
|
+
lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason_2 | null;
|
|
2946
|
+
floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
|
|
2947
|
+
floatingNodeId: (state: State<unknown>) => string | undefined;
|
|
2948
|
+
floatingParentNodeId: (state: State<unknown>) => string | null;
|
|
2949
|
+
itemProps: (state: State<unknown>) => HTMLProps;
|
|
2950
|
+
closeDelay: (state: State<unknown>) => number;
|
|
2951
|
+
adaptiveOrigin: (state: State<unknown>) => AdaptiveOriginMiddleware | undefined;
|
|
2952
|
+
keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
|
|
2053
2953
|
};
|
|
2054
2954
|
|
|
2055
2955
|
/**
|
|
@@ -2080,10 +2980,28 @@ declare interface SeparatorState {
|
|
|
2080
2980
|
orientation: Orientation;
|
|
2081
2981
|
}
|
|
2082
2982
|
|
|
2083
|
-
declare const siblingOpen:
|
|
2983
|
+
declare const siblingOpen: 'sibling-open';
|
|
2084
2984
|
|
|
2085
2985
|
declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
2086
2986
|
|
|
2987
|
+
/**
|
|
2988
|
+
* Indicates which side the popup is positioned relative to the anchor.
|
|
2989
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
2990
|
+
*/
|
|
2991
|
+
declare const side = "data-side";
|
|
2992
|
+
|
|
2993
|
+
/**
|
|
2994
|
+
* Indicates which side the popup is positioned relative to the anchor.
|
|
2995
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
2996
|
+
*/
|
|
2997
|
+
declare const side_2 = "data-side";
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* Indicates which side the popup is positioned relative to the anchor.
|
|
3001
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
3002
|
+
*/
|
|
3003
|
+
declare const side_3 = "data-side";
|
|
3004
|
+
|
|
2087
3005
|
declare interface SideFlipMode {
|
|
2088
3006
|
/**
|
|
2089
3007
|
* How to avoid collisions on the side axis.
|
|
@@ -2131,16 +3049,51 @@ declare interface SideShiftMode {
|
|
|
2131
3049
|
fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
|
|
2132
3050
|
}
|
|
2133
3051
|
|
|
3052
|
+
/**
|
|
3053
|
+
* Present when the menu begins animating in.
|
|
3054
|
+
*/
|
|
3055
|
+
declare const startingStyle = "data-starting-style";
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* Present when the indicator begins animating in.
|
|
3059
|
+
*/
|
|
3060
|
+
declare const startingStyle_2 = "data-starting-style";
|
|
3061
|
+
|
|
3062
|
+
/**
|
|
3063
|
+
* Present when the menu begins animating in.
|
|
3064
|
+
*/
|
|
3065
|
+
declare const startingStyle_3 = "data-starting-style";
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Present when the radio indicator begins animating in.
|
|
3069
|
+
*/
|
|
3070
|
+
declare const startingStyle_4 = "data-starting-style";
|
|
3071
|
+
|
|
2134
3072
|
declare type State<Payload> = PopupStoreState<Payload> & {
|
|
2135
3073
|
disabled: boolean;
|
|
2136
|
-
modal: boolean;
|
|
3074
|
+
modal: boolean | undefined;
|
|
2137
3075
|
openMethod: InteractionType | null;
|
|
3076
|
+
/** Whether the popup last opened from the keyboard or an assistive-technology press. */
|
|
3077
|
+
keyboardOpen: boolean;
|
|
2138
3078
|
allowMouseEnter: boolean;
|
|
3079
|
+
highlightItemOnHover: boolean;
|
|
2139
3080
|
parent: MenuParent;
|
|
2140
3081
|
rootId: string | undefined;
|
|
2141
3082
|
activeIndex: number | null;
|
|
3083
|
+
/** The `Menu.List` element, which takes the `menu` role from the popup when rendered. */
|
|
3084
|
+
listElement: HTMLElement | null;
|
|
3085
|
+
/**
|
|
3086
|
+
* Props a filter root adds to its triggers (dialog semantics and the key relay to the input).
|
|
3087
|
+
* Published by the filter implementation so a plain menu never bundles them.
|
|
3088
|
+
*/
|
|
3089
|
+
filterTriggerProps: HTMLProps;
|
|
3090
|
+
/** List navigation props for the element that holds real focus under virtual focus. */
|
|
3091
|
+
inputProps: HTMLProps;
|
|
3092
|
+
/** Whether this menu's filter input has focus. */
|
|
3093
|
+
inputFocused: boolean;
|
|
3094
|
+
/** The element at `activeIndex` once the item list settles. Only virtual focus publishes it. */
|
|
3095
|
+
highlightedItem: HTMLElement | undefined;
|
|
2142
3096
|
hoverEnabled: boolean;
|
|
2143
|
-
stickIfOpen: boolean;
|
|
2144
3097
|
instantType: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
|
|
2145
3098
|
openChangeReason: MenuRoot.ChangeEventReason | null;
|
|
2146
3099
|
floatingTreeRoot: FloatingTreeStore;
|
|
@@ -2149,22 +3102,58 @@ declare type State<Payload> = PopupStoreState<Payload> & {
|
|
|
2149
3102
|
itemProps: HTMLProps;
|
|
2150
3103
|
closeDelay: number;
|
|
2151
3104
|
keyboardEventRelay: ((event: React_2.KeyboardEvent<any>) => void) | undefined;
|
|
2152
|
-
|
|
3105
|
+
adaptiveOrigin: AdaptiveOriginMiddleware | undefined;
|
|
2153
3106
|
};
|
|
2154
3107
|
|
|
2155
|
-
declare const swipe:
|
|
3108
|
+
declare const swipe: 'swipe';
|
|
3109
|
+
|
|
3110
|
+
declare const trackPress: 'track-press';
|
|
2156
3111
|
|
|
2157
|
-
|
|
3112
|
+
/**
|
|
3113
|
+
* The coordinates that this element is anchored to. Used for animations and transitions.
|
|
3114
|
+
* @type {string}
|
|
3115
|
+
*/
|
|
3116
|
+
declare const transformOrigin = "--transform-origin";
|
|
3117
|
+
|
|
3118
|
+
/**
|
|
3119
|
+
* Indicates that the viewport is currently transitioning between old and new content.
|
|
3120
|
+
*/
|
|
3121
|
+
declare const transitioning = "data-transitioning";
|
|
2158
3122
|
|
|
2159
3123
|
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
2160
3124
|
|
|
2161
3125
|
declare function Trigger<Payload = unknown>({ className, ...props }: WithStringClassName<Menu_2.Trigger.Props<Payload>> & React_2.RefAttributes<HTMLElement>): JSX_2.Element;
|
|
2162
3126
|
|
|
2163
|
-
declare const triggerFocus:
|
|
3127
|
+
declare const triggerFocus: 'trigger-focus';
|
|
3128
|
+
|
|
3129
|
+
declare const triggerHover: 'trigger-hover';
|
|
3130
|
+
|
|
3131
|
+
declare const triggerPress: 'trigger-press';
|
|
3132
|
+
|
|
3133
|
+
/**
|
|
3134
|
+
* Present when the menu arrow is uncentered.
|
|
3135
|
+
*/
|
|
3136
|
+
declare const uncentered = "data-uncentered";
|
|
3137
|
+
|
|
3138
|
+
/**
|
|
3139
|
+
* Present when the menu checkbox item is not checked.
|
|
3140
|
+
*/
|
|
3141
|
+
declare const unchecked = "data-unchecked";
|
|
3142
|
+
|
|
3143
|
+
/**
|
|
3144
|
+
* Present when the menu checkbox item is not checked.
|
|
3145
|
+
*/
|
|
3146
|
+
declare const unchecked_2 = "data-unchecked";
|
|
2164
3147
|
|
|
2165
|
-
|
|
3148
|
+
/**
|
|
3149
|
+
* Present when the menu radio item is not selected.
|
|
3150
|
+
*/
|
|
3151
|
+
declare const unchecked_3 = "data-unchecked";
|
|
2166
3152
|
|
|
2167
|
-
|
|
3153
|
+
/**
|
|
3154
|
+
* Present when the menu radio item is not selected.
|
|
3155
|
+
*/
|
|
3156
|
+
declare const unchecked_4 = "data-unchecked";
|
|
2168
3157
|
|
|
2169
3158
|
declare interface UseAnchorPositioningSharedParameters {
|
|
2170
3159
|
/**
|
|
@@ -2308,35 +3297,11 @@ declare interface UseAnchorPositioningSharedParameters {
|
|
|
2308
3297
|
collisionAvoidance?: CollisionAvoidance | undefined;
|
|
2309
3298
|
}
|
|
2310
3299
|
|
|
2311
|
-
declare interface UseFloatingPortalNodeProps {
|
|
2312
|
-
ref?: React_2.Ref<HTMLDivElement> | undefined;
|
|
2313
|
-
container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
|
|
2314
|
-
componentProps?: UseRenderElementComponentProps<any> | undefined;
|
|
2315
|
-
elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
3300
|
export declare function useMenuSubmenuRootContext(): MenuSubmenuRootContext | undefined;
|
|
2319
3301
|
|
|
2320
|
-
declare
|
|
2321
|
-
/**
|
|
2322
|
-
* The class name to apply to the rendered element.
|
|
2323
|
-
* Can be a string or a function that accepts the state and returns a string.
|
|
2324
|
-
*/
|
|
2325
|
-
className?: string | ((state: State) => string | undefined) | undefined;
|
|
2326
|
-
/**
|
|
2327
|
-
* The render prop or React element to override the default element.
|
|
2328
|
-
*/
|
|
2329
|
-
render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
|
|
2330
|
-
/**
|
|
2331
|
-
* The style to apply to the rendered element.
|
|
2332
|
-
* Can be a style object or a function that accepts the state and returns a style object.
|
|
2333
|
-
*/
|
|
2334
|
-
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
declare const wheel: "wheel";
|
|
3302
|
+
declare const wheel: 'wheel';
|
|
2338
3303
|
|
|
2339
|
-
declare const windowResize:
|
|
3304
|
+
declare const windowResize: 'window-resize';
|
|
2340
3305
|
|
|
2341
3306
|
/**
|
|
2342
3307
|
* Adds a `preventBaseUIHandler` method to all event handlers.
|