@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/Popover/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.
|
|
2
|
-
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.
|
|
3
|
-
import { HTMLProps as HTMLProps_2 } from '../../index.
|
|
4
|
-
import { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
1
|
+
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.mjs';
|
|
2
|
+
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.mjs';
|
|
3
|
+
import { HTMLProps as HTMLProps_2 } from '../../index.mjs';
|
|
4
|
+
import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
5
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
6
6
|
import { Padding } from '@floating-ui/react-dom';
|
|
7
7
|
import { PopoverArrowProps as PopoverArrowProps_2 } from '@base-ui/react';
|
|
@@ -11,18 +11,152 @@ import { PopoverDescriptionProps as PopoverDescriptionProps_2 } from '@base-ui/r
|
|
|
11
11
|
import { PopoverPopupProps as PopoverPopupProps_2 } from '@base-ui/react';
|
|
12
12
|
import { PopoverPortalProps as PopoverPortalProps_2 } from '@base-ui/react';
|
|
13
13
|
import { PopoverPositionerProps as PopoverPositionerProps_2 } from '@base-ui/react';
|
|
14
|
-
import { PopoverRootChangeEventReason as PopoverRootChangeEventReason_2 } from '../index.
|
|
14
|
+
import { PopoverRootChangeEventReason as PopoverRootChangeEventReason_2 } from '../index.mjs';
|
|
15
15
|
import { PopoverTitleProps as PopoverTitleProps_2 } from '@base-ui/react';
|
|
16
|
+
import { PopoverViewportProps as PopoverViewportProps_2 } from '@base-ui/react';
|
|
16
17
|
import * as React_2 from 'react';
|
|
17
18
|
import { ReactStore } from '@base-ui/utils/store';
|
|
18
|
-
import { Rect } from '@floating-ui/utils';
|
|
19
|
+
import type { Rect } from '@floating-ui/utils';
|
|
19
20
|
import { Timeout } from '@base-ui/utils/useTimeout';
|
|
20
|
-
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.
|
|
21
|
+
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
|
|
21
22
|
import type { UseFloatingReturn } from '@floating-ui/react-dom';
|
|
22
23
|
import { VirtualElement } from '@floating-ui/react-dom';
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Indicates the direction from which the popup was activated.
|
|
27
|
+
* This can be used to create directional animations based on how the popup was triggered.
|
|
28
|
+
* Contains space-separated values for both horizontal and vertical axes.
|
|
29
|
+
* @type {`${'left' | 'right' | ''} ${'down' | 'up' | ''}`}
|
|
30
|
+
*/
|
|
31
|
+
declare const activationDirection = "data-activation-direction";
|
|
32
|
+
|
|
33
|
+
declare type AdaptiveOriginMiddleware = {
|
|
34
|
+
name: string;
|
|
35
|
+
fn: (...args: any[]) => any;
|
|
36
|
+
};
|
|
37
|
+
|
|
24
38
|
declare type Align = 'start' | 'center' | 'end';
|
|
25
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
42
|
+
* @type {'start' | 'center' | 'end'}
|
|
43
|
+
*/
|
|
44
|
+
declare const align = "data-align";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Indicates how the popup is aligned relative to specified side.
|
|
48
|
+
* @type {'start' | 'center' | 'end'}
|
|
49
|
+
*/
|
|
50
|
+
declare const align_2 = "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_3 = "data-align";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The anchor's height.
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
declare const anchorHeight = "--anchor-height";
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Present when the anchor is hidden.
|
|
66
|
+
*/
|
|
67
|
+
declare const anchorHidden = "data-anchor-hidden";
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The anchor's width.
|
|
71
|
+
* @type {number}
|
|
72
|
+
*/
|
|
73
|
+
declare const anchorWidth = "--anchor-width";
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The available height between the trigger and the edge of the viewport.
|
|
77
|
+
* @type {number}
|
|
78
|
+
*/
|
|
79
|
+
declare const availableHeight = "--available-height";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The available width between the trigger and the edge of the viewport.
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
declare const availableWidth = "--available-width";
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Shared implementation for popup handles that coordinate detached triggers with a mounted root.
|
|
89
|
+
*
|
|
90
|
+
* Subclasses provide the component-specific imperative methods, while this base class owns the
|
|
91
|
+
* fallback store, root store attachment stack, subscriber notifications, and development warning for
|
|
92
|
+
* overlapping roots.
|
|
93
|
+
*
|
|
94
|
+
* @template HandleStore Store shape exposed to detached triggers.
|
|
95
|
+
* @template Store Root-owned store attached by the component root.
|
|
96
|
+
*/
|
|
97
|
+
declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
|
|
98
|
+
protected readonly fallbackStore: HandleStore;
|
|
99
|
+
private readonly componentName;
|
|
100
|
+
private readonly throwOnMissingTrigger;
|
|
101
|
+
/**
|
|
102
|
+
* Stores of every root currently using this handle, in attach order. A handle is meant to be used
|
|
103
|
+
* by a single mounted root, but roots can transiently overlap (e.g. during an animated route
|
|
104
|
+
* transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
|
|
105
|
+
* leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
|
|
106
|
+
*/
|
|
107
|
+
private readonly attachedStores;
|
|
108
|
+
/**
|
|
109
|
+
* Store of the root that currently controls the handle: the most recently attached one still
|
|
110
|
+
* mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
|
|
111
|
+
*/
|
|
112
|
+
private attachedStoreValue;
|
|
113
|
+
/**
|
|
114
|
+
* Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
|
|
115
|
+
*/
|
|
116
|
+
private readonly storeListeners;
|
|
117
|
+
/**
|
|
118
|
+
* Creates a handle backed by the store used while no root is attached.
|
|
119
|
+
*
|
|
120
|
+
* @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
|
|
121
|
+
* so they can render and register without a mounted root. Triggers register into whichever store
|
|
122
|
+
* `store` currently resolves to, so while detached they live in this store's trigger map and
|
|
123
|
+
* migrate themselves to the root's store (and back) as it attaches/detaches.
|
|
124
|
+
* @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
|
|
125
|
+
* `MenuHandle.open()` in warning text.
|
|
126
|
+
* @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
|
|
127
|
+
* registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
|
|
128
|
+
* so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
|
|
129
|
+
*/
|
|
130
|
+
constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
|
|
131
|
+
protected get attachedStore(): Store | null;
|
|
132
|
+
/**
|
|
133
|
+
* Sets the store that currently controls the handle and notifies subscribers when it changes, so
|
|
134
|
+
* detached triggers re-render and migrate their registration to the new store.
|
|
135
|
+
*/
|
|
136
|
+
private setActiveStore;
|
|
137
|
+
/**
|
|
138
|
+
* Opens the attached root's store and associates it with the trigger with the given id, or a
|
|
139
|
+
* no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
|
|
140
|
+
* `open()` method, which only narrows the parameter type.
|
|
141
|
+
*
|
|
142
|
+
* When a trigger id is given but no matching trigger is registered, anchored popups throw (see
|
|
143
|
+
* `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
|
|
144
|
+
*
|
|
145
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
146
|
+
*
|
|
147
|
+
* @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
|
|
148
|
+
* without associating any trigger.
|
|
149
|
+
*/
|
|
150
|
+
protected openByTrigger(triggerId: string | null | undefined): void;
|
|
151
|
+
/**
|
|
152
|
+
* Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
|
|
153
|
+
* while no root is attached. Shared by every concrete handle's public `close()` method.
|
|
154
|
+
*
|
|
155
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
156
|
+
*/
|
|
157
|
+
protected closePopup(): void;
|
|
158
|
+
}
|
|
159
|
+
|
|
26
160
|
declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
27
161
|
/**
|
|
28
162
|
* The reason for the event.
|
|
@@ -90,15 +224,35 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
|
|
|
90
224
|
|
|
91
225
|
declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
|
|
92
226
|
|
|
93
|
-
declare const cancelOpen:
|
|
227
|
+
declare const cancelOpen: 'cancel-open';
|
|
94
228
|
|
|
95
|
-
declare const chipRemovePress:
|
|
229
|
+
declare const chipRemovePress: 'chip-remove-press';
|
|
96
230
|
|
|
97
|
-
declare const clearPress:
|
|
231
|
+
declare const clearPress: 'clear-press';
|
|
98
232
|
|
|
99
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Present when the popup is closed.
|
|
235
|
+
*/
|
|
236
|
+
declare const closed_2 = "data-closed";
|
|
100
237
|
|
|
101
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Present when the popup is closed.
|
|
240
|
+
*/
|
|
241
|
+
declare const closed_3 = "data-closed";
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Present when the popup is closed.
|
|
245
|
+
*/
|
|
246
|
+
declare const closed_4 = "data-closed";
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Present when the popup is closed.
|
|
250
|
+
*/
|
|
251
|
+
declare const closed_5 = "data-closed";
|
|
252
|
+
|
|
253
|
+
declare const closePress: 'close-press';
|
|
254
|
+
|
|
255
|
+
declare const closeWatcher: 'close-watcher';
|
|
102
256
|
|
|
103
257
|
declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
|
|
104
258
|
|
|
@@ -112,11 +266,11 @@ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => R
|
|
|
112
266
|
|
|
113
267
|
declare type Context = PopupStoreContext<PopoverRoot.ChangeEventDetails> & {
|
|
114
268
|
readonly popupRef: React_2.RefObject<HTMLElement | null>;
|
|
115
|
-
readonly backdropRef: React_2.RefObject<HTMLDivElement | null>;
|
|
116
|
-
readonly internalBackdropRef: React_2.RefObject<HTMLDivElement | null>;
|
|
117
269
|
readonly triggerFocusTargetRef: React_2.RefObject<HTMLElement | null>;
|
|
270
|
+
readonly beforeTriggerFocusGuardRef: React_2.RefObject<HTMLElement | null>;
|
|
118
271
|
readonly beforeContentFocusGuardRef: React_2.RefObject<HTMLElement | null>;
|
|
119
272
|
readonly stickIfOpenTimeout: Timeout;
|
|
273
|
+
stickIfOpen: boolean;
|
|
120
274
|
};
|
|
121
275
|
|
|
122
276
|
declare interface ContextData {
|
|
@@ -130,13 +284,33 @@ declare interface ContextData {
|
|
|
130
284
|
*/
|
|
131
285
|
declare function createPopoverHandle<Payload>(): PopoverHandle<Payload>;
|
|
132
286
|
|
|
133
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Applied to the direct child of the viewport when no transitions are present or the new content when it's entering.
|
|
289
|
+
*/
|
|
290
|
+
declare const current = "data-current";
|
|
291
|
+
|
|
292
|
+
declare const decrementPress: 'decrement-press';
|
|
293
|
+
|
|
294
|
+
declare const disabled: 'disabled';
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Present when the trigger is disabled.
|
|
298
|
+
*/
|
|
299
|
+
declare const disabled_2 = "data-disabled";
|
|
300
|
+
|
|
301
|
+
declare const drag: 'drag';
|
|
134
302
|
|
|
135
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Present when the popup is animating out.
|
|
305
|
+
*/
|
|
306
|
+
declare const endingStyle = "data-ending-style";
|
|
136
307
|
|
|
137
|
-
|
|
308
|
+
/**
|
|
309
|
+
* Present when the popup is animating out.
|
|
310
|
+
*/
|
|
311
|
+
declare const endingStyle_2 = "data-ending-style";
|
|
138
312
|
|
|
139
|
-
declare const escapeKey:
|
|
313
|
+
declare const escapeKey: 'escape-key';
|
|
140
314
|
|
|
141
315
|
declare interface ExtendedElements {
|
|
142
316
|
reference: ReferenceType | null;
|
|
@@ -171,31 +345,6 @@ declare interface FloatingEvents {
|
|
|
171
345
|
off(event: string, handler: (data: any) => void): void;
|
|
172
346
|
}
|
|
173
347
|
|
|
174
|
-
/**
|
|
175
|
-
* Portals the floating element into a given container element — by default,
|
|
176
|
-
* outside of the app root and into the body.
|
|
177
|
-
* This is necessary to ensure the floating element can appear outside any
|
|
178
|
-
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
179
|
-
* while retaining its location in the React tree.
|
|
180
|
-
* @see https://floating-ui.com/docs/FloatingPortal
|
|
181
|
-
* @internal
|
|
182
|
-
*/
|
|
183
|
-
declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
184
|
-
renderGuards?: boolean | undefined;
|
|
185
|
-
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
186
|
-
|
|
187
|
-
declare namespace FloatingPortal {
|
|
188
|
-
type State = FloatingPortalState;
|
|
189
|
-
interface Props<TState> extends BaseUIComponentProps<'div', TState> {
|
|
190
|
-
/**
|
|
191
|
-
* A parent element to render the portal element into.
|
|
192
|
-
*/
|
|
193
|
-
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
declare interface FloatingPortalState {}
|
|
198
|
-
|
|
199
348
|
declare type FloatingRootContext = FloatingRootStore;
|
|
200
349
|
|
|
201
350
|
declare interface FloatingRootState {
|
|
@@ -255,37 +404,49 @@ declare interface FloatingRootStoreOptions {
|
|
|
255
404
|
onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
|
|
256
405
|
}
|
|
257
406
|
|
|
258
|
-
declare const focusOut:
|
|
407
|
+
declare const focusOut: 'focus-out';
|
|
259
408
|
|
|
260
409
|
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
261
410
|
ref?: React_2.Ref<T> | undefined;
|
|
262
411
|
};
|
|
263
412
|
|
|
264
|
-
declare const imperativeAction:
|
|
413
|
+
declare const imperativeAction: 'imperative-action';
|
|
414
|
+
|
|
415
|
+
declare const incrementPress: 'increment-press';
|
|
265
416
|
|
|
266
|
-
declare const
|
|
417
|
+
declare const initial: 'initial';
|
|
267
418
|
|
|
268
|
-
declare const
|
|
419
|
+
declare const inputBlur: 'input-blur';
|
|
269
420
|
|
|
270
|
-
declare const
|
|
421
|
+
declare const inputChange: 'input-change';
|
|
271
422
|
|
|
272
|
-
declare const
|
|
423
|
+
declare const inputClear: 'input-clear';
|
|
273
424
|
|
|
274
|
-
declare const
|
|
425
|
+
declare const inputPaste: 'input-paste';
|
|
275
426
|
|
|
276
|
-
declare const
|
|
427
|
+
declare const inputPress: 'input-press';
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Present if animations should be instant.
|
|
431
|
+
* @type {'click' | 'dismiss' | 'focus' | 'trigger-change'}
|
|
432
|
+
*/
|
|
433
|
+
declare const instant = "data-instant";
|
|
277
434
|
|
|
278
|
-
|
|
435
|
+
/**
|
|
436
|
+
* Present if animations should be instant.
|
|
437
|
+
* @type {'click' | 'dismiss' | 'focus' | 'trigger-change'}
|
|
438
|
+
*/
|
|
439
|
+
declare const instant_2 = "data-instant";
|
|
279
440
|
|
|
280
|
-
declare const itemPress:
|
|
441
|
+
declare const itemPress: 'item-press';
|
|
281
442
|
|
|
282
|
-
declare const keyboard:
|
|
443
|
+
declare const keyboard: 'keyboard';
|
|
283
444
|
|
|
284
|
-
declare const linkPress:
|
|
445
|
+
declare const linkPress: 'link-press';
|
|
285
446
|
|
|
286
|
-
declare const listNavigation:
|
|
447
|
+
declare const listNavigation: 'list-navigation';
|
|
287
448
|
|
|
288
|
-
declare const missing:
|
|
449
|
+
declare const missing: 'missing';
|
|
289
450
|
|
|
290
451
|
declare type NarrowedElement<T> = T extends Element ? T : Element;
|
|
291
452
|
|
|
@@ -299,7 +460,7 @@ declare interface NativeButtonProps {
|
|
|
299
460
|
nativeButton?: boolean | undefined;
|
|
300
461
|
}
|
|
301
462
|
|
|
302
|
-
declare const none:
|
|
463
|
+
declare const none: 'none';
|
|
303
464
|
|
|
304
465
|
declare type OffsetFunction = (data: {
|
|
305
466
|
side: Side;
|
|
@@ -314,13 +475,33 @@ declare type OffsetFunction = (data: {
|
|
|
314
475
|
};
|
|
315
476
|
}) => number;
|
|
316
477
|
|
|
317
|
-
|
|
478
|
+
/**
|
|
479
|
+
* Present when the popup is open.
|
|
480
|
+
*/
|
|
481
|
+
declare const open_2 = "data-open";
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Present when the popup is open.
|
|
485
|
+
*/
|
|
486
|
+
declare const open_3 = "data-open";
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Present when the popup is open.
|
|
490
|
+
*/
|
|
491
|
+
declare const open_4 = "data-open";
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Present when the popup is open.
|
|
495
|
+
*/
|
|
496
|
+
declare const open_5 = "data-open";
|
|
497
|
+
|
|
498
|
+
declare const outsidePress: 'outside-press';
|
|
318
499
|
|
|
319
500
|
declare type PayloadChildRenderFunction<Payload> = (arg: {
|
|
320
501
|
payload: Payload | undefined;
|
|
321
502
|
}) => React_2.ReactNode;
|
|
322
503
|
|
|
323
|
-
declare const pointer:
|
|
504
|
+
declare const pointer: 'pointer';
|
|
324
505
|
|
|
325
506
|
export declare const Popover: {
|
|
326
507
|
Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PopoverPositionerProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
@@ -344,7 +525,7 @@ export declare const Popover: {
|
|
|
344
525
|
Close: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PopoverCloseProps_2, "ref"> & React_2.RefAttributes<HTMLButtonElement>, "ref">, "className"> & {
|
|
345
526
|
className?: string;
|
|
346
527
|
} & React_2.RefAttributes<HTMLButtonElement>>;
|
|
347
|
-
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
528
|
+
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PopoverViewportProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
348
529
|
className?: string;
|
|
349
530
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
350
531
|
Root: typeof Popover_2.Root;
|
|
@@ -385,6 +566,16 @@ export declare namespace PopoverArrow {
|
|
|
385
566
|
export type Props = PopoverArrowProps;
|
|
386
567
|
}
|
|
387
568
|
|
|
569
|
+
export declare namespace PopoverArrowDataAttributes {
|
|
570
|
+
export {
|
|
571
|
+
open_4 as open,
|
|
572
|
+
closed_4 as closed,
|
|
573
|
+
side_3 as side,
|
|
574
|
+
align_3 as align,
|
|
575
|
+
uncentered
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
388
579
|
export declare interface PopoverArrowProps extends BaseUIComponentProps<'div', PopoverArrowState> {}
|
|
389
580
|
|
|
390
581
|
export declare interface PopoverArrowState {
|
|
@@ -419,6 +610,15 @@ export declare namespace PopoverBackdrop {
|
|
|
419
610
|
export type Props = PopoverBackdropProps;
|
|
420
611
|
}
|
|
421
612
|
|
|
613
|
+
export declare namespace PopoverBackdropDataAttributes {
|
|
614
|
+
export {
|
|
615
|
+
open_5 as open,
|
|
616
|
+
closed_5 as closed,
|
|
617
|
+
startingStyle_2 as startingStyle,
|
|
618
|
+
endingStyle_2 as endingStyle
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
422
622
|
export declare interface PopoverBackdropProps extends BaseUIComponentProps<'div', PopoverBackdropState> {}
|
|
423
623
|
|
|
424
624
|
export declare interface PopoverBackdropState {
|
|
@@ -466,30 +666,46 @@ export declare interface PopoverDescriptionProps extends BaseUIComponentProps<'p
|
|
|
466
666
|
|
|
467
667
|
export declare interface PopoverDescriptionState {}
|
|
468
668
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
669
|
+
/**
|
|
670
|
+
* Controls a Popover imperatively and associates detached `Popover.Trigger` components with a
|
|
671
|
+
* `Popover.Root`. Create one with `Popover.createHandle()` and pass it to the `handle` prop of the
|
|
672
|
+
* root and of any triggers rendered outside of it.
|
|
673
|
+
*
|
|
674
|
+
* The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
675
|
+
* before a root attaches (or after it unmounts) are ignored.
|
|
676
|
+
*/
|
|
677
|
+
declare class PopoverHandle<Payload> extends BasePopupHandle<PopoverHandleStore<Payload>, PopoverStore<Payload>> {
|
|
475
678
|
constructor();
|
|
476
679
|
/**
|
|
477
680
|
* Opens the popover and associates it with the trigger with the given id.
|
|
478
|
-
* The trigger must be a Popover.Trigger component with this handle passed as a prop.
|
|
479
681
|
*
|
|
480
|
-
*
|
|
682
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
683
|
+
*
|
|
684
|
+
* @param triggerId ID of the trigger to associate with the popover. The trigger must be a matching
|
|
685
|
+
* `Popover.Trigger` with this handle passed as a prop.
|
|
481
686
|
*/
|
|
482
687
|
open(triggerId: string): void;
|
|
483
688
|
/**
|
|
484
689
|
* Closes the popover.
|
|
690
|
+
*
|
|
691
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
485
692
|
*/
|
|
486
693
|
close(): void;
|
|
487
694
|
/**
|
|
488
|
-
*
|
|
695
|
+
* Whether the popover is currently open. Returns `false` while no root is attached to the handle.
|
|
489
696
|
*/
|
|
490
697
|
get isOpen(): boolean;
|
|
491
698
|
}
|
|
492
699
|
|
|
700
|
+
/**
|
|
701
|
+
* The store view that detached handle-backed triggers read from. Both the real `PopoverStore` and
|
|
702
|
+
* the inert fallback store satisfy it, so a trigger can read from whichever store the handle
|
|
703
|
+
* currently exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus
|
|
704
|
+
* `setOpen` (called by the focus guards) — so the exposed surface can't bypass the open-change
|
|
705
|
+
* pipeline; on the detached fallback store every one of these mutations is a no-op.
|
|
706
|
+
*/
|
|
707
|
+
declare type PopoverHandleStore<Payload> = Pick<PopoverStore<Payload>, PopupTriggerStoreKeys | 'setOpen'>;
|
|
708
|
+
|
|
493
709
|
/**
|
|
494
710
|
* A container for the popover contents.
|
|
495
711
|
* Renders a `<div>` element.
|
|
@@ -503,15 +719,36 @@ export declare namespace PopoverPopup {
|
|
|
503
719
|
export type Props = PopoverPopupProps;
|
|
504
720
|
}
|
|
505
721
|
|
|
722
|
+
export declare namespace PopoverPopupCssVariables {
|
|
723
|
+
export {
|
|
724
|
+
popupWidth,
|
|
725
|
+
popupHeight
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export declare namespace PopoverPopupDataAttributes {
|
|
730
|
+
export {
|
|
731
|
+
open_3 as open,
|
|
732
|
+
closed_3 as closed,
|
|
733
|
+
startingStyle,
|
|
734
|
+
endingStyle,
|
|
735
|
+
side_2 as side,
|
|
736
|
+
align_2 as align,
|
|
737
|
+
instant
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
506
741
|
export declare interface PopoverPopupProps extends BaseUIComponentProps<'div', PopoverPopupState> {
|
|
507
742
|
/**
|
|
508
743
|
* Determines the element to focus when the popover is opened.
|
|
744
|
+
* By default, focus moves to the first tabbable element inside the popup, except when the popover
|
|
745
|
+
* is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard.
|
|
509
746
|
*
|
|
510
747
|
* - `false`: Do not move focus.
|
|
511
748
|
* - `true`: Move focus based on the default behavior (first tabbable element or popup).
|
|
512
749
|
* - `RefObject`: Move focus to the ref element.
|
|
513
750
|
* - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
|
|
514
|
-
* Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
|
|
751
|
+
* Return an element to focus, `true` to use the default behavior, `null` to fall back to the default behavior, or `false`/`undefined` to do nothing.
|
|
515
752
|
*/
|
|
516
753
|
initialFocus?: boolean | React_2.RefObject<HTMLElement | null> | ((openType: InteractionType) => void | boolean | HTMLElement | null) | undefined;
|
|
517
754
|
/**
|
|
@@ -521,7 +758,7 @@ export declare interface PopoverPopupProps extends BaseUIComponentProps<'div', P
|
|
|
521
758
|
* - `true`: Move focus based on the default behavior (trigger or previously focused element).
|
|
522
759
|
* - `RefObject`: Move focus to the ref element.
|
|
523
760
|
* - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
|
|
524
|
-
* Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
|
|
761
|
+
* Return an element to focus, `true` to use the default behavior, `null` to fall back to the default behavior, or `false`/`undefined` to do nothing.
|
|
525
762
|
*/
|
|
526
763
|
finalFocus?: boolean | React_2.RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null) | undefined;
|
|
527
764
|
}
|
|
@@ -563,12 +800,16 @@ export declare namespace PopoverPortal {
|
|
|
563
800
|
export type Props = PopoverPortalProps;
|
|
564
801
|
}
|
|
565
802
|
|
|
566
|
-
export declare interface PopoverPortalProps extends
|
|
803
|
+
export declare interface PopoverPortalProps extends BaseUIComponentProps<'div', PopoverPortalState> {
|
|
567
804
|
/**
|
|
568
805
|
* Whether to keep the portal mounted in the DOM while the popup is hidden.
|
|
569
806
|
* @default false
|
|
570
807
|
*/
|
|
571
808
|
keepMounted?: boolean | undefined;
|
|
809
|
+
/**
|
|
810
|
+
* A parent element to render the portal element into.
|
|
811
|
+
*/
|
|
812
|
+
container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
|
|
572
813
|
}
|
|
573
814
|
|
|
574
815
|
export declare interface PopoverPortalState {}
|
|
@@ -586,6 +827,28 @@ export declare namespace PopoverPositioner {
|
|
|
586
827
|
export type Props = PopoverPositionerProps;
|
|
587
828
|
}
|
|
588
829
|
|
|
830
|
+
export declare namespace PopoverPositionerCssVariables {
|
|
831
|
+
export {
|
|
832
|
+
availableWidth,
|
|
833
|
+
availableHeight,
|
|
834
|
+
anchorWidth,
|
|
835
|
+
anchorHeight,
|
|
836
|
+
transformOrigin,
|
|
837
|
+
positionerWidth,
|
|
838
|
+
positionerHeight
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export declare namespace PopoverPositionerDataAttributes {
|
|
843
|
+
export {
|
|
844
|
+
open_2 as open,
|
|
845
|
+
closed_2 as closed,
|
|
846
|
+
anchorHidden,
|
|
847
|
+
side,
|
|
848
|
+
align
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
589
852
|
export declare interface PopoverPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', PopoverPositionerState> {}
|
|
590
853
|
|
|
591
854
|
export declare interface PopoverPositionerState {
|
|
@@ -617,7 +880,7 @@ export declare interface PopoverPositionerState {
|
|
|
617
880
|
*
|
|
618
881
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
619
882
|
*/
|
|
620
|
-
export declare function PopoverRoot<Payload = unknown>(props: PopoverRoot.Props<Payload>):
|
|
883
|
+
export declare function PopoverRoot<Payload = unknown>(props: PopoverRoot.Props<Payload>): React_2.JSX.Element;
|
|
621
884
|
|
|
622
885
|
export declare namespace PopoverRoot {
|
|
623
886
|
export type State = PopoverRootState;
|
|
@@ -633,7 +896,8 @@ export declare interface PopoverRootActions {
|
|
|
633
896
|
}
|
|
634
897
|
|
|
635
898
|
export declare type PopoverRootChangeEventDetails = BaseUIChangeEventDetails<PopoverRoot.ChangeEventReason> & {
|
|
636
|
-
|
|
899
|
+
/** Prevents the popup from unmounting until the `unmount` action is called. */
|
|
900
|
+
preventUnmountOnClose: () => void;
|
|
637
901
|
};
|
|
638
902
|
|
|
639
903
|
export declare type PopoverRootChangeEventReason = typeof REASONS.triggerHover | typeof REASONS.triggerFocus | typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.closePress | typeof REASONS.focusOut | typeof REASONS.imperativeAction | typeof REASONS.none;
|
|
@@ -660,9 +924,9 @@ export declare interface PopoverRootProps<Payload = unknown> {
|
|
|
660
924
|
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
661
925
|
/**
|
|
662
926
|
* A ref to imperative actions.
|
|
663
|
-
* - `unmount`:
|
|
664
|
-
*
|
|
665
|
-
*
|
|
927
|
+
* - `unmount`: Ends the closing phase of the popover after an externally controlled closing animation finishes.
|
|
928
|
+
* Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the popover completes closing on its own.
|
|
929
|
+
* Whether it leaves the DOM is decided by `keepMounted` on the portal.
|
|
666
930
|
* - `close`: Closes the popover imperatively when called.
|
|
667
931
|
*/
|
|
668
932
|
actionsRef?: React_2.RefObject<PopoverRoot.Actions | null> | undefined;
|
|
@@ -672,6 +936,8 @@ export declare interface PopoverRootProps<Payload = unknown> {
|
|
|
672
936
|
* - `false`: user interaction with the rest of the document is allowed.
|
|
673
937
|
* - `'trap-focus'`: focus is trapped inside the popover, but document page scroll is not locked and pointer interactions outside of it remain enabled.
|
|
674
938
|
*
|
|
939
|
+
* 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.
|
|
940
|
+
*
|
|
675
941
|
* When `modal` is `true`, focus trapping is enabled only if `<Popover.Close>` is rendered
|
|
676
942
|
* inside `<Popover.Popup>`. It can be visually hidden with your own CSS if needed, such as
|
|
677
943
|
* Tailwind's `sr-only` utility.
|
|
@@ -707,10 +973,8 @@ export declare interface PopoverRootProps<Payload = unknown> {
|
|
|
707
973
|
export declare interface PopoverRootState {}
|
|
708
974
|
|
|
709
975
|
declare class PopoverStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
|
|
710
|
-
constructor(initialState
|
|
711
|
-
setOpen: (nextOpen: boolean, eventDetails: Omit<PopoverRoot.ChangeEventDetails,
|
|
712
|
-
static useStore<Payload>(externalStore: PopoverStore<Payload> | undefined, initialState: Partial<State<Payload>>): PopoverStore<Payload>;
|
|
713
|
-
private disposeEffect;
|
|
976
|
+
constructor(initialState: Partial<State<Payload>>, floatingId: string | undefined, nested: boolean);
|
|
977
|
+
setOpen: (nextOpen: boolean, eventDetails: Omit<PopoverRoot.ChangeEventDetails, 'preventUnmountOnClose'>) => void;
|
|
714
978
|
}
|
|
715
979
|
|
|
716
980
|
/**
|
|
@@ -747,6 +1011,14 @@ export declare namespace PopoverTrigger {
|
|
|
747
1011
|
export type Props<Payload = unknown> = PopoverTriggerProps<Payload>;
|
|
748
1012
|
}
|
|
749
1013
|
|
|
1014
|
+
export declare namespace PopoverTriggerDataAttributes {
|
|
1015
|
+
export {
|
|
1016
|
+
popupOpen,
|
|
1017
|
+
pressed,
|
|
1018
|
+
disabled_2 as disabled
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
750
1022
|
export declare type PopoverTriggerProps<Payload = unknown> = NativeButtonProps & BaseUIComponentProps<'button', PopoverTriggerState> & {
|
|
751
1023
|
/**
|
|
752
1024
|
* Whether the component renders a native `<button>` element when replacing it
|
|
@@ -792,11 +1064,11 @@ export declare type PopoverTriggerProps<Payload = unknown> = NativeButtonProps &
|
|
|
792
1064
|
|
|
793
1065
|
export declare interface PopoverTriggerState {
|
|
794
1066
|
/**
|
|
795
|
-
* Whether the
|
|
1067
|
+
* Whether the trigger is currently disabled.
|
|
796
1068
|
*/
|
|
797
1069
|
disabled: boolean;
|
|
798
1070
|
/**
|
|
799
|
-
* Whether the popover is currently open.
|
|
1071
|
+
* Whether the popover is currently open and was opened by this trigger.
|
|
800
1072
|
*/
|
|
801
1073
|
open: boolean;
|
|
802
1074
|
}
|
|
@@ -809,18 +1081,37 @@ export declare interface PopoverTriggerState {
|
|
|
809
1081
|
*
|
|
810
1082
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
811
1083
|
*/
|
|
812
|
-
export declare const PopoverViewport: React_2.ForwardRefExoticComponent<Omit<
|
|
1084
|
+
export declare const PopoverViewport: React_2.ForwardRefExoticComponent<Omit<PopoverViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
813
1085
|
|
|
814
1086
|
export declare namespace PopoverViewport {
|
|
815
|
-
export
|
|
816
|
-
/**
|
|
817
|
-
* The content to render inside the transition container.
|
|
818
|
-
*/
|
|
819
|
-
children?: React_2.ReactNode;
|
|
820
|
-
}
|
|
1087
|
+
export type Props = PopoverViewportProps;
|
|
821
1088
|
export type State = PopoverViewportState;
|
|
822
1089
|
}
|
|
823
1090
|
|
|
1091
|
+
export declare namespace PopoverViewportCssVariables {
|
|
1092
|
+
export {
|
|
1093
|
+
popupWidth_2 as popupWidth,
|
|
1094
|
+
popupHeight_2 as popupHeight
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
export declare namespace PopoverViewportDataAttributes {
|
|
1099
|
+
export {
|
|
1100
|
+
current,
|
|
1101
|
+
previous,
|
|
1102
|
+
activationDirection,
|
|
1103
|
+
transitioning,
|
|
1104
|
+
instant_2 as instant
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export declare interface PopoverViewportProps extends BaseUIComponentProps<'div', PopoverViewportState> {
|
|
1109
|
+
/**
|
|
1110
|
+
* The content to render inside the transition container.
|
|
1111
|
+
*/
|
|
1112
|
+
children?: React_2.ReactNode;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
824
1115
|
export declare interface PopoverViewportState {
|
|
825
1116
|
/**
|
|
826
1117
|
* The activation direction of the transitioned content.
|
|
@@ -836,6 +1127,44 @@ export declare interface PopoverViewportState {
|
|
|
836
1127
|
instant: 'dismiss' | 'click' | 'focus' | 'trigger-change' | undefined;
|
|
837
1128
|
}
|
|
838
1129
|
|
|
1130
|
+
declare const popupClose: 'popup-close';
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
|
|
1134
|
+
* Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
|
|
1135
|
+
* omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
|
|
1136
|
+
*/
|
|
1137
|
+
declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
|
|
1138
|
+
setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
|
|
1143
|
+
* trigger element by id on both the attached root's store and the fallback store.
|
|
1144
|
+
*/
|
|
1145
|
+
declare interface PopupHandleStoreWithTriggers {
|
|
1146
|
+
readonly context: {
|
|
1147
|
+
readonly triggerElements: PopupTriggerMap;
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* The height of the popup.
|
|
1153
|
+
*/
|
|
1154
|
+
declare const popupHeight = "--popup-height";
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* The height of the parent popup.
|
|
1158
|
+
* This variable is placed on the 'previous' container and stores the height of the popup when the previous content was rendered.
|
|
1159
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
1160
|
+
*/
|
|
1161
|
+
declare const popupHeight_2 = "--popup-height";
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* Present when the corresponding popover is open.
|
|
1165
|
+
*/
|
|
1166
|
+
declare const popupOpen = "data-popup-open";
|
|
1167
|
+
|
|
839
1168
|
declare type PopupStoreContext<ChangeEventDetails> = {
|
|
840
1169
|
/**
|
|
841
1170
|
* Map of registered trigger elements.
|
|
@@ -899,6 +1228,13 @@ declare type PopupStoreState<Payload> = {
|
|
|
899
1228
|
* The currently active trigger DOM element.
|
|
900
1229
|
*/
|
|
901
1230
|
activeTriggerElement: Element | null;
|
|
1231
|
+
/**
|
|
1232
|
+
* Whether the popup is open because of a request that deliberately carried no trigger, such as a
|
|
1233
|
+
* handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
|
|
1234
|
+
* implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
|
|
1235
|
+
* forwarded. Reset by the Root once the popup is effectively closed.
|
|
1236
|
+
*/
|
|
1237
|
+
openedWithoutTrigger: boolean;
|
|
902
1238
|
/**
|
|
903
1239
|
* ID of the trigger (external prop).
|
|
904
1240
|
*/
|
|
@@ -927,12 +1263,12 @@ declare type PopupStoreState<Payload> = {
|
|
|
927
1263
|
|
|
928
1264
|
/**
|
|
929
1265
|
* Data structure to keep track of popup trigger elements by their IDs.
|
|
930
|
-
*
|
|
1266
|
+
*
|
|
1267
|
+
* Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
|
|
1268
|
+
* while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
|
|
931
1269
|
*/
|
|
932
1270
|
declare class PopupTriggerMap {
|
|
933
|
-
private elementsSet;
|
|
934
1271
|
private idMap;
|
|
935
|
-
constructor();
|
|
936
1272
|
/**
|
|
937
1273
|
* Adds a trigger element with the given ID.
|
|
938
1274
|
*
|
|
@@ -969,6 +1305,51 @@ declare class PopupTriggerMap {
|
|
|
969
1305
|
get size(): number;
|
|
970
1306
|
}
|
|
971
1307
|
|
|
1308
|
+
/**
|
|
1309
|
+
* Store members a detached handle-backed trigger reads or invokes for trigger registration and data
|
|
1310
|
+
* forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
|
|
1311
|
+
* detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
|
|
1312
|
+
* be durable. Component handle-store views Pick these from their concrete store (preserving its
|
|
1313
|
+
* context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
|
|
1314
|
+
*/
|
|
1315
|
+
declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* The width of the popup.
|
|
1319
|
+
*/
|
|
1320
|
+
declare const popupWidth = "--popup-width";
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* The width of the parent popup.
|
|
1324
|
+
* This variable is placed on the 'previous' container and stores the width of the popup when the previous content was rendered.
|
|
1325
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
1326
|
+
*/
|
|
1327
|
+
declare const popupWidth_2 = "--popup-width";
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* The height of the popover's positioner.
|
|
1331
|
+
* It is important to set `height` to this value when using CSS to animate size changes.
|
|
1332
|
+
* @type {number}
|
|
1333
|
+
*/
|
|
1334
|
+
declare const positionerHeight = "--positioner-height";
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* The width of the popover's positioner.
|
|
1338
|
+
* It is important to set `width` to this value when using CSS to animate size changes.
|
|
1339
|
+
* @type {number}
|
|
1340
|
+
*/
|
|
1341
|
+
declare const positionerWidth = "--positioner-width";
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Present when the trigger is pressed.
|
|
1345
|
+
*/
|
|
1346
|
+
declare const pressed = "data-pressed";
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Applied to the direct child of the viewport that contains the exiting content when transitions are present.
|
|
1350
|
+
*/
|
|
1351
|
+
declare const previous = "data-previous";
|
|
1352
|
+
|
|
972
1353
|
declare namespace REASONS {
|
|
973
1354
|
export {
|
|
974
1355
|
none,
|
|
@@ -998,6 +1379,7 @@ declare namespace REASONS {
|
|
|
998
1379
|
drag,
|
|
999
1380
|
wheel,
|
|
1000
1381
|
scrub,
|
|
1382
|
+
popupClose,
|
|
1001
1383
|
cancelOpen,
|
|
1002
1384
|
siblingOpen,
|
|
1003
1385
|
disabled,
|
|
@@ -1054,7 +1436,7 @@ declare interface ReasonToEventMap {
|
|
|
1054
1436
|
|
|
1055
1437
|
declare type ReferenceType = Element | VirtualElement;
|
|
1056
1438
|
|
|
1057
|
-
declare const scrub:
|
|
1439
|
+
declare const scrub: 'scrub';
|
|
1058
1440
|
|
|
1059
1441
|
declare type Selectors = typeof selectors_2;
|
|
1060
1442
|
|
|
@@ -1068,18 +1450,6 @@ declare const selectors: {
|
|
|
1068
1450
|
};
|
|
1069
1451
|
|
|
1070
1452
|
declare const selectors_2: {
|
|
1071
|
-
disabled: (state: State<unknown>) => boolean;
|
|
1072
|
-
instantType: (state: State<unknown>) => "click" | "focus" | "dismiss" | "trigger-change" | undefined;
|
|
1073
|
-
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
1074
|
-
openChangeReason: (state: State<unknown>) => PopoverRootChangeEventReason_2 | null;
|
|
1075
|
-
modal: (state: State<unknown>) => boolean | "trap-focus";
|
|
1076
|
-
focusManagerModal: (state: State<unknown>) => boolean;
|
|
1077
|
-
stickIfOpen: (state: State<unknown>) => boolean;
|
|
1078
|
-
titleElementId: (state: State<unknown>) => string | undefined;
|
|
1079
|
-
descriptionElementId: (state: State<unknown>) => string | undefined;
|
|
1080
|
-
openOnHover: (state: State<unknown>) => boolean;
|
|
1081
|
-
closeDelay: (state: State<unknown>) => number;
|
|
1082
|
-
hasViewport: (state: State<unknown>) => boolean;
|
|
1083
1453
|
open: (state: {
|
|
1084
1454
|
open: boolean;
|
|
1085
1455
|
readonly openProp: boolean | undefined;
|
|
@@ -1092,6 +1462,7 @@ declare const selectors_2: {
|
|
|
1092
1462
|
payload: unknown;
|
|
1093
1463
|
activeTriggerId: string | null;
|
|
1094
1464
|
activeTriggerElement: Element | null;
|
|
1465
|
+
openedWithoutTrigger: boolean;
|
|
1095
1466
|
readonly triggerIdProp: string | null | undefined;
|
|
1096
1467
|
popupElement: HTMLElement | null;
|
|
1097
1468
|
positionerElement: HTMLElement | null;
|
|
@@ -1111,6 +1482,7 @@ declare const selectors_2: {
|
|
|
1111
1482
|
payload: unknown;
|
|
1112
1483
|
activeTriggerId: string | null;
|
|
1113
1484
|
activeTriggerElement: Element | null;
|
|
1485
|
+
openedWithoutTrigger: boolean;
|
|
1114
1486
|
readonly triggerIdProp: string | null | undefined;
|
|
1115
1487
|
popupElement: HTMLElement | null;
|
|
1116
1488
|
positionerElement: HTMLElement | null;
|
|
@@ -1130,6 +1502,7 @@ declare const selectors_2: {
|
|
|
1130
1502
|
payload: unknown;
|
|
1131
1503
|
activeTriggerId: string | null;
|
|
1132
1504
|
activeTriggerElement: Element | null;
|
|
1505
|
+
openedWithoutTrigger: boolean;
|
|
1133
1506
|
readonly triggerIdProp: string | null | undefined;
|
|
1134
1507
|
popupElement: HTMLElement | null;
|
|
1135
1508
|
positionerElement: HTMLElement | null;
|
|
@@ -1149,6 +1522,7 @@ declare const selectors_2: {
|
|
|
1149
1522
|
payload: unknown;
|
|
1150
1523
|
activeTriggerId: string | null;
|
|
1151
1524
|
activeTriggerElement: Element | null;
|
|
1525
|
+
openedWithoutTrigger: boolean;
|
|
1152
1526
|
readonly triggerIdProp: string | null | undefined;
|
|
1153
1527
|
popupElement: HTMLElement | null;
|
|
1154
1528
|
positionerElement: HTMLElement | null;
|
|
@@ -1168,6 +1542,7 @@ declare const selectors_2: {
|
|
|
1168
1542
|
payload: unknown;
|
|
1169
1543
|
activeTriggerId: string | null;
|
|
1170
1544
|
activeTriggerElement: Element | null;
|
|
1545
|
+
openedWithoutTrigger: boolean;
|
|
1171
1546
|
readonly triggerIdProp: string | null | undefined;
|
|
1172
1547
|
popupElement: HTMLElement | null;
|
|
1173
1548
|
positionerElement: HTMLElement | null;
|
|
@@ -1187,6 +1562,7 @@ declare const selectors_2: {
|
|
|
1187
1562
|
payload: unknown;
|
|
1188
1563
|
activeTriggerId: string | null;
|
|
1189
1564
|
activeTriggerElement: Element | null;
|
|
1565
|
+
openedWithoutTrigger: boolean;
|
|
1190
1566
|
readonly triggerIdProp: string | null | undefined;
|
|
1191
1567
|
popupElement: HTMLElement | null;
|
|
1192
1568
|
positionerElement: HTMLElement | null;
|
|
@@ -1206,6 +1582,7 @@ declare const selectors_2: {
|
|
|
1206
1582
|
payload: unknown;
|
|
1207
1583
|
activeTriggerId: string | null;
|
|
1208
1584
|
activeTriggerElement: Element | null;
|
|
1585
|
+
openedWithoutTrigger: boolean;
|
|
1209
1586
|
readonly triggerIdProp: string | null | undefined;
|
|
1210
1587
|
popupElement: HTMLElement | null;
|
|
1211
1588
|
positionerElement: HTMLElement | null;
|
|
@@ -1225,6 +1602,7 @@ declare const selectors_2: {
|
|
|
1225
1602
|
payload: unknown;
|
|
1226
1603
|
activeTriggerId: string | null;
|
|
1227
1604
|
activeTriggerElement: Element | null;
|
|
1605
|
+
openedWithoutTrigger: boolean;
|
|
1228
1606
|
readonly triggerIdProp: string | null | undefined;
|
|
1229
1607
|
popupElement: HTMLElement | null;
|
|
1230
1608
|
positionerElement: HTMLElement | null;
|
|
@@ -1244,6 +1622,7 @@ declare const selectors_2: {
|
|
|
1244
1622
|
payload: unknown;
|
|
1245
1623
|
activeTriggerId: string | null;
|
|
1246
1624
|
activeTriggerElement: Element | null;
|
|
1625
|
+
openedWithoutTrigger: boolean;
|
|
1247
1626
|
readonly triggerIdProp: string | null | undefined;
|
|
1248
1627
|
popupElement: HTMLElement | null;
|
|
1249
1628
|
positionerElement: HTMLElement | null;
|
|
@@ -1263,6 +1642,7 @@ declare const selectors_2: {
|
|
|
1263
1642
|
payload: unknown;
|
|
1264
1643
|
activeTriggerId: string | null;
|
|
1265
1644
|
activeTriggerElement: Element | null;
|
|
1645
|
+
openedWithoutTrigger: boolean;
|
|
1266
1646
|
readonly triggerIdProp: string | null | undefined;
|
|
1267
1647
|
popupElement: HTMLElement | null;
|
|
1268
1648
|
positionerElement: HTMLElement | null;
|
|
@@ -1282,6 +1662,7 @@ declare const selectors_2: {
|
|
|
1282
1662
|
payload: unknown;
|
|
1283
1663
|
activeTriggerId: string | null;
|
|
1284
1664
|
activeTriggerElement: Element | null;
|
|
1665
|
+
openedWithoutTrigger: boolean;
|
|
1285
1666
|
readonly triggerIdProp: string | null | undefined;
|
|
1286
1667
|
popupElement: HTMLElement | null;
|
|
1287
1668
|
positionerElement: HTMLElement | null;
|
|
@@ -1301,6 +1682,7 @@ declare const selectors_2: {
|
|
|
1301
1682
|
payload: unknown;
|
|
1302
1683
|
activeTriggerId: string | null;
|
|
1303
1684
|
activeTriggerElement: Element | null;
|
|
1685
|
+
openedWithoutTrigger: boolean;
|
|
1304
1686
|
readonly triggerIdProp: string | null | undefined;
|
|
1305
1687
|
popupElement: HTMLElement | null;
|
|
1306
1688
|
positionerElement: HTMLElement | null;
|
|
@@ -1320,6 +1702,7 @@ declare const selectors_2: {
|
|
|
1320
1702
|
payload: unknown;
|
|
1321
1703
|
activeTriggerId: string | null;
|
|
1322
1704
|
activeTriggerElement: Element | null;
|
|
1705
|
+
openedWithoutTrigger: boolean;
|
|
1323
1706
|
readonly triggerIdProp: string | null | undefined;
|
|
1324
1707
|
popupElement: HTMLElement | null;
|
|
1325
1708
|
positionerElement: HTMLElement | null;
|
|
@@ -1339,6 +1722,7 @@ declare const selectors_2: {
|
|
|
1339
1722
|
payload: unknown;
|
|
1340
1723
|
activeTriggerId: string | null;
|
|
1341
1724
|
activeTriggerElement: Element | null;
|
|
1725
|
+
openedWithoutTrigger: boolean;
|
|
1342
1726
|
readonly triggerIdProp: string | null | undefined;
|
|
1343
1727
|
popupElement: HTMLElement | null;
|
|
1344
1728
|
positionerElement: HTMLElement | null;
|
|
@@ -1358,6 +1742,7 @@ declare const selectors_2: {
|
|
|
1358
1742
|
payload: unknown;
|
|
1359
1743
|
activeTriggerId: string | null;
|
|
1360
1744
|
activeTriggerElement: Element | null;
|
|
1745
|
+
openedWithoutTrigger: boolean;
|
|
1361
1746
|
readonly triggerIdProp: string | null | undefined;
|
|
1362
1747
|
popupElement: HTMLElement | null;
|
|
1363
1748
|
positionerElement: HTMLElement | null;
|
|
@@ -1377,6 +1762,7 @@ declare const selectors_2: {
|
|
|
1377
1762
|
payload: unknown;
|
|
1378
1763
|
activeTriggerId: string | null;
|
|
1379
1764
|
activeTriggerElement: Element | null;
|
|
1765
|
+
openedWithoutTrigger: boolean;
|
|
1380
1766
|
readonly triggerIdProp: string | null | undefined;
|
|
1381
1767
|
popupElement: HTMLElement | null;
|
|
1382
1768
|
positionerElement: HTMLElement | null;
|
|
@@ -1396,6 +1782,7 @@ declare const selectors_2: {
|
|
|
1396
1782
|
payload: unknown;
|
|
1397
1783
|
activeTriggerId: string | null;
|
|
1398
1784
|
activeTriggerElement: Element | null;
|
|
1785
|
+
openedWithoutTrigger: boolean;
|
|
1399
1786
|
readonly triggerIdProp: string | null | undefined;
|
|
1400
1787
|
popupElement: HTMLElement | null;
|
|
1401
1788
|
positionerElement: HTMLElement | null;
|
|
@@ -1415,6 +1802,7 @@ declare const selectors_2: {
|
|
|
1415
1802
|
payload: unknown;
|
|
1416
1803
|
activeTriggerId: string | null;
|
|
1417
1804
|
activeTriggerElement: Element | null;
|
|
1805
|
+
openedWithoutTrigger: boolean;
|
|
1418
1806
|
readonly triggerIdProp: string | null | undefined;
|
|
1419
1807
|
popupElement: HTMLElement | null;
|
|
1420
1808
|
positionerElement: HTMLElement | null;
|
|
@@ -1422,12 +1810,43 @@ declare const selectors_2: {
|
|
|
1422
1810
|
inactiveTriggerProps: HTMLProps_2;
|
|
1423
1811
|
popupProps: HTMLProps_2;
|
|
1424
1812
|
}) => HTMLElement | null;
|
|
1813
|
+
disabled: (state: State<unknown>) => boolean;
|
|
1814
|
+
instantType: (state: State<unknown>) => "click" | "dismiss" | "focus" | "trigger-change" | undefined;
|
|
1815
|
+
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
1816
|
+
openChangeReason: (state: State<unknown>) => PopoverRootChangeEventReason_2 | null;
|
|
1817
|
+
isPressOpenedByTrigger: (state: State<unknown>, triggerId: string | undefined) => boolean;
|
|
1818
|
+
isTouchPressOpen: (state: State<unknown>, openOnHover: boolean) => boolean;
|
|
1819
|
+
hasTriggerFocusGuards: (state: State<unknown>, triggerId: string | undefined) => boolean;
|
|
1820
|
+
modal: (state: State<unknown>) => "trap-focus" | boolean;
|
|
1821
|
+
titleElementId: (state: State<unknown>) => string | undefined;
|
|
1822
|
+
descriptionElementId: (state: State<unknown>) => string | undefined;
|
|
1823
|
+
openOnHover: (state: State<unknown>) => boolean;
|
|
1824
|
+
closeDelay: (state: State<unknown>) => number;
|
|
1825
|
+
adaptiveOrigin: (state: State<unknown>) => AdaptiveOriginMiddleware | undefined;
|
|
1425
1826
|
};
|
|
1426
1827
|
|
|
1427
|
-
declare const siblingOpen:
|
|
1828
|
+
declare const siblingOpen: 'sibling-open';
|
|
1428
1829
|
|
|
1429
1830
|
declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
1430
1831
|
|
|
1832
|
+
/**
|
|
1833
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1834
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
1835
|
+
*/
|
|
1836
|
+
declare const side = "data-side";
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1840
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
1841
|
+
*/
|
|
1842
|
+
declare const side_2 = "data-side";
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* Indicates which side the popup is positioned relative to the trigger.
|
|
1846
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
|
|
1847
|
+
*/
|
|
1848
|
+
declare const side_3 = "data-side";
|
|
1849
|
+
|
|
1431
1850
|
declare interface SideFlipMode {
|
|
1432
1851
|
/**
|
|
1433
1852
|
* How to avoid collisions on the side axis.
|
|
@@ -1475,6 +1894,16 @@ declare interface SideShiftMode {
|
|
|
1475
1894
|
fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
|
|
1476
1895
|
}
|
|
1477
1896
|
|
|
1897
|
+
/**
|
|
1898
|
+
* Present when the popup begins animating in.
|
|
1899
|
+
*/
|
|
1900
|
+
declare const startingStyle = "data-starting-style";
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* Present when the popup begins animating in.
|
|
1904
|
+
*/
|
|
1905
|
+
declare const startingStyle_2 = "data-starting-style";
|
|
1906
|
+
|
|
1478
1907
|
declare type State<Payload> = PopupStoreState<Payload> & {
|
|
1479
1908
|
disabled: boolean;
|
|
1480
1909
|
instantType: 'dismiss' | 'click' | 'focus' | 'trigger-change' | undefined;
|
|
@@ -1482,28 +1911,42 @@ declare type State<Payload> = PopupStoreState<Payload> & {
|
|
|
1482
1911
|
focusManagerModal: boolean;
|
|
1483
1912
|
openMethod: InteractionType | null;
|
|
1484
1913
|
openChangeReason: PopoverRoot.ChangeEventReason | null;
|
|
1485
|
-
stickIfOpen: boolean;
|
|
1486
|
-
nested: boolean;
|
|
1487
1914
|
titleElementId: string | undefined;
|
|
1488
1915
|
descriptionElementId: string | undefined;
|
|
1489
1916
|
openOnHover: boolean;
|
|
1490
1917
|
closeDelay: number;
|
|
1491
|
-
|
|
1918
|
+
adaptiveOrigin: AdaptiveOriginMiddleware | undefined;
|
|
1492
1919
|
};
|
|
1493
1920
|
|
|
1494
|
-
declare const swipe:
|
|
1921
|
+
declare const swipe: 'swipe';
|
|
1922
|
+
|
|
1923
|
+
declare const trackPress: 'track-press';
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* The coordinates that this element is anchored to. Used for animations and transitions.
|
|
1927
|
+
* @type {string}
|
|
1928
|
+
*/
|
|
1929
|
+
declare const transformOrigin = "--transform-origin";
|
|
1495
1930
|
|
|
1496
|
-
|
|
1931
|
+
/**
|
|
1932
|
+
* Indicates that the viewport is currently transitioning between old and new content.
|
|
1933
|
+
*/
|
|
1934
|
+
declare const transitioning = "data-transitioning";
|
|
1497
1935
|
|
|
1498
1936
|
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
1499
1937
|
|
|
1500
1938
|
declare function Trigger<Payload = unknown>({ className, ...props }: WithStringClassName<Popover_2.Trigger.Props<Payload>> & React_2.RefAttributes<HTMLElement>): JSX_2.Element;
|
|
1501
1939
|
|
|
1502
|
-
declare const triggerFocus:
|
|
1940
|
+
declare const triggerFocus: 'trigger-focus';
|
|
1503
1941
|
|
|
1504
|
-
declare const triggerHover:
|
|
1942
|
+
declare const triggerHover: 'trigger-hover';
|
|
1505
1943
|
|
|
1506
|
-
declare const triggerPress:
|
|
1944
|
+
declare const triggerPress: 'trigger-press';
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* Present when the popover arrow is uncentered.
|
|
1948
|
+
*/
|
|
1949
|
+
declare const uncentered = "data-uncentered";
|
|
1507
1950
|
|
|
1508
1951
|
declare interface UseAnchorPositioningSharedParameters {
|
|
1509
1952
|
/**
|
|
@@ -1647,33 +2090,9 @@ declare interface UseAnchorPositioningSharedParameters {
|
|
|
1647
2090
|
collisionAvoidance?: CollisionAvoidance | undefined;
|
|
1648
2091
|
}
|
|
1649
2092
|
|
|
1650
|
-
declare
|
|
1651
|
-
ref?: React_2.Ref<HTMLDivElement> | undefined;
|
|
1652
|
-
container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
|
|
1653
|
-
componentProps?: UseRenderElementComponentProps<any> | undefined;
|
|
1654
|
-
elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
declare interface UseRenderElementComponentProps<State> {
|
|
1658
|
-
/**
|
|
1659
|
-
* The class name to apply to the rendered element.
|
|
1660
|
-
* Can be a string or a function that accepts the state and returns a string.
|
|
1661
|
-
*/
|
|
1662
|
-
className?: string | ((state: State) => string | undefined) | undefined;
|
|
1663
|
-
/**
|
|
1664
|
-
* The render prop or React element to override the default element.
|
|
1665
|
-
*/
|
|
1666
|
-
render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
|
|
1667
|
-
/**
|
|
1668
|
-
* The style to apply to the rendered element.
|
|
1669
|
-
* Can be a style object or a function that accepts the state and returns a style object.
|
|
1670
|
-
*/
|
|
1671
|
-
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
declare const wheel: "wheel";
|
|
2093
|
+
declare const wheel: 'wheel';
|
|
1675
2094
|
|
|
1676
|
-
declare const windowResize:
|
|
2095
|
+
declare const windowResize: 'window-resize';
|
|
1677
2096
|
|
|
1678
2097
|
/**
|
|
1679
2098
|
* Adds a `preventBaseUIHandler` method to all event handlers.
|