@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
@@ -1,6 +1,6 @@
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';
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
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
5
5
  import { Padding } from '@floating-ui/react-dom';
6
6
  import { PreviewCardArrowProps as PreviewCardArrowProps_2 } from '@base-ui/react';
@@ -8,15 +8,149 @@ import { PreviewCardBackdropProps as PreviewCardBackdropProps_2 } from '@base-ui
8
8
  import { PreviewCardPopupProps as PreviewCardPopupProps_2 } from '@base-ui/react';
9
9
  import { PreviewCardPortalProps as PreviewCardPortalProps_2 } from '@base-ui/react';
10
10
  import { PreviewCardPositionerProps as PreviewCardPositionerProps_2 } from '@base-ui/react';
11
+ import { PreviewCardViewportProps as PreviewCardViewportProps_2 } from '@base-ui/react';
11
12
  import * as React_2 from 'react';
12
13
  import { ReactStore } from '@base-ui/utils/store';
13
- import { Rect } from '@floating-ui/utils';
14
- import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.js';
14
+ import type { Rect } from '@floating-ui/utils';
15
+ import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
15
16
  import type { UseFloatingReturn } from '@floating-ui/react-dom';
16
17
  import { VirtualElement } from '@floating-ui/react-dom';
17
18
 
19
+ /**
20
+ * Indicates the direction from which the popup was activated.
21
+ * This can be used to create directional animations based on how the popup was triggered.
22
+ * Contains space-separated values for both horizontal and vertical axes.
23
+ * @type {`${'left' | 'right' | ''} ${'down' | 'up' | ''}`}
24
+ */
25
+ declare const activationDirection = "data-activation-direction";
26
+
27
+ declare type AdaptiveOriginMiddleware = {
28
+ name: string;
29
+ fn: (...args: any[]) => any;
30
+ };
31
+
18
32
  declare type Align = 'start' | 'center' | 'end';
19
33
 
34
+ /**
35
+ * Indicates how the popup is aligned relative to specified side.
36
+ * @type {'start' | 'center' | 'end'}
37
+ */
38
+ declare const align = "data-align";
39
+
40
+ /**
41
+ * Indicates how the popup is aligned relative to specified side.
42
+ * @type {'start' | 'center' | 'end'}
43
+ */
44
+ declare const align_2 = "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_3 = "data-align";
51
+
52
+ /**
53
+ * The anchor's height.
54
+ * @type {number}
55
+ */
56
+ declare const anchorHeight = "--anchor-height";
57
+
58
+ /**
59
+ * Present when the anchor is hidden.
60
+ */
61
+ declare const anchorHidden = "data-anchor-hidden";
62
+
63
+ /**
64
+ * The anchor's width.
65
+ * @type {number}
66
+ */
67
+ declare const anchorWidth = "--anchor-width";
68
+
69
+ /**
70
+ * The available height between the trigger and the edge of the viewport.
71
+ * @type {number}
72
+ */
73
+ declare const availableHeight = "--available-height";
74
+
75
+ /**
76
+ * The available width between the trigger and the edge of the viewport.
77
+ * @type {number}
78
+ */
79
+ declare const availableWidth = "--available-width";
80
+
81
+ /**
82
+ * Shared implementation for popup handles that coordinate detached triggers with a mounted root.
83
+ *
84
+ * Subclasses provide the component-specific imperative methods, while this base class owns the
85
+ * fallback store, root store attachment stack, subscriber notifications, and development warning for
86
+ * overlapping roots.
87
+ *
88
+ * @template HandleStore Store shape exposed to detached triggers.
89
+ * @template Store Root-owned store attached by the component root.
90
+ */
91
+ declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
92
+ protected readonly fallbackStore: HandleStore;
93
+ private readonly componentName;
94
+ private readonly throwOnMissingTrigger;
95
+ /**
96
+ * Stores of every root currently using this handle, in attach order. A handle is meant to be used
97
+ * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
98
+ * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
99
+ * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
100
+ */
101
+ private readonly attachedStores;
102
+ /**
103
+ * Store of the root that currently controls the handle: the most recently attached one still
104
+ * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
105
+ */
106
+ private attachedStoreValue;
107
+ /**
108
+ * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
109
+ */
110
+ private readonly storeListeners;
111
+ /**
112
+ * Creates a handle backed by the store used while no root is attached.
113
+ *
114
+ * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
115
+ * so they can render and register without a mounted root. Triggers register into whichever store
116
+ * `store` currently resolves to, so while detached they live in this store's trigger map and
117
+ * migrate themselves to the root's store (and back) as it attaches/detaches.
118
+ * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
119
+ * `MenuHandle.open()` in warning text.
120
+ * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
121
+ * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
122
+ * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
123
+ */
124
+ constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
125
+ protected get attachedStore(): Store | null;
126
+ /**
127
+ * Sets the store that currently controls the handle and notifies subscribers when it changes, so
128
+ * detached triggers re-render and migrate their registration to the new store.
129
+ */
130
+ private setActiveStore;
131
+ /**
132
+ * Opens the attached root's store and associates it with the trigger with the given id, or a
133
+ * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
134
+ * `open()` method, which only narrows the parameter type.
135
+ *
136
+ * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
137
+ * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
138
+ *
139
+ * This method should only be called in an event handler or an effect (not during rendering).
140
+ *
141
+ * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
142
+ * without associating any trigger.
143
+ */
144
+ protected openByTrigger(triggerId: string | null | undefined): void;
145
+ /**
146
+ * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
147
+ * while no root is attached. Shared by every concrete handle's public `close()` method.
148
+ *
149
+ * This method should only be called in an event handler or an effect (not during rendering).
150
+ */
151
+ protected closePopup(): void;
152
+ }
153
+
20
154
  declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
21
155
  /**
22
156
  * The reason for the event.
@@ -84,15 +218,35 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
84
218
 
85
219
  declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
86
220
 
87
- declare const cancelOpen: "cancel-open";
221
+ declare const cancelOpen: 'cancel-open';
88
222
 
89
- declare const chipRemovePress: "chip-remove-press";
223
+ declare const chipRemovePress: 'chip-remove-press';
90
224
 
91
- declare const clearPress: "clear-press";
225
+ declare const clearPress: 'clear-press';
92
226
 
93
- declare const closePress: "close-press";
227
+ /**
228
+ * Present when the preview card is closed.
229
+ */
230
+ declare const closed_2 = "data-closed";
94
231
 
95
- declare const closeWatcher: "close-watcher";
232
+ /**
233
+ * Present when the preview card is closed.
234
+ */
235
+ declare const closed_3 = "data-closed";
236
+
237
+ /**
238
+ * Present when the preview card is closed.
239
+ */
240
+ declare const closed_4 = "data-closed";
241
+
242
+ /**
243
+ * Present when the preview card is closed.
244
+ */
245
+ declare const closed_5 = "data-closed";
246
+
247
+ declare const closePress: 'close-press';
248
+
249
+ declare const closeWatcher: 'close-watcher';
96
250
 
97
251
  declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
98
252
 
@@ -105,7 +259,6 @@ declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
105
259
  declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
106
260
 
107
261
  declare type Context = PopupStoreContext<PreviewCardRoot.ChangeEventDetails> & {
108
- closeDelayRef: React_2.RefObject<number>;
109
262
  inlineRectCoordsRef: React_2.MutableRefObject<InlineRectCoords | undefined>;
110
263
  };
111
264
 
@@ -120,13 +273,28 @@ declare interface ContextData {
120
273
  */
121
274
  declare function createPreviewCardHandle<Payload>(): PreviewCardHandle<Payload>;
122
275
 
123
- declare const decrementPress: "decrement-press";
276
+ /**
277
+ * Applied to the direct child of the viewport when no transitions are present or the new content when it's entering.
278
+ */
279
+ declare const current = "data-current";
280
+
281
+ declare const decrementPress: 'decrement-press';
124
282
 
125
- declare const disabled: "disabled";
283
+ declare const disabled: 'disabled';
284
+
285
+ declare const drag: 'drag';
286
+
287
+ /**
288
+ * Present when the preview card is animating out.
289
+ */
290
+ declare const endingStyle = "data-ending-style";
126
291
 
127
- declare const drag: "drag";
292
+ /**
293
+ * Present when the preview card is animating out.
294
+ */
295
+ declare const endingStyle_2 = "data-ending-style";
128
296
 
129
- declare const escapeKey: "escape-key";
297
+ declare const escapeKey: 'escape-key';
130
298
 
131
299
  declare interface ExtendedElements {
132
300
  reference: ReferenceType | null;
@@ -161,47 +329,6 @@ declare interface FloatingEvents {
161
329
  off(event: string, handler: (data: any) => void): void;
162
330
  }
163
331
 
164
- /**
165
- * Portals the floating element into a given container element — by default,
166
- * outside of the app root and into the body.
167
- * This is necessary to ensure the floating element can appear outside any
168
- * potential parent containers that cause clipping (such as `overflow: hidden`),
169
- * while retaining its location in the React tree.
170
- * @see https://floating-ui.com/docs/FloatingPortal
171
- * @internal
172
- */
173
- declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
174
- renderGuards?: boolean | undefined;
175
- }, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
176
-
177
- declare namespace FloatingPortal {
178
- type State = FloatingPortalState;
179
- interface Props<TState> extends BaseUIComponentProps<'div', TState> {
180
- /**
181
- * A parent element to render the portal element into.
182
- */
183
- container?: UseFloatingPortalNodeProps['container'] | undefined;
184
- }
185
- }
186
-
187
- /**
188
- * `FloatingPortal` includes tabbable logic handling for focus management.
189
- * For components that don't need tabbable logic, use `FloatingPortalLite`.
190
- * @internal
191
- */
192
- declare const FloatingPortalLite: React_2.ForwardRefExoticComponent<Omit<FloatingPortalLite.Props<any>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
193
-
194
- declare namespace FloatingPortalLite {
195
- type State = FloatingPortalLiteState;
196
- type Props<TState> = FloatingPortalLiteProps<TState>;
197
- }
198
-
199
- declare interface FloatingPortalLiteProps<TState> extends FloatingPortal.Props<TState> {}
200
-
201
- declare interface FloatingPortalLiteState {}
202
-
203
- declare interface FloatingPortalState {}
204
-
205
332
  declare type FloatingRootContext = FloatingRootStore;
206
333
 
207
334
  declare interface FloatingRootState {
@@ -261,17 +388,17 @@ declare interface FloatingRootStoreOptions {
261
388
  onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
262
389
  }
263
390
 
264
- declare const focusOut: "focus-out";
391
+ declare const focusOut: 'focus-out';
265
392
 
266
393
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
267
394
  ref?: React_2.Ref<T> | undefined;
268
395
  };
269
396
 
270
- declare const imperativeAction: "imperative-action";
397
+ declare const imperativeAction: 'imperative-action';
271
398
 
272
- declare const incrementPress: "increment-press";
399
+ declare const incrementPress: 'increment-press';
273
400
 
274
- declare const initial: "initial";
401
+ declare const initial: 'initial';
275
402
 
276
403
  declare interface InlineRectCoords {
277
404
  /** The x position in viewport coordinates. */
@@ -284,29 +411,35 @@ declare interface InlineRectCoords {
284
411
  element: Element;
285
412
  }
286
413
 
287
- declare const inputBlur: "input-blur";
414
+ declare const inputBlur: 'input-blur';
288
415
 
289
- declare const inputChange: "input-change";
416
+ declare const inputChange: 'input-change';
290
417
 
291
- declare const inputClear: "input-clear";
418
+ declare const inputClear: 'input-clear';
292
419
 
293
- declare const inputPaste: "input-paste";
420
+ declare const inputPaste: 'input-paste';
294
421
 
295
- declare const inputPress: "input-press";
422
+ declare const inputPress: 'input-press';
296
423
 
297
- declare const itemPress: "item-press";
424
+ /**
425
+ * Present if animations should be instant.
426
+ * @type {'dismiss' | 'focus'}
427
+ */
428
+ declare const instant = "data-instant";
298
429
 
299
- declare const keyboard: "keyboard";
430
+ declare const itemPress: 'item-press';
300
431
 
301
- declare const linkPress: "link-press";
432
+ declare const keyboard: 'keyboard';
302
433
 
303
- declare const listNavigation: "list-navigation";
434
+ declare const linkPress: 'link-press';
304
435
 
305
- declare const missing: "missing";
436
+ declare const listNavigation: 'list-navigation';
437
+
438
+ declare const missing: 'missing';
306
439
 
307
440
  declare type NarrowedElement<T> = T extends Element ? T : Element;
308
441
 
309
- declare const none: "none";
442
+ declare const none: 'none';
310
443
 
311
444
  declare type OffsetFunction = (data: {
312
445
  side: Side;
@@ -321,13 +454,66 @@ declare type OffsetFunction = (data: {
321
454
  };
322
455
  }) => number;
323
456
 
324
- declare const outsidePress: "outside-press";
457
+ /**
458
+ * Present when the preview card is open.
459
+ */
460
+ declare const open_2 = "data-open";
461
+
462
+ /**
463
+ * Present when the preview card is open.
464
+ */
465
+ declare const open_3 = "data-open";
466
+
467
+ /**
468
+ * Present when the preview card is open.
469
+ */
470
+ declare const open_4 = "data-open";
471
+
472
+ /**
473
+ * Present when the preview card is open.
474
+ */
475
+ declare const open_5 = "data-open";
476
+
477
+ declare const outsidePress: 'outside-press';
325
478
 
326
479
  declare type PayloadChildRenderFunction<Payload> = (arg: {
327
480
  payload: Payload | undefined;
328
481
  }) => React_2.ReactNode;
329
482
 
330
- declare const pointer: "pointer";
483
+ declare const pointer: 'pointer';
484
+
485
+ declare const popupClose: 'popup-close';
486
+
487
+ /**
488
+ * Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
489
+ * Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
490
+ * omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
491
+ */
492
+ declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
493
+ setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
494
+ }
495
+
496
+ /**
497
+ * Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
498
+ * trigger element by id on both the attached root's store and the fallback store.
499
+ */
500
+ declare interface PopupHandleStoreWithTriggers {
501
+ readonly context: {
502
+ readonly triggerElements: PopupTriggerMap;
503
+ };
504
+ }
505
+
506
+ /**
507
+ * The height of the parent popup.
508
+ * This variable is placed on the 'previous' container and stores the height of the popup when the previous content was rendered.
509
+ * It can be used to freeze the dimensions of the popup when animating between different content.
510
+ */
511
+ declare const popupHeight = "--popup-height";
512
+
513
+ /**
514
+ * Present when the corresponding preview card is open.
515
+ */
516
+ declare const popupOpen = "data-popup-open";
331
517
 
332
518
  declare type PopupStoreContext<ChangeEventDetails> = {
333
519
  /**
@@ -392,6 +578,13 @@ declare type PopupStoreState<Payload> = {
392
578
  * The currently active trigger DOM element.
393
579
  */
394
580
  activeTriggerElement: Element | null;
581
+ /**
582
+ * Whether the popup is open because of a request that deliberately carried no trigger, such as a
583
+ * handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
584
+ * implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
585
+ * forwarded. Reset by the Root once the popup is effectively closed.
586
+ */
587
+ openedWithoutTrigger: boolean;
395
588
  /**
396
589
  * ID of the trigger (external prop).
397
590
  */
@@ -420,12 +613,12 @@ declare type PopupStoreState<Payload> = {
420
613
 
421
614
  /**
422
615
  * Data structure to keep track of popup trigger elements by their IDs.
423
- * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.
616
+ *
617
+ * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
618
+ * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
424
619
  */
425
620
  declare class PopupTriggerMap {
426
- private elementsSet;
427
621
  private idMap;
428
- constructor();
429
622
  /**
430
623
  * Adds a trigger element with the given ID.
431
624
  *
@@ -462,6 +655,36 @@ declare class PopupTriggerMap {
462
655
  get size(): number;
463
656
  }
464
657
 
658
+ /**
659
+ * Store members a detached handle-backed trigger reads or invokes for trigger registration and data
660
+ * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
661
+ * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
662
+ * be durable. Component handle-store views Pick these from their concrete store (preserving its
663
+ * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
664
+ */
665
+ declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
666
+
667
+ /**
668
+ * The width of the parent popup.
669
+ * This variable is placed on the 'previous' container and stores the width of the popup when the previous content was rendered.
670
+ * It can be used to freeze the dimensions of the popup when animating between different content.
671
+ */
672
+ declare const popupWidth = "--popup-width";
673
+
674
+ /**
675
+ * The height of the preview card's positioner.
676
+ * It is important to set `height` to this value when using CSS to animate size changes.
677
+ * @type {number}
678
+ */
679
+ declare const positionerHeight = "--positioner-height";
680
+
681
+ /**
682
+ * The width of the preview card's positioner.
683
+ * It is important to set `width` to this value when using CSS to animate size changes.
684
+ * @type {number}
685
+ */
686
+ declare const positionerWidth = "--positioner-width";
687
+
465
688
  export declare const PreviewCard: {
466
689
  Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PreviewCardPositionerProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
467
690
  className?: string;
@@ -475,10 +698,10 @@ export declare const PreviewCard: {
475
698
  Backdrop: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PreviewCardBackdropProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
476
699
  className?: string;
477
700
  } & React_2.RefAttributes<HTMLDivElement>>;
478
- Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PreviewCard_2.Viewport.Props, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
701
+ Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<PreviewCardViewportProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
479
702
  className?: string;
480
703
  } & React_2.RefAttributes<HTMLDivElement>>;
481
- Root: <Payload>(props: PreviewCard_2.Root.Props<Payload>) => JSX_2.Element;
704
+ Root: <Payload>(props: PreviewCard_2.Root.Props<Payload>) => React_2.JSX.Element;
482
705
  Trigger: typeof Trigger;
483
706
  Portal: React_2.ForwardRefExoticComponent<Omit<PreviewCardPortalProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
484
707
  Handle: typeof PreviewCard_2.Handle;
@@ -513,6 +736,16 @@ export declare namespace PreviewCardArrow {
513
736
  export type Props = PreviewCardArrowProps;
514
737
  }
515
738
 
739
+ export declare namespace PreviewCardArrowDataAttributes {
740
+ export {
741
+ open_4 as open,
742
+ closed_4 as closed,
743
+ side_3 as side,
744
+ align_3 as align,
745
+ uncentered
746
+ }
747
+ }
748
+
516
749
  export declare interface PreviewCardArrowProps extends BaseUIComponentProps<'div', PreviewCardArrowState> {}
517
750
 
518
751
  export declare interface PreviewCardArrowState {
@@ -535,7 +768,7 @@ export declare interface PreviewCardArrowState {
535
768
  }
536
769
 
537
770
  /**
538
- * An overlay displayed beneath the popup.
771
+ * A presentational overlay displayed beneath the popup.
539
772
  * Renders a `<div>` element.
540
773
  *
541
774
  * Documentation: [Base UI Preview Card](https://base-ui.com/react/components/preview-card)
@@ -547,6 +780,15 @@ export declare namespace PreviewCardBackdrop {
547
780
  export type Props = PreviewCardBackdropProps;
548
781
  }
549
782
 
783
+ export declare namespace PreviewCardBackdropDataAttributes {
784
+ export {
785
+ open_5 as open,
786
+ closed_5 as closed,
787
+ startingStyle_2 as startingStyle,
788
+ endingStyle_2 as endingStyle
789
+ }
790
+ }
791
+
550
792
  export declare interface PreviewCardBackdropProps extends BaseUIComponentProps<'div', PreviewCardBackdropState> {}
551
793
 
552
794
  export declare interface PreviewCardBackdropState {
@@ -561,34 +803,44 @@ export declare interface PreviewCardBackdropState {
561
803
  }
562
804
 
563
805
  /**
564
- * A handle to control a preview card imperatively and to associate detached triggers with it.
806
+ * Controls a PreviewCard imperatively and associates detached `PreviewCard.Trigger` components with
807
+ * a `PreviewCard.Root`. Create one with `PreviewCard.createHandle()` and pass it to the `handle`
808
+ * prop of the root and of any triggers rendered outside of it.
809
+ *
810
+ * The imperative methods take effect only while a root using this handle is mounted; calls made
811
+ * before a root attaches (or after it unmounts) are ignored.
565
812
  */
566
- declare class PreviewCardHandle<Payload> {
567
- /**
568
- * Internal store holding the preview card state.
569
- * @internal
570
- */
571
- readonly store: PreviewCardStore<Payload>;
813
+ declare class PreviewCardHandle<Payload> extends BasePopupHandle<PreviewCardHandleStore<Payload>, PreviewCardStore<Payload>> {
572
814
  constructor();
573
815
  /**
574
- * Opens the preview card and associates it with the trigger with the given ID.
575
- * The trigger must be a PreviewCard.Trigger component with this handle passed as a prop.
816
+ * Opens the preview card and associates it with the trigger with the given id.
576
817
  *
577
818
  * This method should only be called in an event handler or an effect (not during rendering).
578
819
  *
579
- * @param triggerId ID of the trigger to associate with the preview card.
820
+ * @param triggerId ID of the trigger to associate with the preview card. The trigger must be a
821
+ * matching `PreviewCard.Trigger` with this handle passed as a prop.
580
822
  */
581
823
  open(triggerId: string): void;
582
824
  /**
583
825
  * Closes the preview card.
826
+ *
827
+ * This method should only be called in an event handler or an effect (not during rendering).
584
828
  */
585
829
  close(): void;
586
830
  /**
587
- * Indicates whether the preview card is currently open.
831
+ * Whether the preview card is currently open. Returns `false` while no root is attached to the handle.
588
832
  */
589
833
  get isOpen(): boolean;
590
834
  }
591
835
 
836
+ /**
837
+ * The store view that detached handle-backed triggers read from. Both the real `PreviewCardStore`
838
+ * and the inert fallback store satisfy it, so a trigger can read from whichever store the handle
839
+ * currently exposes. Narrowed to the trigger-data members a trigger uses; it exposes no popup-open
840
+ * mutator, so the inert fallback can be a plain `NullStore`.
841
+ */
842
+ declare type PreviewCardHandleStore<Payload> = Pick<PreviewCardStore<Payload>, PopupTriggerStoreKeys>;
843
+
592
844
  /**
593
845
  * A container for the preview card contents.
594
846
  * Renders a `<div>` element.
@@ -602,6 +854,17 @@ export declare namespace PreviewCardPopup {
602
854
  export type Props = PreviewCardPopupProps;
603
855
  }
604
856
 
857
+ export declare namespace PreviewCardPopupDataAttributes {
858
+ export {
859
+ open_3 as open,
860
+ closed_3 as closed,
861
+ startingStyle,
862
+ endingStyle,
863
+ side_2 as side,
864
+ align_2 as align
865
+ }
866
+ }
867
+
605
868
  export declare interface PreviewCardPopupProps extends BaseUIComponentProps<'div', PreviewCardPopupState> {}
606
869
 
607
870
  export declare interface PreviewCardPopupState {
@@ -641,12 +904,16 @@ export declare namespace PreviewCardPortal {
641
904
  export type Props = PreviewCardPortalProps;
642
905
  }
643
906
 
644
- export declare interface PreviewCardPortalProps extends FloatingPortalLite.Props<PreviewCardPortalState> {
907
+ export declare interface PreviewCardPortalProps extends BaseUIComponentProps<'div', PreviewCardPortalState> {
645
908
  /**
646
909
  * Whether to keep the portal mounted in the DOM while the popup is hidden.
647
910
  * @default false
648
911
  */
649
912
  keepMounted?: boolean | undefined;
913
+ /**
914
+ * A parent element to render the portal element into.
915
+ */
916
+ container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
650
917
  }
651
918
 
652
919
  export declare interface PreviewCardPortalState {}
@@ -664,6 +931,28 @@ export declare namespace PreviewCardPositioner {
664
931
  export type Props = PreviewCardPositionerProps;
665
932
  }
666
933
 
934
+ export declare namespace PreviewCardPositionerCssVariables {
935
+ export {
936
+ availableWidth,
937
+ availableHeight,
938
+ anchorWidth,
939
+ anchorHeight,
940
+ transformOrigin,
941
+ positionerWidth,
942
+ positionerHeight
943
+ }
944
+ }
945
+
946
+ export declare namespace PreviewCardPositionerDataAttributes {
947
+ export {
948
+ open_2 as open,
949
+ closed_2 as closed,
950
+ anchorHidden,
951
+ side,
952
+ align
953
+ }
954
+ }
955
+
667
956
  export declare interface PreviewCardPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', PreviewCardPositionerState> {}
668
957
 
669
958
  export declare interface PreviewCardPositionerState {
@@ -695,7 +984,7 @@ export declare interface PreviewCardPositionerState {
695
984
  *
696
985
  * Documentation: [Base UI Preview Card](https://base-ui.com/react/components/preview-card)
697
986
  */
698
- export declare const PreviewCardRoot: <Payload>(props: PreviewCardRoot.Props<Payload>) => JSX_2.Element;
987
+ export declare const PreviewCardRoot: <Payload>(props: PreviewCardRoot.Props<Payload>) => React_2.JSX.Element;
699
988
 
700
989
  export declare namespace PreviewCardRoot {
701
990
  export type State = PreviewCardRootState;
@@ -711,7 +1000,8 @@ export declare interface PreviewCardRootActions {
711
1000
  }
712
1001
 
713
1002
  export declare type PreviewCardRootChangeEventDetails = BaseUIChangeEventDetails<PreviewCardRoot.ChangeEventReason> & {
714
- preventUnmountOnClose(): void;
1003
+ /** Prevents the popup from unmounting until the `unmount` action is called. */
1004
+ preventUnmountOnClose: () => void;
715
1005
  };
716
1006
 
717
1007
  export declare type PreviewCardRootChangeEventReason = typeof REASONS.triggerHover | typeof REASONS.triggerFocus | typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.imperativeAction | typeof REASONS.none;
@@ -738,7 +1028,9 @@ export declare interface PreviewCardRootProps<Payload = unknown> {
738
1028
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
739
1029
  /**
740
1030
  * A ref to imperative actions.
741
- * - `unmount`: Unmounts the preview card popup.
1031
+ * - `unmount`: Ends the closing phase of the preview card after an externally controlled closing animation finishes.
1032
+ * Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the preview card completes closing on its own.
1033
+ * Whether it leaves the DOM is decided by `keepMounted` on the portal.
742
1034
  * - `close`: Closes the preview card imperatively when called.
743
1035
  */
744
1036
  actionsRef?: React_2.RefObject<PreviewCardRoot.Actions | null> | undefined;
@@ -768,10 +1060,9 @@ export declare interface PreviewCardRootProps<Payload = unknown> {
768
1060
 
769
1061
  export declare interface PreviewCardRootState {}
770
1062
 
771
- declare class PreviewCardStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
772
- constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
773
- setOpen: (nextOpen: boolean, eventDetails: Omit<PreviewCardRoot.ChangeEventDetails, "preventUnmountOnClose">) => void;
774
- static useStore<Payload>(externalStore: PreviewCardStore<Payload> | undefined, initialState?: Partial<State<Payload>>): PreviewCardStore<Payload>;
1063
+ declare class PreviewCardStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
1064
+ constructor(initialState: Partial<State<Payload>>, floatingId: string | undefined, nested: boolean);
1065
+ setOpen: (nextOpen: boolean, eventDetails: Omit<PreviewCardRoot.ChangeEventDetails, 'preventUnmountOnClose'>) => void;
775
1066
  }
776
1067
 
777
1068
  /**
@@ -791,7 +1082,13 @@ export declare namespace PreviewCardTrigger {
791
1082
  export type Props<Payload = unknown> = PreviewCardTriggerProps<Payload>;
792
1083
  }
793
1084
 
794
- export declare interface PreviewCardTriggerProps<Payload = unknown> extends BaseUIComponentProps<'a', PreviewCardTriggerState> {
1085
+ export declare namespace PreviewCardTriggerDataAttributes {
1086
+ export {
1087
+ popupOpen
1088
+ }
1089
+ }
1090
+
1091
+ export declare interface PreviewCardTriggerProps<Payload = unknown> extends BaseUIComponentProps<'a', PreviewCardTriggerState, React_2.ComponentPropsWithRef<'a'>> {
795
1092
  /**
796
1093
  * A handle to associate the trigger with a preview card.
797
1094
  */
@@ -814,7 +1111,7 @@ export declare interface PreviewCardTriggerProps<Payload = unknown> extends Base
814
1111
 
815
1112
  export declare interface PreviewCardTriggerState {
816
1113
  /**
817
- * Whether the preview card is currently open.
1114
+ * Whether the preview card is currently open and was opened by this trigger.
818
1115
  */
819
1116
  open: boolean;
820
1117
  }
@@ -827,18 +1124,37 @@ export declare interface PreviewCardTriggerState {
827
1124
  *
828
1125
  * Documentation: [Base UI Preview Card](https://base-ui.com/react/components/preview-card)
829
1126
  */
830
- export declare const PreviewCardViewport: React_2.ForwardRefExoticComponent<Omit<PreviewCardViewport.Props, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1127
+ export declare const PreviewCardViewport: React_2.ForwardRefExoticComponent<Omit<PreviewCardViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
831
1128
 
832
1129
  export declare namespace PreviewCardViewport {
833
- export interface Props extends BaseUIComponentProps<'div', PreviewCardViewportState> {
834
- /**
835
- * The content to render inside the transition container.
836
- */
837
- children?: React_2.ReactNode;
838
- }
1130
+ export type Props = PreviewCardViewportProps;
839
1131
  export type State = PreviewCardViewportState;
840
1132
  }
841
1133
 
1134
+ export declare namespace PreviewCardViewportCssVariables {
1135
+ export {
1136
+ popupWidth,
1137
+ popupHeight
1138
+ }
1139
+ }
1140
+
1141
+ export declare namespace PreviewCardViewportDataAttributes {
1142
+ export {
1143
+ current,
1144
+ previous,
1145
+ activationDirection,
1146
+ transitioning,
1147
+ instant
1148
+ }
1149
+ }
1150
+
1151
+ export declare interface PreviewCardViewportProps extends BaseUIComponentProps<'div', PreviewCardViewportState> {
1152
+ /**
1153
+ * The content to render inside the transition container.
1154
+ */
1155
+ children?: React_2.ReactNode;
1156
+ }
1157
+
842
1158
  export declare interface PreviewCardViewportState {
843
1159
  /**
844
1160
  * The activation direction of the transitioned content.
@@ -854,6 +1170,11 @@ export declare interface PreviewCardViewportState {
854
1170
  instant: 'dismiss' | 'focus' | undefined;
855
1171
  }
856
1172
 
1173
+ /**
1174
+ * Applied to the direct child of the viewport that contains the exiting content when transitions are present.
1175
+ */
1176
+ declare const previous = "data-previous";
1177
+
857
1178
  declare namespace REASONS {
858
1179
  export {
859
1180
  none,
@@ -883,6 +1204,7 @@ declare namespace REASONS {
883
1204
  drag,
884
1205
  wheel,
885
1206
  scrub,
1207
+ popupClose,
886
1208
  cancelOpen,
887
1209
  siblingOpen,
888
1210
  disabled,
@@ -939,7 +1261,9 @@ declare interface ReasonToEventMap {
939
1261
 
940
1262
  declare type ReferenceType = Element | VirtualElement;
941
1263
 
942
- declare const scrub: "scrub";
1264
+ declare const scrub: 'scrub';
1265
+
1266
+ declare type Selectors = typeof selectors_2;
943
1267
 
944
1268
  declare const selectors: {
945
1269
  open: (state: FloatingRootState) => boolean;
@@ -951,8 +1275,6 @@ declare const selectors: {
951
1275
  };
952
1276
 
953
1277
  declare const selectors_2: {
954
- instantType: (state: State<unknown>) => "focus" | "dismiss" | undefined;
955
- hasViewport: (state: State<unknown>) => boolean;
956
1278
  open: (state: {
957
1279
  open: boolean;
958
1280
  readonly openProp: boolean | undefined;
@@ -965,6 +1287,7 @@ declare const selectors_2: {
965
1287
  payload: unknown;
966
1288
  activeTriggerId: string | null;
967
1289
  activeTriggerElement: Element | null;
1290
+ openedWithoutTrigger: boolean;
968
1291
  readonly triggerIdProp: string | null | undefined;
969
1292
  popupElement: HTMLElement | null;
970
1293
  positionerElement: HTMLElement | null;
@@ -984,6 +1307,7 @@ declare const selectors_2: {
984
1307
  payload: unknown;
985
1308
  activeTriggerId: string | null;
986
1309
  activeTriggerElement: Element | null;
1310
+ openedWithoutTrigger: boolean;
987
1311
  readonly triggerIdProp: string | null | undefined;
988
1312
  popupElement: HTMLElement | null;
989
1313
  positionerElement: HTMLElement | null;
@@ -1003,6 +1327,7 @@ declare const selectors_2: {
1003
1327
  payload: unknown;
1004
1328
  activeTriggerId: string | null;
1005
1329
  activeTriggerElement: Element | null;
1330
+ openedWithoutTrigger: boolean;
1006
1331
  readonly triggerIdProp: string | null | undefined;
1007
1332
  popupElement: HTMLElement | null;
1008
1333
  positionerElement: HTMLElement | null;
@@ -1022,6 +1347,7 @@ declare const selectors_2: {
1022
1347
  payload: unknown;
1023
1348
  activeTriggerId: string | null;
1024
1349
  activeTriggerElement: Element | null;
1350
+ openedWithoutTrigger: boolean;
1025
1351
  readonly triggerIdProp: string | null | undefined;
1026
1352
  popupElement: HTMLElement | null;
1027
1353
  positionerElement: HTMLElement | null;
@@ -1041,6 +1367,7 @@ declare const selectors_2: {
1041
1367
  payload: unknown;
1042
1368
  activeTriggerId: string | null;
1043
1369
  activeTriggerElement: Element | null;
1370
+ openedWithoutTrigger: boolean;
1044
1371
  readonly triggerIdProp: string | null | undefined;
1045
1372
  popupElement: HTMLElement | null;
1046
1373
  positionerElement: HTMLElement | null;
@@ -1060,6 +1387,7 @@ declare const selectors_2: {
1060
1387
  payload: unknown;
1061
1388
  activeTriggerId: string | null;
1062
1389
  activeTriggerElement: Element | null;
1390
+ openedWithoutTrigger: boolean;
1063
1391
  readonly triggerIdProp: string | null | undefined;
1064
1392
  popupElement: HTMLElement | null;
1065
1393
  positionerElement: HTMLElement | null;
@@ -1079,6 +1407,7 @@ declare const selectors_2: {
1079
1407
  payload: unknown;
1080
1408
  activeTriggerId: string | null;
1081
1409
  activeTriggerElement: Element | null;
1410
+ openedWithoutTrigger: boolean;
1082
1411
  readonly triggerIdProp: string | null | undefined;
1083
1412
  popupElement: HTMLElement | null;
1084
1413
  positionerElement: HTMLElement | null;
@@ -1098,6 +1427,7 @@ declare const selectors_2: {
1098
1427
  payload: unknown;
1099
1428
  activeTriggerId: string | null;
1100
1429
  activeTriggerElement: Element | null;
1430
+ openedWithoutTrigger: boolean;
1101
1431
  readonly triggerIdProp: string | null | undefined;
1102
1432
  popupElement: HTMLElement | null;
1103
1433
  positionerElement: HTMLElement | null;
@@ -1117,6 +1447,7 @@ declare const selectors_2: {
1117
1447
  payload: unknown;
1118
1448
  activeTriggerId: string | null;
1119
1449
  activeTriggerElement: Element | null;
1450
+ openedWithoutTrigger: boolean;
1120
1451
  readonly triggerIdProp: string | null | undefined;
1121
1452
  popupElement: HTMLElement | null;
1122
1453
  positionerElement: HTMLElement | null;
@@ -1136,6 +1467,7 @@ declare const selectors_2: {
1136
1467
  payload: unknown;
1137
1468
  activeTriggerId: string | null;
1138
1469
  activeTriggerElement: Element | null;
1470
+ openedWithoutTrigger: boolean;
1139
1471
  readonly triggerIdProp: string | null | undefined;
1140
1472
  popupElement: HTMLElement | null;
1141
1473
  positionerElement: HTMLElement | null;
@@ -1155,6 +1487,7 @@ declare const selectors_2: {
1155
1487
  payload: unknown;
1156
1488
  activeTriggerId: string | null;
1157
1489
  activeTriggerElement: Element | null;
1490
+ openedWithoutTrigger: boolean;
1158
1491
  readonly triggerIdProp: string | null | undefined;
1159
1492
  popupElement: HTMLElement | null;
1160
1493
  positionerElement: HTMLElement | null;
@@ -1174,6 +1507,7 @@ declare const selectors_2: {
1174
1507
  payload: unknown;
1175
1508
  activeTriggerId: string | null;
1176
1509
  activeTriggerElement: Element | null;
1510
+ openedWithoutTrigger: boolean;
1177
1511
  readonly triggerIdProp: string | null | undefined;
1178
1512
  popupElement: HTMLElement | null;
1179
1513
  positionerElement: HTMLElement | null;
@@ -1193,6 +1527,7 @@ declare const selectors_2: {
1193
1527
  payload: unknown;
1194
1528
  activeTriggerId: string | null;
1195
1529
  activeTriggerElement: Element | null;
1530
+ openedWithoutTrigger: boolean;
1196
1531
  readonly triggerIdProp: string | null | undefined;
1197
1532
  popupElement: HTMLElement | null;
1198
1533
  positionerElement: HTMLElement | null;
@@ -1212,6 +1547,7 @@ declare const selectors_2: {
1212
1547
  payload: unknown;
1213
1548
  activeTriggerId: string | null;
1214
1549
  activeTriggerElement: Element | null;
1550
+ openedWithoutTrigger: boolean;
1215
1551
  readonly triggerIdProp: string | null | undefined;
1216
1552
  popupElement: HTMLElement | null;
1217
1553
  positionerElement: HTMLElement | null;
@@ -1231,6 +1567,7 @@ declare const selectors_2: {
1231
1567
  payload: unknown;
1232
1568
  activeTriggerId: string | null;
1233
1569
  activeTriggerElement: Element | null;
1570
+ openedWithoutTrigger: boolean;
1234
1571
  readonly triggerIdProp: string | null | undefined;
1235
1572
  popupElement: HTMLElement | null;
1236
1573
  positionerElement: HTMLElement | null;
@@ -1250,6 +1587,7 @@ declare const selectors_2: {
1250
1587
  payload: unknown;
1251
1588
  activeTriggerId: string | null;
1252
1589
  activeTriggerElement: Element | null;
1590
+ openedWithoutTrigger: boolean;
1253
1591
  readonly triggerIdProp: string | null | undefined;
1254
1592
  popupElement: HTMLElement | null;
1255
1593
  positionerElement: HTMLElement | null;
@@ -1269,6 +1607,7 @@ declare const selectors_2: {
1269
1607
  payload: unknown;
1270
1608
  activeTriggerId: string | null;
1271
1609
  activeTriggerElement: Element | null;
1610
+ openedWithoutTrigger: boolean;
1272
1611
  readonly triggerIdProp: string | null | undefined;
1273
1612
  popupElement: HTMLElement | null;
1274
1613
  positionerElement: HTMLElement | null;
@@ -1288,6 +1627,7 @@ declare const selectors_2: {
1288
1627
  payload: unknown;
1289
1628
  activeTriggerId: string | null;
1290
1629
  activeTriggerElement: Element | null;
1630
+ openedWithoutTrigger: boolean;
1291
1631
  readonly triggerIdProp: string | null | undefined;
1292
1632
  popupElement: HTMLElement | null;
1293
1633
  positionerElement: HTMLElement | null;
@@ -1295,12 +1635,33 @@ declare const selectors_2: {
1295
1635
  inactiveTriggerProps: HTMLProps_2;
1296
1636
  popupProps: HTMLProps_2;
1297
1637
  }) => HTMLElement | null;
1638
+ instantType: (state: State<unknown>) => "dismiss" | "focus" | undefined;
1639
+ adaptiveOrigin: (state: State<unknown>) => AdaptiveOriginMiddleware | undefined;
1640
+ closeDelay: (state: State<unknown>) => number;
1298
1641
  };
1299
1642
 
1300
- declare const siblingOpen: "sibling-open";
1643
+ declare const siblingOpen: 'sibling-open';
1301
1644
 
1302
1645
  declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
1303
1646
 
1647
+ /**
1648
+ * Indicates which side the popup is positioned relative to the trigger.
1649
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
1650
+ */
1651
+ declare const side = "data-side";
1652
+
1653
+ /**
1654
+ * Indicates which side the popup is positioned relative to the trigger.
1655
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
1656
+ */
1657
+ declare const side_2 = "data-side";
1658
+
1659
+ /**
1660
+ * Indicates which side the popup is positioned relative to the trigger.
1661
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
1662
+ */
1663
+ declare const side_3 = "data-side";
1664
+
1304
1665
  declare interface SideFlipMode {
1305
1666
  /**
1306
1667
  * How to avoid collisions on the side axis.
@@ -1348,24 +1709,51 @@ declare interface SideShiftMode {
1348
1709
  fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
1349
1710
  }
1350
1711
 
1712
+ /**
1713
+ * Present when the preview card begins animating in.
1714
+ */
1715
+ declare const startingStyle = "data-starting-style";
1716
+
1717
+ /**
1718
+ * Present when the preview card begins animating in.
1719
+ */
1720
+ declare const startingStyle_2 = "data-starting-style";
1721
+
1351
1722
  declare type State<Payload> = PopupStoreState<Payload> & {
1352
1723
  instantType: 'dismiss' | 'focus' | undefined;
1353
- hasViewport: boolean;
1724
+ adaptiveOrigin: AdaptiveOriginMiddleware | undefined;
1725
+ closeDelay: number;
1354
1726
  };
1355
1727
 
1356
- declare const swipe: "swipe";
1728
+ declare const swipe: 'swipe';
1729
+
1730
+ declare const trackPress: 'track-press';
1357
1731
 
1358
- declare const trackPress: "track-press";
1732
+ /**
1733
+ * The coordinates that this element is anchored to. Used for animations and transitions.
1734
+ * @type {string}
1735
+ */
1736
+ declare const transformOrigin = "--transform-origin";
1737
+
1738
+ /**
1739
+ * Indicates that the viewport is currently transitioning between old and new content.
1740
+ */
1741
+ declare const transitioning = "data-transitioning";
1359
1742
 
1360
1743
  declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
1361
1744
 
1362
1745
  declare function Trigger<Payload = unknown>({ className, ...props }: WithStringClassName<PreviewCard_2.Trigger.Props<Payload>> & React_2.RefAttributes<HTMLElement>): JSX_2.Element;
1363
1746
 
1364
- declare const triggerFocus: "trigger-focus";
1747
+ declare const triggerFocus: 'trigger-focus';
1365
1748
 
1366
- declare const triggerHover: "trigger-hover";
1749
+ declare const triggerHover: 'trigger-hover';
1367
1750
 
1368
- declare const triggerPress: "trigger-press";
1751
+ declare const triggerPress: 'trigger-press';
1752
+
1753
+ /**
1754
+ * Present when the preview card arrow is uncentered.
1755
+ */
1756
+ declare const uncentered = "data-uncentered";
1369
1757
 
1370
1758
  declare interface UseAnchorPositioningSharedParameters {
1371
1759
  /**
@@ -1509,33 +1897,9 @@ declare interface UseAnchorPositioningSharedParameters {
1509
1897
  collisionAvoidance?: CollisionAvoidance | undefined;
1510
1898
  }
1511
1899
 
1512
- declare interface UseFloatingPortalNodeProps {
1513
- ref?: React_2.Ref<HTMLDivElement> | undefined;
1514
- container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
1515
- componentProps?: UseRenderElementComponentProps<any> | undefined;
1516
- elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
1517
- }
1518
-
1519
- declare interface UseRenderElementComponentProps<State> {
1520
- /**
1521
- * The class name to apply to the rendered element.
1522
- * Can be a string or a function that accepts the state and returns a string.
1523
- */
1524
- className?: string | ((state: State) => string | undefined) | undefined;
1525
- /**
1526
- * The render prop or React element to override the default element.
1527
- */
1528
- render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
1529
- /**
1530
- * The style to apply to the rendered element.
1531
- * Can be a style object or a function that accepts the state and returns a style object.
1532
- */
1533
- style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
1534
- }
1535
-
1536
- declare const wheel: "wheel";
1900
+ declare const wheel: 'wheel';
1537
1901
 
1538
- declare const windowResize: "window-resize";
1902
+ declare const windowResize: 'window-resize';
1539
1903
 
1540
1904
  /**
1541
1905
  * Adds a `preventBaseUIHandler` method to all event handlers.