@sanity/ui 3.0.0-static.11 → 3.0.0-static.13
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 +1293 -1215
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/buildCommand.js +28 -10
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +1284 -1202
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +528 -358
- package/dist/_visual-editing.d.ts +528 -358
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +143 -73
- package/dist/css.d.ts +143 -73
- package/dist/css.js +329 -472
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +330 -473
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +1362 -869
- package/dist/index.d.ts +1362 -869
- package/dist/index.js +383 -308
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +387 -312
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-palette.css +105 -1
- package/dist/sanity-palette.min.css +1 -0
- package/dist/sanity-theme.css +4571 -1
- package/dist/sanity-theme.min.css +1 -0
- package/dist/system.css +22053 -21946
- package/dist/system.min.css +1 -0
- package/dist/theme.d.mts +51 -106
- package/dist/theme.d.ts +51 -106
- package/dist/theme.js +9 -9
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +9 -9
- package/dist/theme.mjs.map +1 -1
- package/package.json +10 -5
- package/src/cli/buildCommand.ts +46 -19
- package/src/css/_comp.ts +2 -2
- package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
- package/src/css/{system.style.ts → _system.style.ts} +3 -2
- package/src/css/aspects/display/display.ts +1 -0
- package/src/css/aspects/display/types.ts +2 -3
- package/src/css/aspects/flex/types.ts +4 -12
- package/src/css/aspects/flexItem/types.ts +1 -3
- package/src/css/aspects/font/types.ts +1 -3
- package/src/css/aspects/grid/grid.ts +1 -0
- package/src/css/aspects/grid/types.ts +5 -9
- package/src/css/aspects/gridItem/gridItem.ts +1 -1
- package/src/css/aspects/gridItem/types.ts +7 -18
- package/src/css/aspects/height/height.ts +3 -4
- package/src/css/aspects/inset/inset.ts +1 -0
- package/src/css/aspects/margin/margin.ts +1 -0
- package/src/css/aspects/margin/types.ts +1 -0
- package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
- package/src/css/aspects/maxWidth/types.ts +1 -0
- package/src/css/aspects/minWidth/minWidth.ts +1 -0
- package/src/css/aspects/minWidth/types.ts +2 -0
- package/src/css/aspects/overflow/overflow.ts +1 -0
- package/src/css/aspects/padding/padding.ts +1 -0
- package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
- package/src/css/aspects/position/position.ts +1 -0
- package/src/css/aspects/shadow/shadow.ts +1 -0
- package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
- package/src/css/aspects/textOverflow/types.ts +1 -0
- package/src/css/aspects/width/types.ts +2 -0
- package/src/css/aspects/width/width.ts +1 -0
- package/src/css/{compile/compilePalette.ts → compilePalette.ts} +14 -10
- package/src/css/compileSystem.ts +7 -0
- package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
- package/src/css/{compile/compileTheme_v3.ts → compileTheme_v3.ts} +123 -104
- package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
- package/src/css/components/dialog/dialog.ts +7 -0
- package/src/css/components/menu/menu.ts +2 -0
- package/src/css/components/skeleton/skeleton.ts +4 -0
- package/src/css/components/skeleton/types.ts +4 -0
- package/src/css/components/toast/toast.ts +5 -0
- package/src/css/components/tree/tree.ts +1 -0
- package/src/css/composeClassNames.ts +4 -2
- package/src/css/constants.ts +2 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/_arrow/_arrow.ts +3 -0
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +1 -2
- package/src/css/primitives/_selectable/selectable.ts +1 -2
- package/src/css/primitives/avatar/avatar.style.ts +5 -8
- package/src/css/primitives/avatar/avatar.ts +6 -0
- package/src/css/primitives/avatar/types.ts +1 -0
- package/src/css/primitives/box/types.ts +1 -3
- package/src/css/primitives/button/button.ts +4 -21
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/types.ts +18 -0
- package/src/css/primitives/card/card.style.ts +3 -6
- package/src/css/primitives/card/card.ts +2 -2
- package/src/css/primitives/card/types.ts +2 -2
- package/src/css/primitives/checkbox/checkbox.ts +2 -0
- package/src/css/primitives/container/container.ts +1 -0
- package/src/css/primitives/container/types.ts +1 -0
- package/src/css/primitives/kbd/kbd.ts +1 -0
- package/src/css/primitives/label/types.ts +7 -2
- package/src/css/primitives/popover/popover.ts +2 -0
- package/src/css/primitives/radio/radio.ts +1 -0
- package/src/css/primitives/select/select.ts +2 -0
- package/src/css/primitives/spinner/spinner.ts +2 -0
- package/src/css/primitives/switch/switch.ts +5 -0
- package/src/css/primitives/text/types.ts +4 -0
- package/src/css/primitives/textArea/textArea.ts +1 -0
- package/src/css/primitives/textInput/textInput.ts +1 -0
- package/src/css/primitives/tooltip/tooltip.ts +2 -0
- package/src/css/scopeClassName.ts +1 -0
- package/src/css/types.ts +9 -12
- package/src/css/util.ts +5 -0
- package/src/css/utils/srOnly/srOnly.ts +3 -1
- package/src/css/varNames.ts +131 -141
- package/src/css/vars.ts +1 -6
- package/src/theme/palette/constants.ts +2 -0
- package/src/theme/palette/types.ts +3 -0
- package/src/theme/types.ts +2 -6
- package/src/theme/v0/focusRing.ts +1 -3
- package/src/theme/v0/font.ts +6 -18
- package/src/theme/v0/layer.ts +1 -3
- package/src/theme/v0/shadow.ts +2 -6
- package/src/theme/v2/avatar.ts +1 -3
- package/src/theme/v2/color/_system.ts +1 -3
- package/src/theme/v2/color/avatar.ts +2 -6
- package/src/theme/v2/color/badge.ts +2 -6
- package/src/theme/v2/color/button.ts +3 -9
- package/src/theme/v2/color/color.ts +3 -9
- package/src/theme/v2/color/input.ts +3 -9
- package/src/theme/v2/color/kbd.ts +1 -3
- package/src/theme/v2/color/selectable.ts +2 -6
- package/src/theme/v2/color/state.ts +1 -3
- package/src/theme/v2/color/syntax.ts +1 -3
- package/src/theme/v2/input.ts +1 -3
- package/src/theme/v2/theme.ts +2 -6
- package/src/theme/v3/buildTheme_v3.ts +1 -0
- package/src/theme/v3/color/color.ts +6 -4
- package/src/theme/v3/color/renderColor.ts +4 -1
- package/src/theme/v3/defaultTokens.ts +1 -0
- package/src/theme/v3/resolveTokens.ts +9 -9
- package/src/ui/RootClassNames.tsx +3 -0
- package/src/ui/StyleTags.tsx +3 -1
- package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
- package/src/ui/_compat/theme/themeProvider.tsx +2 -6
- package/src/ui/_compat/theme/types.ts +1 -3
- package/src/ui/_compat/theme/useRootTheme.ts +1 -3
- package/src/ui/_compat/theme/useTheme.ts +2 -6
- package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
- package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
- package/src/ui/components/autocomplete/types.ts +3 -8
- package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
- package/src/ui/components/dialog/dialog.tsx +89 -291
- package/src/ui/components/dialog/dialogCard.tsx +183 -0
- package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
- package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
- package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
- package/src/ui/components/menu/menu.tsx +27 -33
- package/src/ui/components/menu/menuButton.tsx +10 -14
- package/src/ui/components/menu/menuDivider.tsx +25 -13
- package/src/ui/components/menu/menuGroup.tsx +34 -26
- package/src/ui/components/menu/menuItem.tsx +51 -40
- package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
- package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
- package/src/ui/components/skeleton/index.ts +3 -0
- package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
- package/src/ui/components/skeleton/skeleton.tsx +39 -16
- package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
- package/src/ui/components/tab/tab.tsx +23 -19
- package/src/ui/components/tab/tabList.tsx +34 -33
- package/src/ui/components/tab/tabPanel.tsx +25 -19
- package/src/ui/components/toast/toast.tsx +21 -16
- package/src/ui/components/toast/toastLayer.tsx +28 -10
- package/src/ui/components/toast/toastProvider.tsx +2 -6
- package/src/ui/components/toast/types.ts +2 -6
- package/src/ui/components/toast/useToast.ts +1 -3
- package/src/ui/components/tree/tree.tsx +194 -187
- package/src/ui/components/tree/treeGroup.tsx +25 -5
- package/src/ui/components/tree/treeItem.tsx +35 -23
- package/src/ui/hooks/useClickOutside.ts +2 -6
- package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
- package/src/ui/primitives/_selectable/selectable.tsx +33 -20
- package/src/ui/primitives/avatar/avatar.tsx +28 -31
- package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
- package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
- package/src/ui/primitives/avatar/types.ts +2 -0
- package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
- package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
- package/src/ui/primitives/badge/badge.tsx +33 -32
- package/src/ui/primitives/badge/types.ts +2 -1
- package/src/ui/primitives/box/box.tsx +59 -29
- package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
- package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
- package/src/ui/primitives/button/button.test.tsx +1 -15
- package/src/ui/primitives/button/button.tsx +64 -70
- package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
- package/src/ui/primitives/card/card.tsx +22 -22
- package/src/ui/primitives/card/cardProvider.tsx +2 -0
- package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
- package/src/ui/primitives/code/code.tsx +24 -22
- package/src/ui/primitives/container/container.tsx +26 -15
- package/src/ui/primitives/flex/flex.tsx +21 -19
- package/src/ui/primitives/grid/grid.tsx +21 -16
- package/src/ui/primitives/heading/heading.tsx +42 -19
- package/src/ui/primitives/inline/inline.tsx +26 -23
- package/src/ui/primitives/kbd/kbd.tsx +25 -23
- package/src/ui/primitives/label/label.tsx +41 -26
- package/src/ui/primitives/popover/popover.tsx +281 -277
- package/src/ui/primitives/popover/popoverCard.tsx +119 -118
- package/src/ui/primitives/radio/radio.tsx +30 -14
- package/src/ui/primitives/select/select.tsx +24 -16
- package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
- package/src/ui/primitives/spinner/spinner.tsx +24 -12
- package/src/ui/primitives/stack/stack.tsx +27 -18
- package/src/ui/primitives/switch/switch.tsx +31 -14
- package/src/ui/primitives/text/text.tsx +42 -24
- package/src/ui/primitives/textArea/textArea.tsx +33 -18
- package/src/ui/primitives/textInput/textInput.tsx +28 -40
- package/src/ui/primitives/tooltip/constants.ts +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +76 -59
- package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
- package/src/ui/primitives/types.ts +1 -3
- package/src/ui/types/avatar.ts +3 -6
- package/src/ui/types/badge.ts +1 -3
- package/src/ui/types/button.ts +1 -3
- package/src/ui/types/card.ts +1 -3
- package/src/ui/types/dialog.ts +1 -3
- package/src/ui/types/props.ts +20 -10
- package/src/ui/utils/arrow/arrow.tsx +40 -14
- package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
- package/src/ui/utils/boundaryElement/types.ts +1 -3
- package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
- package/src/ui/utils/elementQuery/elementQuery.tsx +36 -14
- package/src/ui/utils/errorBoundary.tsx +2 -0
- package/src/ui/utils/index.ts +0 -1
- package/src/ui/utils/layer/layer.tsx +23 -93
- package/src/ui/utils/layer/layerCard.tsx +92 -0
- package/src/ui/utils/layer/layerProvider.tsx +2 -6
- package/src/ui/utils/layer/useLayer.ts +1 -3
- package/src/ui/utils/portal/portal.ts +2 -6
- package/src/ui/utils/portal/portalProvider.tsx +2 -6
- package/src/ui/utils/portal/types.ts +1 -3
- package/src/ui/utils/portal/usePortal.ts +1 -3
- package/src/ui/utils/srOnly/srOnly.tsx +25 -20
- package/src/ui/utils/virtualList/virtualList.tsx +36 -24
- package/src/css/compile/compileRule.ts +0 -97
- package/src/css/compile/compileRules.test.ts +0 -36
- package/src/css/compile/compileRules.ts +0 -43
- package/src/css/compile/compileSystem.ts +0 -7
- package/src/css/compile/types.ts +0 -6
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/ui/utils/conditionalWrapper/index.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,21 +4,22 @@ import {Display as BoxDisplay} from '@sanity/ui/css'
|
|
|
4
4
|
import {BoxHeight} from '@sanity/ui/css'
|
|
5
5
|
import {BoxOverflow} from '@sanity/ui/css'
|
|
6
6
|
import {BoxSizing} from '@sanity/ui/css'
|
|
7
|
-
import {BoxStyleProps} from '@sanity/ui/css'
|
|
8
|
-
import {ButtonStyleProps} from '@sanity/ui/css'
|
|
7
|
+
import type {BoxStyleProps} from '@sanity/ui/css'
|
|
8
|
+
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
9
9
|
import {CardContextValue as CardContextValue_2} from './types'
|
|
10
10
|
import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
|
|
11
11
|
import {Component} from 'react'
|
|
12
|
+
import type {ComponentClass} from 'react'
|
|
12
13
|
import type {ComponentProps} from 'react'
|
|
13
|
-
import {ComponentType} from 'react'
|
|
14
|
+
import {ComponentType as ComponentType_2} from 'react'
|
|
14
15
|
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
15
16
|
import {Context} from 'react'
|
|
16
17
|
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
17
18
|
import {CSSObject} from '@sanity/ui/theme'
|
|
18
|
-
import {DisplayStyleProps} from '@sanity/ui/css'
|
|
19
|
-
import {
|
|
20
|
-
import {ElementType} from 'react'
|
|
19
|
+
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
20
|
+
import {ElementType as ElementType_2} from 'react'
|
|
21
21
|
import {ErrorInfo} from 'react'
|
|
22
|
+
import type {ExoticComponent} from 'react'
|
|
22
23
|
import {FlexAlign} from '@sanity/ui/css'
|
|
23
24
|
import {FlexDirection} from '@sanity/ui/css'
|
|
24
25
|
import {FlexJustify} from '@sanity/ui/css'
|
|
@@ -31,7 +32,7 @@ import {FontLabelSize} from '@sanity/ui/theme'
|
|
|
31
32
|
import {FontStyleProps} from '@sanity/ui/css'
|
|
32
33
|
import {FontTextSize} from '@sanity/ui/theme'
|
|
33
34
|
import {ForwardedRef} from 'react'
|
|
34
|
-
import {
|
|
35
|
+
import type {FunctionComponent} from 'react'
|
|
35
36
|
import {GapStyleProps} from '@sanity/ui/css'
|
|
36
37
|
import {GridAutoCols} from '@sanity/ui/css'
|
|
37
38
|
import {GridAutoFlow} from '@sanity/ui/css'
|
|
@@ -42,22 +43,23 @@ import {GridItemColumnStart} from '@sanity/ui/css'
|
|
|
42
43
|
import {GridItemRow} from '@sanity/ui/css'
|
|
43
44
|
import {GridItemRowEnd} from '@sanity/ui/css'
|
|
44
45
|
import {GridItemRowStart} from '@sanity/ui/css'
|
|
46
|
+
import {GridStyleProps} from '@sanity/ui/css'
|
|
45
47
|
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
46
48
|
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
47
49
|
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
48
50
|
import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
51
|
+
import {HTMLAttributes} from 'react'
|
|
49
52
|
import {InputStyleProps} from '@sanity/ui/css'
|
|
50
|
-
import {InsetStyleProps} from '@sanity/ui/css'
|
|
53
|
+
import type {InsetStyleProps} from '@sanity/ui/css'
|
|
51
54
|
import {JSX} from 'react'
|
|
52
|
-
import {
|
|
55
|
+
import {LabelStyleProps} from '@sanity/ui/css'
|
|
56
|
+
import {MouseEventHandler} from 'react'
|
|
53
57
|
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
54
58
|
import {MutableRefObject} from 'react'
|
|
55
|
-
import {NamedExoticComponent} from 'react'
|
|
56
59
|
import {PaddingStyleProps} from '@sanity/ui/css'
|
|
57
60
|
import {parseColor as parseColor_2} from '@sanity/ui/theme'
|
|
58
61
|
import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
59
|
-
import {
|
|
60
|
-
import {PositionStyleProps} from '@sanity/ui/css'
|
|
62
|
+
import type {PositionStyleProps} from '@sanity/ui/css'
|
|
61
63
|
import {PropsWithChildren} from 'react'
|
|
62
64
|
import {px} from '@sanity/ui/css'
|
|
63
65
|
import {Radius} from '@sanity/ui/theme'
|
|
@@ -65,8 +67,8 @@ import {RadiusStyleProps} from '@sanity/ui/css'
|
|
|
65
67
|
import {ReactElement} from 'react'
|
|
66
68
|
import {ReactNode} from 'react'
|
|
67
69
|
import {ReactPortal} from 'react'
|
|
70
|
+
import {Ref} from 'react'
|
|
68
71
|
import {RefAttributes} from 'react'
|
|
69
|
-
import {RefCallback} from 'react'
|
|
70
72
|
import {rem} from '@sanity/ui/css'
|
|
71
73
|
import {ResponsiveProp} from '@sanity/ui/css'
|
|
72
74
|
import {RGB as RGB_2} from '@sanity/ui/theme'
|
|
@@ -130,19 +132,39 @@ import {ThemeInput} from '@sanity/ui/theme'
|
|
|
130
132
|
import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
|
|
131
133
|
import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
|
|
132
134
|
import {ThemeStyles} from '@sanity/ui/theme'
|
|
133
|
-
import {Width} from '@sanity/ui/css'
|
|
135
|
+
import type {Width} from '@sanity/ui/css'
|
|
134
136
|
|
|
135
137
|
/** @internal */
|
|
136
|
-
export declare
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
|
|
139
|
+
props: ArrowProps<E>,
|
|
140
|
+
): JSX.Element
|
|
141
|
+
|
|
142
|
+
export declare namespace Arrow {
|
|
143
|
+
var displayName: string
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @internal */
|
|
147
|
+
export declare type ArrowElementType = 'div' | 'span' | ComponentType
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export declare type ArrowOwnProps = {
|
|
151
|
+
width: number
|
|
152
|
+
height: number
|
|
153
|
+
radius?: number
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
|
|
158
|
+
ArrowOwnProps,
|
|
159
|
+
E
|
|
142
160
|
>
|
|
143
161
|
|
|
144
|
-
/**
|
|
145
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
164
|
+
*
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
|
|
146
168
|
|
|
147
169
|
/**
|
|
148
170
|
* @internal
|
|
@@ -155,22 +177,17 @@ export declare function attemptFocus(element: HTMLElement): boolean
|
|
|
155
177
|
*
|
|
156
178
|
* @public
|
|
157
179
|
*/
|
|
158
|
-
export declare
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
| 'role'
|
|
170
|
-
| 'spellCheck'
|
|
171
|
-
| 'type'
|
|
172
|
-
>,
|
|
173
|
-
) => ReactElement
|
|
180
|
+
export declare function Autocomplete<
|
|
181
|
+
E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
|
|
182
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
183
|
+
>(props: AutocompleteProps<E, O>): JSX.Element
|
|
184
|
+
|
|
185
|
+
export declare namespace Autocomplete {
|
|
186
|
+
var displayName: string
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** @public */
|
|
190
|
+
export declare type AutocompleteElementType = 'input' | ComponentType
|
|
174
191
|
|
|
175
192
|
/**
|
|
176
193
|
* @internal
|
|
@@ -201,24 +218,17 @@ export declare type AutocompleteMsg =
|
|
|
201
218
|
| AutocompleteInputFoocusMsg
|
|
202
219
|
| AutocompleteValueChangeMsg
|
|
203
220
|
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
*/
|
|
207
|
-
export declare type AutocompleteOpenButtonProps = Omit<Props<ButtonProps, 'button'>, 'as'>
|
|
221
|
+
/** @public */
|
|
222
|
+
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
|
|
208
223
|
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
Option extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
214
|
-
> {
|
|
224
|
+
/** @public */
|
|
225
|
+
export declare type AutocompleteOwnProps<
|
|
226
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
227
|
+
> = TextInputOwnProps & {
|
|
215
228
|
border?: boolean
|
|
216
229
|
customValidity?: string
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
220
|
-
icon?: ElementType | ReactNode
|
|
221
|
-
id: string
|
|
230
|
+
filterOption?: (query: string, option: O) => boolean
|
|
231
|
+
icon?: ElementType_2 | ReactNode
|
|
222
232
|
/** @beta */
|
|
223
233
|
listBox?: BoxProps
|
|
224
234
|
loading?: boolean
|
|
@@ -230,17 +240,15 @@ export declare interface AutocompleteProps<
|
|
|
230
240
|
/** @beta */
|
|
231
241
|
openOnFocus?: boolean
|
|
232
242
|
/** The options to render. */
|
|
233
|
-
options?:
|
|
243
|
+
options?: O[]
|
|
234
244
|
padding?: ResponsiveProp<Space>
|
|
235
245
|
popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
236
246
|
prefix?: ReactNode
|
|
237
247
|
radius?: Radius | Radius[]
|
|
238
|
-
readOnly?: boolean
|
|
239
|
-
ref?: ForwardedRef<HTMLInputElement>
|
|
240
248
|
/** @beta */
|
|
241
249
|
relatedElements?: HTMLElement[]
|
|
242
250
|
/** The callback function for rendering each option. */
|
|
243
|
-
renderOption?: (option:
|
|
251
|
+
renderOption?: (option: O) => React.JSX.Element
|
|
244
252
|
/** @beta */
|
|
245
253
|
renderPopover?: (
|
|
246
254
|
props: {
|
|
@@ -252,12 +260,17 @@ export declare interface AutocompleteProps<
|
|
|
252
260
|
},
|
|
253
261
|
ref: ForwardedRef<HTMLDivElement>,
|
|
254
262
|
) => ReactNode
|
|
255
|
-
renderValue?: (value: string, option?:
|
|
263
|
+
renderValue?: (value: string, option?: O) => string
|
|
256
264
|
suffix?: ReactNode
|
|
257
|
-
/** The current value. */
|
|
258
265
|
value?: string
|
|
259
266
|
}
|
|
260
267
|
|
|
268
|
+
/** @public */
|
|
269
|
+
export declare type AutocompleteProps<
|
|
270
|
+
E extends AutocompleteElementType = AutocompleteElementType,
|
|
271
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
272
|
+
> = Props<AutocompleteOwnProps<O>, E>
|
|
273
|
+
|
|
261
274
|
/**
|
|
262
275
|
* @internal
|
|
263
276
|
*/
|
|
@@ -328,41 +341,42 @@ export declare interface AutocompleteValueChangeMsg {
|
|
|
328
341
|
*
|
|
329
342
|
* @public
|
|
330
343
|
*/
|
|
331
|
-
export declare
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
RefAttributes<HTMLDivElement>
|
|
335
|
-
>
|
|
344
|
+
export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
|
|
345
|
+
props: AvatarProps<E>,
|
|
346
|
+
): JSX.Element
|
|
336
347
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
export declare const AvatarCounter: ForwardRefExoticComponent<
|
|
341
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarCounterProps> &
|
|
342
|
-
AvatarCounterProps &
|
|
343
|
-
RefAttributes<HTMLDivElement>
|
|
344
|
-
>
|
|
348
|
+
export declare namespace Avatar {
|
|
349
|
+
var displayName: string
|
|
350
|
+
}
|
|
345
351
|
|
|
346
|
-
/**
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
352
|
+
/** @public */
|
|
353
|
+
export declare function AvatarCounter<
|
|
354
|
+
E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
355
|
+
>(props: AvatarCounterProps<E>): JSX.Element
|
|
356
|
+
|
|
357
|
+
export declare namespace AvatarCounter {
|
|
358
|
+
var displayName: string
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** @public */
|
|
362
|
+
export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
|
|
363
|
+
|
|
364
|
+
/** @public */
|
|
365
|
+
export declare interface AvatarCounterOwnProps {
|
|
351
366
|
count: number
|
|
352
367
|
size?: ResponsiveProp<AvatarSize>
|
|
353
|
-
/** @deprecated No longer supported. */
|
|
354
|
-
tone?: 'navbar'
|
|
355
368
|
}
|
|
356
369
|
|
|
357
|
-
/**
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
370
|
+
/** @public */
|
|
371
|
+
export declare type AvatarCounterProps<
|
|
372
|
+
E extends AvatarCounterElementType = AvatarCounterElementType,
|
|
373
|
+
> = Props<AvatarCounterOwnProps, E>
|
|
361
374
|
|
|
362
|
-
/**
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
375
|
+
/** @public */
|
|
376
|
+
export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
|
|
377
|
+
|
|
378
|
+
/** @public */
|
|
379
|
+
export declare interface AvatarOwnProps {
|
|
366
380
|
/** @beta */
|
|
367
381
|
__unstable_hideInnerStroke?: boolean
|
|
368
382
|
animateArrowFrom?: AvatarPosition
|
|
@@ -374,14 +388,24 @@ export declare interface AvatarProps {
|
|
|
374
388
|
src?: string
|
|
375
389
|
/**
|
|
376
390
|
* The status of the entity this Avatar represents.
|
|
377
|
-
* @
|
|
391
|
+
* @deprecated Will be removed in next major version.
|
|
378
392
|
*/
|
|
379
393
|
status?: AvatarStatus
|
|
380
394
|
title?: string
|
|
381
395
|
}
|
|
382
396
|
|
|
397
|
+
/** @public */
|
|
398
|
+
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
399
|
+
|
|
400
|
+
/** @public */
|
|
401
|
+
export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
|
|
402
|
+
AvatarOwnProps,
|
|
403
|
+
E
|
|
404
|
+
>
|
|
405
|
+
|
|
383
406
|
/**
|
|
384
407
|
* @internal
|
|
408
|
+
* @deprecated This will be removed in next major version.
|
|
385
409
|
*/
|
|
386
410
|
export declare interface AvatarRootStyleProps {
|
|
387
411
|
$color: ThemeColorAvatarColorKey
|
|
@@ -389,29 +413,23 @@ export declare interface AvatarRootStyleProps {
|
|
|
389
413
|
|
|
390
414
|
export {AvatarSize}
|
|
391
415
|
|
|
392
|
-
/**
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarStackProps> &
|
|
397
|
-
AvatarStackProps &
|
|
398
|
-
RefAttributes<HTMLDivElement>
|
|
399
|
-
>
|
|
416
|
+
/** @public */
|
|
417
|
+
export declare function AvatarStack<
|
|
418
|
+
E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
|
|
419
|
+
>(props: AvatarStackProps<E>): JSX.Element
|
|
400
420
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
export declare type AvatarStackChild =
|
|
405
|
-
| ReactElement<Props<AvatarProps, 'div'>>
|
|
406
|
-
| null
|
|
407
|
-
| undefined
|
|
408
|
-
| false
|
|
421
|
+
export declare namespace AvatarStack {
|
|
422
|
+
var displayName: string
|
|
423
|
+
}
|
|
409
424
|
|
|
410
|
-
/**
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
425
|
+
/** @public */
|
|
426
|
+
export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
|
|
427
|
+
|
|
428
|
+
/** @public */
|
|
429
|
+
export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
|
|
430
|
+
|
|
431
|
+
/** @public */
|
|
432
|
+
export declare type AvatarStackOwnProps = Omit<BoxOwnProps, 'align' | 'display'> & {
|
|
415
433
|
children: AvatarStackChild | AvatarStackChild[]
|
|
416
434
|
maxLength?: number
|
|
417
435
|
size?: ResponsiveProp<AvatarSize>
|
|
@@ -419,11 +437,14 @@ export declare interface AvatarStackProps
|
|
|
419
437
|
tone?: 'navbar'
|
|
420
438
|
}
|
|
421
439
|
|
|
440
|
+
/** @public */
|
|
441
|
+
export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
|
|
442
|
+
Props<AvatarStackOwnProps, E>
|
|
443
|
+
|
|
444
|
+
/** @public */
|
|
422
445
|
/**
|
|
423
446
|
* @public
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @public
|
|
447
|
+
* @deprecated Will be removed in next major version.
|
|
427
448
|
*/
|
|
428
449
|
export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
429
450
|
|
|
@@ -432,11 +453,16 @@ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
|
432
453
|
*
|
|
433
454
|
* @public
|
|
434
455
|
*/
|
|
435
|
-
export declare
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
456
|
+
export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
|
|
457
|
+
props: BadgeProps<E>,
|
|
458
|
+
): JSX.Element
|
|
459
|
+
|
|
460
|
+
export declare namespace Badge {
|
|
461
|
+
var displayName: string
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** @public */
|
|
465
|
+
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
440
466
|
|
|
441
467
|
/**
|
|
442
468
|
* @public
|
|
@@ -444,25 +470,23 @@ export declare const Badge: ForwardRefExoticComponent<
|
|
|
444
470
|
*/
|
|
445
471
|
export declare type BadgeMode = 'default' | 'outline'
|
|
446
472
|
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
mode?: BadgeMode
|
|
454
|
-
textAlign?: TextProps['align']
|
|
455
|
-
tone?: BadgeTone
|
|
456
|
-
}
|
|
473
|
+
/** @public */
|
|
474
|
+
export declare type BadgeOwnProps = PaddingStyleProps &
|
|
475
|
+
RadiusStyleProps & {
|
|
476
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
477
|
+
tone?: BadgeTone
|
|
478
|
+
}
|
|
457
479
|
|
|
458
|
-
/**
|
|
459
|
-
|
|
460
|
-
|
|
480
|
+
/** @public */
|
|
481
|
+
export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
|
|
482
|
+
BadgeOwnProps,
|
|
483
|
+
E
|
|
484
|
+
>
|
|
485
|
+
|
|
486
|
+
/** @public */
|
|
461
487
|
export declare type BadgeTone = ThemeColorStateToneKey
|
|
462
488
|
|
|
463
|
-
/**
|
|
464
|
-
* @public
|
|
465
|
-
*/
|
|
489
|
+
/** @public */
|
|
466
490
|
export declare interface BaseAutocompleteOption {
|
|
467
491
|
value: string
|
|
468
492
|
}
|
|
@@ -473,26 +497,20 @@ export declare interface BaseAutocompleteOption {
|
|
|
473
497
|
*/
|
|
474
498
|
export declare type BaseTheme = BaseTheme_2
|
|
475
499
|
|
|
476
|
-
/**
|
|
477
|
-
* @public
|
|
478
|
-
*/
|
|
500
|
+
/** @public */
|
|
479
501
|
export declare interface BoundaryElementContextValue {
|
|
480
502
|
version: 0.0
|
|
481
503
|
element: HTMLElement | null
|
|
482
504
|
}
|
|
483
505
|
|
|
484
|
-
/**
|
|
485
|
-
* @public
|
|
486
|
-
*/
|
|
506
|
+
/** @public */
|
|
487
507
|
export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): ReactElement
|
|
488
508
|
|
|
489
509
|
export declare namespace BoundaryElementProvider {
|
|
490
510
|
var displayName: string
|
|
491
511
|
}
|
|
492
512
|
|
|
493
|
-
/**
|
|
494
|
-
* @public
|
|
495
|
-
*/
|
|
513
|
+
/** @public */
|
|
496
514
|
export declare interface BoundaryElementProviderProps {
|
|
497
515
|
children: ReactNode
|
|
498
516
|
element: HTMLElement | null
|
|
@@ -504,26 +522,57 @@ export declare interface BoundaryElementProviderProps {
|
|
|
504
522
|
*
|
|
505
523
|
* @public
|
|
506
524
|
*/
|
|
507
|
-
export declare
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
525
|
+
export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
|
|
526
|
+
props: BoxProps<E>,
|
|
527
|
+
): JSX.Element
|
|
528
|
+
|
|
529
|
+
export declare namespace Box {
|
|
530
|
+
var displayName: string
|
|
531
|
+
}
|
|
512
532
|
|
|
513
533
|
export {BoxDisplay}
|
|
514
534
|
|
|
535
|
+
/** @public */
|
|
536
|
+
export declare type BoxElementType =
|
|
537
|
+
| 'a'
|
|
538
|
+
| 'article'
|
|
539
|
+
| 'aside'
|
|
540
|
+
| 'blockquote'
|
|
541
|
+
| 'button'
|
|
542
|
+
| 'details'
|
|
543
|
+
| 'div'
|
|
544
|
+
| 'header'
|
|
545
|
+
| 'fieldset'
|
|
546
|
+
| 'figure'
|
|
547
|
+
| 'figcaption'
|
|
548
|
+
| 'footer'
|
|
549
|
+
| 'form'
|
|
550
|
+
| 'kbd'
|
|
551
|
+
| 'label'
|
|
552
|
+
| 'legend'
|
|
553
|
+
| 'li'
|
|
554
|
+
| 'main'
|
|
555
|
+
| 'nav'
|
|
556
|
+
| 'ol'
|
|
557
|
+
| 'pre'
|
|
558
|
+
| 'section'
|
|
559
|
+
| 'span'
|
|
560
|
+
| 'summary'
|
|
561
|
+
| 'ul'
|
|
562
|
+
| ComponentType
|
|
563
|
+
|
|
515
564
|
export {BoxHeight}
|
|
516
565
|
|
|
517
566
|
export {BoxOverflow}
|
|
518
567
|
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
568
|
+
/** @public */
|
|
569
|
+
export declare type BoxOwnProps = BoxStyleProps &
|
|
570
|
+
GapStyleProps &
|
|
571
|
+
InsetStyleProps &
|
|
572
|
+
PositionStyleProps
|
|
573
|
+
|
|
574
|
+
/** @public */
|
|
575
|
+
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
527
576
|
|
|
528
577
|
/**
|
|
529
578
|
* @public
|
|
@@ -533,34 +582,42 @@ export declare type BoxShadow = ThemeBoxShadow
|
|
|
533
582
|
|
|
534
583
|
export {BoxSizing}
|
|
535
584
|
|
|
536
|
-
/**
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BreadcrumbsProps> &
|
|
541
|
-
BreadcrumbsProps &
|
|
542
|
-
RefAttributes<HTMLDivElement>
|
|
543
|
-
>
|
|
585
|
+
/** @beta */
|
|
586
|
+
export declare function Breadcrumbs<
|
|
587
|
+
E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
|
|
588
|
+
>(props: BreadcrumbsProps<E>): JSX.Element
|
|
544
589
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
590
|
+
export declare namespace Breadcrumbs {
|
|
591
|
+
var displayName: string
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** @beta */
|
|
595
|
+
export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
|
|
596
|
+
|
|
597
|
+
/** @beta */
|
|
598
|
+
export declare type BreadcrumbsOwnProps = GapStyleProps & {
|
|
599
|
+
expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
|
|
550
600
|
maxLength?: number
|
|
551
601
|
separator?: ReactNode
|
|
552
602
|
/** @deprecated - Use `gap`, `gapX`, `gapY` instead */
|
|
553
603
|
space?: number | number[]
|
|
554
604
|
}
|
|
555
605
|
|
|
556
|
-
/**
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
606
|
+
/** @beta */
|
|
607
|
+
export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
|
|
608
|
+
Props<BreadcrumbsOwnProps, E>
|
|
609
|
+
|
|
610
|
+
/** @public */
|
|
611
|
+
export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
|
|
612
|
+
props: ButtonProps<E>,
|
|
613
|
+
): JSX.Element
|
|
614
|
+
|
|
615
|
+
export declare namespace Button {
|
|
616
|
+
var displayName: string
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/** @public */
|
|
620
|
+
export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
564
621
|
|
|
565
622
|
/**
|
|
566
623
|
* @public
|
|
@@ -568,40 +625,41 @@ export declare const Button: ForwardRefExoticComponent<
|
|
|
568
625
|
*/
|
|
569
626
|
export declare type ButtonMode = ThemeColorButtonModeKey_2
|
|
570
627
|
|
|
571
|
-
/**
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
'type'?: 'button' | 'reset' | 'submit'
|
|
599
|
-
'width'?: ResponsiveProp<Width>
|
|
600
|
-
}
|
|
628
|
+
/** @public */
|
|
629
|
+
export declare type ButtonOwnProps = ButtonStyleProps &
|
|
630
|
+
DisplayStyleProps &
|
|
631
|
+
GapStyleProps &
|
|
632
|
+
PaddingStyleProps & {
|
|
633
|
+
'align'?: FlexStyleProps['align']
|
|
634
|
+
'data-ui'?: string
|
|
635
|
+
'disabled'?: boolean
|
|
636
|
+
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
637
|
+
'mode'?: ButtonMode
|
|
638
|
+
'icon'?: ElementType_2 | ReactNode
|
|
639
|
+
'iconRight'?: ElementType_2 | ReactNode
|
|
640
|
+
'justify'?: FlexStyleProps['justify']
|
|
641
|
+
/** @beta Do not use in production, as this might change.*/
|
|
642
|
+
'loading'?: boolean
|
|
643
|
+
'selected'?: boolean
|
|
644
|
+
/** @deprecated Use `gap` instead. */
|
|
645
|
+
'space'?: ResponsiveProp<Space>
|
|
646
|
+
'textAlign'?: ButtonTextAlign
|
|
647
|
+
'muted'?: boolean
|
|
648
|
+
'target'?: string
|
|
649
|
+
'text'?: ReactNode
|
|
650
|
+
'textOverflow'?: TextOwnProps['textOverflow']
|
|
651
|
+
'textWeight'?: TextOwnProps['weight']
|
|
652
|
+
'tone'?: ButtonTone
|
|
653
|
+
'width'?: ResponsiveProp<Width>
|
|
654
|
+
}
|
|
601
655
|
|
|
602
|
-
/**
|
|
603
|
-
|
|
604
|
-
|
|
656
|
+
/** @public */
|
|
657
|
+
export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
|
|
658
|
+
ButtonOwnProps,
|
|
659
|
+
E
|
|
660
|
+
>
|
|
661
|
+
|
|
662
|
+
/** @public */
|
|
605
663
|
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
606
664
|
|
|
607
665
|
/**
|
|
@@ -622,13 +680,15 @@ export declare type ButtonWidth = 'fill'
|
|
|
622
680
|
*
|
|
623
681
|
* @public
|
|
624
682
|
*/
|
|
625
|
-
export declare
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
683
|
+
export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
|
|
684
|
+
props: CardProps<E>,
|
|
685
|
+
): JSX.Element
|
|
686
|
+
|
|
687
|
+
export declare namespace Card {
|
|
688
|
+
var displayName: string
|
|
689
|
+
}
|
|
630
690
|
|
|
631
|
-
export declare type CardCompatProviderComponent =
|
|
691
|
+
export declare type CardCompatProviderComponent = ComponentType_2<{
|
|
632
692
|
children?: ReactNode
|
|
633
693
|
tone: ThemeColorCardToneKey
|
|
634
694
|
scheme: ThemeColorSchemeKey_2
|
|
@@ -642,10 +702,11 @@ export declare interface CardContextValue {
|
|
|
642
702
|
scheme: ThemeColorSchemeKey_2
|
|
643
703
|
}
|
|
644
704
|
|
|
645
|
-
/**
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
705
|
+
/** @public */
|
|
706
|
+
export declare type CardElementType = BoxElementType
|
|
707
|
+
|
|
708
|
+
/** @public */
|
|
709
|
+
export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps_2 {
|
|
649
710
|
/**
|
|
650
711
|
* Do not use in production.
|
|
651
712
|
* @beta
|
|
@@ -657,12 +718,14 @@ export declare interface CardProps extends BoxProps, CardStyleProps_2 {
|
|
|
657
718
|
*/
|
|
658
719
|
__unstable_focusRing?: boolean
|
|
659
720
|
disabled?: boolean
|
|
660
|
-
href?: string
|
|
661
721
|
pressed?: boolean
|
|
662
722
|
selected?: boolean
|
|
663
723
|
target?: string
|
|
664
724
|
}
|
|
665
725
|
|
|
726
|
+
/** @public */
|
|
727
|
+
export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
|
|
728
|
+
|
|
666
729
|
export declare function CardProvider(props: {
|
|
667
730
|
compat_provider?: CardCompatProviderComponent
|
|
668
731
|
children?: ReactNode
|
|
@@ -671,6 +734,10 @@ export declare function CardProvider(props: {
|
|
|
671
734
|
scheme: ThemeColorSchemeKey_2
|
|
672
735
|
}): JSX.Element
|
|
673
736
|
|
|
737
|
+
export declare namespace CardProvider {
|
|
738
|
+
var displayName: string
|
|
739
|
+
}
|
|
740
|
+
|
|
674
741
|
/**
|
|
675
742
|
* @internal
|
|
676
743
|
* @deprecated Use `CardStyleProps` from `@sanity/ui/css` instead.
|
|
@@ -682,9 +749,7 @@ export declare interface CardStyleProps {
|
|
|
682
749
|
$tone: ThemeColorCardToneKey
|
|
683
750
|
}
|
|
684
751
|
|
|
685
|
-
/**
|
|
686
|
-
* @public
|
|
687
|
-
*/
|
|
752
|
+
/** @public */
|
|
688
753
|
export declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
689
754
|
|
|
690
755
|
/**
|
|
@@ -692,109 +757,120 @@ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
|
692
757
|
*
|
|
693
758
|
* @public
|
|
694
759
|
*/
|
|
695
|
-
export declare
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
RefAttributes<HTMLInputElement>
|
|
699
|
-
>
|
|
760
|
+
export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
|
|
761
|
+
props: CheckboxProps<E>,
|
|
762
|
+
): JSX.Element
|
|
700
763
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
764
|
+
export declare namespace Checkbox {
|
|
765
|
+
var displayName: string
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/** @public */
|
|
769
|
+
export declare type CheckboxElementType = 'input' | ComponentType
|
|
770
|
+
|
|
771
|
+
/** @public */
|
|
772
|
+
export declare type CheckboxOwnProps = {
|
|
705
773
|
indeterminate?: boolean
|
|
706
774
|
customValidity?: string
|
|
707
775
|
}
|
|
708
776
|
|
|
709
|
-
/**
|
|
710
|
-
|
|
711
|
-
|
|
777
|
+
/** @public */
|
|
778
|
+
export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
|
|
779
|
+
CheckboxOwnProps,
|
|
780
|
+
E
|
|
781
|
+
>
|
|
782
|
+
|
|
783
|
+
/** @public */
|
|
712
784
|
export declare type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
713
785
|
|
|
714
|
-
/**
|
|
715
|
-
* @public
|
|
716
|
-
*/
|
|
786
|
+
/** @public */
|
|
717
787
|
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
718
788
|
|
|
719
|
-
/**
|
|
720
|
-
* @public
|
|
721
|
-
*/
|
|
789
|
+
/** @public */
|
|
722
790
|
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
723
791
|
|
|
724
|
-
/**
|
|
725
|
-
* @public
|
|
726
|
-
*/
|
|
792
|
+
/** @public */
|
|
727
793
|
export declare type ClickOutsideListener = (event: MouseEvent) => void
|
|
728
794
|
|
|
729
|
-
/**
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
Omit<ElementProps_2<'pre'> & PolymorphicProps_2, keyof CodeProps> &
|
|
734
|
-
CodeProps &
|
|
735
|
-
RefAttributes<HTMLPreElement>
|
|
736
|
-
>
|
|
795
|
+
/** @public */
|
|
796
|
+
export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
|
|
797
|
+
props: CodeProps<E>,
|
|
798
|
+
): JSX.Element
|
|
737
799
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
800
|
+
export declare namespace Code {
|
|
801
|
+
var displayName: string
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/** @public */
|
|
805
|
+
export declare type CodeElementType = 'div' | 'pre' | ComponentType
|
|
806
|
+
|
|
807
|
+
/** @public */
|
|
808
|
+
export declare type CodeOwnProps = Omit<FontStyleProps, 'align'> & {
|
|
742
809
|
/** Define the language to use for syntax highlighting. */
|
|
743
810
|
language?: string
|
|
744
811
|
size?: number | number[]
|
|
745
812
|
}
|
|
746
813
|
|
|
814
|
+
/** @public */
|
|
815
|
+
export declare type CodeProps<E extends CodeElementType = CodeElementType> = Props<CodeOwnProps, E>
|
|
816
|
+
|
|
747
817
|
/**
|
|
748
818
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
749
819
|
* @beta
|
|
750
820
|
*/
|
|
751
|
-
export declare
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
RefAttributes<HTMLDivElement>
|
|
755
|
-
>
|
|
821
|
+
export declare function CodeSkeleton<
|
|
822
|
+
E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
|
|
823
|
+
>(props: CodeSkeletonProps<E>): JSX.Element
|
|
756
824
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
825
|
+
export declare namespace CodeSkeleton {
|
|
826
|
+
var displayName: string
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/** @public */
|
|
830
|
+
export declare type CodeSkeletonElementType = SkeletonElementType
|
|
831
|
+
|
|
832
|
+
/** @beta */
|
|
833
|
+
export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
|
|
762
834
|
size?: ResponsiveProp<FontCodeSize>
|
|
763
835
|
}
|
|
764
836
|
|
|
765
837
|
/**
|
|
766
|
-
*
|
|
767
|
-
* @
|
|
838
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
839
|
+
* @beta
|
|
768
840
|
*/
|
|
769
|
-
export declare
|
|
770
|
-
|
|
771
|
-
condition,
|
|
772
|
-
wrapper,
|
|
773
|
-
}: {
|
|
774
|
-
children: ReactNode
|
|
775
|
-
condition: boolean
|
|
776
|
-
wrapper: (children: ReactNode) => ReactNode
|
|
777
|
-
}): ReactNode
|
|
841
|
+
export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
|
|
842
|
+
Props<CodeSkeletonOwnProps, E>
|
|
778
843
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
844
|
+
/** @public */
|
|
845
|
+
export declare type ComponentType<P = any> =
|
|
846
|
+
| FunctionComponent<P>
|
|
847
|
+
| ComponentClass<P>
|
|
848
|
+
| ExoticComponent<P>
|
|
782
849
|
|
|
783
850
|
/**
|
|
784
851
|
* The `Container` component wraps content layout in a defined set of widths.
|
|
785
852
|
*
|
|
786
853
|
* @public
|
|
787
854
|
*/
|
|
788
|
-
export declare
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
RefAttributes<HTMLDivElement>
|
|
792
|
-
>
|
|
855
|
+
export declare function Container<
|
|
856
|
+
E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
|
|
857
|
+
>(props: ContainerProps<E>): JSX.Element
|
|
793
858
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
859
|
+
export declare namespace Container {
|
|
860
|
+
var displayName: string
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/** @public */
|
|
864
|
+
export declare type ContainerElementType = BoxElementType
|
|
865
|
+
|
|
866
|
+
/** @public */
|
|
867
|
+
export declare type ContainerOwnProps = Omit<BoxOwnProps, 'width'> & ContainerStyleProps
|
|
868
|
+
|
|
869
|
+
/** @public */
|
|
870
|
+
export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
|
|
871
|
+
ContainerOwnProps,
|
|
872
|
+
E
|
|
873
|
+
>
|
|
798
874
|
|
|
799
875
|
/**
|
|
800
876
|
* @internal
|
|
@@ -807,9 +883,157 @@ export declare function containsOrEqualsElement(element: HTMLElement, node: Node
|
|
|
807
883
|
*/
|
|
808
884
|
export declare const createColorTheme: typeof createColorTheme_2
|
|
809
885
|
|
|
810
|
-
/**
|
|
811
|
-
|
|
812
|
-
|
|
886
|
+
/** @internal */
|
|
887
|
+
export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
888
|
+
|
|
889
|
+
/** @public */
|
|
890
|
+
export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
|
|
891
|
+
|
|
892
|
+
/** @public */
|
|
893
|
+
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'div'
|
|
894
|
+
|
|
895
|
+
/** @public */
|
|
896
|
+
export declare const DEFAULT_AVATAR_ELEMENT = 'div'
|
|
897
|
+
|
|
898
|
+
/** @public */
|
|
899
|
+
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'div'
|
|
900
|
+
|
|
901
|
+
/** @public */
|
|
902
|
+
export declare const DEFAULT_BADGE_ELEMENT = 'span'
|
|
903
|
+
|
|
904
|
+
/** @public */
|
|
905
|
+
export declare const DEFAULT_BOX_ELEMENT = 'div'
|
|
906
|
+
|
|
907
|
+
/** @beta */
|
|
908
|
+
export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
|
|
909
|
+
|
|
910
|
+
/** @public */
|
|
911
|
+
export declare const DEFAULT_BUTTON_ELEMENT = 'button'
|
|
912
|
+
|
|
913
|
+
/** @public */
|
|
914
|
+
export declare const DEFAULT_CARD_ELEMENT = 'div'
|
|
915
|
+
|
|
916
|
+
/** @public */
|
|
917
|
+
export declare const DEFAULT_CHECKBOX_ELEMENT = 'input'
|
|
918
|
+
|
|
919
|
+
/** @public */
|
|
920
|
+
export declare const DEFAULT_CODE_ELEMENT = 'pre'
|
|
921
|
+
|
|
922
|
+
/** @public */
|
|
923
|
+
export declare const DEFAULT_CODE_SKELETON_ELEMENT = 'div'
|
|
924
|
+
|
|
925
|
+
/** @public */
|
|
926
|
+
export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
|
|
927
|
+
|
|
928
|
+
/** @public */
|
|
929
|
+
export declare const DEFAULT_DIALOG_ELEMENT = 'div'
|
|
930
|
+
|
|
931
|
+
/** @beta */
|
|
932
|
+
export declare const DEFAULT_ELEMENT_QUERY_ELEMENT = 'div'
|
|
933
|
+
|
|
934
|
+
/** @public */
|
|
935
|
+
export declare const DEFAULT_FLEX_ELEMENT = 'div'
|
|
936
|
+
|
|
937
|
+
/** @public */
|
|
938
|
+
export declare const DEFAULT_GRID_ELEMENT = 'div'
|
|
939
|
+
|
|
940
|
+
/** @public */
|
|
941
|
+
export declare const DEFAULT_HEADING_ELEMENT = 'div'
|
|
942
|
+
|
|
943
|
+
/** @public */
|
|
944
|
+
export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
|
|
945
|
+
|
|
946
|
+
/** @public */
|
|
947
|
+
export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
|
|
948
|
+
|
|
949
|
+
/** @public */
|
|
950
|
+
export declare const DEFAULT_INLINE_ELEMENT = 'div'
|
|
951
|
+
|
|
952
|
+
/** @public */
|
|
953
|
+
export declare const DEFAULT_KBD_ELEMENT = 'kbd'
|
|
954
|
+
|
|
955
|
+
/** @public */
|
|
956
|
+
export declare const DEFAULT_LABEL_ELEMENT = 'div'
|
|
957
|
+
|
|
958
|
+
/** @public */
|
|
959
|
+
export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
|
|
960
|
+
|
|
961
|
+
/** @public */
|
|
962
|
+
export declare const DEFAULT_LAYER_ELEMENT = 'div'
|
|
963
|
+
|
|
964
|
+
/** @public */
|
|
965
|
+
export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
|
|
966
|
+
|
|
967
|
+
/** @public */
|
|
968
|
+
export declare const DEFAULT_MENU_ELEMENT = 'div'
|
|
969
|
+
|
|
970
|
+
/** @public */
|
|
971
|
+
export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
|
|
972
|
+
|
|
973
|
+
/** @public */
|
|
974
|
+
export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
|
|
975
|
+
|
|
976
|
+
/** @public */
|
|
977
|
+
export declare const DEFAULT_POPOVER_ELEMENT = 'div'
|
|
978
|
+
|
|
979
|
+
/** @public */
|
|
980
|
+
export declare const DEFAULT_RADIO_ELEMENT = 'input'
|
|
981
|
+
|
|
982
|
+
/** @public */
|
|
983
|
+
export declare const DEFAULT_SELECT_ELEMENT = 'select'
|
|
984
|
+
|
|
985
|
+
/** @beta */
|
|
986
|
+
export declare const DEFAULT_SKELETON_ELEMENT = 'div'
|
|
987
|
+
|
|
988
|
+
/** @public */
|
|
989
|
+
export declare const DEFAULT_SPINNER_ELEMENT = 'div'
|
|
990
|
+
|
|
991
|
+
/** @public */
|
|
992
|
+
export declare const DEFAULT_SR_ONLY_ELEMENT = 'span'
|
|
993
|
+
|
|
994
|
+
/** @public */
|
|
995
|
+
export declare const DEFAULT_STACK_ELEMENT = 'div'
|
|
996
|
+
|
|
997
|
+
/** @public */
|
|
998
|
+
export declare const DEFAULT_SWITCH_ELEMENT = 'input'
|
|
999
|
+
|
|
1000
|
+
/** @public */
|
|
1001
|
+
export declare const DEFAULT_TAB_ELEMENT = 'button'
|
|
1002
|
+
|
|
1003
|
+
/** @public */
|
|
1004
|
+
export declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
|
|
1005
|
+
|
|
1006
|
+
/** @public */
|
|
1007
|
+
export declare const DEFAULT_TAB_PANEL_ELEMENT = 'div'
|
|
1008
|
+
|
|
1009
|
+
/** @public */
|
|
1010
|
+
export declare const DEFAULT_TEXT_AREA_ELEMENT = 'textarea'
|
|
1011
|
+
|
|
1012
|
+
/** @public */
|
|
1013
|
+
export declare const DEFAULT_TEXT_ELEMENT = 'div'
|
|
1014
|
+
|
|
1015
|
+
/** @public */
|
|
1016
|
+
export declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
|
|
1017
|
+
|
|
1018
|
+
/** @public */
|
|
1019
|
+
export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
|
|
1020
|
+
|
|
1021
|
+
/** @public */
|
|
1022
|
+
export declare const DEFAULT_TOAST_ELEMENT = 'li'
|
|
1023
|
+
|
|
1024
|
+
/** @public */
|
|
1025
|
+
export declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
|
|
1026
|
+
|
|
1027
|
+
/** @beta */
|
|
1028
|
+
export declare const DEFAULT_TREE_ELEMENT = 'div'
|
|
1029
|
+
|
|
1030
|
+
/** @beta */
|
|
1031
|
+
export declare const DEFAULT_TREE_ITEM_ELEMENT = 'a'
|
|
1032
|
+
|
|
1033
|
+
/** @beta */
|
|
1034
|
+
export declare const DEFAULT_VIRTUAL_LIST_ELEMENT = 'div'
|
|
1035
|
+
|
|
1036
|
+
/** @public */
|
|
813
1037
|
export declare type Delay =
|
|
814
1038
|
| number
|
|
815
1039
|
| Partial<{
|
|
@@ -822,11 +1046,13 @@ export declare type Delay =
|
|
|
822
1046
|
*
|
|
823
1047
|
* @public
|
|
824
1048
|
*/
|
|
825
|
-
export declare
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1049
|
+
export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
|
|
1050
|
+
props: DialogProps<E>,
|
|
1051
|
+
): JSX.Element
|
|
1052
|
+
|
|
1053
|
+
export declare namespace Dialog {
|
|
1054
|
+
var displayName: string
|
|
1055
|
+
}
|
|
830
1056
|
|
|
831
1057
|
/**
|
|
832
1058
|
* @internal
|
|
@@ -843,49 +1069,52 @@ export declare interface DialogContextValue {
|
|
|
843
1069
|
zOffset?: number | number[]
|
|
844
1070
|
}
|
|
845
1071
|
|
|
846
|
-
/**
|
|
847
|
-
|
|
848
|
-
|
|
1072
|
+
/** @public */
|
|
1073
|
+
export declare type DialogElementType = 'div' | 'span' | ComponentType
|
|
1074
|
+
|
|
1075
|
+
/** @public */
|
|
1076
|
+
export declare type DialogOwnProps = ContainerStyleProps &
|
|
1077
|
+
Omit<LayerOwnProps, 'width'> & {
|
|
1078
|
+
/**
|
|
1079
|
+
* @beta
|
|
1080
|
+
*/
|
|
1081
|
+
__unstable_autoFocus?: boolean
|
|
1082
|
+
/**
|
|
1083
|
+
* @beta
|
|
1084
|
+
*/
|
|
1085
|
+
__unstable_hideCloseButton?: boolean
|
|
1086
|
+
/**
|
|
1087
|
+
* Whether the dialog should animate in on mount.
|
|
1088
|
+
*
|
|
1089
|
+
* @beta
|
|
1090
|
+
* @defaultValue false
|
|
1091
|
+
*/
|
|
1092
|
+
animate?: boolean
|
|
1093
|
+
cardRadius?: ResponsiveProp<Radius>
|
|
1094
|
+
contentRef?: ForwardedRef<HTMLDivElement>
|
|
1095
|
+
footer?: ReactNode
|
|
1096
|
+
header?: ReactNode
|
|
1097
|
+
id: string
|
|
1098
|
+
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
1099
|
+
onActivate?: LayerProps['onActivate']
|
|
1100
|
+
onClickOutside?: () => void
|
|
1101
|
+
onClose?: () => void
|
|
1102
|
+
open?: boolean
|
|
1103
|
+
portal?: string
|
|
1104
|
+
position?: DialogPosition | DialogPosition[]
|
|
1105
|
+
scheme?: ThemeColorSchemeKey_2
|
|
1106
|
+
tone?: CardTone
|
|
1107
|
+
zOffset?: number | number[]
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/** @public */
|
|
849
1111
|
export declare type DialogPosition = 'absolute' | 'fixed'
|
|
850
1112
|
|
|
851
|
-
/**
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
PaddingStyleProps,
|
|
857
|
-
ShadowStyleProps {
|
|
858
|
-
/**
|
|
859
|
-
* @beta
|
|
860
|
-
*/
|
|
861
|
-
__unstable_autoFocus?: boolean
|
|
862
|
-
/**
|
|
863
|
-
* @beta
|
|
864
|
-
*/
|
|
865
|
-
__unstable_hideCloseButton?: boolean
|
|
866
|
-
/**
|
|
867
|
-
* Whether the dialog should animate in on mount.
|
|
868
|
-
*
|
|
869
|
-
* @beta
|
|
870
|
-
* @defaultValue false
|
|
871
|
-
*/
|
|
872
|
-
animate?: boolean
|
|
873
|
-
cardRadius?: ResponsiveProp<Radius>
|
|
874
|
-
contentRef?: ForwardedRef<HTMLDivElement>
|
|
875
|
-
footer?: ReactNode
|
|
876
|
-
header?: ReactNode
|
|
877
|
-
id: string
|
|
878
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
879
|
-
onActivate?: LayerProps['onActivate']
|
|
880
|
-
onClickOutside?: () => void
|
|
881
|
-
onClose?: () => void
|
|
882
|
-
open?: boolean
|
|
883
|
-
portal?: string
|
|
884
|
-
position?: DialogPosition | DialogPosition[]
|
|
885
|
-
scheme?: ThemeColorSchemeKey_2
|
|
886
|
-
tone?: CardTone
|
|
887
|
-
zOffset?: number | number[]
|
|
888
|
-
}
|
|
1113
|
+
/** @public */
|
|
1114
|
+
export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
|
|
1115
|
+
DialogOwnProps,
|
|
1116
|
+
E
|
|
1117
|
+
>
|
|
889
1118
|
|
|
890
1119
|
/**
|
|
891
1120
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
@@ -907,18 +1136,35 @@ export declare interface DialogProviderProps {
|
|
|
907
1136
|
zOffset?: number | number[]
|
|
908
1137
|
}
|
|
909
1138
|
|
|
910
|
-
/**
|
|
911
|
-
|
|
1139
|
+
/**
|
|
1140
|
+
* DO NOT USE IN PRODUCTION.
|
|
1141
|
+
* @beta
|
|
1142
|
+
*/
|
|
1143
|
+
export declare function ElementQuery<
|
|
1144
|
+
E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
|
|
1145
|
+
>(props: ElementQueryProps<E>): JSX.Element
|
|
1146
|
+
|
|
1147
|
+
export declare namespace ElementQuery {
|
|
1148
|
+
var displayName: string
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/** @beta */
|
|
1152
|
+
export declare type ElementQueryElementType = 'div' | ComponentType
|
|
912
1153
|
|
|
913
1154
|
/**
|
|
914
1155
|
* DO NOT USE IN PRODUCTION.
|
|
915
1156
|
* @beta
|
|
916
1157
|
*/
|
|
917
|
-
export declare
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1158
|
+
export declare type ElementQueryOwnProps = {
|
|
1159
|
+
media?: number[]
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* DO NOT USE IN PRODUCTION.
|
|
1164
|
+
* @beta
|
|
1165
|
+
*/
|
|
1166
|
+
export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
|
|
1167
|
+
Props<ElementQueryOwnProps, E>
|
|
922
1168
|
|
|
923
1169
|
/**
|
|
924
1170
|
* @beta
|
|
@@ -962,12 +1208,19 @@ export declare const _elementSizeObserver: _ElementSizeObserver
|
|
|
962
1208
|
*/
|
|
963
1209
|
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
964
1210
|
|
|
1211
|
+
/** @public */
|
|
1212
|
+
export declare type ElementType<P> = TagType | ComponentType<P>
|
|
1213
|
+
|
|
1214
|
+
/** @public */
|
|
1215
|
+
export declare type EmptyProps = {}
|
|
1216
|
+
|
|
965
1217
|
/**
|
|
966
1218
|
* DO NOT USE IN PRODUCTION
|
|
967
1219
|
* @beta
|
|
968
1220
|
*/
|
|
969
1221
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
970
1222
|
state: ErrorBoundaryState
|
|
1223
|
+
static displayName: string
|
|
971
1224
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState
|
|
972
1225
|
componentDidCatch(error: Error, info: ErrorInfo): void
|
|
973
1226
|
render(): ReactNode
|
|
@@ -994,24 +1247,28 @@ export declare interface ErrorBoundaryState {
|
|
|
994
1247
|
*
|
|
995
1248
|
* @public
|
|
996
1249
|
*/
|
|
997
|
-
export declare
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1250
|
+
export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
|
|
1251
|
+
props: FlexProps<E>,
|
|
1252
|
+
): JSX.Element
|
|
1253
|
+
|
|
1254
|
+
export declare namespace Flex {
|
|
1255
|
+
var displayName: string
|
|
1256
|
+
}
|
|
1002
1257
|
|
|
1003
1258
|
export {FlexAlign}
|
|
1004
1259
|
|
|
1005
1260
|
export {FlexDirection}
|
|
1006
1261
|
|
|
1262
|
+
/** @public */
|
|
1263
|
+
export declare type FlexElementType = BoxElementType
|
|
1264
|
+
|
|
1007
1265
|
export {FlexJustify}
|
|
1008
1266
|
|
|
1009
|
-
/**
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
}
|
|
1267
|
+
/** @public */
|
|
1268
|
+
export declare type FlexOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1269
|
+
|
|
1270
|
+
/** @public */
|
|
1271
|
+
export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
|
|
1015
1272
|
|
|
1016
1273
|
export {FlexValue}
|
|
1017
1274
|
|
|
@@ -1037,11 +1294,13 @@ export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?:
|
|
|
1037
1294
|
*
|
|
1038
1295
|
* @public
|
|
1039
1296
|
*/
|
|
1040
|
-
export declare
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1297
|
+
export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
|
|
1298
|
+
props: GridProps<E>,
|
|
1299
|
+
): JSX.Element
|
|
1300
|
+
|
|
1301
|
+
export declare namespace Grid {
|
|
1302
|
+
var displayName: string
|
|
1303
|
+
}
|
|
1045
1304
|
|
|
1046
1305
|
export {GridAutoCols}
|
|
1047
1306
|
|
|
@@ -1049,6 +1308,9 @@ export {GridAutoFlow}
|
|
|
1049
1308
|
|
|
1050
1309
|
export {GridAutoRows}
|
|
1051
1310
|
|
|
1311
|
+
/** @public */
|
|
1312
|
+
export declare type GridElementType = BoxElementType
|
|
1313
|
+
|
|
1052
1314
|
export {GridItemColumn}
|
|
1053
1315
|
|
|
1054
1316
|
export {GridItemColumnEnd}
|
|
@@ -1061,10 +1323,11 @@ export {GridItemRowEnd}
|
|
|
1061
1323
|
|
|
1062
1324
|
export {GridItemRowStart}
|
|
1063
1325
|
|
|
1064
|
-
/**
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1326
|
+
/** @public */
|
|
1327
|
+
export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1328
|
+
|
|
1329
|
+
/** @public */
|
|
1330
|
+
export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
|
|
1068
1331
|
|
|
1069
1332
|
/**
|
|
1070
1333
|
* @internal
|
|
@@ -1076,34 +1339,63 @@ export declare function _hasFocus(element: HTMLElement): boolean
|
|
|
1076
1339
|
*
|
|
1077
1340
|
* @public
|
|
1078
1341
|
*/
|
|
1079
|
-
export declare
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
RefAttributes<HTMLElement>
|
|
1083
|
-
>
|
|
1342
|
+
export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
|
|
1343
|
+
props: HeadingProps<E>,
|
|
1344
|
+
): JSX.Element
|
|
1084
1345
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1346
|
+
export declare namespace Heading {
|
|
1347
|
+
var displayName: string
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/** @public */
|
|
1351
|
+
export declare type HeadingElementType =
|
|
1352
|
+
| 'div'
|
|
1353
|
+
| 'h1'
|
|
1354
|
+
| 'h2'
|
|
1355
|
+
| 'h3'
|
|
1356
|
+
| 'h4'
|
|
1357
|
+
| 'h5'
|
|
1358
|
+
| 'h6'
|
|
1359
|
+
| 'label'
|
|
1360
|
+
| 'span'
|
|
1361
|
+
| ComponentType
|
|
1362
|
+
|
|
1363
|
+
/** @public */
|
|
1364
|
+
export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
|
|
1365
|
+
|
|
1366
|
+
/** @public */
|
|
1367
|
+
export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
|
|
1368
|
+
HeadingOwnProps,
|
|
1369
|
+
E
|
|
1370
|
+
>
|
|
1089
1371
|
|
|
1090
1372
|
/**
|
|
1091
1373
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1092
1374
|
* @beta
|
|
1093
1375
|
*/
|
|
1094
|
-
export declare
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1376
|
+
export declare function HeadingSkeleton<
|
|
1377
|
+
E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
|
|
1378
|
+
>(props: HeadingSkeletonProps<E>): JSX.Element
|
|
1379
|
+
|
|
1380
|
+
export declare namespace HeadingSkeleton {
|
|
1381
|
+
var displayName: string
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
/** @public */
|
|
1385
|
+
export declare type HeadingSkeletonElementType = SkeletonElementType
|
|
1386
|
+
|
|
1387
|
+
/** @beta */
|
|
1388
|
+
export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
|
|
1389
|
+
size?: ResponsiveProp<FontHeadingSize>
|
|
1390
|
+
}
|
|
1099
1391
|
|
|
1100
1392
|
/**
|
|
1101
1393
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1102
1394
|
* @beta
|
|
1103
1395
|
*/
|
|
1104
|
-
export declare
|
|
1105
|
-
|
|
1106
|
-
|
|
1396
|
+
export declare type HeadingSkeletonProps<
|
|
1397
|
+
E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
|
|
1398
|
+
> = Props<HeadingSkeletonOwnProps, E>
|
|
1107
1399
|
|
|
1108
1400
|
/**
|
|
1109
1401
|
* @public
|
|
@@ -1116,16 +1408,19 @@ export declare const hexToRgb: typeof hexToRgb_2
|
|
|
1116
1408
|
*
|
|
1117
1409
|
* @public
|
|
1118
1410
|
*/
|
|
1119
|
-
export declare
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
RefAttributes<HTMLDivElement>
|
|
1123
|
-
>
|
|
1411
|
+
export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
|
|
1412
|
+
props: HotkeysProps<E>,
|
|
1413
|
+
): JSX.Element | undefined
|
|
1124
1414
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1415
|
+
export declare namespace Hotkeys {
|
|
1416
|
+
var displayName: string
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
/** @public */
|
|
1420
|
+
export declare type HotkeysElementType = 'kbd' | ComponentType
|
|
1421
|
+
|
|
1422
|
+
/** @public */
|
|
1423
|
+
export declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
|
|
1129
1424
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
1130
1425
|
padding?: ResponsiveProp<Space>
|
|
1131
1426
|
/** @deprecated Use `gap` instead. */
|
|
@@ -1133,6 +1428,12 @@ export declare interface HotkeysProps extends GapStyleProps, RadiusStyleProps {
|
|
|
1133
1428
|
keys?: string[]
|
|
1134
1429
|
}
|
|
1135
1430
|
|
|
1431
|
+
/** @public */
|
|
1432
|
+
export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
|
|
1433
|
+
HotkeysOwnProps,
|
|
1434
|
+
E
|
|
1435
|
+
>
|
|
1436
|
+
|
|
1136
1437
|
/**
|
|
1137
1438
|
* @public
|
|
1138
1439
|
* @deprecated Use `HSL` from `@sanity/ui/theme` instead.
|
|
@@ -1150,20 +1451,32 @@ export declare const hslToRgb: typeof hslToRgb_2
|
|
|
1150
1451
|
*
|
|
1151
1452
|
* @public
|
|
1152
1453
|
*/
|
|
1153
|
-
export declare
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
RefAttributes<HTMLDivElement>
|
|
1157
|
-
>
|
|
1454
|
+
export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
|
|
1455
|
+
props: InlineProps<E>,
|
|
1456
|
+
): JSX.Element
|
|
1158
1457
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1458
|
+
export declare namespace Inline {
|
|
1459
|
+
var displayName: string
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/** @public */
|
|
1463
|
+
export declare type InlineElementType = BoxElementType
|
|
1464
|
+
|
|
1465
|
+
/** @public */
|
|
1466
|
+
export declare type InlineOwnProps = Omit<
|
|
1467
|
+
BoxOwnProps,
|
|
1468
|
+
keyof FlexStyleProps | keyof GridStyleProps
|
|
1469
|
+
> & {
|
|
1163
1470
|
/** @deprecated Use `gap` instead. */
|
|
1164
1471
|
space?: ResponsiveProp<Space>
|
|
1165
1472
|
}
|
|
1166
1473
|
|
|
1474
|
+
/** @public */
|
|
1475
|
+
export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
|
|
1476
|
+
InlineOwnProps,
|
|
1477
|
+
E
|
|
1478
|
+
>
|
|
1479
|
+
|
|
1167
1480
|
/**
|
|
1168
1481
|
* @internal
|
|
1169
1482
|
*/
|
|
@@ -1214,67 +1527,99 @@ export declare function _isScrollable(el: Node): boolean
|
|
|
1214
1527
|
*
|
|
1215
1528
|
* @public
|
|
1216
1529
|
*/
|
|
1217
|
-
export declare
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
RefAttributes<HTMLDivElement>
|
|
1221
|
-
>
|
|
1530
|
+
export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
|
|
1531
|
+
props: KBDProps<E>,
|
|
1532
|
+
): JSX.Element
|
|
1222
1533
|
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
*/
|
|
1226
|
-
export declare interface KBDProps extends BoxProps, RadiusStyleProps {
|
|
1227
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1228
|
-
padding?: ResponsiveProp<Space>
|
|
1534
|
+
export declare namespace KBD {
|
|
1535
|
+
var displayName: string
|
|
1229
1536
|
}
|
|
1230
1537
|
|
|
1538
|
+
/** @public */
|
|
1539
|
+
export declare type KBDElementType = 'kbd' | ComponentType
|
|
1540
|
+
|
|
1541
|
+
/** @public */
|
|
1542
|
+
export declare type KBDOwnProps = BoxOwnProps &
|
|
1543
|
+
RadiusStyleProps & {
|
|
1544
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/** @public */
|
|
1548
|
+
export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
|
|
1549
|
+
|
|
1231
1550
|
/**
|
|
1232
1551
|
* Typographic labels.
|
|
1233
1552
|
*
|
|
1234
1553
|
* @public
|
|
1235
1554
|
*/
|
|
1236
|
-
export declare
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
RefAttributes<HTMLDivElement>
|
|
1240
|
-
>
|
|
1555
|
+
export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
|
|
1556
|
+
props: LabelProps<E>,
|
|
1557
|
+
): JSX.Element
|
|
1241
1558
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
*/
|
|
1245
|
-
export declare interface LabelProps extends FontStyleProps, TextOverflowStyleProps {
|
|
1246
|
-
accent?: boolean
|
|
1247
|
-
htmlFor?: string
|
|
1248
|
-
muted?: boolean
|
|
1249
|
-
size?: ResponsiveProp<LabelSize>
|
|
1559
|
+
export declare namespace Label {
|
|
1560
|
+
var displayName: string
|
|
1250
1561
|
}
|
|
1251
1562
|
|
|
1252
|
-
/**
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1563
|
+
/** @public */
|
|
1564
|
+
export declare type LabelElementType =
|
|
1565
|
+
| 'div'
|
|
1566
|
+
| 'h1'
|
|
1567
|
+
| 'h2'
|
|
1568
|
+
| 'h3'
|
|
1569
|
+
| 'h4'
|
|
1570
|
+
| 'h5'
|
|
1571
|
+
| 'h6'
|
|
1572
|
+
| 'label'
|
|
1573
|
+
| 'li'
|
|
1574
|
+
| 'p'
|
|
1575
|
+
| 'span'
|
|
1576
|
+
| ComponentType
|
|
1577
|
+
|
|
1578
|
+
/** @public */
|
|
1579
|
+
export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
|
|
1580
|
+
|
|
1581
|
+
/** @public */
|
|
1582
|
+
export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
|
|
1583
|
+
LabelOwnProps,
|
|
1584
|
+
E
|
|
1260
1585
|
>
|
|
1261
1586
|
|
|
1262
1587
|
/**
|
|
1263
1588
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1264
1589
|
* @beta
|
|
1265
1590
|
*/
|
|
1266
|
-
export declare
|
|
1591
|
+
export declare function LabelSkeleton<
|
|
1592
|
+
E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
|
|
1593
|
+
>(props: LabelSkeletonProps<E>): JSX.Element
|
|
1594
|
+
|
|
1595
|
+
export declare namespace LabelSkeleton {
|
|
1596
|
+
var displayName: string
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/** @public */
|
|
1600
|
+
export declare type LabelSkeletonElementType = SkeletonElementType
|
|
1601
|
+
|
|
1602
|
+
/** @beta */
|
|
1603
|
+
export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
|
|
1267
1604
|
size?: ResponsiveProp<FontLabelSize>
|
|
1268
1605
|
}
|
|
1269
1606
|
|
|
1270
1607
|
/**
|
|
1271
|
-
*
|
|
1608
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1609
|
+
* @beta
|
|
1272
1610
|
*/
|
|
1273
|
-
export declare
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1611
|
+
export declare type LabelSkeletonProps<
|
|
1612
|
+
E extends LabelSkeletonElementType = LabelSkeletonElementType,
|
|
1613
|
+
> = Props<LabelSkeletonOwnProps, E>
|
|
1614
|
+
|
|
1615
|
+
/** @public */
|
|
1616
|
+
export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
|
|
1617
|
+
props: LayerProps<E>,
|
|
1618
|
+
): JSX.Element
|
|
1619
|
+
|
|
1620
|
+
export declare namespace Layer {
|
|
1621
|
+
var displayName: string
|
|
1622
|
+
}
|
|
1278
1623
|
|
|
1279
1624
|
/** @public */
|
|
1280
1625
|
export declare interface LayerContextValue {
|
|
@@ -1286,40 +1631,35 @@ export declare interface LayerContextValue {
|
|
|
1286
1631
|
zIndex: number
|
|
1287
1632
|
}
|
|
1288
1633
|
|
|
1289
|
-
/**
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1634
|
+
/** @public */
|
|
1635
|
+
export declare type LayerElementType = CardElementType
|
|
1636
|
+
|
|
1637
|
+
/** @public */
|
|
1638
|
+
export declare type LayerOwnProps = CardOwnProps & {
|
|
1293
1639
|
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1294
1640
|
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1295
1641
|
zOffset?: number | number[]
|
|
1296
1642
|
}
|
|
1297
1643
|
|
|
1298
|
-
/**
|
|
1299
|
-
|
|
1300
|
-
|
|
1644
|
+
/** @public */
|
|
1645
|
+
export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
|
|
1646
|
+
LayerOwnProps,
|
|
1647
|
+
E
|
|
1648
|
+
>
|
|
1649
|
+
|
|
1650
|
+
/** @public */
|
|
1301
1651
|
export declare function LayerProvider(props: LayerProviderProps): ReactElement
|
|
1302
1652
|
|
|
1303
1653
|
export declare namespace LayerProvider {
|
|
1304
1654
|
var displayName: string
|
|
1305
1655
|
}
|
|
1306
1656
|
|
|
1307
|
-
/**
|
|
1308
|
-
* @public
|
|
1309
|
-
*/
|
|
1657
|
+
/** @public */
|
|
1310
1658
|
export declare interface LayerProviderProps {
|
|
1311
1659
|
children?: ReactNode
|
|
1312
1660
|
zOffset?: number | number[]
|
|
1313
1661
|
}
|
|
1314
1662
|
|
|
1315
|
-
/**
|
|
1316
|
-
* DO NOT USE IN PRODUCTION.
|
|
1317
|
-
* @beta
|
|
1318
|
-
*/
|
|
1319
|
-
export declare interface MediaQueryProps {
|
|
1320
|
-
media?: number[]
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
1663
|
/**
|
|
1324
1664
|
* @internal
|
|
1325
1665
|
*/
|
|
@@ -1333,25 +1673,27 @@ export declare interface _MediaStore {
|
|
|
1333
1673
|
*
|
|
1334
1674
|
* @public
|
|
1335
1675
|
*/
|
|
1336
|
-
export declare
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1676
|
+
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
1677
|
+
props: MenuProps<E>,
|
|
1678
|
+
): JSX.Element
|
|
1679
|
+
|
|
1680
|
+
export declare namespace Menu {
|
|
1681
|
+
var displayName: string
|
|
1682
|
+
}
|
|
1341
1683
|
|
|
1342
1684
|
/**
|
|
1343
1685
|
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1344
1686
|
*
|
|
1345
1687
|
* @public
|
|
1346
1688
|
*/
|
|
1347
|
-
export declare
|
|
1348
|
-
MenuButtonProps & RefAttributes<HTMLButtonElement | null>
|
|
1349
|
-
>
|
|
1689
|
+
export declare function MenuButton(props: MenuButtonProps): JSX.Element
|
|
1350
1690
|
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1691
|
+
export declare namespace MenuButton {
|
|
1692
|
+
var displayName: string
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/** @public */
|
|
1696
|
+
export declare type MenuButtonProps = {
|
|
1355
1697
|
/**
|
|
1356
1698
|
* @beta Do not use in production.
|
|
1357
1699
|
*/
|
|
@@ -1360,7 +1702,7 @@ export declare interface MenuButtonProps {
|
|
|
1360
1702
|
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1361
1703
|
*/
|
|
1362
1704
|
boundaryElement?: HTMLElement
|
|
1363
|
-
button: ReactElement<
|
|
1705
|
+
button: ReactElement<ButtonProps>
|
|
1364
1706
|
id: string
|
|
1365
1707
|
menu?: ReactElement
|
|
1366
1708
|
onClose?: () => void
|
|
@@ -1387,38 +1729,51 @@ export declare interface MenuButtonProps {
|
|
|
1387
1729
|
* @deprecated Use `popover={{preventOverflow: true}}` instead.
|
|
1388
1730
|
*/
|
|
1389
1731
|
preventOverflow?: boolean
|
|
1732
|
+
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
1390
1733
|
}
|
|
1391
1734
|
|
|
1392
|
-
/**
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1735
|
+
/** @public */
|
|
1736
|
+
export declare function MenuDivider<
|
|
1737
|
+
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1738
|
+
>(props: MenuDividerProps<E>): JSX.Element
|
|
1739
|
+
|
|
1740
|
+
export declare namespace MenuDivider {
|
|
1741
|
+
var displayName: string
|
|
1742
|
+
}
|
|
1400
1743
|
|
|
1401
1744
|
/** @public */
|
|
1402
|
-
export declare
|
|
1745
|
+
export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
1403
1746
|
|
|
1404
|
-
/**
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1747
|
+
/** @public */
|
|
1748
|
+
export declare type MenuDividerOwnProps = {}
|
|
1749
|
+
|
|
1750
|
+
/** @public */
|
|
1751
|
+
export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
|
|
1752
|
+
Props<MenuDividerOwnProps, E>
|
|
1753
|
+
|
|
1754
|
+
/** @public */
|
|
1755
|
+
export declare type MenuElementType = 'div' | 'span' | ComponentType
|
|
1756
|
+
|
|
1757
|
+
/** @public */
|
|
1758
|
+
export declare function MenuGroup<
|
|
1759
|
+
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
1760
|
+
>(props: MenuGroupProps<E>): JSX.Element
|
|
1408
1761
|
|
|
1409
1762
|
export declare namespace MenuGroup {
|
|
1410
1763
|
var displayName: string
|
|
1411
1764
|
}
|
|
1412
1765
|
|
|
1413
|
-
/**
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1766
|
+
/** @public */
|
|
1767
|
+
export declare type MenuGroupElementType = 'button' | ComponentType
|
|
1768
|
+
|
|
1769
|
+
/** @public */
|
|
1770
|
+
export declare type MenuGroupOwnProps = RadiusStyleProps & {
|
|
1417
1771
|
disabled?: boolean
|
|
1418
1772
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
1419
|
-
|
|
1773
|
+
gap?: ResponsiveProp<Space>
|
|
1774
|
+
icon?: ElementType_2 | ReactNode
|
|
1420
1775
|
menu?: Omit<
|
|
1421
|
-
MenuProps
|
|
1776
|
+
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1422
1777
|
| 'onClickOutside'
|
|
1423
1778
|
| 'onEscape'
|
|
1424
1779
|
| 'onItemClick'
|
|
@@ -1430,43 +1785,55 @@ export declare interface MenuGroupProps extends GapStyleProps {
|
|
|
1430
1785
|
>
|
|
1431
1786
|
padding?: ResponsiveProp<Space>
|
|
1432
1787
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1433
|
-
radius?: Radius | Radius[]
|
|
1434
1788
|
/** @deprecated Use `gap` instead. */
|
|
1435
1789
|
space?: ResponsiveProp<Space>
|
|
1436
|
-
text
|
|
1437
|
-
tone?:
|
|
1790
|
+
text?: ReactNode
|
|
1791
|
+
tone?: ThemeColorStateToneKey
|
|
1438
1792
|
}
|
|
1439
1793
|
|
|
1440
|
-
/**
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuItemProps> &
|
|
1445
|
-
MenuItemProps &
|
|
1446
|
-
RefAttributes<HTMLDivElement>
|
|
1794
|
+
/** @public */
|
|
1795
|
+
export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
|
|
1796
|
+
MenuGroupOwnProps,
|
|
1797
|
+
E
|
|
1447
1798
|
>
|
|
1448
1799
|
|
|
1449
|
-
/**
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
icon?: ElementType | ReactNode
|
|
1457
|
-
iconRight?: ElementType | ReactNode
|
|
1458
|
-
pressed?: boolean
|
|
1459
|
-
selected?: boolean
|
|
1460
|
-
/** @deprecated Use `gap` instead. */
|
|
1461
|
-
space?: ResponsiveProp<Space>
|
|
1462
|
-
text?: ReactNode
|
|
1463
|
-
tone?: SelectableTone
|
|
1800
|
+
/** @public */
|
|
1801
|
+
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
1802
|
+
props: MenuItemProps<E>,
|
|
1803
|
+
): JSX.Element
|
|
1804
|
+
|
|
1805
|
+
export declare namespace MenuItem {
|
|
1806
|
+
var displayName: string
|
|
1464
1807
|
}
|
|
1465
1808
|
|
|
1466
|
-
/**
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1809
|
+
/** @public */
|
|
1810
|
+
export declare type MenuItemElementType = 'button' | 'a' | ComponentType
|
|
1811
|
+
|
|
1812
|
+
/** @public */
|
|
1813
|
+
export declare type MenuItemOwnProps = GapStyleProps &
|
|
1814
|
+
PaddingStyleProps &
|
|
1815
|
+
RadiusStyleProps & {
|
|
1816
|
+
disabled?: boolean
|
|
1817
|
+
fontSize?: number | number[]
|
|
1818
|
+
hotkeys?: string[]
|
|
1819
|
+
icon?: ElementType_2 | ReactNode
|
|
1820
|
+
iconRight?: ElementType_2 | ReactNode
|
|
1821
|
+
pressed?: boolean
|
|
1822
|
+
selected?: boolean
|
|
1823
|
+
/** @deprecated Use `gap` instead. */
|
|
1824
|
+
space?: ResponsiveProp<Space>
|
|
1825
|
+
text?: ReactNode
|
|
1826
|
+
tone?: ThemeColorStateToneKey
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
/** @public */
|
|
1830
|
+
export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
|
|
1831
|
+
Props<MenuItemOwnProps, E>,
|
|
1832
|
+
'role'
|
|
1833
|
+
>
|
|
1834
|
+
|
|
1835
|
+
/** @public */
|
|
1836
|
+
export declare type MenuOwnProps = PaddingStyleProps & {
|
|
1470
1837
|
/**
|
|
1471
1838
|
* @deprecated Use `shouldFocus="first"` instead.
|
|
1472
1839
|
*/
|
|
@@ -1475,6 +1842,7 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1475
1842
|
* @deprecated Use `shouldFocus="last"` instead.
|
|
1476
1843
|
*/
|
|
1477
1844
|
'focusLast'?: boolean
|
|
1845
|
+
'gap'?: ResponsiveProp<Space>
|
|
1478
1846
|
'onClickOutside'?: (event: MouseEvent) => void
|
|
1479
1847
|
'onEscape'?: () => void
|
|
1480
1848
|
'onItemClick'?: () => void
|
|
@@ -1487,6 +1855,9 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1487
1855
|
'aria-labelledby'?: string
|
|
1488
1856
|
}
|
|
1489
1857
|
|
|
1858
|
+
/** @public */
|
|
1859
|
+
export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
|
|
1860
|
+
|
|
1490
1861
|
/**
|
|
1491
1862
|
* @public
|
|
1492
1863
|
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
@@ -1520,20 +1891,21 @@ export declare type Placement =
|
|
|
1520
1891
|
| 'left-start'
|
|
1521
1892
|
| 'left-end'
|
|
1522
1893
|
|
|
1523
|
-
export declare interface PolymorphicProps {
|
|
1524
|
-
as?: ElementType
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
1894
|
/**
|
|
1528
1895
|
* The `Popover` component is used to display some content on top of another.
|
|
1529
1896
|
*
|
|
1530
1897
|
* @public
|
|
1531
1898
|
*/
|
|
1532
|
-
export declare
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1899
|
+
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
1900
|
+
props: PopoverProps<E>,
|
|
1901
|
+
): JSX.Element
|
|
1902
|
+
|
|
1903
|
+
export declare namespace Popover {
|
|
1904
|
+
var displayName: string
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
/** @public */
|
|
1908
|
+
export declare type PopoverElementType = 'div' | ComponentType
|
|
1537
1909
|
|
|
1538
1910
|
/**
|
|
1539
1911
|
* @beta
|
|
@@ -1541,7 +1913,7 @@ export declare const Popover: NamedExoticComponent<
|
|
|
1541
1913
|
export declare type PopoverMargins = [number, number, number, number]
|
|
1542
1914
|
|
|
1543
1915
|
/** @public */
|
|
1544
|
-
export declare
|
|
1916
|
+
export declare type PopoverOwnProps = LayerOwnProps & {
|
|
1545
1917
|
/** @beta */
|
|
1546
1918
|
__unstable_margins?: PopoverMargins
|
|
1547
1919
|
/**
|
|
@@ -1601,29 +1973,29 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1601
1973
|
*/
|
|
1602
1974
|
referenceElement?: HTMLElement | null
|
|
1603
1975
|
/** @beta */
|
|
1604
|
-
updateRef?:
|
|
1605
|
-
| MutableRefObject<PopoverUpdateCallback | undefined>
|
|
1606
|
-
| RefCallback<PopoverUpdateCallback | undefined>
|
|
1976
|
+
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1607
1977
|
}
|
|
1608
1978
|
|
|
1979
|
+
/** @public */
|
|
1980
|
+
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1981
|
+
PopoverOwnProps,
|
|
1982
|
+
E
|
|
1983
|
+
>
|
|
1984
|
+
|
|
1609
1985
|
/** @beta */
|
|
1610
1986
|
export declare type PopoverUpdateCallback = () => void
|
|
1611
1987
|
|
|
1612
1988
|
/** @public */
|
|
1613
1989
|
export declare type PopoverWidth = number | 'auto'
|
|
1614
1990
|
|
|
1615
|
-
/**
|
|
1616
|
-
* @public
|
|
1617
|
-
*/
|
|
1991
|
+
/** @public */
|
|
1618
1992
|
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
1619
1993
|
|
|
1620
1994
|
export declare namespace Portal {
|
|
1621
1995
|
var displayName: string
|
|
1622
1996
|
}
|
|
1623
1997
|
|
|
1624
|
-
/**
|
|
1625
|
-
* @public
|
|
1626
|
-
*/
|
|
1998
|
+
/** @public */
|
|
1627
1999
|
export declare interface PortalContextValue {
|
|
1628
2000
|
version: 0.0
|
|
1629
2001
|
boundaryElement: HTMLElement | null
|
|
@@ -1631,9 +2003,7 @@ export declare interface PortalContextValue {
|
|
|
1631
2003
|
elements?: Record<string, HTMLElement | null | undefined>
|
|
1632
2004
|
}
|
|
1633
2005
|
|
|
1634
|
-
/**
|
|
1635
|
-
* @public
|
|
1636
|
-
*/
|
|
2006
|
+
/** @public */
|
|
1637
2007
|
export declare interface PortalProps {
|
|
1638
2008
|
children: ReactNode
|
|
1639
2009
|
/**
|
|
@@ -1642,18 +2012,14 @@ export declare interface PortalProps {
|
|
|
1642
2012
|
__unstable_name?: string
|
|
1643
2013
|
}
|
|
1644
2014
|
|
|
1645
|
-
/**
|
|
1646
|
-
* @public
|
|
1647
|
-
*/
|
|
2015
|
+
/** @public */
|
|
1648
2016
|
export declare function PortalProvider(props: PortalProviderProps): ReactElement
|
|
1649
2017
|
|
|
1650
2018
|
export declare namespace PortalProvider {
|
|
1651
2019
|
var displayName: string
|
|
1652
2020
|
}
|
|
1653
2021
|
|
|
1654
|
-
/**
|
|
1655
|
-
* @public
|
|
1656
|
-
*/
|
|
2022
|
+
/** @public */
|
|
1657
2023
|
export declare interface PortalProviderProps {
|
|
1658
2024
|
/**
|
|
1659
2025
|
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
@@ -1668,9 +2034,11 @@ export declare interface PortalProviderProps {
|
|
|
1668
2034
|
}
|
|
1669
2035
|
|
|
1670
2036
|
/** @public */
|
|
1671
|
-
export declare type Props<P extends
|
|
1672
|
-
|
|
1673
|
-
P
|
|
2037
|
+
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
2038
|
+
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
2039
|
+
P & {
|
|
2040
|
+
as?: E
|
|
2041
|
+
}
|
|
1674
2042
|
>
|
|
1675
2043
|
|
|
1676
2044
|
export {px}
|
|
@@ -1680,19 +2048,28 @@ export {px}
|
|
|
1680
2048
|
*
|
|
1681
2049
|
* @public
|
|
1682
2050
|
*/
|
|
1683
|
-
export declare
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
RefAttributes<HTMLInputElement>
|
|
1687
|
-
>
|
|
2051
|
+
export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
|
|
2052
|
+
props: RadioProps<E>,
|
|
2053
|
+
): JSX.Element
|
|
1688
2054
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
2055
|
+
export declare namespace Radio {
|
|
2056
|
+
var displayName: string
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
/** @public */
|
|
2060
|
+
export declare type RadioElementType = 'input' | ComponentType
|
|
2061
|
+
|
|
2062
|
+
/** @public */
|
|
2063
|
+
export declare type RadioOwnProps = {
|
|
1693
2064
|
customValidity?: string
|
|
1694
2065
|
}
|
|
1695
2066
|
|
|
2067
|
+
/** @public */
|
|
2068
|
+
export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
|
|
2069
|
+
RadioOwnProps,
|
|
2070
|
+
E
|
|
2071
|
+
>
|
|
2072
|
+
|
|
1696
2073
|
export {Radius}
|
|
1697
2074
|
|
|
1698
2075
|
/**
|
|
@@ -1724,6 +2101,7 @@ export declare function _responsive<T>(
|
|
|
1724
2101
|
|
|
1725
2102
|
/**
|
|
1726
2103
|
* @internal
|
|
2104
|
+
* @deprecated This will be removed in next major version.
|
|
1727
2105
|
*/
|
|
1728
2106
|
export declare interface ResponsiveAvatarSizeStyleProps {
|
|
1729
2107
|
$size: AvatarSize[]
|
|
@@ -1883,8 +2261,13 @@ export declare const rgbToHex: typeof rgbToHex_2
|
|
|
1883
2261
|
*/
|
|
1884
2262
|
export declare const rgbToHsl: typeof rgbToHsl_2
|
|
1885
2263
|
|
|
2264
|
+
/** @internal */
|
|
1886
2265
|
export declare function RootClassNames(props: {element: HTMLElement}): null
|
|
1887
2266
|
|
|
2267
|
+
export declare namespace RootClassNames {
|
|
2268
|
+
var displayName: string
|
|
2269
|
+
}
|
|
2270
|
+
|
|
1888
2271
|
/**
|
|
1889
2272
|
* @public
|
|
1890
2273
|
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
@@ -1903,11 +2286,16 @@ export {screen_2 as screen}
|
|
|
1903
2286
|
*
|
|
1904
2287
|
* @public
|
|
1905
2288
|
*/
|
|
1906
|
-
export declare
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2289
|
+
export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
|
|
2290
|
+
props: SelectProps<E>,
|
|
2291
|
+
): JSX.Element
|
|
2292
|
+
|
|
2293
|
+
export declare namespace Select {
|
|
2294
|
+
var displayName: string
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/** @internal */
|
|
2298
|
+
declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1911
2299
|
|
|
1912
2300
|
/**
|
|
1913
2301
|
* @public
|
|
@@ -1915,93 +2303,134 @@ export declare const Select: ForwardRefExoticComponent<
|
|
|
1915
2303
|
*/
|
|
1916
2304
|
export declare type SelectableTone = ThemeColorStateToneKey
|
|
1917
2305
|
|
|
1918
|
-
/**
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
2306
|
+
/** @public */
|
|
2307
|
+
export declare type SelectElementType = 'select' | ComponentType
|
|
2308
|
+
|
|
2309
|
+
/** @public */
|
|
2310
|
+
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1922
2311
|
customValidity?: string
|
|
1923
2312
|
readOnly?: boolean
|
|
1924
2313
|
/** @deprecated Use `gap` instead. */
|
|
1925
2314
|
space?: ResponsiveProp<Space>
|
|
1926
2315
|
}
|
|
1927
2316
|
|
|
2317
|
+
/** @public */
|
|
2318
|
+
export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
|
|
2319
|
+
SelectOwnProps,
|
|
2320
|
+
E
|
|
2321
|
+
>
|
|
2322
|
+
|
|
1928
2323
|
/**
|
|
1929
2324
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1930
2325
|
* @beta
|
|
1931
2326
|
*/
|
|
1932
|
-
export declare
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
2327
|
+
export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
|
|
2328
|
+
props: SkeletonProps<E>,
|
|
2329
|
+
): JSX.Element
|
|
2330
|
+
|
|
2331
|
+
export declare namespace Skeleton {
|
|
2332
|
+
var displayName: string
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
/** @beta */
|
|
2336
|
+
export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
1937
2337
|
|
|
1938
2338
|
/**
|
|
1939
2339
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1940
2340
|
* @beta
|
|
1941
2341
|
*/
|
|
1942
|
-
export declare
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
2342
|
+
export declare type SkeletonOwnProps = BoxOwnProps &
|
|
2343
|
+
SkeletonStyleProps & {
|
|
2344
|
+
animated?: boolean
|
|
2345
|
+
delay?: number
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
/** @beta */
|
|
2349
|
+
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
2350
|
+
SkeletonOwnProps,
|
|
2351
|
+
E
|
|
2352
|
+
>
|
|
1946
2353
|
|
|
1947
2354
|
/**
|
|
1948
2355
|
* Indicate that something is loading for an indeterminate amount of time.
|
|
1949
2356
|
*
|
|
1950
2357
|
* @public
|
|
1951
2358
|
*/
|
|
1952
|
-
export declare
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
RefAttributes<HTMLDivElement>
|
|
1956
|
-
>
|
|
2359
|
+
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
2360
|
+
props: SpinnerProps<E>,
|
|
2361
|
+
): JSX.Element
|
|
1957
2362
|
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
2363
|
+
export declare namespace Spinner {
|
|
2364
|
+
var displayName: string
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
/** @public */
|
|
2368
|
+
export declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
2369
|
+
|
|
2370
|
+
/** @public */
|
|
2371
|
+
export declare type SpinnerOwnProps = {
|
|
1962
2372
|
muted?: boolean
|
|
1963
2373
|
size?: ResponsiveProp<FontTextSize>
|
|
1964
2374
|
}
|
|
1965
2375
|
|
|
1966
|
-
/**
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'children'> &
|
|
1971
|
-
SrOnlyProps &
|
|
1972
|
-
RefAttributes<HTMLDivElement>
|
|
2376
|
+
/** @public */
|
|
2377
|
+
export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
|
|
2378
|
+
SpinnerOwnProps,
|
|
2379
|
+
E
|
|
1973
2380
|
>
|
|
1974
2381
|
|
|
1975
|
-
/**
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2382
|
+
/** @public */
|
|
2383
|
+
export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
|
|
2384
|
+
props: SrOnlyProps<E>,
|
|
2385
|
+
): JSX.Element
|
|
2386
|
+
|
|
2387
|
+
export declare namespace SrOnly {
|
|
2388
|
+
var displayName: string
|
|
1980
2389
|
}
|
|
1981
2390
|
|
|
2391
|
+
/** @public */
|
|
2392
|
+
export declare type SrOnlyElementType = 'span' | ComponentType
|
|
2393
|
+
|
|
2394
|
+
/** @public */
|
|
2395
|
+
export declare type SrOnlyOwnProps = {}
|
|
2396
|
+
|
|
2397
|
+
/** @public */
|
|
2398
|
+
export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
|
|
2399
|
+
SrOnlyOwnProps,
|
|
2400
|
+
E
|
|
2401
|
+
>
|
|
2402
|
+
|
|
1982
2403
|
/**
|
|
1983
2404
|
* The `Stack` component is used to place elements on top of each other.
|
|
1984
2405
|
*
|
|
1985
2406
|
* @public
|
|
1986
2407
|
*/
|
|
1987
|
-
export declare
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
RefAttributes<HTMLDivElement>
|
|
1991
|
-
>
|
|
2408
|
+
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
2409
|
+
props: StackProps<E>,
|
|
2410
|
+
): JSX.Element
|
|
1992
2411
|
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2412
|
+
export declare namespace Stack {
|
|
2413
|
+
var displayName: string
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
/** @public */
|
|
2417
|
+
export declare type StackElementType = BoxElementType
|
|
2418
|
+
|
|
2419
|
+
/** @public */
|
|
2420
|
+
export declare type StackOwnProps = Omit<
|
|
2421
|
+
BoxOwnProps,
|
|
2422
|
+
'align' | 'columns' | 'direction' | 'display' | 'gapX' | 'gapY' | 'justify'
|
|
2423
|
+
> & {
|
|
2001
2424
|
/** @deprecated Use `gap` instead. */
|
|
2002
2425
|
space?: ResponsiveProp<Space>
|
|
2003
2426
|
}
|
|
2004
2427
|
|
|
2428
|
+
/** @public */
|
|
2429
|
+
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
2430
|
+
StackOwnProps,
|
|
2431
|
+
E
|
|
2432
|
+
>
|
|
2433
|
+
|
|
2005
2434
|
/**
|
|
2006
2435
|
* @public
|
|
2007
2436
|
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
@@ -2014,8 +2443,13 @@ export declare const studioTheme: RootTheme_2
|
|
|
2014
2443
|
*/
|
|
2015
2444
|
export declare type Styles = ThemeStyles
|
|
2016
2445
|
|
|
2446
|
+
/** @beta */
|
|
2017
2447
|
export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
|
|
2018
2448
|
|
|
2449
|
+
export declare namespace StyleTags {
|
|
2450
|
+
var displayName: string
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2019
2453
|
/**
|
|
2020
2454
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
2021
2455
|
*
|
|
@@ -2023,83 +2457,78 @@ export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
|
|
|
2023
2457
|
*
|
|
2024
2458
|
* @public
|
|
2025
2459
|
*/
|
|
2026
|
-
export declare
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
RefAttributes<HTMLInputElement>
|
|
2030
|
-
>
|
|
2460
|
+
export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
|
|
2461
|
+
props: SwitchProps<E>,
|
|
2462
|
+
): JSX.Element
|
|
2031
2463
|
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2464
|
+
export declare namespace Switch {
|
|
2465
|
+
var displayName: string
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
/** @public */
|
|
2469
|
+
export declare type SwitchElementType = 'input' | ComponentType
|
|
2470
|
+
|
|
2471
|
+
/** @public */
|
|
2472
|
+
export declare type SwitchOwnProps = {
|
|
2036
2473
|
indeterminate?: boolean
|
|
2037
2474
|
}
|
|
2038
2475
|
|
|
2039
|
-
/**
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof TabProps> &
|
|
2044
|
-
TabProps &
|
|
2045
|
-
RefAttributes<HTMLButtonElement>
|
|
2476
|
+
/** @public */
|
|
2477
|
+
export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
|
|
2478
|
+
SwitchOwnProps,
|
|
2479
|
+
E
|
|
2046
2480
|
>
|
|
2047
2481
|
|
|
2048
|
-
/**
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabListProps> &
|
|
2053
|
-
TabListProps &
|
|
2054
|
-
RefAttributes<HTMLDivElement>
|
|
2055
|
-
>
|
|
2482
|
+
/** @public */
|
|
2483
|
+
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
2484
|
+
props: TabProps<E>,
|
|
2485
|
+
): JSX.Element
|
|
2056
2486
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2487
|
+
export declare namespace Tab {
|
|
2488
|
+
var displayName: string
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
/** @public */
|
|
2492
|
+
export declare type TabElementType = 'button' | ComponentType
|
|
2493
|
+
|
|
2494
|
+
/** @public */
|
|
2495
|
+
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
2496
|
+
props: TabListProps<E>,
|
|
2497
|
+
): JSX.Element
|
|
2498
|
+
|
|
2499
|
+
export declare namespace TabList {
|
|
2500
|
+
var displayName: string
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
/** @public */
|
|
2060
2504
|
export declare type TabListChild =
|
|
2061
2505
|
| ReactElement<Props<TabProps, 'button'>>
|
|
2062
2506
|
| null
|
|
2063
2507
|
| undefined
|
|
2064
2508
|
| false
|
|
2065
2509
|
|
|
2066
|
-
/**
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2510
|
+
/** @public */
|
|
2511
|
+
export declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
2512
|
+
|
|
2513
|
+
/** @public */
|
|
2514
|
+
export declare type TabListOwnProps = Omit<InlineOwnProps, 'as' | 'height'> & {
|
|
2070
2515
|
children: TabListChild[]
|
|
2071
2516
|
}
|
|
2072
2517
|
|
|
2073
|
-
/**
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabPanelProps> &
|
|
2078
|
-
TabPanelProps &
|
|
2079
|
-
RefAttributes<HTMLDivElement>
|
|
2518
|
+
/** @public */
|
|
2519
|
+
export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
|
|
2520
|
+
TabListOwnProps,
|
|
2521
|
+
E
|
|
2080
2522
|
>
|
|
2081
2523
|
|
|
2082
|
-
/**
|
|
2083
|
-
|
|
2084
|
-
*/
|
|
2085
|
-
export declare interface TabPanelProps extends BoxProps {
|
|
2086
|
-
/**
|
|
2087
|
-
* The `id` of the correlating `Tab` component.
|
|
2088
|
-
*/
|
|
2089
|
-
'aria-labelledby': string
|
|
2090
|
-
'id': string
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* @public
|
|
2095
|
-
*/
|
|
2096
|
-
export declare interface TabProps {
|
|
2524
|
+
/** @public */
|
|
2525
|
+
export declare type TabOwnProps = {
|
|
2097
2526
|
/**
|
|
2098
2527
|
* The `id` of the corresponding `TabPanel` component.
|
|
2099
2528
|
*/
|
|
2100
2529
|
'aria-controls': string
|
|
2101
2530
|
'id': string
|
|
2102
|
-
'icon'?:
|
|
2531
|
+
'icon'?: ElementType_2 | ReactNode
|
|
2103
2532
|
'focused'?: boolean
|
|
2104
2533
|
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
2105
2534
|
'label'?: ReactNode
|
|
@@ -2108,16 +2537,51 @@ export declare interface TabProps {
|
|
|
2108
2537
|
'tone'?: ButtonTone
|
|
2109
2538
|
}
|
|
2110
2539
|
|
|
2540
|
+
/** @public */
|
|
2541
|
+
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
2542
|
+
props: TabPanelProps<E>,
|
|
2543
|
+
): JSX.Element
|
|
2544
|
+
|
|
2545
|
+
export declare namespace TabPanel {
|
|
2546
|
+
var displayName: string
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
/** @public */
|
|
2550
|
+
export declare type TabPanelElementType = 'div' | 'span' | ComponentType
|
|
2551
|
+
|
|
2552
|
+
/** @public */
|
|
2553
|
+
export declare type TabPanelOwnProps = BoxOwnProps & {
|
|
2554
|
+
/**
|
|
2555
|
+
* The `id` of the correlating `Tab` component.
|
|
2556
|
+
*/
|
|
2557
|
+
'aria-labelledby': string
|
|
2558
|
+
'id': string
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
/** @public */
|
|
2562
|
+
export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
|
|
2563
|
+
TabPanelOwnProps,
|
|
2564
|
+
E
|
|
2565
|
+
>
|
|
2566
|
+
|
|
2567
|
+
/** @public */
|
|
2568
|
+
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
2569
|
+
|
|
2570
|
+
/** @public */
|
|
2571
|
+
export declare type TagType = keyof JSX.IntrinsicElements
|
|
2572
|
+
|
|
2111
2573
|
/**
|
|
2112
2574
|
* The `Text` component is an agile, themed typographic element.
|
|
2113
2575
|
*
|
|
2114
2576
|
* @public
|
|
2115
2577
|
*/
|
|
2116
|
-
declare
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2578
|
+
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
2579
|
+
props: TextProps<E>,
|
|
2580
|
+
): JSX.Element
|
|
2581
|
+
|
|
2582
|
+
declare namespace Text_2 {
|
|
2583
|
+
var displayName: string
|
|
2584
|
+
}
|
|
2121
2585
|
export {Text_2 as Text}
|
|
2122
2586
|
|
|
2123
2587
|
export {TextAlign}
|
|
@@ -2127,16 +2591,19 @@ export {TextAlign}
|
|
|
2127
2591
|
*
|
|
2128
2592
|
* @public
|
|
2129
2593
|
*/
|
|
2130
|
-
export declare
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
RefAttributes<HTMLTextAreaElement>
|
|
2134
|
-
>
|
|
2594
|
+
export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
|
|
2595
|
+
props: TextAreaProps<E>,
|
|
2596
|
+
): JSX.Element
|
|
2135
2597
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2598
|
+
export declare namespace TextArea {
|
|
2599
|
+
var displayName: string
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
/** @public */
|
|
2603
|
+
export declare type TextAreaElementType = 'textarea' | ComponentType
|
|
2604
|
+
|
|
2605
|
+
/** @public */
|
|
2606
|
+
export declare type TextAreaOwnProps = TextAreaStyleProps & {
|
|
2140
2607
|
/**
|
|
2141
2608
|
* @beta
|
|
2142
2609
|
*/
|
|
@@ -2147,29 +2614,51 @@ export declare interface TextAreaProps extends TextAreaStyleProps {
|
|
|
2147
2614
|
weight?: ThemeFontWeightKey_2
|
|
2148
2615
|
}
|
|
2149
2616
|
|
|
2617
|
+
/** @public */
|
|
2618
|
+
export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
|
|
2619
|
+
TextAreaOwnProps,
|
|
2620
|
+
E
|
|
2621
|
+
>
|
|
2622
|
+
|
|
2623
|
+
/** @public */
|
|
2624
|
+
export declare type TextElementType =
|
|
2625
|
+
| 'div'
|
|
2626
|
+
| 'h1'
|
|
2627
|
+
| 'h2'
|
|
2628
|
+
| 'h3'
|
|
2629
|
+
| 'h4'
|
|
2630
|
+
| 'h5'
|
|
2631
|
+
| 'h6'
|
|
2632
|
+
| 'label'
|
|
2633
|
+
| 'li'
|
|
2634
|
+
| 'p'
|
|
2635
|
+
| 'span'
|
|
2636
|
+
| ComponentType
|
|
2637
|
+
|
|
2150
2638
|
/**
|
|
2151
2639
|
* Single line text input.
|
|
2152
2640
|
*
|
|
2153
2641
|
* @public
|
|
2154
2642
|
*/
|
|
2155
|
-
export declare
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
RefAttributes<HTMLInputElement>
|
|
2159
|
-
>
|
|
2643
|
+
export declare function TextInput<
|
|
2644
|
+
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
2645
|
+
>(props: TextInputProps<E>): JSX.Element
|
|
2160
2646
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2647
|
+
export declare namespace TextInput {
|
|
2648
|
+
var displayName: string
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
/** @public */
|
|
2164
2652
|
export declare type TextInputClearButtonProps = Omit<
|
|
2165
|
-
|
|
2653
|
+
ButtonProps<'button'>,
|
|
2166
2654
|
'as' | 'onClick' | 'onMouseDown'
|
|
2167
2655
|
>
|
|
2168
2656
|
|
|
2169
|
-
/**
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2657
|
+
/** @public */
|
|
2658
|
+
export declare type TextInputElementType = 'input' | ComponentType
|
|
2659
|
+
|
|
2660
|
+
/** @public */
|
|
2661
|
+
export declare type TextInputOwnProps = InputStyleProps & {
|
|
2173
2662
|
/**
|
|
2174
2663
|
* @beta
|
|
2175
2664
|
*/
|
|
@@ -2179,8 +2668,8 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2179
2668
|
*/
|
|
2180
2669
|
clearButton?: boolean | TextInputClearButtonProps
|
|
2181
2670
|
customValidity?: string
|
|
2182
|
-
icon?:
|
|
2183
|
-
iconRight?:
|
|
2671
|
+
icon?: ElementType_2 | ReactNode
|
|
2672
|
+
iconRight?: ElementType_2 | ReactNode
|
|
2184
2673
|
/**
|
|
2185
2674
|
* @beta
|
|
2186
2675
|
*/
|
|
@@ -2189,52 +2678,47 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2189
2678
|
/** @deprecated Use `gap` instead. */
|
|
2190
2679
|
space?: ResponsiveProp<Space>
|
|
2191
2680
|
suffix?: ReactNode
|
|
2192
|
-
type?: TextInputType
|
|
2193
2681
|
weight?: ThemeFontWeightKey_2
|
|
2194
2682
|
}
|
|
2195
2683
|
|
|
2196
|
-
/**
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
| 'date'
|
|
2202
|
-
| 'datetime-local'
|
|
2203
|
-
| 'email'
|
|
2204
|
-
| 'url'
|
|
2205
|
-
| 'month'
|
|
2206
|
-
| 'number'
|
|
2207
|
-
| 'password'
|
|
2208
|
-
| 'tel'
|
|
2209
|
-
| 'time'
|
|
2210
|
-
| 'text'
|
|
2211
|
-
| 'week'
|
|
2212
|
-
| 'color'
|
|
2684
|
+
/** @public */
|
|
2685
|
+
export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
|
|
2686
|
+
TextInputOwnProps,
|
|
2687
|
+
E
|
|
2688
|
+
>
|
|
2213
2689
|
|
|
2214
|
-
/**
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
}
|
|
2690
|
+
/** @public */
|
|
2691
|
+
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2692
|
+
|
|
2693
|
+
/** @public */
|
|
2694
|
+
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2220
2695
|
|
|
2221
2696
|
/**
|
|
2222
2697
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2223
2698
|
* @beta
|
|
2224
2699
|
*/
|
|
2225
|
-
export declare
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2700
|
+
export declare function TextSkeleton<
|
|
2701
|
+
E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
|
|
2702
|
+
>(props: TextSkeletonProps<E>): JSX.Element
|
|
2703
|
+
|
|
2704
|
+
export declare namespace TextSkeleton {
|
|
2705
|
+
var displayName: string
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
/** @public */
|
|
2709
|
+
export declare type TextSkeletonElementType = SkeletonElementType
|
|
2710
|
+
|
|
2711
|
+
/** @beta */
|
|
2712
|
+
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2713
|
+
size?: ResponsiveProp<FontTextSize>
|
|
2714
|
+
}
|
|
2230
2715
|
|
|
2231
2716
|
/**
|
|
2232
2717
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2233
2718
|
* @beta
|
|
2234
2719
|
*/
|
|
2235
|
-
export declare
|
|
2236
|
-
|
|
2237
|
-
}
|
|
2720
|
+
export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
|
|
2721
|
+
Props<TextSkeletonOwnProps, E>
|
|
2238
2722
|
|
|
2239
2723
|
/**
|
|
2240
2724
|
* @public
|
|
@@ -2282,18 +2766,14 @@ export {ThemeColorMutedTone}
|
|
|
2282
2766
|
|
|
2283
2767
|
export {ThemeColorName}
|
|
2284
2768
|
|
|
2285
|
-
/**
|
|
2286
|
-
* @public
|
|
2287
|
-
*/
|
|
2769
|
+
/** @public */
|
|
2288
2770
|
export declare function ThemeColorProvider(props: ThemeColorProviderProps): ReactElement
|
|
2289
2771
|
|
|
2290
2772
|
export declare namespace ThemeColorProvider {
|
|
2291
2773
|
var displayName: string
|
|
2292
2774
|
}
|
|
2293
2775
|
|
|
2294
|
-
/**
|
|
2295
|
-
* @public
|
|
2296
|
-
*/
|
|
2776
|
+
/** @public */
|
|
2297
2777
|
export declare interface ThemeColorProviderProps {
|
|
2298
2778
|
children?: ReactNode
|
|
2299
2779
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2332,9 +2812,7 @@ export declare type ThemeColorSyntax = ThemeColorSyntax_2
|
|
|
2332
2812
|
|
|
2333
2813
|
export {ThemeColorToneKey}
|
|
2334
2814
|
|
|
2335
|
-
/**
|
|
2336
|
-
* @public
|
|
2337
|
-
*/
|
|
2815
|
+
/** @public */
|
|
2338
2816
|
export declare interface ThemeContextValue {
|
|
2339
2817
|
/** @deprecated No longer used */
|
|
2340
2818
|
version: 0.0
|
|
@@ -2387,18 +2865,14 @@ export {ThemeInput}
|
|
|
2387
2865
|
*/
|
|
2388
2866
|
export declare type ThemeLayer = ThemeLayer_2
|
|
2389
2867
|
|
|
2390
|
-
/**
|
|
2391
|
-
* @public
|
|
2392
|
-
*/
|
|
2868
|
+
/** @public */
|
|
2393
2869
|
export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
|
|
2394
2870
|
|
|
2395
2871
|
export declare namespace ThemeProvider {
|
|
2396
2872
|
var displayName: string
|
|
2397
2873
|
}
|
|
2398
2874
|
|
|
2399
|
-
/**
|
|
2400
|
-
* @public
|
|
2401
|
-
*/
|
|
2875
|
+
/** @public */
|
|
2402
2876
|
export declare interface ThemeProviderProps {
|
|
2403
2877
|
children?: ReactNode
|
|
2404
2878
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2419,20 +2893,15 @@ export declare type ThemeShadow = ThemeShadow_2
|
|
|
2419
2893
|
*
|
|
2420
2894
|
* @public
|
|
2421
2895
|
*/
|
|
2422
|
-
export declare function Toast(
|
|
2423
|
-
props:
|
|
2424
|
-
|
|
2425
|
-
'onDrag' | 'onDragEnd' | 'onDragStart' | 'onAnimationStart'
|
|
2426
|
-
>,
|
|
2427
|
-
): ReactElement
|
|
2896
|
+
export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
|
|
2897
|
+
props: ToastProps<E>,
|
|
2898
|
+
): JSX.Element
|
|
2428
2899
|
|
|
2429
2900
|
export declare namespace Toast {
|
|
2430
2901
|
var displayName: string
|
|
2431
2902
|
}
|
|
2432
2903
|
|
|
2433
|
-
/**
|
|
2434
|
-
* @public
|
|
2435
|
-
*/
|
|
2904
|
+
/** @public */
|
|
2436
2905
|
export declare interface ToastContextValue {
|
|
2437
2906
|
version: 0.0
|
|
2438
2907
|
/**
|
|
@@ -2444,51 +2913,57 @@ export declare interface ToastContextValue {
|
|
|
2444
2913
|
push: (params: ToastParams) => string
|
|
2445
2914
|
}
|
|
2446
2915
|
|
|
2447
|
-
/**
|
|
2448
|
-
|
|
2449
|
-
*/
|
|
2450
|
-
declare interface ToastLayerProps extends GapStyleProps, PaddingStyleProps {
|
|
2451
|
-
children: ReactNode
|
|
2452
|
-
}
|
|
2916
|
+
/** @public */
|
|
2917
|
+
export declare type ToastElementType = 'li' | ComponentType
|
|
2453
2918
|
|
|
2454
|
-
/**
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2919
|
+
/** @internal */
|
|
2920
|
+
declare type ToastLayerElementType = 'ul' | ComponentType
|
|
2921
|
+
|
|
2922
|
+
/** @internal */
|
|
2923
|
+
declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
|
|
2924
|
+
|
|
2925
|
+
/** @internal */
|
|
2926
|
+
declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
|
|
2927
|
+
ToastLayerOwnProps,
|
|
2928
|
+
E
|
|
2929
|
+
>
|
|
2930
|
+
|
|
2931
|
+
/** @public */
|
|
2932
|
+
export declare type ToastOwnProps = RadiusStyleProps & {
|
|
2458
2933
|
closable?: boolean
|
|
2459
2934
|
description?: ReactNode
|
|
2460
|
-
duration?: number
|
|
2461
|
-
id?: string
|
|
2462
2935
|
onClose?: () => void
|
|
2463
2936
|
title?: ReactNode
|
|
2464
2937
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2938
|
+
duration?: number
|
|
2939
|
+
updatedAt?: number
|
|
2465
2940
|
}
|
|
2466
2941
|
|
|
2467
|
-
/**
|
|
2468
|
-
|
|
2469
|
-
*/
|
|
2470
|
-
export declare interface ToastProps extends RadiusStyleProps {
|
|
2942
|
+
/** @public */
|
|
2943
|
+
export declare interface ToastParams {
|
|
2471
2944
|
closable?: boolean
|
|
2472
2945
|
description?: ReactNode
|
|
2946
|
+
duration?: number
|
|
2947
|
+
id?: string
|
|
2473
2948
|
onClose?: () => void
|
|
2474
2949
|
title?: ReactNode
|
|
2475
2950
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2476
|
-
duration?: number
|
|
2477
|
-
updatedAt?: number
|
|
2478
2951
|
}
|
|
2479
2952
|
|
|
2480
|
-
/**
|
|
2481
|
-
|
|
2482
|
-
|
|
2953
|
+
/** @public */
|
|
2954
|
+
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2955
|
+
ToastOwnProps,
|
|
2956
|
+
E
|
|
2957
|
+
>
|
|
2958
|
+
|
|
2959
|
+
/** @public */
|
|
2483
2960
|
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2484
2961
|
|
|
2485
2962
|
export declare namespace ToastProvider {
|
|
2486
2963
|
var displayName: string
|
|
2487
2964
|
}
|
|
2488
2965
|
|
|
2489
|
-
/**
|
|
2490
|
-
* @public
|
|
2491
|
-
*/
|
|
2966
|
+
/** @public */
|
|
2492
2967
|
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2493
2968
|
children?: React.ReactNode
|
|
2494
2969
|
zOffset?: number | number[]
|
|
@@ -2499,11 +2974,13 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
|
|
|
2499
2974
|
*
|
|
2500
2975
|
* @public
|
|
2501
2976
|
*/
|
|
2502
|
-
export declare
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2977
|
+
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
2978
|
+
props: TooltipProps<E>,
|
|
2979
|
+
): JSX.Element
|
|
2980
|
+
|
|
2981
|
+
export declare namespace Tooltip {
|
|
2982
|
+
var displayName: string
|
|
2983
|
+
}
|
|
2507
2984
|
|
|
2508
2985
|
/**
|
|
2509
2986
|
* @beta
|
|
@@ -2551,55 +3028,63 @@ export declare interface TooltipDelayGroupProviderProps {
|
|
|
2551
3028
|
delay: Delay
|
|
2552
3029
|
}
|
|
2553
3030
|
|
|
2554
|
-
/**
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
}
|
|
3031
|
+
/** @public */
|
|
3032
|
+
export declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
3033
|
+
|
|
3034
|
+
/** @public */
|
|
3035
|
+
export declare type TooltipOwnProps = LayerOwnProps &
|
|
3036
|
+
RadiusStyleProps &
|
|
3037
|
+
ShadowStyleProps & {
|
|
3038
|
+
/** @deprecated Use `fallbackPlacements` instead. */
|
|
3039
|
+
allowedAutoPlacements?: Placement[]
|
|
3040
|
+
/**
|
|
3041
|
+
* Whether the tooltip should animate in and out.
|
|
3042
|
+
*
|
|
3043
|
+
* @beta
|
|
3044
|
+
* @defaultValue false
|
|
3045
|
+
*/
|
|
3046
|
+
animate?: boolean
|
|
3047
|
+
arrow?: boolean
|
|
3048
|
+
boundaryElement?: HTMLElement | null
|
|
3049
|
+
children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
|
|
3050
|
+
content?: ReactNode
|
|
3051
|
+
/**
|
|
3052
|
+
* Adds a delay to open or close the tooltip.
|
|
3053
|
+
*
|
|
3054
|
+
* If only a `number` is passed, it will be used for both opening and closing.
|
|
3055
|
+
*
|
|
3056
|
+
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
3057
|
+
*
|
|
3058
|
+
* @public
|
|
3059
|
+
* @defaultValue 0
|
|
3060
|
+
*/
|
|
3061
|
+
delay?: Delay
|
|
3062
|
+
disabled?: boolean
|
|
3063
|
+
fallbackPlacements?: Placement[]
|
|
3064
|
+
placement?: Placement
|
|
3065
|
+
/** Whether or not to render the tooltip in a portal element. */
|
|
3066
|
+
portal?: boolean | string
|
|
3067
|
+
scheme?: ThemeColorSchemeKey_2
|
|
3068
|
+
tone?: ThemeColorCardToneKey
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
/** @public */
|
|
3072
|
+
export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
|
|
3073
|
+
TooltipOwnProps,
|
|
3074
|
+
E
|
|
3075
|
+
>
|
|
2593
3076
|
|
|
2594
3077
|
/**
|
|
2595
3078
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2596
3079
|
* @beta
|
|
2597
3080
|
*/
|
|
2598
|
-
export declare
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
3081
|
+
export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
|
|
3082
|
+
props: TreeProps<E>,
|
|
3083
|
+
): JSX.Element
|
|
3084
|
+
|
|
3085
|
+
export declare namespace Tree {
|
|
3086
|
+
var displayName: string
|
|
3087
|
+
}
|
|
2603
3088
|
|
|
2604
3089
|
/**
|
|
2605
3090
|
* @beta
|
|
@@ -2616,38 +3101,59 @@ export declare interface TreeContextValue {
|
|
|
2616
3101
|
state: TreeState
|
|
2617
3102
|
}
|
|
2618
3103
|
|
|
3104
|
+
/** @beta */
|
|
3105
|
+
export declare type TreeElementType = 'div' | ComponentType
|
|
3106
|
+
|
|
2619
3107
|
/**
|
|
2620
3108
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2621
3109
|
* @beta
|
|
2622
3110
|
*/
|
|
2623
|
-
export declare
|
|
3111
|
+
export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
|
|
3112
|
+
props: TreeItemProps<E>,
|
|
3113
|
+
): JSX.Element
|
|
2624
3114
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
3115
|
+
export declare namespace TreeItem {
|
|
3116
|
+
var displayName: string
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
/** @beta */
|
|
3120
|
+
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
3121
|
+
|
|
3122
|
+
/** @beta */
|
|
3123
|
+
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2629
3124
|
expanded?: boolean
|
|
2630
3125
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
2631
|
-
icon?:
|
|
3126
|
+
icon?: ElementType_2
|
|
2632
3127
|
/**
|
|
2633
3128
|
* Allows passing a custom element type to the link component
|
|
2634
3129
|
*/
|
|
2635
|
-
linkAs?:
|
|
3130
|
+
linkAs?: SelectableElementType
|
|
3131
|
+
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2636
3132
|
padding?: ResponsiveProp<Space>
|
|
2637
3133
|
space?: ResponsiveProp<Space>
|
|
2638
3134
|
text?: ReactNode
|
|
2639
3135
|
weight?: ThemeFontWeightKey_2
|
|
2640
3136
|
}
|
|
2641
3137
|
|
|
3138
|
+
/** @beta */
|
|
3139
|
+
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
3140
|
+
TreeItemOwnProps,
|
|
3141
|
+
E
|
|
3142
|
+
>
|
|
3143
|
+
|
|
2642
3144
|
/**
|
|
2643
3145
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2644
3146
|
* @beta
|
|
2645
3147
|
*/
|
|
2646
|
-
export declare
|
|
3148
|
+
export declare type TreeOwnProps = {
|
|
3149
|
+
gap?: ResponsiveProp<Space>
|
|
2647
3150
|
/** @deprecated Use `gap` instead. */
|
|
2648
3151
|
space?: ResponsiveProp<Space>
|
|
2649
3152
|
}
|
|
2650
3153
|
|
|
3154
|
+
/** @beta */
|
|
3155
|
+
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
3156
|
+
|
|
2651
3157
|
/**
|
|
2652
3158
|
* @beta
|
|
2653
3159
|
*/
|
|
@@ -2667,9 +3173,7 @@ export declare interface TreeState {
|
|
|
2667
3173
|
*/
|
|
2668
3174
|
export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
2669
3175
|
|
|
2670
|
-
/**
|
|
2671
|
-
* @public
|
|
2672
|
-
*/
|
|
3176
|
+
/** @public */
|
|
2673
3177
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2674
3178
|
|
|
2675
3179
|
export declare function useCard(): CardContextValue_2 | null
|
|
@@ -2695,9 +3199,7 @@ export declare function useClickOutside(
|
|
|
2695
3199
|
boundaryElement?: HTMLElement | null,
|
|
2696
3200
|
): (el: HTMLElement | null) => void
|
|
2697
3201
|
|
|
2698
|
-
/**
|
|
2699
|
-
* @public
|
|
2700
|
-
*/
|
|
3202
|
+
/** @public */
|
|
2701
3203
|
export declare function useClickOutsideEvent(
|
|
2702
3204
|
listener: ClickOutsideEventListener | false | undefined,
|
|
2703
3205
|
elementsArg?: () => ClickOutsideEventElements,
|
|
@@ -2753,9 +3255,7 @@ export declare function useForwardedRef<T>(ref: ForwardedRef<T>): MutableRefObje
|
|
|
2753
3255
|
*/
|
|
2754
3256
|
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2755
3257
|
|
|
2756
|
-
/**
|
|
2757
|
-
* @public
|
|
2758
|
-
*/
|
|
3258
|
+
/** @public */
|
|
2759
3259
|
export declare function useLayer(): LayerContextValue
|
|
2760
3260
|
|
|
2761
3261
|
/**
|
|
@@ -2776,9 +3276,7 @@ export declare function useMatchMedia(
|
|
|
2776
3276
|
*/
|
|
2777
3277
|
export declare function useMediaIndex(): number
|
|
2778
3278
|
|
|
2779
|
-
/**
|
|
2780
|
-
* @public
|
|
2781
|
-
*/
|
|
3279
|
+
/** @public */
|
|
2782
3280
|
export declare function usePortal(): PortalContextValue
|
|
2783
3281
|
|
|
2784
3282
|
/**
|
|
@@ -2807,24 +3305,16 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
|
|
|
2807
3305
|
*/
|
|
2808
3306
|
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2809
3307
|
|
|
2810
|
-
/**
|
|
2811
|
-
* @public
|
|
2812
|
-
*/
|
|
3308
|
+
/** @public */
|
|
2813
3309
|
export declare function useRootTheme(): ThemeContextValue
|
|
2814
3310
|
|
|
2815
|
-
/**
|
|
2816
|
-
* @public
|
|
2817
|
-
*/
|
|
3311
|
+
/** @public */
|
|
2818
3312
|
export declare function useTheme(): Theme_2
|
|
2819
3313
|
|
|
2820
|
-
/**
|
|
2821
|
-
* @public
|
|
2822
|
-
*/
|
|
3314
|
+
/** @public */
|
|
2823
3315
|
export declare function useTheme_v2(): Theme_v2
|
|
2824
3316
|
|
|
2825
|
-
/**
|
|
2826
|
-
* @public
|
|
2827
|
-
*/
|
|
3317
|
+
/** @public */
|
|
2828
3318
|
export declare function useToast(): ToastContextValue
|
|
2829
3319
|
|
|
2830
3320
|
/**
|
|
@@ -2837,18 +3327,16 @@ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue |
|
|
|
2837
3327
|
*/
|
|
2838
3328
|
export declare function useTree(): TreeContextValue
|
|
2839
3329
|
|
|
2840
|
-
/**
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof VirtualListProps<any>> &
|
|
2845
|
-
VirtualListProps<any> &
|
|
2846
|
-
RefAttributes<HTMLDivElement>
|
|
2847
|
-
>
|
|
3330
|
+
/** @beta */
|
|
3331
|
+
export declare function VirtualList<
|
|
3332
|
+
E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
3333
|
+
>(props: VirtualListProps<E>): JSX.Element
|
|
2848
3334
|
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
3335
|
+
export declare namespace VirtualList {
|
|
3336
|
+
var displayName: string
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
/** @beta */
|
|
2852
3340
|
export declare interface VirtualListChangeOpts {
|
|
2853
3341
|
fromIndex: number
|
|
2854
3342
|
gap: number
|
|
@@ -2858,10 +3346,11 @@ export declare interface VirtualListChangeOpts {
|
|
|
2858
3346
|
toIndex: number
|
|
2859
3347
|
}
|
|
2860
3348
|
|
|
2861
|
-
/**
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
3349
|
+
/** @beta */
|
|
3350
|
+
export declare type VirtualListElementType = 'div' | ComponentType
|
|
3351
|
+
|
|
3352
|
+
/** @beta */
|
|
3353
|
+
export declare type VirtualListOwnProps<Item = any> = {
|
|
2865
3354
|
gap?: Space
|
|
2866
3355
|
getItemKey?: (item: Item, itemIndex: number) => string
|
|
2867
3356
|
items?: Item[]
|
|
@@ -2869,4 +3358,8 @@ export declare interface VirtualListProps<Item = any> extends Omit<StackProps, '
|
|
|
2869
3358
|
renderItem?: (item: Item) => ReactNode
|
|
2870
3359
|
}
|
|
2871
3360
|
|
|
3361
|
+
/** @beta */
|
|
3362
|
+
export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
|
|
3363
|
+
Props<VirtualListOwnProps, E>
|
|
3364
|
+
|
|
2872
3365
|
export {}
|