@wix/site-ui 1.185.0 → 1.187.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 (47) hide show
  1. package/dist/1763.js +836 -0
  2. package/dist/2205.js +26 -0
  3. package/dist/2445.js +470 -0
  4. package/dist/285.js +1 -1
  5. package/dist/3485.js +4 -3
  6. package/dist/4863.js +61 -0
  7. package/dist/{4388.js → 487.js} +5 -57
  8. package/dist/5992.js +5 -471
  9. package/dist/6046.js +2 -26
  10. package/dist/6089.js +6 -3
  11. package/dist/6270.js +5 -3
  12. package/dist/6535.js +2 -1
  13. package/dist/6588.js +2 -1
  14. package/dist/6882.js +8 -4
  15. package/dist/6917.js +55 -0
  16. package/dist/7871.js +1 -1
  17. package/dist/8052.js +2 -1
  18. package/dist/8106.js +3 -2
  19. package/dist/8171.js +1 -1
  20. package/dist/8750.js +3 -2
  21. package/dist/8960.js +1 -1
  22. package/dist/904.js +1 -1
  23. package/dist/9352.js +2 -2
  24. package/dist/{880.js → 9369.js} +2 -60
  25. package/dist/Accordion/index.js +1 -1
  26. package/dist/Avatar/index.js +2 -1
  27. package/dist/Checkbox/index.js +2 -1
  28. package/dist/Collapsible/index.js +1 -1
  29. package/dist/Combobox/index.js +3 -2
  30. package/dist/ContextMenu/index.js +2 -2
  31. package/dist/Drawer/index.js +10 -836
  32. package/dist/Field/index.js +2 -1
  33. package/dist/Menu/index.js +3 -2
  34. package/dist/NavigationMenu/index.js +6 -3
  35. package/dist/Popover/index.js +5 -3
  36. package/dist/PreviewCard/index.js +5 -3
  37. package/dist/Radio/index.js +2 -1
  38. package/dist/Select/index.js +6 -3
  39. package/dist/Tabs/index.js +2 -1
  40. package/dist/Toast/index.css +111 -0
  41. package/dist/Toast/index.d.ts +846 -0
  42. package/dist/Toast/index.js +1204 -0
  43. package/dist/Tooltip/index.js +5 -3
  44. package/dist/index.d.ts +501 -0
  45. package/dist/index.js +1 -0
  46. package/package.json +2 -2
  47. /package/dist/{5992.js.LICENSE.txt → 2445.js.LICENSE.txt} +0 -0
@@ -0,0 +1,846 @@
1
+ import { ForwardRefExoticComponent } from 'react';
2
+ import { Padding } from '@floating-ui/react-dom';
3
+ import * as React_2 from 'react';
4
+ import { Rect } from '@floating-ui/utils';
5
+ import { RefAttributes } from 'react';
6
+ import { ToastRootProps as ToastRootProps_2 } from '@base-ui/react';
7
+ import { ToastTitleProps as ToastTitleProps_2 } from '@base-ui/react';
8
+ import { ToastViewportProps as ToastViewportProps_2 } from '@base-ui/react';
9
+ import { VirtualElement } from '@floating-ui/react-dom';
10
+
11
+ declare type Align = 'start' | 'center' | 'end';
12
+
13
+ /**
14
+ * Props shared by all Base UI components.
15
+ * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
16
+ */
17
+ declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
18
+ /**
19
+ * CSS class applied to the element, or a function that
20
+ * returns a class based on the component's state.
21
+ */
22
+ className?: string | ((state: State) => string | undefined) | undefined;
23
+ /**
24
+ * Allows you to replace the component's HTML element
25
+ * with a different tag, or compose it with another component.
26
+ *
27
+ * Accepts a `ReactElement` or a function that returns the element to render.
28
+ */
29
+ render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
30
+ /**
31
+ * Style applied to the element, or a function that
32
+ * returns a style object based on the component's state.
33
+ */
34
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
35
+ };
36
+
37
+ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
38
+ preventBaseUIHandler: () => void;
39
+ readonly baseUIHandlerPrevented?: boolean | undefined;
40
+ };
41
+
42
+ declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
43
+
44
+ declare const CloseButton: React_2.ForwardRefExoticComponent<CloseProps & React_2.RefAttributes<HTMLButtonElement>>;
45
+
46
+ declare type CloseProps = Omit<WithStringClassName<React_2.ComponentPropsWithoutRef<typeof Toast_2.Close>>, 'children'>;
47
+
48
+ declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
49
+
50
+ /**
51
+ * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
52
+ *
53
+ * @template Props Props to be spread on the rendered element.
54
+ * @template State Component's internal state.
55
+ */
56
+ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
57
+
58
+ /**
59
+ * Creates a new toast manager.
60
+ */
61
+ export declare function createToastManager<Data extends object = any>(): ToastManager<Data>;
62
+
63
+ /**
64
+ * Portals the floating element into a given container element — by default,
65
+ * outside of the app root and into the body.
66
+ * This is necessary to ensure the floating element can appear outside any
67
+ * potential parent containers that cause clipping (such as `overflow: hidden`),
68
+ * while retaining its location in the React tree.
69
+ * @see https://floating-ui.com/docs/FloatingPortal
70
+ * @internal
71
+ */
72
+ declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
73
+ renderGuards?: boolean | undefined;
74
+ }, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
75
+
76
+ declare namespace FloatingPortal {
77
+ type State = FloatingPortalState;
78
+ interface Props<TState> extends BaseUIComponentProps<'div', TState> {
79
+ /**
80
+ * A parent element to render the portal element into.
81
+ */
82
+ container?: UseFloatingPortalNodeProps['container'] | undefined;
83
+ }
84
+ }
85
+
86
+ /**
87
+ * `FloatingPortal` includes tabbable logic handling for focus management.
88
+ * For components that don't need tabbable logic, use `FloatingPortalLite`.
89
+ * @internal
90
+ */
91
+ declare const FloatingPortalLite: React_2.ForwardRefExoticComponent<Omit<FloatingPortalLite.Props<any>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
92
+
93
+ declare namespace FloatingPortalLite {
94
+ type State = FloatingPortalLiteState;
95
+ type Props<TState> = FloatingPortalLiteProps<TState>;
96
+ }
97
+
98
+ declare interface FloatingPortalLiteProps<TState> extends FloatingPortal.Props<TState> {}
99
+
100
+ declare interface FloatingPortalLiteState {}
101
+
102
+ declare interface FloatingPortalState {}
103
+
104
+ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
105
+ ref?: React_2.Ref<T> | undefined;
106
+ };
107
+
108
+ declare interface NativeButtonProps {
109
+ /**
110
+ * Whether the component renders a native `<button>` element when replacing it
111
+ * via the `render` prop.
112
+ * Set to `false` if the rendered element is not a button (for example, `<div>`).
113
+ * @default true
114
+ */
115
+ nativeButton?: boolean | undefined;
116
+ }
117
+
118
+ declare type OffsetFunction = (data: {
119
+ side: Side;
120
+ align: Align;
121
+ anchor: {
122
+ width: number;
123
+ height: number;
124
+ };
125
+ positioner: {
126
+ width: number;
127
+ height: number;
128
+ };
129
+ }) => number;
130
+
131
+ declare const Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ToastRootProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
132
+ className?: string;
133
+ } & {
134
+ skin?: string;
135
+ } & React_2.RefAttributes<HTMLDivElement>>;
136
+
137
+ declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
138
+
139
+ declare interface SideFlipMode {
140
+ /**
141
+ * How to avoid collisions on the side axis.
142
+ * - `'flip'`: If there is not enough space, place the popup on the opposite side.
143
+ * - `'none'`: Keep the preferred side even if it overflows.
144
+ */
145
+ side?: 'flip' | 'none' | undefined;
146
+ /**
147
+ * How to avoid collisions on the align axis.
148
+ * - `'flip'`: If there is not enough space, swap `'start'` and `'end'` alignment.
149
+ * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
150
+ * - `'none'`: Keep the preferred alignment even if it overflows.
151
+ */
152
+ align?: 'flip' | 'shift' | 'none' | undefined;
153
+ /**
154
+ * If both sides on the preferred axis do not fit, determines whether to fallback
155
+ * to a side on the perpendicular axis and which logical side to prefer.
156
+ * - `'start'`: Prefer the logical start side on the perpendicular axis.
157
+ * - `'end'`: Prefer the logical end side on the perpendicular axis.
158
+ * - `'none'`: Do not fallback to the perpendicular axis.
159
+ */
160
+ fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
161
+ }
162
+
163
+ declare interface SideShiftMode {
164
+ /**
165
+ * How to avoid collisions on the side axis.
166
+ * - `'shift'`: Keep the preferred side and shift the popup to fit within the boundary.
167
+ * - `'none'`: Keep the preferred side even if it overflows.
168
+ */
169
+ side?: 'shift' | 'none' | undefined;
170
+ /**
171
+ * How to avoid collisions on the align axis.
172
+ * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
173
+ * - `'none'`: Keep the preferred alignment even if it overflows.
174
+ */
175
+ align?: 'shift' | 'none' | undefined;
176
+ /**
177
+ * If both sides on the preferred axis do not fit, determines whether to fallback
178
+ * to a side on the perpendicular axis and which logical side to prefer.
179
+ * - `'start'`: Prefer the logical start side on the perpendicular axis.
180
+ * - `'end'`: Prefer the logical end side on the perpendicular axis.
181
+ * - `'none'`: Do not fallback to the perpendicular axis.
182
+ */
183
+ fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
184
+ }
185
+
186
+ declare const Title: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ToastTitleProps_2, "ref"> & React_2.RefAttributes<HTMLHeadingElement>, "ref">, "className"> & {
187
+ className?: string;
188
+ } & React_2.RefAttributes<HTMLHeadingElement>>;
189
+
190
+ export declare const Toast: ToastNamespace;
191
+
192
+ export declare namespace Toast_2 {
193
+ export {
194
+ ToastProvider as Provider,
195
+ ToastViewport as Viewport,
196
+ ToastRoot as Root,
197
+ ToastContent as Content,
198
+ ToastDescription as Description,
199
+ ToastTitle as Title,
200
+ ToastClose as Close,
201
+ ToastAction as Action,
202
+ ToastPortal as Portal,
203
+ ToastPositioner as Positioner,
204
+ ToastArrow as Arrow,
205
+ useToastManager,
206
+ createToastManager
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Performs an action when clicked.
212
+ * Renders a `<button>` element.
213
+ *
214
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
215
+ */
216
+ export declare const ToastAction: React_2.ForwardRefExoticComponent<Omit<ToastActionProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
217
+
218
+ export declare namespace ToastAction {
219
+ export type State = ToastActionState;
220
+ export type Props = ToastActionProps;
221
+ }
222
+
223
+ export declare interface ToastActionProps extends NativeButtonProps, BaseUIComponentProps<'button', ToastActionState> {}
224
+
225
+ export declare interface ToastActionState {
226
+ /**
227
+ * The type of the toast.
228
+ */
229
+ type: string | undefined;
230
+ }
231
+
232
+ /**
233
+ * Displays an element positioned against the toast anchor.
234
+ * Renders a `<div>` element.
235
+ *
236
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
237
+ */
238
+ export declare const ToastArrow: React_2.ForwardRefExoticComponent<Omit<ToastArrowProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
239
+
240
+ export declare namespace ToastArrow {
241
+ export type State = ToastArrowState;
242
+ export type Props = ToastArrowProps;
243
+ }
244
+
245
+ export declare interface ToastArrowProps extends BaseUIComponentProps<'div', ToastArrowState> {}
246
+
247
+ export declare interface ToastArrowState {
248
+ /**
249
+ * The side of the anchor the component is placed on.
250
+ */
251
+ side: Side;
252
+ /**
253
+ * The alignment of the component relative to the anchor.
254
+ */
255
+ align: Align;
256
+ /**
257
+ * Whether the arrow cannot be centered on the anchor.
258
+ */
259
+ uncentered: boolean;
260
+ }
261
+
262
+ /**
263
+ * Closes the toast when clicked.
264
+ * Renders a `<button>` element.
265
+ *
266
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
267
+ */
268
+ export declare const ToastClose: React_2.ForwardRefExoticComponent<Omit<ToastCloseProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
269
+
270
+ export declare namespace ToastClose {
271
+ export type State = ToastCloseState;
272
+ export type Props = ToastCloseProps;
273
+ }
274
+
275
+ export declare interface ToastCloseProps extends NativeButtonProps, BaseUIComponentProps<'button', ToastCloseState> {}
276
+
277
+ export declare interface ToastCloseState {
278
+ /**
279
+ * The type of the toast.
280
+ */
281
+ type: string | undefined;
282
+ }
283
+
284
+ /**
285
+ * A container for the contents of a toast.
286
+ * Renders a `<div>` element.
287
+ *
288
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
289
+ */
290
+ export declare const ToastContent: React_2.ForwardRefExoticComponent<Omit<ToastContentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
291
+
292
+ export declare namespace ToastContent {
293
+ export type State = ToastContentState;
294
+ export type Props = ToastContentProps;
295
+ }
296
+
297
+ export declare interface ToastContentProps extends BaseUIComponentProps<'div', ToastContentState> {}
298
+
299
+ export declare interface ToastContentState {
300
+ /**
301
+ * Whether the toast viewport is expanded.
302
+ */
303
+ expanded: boolean;
304
+ /**
305
+ * Whether the toast is behind the frontmost toast in the stack.
306
+ */
307
+ behind: boolean;
308
+ }
309
+
310
+ /**
311
+ * A description that describes the toast.
312
+ * Can be used as the default message for the toast when no title is provided.
313
+ * Renders a `<p>` element.
314
+ *
315
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
316
+ */
317
+ export declare const ToastDescription: React_2.ForwardRefExoticComponent<Omit<ToastDescriptionProps, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
318
+
319
+ export declare namespace ToastDescription {
320
+ export type State = ToastDescriptionState;
321
+ export type Props = ToastDescriptionProps;
322
+ }
323
+
324
+ export declare interface ToastDescriptionProps extends BaseUIComponentProps<'p', ToastDescriptionState> {}
325
+
326
+ export declare interface ToastDescriptionState {
327
+ /**
328
+ * The type of the toast.
329
+ */
330
+ type: string | undefined;
331
+ }
332
+
333
+ export declare interface ToastManager<Data extends object = any> {
334
+ ' subscribe': (listener: (data: ToastManagerEvent) => void) => () => void;
335
+ add: <T extends Data = Data>(options: ToastManagerAddOptions<T>) => string;
336
+ close: (id?: string) => void;
337
+ update: <T extends Data = Data>(id: string, updates: ToastManagerUpdateOptions<T>) => void;
338
+ promise: <Value, T extends Data = Data>(promiseValue: Promise<Value>, options: ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
339
+ }
340
+
341
+ export declare interface ToastManagerAddOptions<Data extends object> extends Omit<ToastObject<Data>, 'id' | 'animation' | 'height' | 'ref' | 'limited' | 'updateKey'> {
342
+ /**
343
+ * The unique identifier for the toast. Adding a toast with an existing ID
344
+ * updates it in place and refreshes its auto-dismiss timer.
345
+ */
346
+ id?: string | undefined;
347
+ }
348
+
349
+ export declare interface ToastManagerEvent {
350
+ action: 'add' | 'close' | 'update' | 'promise';
351
+ options: any;
352
+ }
353
+
354
+ export declare interface ToastManagerPositionerProps extends Omit<ToastPositionerProps, 'anchor' | 'toast'> {
355
+ /**
356
+ * An element to position the toast against.
357
+ */
358
+ anchor?: Element | null | undefined;
359
+ }
360
+
361
+ export declare interface ToastManagerPromiseOptions<Value, Data extends object> {
362
+ loading: string | ToastManagerUpdateOptions<Data>;
363
+ success: string | ToastManagerUpdateOptions<Data> | ((result: Value) => string | ToastManagerUpdateOptions<Data>);
364
+ error: string | ToastManagerUpdateOptions<Data> | ((error: any) => string | ToastManagerUpdateOptions<Data>);
365
+ }
366
+
367
+ export declare interface ToastManagerUpdateOptions<Data extends object> extends Partial<Omit<ToastObject<Data>, 'id' | 'ref' | 'height' | 'transitionStatus' | 'limited' | 'updateKey'>> {}
368
+
369
+ declare type ToastNamespace = {
370
+ Provider: typeof Toast_2.Provider;
371
+ Portal: typeof Toast_2.Portal;
372
+ Viewport: typeof Viewport;
373
+ Root: typeof Root;
374
+ Title: typeof Title;
375
+ Close: typeof CloseButton;
376
+ useToastManager: typeof Toast_2.useToastManager;
377
+ };
378
+
379
+ export declare interface ToastObject<Data extends object> {
380
+ /**
381
+ * The unique identifier for the toast.
382
+ */
383
+ id: string;
384
+ /**
385
+ * The ref for the toast.
386
+ */
387
+ ref?: React_2.RefObject<HTMLElement | null> | undefined;
388
+ /**
389
+ * The title of the toast.
390
+ */
391
+ title?: React_2.ReactNode;
392
+ /**
393
+ * The type of the toast. Used to conditionally style the toast,
394
+ * including conditionally rendering elements based on the type.
395
+ */
396
+ type?: string | undefined;
397
+ /**
398
+ * The description of the toast.
399
+ */
400
+ description?: React_2.ReactNode;
401
+ /**
402
+ * The amount of time (in ms) before the toast is auto dismissed.
403
+ * A value of `0` will prevent the toast from being dismissed automatically.
404
+ * @default 5000
405
+ */
406
+ timeout?: number | undefined;
407
+ /**
408
+ * The priority of the toast.
409
+ * - `low` - The toast will be announced politely.
410
+ * - `high` - The toast will be announced urgently.
411
+ * @default 'low'
412
+ */
413
+ priority?: 'low' | 'high' | undefined;
414
+ /**
415
+ * The transition status of the toast.
416
+ */
417
+ transitionStatus?: 'starting' | 'ending' | undefined;
418
+ /**
419
+ * A counter that increments whenever the toast is updated or upserted.
420
+ */
421
+ updateKey?: number | undefined;
422
+ /**
423
+ * Determines if the toast was limited because the toast limit was exceeded.
424
+ */
425
+ limited?: boolean | undefined;
426
+ /**
427
+ * The height of the toast.
428
+ */
429
+ height?: number | undefined;
430
+ /**
431
+ * Callback function to be called when the toast is closed.
432
+ */
433
+ onClose?: (() => void) | undefined;
434
+ /**
435
+ * Callback function to be called when the toast is removed from the list after any animations are complete when closed.
436
+ */
437
+ onRemove?: (() => void) | undefined;
438
+ /**
439
+ * The props for the action button.
440
+ */
441
+ actionProps?: React_2.ComponentPropsWithoutRef<'button'> | undefined;
442
+ /**
443
+ * The props forwarded to the toast positioner element when rendering anchored toasts.
444
+ */
445
+ positionerProps?: ToastManagerPositionerProps | undefined;
446
+ /**
447
+ * Custom data for the toast.
448
+ */
449
+ data?: Data | undefined;
450
+ }
451
+
452
+ /**
453
+ * A portal element that moves the viewport to a different part of the DOM.
454
+ * By default, the portal element is appended to `<body>`.
455
+ * Renders a `<div>` element.
456
+ *
457
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
458
+ */
459
+ export declare const ToastPortal: ForwardRefExoticComponent<Omit<FloatingPortalLite.Props<any>, "ref"> & RefAttributes<HTMLDivElement>>;
460
+
461
+ export declare namespace ToastPortal {
462
+ export type State = ToastPortalState;
463
+ export type Props = ToastPortalProps;
464
+ }
465
+
466
+ export declare interface ToastPortalProps extends FloatingPortalLite.Props<ToastPortalState> {}
467
+
468
+ export declare interface ToastPortalState {}
469
+
470
+ /**
471
+ * Positions the toast against the anchor.
472
+ * Renders a `<div>` element.
473
+ *
474
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
475
+ */
476
+ export declare const ToastPositioner: React_2.ForwardRefExoticComponent<Omit<ToastPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
477
+
478
+ export declare namespace ToastPositioner {
479
+ export type State = ToastPositionerState;
480
+ export type Props = ToastPositionerProps;
481
+ }
482
+
483
+ export declare interface ToastPositionerProps extends BaseUIComponentProps<'div', ToastPositionerState>, Omit<UseAnchorPositioningSharedParameters, 'side' | 'anchor'> {
484
+ /**
485
+ * An element to position the toast against.
486
+ */
487
+ anchor?: Element | null | undefined;
488
+ /**
489
+ * Which side of the anchor element to align the toast against.
490
+ * May automatically change to avoid collisions.
491
+ * @default 'top'
492
+ */
493
+ side?: Side | undefined;
494
+ /**
495
+ * The toast object associated with the positioner.
496
+ */
497
+ toast: ToastObject<any>;
498
+ }
499
+
500
+ export declare interface ToastPositionerState {
501
+ /**
502
+ * The side of the anchor the component is placed on.
503
+ */
504
+ side: Side;
505
+ /**
506
+ * The alignment of the component relative to the anchor.
507
+ */
508
+ align: Align;
509
+ /**
510
+ * Whether the anchor element is hidden.
511
+ */
512
+ anchorHidden: boolean;
513
+ }
514
+
515
+ /**
516
+ * Provides a context for creating and managing toasts.
517
+ *
518
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
519
+ */
520
+ export declare const ToastProvider: React_2.FC<ToastProvider.Props>;
521
+
522
+ export declare namespace ToastProvider {
523
+ export type State = ToastProviderState;
524
+ export type Props = ToastProviderProps;
525
+ }
526
+
527
+ export declare interface ToastProviderProps {
528
+ children?: React_2.ReactNode;
529
+ /**
530
+ * The default amount of time (in ms) before a toast is auto dismissed.
531
+ * A value of `0` will prevent the toast from being dismissed automatically.
532
+ * @default 5000
533
+ */
534
+ timeout?: number | undefined;
535
+ /**
536
+ * The maximum number of toasts that can be displayed at once.
537
+ * When the limit is reached, the oldest toast will be removed to make room for the new one.
538
+ * @default 3
539
+ */
540
+ limit?: number | undefined;
541
+ /**
542
+ * A global manager for toasts to use outside of a React component.
543
+ */
544
+ toastManager?: ToastManager | undefined;
545
+ }
546
+
547
+ export declare interface ToastProviderState {}
548
+
549
+ /**
550
+ * Groups all parts of an individual toast.
551
+ * Renders a `<div>` element.
552
+ *
553
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
554
+ */
555
+ export declare const ToastRoot: React_2.ForwardRefExoticComponent<Omit<ToastRootProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
556
+
557
+ export declare namespace ToastRoot {
558
+ export type ToastObject<Data extends object = any> = ToastRootToastObject<Data>;
559
+ export type State = ToastRootState;
560
+ export type Props = ToastRootProps;
561
+ }
562
+
563
+ export declare interface ToastRootProps extends BaseUIComponentProps<'div', ToastRootState> {
564
+ /**
565
+ * The toast to render.
566
+ */
567
+ toast: ToastRootToastObject<any>;
568
+ /**
569
+ * Direction(s) in which the toast can be swiped to dismiss.
570
+ * @default ['down', 'right']
571
+ */
572
+ swipeDirection?: 'up' | 'down' | 'left' | 'right' | ('up' | 'down' | 'left' | 'right')[] | undefined;
573
+ }
574
+
575
+ export declare interface ToastRootState {
576
+ /**
577
+ * The transition status of the component.
578
+ */
579
+ transitionStatus: TransitionStatus;
580
+ /**
581
+ * Whether the toasts in the viewport are expanded.
582
+ */
583
+ expanded: boolean;
584
+ /**
585
+ * Whether the toast was limited because the toast limit was exceeded.
586
+ */
587
+ limited: boolean;
588
+ /**
589
+ * The type of the toast.
590
+ */
591
+ type: string | undefined;
592
+ /**
593
+ * Whether the toast is being swiped.
594
+ */
595
+ swiping: boolean;
596
+ /**
597
+ * The direction the toast is being swiped.
598
+ */
599
+ swipeDirection: 'up' | 'down' | 'left' | 'right' | undefined;
600
+ }
601
+
602
+ export declare type ToastRootToastObject<Data extends object = any> = ToastObject<Data>;
603
+
604
+ /**
605
+ * A title that labels the toast.
606
+ * Renders an `<h2>` element.
607
+ *
608
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
609
+ */
610
+ export declare const ToastTitle: React_2.ForwardRefExoticComponent<Omit<ToastTitleProps, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
611
+
612
+ export declare namespace ToastTitle {
613
+ export type State = ToastTitleState;
614
+ export type Props = ToastTitleProps;
615
+ }
616
+
617
+ export declare interface ToastTitleProps extends BaseUIComponentProps<'h2', ToastTitleState> {}
618
+
619
+ export declare interface ToastTitleState {
620
+ /**
621
+ * The type of the toast.
622
+ */
623
+ type: string | undefined;
624
+ }
625
+
626
+ export declare type ToastType = 'status' | 'success' | 'error' | 'preview';
627
+
628
+ /**
629
+ * A container viewport for toasts.
630
+ * Renders a `<div>` element.
631
+ *
632
+ * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
633
+ */
634
+ export declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
635
+
636
+ export declare namespace ToastViewport {
637
+ export type State = ToastViewportState;
638
+ export type Props = ToastViewportProps;
639
+ }
640
+
641
+ export declare interface ToastViewportProps extends BaseUIComponentProps<'div', ToastViewportState> {}
642
+
643
+ export declare interface ToastViewportState {
644
+ /**
645
+ * Whether toasts are expanded in the viewport.
646
+ */
647
+ expanded: boolean;
648
+ }
649
+
650
+ declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
651
+
652
+ declare interface UseAnchorPositioningSharedParameters {
653
+ /**
654
+ * An element to position the popup against.
655
+ * By default, the popup will be positioned against the trigger.
656
+ */
657
+ anchor?: Element | null | VirtualElement | React_2.RefObject<Element | null> | (() => Element | VirtualElement | null) | undefined;
658
+ /**
659
+ * Determines which CSS `position` property to use.
660
+ * @default 'absolute'
661
+ */
662
+ positionMethod?: 'absolute' | 'fixed' | undefined;
663
+ /**
664
+ * Which side of the anchor element to align the popup against.
665
+ * May automatically change to avoid collisions.
666
+ * @default 'bottom'
667
+ */
668
+ side?: Side | undefined;
669
+ /**
670
+ * Distance between the anchor and the popup in pixels.
671
+ * Also accepts a function that returns the distance to read the dimensions of the anchor
672
+ * and positioner elements, along with its side and alignment.
673
+ *
674
+ * The function takes a `data` object parameter with the following properties:
675
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
676
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
677
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
678
+ * - `data.align`: how the positioner is aligned relative to the specified side.
679
+ *
680
+ * @example
681
+ * ```jsx
682
+ * <Positioner
683
+ * sideOffset={({ side, align, anchor, positioner }) => {
684
+ * return side === 'top' || side === 'bottom'
685
+ * ? anchor.height
686
+ * : anchor.width;
687
+ * }}
688
+ * />
689
+ * ```
690
+ *
691
+ * @default 0
692
+ */
693
+ sideOffset?: number | OffsetFunction | undefined;
694
+ /**
695
+ * How to align the popup relative to the specified side.
696
+ * @default 'center'
697
+ */
698
+ align?: Align | undefined;
699
+ /**
700
+ * Additional offset along the alignment axis in pixels.
701
+ * Also accepts a function that returns the offset to read the dimensions of the anchor
702
+ * and positioner elements, along with its side and alignment.
703
+ *
704
+ * The function takes a `data` object parameter with the following properties:
705
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
706
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
707
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
708
+ * - `data.align`: how the positioner is aligned relative to the specified side.
709
+ *
710
+ * @example
711
+ * ```jsx
712
+ * <Positioner
713
+ * alignOffset={({ side, align, anchor, positioner }) => {
714
+ * return side === 'top' || side === 'bottom'
715
+ * ? anchor.width
716
+ * : anchor.height;
717
+ * }}
718
+ * />
719
+ * ```
720
+ *
721
+ * @default 0
722
+ */
723
+ alignOffset?: number | OffsetFunction | undefined;
724
+ /**
725
+ * An element or a rectangle that delimits the area that the popup is confined to.
726
+ * @default 'clipping-ancestors'
727
+ */
728
+ collisionBoundary?: Boundary | undefined;
729
+ /**
730
+ * Additional space to maintain from the edge of the collision boundary.
731
+ * @default 5
732
+ */
733
+ collisionPadding?: Padding | undefined;
734
+ /**
735
+ * Whether to maintain the popup in the viewport after
736
+ * the anchor element was scrolled out of view.
737
+ * @default false
738
+ */
739
+ sticky?: boolean | undefined;
740
+ /**
741
+ * Minimum distance to maintain between the arrow and the edges of the popup.
742
+ *
743
+ * Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
744
+ * @default 5
745
+ */
746
+ arrowPadding?: number | undefined;
747
+ /**
748
+ * Whether to disable the popup from tracking any layout shift of its positioning anchor.
749
+ * @default false
750
+ */
751
+ disableAnchorTracking?: boolean | undefined;
752
+ /**
753
+ * Determines how to handle collisions when positioning the popup.
754
+ *
755
+ * `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
756
+ * - `'flip'`: keep the requested side when it fits; otherwise try the opposite side
757
+ * (`top` and `bottom`, or `left` and `right`).
758
+ * - `'shift'`: never change side; keep the requested side and move the popup within
759
+ * the clipping boundary so it stays visible.
760
+ * - `'none'`: do not correct side-axis overflow.
761
+ *
762
+ * `align` controls overflow on the alignment axis (`start`/`center`/`end`):
763
+ * - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
764
+ * - `'shift'`: keep side and requested alignment, then nudge the popup along the
765
+ * alignment axis to fit.
766
+ * - `'none'`: do not correct alignment-axis overflow.
767
+ *
768
+ * `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the
769
+ * preferred axis cannot fit:
770
+ * - `'start'`: allow perpendicular fallback and try the logical start side first
771
+ * (`top` before `bottom`, or `left` before `right` in LTR).
772
+ * - `'end'`: allow perpendicular fallback and try the logical end side first
773
+ * (`bottom` before `top`, or `right` before `left` in LTR).
774
+ * - `'none'`: do not fallback to the perpendicular axis.
775
+ *
776
+ * When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.
777
+ * If `align` is omitted, it defaults to `'flip'`.
778
+ *
779
+ * @example
780
+ * ```jsx
781
+ * <Positioner
782
+ * collisionAvoidance={{
783
+ * side: 'shift',
784
+ * align: 'shift',
785
+ * fallbackAxisSide: 'none',
786
+ * }}
787
+ * />
788
+ * ```
789
+ *
790
+ */
791
+ collisionAvoidance?: CollisionAvoidance | undefined;
792
+ }
793
+
794
+ declare interface UseFloatingPortalNodeProps {
795
+ ref?: React_2.Ref<HTMLDivElement> | undefined;
796
+ container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
797
+ componentProps?: UseRenderElementComponentProps<any> | undefined;
798
+ elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
799
+ }
800
+
801
+ declare interface UseRenderElementComponentProps<State> {
802
+ /**
803
+ * The class name to apply to the rendered element.
804
+ * Can be a string or a function that accepts the state and returns a string.
805
+ */
806
+ className?: string | ((state: State) => string | undefined) | undefined;
807
+ /**
808
+ * The render prop or React element to override the default element.
809
+ */
810
+ render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
811
+ /**
812
+ * The style to apply to the rendered element.
813
+ * Can be a style object or a function that accepts the state and returns a style object.
814
+ */
815
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
816
+ }
817
+
818
+ /**
819
+ * Returns the array of toasts and methods to manage them.
820
+ */
821
+ export declare function useToastManager<Data extends object = any>(): UseToastManagerReturnValue<Data>;
822
+
823
+ export declare interface UseToastManagerReturnValue<Data extends object = any> {
824
+ toasts: ToastObject<Data>[];
825
+ add: <T extends Data = Data>(options: ToastManagerAddOptions<T>) => string;
826
+ close: (toastId?: string) => void;
827
+ update: <T extends Data = Data>(toastId: string, options: ToastManagerUpdateOptions<T>) => void;
828
+ promise: <Value, T extends Data = Data>(promise: Promise<Value>, options: ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
829
+ }
830
+
831
+ declare const Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ToastViewportProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
832
+ className?: string;
833
+ } & React_2.RefAttributes<HTMLDivElement>>;
834
+
835
+ /**
836
+ * Adds a `preventBaseUIHandler` method to all event handlers.
837
+ */
838
+ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
839
+
840
+ declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
841
+
842
+ declare type WithStringClassName<P> = Omit<P, 'className'> & {
843
+ className?: string;
844
+ };
845
+
846
+ export { }