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