@sanity/ui 3.0.0-static.10 → 3.0.0-static.12
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 +1300 -1269
- 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 +1298 -1263
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +516 -360
- package/dist/_visual-editing.d.ts +516 -360
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +258 -75
- package/dist/css.d.ts +258 -75
- package/dist/css.js +746 -752
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +748 -754
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +1342 -871
- package/dist/index.d.ts +1342 -871
- package/dist/index.js +433 -325
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +429 -321
- 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 -21710
- 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 +19 -20
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +19 -20
- 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/_resp.ts +0 -1
- 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/font.style.ts +7 -66
- 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.style.ts +16 -41
- 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/compilePalette.ts +32 -0
- package/src/css/compileSystem.ts +7 -0
- package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
- package/src/css/compileTheme_v3.ts +434 -0
- 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.style.ts +8 -4
- 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 +11 -0
- package/src/css/index.ts +4 -3
- package/src/css/primitives/_arrow/_arrow.style.ts +6 -8
- package/src/css/primitives/_arrow/_arrow.ts +7 -0
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +24 -25
- 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.style.ts +48 -15
- 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 +4 -7
- 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/token/token.style.ts +37 -36
- package/src/css/primitives/tooltip/tooltip.ts +2 -0
- package/src/css/responsiveRules.ts +12 -19
- package/src/css/scopeClassName.ts +1 -0
- package/src/css/types.ts +115 -15
- package/src/css/util.ts +5 -0
- package/src/css/utils/srOnly/srOnly.ts +1 -0
- package/src/css/varNames.ts +230 -143
- package/src/css/vars.ts +53 -22
- 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 +2 -1
- package/src/theme/v3/color/color.ts +6 -4
- package/src/theme/v3/color/renderColor.ts +4 -1
- package/src/theme/v3/{defaults.ts → defaultTokens.ts} +2 -2
- package/src/theme/v3/index.ts +1 -1
- package/src/theme/v3/resolveTokens.ts +18 -18
- package/src/ui/RootClassNames.tsx +44 -0
- package/src/ui/StyleTags.tsx +3 -1
- package/src/ui/_compat/helpers.ts +72 -0
- package/src/ui/_compat/index.ts +2 -6
- package/src/ui/_compat/studioTheme.ts +7 -0
- 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/_compat/types.ts +0 -83
- 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/index.ts +1 -0
- 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 +63 -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 +29 -26
- package/src/ui/primitives/popover/popover.tsx +293 -271
- package/src/ui/primitives/popover/popoverCard.tsx +122 -120
- 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 +30 -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 +85 -61
- 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 +43 -25
- 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 +43 -19
- 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 +69 -50
- package/src/css/compile/compilePalette.ts +0 -27
- 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 -10
- package/src/css/compile/compileTheme_v3.ts +0 -401
- package/src/css/compile/types.ts +0 -6
- package/src/css/components/breadcrumbs/rules.ts +0 -25
- package/src/css/components/dialog/rules.ts +0 -78
- package/src/css/components/skeleton/rules.ts +0 -113
- package/src/css/components/toast/rules.ts +0 -18
- package/src/css/components/tree/rules.ts +0 -168
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/css/primitives/popover/rules.ts +0 -5
- package/src/css/primitives/spinner/rules.ts +0 -21
- package/src/css/primitives/token/rules.ts +0 -45
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/ui/utils/conditionalWrapper/index.ts +0 -1
package/dist/index.d.mts
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,87 @@ 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
|
-
export declare
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1563
|
+
/** @public */
|
|
1564
|
+
export declare type LabelElementType = 'div' | 'label' | 'span' | ComponentType
|
|
1565
|
+
|
|
1566
|
+
/** @public */
|
|
1567
|
+
export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
|
|
1568
|
+
|
|
1569
|
+
/** @public */
|
|
1570
|
+
export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
|
|
1571
|
+
LabelOwnProps,
|
|
1572
|
+
E
|
|
1260
1573
|
>
|
|
1261
1574
|
|
|
1262
1575
|
/**
|
|
1263
1576
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1264
1577
|
* @beta
|
|
1265
1578
|
*/
|
|
1266
|
-
export declare
|
|
1579
|
+
export declare function LabelSkeleton<
|
|
1580
|
+
E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
|
|
1581
|
+
>(props: LabelSkeletonProps<E>): JSX.Element
|
|
1582
|
+
|
|
1583
|
+
export declare namespace LabelSkeleton {
|
|
1584
|
+
var displayName: string
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/** @public */
|
|
1588
|
+
export declare type LabelSkeletonElementType = SkeletonElementType
|
|
1589
|
+
|
|
1590
|
+
/** @beta */
|
|
1591
|
+
export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
|
|
1267
1592
|
size?: ResponsiveProp<FontLabelSize>
|
|
1268
1593
|
}
|
|
1269
1594
|
|
|
1270
1595
|
/**
|
|
1271
|
-
*
|
|
1596
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1597
|
+
* @beta
|
|
1272
1598
|
*/
|
|
1273
|
-
export declare
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1599
|
+
export declare type LabelSkeletonProps<
|
|
1600
|
+
E extends LabelSkeletonElementType = LabelSkeletonElementType,
|
|
1601
|
+
> = Props<LabelSkeletonOwnProps, E>
|
|
1602
|
+
|
|
1603
|
+
/** @public */
|
|
1604
|
+
export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
|
|
1605
|
+
props: LayerProps<E>,
|
|
1606
|
+
): JSX.Element
|
|
1607
|
+
|
|
1608
|
+
export declare namespace Layer {
|
|
1609
|
+
var displayName: string
|
|
1610
|
+
}
|
|
1278
1611
|
|
|
1279
1612
|
/** @public */
|
|
1280
1613
|
export declare interface LayerContextValue {
|
|
@@ -1286,40 +1619,35 @@ export declare interface LayerContextValue {
|
|
|
1286
1619
|
zIndex: number
|
|
1287
1620
|
}
|
|
1288
1621
|
|
|
1289
|
-
/**
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1622
|
+
/** @public */
|
|
1623
|
+
export declare type LayerElementType = CardElementType
|
|
1624
|
+
|
|
1625
|
+
/** @public */
|
|
1626
|
+
export declare type LayerOwnProps = CardOwnProps & {
|
|
1293
1627
|
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1294
1628
|
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1295
1629
|
zOffset?: number | number[]
|
|
1296
1630
|
}
|
|
1297
1631
|
|
|
1298
|
-
/**
|
|
1299
|
-
|
|
1300
|
-
|
|
1632
|
+
/** @public */
|
|
1633
|
+
export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
|
|
1634
|
+
LayerOwnProps,
|
|
1635
|
+
E
|
|
1636
|
+
>
|
|
1637
|
+
|
|
1638
|
+
/** @public */
|
|
1301
1639
|
export declare function LayerProvider(props: LayerProviderProps): ReactElement
|
|
1302
1640
|
|
|
1303
1641
|
export declare namespace LayerProvider {
|
|
1304
1642
|
var displayName: string
|
|
1305
1643
|
}
|
|
1306
1644
|
|
|
1307
|
-
/**
|
|
1308
|
-
* @public
|
|
1309
|
-
*/
|
|
1645
|
+
/** @public */
|
|
1310
1646
|
export declare interface LayerProviderProps {
|
|
1311
1647
|
children?: ReactNode
|
|
1312
1648
|
zOffset?: number | number[]
|
|
1313
1649
|
}
|
|
1314
1650
|
|
|
1315
|
-
/**
|
|
1316
|
-
* DO NOT USE IN PRODUCTION.
|
|
1317
|
-
* @beta
|
|
1318
|
-
*/
|
|
1319
|
-
export declare interface MediaQueryProps {
|
|
1320
|
-
media?: number[]
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
1651
|
/**
|
|
1324
1652
|
* @internal
|
|
1325
1653
|
*/
|
|
@@ -1333,25 +1661,27 @@ export declare interface _MediaStore {
|
|
|
1333
1661
|
*
|
|
1334
1662
|
* @public
|
|
1335
1663
|
*/
|
|
1336
|
-
export declare
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1664
|
+
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
1665
|
+
props: MenuProps<E>,
|
|
1666
|
+
): JSX.Element
|
|
1667
|
+
|
|
1668
|
+
export declare namespace Menu {
|
|
1669
|
+
var displayName: string
|
|
1670
|
+
}
|
|
1341
1671
|
|
|
1342
1672
|
/**
|
|
1343
1673
|
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1344
1674
|
*
|
|
1345
1675
|
* @public
|
|
1346
1676
|
*/
|
|
1347
|
-
export declare
|
|
1348
|
-
MenuButtonProps & RefAttributes<HTMLButtonElement | null>
|
|
1349
|
-
>
|
|
1677
|
+
export declare function MenuButton(props: MenuButtonProps): JSX.Element
|
|
1350
1678
|
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1679
|
+
export declare namespace MenuButton {
|
|
1680
|
+
var displayName: string
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
/** @public */
|
|
1684
|
+
export declare type MenuButtonProps = {
|
|
1355
1685
|
/**
|
|
1356
1686
|
* @beta Do not use in production.
|
|
1357
1687
|
*/
|
|
@@ -1360,7 +1690,7 @@ export declare interface MenuButtonProps {
|
|
|
1360
1690
|
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1361
1691
|
*/
|
|
1362
1692
|
boundaryElement?: HTMLElement
|
|
1363
|
-
button: ReactElement<
|
|
1693
|
+
button: ReactElement<ButtonProps>
|
|
1364
1694
|
id: string
|
|
1365
1695
|
menu?: ReactElement
|
|
1366
1696
|
onClose?: () => void
|
|
@@ -1387,38 +1717,51 @@ export declare interface MenuButtonProps {
|
|
|
1387
1717
|
* @deprecated Use `popover={{preventOverflow: true}}` instead.
|
|
1388
1718
|
*/
|
|
1389
1719
|
preventOverflow?: boolean
|
|
1720
|
+
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
1390
1721
|
}
|
|
1391
1722
|
|
|
1392
|
-
/**
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1723
|
+
/** @public */
|
|
1724
|
+
export declare function MenuDivider<
|
|
1725
|
+
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1726
|
+
>(props: MenuDividerProps<E>): JSX.Element
|
|
1727
|
+
|
|
1728
|
+
export declare namespace MenuDivider {
|
|
1729
|
+
var displayName: string
|
|
1730
|
+
}
|
|
1400
1731
|
|
|
1401
1732
|
/** @public */
|
|
1402
|
-
export declare
|
|
1733
|
+
export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
1403
1734
|
|
|
1404
|
-
/**
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1735
|
+
/** @public */
|
|
1736
|
+
export declare type MenuDividerOwnProps = {}
|
|
1737
|
+
|
|
1738
|
+
/** @public */
|
|
1739
|
+
export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
|
|
1740
|
+
Props<MenuDividerOwnProps, E>
|
|
1741
|
+
|
|
1742
|
+
/** @public */
|
|
1743
|
+
export declare type MenuElementType = 'div' | 'span' | ComponentType
|
|
1744
|
+
|
|
1745
|
+
/** @public */
|
|
1746
|
+
export declare function MenuGroup<
|
|
1747
|
+
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
1748
|
+
>(props: MenuGroupProps<E>): JSX.Element
|
|
1408
1749
|
|
|
1409
1750
|
export declare namespace MenuGroup {
|
|
1410
1751
|
var displayName: string
|
|
1411
1752
|
}
|
|
1412
1753
|
|
|
1413
|
-
/**
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1754
|
+
/** @public */
|
|
1755
|
+
export declare type MenuGroupElementType = 'button' | ComponentType
|
|
1756
|
+
|
|
1757
|
+
/** @public */
|
|
1758
|
+
export declare type MenuGroupOwnProps = RadiusStyleProps & {
|
|
1417
1759
|
disabled?: boolean
|
|
1418
1760
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
1419
|
-
|
|
1761
|
+
gap?: ResponsiveProp<Space>
|
|
1762
|
+
icon?: ElementType_2 | ReactNode
|
|
1420
1763
|
menu?: Omit<
|
|
1421
|
-
MenuProps
|
|
1764
|
+
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1422
1765
|
| 'onClickOutside'
|
|
1423
1766
|
| 'onEscape'
|
|
1424
1767
|
| 'onItemClick'
|
|
@@ -1430,43 +1773,55 @@ export declare interface MenuGroupProps extends GapStyleProps {
|
|
|
1430
1773
|
>
|
|
1431
1774
|
padding?: ResponsiveProp<Space>
|
|
1432
1775
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1433
|
-
radius?: Radius | Radius[]
|
|
1434
1776
|
/** @deprecated Use `gap` instead. */
|
|
1435
1777
|
space?: ResponsiveProp<Space>
|
|
1436
|
-
text
|
|
1437
|
-
tone?:
|
|
1778
|
+
text?: ReactNode
|
|
1779
|
+
tone?: ThemeColorStateToneKey
|
|
1438
1780
|
}
|
|
1439
1781
|
|
|
1440
|
-
/**
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuItemProps> &
|
|
1445
|
-
MenuItemProps &
|
|
1446
|
-
RefAttributes<HTMLDivElement>
|
|
1782
|
+
/** @public */
|
|
1783
|
+
export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
|
|
1784
|
+
MenuGroupOwnProps,
|
|
1785
|
+
E
|
|
1447
1786
|
>
|
|
1448
1787
|
|
|
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
|
|
1788
|
+
/** @public */
|
|
1789
|
+
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
1790
|
+
props: MenuItemProps<E>,
|
|
1791
|
+
): JSX.Element
|
|
1792
|
+
|
|
1793
|
+
export declare namespace MenuItem {
|
|
1794
|
+
var displayName: string
|
|
1464
1795
|
}
|
|
1465
1796
|
|
|
1466
|
-
/**
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1797
|
+
/** @public */
|
|
1798
|
+
export declare type MenuItemElementType = 'button' | 'a' | ComponentType
|
|
1799
|
+
|
|
1800
|
+
/** @public */
|
|
1801
|
+
export declare type MenuItemOwnProps = GapStyleProps &
|
|
1802
|
+
PaddingStyleProps &
|
|
1803
|
+
RadiusStyleProps & {
|
|
1804
|
+
disabled?: boolean
|
|
1805
|
+
fontSize?: number | number[]
|
|
1806
|
+
hotkeys?: string[]
|
|
1807
|
+
icon?: ElementType_2 | ReactNode
|
|
1808
|
+
iconRight?: ElementType_2 | ReactNode
|
|
1809
|
+
pressed?: boolean
|
|
1810
|
+
selected?: boolean
|
|
1811
|
+
/** @deprecated Use `gap` instead. */
|
|
1812
|
+
space?: ResponsiveProp<Space>
|
|
1813
|
+
text?: ReactNode
|
|
1814
|
+
tone?: ThemeColorStateToneKey
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/** @public */
|
|
1818
|
+
export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
|
|
1819
|
+
Props<MenuItemOwnProps, E>,
|
|
1820
|
+
'role'
|
|
1821
|
+
>
|
|
1822
|
+
|
|
1823
|
+
/** @public */
|
|
1824
|
+
export declare type MenuOwnProps = PaddingStyleProps & {
|
|
1470
1825
|
/**
|
|
1471
1826
|
* @deprecated Use `shouldFocus="first"` instead.
|
|
1472
1827
|
*/
|
|
@@ -1475,6 +1830,7 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1475
1830
|
* @deprecated Use `shouldFocus="last"` instead.
|
|
1476
1831
|
*/
|
|
1477
1832
|
'focusLast'?: boolean
|
|
1833
|
+
'gap'?: ResponsiveProp<Space>
|
|
1478
1834
|
'onClickOutside'?: (event: MouseEvent) => void
|
|
1479
1835
|
'onEscape'?: () => void
|
|
1480
1836
|
'onItemClick'?: () => void
|
|
@@ -1487,6 +1843,9 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1487
1843
|
'aria-labelledby'?: string
|
|
1488
1844
|
}
|
|
1489
1845
|
|
|
1846
|
+
/** @public */
|
|
1847
|
+
export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
|
|
1848
|
+
|
|
1490
1849
|
/**
|
|
1491
1850
|
* @public
|
|
1492
1851
|
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
@@ -1520,20 +1879,21 @@ export declare type Placement =
|
|
|
1520
1879
|
| 'left-start'
|
|
1521
1880
|
| 'left-end'
|
|
1522
1881
|
|
|
1523
|
-
export declare interface PolymorphicProps {
|
|
1524
|
-
as?: ElementType
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
1882
|
/**
|
|
1528
1883
|
* The `Popover` component is used to display some content on top of another.
|
|
1529
1884
|
*
|
|
1530
1885
|
* @public
|
|
1531
1886
|
*/
|
|
1532
|
-
export declare
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1887
|
+
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
1888
|
+
props: PopoverProps<E>,
|
|
1889
|
+
): JSX.Element
|
|
1890
|
+
|
|
1891
|
+
export declare namespace Popover {
|
|
1892
|
+
var displayName: string
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
/** @public */
|
|
1896
|
+
export declare type PopoverElementType = 'div' | ComponentType
|
|
1537
1897
|
|
|
1538
1898
|
/**
|
|
1539
1899
|
* @beta
|
|
@@ -1541,7 +1901,7 @@ export declare const Popover: NamedExoticComponent<
|
|
|
1541
1901
|
export declare type PopoverMargins = [number, number, number, number]
|
|
1542
1902
|
|
|
1543
1903
|
/** @public */
|
|
1544
|
-
export declare
|
|
1904
|
+
export declare type PopoverOwnProps = LayerOwnProps & {
|
|
1545
1905
|
/** @beta */
|
|
1546
1906
|
__unstable_margins?: PopoverMargins
|
|
1547
1907
|
/**
|
|
@@ -1601,29 +1961,29 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1601
1961
|
*/
|
|
1602
1962
|
referenceElement?: HTMLElement | null
|
|
1603
1963
|
/** @beta */
|
|
1604
|
-
updateRef?:
|
|
1605
|
-
| MutableRefObject<PopoverUpdateCallback | undefined>
|
|
1606
|
-
| RefCallback<PopoverUpdateCallback | undefined>
|
|
1964
|
+
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1607
1965
|
}
|
|
1608
1966
|
|
|
1967
|
+
/** @public */
|
|
1968
|
+
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1969
|
+
PopoverOwnProps,
|
|
1970
|
+
E
|
|
1971
|
+
>
|
|
1972
|
+
|
|
1609
1973
|
/** @beta */
|
|
1610
1974
|
export declare type PopoverUpdateCallback = () => void
|
|
1611
1975
|
|
|
1612
1976
|
/** @public */
|
|
1613
1977
|
export declare type PopoverWidth = number | 'auto'
|
|
1614
1978
|
|
|
1615
|
-
/**
|
|
1616
|
-
* @public
|
|
1617
|
-
*/
|
|
1979
|
+
/** @public */
|
|
1618
1980
|
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
1619
1981
|
|
|
1620
1982
|
export declare namespace Portal {
|
|
1621
1983
|
var displayName: string
|
|
1622
1984
|
}
|
|
1623
1985
|
|
|
1624
|
-
/**
|
|
1625
|
-
* @public
|
|
1626
|
-
*/
|
|
1986
|
+
/** @public */
|
|
1627
1987
|
export declare interface PortalContextValue {
|
|
1628
1988
|
version: 0.0
|
|
1629
1989
|
boundaryElement: HTMLElement | null
|
|
@@ -1631,9 +1991,7 @@ export declare interface PortalContextValue {
|
|
|
1631
1991
|
elements?: Record<string, HTMLElement | null | undefined>
|
|
1632
1992
|
}
|
|
1633
1993
|
|
|
1634
|
-
/**
|
|
1635
|
-
* @public
|
|
1636
|
-
*/
|
|
1994
|
+
/** @public */
|
|
1637
1995
|
export declare interface PortalProps {
|
|
1638
1996
|
children: ReactNode
|
|
1639
1997
|
/**
|
|
@@ -1642,18 +2000,14 @@ export declare interface PortalProps {
|
|
|
1642
2000
|
__unstable_name?: string
|
|
1643
2001
|
}
|
|
1644
2002
|
|
|
1645
|
-
/**
|
|
1646
|
-
* @public
|
|
1647
|
-
*/
|
|
2003
|
+
/** @public */
|
|
1648
2004
|
export declare function PortalProvider(props: PortalProviderProps): ReactElement
|
|
1649
2005
|
|
|
1650
2006
|
export declare namespace PortalProvider {
|
|
1651
2007
|
var displayName: string
|
|
1652
2008
|
}
|
|
1653
2009
|
|
|
1654
|
-
/**
|
|
1655
|
-
* @public
|
|
1656
|
-
*/
|
|
2010
|
+
/** @public */
|
|
1657
2011
|
export declare interface PortalProviderProps {
|
|
1658
2012
|
/**
|
|
1659
2013
|
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
@@ -1668,9 +2022,11 @@ export declare interface PortalProviderProps {
|
|
|
1668
2022
|
}
|
|
1669
2023
|
|
|
1670
2024
|
/** @public */
|
|
1671
|
-
export declare type Props<P extends
|
|
1672
|
-
|
|
1673
|
-
P
|
|
2025
|
+
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
2026
|
+
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
2027
|
+
P & {
|
|
2028
|
+
as?: E
|
|
2029
|
+
}
|
|
1674
2030
|
>
|
|
1675
2031
|
|
|
1676
2032
|
export {px}
|
|
@@ -1680,19 +2036,28 @@ export {px}
|
|
|
1680
2036
|
*
|
|
1681
2037
|
* @public
|
|
1682
2038
|
*/
|
|
1683
|
-
export declare
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
RefAttributes<HTMLInputElement>
|
|
1687
|
-
>
|
|
2039
|
+
export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
|
|
2040
|
+
props: RadioProps<E>,
|
|
2041
|
+
): JSX.Element
|
|
1688
2042
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
2043
|
+
export declare namespace Radio {
|
|
2044
|
+
var displayName: string
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
/** @public */
|
|
2048
|
+
export declare type RadioElementType = 'input' | ComponentType
|
|
2049
|
+
|
|
2050
|
+
/** @public */
|
|
2051
|
+
export declare type RadioOwnProps = {
|
|
1693
2052
|
customValidity?: string
|
|
1694
2053
|
}
|
|
1695
2054
|
|
|
2055
|
+
/** @public */
|
|
2056
|
+
export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
|
|
2057
|
+
RadioOwnProps,
|
|
2058
|
+
E
|
|
2059
|
+
>
|
|
2060
|
+
|
|
1696
2061
|
export {Radius}
|
|
1697
2062
|
|
|
1698
2063
|
/**
|
|
@@ -1724,6 +2089,7 @@ export declare function _responsive<T>(
|
|
|
1724
2089
|
|
|
1725
2090
|
/**
|
|
1726
2091
|
* @internal
|
|
2092
|
+
* @deprecated This will be removed in next major version.
|
|
1727
2093
|
*/
|
|
1728
2094
|
export declare interface ResponsiveAvatarSizeStyleProps {
|
|
1729
2095
|
$size: AvatarSize[]
|
|
@@ -1883,6 +2249,13 @@ export declare const rgbToHex: typeof rgbToHex_2
|
|
|
1883
2249
|
*/
|
|
1884
2250
|
export declare const rgbToHsl: typeof rgbToHsl_2
|
|
1885
2251
|
|
|
2252
|
+
/** @internal */
|
|
2253
|
+
export declare function RootClassNames(props: {element: HTMLElement}): null
|
|
2254
|
+
|
|
2255
|
+
export declare namespace RootClassNames {
|
|
2256
|
+
var displayName: string
|
|
2257
|
+
}
|
|
2258
|
+
|
|
1886
2259
|
/**
|
|
1887
2260
|
* @public
|
|
1888
2261
|
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
@@ -1901,11 +2274,16 @@ export {screen_2 as screen}
|
|
|
1901
2274
|
*
|
|
1902
2275
|
* @public
|
|
1903
2276
|
*/
|
|
1904
|
-
export declare
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
2277
|
+
export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
|
|
2278
|
+
props: SelectProps<E>,
|
|
2279
|
+
): JSX.Element
|
|
2280
|
+
|
|
2281
|
+
export declare namespace Select {
|
|
2282
|
+
var displayName: string
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
/** @internal */
|
|
2286
|
+
declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1909
2287
|
|
|
1910
2288
|
/**
|
|
1911
2289
|
* @public
|
|
@@ -1913,100 +2291,139 @@ export declare const Select: ForwardRefExoticComponent<
|
|
|
1913
2291
|
*/
|
|
1914
2292
|
export declare type SelectableTone = ThemeColorStateToneKey
|
|
1915
2293
|
|
|
1916
|
-
/**
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
2294
|
+
/** @public */
|
|
2295
|
+
export declare type SelectElementType = 'select' | ComponentType
|
|
2296
|
+
|
|
2297
|
+
/** @public */
|
|
2298
|
+
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1920
2299
|
customValidity?: string
|
|
1921
2300
|
readOnly?: boolean
|
|
1922
2301
|
/** @deprecated Use `gap` instead. */
|
|
1923
2302
|
space?: ResponsiveProp<Space>
|
|
1924
2303
|
}
|
|
1925
2304
|
|
|
2305
|
+
/** @public */
|
|
2306
|
+
export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
|
|
2307
|
+
SelectOwnProps,
|
|
2308
|
+
E
|
|
2309
|
+
>
|
|
2310
|
+
|
|
1926
2311
|
/**
|
|
1927
2312
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1928
2313
|
* @beta
|
|
1929
2314
|
*/
|
|
1930
|
-
export declare
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2315
|
+
export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
|
|
2316
|
+
props: SkeletonProps<E>,
|
|
2317
|
+
): JSX.Element
|
|
2318
|
+
|
|
2319
|
+
export declare namespace Skeleton {
|
|
2320
|
+
var displayName: string
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
/** @beta */
|
|
2324
|
+
export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
1935
2325
|
|
|
1936
2326
|
/**
|
|
1937
2327
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1938
2328
|
* @beta
|
|
1939
2329
|
*/
|
|
1940
|
-
export declare
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
2330
|
+
export declare type SkeletonOwnProps = BoxOwnProps &
|
|
2331
|
+
SkeletonStyleProps & {
|
|
2332
|
+
animated?: boolean
|
|
2333
|
+
delay?: number
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
/** @beta */
|
|
2337
|
+
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
2338
|
+
SkeletonOwnProps,
|
|
2339
|
+
E
|
|
2340
|
+
>
|
|
1944
2341
|
|
|
1945
2342
|
/**
|
|
1946
2343
|
* Indicate that something is loading for an indeterminate amount of time.
|
|
1947
2344
|
*
|
|
1948
2345
|
* @public
|
|
1949
2346
|
*/
|
|
1950
|
-
export declare
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
RefAttributes<HTMLDivElement>
|
|
1954
|
-
>
|
|
2347
|
+
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
2348
|
+
props: SpinnerProps<E>,
|
|
2349
|
+
): JSX.Element
|
|
1955
2350
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2351
|
+
export declare namespace Spinner {
|
|
2352
|
+
var displayName: string
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
/** @public */
|
|
2356
|
+
export declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
2357
|
+
|
|
2358
|
+
/** @public */
|
|
2359
|
+
export declare type SpinnerOwnProps = {
|
|
1960
2360
|
muted?: boolean
|
|
1961
2361
|
size?: ResponsiveProp<FontTextSize>
|
|
1962
2362
|
}
|
|
1963
2363
|
|
|
1964
|
-
/**
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'children'> &
|
|
1969
|
-
SrOnlyProps &
|
|
1970
|
-
RefAttributes<HTMLDivElement>
|
|
2364
|
+
/** @public */
|
|
2365
|
+
export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
|
|
2366
|
+
SpinnerOwnProps,
|
|
2367
|
+
E
|
|
1971
2368
|
>
|
|
1972
2369
|
|
|
1973
|
-
/**
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
2370
|
+
/** @public */
|
|
2371
|
+
export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
|
|
2372
|
+
props: SrOnlyProps<E>,
|
|
2373
|
+
): JSX.Element
|
|
2374
|
+
|
|
2375
|
+
export declare namespace SrOnly {
|
|
2376
|
+
var displayName: string
|
|
1978
2377
|
}
|
|
1979
2378
|
|
|
2379
|
+
/** @public */
|
|
2380
|
+
export declare type SrOnlyElementType = 'span' | ComponentType
|
|
2381
|
+
|
|
2382
|
+
/** @public */
|
|
2383
|
+
export declare type SrOnlyOwnProps = {}
|
|
2384
|
+
|
|
2385
|
+
/** @public */
|
|
2386
|
+
export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
|
|
2387
|
+
SrOnlyOwnProps,
|
|
2388
|
+
E
|
|
2389
|
+
>
|
|
2390
|
+
|
|
1980
2391
|
/**
|
|
1981
2392
|
* The `Stack` component is used to place elements on top of each other.
|
|
1982
2393
|
*
|
|
1983
2394
|
* @public
|
|
1984
2395
|
*/
|
|
1985
|
-
export declare
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
RefAttributes<HTMLDivElement>
|
|
1989
|
-
>
|
|
2396
|
+
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
2397
|
+
props: StackProps<E>,
|
|
2398
|
+
): JSX.Element
|
|
1990
2399
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2400
|
+
export declare namespace Stack {
|
|
2401
|
+
var displayName: string
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
/** @public */
|
|
2405
|
+
export declare type StackElementType = BoxElementType
|
|
2406
|
+
|
|
2407
|
+
/** @public */
|
|
2408
|
+
export declare type StackOwnProps = Omit<
|
|
2409
|
+
BoxOwnProps,
|
|
2410
|
+
'align' | 'columns' | 'direction' | 'display' | 'gapX' | 'gapY' | 'justify'
|
|
2411
|
+
> & {
|
|
1999
2412
|
/** @deprecated Use `gap` instead. */
|
|
2000
2413
|
space?: ResponsiveProp<Space>
|
|
2001
2414
|
}
|
|
2002
2415
|
|
|
2416
|
+
/** @public */
|
|
2417
|
+
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
2418
|
+
StackOwnProps,
|
|
2419
|
+
E
|
|
2420
|
+
>
|
|
2421
|
+
|
|
2003
2422
|
/**
|
|
2004
2423
|
* @public
|
|
2005
2424
|
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
2006
2425
|
*/
|
|
2007
|
-
export declare const studioTheme:
|
|
2008
|
-
readonly value: RootTheme_2
|
|
2009
|
-
}
|
|
2426
|
+
export declare const studioTheme: RootTheme_2
|
|
2010
2427
|
|
|
2011
2428
|
/**
|
|
2012
2429
|
* @public
|
|
@@ -2014,8 +2431,13 @@ export declare const studioTheme: {
|
|
|
2014
2431
|
*/
|
|
2015
2432
|
export declare type Styles = ThemeStyles
|
|
2016
2433
|
|
|
2434
|
+
/** @beta */
|
|
2017
2435
|
export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
|
|
2018
2436
|
|
|
2437
|
+
export declare namespace StyleTags {
|
|
2438
|
+
var displayName: string
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2019
2441
|
/**
|
|
2020
2442
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
2021
2443
|
*
|
|
@@ -2023,83 +2445,78 @@ export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
|
|
|
2023
2445
|
*
|
|
2024
2446
|
* @public
|
|
2025
2447
|
*/
|
|
2026
|
-
export declare
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
RefAttributes<HTMLInputElement>
|
|
2030
|
-
>
|
|
2448
|
+
export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
|
|
2449
|
+
props: SwitchProps<E>,
|
|
2450
|
+
): JSX.Element
|
|
2031
2451
|
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2452
|
+
export declare namespace Switch {
|
|
2453
|
+
var displayName: string
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
/** @public */
|
|
2457
|
+
export declare type SwitchElementType = 'input' | ComponentType
|
|
2458
|
+
|
|
2459
|
+
/** @public */
|
|
2460
|
+
export declare type SwitchOwnProps = {
|
|
2036
2461
|
indeterminate?: boolean
|
|
2037
2462
|
}
|
|
2038
2463
|
|
|
2039
|
-
/**
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof TabProps> &
|
|
2044
|
-
TabProps &
|
|
2045
|
-
RefAttributes<HTMLButtonElement>
|
|
2464
|
+
/** @public */
|
|
2465
|
+
export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
|
|
2466
|
+
SwitchOwnProps,
|
|
2467
|
+
E
|
|
2046
2468
|
>
|
|
2047
2469
|
|
|
2048
|
-
/**
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabListProps> &
|
|
2053
|
-
TabListProps &
|
|
2054
|
-
RefAttributes<HTMLDivElement>
|
|
2055
|
-
>
|
|
2470
|
+
/** @public */
|
|
2471
|
+
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
2472
|
+
props: TabProps<E>,
|
|
2473
|
+
): JSX.Element
|
|
2056
2474
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2475
|
+
export declare namespace Tab {
|
|
2476
|
+
var displayName: string
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
/** @public */
|
|
2480
|
+
export declare type TabElementType = 'button' | ComponentType
|
|
2481
|
+
|
|
2482
|
+
/** @public */
|
|
2483
|
+
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
2484
|
+
props: TabListProps<E>,
|
|
2485
|
+
): JSX.Element
|
|
2486
|
+
|
|
2487
|
+
export declare namespace TabList {
|
|
2488
|
+
var displayName: string
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
/** @public */
|
|
2060
2492
|
export declare type TabListChild =
|
|
2061
2493
|
| ReactElement<Props<TabProps, 'button'>>
|
|
2062
2494
|
| null
|
|
2063
2495
|
| undefined
|
|
2064
2496
|
| false
|
|
2065
2497
|
|
|
2066
|
-
/**
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2498
|
+
/** @public */
|
|
2499
|
+
export declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
2500
|
+
|
|
2501
|
+
/** @public */
|
|
2502
|
+
export declare type TabListOwnProps = Omit<InlineOwnProps, 'as' | 'height'> & {
|
|
2070
2503
|
children: TabListChild[]
|
|
2071
2504
|
}
|
|
2072
2505
|
|
|
2073
|
-
/**
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
TabPanelProps &
|
|
2079
|
-
RefAttributes<HTMLDivElement>
|
|
2080
|
-
>
|
|
2081
|
-
|
|
2082
|
-
/**
|
|
2083
|
-
* @public
|
|
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
|
-
}
|
|
2506
|
+
/** @public */
|
|
2507
|
+
export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
|
|
2508
|
+
TabListOwnProps,
|
|
2509
|
+
E
|
|
2510
|
+
>
|
|
2092
2511
|
|
|
2093
|
-
/**
|
|
2094
|
-
|
|
2095
|
-
*/
|
|
2096
|
-
export declare interface TabProps {
|
|
2512
|
+
/** @public */
|
|
2513
|
+
export declare type TabOwnProps = {
|
|
2097
2514
|
/**
|
|
2098
2515
|
* The `id` of the corresponding `TabPanel` component.
|
|
2099
2516
|
*/
|
|
2100
2517
|
'aria-controls': string
|
|
2101
2518
|
'id': string
|
|
2102
|
-
'icon'?:
|
|
2519
|
+
'icon'?: ElementType_2 | ReactNode
|
|
2103
2520
|
'focused'?: boolean
|
|
2104
2521
|
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
2105
2522
|
'label'?: ReactNode
|
|
@@ -2108,16 +2525,51 @@ export declare interface TabProps {
|
|
|
2108
2525
|
'tone'?: ButtonTone
|
|
2109
2526
|
}
|
|
2110
2527
|
|
|
2528
|
+
/** @public */
|
|
2529
|
+
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
2530
|
+
props: TabPanelProps<E>,
|
|
2531
|
+
): JSX.Element
|
|
2532
|
+
|
|
2533
|
+
export declare namespace TabPanel {
|
|
2534
|
+
var displayName: string
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
/** @public */
|
|
2538
|
+
export declare type TabPanelElementType = 'div' | 'span' | ComponentType
|
|
2539
|
+
|
|
2540
|
+
/** @public */
|
|
2541
|
+
export declare type TabPanelOwnProps = BoxOwnProps & {
|
|
2542
|
+
/**
|
|
2543
|
+
* The `id` of the correlating `Tab` component.
|
|
2544
|
+
*/
|
|
2545
|
+
'aria-labelledby': string
|
|
2546
|
+
'id': string
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
/** @public */
|
|
2550
|
+
export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
|
|
2551
|
+
TabPanelOwnProps,
|
|
2552
|
+
E
|
|
2553
|
+
>
|
|
2554
|
+
|
|
2555
|
+
/** @public */
|
|
2556
|
+
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
2557
|
+
|
|
2558
|
+
/** @public */
|
|
2559
|
+
export declare type TagType = keyof JSX.IntrinsicElements
|
|
2560
|
+
|
|
2111
2561
|
/**
|
|
2112
2562
|
* The `Text` component is an agile, themed typographic element.
|
|
2113
2563
|
*
|
|
2114
2564
|
* @public
|
|
2115
2565
|
*/
|
|
2116
|
-
declare
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2566
|
+
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
2567
|
+
props: TextProps<E>,
|
|
2568
|
+
): JSX.Element
|
|
2569
|
+
|
|
2570
|
+
declare namespace Text_2 {
|
|
2571
|
+
var displayName: string
|
|
2572
|
+
}
|
|
2121
2573
|
export {Text_2 as Text}
|
|
2122
2574
|
|
|
2123
2575
|
export {TextAlign}
|
|
@@ -2127,16 +2579,19 @@ export {TextAlign}
|
|
|
2127
2579
|
*
|
|
2128
2580
|
* @public
|
|
2129
2581
|
*/
|
|
2130
|
-
export declare
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
RefAttributes<HTMLTextAreaElement>
|
|
2134
|
-
>
|
|
2582
|
+
export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
|
|
2583
|
+
props: TextAreaProps<E>,
|
|
2584
|
+
): JSX.Element
|
|
2135
2585
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2586
|
+
export declare namespace TextArea {
|
|
2587
|
+
var displayName: string
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
/** @public */
|
|
2591
|
+
export declare type TextAreaElementType = 'textarea' | ComponentType
|
|
2592
|
+
|
|
2593
|
+
/** @public */
|
|
2594
|
+
export declare type TextAreaOwnProps = TextAreaStyleProps & {
|
|
2140
2595
|
/**
|
|
2141
2596
|
* @beta
|
|
2142
2597
|
*/
|
|
@@ -2147,29 +2602,39 @@ export declare interface TextAreaProps extends TextAreaStyleProps {
|
|
|
2147
2602
|
weight?: ThemeFontWeightKey_2
|
|
2148
2603
|
}
|
|
2149
2604
|
|
|
2605
|
+
/** @public */
|
|
2606
|
+
export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
|
|
2607
|
+
TextAreaOwnProps,
|
|
2608
|
+
E
|
|
2609
|
+
>
|
|
2610
|
+
|
|
2611
|
+
/** @public */
|
|
2612
|
+
export declare type TextElementType = 'div' | 'label' | 'li' | 'span' | ComponentType
|
|
2613
|
+
|
|
2150
2614
|
/**
|
|
2151
2615
|
* Single line text input.
|
|
2152
2616
|
*
|
|
2153
2617
|
* @public
|
|
2154
2618
|
*/
|
|
2155
|
-
export declare
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
RefAttributes<HTMLInputElement>
|
|
2159
|
-
>
|
|
2619
|
+
export declare function TextInput<
|
|
2620
|
+
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
2621
|
+
>(props: TextInputProps<E>): JSX.Element
|
|
2160
2622
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2623
|
+
export declare namespace TextInput {
|
|
2624
|
+
var displayName: string
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
/** @public */
|
|
2164
2628
|
export declare type TextInputClearButtonProps = Omit<
|
|
2165
|
-
|
|
2629
|
+
ButtonProps<'button'>,
|
|
2166
2630
|
'as' | 'onClick' | 'onMouseDown'
|
|
2167
2631
|
>
|
|
2168
2632
|
|
|
2169
|
-
/**
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2633
|
+
/** @public */
|
|
2634
|
+
export declare type TextInputElementType = 'input' | ComponentType
|
|
2635
|
+
|
|
2636
|
+
/** @public */
|
|
2637
|
+
export declare type TextInputOwnProps = InputStyleProps & {
|
|
2173
2638
|
/**
|
|
2174
2639
|
* @beta
|
|
2175
2640
|
*/
|
|
@@ -2179,8 +2644,8 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2179
2644
|
*/
|
|
2180
2645
|
clearButton?: boolean | TextInputClearButtonProps
|
|
2181
2646
|
customValidity?: string
|
|
2182
|
-
icon?:
|
|
2183
|
-
iconRight?:
|
|
2647
|
+
icon?: ElementType_2 | ReactNode
|
|
2648
|
+
iconRight?: ElementType_2 | ReactNode
|
|
2184
2649
|
/**
|
|
2185
2650
|
* @beta
|
|
2186
2651
|
*/
|
|
@@ -2189,52 +2654,47 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2189
2654
|
/** @deprecated Use `gap` instead. */
|
|
2190
2655
|
space?: ResponsiveProp<Space>
|
|
2191
2656
|
suffix?: ReactNode
|
|
2192
|
-
type?: TextInputType
|
|
2193
2657
|
weight?: ThemeFontWeightKey_2
|
|
2194
2658
|
}
|
|
2195
2659
|
|
|
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'
|
|
2660
|
+
/** @public */
|
|
2661
|
+
export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
|
|
2662
|
+
TextInputOwnProps,
|
|
2663
|
+
E
|
|
2664
|
+
>
|
|
2213
2665
|
|
|
2214
|
-
/**
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
}
|
|
2666
|
+
/** @public */
|
|
2667
|
+
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2668
|
+
|
|
2669
|
+
/** @public */
|
|
2670
|
+
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2220
2671
|
|
|
2221
2672
|
/**
|
|
2222
2673
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2223
2674
|
* @beta
|
|
2224
2675
|
*/
|
|
2225
|
-
export declare
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2676
|
+
export declare function TextSkeleton<
|
|
2677
|
+
E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
|
|
2678
|
+
>(props: TextSkeletonProps<E>): JSX.Element
|
|
2679
|
+
|
|
2680
|
+
export declare namespace TextSkeleton {
|
|
2681
|
+
var displayName: string
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
/** @public */
|
|
2685
|
+
export declare type TextSkeletonElementType = SkeletonElementType
|
|
2686
|
+
|
|
2687
|
+
/** @beta */
|
|
2688
|
+
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2689
|
+
size?: ResponsiveProp<FontTextSize>
|
|
2690
|
+
}
|
|
2230
2691
|
|
|
2231
2692
|
/**
|
|
2232
2693
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2233
2694
|
* @beta
|
|
2234
2695
|
*/
|
|
2235
|
-
export declare
|
|
2236
|
-
|
|
2237
|
-
}
|
|
2696
|
+
export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
|
|
2697
|
+
Props<TextSkeletonOwnProps, E>
|
|
2238
2698
|
|
|
2239
2699
|
/**
|
|
2240
2700
|
* @public
|
|
@@ -2282,18 +2742,14 @@ export {ThemeColorMutedTone}
|
|
|
2282
2742
|
|
|
2283
2743
|
export {ThemeColorName}
|
|
2284
2744
|
|
|
2285
|
-
/**
|
|
2286
|
-
* @public
|
|
2287
|
-
*/
|
|
2745
|
+
/** @public */
|
|
2288
2746
|
export declare function ThemeColorProvider(props: ThemeColorProviderProps): ReactElement
|
|
2289
2747
|
|
|
2290
2748
|
export declare namespace ThemeColorProvider {
|
|
2291
2749
|
var displayName: string
|
|
2292
2750
|
}
|
|
2293
2751
|
|
|
2294
|
-
/**
|
|
2295
|
-
* @public
|
|
2296
|
-
*/
|
|
2752
|
+
/** @public */
|
|
2297
2753
|
export declare interface ThemeColorProviderProps {
|
|
2298
2754
|
children?: ReactNode
|
|
2299
2755
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2332,9 +2788,7 @@ export declare type ThemeColorSyntax = ThemeColorSyntax_2
|
|
|
2332
2788
|
|
|
2333
2789
|
export {ThemeColorToneKey}
|
|
2334
2790
|
|
|
2335
|
-
/**
|
|
2336
|
-
* @public
|
|
2337
|
-
*/
|
|
2791
|
+
/** @public */
|
|
2338
2792
|
export declare interface ThemeContextValue {
|
|
2339
2793
|
/** @deprecated No longer used */
|
|
2340
2794
|
version: 0.0
|
|
@@ -2387,18 +2841,14 @@ export {ThemeInput}
|
|
|
2387
2841
|
*/
|
|
2388
2842
|
export declare type ThemeLayer = ThemeLayer_2
|
|
2389
2843
|
|
|
2390
|
-
/**
|
|
2391
|
-
* @public
|
|
2392
|
-
*/
|
|
2844
|
+
/** @public */
|
|
2393
2845
|
export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
|
|
2394
2846
|
|
|
2395
2847
|
export declare namespace ThemeProvider {
|
|
2396
2848
|
var displayName: string
|
|
2397
2849
|
}
|
|
2398
2850
|
|
|
2399
|
-
/**
|
|
2400
|
-
* @public
|
|
2401
|
-
*/
|
|
2851
|
+
/** @public */
|
|
2402
2852
|
export declare interface ThemeProviderProps {
|
|
2403
2853
|
children?: ReactNode
|
|
2404
2854
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2419,20 +2869,15 @@ export declare type ThemeShadow = ThemeShadow_2
|
|
|
2419
2869
|
*
|
|
2420
2870
|
* @public
|
|
2421
2871
|
*/
|
|
2422
|
-
export declare function Toast(
|
|
2423
|
-
props:
|
|
2424
|
-
|
|
2425
|
-
'onDrag' | 'onDragEnd' | 'onDragStart' | 'onAnimationStart'
|
|
2426
|
-
>,
|
|
2427
|
-
): ReactElement
|
|
2872
|
+
export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
|
|
2873
|
+
props: ToastProps<E>,
|
|
2874
|
+
): JSX.Element
|
|
2428
2875
|
|
|
2429
2876
|
export declare namespace Toast {
|
|
2430
2877
|
var displayName: string
|
|
2431
2878
|
}
|
|
2432
2879
|
|
|
2433
|
-
/**
|
|
2434
|
-
* @public
|
|
2435
|
-
*/
|
|
2880
|
+
/** @public */
|
|
2436
2881
|
export declare interface ToastContextValue {
|
|
2437
2882
|
version: 0.0
|
|
2438
2883
|
/**
|
|
@@ -2444,51 +2889,57 @@ export declare interface ToastContextValue {
|
|
|
2444
2889
|
push: (params: ToastParams) => string
|
|
2445
2890
|
}
|
|
2446
2891
|
|
|
2447
|
-
/**
|
|
2448
|
-
|
|
2449
|
-
*/
|
|
2450
|
-
declare interface ToastLayerProps extends GapStyleProps, PaddingStyleProps {
|
|
2451
|
-
children: ReactNode
|
|
2452
|
-
}
|
|
2892
|
+
/** @public */
|
|
2893
|
+
export declare type ToastElementType = 'li' | ComponentType
|
|
2453
2894
|
|
|
2454
|
-
/**
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2895
|
+
/** @internal */
|
|
2896
|
+
declare type ToastLayerElementType = 'ul' | ComponentType
|
|
2897
|
+
|
|
2898
|
+
/** @internal */
|
|
2899
|
+
declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
|
|
2900
|
+
|
|
2901
|
+
/** @internal */
|
|
2902
|
+
declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
|
|
2903
|
+
ToastLayerOwnProps,
|
|
2904
|
+
E
|
|
2905
|
+
>
|
|
2906
|
+
|
|
2907
|
+
/** @public */
|
|
2908
|
+
export declare type ToastOwnProps = RadiusStyleProps & {
|
|
2458
2909
|
closable?: boolean
|
|
2459
2910
|
description?: ReactNode
|
|
2460
|
-
duration?: number
|
|
2461
|
-
id?: string
|
|
2462
2911
|
onClose?: () => void
|
|
2463
2912
|
title?: ReactNode
|
|
2464
2913
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2914
|
+
duration?: number
|
|
2915
|
+
updatedAt?: number
|
|
2465
2916
|
}
|
|
2466
2917
|
|
|
2467
|
-
/**
|
|
2468
|
-
|
|
2469
|
-
*/
|
|
2470
|
-
export declare interface ToastProps extends RadiusStyleProps {
|
|
2918
|
+
/** @public */
|
|
2919
|
+
export declare interface ToastParams {
|
|
2471
2920
|
closable?: boolean
|
|
2472
2921
|
description?: ReactNode
|
|
2922
|
+
duration?: number
|
|
2923
|
+
id?: string
|
|
2473
2924
|
onClose?: () => void
|
|
2474
2925
|
title?: ReactNode
|
|
2475
2926
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2476
|
-
duration?: number
|
|
2477
|
-
updatedAt?: number
|
|
2478
2927
|
}
|
|
2479
2928
|
|
|
2480
|
-
/**
|
|
2481
|
-
|
|
2482
|
-
|
|
2929
|
+
/** @public */
|
|
2930
|
+
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2931
|
+
ToastOwnProps,
|
|
2932
|
+
E
|
|
2933
|
+
>
|
|
2934
|
+
|
|
2935
|
+
/** @public */
|
|
2483
2936
|
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2484
2937
|
|
|
2485
2938
|
export declare namespace ToastProvider {
|
|
2486
2939
|
var displayName: string
|
|
2487
2940
|
}
|
|
2488
2941
|
|
|
2489
|
-
/**
|
|
2490
|
-
* @public
|
|
2491
|
-
*/
|
|
2942
|
+
/** @public */
|
|
2492
2943
|
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2493
2944
|
children?: React.ReactNode
|
|
2494
2945
|
zOffset?: number | number[]
|
|
@@ -2499,11 +2950,13 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
|
|
|
2499
2950
|
*
|
|
2500
2951
|
* @public
|
|
2501
2952
|
*/
|
|
2502
|
-
export declare
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2953
|
+
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
2954
|
+
props: TooltipProps<E>,
|
|
2955
|
+
): JSX.Element
|
|
2956
|
+
|
|
2957
|
+
export declare namespace Tooltip {
|
|
2958
|
+
var displayName: string
|
|
2959
|
+
}
|
|
2507
2960
|
|
|
2508
2961
|
/**
|
|
2509
2962
|
* @beta
|
|
@@ -2551,55 +3004,63 @@ export declare interface TooltipDelayGroupProviderProps {
|
|
|
2551
3004
|
delay: Delay
|
|
2552
3005
|
}
|
|
2553
3006
|
|
|
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
|
-
}
|
|
3007
|
+
/** @public */
|
|
3008
|
+
export declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
3009
|
+
|
|
3010
|
+
/** @public */
|
|
3011
|
+
export declare type TooltipOwnProps = LayerOwnProps &
|
|
3012
|
+
RadiusStyleProps &
|
|
3013
|
+
ShadowStyleProps & {
|
|
3014
|
+
/** @deprecated Use `fallbackPlacements` instead. */
|
|
3015
|
+
allowedAutoPlacements?: Placement[]
|
|
3016
|
+
/**
|
|
3017
|
+
* Whether the tooltip should animate in and out.
|
|
3018
|
+
*
|
|
3019
|
+
* @beta
|
|
3020
|
+
* @defaultValue false
|
|
3021
|
+
*/
|
|
3022
|
+
animate?: boolean
|
|
3023
|
+
arrow?: boolean
|
|
3024
|
+
boundaryElement?: HTMLElement | null
|
|
3025
|
+
children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
|
|
3026
|
+
content?: ReactNode
|
|
3027
|
+
/**
|
|
3028
|
+
* Adds a delay to open or close the tooltip.
|
|
3029
|
+
*
|
|
3030
|
+
* If only a `number` is passed, it will be used for both opening and closing.
|
|
3031
|
+
*
|
|
3032
|
+
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
3033
|
+
*
|
|
3034
|
+
* @public
|
|
3035
|
+
* @defaultValue 0
|
|
3036
|
+
*/
|
|
3037
|
+
delay?: Delay
|
|
3038
|
+
disabled?: boolean
|
|
3039
|
+
fallbackPlacements?: Placement[]
|
|
3040
|
+
placement?: Placement
|
|
3041
|
+
/** Whether or not to render the tooltip in a portal element. */
|
|
3042
|
+
portal?: boolean | string
|
|
3043
|
+
scheme?: ThemeColorSchemeKey_2
|
|
3044
|
+
tone?: ThemeColorCardToneKey
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
/** @public */
|
|
3048
|
+
export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
|
|
3049
|
+
TooltipOwnProps,
|
|
3050
|
+
E
|
|
3051
|
+
>
|
|
2593
3052
|
|
|
2594
3053
|
/**
|
|
2595
3054
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2596
3055
|
* @beta
|
|
2597
3056
|
*/
|
|
2598
|
-
export declare
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
3057
|
+
export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
|
|
3058
|
+
props: TreeProps<E>,
|
|
3059
|
+
): JSX.Element
|
|
3060
|
+
|
|
3061
|
+
export declare namespace Tree {
|
|
3062
|
+
var displayName: string
|
|
3063
|
+
}
|
|
2603
3064
|
|
|
2604
3065
|
/**
|
|
2605
3066
|
* @beta
|
|
@@ -2616,38 +3077,59 @@ export declare interface TreeContextValue {
|
|
|
2616
3077
|
state: TreeState
|
|
2617
3078
|
}
|
|
2618
3079
|
|
|
3080
|
+
/** @beta */
|
|
3081
|
+
export declare type TreeElementType = 'div' | ComponentType
|
|
3082
|
+
|
|
2619
3083
|
/**
|
|
2620
3084
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2621
3085
|
* @beta
|
|
2622
3086
|
*/
|
|
2623
|
-
export declare
|
|
3087
|
+
export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
|
|
3088
|
+
props: TreeItemProps<E>,
|
|
3089
|
+
): JSX.Element
|
|
2624
3090
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
3091
|
+
export declare namespace TreeItem {
|
|
3092
|
+
var displayName: string
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
/** @beta */
|
|
3096
|
+
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
3097
|
+
|
|
3098
|
+
/** @beta */
|
|
3099
|
+
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2629
3100
|
expanded?: boolean
|
|
2630
3101
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
2631
|
-
icon?:
|
|
3102
|
+
icon?: ElementType_2
|
|
2632
3103
|
/**
|
|
2633
3104
|
* Allows passing a custom element type to the link component
|
|
2634
3105
|
*/
|
|
2635
|
-
linkAs?:
|
|
3106
|
+
linkAs?: SelectableElementType
|
|
3107
|
+
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2636
3108
|
padding?: ResponsiveProp<Space>
|
|
2637
3109
|
space?: ResponsiveProp<Space>
|
|
2638
3110
|
text?: ReactNode
|
|
2639
3111
|
weight?: ThemeFontWeightKey_2
|
|
2640
3112
|
}
|
|
2641
3113
|
|
|
3114
|
+
/** @beta */
|
|
3115
|
+
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
3116
|
+
TreeItemOwnProps,
|
|
3117
|
+
E
|
|
3118
|
+
>
|
|
3119
|
+
|
|
2642
3120
|
/**
|
|
2643
3121
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2644
3122
|
* @beta
|
|
2645
3123
|
*/
|
|
2646
|
-
export declare
|
|
3124
|
+
export declare type TreeOwnProps = {
|
|
3125
|
+
gap?: ResponsiveProp<Space>
|
|
2647
3126
|
/** @deprecated Use `gap` instead. */
|
|
2648
3127
|
space?: ResponsiveProp<Space>
|
|
2649
3128
|
}
|
|
2650
3129
|
|
|
3130
|
+
/** @beta */
|
|
3131
|
+
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
3132
|
+
|
|
2651
3133
|
/**
|
|
2652
3134
|
* @beta
|
|
2653
3135
|
*/
|
|
@@ -2667,9 +3149,7 @@ export declare interface TreeState {
|
|
|
2667
3149
|
*/
|
|
2668
3150
|
export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
2669
3151
|
|
|
2670
|
-
/**
|
|
2671
|
-
* @public
|
|
2672
|
-
*/
|
|
3152
|
+
/** @public */
|
|
2673
3153
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2674
3154
|
|
|
2675
3155
|
export declare function useCard(): CardContextValue_2 | null
|
|
@@ -2695,9 +3175,7 @@ export declare function useClickOutside(
|
|
|
2695
3175
|
boundaryElement?: HTMLElement | null,
|
|
2696
3176
|
): (el: HTMLElement | null) => void
|
|
2697
3177
|
|
|
2698
|
-
/**
|
|
2699
|
-
* @public
|
|
2700
|
-
*/
|
|
3178
|
+
/** @public */
|
|
2701
3179
|
export declare function useClickOutsideEvent(
|
|
2702
3180
|
listener: ClickOutsideEventListener | false | undefined,
|
|
2703
3181
|
elementsArg?: () => ClickOutsideEventElements,
|
|
@@ -2753,9 +3231,7 @@ export declare function useForwardedRef<T>(ref: ForwardedRef<T>): MutableRefObje
|
|
|
2753
3231
|
*/
|
|
2754
3232
|
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2755
3233
|
|
|
2756
|
-
/**
|
|
2757
|
-
* @public
|
|
2758
|
-
*/
|
|
3234
|
+
/** @public */
|
|
2759
3235
|
export declare function useLayer(): LayerContextValue
|
|
2760
3236
|
|
|
2761
3237
|
/**
|
|
@@ -2776,9 +3252,7 @@ export declare function useMatchMedia(
|
|
|
2776
3252
|
*/
|
|
2777
3253
|
export declare function useMediaIndex(): number
|
|
2778
3254
|
|
|
2779
|
-
/**
|
|
2780
|
-
* @public
|
|
2781
|
-
*/
|
|
3255
|
+
/** @public */
|
|
2782
3256
|
export declare function usePortal(): PortalContextValue
|
|
2783
3257
|
|
|
2784
3258
|
/**
|
|
@@ -2807,24 +3281,16 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
|
|
|
2807
3281
|
*/
|
|
2808
3282
|
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2809
3283
|
|
|
2810
|
-
/**
|
|
2811
|
-
* @public
|
|
2812
|
-
*/
|
|
3284
|
+
/** @public */
|
|
2813
3285
|
export declare function useRootTheme(): ThemeContextValue
|
|
2814
3286
|
|
|
2815
|
-
/**
|
|
2816
|
-
* @public
|
|
2817
|
-
*/
|
|
3287
|
+
/** @public */
|
|
2818
3288
|
export declare function useTheme(): Theme_2
|
|
2819
3289
|
|
|
2820
|
-
/**
|
|
2821
|
-
* @public
|
|
2822
|
-
*/
|
|
3290
|
+
/** @public */
|
|
2823
3291
|
export declare function useTheme_v2(): Theme_v2
|
|
2824
3292
|
|
|
2825
|
-
/**
|
|
2826
|
-
* @public
|
|
2827
|
-
*/
|
|
3293
|
+
/** @public */
|
|
2828
3294
|
export declare function useToast(): ToastContextValue
|
|
2829
3295
|
|
|
2830
3296
|
/**
|
|
@@ -2840,15 +3306,15 @@ export declare function useTree(): TreeContextValue
|
|
|
2840
3306
|
/**
|
|
2841
3307
|
* @beta
|
|
2842
3308
|
*/
|
|
2843
|
-
export declare
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
RefAttributes<HTMLDivElement>
|
|
2847
|
-
>
|
|
3309
|
+
export declare function VirtualList<
|
|
3310
|
+
E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
3311
|
+
>(props: VirtualListProps<E>): JSX.Element
|
|
2848
3312
|
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
3313
|
+
export declare namespace VirtualList {
|
|
3314
|
+
var displayName: string
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
/** @beta */
|
|
2852
3318
|
export declare interface VirtualListChangeOpts {
|
|
2853
3319
|
fromIndex: number
|
|
2854
3320
|
gap: number
|
|
@@ -2858,15 +3324,20 @@ export declare interface VirtualListChangeOpts {
|
|
|
2858
3324
|
toIndex: number
|
|
2859
3325
|
}
|
|
2860
3326
|
|
|
2861
|
-
/**
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
3327
|
+
/** @beta */
|
|
3328
|
+
export declare type VirtualListElementType = 'div' | ComponentType
|
|
3329
|
+
|
|
3330
|
+
/** @beta */
|
|
3331
|
+
export declare type VirtualListOwnProps<Item = any> = {
|
|
3332
|
+
gap?: Space
|
|
2866
3333
|
getItemKey?: (item: Item, itemIndex: number) => string
|
|
2867
3334
|
items?: Item[]
|
|
2868
3335
|
onChange?: (opts: VirtualListChangeOpts) => void
|
|
2869
3336
|
renderItem?: (item: Item) => ReactNode
|
|
2870
3337
|
}
|
|
2871
3338
|
|
|
3339
|
+
/** @beta */
|
|
3340
|
+
export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
|
|
3341
|
+
Props<VirtualListOwnProps, E>
|
|
3342
|
+
|
|
2872
3343
|
export {}
|