@wix/site-ui 1.347.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
|
@@ -5,17 +5,19 @@ import { AlertDialogPopupProps as AlertDialogPopupProps_2 } from '@base-ui/react
|
|
|
5
5
|
import { AlertDialogPortalProps as AlertDialogPortalProps_2 } from '@base-ui/react';
|
|
6
6
|
import { AlertDialogTitleProps as AlertDialogTitleProps_2 } from '@base-ui/react';
|
|
7
7
|
import { AlertDialogViewportProps as AlertDialogViewportProps_2 } from '@base-ui/react';
|
|
8
|
-
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.
|
|
9
|
-
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.
|
|
10
|
-
import { HTMLProps as HTMLProps_2 } from '../../index.
|
|
11
|
-
import { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
8
|
+
import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.mjs';
|
|
9
|
+
import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.mjs';
|
|
10
|
+
import { HTMLProps as HTMLProps_2 } from '../../index.mjs';
|
|
11
|
+
import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
12
12
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
13
13
|
import * as React_2 from 'react';
|
|
14
14
|
import { ReactStore } from '@base-ui/utils/store';
|
|
15
|
-
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.
|
|
15
|
+
import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
|
|
16
16
|
import type { UseFloatingReturn } from '@floating-ui/react-dom';
|
|
17
17
|
import type { VirtualElement } from '@floating-ui/react-dom';
|
|
18
18
|
|
|
19
|
+
declare const activeTriggerIdSelector: (state: S) => string | null;
|
|
20
|
+
|
|
19
21
|
export declare const AlertDialog: {
|
|
20
22
|
Backdrop: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<AlertDialogBackdropProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
21
23
|
className?: string;
|
|
@@ -58,6 +60,15 @@ export declare namespace AlertDialog_2 {
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
export declare namespace AlertDialogBackdropDataAttributes {
|
|
64
|
+
export {
|
|
65
|
+
open_2 as open,
|
|
66
|
+
closed_2 as closed,
|
|
67
|
+
startingStyle,
|
|
68
|
+
endingStyle
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
export declare interface AlertDialogBackdropProps extends BaseUIComponentProps<'div', AlertDialogBackdropState> {
|
|
62
73
|
/**
|
|
63
74
|
* Whether the backdrop is forced to render even when nested.
|
|
@@ -77,6 +88,12 @@ export declare interface AlertDialogBackdropState {
|
|
|
77
88
|
transitionStatus: TransitionStatus;
|
|
78
89
|
}
|
|
79
90
|
|
|
91
|
+
export declare namespace AlertDialogCloseDataAttributes {
|
|
92
|
+
export {
|
|
93
|
+
disabled_2 as disabled
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
80
97
|
export declare interface AlertDialogCloseProps extends NativeButtonProps, BaseUIComponentProps<'button', AlertDialogCloseState> {}
|
|
81
98
|
|
|
82
99
|
export declare interface AlertDialogCloseState {
|
|
@@ -91,22 +108,45 @@ export declare interface AlertDialogDescriptionProps extends BaseUIComponentProp
|
|
|
91
108
|
export declare interface AlertDialogDescriptionState {}
|
|
92
109
|
|
|
93
110
|
/**
|
|
94
|
-
*
|
|
111
|
+
* Controls an Alert Dialog imperatively and associates detached `AlertDialog.Trigger` components with
|
|
112
|
+
* an `AlertDialog.Root`. Create one with `AlertDialog.createHandle()` and pass it to the `handle`
|
|
113
|
+
* prop of the root and of any triggers rendered outside of it.
|
|
114
|
+
*
|
|
115
|
+
* The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
116
|
+
* before a root attaches (or after it unmounts) are ignored.
|
|
95
117
|
*/
|
|
96
118
|
declare class AlertDialogHandle<Payload> extends DialogHandle<Payload> {
|
|
97
119
|
private readonly __alertDialogBrand;
|
|
98
|
-
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare namespace AlertDialogPopupCssVariables {
|
|
123
|
+
export {
|
|
124
|
+
nestedDialogs
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export declare namespace AlertDialogPopupDataAttributes {
|
|
129
|
+
export {
|
|
130
|
+
open_3 as open,
|
|
131
|
+
closed_3 as closed,
|
|
132
|
+
startingStyle_2 as startingStyle,
|
|
133
|
+
endingStyle_2 as endingStyle,
|
|
134
|
+
nested,
|
|
135
|
+
nestedDialogOpen
|
|
136
|
+
}
|
|
99
137
|
}
|
|
100
138
|
|
|
101
139
|
export declare interface AlertDialogPopupProps extends BaseUIComponentProps<'div', AlertDialogPopupState> {
|
|
102
140
|
/**
|
|
103
141
|
* Determines the element to focus when the dialog is opened.
|
|
142
|
+
* By default, focus moves to the first tabbable element inside the popup, except when the dialog
|
|
143
|
+
* is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard.
|
|
104
144
|
*
|
|
105
145
|
* - `false`: Do not move focus.
|
|
106
146
|
* - `true`: Move focus based on the default behavior (first tabbable element or popup).
|
|
107
147
|
* - `RefObject`: Move focus to the ref element.
|
|
108
148
|
* - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
|
|
109
|
-
* Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
|
|
149
|
+
* 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.
|
|
110
150
|
*/
|
|
111
151
|
initialFocus?: boolean | React_2.RefObject<HTMLElement | null> | ((openType: InteractionType) => boolean | HTMLElement | null | void) | undefined;
|
|
112
152
|
/**
|
|
@@ -116,7 +156,7 @@ export declare interface AlertDialogPopupProps extends BaseUIComponentProps<'div
|
|
|
116
156
|
* - `true`: Move focus based on the default behavior (trigger or previously focused element).
|
|
117
157
|
* - `RefObject`: Move focus to the ref element.
|
|
118
158
|
* - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
|
|
119
|
-
* Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
|
|
159
|
+
* 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.
|
|
120
160
|
*/
|
|
121
161
|
finalFocus?: boolean | React_2.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void) | undefined;
|
|
122
162
|
}
|
|
@@ -140,7 +180,7 @@ export declare interface AlertDialogPopupState {
|
|
|
140
180
|
nestedDialogOpen: boolean;
|
|
141
181
|
}
|
|
142
182
|
|
|
143
|
-
export declare interface AlertDialogPortalProps extends
|
|
183
|
+
export declare interface AlertDialogPortalProps extends BaseUIComponentProps<'div', AlertDialogPortalState> {
|
|
144
184
|
/**
|
|
145
185
|
* Whether to keep the portal mounted in the DOM while the popup is hidden.
|
|
146
186
|
* @default false
|
|
@@ -149,7 +189,7 @@ export declare interface AlertDialogPortalProps extends FloatingPortal.Props<Ale
|
|
|
149
189
|
/**
|
|
150
190
|
* A parent element to render the portal element into.
|
|
151
191
|
*/
|
|
152
|
-
container?:
|
|
192
|
+
container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
|
|
153
193
|
}
|
|
154
194
|
|
|
155
195
|
export declare interface AlertDialogPortalState {}
|
|
@@ -160,7 +200,7 @@ export declare interface AlertDialogPortalState {}
|
|
|
160
200
|
*
|
|
161
201
|
* Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)
|
|
162
202
|
*/
|
|
163
|
-
export declare function AlertDialogRoot<Payload>(props: AlertDialogRoot.Props<Payload>):
|
|
203
|
+
export declare function AlertDialogRoot<Payload>(props: AlertDialogRoot.Props<Payload>): React_2.JSX.Element;
|
|
164
204
|
|
|
165
205
|
export declare namespace AlertDialogRoot {
|
|
166
206
|
export type State = AlertDialogRootState;
|
|
@@ -173,7 +213,8 @@ export declare namespace AlertDialogRoot {
|
|
|
173
213
|
export declare type AlertDialogRootActions = DialogRoot.Actions;
|
|
174
214
|
|
|
175
215
|
export declare type AlertDialogRootChangeEventDetails = BaseUIChangeEventDetails<AlertDialogRoot.ChangeEventReason> & {
|
|
176
|
-
|
|
216
|
+
/** Prevents the popup from unmounting until the `unmount` action is called. */
|
|
217
|
+
preventUnmountOnClose: () => void;
|
|
177
218
|
};
|
|
178
219
|
|
|
179
220
|
export declare type AlertDialogRootChangeEventReason = DialogRoot.ChangeEventReason;
|
|
@@ -185,9 +226,9 @@ export declare interface AlertDialogRootProps<Payload = unknown> extends Omit<Di
|
|
|
185
226
|
onOpenChange?: ((open: boolean, eventDetails: AlertDialogRoot.ChangeEventDetails) => void) | undefined;
|
|
186
227
|
/**
|
|
187
228
|
* A ref to imperative actions.
|
|
188
|
-
* - `unmount`:
|
|
189
|
-
*
|
|
190
|
-
*
|
|
229
|
+
* - `unmount`: Ends the closing phase of the alert dialog after an externally controlled closing animation finishes.
|
|
230
|
+
* Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the alert dialog completes closing on its own.
|
|
231
|
+
* Whether it leaves the DOM is decided by `keepMounted` on the portal.
|
|
191
232
|
* - `close`: Closes the alert dialog imperatively when called.
|
|
192
233
|
*/
|
|
193
234
|
actionsRef?: React_2.RefObject<AlertDialogRoot.Actions | null> | undefined;
|
|
@@ -222,6 +263,13 @@ export declare namespace AlertDialogTrigger {
|
|
|
222
263
|
export type State = AlertDialogTriggerState;
|
|
223
264
|
}
|
|
224
265
|
|
|
266
|
+
export declare namespace AlertDialogTriggerDataAttributes {
|
|
267
|
+
export {
|
|
268
|
+
disabled_3 as disabled,
|
|
269
|
+
popupOpen
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
225
273
|
export declare interface AlertDialogTriggerProps<Payload = unknown> extends Omit<DialogTriggerProps<Payload>, 'handle'> {
|
|
226
274
|
/**
|
|
227
275
|
* A handle to associate the trigger with an alert dialog.
|
|
@@ -232,6 +280,17 @@ export declare interface AlertDialogTriggerProps<Payload = unknown> extends Omit
|
|
|
232
280
|
|
|
233
281
|
export declare interface AlertDialogTriggerState extends DialogTriggerState {}
|
|
234
282
|
|
|
283
|
+
export declare namespace AlertDialogViewportDataAttributes {
|
|
284
|
+
export {
|
|
285
|
+
open_4 as open,
|
|
286
|
+
closed_4 as closed,
|
|
287
|
+
startingStyle_3 as startingStyle,
|
|
288
|
+
endingStyle_3 as endingStyle,
|
|
289
|
+
nested_2 as nested,
|
|
290
|
+
nestedDialogOpen_2 as nestedDialogOpen
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
235
294
|
export declare interface AlertDialogViewportProps extends BaseUIComponentProps<'div', AlertDialogViewportState> {}
|
|
236
295
|
|
|
237
296
|
export declare interface AlertDialogViewportState {
|
|
@@ -253,6 +312,79 @@ export declare interface AlertDialogViewportState {
|
|
|
253
312
|
nestedDialogOpen: boolean;
|
|
254
313
|
}
|
|
255
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Shared implementation for popup handles that coordinate detached triggers with a mounted root.
|
|
317
|
+
*
|
|
318
|
+
* Subclasses provide the component-specific imperative methods, while this base class owns the
|
|
319
|
+
* fallback store, root store attachment stack, subscriber notifications, and development warning for
|
|
320
|
+
* overlapping roots.
|
|
321
|
+
*
|
|
322
|
+
* @template HandleStore Store shape exposed to detached triggers.
|
|
323
|
+
* @template Store Root-owned store attached by the component root.
|
|
324
|
+
*/
|
|
325
|
+
declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
|
|
326
|
+
protected readonly fallbackStore: HandleStore;
|
|
327
|
+
private readonly componentName;
|
|
328
|
+
private readonly throwOnMissingTrigger;
|
|
329
|
+
/**
|
|
330
|
+
* Stores of every root currently using this handle, in attach order. A handle is meant to be used
|
|
331
|
+
* by a single mounted root, but roots can transiently overlap (e.g. during an animated route
|
|
332
|
+
* transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
|
|
333
|
+
* leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
|
|
334
|
+
*/
|
|
335
|
+
private readonly attachedStores;
|
|
336
|
+
/**
|
|
337
|
+
* Store of the root that currently controls the handle: the most recently attached one still
|
|
338
|
+
* mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
|
|
339
|
+
*/
|
|
340
|
+
private attachedStoreValue;
|
|
341
|
+
/**
|
|
342
|
+
* Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
|
|
343
|
+
*/
|
|
344
|
+
private readonly storeListeners;
|
|
345
|
+
/**
|
|
346
|
+
* Creates a handle backed by the store used while no root is attached.
|
|
347
|
+
*
|
|
348
|
+
* @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
|
|
349
|
+
* so they can render and register without a mounted root. Triggers register into whichever store
|
|
350
|
+
* `store` currently resolves to, so while detached they live in this store's trigger map and
|
|
351
|
+
* migrate themselves to the root's store (and back) as it attaches/detaches.
|
|
352
|
+
* @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
|
|
353
|
+
* `MenuHandle.open()` in warning text.
|
|
354
|
+
* @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
|
|
355
|
+
* registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
|
|
356
|
+
* so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
|
|
357
|
+
*/
|
|
358
|
+
constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
|
|
359
|
+
protected get attachedStore(): Store | null;
|
|
360
|
+
/**
|
|
361
|
+
* Sets the store that currently controls the handle and notifies subscribers when it changes, so
|
|
362
|
+
* detached triggers re-render and migrate their registration to the new store.
|
|
363
|
+
*/
|
|
364
|
+
private setActiveStore;
|
|
365
|
+
/**
|
|
366
|
+
* Opens the attached root's store and associates it with the trigger with the given id, or a
|
|
367
|
+
* no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
|
|
368
|
+
* `open()` method, which only narrows the parameter type.
|
|
369
|
+
*
|
|
370
|
+
* When a trigger id is given but no matching trigger is registered, anchored popups throw (see
|
|
371
|
+
* `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
|
|
372
|
+
*
|
|
373
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
374
|
+
*
|
|
375
|
+
* @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
|
|
376
|
+
* without associating any trigger.
|
|
377
|
+
*/
|
|
378
|
+
protected openByTrigger(triggerId: string | null | undefined): void;
|
|
379
|
+
/**
|
|
380
|
+
* Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
|
|
381
|
+
* while no root is attached. Shared by every concrete handle's public `close()` method.
|
|
382
|
+
*
|
|
383
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
384
|
+
*/
|
|
385
|
+
protected closePopup(): void;
|
|
386
|
+
}
|
|
387
|
+
|
|
256
388
|
declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
257
389
|
/**
|
|
258
390
|
* The reason for the event.
|
|
@@ -318,15 +450,30 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
|
|
|
318
450
|
readonly baseUIHandlerPrevented?: boolean | undefined;
|
|
319
451
|
};
|
|
320
452
|
|
|
321
|
-
declare const cancelOpen:
|
|
453
|
+
declare const cancelOpen: 'cancel-open';
|
|
454
|
+
|
|
455
|
+
declare const chipRemovePress: 'chip-remove-press';
|
|
456
|
+
|
|
457
|
+
declare const clearPress: 'clear-press';
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Present when the dialog is closed.
|
|
461
|
+
*/
|
|
462
|
+
declare const closed_2 = "data-closed";
|
|
322
463
|
|
|
323
|
-
|
|
464
|
+
/**
|
|
465
|
+
* Present when the dialog is closed.
|
|
466
|
+
*/
|
|
467
|
+
declare const closed_3 = "data-closed";
|
|
324
468
|
|
|
325
|
-
|
|
469
|
+
/**
|
|
470
|
+
* Present when the dialog is closed.
|
|
471
|
+
*/
|
|
472
|
+
declare const closed_4 = "data-closed";
|
|
326
473
|
|
|
327
|
-
declare const closePress:
|
|
474
|
+
declare const closePress: 'close-press';
|
|
328
475
|
|
|
329
|
-
declare const closeWatcher:
|
|
476
|
+
declare const closeWatcher: 'close-watcher';
|
|
330
477
|
|
|
331
478
|
/**
|
|
332
479
|
* Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
|
|
@@ -342,7 +489,6 @@ declare type Context = PopupStoreContext<DialogRoot.ChangeEventDetails> & {
|
|
|
342
489
|
readonly internalBackdropRef: React_2.RefObject<HTMLDivElement | null>;
|
|
343
490
|
readonly outsidePressEnabledRef: React_2.MutableRefObject<boolean>;
|
|
344
491
|
readonly onNestedDialogOpen?: ((dialogCount: number, drawerCount: number) => void) | undefined;
|
|
345
|
-
readonly onNestedDialogClose?: (() => void) | undefined;
|
|
346
492
|
};
|
|
347
493
|
|
|
348
494
|
declare interface ContextData {
|
|
@@ -351,9 +497,12 @@ declare interface ContextData {
|
|
|
351
497
|
[key: string]: any;
|
|
352
498
|
}
|
|
353
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Creates a new handle to connect an AlertDialog.Root with detached AlertDialog.Trigger components.
|
|
502
|
+
*/
|
|
354
503
|
declare function createAlertDialogHandle<Payload>(): AlertDialogHandle<Payload>;
|
|
355
504
|
|
|
356
|
-
declare const decrementPress:
|
|
505
|
+
declare const decrementPress: 'decrement-press';
|
|
357
506
|
|
|
358
507
|
/**
|
|
359
508
|
* An overlay displayed beneath the popup.
|
|
@@ -395,41 +544,51 @@ declare namespace DialogDescription {
|
|
|
395
544
|
}
|
|
396
545
|
|
|
397
546
|
/**
|
|
398
|
-
*
|
|
547
|
+
* Controls a Dialog imperatively and associates detached `Dialog.Trigger` components with a
|
|
548
|
+
* `Dialog.Root`. Create one with `Dialog.createHandle()` and pass it to the `handle` prop of the
|
|
549
|
+
* root and of any triggers rendered outside of it.
|
|
550
|
+
*
|
|
551
|
+
* The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
552
|
+
* before a root attaches (or after it unmounts) are ignored.
|
|
399
553
|
*/
|
|
400
|
-
declare class DialogHandle<Payload> {
|
|
401
|
-
|
|
402
|
-
* Internal store holding the dialog state.
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
readonly store: DialogStore<Payload>;
|
|
406
|
-
constructor(store?: DialogStore<Payload>);
|
|
554
|
+
declare class DialogHandle<Payload> extends BasePopupHandle<DialogHandleStore<Payload>, DialogStore<Payload>> {
|
|
555
|
+
constructor();
|
|
407
556
|
/**
|
|
408
|
-
* Opens the dialog
|
|
409
|
-
* The trigger, if provided, must be a matching Trigger component with this handle passed as a prop.
|
|
557
|
+
* Opens the dialog, optionally associating it with a trigger.
|
|
410
558
|
*
|
|
411
559
|
* This method should only be called in an event handler or an effect (not during rendering).
|
|
412
560
|
*
|
|
413
|
-
* @param triggerId ID of the trigger to associate with the dialog.
|
|
561
|
+
* @param triggerId ID of the trigger to associate with the dialog. The trigger must be a matching
|
|
562
|
+
* `Dialog.Trigger` with this handle passed as a prop. Pass `null` to open without associating any trigger.
|
|
414
563
|
*/
|
|
415
564
|
open(triggerId: string | null): void;
|
|
416
565
|
/**
|
|
417
|
-
* Opens the dialog
|
|
418
|
-
*
|
|
566
|
+
* Opens the dialog with the given payload, without associating it with any trigger.
|
|
567
|
+
*
|
|
568
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
419
569
|
*
|
|
420
|
-
* @param payload Payload to set when opening the dialog.
|
|
570
|
+
* @param payload Payload to set when opening the dialog. It is exposed to the root's render-prop children.
|
|
421
571
|
*/
|
|
422
572
|
openWithPayload(payload: Payload): void;
|
|
423
573
|
/**
|
|
424
574
|
* Closes the dialog.
|
|
575
|
+
*
|
|
576
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
425
577
|
*/
|
|
426
578
|
close(): void;
|
|
427
579
|
/**
|
|
428
|
-
*
|
|
580
|
+
* Whether the dialog is currently open. Returns `false` while no root is attached to the handle.
|
|
429
581
|
*/
|
|
430
582
|
get isOpen(): boolean;
|
|
431
583
|
}
|
|
432
584
|
|
|
585
|
+
/**
|
|
586
|
+
* The subset of `DialogStore` that detached handle-backed triggers rely on. Both the real
|
|
587
|
+
* `DialogStore` and the inert fallback store satisfy it, so a trigger can read from whichever
|
|
588
|
+
* store the handle currently exposes.
|
|
589
|
+
*/
|
|
590
|
+
declare type DialogHandleStore<Payload> = PopupTriggerDataStore<State<Payload>>;
|
|
591
|
+
|
|
433
592
|
/**
|
|
434
593
|
* A container for the dialog contents.
|
|
435
594
|
* Renders a `<div>` element.
|
|
@@ -463,7 +622,7 @@ declare namespace DialogPortal {
|
|
|
463
622
|
*
|
|
464
623
|
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
465
624
|
*/
|
|
466
|
-
declare
|
|
625
|
+
declare const DialogRoot: <Payload>(props: DialogRoot.Props<Payload>) => React_2.JSX.Element;
|
|
467
626
|
|
|
468
627
|
declare namespace DialogRoot {
|
|
469
628
|
type State = DialogRootState;
|
|
@@ -479,7 +638,8 @@ declare interface DialogRootActions {
|
|
|
479
638
|
}
|
|
480
639
|
|
|
481
640
|
declare type DialogRootChangeEventDetails = BaseUIChangeEventDetails<DialogRoot.ChangeEventReason> & {
|
|
482
|
-
|
|
641
|
+
/** Prevents the popup from unmounting until the `unmount` action is called. */
|
|
642
|
+
preventUnmountOnClose: () => void;
|
|
483
643
|
};
|
|
484
644
|
|
|
485
645
|
declare type DialogRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.closePress | typeof REASONS.focusOut | typeof REASONS.imperativeAction | typeof REASONS.none;
|
|
@@ -516,15 +676,16 @@ declare interface DialogRootProps<Payload = unknown> {
|
|
|
516
676
|
*/
|
|
517
677
|
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
518
678
|
/**
|
|
519
|
-
*
|
|
679
|
+
* Whether to prevent the dialog from closing on outside presses.
|
|
680
|
+
* For non-modal dialogs, this also prevents the dialog from closing when focus moves outside of it.
|
|
520
681
|
* @default false
|
|
521
682
|
*/
|
|
522
683
|
disablePointerDismissal?: boolean | undefined;
|
|
523
684
|
/**
|
|
524
685
|
* A ref to imperative actions.
|
|
525
|
-
* - `unmount`:
|
|
526
|
-
*
|
|
527
|
-
*
|
|
686
|
+
* - `unmount`: Ends the closing phase of the dialog after an externally controlled closing animation finishes.
|
|
687
|
+
* Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the dialog completes closing on its own.
|
|
688
|
+
* Whether it leaves the DOM is decided by `keepMounted` on the portal.
|
|
528
689
|
* - `close`: Closes the dialog imperatively when called.
|
|
529
690
|
*/
|
|
530
691
|
actionsRef?: React_2.RefObject<DialogRoot.Actions | null> | undefined;
|
|
@@ -555,9 +716,8 @@ declare interface DialogRootProps<Payload = unknown> {
|
|
|
555
716
|
declare interface DialogRootState {}
|
|
556
717
|
|
|
557
718
|
declare class DialogStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
|
|
558
|
-
constructor(initialState
|
|
559
|
-
setOpen: (nextOpen: boolean, eventDetails: Omit<DialogRoot.ChangeEventDetails,
|
|
560
|
-
static useStore<Payload>(externalStore: DialogStore<Payload> | undefined, initialState?: Partial<State<Payload>>): DialogStore<Payload>;
|
|
719
|
+
constructor(initialState: Partial<State<Payload>> | undefined, floatingId: string | undefined, nested: boolean);
|
|
720
|
+
setOpen: (nextOpen: boolean, eventDetails: Omit<DialogRoot.ChangeEventDetails, 'preventUnmountOnClose'>) => void;
|
|
561
721
|
}
|
|
562
722
|
|
|
563
723
|
/**
|
|
@@ -592,11 +752,11 @@ declare interface DialogTriggerProps<Payload = unknown> extends NativeButtonProp
|
|
|
592
752
|
|
|
593
753
|
declare interface DialogTriggerState {
|
|
594
754
|
/**
|
|
595
|
-
* Whether the
|
|
755
|
+
* Whether the trigger is currently disabled.
|
|
596
756
|
*/
|
|
597
757
|
disabled: boolean;
|
|
598
758
|
/**
|
|
599
|
-
* Whether the dialog is currently open.
|
|
759
|
+
* Whether the dialog is currently open and was opened by this trigger.
|
|
600
760
|
*/
|
|
601
761
|
open: boolean;
|
|
602
762
|
}
|
|
@@ -614,11 +774,36 @@ declare namespace DialogViewport {
|
|
|
614
774
|
type Props = AlertDialogViewportProps;
|
|
615
775
|
}
|
|
616
776
|
|
|
617
|
-
declare const disabled:
|
|
777
|
+
declare const disabled: 'disabled';
|
|
618
778
|
|
|
619
|
-
|
|
779
|
+
/**
|
|
780
|
+
* Present when the button is disabled.
|
|
781
|
+
*/
|
|
782
|
+
declare const disabled_2 = "data-disabled";
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Present when the trigger is disabled.
|
|
786
|
+
*/
|
|
787
|
+
declare const disabled_3 = "data-disabled";
|
|
788
|
+
|
|
789
|
+
declare const drag: 'drag';
|
|
620
790
|
|
|
621
|
-
|
|
791
|
+
/**
|
|
792
|
+
* Present when the dialog is animating out.
|
|
793
|
+
*/
|
|
794
|
+
declare const endingStyle = "data-ending-style";
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Present when the dialog is animating out.
|
|
798
|
+
*/
|
|
799
|
+
declare const endingStyle_2 = "data-ending-style";
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Present when the dialog is animating out.
|
|
803
|
+
*/
|
|
804
|
+
declare const endingStyle_3 = "data-ending-style";
|
|
805
|
+
|
|
806
|
+
declare const escapeKey: 'escape-key';
|
|
622
807
|
|
|
623
808
|
declare interface ExtendedElements {
|
|
624
809
|
reference: ReferenceType | null;
|
|
@@ -653,31 +838,6 @@ declare interface FloatingEvents {
|
|
|
653
838
|
off(event: string, handler: (data: any) => void): void;
|
|
654
839
|
}
|
|
655
840
|
|
|
656
|
-
/**
|
|
657
|
-
* Portals the floating element into a given container element — by default,
|
|
658
|
-
* outside of the app root and into the body.
|
|
659
|
-
* This is necessary to ensure the floating element can appear outside any
|
|
660
|
-
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
661
|
-
* while retaining its location in the React tree.
|
|
662
|
-
* @see https://floating-ui.com/docs/FloatingPortal
|
|
663
|
-
* @internal
|
|
664
|
-
*/
|
|
665
|
-
declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
666
|
-
renderGuards?: boolean | undefined;
|
|
667
|
-
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
668
|
-
|
|
669
|
-
declare namespace FloatingPortal {
|
|
670
|
-
type State = FloatingPortalState;
|
|
671
|
-
interface Props<TState> extends BaseUIComponentProps<'div', TState> {
|
|
672
|
-
/**
|
|
673
|
-
* A parent element to render the portal element into.
|
|
674
|
-
*/
|
|
675
|
-
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
declare interface FloatingPortalState {}
|
|
680
|
-
|
|
681
841
|
declare type FloatingRootContext = FloatingRootStore;
|
|
682
842
|
|
|
683
843
|
declare interface FloatingRootState {
|
|
@@ -737,37 +897,37 @@ declare interface FloatingRootStoreOptions {
|
|
|
737
897
|
onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
|
|
738
898
|
}
|
|
739
899
|
|
|
740
|
-
declare const focusOut:
|
|
900
|
+
declare const focusOut: 'focus-out';
|
|
741
901
|
|
|
742
902
|
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
743
903
|
ref?: React_2.Ref<T> | undefined;
|
|
744
904
|
};
|
|
745
905
|
|
|
746
|
-
declare const imperativeAction:
|
|
906
|
+
declare const imperativeAction: 'imperative-action';
|
|
747
907
|
|
|
748
|
-
declare const incrementPress:
|
|
908
|
+
declare const incrementPress: 'increment-press';
|
|
749
909
|
|
|
750
|
-
declare const initial:
|
|
910
|
+
declare const initial: 'initial';
|
|
751
911
|
|
|
752
|
-
declare const inputBlur:
|
|
912
|
+
declare const inputBlur: 'input-blur';
|
|
753
913
|
|
|
754
|
-
declare const inputChange:
|
|
914
|
+
declare const inputChange: 'input-change';
|
|
755
915
|
|
|
756
|
-
declare const inputClear:
|
|
916
|
+
declare const inputClear: 'input-clear';
|
|
757
917
|
|
|
758
|
-
declare const inputPaste:
|
|
918
|
+
declare const inputPaste: 'input-paste';
|
|
759
919
|
|
|
760
|
-
declare const inputPress:
|
|
920
|
+
declare const inputPress: 'input-press';
|
|
761
921
|
|
|
762
|
-
declare const itemPress:
|
|
922
|
+
declare const itemPress: 'item-press';
|
|
763
923
|
|
|
764
|
-
declare const keyboard:
|
|
924
|
+
declare const keyboard: 'keyboard';
|
|
765
925
|
|
|
766
|
-
declare const linkPress:
|
|
926
|
+
declare const linkPress: 'link-press';
|
|
767
927
|
|
|
768
|
-
declare const listNavigation:
|
|
928
|
+
declare const listNavigation: 'list-navigation';
|
|
769
929
|
|
|
770
|
-
declare const missing:
|
|
930
|
+
declare const missing: 'missing';
|
|
771
931
|
|
|
772
932
|
declare type NarrowedElement<T> = T extends Element ? T : Element;
|
|
773
933
|
|
|
@@ -781,15 +941,86 @@ declare interface NativeButtonProps {
|
|
|
781
941
|
nativeButton?: boolean | undefined;
|
|
782
942
|
}
|
|
783
943
|
|
|
784
|
-
|
|
944
|
+
/**
|
|
945
|
+
* Present when the dialog is nested within another dialog.
|
|
946
|
+
*/
|
|
947
|
+
declare const nested = "data-nested";
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Present when the dialog is nested within another dialog.
|
|
951
|
+
*/
|
|
952
|
+
declare const nested_2 = "data-nested";
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Present when the dialog has other open dialogs nested within it.
|
|
956
|
+
*/
|
|
957
|
+
declare const nestedDialogOpen = "data-nested-dialog-open";
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Present when the dialog has other open dialogs nested within it.
|
|
961
|
+
*/
|
|
962
|
+
declare const nestedDialogOpen_2 = "data-nested-dialog-open";
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Indicates how many dialogs are nested within.
|
|
966
|
+
* @type {number}
|
|
967
|
+
*/
|
|
968
|
+
declare const nestedDialogs = "--nested-dialogs";
|
|
969
|
+
|
|
970
|
+
declare const none: 'none';
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Present when the dialog is open.
|
|
974
|
+
*/
|
|
975
|
+
declare const open_2 = "data-open";
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Present when the dialog is open.
|
|
979
|
+
*/
|
|
980
|
+
declare const open_3 = "data-open";
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Present when the dialog is open.
|
|
984
|
+
*/
|
|
985
|
+
declare const open_4 = "data-open";
|
|
986
|
+
|
|
987
|
+
declare const openSelector: (state: S) => boolean;
|
|
785
988
|
|
|
786
|
-
declare const outsidePress:
|
|
989
|
+
declare const outsidePress: 'outside-press';
|
|
787
990
|
|
|
788
991
|
declare type PayloadChildRenderFunction<Payload> = (arg: {
|
|
789
992
|
payload: Payload | undefined;
|
|
790
993
|
}) => React_2.ReactNode;
|
|
791
994
|
|
|
792
|
-
declare const pointer:
|
|
995
|
+
declare const pointer: 'pointer';
|
|
996
|
+
|
|
997
|
+
declare const popupClose: 'popup-close';
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
|
|
1001
|
+
* Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
|
|
1002
|
+
* omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
|
|
1003
|
+
*/
|
|
1004
|
+
declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
|
|
1005
|
+
setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
|
|
1010
|
+
* trigger element by id on both the attached root's store and the fallback store.
|
|
1011
|
+
*/
|
|
1012
|
+
declare interface PopupHandleStoreWithTriggers {
|
|
1013
|
+
readonly context: {
|
|
1014
|
+
readonly triggerElements: PopupTriggerMap;
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
declare const popupIdSelector: (state: S) => string | undefined;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Present when the corresponding alert dialog is open.
|
|
1022
|
+
*/
|
|
1023
|
+
declare const popupOpen = "data-popup-open";
|
|
793
1024
|
|
|
794
1025
|
declare type PopupStoreContext<ChangeEventDetails> = {
|
|
795
1026
|
/**
|
|
@@ -810,6 +1041,41 @@ declare type PopupStoreContext<ChangeEventDetails> = {
|
|
|
810
1041
|
onOpenChangeComplete: ((open: boolean) => void) | undefined;
|
|
811
1042
|
};
|
|
812
1043
|
|
|
1044
|
+
declare type PopupStoreSelectors = typeof popupStoreSelectors;
|
|
1045
|
+
|
|
1046
|
+
declare const popupStoreSelectors: {
|
|
1047
|
+
open: typeof openSelector;
|
|
1048
|
+
mounted: (state: S) => boolean;
|
|
1049
|
+
transitionStatus: (state: S) => TransitionStatus;
|
|
1050
|
+
floatingRootContext: (state: S) => FloatingRootStore;
|
|
1051
|
+
triggerCount: (state: S) => number;
|
|
1052
|
+
preventUnmountingOnClose: (state: S) => boolean;
|
|
1053
|
+
payload: (state: S) => unknown;
|
|
1054
|
+
activeTriggerId: typeof activeTriggerIdSelector;
|
|
1055
|
+
activeTriggerElement: (state: S) => Element | null;
|
|
1056
|
+
popupId: typeof popupIdSelector;
|
|
1057
|
+
/**
|
|
1058
|
+
* Whether the trigger with the given ID was used to open the popup.
|
|
1059
|
+
*/
|
|
1060
|
+
isTriggerActive: (state: S, triggerId: string | undefined) => boolean;
|
|
1061
|
+
/**
|
|
1062
|
+
* Whether the popup is open and was activated by a trigger with the given ID.
|
|
1063
|
+
*/
|
|
1064
|
+
isOpenedByTrigger: (state: S, triggerId: string | undefined) => boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* Whether the popup is mounted and was activated by a trigger with the given ID.
|
|
1067
|
+
*/
|
|
1068
|
+
isMountedByTrigger: (state: S, triggerId: string | undefined) => boolean;
|
|
1069
|
+
triggerProps: (state: S, isActive: boolean) => HTMLProps;
|
|
1070
|
+
/**
|
|
1071
|
+
* Popup id for the trigger that currently owns the open popup.
|
|
1072
|
+
*/
|
|
1073
|
+
triggerPopupId: (state: S, triggerId: string | undefined) => string | undefined;
|
|
1074
|
+
popupProps: (state: S) => HTMLProps;
|
|
1075
|
+
popupElement: (state: S) => HTMLElement | null;
|
|
1076
|
+
positionerElement: (state: S) => HTMLElement | null;
|
|
1077
|
+
};
|
|
1078
|
+
|
|
813
1079
|
/**
|
|
814
1080
|
* State common to all popup stores.
|
|
815
1081
|
*/
|
|
@@ -854,6 +1120,13 @@ declare type PopupStoreState<Payload> = {
|
|
|
854
1120
|
* The currently active trigger DOM element.
|
|
855
1121
|
*/
|
|
856
1122
|
activeTriggerElement: Element | null;
|
|
1123
|
+
/**
|
|
1124
|
+
* Whether the popup is open because of a request that deliberately carried no trigger, such as a
|
|
1125
|
+
* handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
|
|
1126
|
+
* implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
|
|
1127
|
+
* forwarded. Reset by the Root once the popup is effectively closed.
|
|
1128
|
+
*/
|
|
1129
|
+
openedWithoutTrigger: boolean;
|
|
857
1130
|
/**
|
|
858
1131
|
* ID of the trigger (external prop).
|
|
859
1132
|
*/
|
|
@@ -880,14 +1153,20 @@ declare type PopupStoreState<Payload> = {
|
|
|
880
1153
|
popupProps: HTMLProps;
|
|
881
1154
|
};
|
|
882
1155
|
|
|
1156
|
+
/**
|
|
1157
|
+
* The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough
|
|
1158
|
+
* that an inert store can be passed while detached.
|
|
1159
|
+
*/
|
|
1160
|
+
declare type PopupTriggerDataStore<State extends PopupStoreState<unknown>> = Pick<ReactStore<Readonly<State>, PopupStoreContext<never>, PopupStoreSelectors>, PopupTriggerStoreKeys>;
|
|
1161
|
+
|
|
883
1162
|
/**
|
|
884
1163
|
* Data structure to keep track of popup trigger elements by their IDs.
|
|
885
|
-
*
|
|
1164
|
+
*
|
|
1165
|
+
* Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
|
|
1166
|
+
* while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
|
|
886
1167
|
*/
|
|
887
1168
|
declare class PopupTriggerMap {
|
|
888
|
-
private elementsSet;
|
|
889
1169
|
private idMap;
|
|
890
|
-
constructor();
|
|
891
1170
|
/**
|
|
892
1171
|
* Adds a trigger element with the given ID.
|
|
893
1172
|
*
|
|
@@ -924,6 +1203,15 @@ declare class PopupTriggerMap {
|
|
|
924
1203
|
get size(): number;
|
|
925
1204
|
}
|
|
926
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* Store members a detached handle-backed trigger reads or invokes for trigger registration and data
|
|
1208
|
+
* forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
|
|
1209
|
+
* detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
|
|
1210
|
+
* be durable. Component handle-store views Pick these from their concrete store (preserving its
|
|
1211
|
+
* context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
|
|
1212
|
+
*/
|
|
1213
|
+
declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
|
|
1214
|
+
|
|
927
1215
|
declare namespace REASONS {
|
|
928
1216
|
export {
|
|
929
1217
|
none,
|
|
@@ -953,6 +1241,7 @@ declare namespace REASONS {
|
|
|
953
1241
|
drag,
|
|
954
1242
|
wheel,
|
|
955
1243
|
scrub,
|
|
1244
|
+
popupClose,
|
|
956
1245
|
cancelOpen,
|
|
957
1246
|
siblingOpen,
|
|
958
1247
|
disabled,
|
|
@@ -1009,7 +1298,9 @@ declare interface ReasonToEventMap {
|
|
|
1009
1298
|
|
|
1010
1299
|
declare type ReferenceType = Element | VirtualElement;
|
|
1011
1300
|
|
|
1012
|
-
declare
|
|
1301
|
+
declare type S = PopupStoreState<unknown>;
|
|
1302
|
+
|
|
1303
|
+
declare const scrub: 'scrub';
|
|
1013
1304
|
|
|
1014
1305
|
declare const selectors: {
|
|
1015
1306
|
open: (state: FloatingRootState) => boolean;
|
|
@@ -1021,16 +1312,6 @@ declare const selectors: {
|
|
|
1021
1312
|
};
|
|
1022
1313
|
|
|
1023
1314
|
declare const selectors_2: {
|
|
1024
|
-
modal: (state: State<unknown>) => boolean | "trap-focus";
|
|
1025
|
-
nested: (state: State<unknown>) => boolean;
|
|
1026
|
-
nestedOpenDialogCount: (state: State<unknown>) => number;
|
|
1027
|
-
nestedOpenDrawerCount: (state: State<unknown>) => number;
|
|
1028
|
-
disablePointerDismissal: (state: State<unknown>) => boolean;
|
|
1029
|
-
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
1030
|
-
descriptionElementId: (state: State<unknown>) => string | undefined;
|
|
1031
|
-
titleElementId: (state: State<unknown>) => string | undefined;
|
|
1032
|
-
viewportElement: (state: State<unknown>) => HTMLElement | null;
|
|
1033
|
-
role: (state: State<unknown>) => "dialog" | "alertdialog";
|
|
1034
1315
|
open: (state: {
|
|
1035
1316
|
open: boolean;
|
|
1036
1317
|
readonly openProp: boolean | undefined;
|
|
@@ -1043,6 +1324,7 @@ declare const selectors_2: {
|
|
|
1043
1324
|
payload: unknown;
|
|
1044
1325
|
activeTriggerId: string | null;
|
|
1045
1326
|
activeTriggerElement: Element | null;
|
|
1327
|
+
openedWithoutTrigger: boolean;
|
|
1046
1328
|
readonly triggerIdProp: string | null | undefined;
|
|
1047
1329
|
popupElement: HTMLElement | null;
|
|
1048
1330
|
positionerElement: HTMLElement | null;
|
|
@@ -1062,6 +1344,7 @@ declare const selectors_2: {
|
|
|
1062
1344
|
payload: unknown;
|
|
1063
1345
|
activeTriggerId: string | null;
|
|
1064
1346
|
activeTriggerElement: Element | null;
|
|
1347
|
+
openedWithoutTrigger: boolean;
|
|
1065
1348
|
readonly triggerIdProp: string | null | undefined;
|
|
1066
1349
|
popupElement: HTMLElement | null;
|
|
1067
1350
|
positionerElement: HTMLElement | null;
|
|
@@ -1081,6 +1364,7 @@ declare const selectors_2: {
|
|
|
1081
1364
|
payload: unknown;
|
|
1082
1365
|
activeTriggerId: string | null;
|
|
1083
1366
|
activeTriggerElement: Element | null;
|
|
1367
|
+
openedWithoutTrigger: boolean;
|
|
1084
1368
|
readonly triggerIdProp: string | null | undefined;
|
|
1085
1369
|
popupElement: HTMLElement | null;
|
|
1086
1370
|
positionerElement: HTMLElement | null;
|
|
@@ -1100,6 +1384,7 @@ declare const selectors_2: {
|
|
|
1100
1384
|
payload: unknown;
|
|
1101
1385
|
activeTriggerId: string | null;
|
|
1102
1386
|
activeTriggerElement: Element | null;
|
|
1387
|
+
openedWithoutTrigger: boolean;
|
|
1103
1388
|
readonly triggerIdProp: string | null | undefined;
|
|
1104
1389
|
popupElement: HTMLElement | null;
|
|
1105
1390
|
positionerElement: HTMLElement | null;
|
|
@@ -1119,6 +1404,7 @@ declare const selectors_2: {
|
|
|
1119
1404
|
payload: unknown;
|
|
1120
1405
|
activeTriggerId: string | null;
|
|
1121
1406
|
activeTriggerElement: Element | null;
|
|
1407
|
+
openedWithoutTrigger: boolean;
|
|
1122
1408
|
readonly triggerIdProp: string | null | undefined;
|
|
1123
1409
|
popupElement: HTMLElement | null;
|
|
1124
1410
|
positionerElement: HTMLElement | null;
|
|
@@ -1138,6 +1424,7 @@ declare const selectors_2: {
|
|
|
1138
1424
|
payload: unknown;
|
|
1139
1425
|
activeTriggerId: string | null;
|
|
1140
1426
|
activeTriggerElement: Element | null;
|
|
1427
|
+
openedWithoutTrigger: boolean;
|
|
1141
1428
|
readonly triggerIdProp: string | null | undefined;
|
|
1142
1429
|
popupElement: HTMLElement | null;
|
|
1143
1430
|
positionerElement: HTMLElement | null;
|
|
@@ -1157,6 +1444,7 @@ declare const selectors_2: {
|
|
|
1157
1444
|
payload: unknown;
|
|
1158
1445
|
activeTriggerId: string | null;
|
|
1159
1446
|
activeTriggerElement: Element | null;
|
|
1447
|
+
openedWithoutTrigger: boolean;
|
|
1160
1448
|
readonly triggerIdProp: string | null | undefined;
|
|
1161
1449
|
popupElement: HTMLElement | null;
|
|
1162
1450
|
positionerElement: HTMLElement | null;
|
|
@@ -1176,6 +1464,7 @@ declare const selectors_2: {
|
|
|
1176
1464
|
payload: unknown;
|
|
1177
1465
|
activeTriggerId: string | null;
|
|
1178
1466
|
activeTriggerElement: Element | null;
|
|
1467
|
+
openedWithoutTrigger: boolean;
|
|
1179
1468
|
readonly triggerIdProp: string | null | undefined;
|
|
1180
1469
|
popupElement: HTMLElement | null;
|
|
1181
1470
|
positionerElement: HTMLElement | null;
|
|
@@ -1195,6 +1484,7 @@ declare const selectors_2: {
|
|
|
1195
1484
|
payload: unknown;
|
|
1196
1485
|
activeTriggerId: string | null;
|
|
1197
1486
|
activeTriggerElement: Element | null;
|
|
1487
|
+
openedWithoutTrigger: boolean;
|
|
1198
1488
|
readonly triggerIdProp: string | null | undefined;
|
|
1199
1489
|
popupElement: HTMLElement | null;
|
|
1200
1490
|
positionerElement: HTMLElement | null;
|
|
@@ -1214,6 +1504,7 @@ declare const selectors_2: {
|
|
|
1214
1504
|
payload: unknown;
|
|
1215
1505
|
activeTriggerId: string | null;
|
|
1216
1506
|
activeTriggerElement: Element | null;
|
|
1507
|
+
openedWithoutTrigger: boolean;
|
|
1217
1508
|
readonly triggerIdProp: string | null | undefined;
|
|
1218
1509
|
popupElement: HTMLElement | null;
|
|
1219
1510
|
positionerElement: HTMLElement | null;
|
|
@@ -1233,6 +1524,7 @@ declare const selectors_2: {
|
|
|
1233
1524
|
payload: unknown;
|
|
1234
1525
|
activeTriggerId: string | null;
|
|
1235
1526
|
activeTriggerElement: Element | null;
|
|
1527
|
+
openedWithoutTrigger: boolean;
|
|
1236
1528
|
readonly triggerIdProp: string | null | undefined;
|
|
1237
1529
|
popupElement: HTMLElement | null;
|
|
1238
1530
|
positionerElement: HTMLElement | null;
|
|
@@ -1252,6 +1544,7 @@ declare const selectors_2: {
|
|
|
1252
1544
|
payload: unknown;
|
|
1253
1545
|
activeTriggerId: string | null;
|
|
1254
1546
|
activeTriggerElement: Element | null;
|
|
1547
|
+
openedWithoutTrigger: boolean;
|
|
1255
1548
|
readonly triggerIdProp: string | null | undefined;
|
|
1256
1549
|
popupElement: HTMLElement | null;
|
|
1257
1550
|
positionerElement: HTMLElement | null;
|
|
@@ -1271,6 +1564,7 @@ declare const selectors_2: {
|
|
|
1271
1564
|
payload: unknown;
|
|
1272
1565
|
activeTriggerId: string | null;
|
|
1273
1566
|
activeTriggerElement: Element | null;
|
|
1567
|
+
openedWithoutTrigger: boolean;
|
|
1274
1568
|
readonly triggerIdProp: string | null | undefined;
|
|
1275
1569
|
popupElement: HTMLElement | null;
|
|
1276
1570
|
positionerElement: HTMLElement | null;
|
|
@@ -1290,6 +1584,7 @@ declare const selectors_2: {
|
|
|
1290
1584
|
payload: unknown;
|
|
1291
1585
|
activeTriggerId: string | null;
|
|
1292
1586
|
activeTriggerElement: Element | null;
|
|
1587
|
+
openedWithoutTrigger: boolean;
|
|
1293
1588
|
readonly triggerIdProp: string | null | undefined;
|
|
1294
1589
|
popupElement: HTMLElement | null;
|
|
1295
1590
|
positionerElement: HTMLElement | null;
|
|
@@ -1309,6 +1604,7 @@ declare const selectors_2: {
|
|
|
1309
1604
|
payload: unknown;
|
|
1310
1605
|
activeTriggerId: string | null;
|
|
1311
1606
|
activeTriggerElement: Element | null;
|
|
1607
|
+
openedWithoutTrigger: boolean;
|
|
1312
1608
|
readonly triggerIdProp: string | null | undefined;
|
|
1313
1609
|
popupElement: HTMLElement | null;
|
|
1314
1610
|
positionerElement: HTMLElement | null;
|
|
@@ -1328,6 +1624,7 @@ declare const selectors_2: {
|
|
|
1328
1624
|
payload: unknown;
|
|
1329
1625
|
activeTriggerId: string | null;
|
|
1330
1626
|
activeTriggerElement: Element | null;
|
|
1627
|
+
openedWithoutTrigger: boolean;
|
|
1331
1628
|
readonly triggerIdProp: string | null | undefined;
|
|
1332
1629
|
popupElement: HTMLElement | null;
|
|
1333
1630
|
positionerElement: HTMLElement | null;
|
|
@@ -1347,6 +1644,7 @@ declare const selectors_2: {
|
|
|
1347
1644
|
payload: unknown;
|
|
1348
1645
|
activeTriggerId: string | null;
|
|
1349
1646
|
activeTriggerElement: Element | null;
|
|
1647
|
+
openedWithoutTrigger: boolean;
|
|
1350
1648
|
readonly triggerIdProp: string | null | undefined;
|
|
1351
1649
|
popupElement: HTMLElement | null;
|
|
1352
1650
|
positionerElement: HTMLElement | null;
|
|
@@ -1366,6 +1664,7 @@ declare const selectors_2: {
|
|
|
1366
1664
|
payload: unknown;
|
|
1367
1665
|
activeTriggerId: string | null;
|
|
1368
1666
|
activeTriggerElement: Element | null;
|
|
1667
|
+
openedWithoutTrigger: boolean;
|
|
1369
1668
|
readonly triggerIdProp: string | null | undefined;
|
|
1370
1669
|
popupElement: HTMLElement | null;
|
|
1371
1670
|
positionerElement: HTMLElement | null;
|
|
@@ -1373,9 +1672,34 @@ declare const selectors_2: {
|
|
|
1373
1672
|
inactiveTriggerProps: HTMLProps_2;
|
|
1374
1673
|
popupProps: HTMLProps_2;
|
|
1375
1674
|
}) => HTMLElement | null;
|
|
1675
|
+
modal: (state: State<unknown>) => "trap-focus" | boolean;
|
|
1676
|
+
nested: (state: State<unknown>) => boolean;
|
|
1677
|
+
nestedOpenDialogCount: (state: State<unknown>) => number;
|
|
1678
|
+
nestedOpenDrawerCount: (state: State<unknown>) => number;
|
|
1679
|
+
disablePointerDismissal: (state: State<unknown>) => boolean;
|
|
1680
|
+
openMethod: (state: State<unknown>) => InteractionType | null;
|
|
1681
|
+
descriptionElementId: (state: State<unknown>) => string | undefined;
|
|
1682
|
+
titleElementId: (state: State<unknown>) => string | undefined;
|
|
1683
|
+
viewportElement: (state: State<unknown>) => HTMLElement | null;
|
|
1684
|
+
role: (state: State<unknown>) => "alertdialog" | "dialog";
|
|
1376
1685
|
};
|
|
1377
1686
|
|
|
1378
|
-
declare const siblingOpen:
|
|
1687
|
+
declare const siblingOpen: 'sibling-open';
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Present when the dialog begins animating in.
|
|
1691
|
+
*/
|
|
1692
|
+
declare const startingStyle = "data-starting-style";
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* Present when the dialog begins animating in.
|
|
1696
|
+
*/
|
|
1697
|
+
declare const startingStyle_2 = "data-starting-style";
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Present when the dialog begins animating in.
|
|
1701
|
+
*/
|
|
1702
|
+
declare const startingStyle_3 = "data-starting-style";
|
|
1379
1703
|
|
|
1380
1704
|
declare type State<Payload> = PopupStoreState<Payload> & {
|
|
1381
1705
|
modal: boolean | 'trap-focus';
|
|
@@ -1390,47 +1714,23 @@ declare type State<Payload> = PopupStoreState<Payload> & {
|
|
|
1390
1714
|
role: 'dialog' | 'alertdialog';
|
|
1391
1715
|
};
|
|
1392
1716
|
|
|
1393
|
-
declare const swipe:
|
|
1717
|
+
declare const swipe: 'swipe';
|
|
1394
1718
|
|
|
1395
|
-
declare const trackPress:
|
|
1719
|
+
declare const trackPress: 'track-press';
|
|
1396
1720
|
|
|
1397
1721
|
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
1398
1722
|
|
|
1399
1723
|
declare function Trigger<Payload = unknown>({ className, ...props }: WithStringClassName<AlertDialog_2.Trigger.Props<Payload>>): JSX_2.Element;
|
|
1400
1724
|
|
|
1401
|
-
declare const triggerFocus:
|
|
1402
|
-
|
|
1403
|
-
declare const triggerHover: "trigger-hover";
|
|
1725
|
+
declare const triggerFocus: 'trigger-focus';
|
|
1404
1726
|
|
|
1405
|
-
declare const
|
|
1727
|
+
declare const triggerHover: 'trigger-hover';
|
|
1406
1728
|
|
|
1407
|
-
declare
|
|
1408
|
-
ref?: React_2.Ref<HTMLDivElement> | undefined;
|
|
1409
|
-
container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
|
|
1410
|
-
componentProps?: UseRenderElementComponentProps<any> | undefined;
|
|
1411
|
-
elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
declare interface UseRenderElementComponentProps<State> {
|
|
1415
|
-
/**
|
|
1416
|
-
* The class name to apply to the rendered element.
|
|
1417
|
-
* Can be a string or a function that accepts the state and returns a string.
|
|
1418
|
-
*/
|
|
1419
|
-
className?: string | ((state: State) => string | undefined) | undefined;
|
|
1420
|
-
/**
|
|
1421
|
-
* The render prop or React element to override the default element.
|
|
1422
|
-
*/
|
|
1423
|
-
render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
|
|
1424
|
-
/**
|
|
1425
|
-
* The style to apply to the rendered element.
|
|
1426
|
-
* Can be a style object or a function that accepts the state and returns a style object.
|
|
1427
|
-
*/
|
|
1428
|
-
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
1429
|
-
}
|
|
1729
|
+
declare const triggerPress: 'trigger-press';
|
|
1430
1730
|
|
|
1431
|
-
declare const wheel:
|
|
1731
|
+
declare const wheel: 'wheel';
|
|
1432
1732
|
|
|
1433
|
-
declare const windowResize:
|
|
1733
|
+
declare const windowResize: 'window-resize';
|
|
1434
1734
|
|
|
1435
1735
|
/**
|
|
1436
1736
|
* Adds a `preventBaseUIHandler` method to all event handlers.
|