@sanity/ui 2.0.10 → 2.0.11

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 (65) hide show
  1. package/dist/index.d.mts +2777 -0
  2. package/dist/index.esm.js +1 -1
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +129 -129
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +6852 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/theme.d.mts +1506 -0
  9. package/dist/theme.mjs +3348 -0
  10. package/dist/theme.mjs.map +1 -0
  11. package/package.json +37 -38
  12. package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
  13. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
  14. package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
  15. package/src/core/components/dialog/dialog.tsx +1 -1
  16. package/src/core/components/hotkeys/hotkeys.tsx +1 -1
  17. package/src/core/components/menu/menu.tsx +1 -1
  18. package/src/core/components/menu/menuDivider.ts +1 -1
  19. package/src/core/components/skeleton/skeleton.tsx +1 -1
  20. package/src/core/components/skeleton/textSkeleton.tsx +1 -1
  21. package/src/core/components/tab/tab.tsx +1 -1
  22. package/src/core/components/tab/tabList.tsx +1 -1
  23. package/src/core/components/toast/toast.tsx +1 -1
  24. package/src/core/components/toast/toastProvider.tsx +1 -1
  25. package/src/core/components/tree/treeItem.tsx +1 -1
  26. package/src/core/primitives/_selectable/selectable.tsx +1 -1
  27. package/src/core/primitives/avatar/avatar.tsx +1 -1
  28. package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
  29. package/src/core/primitives/avatar/avatarStack.tsx +1 -1
  30. package/src/core/primitives/badge/badge.tsx +1 -1
  31. package/src/core/primitives/box/box.tsx +1 -1
  32. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
  33. package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
  34. package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
  35. package/src/core/primitives/button/button.tsx +1 -1
  36. package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
  37. package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
  38. package/src/core/primitives/card/card.tsx +1 -1
  39. package/src/core/primitives/checkbox/checkbox.tsx +1 -1
  40. package/src/core/primitives/code/code.tsx +1 -1
  41. package/src/core/primitives/container/container.tsx +1 -1
  42. package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
  43. package/src/core/primitives/flex/flex.tsx +1 -1
  44. package/src/core/primitives/grid/grid.tsx +1 -1
  45. package/src/core/primitives/heading/heading.tsx +1 -1
  46. package/src/core/primitives/inline/inline.tsx +1 -1
  47. package/src/core/primitives/kbd/kbd.tsx +1 -1
  48. package/src/core/primitives/label/label.tsx +1 -1
  49. package/src/core/primitives/popover/popoverCard.tsx +1 -1
  50. package/src/core/primitives/radio/radio.tsx +1 -1
  51. package/src/core/primitives/select/select.tsx +1 -1
  52. package/src/core/primitives/spinner/spinner.tsx +1 -1
  53. package/src/core/primitives/stack/stack.tsx +1 -1
  54. package/src/core/primitives/switch/switch.tsx +1 -1
  55. package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
  56. package/src/core/primitives/text/text.tsx +1 -1
  57. package/src/core/primitives/textArea/textArea.tsx +1 -1
  58. package/src/core/primitives/textInput/textInput.tsx +1 -1
  59. package/src/core/primitives/tooltip/tooltip.tsx +1 -1
  60. package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
  61. package/src/core/utils/arrow/arrow.tsx +1 -1
  62. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
  63. package/src/core/utils/layer/layer.tsx +1 -1
  64. package/src/core/utils/srOnly/srOnly.tsx +1 -1
  65. package/src/core/utils/virtualList/virtualList.tsx +1 -1
@@ -0,0 +1,2777 @@
1
+ /// <reference types="react" />
2
+
3
+ import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
4
+ import {Component} from 'react'
5
+ import {CSSObject} from '@sanity/ui/theme'
6
+ import {DetailedHTMLProps} from 'react'
7
+ import {ElementType} from 'react'
8
+ import {FastOmit} from 'styled-components/dist/types'
9
+ import {ForwardRefExoticComponent} from 'react'
10
+ import {HSL as HSL_2} from '@sanity/ui/theme'
11
+ import {HTMLAttributes} from 'react'
12
+ import {HTMLProps} from 'react'
13
+ import {IStyledComponent} from 'styled-components'
14
+ import {MemoExoticComponent} from 'react'
15
+ import {MutableRefObject} from 'react'
16
+ import {NamedExoticComponent} from 'react'
17
+ import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
18
+ import {PropsWithChildren} from 'react'
19
+ import {ReactElement} from 'react'
20
+ import {ReactNode} from 'react'
21
+ import {Ref} from 'react'
22
+ import {RefAttributes} from 'react'
23
+ import {RefCallback} from 'react'
24
+ import {RGB as RGB_2} from '@sanity/ui/theme'
25
+ import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
26
+ import {Theme as Theme_2} from '@sanity/ui/theme'
27
+ import {Theme_v2} from '@sanity/ui/theme'
28
+ import {ThemeAvatar} from '@sanity/ui/theme'
29
+ import {ThemeBoxShadow} from '@sanity/ui/theme'
30
+ import {ThemeColor} from '@sanity/ui/theme'
31
+ import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
32
+ import {ThemeColorBase} from '@sanity/ui/theme'
33
+ import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
34
+ import {ThemeColorButton} from '@sanity/ui/theme'
35
+ import {ThemeColorButtonModeKey as ThemeColorButtonModeKey_2} from '@sanity/ui/theme'
36
+ import {ThemeColorButtonState} from '@sanity/ui/theme'
37
+ import {ThemeColorButtonStates} from '@sanity/ui/theme'
38
+ import {ThemeColorButtonTones} from '@sanity/ui/theme'
39
+ import {ThemeColorCard} from '@sanity/ui/theme'
40
+ import {ThemeColorCardState} from '@sanity/ui/theme'
41
+ import {ThemeColorCardToneKey} from '@sanity/ui/theme'
42
+ import {ThemeColorGenericState} from '@sanity/ui/theme'
43
+ import {ThemeColorInput} from '@sanity/ui/theme'
44
+ import {ThemeColorInputState} from '@sanity/ui/theme'
45
+ import {ThemeColorInputStates} from '@sanity/ui/theme'
46
+ import {ThemeColorMuted} from '@sanity/ui/theme'
47
+ import {ThemeColorMutedTone} from '@sanity/ui/theme'
48
+ import {ThemeColorName} from '@sanity/ui/theme'
49
+ import {ThemeColorScheme} from '@sanity/ui/theme'
50
+ import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@sanity/ui/theme'
51
+ import {ThemeColorSchemes} from '@sanity/ui/theme'
52
+ import {ThemeColorSelectable} from '@sanity/ui/theme'
53
+ import {ThemeColorSelectableState} from '@sanity/ui/theme'
54
+ import {ThemeColorSelectableStates} from '@sanity/ui/theme'
55
+ import {ThemeColorSolid} from '@sanity/ui/theme'
56
+ import {ThemeColorSolidTone} from '@sanity/ui/theme'
57
+ import {ThemeColorSpot} from '@sanity/ui/theme'
58
+ import {ThemeColorSpotKey} from '@sanity/ui/theme'
59
+ import {ThemeColorStateToneKey} from '@sanity/ui/theme'
60
+ import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
61
+ import {ThemeColorToneKey} from '@sanity/ui/theme'
62
+ import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
63
+ import {ThemeFontKey as ThemeFontKey_2} from '@sanity/ui/theme'
64
+ import {ThemeFonts as ThemeFonts_2} from '@sanity/ui/theme'
65
+ import {ThemeFontSize as ThemeFontSize_2} from '@sanity/ui/theme'
66
+ import {ThemeFontWeight as ThemeFontWeight_2} from '@sanity/ui/theme'
67
+ import {ThemeFontWeightKey as ThemeFontWeightKey_2} from '@sanity/ui/theme'
68
+ import {ThemeInput} from '@sanity/ui/theme'
69
+ import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
70
+ import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
71
+ import {ThemeStyles} from '@sanity/ui/theme'
72
+
73
+ /** @beta */
74
+ export declare type ArrayPropPrimitive = string | number | boolean | undefined | null
75
+
76
+ /** @internal */
77
+ export declare const Arrow: ForwardRefExoticComponent<
78
+ Omit<
79
+ {
80
+ width: number
81
+ height: number
82
+ radius?: number | undefined
83
+ } & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width'>,
84
+ 'ref'
85
+ > &
86
+ RefAttributes<HTMLDivElement>
87
+ >
88
+
89
+ /**
90
+ * @internal
91
+ */
92
+ export declare function attemptFocus(element: HTMLElement): boolean
93
+
94
+ /**
95
+ * The Autocomplete component is typically used for search components.
96
+ * It consists of a text input for writing a query, and properties for rendering suggestions.
97
+ *
98
+ * @public
99
+ */
100
+ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
101
+ props: AutocompleteProps<Option> &
102
+ Omit<
103
+ HTMLProps<HTMLInputElement>,
104
+ | 'aria-activedescendant'
105
+ | 'aria-autocomplete'
106
+ | 'aria-expanded'
107
+ | 'aria-owns'
108
+ | 'as'
109
+ | 'autoCapitalize'
110
+ | 'autoComplete'
111
+ | 'autoCorrect'
112
+ | 'id'
113
+ | 'inputMode'
114
+ | 'onChange'
115
+ | 'onSelect'
116
+ | 'prefix'
117
+ | 'ref'
118
+ | 'role'
119
+ | 'spellCheck'
120
+ | 'type'
121
+ | 'value'
122
+ > & {
123
+ ref?: Ref<HTMLInputElement>
124
+ },
125
+ ) => ReactElement
126
+
127
+ /**
128
+ * @internal
129
+ */
130
+ export declare interface AutocompleteInputChangeMsg {
131
+ type: 'input/change'
132
+ query: string | null
133
+ }
134
+
135
+ /**
136
+ * @internal
137
+ */
138
+ export declare interface AutocompleteInputFoocusMsg {
139
+ type: 'input/focus'
140
+ }
141
+
142
+ /**
143
+ * @internal
144
+ */
145
+ export declare type AutocompleteMsg =
146
+ | AutocompleteRootBlurMsg
147
+ | AutocompleteRootClearMsg
148
+ | AutocompleteRootEscapeMsg
149
+ | AutocompleteRootOpenMsg
150
+ | AutocompleteRootSetActiveValueMsg
151
+ | AutocompleteRootSetListFocusedMsg
152
+ | AutocompleteInputChangeMsg
153
+ | AutocompleteInputFoocusMsg
154
+ | AutocompleteValueChangeMsg
155
+
156
+ /**
157
+ * @public
158
+ */
159
+ export declare type AutocompleteOpenButtonProps = Omit<ButtonProps, 'as'> &
160
+ Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
161
+
162
+ /**
163
+ * @public
164
+ */
165
+ export declare interface AutocompleteProps<
166
+ Option extends BaseAutocompleteOption = BaseAutocompleteOption,
167
+ > {
168
+ border?: boolean
169
+ customValidity?: string
170
+ filterOption?: (query: string, option: Option) => boolean
171
+ fontSize?: number | number[]
172
+ icon?: ElementType | ReactNode
173
+ id: string
174
+ /** @beta */
175
+ listBox?: BoxProps
176
+ loading?: boolean
177
+ onChange?: (value: string) => void
178
+ onQueryChange?: (query: string | null) => void
179
+ onSelect?: (value: string) => void
180
+ /** @beta */
181
+ openButton?: boolean | AutocompleteOpenButtonProps
182
+ /** The options to render. */
183
+ options?: Option[]
184
+ padding?: number | number[]
185
+ popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> &
186
+ Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>
187
+ prefix?: ReactNode
188
+ radius?: Radius | Radius[]
189
+ /** @beta */
190
+ relatedElements?: HTMLElement[]
191
+ /** The callback function for rendering each option. */
192
+ renderOption?: (option: Option) => ReactElement
193
+ /** @beta */
194
+ renderPopover?: (
195
+ props: {
196
+ content: ReactElement | null
197
+ hidden: boolean
198
+ inputElement: HTMLInputElement | null
199
+ onMouseEnter: () => void
200
+ onMouseLeave: () => void
201
+ },
202
+ ref: Ref<HTMLDivElement>,
203
+ ) => ReactNode
204
+ renderValue?: (value: string, option?: Option) => string
205
+ suffix?: ReactNode
206
+ /** The current value. */
207
+ value?: string
208
+ }
209
+
210
+ /**
211
+ * @internal
212
+ */
213
+ export declare interface AutocompleteRootBlurMsg {
214
+ type: 'root/blur'
215
+ }
216
+
217
+ /**
218
+ * @internal
219
+ */
220
+ export declare interface AutocompleteRootClearMsg {
221
+ type: 'root/clear'
222
+ }
223
+
224
+ /**
225
+ * @internal
226
+ */
227
+ export declare interface AutocompleteRootEscapeMsg {
228
+ type: 'root/escape'
229
+ }
230
+
231
+ /**
232
+ * @internal
233
+ */
234
+ export declare interface AutocompleteRootOpenMsg {
235
+ type: 'root/open'
236
+ query: string | null
237
+ }
238
+
239
+ /**
240
+ * @internal
241
+ */
242
+ export declare interface AutocompleteRootSetActiveValueMsg {
243
+ type: 'root/setActiveValue'
244
+ value: string
245
+ listFocused?: boolean
246
+ }
247
+
248
+ /**
249
+ * @internal
250
+ */
251
+ export declare interface AutocompleteRootSetListFocusedMsg {
252
+ type: 'root/setListFocused'
253
+ listFocused: boolean
254
+ }
255
+
256
+ /**
257
+ * @internal
258
+ */
259
+ export declare interface AutocompleteState {
260
+ activeValue: string | null
261
+ focused: boolean
262
+ listFocused: boolean
263
+ query: string | null
264
+ value: string | null
265
+ }
266
+
267
+ /**
268
+ * @internal
269
+ */
270
+ export declare interface AutocompleteValueChangeMsg {
271
+ type: 'value/change'
272
+ value: string | null
273
+ }
274
+
275
+ /**
276
+ * Avatars are used to represent people and other agents (e.g. bots).
277
+ *
278
+ * @public
279
+ */
280
+ export declare const Avatar: ForwardRefExoticComponent<
281
+ AvatarProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
282
+ >
283
+
284
+ /**
285
+ * @public
286
+ */
287
+ export declare const AvatarCounter: ForwardRefExoticComponent<
288
+ AvatarCounterProps & RefAttributes<HTMLDivElement>
289
+ >
290
+
291
+ /**
292
+ * @public
293
+ */
294
+ export declare interface AvatarCounterProps {
295
+ count: number
296
+ size?: AvatarSize | AvatarSize[]
297
+ /** @deprecated No longer supported. */
298
+ tone?: 'navbar'
299
+ }
300
+
301
+ /**
302
+ * @public
303
+ */
304
+ export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
305
+
306
+ /**
307
+ * @public
308
+ */
309
+ export declare interface AvatarProps {
310
+ /** @beta */
311
+ __unstable_hideInnerStroke?: boolean
312
+ animateArrowFrom?: AvatarPosition
313
+ arrowPosition?: AvatarPosition
314
+ as?: React.ElementType | keyof JSX.IntrinsicElements
315
+ color?: ThemeColorAvatarColorKey
316
+ initials?: string
317
+ onImageLoadError?: (event: Error) => void
318
+ size?: AvatarSize | AvatarSize[]
319
+ src?: string
320
+ /**
321
+ * The status of the entity this Avatar represents.
322
+ * @alpha
323
+ */
324
+ status?: AvatarStatus
325
+ title?: string
326
+ }
327
+
328
+ /**
329
+ * @internal
330
+ */
331
+ export declare interface AvatarRootStyleProps {
332
+ $color: ThemeColorAvatarColorKey
333
+ }
334
+
335
+ /**
336
+ * @public
337
+ */
338
+ export declare type AvatarSize = 0 | 1 | 2 | 3
339
+
340
+ /**
341
+ * @public
342
+ */
343
+ export declare const AvatarStack: ForwardRefExoticComponent<
344
+ AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
345
+ >
346
+
347
+ /**
348
+ * @public
349
+ */
350
+ export declare interface AvatarStackProps {
351
+ children: React.ReactNode
352
+ maxLength?: number
353
+ size?: AvatarSize | AvatarSize[]
354
+ /** @deprecated No longer supported. */
355
+ tone?: 'navbar'
356
+ }
357
+
358
+ /**
359
+ * @public
360
+ */
361
+ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
362
+
363
+ /**
364
+ * Badges are used to tag resources.
365
+ *
366
+ * @public
367
+ */
368
+ export declare const Badge: ForwardRefExoticComponent<
369
+ Omit<BadgeProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<unknown>
370
+ >
371
+
372
+ /**
373
+ * @public
374
+ * @deprecated No longer used
375
+ */
376
+ export declare type BadgeMode = 'default' | 'outline'
377
+
378
+ /**
379
+ * @public
380
+ */
381
+ export declare interface BadgeProps extends BoxProps, ResponsiveRadiusProps {
382
+ as?: React.ElementType | keyof JSX.IntrinsicElements
383
+ fontSize?: number | number[]
384
+ /** @deprecated No longer used. */
385
+ mode?: BadgeMode
386
+ tone?: BadgeTone
387
+ }
388
+
389
+ /**
390
+ * @public
391
+ */
392
+ export declare type BadgeTone = ThemeColorStateToneKey
393
+
394
+ /**
395
+ * @public
396
+ */
397
+ export declare interface BaseAutocompleteOption {
398
+ value: string
399
+ }
400
+
401
+ /**
402
+ * @public
403
+ * @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
404
+ */
405
+ export declare type BaseTheme = BaseTheme_2
406
+
407
+ /**
408
+ * @public
409
+ */
410
+ export declare interface BoundaryElementContextValue {
411
+ version: 0.0
412
+ element: HTMLElement | null
413
+ }
414
+
415
+ /**
416
+ * @public
417
+ */
418
+ export declare function BoundaryElementProvider(
419
+ props: BoundaryElementProviderProps,
420
+ ): React.ReactElement
421
+
422
+ /**
423
+ * @public
424
+ */
425
+ export declare interface BoundaryElementProviderProps {
426
+ children: React.ReactNode
427
+ element: HTMLElement | null
428
+ }
429
+
430
+ /**
431
+ * The `Box` component is a basic layout wrapper component which provides utility properties
432
+ * for flex, margins and padding.
433
+ *
434
+ * @public
435
+ */
436
+ export declare const Box: ForwardRefExoticComponent<
437
+ Omit<BoxProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
438
+ RefAttributes<HTMLDivElement>
439
+ >
440
+
441
+ /**
442
+ * @public
443
+ */
444
+ export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
445
+
446
+ /**
447
+ * @public
448
+ */
449
+ export declare type BoxHeight = 'stretch' | 'fill'
450
+
451
+ /**
452
+ * @public
453
+ */
454
+ export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
455
+
456
+ /**
457
+ * @public
458
+ */
459
+ export declare interface BoxProps
460
+ extends ResponsiveFlexItemProps,
461
+ ResponsiveBoxProps,
462
+ ResponsiveGridItemProps,
463
+ ResponsiveMarginProps,
464
+ ResponsivePaddingProps {
465
+ as?: React.ElementType | keyof JSX.IntrinsicElements
466
+ forwardedAs?: React.ElementType | keyof JSX.IntrinsicElements
467
+ }
468
+
469
+ /**
470
+ * @public
471
+ * @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
472
+ */
473
+ export declare type BoxShadow = ThemeBoxShadow
474
+
475
+ /**
476
+ * @public
477
+ */
478
+ export declare type BoxSizing = 'content' | 'border'
479
+
480
+ /**
481
+ * @beta
482
+ */
483
+ export declare const Breadcrumbs: ForwardRefExoticComponent<
484
+ BreadcrumbsProps &
485
+ Omit<HTMLProps<HTMLOListElement>, 'type' | 'ref' | 'as'> &
486
+ RefAttributes<HTMLOListElement>
487
+ >
488
+
489
+ /**
490
+ * @beta
491
+ */
492
+ export declare interface BreadcrumbsProps {
493
+ maxLength?: number
494
+ separator?: React.ReactNode
495
+ space?: number | number[]
496
+ }
497
+
498
+ /**
499
+ * @public
500
+ */
501
+ export declare const Button: ForwardRefExoticComponent<
502
+ Omit<ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'width' | 'as'>, 'ref'> &
503
+ RefAttributes<HTMLButtonElement>
504
+ >
505
+
506
+ /**
507
+ * @public
508
+ */
509
+ export declare type ButtonMode = ThemeColorButtonModeKey_2
510
+
511
+ /**
512
+ * @public
513
+ */
514
+ export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
515
+ as?: React.ElementType | keyof JSX.IntrinsicElements
516
+ fontSize?: number | number[]
517
+ mode?: ButtonMode
518
+ icon?: React.ElementType | React.ReactNode
519
+ iconRight?: React.ElementType | React.ReactNode
520
+ justify?: FlexJustify | FlexJustify[]
521
+ /**
522
+ * @beta Do not use in production, as this might change.
523
+ */
524
+ loading?: boolean
525
+ selected?: boolean
526
+ space?: number | number[]
527
+ textAlign?: ButtonTextAlign
528
+ muted?: boolean
529
+ text?: React.ReactNode
530
+ tone?: ButtonTone
531
+ type?: 'button' | 'reset' | 'submit'
532
+ width?: ButtonWidth
533
+ }
534
+
535
+ /**
536
+ * @public
537
+ */
538
+ export declare type ButtonTextAlign = 'left' | 'right' | 'center'
539
+
540
+ /**
541
+ * @public
542
+ */
543
+ export declare type ButtonTone = ThemeColorStateToneKey
544
+
545
+ /**
546
+ * @public
547
+ */
548
+ export declare type ButtonWidth = 'fill'
549
+
550
+ /**
551
+ * The `Card` component acts much like a `Box`, but with a background and foreground color.
552
+ * Components within a `Card` inherit its colors.
553
+ *
554
+ * @public
555
+ */
556
+ export declare const Card: ForwardRefExoticComponent<
557
+ Omit<CardProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
558
+ RefAttributes<HTMLDivElement>
559
+ >
560
+
561
+ /**
562
+ * @public
563
+ */
564
+ export declare interface CardProps
565
+ extends BoxProps,
566
+ ResponsiveBorderProps,
567
+ ResponsiveRadiusProps,
568
+ ResponsiveShadowProps {
569
+ /**
570
+ * Do not use in production.
571
+ * @beta
572
+ */
573
+ __unstable_checkered?: boolean
574
+ /**
575
+ * Do not use in production.
576
+ * @beta
577
+ */
578
+ __unstable_focusRing?: boolean
579
+ pressed?: boolean
580
+ scheme?: ThemeColorSchemeKey_2
581
+ tone?: CardTone
582
+ }
583
+
584
+ /**
585
+ * @internal
586
+ */
587
+ export declare interface CardStyleProps {
588
+ $checkered: boolean
589
+ $focusRing: boolean
590
+ $tone: ThemeColorToneKey
591
+ }
592
+
593
+ /**
594
+ * @public
595
+ */
596
+ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
597
+
598
+ /**
599
+ * Checkboxes allow the user to select one or more items from a set.
600
+ *
601
+ * @public
602
+ */
603
+ export declare const Checkbox: ForwardRefExoticComponent<
604
+ Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & CheckboxProps, 'ref'> &
605
+ RefAttributes<HTMLInputElement>
606
+ >
607
+
608
+ /**
609
+ * @public
610
+ */
611
+ export declare interface CheckboxProps {
612
+ indeterminate?: boolean
613
+ customValidity?: string
614
+ }
615
+
616
+ /**
617
+ * @public
618
+ */
619
+ export declare type ClickOutsideListener = (event: MouseEvent) => void
620
+
621
+ /**
622
+ * @public
623
+ */
624
+ export declare const Code: ForwardRefExoticComponent<
625
+ Omit<CodeProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> & RefAttributes<HTMLElement>
626
+ >
627
+
628
+ /**
629
+ * @public
630
+ */
631
+ export declare interface CodeProps {
632
+ as?: React.ElementType | keyof JSX.IntrinsicElements
633
+ /** Define the language to use for syntax highlighting. */
634
+ language?: string
635
+ size?: number | number[]
636
+ weight?: string
637
+ }
638
+
639
+ /**
640
+ * This API might change. DO NOT USE IN PRODUCTION.
641
+ * @beta
642
+ */
643
+ export declare const CodeSkeleton: ForwardRefExoticComponent<
644
+ Omit<
645
+ CodeSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'children' | 'size' | 'as'>,
646
+ 'ref'
647
+ > &
648
+ RefAttributes<HTMLDivElement>
649
+ >
650
+
651
+ /**
652
+ * This API might change. DO NOT USE IN PRODUCTION.
653
+ * @beta
654
+ */
655
+ export declare interface CodeSkeletonProps extends SkeletonProps {
656
+ size?: number | number[]
657
+ }
658
+
659
+ /**
660
+ * @internal
661
+ */
662
+ export declare function ConditionalWrapper({
663
+ children,
664
+ condition,
665
+ wrapper,
666
+ }: {
667
+ children: React.ReactNode
668
+ condition: boolean
669
+ wrapper: (children: React.ReactNode) => React.ReactNode
670
+ }): React.ReactNode
671
+
672
+ /**
673
+ * The `Container` component wraps content layout in a defined set of widths.
674
+ *
675
+ * @public
676
+ */
677
+ export declare const Container: ForwardRefExoticComponent<
678
+ Omit<ContainerProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'as'>, 'ref'> &
679
+ RefAttributes<HTMLDivElement>
680
+ >
681
+
682
+ /**
683
+ * @public
684
+ */
685
+ export declare interface ContainerProps extends BoxProps, ResponsiveWidthProps {}
686
+
687
+ /**
688
+ * @internal
689
+ */
690
+ export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
691
+
692
+ /**
693
+ * @public
694
+ * @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
695
+ */
696
+ export declare const createColorTheme: any
697
+
698
+ /**
699
+ * @public
700
+ */
701
+ export declare type Delay =
702
+ | number
703
+ | Partial<{
704
+ open: number
705
+ close: number
706
+ }>
707
+
708
+ /**
709
+ * The Dialog component.
710
+ *
711
+ * @public
712
+ */
713
+ export declare const Dialog: ForwardRefExoticComponent<
714
+ Omit<DialogProps & Omit<HTMLProps<HTMLDivElement>, 'width' | 'id' | 'as'>, 'ref'> &
715
+ RefAttributes<HTMLDivElement>
716
+ >
717
+
718
+ /**
719
+ * @internal
720
+ */
721
+ export declare const DialogContext: React.Context<DialogContextValue>
722
+
723
+ /**
724
+ * This API might change. DO NOT USE IN PRODUCTION.
725
+ * @beta
726
+ */
727
+ export declare interface DialogContextValue {
728
+ version: 0.0
729
+ position?: DialogPosition | DialogPosition[]
730
+ zOffset?: number | number[]
731
+ }
732
+
733
+ /**
734
+ * @public
735
+ */
736
+ export declare type DialogPosition = 'absolute' | 'fixed'
737
+
738
+ /**
739
+ * @public
740
+ */
741
+ export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
742
+ /**
743
+ * @beta
744
+ */
745
+ __unstable_autoFocus?: boolean
746
+ /**
747
+ * @beta
748
+ */
749
+ __unstable_hideCloseButton?: boolean
750
+ cardRadius?: Radius | Radius[]
751
+ cardShadow?: number | number[]
752
+ contentRef?: React.ForwardedRef<HTMLDivElement>
753
+ footer?: React.ReactNode
754
+ header?: React.ReactNode
755
+ id: string
756
+ /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
757
+ onActivate?: LayerProps['onActivate']
758
+ onClickOutside?: () => void
759
+ onClose?: () => void
760
+ portal?: string
761
+ position?: DialogPosition | DialogPosition[]
762
+ scheme?: ThemeColorSchemeKey_2
763
+ zOffset?: number | number[]
764
+ /**
765
+ * Whether the dialog should animate in on mount.
766
+ *
767
+ * @beta
768
+ * @defaultValue false
769
+ */
770
+ animate?: boolean
771
+ }
772
+
773
+ /**
774
+ * This API might change. DO NOT USE IN PRODUCTION.
775
+ * @beta
776
+ */
777
+ export declare function DialogProvider(props: DialogProviderProps): React.ReactElement
778
+
779
+ /**
780
+ * This API might change. DO NOT USE IN PRODUCTION.
781
+ * @beta
782
+ */
783
+ export declare interface DialogProviderProps {
784
+ children?: React.ReactNode
785
+ position?: DialogPosition | DialogPosition[]
786
+ zOffset?: number | number[]
787
+ }
788
+
789
+ /**
790
+ * DO NOT USE IN PRODUCTION.
791
+ * @beta
792
+ */
793
+ export declare const ElementQuery: ForwardRefExoticComponent<
794
+ Omit<MediaQueryProps & Omit<HTMLProps<HTMLDivElement>, 'media' | 'as'>, 'ref'> &
795
+ RefAttributes<HTMLDivElement>
796
+ >
797
+
798
+ /**
799
+ * @beta
800
+ */
801
+ export declare interface ElementRectValue {
802
+ width: number
803
+ height: number
804
+ }
805
+
806
+ /**
807
+ * @beta
808
+ */
809
+ export declare interface ElementSize {
810
+ content: ElementRectValue
811
+ border: ElementRectValue
812
+ /** @deprecated INTERNAL ONLY */
813
+ _contentRect: DOMRectReadOnly
814
+ }
815
+
816
+ /**
817
+ * @internal
818
+ */
819
+ export declare interface _ElementSizeListener {
820
+ subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
821
+ }
822
+
823
+ /**
824
+ * @internal
825
+ */
826
+ export declare interface _ElementSizeObserver {
827
+ subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
828
+ }
829
+
830
+ /**
831
+ * @internal
832
+ */
833
+ export declare const _elementSizeObserver: _ElementSizeObserver
834
+
835
+ /**
836
+ * @internal
837
+ */
838
+ export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
839
+
840
+ /**
841
+ * DO NOT USE IN PRODUCTION
842
+ * @beta
843
+ */
844
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
845
+ state: ErrorBoundaryState
846
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState
847
+ componentDidCatch(error: Error, info: React.ErrorInfo): void
848
+ render(): React.ReactNode
849
+ }
850
+
851
+ /**
852
+ * DO NOT USE IN PRODUCTION
853
+ * @beta
854
+ */
855
+ export declare type ErrorBoundaryProps = PropsWithChildren<{
856
+ onCatch: (params: {error: Error; info: React.ErrorInfo}) => void
857
+ }>
858
+
859
+ /**
860
+ * DO NOT USE IN PRODUCTION
861
+ * @beta
862
+ */
863
+ export declare interface ErrorBoundaryState {
864
+ error: Error | null
865
+ }
866
+
867
+ /**
868
+ * @internal
869
+ */
870
+ export declare function _fillCSSObject(
871
+ keys: string[],
872
+ value: string | number | CSSObject,
873
+ ): CSSObject
874
+
875
+ /**
876
+ * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
877
+ *
878
+ * @public
879
+ */
880
+ export declare const Flex: ForwardRefExoticComponent<
881
+ Omit<FlexProps & Omit<HTMLProps<HTMLDivElement>, 'wrap' | 'as'>, 'ref'> &
882
+ RefAttributes<HTMLDivElement>
883
+ >
884
+
885
+ /**
886
+ * @public
887
+ */
888
+ export declare type FlexAlign = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'
889
+
890
+ /**
891
+ * @public
892
+ */
893
+ export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse'
894
+
895
+ /**
896
+ * @public
897
+ */
898
+ export declare type FlexJustify =
899
+ | 'flex-start'
900
+ | 'flex-end'
901
+ | 'center'
902
+ | 'space-between'
903
+ | 'space-around'
904
+ | 'space-evenly'
905
+
906
+ /**
907
+ * @public
908
+ */
909
+ export declare interface FlexProps
910
+ extends Omit<BoxProps, 'display'>,
911
+ ResponsiveFlexProps,
912
+ ResponsiveFlexItemProps {
913
+ gap?: number | number[]
914
+ }
915
+
916
+ /**
917
+ * @public
918
+ */
919
+ export declare type FlexValue = number | 'none' | 'auto' | 'initial'
920
+
921
+ /**
922
+ * @public
923
+ */
924
+ export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
925
+
926
+ /**
927
+ * @internal
928
+ */
929
+ export declare function focusFirstDescendant(element: HTMLElement): boolean
930
+
931
+ /**
932
+ * @internal
933
+ */
934
+ export declare function focusLastDescendant(element: HTMLElement): boolean
935
+
936
+ /**
937
+ * @internal
938
+ */
939
+ export declare interface FontWeightStyleProps {
940
+ $weight?: ThemeFontWeightKey_2
941
+ }
942
+
943
+ /**
944
+ * @internal
945
+ */
946
+ export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[]
947
+
948
+ /**
949
+ * @internal
950
+ */
951
+ export declare function _getResponsiveSpace(
952
+ theme: Theme_2,
953
+ props: string[],
954
+ spaceIndexes?: number[],
955
+ ): CSSObject[] | null
956
+
957
+ /**
958
+ * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
959
+ *
960
+ * @public
961
+ */
962
+ export declare const Grid: ForwardRefExoticComponent<
963
+ Omit<GridProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'rows'>, 'ref'> &
964
+ RefAttributes<HTMLDivElement>
965
+ >
966
+
967
+ /**
968
+ * @public
969
+ */
970
+ export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
971
+
972
+ /**
973
+ * @public
974
+ */
975
+ export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
976
+
977
+ /**
978
+ * @public
979
+ */
980
+ export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
981
+
982
+ /**
983
+ * @public
984
+ */
985
+ export declare type GridItemColumn = 'auto' | 'full' | number
986
+
987
+ /**
988
+ * @public
989
+ */
990
+ export declare type GridItemColumnEnd = 'auto' | number
991
+
992
+ /**
993
+ * @public
994
+ */
995
+ export declare type GridItemColumnStart = 'auto' | number
996
+
997
+ /**
998
+ * @public
999
+ */
1000
+ export declare type GridItemRow = 'auto' | 'full' | number
1001
+
1002
+ /**
1003
+ * @public
1004
+ */
1005
+ export declare type GridItemRowEnd = 'auto' | number
1006
+
1007
+ /**
1008
+ * @public
1009
+ */
1010
+ export declare type GridItemRowStart = 'auto' | number
1011
+
1012
+ /**
1013
+ * @public
1014
+ */
1015
+ export declare interface GridProps extends Omit<BoxProps, 'display'>, ResponsiveGridProps {}
1016
+
1017
+ /**
1018
+ * @internal
1019
+ */
1020
+ export declare function _hasFocus(element: HTMLElement): boolean
1021
+
1022
+ /**
1023
+ * Typographic headings.
1024
+ *
1025
+ * @public
1026
+ */
1027
+ export declare const Heading: ForwardRefExoticComponent<
1028
+ Omit<HeadingProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> &
1029
+ RefAttributes<HTMLElement>
1030
+ >
1031
+
1032
+ /**
1033
+ * @public
1034
+ */
1035
+ export declare interface HeadingProps {
1036
+ accent?: boolean
1037
+ align?: TextAlign | TextAlign[]
1038
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1039
+ muted?: boolean
1040
+ size?: number | number[]
1041
+ /**
1042
+ * Controls how overflowing text is treated.
1043
+ * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1044
+ * @beta
1045
+ */
1046
+ textOverflow?: 'ellipsis'
1047
+ weight?: ThemeFontWeightKey_2
1048
+ }
1049
+
1050
+ /**
1051
+ * This API might change. DO NOT USE IN PRODUCTION.
1052
+ * @beta
1053
+ */
1054
+ export declare const HeadingSkeleton: ForwardRefExoticComponent<
1055
+ Omit<
1056
+ HeadingSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'children' | 'size' | 'as'>,
1057
+ 'ref'
1058
+ > &
1059
+ RefAttributes<HTMLDivElement>
1060
+ >
1061
+
1062
+ /**
1063
+ * This API might change. DO NOT USE IN PRODUCTION.
1064
+ * @beta
1065
+ */
1066
+ export declare interface HeadingSkeletonProps extends SkeletonProps {
1067
+ size?: number | number[]
1068
+ }
1069
+
1070
+ /**
1071
+ * @public
1072
+ * @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
1073
+ */
1074
+ export declare const hexToRgb: any
1075
+
1076
+ /**
1077
+ * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
1078
+ *
1079
+ * @public
1080
+ */
1081
+ export declare const Hotkeys: ForwardRefExoticComponent<
1082
+ HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLElement>
1083
+ >
1084
+
1085
+ /**
1086
+ * @public
1087
+ */
1088
+ export declare interface HotkeysProps {
1089
+ fontSize?: number | number[]
1090
+ padding?: number | number[]
1091
+ radius?: Radius | Radius[]
1092
+ space?: number | number[]
1093
+ keys?: string[]
1094
+ }
1095
+
1096
+ /**
1097
+ * @public
1098
+ * @deprecated Use `HSL` from `@sanity/ui/theme` instead.
1099
+ */
1100
+ export declare type HSL = HSL_2
1101
+
1102
+ /**
1103
+ * @public
1104
+ * @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
1105
+ */
1106
+ export declare const hslToRgb: any
1107
+
1108
+ /**
1109
+ * The `Inline` component is a layout utility for aligning and spacing items horizontally.
1110
+ *
1111
+ * @public
1112
+ */
1113
+ export declare const Inline: ForwardRefExoticComponent<
1114
+ Omit<InlineProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<unknown>
1115
+ >
1116
+
1117
+ /**
1118
+ * @public
1119
+ */
1120
+ export declare interface InlineProps extends Omit<BoxProps, 'display'> {
1121
+ /** The spacing between children. */
1122
+ space?: number | number[]
1123
+ }
1124
+
1125
+ /**
1126
+ * @internal
1127
+ */
1128
+ export declare function _isEnterToClickElement(element: HTMLElement): boolean
1129
+
1130
+ /**
1131
+ * @internal
1132
+ */
1133
+ export declare function isFocusable(element: HTMLElement): boolean
1134
+
1135
+ /**
1136
+ * @internal
1137
+ */
1138
+ export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
1139
+
1140
+ /**
1141
+ * @internal
1142
+ */
1143
+ export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement
1144
+
1145
+ /**
1146
+ * @internal
1147
+ */
1148
+ export declare function isHTMLElement(node: unknown): node is HTMLElement
1149
+
1150
+ /**
1151
+ * @internal
1152
+ */
1153
+ export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement
1154
+
1155
+ /**
1156
+ * @internal
1157
+ */
1158
+ export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement
1159
+
1160
+ /**
1161
+ * @internal
1162
+ */
1163
+ export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement
1164
+
1165
+ /**
1166
+ * @internal
1167
+ */
1168
+ export declare function _isScrollable(el: Node): boolean
1169
+
1170
+ /**
1171
+ * Used to define some text as keyboard input.
1172
+ *
1173
+ * @public
1174
+ */
1175
+ export declare const KBD: ForwardRefExoticComponent<
1176
+ KBDProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLDivElement>
1177
+ >
1178
+
1179
+ /**
1180
+ * @public
1181
+ */
1182
+ export declare interface KBDProps {
1183
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1184
+ fontSize?: number | number[]
1185
+ padding?: number | number[]
1186
+ radius?: Radius | Radius[]
1187
+ }
1188
+
1189
+ /**
1190
+ * Typographic labels.
1191
+ *
1192
+ * @public
1193
+ */
1194
+ export declare const Label: ForwardRefExoticComponent<
1195
+ Omit<LabelProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
1196
+ RefAttributes<HTMLDivElement>
1197
+ >
1198
+
1199
+ /**
1200
+ * @public
1201
+ */
1202
+ export declare interface LabelProps {
1203
+ accent?: boolean
1204
+ align?: TextAlign | TextAlign[]
1205
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1206
+ muted?: boolean
1207
+ size?: number | number[]
1208
+ /**
1209
+ * Controls how overflowing text is treated.
1210
+ * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1211
+ * @beta
1212
+ */
1213
+ textOverflow?: 'ellipsis'
1214
+ weight?: ThemeFontWeightKey_2
1215
+ }
1216
+
1217
+ /**
1218
+ * This API might change. DO NOT USE IN PRODUCTION.
1219
+ * @beta
1220
+ */
1221
+ export declare const LabelSkeleton: ForwardRefExoticComponent<
1222
+ Omit<
1223
+ LabelSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'children' | 'size' | 'as'>,
1224
+ 'ref'
1225
+ > &
1226
+ RefAttributes<HTMLDivElement>
1227
+ >
1228
+
1229
+ /**
1230
+ * This API might change. DO NOT USE IN PRODUCTION.
1231
+ * @beta
1232
+ */
1233
+ export declare interface LabelSkeletonProps extends SkeletonProps {
1234
+ size?: number | number[]
1235
+ }
1236
+
1237
+ /**
1238
+ * @public
1239
+ */
1240
+ export declare const Layer: ForwardRefExoticComponent<
1241
+ Omit<LayerProps & Omit<HTMLProps<HTMLDivElement>, 'as'>, 'ref'> & RefAttributes<HTMLDivElement>
1242
+ >
1243
+
1244
+ /** @public */
1245
+ export declare interface LayerContextValue {
1246
+ version: 0.0
1247
+ isTopLayer: boolean
1248
+ level?: number
1249
+ registerChild: (childLevel?: number) => () => void
1250
+ size: number
1251
+ zIndex: number
1252
+ }
1253
+
1254
+ /**
1255
+ * @public
1256
+ */
1257
+ export declare interface LayerProps {
1258
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1259
+ /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1260
+ onActivate?: (props: {activeElement: HTMLElement | null}) => void
1261
+ zOffset?: number | number[]
1262
+ }
1263
+
1264
+ /**
1265
+ * @public
1266
+ */
1267
+ export declare function LayerProvider(props: LayerProviderProps): React.ReactElement
1268
+
1269
+ /**
1270
+ * @public
1271
+ */
1272
+ export declare interface LayerProviderProps {
1273
+ children?: React.ReactNode
1274
+ zOffset?: number | number[]
1275
+ }
1276
+
1277
+ /**
1278
+ * DO NOT USE IN PRODUCTION.
1279
+ * @beta
1280
+ */
1281
+ export declare interface MediaQueryProps {
1282
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1283
+ media?: number[]
1284
+ }
1285
+
1286
+ /**
1287
+ * @internal
1288
+ */
1289
+ export declare interface _MediaStore {
1290
+ subscribe: (onStoreChange: () => void) => () => void
1291
+ getSnapshot: () => number
1292
+ }
1293
+
1294
+ /**
1295
+ * The `Menu` component is a building block for application menus.
1296
+ *
1297
+ * @public
1298
+ */
1299
+ export declare const Menu: ForwardRefExoticComponent<
1300
+ Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'role' | 'tabIndex' | 'as'>, 'ref'> &
1301
+ RefAttributes<HTMLDivElement>
1302
+ >
1303
+
1304
+ /**
1305
+ * The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
1306
+ *
1307
+ * @public
1308
+ */
1309
+ export declare const MenuButton: ForwardRefExoticComponent<
1310
+ MenuButtonProps & RefAttributes<HTMLButtonElement | null>
1311
+ >
1312
+
1313
+ /**
1314
+ * @public
1315
+ */
1316
+ export declare interface MenuButtonProps {
1317
+ /**
1318
+ * @beta Do not use in production.
1319
+ */
1320
+ __unstable_disableRestoreFocusOnClose?: boolean
1321
+ /**
1322
+ * @deprecated Use `popover={{boundaryElement: element}}` instead.
1323
+ */
1324
+ boundaryElement?: HTMLElement
1325
+ button: React.ReactElement
1326
+ id: string
1327
+ menu?: React.ReactElement
1328
+ onClose?: () => void
1329
+ onOpen?: () => void
1330
+ /**
1331
+ * @deprecated Use `popover={{placement: 'top'}}` instead.
1332
+ */
1333
+ placement?: Placement
1334
+ popover?: Omit<PopoverProps, 'content' | 'open'>
1335
+ /**
1336
+ * @deprecated Use `popover={{scheme: 'dark'}}` instead.
1337
+ */
1338
+ popoverScheme?: ThemeColorSchemeKey_2
1339
+ /**
1340
+ * @deprecated Use `popover={{radius: 2}}` instead.
1341
+ */
1342
+ popoverRadius?: Radius | Radius[]
1343
+ /**
1344
+ * @beta Do not use in production.
1345
+ * @deprecated Use `popover={{portal: true}}` instead.
1346
+ */
1347
+ portal?: boolean
1348
+ /**
1349
+ * @deprecated Use `popover={{preventOverflow: true}}` instead.
1350
+ */
1351
+ preventOverflow?: boolean
1352
+ }
1353
+
1354
+ /**
1355
+ * @public
1356
+ */
1357
+ export declare const MenuDivider: IStyledComponent<
1358
+ 'web',
1359
+ FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLHRElement>, HTMLHRElement>, never>
1360
+ >
1361
+
1362
+ /**
1363
+ * @public
1364
+ */
1365
+ export declare function MenuGroup(
1366
+ props: MenuGroupProps &
1367
+ Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'tabIndex'>,
1368
+ ): React.ReactElement
1369
+
1370
+ /**
1371
+ * @public
1372
+ */
1373
+ export declare interface MenuGroupProps {
1374
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1375
+ fontSize?: number | number[]
1376
+ icon?: React.ElementType | React.ReactNode
1377
+ padding?: number | number[]
1378
+ popover?: Omit<PopoverProps, 'content' | 'open'>
1379
+ radius?: Radius | Radius[]
1380
+ space?: number | number[]
1381
+ text: React.ReactNode
1382
+ tone?: SelectableTone
1383
+ }
1384
+
1385
+ /**
1386
+ * @public
1387
+ */
1388
+ export declare const MenuItem: ForwardRefExoticComponent<
1389
+ MenuItemProps &
1390
+ Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'ref' | 'as' | 'selected'> &
1391
+ RefAttributes<HTMLDivElement>
1392
+ >
1393
+
1394
+ /**
1395
+ * @public
1396
+ */
1397
+ export declare interface MenuItemProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
1398
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1399
+ fontSize?: number | number[]
1400
+ hotkeys?: string[]
1401
+ icon?: React.ElementType | React.ReactNode
1402
+ iconRight?: React.ElementType | React.ReactNode
1403
+ pressed?: boolean
1404
+ selected?: boolean
1405
+ space?: number | number[]
1406
+ text?: React.ReactNode
1407
+ tone?: SelectableTone
1408
+ }
1409
+
1410
+ /**
1411
+ * @public
1412
+ */
1413
+ export declare interface MenuProps extends ResponsivePaddingProps {
1414
+ /**
1415
+ * @deprecated Use `shouldFocus="first"` instead.
1416
+ */
1417
+ focusFirst?: boolean
1418
+ /**
1419
+ * @deprecated Use `shouldFocus="last"` instead.
1420
+ */
1421
+ focusLast?: boolean
1422
+ onClickOutside?: (event: MouseEvent) => void
1423
+ onEscape?: () => void
1424
+ onItemClick?: () => void
1425
+ onItemSelect?: (index: number) => void
1426
+ originElement?: HTMLElement | null
1427
+ registerElement?: (el: HTMLElement) => () => void
1428
+ shouldFocus?: 'first' | 'last' | null
1429
+ space?: number | number[]
1430
+ }
1431
+
1432
+ /**
1433
+ * @public
1434
+ * @deprecated Use `multiply` from `@sanity/ui/theme` instead.
1435
+ */
1436
+ export declare const multiply: any
1437
+
1438
+ /**
1439
+ * @public
1440
+ * @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
1441
+ */
1442
+ export declare const parseColor: any
1443
+
1444
+ export {PartialThemeColorBuilderOpts}
1445
+
1446
+ /**
1447
+ * Placement of floating UI elements.
1448
+ *
1449
+ * @public
1450
+ */
1451
+ export declare type Placement =
1452
+ | 'top'
1453
+ | 'top-start'
1454
+ | 'top-end'
1455
+ | 'right'
1456
+ | 'right-start'
1457
+ | 'right-end'
1458
+ | 'bottom'
1459
+ | 'bottom-start'
1460
+ | 'bottom-end'
1461
+ | 'left'
1462
+ | 'left-start'
1463
+ | 'left-end'
1464
+
1465
+ /**
1466
+ * The `Popover` component is used to display some content on top of another.
1467
+ *
1468
+ * @public
1469
+ */
1470
+ export declare const Popover: MemoExoticComponent<
1471
+ ForwardRefExoticComponent<
1472
+ Omit<
1473
+ PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'children' | 'as'>,
1474
+ 'ref'
1475
+ > &
1476
+ RefAttributes<HTMLDivElement>
1477
+ >
1478
+ >
1479
+
1480
+ /**
1481
+ * @beta
1482
+ */
1483
+ export declare type PopoverMargins = [number, number, number, number]
1484
+
1485
+ /** @public */
1486
+ export declare interface PopoverProps
1487
+ extends Omit<LayerProps, 'as'>,
1488
+ ResponsiveRadiusProps,
1489
+ ResponsiveShadowProps {
1490
+ /** @beta */
1491
+ __unstable_margins?: PopoverMargins
1492
+ /**
1493
+ * Whether the popover should animate in and out.
1494
+ *
1495
+ * @beta
1496
+ * @defaultValue false
1497
+ */
1498
+ animate?: boolean
1499
+ arrow?: boolean
1500
+ /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
1501
+ boundaryElement?: HTMLElement | null
1502
+ children?: React.ReactElement
1503
+ /**
1504
+ * When `true`, prevent overflow within the current boundary:
1505
+ * - by flipping on its side axis
1506
+ * - by resizing
1507
+ /*
1508
+ * Note that:
1509
+ * - setting `preventOverflow` to `true` also prevents overflow on its side axis
1510
+ * - setting `matchReferenceWidth` to `true` also causes the popover to resize
1511
+ *
1512
+ * @defaultValue false
1513
+ */
1514
+ constrainSize?: boolean
1515
+ content?: React.ReactNode
1516
+ disabled?: boolean
1517
+ fallbackPlacements?: Placement[]
1518
+ floatingBoundary?: HTMLElement | null
1519
+ /**
1520
+ * When `true`, set the maximum width to match the reference element, and also prevent overflow within
1521
+ * the current boundary by resizing.
1522
+ *
1523
+ * Note that setting `constrainSize` to `true` also causes the popover to resize
1524
+ *
1525
+ * @defaultValue false
1526
+ */
1527
+ matchReferenceWidth?: boolean
1528
+ open?: boolean
1529
+ overflow?: BoxOverflow
1530
+ padding?: number | number[]
1531
+ placement?: Placement
1532
+ /** Whether or not to render the popover in a portal element. */
1533
+ portal?: boolean | string
1534
+ preventOverflow?: boolean
1535
+ referenceBoundary?: HTMLElement | null
1536
+ /**
1537
+ * When defined, the popover will be positioned relative to this element.
1538
+ * The children of the popover won't be rendered.
1539
+ */
1540
+ referenceElement?: HTMLElement | null
1541
+ scheme?: ThemeColorSchemeKey_2
1542
+ tone?: CardTone
1543
+ /** @beta */
1544
+ updateRef?:
1545
+ | MutableRefObject<PopoverUpdateCallback | undefined>
1546
+ | RefCallback<PopoverUpdateCallback | undefined>
1547
+ width?: PopoverWidth | PopoverWidth[]
1548
+ }
1549
+
1550
+ /** @beta */
1551
+ export declare type PopoverUpdateCallback = () => void
1552
+
1553
+ /** @public */
1554
+ export declare type PopoverWidth = number | 'auto'
1555
+
1556
+ /**
1557
+ * @public
1558
+ */
1559
+ export declare function Portal(props: PortalProps): React.ReactPortal | null
1560
+
1561
+ /**
1562
+ * @public
1563
+ */
1564
+ export declare interface PortalContextValue {
1565
+ version: 0.0
1566
+ boundaryElement: HTMLElement | null
1567
+ element: HTMLElement | null
1568
+ elements?: Record<string, HTMLElement | null | undefined>
1569
+ }
1570
+
1571
+ /**
1572
+ * @public
1573
+ */
1574
+ export declare interface PortalProps {
1575
+ children: React.ReactNode
1576
+ /**
1577
+ * @beta This API might change. DO NOT USE IN PRODUCTION.
1578
+ */
1579
+ __unstable_name?: string
1580
+ }
1581
+
1582
+ /**
1583
+ * @public
1584
+ */
1585
+ export declare function PortalProvider(props: PortalProviderProps): React.ReactElement
1586
+
1587
+ /**
1588
+ * @public
1589
+ */
1590
+ export declare interface PortalProviderProps {
1591
+ /**
1592
+ * @deprecated Use `<BoundaryElementProvider element={...} />` instead
1593
+ */
1594
+ boundaryElement?: HTMLElement | null
1595
+ children: React.ReactNode
1596
+ element?: HTMLElement | null
1597
+ /**
1598
+ * @beta
1599
+ */
1600
+ __unstable_elements?: Record<string, HTMLElement | null | undefined>
1601
+ }
1602
+
1603
+ /**
1604
+ * The `Radio` component allows the user to select one option from a set.
1605
+ *
1606
+ * @public
1607
+ */
1608
+ export declare const Radio: ForwardRefExoticComponent<
1609
+ Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & RadioProps, 'ref'> &
1610
+ RefAttributes<HTMLInputElement>
1611
+ >
1612
+
1613
+ /**
1614
+ * @public
1615
+ */
1616
+ export declare interface RadioProps {
1617
+ customValidity?: string
1618
+ }
1619
+
1620
+ /**
1621
+ * @public
1622
+ */
1623
+ export declare type Radius = number | 'full'
1624
+
1625
+ /**
1626
+ * @internal
1627
+ */
1628
+ export declare function _raf(fn: () => void): () => void
1629
+
1630
+ /**
1631
+ * @internal
1632
+ */
1633
+ export declare function _raf2(fn: () => void): () => void
1634
+
1635
+ /**
1636
+ * @public
1637
+ */
1638
+ export declare function rem(pixelValue: number): string | 0
1639
+
1640
+ /**
1641
+ * @internal
1642
+ */
1643
+ export declare const _ResizeObserver: typeof ResizeObserver
1644
+
1645
+ /**
1646
+ * @internal
1647
+ */
1648
+ export declare function _responsive<T>(
1649
+ media: number[],
1650
+ values: T[],
1651
+ callback: (value: T, index: number, array: T[]) => CSSObject,
1652
+ ): CSSObject[]
1653
+
1654
+ /**
1655
+ * @internal
1656
+ */
1657
+ export declare interface ResponsiveAvatarSizeStyleProps {
1658
+ $size: AvatarSize[]
1659
+ }
1660
+
1661
+ /**
1662
+ * @public
1663
+ */
1664
+ export declare interface ResponsiveBorderProps {
1665
+ border?: boolean | boolean[]
1666
+ borderTop?: boolean | boolean[]
1667
+ borderRight?: boolean | boolean[]
1668
+ borderBottom?: boolean | boolean[]
1669
+ borderLeft?: boolean | boolean[]
1670
+ }
1671
+
1672
+ /**
1673
+ * @public
1674
+ */
1675
+ export declare interface ResponsiveBoxProps {
1676
+ display?: BoxDisplay | BoxDisplay[]
1677
+ height?: BoxHeight | BoxHeight[]
1678
+ overflow?: BoxOverflow | BoxOverflow[]
1679
+ sizing?: BoxSizing | BoxSizing[]
1680
+ }
1681
+
1682
+ /**
1683
+ * Get responsive CSS for the `code` font style.
1684
+ * @internal
1685
+ */
1686
+ export declare function responsiveCodeFontStyle(
1687
+ props: ResponsiveFontStyleProps & ThemeProps,
1688
+ ): CSSObject[]
1689
+
1690
+ /**
1691
+ * @public
1692
+ */
1693
+ export declare interface ResponsiveFlexItemProps {
1694
+ /** Sets the flex CSS attribute. The property is responsive. */
1695
+ flex?: FlexValue | FlexValue[]
1696
+ }
1697
+
1698
+ /**
1699
+ * @public
1700
+ */
1701
+ export declare interface ResponsiveFlexProps {
1702
+ align?: FlexAlign | FlexAlign[]
1703
+ direction?: FlexDirection | FlexDirection[]
1704
+ justify?: FlexJustify | FlexJustify[]
1705
+ wrap?: FlexWrap | FlexWrap[]
1706
+ }
1707
+
1708
+ /**
1709
+ * @internal
1710
+ */
1711
+ export declare interface ResponsiveFontSizeStyleProps {
1712
+ $size: number[]
1713
+ }
1714
+
1715
+ /**
1716
+ * @internal
1717
+ */
1718
+ export declare interface ResponsiveFontStyleProps
1719
+ extends FontWeightStyleProps,
1720
+ ResponsiveFontSizeStyleProps,
1721
+ ResponsiveTextAlignStyleProps {
1722
+ $accent?: boolean
1723
+ $muted?: boolean
1724
+ }
1725
+
1726
+ /**
1727
+ * @public
1728
+ */
1729
+ export declare interface ResponsiveGridItemProps {
1730
+ column?: GridItemColumn | GridItemColumn[]
1731
+ columnStart?: GridItemColumnStart | GridItemColumnStart[]
1732
+ columnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
1733
+ row?: GridItemRow | GridItemRow[]
1734
+ rowStart?: GridItemRowStart | GridItemRowStart[]
1735
+ rowEnd?: GridItemRowEnd | GridItemRowEnd[]
1736
+ }
1737
+
1738
+ /**
1739
+ * @public
1740
+ */
1741
+ export declare interface ResponsiveGridProps {
1742
+ autoRows?: GridAutoRows | GridAutoRows[]
1743
+ autoCols?: GridAutoCols | GridAutoCols[]
1744
+ autoFlow?: GridAutoFlow | GridAutoFlow[]
1745
+ columns?: number | number[]
1746
+ gap?: number | number[]
1747
+ gapX?: number | number[]
1748
+ gapY?: number | number[]
1749
+ rows?: number | number[]
1750
+ }
1751
+
1752
+ /**
1753
+ * Get responsive CSS for the `heading` font style.
1754
+ * @internal
1755
+ */
1756
+ export declare function responsiveHeadingFont(
1757
+ props: ResponsiveFontStyleProps & ThemeProps,
1758
+ ): CSSObject[]
1759
+
1760
+ /**
1761
+ * Get responsive CSS for the `label` font style.
1762
+ * @internal
1763
+ */
1764
+ export declare function responsiveLabelFont(
1765
+ props: ResponsiveFontStyleProps & ThemeProps,
1766
+ ): CSSObject[]
1767
+
1768
+ /**
1769
+ * @public
1770
+ */
1771
+ export declare interface ResponsiveMarginProps {
1772
+ /** Applies margins to all sides. The property is responsive. */
1773
+ margin?: number | number[]
1774
+ /** Applies margins to the left and right sides. The property is responsive. */
1775
+ marginX?: number | number[]
1776
+ /** Applies margins to the top and bottom sides. The property is responsive. */
1777
+ marginY?: number | number[]
1778
+ marginTop?: number | number[]
1779
+ marginRight?: number | number[]
1780
+ marginBottom?: number | number[]
1781
+ marginLeft?: number | number[]
1782
+ }
1783
+
1784
+ /**
1785
+ * @public
1786
+ */
1787
+ export declare interface ResponsivePaddingProps {
1788
+ padding?: number | number[]
1789
+ paddingX?: number | number[]
1790
+ paddingY?: number | number[]
1791
+ paddingTop?: number | number[]
1792
+ paddingRight?: number | number[]
1793
+ paddingBottom?: number | number[]
1794
+ paddingLeft?: number | number[]
1795
+ }
1796
+
1797
+ /**
1798
+ * @public
1799
+ */
1800
+ export declare interface ResponsiveRadiusProps {
1801
+ radius?: Radius | Radius[]
1802
+ }
1803
+
1804
+ /**
1805
+ * @public
1806
+ */
1807
+ export declare interface ResponsiveShadowProps {
1808
+ shadow?: number | number[]
1809
+ }
1810
+
1811
+ /**
1812
+ * Get responsive text align styles.
1813
+ * @internal
1814
+ */
1815
+ export declare function responsiveTextAlignStyle(
1816
+ props: ResponsiveTextAlignStyleProps & ThemeProps,
1817
+ ): CSSObject[]
1818
+
1819
+ /**
1820
+ * @internal
1821
+ */
1822
+ export declare interface ResponsiveTextAlignStyleProps {
1823
+ $align: TextAlign[]
1824
+ }
1825
+
1826
+ /**
1827
+ * Get responsive CSS for the `text` font style.
1828
+ * @internal
1829
+ */
1830
+ export declare function responsiveTextFont(
1831
+ props: ResponsiveFontStyleProps & ThemeProps,
1832
+ ): CSSObject[]
1833
+
1834
+ /**
1835
+ * @public
1836
+ */
1837
+ export declare interface ResponsiveWidthProps {
1838
+ width?: number | 'auto' | (number | 'auto')[]
1839
+ }
1840
+
1841
+ /**
1842
+ * @internal
1843
+ */
1844
+ export declare interface ResponsiveWidthStyleProps {
1845
+ $width: (number | 'auto')[]
1846
+ }
1847
+
1848
+ /**
1849
+ * @public
1850
+ * @deprecated Use `RGB` from `@sanity/ui/theme` instead.
1851
+ */
1852
+ export declare type RGB = RGB_2
1853
+
1854
+ /**
1855
+ * @public
1856
+ * @deprecated Use `rgba` from `@sanity/ui/theme` instead.
1857
+ */
1858
+ export declare const rgba: any
1859
+
1860
+ /**
1861
+ * @public
1862
+ * @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
1863
+ */
1864
+ export declare const rgbToHex: any
1865
+
1866
+ /**
1867
+ * @public
1868
+ * @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
1869
+ */
1870
+ export declare const rgbToHsl: any
1871
+
1872
+ /**
1873
+ * @public
1874
+ * @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
1875
+ */
1876
+ export declare type RootTheme = RootTheme_2
1877
+
1878
+ /**
1879
+ * @public
1880
+ * @deprecated Use `screen` from `@sanity/ui/theme` instead.
1881
+ */
1882
+ declare const screen_2: any
1883
+ export {screen_2 as screen}
1884
+
1885
+ /**
1886
+ * The `Select` component provides control of options.
1887
+ *
1888
+ * @public
1889
+ */
1890
+ export declare const Select: ForwardRefExoticComponent<
1891
+ Omit<SelectProps & Omit<HTMLProps<HTMLSelectElement>, 'as'>, 'ref'> &
1892
+ RefAttributes<HTMLSelectElement>
1893
+ >
1894
+
1895
+ /**
1896
+ * @public
1897
+ */
1898
+ export declare type SelectableTone = ThemeColorStateToneKey
1899
+
1900
+ /**
1901
+ * @public
1902
+ */
1903
+ export declare interface SelectProps {
1904
+ fontSize?: number | number[]
1905
+ padding?: number | number[]
1906
+ radius?: Radius | Radius[]
1907
+ space?: number | number[]
1908
+ customValidity?: string
1909
+ }
1910
+
1911
+ /**
1912
+ * This API might change. DO NOT USE IN PRODUCTION.
1913
+ * @beta
1914
+ */
1915
+ export declare const Skeleton: ForwardRefExoticComponent<
1916
+ Omit<SkeletonProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>
1917
+ >
1918
+
1919
+ /**
1920
+ * This API might change. DO NOT USE IN PRODUCTION.
1921
+ * @beta
1922
+ */
1923
+ export declare interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxProps, 'children'> {
1924
+ animated?: boolean
1925
+ delay?: number
1926
+ }
1927
+
1928
+ /**
1929
+ * Indicate that something is loading for an indeterminate amount of time.
1930
+ *
1931
+ * @public
1932
+ */
1933
+ export declare const Spinner: ForwardRefExoticComponent<
1934
+ Omit<SpinnerProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
1935
+ RefAttributes<HTMLDivElement>
1936
+ >
1937
+
1938
+ /**
1939
+ * @public
1940
+ */
1941
+ export declare interface SpinnerProps {
1942
+ muted?: boolean
1943
+ size?: number | number[]
1944
+ }
1945
+
1946
+ /**
1947
+ * @public
1948
+ */
1949
+ export declare const SrOnly: ForwardRefExoticComponent<
1950
+ Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>, 'ref'> &
1951
+ RefAttributes<HTMLDivElement>
1952
+ >
1953
+
1954
+ /**
1955
+ * @public
1956
+ */
1957
+ export declare interface SrOnlyProps {
1958
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1959
+ children?: React.ReactNode
1960
+ }
1961
+
1962
+ /**
1963
+ * The `Stack` component is used to place elements on top of each other.
1964
+ *
1965
+ * @public
1966
+ */
1967
+ export declare const Stack: ForwardRefExoticComponent<
1968
+ StackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
1969
+ >
1970
+
1971
+ /**
1972
+ * @public
1973
+ */
1974
+ export declare interface StackProps extends BoxProps {
1975
+ as?: React.ElementType | keyof JSX.IntrinsicElements
1976
+ space?: number | number[]
1977
+ }
1978
+
1979
+ /**
1980
+ * @public
1981
+ * @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
1982
+ */
1983
+ export declare const studioTheme: any
1984
+
1985
+ /**
1986
+ * @public
1987
+ * @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
1988
+ */
1989
+ export declare type Styles = ThemeStyles
1990
+
1991
+ /**
1992
+ * The `Switch` component allows the user to toggle a setting on and off.
1993
+ *
1994
+ * Extends all properties of an `<input type="checkbox" />` element, except type.
1995
+ *
1996
+ * @public
1997
+ */
1998
+ export declare const Switch: ForwardRefExoticComponent<
1999
+ Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & SwitchProps, 'ref'> &
2000
+ RefAttributes<HTMLInputElement>
2001
+ >
2002
+
2003
+ /**
2004
+ * @public
2005
+ */
2006
+ export declare interface SwitchProps {
2007
+ indeterminate?: boolean
2008
+ }
2009
+
2010
+ /**
2011
+ * @public
2012
+ */
2013
+ export declare const Tab: ForwardRefExoticComponent<
2014
+ Omit<
2015
+ TabProps &
2016
+ Omit<
2017
+ HTMLProps<HTMLButtonElement>,
2018
+ 'width' | 'id' | 'type' | 'aria-controls' | 'label' | 'as'
2019
+ >,
2020
+ 'ref'
2021
+ > &
2022
+ RefAttributes<HTMLButtonElement>
2023
+ >
2024
+
2025
+ /**
2026
+ * @public
2027
+ */
2028
+ export declare const TabList: ForwardRefExoticComponent<
2029
+ Omit<TabListProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
2030
+ RefAttributes<unknown>
2031
+ >
2032
+
2033
+ /**
2034
+ * @public
2035
+ */
2036
+ export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
2037
+ children: Array<React.ReactElement | null | undefined | false>
2038
+ }
2039
+
2040
+ /**
2041
+ * @public
2042
+ */
2043
+ export declare const TabPanel: ForwardRefExoticComponent<
2044
+ Omit<
2045
+ TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'role' | 'aria-labelledby' | 'as'>,
2046
+ 'ref'
2047
+ > &
2048
+ RefAttributes<HTMLDivElement>
2049
+ >
2050
+
2051
+ /**
2052
+ * @public
2053
+ */
2054
+ export declare interface TabPanelProps extends BoxProps {
2055
+ /**
2056
+ * The `id` of the correlating `Tab` component.
2057
+ */
2058
+ 'aria-labelledby': string
2059
+ id: string
2060
+ }
2061
+
2062
+ /**
2063
+ * @public
2064
+ */
2065
+ export declare interface TabProps {
2066
+ /**
2067
+ * The `id` of the correlating `TabPanel` component.
2068
+ */
2069
+ 'aria-controls': string
2070
+ id: string
2071
+ icon?: React.ElementType | React.ReactNode
2072
+ focused?: boolean
2073
+ fontSize?: number | number[]
2074
+ label?: React.ReactNode
2075
+ padding?: number | number[]
2076
+ selected?: boolean
2077
+ tone?: ButtonTone
2078
+ }
2079
+
2080
+ /**
2081
+ * The `Text` component is an agile, themed typographic element.
2082
+ *
2083
+ * @public
2084
+ */
2085
+ declare const Text_2: ForwardRefExoticComponent<
2086
+ Omit<TextProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
2087
+ RefAttributes<HTMLDivElement>
2088
+ >
2089
+ export {Text_2 as Text}
2090
+
2091
+ /**
2092
+ * @public
2093
+ */
2094
+ export declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
2095
+
2096
+ /**
2097
+ * A multiline text input.
2098
+ *
2099
+
2100
+ * @public
2101
+ */
2102
+ export declare const TextArea: ForwardRefExoticComponent<
2103
+ Omit<TextAreaProps & Omit<HTMLProps<HTMLTextAreaElement>, 'as'>, 'ref'> &
2104
+ RefAttributes<HTMLTextAreaElement>
2105
+ >
2106
+
2107
+ /**
2108
+ * @public
2109
+ */
2110
+ export declare interface TextAreaProps extends ResponsiveRadiusProps {
2111
+ border?: boolean
2112
+ customValidity?: string
2113
+ fontSize?: number | number[]
2114
+ padding?: number | number[]
2115
+ weight?: ThemeFontWeightKey_2
2116
+ }
2117
+
2118
+ /**
2119
+ * Single line text input.
2120
+ *
2121
+ * @public
2122
+ */
2123
+ export declare const TextInput: ForwardRefExoticComponent<
2124
+ Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'prefix' | 'as'>, 'ref'> &
2125
+ RefAttributes<HTMLInputElement>
2126
+ >
2127
+
2128
+ /**
2129
+ * @public
2130
+ */
2131
+ export declare type TextInputClearButtonProps = Omit<ButtonProps, 'as'> &
2132
+ Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
2133
+
2134
+ /**
2135
+ * @public
2136
+ */
2137
+ export declare interface TextInputProps {
2138
+ /**
2139
+ * @beta
2140
+ */
2141
+ __unstable_disableFocusRing?: boolean
2142
+ border?: boolean
2143
+ /**
2144
+ * @beta
2145
+ */
2146
+ clearButton?: boolean | TextInputClearButtonProps
2147
+ customValidity?: string
2148
+ fontSize?: number | number[]
2149
+ icon?: React.ElementType | React.ReactNode
2150
+ iconRight?: React.ElementType | React.ReactNode
2151
+ /**
2152
+ * @beta
2153
+ */
2154
+ onClear?: () => void
2155
+ padding?: number | number[]
2156
+ prefix?: React.ReactNode
2157
+ radius?: Radius | Radius[]
2158
+ space?: number | number[]
2159
+ suffix?: React.ReactNode
2160
+ type?: TextInputType
2161
+ weight?: ThemeFontWeightKey_2
2162
+ }
2163
+
2164
+ /**
2165
+ * @public
2166
+ */
2167
+ export declare type TextInputType =
2168
+ | 'date'
2169
+ | 'datetime-local'
2170
+ | 'email'
2171
+ | 'url'
2172
+ | 'month'
2173
+ | 'number'
2174
+ | 'password'
2175
+ | 'tel'
2176
+ | 'time'
2177
+ | 'text'
2178
+ | 'week'
2179
+ | 'color'
2180
+
2181
+ /**
2182
+ * @public
2183
+ */
2184
+ export declare interface TextProps {
2185
+ accent?: boolean
2186
+ align?: TextAlign | TextAlign[]
2187
+ as?: React.ElementType | keyof JSX.IntrinsicElements
2188
+ /** When `true` the text color will be muted. */
2189
+ muted?: boolean
2190
+ size?: number | number[]
2191
+ /**
2192
+ * Controls how overflowing text is treated.
2193
+ * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
2194
+ * @beta
2195
+ */
2196
+ textOverflow?: 'ellipsis'
2197
+ weight?: ThemeFontWeightKey_2
2198
+ }
2199
+
2200
+ /**
2201
+ * This API might change. DO NOT USE IN PRODUCTION.
2202
+ * @beta
2203
+ */
2204
+ export declare const TextSkeleton: ForwardRefExoticComponent<
2205
+ Omit<
2206
+ TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'children' | 'size' | 'as'>,
2207
+ 'ref'
2208
+ > &
2209
+ RefAttributes<HTMLDivElement>
2210
+ >
2211
+
2212
+ /**
2213
+ * This API might change. DO NOT USE IN PRODUCTION.
2214
+ * @beta
2215
+ */
2216
+ export declare interface TextSkeletonProps extends SkeletonProps {
2217
+ size?: number | number[]
2218
+ }
2219
+
2220
+ /**
2221
+ * @public
2222
+ * @deprecated Use `Theme` from `@sanity/ui/theme` instead.
2223
+ */
2224
+ export declare type Theme = Theme_2
2225
+
2226
+ export {ThemeAvatar}
2227
+
2228
+ export {ThemeColor}
2229
+
2230
+ export {ThemeColorBase}
2231
+
2232
+ export {ThemeColorBuilderOpts}
2233
+
2234
+ export {ThemeColorButton}
2235
+
2236
+ /**
2237
+ * @public
2238
+ * @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
2239
+ */
2240
+ export declare type ThemeColorButtonModeKey = ThemeColorButtonModeKey_2
2241
+
2242
+ export {ThemeColorButtonState}
2243
+
2244
+ export {ThemeColorButtonStates}
2245
+
2246
+ export {ThemeColorButtonTones}
2247
+
2248
+ export {ThemeColorCard}
2249
+
2250
+ export {ThemeColorCardState}
2251
+
2252
+ export {ThemeColorGenericState}
2253
+
2254
+ export {ThemeColorInput}
2255
+
2256
+ export {ThemeColorInputState}
2257
+
2258
+ export {ThemeColorInputStates}
2259
+
2260
+ export {ThemeColorMuted}
2261
+
2262
+ export {ThemeColorMutedTone}
2263
+
2264
+ export {ThemeColorName}
2265
+
2266
+ /**
2267
+ * @public
2268
+ */
2269
+ export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement
2270
+
2271
+ /**
2272
+ * @public
2273
+ */
2274
+ export declare interface ThemeColorProviderProps {
2275
+ children?: React.ReactNode
2276
+ scheme?: ThemeColorSchemeKey_2
2277
+ tone?: ThemeColorCardToneKey
2278
+ }
2279
+
2280
+ export {ThemeColorScheme}
2281
+
2282
+ /**
2283
+ * @public
2284
+ * @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
2285
+ */
2286
+ export declare type ThemeColorSchemeKey = ThemeColorSchemeKey_2
2287
+
2288
+ export {ThemeColorSchemes}
2289
+
2290
+ export {ThemeColorSelectable}
2291
+
2292
+ export {ThemeColorSelectableState}
2293
+
2294
+ export {ThemeColorSelectableStates}
2295
+
2296
+ export {ThemeColorSolid}
2297
+
2298
+ export {ThemeColorSolidTone}
2299
+
2300
+ export {ThemeColorSpot}
2301
+
2302
+ export {ThemeColorSpotKey}
2303
+
2304
+ /**
2305
+ * @public
2306
+ * @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
2307
+ */
2308
+ export declare type ThemeColorSyntax = ThemeColorSyntax_2
2309
+
2310
+ export {ThemeColorToneKey}
2311
+
2312
+ /**
2313
+ * @public
2314
+ */
2315
+ export declare interface ThemeContextValue {
2316
+ /** @deprecated No longer used */
2317
+ version: 0.0
2318
+ scheme: ThemeColorSchemeKey_2
2319
+ theme: RootTheme_2
2320
+ tone: ThemeColorCardToneKey
2321
+ }
2322
+
2323
+ /**
2324
+ * @public
2325
+ * @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
2326
+ */
2327
+ export declare type ThemeFont = ThemeFont_2
2328
+
2329
+ /**
2330
+ * @public
2331
+ * @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
2332
+ */
2333
+ export declare type ThemeFontKey = ThemeFontKey_2
2334
+
2335
+ /**
2336
+ * @public
2337
+ * @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
2338
+ */
2339
+ export declare type ThemeFonts = ThemeFonts_2
2340
+
2341
+ /**
2342
+ * @public
2343
+ * @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
2344
+ */
2345
+ export declare type ThemeFontSize = ThemeFontSize_2
2346
+
2347
+ /**
2348
+ * @public
2349
+ * @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
2350
+ */
2351
+ export declare type ThemeFontWeight = ThemeFontWeight_2
2352
+
2353
+ /**
2354
+ * @public
2355
+ * @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
2356
+ */
2357
+ export declare type ThemeFontWeightKey = ThemeFontWeightKey_2
2358
+
2359
+ export {ThemeInput}
2360
+
2361
+ /**
2362
+ * @public
2363
+ * @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
2364
+ */
2365
+ export declare type ThemeLayer = ThemeLayer_2
2366
+
2367
+ /**
2368
+ * @internal
2369
+ */
2370
+ export declare interface ThemeProps {
2371
+ theme: Theme_2
2372
+ }
2373
+
2374
+ /**
2375
+ * @public
2376
+ */
2377
+ export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement
2378
+
2379
+ /**
2380
+ * @public
2381
+ */
2382
+ export declare interface ThemeProviderProps {
2383
+ children?: React.ReactNode
2384
+ scheme?: ThemeColorSchemeKey_2
2385
+ theme?: RootTheme_2
2386
+ tone?: ThemeColorCardToneKey
2387
+ }
2388
+
2389
+ /**
2390
+ * @public
2391
+ * @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
2392
+ */
2393
+ export declare type ThemeShadow = ThemeShadow_2
2394
+
2395
+ /**
2396
+ * The `Toast` component gives feedback to users when an action has taken place.
2397
+ *
2398
+ * Toasts can be closed with a close button, or auto-dismiss after a certain timeout.
2399
+ *
2400
+ * @public
2401
+ */
2402
+ export declare function Toast(
2403
+ props: ToastProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'title'>,
2404
+ ): React.ReactElement
2405
+
2406
+ /**
2407
+ * @public
2408
+ */
2409
+ export declare interface ToastContextValue {
2410
+ version: 0.0
2411
+ push: (params: ToastParams) => string
2412
+ }
2413
+
2414
+ /**
2415
+ * @public
2416
+ */
2417
+ export declare interface ToastParams {
2418
+ closable?: boolean
2419
+ description?: React.ReactNode
2420
+ duration?: number
2421
+ id?: string
2422
+ onClose?: () => void
2423
+ title?: React.ReactNode
2424
+ status?: 'error' | 'warning' | 'success' | 'info'
2425
+ }
2426
+
2427
+ /**
2428
+ * @public
2429
+ */
2430
+ export declare interface ToastProps {
2431
+ closable?: boolean
2432
+ description?: React.ReactNode
2433
+ onClose?: () => void
2434
+ radius?: number | number[]
2435
+ title?: React.ReactNode
2436
+ status?: 'error' | 'warning' | 'success' | 'info'
2437
+ }
2438
+
2439
+ /**
2440
+ * @public
2441
+ */
2442
+ export declare function ToastProvider(props: ToastProviderProps): React.ReactElement
2443
+
2444
+ /**
2445
+ * @public
2446
+ */
2447
+ export declare interface ToastProviderProps {
2448
+ children?: React.ReactNode
2449
+ padding?: number | number[]
2450
+ paddingX?: number | number[]
2451
+ paddingY?: number | number[]
2452
+ zOffset?: number | number[]
2453
+ }
2454
+
2455
+ /**
2456
+ * Tooltips display information when hovering, focusing or tapping.
2457
+ *
2458
+ * @public
2459
+ */
2460
+ export declare const Tooltip: ForwardRefExoticComponent<
2461
+ Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'children' | 'as'>, 'ref'> &
2462
+ RefAttributes<HTMLDivElement>
2463
+ >
2464
+
2465
+ /**
2466
+ * @beta
2467
+ */
2468
+ export declare const TooltipDelayGroupContext: React.Context<TooltipDelayGroupContextValue | null>
2469
+
2470
+ /**
2471
+ * @beta
2472
+ */
2473
+ export declare interface TooltipDelayGroupContextValue {
2474
+ isGroupActive: boolean
2475
+ setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
2476
+ setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
2477
+ openDelay: number
2478
+ closeDelay: number
2479
+ openTooltipId: string | null
2480
+ }
2481
+
2482
+ /**
2483
+ * @public
2484
+ * Provides context for a group of tooltip elements that should share a delay
2485
+ * which temporarily becomes 1 ms after the first floating element of the group opens.
2486
+ */
2487
+ export declare function TooltipDelayGroupProvider(
2488
+ props: TooltipDelayGroupProviderProps,
2489
+ ): React.ReactElement
2490
+
2491
+ /**
2492
+ * @public
2493
+ * */
2494
+ export declare interface TooltipDelayGroupProviderProps {
2495
+ children?: React.ReactNode
2496
+ /**
2497
+ * Handles the delays to open or close a tooltip inside a group
2498
+ *
2499
+ * If only a `number` is passed, it will be used for both opening and closing.
2500
+ *
2501
+ * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2502
+ *
2503
+ * @public
2504
+ */
2505
+ delay: Delay
2506
+ }
2507
+
2508
+ /**
2509
+ * @public
2510
+ */
2511
+ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
2512
+ /** @deprecated Use `fallbackPlacements` instead. */
2513
+ allowedAutoPlacements?: Placement[]
2514
+ arrow?: boolean
2515
+ boundaryElement?: HTMLElement | null
2516
+ children?: React.ReactElement
2517
+ content?: React.ReactNode
2518
+ disabled?: boolean
2519
+ fallbackPlacements?: Placement[]
2520
+ padding?: number | number[]
2521
+ placement?: Placement
2522
+ /** Whether or not to render the tooltip in a portal element. */
2523
+ portal?: boolean | string
2524
+ radius?: number | number[]
2525
+ scheme?: ThemeColorSchemeKey_2
2526
+ shadow?: number | number[]
2527
+ /**
2528
+ * Adds a delay to open or close the tooltip.
2529
+ *
2530
+ * If only a `number` is passed, it will be used for both opening and closing.
2531
+ *
2532
+ * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2533
+ *
2534
+ * @public
2535
+ * @defaultValue 0
2536
+ */
2537
+ delay?: Delay
2538
+ /**
2539
+ * Whether the tooltip should animate in and out.
2540
+ *
2541
+ * @beta
2542
+ * @defaultValue false
2543
+ */
2544
+ animate?: boolean
2545
+ }
2546
+
2547
+ /**
2548
+ * This API might change. DO NOT USE IN PRODUCTION.
2549
+ * @beta
2550
+ */
2551
+ export declare const Tree: MemoExoticComponent<
2552
+ ForwardRefExoticComponent<
2553
+ TreeProps &
2554
+ Omit<HTMLProps<HTMLDivElement>, 'height' | 'role' | 'wrap' | 'ref' | 'as' | 'align'> &
2555
+ RefAttributes<HTMLDivElement>
2556
+ >
2557
+ >
2558
+
2559
+ /**
2560
+ * @beta
2561
+ */
2562
+ export declare interface TreeContextValue {
2563
+ version: 0.0
2564
+ focusedElement: HTMLElement | null
2565
+ level: number
2566
+ path: string[]
2567
+ registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
2568
+ setExpanded: (path: string, expanded: boolean) => void
2569
+ setFocusedElement: (focusedElement: HTMLElement | null) => void
2570
+ space: number | number[]
2571
+ state: TreeState
2572
+ }
2573
+
2574
+ /**
2575
+ * This API might change. DO NOT USE IN PRODUCTION.
2576
+ * @beta
2577
+ */
2578
+ export declare const TreeItem: NamedExoticComponent<
2579
+ TreeItemProps & Omit<HTMLProps<HTMLLIElement>, 'role' | 'ref' | 'as'>
2580
+ >
2581
+
2582
+ /**
2583
+ * @beta
2584
+ */
2585
+ export declare interface TreeItemProps {
2586
+ expanded?: boolean
2587
+ fontSize?: number | number[]
2588
+ icon?: React.ElementType
2589
+ /**
2590
+ * Allows passing a custom element type to the link component
2591
+ */
2592
+ linkAs?: BoxProps['as']
2593
+ padding?: number | number[]
2594
+ space?: number | number[]
2595
+ text?: React.ReactNode
2596
+ weight?: ThemeFontWeightKey_2
2597
+ }
2598
+
2599
+ /**
2600
+ * This API might change. DO NOT USE IN PRODUCTION.
2601
+ * @beta
2602
+ */
2603
+ export declare interface TreeProps {
2604
+ space?: number | number[]
2605
+ }
2606
+
2607
+ /**
2608
+ * @beta
2609
+ */
2610
+ export declare interface TreeState {
2611
+ [key: string]:
2612
+ | {
2613
+ element: HTMLElement
2614
+ expanded: boolean
2615
+ }
2616
+ | undefined
2617
+ }
2618
+
2619
+ /**
2620
+ * This API might change. DO NOT USE IN PRODUCTION.
2621
+ * @beta
2622
+ */
2623
+ export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
2624
+ val: T | T[] | undefined,
2625
+ defaultVal?: T[],
2626
+ ): T[]
2627
+
2628
+ /**
2629
+ * @public
2630
+ */
2631
+ export declare function useBoundaryElement(): BoundaryElementContextValue
2632
+
2633
+ /**
2634
+ * @public
2635
+ */
2636
+ export declare function useClickOutside(
2637
+ listener: ClickOutsideListener,
2638
+ elementsArg?: Array<HTMLElement | HTMLElement[] | null>,
2639
+ boundaryElement?: HTMLElement | null,
2640
+ ): (el: HTMLElement | null) => void
2641
+
2642
+ /**
2643
+ * @beta
2644
+ */
2645
+ export declare function useCustomValidity(
2646
+ ref: {
2647
+ current: null | {
2648
+ setCustomValidity: (validity: string) => void
2649
+ }
2650
+ },
2651
+ customValidity: string | undefined,
2652
+ ): void
2653
+
2654
+ /**
2655
+ * This API might change. DO NOT USE IN PRODUCTION.
2656
+ * @beta
2657
+ */
2658
+ export declare function useDialog(): DialogContextValue
2659
+
2660
+ /**
2661
+ * Subscribe to the rect of a DOM element.
2662
+ * @beta
2663
+ *
2664
+ * @deprecated Use `useElementSize` instead
2665
+ */
2666
+ export declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null
2667
+
2668
+ /**
2669
+ * Subscribe to the size of a DOM element.
2670
+ * @beta
2671
+ */
2672
+ export declare function useElementSize(element: HTMLElement | null): ElementSize | null
2673
+
2674
+ /**
2675
+ * @beta
2676
+ */
2677
+ export declare function useForwardedRef<T>(
2678
+ ref: React.ForwardedRef<T>,
2679
+ ): React.MutableRefObject<T | null>
2680
+
2681
+ /**
2682
+ * @beta
2683
+ */
2684
+ export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
2685
+
2686
+ /**
2687
+ * @public
2688
+ */
2689
+ export declare function useLayer(): LayerContextValue
2690
+
2691
+ /**
2692
+ * This API might change. DO NOT USE IN PRODUCTION.
2693
+ * @beta
2694
+ */
2695
+ export declare function useMediaIndex(): number
2696
+
2697
+ /**
2698
+ * @public
2699
+ */
2700
+ export declare function usePortal(): PortalContextValue
2701
+
2702
+ /**
2703
+ * @public
2704
+ */
2705
+ export declare function usePrefersDark(): boolean
2706
+
2707
+ /**
2708
+ * Returns true if motion should be reduced
2709
+ * @public
2710
+ */
2711
+ export declare function usePrefersReducedMotion(): boolean
2712
+
2713
+ /**
2714
+ * @public
2715
+ */
2716
+ export declare function useRootTheme(): ThemeContextValue
2717
+
2718
+ /**
2719
+ * @public
2720
+ */
2721
+ export declare function useTheme(): Theme_2
2722
+
2723
+ /**
2724
+ * @public
2725
+ */
2726
+ export declare function useTheme_v2(): Theme_v2
2727
+
2728
+ /**
2729
+ * @public
2730
+ */
2731
+ export declare function useToast(): ToastContextValue
2732
+
2733
+ /**
2734
+ * @beta
2735
+ */
2736
+ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
2737
+
2738
+ /**
2739
+ * @beta
2740
+ */
2741
+ export declare function useTree(): TreeContextValue
2742
+
2743
+ /**
2744
+ * @beta
2745
+ */
2746
+ export declare const VirtualList: ForwardRefExoticComponent<
2747
+ VirtualListProps<any> &
2748
+ StackProps &
2749
+ Omit<HTMLProps<HTMLDivElement>, 'children' | 'onChange' | 'ref' | 'as'> &
2750
+ RefAttributes<HTMLDivElement>
2751
+ >
2752
+
2753
+ /**
2754
+ * @beta
2755
+ */
2756
+ export declare interface VirtualListChangeOpts {
2757
+ fromIndex: number
2758
+ gap: number
2759
+ itemHeight: number
2760
+ scrollHeight: number
2761
+ scrollTop: number
2762
+ toIndex: number
2763
+ }
2764
+
2765
+ /**
2766
+ * @beta
2767
+ */
2768
+ export declare interface VirtualListProps<Item = any> {
2769
+ as?: React.ElementType | keyof JSX.IntrinsicElements
2770
+ gap?: number
2771
+ getItemKey?: (item: Item, itemIndex: number) => string
2772
+ items?: Item[]
2773
+ onChange?: (opts: VirtualListChangeOpts) => void
2774
+ renderItem?: (item: Item) => React.ReactNode
2775
+ }
2776
+
2777
+ export {}