@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.
Files changed (226) hide show
  1. package/dist/{6706.js → 1093.js} +3 -3
  2. package/dist/{8724.js → 1219.js} +2 -2
  3. package/dist/{7373.js → 1288.js} +8 -2
  4. package/dist/{5299.js → 1381.js} +98 -127
  5. package/dist/{3056.js → 1607.js} +32 -34
  6. package/dist/1629.js +2 -0
  7. package/dist/1669.js +75 -0
  8. package/dist/1718.js +26 -0
  9. package/dist/{1477.js → 201.js} +17 -26
  10. package/dist/2221.js +9 -0
  11. package/dist/{2445.js → 226.js} +12 -48
  12. package/dist/2387.js +7 -0
  13. package/dist/2580.js +6 -0
  14. package/dist/{1500.js → 2859.js} +10 -34
  15. package/dist/3014.js +178 -0
  16. package/dist/{6247.js → 3054.js} +3 -3
  17. package/dist/{7642.js → 3093.js} +1 -1
  18. package/dist/3189.js +5 -0
  19. package/dist/{7564.js → 331.js} +2 -2
  20. package/dist/3357.js +7 -0
  21. package/dist/{487.js → 3398.js} +38 -39
  22. package/dist/3502.js +224 -0
  23. package/dist/3695.js +50 -0
  24. package/dist/3829.js +1 -1
  25. package/dist/{6588.js → 3859.js} +115 -92
  26. package/dist/{3670.js → 3910.js} +28 -21
  27. package/dist/392.js +7 -0
  28. package/dist/{4549.js → 4155.js} +11 -3
  29. package/dist/4226.js +7 -0
  30. package/dist/{6329.js → 4229.js} +1 -1
  31. package/dist/4293.js +3 -0
  32. package/dist/4346.js +853 -2
  33. package/dist/{285.js → 4472.js} +3 -3
  34. package/dist/4605.js +207 -0
  35. package/dist/{7366.js → 488.js} +60 -7
  36. package/dist/{8750.js → 497.js} +190 -375
  37. package/dist/4989.js +35 -0
  38. package/dist/{6270.js → 510.js} +157 -196
  39. package/dist/5258.js +26 -0
  40. package/dist/{5036.js → 5275.js} +0 -3
  41. package/dist/{8171.js → 5298.js} +90 -102
  42. package/dist/5473.js +11 -0
  43. package/dist/{4745.js → 5490.js} +3 -1
  44. package/dist/{6089.js → 5561.js} +869 -786
  45. package/dist/{8996.js → 5595.js} +4 -3
  46. package/dist/5890.js +25 -0
  47. package/dist/{6046.js → 5969.js} +1 -1
  48. package/dist/5984.js +38 -0
  49. package/dist/{8527.js → 6006.js} +3 -3
  50. package/dist/6040.js +97 -0
  51. package/dist/{8758.js → 6137.js} +10 -8
  52. package/dist/{4281.js → 6140.js} +18 -10
  53. package/dist/{8960.js → 6191.js} +2 -2
  54. package/dist/6240.js +121 -0
  55. package/dist/{4490.js → 6373.js} +7 -5
  56. package/dist/{904.js → 6487.js} +19 -17
  57. package/dist/{9635.js → 6498.js} +1 -1
  58. package/dist/6499.js +4 -7
  59. package/dist/6508.js +7 -0
  60. package/dist/{8225.js → 6540.js} +1 -0
  61. package/dist/6551.js +46 -0
  62. package/dist/{9369.js → 6620.js} +35 -34
  63. package/dist/{4143.js → 6838.js} +19 -10
  64. package/dist/6902.js +48 -0
  65. package/dist/6904.js +51 -0
  66. package/dist/70.js +24 -0
  67. package/dist/7024.js +39 -0
  68. package/dist/{6882.js → 721.js} +737 -362
  69. package/dist/{951.js → 7270.js} +4 -4
  70. package/dist/{3485.js → 7323.js} +143 -111
  71. package/dist/{7541.js → 7488.js} +2 -2
  72. package/dist/{4863.js → 7542.js} +7 -6
  73. package/dist/7551.js +28 -0
  74. package/dist/{7021.js → 7640.js} +1 -1
  75. package/dist/{353.js → 7692.js} +3 -7
  76. package/dist/{4707.js → 7930.js} +2 -2
  77. package/dist/{8052.js → 8.js} +80 -64
  78. package/dist/{6914.js → 8129.js} +3 -15
  79. package/dist/{3319.js → 8358.js} +62 -63
  80. package/dist/{5864.js → 8407.js} +13 -13
  81. package/dist/8488.js +15 -0
  82. package/dist/{4768.js → 8495.js} +1 -1
  83. package/dist/8734.js +171 -0
  84. package/dist/{1763.js → 9018.js} +205 -331
  85. package/dist/9053.js +29 -0
  86. package/dist/9067.js +41 -0
  87. package/dist/{2861.js → 9120.js} +2 -2
  88. package/dist/{42.js → 9197.js} +2 -2
  89. package/dist/{9189.js → 9248.js} +36 -17
  90. package/dist/{2801.js → 9252.js} +4 -9
  91. package/dist/9295.js +7 -0
  92. package/dist/9303.js +8 -0
  93. package/dist/{167.js → 9374.js} +1 -1
  94. package/dist/{9352.js → 9540.js} +17 -47
  95. package/dist/9576.js +51 -0
  96. package/dist/{8272.js → 9591.js} +36 -46
  97. package/dist/{6107.js → 9770.js} +2 -2
  98. package/dist/{5085.js → 9880.js} +6 -3
  99. package/dist/Accordion/index.d.ts +207 -41
  100. package/dist/Accordion/index.js +75 -177
  101. package/dist/AlertDialog/index.d.ts +440 -140
  102. package/dist/AlertDialog/index.js +3 -13
  103. package/dist/Autocomplete/index.d.ts +722 -150
  104. package/dist/Autocomplete/index.js +16 -29
  105. package/dist/Avatar/index.d.ts +38 -3
  106. package/dist/Avatar/index.js +82 -28
  107. package/dist/Breadcrumbs/index.d.ts +63 -91
  108. package/dist/Breadcrumbs/index.js +1 -1
  109. package/dist/Button/index.d.ts +11 -0
  110. package/dist/Button/index.js +2 -2
  111. package/dist/Checkbox/index.d.ts +206 -36
  112. package/dist/Checkbox/index.js +293 -8
  113. package/dist/CheckboxField/index.css +1 -1
  114. package/dist/CheckboxField/index.d.ts +40 -36
  115. package/dist/CheckboxGroup/index.d.ts +50 -36
  116. package/dist/CheckboxGroup/index.js +87 -58
  117. package/dist/CheckboxGroupField/index.css +1 -1
  118. package/dist/Collapsible/index.d.ts +128 -36
  119. package/dist/Collapsible/index.js +21 -25
  120. package/dist/Combobox/index.d.ts +801 -158
  121. package/dist/Combobox/index.js +70 -114
  122. package/dist/ContextMenu/index.d.ts +1162 -195
  123. package/dist/ContextMenu/index.js +46 -36
  124. package/dist/Dialog/index.d.ts +425 -133
  125. package/dist/Dialog/index.js +8 -4
  126. package/dist/Drawer/index.d.ts +589 -144
  127. package/dist/Drawer/index.js +482 -562
  128. package/dist/Field/index.css +1 -1
  129. package/dist/Field/index.d.ts +341 -42
  130. package/dist/Field/index.js +123 -273
  131. package/dist/Fieldset/index.d.ts +11 -0
  132. package/dist/Fieldset/index.js +10 -17
  133. package/dist/Form/index.d.ts +43 -39
  134. package/dist/Form/index.js +58 -50
  135. package/dist/Input/index.css +1 -1
  136. package/dist/Input/index.d.ts +94 -42
  137. package/dist/Input/index.js +1 -1
  138. package/dist/Menu/index.d.ts +1140 -175
  139. package/dist/Menu/index.js +51 -67
  140. package/dist/Menubar/index.d.ts +651 -173
  141. package/dist/Menubar/index.js +12 -16
  142. package/dist/Meter/index.js +21 -18
  143. package/dist/NavigationMenu/index.d.ts +370 -86
  144. package/dist/NavigationMenu/index.js +144 -178
  145. package/dist/NumberField/index.css +1 -1
  146. package/dist/NumberField/index.d.ts +507 -47
  147. package/dist/NumberField/index.js +434 -718
  148. package/dist/Popover/index.d.ts +561 -142
  149. package/dist/Popover/index.js +181 -252
  150. package/dist/PreviewCard/index.d.ts +507 -143
  151. package/dist/PreviewCard/index.js +97 -151
  152. package/dist/Progress/index.d.ts +117 -3
  153. package/dist/Progress/index.js +37 -36
  154. package/dist/Radio/index.d.ts +177 -7
  155. package/dist/Radio/index.js +54 -70
  156. package/dist/RadioField/index.css +1 -1
  157. package/dist/RadioField/index.d.ts +23 -7
  158. package/dist/RadioGroup/index.d.ts +51 -37
  159. package/dist/RadioGroup/index.js +60 -51
  160. package/dist/RadioGroupField/index.css +1 -1
  161. package/dist/RadioGroupField/index.d.ts +40 -37
  162. package/dist/ScrollArea/index.d.ts +295 -1
  163. package/dist/ScrollArea/index.js +256 -324
  164. package/dist/Select/index.d.ts +516 -123
  165. package/dist/Select/index.js +513 -635
  166. package/dist/SelectField/index.css +1 -1
  167. package/dist/SelectField/index.d.ts +109 -134
  168. package/dist/SelectField/index.js +5 -1
  169. package/dist/Separator/index.d.ts +12 -0
  170. package/dist/Separator/index.js +1 -1
  171. package/dist/Slider/index.d.ts +383 -64
  172. package/dist/Slider/index.js +298 -374
  173. package/dist/Switch/index.d.ts +184 -37
  174. package/dist/Switch/index.js +44 -58
  175. package/dist/Tabs/index.d.ts +220 -35
  176. package/dist/Tabs/index.js +199 -193
  177. package/dist/Toast/index.d.ts +280 -64
  178. package/dist/Toast/index.js +299 -374
  179. package/dist/Toggle/index.d.ts +55 -35
  180. package/dist/Toggle/index.js +19 -13
  181. package/dist/ToggleGroup/index.d.ts +62 -35
  182. package/dist/ToggleGroup/index.js +13 -31
  183. package/dist/Toolbar/index.d.ts +117 -2
  184. package/dist/Toolbar/index.js +31 -43
  185. package/dist/Tooltip/index.d.ts +507 -150
  186. package/dist/Tooltip/index.js +163 -213
  187. package/dist/index.d.ts +12912 -5382
  188. package/package.json +3 -3
  189. package/dist/2205.js +0 -26
  190. package/dist/2274.js +0 -34
  191. package/dist/2287.js +0 -17
  192. package/dist/3020.js +0 -7
  193. package/dist/3021.js +0 -72
  194. package/dist/3140.js +0 -4
  195. package/dist/3248.js +0 -307
  196. package/dist/4026.js +0 -12
  197. package/dist/4922.js +0 -15
  198. package/dist/5659.js +0 -4
  199. package/dist/5992.js +0 -447
  200. package/dist/6330.js +0 -30
  201. package/dist/6535.js +0 -72
  202. package/dist/6917.js +0 -55
  203. package/dist/7725.js +0 -10
  204. package/dist/7871.js +0 -38
  205. package/dist/8106.js +0 -239
  206. package/dist/8685.js +0 -102
  207. package/dist/8935.js +0 -8
  208. package/dist/8971.js +0 -40
  209. package/dist/8979.js +0 -10
  210. package/dist/9048.js +0 -52
  211. package/dist/9087.js +0 -256
  212. package/dist/9255.js +0 -136
  213. /package/dist/{1457.js → 1068.js} +0 -0
  214. /package/dist/{6003.js → 1234.js} +0 -0
  215. /package/dist/{4723.js → 1282.js} +0 -0
  216. /package/dist/{6825.js → 1876.js} +0 -0
  217. /package/dist/{5778.js → 1885.js} +0 -0
  218. /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
  219. /package/dist/{1279.js → 3278.js} +0 -0
  220. /package/dist/{3296.js → 5568.js} +0 -0
  221. /package/dist/{8685.css → 6240.css} +0 -0
  222. /package/dist/{9829.js → 6488.js} +0 -0
  223. /package/dist/{9863.js → 6534.js} +0 -0
  224. /package/dist/{4495.js → 7718.js} +0 -0
  225. /package/dist/{3395.js → 8866.js} +0 -0
  226. /package/dist/{2418.js → 9837.js} +0 -0
@@ -5,17 +5,92 @@ import { DrawerIndentProps as DrawerIndentProps_2 } from '@base-ui/react';
5
5
  import { DrawerPopupProps as DrawerPopupProps_2 } from '@base-ui/react';
6
6
  import { DrawerSwipeAreaProps as DrawerSwipeAreaProps_2 } from '@base-ui/react';
7
7
  import { DrawerViewportProps as DrawerViewportProps_2 } from '@base-ui/react';
8
- import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.js';
9
- import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.js';
10
- import { HTMLProps as HTMLProps_2 } from '../../index.js';
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.js';
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
+
21
+ /**
22
+ * Shared implementation for popup handles that coordinate detached triggers with a mounted root.
23
+ *
24
+ * Subclasses provide the component-specific imperative methods, while this base class owns the
25
+ * fallback store, root store attachment stack, subscriber notifications, and development warning for
26
+ * overlapping roots.
27
+ *
28
+ * @template HandleStore Store shape exposed to detached triggers.
29
+ * @template Store Root-owned store attached by the component root.
30
+ */
31
+ declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
32
+ protected readonly fallbackStore: HandleStore;
33
+ private readonly componentName;
34
+ private readonly throwOnMissingTrigger;
35
+ /**
36
+ * Stores of every root currently using this handle, in attach order. A handle is meant to be used
37
+ * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
38
+ * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
39
+ * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
40
+ */
41
+ private readonly attachedStores;
42
+ /**
43
+ * Store of the root that currently controls the handle: the most recently attached one still
44
+ * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
45
+ */
46
+ private attachedStoreValue;
47
+ /**
48
+ * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
49
+ */
50
+ private readonly storeListeners;
51
+ /**
52
+ * Creates a handle backed by the store used while no root is attached.
53
+ *
54
+ * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
55
+ * so they can render and register without a mounted root. Triggers register into whichever store
56
+ * `store` currently resolves to, so while detached they live in this store's trigger map and
57
+ * migrate themselves to the root's store (and back) as it attaches/detaches.
58
+ * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
59
+ * `MenuHandle.open()` in warning text.
60
+ * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
61
+ * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
62
+ * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
63
+ */
64
+ constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
65
+ protected get attachedStore(): Store | null;
66
+ /**
67
+ * Sets the store that currently controls the handle and notifies subscribers when it changes, so
68
+ * detached triggers re-render and migrate their registration to the new store.
69
+ */
70
+ private setActiveStore;
71
+ /**
72
+ * Opens the attached root's store and associates it with the trigger with the given id, or a
73
+ * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
74
+ * `open()` method, which only narrows the parameter type.
75
+ *
76
+ * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
77
+ * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
78
+ *
79
+ * This method should only be called in an event handler or an effect (not during rendering).
80
+ *
81
+ * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
82
+ * without associating any trigger.
83
+ */
84
+ protected openByTrigger(triggerId: string | null | undefined): void;
85
+ /**
86
+ * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
87
+ * while no root is attached. Shared by every concrete handle's public `close()` method.
88
+ *
89
+ * This method should only be called in an event handler or an effect (not during rendering).
90
+ */
91
+ protected closePopup(): void;
92
+ }
93
+
19
94
  declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
20
95
  /**
21
96
  * The reason for the event.
@@ -81,17 +156,37 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
81
156
  readonly baseUIHandlerPrevented?: boolean | undefined;
82
157
  };
83
158
 
84
- declare const cancelOpen: "cancel-open";
159
+ declare const cancelOpen: 'cancel-open';
85
160
 
86
- declare const chipRemovePress: "chip-remove-press";
161
+ declare const chipRemovePress: 'chip-remove-press';
87
162
 
88
- declare const clearPress: "clear-press";
163
+ declare const clearPress: 'clear-press';
89
164
 
90
165
  declare function Close({ className, ...props }: WithStringClassName<Drawer_2.Close.Props>): JSX_2.Element;
91
166
 
92
- declare const closePress: "close-press";
167
+ /**
168
+ * Present when the drawer is closed.
169
+ */
170
+ declare const closed_2 = "data-closed";
93
171
 
94
- declare const closeWatcher: "close-watcher";
172
+ /**
173
+ * Present when the drawer is closed.
174
+ */
175
+ declare const closed_3 = "data-closed";
176
+
177
+ /**
178
+ * Present when the drawer is closed.
179
+ */
180
+ declare const closed_4 = "data-closed";
181
+
182
+ /**
183
+ * Present when the drawer is closed.
184
+ */
185
+ declare const closed_5 = "data-closed";
186
+
187
+ declare const closePress: 'close-press';
188
+
189
+ declare const closeWatcher: 'close-watcher';
95
190
 
96
191
  /**
97
192
  * 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.
@@ -107,7 +202,6 @@ declare type Context = PopupStoreContext<DialogRoot.ChangeEventDetails> & {
107
202
  readonly internalBackdropRef: React_2.RefObject<HTMLDivElement | null>;
108
203
  readonly outsidePressEnabledRef: React_2.MutableRefObject<boolean>;
109
204
  readonly onNestedDialogOpen?: ((dialogCount: number, drawerCount: number) => void) | undefined;
110
- readonly onNestedDialogClose?: (() => void) | undefined;
111
205
  };
112
206
 
113
207
  declare interface ContextData {
@@ -117,57 +211,67 @@ declare interface ContextData {
117
211
  }
118
212
 
119
213
  /**
120
- * Creates a new handle to connect a Dialog.Root with detached Dialog.Trigger components.
214
+ * Creates a new handle to connect a Drawer.Root with detached Drawer.Trigger components.
121
215
  */
122
- declare function createDialogHandle<Payload>(): DialogHandle<Payload>;
216
+ declare function createDrawerHandle<Payload>(): DrawerHandle<Payload>;
123
217
 
124
- declare const decrementPress: "decrement-press";
218
+ declare const decrementPress: 'decrement-press';
125
219
 
126
220
  declare function Description({ className, ...props }: WithStringClassName<Drawer_2.Description.Props>): JSX_2.Element;
127
221
 
128
222
  /**
129
- * A handle to control a Dialog imperatively and to associate detached triggers with it.
223
+ * Controls a Dialog imperatively and associates detached `Dialog.Trigger` components with a
224
+ * `Dialog.Root`. Create one with `Dialog.createHandle()` and pass it to the `handle` prop of the
225
+ * root and of any triggers rendered outside of it.
226
+ *
227
+ * The imperative methods take effect only while a root using this handle is mounted; calls made
228
+ * before a root attaches (or after it unmounts) are ignored.
130
229
  */
131
- declare class DialogHandle<Payload> {
132
- /**
133
- * Internal store holding the dialog state.
134
- * @internal
135
- */
136
- readonly store: DialogStore<Payload>;
137
- constructor(store?: DialogStore<Payload>);
230
+ declare class DialogHandle<Payload> extends BasePopupHandle<DialogHandleStore<Payload>, DialogStore<Payload>> {
231
+ constructor();
138
232
  /**
139
- * Opens the dialog and associates it with the trigger with the given id.
140
- * The trigger, if provided, must be a matching Trigger component with this handle passed as a prop.
233
+ * Opens the dialog, optionally associating it with a trigger.
141
234
  *
142
235
  * This method should only be called in an event handler or an effect (not during rendering).
143
236
  *
144
- * @param triggerId ID of the trigger to associate with the dialog. If null, the dialog will open without a trigger association.
237
+ * @param triggerId ID of the trigger to associate with the dialog. The trigger must be a matching
238
+ * `Dialog.Trigger` with this handle passed as a prop. Pass `null` to open without associating any trigger.
145
239
  */
146
240
  open(triggerId: string | null): void;
147
241
  /**
148
- * Opens the dialog and sets the payload.
149
- * Does not associate the dialog with any trigger.
242
+ * Opens the dialog with the given payload, without associating it with any trigger.
243
+ *
244
+ * This method should only be called in an event handler or an effect (not during rendering).
150
245
  *
151
- * @param payload Payload to set when opening the dialog.
246
+ * @param payload Payload to set when opening the dialog. It is exposed to the root's render-prop children.
152
247
  */
153
248
  openWithPayload(payload: Payload): void;
154
249
  /**
155
250
  * Closes the dialog.
251
+ *
252
+ * This method should only be called in an event handler or an effect (not during rendering).
156
253
  */
157
254
  close(): void;
158
255
  /**
159
- * Indicates whether the dialog is currently open.
256
+ * Whether the dialog is currently open. Returns `false` while no root is attached to the handle.
160
257
  */
161
258
  get isOpen(): boolean;
162
259
  }
163
260
 
261
+ /**
262
+ * The subset of `DialogStore` that detached handle-backed triggers rely on. Both the real
263
+ * `DialogStore` and the inert fallback store satisfy it, so a trigger can read from whichever
264
+ * store the handle currently exposes.
265
+ */
266
+ declare type DialogHandleStore<Payload> = PopupTriggerDataStore<State<Payload>>;
267
+
164
268
  /**
165
269
  * Groups all parts of the dialog.
166
270
  * Doesn't render its own HTML element.
167
271
  *
168
272
  * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
169
273
  */
170
- declare function DialogRoot<Payload>(props: DialogRoot.Props<Payload>): JSX_2.Element;
274
+ declare const DialogRoot: <Payload>(props: DialogRoot.Props<Payload>) => React_2.JSX.Element;
171
275
 
172
276
  declare namespace DialogRoot {
173
277
  type State = DialogRootState;
@@ -183,7 +287,8 @@ declare interface DialogRootActions {
183
287
  }
184
288
 
185
289
  declare type DialogRootChangeEventDetails = BaseUIChangeEventDetails<DialogRoot.ChangeEventReason> & {
186
- preventUnmountOnClose(): void;
290
+ /** Prevents the popup from unmounting until the `unmount` action is called. */
291
+ preventUnmountOnClose: () => void;
187
292
  };
188
293
 
189
294
  declare type DialogRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.closePress | typeof REASONS.focusOut | typeof REASONS.imperativeAction | typeof REASONS.none;
@@ -220,15 +325,16 @@ declare interface DialogRootProps<Payload = unknown> {
220
325
  */
221
326
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
222
327
  /**
223
- * Determines whether the dialog should close on outside clicks.
328
+ * Whether to prevent the dialog from closing on outside presses.
329
+ * For non-modal dialogs, this also prevents the dialog from closing when focus moves outside of it.
224
330
  * @default false
225
331
  */
226
332
  disablePointerDismissal?: boolean | undefined;
227
333
  /**
228
334
  * A ref to imperative actions.
229
- * - `unmount`: When specified, the dialog will not be unmounted when closed.
230
- * Instead, the `unmount` function must be called to unmount the dialog manually.
231
- * Useful when the dialog's animation is controlled by an external library.
335
+ * - `unmount`: Ends the closing phase of the dialog after an externally controlled closing animation finishes.
336
+ * Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the dialog completes closing on its own.
337
+ * Whether it leaves the DOM is decided by `keepMounted` on the portal.
232
338
  * - `close`: Closes the dialog imperatively when called.
233
339
  */
234
340
  actionsRef?: React_2.RefObject<DialogRoot.Actions | null> | undefined;
@@ -259,14 +365,28 @@ declare interface DialogRootProps<Payload = unknown> {
259
365
  declare interface DialogRootState {}
260
366
 
261
367
  declare class DialogStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
262
- constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
263
- setOpen: (nextOpen: boolean, eventDetails: Omit<DialogRoot.ChangeEventDetails, "preventUnmountOnClose">) => void;
264
- static useStore<Payload>(externalStore: DialogStore<Payload> | undefined, initialState?: Partial<State<Payload>>): DialogStore<Payload>;
368
+ constructor(initialState: Partial<State<Payload>> | undefined, floatingId: string | undefined, nested: boolean);
369
+ setOpen: (nextOpen: boolean, eventDetails: Omit<DialogRoot.ChangeEventDetails, 'preventUnmountOnClose'>) => void;
265
370
  }
266
371
 
267
- declare const disabled: "disabled";
372
+ declare const disabled: 'disabled';
268
373
 
269
- declare const drag: "drag";
374
+ /**
375
+ * Present when the swipe area is disabled.
376
+ */
377
+ declare const disabled_2 = "data-disabled";
378
+
379
+ /**
380
+ * Present when the trigger is disabled.
381
+ */
382
+ declare const disabled_3 = "data-disabled";
383
+
384
+ /**
385
+ * Present when the button is disabled.
386
+ */
387
+ declare const disabled_4 = "data-disabled";
388
+
389
+ declare const drag: 'drag';
270
390
 
271
391
  export declare const Drawer: {
272
392
  Backdrop: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<DrawerBackdropProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
@@ -317,8 +437,9 @@ export declare namespace Drawer_2 {
317
437
  DrawerTitle as Title,
318
438
  DrawerTrigger as Trigger,
319
439
  DrawerViewport as Viewport,
320
- createDialogHandle as createHandle,
321
- DialogHandle as Handle
440
+ DrawerVirtualKeyboardProvider as VirtualKeyboardProvider,
441
+ createDrawerHandle as createHandle,
442
+ DrawerHandle as Handle
322
443
  }
323
444
  }
324
445
 
@@ -335,6 +456,21 @@ export declare namespace DrawerBackdrop {
335
456
  export type State = DrawerBackdropState;
336
457
  }
337
458
 
459
+ export declare namespace DrawerBackdropCssVariables {
460
+ export {
461
+ swipeProgress
462
+ }
463
+ }
464
+
465
+ export declare namespace DrawerBackdropDataAttributes {
466
+ export {
467
+ open_2 as open,
468
+ closed_2 as closed,
469
+ startingStyle,
470
+ endingStyle
471
+ }
472
+ }
473
+
338
474
  export declare interface DrawerBackdropProps extends BaseUIComponentProps<'div', DrawerBackdropState> {
339
475
  /**
340
476
  * Whether the backdrop is forced to render even when nested.
@@ -371,6 +507,12 @@ export declare namespace DrawerClose {
371
507
  export type State = DrawerCloseState;
372
508
  }
373
509
 
510
+ export declare namespace DrawerCloseDataAttributes {
511
+ export {
512
+ disabled_4 as disabled
513
+ }
514
+ }
515
+
374
516
  export declare interface DrawerCloseProps extends NativeButtonProps, BaseUIComponentProps<'button', DrawerCloseState> {}
375
517
 
376
518
  export declare interface DrawerCloseState {
@@ -418,6 +560,18 @@ export declare interface DrawerDescriptionProps extends BaseUIComponentProps<'p'
418
560
 
419
561
  export declare interface DrawerDescriptionState {}
420
562
 
563
+ /**
564
+ * Controls a Drawer imperatively and associates detached `Drawer.Trigger` components with a
565
+ * `Drawer.Root`. Create one with `Drawer.createHandle()` and pass it to the `handle` prop of the
566
+ * root and of any triggers rendered outside of it.
567
+ *
568
+ * The imperative methods take effect only while a root using this handle is mounted; calls made
569
+ * before a root attaches (or after it unmounts) are ignored.
570
+ */
571
+ declare class DrawerHandle<Payload> extends DialogHandle<Payload> {
572
+ private readonly __drawerBrand;
573
+ }
574
+
421
575
  /**
422
576
  * A wrapper element intended to contain your app's main UI.
423
577
  * Applies `data-active` when any drawer within the nearest `<Drawer.Provider>` is open.
@@ -476,6 +630,33 @@ export declare namespace DrawerPopup {
476
630
  export type State = DrawerPopupState;
477
631
  }
478
632
 
633
+ export declare namespace DrawerPopupCssVariables {
634
+ export {
635
+ nestedDrawers,
636
+ height,
637
+ frontmostHeight,
638
+ swipeMovementX,
639
+ swipeMovementY,
640
+ snapPointOffset,
641
+ swipeStrength
642
+ }
643
+ }
644
+
645
+ export declare namespace DrawerPopupDataAttributes {
646
+ export {
647
+ open_3 as open,
648
+ closed_3 as closed,
649
+ startingStyle_2 as startingStyle,
650
+ endingStyle_2 as endingStyle,
651
+ expanded,
652
+ nestedDrawerOpen,
653
+ nestedDrawerSwiping,
654
+ swipeDismiss,
655
+ swipeDirection,
656
+ swiping
657
+ }
658
+ }
659
+
479
660
  export declare interface DrawerPopupProps extends BaseUIComponentProps<'div', DrawerPopupState> {
480
661
  /**
481
662
  * Determines the element to focus when the drawer is opened.
@@ -552,7 +733,7 @@ export declare namespace DrawerPortal {
552
733
  export type State = DrawerPortalState;
553
734
  }
554
735
 
555
- export declare interface DrawerPortalProps extends FloatingPortal.Props<DrawerPortalState> {
736
+ export declare interface DrawerPortalProps extends BaseUIComponentProps<'div', DrawerPortalState> {
556
737
  /**
557
738
  * Whether to keep the portal mounted in the DOM while the popup is hidden.
558
739
  * @default false
@@ -561,7 +742,7 @@ export declare interface DrawerPortalProps extends FloatingPortal.Props<DrawerPo
561
742
  /**
562
743
  * A parent element to render the portal element into.
563
744
  */
564
- container?: FloatingPortal.Props<DrawerPortalState>['container'] | undefined;
745
+ container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
565
746
  }
566
747
 
567
748
  export declare interface DrawerPortalState {}
@@ -572,7 +753,7 @@ export declare interface DrawerPortalState {}
572
753
  *
573
754
  * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
574
755
  */
575
- export declare function DrawerProvider(props: DrawerProvider.Props): JSX_2.Element;
756
+ export declare function DrawerProvider(props: DrawerProvider.Props): React_2.JSX.Element;
576
757
 
577
758
  export declare namespace DrawerProvider {
578
759
  export type State = DrawerProviderState;
@@ -591,7 +772,7 @@ export declare interface DrawerProviderState {}
591
772
  *
592
773
  * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
593
774
  */
594
- export declare function DrawerRoot<Payload = unknown>(props: DrawerRoot.Props<Payload>): JSX_2.Element;
775
+ export declare function DrawerRoot<Payload = unknown>(props: DrawerRoot.Props<Payload>): React_2.JSX.Element;
595
776
 
596
777
  export declare namespace DrawerRoot {
597
778
  export type State = DrawerRootState;
@@ -610,7 +791,8 @@ export declare interface DrawerRootActions {
610
791
  }
611
792
 
612
793
  export declare type DrawerRootChangeEventDetails = BaseUIChangeEventDetails<DrawerRoot.ChangeEventReason> & {
613
- preventUnmountOnClose(): void;
794
+ /** Prevents the popup from unmounting until the `unmount` action is called. */
795
+ preventUnmountOnClose: () => void;
614
796
  };
615
797
 
616
798
  export declare type DrawerRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.closeWatcher | typeof REASONS.closePress | typeof REASONS.focusOut | typeof REASONS.imperativeAction | typeof REASONS.swipe | typeof REASONS.none;
@@ -644,15 +826,16 @@ export declare interface DrawerRootProps<Payload = unknown> {
644
826
  */
645
827
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
646
828
  /**
647
- * Determines whether the drawer should close on outside clicks.
829
+ * Whether to prevent the drawer from closing on outside presses.
830
+ * For non-modal drawers, this also prevents the drawer from closing when focus moves outside of it.
648
831
  * @default false
649
832
  */
650
833
  disablePointerDismissal?: boolean | undefined;
651
834
  /**
652
835
  * A ref to imperative actions.
653
- * - `unmount`: When specified, the drawer will not be unmounted when closed.
654
- * Instead, the `unmount` function must be called to unmount the drawer manually.
655
- * Useful when the drawer's animation is controlled by an external library.
836
+ * - `unmount`: Ends the closing phase of the drawer after an externally controlled closing animation finishes.
837
+ * Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the drawer completes closing on its own.
838
+ * Whether it leaves the DOM is decided by `keepMounted` on the portal.
656
839
  * - `close`: Closes the drawer imperatively when called.
657
840
  */
658
841
  actionsRef?: React_2.RefObject<DrawerRoot.Actions | null> | undefined;
@@ -661,7 +844,7 @@ export declare interface DrawerRootProps<Payload = unknown> {
661
844
  * If specified, allows detached triggers to control the drawer's open state.
662
845
  * Can be created with the Drawer.createHandle() method.
663
846
  */
664
- handle?: DialogHandle<Payload> | undefined;
847
+ handle?: DrawerHandle<Payload> | undefined;
665
848
  /**
666
849
  * ID of the trigger that the drawer is associated with.
667
850
  * This is useful in conjunction with the `open` prop to create a controlled drawer.
@@ -729,6 +912,16 @@ export declare namespace DrawerSwipeArea {
729
912
  export type State = DrawerSwipeAreaState;
730
913
  }
731
914
 
915
+ export declare namespace DrawerSwipeAreaDataAttributes {
916
+ export {
917
+ open_4 as open,
918
+ closed_4 as closed,
919
+ disabled_2 as disabled,
920
+ swipeDirection_2 as swipeDirection,
921
+ swiping_2 as swiping
922
+ }
923
+ }
924
+
732
925
  export declare interface DrawerSwipeAreaProps extends BaseUIComponentProps<'div', DrawerSwipeAreaState> {
733
926
  /**
734
927
  * Whether the swipe area is disabled.
@@ -801,12 +994,19 @@ export declare namespace DrawerTrigger {
801
994
  export type State = DrawerTriggerState;
802
995
  }
803
996
 
997
+ export declare namespace DrawerTriggerDataAttributes {
998
+ export {
999
+ disabled_3 as disabled,
1000
+ popupOpen
1001
+ }
1002
+ }
1003
+
804
1004
  export declare interface DrawerTriggerProps<Payload = unknown> extends NativeButtonProps, BaseUIComponentProps<'button', DrawerTriggerState> {
805
1005
  /**
806
1006
  * A handle to associate the trigger with a drawer.
807
1007
  * Can be created with the Drawer.createHandle() method.
808
1008
  */
809
- handle?: DialogHandle<Payload> | undefined;
1009
+ handle?: DrawerHandle<Payload> | undefined;
810
1010
  /**
811
1011
  * A payload to pass to the drawer when it is opened.
812
1012
  */
@@ -820,11 +1020,11 @@ export declare interface DrawerTriggerProps<Payload = unknown> extends NativeBut
820
1020
 
821
1021
  export declare interface DrawerTriggerState {
822
1022
  /**
823
- * Whether the drawer is currently disabled.
1023
+ * Whether the trigger is currently disabled.
824
1024
  */
825
1025
  disabled: boolean;
826
1026
  /**
827
- * Whether the drawer is currently open.
1027
+ * Whether the drawer is currently open and was opened by this trigger.
828
1028
  */
829
1029
  open: boolean;
830
1030
  }
@@ -842,6 +1042,22 @@ export declare namespace DrawerViewport {
842
1042
  export type State = DrawerViewportState;
843
1043
  }
844
1044
 
1045
+ export declare namespace DrawerViewportCssVariables {
1046
+ export {
1047
+ keyboardInset
1048
+ }
1049
+ }
1050
+
1051
+ export declare namespace DrawerViewportDataAttributes {
1052
+ export {
1053
+ open_5 as open,
1054
+ closed_5 as closed,
1055
+ startingStyle_3 as startingStyle,
1056
+ endingStyle_3 as endingStyle,
1057
+ nested
1058
+ }
1059
+ }
1060
+
845
1061
  export declare interface DrawerViewportProps extends BaseUIComponentProps<'div', DrawerViewportState> {}
846
1062
 
847
1063
  export declare interface DrawerViewportState {
@@ -863,7 +1079,45 @@ export declare interface DrawerViewportState {
863
1079
  nestedDialogOpen: boolean;
864
1080
  }
865
1081
 
866
- declare const escapeKey: "escape-key";
1082
+ /**
1083
+ * Provides keyboard-aware focus and scroll handling for bottom-sheet drawers with form fields.
1084
+ *
1085
+ * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
1086
+ */
1087
+ export declare function DrawerVirtualKeyboardProvider(props: DrawerVirtualKeyboardProvider.Props): React_2.JSX.Element;
1088
+
1089
+ export declare namespace DrawerVirtualKeyboardProvider {
1090
+ export type State = DrawerVirtualKeyboardProviderState;
1091
+ export type Props = DrawerVirtualKeyboardProviderProps;
1092
+ }
1093
+
1094
+ export declare interface DrawerVirtualKeyboardProviderProps {
1095
+ children?: React_2.ReactNode;
1096
+ }
1097
+
1098
+ export declare interface DrawerVirtualKeyboardProviderState {}
1099
+
1100
+ /**
1101
+ * Present when the drawer is animating out.
1102
+ */
1103
+ declare const endingStyle = "data-ending-style";
1104
+
1105
+ /**
1106
+ * Present when the drawer is animating out.
1107
+ */
1108
+ declare const endingStyle_2 = "data-ending-style";
1109
+
1110
+ /**
1111
+ * Present when the drawer is animating out.
1112
+ */
1113
+ declare const endingStyle_3 = "data-ending-style";
1114
+
1115
+ declare const escapeKey: 'escape-key';
1116
+
1117
+ /**
1118
+ * Present when the drawer is at the expanded (full-height) snap point.
1119
+ */
1120
+ declare const expanded = "data-expanded";
867
1121
 
868
1122
  declare interface ExtendedElements {
869
1123
  reference: ReferenceType | null;
@@ -898,31 +1152,6 @@ declare interface FloatingEvents {
898
1152
  off(event: string, handler: (data: any) => void): void;
899
1153
  }
900
1154
 
901
- /**
902
- * Portals the floating element into a given container element — by default,
903
- * outside of the app root and into the body.
904
- * This is necessary to ensure the floating element can appear outside any
905
- * potential parent containers that cause clipping (such as `overflow: hidden`),
906
- * while retaining its location in the React tree.
907
- * @see https://floating-ui.com/docs/FloatingPortal
908
- * @internal
909
- */
910
- declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
911
- renderGuards?: boolean | undefined;
912
- }, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
913
-
914
- declare namespace FloatingPortal {
915
- type State = FloatingPortalState;
916
- interface Props<TState> extends BaseUIComponentProps<'div', TState> {
917
- /**
918
- * A parent element to render the portal element into.
919
- */
920
- container?: UseFloatingPortalNodeProps['container'] | undefined;
921
- }
922
- }
923
-
924
- declare interface FloatingPortalState {}
925
-
926
1155
  declare type FloatingRootContext = FloatingRootStore;
927
1156
 
928
1157
  declare interface FloatingRootState {
@@ -982,37 +1211,56 @@ declare interface FloatingRootStoreOptions {
982
1211
  onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
983
1212
  }
984
1213
 
985
- declare const focusOut: "focus-out";
1214
+ declare const focusOut: 'focus-out';
1215
+
1216
+ /**
1217
+ * The height of the frontmost open drawer in the current nested drawer stack.
1218
+ * @type {CSS length}
1219
+ */
1220
+ declare const frontmostHeight = "--drawer-frontmost-height";
1221
+
1222
+ /**
1223
+ * The height of the drawer popup.
1224
+ * @type {CSS length}
1225
+ */
1226
+ declare const height = "--drawer-height";
986
1227
 
987
1228
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
988
1229
  ref?: React_2.Ref<T> | undefined;
989
1230
  };
990
1231
 
991
- declare const imperativeAction: "imperative-action";
1232
+ declare const imperativeAction: 'imperative-action';
992
1233
 
993
- declare const incrementPress: "increment-press";
1234
+ declare const incrementPress: 'increment-press';
994
1235
 
995
- declare const initial: "initial";
1236
+ declare const initial: 'initial';
996
1237
 
997
- declare const inputBlur: "input-blur";
1238
+ declare const inputBlur: 'input-blur';
998
1239
 
999
- declare const inputChange: "input-change";
1240
+ declare const inputChange: 'input-change';
1000
1241
 
1001
- declare const inputClear: "input-clear";
1242
+ declare const inputClear: 'input-clear';
1002
1243
 
1003
- declare const inputPaste: "input-paste";
1244
+ declare const inputPaste: 'input-paste';
1004
1245
 
1005
- declare const inputPress: "input-press";
1246
+ declare const inputPress: 'input-press';
1006
1247
 
1007
- declare const itemPress: "item-press";
1248
+ declare const itemPress: 'item-press';
1008
1249
 
1009
- declare const keyboard: "keyboard";
1250
+ declare const keyboard: 'keyboard';
1010
1251
 
1011
- declare const linkPress: "link-press";
1252
+ /**
1253
+ * The software keyboard inset, measured from the bottom edge of the layout viewport.
1254
+ * Present only when the drawer is wrapped in `Drawer.VirtualKeyboardProvider`.
1255
+ * @type {CSS length}
1256
+ */
1257
+ declare const keyboardInset = "--drawer-keyboard-inset";
1012
1258
 
1013
- declare const listNavigation: "list-navigation";
1259
+ declare const linkPress: 'link-press';
1014
1260
 
1015
- declare const missing: "missing";
1261
+ declare const listNavigation: 'list-navigation';
1262
+
1263
+ declare const missing: 'missing';
1016
1264
 
1017
1265
  declare type NarrowedElement<T> = T extends Element ? T : Element;
1018
1266
 
@@ -1026,15 +1274,86 @@ declare interface NativeButtonProps {
1026
1274
  nativeButton?: boolean | undefined;
1027
1275
  }
1028
1276
 
1029
- declare const none: "none";
1277
+ /**
1278
+ * Present when the drawer is nested within another drawer.
1279
+ */
1280
+ declare const nested = "data-nested";
1281
+
1282
+ /**
1283
+ * Present when a nested drawer is open.
1284
+ */
1285
+ declare const nestedDrawerOpen = "data-nested-drawer-open";
1286
+
1287
+ /**
1288
+ * The number of nested drawers that are currently open.
1289
+ * @type {number}
1290
+ */
1291
+ declare const nestedDrawers = "--nested-drawers";
1292
+
1293
+ /**
1294
+ * Present when a nested drawer is being swiped.
1295
+ */
1296
+ declare const nestedDrawerSwiping = "data-nested-drawer-swiping";
1297
+
1298
+ declare const none: 'none';
1030
1299
 
1031
- declare const outsidePress: "outside-press";
1300
+ /**
1301
+ * Present when the drawer is open.
1302
+ */
1303
+ declare const open_2 = "data-open";
1304
+
1305
+ /**
1306
+ * Present when the drawer is open.
1307
+ */
1308
+ declare const open_3 = "data-open";
1309
+
1310
+ /**
1311
+ * Present when the drawer is open.
1312
+ */
1313
+ declare const open_4 = "data-open";
1314
+
1315
+ /**
1316
+ * Present when the drawer is open.
1317
+ */
1318
+ declare const open_5 = "data-open";
1319
+
1320
+ declare const openSelector: (state: S) => boolean;
1321
+
1322
+ declare const outsidePress: 'outside-press';
1032
1323
 
1033
1324
  declare type PayloadChildRenderFunction<Payload> = (arg: {
1034
1325
  payload: Payload | undefined;
1035
1326
  }) => React_2.ReactNode;
1036
1327
 
1037
- declare const pointer: "pointer";
1328
+ declare const pointer: 'pointer';
1329
+
1330
+ declare const popupClose: 'popup-close';
1331
+
1332
+ /**
1333
+ * Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
1334
+ * Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
1335
+ * omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
1336
+ */
1337
+ declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
1338
+ setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
1339
+ }
1340
+
1341
+ /**
1342
+ * Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
1343
+ * trigger element by id on both the attached root's store and the fallback store.
1344
+ */
1345
+ declare interface PopupHandleStoreWithTriggers {
1346
+ readonly context: {
1347
+ readonly triggerElements: PopupTriggerMap;
1348
+ };
1349
+ }
1350
+
1351
+ declare const popupIdSelector: (state: S) => string | undefined;
1352
+
1353
+ /**
1354
+ * Present when the corresponding dialog is open.
1355
+ */
1356
+ declare const popupOpen = "data-popup-open";
1038
1357
 
1039
1358
  declare type PopupStoreContext<ChangeEventDetails> = {
1040
1359
  /**
@@ -1055,6 +1374,41 @@ declare type PopupStoreContext<ChangeEventDetails> = {
1055
1374
  onOpenChangeComplete: ((open: boolean) => void) | undefined;
1056
1375
  };
1057
1376
 
1377
+ declare type PopupStoreSelectors = typeof popupStoreSelectors;
1378
+
1379
+ declare const popupStoreSelectors: {
1380
+ open: typeof openSelector;
1381
+ mounted: (state: S) => boolean;
1382
+ transitionStatus: (state: S) => TransitionStatus;
1383
+ floatingRootContext: (state: S) => FloatingRootStore;
1384
+ triggerCount: (state: S) => number;
1385
+ preventUnmountingOnClose: (state: S) => boolean;
1386
+ payload: (state: S) => unknown;
1387
+ activeTriggerId: typeof activeTriggerIdSelector;
1388
+ activeTriggerElement: (state: S) => Element | null;
1389
+ popupId: typeof popupIdSelector;
1390
+ /**
1391
+ * Whether the trigger with the given ID was used to open the popup.
1392
+ */
1393
+ isTriggerActive: (state: S, triggerId: string | undefined) => boolean;
1394
+ /**
1395
+ * Whether the popup is open and was activated by a trigger with the given ID.
1396
+ */
1397
+ isOpenedByTrigger: (state: S, triggerId: string | undefined) => boolean;
1398
+ /**
1399
+ * Whether the popup is mounted and was activated by a trigger with the given ID.
1400
+ */
1401
+ isMountedByTrigger: (state: S, triggerId: string | undefined) => boolean;
1402
+ triggerProps: (state: S, isActive: boolean) => HTMLProps;
1403
+ /**
1404
+ * Popup id for the trigger that currently owns the open popup.
1405
+ */
1406
+ triggerPopupId: (state: S, triggerId: string | undefined) => string | undefined;
1407
+ popupProps: (state: S) => HTMLProps;
1408
+ popupElement: (state: S) => HTMLElement | null;
1409
+ positionerElement: (state: S) => HTMLElement | null;
1410
+ };
1411
+
1058
1412
  /**
1059
1413
  * State common to all popup stores.
1060
1414
  */
@@ -1099,6 +1453,13 @@ declare type PopupStoreState<Payload> = {
1099
1453
  * The currently active trigger DOM element.
1100
1454
  */
1101
1455
  activeTriggerElement: Element | null;
1456
+ /**
1457
+ * Whether the popup is open because of a request that deliberately carried no trigger, such as a
1458
+ * handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
1459
+ * implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
1460
+ * forwarded. Reset by the Root once the popup is effectively closed.
1461
+ */
1462
+ openedWithoutTrigger: boolean;
1102
1463
  /**
1103
1464
  * ID of the trigger (external prop).
1104
1465
  */
@@ -1125,14 +1486,20 @@ declare type PopupStoreState<Payload> = {
1125
1486
  popupProps: HTMLProps;
1126
1487
  };
1127
1488
 
1489
+ /**
1490
+ * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough
1491
+ * that an inert store can be passed while detached.
1492
+ */
1493
+ declare type PopupTriggerDataStore<State extends PopupStoreState<unknown>> = Pick<ReactStore<Readonly<State>, PopupStoreContext<never>, PopupStoreSelectors>, PopupTriggerStoreKeys>;
1494
+
1128
1495
  /**
1129
1496
  * Data structure to keep track of popup trigger elements by their IDs.
1130
- * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.
1497
+ *
1498
+ * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
1499
+ * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
1131
1500
  */
1132
1501
  declare class PopupTriggerMap {
1133
- private elementsSet;
1134
1502
  private idMap;
1135
- constructor();
1136
1503
  /**
1137
1504
  * Adds a trigger element with the given ID.
1138
1505
  *
@@ -1169,6 +1536,15 @@ declare class PopupTriggerMap {
1169
1536
  get size(): number;
1170
1537
  }
1171
1538
 
1539
+ /**
1540
+ * Store members a detached handle-backed trigger reads or invokes for trigger registration and data
1541
+ * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
1542
+ * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
1543
+ * be durable. Component handle-store views Pick these from their concrete store (preserving its
1544
+ * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
1545
+ */
1546
+ declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
1547
+
1172
1548
  declare namespace REASONS {
1173
1549
  export {
1174
1550
  none,
@@ -1198,6 +1574,7 @@ declare namespace REASONS {
1198
1574
  drag,
1199
1575
  wheel,
1200
1576
  scrub,
1577
+ popupClose,
1201
1578
  cancelOpen,
1202
1579
  siblingOpen,
1203
1580
  disabled,
@@ -1254,7 +1631,9 @@ declare interface ReasonToEventMap {
1254
1631
 
1255
1632
  declare type ReferenceType = Element | VirtualElement;
1256
1633
 
1257
- declare const scrub: "scrub";
1634
+ declare type S = PopupStoreState<unknown>;
1635
+
1636
+ declare const scrub: 'scrub';
1258
1637
 
1259
1638
  declare const selectors: {
1260
1639
  open: (state: FloatingRootState) => boolean;
@@ -1266,16 +1645,6 @@ declare const selectors: {
1266
1645
  };
1267
1646
 
1268
1647
  declare const selectors_2: {
1269
- modal: (state: State<unknown>) => boolean | "trap-focus";
1270
- nested: (state: State<unknown>) => boolean;
1271
- nestedOpenDialogCount: (state: State<unknown>) => number;
1272
- nestedOpenDrawerCount: (state: State<unknown>) => number;
1273
- disablePointerDismissal: (state: State<unknown>) => boolean;
1274
- openMethod: (state: State<unknown>) => InteractionType | null;
1275
- descriptionElementId: (state: State<unknown>) => string | undefined;
1276
- titleElementId: (state: State<unknown>) => string | undefined;
1277
- viewportElement: (state: State<unknown>) => HTMLElement | null;
1278
- role: (state: State<unknown>) => "dialog" | "alertdialog";
1279
1648
  open: (state: {
1280
1649
  open: boolean;
1281
1650
  readonly openProp: boolean | undefined;
@@ -1288,6 +1657,7 @@ declare const selectors_2: {
1288
1657
  payload: unknown;
1289
1658
  activeTriggerId: string | null;
1290
1659
  activeTriggerElement: Element | null;
1660
+ openedWithoutTrigger: boolean;
1291
1661
  readonly triggerIdProp: string | null | undefined;
1292
1662
  popupElement: HTMLElement | null;
1293
1663
  positionerElement: HTMLElement | null;
@@ -1307,6 +1677,7 @@ declare const selectors_2: {
1307
1677
  payload: unknown;
1308
1678
  activeTriggerId: string | null;
1309
1679
  activeTriggerElement: Element | null;
1680
+ openedWithoutTrigger: boolean;
1310
1681
  readonly triggerIdProp: string | null | undefined;
1311
1682
  popupElement: HTMLElement | null;
1312
1683
  positionerElement: HTMLElement | null;
@@ -1326,6 +1697,7 @@ declare const selectors_2: {
1326
1697
  payload: unknown;
1327
1698
  activeTriggerId: string | null;
1328
1699
  activeTriggerElement: Element | null;
1700
+ openedWithoutTrigger: boolean;
1329
1701
  readonly triggerIdProp: string | null | undefined;
1330
1702
  popupElement: HTMLElement | null;
1331
1703
  positionerElement: HTMLElement | null;
@@ -1345,6 +1717,7 @@ declare const selectors_2: {
1345
1717
  payload: unknown;
1346
1718
  activeTriggerId: string | null;
1347
1719
  activeTriggerElement: Element | null;
1720
+ openedWithoutTrigger: boolean;
1348
1721
  readonly triggerIdProp: string | null | undefined;
1349
1722
  popupElement: HTMLElement | null;
1350
1723
  positionerElement: HTMLElement | null;
@@ -1364,6 +1737,7 @@ declare const selectors_2: {
1364
1737
  payload: unknown;
1365
1738
  activeTriggerId: string | null;
1366
1739
  activeTriggerElement: Element | null;
1740
+ openedWithoutTrigger: boolean;
1367
1741
  readonly triggerIdProp: string | null | undefined;
1368
1742
  popupElement: HTMLElement | null;
1369
1743
  positionerElement: HTMLElement | null;
@@ -1383,6 +1757,7 @@ declare const selectors_2: {
1383
1757
  payload: unknown;
1384
1758
  activeTriggerId: string | null;
1385
1759
  activeTriggerElement: Element | null;
1760
+ openedWithoutTrigger: boolean;
1386
1761
  readonly triggerIdProp: string | null | undefined;
1387
1762
  popupElement: HTMLElement | null;
1388
1763
  positionerElement: HTMLElement | null;
@@ -1402,6 +1777,7 @@ declare const selectors_2: {
1402
1777
  payload: unknown;
1403
1778
  activeTriggerId: string | null;
1404
1779
  activeTriggerElement: Element | null;
1780
+ openedWithoutTrigger: boolean;
1405
1781
  readonly triggerIdProp: string | null | undefined;
1406
1782
  popupElement: HTMLElement | null;
1407
1783
  positionerElement: HTMLElement | null;
@@ -1421,6 +1797,7 @@ declare const selectors_2: {
1421
1797
  payload: unknown;
1422
1798
  activeTriggerId: string | null;
1423
1799
  activeTriggerElement: Element | null;
1800
+ openedWithoutTrigger: boolean;
1424
1801
  readonly triggerIdProp: string | null | undefined;
1425
1802
  popupElement: HTMLElement | null;
1426
1803
  positionerElement: HTMLElement | null;
@@ -1440,6 +1817,7 @@ declare const selectors_2: {
1440
1817
  payload: unknown;
1441
1818
  activeTriggerId: string | null;
1442
1819
  activeTriggerElement: Element | null;
1820
+ openedWithoutTrigger: boolean;
1443
1821
  readonly triggerIdProp: string | null | undefined;
1444
1822
  popupElement: HTMLElement | null;
1445
1823
  positionerElement: HTMLElement | null;
@@ -1459,6 +1837,7 @@ declare const selectors_2: {
1459
1837
  payload: unknown;
1460
1838
  activeTriggerId: string | null;
1461
1839
  activeTriggerElement: Element | null;
1840
+ openedWithoutTrigger: boolean;
1462
1841
  readonly triggerIdProp: string | null | undefined;
1463
1842
  popupElement: HTMLElement | null;
1464
1843
  positionerElement: HTMLElement | null;
@@ -1478,6 +1857,7 @@ declare const selectors_2: {
1478
1857
  payload: unknown;
1479
1858
  activeTriggerId: string | null;
1480
1859
  activeTriggerElement: Element | null;
1860
+ openedWithoutTrigger: boolean;
1481
1861
  readonly triggerIdProp: string | null | undefined;
1482
1862
  popupElement: HTMLElement | null;
1483
1863
  positionerElement: HTMLElement | null;
@@ -1497,6 +1877,7 @@ declare const selectors_2: {
1497
1877
  payload: unknown;
1498
1878
  activeTriggerId: string | null;
1499
1879
  activeTriggerElement: Element | null;
1880
+ openedWithoutTrigger: boolean;
1500
1881
  readonly triggerIdProp: string | null | undefined;
1501
1882
  popupElement: HTMLElement | null;
1502
1883
  positionerElement: HTMLElement | null;
@@ -1516,6 +1897,7 @@ declare const selectors_2: {
1516
1897
  payload: unknown;
1517
1898
  activeTriggerId: string | null;
1518
1899
  activeTriggerElement: Element | null;
1900
+ openedWithoutTrigger: boolean;
1519
1901
  readonly triggerIdProp: string | null | undefined;
1520
1902
  popupElement: HTMLElement | null;
1521
1903
  positionerElement: HTMLElement | null;
@@ -1535,6 +1917,7 @@ declare const selectors_2: {
1535
1917
  payload: unknown;
1536
1918
  activeTriggerId: string | null;
1537
1919
  activeTriggerElement: Element | null;
1920
+ openedWithoutTrigger: boolean;
1538
1921
  readonly triggerIdProp: string | null | undefined;
1539
1922
  popupElement: HTMLElement | null;
1540
1923
  positionerElement: HTMLElement | null;
@@ -1554,6 +1937,7 @@ declare const selectors_2: {
1554
1937
  payload: unknown;
1555
1938
  activeTriggerId: string | null;
1556
1939
  activeTriggerElement: Element | null;
1940
+ openedWithoutTrigger: boolean;
1557
1941
  readonly triggerIdProp: string | null | undefined;
1558
1942
  popupElement: HTMLElement | null;
1559
1943
  positionerElement: HTMLElement | null;
@@ -1573,6 +1957,7 @@ declare const selectors_2: {
1573
1957
  payload: unknown;
1574
1958
  activeTriggerId: string | null;
1575
1959
  activeTriggerElement: Element | null;
1960
+ openedWithoutTrigger: boolean;
1576
1961
  readonly triggerIdProp: string | null | undefined;
1577
1962
  popupElement: HTMLElement | null;
1578
1963
  positionerElement: HTMLElement | null;
@@ -1592,6 +1977,7 @@ declare const selectors_2: {
1592
1977
  payload: unknown;
1593
1978
  activeTriggerId: string | null;
1594
1979
  activeTriggerElement: Element | null;
1980
+ openedWithoutTrigger: boolean;
1595
1981
  readonly triggerIdProp: string | null | undefined;
1596
1982
  popupElement: HTMLElement | null;
1597
1983
  positionerElement: HTMLElement | null;
@@ -1611,6 +1997,7 @@ declare const selectors_2: {
1611
1997
  payload: unknown;
1612
1998
  activeTriggerId: string | null;
1613
1999
  activeTriggerElement: Element | null;
2000
+ openedWithoutTrigger: boolean;
1614
2001
  readonly triggerIdProp: string | null | undefined;
1615
2002
  popupElement: HTMLElement | null;
1616
2003
  positionerElement: HTMLElement | null;
@@ -1618,9 +2005,40 @@ declare const selectors_2: {
1618
2005
  inactiveTriggerProps: HTMLProps_2;
1619
2006
  popupProps: HTMLProps_2;
1620
2007
  }) => HTMLElement | null;
2008
+ modal: (state: State<unknown>) => "trap-focus" | boolean;
2009
+ nested: (state: State<unknown>) => boolean;
2010
+ nestedOpenDialogCount: (state: State<unknown>) => number;
2011
+ nestedOpenDrawerCount: (state: State<unknown>) => number;
2012
+ disablePointerDismissal: (state: State<unknown>) => boolean;
2013
+ openMethod: (state: State<unknown>) => InteractionType | null;
2014
+ descriptionElementId: (state: State<unknown>) => string | undefined;
2015
+ titleElementId: (state: State<unknown>) => string | undefined;
2016
+ viewportElement: (state: State<unknown>) => HTMLElement | null;
2017
+ role: (state: State<unknown>) => "alertdialog" | "dialog";
1621
2018
  };
1622
2019
 
1623
- declare const siblingOpen: "sibling-open";
2020
+ declare const siblingOpen: 'sibling-open';
2021
+
2022
+ /**
2023
+ * The snap point offset used for translating the drawer.
2024
+ * @type {CSS length}
2025
+ */
2026
+ declare const snapPointOffset = "--drawer-snap-point-offset";
2027
+
2028
+ /**
2029
+ * Present when the drawer begins animating in.
2030
+ */
2031
+ declare const startingStyle = "data-starting-style";
2032
+
2033
+ /**
2034
+ * Present when the drawer begins animating in.
2035
+ */
2036
+ declare const startingStyle_2 = "data-starting-style";
2037
+
2038
+ /**
2039
+ * Present when the drawer begins animating in.
2040
+ */
2041
+ declare const startingStyle_3 = "data-starting-style";
1624
2042
 
1625
2043
  declare type State<Payload> = PopupStoreState<Payload> & {
1626
2044
  modal: boolean | 'trap-focus';
@@ -1635,51 +2053,78 @@ declare type State<Payload> = PopupStoreState<Payload> & {
1635
2053
  role: 'dialog' | 'alertdialog';
1636
2054
  };
1637
2055
 
1638
- declare const swipe: "swipe";
2056
+ declare const swipe: 'swipe';
1639
2057
 
1640
2058
  declare type SwipeDirection = 'up' | 'down' | 'left' | 'right';
1641
2059
 
2060
+ /**
2061
+ * Indicates the swipe direction.
2062
+ * @type {'up' | 'down' | 'left' | 'right'}
2063
+ */
2064
+ declare const swipeDirection = "data-swipe-direction";
2065
+
2066
+ /**
2067
+ * Indicates the swipe direction.
2068
+ * @type {'up' | 'down' | 'left' | 'right'}
2069
+ */
2070
+ declare const swipeDirection_2 = "data-swipe-direction";
2071
+
2072
+ /**
2073
+ * Present when the drawer is dismissed by swiping.
2074
+ */
2075
+ declare const swipeDismiss = "data-swipe-dismiss";
2076
+
2077
+ /**
2078
+ * The swipe movement on the X axis.
2079
+ * @type {CSS length}
2080
+ */
2081
+ declare const swipeMovementX = "--drawer-swipe-movement-x";
2082
+
2083
+ /**
2084
+ * The swipe movement on the Y axis.
2085
+ * @type {CSS length}
2086
+ */
2087
+ declare const swipeMovementY = "--drawer-swipe-movement-y";
2088
+
2089
+ /**
2090
+ * The swipe progress of the drawer gesture.
2091
+ * @type {number}
2092
+ */
2093
+ declare const swipeProgress = "--drawer-swipe-progress";
2094
+
2095
+ /**
2096
+ * A scalar (0.1-1) used to scale the swipe release transition duration in CSS.
2097
+ * @type {number}
2098
+ */
2099
+ declare const swipeStrength = "--drawer-swipe-strength";
2100
+
2101
+ /**
2102
+ * Present when the drawer is being swiped.
2103
+ */
2104
+ declare const swiping = "data-swiping";
2105
+
2106
+ /**
2107
+ * Present when the drawer is being swiped.
2108
+ */
2109
+ declare const swiping_2 = "data-swiping";
2110
+
1642
2111
  declare function Title({ className, ...props }: WithStringClassName<Drawer_2.Title.Props>): JSX_2.Element;
1643
2112
 
1644
- declare const trackPress: "track-press";
2113
+ declare const trackPress: 'track-press';
1645
2114
 
1646
2115
  declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
1647
2116
 
1648
2117
  declare function Trigger<Payload = unknown>({ className, ...props }: WithStringClassName<Drawer_2.Trigger.Props<Payload>> & React_2.RefAttributes<HTMLElement>): JSX_2.Element;
1649
2118
 
1650
- declare const triggerFocus: "trigger-focus";
2119
+ declare const triggerFocus: 'trigger-focus';
1651
2120
 
1652
- declare const triggerHover: "trigger-hover";
2121
+ declare const triggerHover: 'trigger-hover';
1653
2122
 
1654
- declare const triggerPress: "trigger-press";
1655
-
1656
- declare interface UseFloatingPortalNodeProps {
1657
- ref?: React_2.Ref<HTMLDivElement> | undefined;
1658
- container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
1659
- componentProps?: UseRenderElementComponentProps<any> | undefined;
1660
- elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
1661
- }
1662
-
1663
- declare interface UseRenderElementComponentProps<State> {
1664
- /**
1665
- * The class name to apply to the rendered element.
1666
- * Can be a string or a function that accepts the state and returns a string.
1667
- */
1668
- className?: string | ((state: State) => string | undefined) | undefined;
1669
- /**
1670
- * The render prop or React element to override the default element.
1671
- */
1672
- render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
1673
- /**
1674
- * The style to apply to the rendered element.
1675
- * Can be a style object or a function that accepts the state and returns a style object.
1676
- */
1677
- style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
1678
- }
2123
+ declare const triggerPress: 'trigger-press';
1679
2124
 
1680
- declare const wheel: "wheel";
2125
+ declare const wheel: 'wheel';
1681
2126
 
1682
- declare const windowResize: "window-resize";
2127
+ declare const windowResize: 'window-resize';
1683
2128
 
1684
2129
  /**
1685
2130
  * Adds a `preventBaseUIHandler` method to all event handlers.