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