@sanity/ui 4.2.0 → 5.0.0-alpha.10
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/README.md +194 -28
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +79 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +1203 -1469
- package/dist/index.js +2123 -1989
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -547
- package/package.json +57 -58
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +108 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +29 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +122 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +58 -0
- package/src/components/checkbox/Checkbox.tsx +64 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +33 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +44 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +28 -0
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +28 -0
- package/src/components/flex/Flex.tsx +30 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +33 -0
- package/src/components/grid/Grid.tsx +30 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +33 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +17 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +31 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +35 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +31 -0
- package/src/components/index.css +28 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +24 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +100 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +25 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +130 -0
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +16 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +25 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +25 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +19 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +25 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +28 -0
- package/src/components/tooltip/Tooltip.tsx +97 -0
- package/src/components/tooltip/tooltip.css +31 -0
- package/src/components/tooltip/tooltip.props.ts +36 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +17 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +202 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +6 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +76 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +25 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.css +18 -0
- package/src/index.ts +65 -0
- package/src/polyfills.ts +15 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_system-CTe2lb5l.d.ts +0 -40
- package/dist/_system-CTe2lb5l.d.ts.map +0 -1
- package/dist/arrow-BmX6qbAS.js +0 -170
- package/dist/arrow-BmX6qbAS.js.map +0 -1
- package/dist/autocomplete.d.ts +0 -140
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js +0 -470
- package/dist/autocomplete.js.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -18
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs.js +0 -119
- package/dist/breadcrumbs.js.map +0 -1
- package/dist/button-BNyKSDyA.js +0 -180
- package/dist/button-BNyKSDyA.js.map +0 -1
- package/dist/button-dnqMFkWg.d.ts +0 -76
- package/dist/button-dnqMFkWg.d.ts.map +0 -1
- package/dist/card-C0a0wQTc.d.ts +0 -7
- package/dist/card-C0a0wQTc.d.ts.map +0 -1
- package/dist/code.d.ts +0 -20
- package/dist/code.d.ts.map +0 -1
- package/dist/code.js +0 -90
- package/dist/code.js.map +0 -1
- package/dist/codeFontStyle-84SMhFtI.js +0 -11
- package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
- package/dist/component-DVlwaWB-.d.ts +0 -25
- package/dist/component-DVlwaWB-.d.ts.map +0 -1
- package/dist/element-BYgCE_iK.js +0 -51
- package/dist/element-BYgCE_iK.js.map +0 -1
- package/dist/factory-BzXTX8_Q.js +0 -3056
- package/dist/factory-BzXTX8_Q.js.map +0 -1
- package/dist/flex-DmbDG2ks.js +0 -76
- package/dist/flex-DmbDG2ks.js.map +0 -1
- package/dist/font-EtfxKPUz.d.ts +0 -49
- package/dist/font-EtfxKPUz.d.ts.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js +0 -102
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/getScopedTheme-C-sZsyAz.js +0 -267
- package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
- package/dist/getTheme_v2-y09KqtEb.js +0 -487
- package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
- package/dist/grid-6JSgMj1O.js +0 -115
- package/dist/grid-6JSgMj1O.js.map +0 -1
- package/dist/helpers-C8xxXAQC.js +0 -63
- package/dist/helpers-C8xxXAQC.js.map +0 -1
- package/dist/hotkeys-CaHsQlsO.js +0 -168
- package/dist/hotkeys-CaHsQlsO.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/layer-Bl5R3uNR.js +0 -61
- package/dist/layer-Bl5R3uNR.js.map +0 -1
- package/dist/layer-ChlP9Ik6.d.ts +0 -242
- package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
- package/dist/menu.d.ts +0 -146
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js +0 -626
- package/dist/menu.js.map +0 -1
- package/dist/popover-B7-28L8y.js +0 -408
- package/dist/popover-B7-28L8y.js.map +0 -1
- package/dist/popover-CMlQeKn0.d.ts +0 -96
- package/dist/popover-CMlQeKn0.d.ts.map +0 -1
- package/dist/popover.d.ts +0 -2
- package/dist/popover.js +0 -3
- package/dist/refractor-CC48DwHi.js +0 -20
- package/dist/refractor-CC48DwHi.js.map +0 -1
- package/dist/responsiveFont-CilwaORG.js +0 -55
- package/dist/responsiveFont-CilwaORG.js.map +0 -1
- package/dist/rgba-BSYaEUW6.d.ts +0 -846
- package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
- package/dist/selectable-B0GUIL74.d.ts +0 -7
- package/dist/selectable-B0GUIL74.d.ts.map +0 -1
- package/dist/stack-rsNFPq2-.js +0 -112
- package/dist/stack-rsNFPq2-.js.map +0 -1
- package/dist/styles-css.d.ts +0 -2
- package/dist/styles-css.js +0 -4
- package/dist/textInput-pSfQjkmx.js +0 -313
- package/dist/textInput-pSfQjkmx.js.map +0 -1
- package/dist/theme.d.ts +0 -280
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -55
- package/dist/theme.js.map +0 -1
- package/dist/toast.d.ts +0 -73
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -302
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.d.ts +0 -88
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js +0 -435
- package/dist/tooltip.js.map +0 -1
- package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
- package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
- package/dist/useElementSize-BJvbGHq8.js +0 -51
- package/dist/useElementSize-BJvbGHq8.js.map +0 -1
- package/dist/useLayer-D1usxIE0.js +0 -712
- package/dist/useLayer-D1usxIE0.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,1545 +1,1279 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @public
|
|
32
|
-
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
33
|
-
*/
|
|
34
|
-
type RootTheme = RootTheme$1;
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
* @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
|
|
38
|
-
*/
|
|
39
|
-
type Styles = ThemeStyles;
|
|
40
|
-
/**
|
|
41
|
-
* @public
|
|
42
|
-
* @deprecated Use `Theme` from `@sanity/ui/theme` instead.
|
|
43
|
-
*/
|
|
44
|
-
type Theme = Theme$1;
|
|
45
|
-
/**
|
|
46
|
-
* @public
|
|
47
|
-
* @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
|
|
48
|
-
*/
|
|
49
|
-
type ThemeColorButtonModeKey = ThemeColorButtonModeKey$1;
|
|
50
|
-
/**
|
|
51
|
-
* @public
|
|
52
|
-
* @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
|
|
53
|
-
*/
|
|
54
|
-
type ThemeColorSchemeKey = ThemeColorSchemeKey$1;
|
|
55
|
-
/**
|
|
56
|
-
* @public
|
|
57
|
-
* @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
|
|
58
|
-
*/
|
|
59
|
-
type ThemeColorSyntax = ThemeColorSyntax$1;
|
|
60
|
-
/**
|
|
61
|
-
* @public
|
|
62
|
-
* @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
|
|
63
|
-
*/
|
|
64
|
-
type ThemeFont = ThemeFont$1;
|
|
65
|
-
/**
|
|
66
|
-
* @public
|
|
67
|
-
* @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
|
|
68
|
-
*/
|
|
69
|
-
type ThemeFontKey = ThemeFontKey$1;
|
|
70
|
-
/**
|
|
71
|
-
* @public
|
|
72
|
-
* @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
|
|
73
|
-
*/
|
|
74
|
-
type ThemeFontSize = ThemeFontSize$1;
|
|
75
|
-
/**
|
|
76
|
-
* @public
|
|
77
|
-
* @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
|
|
78
|
-
*/
|
|
79
|
-
type ThemeFontWeight = ThemeFontWeight$1;
|
|
80
|
-
/**
|
|
81
|
-
* @public
|
|
82
|
-
* @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
|
|
83
|
-
*/
|
|
84
|
-
type ThemeFontWeightKey = ThemeFontWeightKey$1;
|
|
85
|
-
/**
|
|
86
|
-
* @public
|
|
87
|
-
* @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
|
|
88
|
-
*/
|
|
89
|
-
type ThemeFonts = ThemeFonts$1;
|
|
90
|
-
/**
|
|
91
|
-
* @public
|
|
92
|
-
* @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
|
|
93
|
-
*/
|
|
94
|
-
type ThemeLayer = ThemeLayer$1;
|
|
95
|
-
/**
|
|
96
|
-
* @public
|
|
97
|
-
* @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
|
|
98
|
-
*/
|
|
99
|
-
type ThemeShadow = ThemeShadow$1;
|
|
100
|
-
/**
|
|
101
|
-
* @public
|
|
102
|
-
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
103
|
-
*/
|
|
104
|
-
export declare const createColorTheme: typeof createColorTheme$1;
|
|
105
|
-
/**
|
|
106
|
-
* @public
|
|
107
|
-
* @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
|
|
108
|
-
*/
|
|
109
|
-
export declare const hexToRgb: typeof hexToRgb$1;
|
|
110
|
-
/**
|
|
111
|
-
* @public
|
|
112
|
-
* @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
|
|
113
|
-
*/
|
|
114
|
-
export declare const hslToRgb: typeof hslToRgb$1;
|
|
115
|
-
/**
|
|
116
|
-
* @public
|
|
117
|
-
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
118
|
-
*/
|
|
119
|
-
export declare const multiply: typeof multiply$1;
|
|
120
|
-
/**
|
|
121
|
-
* @public
|
|
122
|
-
* @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
|
|
123
|
-
*/
|
|
124
|
-
export declare const parseColor: typeof parseColor$1;
|
|
125
|
-
/**
|
|
126
|
-
* @public
|
|
127
|
-
* @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
|
|
128
|
-
*/
|
|
129
|
-
export declare const rgbToHex: typeof rgbToHex$1;
|
|
130
|
-
/**
|
|
131
|
-
* @public
|
|
132
|
-
* @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
|
|
133
|
-
*/
|
|
134
|
-
export declare const rgbToHsl: typeof rgbToHsl$1;
|
|
135
|
-
/**
|
|
136
|
-
* @public
|
|
137
|
-
* @deprecated Use `rgba` from `@sanity/ui/theme` instead.
|
|
138
|
-
*/
|
|
139
|
-
export declare const rgba: typeof rgba$1;
|
|
140
|
-
/**
|
|
141
|
-
* @public
|
|
142
|
-
* @deprecated Use `screen` from `@sanity/ui/theme` instead.
|
|
143
|
-
*/
|
|
144
|
-
export declare const screen: typeof screen$1;
|
|
145
|
-
/**
|
|
146
|
-
* @public
|
|
147
|
-
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
148
|
-
*/
|
|
149
|
-
export declare const studioTheme: BaseTheme$1;
|
|
150
|
-
/**
|
|
151
|
-
* @public
|
|
152
|
-
*/
|
|
153
|
-
type DialogPosition = 'absolute' | 'fixed';
|
|
154
|
-
/**
|
|
155
|
-
* @public
|
|
156
|
-
*/
|
|
157
|
-
interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
|
|
158
|
-
/**
|
|
159
|
-
* @beta
|
|
160
|
-
*/
|
|
161
|
-
__unstable_autoFocus?: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* @beta
|
|
164
|
-
*/
|
|
165
|
-
__unstable_hideCloseButton?: boolean;
|
|
166
|
-
cardRadius?: Radius | Radius[];
|
|
167
|
-
cardShadow?: number | number[];
|
|
168
|
-
contentRef?: React.ForwardedRef<HTMLDivElement>;
|
|
169
|
-
footer?: React.ReactNode;
|
|
170
|
-
header?: React.ReactNode;
|
|
171
|
-
id: string;
|
|
172
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
173
|
-
onActivate?: LayerProps['onActivate'];
|
|
174
|
-
onClickOutside?: () => void;
|
|
175
|
-
onClose?: () => void;
|
|
176
|
-
portal?: string;
|
|
177
|
-
position?: DialogPosition | DialogPosition[];
|
|
178
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
179
|
-
zOffset?: number | number[];
|
|
180
|
-
/**
|
|
181
|
-
* Whether the dialog should animate in on mount.
|
|
182
|
-
*
|
|
183
|
-
* @beta
|
|
184
|
-
* @defaultValue false
|
|
185
|
-
*/
|
|
186
|
-
animate?: boolean;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* The Dialog component.
|
|
190
|
-
*
|
|
191
|
-
* @public
|
|
192
|
-
*/
|
|
193
|
-
export declare function Dialog(props: DialogProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'id' | 'width'>): import("react").JSX.Element;
|
|
194
|
-
/**
|
|
195
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
196
|
-
* @beta
|
|
197
|
-
*/
|
|
198
|
-
interface DialogContextValue {
|
|
199
|
-
version: 0.0;
|
|
200
|
-
position?: DialogPosition | DialogPosition[];
|
|
201
|
-
zOffset?: number | number[];
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
206
|
-
export declare const DialogContext: import("react").Context<DialogContextValue>;
|
|
207
|
-
/**
|
|
208
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
209
|
-
* @beta
|
|
210
|
-
*/
|
|
211
|
-
interface DialogProviderProps {
|
|
212
|
-
children?: React.ReactNode;
|
|
213
|
-
position?: DialogPosition | DialogPosition[];
|
|
214
|
-
zOffset?: number | number[];
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
218
|
-
* @beta
|
|
219
|
-
*/
|
|
220
|
-
export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element;
|
|
221
|
-
/**
|
|
222
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
223
|
-
* @beta
|
|
224
|
-
*/
|
|
225
|
-
export declare function useDialog(): DialogContextValue;
|
|
226
|
-
/**
|
|
227
|
-
* @public
|
|
228
|
-
*/
|
|
229
|
-
interface HotkeysProps {
|
|
230
|
-
fontSize?: number | number[];
|
|
231
|
-
gap?: number | number[];
|
|
232
|
-
padding?: number | number[];
|
|
233
|
-
radius?: Radius | Radius[];
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { ElementType } from "react";
|
|
4
|
+
import { JSX } from "react";
|
|
5
|
+
import type { default as React_2 } from "react";
|
|
6
|
+
import type { SVGProps } from "react";
|
|
7
|
+
|
|
8
|
+
declare const ALIGN_ITEMS: readonly [
|
|
9
|
+
"baseline",
|
|
10
|
+
"center",
|
|
11
|
+
"flex-end",
|
|
12
|
+
"flex-start",
|
|
13
|
+
"stretch",
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
/** @public */
|
|
17
|
+
export declare type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
18
|
+
|
|
19
|
+
/** @public */
|
|
20
|
+
export declare function Badge<T extends ElementType = "span">({
|
|
21
|
+
tone,
|
|
22
|
+
...props
|
|
23
|
+
}: BadgeProps<T> &
|
|
24
|
+
Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): JSX.Element;
|
|
25
|
+
|
|
26
|
+
/** @public */
|
|
27
|
+
export declare interface BadgeProps<
|
|
28
|
+
T extends React.ElementType = "span",
|
|
29
|
+
> extends ToneProps {
|
|
234
30
|
/**
|
|
235
|
-
*
|
|
31
|
+
* HTML element to render.
|
|
236
32
|
*/
|
|
237
|
-
|
|
238
|
-
keys?: string[];
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
242
|
-
*
|
|
243
|
-
* @public
|
|
244
|
-
*/
|
|
245
|
-
export declare function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>): import("react").JSX.Element;
|
|
246
|
-
/**
|
|
247
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
248
|
-
* @beta
|
|
249
|
-
*/
|
|
250
|
-
interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxOwnProps, 'children'> {
|
|
251
|
-
animated?: boolean;
|
|
252
|
-
delay?: number;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
256
|
-
* @beta
|
|
257
|
-
*/
|
|
258
|
-
export declare function Skeleton(props: SkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'height'>): import("react").JSX.Element;
|
|
259
|
-
/**
|
|
260
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
261
|
-
* @beta
|
|
262
|
-
*/
|
|
263
|
-
interface TextSkeletonProps extends SkeletonProps {
|
|
264
|
-
size?: number | number[];
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
268
|
-
* @beta
|
|
269
|
-
*/
|
|
270
|
-
interface LabelSkeletonProps extends SkeletonProps {
|
|
271
|
-
size?: number | number[];
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
275
|
-
* @beta
|
|
276
|
-
*/
|
|
277
|
-
interface HeadingSkeletonProps extends SkeletonProps {
|
|
278
|
-
size?: number | number[];
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
282
|
-
* @beta
|
|
283
|
-
*/
|
|
284
|
-
interface CodeSkeletonProps extends SkeletonProps {
|
|
285
|
-
size?: number | number[];
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
289
|
-
* @beta
|
|
290
|
-
*/
|
|
291
|
-
export declare function TextSkeleton(props: TextSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
|
|
292
|
-
/**
|
|
293
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
294
|
-
* @beta
|
|
295
|
-
*/
|
|
296
|
-
export declare function LabelSkeleton(props: LabelSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
|
|
297
|
-
/**
|
|
298
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
299
|
-
* @beta
|
|
300
|
-
*/
|
|
301
|
-
export declare function HeadingSkeleton(props: HeadingSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
|
|
302
|
-
/**
|
|
303
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
304
|
-
* @beta
|
|
305
|
-
*/
|
|
306
|
-
export declare function CodeSkeleton(props: CodeSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
|
|
307
|
-
/**
|
|
308
|
-
* @public
|
|
309
|
-
*/
|
|
310
|
-
interface TabProps {
|
|
311
|
-
/**
|
|
312
|
-
* The `id` of the correlating `TabPanel` component.
|
|
313
|
-
*/
|
|
314
|
-
'aria-controls': string;
|
|
315
|
-
'id': string;
|
|
316
|
-
'icon'?: React.ElementType | React.ReactNode;
|
|
317
|
-
'focused'?: boolean;
|
|
318
|
-
'fontSize'?: number | number[];
|
|
319
|
-
'label'?: React.ReactNode;
|
|
320
|
-
'padding'?: number | number[];
|
|
321
|
-
'selected'?: boolean;
|
|
322
|
-
'tone'?: ButtonTone;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* @public
|
|
326
|
-
*/
|
|
327
|
-
export declare function Tab(props: TabProps & Omit<React.HTMLProps<HTMLButtonElement>, 'aria-controls' | 'as' | 'id' | 'label' | 'type' | 'width'>): import("react").JSX.Element;
|
|
328
|
-
/**
|
|
329
|
-
* @public
|
|
330
|
-
*/
|
|
331
|
-
interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {
|
|
33
|
+
as?: T;
|
|
332
34
|
/**
|
|
333
|
-
*
|
|
35
|
+
* Shows an icon in the start position (left side in left-to-right languages).
|
|
334
36
|
*/
|
|
335
|
-
|
|
336
|
-
/** The spacing between children. */
|
|
337
|
-
gap?: number | number[];
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* @public
|
|
341
|
-
*/
|
|
342
|
-
type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>;
|
|
343
|
-
/**
|
|
344
|
-
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
345
|
-
*
|
|
346
|
-
* @public
|
|
347
|
-
*/
|
|
348
|
-
export declare const Inline: <E extends ElementType = 'div'>(props: InlineProps<E>) => React.JSX.Element;
|
|
349
|
-
/**
|
|
350
|
-
* @public
|
|
351
|
-
*/
|
|
352
|
-
interface TabListProps extends Omit<InlineOwnProps, 'height'> {
|
|
353
|
-
children: Array<React.JSX.Element | null | undefined | false>;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* @public
|
|
357
|
-
*/
|
|
358
|
-
export declare function TabList(props: TabListProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>): import("react").JSX.Element;
|
|
359
|
-
/**
|
|
360
|
-
* @public
|
|
361
|
-
*/
|
|
362
|
-
interface TabPanelProps extends BoxOwnProps {
|
|
37
|
+
iconStart?: React.ElementType | React.ReactNode;
|
|
363
38
|
/**
|
|
364
|
-
*
|
|
39
|
+
* Sets Badge's text label. Use instead of children unless you have a special use case.
|
|
365
40
|
*/
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
*/
|
|
377
|
-
|
|
378
|
-
|
|
41
|
+
text?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare type BorderProps = {
|
|
45
|
+
/** CSS **border** property */
|
|
46
|
+
border?: Responsive<boolean>;
|
|
47
|
+
/** CSS **border-top** property */
|
|
48
|
+
borderTop?: Responsive<boolean>;
|
|
49
|
+
/** CSS **border-right** property */
|
|
50
|
+
borderRight?: Responsive<boolean>;
|
|
51
|
+
/** CSS **border-bottom** property */
|
|
52
|
+
borderBottom?: Responsive<boolean>;
|
|
53
|
+
/** CSS **border-left** property */
|
|
54
|
+
borderLeft?: Responsive<boolean>;
|
|
55
|
+
/** CSS **border-radius** property */
|
|
56
|
+
radius?: Responsive<Radius>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @public */
|
|
60
|
+
export declare function Box<T extends ElementType = "div">({
|
|
61
|
+
display,
|
|
62
|
+
minHeight,
|
|
63
|
+
minWidth,
|
|
64
|
+
...props
|
|
65
|
+
}: BoxProps<T> &
|
|
66
|
+
Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): JSX.Element;
|
|
67
|
+
|
|
68
|
+
/** @public */
|
|
69
|
+
export declare interface BoxProps<
|
|
70
|
+
T extends React.ElementType = "div",
|
|
71
|
+
> extends LayoutProps {
|
|
379
72
|
/**
|
|
380
|
-
*
|
|
73
|
+
* HTML element or component to render.
|
|
381
74
|
*/
|
|
382
|
-
|
|
75
|
+
as?: T;
|
|
76
|
+
/**
|
|
77
|
+
* CSS `display` property.
|
|
78
|
+
* @remarks Does not include `'flex'` or `'grid'`. Use the Flex or Grid components for those.
|
|
79
|
+
*/
|
|
80
|
+
display?: Responsive<DisplayBlock>;
|
|
383
81
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
82
|
+
|
|
83
|
+
/** @public */
|
|
84
|
+
export declare function Button<T extends ElementType = "button">({
|
|
85
|
+
density,
|
|
86
|
+
level,
|
|
87
|
+
tone,
|
|
88
|
+
...props
|
|
89
|
+
}: ButtonProps<T> &
|
|
90
|
+
Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): JSX.Element;
|
|
91
|
+
|
|
92
|
+
declare const BUTTON_DENSITY: readonly ["regular", "loose"];
|
|
93
|
+
|
|
94
|
+
declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
|
|
95
|
+
|
|
96
|
+
declare const BUTTON_TONE: readonly ["neutral", "critical"];
|
|
97
|
+
|
|
98
|
+
declare type ButtonDensity = (typeof BUTTON_DENSITY)[number];
|
|
99
|
+
|
|
100
|
+
declare type ButtonLevel = (typeof BUTTON_LEVEL)[number];
|
|
101
|
+
|
|
102
|
+
/** @public */
|
|
103
|
+
export declare interface ButtonProps<T extends React.ElementType = "button"> {
|
|
396
104
|
/**
|
|
397
|
-
*
|
|
105
|
+
* HTML element to render.
|
|
398
106
|
*/
|
|
399
|
-
|
|
107
|
+
as?: InteractiveAs<T>;
|
|
400
108
|
/**
|
|
401
|
-
*
|
|
402
|
-
* `prefetch` together with `linkAs={Link}`. Props controlled by `TreeItem` itself (`href`,
|
|
403
|
-
* `role`, `tabIndex`, `aria-expanded` and the ref) take precedence.
|
|
109
|
+
* Sets padding and gap together to specify size.
|
|
404
110
|
*/
|
|
405
|
-
|
|
406
|
-
padding?: number | number[];
|
|
407
|
-
gap?: number | number[];
|
|
111
|
+
density?: ButtonDensity;
|
|
408
112
|
/**
|
|
409
|
-
*
|
|
113
|
+
* Sets Button to fill the width of its container.
|
|
410
114
|
*/
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
115
|
+
fullWidth?: Responsive<boolean>;
|
|
116
|
+
/**
|
|
117
|
+
* Shows an icon in the start position (left side in left-to-right languages).
|
|
118
|
+
*/
|
|
119
|
+
iconStart?: React.ElementType | React.ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Shows an icon in the end position (right side in left-to-right languages).
|
|
122
|
+
*/
|
|
123
|
+
iconEnd?: React.ElementType | React.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* Sets the importance of Button's action.
|
|
126
|
+
*/
|
|
127
|
+
level?: ButtonLevel;
|
|
128
|
+
/**
|
|
129
|
+
* Places Button into a loading state.
|
|
130
|
+
*/
|
|
131
|
+
loading?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Sets Button's text label.
|
|
134
|
+
*/
|
|
135
|
+
text?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Sets Button's semantic meaning and related color.
|
|
138
|
+
*/
|
|
139
|
+
tone?: ButtonTone;
|
|
428
140
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
141
|
+
|
|
142
|
+
declare type ButtonTone = (typeof BUTTON_TONE)[number];
|
|
143
|
+
|
|
144
|
+
/** @public */
|
|
145
|
+
export declare function Card<T extends ElementType = "div">({
|
|
146
|
+
density,
|
|
147
|
+
tone,
|
|
148
|
+
...props
|
|
149
|
+
}: CardProps<T> &
|
|
150
|
+
Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): JSX.Element;
|
|
151
|
+
|
|
152
|
+
/** @public */
|
|
153
|
+
export declare interface CardProps<T extends React.ElementType = "div">
|
|
154
|
+
extends MarginProps, ToneProps {
|
|
155
|
+
/**
|
|
156
|
+
* HTML element or component to render.
|
|
157
|
+
*/
|
|
158
|
+
as?: T;
|
|
159
|
+
/**
|
|
160
|
+
* Sets padding, gap, and border-radius together to specify size. This prop is used in place of separate `padding`, `gap`, and `border-radius` props.
|
|
161
|
+
*/
|
|
162
|
+
density?: Responsive<Density>;
|
|
446
163
|
}
|
|
447
|
-
|
|
448
|
-
* @beta
|
|
449
|
-
*/
|
|
450
|
-
export declare function useTree(): TreeContextValue;
|
|
451
|
-
/**
|
|
452
|
-
* @internal
|
|
453
|
-
*/
|
|
454
|
-
export declare function _raf(fn: () => void): () => void;
|
|
455
|
-
/**
|
|
456
|
-
* @internal
|
|
457
|
-
*/
|
|
458
|
-
export declare function _raf2(fn: () => void): () => void;
|
|
459
|
-
/**
|
|
460
|
-
* @internal
|
|
461
|
-
*/
|
|
462
|
-
export declare function _isEnterToClickElement(element: HTMLElement): boolean;
|
|
463
|
-
/**
|
|
464
|
-
* @internal
|
|
465
|
-
*/
|
|
466
|
-
export declare function isHTMLElement(node: unknown): node is HTMLElement;
|
|
467
|
-
/**
|
|
468
|
-
* @internal
|
|
469
|
-
*/
|
|
470
|
-
export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement;
|
|
471
|
-
/**
|
|
472
|
-
* @internal
|
|
473
|
-
*/
|
|
474
|
-
export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement;
|
|
475
|
-
/**
|
|
476
|
-
* @internal
|
|
477
|
-
*/
|
|
478
|
-
export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement;
|
|
479
|
-
/**
|
|
480
|
-
* @internal
|
|
481
|
-
*/
|
|
482
|
-
export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement;
|
|
483
|
-
/**
|
|
484
|
-
* @internal
|
|
485
|
-
*/
|
|
486
|
-
export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement;
|
|
487
|
-
/**
|
|
488
|
-
* @internal
|
|
489
|
-
*/
|
|
490
|
-
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean;
|
|
491
|
-
/**
|
|
492
|
-
* @internal
|
|
493
|
-
*/
|
|
494
|
-
export declare function _hasFocus(element: HTMLElement): boolean;
|
|
495
|
-
/**
|
|
496
|
-
* @internal
|
|
497
|
-
*/
|
|
498
|
-
export declare function isFocusable(element: HTMLElement): boolean;
|
|
499
|
-
/**
|
|
500
|
-
* @internal
|
|
501
|
-
*/
|
|
502
|
-
export declare function attemptFocus(element: HTMLElement): boolean;
|
|
503
|
-
/**
|
|
504
|
-
* @internal
|
|
505
|
-
*/
|
|
506
|
-
export declare function focusFirstDescendant(element: HTMLElement): boolean;
|
|
507
|
-
/**
|
|
508
|
-
* @internal
|
|
509
|
-
*/
|
|
510
|
-
export declare function focusLastDescendant(element: HTMLElement): boolean;
|
|
511
|
-
/**
|
|
512
|
-
* @internal
|
|
513
|
-
*/
|
|
514
|
-
export declare function _isScrollable(el: Node): boolean;
|
|
164
|
+
|
|
515
165
|
/** @beta */
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
* useClickOutside((event) => {}, [button])
|
|
536
|
-
* return <button ref={setButtonElement} />
|
|
537
|
-
* ```
|
|
538
|
-
* do:
|
|
539
|
-
* ```tsx
|
|
540
|
-
* const buttonRef = useRef()
|
|
541
|
-
* useClickOutsideEvent((event) => {}, () => [buttonRef.current])
|
|
542
|
-
* return <button ref={buttonRef} />
|
|
543
|
-
* ```
|
|
544
|
-
*/
|
|
545
|
-
export declare function useClickOutside(_listener?: never, _elementsArg?: never, _boundaryElement?: never): never;
|
|
546
|
-
/**
|
|
547
|
-
* @public
|
|
548
|
-
*/
|
|
549
|
-
type ClickOutsideEventListener = (event: MouseEvent) => void;
|
|
550
|
-
/**
|
|
551
|
-
* @public
|
|
552
|
-
*/
|
|
553
|
-
type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[];
|
|
554
|
-
/**
|
|
555
|
-
* @public
|
|
556
|
-
*/
|
|
557
|
-
export declare function useClickOutsideEvent(listener: ClickOutsideEventListener | false | undefined, elementsArg?: () => ClickOutsideEventElements, boundaryElement?: () => HTMLElement | null): void;
|
|
558
|
-
/**
|
|
559
|
-
* @beta
|
|
560
|
-
*/
|
|
561
|
-
export declare function useCustomValidity(ref: {
|
|
562
|
-
current: null | {
|
|
563
|
-
setCustomValidity: (validity: string) => void;
|
|
564
|
-
};
|
|
565
|
-
}, customValidity: string | undefined): void;
|
|
566
|
-
/**
|
|
567
|
-
* Subscribe to the rect of a DOM element.
|
|
568
|
-
* @beta
|
|
569
|
-
*
|
|
570
|
-
* @deprecated Use `useElementSize` instead
|
|
571
|
-
*/
|
|
572
|
-
export declare function useElementRect(_element?: never): never;
|
|
573
|
-
/**
|
|
574
|
-
* @beta
|
|
575
|
-
*/
|
|
576
|
-
interface ElementRectValue {
|
|
577
|
-
width: number;
|
|
578
|
-
height: number;
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* @beta
|
|
582
|
-
*/
|
|
583
|
-
interface ElementSize {
|
|
584
|
-
content: ElementRectValue;
|
|
585
|
-
border: ElementRectValue;
|
|
586
|
-
/** @deprecated INTERNAL ONLY */
|
|
587
|
-
_contentRect: DOMRectReadOnly;
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* @internal
|
|
591
|
-
*/
|
|
592
|
-
type _ElementSizeSubscriber = (elementRect: ElementSize) => void;
|
|
593
|
-
/**
|
|
594
|
-
* @internal
|
|
595
|
-
*/
|
|
596
|
-
interface _ElementSizeObserver {
|
|
597
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
|
|
166
|
+
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
167
|
+
|
|
168
|
+
/** @beta */
|
|
169
|
+
export declare interface CheckboxProps
|
|
170
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
171
|
+
/**
|
|
172
|
+
* Applies error styling to the checkbox mark.
|
|
173
|
+
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
174
|
+
*/
|
|
175
|
+
error?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Renders the "mixed state" mark (a horizontal line).
|
|
178
|
+
* @remarks Use when the checkbox controls a group with some-but-not-all children checked.
|
|
179
|
+
*/
|
|
180
|
+
indeterminate?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Visible label next to the checkbox.
|
|
183
|
+
*/
|
|
184
|
+
label: React.ReactNode;
|
|
598
185
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
186
|
+
|
|
187
|
+
/** @public */
|
|
188
|
+
export declare function Code<T extends CodeTag = "pre">({
|
|
189
|
+
size,
|
|
190
|
+
...props
|
|
191
|
+
}: CodeProps<T> &
|
|
192
|
+
Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): JSX.Element;
|
|
193
|
+
|
|
194
|
+
declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
|
|
195
|
+
|
|
196
|
+
declare const CODE_TAG: readonly ["pre", "span"];
|
|
197
|
+
|
|
198
|
+
/** @public */
|
|
199
|
+
export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
|
|
200
|
+
TypographyProps,
|
|
201
|
+
"align" | "truncate" | "tone"
|
|
202
|
+
> {
|
|
203
|
+
/**
|
|
204
|
+
* HTML element or component to render.
|
|
205
|
+
* @remarks The defined element wraps an inner `<code>` tag.
|
|
206
|
+
*/
|
|
207
|
+
as?: T;
|
|
208
|
+
/**
|
|
209
|
+
* Refractor language for syntax highlighting.
|
|
210
|
+
*/
|
|
211
|
+
language?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Sets font size.
|
|
214
|
+
*/
|
|
215
|
+
size?: Responsive<CodeSize>;
|
|
604
216
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void, options?: AddEventListenerOptions): void;
|
|
633
|
-
/**
|
|
634
|
-
* Efficiently subscribes to `window.matchMedia` queries
|
|
635
|
-
*
|
|
636
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
637
|
-
*
|
|
638
|
-
* @public
|
|
639
|
-
*/
|
|
640
|
-
export declare function useMatchMedia(mediaQueryString: `(${string})`, getServerSnapshot?: () => boolean): boolean;
|
|
641
|
-
/**
|
|
642
|
-
* @internal
|
|
643
|
-
*/
|
|
644
|
-
interface _MediaStore {
|
|
645
|
-
subscribe: (onStoreChange: () => void) => () => void;
|
|
646
|
-
getSnapshot: () => number;
|
|
217
|
+
|
|
218
|
+
/** @public */
|
|
219
|
+
export declare type CodeSize = (typeof CODE_SIZE)[number];
|
|
220
|
+
|
|
221
|
+
declare type CodeTag = (typeof CODE_TAG)[number];
|
|
222
|
+
|
|
223
|
+
/** @public */
|
|
224
|
+
export declare function Container<T extends ElementType = "div">({
|
|
225
|
+
marginX,
|
|
226
|
+
...props
|
|
227
|
+
}: ContainerProps<T> &
|
|
228
|
+
Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): JSX.Element;
|
|
229
|
+
|
|
230
|
+
declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
231
|
+
|
|
232
|
+
/** @public */
|
|
233
|
+
export declare interface ContainerProps<
|
|
234
|
+
T extends React.ElementType = "div",
|
|
235
|
+
> extends LayoutProps {
|
|
236
|
+
/**
|
|
237
|
+
* HTML element or component to render.
|
|
238
|
+
*/
|
|
239
|
+
as?: T;
|
|
240
|
+
/**
|
|
241
|
+
* Maximum width of the container.
|
|
242
|
+
*/
|
|
243
|
+
size?: Responsive<ContainerSize>;
|
|
647
244
|
}
|
|
245
|
+
|
|
246
|
+
/** @public */
|
|
247
|
+
export declare type ContainerSize = (typeof CONTAINER_SIZE)[number];
|
|
248
|
+
|
|
249
|
+
declare const DENSITY: readonly ["compact", "regular", "loose"];
|
|
250
|
+
|
|
251
|
+
/** @public */
|
|
252
|
+
export declare type Density = (typeof DENSITY)[number];
|
|
253
|
+
|
|
648
254
|
/**
|
|
649
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
650
255
|
* @beta
|
|
651
|
-
*/
|
|
652
|
-
export declare function useMediaIndex(): number;
|
|
653
|
-
/**
|
|
654
|
-
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
655
|
-
*
|
|
656
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
657
|
-
*
|
|
658
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
659
|
-
* Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
|
|
660
|
-
* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
|
|
661
|
-
*
|
|
662
|
-
* @public
|
|
663
|
-
*/
|
|
664
|
-
export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean;
|
|
665
|
-
/**
|
|
666
|
-
* Returns true if motion should be reduced
|
|
667
256
|
*
|
|
668
|
-
*
|
|
257
|
+
* Renders a modal dialog element — should not be used for nonmodal dialogs.
|
|
258
|
+
* Modal dialogs make their containing documents inert, and render on the topmost
|
|
259
|
+
* layer within that containing document; they must be dimissed before the containing
|
|
260
|
+
* document and its contents become unblocked. They also trap focus within the bounds
|
|
261
|
+
* of the dialog element and its descendants.
|
|
669
262
|
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
*/
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
size?:
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
interface ResponsiveAvatarSizeStyleProps {
|
|
758
|
-
$size: AvatarSize[];
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* @public
|
|
762
|
-
* @deprecated No longer used
|
|
763
|
-
*/
|
|
764
|
-
type BadgeMode = never;
|
|
765
|
-
/**
|
|
766
|
-
* @public
|
|
767
|
-
*/
|
|
768
|
-
type BadgeTone = ThemeColorStateToneKey;
|
|
769
|
-
/**
|
|
770
|
-
* @public
|
|
771
|
-
*/
|
|
772
|
-
interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
|
|
773
|
-
fontSize?: number | number[];
|
|
774
|
-
/** @deprecated No longer used. */
|
|
775
|
-
mode?: never;
|
|
776
|
-
tone?: BadgeTone;
|
|
263
|
+
* For more on dialogs and modality, refer to the HTML specification for the dialog element:
|
|
264
|
+
* https://html.spec.whatwg.org/dev/interactive-elements.html#the-dialog-element
|
|
265
|
+
*/
|
|
266
|
+
export declare const Dialog: typeof DialogRoot;
|
|
267
|
+
|
|
268
|
+
declare function DialogContent(props: ComponentProps<"div">): JSX.Element;
|
|
269
|
+
|
|
270
|
+
declare function DialogFooter(props: ComponentProps<"div">): JSX.Element;
|
|
271
|
+
|
|
272
|
+
/** @beta */
|
|
273
|
+
export declare interface DialogProps extends Omit<
|
|
274
|
+
React.ComponentProps<"dialog">,
|
|
275
|
+
"open"
|
|
276
|
+
> {
|
|
277
|
+
/**
|
|
278
|
+
* Text for the dialog heading.
|
|
279
|
+
* @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
|
|
280
|
+
*/
|
|
281
|
+
header?: string;
|
|
282
|
+
/**
|
|
283
|
+
* A function to call alongside the native `close` event.
|
|
284
|
+
* @remarks Use it to set `open` back to `false`. It runs for every close cause: the Escape key, a backdrop click, the close button, or a programmatic close.
|
|
285
|
+
*/
|
|
286
|
+
onClose: React.ReactEventHandler<HTMLDialogElement>;
|
|
287
|
+
/**
|
|
288
|
+
* Toggles the dialog's open state.
|
|
289
|
+
* @remarks `true` calls `showModal()` on the element. `false` calls `close()`.
|
|
290
|
+
*/
|
|
291
|
+
open?: boolean;
|
|
292
|
+
/** Sets the max width of the dialog */
|
|
293
|
+
size?: Responsive<ContainerSize>;
|
|
294
|
+
/** CSS length value used to set the Dialog’s distance from the top of the viewport; Dialog is centered if not provided */
|
|
295
|
+
topAnchor?: string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare function DialogRoot({ open, size, ...props }: DialogProps): JSX.Element;
|
|
299
|
+
|
|
300
|
+
declare namespace DialogRoot {
|
|
301
|
+
var displayName: string;
|
|
302
|
+
var Content: typeof DialogContent;
|
|
303
|
+
var Footer: typeof DialogFooter;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
declare const DISPLAY_BLOCK: readonly ["block", "inline-block", "none"];
|
|
307
|
+
|
|
308
|
+
declare const DISPLAY_FLEX: readonly ["flex", "inline-flex", "none"];
|
|
309
|
+
|
|
310
|
+
declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
|
|
311
|
+
|
|
312
|
+
/** @public */
|
|
313
|
+
export declare type DisplayBlock = (typeof DISPLAY_BLOCK)[number];
|
|
314
|
+
|
|
315
|
+
/** @public */
|
|
316
|
+
export declare type DisplayFlex = (typeof DISPLAY_FLEX)[number];
|
|
317
|
+
|
|
318
|
+
/** @public */
|
|
319
|
+
export declare type DisplayGrid = (typeof DISPLAY_GRID)[number];
|
|
320
|
+
|
|
321
|
+
/** @public */
|
|
322
|
+
export declare function Divider(props: DividerProps): JSX.Element;
|
|
323
|
+
|
|
324
|
+
/** @public */
|
|
325
|
+
export declare interface DividerProps
|
|
326
|
+
extends React.ComponentProps<"hr">, MarginProps {}
|
|
327
|
+
|
|
328
|
+
/** @public */
|
|
329
|
+
export declare function Eyebrow<T extends ElementType = "span">({
|
|
330
|
+
size,
|
|
331
|
+
weight,
|
|
332
|
+
...props
|
|
333
|
+
}: EyebrowProps<T> &
|
|
334
|
+
Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): JSX.Element;
|
|
335
|
+
|
|
336
|
+
declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
|
|
337
|
+
|
|
338
|
+
/** @public */
|
|
339
|
+
export declare interface EyebrowProps<
|
|
340
|
+
T extends React.ElementType = "span",
|
|
341
|
+
> extends TypographyProps {
|
|
342
|
+
/**
|
|
343
|
+
* HTML element to render.
|
|
344
|
+
*/
|
|
345
|
+
as?: T;
|
|
346
|
+
/**
|
|
347
|
+
* Sets font size. Uses the same scale as Label.
|
|
348
|
+
*/
|
|
349
|
+
size?: Responsive<EyebrowSize>;
|
|
777
350
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
351
|
+
|
|
352
|
+
/** @public */
|
|
353
|
+
export declare type EyebrowSize = (typeof EYEBROW_SIZE)[number];
|
|
354
|
+
|
|
355
|
+
/** @public */
|
|
356
|
+
export declare function Flex<T extends ElementType = "div">({
|
|
357
|
+
display,
|
|
358
|
+
minHeight,
|
|
359
|
+
minWidth,
|
|
360
|
+
...props
|
|
361
|
+
}: FlexProps<T> &
|
|
362
|
+
Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): JSX.Element;
|
|
363
|
+
|
|
364
|
+
declare const FLEX_DIRECTION: readonly [
|
|
365
|
+
"row",
|
|
366
|
+
"row-reverse",
|
|
367
|
+
"column",
|
|
368
|
+
"column-reverse",
|
|
369
|
+
];
|
|
370
|
+
|
|
371
|
+
declare const FLEX_WRAP: readonly ["wrap", "wrap-reverse", "nowrap"];
|
|
372
|
+
|
|
373
|
+
declare type FlexChildProps = {
|
|
374
|
+
/** CSS **flex-basis** property */
|
|
375
|
+
flexBasis?: Responsive<string>;
|
|
376
|
+
/** CSS **flex-grow** property */
|
|
377
|
+
flexGrow?: Responsive<number>;
|
|
378
|
+
/** CSS **flex-shrink** property */
|
|
379
|
+
flexShrink?: Responsive<number>;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
/** @public */
|
|
383
|
+
export declare type FlexDirection = (typeof FLEX_DIRECTION)[number];
|
|
384
|
+
|
|
385
|
+
/** @public */
|
|
386
|
+
export declare type FlexParentProps = {
|
|
387
|
+
/** CSS **align-items** property */
|
|
388
|
+
alignItems?: Responsive<AlignItems>;
|
|
389
|
+
/** CSS **justify-content** property */
|
|
390
|
+
justifyContent?: Responsive<JustifyContent>;
|
|
391
|
+
/** CSS **flex-direction** property */
|
|
392
|
+
flexDirection?: Responsive<FlexDirection>;
|
|
393
|
+
/** CSS **flex-wrap** property */
|
|
394
|
+
flexWrap?: Responsive<FlexWrap>;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
/** @public */
|
|
398
|
+
export declare interface FlexProps<T extends React.ElementType = "div">
|
|
399
|
+
extends FlexParentProps, GapProps, LayoutProps {
|
|
792
400
|
/**
|
|
793
|
-
*
|
|
794
|
-
* @beta
|
|
401
|
+
* HTML element or component to render.
|
|
795
402
|
*/
|
|
796
|
-
|
|
403
|
+
as?: T;
|
|
797
404
|
/**
|
|
798
|
-
*
|
|
799
|
-
* @beta
|
|
405
|
+
* CSS `display` property.
|
|
800
406
|
*/
|
|
801
|
-
|
|
802
|
-
disabled?: boolean;
|
|
803
|
-
muted?: boolean;
|
|
804
|
-
pressed?: boolean;
|
|
805
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
806
|
-
selected?: boolean;
|
|
807
|
-
tone?: CardTone;
|
|
407
|
+
display?: Responsive<DisplayFlex>;
|
|
808
408
|
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
*/
|
|
819
|
-
export declare
|
|
820
|
-
/**
|
|
821
|
-
|
|
822
|
-
*/
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
409
|
+
|
|
410
|
+
/** @public */
|
|
411
|
+
export declare type FlexWrap = (typeof FLEX_WRAP)[number];
|
|
412
|
+
|
|
413
|
+
declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
|
|
414
|
+
|
|
415
|
+
/** @public */
|
|
416
|
+
export declare type FontWeight = (typeof FONT_WEIGHT)[number];
|
|
417
|
+
|
|
418
|
+
/** @public */
|
|
419
|
+
export declare type GapProps = {
|
|
420
|
+
/** CSS **gap** property */
|
|
421
|
+
gap?: Responsive<SpaceInherit>;
|
|
422
|
+
/** CSS **row-gap** property */
|
|
423
|
+
rowGap?: Responsive<SpaceInherit>;
|
|
424
|
+
/** CSS **column-gap** property */
|
|
425
|
+
columnGap?: Responsive<SpaceInherit>;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
/** @public */
|
|
429
|
+
export declare function Grid<T extends ElementType = "div">({
|
|
430
|
+
display,
|
|
431
|
+
minHeight,
|
|
432
|
+
minWidth,
|
|
433
|
+
...props
|
|
434
|
+
}: GridProps<T> &
|
|
435
|
+
Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): JSX.Element;
|
|
436
|
+
|
|
437
|
+
declare const GRID_AUTO_FLOW: readonly [
|
|
438
|
+
"row",
|
|
439
|
+
"column",
|
|
440
|
+
"row dense",
|
|
441
|
+
"column dense",
|
|
442
|
+
"dense",
|
|
443
|
+
];
|
|
444
|
+
|
|
445
|
+
/** @public */
|
|
446
|
+
export declare type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
|
|
447
|
+
|
|
448
|
+
declare type GridChildProps = {
|
|
449
|
+
/** CSS **grid-column** property */
|
|
450
|
+
gridColumn?: Responsive<string>;
|
|
451
|
+
/** CSS **grid-column-start** property */
|
|
452
|
+
gridColumnStart?: Responsive<string>;
|
|
453
|
+
/** CSS **grid-column-end** property */
|
|
454
|
+
gridColumnEnd?: Responsive<string>;
|
|
455
|
+
/** CSS **grid-row** property */
|
|
456
|
+
gridRow?: Responsive<string>;
|
|
457
|
+
/** CSS **grid-row-start** property */
|
|
458
|
+
gridRowStart?: Responsive<string>;
|
|
459
|
+
/** CSS **grid-row-end** property */
|
|
460
|
+
gridRowEnd?: Responsive<string>;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
/** @public */
|
|
464
|
+
export declare type GridParentProps = {
|
|
465
|
+
/** CSS **grid-auto-flow** property */
|
|
466
|
+
gridAutoFlow?: Responsive<GridAutoFlow>;
|
|
467
|
+
/** CSS **grid-auto-columns** property */
|
|
468
|
+
gridAutoColumns?: Responsive<string>;
|
|
469
|
+
/** CSS **grid-auto-row** property */
|
|
470
|
+
gridAutoRows?: Responsive<string>;
|
|
471
|
+
/** CSS **grid-template-columns** property */
|
|
472
|
+
gridTemplateColumns?: Responsive<string>;
|
|
473
|
+
/** CSS **grid-template-rows** property */
|
|
474
|
+
gridTemplateRows?: Responsive<string>;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
/** @public */
|
|
478
|
+
export declare interface GridProps<T extends React.ElementType = "div">
|
|
479
|
+
extends GridParentProps, GapProps, LayoutProps {
|
|
480
|
+
/**
|
|
481
|
+
* HTML element or component to render.
|
|
482
|
+
*/
|
|
483
|
+
as?: T;
|
|
484
|
+
/**
|
|
485
|
+
* CSS `display` property.
|
|
486
|
+
*/
|
|
487
|
+
display?: Responsive<DisplayGrid>;
|
|
828
488
|
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
489
|
+
|
|
490
|
+
/** @public */
|
|
491
|
+
export declare function Heading<T extends ElementType = "h2">({
|
|
492
|
+
size,
|
|
493
|
+
weight,
|
|
494
|
+
...props
|
|
495
|
+
}: HeadingProps &
|
|
496
|
+
Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): JSX.Element;
|
|
497
|
+
|
|
498
|
+
declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
499
|
+
|
|
500
|
+
declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
501
|
+
|
|
502
|
+
/** @public */
|
|
503
|
+
export declare interface HeadingProps extends TypographyProps {
|
|
504
|
+
/**
|
|
505
|
+
* Semantic heading element to render.
|
|
506
|
+
* @remarks Always set this explicitly.
|
|
507
|
+
*/
|
|
508
|
+
as?: HeadingTag;
|
|
509
|
+
/**
|
|
510
|
+
* Sets font size.
|
|
511
|
+
* @remarks Independent of `as`.
|
|
512
|
+
*/
|
|
513
|
+
size?: Responsive<HeadingSize>;
|
|
835
514
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
515
|
+
|
|
516
|
+
/** @public */
|
|
517
|
+
export declare type HeadingSize = (typeof HEADING_SIZE)[number];
|
|
518
|
+
|
|
519
|
+
declare type HeadingTag = (typeof HEADING_TAG)[number];
|
|
520
|
+
|
|
521
|
+
declare type HeightProps = {
|
|
522
|
+
/** CSS **height** property */
|
|
523
|
+
height?: Responsive<string>;
|
|
524
|
+
/** CSS **min-height** property */
|
|
525
|
+
minHeight?: Responsive<string>;
|
|
526
|
+
/** CSS **max-height** property */
|
|
527
|
+
maxHeight?: Responsive<string>;
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/** @public */
|
|
531
|
+
export declare function HStack<T extends ElementType = "div">(
|
|
532
|
+
props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
|
|
533
|
+
): JSX.Element;
|
|
534
|
+
|
|
535
|
+
/** @public */
|
|
536
|
+
export declare interface HStackProps<
|
|
537
|
+
T extends React.ElementType = "div",
|
|
538
|
+
> extends Pick<GapProps, "gap"> {
|
|
539
|
+
/**
|
|
540
|
+
* HTML element or component to render.
|
|
541
|
+
*/
|
|
542
|
+
as?: T;
|
|
861
543
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
544
|
+
|
|
545
|
+
/** @public */
|
|
546
|
+
export declare function Icon({ size, ...props }: IconProps): JSX.Element;
|
|
547
|
+
|
|
548
|
+
declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
|
|
549
|
+
|
|
550
|
+
/** @public */
|
|
551
|
+
export declare function IconButton<T extends ElementType = "button">(
|
|
552
|
+
props: IconButtonProps<T> &
|
|
553
|
+
Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
|
|
554
|
+
): JSX.Element;
|
|
555
|
+
|
|
556
|
+
/** @public */
|
|
557
|
+
export declare interface IconButtonProps<
|
|
558
|
+
T extends React_2.ElementType = "button",
|
|
559
|
+
> extends Pick<
|
|
560
|
+
ButtonProps<T>,
|
|
561
|
+
"as" | "density" | "level" | "loading" | "tone"
|
|
562
|
+
> {
|
|
563
|
+
/**
|
|
564
|
+
* Accessible name for the button.
|
|
565
|
+
* @remarks Because IconButtons have no visible text, this is required.
|
|
566
|
+
*/
|
|
567
|
+
"aria-label": string;
|
|
568
|
+
/**
|
|
569
|
+
* Icon to render.
|
|
570
|
+
*/
|
|
571
|
+
icon: React_2.ComponentType<SVGProps<SVGSVGElement>>;
|
|
867
572
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
*/
|
|
881
|
-
interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
|
|
882
|
-
/**
|
|
883
|
-
* @public
|
|
884
|
-
*/
|
|
885
|
-
type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>;
|
|
886
|
-
/**
|
|
887
|
-
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
888
|
-
*
|
|
889
|
-
* @public
|
|
890
|
-
*/
|
|
891
|
-
export declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element;
|
|
892
|
-
/**
|
|
893
|
-
* @public
|
|
894
|
-
*/
|
|
895
|
-
type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial';
|
|
896
|
-
/**
|
|
897
|
-
* @public
|
|
898
|
-
*/
|
|
899
|
-
interface HeadingOwnProps {
|
|
900
|
-
accent?: boolean;
|
|
901
|
-
align?: TextAlign | TextAlign[];
|
|
902
|
-
muted?: boolean;
|
|
903
|
-
size?: number | number[];
|
|
573
|
+
|
|
574
|
+
/** @public */
|
|
575
|
+
export declare interface IconProps
|
|
576
|
+
extends
|
|
577
|
+
ComponentProps<"svg">,
|
|
578
|
+
Pick<TypographyProps, "muted">,
|
|
579
|
+
MarginProps,
|
|
580
|
+
ToneProps {
|
|
581
|
+
/**
|
|
582
|
+
* The icon component to render.
|
|
583
|
+
*/
|
|
584
|
+
icon: React.ComponentType<SVGProps<SVGSVGElement>>;
|
|
904
585
|
/**
|
|
905
|
-
*
|
|
906
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
907
|
-
* @beta
|
|
586
|
+
* Sets icon size.
|
|
908
587
|
*/
|
|
909
|
-
|
|
910
|
-
weight?: ThemeFontWeightKey$1;
|
|
588
|
+
size?: Responsive<IconSize>;
|
|
911
589
|
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
590
|
+
|
|
591
|
+
/** @public */
|
|
592
|
+
export declare type IconSize = (typeof ICON_SIZE)[number];
|
|
593
|
+
|
|
594
|
+
/** @beta */
|
|
595
|
+
export declare function Indicator<T extends ElementType = "span">({
|
|
596
|
+
tone,
|
|
597
|
+
...props
|
|
598
|
+
}: IndicatorProps<T> &
|
|
599
|
+
Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): JSX.Element;
|
|
600
|
+
|
|
601
|
+
/** @beta */
|
|
602
|
+
export declare interface IndicatorProps<
|
|
603
|
+
T extends React.ElementType = "span",
|
|
604
|
+
> extends ToneProps {
|
|
605
|
+
/**
|
|
606
|
+
* HTML element to render.
|
|
607
|
+
*/
|
|
608
|
+
as?: T;
|
|
609
|
+
/**
|
|
610
|
+
* Accessible label.
|
|
611
|
+
*/
|
|
612
|
+
label?: string;
|
|
929
613
|
}
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
* @public
|
|
942
|
-
*/
|
|
943
|
-
interface LabelOwnProps {
|
|
944
|
-
accent?: boolean;
|
|
945
|
-
align?: TextAlign | TextAlign[];
|
|
946
|
-
muted?: boolean;
|
|
947
|
-
size?: number | number[];
|
|
614
|
+
|
|
615
|
+
/** @public */
|
|
616
|
+
export declare function IndicatorStack<T extends ElementType = "div">(
|
|
617
|
+
props: IndicatorStackProps<T> &
|
|
618
|
+
Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
|
|
619
|
+
): JSX.Element;
|
|
620
|
+
|
|
621
|
+
/** @public */
|
|
622
|
+
export declare interface IndicatorStackProps<
|
|
623
|
+
T extends React.ElementType = "div",
|
|
624
|
+
> {
|
|
948
625
|
/**
|
|
949
|
-
*
|
|
950
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
951
|
-
* @beta
|
|
626
|
+
* HTML element to render.
|
|
952
627
|
*/
|
|
953
|
-
|
|
954
|
-
weight?: ThemeFontWeightKey$1;
|
|
628
|
+
as?: T;
|
|
955
629
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
*/
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
*/
|
|
965
|
-
export declare
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
630
|
+
|
|
631
|
+
/** @deprecated Use HStack component instead */
|
|
632
|
+
/** @public */
|
|
633
|
+
export declare function Inline<T extends ElementType = "div">(
|
|
634
|
+
props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
|
|
635
|
+
): JSX.Element;
|
|
636
|
+
|
|
637
|
+
/** @deprecated Use HStack component instead */
|
|
638
|
+
/** @public */
|
|
639
|
+
export declare interface InlineProps<
|
|
640
|
+
T extends React.ElementType = "div",
|
|
641
|
+
> extends PaddingProps {
|
|
642
|
+
/**
|
|
643
|
+
* HTML element or component to render.
|
|
644
|
+
*/
|
|
645
|
+
as?: T;
|
|
646
|
+
/**
|
|
647
|
+
* Space between children.
|
|
648
|
+
*/
|
|
649
|
+
gap?: Responsive<SpaceInherit>;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
declare const INTERACTIVE_TAG: readonly ["button", "a"];
|
|
653
|
+
|
|
654
|
+
declare type InteractiveAs<T extends React.ElementType> =
|
|
655
|
+
T extends InteractiveTag ? T : T extends string ? never : T;
|
|
656
|
+
|
|
657
|
+
declare type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
|
|
658
|
+
|
|
659
|
+
declare const JUSTIFY_CONTENT: readonly [
|
|
660
|
+
"flex-start",
|
|
661
|
+
"flex-end",
|
|
662
|
+
"center",
|
|
663
|
+
"space-between",
|
|
664
|
+
"space-around",
|
|
665
|
+
"space-evenly",
|
|
666
|
+
];
|
|
667
|
+
|
|
668
|
+
/** @public */
|
|
669
|
+
export declare type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
|
|
670
|
+
|
|
671
|
+
/** @beta */
|
|
672
|
+
export declare function Label(props: LabelProps): JSX.Element;
|
|
673
|
+
|
|
674
|
+
/** @beta */
|
|
675
|
+
export declare interface LabelProps
|
|
676
|
+
extends React.ComponentProps<"label">, MarginProps {
|
|
677
|
+
/**
|
|
678
|
+
* Renders the label in a muted color.
|
|
679
|
+
*/
|
|
680
|
+
disabled?: boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Renders the label in the error color.
|
|
683
|
+
* @remarks Use when the linked input has a validation error.
|
|
684
|
+
*/
|
|
685
|
+
error?: boolean;
|
|
971
686
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
687
|
+
|
|
688
|
+
/** @public */
|
|
689
|
+
export declare interface LayoutProps
|
|
690
|
+
extends
|
|
691
|
+
ToneProps,
|
|
692
|
+
WidthProps,
|
|
693
|
+
HeightProps,
|
|
694
|
+
MarginProps,
|
|
695
|
+
BorderProps,
|
|
696
|
+
PaddingProps,
|
|
697
|
+
PositionProps,
|
|
698
|
+
OverflowProps,
|
|
699
|
+
FlexChildProps,
|
|
700
|
+
GridChildProps,
|
|
701
|
+
ZIndexProps,
|
|
702
|
+
ShadowProps {}
|
|
703
|
+
|
|
704
|
+
/** @beta */
|
|
705
|
+
export declare function Link({ underlined, ...props }: LinkProps): JSX.Element;
|
|
706
|
+
|
|
707
|
+
/** @beta */
|
|
708
|
+
export declare interface LinkProps extends React.ComponentProps<"a"> {
|
|
709
|
+
/**
|
|
710
|
+
* Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
|
|
711
|
+
*/
|
|
712
|
+
openInNewTab?: boolean;
|
|
986
713
|
/**
|
|
987
|
-
*
|
|
714
|
+
* Underlines the link.
|
|
988
715
|
*/
|
|
989
|
-
|
|
990
|
-
customValidity?: string;
|
|
991
|
-
}
|
|
992
|
-
/**
|
|
993
|
-
* The `Select` component provides control of options.
|
|
994
|
-
*
|
|
995
|
-
* @public
|
|
996
|
-
*/
|
|
997
|
-
export declare function Select(props: SelectProps & Omit<React.HTMLProps<HTMLSelectElement>, 'as'>): import("react").JSX.Element;
|
|
998
|
-
/**
|
|
999
|
-
* @public
|
|
1000
|
-
*/
|
|
1001
|
-
interface SpinnerProps {
|
|
1002
|
-
muted?: boolean;
|
|
1003
|
-
size?: number | number[];
|
|
716
|
+
underlined?: boolean;
|
|
1004
717
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
718
|
+
|
|
719
|
+
/** @beta */
|
|
720
|
+
export declare const List: typeof ListRoot;
|
|
721
|
+
|
|
722
|
+
declare const LIST_TAG: readonly ["ol", "ul"];
|
|
723
|
+
|
|
724
|
+
declare function ListButtonItem<T extends ElementType = "button">({
|
|
725
|
+
density,
|
|
726
|
+
...props
|
|
727
|
+
}: ListButtonItemProps<T> &
|
|
728
|
+
Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): JSX.Element;
|
|
729
|
+
|
|
730
|
+
/** @beta */
|
|
731
|
+
export declare interface ListButtonItemProps<
|
|
732
|
+
T extends React_2.ElementType = "button",
|
|
733
|
+
> extends ListItemProps {
|
|
1016
734
|
/**
|
|
1017
|
-
*
|
|
735
|
+
* Element or component to render for the press target.
|
|
1018
736
|
*/
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* @public
|
|
1023
|
-
*/
|
|
1024
|
-
type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>;
|
|
1025
|
-
/**
|
|
1026
|
-
* The `Stack` component is used to place elements on top of each other.
|
|
1027
|
-
*
|
|
1028
|
-
* @public
|
|
1029
|
-
*/
|
|
1030
|
-
export declare const Stack: <E extends ElementType = 'div'>(props: StackProps<E>) => React.JSX.Element;
|
|
1031
|
-
/**
|
|
1032
|
-
* @public
|
|
1033
|
-
*/
|
|
1034
|
-
interface SwitchProps {
|
|
1035
|
-
indeterminate?: boolean;
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
1039
|
-
*
|
|
1040
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
1041
|
-
*
|
|
1042
|
-
* @public
|
|
1043
|
-
*/
|
|
1044
|
-
export declare function Switch(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & SwitchProps): import("react").JSX.Element;
|
|
1045
|
-
/**
|
|
1046
|
-
* @public
|
|
1047
|
-
*/
|
|
1048
|
-
interface TextOwnProps {
|
|
1049
|
-
accent?: boolean;
|
|
1050
|
-
align?: TextAlign | TextAlign[];
|
|
1051
|
-
/** When `true` the text color will be muted. */
|
|
1052
|
-
muted?: boolean;
|
|
1053
|
-
size?: number | number[];
|
|
737
|
+
as?: InteractiveAs<T>;
|
|
1054
738
|
/**
|
|
1055
|
-
*
|
|
1056
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
1057
|
-
* @beta
|
|
739
|
+
* Marks the row as the current selection.
|
|
1058
740
|
*/
|
|
1059
|
-
|
|
1060
|
-
weight?: ThemeFontWeightKey$1;
|
|
741
|
+
selected?: boolean;
|
|
1061
742
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
* @public
|
|
1070
|
-
*/
|
|
1071
|
-
export declare const Text: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element;
|
|
1072
|
-
/**
|
|
1073
|
-
* @public
|
|
1074
|
-
*/
|
|
1075
|
-
interface TextAreaProps extends ResponsiveRadiusProps {
|
|
743
|
+
|
|
744
|
+
declare function ListItem({ density, ...props }: ListItemProps): JSX.Element;
|
|
745
|
+
|
|
746
|
+
declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
|
|
747
|
+
|
|
748
|
+
/** @beta */
|
|
749
|
+
export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
|
|
1076
750
|
/**
|
|
1077
|
-
*
|
|
751
|
+
* Sets horizontal padding, gap, and minimum row height together.
|
|
1078
752
|
*/
|
|
1079
|
-
|
|
1080
|
-
border?: boolean;
|
|
1081
|
-
customValidity?: string;
|
|
1082
|
-
fontSize?: number | number[];
|
|
1083
|
-
padding?: number | number[];
|
|
1084
|
-
weight?: ThemeFontWeightKey$1;
|
|
1085
|
-
}
|
|
1086
|
-
/**
|
|
1087
|
-
* A multiline text input.
|
|
1088
|
-
*
|
|
1089
|
-
* @public
|
|
1090
|
-
*/
|
|
1091
|
-
export declare function TextArea(props: TextAreaProps & Omit<React.HTMLProps<HTMLTextAreaElement>, 'as'>): import("react").JSX.Element;
|
|
1092
|
-
/**
|
|
1093
|
-
* @public
|
|
1094
|
-
*/
|
|
1095
|
-
type TextInputClearButtonProps = ButtonOwnProps & Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>;
|
|
1096
|
-
/**
|
|
1097
|
-
* @public
|
|
1098
|
-
*/
|
|
1099
|
-
type TextInputType = 'search' | 'date' | 'datetime-local' | 'email' | 'url' | 'month' | 'number' | 'password' | 'tel' | 'time' | 'text' | 'week' | 'color';
|
|
1100
|
-
/**
|
|
1101
|
-
* @public
|
|
1102
|
-
*/
|
|
1103
|
-
interface TextInputProps {
|
|
753
|
+
density?: Responsive<Density>;
|
|
1104
754
|
/**
|
|
1105
|
-
*
|
|
755
|
+
* Slot at the left edge of the row.
|
|
1106
756
|
*/
|
|
1107
|
-
|
|
1108
|
-
border?: boolean;
|
|
757
|
+
start?: React_2.ReactNode;
|
|
1109
758
|
/**
|
|
1110
|
-
*
|
|
759
|
+
* Slot at the right edge of the row.
|
|
1111
760
|
*/
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
761
|
+
end?: React_2.ReactNode;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
declare function ListItemText<T extends ElementType = "div">(
|
|
765
|
+
props: ListItemTextProps<T> &
|
|
766
|
+
Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>,
|
|
767
|
+
): JSX.Element;
|
|
768
|
+
|
|
769
|
+
/** @beta */
|
|
770
|
+
export declare interface ListItemTextProps<
|
|
771
|
+
T extends React_2.ElementType = "div",
|
|
772
|
+
> {
|
|
1117
773
|
/**
|
|
1118
|
-
*
|
|
774
|
+
* HTML element to render.
|
|
1119
775
|
*/
|
|
1120
|
-
|
|
1121
|
-
padding?: number | number[];
|
|
1122
|
-
prefix?: React.ReactNode;
|
|
1123
|
-
radius?: Radius | Radius[];
|
|
776
|
+
as?: T;
|
|
1124
777
|
/**
|
|
1125
|
-
*
|
|
778
|
+
* Main label.
|
|
1126
779
|
*/
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
* Single line text input.
|
|
1135
|
-
*
|
|
1136
|
-
* @public
|
|
1137
|
-
*/
|
|
1138
|
-
export declare function TextInput(props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>): import("react").JSX.Element;
|
|
1139
|
-
/**
|
|
1140
|
-
* @internal
|
|
1141
|
-
*/
|
|
1142
|
-
interface ThemeProps {
|
|
1143
|
-
theme: Theme$1;
|
|
1144
|
-
}
|
|
1145
|
-
/**
|
|
1146
|
-
* @internal
|
|
1147
|
-
*/
|
|
1148
|
-
interface ResponsiveFontSizeStyleProps {
|
|
1149
|
-
$size: number[];
|
|
1150
|
-
}
|
|
1151
|
-
/**
|
|
1152
|
-
* @internal
|
|
1153
|
-
*/
|
|
1154
|
-
interface FontWeightStyleProps {
|
|
1155
|
-
$weight?: ThemeFontWeightKey$1;
|
|
1156
|
-
}
|
|
1157
|
-
/**
|
|
1158
|
-
* @internal
|
|
1159
|
-
*/
|
|
1160
|
-
interface ResponsiveTextAlignStyleProps {
|
|
1161
|
-
$align: TextAlign[];
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* @internal
|
|
1165
|
-
*/
|
|
1166
|
-
interface ResponsiveFontStyleProps extends FontWeightStyleProps, ResponsiveFontSizeStyleProps, ResponsiveTextAlignStyleProps {
|
|
1167
|
-
$accent?: boolean;
|
|
1168
|
-
$muted?: boolean;
|
|
1169
|
-
}
|
|
1170
|
-
/**
|
|
1171
|
-
* Get responsive CSS for the `code` font style.
|
|
1172
|
-
* @internal
|
|
1173
|
-
*/
|
|
1174
|
-
export declare function responsiveCodeFontStyle(props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps): CSSObject[];
|
|
1175
|
-
/**
|
|
1176
|
-
* Get responsive CSS for the `heading` font style.
|
|
1177
|
-
* @internal
|
|
1178
|
-
*/
|
|
1179
|
-
export declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1180
|
-
/**
|
|
1181
|
-
* Get responsive CSS for the `label` font style.
|
|
1182
|
-
* @internal
|
|
1183
|
-
*/
|
|
1184
|
-
export declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1185
|
-
/**
|
|
1186
|
-
* Get responsive text align styles.
|
|
1187
|
-
* @internal
|
|
1188
|
-
*/
|
|
1189
|
-
export declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
|
|
1190
|
-
/**
|
|
1191
|
-
* Get responsive CSS for the `text` font style.
|
|
1192
|
-
* @internal
|
|
1193
|
-
*/
|
|
1194
|
-
export declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1195
|
-
/**
|
|
1196
|
-
* @internal
|
|
1197
|
-
*/
|
|
1198
|
-
export declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
|
|
1199
|
-
/**
|
|
1200
|
-
* @public
|
|
1201
|
-
*/
|
|
1202
|
-
export declare function rem(pixelValue: number): string | 0;
|
|
1203
|
-
/**
|
|
1204
|
-
* @internal
|
|
1205
|
-
*/
|
|
1206
|
-
export declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
|
|
1207
|
-
/**
|
|
1208
|
-
* @internal
|
|
1209
|
-
*/
|
|
1210
|
-
export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
|
|
1211
|
-
/**
|
|
1212
|
-
* @internal
|
|
1213
|
-
*/
|
|
1214
|
-
export declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
|
|
1215
|
-
/**
|
|
1216
|
-
* @public
|
|
1217
|
-
*/
|
|
1218
|
-
interface ThemeColorProviderProps {
|
|
1219
|
-
children?: React.ReactNode;
|
|
1220
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
1221
|
-
tone?: ThemeColorCardToneKey;
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
* @public
|
|
1225
|
-
*/
|
|
1226
|
-
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
|
|
1227
|
-
/**
|
|
1228
|
-
* @public
|
|
1229
|
-
*/
|
|
1230
|
-
interface ThemeProviderProps {
|
|
1231
|
-
children?: React.ReactNode;
|
|
1232
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
1233
|
-
theme?: RootTheme$1;
|
|
1234
|
-
tone?: ThemeColorCardToneKey;
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* @public
|
|
1238
|
-
*/
|
|
1239
|
-
export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
|
|
1240
|
-
/**
|
|
1241
|
-
* @public
|
|
1242
|
-
*/
|
|
1243
|
-
interface ThemeContextValue {
|
|
1244
|
-
/** @deprecated No longer used */
|
|
1245
|
-
version: 0.0;
|
|
1246
|
-
scheme: ThemeColorSchemeKey$1;
|
|
1247
|
-
theme: RootTheme$1;
|
|
1248
|
-
tone: ThemeColorCardToneKey;
|
|
1249
|
-
}
|
|
1250
|
-
/**
|
|
1251
|
-
* @public
|
|
1252
|
-
*/
|
|
1253
|
-
export declare function useRootTheme(): ThemeContextValue;
|
|
1254
|
-
/**
|
|
1255
|
-
* @public
|
|
1256
|
-
*/
|
|
1257
|
-
export declare function useTheme(): Theme$1;
|
|
1258
|
-
/**
|
|
1259
|
-
* @public
|
|
1260
|
-
*/
|
|
1261
|
-
export declare function useTheme_v2(): Theme_v2;
|
|
1262
|
-
/** @internal */
|
|
1263
|
-
export declare function Arrow(props: {
|
|
1264
|
-
width: number;
|
|
1265
|
-
height: number;
|
|
1266
|
-
radius?: number;
|
|
1267
|
-
} & Omit<HTMLProps<HTMLDivElement>, 'width' | 'height'>): React.JSX.Element;
|
|
1268
|
-
/**
|
|
1269
|
-
* @public
|
|
1270
|
-
*/
|
|
1271
|
-
interface BoundaryElementProviderProps {
|
|
1272
|
-
children: React.ReactNode;
|
|
1273
|
-
element: HTMLElement | null;
|
|
1274
|
-
}
|
|
1275
|
-
/**
|
|
1276
|
-
* @public
|
|
1277
|
-
*/
|
|
1278
|
-
export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
|
|
1279
|
-
/**
|
|
1280
|
-
* @public
|
|
1281
|
-
*/
|
|
1282
|
-
interface BoundaryElementContextValue {
|
|
1283
|
-
version: 0.0;
|
|
1284
|
-
element: HTMLElement | null;
|
|
1285
|
-
}
|
|
1286
|
-
/**
|
|
1287
|
-
* @public
|
|
1288
|
-
*/
|
|
1289
|
-
export declare function useBoundaryElement(): BoundaryElementContextValue;
|
|
1290
|
-
/**
|
|
1291
|
-
* @internal
|
|
1292
|
-
* @deprecated ConditionalWrapper was removed in @sanity/ui v4. Inline the conditional wrapping logic instead.
|
|
1293
|
-
*/
|
|
1294
|
-
export declare function ConditionalWrapper(_props?: never): never;
|
|
1295
|
-
/**
|
|
1296
|
-
* DO NOT USE IN PRODUCTION.
|
|
1297
|
-
* @beta
|
|
1298
|
-
*/
|
|
1299
|
-
interface MediaQueryProps {
|
|
1300
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1301
|
-
media?: number[];
|
|
1302
|
-
}
|
|
1303
|
-
/**
|
|
1304
|
-
* DO NOT USE IN PRODUCTION.
|
|
1305
|
-
* @beta
|
|
1306
|
-
*/
|
|
1307
|
-
export declare function ElementQuery(props: MediaQueryProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'media'>): import("react").JSX.Element;
|
|
1308
|
-
/**
|
|
1309
|
-
* DO NOT USE IN PRODUCTION
|
|
1310
|
-
* @beta
|
|
1311
|
-
*/
|
|
1312
|
-
type ErrorBoundaryProps = PropsWithChildren<{
|
|
1313
|
-
onCatch: (params: {
|
|
1314
|
-
error: Error;
|
|
1315
|
-
info: React.ErrorInfo;
|
|
1316
|
-
}) => void;
|
|
1317
|
-
}>;
|
|
1318
|
-
/**
|
|
1319
|
-
* DO NOT USE IN PRODUCTION
|
|
1320
|
-
* @beta
|
|
1321
|
-
*/
|
|
1322
|
-
interface ErrorBoundaryState {
|
|
1323
|
-
error: Error | null;
|
|
780
|
+
title?: React_2.ReactNode;
|
|
781
|
+
/**
|
|
782
|
+
* Text below the title.
|
|
783
|
+
*/
|
|
784
|
+
subtitle?: React_2.ReactNode;
|
|
1324
785
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
786
|
+
|
|
787
|
+
/** @beta */
|
|
788
|
+
export declare interface ListProps<T extends ListTag = "ul"> extends Pick<
|
|
789
|
+
GapProps,
|
|
790
|
+
"gap"
|
|
791
|
+
> {
|
|
792
|
+
/**
|
|
793
|
+
* HTML element to render.
|
|
794
|
+
*/
|
|
795
|
+
as?: T;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
declare function ListRoot<T extends ListTag = "ul">(
|
|
799
|
+
props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>,
|
|
800
|
+
): JSX.Element;
|
|
801
|
+
|
|
802
|
+
declare namespace ListRoot {
|
|
803
|
+
var displayName: string;
|
|
804
|
+
var Item: typeof ListItem;
|
|
805
|
+
var ButtonItem: typeof ListButtonItem;
|
|
806
|
+
var ItemText: typeof ListItemText;
|
|
807
|
+
var ItemImage: typeof ListItemImage;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
declare type ListTag = (typeof LIST_TAG)[number];
|
|
811
|
+
|
|
812
|
+
/** @public */
|
|
813
|
+
export declare type MarginProps = {
|
|
814
|
+
/** CSS **margin** property */
|
|
815
|
+
margin?: Responsive<SpaceAutoNegative>;
|
|
816
|
+
/** CSS **margin-left** and **margin-right** properties */
|
|
817
|
+
marginX?: Responsive<SpaceAutoNegative>;
|
|
818
|
+
/** CSS **margin-top** and **margin-bottom** properties */
|
|
819
|
+
marginY?: Responsive<SpaceAutoNegative>;
|
|
820
|
+
/** CSS **margin-top** property */
|
|
821
|
+
marginTop?: Responsive<SpaceAutoNegative>;
|
|
822
|
+
/** CSS **margin-right** property */
|
|
823
|
+
marginRight?: Responsive<SpaceAutoNegative>;
|
|
824
|
+
/** CSS **margin-bottom** property */
|
|
825
|
+
marginBottom?: Responsive<SpaceAutoNegative>;
|
|
826
|
+
/** CSS **margin-left** property */
|
|
827
|
+
marginLeft?: Responsive<SpaceAutoNegative>;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare const OVERFLOW: readonly [
|
|
831
|
+
"visible",
|
|
832
|
+
"hidden",
|
|
833
|
+
"auto",
|
|
834
|
+
"scroll",
|
|
835
|
+
"clip",
|
|
836
|
+
];
|
|
837
|
+
|
|
838
|
+
/** @public */
|
|
839
|
+
export declare type Overflow = (typeof OVERFLOW)[number];
|
|
840
|
+
|
|
841
|
+
declare type OverflowProps = {
|
|
842
|
+
/** CSS **overflow** property */
|
|
843
|
+
overflow?: Responsive<Overflow>;
|
|
844
|
+
/** CSS **overflow-x** property */
|
|
845
|
+
overflowX?: Responsive<Overflow>;
|
|
846
|
+
/** CSS **overflow-y** property */
|
|
847
|
+
overflowY?: Responsive<Overflow>;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
/** @public */
|
|
851
|
+
export declare interface PaddingProps {
|
|
852
|
+
/** CSS **padding** property */
|
|
853
|
+
padding?: Responsive<Space>;
|
|
854
|
+
/** CSS **padding-left** and **padding-right** properties */
|
|
855
|
+
paddingX?: Responsive<Space>;
|
|
856
|
+
/** CSS **padding-top** and **padding-bottom** properties */
|
|
857
|
+
paddingY?: Responsive<Space>;
|
|
858
|
+
/** CSS **padding-top** property */
|
|
859
|
+
paddingTop?: Responsive<Space>;
|
|
860
|
+
/** CSS **padding-right** property */
|
|
861
|
+
paddingRight?: Responsive<Space>;
|
|
862
|
+
/** CSS **padding-bottom** property */
|
|
863
|
+
paddingBottom?: Responsive<Space>;
|
|
864
|
+
/** CSS **padding-left** property */
|
|
865
|
+
paddingLeft?: Responsive<Space>;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
declare const PLACEMENT: readonly [
|
|
869
|
+
"top",
|
|
870
|
+
"top-start",
|
|
871
|
+
"top-end",
|
|
872
|
+
"right",
|
|
873
|
+
"right-start",
|
|
874
|
+
"right-end",
|
|
875
|
+
"bottom",
|
|
876
|
+
"bottom-start",
|
|
877
|
+
"bottom-end",
|
|
878
|
+
"left",
|
|
879
|
+
"left-start",
|
|
880
|
+
"left-end",
|
|
881
|
+
];
|
|
882
|
+
|
|
883
|
+
/** @public */
|
|
884
|
+
export declare type Placement = (typeof PLACEMENT)[number];
|
|
885
|
+
|
|
886
|
+
/** @public */
|
|
887
|
+
export declare type PlacementProps = {
|
|
888
|
+
/** Placement relative to anchor */
|
|
889
|
+
placement?: Placement;
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
/** @beta */
|
|
893
|
+
export declare const Popover: typeof PopoverRoot & {
|
|
894
|
+
forwardsTriggerProps: boolean;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
/** @beta */
|
|
898
|
+
export declare interface PopoverProps
|
|
899
|
+
extends
|
|
900
|
+
Omit<React.ComponentProps<"div">, "children" | "content">,
|
|
901
|
+
PlacementProps {
|
|
902
|
+
/**
|
|
903
|
+
* Shared anchor identifier.
|
|
904
|
+
* @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
|
|
905
|
+
*/
|
|
906
|
+
anchorName?: React.ReactNode;
|
|
907
|
+
/**
|
|
908
|
+
* The trigger element.
|
|
909
|
+
* @remarks Popover clones it and attaches the `popovertarget` attribute that opens the floating layer.
|
|
910
|
+
*/
|
|
911
|
+
children: React.ReactElement<Record<string, unknown>>;
|
|
912
|
+
/**
|
|
913
|
+
* The floating content.
|
|
914
|
+
*/
|
|
915
|
+
content?: React.ReactNode;
|
|
916
|
+
/**
|
|
917
|
+
* Renders the content into `document.body` through a React portal instead of inline.
|
|
918
|
+
*/
|
|
919
|
+
portal?: boolean;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
declare function PopoverRoot({
|
|
923
|
+
placement,
|
|
924
|
+
...props
|
|
925
|
+
}: PopoverProps & {
|
|
926
|
+
triggerProps?: Record<string, unknown>;
|
|
927
|
+
}): JSX.Element;
|
|
928
|
+
|
|
929
|
+
declare const POSITION: readonly [
|
|
930
|
+
"absolute",
|
|
931
|
+
"fixed",
|
|
932
|
+
"relative",
|
|
933
|
+
"static",
|
|
934
|
+
"sticky",
|
|
935
|
+
];
|
|
936
|
+
|
|
937
|
+
/** @public */
|
|
938
|
+
export declare type Position = (typeof POSITION)[number];
|
|
939
|
+
|
|
940
|
+
declare type PositionProps = {
|
|
941
|
+
/** CSS **position** property */
|
|
942
|
+
position?: Responsive<Position>;
|
|
943
|
+
/** CSS **inset** property */
|
|
944
|
+
inset?: Responsive<SpaceAuto>;
|
|
945
|
+
/** CSS **top** property */
|
|
946
|
+
top?: Responsive<SpaceAuto>;
|
|
947
|
+
/** CSS **right** property */
|
|
948
|
+
right?: Responsive<SpaceAuto>;
|
|
949
|
+
/** CSS **bottom** property */
|
|
950
|
+
bottom?: Responsive<SpaceAuto>;
|
|
951
|
+
/** CSS **left** property */
|
|
952
|
+
left?: Responsive<SpaceAuto>;
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/** @public */
|
|
956
|
+
export declare function PressArea<T extends ElementType = "button">(
|
|
957
|
+
props: PressAreaProps<T> &
|
|
958
|
+
Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>,
|
|
959
|
+
): JSX.Element;
|
|
960
|
+
|
|
961
|
+
/** @public */
|
|
962
|
+
export declare interface PressAreaProps<
|
|
963
|
+
T extends React.ElementType = "button",
|
|
964
|
+
> {
|
|
965
|
+
/**
|
|
966
|
+
* Element or component to render.
|
|
967
|
+
*/
|
|
968
|
+
as?: InteractiveAs<T>;
|
|
1334
969
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
970
|
+
|
|
971
|
+
/** @beta */
|
|
972
|
+
export declare function Radio(props: RadioProps): JSX.Element;
|
|
973
|
+
|
|
974
|
+
/** @beta */
|
|
975
|
+
export declare interface RadioProps
|
|
976
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
977
|
+
/**
|
|
978
|
+
* Applies error styling to the radio mark.
|
|
979
|
+
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
980
|
+
*/
|
|
981
|
+
error?: boolean;
|
|
982
|
+
/**
|
|
983
|
+
* Visible label next to the radio.
|
|
984
|
+
*/
|
|
985
|
+
label: React.ReactNode;
|
|
1341
986
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
987
|
+
|
|
988
|
+
declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
|
|
989
|
+
|
|
990
|
+
/** @public */
|
|
991
|
+
export declare type Radius = (typeof RADIUS)[number];
|
|
992
|
+
|
|
993
|
+
/** @public */
|
|
994
|
+
export declare type Responsive<T> =
|
|
995
|
+
| T
|
|
996
|
+
| []
|
|
997
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
998
|
+
length: 1;
|
|
999
|
+
})
|
|
1000
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1001
|
+
length: 2;
|
|
1002
|
+
})
|
|
1003
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1004
|
+
length: 3;
|
|
1005
|
+
})
|
|
1006
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1007
|
+
length: 4;
|
|
1008
|
+
})
|
|
1009
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1010
|
+
length: 5;
|
|
1011
|
+
})
|
|
1012
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1013
|
+
length: 6;
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
|
|
1017
|
+
|
|
1018
|
+
/** @public */
|
|
1019
|
+
export declare type Shadow = (typeof SHADOW)[number];
|
|
1020
|
+
|
|
1021
|
+
declare type ShadowProps = {
|
|
1022
|
+
/** CSS **box-shadow** property */
|
|
1023
|
+
shadow?: Shadow;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
/** @beta */
|
|
1027
|
+
export declare function SkipToContent(props: SkipToContentProps): JSX.Element;
|
|
1028
|
+
|
|
1029
|
+
/** @beta */
|
|
1030
|
+
export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
|
|
1031
|
+
/**
|
|
1032
|
+
* Same-page fragment to jump to.
|
|
1033
|
+
* @remarks Note: The hash character # is required for proper linking.
|
|
1034
|
+
*/
|
|
1035
|
+
href: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* Visible and announced text.
|
|
1038
|
+
*/
|
|
1039
|
+
label: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* Not accepted.
|
|
1042
|
+
* @remarks Pass text via `label`.
|
|
1043
|
+
*/
|
|
1044
|
+
children?: never;
|
|
1354
1045
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1046
|
+
|
|
1047
|
+
declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
1048
|
+
|
|
1049
|
+
/** @public */
|
|
1050
|
+
export declare type Space = (typeof SPACE)[number];
|
|
1051
|
+
|
|
1052
|
+
declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
|
|
1053
|
+
|
|
1054
|
+
declare const SPACE_AUTO_NEGATIVE: readonly [
|
|
1055
|
+
-9,
|
|
1056
|
+
-8,
|
|
1057
|
+
-7,
|
|
1058
|
+
-6,
|
|
1059
|
+
-5,
|
|
1060
|
+
-4,
|
|
1061
|
+
-3,
|
|
1062
|
+
-2,
|
|
1063
|
+
-1,
|
|
1064
|
+
0,
|
|
1065
|
+
1,
|
|
1066
|
+
2,
|
|
1067
|
+
3,
|
|
1068
|
+
4,
|
|
1069
|
+
5,
|
|
1070
|
+
6,
|
|
1071
|
+
7,
|
|
1072
|
+
8,
|
|
1073
|
+
9,
|
|
1074
|
+
"auto",
|
|
1075
|
+
];
|
|
1076
|
+
|
|
1077
|
+
declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
|
|
1078
|
+
|
|
1079
|
+
/** @public */
|
|
1080
|
+
export declare type SpaceAuto = (typeof SPACE_AUTO)[number];
|
|
1081
|
+
|
|
1082
|
+
/** @public */
|
|
1083
|
+
export declare type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
|
|
1084
|
+
|
|
1085
|
+
/** @public */
|
|
1086
|
+
export declare type SpaceInherit = (typeof SPACE_INHERIT)[number];
|
|
1087
|
+
|
|
1088
|
+
/** @public */
|
|
1089
|
+
export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
|
|
1090
|
+
|
|
1091
|
+
/** @public */
|
|
1092
|
+
export declare interface SpinnerProps extends React.ComponentProps<"svg"> {
|
|
1364
1093
|
/**
|
|
1365
|
-
*
|
|
1094
|
+
* Size of the spinner icon.
|
|
1366
1095
|
*/
|
|
1367
|
-
|
|
1096
|
+
size?: Responsive<IconSize>;
|
|
1368
1097
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
/**
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
interface PortalProviderProps {
|
|
1098
|
+
|
|
1099
|
+
/** @beta */
|
|
1100
|
+
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
1101
|
+
|
|
1102
|
+
/** @beta */
|
|
1103
|
+
export declare interface SwitchProps
|
|
1104
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
1377
1105
|
/**
|
|
1378
|
-
*
|
|
1106
|
+
* Applies error styling to the switch track.
|
|
1107
|
+
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
1379
1108
|
*/
|
|
1380
|
-
|
|
1381
|
-
children: React.ReactNode;
|
|
1382
|
-
element?: HTMLElement | null;
|
|
1109
|
+
error?: boolean;
|
|
1383
1110
|
/**
|
|
1384
|
-
*
|
|
1111
|
+
* Visible label next to the switch.
|
|
1385
1112
|
*/
|
|
1386
|
-
|
|
1113
|
+
label: React.ReactNode;
|
|
1387
1114
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1115
|
+
|
|
1116
|
+
/** @public */
|
|
1117
|
+
declare function Text_2<T extends ElementType = "span">({
|
|
1118
|
+
size,
|
|
1119
|
+
...props
|
|
1120
|
+
}: TextProps<T> &
|
|
1121
|
+
Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): JSX.Element;
|
|
1122
|
+
export { Text_2 as Text };
|
|
1123
|
+
|
|
1124
|
+
declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
|
|
1125
|
+
|
|
1126
|
+
declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
|
|
1127
|
+
|
|
1128
|
+
/** @public */
|
|
1129
|
+
export declare type TextAlign = (typeof TEXT_ALIGN)[number];
|
|
1130
|
+
|
|
1131
|
+
/** @public */
|
|
1132
|
+
export declare interface TextProps<
|
|
1133
|
+
T extends React.ElementType = "span",
|
|
1134
|
+
> extends TypographyProps {
|
|
1135
|
+
/**
|
|
1136
|
+
* HTML element to render.
|
|
1137
|
+
*/
|
|
1138
|
+
as?: T;
|
|
1139
|
+
/**
|
|
1140
|
+
* Sets font size.
|
|
1141
|
+
*/
|
|
1142
|
+
size?: Responsive<TextSize>;
|
|
1411
1143
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1144
|
+
|
|
1145
|
+
/** @public */
|
|
1146
|
+
export declare type TextSize = (typeof TEXT_SIZE)[number];
|
|
1147
|
+
|
|
1148
|
+
declare const TONE: readonly [
|
|
1149
|
+
"neutral",
|
|
1150
|
+
"positive",
|
|
1151
|
+
"suggest",
|
|
1152
|
+
"caution",
|
|
1153
|
+
"critical",
|
|
1154
|
+
];
|
|
1155
|
+
|
|
1156
|
+
/** @public */
|
|
1157
|
+
export declare type Tone = (typeof TONE)[number];
|
|
1158
|
+
|
|
1159
|
+
declare type ToneProps = {
|
|
1160
|
+
/** CSS **background-color** property */
|
|
1161
|
+
tone?: Tone;
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
/** @beta */
|
|
1165
|
+
export declare const Tooltip: typeof TooltipRoot;
|
|
1166
|
+
|
|
1167
|
+
/** @public */
|
|
1168
|
+
export declare function TooltipGroup<T extends ElementType = "div">(
|
|
1169
|
+
props: TooltipGroupProps<T> &
|
|
1170
|
+
Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>,
|
|
1171
|
+
): JSX.Element;
|
|
1172
|
+
|
|
1173
|
+
/** @public */
|
|
1174
|
+
export declare interface TooltipGroupProps<
|
|
1175
|
+
T extends React.ElementType = "div",
|
|
1176
|
+
> {
|
|
1177
|
+
/**
|
|
1178
|
+
* HTML element to render.
|
|
1179
|
+
*/
|
|
1180
|
+
as?: T;
|
|
1426
1181
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1182
|
+
|
|
1183
|
+
/** @beta */
|
|
1184
|
+
export declare interface TooltipProps
|
|
1185
|
+
extends
|
|
1186
|
+
Omit<React.ComponentProps<"div">, "children" | "content">,
|
|
1187
|
+
PlacementProps {
|
|
1188
|
+
/**
|
|
1189
|
+
* Shared anchor identifier.
|
|
1190
|
+
*/
|
|
1191
|
+
anchorName?: React.ReactNode;
|
|
1192
|
+
/**
|
|
1193
|
+
* The trigger element.
|
|
1194
|
+
*/
|
|
1195
|
+
children: React.ReactElement<Record<string, unknown>>;
|
|
1196
|
+
/**
|
|
1197
|
+
* The tooltip label.
|
|
1198
|
+
*/
|
|
1199
|
+
content?: React.ReactNode;
|
|
1200
|
+
/**
|
|
1201
|
+
* Renders the label into `document.body` through a React portal instead of inline.
|
|
1202
|
+
*/
|
|
1203
|
+
portal?: boolean;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
declare function TooltipRoot({
|
|
1207
|
+
placement,
|
|
1208
|
+
...props
|
|
1209
|
+
}: TooltipProps & {
|
|
1210
|
+
triggerProps?: Record<string, unknown>;
|
|
1211
|
+
}): JSX.Element;
|
|
1212
|
+
|
|
1213
|
+
/** @public */
|
|
1214
|
+
export declare interface TypographyProps extends MarginProps, ToneProps {
|
|
1215
|
+
/** CSS **text-align** property */
|
|
1216
|
+
align?: Responsive<TextAlign>;
|
|
1217
|
+
/** CSS **color** property */
|
|
1218
|
+
muted?: boolean;
|
|
1219
|
+
/** CSS **text-box-trim** property */
|
|
1220
|
+
trim?: boolean;
|
|
1221
|
+
/** Number of lines to truncate */
|
|
1222
|
+
truncate?: Responsive<number>;
|
|
1223
|
+
/** CSS **font-weight** property */
|
|
1224
|
+
weight?: FontWeight;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/** @public */
|
|
1228
|
+
export declare function useIsClient(): boolean;
|
|
1229
|
+
|
|
1230
|
+
/** @public */
|
|
1231
|
+
export declare function VisuallyHidden<T extends ElementType = "span">(
|
|
1232
|
+
props: VisuallyHiddenProps<T> &
|
|
1233
|
+
Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>,
|
|
1234
|
+
): JSX.Element;
|
|
1235
|
+
|
|
1236
|
+
/** @public */
|
|
1237
|
+
export declare interface VisuallyHiddenProps<
|
|
1238
|
+
T extends React.ElementType = "span",
|
|
1239
|
+
> {
|
|
1240
|
+
/**
|
|
1241
|
+
* HTML element to render.
|
|
1242
|
+
*/
|
|
1243
|
+
as?: T;
|
|
1244
|
+
/**
|
|
1245
|
+
* If true, the element becomes visible on `:focus-visible`.
|
|
1246
|
+
*/
|
|
1247
|
+
visibleOnFocus?: boolean;
|
|
1437
1248
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
/** @
|
|
1445
|
-
export
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
export type AutocompleteValueChangeMsg = never;
|
|
1470
|
-
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1471
|
-
export type BaseAutocompleteOption = never;
|
|
1472
|
-
/** @deprecated Moved to `@sanity/ui/breadcrumbs` */
|
|
1473
|
-
export declare const Breadcrumbs: never;
|
|
1474
|
-
/** @deprecated Moved to `@sanity/ui/breadcrumbs` */
|
|
1475
|
-
export type BreadcrumbsProps = never;
|
|
1476
|
-
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1477
|
-
export declare const Code: never;
|
|
1478
|
-
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1479
|
-
export type CodeOwnProps = never;
|
|
1480
|
-
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1481
|
-
export type CodeProps = never;
|
|
1482
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1483
|
-
export declare const Menu: never;
|
|
1484
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1485
|
-
export declare const MenuButton: never;
|
|
1486
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1487
|
-
export type MenuButtonProps = never;
|
|
1488
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1489
|
-
export declare const MenuDivider: never;
|
|
1490
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1491
|
-
export type MenuDividerProps = never;
|
|
1492
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1493
|
-
export declare const MenuGroup: never;
|
|
1494
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1495
|
-
export type MenuGroupOwnProps = never;
|
|
1496
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1497
|
-
export type MenuGroupProps = never;
|
|
1498
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1499
|
-
export declare const MenuItem: never;
|
|
1500
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1501
|
-
export type MenuItemOwnProps = never;
|
|
1502
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1503
|
-
export type MenuItemProps = never;
|
|
1504
|
-
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1505
|
-
export type MenuProps = never;
|
|
1506
|
-
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1507
|
-
export declare const Popover: never;
|
|
1508
|
-
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1509
|
-
export type PopoverMargins = never;
|
|
1510
|
-
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1511
|
-
export type PopoverProps = never;
|
|
1512
|
-
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1513
|
-
export type PopoverUpdateCallback = never;
|
|
1514
|
-
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1515
|
-
export type PopoverWidth = never;
|
|
1516
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1517
|
-
export declare const Toast: never;
|
|
1518
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1519
|
-
export type ToastContextValue = never;
|
|
1520
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1521
|
-
export type ToastParams = never;
|
|
1522
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1523
|
-
export type ToastProps = never;
|
|
1524
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1525
|
-
export declare const ToastProvider: never;
|
|
1526
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1527
|
-
export type ToastProviderProps = never;
|
|
1528
|
-
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1529
|
-
export declare const useToast: never;
|
|
1530
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1531
|
-
export declare const Tooltip: never;
|
|
1532
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1533
|
-
export declare const TooltipDelayGroupContext: never;
|
|
1534
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1535
|
-
export type TooltipDelayGroupContextValue = never;
|
|
1536
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1537
|
-
export declare const TooltipDelayGroupProvider: never;
|
|
1538
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1539
|
-
export type TooltipDelayGroupProviderProps = never;
|
|
1540
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1541
|
-
export type TooltipProps = never;
|
|
1542
|
-
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1543
|
-
export declare const useTooltipDelayGroup: never;
|
|
1544
|
-
export { type ArrayPropPrimitive, type Assign, type AvatarCounterProps, type AvatarOwnProps, type AvatarPosition, type AvatarProps, type AvatarRootStyleProps, type AvatarSize, type AvatarStackProps, type AvatarStatus, type BadgeMode, type BadgeOwnProps, type BadgeProps, type BadgeTone, type BaseTheme, type BoundaryElementContextValue, type BoundaryElementProviderProps, Box, type BoxDisplay, type BoxHeight, type BoxOverflow, type BoxOwnProps, type BoxProps, type BoxShadow, type BoxSizing, Button, type ButtonMode, type ButtonOwnProps, type ButtonProps, type ButtonTextAlign, type ButtonTone, type ButtonWidth, type CardOwnProps, type CardProps, type CardStyleProps, type CardTone, type CheckboxProps, type ClickOutsideElements, type ClickOutsideEventElements, type ClickOutsideEventListener, type ClickOutsideListener, type CodeSkeletonProps, type ComponentType, type ContainerOwnProps, type ContainerProps, type Delay, type DialogContextValue, type DialogPosition, type DialogProps, type DialogProviderProps, type ElementRectValue, type ElementSize, type ElementType, type EmptyProps, type ErrorBoundaryProps, type ErrorBoundaryState, type FlexAlign, type FlexDirection, type FlexJustify, type FlexOwnProps, type FlexProps, type FlexValue, type FlexWrap, type FontWeightStyleProps, type GridAutoCols, type GridAutoFlow, type GridAutoRows, type GridItemColumn, type GridItemColumnEnd, type GridItemColumnStart, type GridItemRow, type GridItemRowEnd, type GridItemRowStart, type GridOwnProps, type GridProps, type HSL, type HeadingOwnProps, type HeadingProps, type HeadingSkeletonProps, type HotkeysProps, type InlineOwnProps, type InlineProps, type KBDOwnProps, type KBDProps, type LabelOwnProps, type LabelProps, type LabelSkeletonProps, Layer, type LayerContextValue, type LayerProps, type LayerProviderProps, type MediaQueryProps, type PartialThemeColorBuilderOpts, type Placement, type PortalContextValue, type PortalProps, type PortalProviderProps, type Props, type RGB, type RadioProps, type Radius, type ResponsiveAvatarSizeStyleProps, type ResponsiveBorderProps, type ResponsiveBoxProps, type ResponsiveFlexItemProps, type ResponsiveFlexProps, type ResponsiveFontSizeStyleProps, type ResponsiveFontStyleProps, type ResponsiveGridItemProps, type ResponsiveGridProps, type ResponsiveMarginProps, type ResponsivePaddingProps, type ResponsiveRadiusProps, type ResponsiveShadowProps, type ResponsiveTextAlignStyleProps, type ResponsiveWidthProps, type ResponsiveWidthStyleProps, type RootTheme, type SelectProps, type SelectableTone, type SkeletonProps, type SpinnerProps, type SrOnlyProps, type StackOwnProps, type StackProps, type Styles, type SwitchProps, type TabListProps, type TabPanelProps, type TabProps, type TagType, type TextAlign, type TextAreaProps, type TextInputClearButtonProps, type TextInputProps, type TextInputType, type TextOwnProps, type TextProps, type TextSkeletonProps, type Theme, type ThemeAvatar, type ThemeColor, type ThemeColorBase, type ThemeColorBuilderOpts, type ThemeColorButton, type ThemeColorButtonModeKey, type ThemeColorButtonState, type ThemeColorButtonStates, type ThemeColorButtonTones, type ThemeColorCard, type ThemeColorCardState, type ThemeColorGenericState, type ThemeColorInput, type ThemeColorInputState, type ThemeColorInputStates, type ThemeColorMuted, type ThemeColorMutedTone, type ThemeColorName, type ThemeColorProviderProps, type ThemeColorScheme, type ThemeColorSchemeKey, type ThemeColorSchemes, type ThemeColorSelectable, type ThemeColorSelectableState, type ThemeColorSelectableStates, type ThemeColorSolid, type ThemeColorSolidTone, type ThemeColorSpot, type ThemeColorSpotKey, type ThemeColorSyntax, type ThemeColorToneKey, type ThemeContextValue, type ThemeFont, type ThemeFontKey, type ThemeFontSize, type ThemeFontWeight, type ThemeFontWeightKey, type ThemeFonts, type ThemeInput, type ThemeLayer, type ThemeProps, type ThemeProviderProps, type ThemeShadow, type TreeContextValue, type TreeItemProps, type TreeProps, type TreeState, type VirtualListChangeOpts, type VirtualListProps, type _ElementSizeListener, type _ElementSizeObserver, type _ElementSizeSubscriber, type _MediaStore };
|
|
1545
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1249
|
+
|
|
1250
|
+
/** @public */
|
|
1251
|
+
export declare function VStack<T extends ElementType = "div">(
|
|
1252
|
+
props: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>,
|
|
1253
|
+
): JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
/** @public */
|
|
1256
|
+
export declare interface VStackProps<
|
|
1257
|
+
T extends React.ElementType = "div",
|
|
1258
|
+
> extends Pick<GapProps, "gap"> {
|
|
1259
|
+
/**
|
|
1260
|
+
* HTML element or component to render.
|
|
1261
|
+
*/
|
|
1262
|
+
as?: T;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
declare type WidthProps = {
|
|
1266
|
+
/** CSS **width** property */
|
|
1267
|
+
width?: Responsive<string>;
|
|
1268
|
+
/** CSS **min-width** property */
|
|
1269
|
+
minWidth?: Responsive<string>;
|
|
1270
|
+
/** CSS **max-width** property */
|
|
1271
|
+
maxWidth?: Responsive<string>;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
declare type ZIndexProps = {
|
|
1275
|
+
/** CSS z-index property */
|
|
1276
|
+
zIndex?: Responsive<number>;
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
export {};
|