@sanity/ui 3.2.0 → 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 +54 -43
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +54 -43
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +129 -75
- package/dist/_visual-editing.d.ts +129 -75
- package/dist/index.d.mts +222 -139
- package/dist/index.d.ts +222 -139
- package/dist/index.js.map +1 -1
- 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/menu/__workshop__/asComponent.tsx +1 -1
- package/src/core/components/menu/menuDivider.ts +16 -5
- package/src/core/components/menu/menuGroup.spacing.test.tsx +1 -7
- package/src/core/components/menu/menuGroup.tsx +14 -6
- package/src/core/components/menu/menuItem.tsx +17 -6
- package/src/core/components/skeleton/skeleton.tsx +2 -2
- 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.tsx +9 -6
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +3 -2
- 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 +12 -4
- package/src/core/primitives/box/box.tsx +23 -12
- 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 +3 -3
- package/src/core/primitives/button/button.tsx +28 -9
- 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 +3 -1
- package/src/core/primitives/grid/grid.tsx +22 -9
- package/src/core/primitives/heading/heading.tsx +19 -11
- package/src/core/primitives/inline/inline.tsx +19 -9
- 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/stack/stack.tsx +20 -11
- package/src/core/primitives/text/text.tsx +19 -11
- package/src/core/primitives/textInput/textInput.tsx +2 -2
- 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
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import {BaseTheme} from '@sanity/ui/theme'
|
|
2
|
-
import {DetailedHTMLProps} from 'react'
|
|
3
|
-
import {FastOmit} from 'styled-components'
|
|
4
2
|
import {ForwardRefExoticComponent} from 'react'
|
|
5
|
-
import {HTMLAttributes} from 'react'
|
|
6
3
|
import {HTMLProps} from 'react'
|
|
7
|
-
import {IStyledComponentBase} from 'styled-components/dist/types'
|
|
8
4
|
import {Ref} from 'react'
|
|
9
5
|
import {RefAttributes} from 'react'
|
|
10
6
|
import {RootTheme} from '@sanity/ui/theme'
|
|
@@ -15,16 +11,20 @@ import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
|
15
11
|
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
16
12
|
import {ThemeFontWeightKey} from '@sanity/ui/theme'
|
|
17
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
declare type Assign<T extends object, U extends object> = Omit<T, keyof U> & U
|
|
20
|
+
|
|
18
21
|
/**
|
|
19
22
|
* The `Box` component is a basic layout wrapper component which provides utility properties
|
|
20
23
|
* for flex, margins and padding.
|
|
21
24
|
*
|
|
22
25
|
* @public
|
|
23
26
|
*/
|
|
24
|
-
export declare const Box:
|
|
25
|
-
Omit<BoxProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
26
|
-
RefAttributes<HTMLDivElement>
|
|
27
|
-
>
|
|
27
|
+
export declare const Box: <E extends ElementType = 'div'>(props: BoxProps<E>) => React.JSX.Element
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* @public
|
|
@@ -42,18 +42,24 @@ declare type BoxHeight = 'stretch' | 'fill'
|
|
|
42
42
|
declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
+
* The props that `Box` adds on top of the element it renders as.
|
|
46
|
+
*
|
|
45
47
|
* @public
|
|
46
48
|
*/
|
|
47
|
-
declare interface
|
|
49
|
+
declare interface BoxOwnProps
|
|
48
50
|
extends ResponsiveFlexItemProps,
|
|
49
51
|
ResponsiveBoxProps,
|
|
50
52
|
ResponsiveGridItemProps,
|
|
51
53
|
ResponsiveMarginProps,
|
|
52
54
|
ResponsivePaddingProps {
|
|
53
|
-
|
|
54
|
-
forwardedAs?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
55
|
+
forwardedAs?: ElementType
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
/**
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
declare type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>
|
|
62
|
+
|
|
57
63
|
/**
|
|
58
64
|
* @public
|
|
59
65
|
*/
|
|
@@ -62,10 +68,9 @@ declare type BoxSizing = 'content' | 'border'
|
|
|
62
68
|
/**
|
|
63
69
|
* @public
|
|
64
70
|
*/
|
|
65
|
-
export declare const Button:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
71
|
+
export declare const Button: <E extends ElementType = 'button'>(
|
|
72
|
+
props: ButtonProps<E>,
|
|
73
|
+
) => React.JSX.Element
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
76
|
* @public
|
|
@@ -75,8 +80,7 @@ declare type ButtonMode = ThemeColorButtonModeKey
|
|
|
75
80
|
/**
|
|
76
81
|
* @public
|
|
77
82
|
*/
|
|
78
|
-
declare interface
|
|
79
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
83
|
+
declare interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
80
84
|
fontSize?: number | number[]
|
|
81
85
|
mode?: ButtonMode
|
|
82
86
|
icon?: React.ElementType | React.ReactNode
|
|
@@ -101,6 +105,11 @@ declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusPr
|
|
|
101
105
|
width?: ButtonWidth
|
|
102
106
|
}
|
|
103
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
declare type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>
|
|
112
|
+
|
|
104
113
|
/**
|
|
105
114
|
* @public
|
|
106
115
|
*/
|
|
@@ -122,16 +131,13 @@ declare type ButtonWidth = 'fill'
|
|
|
122
131
|
*
|
|
123
132
|
* @public
|
|
124
133
|
*/
|
|
125
|
-
export declare const Card:
|
|
126
|
-
Omit<CardProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
127
|
-
RefAttributes<HTMLDivElement>
|
|
128
|
-
>
|
|
134
|
+
export declare const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element
|
|
129
135
|
|
|
130
136
|
/**
|
|
131
137
|
* @public
|
|
132
138
|
*/
|
|
133
|
-
declare interface
|
|
134
|
-
extends
|
|
139
|
+
declare interface CardOwnProps
|
|
140
|
+
extends BoxOwnProps,
|
|
135
141
|
ResponsiveBorderProps,
|
|
136
142
|
ResponsiveRadiusProps,
|
|
137
143
|
ResponsiveShadowProps {
|
|
@@ -145,17 +151,30 @@ declare interface CardProps
|
|
|
145
151
|
* @beta
|
|
146
152
|
*/
|
|
147
153
|
__unstable_focusRing?: boolean
|
|
154
|
+
disabled?: boolean
|
|
148
155
|
muted?: boolean
|
|
149
156
|
pressed?: boolean
|
|
150
157
|
scheme?: ThemeColorSchemeKey
|
|
158
|
+
selected?: boolean
|
|
151
159
|
tone?: CardTone
|
|
152
160
|
}
|
|
153
161
|
|
|
162
|
+
/**
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
declare type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>
|
|
166
|
+
|
|
154
167
|
/**
|
|
155
168
|
* @public
|
|
156
169
|
*/
|
|
157
170
|
declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
158
171
|
|
|
172
|
+
/** @public */
|
|
173
|
+
declare type ComponentType<P = any> =
|
|
174
|
+
| React.FunctionComponent<P>
|
|
175
|
+
| React.ComponentClass<P>
|
|
176
|
+
| React.ExoticComponent<P>
|
|
177
|
+
|
|
159
178
|
/**
|
|
160
179
|
* @public
|
|
161
180
|
*/
|
|
@@ -166,15 +185,18 @@ declare type Delay =
|
|
|
166
185
|
close: number
|
|
167
186
|
}>
|
|
168
187
|
|
|
188
|
+
/** @public */
|
|
189
|
+
declare type ElementType<P = any> = TagType | ComponentType<P>
|
|
190
|
+
|
|
191
|
+
/** @public */
|
|
192
|
+
declare type EmptyProps = object
|
|
193
|
+
|
|
169
194
|
/**
|
|
170
195
|
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
171
196
|
*
|
|
172
197
|
* @public
|
|
173
198
|
*/
|
|
174
|
-
export declare const Flex:
|
|
175
|
-
Omit<FlexProps & Omit<HTMLProps<HTMLDivElement>, 'wrap' | 'as'>, 'ref'> &
|
|
176
|
-
RefAttributes<HTMLDivElement>
|
|
177
|
-
>
|
|
199
|
+
export declare const Flex: <E extends ElementType = 'div'>(props: FlexProps<E>) => React.JSX.Element
|
|
178
200
|
|
|
179
201
|
/**
|
|
180
202
|
* @public
|
|
@@ -200,13 +222,18 @@ declare type FlexJustify =
|
|
|
200
222
|
/**
|
|
201
223
|
* @public
|
|
202
224
|
*/
|
|
203
|
-
declare interface
|
|
204
|
-
extends Omit<
|
|
225
|
+
declare interface FlexOwnProps
|
|
226
|
+
extends Omit<BoxOwnProps, 'display'>,
|
|
205
227
|
ResponsiveFlexProps,
|
|
206
228
|
ResponsiveFlexItemProps {
|
|
207
229
|
gap?: number | number[]
|
|
208
230
|
}
|
|
209
231
|
|
|
232
|
+
/**
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
declare type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>
|
|
236
|
+
|
|
210
237
|
/**
|
|
211
238
|
* @public
|
|
212
239
|
*/
|
|
@@ -222,10 +249,7 @@ declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
|
|
|
222
249
|
*
|
|
223
250
|
* @public
|
|
224
251
|
*/
|
|
225
|
-
export declare const Grid:
|
|
226
|
-
Omit<GridProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'rows'>, 'ref'> &
|
|
227
|
-
RefAttributes<HTMLDivElement>
|
|
228
|
-
>
|
|
252
|
+
export declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element
|
|
229
253
|
|
|
230
254
|
/**
|
|
231
255
|
* @public
|
|
@@ -275,7 +299,12 @@ declare type GridItemRowStart = 'auto' | number
|
|
|
275
299
|
/**
|
|
276
300
|
* @public
|
|
277
301
|
*/
|
|
278
|
-
declare interface
|
|
302
|
+
declare interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
declare type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>
|
|
279
308
|
|
|
280
309
|
/**
|
|
281
310
|
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
@@ -283,7 +312,7 @@ declare interface GridProps extends Omit<BoxProps, 'display'>, ResponsiveGridPro
|
|
|
283
312
|
* @public
|
|
284
313
|
*/
|
|
285
314
|
export declare const Hotkeys: ForwardRefExoticComponent<
|
|
286
|
-
HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | '
|
|
315
|
+
HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as' | 'ref'> & RefAttributes<HTMLElement>
|
|
287
316
|
>
|
|
288
317
|
|
|
289
318
|
/**
|
|
@@ -304,7 +333,7 @@ declare interface HotkeysProps {
|
|
|
304
333
|
/**
|
|
305
334
|
* @public
|
|
306
335
|
*/
|
|
307
|
-
declare interface
|
|
336
|
+
declare interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {
|
|
308
337
|
/**
|
|
309
338
|
* The spacing between children.
|
|
310
339
|
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
@@ -357,36 +386,33 @@ declare interface LayerProviderProps {
|
|
|
357
386
|
* @public
|
|
358
387
|
*/
|
|
359
388
|
export declare const Menu: ForwardRefExoticComponent<
|
|
360
|
-
Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | '
|
|
389
|
+
Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'tabIndex' | 'role'>, 'ref'> &
|
|
361
390
|
RefAttributes<HTMLDivElement>
|
|
362
391
|
>
|
|
363
392
|
|
|
364
393
|
/**
|
|
365
394
|
* @public
|
|
366
395
|
*/
|
|
367
|
-
export declare const MenuDivider:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
> &
|
|
371
|
-
string
|
|
396
|
+
export declare const MenuDivider: <E extends ElementType = 'hr'>(
|
|
397
|
+
props: MenuDividerProps<E>,
|
|
398
|
+
) => React.JSX.Element
|
|
372
399
|
|
|
373
400
|
/**
|
|
374
401
|
* @public
|
|
375
402
|
*/
|
|
376
|
-
|
|
377
|
-
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
378
|
-
MenuGroupProps,
|
|
379
|
-
): React.JSX.Element
|
|
403
|
+
declare type MenuDividerProps<E extends ElementType = 'hr'> = Props<EmptyProps, E>
|
|
380
404
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
405
|
+
/**
|
|
406
|
+
* @public
|
|
407
|
+
*/
|
|
408
|
+
export declare const MenuGroup: <E extends ElementType = 'button'>(
|
|
409
|
+
props: MenuGroupProps<E>,
|
|
410
|
+
) => React.JSX.Element
|
|
384
411
|
|
|
385
412
|
/**
|
|
386
413
|
* @public
|
|
387
414
|
*/
|
|
388
|
-
declare interface
|
|
389
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
415
|
+
declare interface MenuGroupOwnProps {
|
|
390
416
|
fontSize?: number | number[]
|
|
391
417
|
icon?: React.ElementType | React.ReactNode
|
|
392
418
|
menu?: Omit<
|
|
@@ -415,17 +441,19 @@ declare interface MenuGroupProps {
|
|
|
415
441
|
/**
|
|
416
442
|
* @public
|
|
417
443
|
*/
|
|
418
|
-
|
|
419
|
-
MenuItemProps &
|
|
420
|
-
Omit<HTMLProps<HTMLDivElement>, 'selected' | 'height' | 'ref' | 'tabIndex' | 'as'> &
|
|
421
|
-
RefAttributes<HTMLDivElement>
|
|
422
|
-
>
|
|
444
|
+
declare type MenuGroupProps<E extends ElementType = 'button'> = Props<MenuGroupOwnProps, E>
|
|
423
445
|
|
|
424
446
|
/**
|
|
425
447
|
* @public
|
|
426
448
|
*/
|
|
427
|
-
export declare
|
|
428
|
-
|
|
449
|
+
export declare const MenuItem: <E extends ElementType = 'button'>(
|
|
450
|
+
props: MenuItemProps<E>,
|
|
451
|
+
) => React.JSX.Element
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
declare interface MenuItemOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
429
457
|
fontSize?: number | number[]
|
|
430
458
|
hotkeys?: string[]
|
|
431
459
|
icon?: React.ElementType | React.ReactNode
|
|
@@ -441,6 +469,11 @@ export declare interface MenuItemProps extends ResponsivePaddingProps, Responsiv
|
|
|
441
469
|
tone?: SelectableTone
|
|
442
470
|
}
|
|
443
471
|
|
|
472
|
+
/**
|
|
473
|
+
* @public
|
|
474
|
+
*/
|
|
475
|
+
export declare type MenuItemProps<E extends ElementType = 'button'> = Props<MenuItemOwnProps, E>
|
|
476
|
+
|
|
444
477
|
/**
|
|
445
478
|
* @public
|
|
446
479
|
*/
|
|
@@ -495,7 +528,7 @@ declare type Placement =
|
|
|
495
528
|
*/
|
|
496
529
|
export declare const Popover: ForwardRefExoticComponent<
|
|
497
530
|
Omit<
|
|
498
|
-
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | '
|
|
531
|
+
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'as' | 'children'>,
|
|
499
532
|
'ref'
|
|
500
533
|
> &
|
|
501
534
|
RefAttributes<HTMLDivElement>
|
|
@@ -637,6 +670,19 @@ declare interface PortalProviderProps {
|
|
|
637
670
|
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
638
671
|
}
|
|
639
672
|
|
|
673
|
+
/**
|
|
674
|
+
* Resolves the props of a polymorphic component: the props of the element/component passed to `as`
|
|
675
|
+
* (defaulting to the component's own element), with the component's own props assigned on top.
|
|
676
|
+
*
|
|
677
|
+
* @public
|
|
678
|
+
*/
|
|
679
|
+
declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
680
|
+
E extends TagType ? React.JSX.IntrinsicElements[E] : React.ComponentProps<E>,
|
|
681
|
+
P & {
|
|
682
|
+
as?: E
|
|
683
|
+
}
|
|
684
|
+
>
|
|
685
|
+
|
|
640
686
|
/**
|
|
641
687
|
* @public
|
|
642
688
|
*/
|
|
@@ -810,15 +856,14 @@ declare interface SpinnerProps {
|
|
|
810
856
|
*
|
|
811
857
|
* @public
|
|
812
858
|
*/
|
|
813
|
-
export declare const Stack:
|
|
814
|
-
StackProps
|
|
815
|
-
|
|
859
|
+
export declare const Stack: <E extends ElementType = 'div'>(
|
|
860
|
+
props: StackProps<E>,
|
|
861
|
+
) => React.JSX.Element
|
|
816
862
|
|
|
817
863
|
/**
|
|
818
864
|
* @public
|
|
819
865
|
*/
|
|
820
|
-
declare interface
|
|
821
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
866
|
+
declare interface StackOwnProps extends BoxOwnProps {
|
|
822
867
|
gap?: number | number[]
|
|
823
868
|
/**
|
|
824
869
|
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
@@ -826,6 +871,11 @@ declare interface StackProps extends BoxProps {
|
|
|
826
871
|
space?: number | number[]
|
|
827
872
|
}
|
|
828
873
|
|
|
874
|
+
/**
|
|
875
|
+
* @public
|
|
876
|
+
*/
|
|
877
|
+
declare type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>
|
|
878
|
+
|
|
829
879
|
/**
|
|
830
880
|
* @public
|
|
831
881
|
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
@@ -840,7 +890,7 @@ export declare const Tab: ForwardRefExoticComponent<
|
|
|
840
890
|
TabProps &
|
|
841
891
|
Omit<
|
|
842
892
|
HTMLProps<HTMLButtonElement>,
|
|
843
|
-
'label' | 'id' | 'type' | '
|
|
893
|
+
'width' | 'label' | 'id' | 'type' | 'as' | 'aria-controls'
|
|
844
894
|
>,
|
|
845
895
|
'ref'
|
|
846
896
|
> &
|
|
@@ -858,7 +908,7 @@ export declare const TabList: ForwardRefExoticComponent<
|
|
|
858
908
|
/**
|
|
859
909
|
* @public
|
|
860
910
|
*/
|
|
861
|
-
declare interface TabListProps extends Omit<
|
|
911
|
+
declare interface TabListProps extends Omit<InlineOwnProps, 'height'> {
|
|
862
912
|
children: Array<React.JSX.Element | null | undefined | false>
|
|
863
913
|
}
|
|
864
914
|
|
|
@@ -880,15 +930,15 @@ declare interface TabProps {
|
|
|
880
930
|
'tone'?: ButtonTone
|
|
881
931
|
}
|
|
882
932
|
|
|
933
|
+
/** @public */
|
|
934
|
+
declare type TagType = keyof React.JSX.IntrinsicElements
|
|
935
|
+
|
|
883
936
|
/**
|
|
884
937
|
* The `Text` component is an agile, themed typographic element.
|
|
885
938
|
*
|
|
886
939
|
* @public
|
|
887
940
|
*/
|
|
888
|
-
declare const Text_2:
|
|
889
|
-
Omit<TextProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
|
|
890
|
-
RefAttributes<HTMLDivElement>
|
|
891
|
-
>
|
|
941
|
+
declare const Text_2: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element
|
|
892
942
|
export {Text_2 as Text}
|
|
893
943
|
|
|
894
944
|
/**
|
|
@@ -902,14 +952,14 @@ declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
|
|
|
902
952
|
* @public
|
|
903
953
|
*/
|
|
904
954
|
export declare const TextInput: ForwardRefExoticComponent<
|
|
905
|
-
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | '
|
|
955
|
+
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'as' | 'prefix'>, 'ref'> &
|
|
906
956
|
RefAttributes<HTMLInputElement>
|
|
907
957
|
>
|
|
908
958
|
|
|
909
959
|
/**
|
|
910
960
|
* @public
|
|
911
961
|
*/
|
|
912
|
-
declare type TextInputClearButtonProps =
|
|
962
|
+
declare type TextInputClearButtonProps = ButtonOwnProps &
|
|
913
963
|
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
|
|
914
964
|
|
|
915
965
|
/**
|
|
@@ -967,10 +1017,9 @@ declare type TextInputType =
|
|
|
967
1017
|
/**
|
|
968
1018
|
* @public
|
|
969
1019
|
*/
|
|
970
|
-
declare interface
|
|
1020
|
+
declare interface TextOwnProps {
|
|
971
1021
|
accent?: boolean
|
|
972
1022
|
align?: TextAlign | TextAlign[]
|
|
973
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
974
1023
|
/** When `true` the text color will be muted. */
|
|
975
1024
|
muted?: boolean
|
|
976
1025
|
size?: number | number[]
|
|
@@ -983,6 +1032,11 @@ declare interface TextProps {
|
|
|
983
1032
|
weight?: ThemeFontWeightKey
|
|
984
1033
|
}
|
|
985
1034
|
|
|
1035
|
+
/**
|
|
1036
|
+
* @public
|
|
1037
|
+
*/
|
|
1038
|
+
declare type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>
|
|
1039
|
+
|
|
986
1040
|
/**
|
|
987
1041
|
* @public
|
|
988
1042
|
*/
|
|
@@ -1008,7 +1062,7 @@ declare interface ThemeProviderProps {
|
|
|
1008
1062
|
* @public
|
|
1009
1063
|
*/
|
|
1010
1064
|
export declare const Tooltip: ForwardRefExoticComponent<
|
|
1011
|
-
Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | '
|
|
1065
|
+
Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'as' | 'children'>, 'ref'> &
|
|
1012
1066
|
RefAttributes<HTMLDivElement>
|
|
1013
1067
|
>
|
|
1014
1068
|
|