@sanity/ui 3.1.14 → 3.3.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/_chunks-cjs/_visual-editing.js +323 -292
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +323 -292
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +195 -76
- package/dist/_visual-editing.d.ts +195 -76
- package/dist/index.d.mts +308 -140
- package/dist/index.d.ts +308 -140
- package/dist/index.js +97 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -93
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +10 -4
- package/dist/theme.d.ts +10 -4
- package/package.json +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +1 -1
- package/src/core/components/autocomplete/types.ts +2 -2
- package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +51 -0
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +7 -3
- package/src/core/components/hotkeys/hotkeys.test.tsx +42 -0
- package/src/core/components/hotkeys/hotkeys.tsx +7 -3
- package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
- package/src/core/components/menu/menu.spacing.test.tsx +63 -0
- package/src/core/components/menu/menu.tsx +8 -2
- package/src/core/components/menu/menuDivider.ts +16 -5
- package/src/core/components/menu/menuGroup.spacing.test.tsx +63 -0
- package/src/core/components/menu/menuGroup.tsx +22 -8
- package/src/core/components/menu/menuItem.spacing.test.tsx +59 -0
- package/src/core/components/menu/menuItem.tsx +25 -8
- package/src/core/components/skeleton/skeleton.tsx +2 -2
- package/src/core/components/tab/tabList.test.tsx +48 -0
- package/src/core/components/tab/tabList.tsx +2 -2
- package/src/core/components/tab/tabPanel.tsx +2 -2
- package/src/core/components/toast/styles.ts +2 -2
- package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/tree.test.tsx +55 -0
- package/src/core/components/tree/tree.tsx +19 -10
- package/src/core/components/tree/treeGroup.tsx +3 -3
- package/src/core/components/tree/treeItem.test.tsx +65 -0
- package/src/core/components/tree/treeItem.tsx +11 -4
- package/src/core/components/tree/types.ts +4 -0
- package/src/core/primitives/avatar/avatar.tsx +19 -11
- package/src/core/primitives/badge/badge.tsx +20 -12
- package/src/core/primitives/box/__workshop__/asComponent.tsx +31 -0
- package/src/core/primitives/box/__workshop__/index.ts +5 -0
- package/src/core/primitives/box/box.test.tsx +142 -0
- package/src/core/primitives/box/box.tsx +41 -18
- package/src/core/primitives/button/__workshop__/disabled.tsx +2 -2
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +1 -1
- package/src/core/primitives/button/button.test.tsx +41 -3
- package/src/core/primitives/button/button.tsx +36 -12
- package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/core/primitives/card/card.tsx +24 -13
- package/src/core/primitives/code/code.tsx +16 -7
- package/src/core/primitives/container/container.tsx +23 -10
- package/src/core/primitives/flex/flex.tsx +21 -11
- package/src/core/primitives/grid/grid.test.tsx +80 -0
- package/src/core/primitives/grid/grid.tsx +39 -13
- package/src/core/primitives/heading/heading.tsx +19 -11
- package/src/core/primitives/inline/inline.test.tsx +51 -0
- package/src/core/primitives/inline/inline.tsx +28 -12
- package/src/core/primitives/kbd/kbd.tsx +19 -11
- package/src/core/primitives/label/label.tsx +19 -11
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +1 -1
- package/src/core/primitives/select/select.test.tsx +52 -0
- package/src/core/primitives/select/select.tsx +8 -2
- package/src/core/primitives/stack/stack.test.tsx +57 -0
- package/src/core/primitives/stack/stack.tsx +27 -13
- package/src/core/primitives/text/text.tsx +19 -11
- package/src/core/primitives/textInput/textInput.test.tsx +48 -0
- package/src/core/primitives/textInput/textInput.tsx +9 -4
- package/src/core/primitives/types.ts +33 -0
- package/src/core/types/component.ts +32 -0
- package/src/core/types/index.ts +1 -0
- package/src/core/utils/virtualList/virtualList.tsx +2 -2
- package/src/theme/system/css.ts +10 -4
package/dist/index.d.mts
CHANGED
|
@@ -3,16 +3,12 @@ import {Component} from 'react'
|
|
|
3
3
|
import {Context} from 'react'
|
|
4
4
|
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
5
5
|
import {CSSObject} from '@sanity/ui/theme'
|
|
6
|
-
import {
|
|
7
|
-
import {ElementType} from 'react'
|
|
8
|
-
import {FastOmit} from 'styled-components'
|
|
6
|
+
import {ElementType as ElementType_2} from 'react'
|
|
9
7
|
import {ForwardRefExoticComponent} from 'react'
|
|
10
8
|
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
11
9
|
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
12
10
|
import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
13
|
-
import {HTMLAttributes} from 'react'
|
|
14
11
|
import {HTMLProps} from 'react'
|
|
15
|
-
import {IStyledComponentBase} from 'styled-components/dist/types'
|
|
16
12
|
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
17
13
|
import {parseColor as parseColor_2} from '@sanity/ui/theme'
|
|
18
14
|
import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
@@ -89,6 +85,13 @@ export declare const Arrow: ForwardRefExoticComponent<
|
|
|
89
85
|
RefAttributes<HTMLDivElement>
|
|
90
86
|
>
|
|
91
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export declare type Assign<T extends object, U extends object> = Omit<T, keyof U> & U
|
|
94
|
+
|
|
92
95
|
/**
|
|
93
96
|
* @internal
|
|
94
97
|
*/
|
|
@@ -160,7 +163,7 @@ export declare type AutocompleteMsg =
|
|
|
160
163
|
/**
|
|
161
164
|
* @public
|
|
162
165
|
*/
|
|
163
|
-
export declare type AutocompleteOpenButtonProps =
|
|
166
|
+
export declare type AutocompleteOpenButtonProps = ButtonOwnProps &
|
|
164
167
|
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
|
|
165
168
|
|
|
166
169
|
/**
|
|
@@ -173,7 +176,7 @@ export declare interface AutocompleteProps<
|
|
|
173
176
|
customValidity?: string
|
|
174
177
|
filterOption?: (query: string, option: Option) => boolean
|
|
175
178
|
fontSize?: number | number[]
|
|
176
|
-
icon?:
|
|
179
|
+
icon?: ElementType_2 | ReactNode
|
|
177
180
|
id: string
|
|
178
181
|
/** @beta */
|
|
179
182
|
listBox?: BoxProps
|
|
@@ -283,9 +286,9 @@ export declare interface AutocompleteValueChangeMsg {
|
|
|
283
286
|
*
|
|
284
287
|
* @public
|
|
285
288
|
*/
|
|
286
|
-
export declare const Avatar:
|
|
287
|
-
AvatarProps
|
|
288
|
-
|
|
289
|
+
export declare const Avatar: <E extends ElementType = 'div'>(
|
|
290
|
+
props: AvatarProps<E>,
|
|
291
|
+
) => React.JSX.Element
|
|
289
292
|
|
|
290
293
|
/**
|
|
291
294
|
* @public
|
|
@@ -307,17 +310,11 @@ export declare interface AvatarCounterProps {
|
|
|
307
310
|
/**
|
|
308
311
|
* @public
|
|
309
312
|
*/
|
|
310
|
-
export declare
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* @public
|
|
314
|
-
*/
|
|
315
|
-
export declare interface AvatarProps {
|
|
313
|
+
export declare interface AvatarOwnProps {
|
|
316
314
|
/** @beta */
|
|
317
315
|
__unstable_hideInnerStroke?: boolean
|
|
318
316
|
animateArrowFrom?: AvatarPosition
|
|
319
317
|
arrowPosition?: AvatarPosition
|
|
320
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
321
318
|
color?: ThemeColorAvatarColorKey
|
|
322
319
|
initials?: string
|
|
323
320
|
onImageLoadError?: (event: Error) => void
|
|
@@ -331,6 +328,16 @@ export declare interface AvatarProps {
|
|
|
331
328
|
title?: string
|
|
332
329
|
}
|
|
333
330
|
|
|
331
|
+
/**
|
|
332
|
+
* @public
|
|
333
|
+
*/
|
|
334
|
+
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @public
|
|
338
|
+
*/
|
|
339
|
+
export declare type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>
|
|
340
|
+
|
|
334
341
|
/**
|
|
335
342
|
* @internal
|
|
336
343
|
*/
|
|
@@ -347,7 +354,7 @@ export declare type AvatarSize = 0 | 1 | 2 | 3
|
|
|
347
354
|
* @public
|
|
348
355
|
*/
|
|
349
356
|
export declare const AvatarStack: ForwardRefExoticComponent<
|
|
350
|
-
AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
357
|
+
AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'ref'> & RefAttributes<HTMLDivElement>
|
|
351
358
|
>
|
|
352
359
|
|
|
353
360
|
/**
|
|
@@ -371,9 +378,9 @@ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
|
371
378
|
*
|
|
372
379
|
* @public
|
|
373
380
|
*/
|
|
374
|
-
export declare const Badge:
|
|
375
|
-
|
|
376
|
-
|
|
381
|
+
export declare const Badge: <E extends ElementType = 'div'>(
|
|
382
|
+
props: BadgeProps<E>,
|
|
383
|
+
) => React.JSX.Element
|
|
377
384
|
|
|
378
385
|
/**
|
|
379
386
|
* @public
|
|
@@ -384,14 +391,18 @@ export declare type BadgeMode = 'default' | 'outline'
|
|
|
384
391
|
/**
|
|
385
392
|
* @public
|
|
386
393
|
*/
|
|
387
|
-
export declare interface
|
|
388
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
394
|
+
export declare interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
|
|
389
395
|
fontSize?: number | number[]
|
|
390
396
|
/** @deprecated No longer used. */
|
|
391
397
|
mode?: BadgeMode
|
|
392
398
|
tone?: BadgeTone
|
|
393
399
|
}
|
|
394
400
|
|
|
401
|
+
/**
|
|
402
|
+
* @public
|
|
403
|
+
*/
|
|
404
|
+
export declare type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>
|
|
405
|
+
|
|
395
406
|
/**
|
|
396
407
|
* @public
|
|
397
408
|
*/
|
|
@@ -443,10 +454,7 @@ export declare interface BoundaryElementProviderProps {
|
|
|
443
454
|
*
|
|
444
455
|
* @public
|
|
445
456
|
*/
|
|
446
|
-
export declare const Box:
|
|
447
|
-
Omit<BoxProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
448
|
-
RefAttributes<HTMLDivElement>
|
|
449
|
-
>
|
|
457
|
+
export declare const Box: <E extends ElementType = 'div'>(props: BoxProps<E>) => React.JSX.Element
|
|
450
458
|
|
|
451
459
|
/**
|
|
452
460
|
* @public
|
|
@@ -464,18 +472,24 @@ export declare type BoxHeight = 'stretch' | 'fill'
|
|
|
464
472
|
export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
|
|
465
473
|
|
|
466
474
|
/**
|
|
475
|
+
* The props that `Box` adds on top of the element it renders as.
|
|
476
|
+
*
|
|
467
477
|
* @public
|
|
468
478
|
*/
|
|
469
|
-
export declare interface
|
|
479
|
+
export declare interface BoxOwnProps
|
|
470
480
|
extends ResponsiveFlexItemProps,
|
|
471
481
|
ResponsiveBoxProps,
|
|
472
482
|
ResponsiveGridItemProps,
|
|
473
483
|
ResponsiveMarginProps,
|
|
474
484
|
ResponsivePaddingProps {
|
|
475
|
-
|
|
476
|
-
forwardedAs?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
485
|
+
forwardedAs?: ElementType
|
|
477
486
|
}
|
|
478
487
|
|
|
488
|
+
/**
|
|
489
|
+
* @public
|
|
490
|
+
*/
|
|
491
|
+
export declare type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>
|
|
492
|
+
|
|
479
493
|
/**
|
|
480
494
|
* @public
|
|
481
495
|
* @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
|
|
@@ -492,7 +506,7 @@ export declare type BoxSizing = 'content' | 'border'
|
|
|
492
506
|
*/
|
|
493
507
|
export declare const Breadcrumbs: ForwardRefExoticComponent<
|
|
494
508
|
BreadcrumbsProps &
|
|
495
|
-
Omit<HTMLProps<HTMLOListElement>, 'type' | '
|
|
509
|
+
Omit<HTMLProps<HTMLOListElement>, 'type' | 'as' | 'ref'> &
|
|
496
510
|
RefAttributes<HTMLOListElement>
|
|
497
511
|
>
|
|
498
512
|
|
|
@@ -502,16 +516,19 @@ export declare const Breadcrumbs: ForwardRefExoticComponent<
|
|
|
502
516
|
export declare interface BreadcrumbsProps {
|
|
503
517
|
maxLength?: number
|
|
504
518
|
separator?: React.ReactNode
|
|
519
|
+
gap?: number | number[]
|
|
520
|
+
/**
|
|
521
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
522
|
+
*/
|
|
505
523
|
space?: number | number[]
|
|
506
524
|
}
|
|
507
525
|
|
|
508
526
|
/**
|
|
509
527
|
* @public
|
|
510
528
|
*/
|
|
511
|
-
export declare const Button:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
>
|
|
529
|
+
export declare const Button: <E extends ElementType = 'button'>(
|
|
530
|
+
props: ButtonProps<E>,
|
|
531
|
+
) => React.JSX.Element
|
|
515
532
|
|
|
516
533
|
/**
|
|
517
534
|
* @public
|
|
@@ -521,8 +538,7 @@ export declare type ButtonMode = ThemeColorButtonModeKey_2
|
|
|
521
538
|
/**
|
|
522
539
|
* @public
|
|
523
540
|
*/
|
|
524
|
-
export declare interface
|
|
525
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
541
|
+
export declare interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
526
542
|
fontSize?: number | number[]
|
|
527
543
|
mode?: ButtonMode
|
|
528
544
|
icon?: React.ElementType | React.ReactNode
|
|
@@ -533,7 +549,11 @@ export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveR
|
|
|
533
549
|
*/
|
|
534
550
|
loading?: boolean
|
|
535
551
|
selected?: boolean
|
|
552
|
+
/**
|
|
553
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
554
|
+
*/
|
|
536
555
|
space?: number | number[]
|
|
556
|
+
gap?: number | number[]
|
|
537
557
|
muted?: boolean
|
|
538
558
|
text?: React.ReactNode
|
|
539
559
|
textAlign?: ButtonTextAlign
|
|
@@ -543,6 +563,11 @@ export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveR
|
|
|
543
563
|
width?: ButtonWidth
|
|
544
564
|
}
|
|
545
565
|
|
|
566
|
+
/**
|
|
567
|
+
* @public
|
|
568
|
+
*/
|
|
569
|
+
export declare type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>
|
|
570
|
+
|
|
546
571
|
/**
|
|
547
572
|
* @public
|
|
548
573
|
*/
|
|
@@ -564,16 +589,13 @@ export declare type ButtonWidth = 'fill'
|
|
|
564
589
|
*
|
|
565
590
|
* @public
|
|
566
591
|
*/
|
|
567
|
-
export declare const Card:
|
|
568
|
-
Omit<CardProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
569
|
-
RefAttributes<HTMLDivElement>
|
|
570
|
-
>
|
|
592
|
+
export declare const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element
|
|
571
593
|
|
|
572
594
|
/**
|
|
573
595
|
* @public
|
|
574
596
|
*/
|
|
575
|
-
export declare interface
|
|
576
|
-
extends
|
|
597
|
+
export declare interface CardOwnProps
|
|
598
|
+
extends BoxOwnProps,
|
|
577
599
|
ResponsiveBorderProps,
|
|
578
600
|
ResponsiveRadiusProps,
|
|
579
601
|
ResponsiveShadowProps {
|
|
@@ -587,12 +609,19 @@ export declare interface CardProps
|
|
|
587
609
|
* @beta
|
|
588
610
|
*/
|
|
589
611
|
__unstable_focusRing?: boolean
|
|
612
|
+
disabled?: boolean
|
|
590
613
|
muted?: boolean
|
|
591
614
|
pressed?: boolean
|
|
592
615
|
scheme?: ThemeColorSchemeKey_2
|
|
616
|
+
selected?: boolean
|
|
593
617
|
tone?: CardTone
|
|
594
618
|
}
|
|
595
619
|
|
|
620
|
+
/**
|
|
621
|
+
* @public
|
|
622
|
+
*/
|
|
623
|
+
export declare type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>
|
|
624
|
+
|
|
596
625
|
/**
|
|
597
626
|
* @internal
|
|
598
627
|
*/
|
|
@@ -649,28 +678,30 @@ export declare type ClickOutsideListener = (event: MouseEvent) => void
|
|
|
649
678
|
/**
|
|
650
679
|
* @public
|
|
651
680
|
*/
|
|
652
|
-
export declare const Code:
|
|
653
|
-
Omit<CodeProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> & RefAttributes<HTMLElement>
|
|
654
|
-
>
|
|
681
|
+
export declare const Code: <E extends ElementType = 'pre'>(props: CodeProps<E>) => React.JSX.Element
|
|
655
682
|
|
|
656
683
|
/**
|
|
657
684
|
* @public
|
|
658
685
|
*/
|
|
659
|
-
export declare interface
|
|
660
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
686
|
+
export declare interface CodeOwnProps {
|
|
661
687
|
/** Define the language to use for syntax highlighting. */
|
|
662
688
|
language?: string
|
|
663
689
|
size?: number | number[]
|
|
664
690
|
weight?: string
|
|
665
691
|
}
|
|
666
692
|
|
|
693
|
+
/**
|
|
694
|
+
* @public
|
|
695
|
+
*/
|
|
696
|
+
export declare type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>
|
|
697
|
+
|
|
667
698
|
/**
|
|
668
699
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
669
700
|
* @beta
|
|
670
701
|
*/
|
|
671
702
|
export declare const CodeSkeleton: ForwardRefExoticComponent<
|
|
672
703
|
Omit<
|
|
673
|
-
CodeSkeletonProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
704
|
+
CodeSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
|
|
674
705
|
'ref'
|
|
675
706
|
> &
|
|
676
707
|
RefAttributes<HTMLDivElement>
|
|
@@ -684,6 +715,12 @@ export declare interface CodeSkeletonProps extends SkeletonProps {
|
|
|
684
715
|
size?: number | number[]
|
|
685
716
|
}
|
|
686
717
|
|
|
718
|
+
/** @public */
|
|
719
|
+
export declare type ComponentType<P = any> =
|
|
720
|
+
| React.FunctionComponent<P>
|
|
721
|
+
| React.ComponentClass<P>
|
|
722
|
+
| React.ExoticComponent<P>
|
|
723
|
+
|
|
687
724
|
/**
|
|
688
725
|
* @internal
|
|
689
726
|
* @deprecated this component will be removed in the next major release
|
|
@@ -707,15 +744,19 @@ export declare namespace ConditionalWrapper {
|
|
|
707
744
|
*
|
|
708
745
|
* @public
|
|
709
746
|
*/
|
|
710
|
-
export declare const Container:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
>
|
|
747
|
+
export declare const Container: <E extends ElementType = 'div'>(
|
|
748
|
+
props: ContainerProps<E>,
|
|
749
|
+
) => React.JSX.Element
|
|
714
750
|
|
|
715
751
|
/**
|
|
716
752
|
* @public
|
|
717
753
|
*/
|
|
718
|
-
export declare interface
|
|
754
|
+
export declare interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* @public
|
|
758
|
+
*/
|
|
759
|
+
export declare type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>
|
|
719
760
|
|
|
720
761
|
/**
|
|
721
762
|
* @internal
|
|
@@ -744,7 +785,7 @@ export declare type Delay =
|
|
|
744
785
|
* @public
|
|
745
786
|
*/
|
|
746
787
|
export declare const Dialog: ForwardRefExoticComponent<
|
|
747
|
-
Omit<DialogProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
788
|
+
Omit<DialogProps & Omit<HTMLProps<HTMLDivElement>, 'width' | 'id' | 'as'>, 'ref'> &
|
|
748
789
|
RefAttributes<HTMLDivElement>
|
|
749
790
|
>
|
|
750
791
|
|
|
@@ -874,6 +915,12 @@ export declare const _elementSizeObserver: _ElementSizeObserver
|
|
|
874
915
|
*/
|
|
875
916
|
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
876
917
|
|
|
918
|
+
/** @public */
|
|
919
|
+
export declare type ElementType<P = any> = TagType | ComponentType<P>
|
|
920
|
+
|
|
921
|
+
/** @public */
|
|
922
|
+
export declare type EmptyProps = object
|
|
923
|
+
|
|
877
924
|
/**
|
|
878
925
|
* DO NOT USE IN PRODUCTION
|
|
879
926
|
* @beta
|
|
@@ -914,10 +961,7 @@ export declare function _fillCSSObject(
|
|
|
914
961
|
*
|
|
915
962
|
* @public
|
|
916
963
|
*/
|
|
917
|
-
export declare const Flex:
|
|
918
|
-
Omit<FlexProps & Omit<HTMLProps<HTMLDivElement>, 'wrap' | 'as'>, 'ref'> &
|
|
919
|
-
RefAttributes<HTMLDivElement>
|
|
920
|
-
>
|
|
964
|
+
export declare const Flex: <E extends ElementType = 'div'>(props: FlexProps<E>) => React.JSX.Element
|
|
921
965
|
|
|
922
966
|
/**
|
|
923
967
|
* @public
|
|
@@ -943,13 +987,18 @@ export declare type FlexJustify =
|
|
|
943
987
|
/**
|
|
944
988
|
* @public
|
|
945
989
|
*/
|
|
946
|
-
export declare interface
|
|
947
|
-
extends Omit<
|
|
990
|
+
export declare interface FlexOwnProps
|
|
991
|
+
extends Omit<BoxOwnProps, 'display'>,
|
|
948
992
|
ResponsiveFlexProps,
|
|
949
993
|
ResponsiveFlexItemProps {
|
|
950
994
|
gap?: number | number[]
|
|
951
995
|
}
|
|
952
996
|
|
|
997
|
+
/**
|
|
998
|
+
* @public
|
|
999
|
+
*/
|
|
1000
|
+
export declare type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>
|
|
1001
|
+
|
|
953
1002
|
/**
|
|
954
1003
|
* @public
|
|
955
1004
|
*/
|
|
@@ -996,10 +1045,7 @@ export declare function _getResponsiveSpace(
|
|
|
996
1045
|
*
|
|
997
1046
|
* @public
|
|
998
1047
|
*/
|
|
999
|
-
export declare const Grid:
|
|
1000
|
-
Omit<GridProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'rows'>, 'ref'> &
|
|
1001
|
-
RefAttributes<HTMLDivElement>
|
|
1002
|
-
>
|
|
1048
|
+
export declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element
|
|
1003
1049
|
|
|
1004
1050
|
/**
|
|
1005
1051
|
* @public
|
|
@@ -1049,7 +1095,12 @@ export declare type GridItemRowStart = 'auto' | number
|
|
|
1049
1095
|
/**
|
|
1050
1096
|
* @public
|
|
1051
1097
|
*/
|
|
1052
|
-
export declare interface
|
|
1098
|
+
export declare interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* @public
|
|
1102
|
+
*/
|
|
1103
|
+
export declare type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>
|
|
1053
1104
|
|
|
1054
1105
|
/**
|
|
1055
1106
|
* @internal
|
|
@@ -1061,18 +1112,16 @@ export declare function _hasFocus(element: HTMLElement): boolean
|
|
|
1061
1112
|
*
|
|
1062
1113
|
* @public
|
|
1063
1114
|
*/
|
|
1064
|
-
export declare const Heading:
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
>
|
|
1115
|
+
export declare const Heading: <E extends ElementType = 'div'>(
|
|
1116
|
+
props: HeadingProps<E>,
|
|
1117
|
+
) => React.JSX.Element
|
|
1068
1118
|
|
|
1069
1119
|
/**
|
|
1070
1120
|
* @public
|
|
1071
1121
|
*/
|
|
1072
|
-
export declare interface
|
|
1122
|
+
export declare interface HeadingOwnProps {
|
|
1073
1123
|
accent?: boolean
|
|
1074
1124
|
align?: TextAlign | TextAlign[]
|
|
1075
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1076
1125
|
muted?: boolean
|
|
1077
1126
|
size?: number | number[]
|
|
1078
1127
|
/**
|
|
@@ -1084,13 +1133,18 @@ export declare interface HeadingProps {
|
|
|
1084
1133
|
weight?: ThemeFontWeightKey_2
|
|
1085
1134
|
}
|
|
1086
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* @public
|
|
1138
|
+
*/
|
|
1139
|
+
export declare type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>
|
|
1140
|
+
|
|
1087
1141
|
/**
|
|
1088
1142
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1089
1143
|
* @beta
|
|
1090
1144
|
*/
|
|
1091
1145
|
export declare const HeadingSkeleton: ForwardRefExoticComponent<
|
|
1092
1146
|
Omit<
|
|
1093
|
-
HeadingSkeletonProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
1147
|
+
HeadingSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
|
|
1094
1148
|
'ref'
|
|
1095
1149
|
> &
|
|
1096
1150
|
RefAttributes<HTMLDivElement>
|
|
@@ -1116,7 +1170,7 @@ export declare const hexToRgb: typeof hexToRgb_2
|
|
|
1116
1170
|
* @public
|
|
1117
1171
|
*/
|
|
1118
1172
|
export declare const Hotkeys: ForwardRefExoticComponent<
|
|
1119
|
-
HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | '
|
|
1173
|
+
HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as' | 'ref'> & RefAttributes<HTMLElement>
|
|
1120
1174
|
>
|
|
1121
1175
|
|
|
1122
1176
|
/**
|
|
@@ -1124,8 +1178,12 @@ export declare const Hotkeys: ForwardRefExoticComponent<
|
|
|
1124
1178
|
*/
|
|
1125
1179
|
export declare interface HotkeysProps {
|
|
1126
1180
|
fontSize?: number | number[]
|
|
1181
|
+
gap?: number | number[]
|
|
1127
1182
|
padding?: number | number[]
|
|
1128
1183
|
radius?: Radius | Radius[]
|
|
1184
|
+
/**
|
|
1185
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
1186
|
+
*/
|
|
1129
1187
|
space?: number | number[]
|
|
1130
1188
|
keys?: string[]
|
|
1131
1189
|
}
|
|
@@ -1147,18 +1205,28 @@ export declare const hslToRgb: typeof hslToRgb_2
|
|
|
1147
1205
|
*
|
|
1148
1206
|
* @public
|
|
1149
1207
|
*/
|
|
1150
|
-
export declare const Inline:
|
|
1151
|
-
|
|
1152
|
-
|
|
1208
|
+
export declare const Inline: <E extends ElementType = 'div'>(
|
|
1209
|
+
props: InlineProps<E>,
|
|
1210
|
+
) => React.JSX.Element
|
|
1153
1211
|
|
|
1154
1212
|
/**
|
|
1155
1213
|
* @public
|
|
1156
1214
|
*/
|
|
1157
|
-
export declare interface
|
|
1158
|
-
/**
|
|
1215
|
+
export declare interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {
|
|
1216
|
+
/**
|
|
1217
|
+
* The spacing between children.
|
|
1218
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
1219
|
+
*/
|
|
1159
1220
|
space?: number | number[]
|
|
1221
|
+
/** The spacing between children. */
|
|
1222
|
+
gap?: number | number[]
|
|
1160
1223
|
}
|
|
1161
1224
|
|
|
1225
|
+
/**
|
|
1226
|
+
* @public
|
|
1227
|
+
*/
|
|
1228
|
+
export declare type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>
|
|
1229
|
+
|
|
1162
1230
|
/**
|
|
1163
1231
|
* @internal
|
|
1164
1232
|
*/
|
|
@@ -1209,37 +1277,37 @@ export declare function _isScrollable(el: Node): boolean
|
|
|
1209
1277
|
*
|
|
1210
1278
|
* @public
|
|
1211
1279
|
*/
|
|
1212
|
-
export declare const KBD:
|
|
1213
|
-
KBDProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
1214
|
-
>
|
|
1280
|
+
export declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element
|
|
1215
1281
|
|
|
1216
1282
|
/**
|
|
1217
1283
|
* @public
|
|
1218
1284
|
*/
|
|
1219
|
-
export declare interface
|
|
1220
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1285
|
+
export declare interface KBDOwnProps {
|
|
1221
1286
|
fontSize?: number | number[]
|
|
1222
1287
|
padding?: number | number[]
|
|
1223
1288
|
radius?: Radius | Radius[]
|
|
1224
1289
|
}
|
|
1225
1290
|
|
|
1291
|
+
/**
|
|
1292
|
+
* @public
|
|
1293
|
+
*/
|
|
1294
|
+
export declare type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>
|
|
1295
|
+
|
|
1226
1296
|
/**
|
|
1227
1297
|
* Typographic labels.
|
|
1228
1298
|
*
|
|
1229
1299
|
* @public
|
|
1230
1300
|
*/
|
|
1231
|
-
export declare const Label:
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
>
|
|
1301
|
+
export declare const Label: <E extends ElementType = 'div'>(
|
|
1302
|
+
props: LabelProps<E>,
|
|
1303
|
+
) => React.JSX.Element
|
|
1235
1304
|
|
|
1236
1305
|
/**
|
|
1237
1306
|
* @public
|
|
1238
1307
|
*/
|
|
1239
|
-
export declare interface
|
|
1308
|
+
export declare interface LabelOwnProps {
|
|
1240
1309
|
accent?: boolean
|
|
1241
1310
|
align?: TextAlign | TextAlign[]
|
|
1242
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1243
1311
|
muted?: boolean
|
|
1244
1312
|
size?: number | number[]
|
|
1245
1313
|
/**
|
|
@@ -1251,13 +1319,18 @@ export declare interface LabelProps {
|
|
|
1251
1319
|
weight?: ThemeFontWeightKey_2
|
|
1252
1320
|
}
|
|
1253
1321
|
|
|
1322
|
+
/**
|
|
1323
|
+
* @public
|
|
1324
|
+
*/
|
|
1325
|
+
export declare type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>
|
|
1326
|
+
|
|
1254
1327
|
/**
|
|
1255
1328
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1256
1329
|
* @beta
|
|
1257
1330
|
*/
|
|
1258
1331
|
export declare const LabelSkeleton: ForwardRefExoticComponent<
|
|
1259
1332
|
Omit<
|
|
1260
|
-
LabelSkeletonProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
1333
|
+
LabelSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
|
|
1261
1334
|
'ref'
|
|
1262
1335
|
> &
|
|
1263
1336
|
RefAttributes<HTMLDivElement>
|
|
@@ -1338,7 +1411,7 @@ export declare interface _MediaStore {
|
|
|
1338
1411
|
* @public
|
|
1339
1412
|
*/
|
|
1340
1413
|
export declare const Menu: ForwardRefExoticComponent<
|
|
1341
|
-
Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | '
|
|
1414
|
+
Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'tabIndex' | 'role'>, 'ref'> &
|
|
1342
1415
|
RefAttributes<HTMLDivElement>
|
|
1343
1416
|
>
|
|
1344
1417
|
|
|
@@ -1395,29 +1468,26 @@ export declare interface MenuButtonProps {
|
|
|
1395
1468
|
/**
|
|
1396
1469
|
* @public
|
|
1397
1470
|
*/
|
|
1398
|
-
export declare const MenuDivider:
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
> &
|
|
1402
|
-
string
|
|
1471
|
+
export declare const MenuDivider: <E extends ElementType = 'hr'>(
|
|
1472
|
+
props: MenuDividerProps<E>,
|
|
1473
|
+
) => React.JSX.Element
|
|
1403
1474
|
|
|
1404
1475
|
/**
|
|
1405
1476
|
* @public
|
|
1406
1477
|
*/
|
|
1407
|
-
export declare
|
|
1408
|
-
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
1409
|
-
MenuGroupProps,
|
|
1410
|
-
): React.JSX.Element
|
|
1478
|
+
export declare type MenuDividerProps<E extends ElementType = 'hr'> = Props<EmptyProps, E>
|
|
1411
1479
|
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1480
|
+
/**
|
|
1481
|
+
* @public
|
|
1482
|
+
*/
|
|
1483
|
+
export declare const MenuGroup: <E extends ElementType = 'button'>(
|
|
1484
|
+
props: MenuGroupProps<E>,
|
|
1485
|
+
) => React.JSX.Element
|
|
1415
1486
|
|
|
1416
1487
|
/**
|
|
1417
1488
|
* @public
|
|
1418
1489
|
*/
|
|
1419
|
-
export declare interface
|
|
1420
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1490
|
+
export declare interface MenuGroupOwnProps {
|
|
1421
1491
|
fontSize?: number | number[]
|
|
1422
1492
|
icon?: React.ElementType | React.ReactNode
|
|
1423
1493
|
menu?: Omit<
|
|
@@ -1434,6 +1504,10 @@ export declare interface MenuGroupProps {
|
|
|
1434
1504
|
padding?: number | number[]
|
|
1435
1505
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1436
1506
|
radius?: Radius | Radius[]
|
|
1507
|
+
gap?: number | number[]
|
|
1508
|
+
/**
|
|
1509
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
1510
|
+
*/
|
|
1437
1511
|
space?: number | number[]
|
|
1438
1512
|
text: React.ReactNode
|
|
1439
1513
|
tone?: SelectableTone
|
|
@@ -1442,28 +1516,39 @@ export declare interface MenuGroupProps {
|
|
|
1442
1516
|
/**
|
|
1443
1517
|
* @public
|
|
1444
1518
|
*/
|
|
1445
|
-
export declare
|
|
1446
|
-
MenuItemProps &
|
|
1447
|
-
Omit<HTMLProps<HTMLDivElement>, 'selected' | 'height' | 'ref' | 'tabIndex' | 'as'> &
|
|
1448
|
-
RefAttributes<HTMLDivElement>
|
|
1449
|
-
>
|
|
1519
|
+
export declare type MenuGroupProps<E extends ElementType = 'button'> = Props<MenuGroupOwnProps, E>
|
|
1450
1520
|
|
|
1451
1521
|
/**
|
|
1452
1522
|
* @public
|
|
1453
1523
|
*/
|
|
1454
|
-
export declare
|
|
1455
|
-
|
|
1524
|
+
export declare const MenuItem: <E extends ElementType = 'button'>(
|
|
1525
|
+
props: MenuItemProps<E>,
|
|
1526
|
+
) => React.JSX.Element
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* @public
|
|
1530
|
+
*/
|
|
1531
|
+
export declare interface MenuItemOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
1456
1532
|
fontSize?: number | number[]
|
|
1457
1533
|
hotkeys?: string[]
|
|
1458
1534
|
icon?: React.ElementType | React.ReactNode
|
|
1459
1535
|
iconRight?: React.ElementType | React.ReactNode
|
|
1460
1536
|
pressed?: boolean
|
|
1461
1537
|
selected?: boolean
|
|
1538
|
+
gap?: number | number[]
|
|
1539
|
+
/**
|
|
1540
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
1541
|
+
*/
|
|
1462
1542
|
space?: number | number[]
|
|
1463
1543
|
text?: React.ReactNode
|
|
1464
1544
|
tone?: SelectableTone
|
|
1465
1545
|
}
|
|
1466
1546
|
|
|
1547
|
+
/**
|
|
1548
|
+
* @public
|
|
1549
|
+
*/
|
|
1550
|
+
export declare type MenuItemProps<E extends ElementType = 'button'> = Props<MenuItemOwnProps, E>
|
|
1551
|
+
|
|
1467
1552
|
/**
|
|
1468
1553
|
* @public
|
|
1469
1554
|
*/
|
|
@@ -1483,6 +1568,10 @@ export declare interface MenuProps extends ResponsivePaddingProps {
|
|
|
1483
1568
|
'originElement'?: HTMLElement | null
|
|
1484
1569
|
'registerElement'?: (el: HTMLElement) => () => void
|
|
1485
1570
|
'shouldFocus'?: 'first' | 'last' | null
|
|
1571
|
+
'gap'?: number | number[]
|
|
1572
|
+
/**
|
|
1573
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
1574
|
+
*/
|
|
1486
1575
|
'space'?: number | number[]
|
|
1487
1576
|
'aria-labelledby'?: string
|
|
1488
1577
|
'onBlurCapture'?: (event: FocusEvent) => void
|
|
@@ -1528,7 +1617,7 @@ export declare type Placement =
|
|
|
1528
1617
|
*/
|
|
1529
1618
|
export declare const Popover: ForwardRefExoticComponent<
|
|
1530
1619
|
Omit<
|
|
1531
|
-
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | '
|
|
1620
|
+
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'as' | 'children'>,
|
|
1532
1621
|
'ref'
|
|
1533
1622
|
> &
|
|
1534
1623
|
RefAttributes<HTMLDivElement>
|
|
@@ -1680,6 +1769,19 @@ export declare interface PortalProviderProps {
|
|
|
1680
1769
|
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
1681
1770
|
}
|
|
1682
1771
|
|
|
1772
|
+
/**
|
|
1773
|
+
* Resolves the props of a polymorphic component: the props of the element/component passed to `as`
|
|
1774
|
+
* (defaulting to the component's own element), with the component's own props assigned on top.
|
|
1775
|
+
*
|
|
1776
|
+
* @public
|
|
1777
|
+
*/
|
|
1778
|
+
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
1779
|
+
E extends TagType ? React.JSX.IntrinsicElements[E] : React.ComponentProps<E>,
|
|
1780
|
+
P & {
|
|
1781
|
+
as?: E
|
|
1782
|
+
}
|
|
1783
|
+
>
|
|
1784
|
+
|
|
1683
1785
|
/**
|
|
1684
1786
|
* The `Radio` component allows the user to select one option from a set.
|
|
1685
1787
|
*
|
|
@@ -1807,11 +1909,35 @@ export declare interface ResponsiveFontStyleProps
|
|
|
1807
1909
|
* @public
|
|
1808
1910
|
*/
|
|
1809
1911
|
export declare interface ResponsiveGridItemProps {
|
|
1912
|
+
gridColumn?: GridItemColumn | GridItemColumn[]
|
|
1913
|
+
/**
|
|
1914
|
+
* @deprecated Use `gridColumn` instead. `column` will be removed in v4.
|
|
1915
|
+
*/
|
|
1810
1916
|
column?: GridItemColumn | GridItemColumn[]
|
|
1917
|
+
gridColumnStart?: GridItemColumnStart | GridItemColumnStart[]
|
|
1918
|
+
/**
|
|
1919
|
+
* @deprecated Use `gridColumnStart` instead. `columnStart` will be removed in v4.
|
|
1920
|
+
*/
|
|
1811
1921
|
columnStart?: GridItemColumnStart | GridItemColumnStart[]
|
|
1922
|
+
gridColumnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
|
|
1923
|
+
/**
|
|
1924
|
+
* @deprecated Use `gridColumnEnd` instead. `columnEnd` will be removed in v4.
|
|
1925
|
+
*/
|
|
1812
1926
|
columnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
|
|
1927
|
+
gridRow?: GridItemRow | GridItemRow[]
|
|
1928
|
+
/**
|
|
1929
|
+
* @deprecated Use `gridRow` instead. `row` will be removed in v4.
|
|
1930
|
+
*/
|
|
1813
1931
|
row?: GridItemRow | GridItemRow[]
|
|
1932
|
+
gridRowStart?: GridItemRowStart | GridItemRowStart[]
|
|
1933
|
+
/**
|
|
1934
|
+
* @deprecated Use `gridRowStart` instead. `rowStart` will be removed in v4.
|
|
1935
|
+
*/
|
|
1814
1936
|
rowStart?: GridItemRowStart | GridItemRowStart[]
|
|
1937
|
+
gridRowEnd?: GridItemRowEnd | GridItemRowEnd[]
|
|
1938
|
+
/**
|
|
1939
|
+
* @deprecated Use `gridRowEnd` instead. `rowEnd` will be removed in v4.
|
|
1940
|
+
*/
|
|
1815
1941
|
rowEnd?: GridItemRowEnd | GridItemRowEnd[]
|
|
1816
1942
|
}
|
|
1817
1943
|
|
|
@@ -1822,11 +1948,19 @@ export declare interface ResponsiveGridProps {
|
|
|
1822
1948
|
autoRows?: GridAutoRows | GridAutoRows[]
|
|
1823
1949
|
autoCols?: GridAutoCols | GridAutoCols[]
|
|
1824
1950
|
autoFlow?: GridAutoFlow | GridAutoFlow[]
|
|
1951
|
+
/**
|
|
1952
|
+
* @deprecated Use `gridTemplateColumns` instead. `columns` will be removed in v4.
|
|
1953
|
+
*/
|
|
1825
1954
|
columns?: number | number[]
|
|
1955
|
+
gridTemplateColumns?: number | number[]
|
|
1826
1956
|
gap?: number | number[]
|
|
1827
1957
|
gapX?: number | number[]
|
|
1828
1958
|
gapY?: number | number[]
|
|
1959
|
+
/**
|
|
1960
|
+
* @deprecated Use `gridTemplateRows` instead. `rows` will be removed in v4.
|
|
1961
|
+
*/
|
|
1829
1962
|
rows?: number | number[]
|
|
1963
|
+
gridTemplateRows?: number | number[]
|
|
1830
1964
|
}
|
|
1831
1965
|
|
|
1832
1966
|
/**
|
|
@@ -1982,8 +2116,12 @@ export declare type SelectableTone = ThemeColorStateToneKey
|
|
|
1982
2116
|
*/
|
|
1983
2117
|
export declare interface SelectProps {
|
|
1984
2118
|
fontSize?: number | number[]
|
|
2119
|
+
gap?: number | number[]
|
|
1985
2120
|
padding?: number | number[]
|
|
1986
2121
|
radius?: Radius | Radius[]
|
|
2122
|
+
/**
|
|
2123
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2124
|
+
*/
|
|
1987
2125
|
space?: number | number[]
|
|
1988
2126
|
customValidity?: string
|
|
1989
2127
|
}
|
|
@@ -2000,7 +2138,9 @@ export declare const Skeleton: ForwardRefExoticComponent<
|
|
|
2000
2138
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2001
2139
|
* @beta
|
|
2002
2140
|
*/
|
|
2003
|
-
export declare interface SkeletonProps
|
|
2141
|
+
export declare interface SkeletonProps
|
|
2142
|
+
extends ResponsiveRadiusProps,
|
|
2143
|
+
Omit<BoxOwnProps, 'children'> {
|
|
2004
2144
|
animated?: boolean
|
|
2005
2145
|
delay?: number
|
|
2006
2146
|
}
|
|
@@ -2027,7 +2167,7 @@ export declare interface SpinnerProps {
|
|
|
2027
2167
|
* @public
|
|
2028
2168
|
*/
|
|
2029
2169
|
export declare const SrOnly: ForwardRefExoticComponent<
|
|
2030
|
-
Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
2170
|
+
Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'aria-hidden'>, 'ref'> &
|
|
2031
2171
|
RefAttributes<HTMLDivElement>
|
|
2032
2172
|
>
|
|
2033
2173
|
|
|
@@ -2044,18 +2184,26 @@ export declare interface SrOnlyProps {
|
|
|
2044
2184
|
*
|
|
2045
2185
|
* @public
|
|
2046
2186
|
*/
|
|
2047
|
-
export declare const Stack:
|
|
2048
|
-
StackProps
|
|
2049
|
-
|
|
2187
|
+
export declare const Stack: <E extends ElementType = 'div'>(
|
|
2188
|
+
props: StackProps<E>,
|
|
2189
|
+
) => React.JSX.Element
|
|
2050
2190
|
|
|
2051
2191
|
/**
|
|
2052
2192
|
* @public
|
|
2053
2193
|
*/
|
|
2054
|
-
export declare interface
|
|
2055
|
-
|
|
2194
|
+
export declare interface StackOwnProps extends BoxOwnProps {
|
|
2195
|
+
gap?: number | number[]
|
|
2196
|
+
/**
|
|
2197
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2198
|
+
*/
|
|
2056
2199
|
space?: number | number[]
|
|
2057
2200
|
}
|
|
2058
2201
|
|
|
2202
|
+
/**
|
|
2203
|
+
* @public
|
|
2204
|
+
*/
|
|
2205
|
+
export declare type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>
|
|
2206
|
+
|
|
2059
2207
|
/**
|
|
2060
2208
|
* @public
|
|
2061
2209
|
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
@@ -2095,7 +2243,7 @@ export declare const Tab: ForwardRefExoticComponent<
|
|
|
2095
2243
|
TabProps &
|
|
2096
2244
|
Omit<
|
|
2097
2245
|
HTMLProps<HTMLButtonElement>,
|
|
2098
|
-
'label' | 'id' | 'type' | '
|
|
2246
|
+
'width' | 'label' | 'id' | 'type' | 'as' | 'aria-controls'
|
|
2099
2247
|
>,
|
|
2100
2248
|
'ref'
|
|
2101
2249
|
> &
|
|
@@ -2113,7 +2261,7 @@ export declare const TabList: ForwardRefExoticComponent<
|
|
|
2113
2261
|
/**
|
|
2114
2262
|
* @public
|
|
2115
2263
|
*/
|
|
2116
|
-
export declare interface TabListProps extends Omit<
|
|
2264
|
+
export declare interface TabListProps extends Omit<InlineOwnProps, 'height'> {
|
|
2117
2265
|
children: Array<React.JSX.Element | null | undefined | false>
|
|
2118
2266
|
}
|
|
2119
2267
|
|
|
@@ -2122,7 +2270,7 @@ export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'>
|
|
|
2122
2270
|
*/
|
|
2123
2271
|
export declare const TabPanel: ForwardRefExoticComponent<
|
|
2124
2272
|
Omit<
|
|
2125
|
-
TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | '
|
|
2273
|
+
TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'as' | 'role' | 'aria-labelledby'>,
|
|
2126
2274
|
'ref'
|
|
2127
2275
|
> &
|
|
2128
2276
|
RefAttributes<HTMLDivElement>
|
|
@@ -2131,7 +2279,7 @@ export declare const TabPanel: ForwardRefExoticComponent<
|
|
|
2131
2279
|
/**
|
|
2132
2280
|
* @public
|
|
2133
2281
|
*/
|
|
2134
|
-
export declare interface TabPanelProps extends
|
|
2282
|
+
export declare interface TabPanelProps extends BoxOwnProps {
|
|
2135
2283
|
/**
|
|
2136
2284
|
* The `id` of the correlating `Tab` component.
|
|
2137
2285
|
*/
|
|
@@ -2157,15 +2305,15 @@ export declare interface TabProps {
|
|
|
2157
2305
|
'tone'?: ButtonTone
|
|
2158
2306
|
}
|
|
2159
2307
|
|
|
2308
|
+
/** @public */
|
|
2309
|
+
export declare type TagType = keyof React.JSX.IntrinsicElements
|
|
2310
|
+
|
|
2160
2311
|
/**
|
|
2161
2312
|
* The `Text` component is an agile, themed typographic element.
|
|
2162
2313
|
*
|
|
2163
2314
|
* @public
|
|
2164
2315
|
*/
|
|
2165
|
-
declare const Text_2:
|
|
2166
|
-
Omit<TextProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
|
|
2167
|
-
RefAttributes<HTMLDivElement>
|
|
2168
|
-
>
|
|
2316
|
+
declare const Text_2: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element
|
|
2169
2317
|
export {Text_2 as Text}
|
|
2170
2318
|
|
|
2171
2319
|
/**
|
|
@@ -2205,14 +2353,14 @@ export declare interface TextAreaProps extends ResponsiveRadiusProps {
|
|
|
2205
2353
|
* @public
|
|
2206
2354
|
*/
|
|
2207
2355
|
export declare const TextInput: ForwardRefExoticComponent<
|
|
2208
|
-
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | '
|
|
2356
|
+
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'as' | 'prefix'>, 'ref'> &
|
|
2209
2357
|
RefAttributes<HTMLInputElement>
|
|
2210
2358
|
>
|
|
2211
2359
|
|
|
2212
2360
|
/**
|
|
2213
2361
|
* @public
|
|
2214
2362
|
*/
|
|
2215
|
-
export declare type TextInputClearButtonProps =
|
|
2363
|
+
export declare type TextInputClearButtonProps = ButtonOwnProps &
|
|
2216
2364
|
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
|
|
2217
2365
|
|
|
2218
2366
|
/**
|
|
@@ -2239,7 +2387,11 @@ export declare interface TextInputProps {
|
|
|
2239
2387
|
padding?: number | number[]
|
|
2240
2388
|
prefix?: React.ReactNode
|
|
2241
2389
|
radius?: Radius | Radius[]
|
|
2390
|
+
/**
|
|
2391
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2392
|
+
*/
|
|
2242
2393
|
space?: number | number[]
|
|
2394
|
+
gap?: number | number[]
|
|
2243
2395
|
suffix?: React.ReactNode
|
|
2244
2396
|
type?: TextInputType
|
|
2245
2397
|
weight?: ThemeFontWeightKey_2
|
|
@@ -2266,10 +2418,9 @@ export declare type TextInputType =
|
|
|
2266
2418
|
/**
|
|
2267
2419
|
* @public
|
|
2268
2420
|
*/
|
|
2269
|
-
export declare interface
|
|
2421
|
+
export declare interface TextOwnProps {
|
|
2270
2422
|
accent?: boolean
|
|
2271
2423
|
align?: TextAlign | TextAlign[]
|
|
2272
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2273
2424
|
/** When `true` the text color will be muted. */
|
|
2274
2425
|
muted?: boolean
|
|
2275
2426
|
size?: number | number[]
|
|
@@ -2282,13 +2433,18 @@ export declare interface TextProps {
|
|
|
2282
2433
|
weight?: ThemeFontWeightKey_2
|
|
2283
2434
|
}
|
|
2284
2435
|
|
|
2436
|
+
/**
|
|
2437
|
+
* @public
|
|
2438
|
+
*/
|
|
2439
|
+
export declare type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>
|
|
2440
|
+
|
|
2285
2441
|
/**
|
|
2286
2442
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2287
2443
|
* @beta
|
|
2288
2444
|
*/
|
|
2289
2445
|
export declare const TextSkeleton: ForwardRefExoticComponent<
|
|
2290
2446
|
Omit<
|
|
2291
|
-
TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, '
|
|
2447
|
+
TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
|
|
2292
2448
|
'ref'
|
|
2293
2449
|
> &
|
|
2294
2450
|
RefAttributes<HTMLDivElement>
|
|
@@ -2586,7 +2742,7 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
|
|
|
2586
2742
|
* @public
|
|
2587
2743
|
*/
|
|
2588
2744
|
export declare const Tooltip: ForwardRefExoticComponent<
|
|
2589
|
-
Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | '
|
|
2745
|
+
Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'as' | 'children'>, 'ref'> &
|
|
2590
2746
|
RefAttributes<HTMLDivElement>
|
|
2591
2747
|
>
|
|
2592
2748
|
|
|
@@ -2681,8 +2837,8 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2681
2837
|
*/
|
|
2682
2838
|
export declare const Tree: ForwardRefExoticComponent<
|
|
2683
2839
|
TreeProps &
|
|
2684
|
-
Omit<HTMLProps<
|
|
2685
|
-
RefAttributes<
|
|
2840
|
+
Omit<HTMLProps<HTMLUListElement>, 'wrap' | 'height' | 'as' | 'ref' | 'align' | 'role'> &
|
|
2841
|
+
RefAttributes<HTMLUListElement>
|
|
2686
2842
|
>
|
|
2687
2843
|
|
|
2688
2844
|
/**
|
|
@@ -2696,6 +2852,10 @@ export declare interface TreeContextValue {
|
|
|
2696
2852
|
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
|
|
2697
2853
|
setExpanded: (path: string, expanded: boolean) => void
|
|
2698
2854
|
setFocusedElement: (focusedElement: HTMLElement | null) => void
|
|
2855
|
+
gap: number | number[]
|
|
2856
|
+
/**
|
|
2857
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2858
|
+
*/
|
|
2699
2859
|
space: number | number[]
|
|
2700
2860
|
state: TreeState
|
|
2701
2861
|
}
|
|
@@ -2722,8 +2882,12 @@ export declare interface TreeItemProps {
|
|
|
2722
2882
|
/**
|
|
2723
2883
|
* Allows passing a custom element type to the link component
|
|
2724
2884
|
*/
|
|
2725
|
-
linkAs?:
|
|
2885
|
+
linkAs?: ElementType
|
|
2726
2886
|
padding?: number | number[]
|
|
2887
|
+
gap?: number | number[]
|
|
2888
|
+
/**
|
|
2889
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2890
|
+
*/
|
|
2727
2891
|
space?: number | number[]
|
|
2728
2892
|
text?: React.ReactNode
|
|
2729
2893
|
weight?: ThemeFontWeightKey_2
|
|
@@ -2734,6 +2898,10 @@ export declare interface TreeItemProps {
|
|
|
2734
2898
|
* @beta
|
|
2735
2899
|
*/
|
|
2736
2900
|
export declare interface TreeProps {
|
|
2901
|
+
gap?: number | number[]
|
|
2902
|
+
/**
|
|
2903
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
2904
|
+
*/
|
|
2737
2905
|
space?: number | number[]
|
|
2738
2906
|
}
|
|
2739
2907
|
|
|
@@ -2940,8 +3108,8 @@ export declare function useTree(): TreeContextValue
|
|
|
2940
3108
|
*/
|
|
2941
3109
|
export declare const VirtualList: ForwardRefExoticComponent<
|
|
2942
3110
|
VirtualListProps<any> &
|
|
2943
|
-
|
|
2944
|
-
Omit<HTMLProps<HTMLDivElement>, '
|
|
3111
|
+
StackOwnProps &
|
|
3112
|
+
Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'ref' | 'onChange'> &
|
|
2945
3113
|
RefAttributes<HTMLDivElement>
|
|
2946
3114
|
>
|
|
2947
3115
|
|