@sanity/ui 4.0.0-static.9 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +25 -7
- package/dist/_system-CTe2lb5l.d.ts +40 -0
- package/dist/_system-CTe2lb5l.d.ts.map +1 -0
- package/dist/arrow-CHE8-_G7.js +161 -0
- package/dist/arrow-CHE8-_G7.js.map +1 -0
- package/dist/autocomplete.d.ts +140 -0
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +475 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/breadcrumbs.d.ts +18 -0
- package/dist/breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs.js +116 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/button-dnqMFkWg.d.ts +76 -0
- package/dist/button-dnqMFkWg.d.ts.map +1 -0
- package/dist/button-mxfSqr0n.js +179 -0
- package/dist/button-mxfSqr0n.js.map +1 -0
- package/dist/card-C0a0wQTc.d.ts +7 -0
- package/dist/card-C0a0wQTc.d.ts.map +1 -0
- package/dist/code.d.ts +20 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +90 -0
- package/dist/code.js.map +1 -0
- package/dist/codeFontStyle-DYUujk7K.js +11 -0
- package/dist/codeFontStyle-DYUujk7K.js.map +1 -0
- package/dist/component-DVlwaWB-.d.ts +25 -0
- package/dist/component-DVlwaWB-.d.ts.map +1 -0
- package/dist/element-BYgCE_iK.js +51 -0
- package/dist/element-BYgCE_iK.js.map +1 -0
- package/dist/factory-BA3gEfyI.js +3056 -0
- package/dist/factory-BA3gEfyI.js.map +1 -0
- package/dist/flex-C-5JHi1C.js +76 -0
- package/dist/flex-C-5JHi1C.js.map +1 -0
- package/dist/font-EtfxKPUz.d.ts +49 -0
- package/dist/font-EtfxKPUz.d.ts.map +1 -0
- package/dist/getElementRef-5HZQ-Owu.js +91 -0
- package/dist/getElementRef-5HZQ-Owu.js.map +1 -0
- package/dist/getScopedTheme-C-sZsyAz.js +267 -0
- package/dist/getScopedTheme-C-sZsyAz.js.map +1 -0
- package/dist/getTheme_v2-y09KqtEb.js +487 -0
- package/dist/getTheme_v2-y09KqtEb.js.map +1 -0
- package/dist/grid-BXHFJhf_.js +115 -0
- package/dist/grid-BXHFJhf_.js.map +1 -0
- package/dist/helpers-bwfx1e-Y.js +67 -0
- package/dist/helpers-bwfx1e-Y.js.map +1 -0
- package/dist/hotkeys-CmmTQZpn.js +165 -0
- package/dist/hotkeys-CmmTQZpn.js.map +1 -0
- package/dist/index.d.ts +1192 -2168
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2069 -4483
- package/dist/index.js.map +1 -1
- package/dist/layer-B98ynOf2.js +61 -0
- package/dist/layer-B98ynOf2.js.map +1 -0
- package/dist/layer-ChlP9Ik6.d.ts +242 -0
- package/dist/layer-ChlP9Ik6.d.ts.map +1 -0
- package/dist/menu.d.ts +146 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +614 -0
- package/dist/menu.js.map +1 -0
- package/dist/popover-CMlQeKn0.d.ts +96 -0
- package/dist/popover-CMlQeKn0.d.ts.map +1 -0
- package/dist/popover-PorX5Jv9.js +419 -0
- package/dist/popover-PorX5Jv9.js.map +1 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +3 -0
- package/dist/refractor-CC48DwHi.js +20 -0
- package/dist/refractor-CC48DwHi.js.map +1 -0
- package/dist/responsiveFont-hN1mZFjm.js +55 -0
- package/dist/responsiveFont-hN1mZFjm.js.map +1 -0
- package/dist/rgba-BSYaEUW6.d.ts +846 -0
- package/dist/rgba-BSYaEUW6.d.ts.map +1 -0
- package/dist/selectable-B0GUIL74.d.ts +7 -0
- package/dist/selectable-B0GUIL74.d.ts.map +1 -0
- package/dist/stack-iW9HuGLg.js +112 -0
- package/dist/stack-iW9HuGLg.js.map +1 -0
- package/dist/styles-css.d.ts +2 -0
- package/dist/styles-css.js +4 -0
- package/dist/styles.css +28 -0
- package/dist/textInput-udxyGbm1.js +321 -0
- package/dist/textInput-udxyGbm1.js.map +1 -0
- package/dist/theme.d.ts +240 -459
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +55 -870
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +73 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +297 -0
- package/dist/toast.js.map +1 -0
- package/dist/tooltip.d.ts +88 -0
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +447 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/useClickOutsideEvent-lEVhDFCQ.js +36 -0
- package/dist/useClickOutsideEvent-lEVhDFCQ.js.map +1 -0
- package/dist/useElementSize-BJvbGHq8.js +51 -0
- package/dist/useElementSize-BJvbGHq8.js.map +1 -0
- package/dist/useLayer-BAVfmbNN.js +712 -0
- package/dist/useLayer-BAVfmbNN.js.map +1 -0
- package/package.json +73 -208
- package/dist/_chunks-cjs/refractor.cjs +0 -22
- package/dist/_chunks-cjs/refractor.cjs.map +0 -1
- package/dist/_chunks-es/refractor.js +0 -25
- package/dist/_chunks-es/refractor.js.map +0 -1
- package/dist/css/index.cjs +0 -966
- package/dist/css/index.cjs.map +0 -1
- package/dist/css/index.css +0 -23387
- package/dist/css/index.css.map +0 -1
- package/dist/css/index.d.cts +0 -1394
- package/dist/css/index.d.ts +0 -1394
- package/dist/css/index.js +0 -967
- package/dist/css/index.js.map +0 -1
- package/dist/index.cjs +0 -4515
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2521
- package/dist/theme.cjs +0 -870
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -499
- package/exports/css.ts +0 -1
- package/exports/index.ts +0 -1
- package/exports/theme.ts +0 -1
- package/src/core/Root.tsx +0 -88
- package/src/core/RootProvider.tsx +0 -40
- package/src/core/__workshop__/boundary.tsx +0 -28
- package/src/core/__workshop__/index.ts +0 -16
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -91
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -80
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -292
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -41
- package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__workshop__/mock/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/autocomplete/autocomplete.tsx +0 -690
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
- package/src/core/components/autocomplete/constants.ts +0 -28
- package/src/core/components/autocomplete/types.ts +0 -103
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -61
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -16
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -131
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -141
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -21
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -71
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -51
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -89
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -77
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/dialog/dialog.tsx +0 -232
- package/src/core/components/dialog/dialogCard.tsx +0 -233
- package/src/core/components/dialog/dialogContext.ts +0 -21
- package/src/core/components/dialog/dialogProvider.tsx +0 -34
- package/src/core/components/dialog/isTargetWithinScope.ts +0 -14
- package/src/core/components/dialog/types.ts +0 -2
- package/src/core/components/dialog/useDialog.ts +0 -11
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -16
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/hotkeys/hotkeys.tsx +0 -60
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -57
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -47
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -133
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -35
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
- package/src/core/components/menu/__workshop__/groups.tsx +0 -156
- package/src/core/components/menu/__workshop__/index.ts +0 -91
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -50
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -42
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/menu/helpers.ts +0 -82
- package/src/core/components/menu/menu.test.tsx +0 -129
- package/src/core/components/menu/menu.tsx +0 -179
- package/src/core/components/menu/menuButton.tsx +0 -225
- package/src/core/components/menu/menuContext.ts +0 -19
- package/src/core/components/menu/menuDivider.tsx +0 -32
- package/src/core/components/menu/menuGroup.tsx +0 -233
- package/src/core/components/menu/menuItem.tsx +0 -184
- package/src/core/components/menu/useMenu.ts +0 -21
- package/src/core/components/menu/useMenuController.ts +0 -241
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -16
- package/src/core/components/tab/tab.tsx +0 -109
- package/src/core/components/tab/tabList.tsx +0 -90
- package/src/core/components/tab/tabPanel.tsx +0 -47
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -21
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/toast/toast.test.tsx +0 -103
- package/src/core/components/toast/toast.tsx +0 -191
- package/src/core/components/toast/toastContext.ts +0 -7
- package/src/core/components/toast/toastLayer.tsx +0 -54
- package/src/core/components/toast/toastProvider.tsx +0 -112
- package/src/core/components/toast/toastState.ts +0 -6
- package/src/core/components/toast/types.ts +0 -24
- package/src/core/components/toast/useToast.ts +0 -23
- package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
- package/src/core/components/tree/__workshop__/basic.tsx +0 -105
- package/src/core/components/tree/__workshop__/index.ts +0 -23
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/components/tree/helpers.ts +0 -105
- package/src/core/components/tree/tree.tsx +0 -248
- package/src/core/components/tree/treeContext.ts +0 -10
- package/src/core/components/tree/treeGroup.tsx +0 -46
- package/src/core/components/tree/treeItem.tsx +0 -237
- package/src/core/components/tree/types.ts +0 -24
- package/src/core/components/tree/useTree.ts +0 -17
- package/src/core/components/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/components/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/components/virtualList/__workshop__/index.ts +0 -31
- package/src/core/components/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +0 -22
- package/src/core/components/virtualList/virtualList.tsx +0 -209
- package/src/core/constants.ts +0 -67
- package/src/core/helpers/animation.ts +0 -27
- package/src/core/helpers/element.ts +0 -55
- package/src/core/helpers/focus.ts +0 -92
- package/src/core/helpers/props.ts +0 -28
- package/src/core/helpers/scroll.ts +0 -15
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -114
- package/src/core/hooks/useClickOutsideEvent.ts +0 -67
- package/src/core/hooks/useCustomValidity.ts +0 -13
- package/src/core/hooks/useDelayed.test.ts +0 -67
- package/src/core/hooks/useDelayedState.ts +0 -28
- package/src/core/hooks/useElementSize.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -17
- package/src/core/hooks/useMatchMedia.ts +0 -28
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -16
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -21
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -107
- package/src/core/hooks/useMounted.ts +0 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersDark.test.tsx +0 -20
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -20
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/hooks/useResponsiveProp.ts +0 -28
- package/src/core/index.ts +0 -115
- package/src/core/lib/createGlobalScopedContext.ts +0 -37
- package/src/core/lib/globalScope.ts +0 -19
- package/src/core/lib/isArray.ts +0 -3
- package/src/core/lib/isRecord.ts +0 -3
- package/src/core/middleware/origin.ts +0 -47
- package/src/core/observers/elementSize.ts +0 -116
- package/src/core/observers/resize.ts +0 -9
- package/src/core/primitives/arrow/arrow.tsx +0 -74
- package/src/core/primitives/arrow/cmds.ts +0 -91
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -31
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -55
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
- package/src/core/primitives/avatar/avatar.tsx +0 -147
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -69
- package/src/core/primitives/avatar/avatarStack.tsx +0 -79
- package/src/core/primitives/avatar/types.ts +0 -2
- package/src/core/primitives/badge/__workshop__/index.ts +0 -21
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -19
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -16
- package/src/core/primitives/badge/badge.test.tsx +0 -16
- package/src/core/primitives/badge/badge.tsx +0 -61
- package/src/core/primitives/box/__workshop__/index.ts +0 -21
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/box/box.tsx +0 -222
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -27
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -54
- package/src/core/primitives/button/__workshop__/index.ts +0 -66
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
- package/src/core/primitives/button/__workshop__/props.tsx +0 -55
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +0 -13
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -29
- package/src/core/primitives/button/button.test.tsx +0 -30
- package/src/core/primitives/button/button.tsx +0 -193
- package/src/core/primitives/button/types.ts +0 -2
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
- package/src/core/primitives/card/__workshop__/index.ts +0 -20
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -29
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -78
- package/src/core/primitives/card/__workshop__/props.tsx +0 -52
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -62
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/card/card.tsx +0 -109
- package/src/core/primitives/card/cardContext.ts +0 -10
- package/src/core/primitives/card/cardProvider.tsx +0 -27
- package/src/core/primitives/card/types.ts +0 -17
- package/src/core/primitives/card/useCard.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -35
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/checkbox/checkbox.tsx +0 -80
- package/src/core/primitives/code/__workshop__/index.ts +0 -21
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/code/__workshop__/props.tsx +0 -18
- package/src/core/primitives/code/code.tsx +0 -48
- package/src/core/primitives/code/refractor.tsx +0 -18
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -10
- package/src/core/primitives/container/container.tsx +0 -37
- package/src/core/primitives/container/types.ts +0 -6
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/__workshop__/index.ts +0 -13
- package/src/core/primitives/flex/flex.tsx +0 -58
- package/src/core/primitives/grid/__workshop__/index.ts +0 -12
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.tsx +0 -35
- package/src/core/primitives/heading/__workshop__/index.ts +0 -21
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -29
- package/src/core/primitives/heading/heading.tsx +0 -78
- package/src/core/primitives/inline/__workshop__/index.ts +0 -10
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/inline/inline.tsx +0 -62
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -10
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/kbd/kbd.tsx +0 -57
- package/src/core/primitives/label/__workshop__/index.ts +0 -21
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/label/label.tsx +0 -75
- package/src/core/primitives/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/primitives/layer/__workshop__/index.ts +0 -26
- package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/primitives/layer/__workshop__/nested.tsx +0 -98
- package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +0 -17
- package/src/core/primitives/layer/getLayerContext.test.ts +0 -32
- package/src/core/primitives/layer/getLayerContext.ts +0 -21
- package/src/core/primitives/layer/layer.test.tsx +0 -110
- package/src/core/primitives/layer/layer.tsx +0 -42
- package/src/core/primitives/layer/layerCard.tsx +0 -90
- package/src/core/primitives/layer/layerContext.ts +0 -7
- package/src/core/primitives/layer/layerProvider.tsx +0 -106
- package/src/core/primitives/layer/types.ts +0 -9
- package/src/core/primitives/layer/useLayer.ts +0 -24
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -69
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -96
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -100
- package/src/core/primitives/popover/__workshop__/index.ts +0 -51
- package/src/core/primitives/popover/constants.ts +0 -22
- package/src/core/primitives/popover/floating-ui/size.ts +0 -83
- package/src/core/primitives/popover/helpers.ts +0 -32
- package/src/core/primitives/popover/popover.tsx +0 -443
- package/src/core/primitives/popover/popoverLayer.tsx +0 -149
- package/src/core/primitives/popover/types.ts +0 -12
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -13
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/radio.tsx +0 -64
- package/src/core/primitives/select/__workshop__/index.ts +0 -13
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -39
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/select.tsx +0 -75
- package/src/core/primitives/selectable/selectable.tsx +0 -50
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/primitives/skeleton/__workshop__/index.ts +0 -13
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/primitives/skeleton/codeSkeleton.tsx +0 -49
- package/src/core/primitives/skeleton/headingSkeleton.tsx +0 -48
- package/src/core/primitives/skeleton/labelSkeleton.tsx +0 -47
- package/src/core/primitives/skeleton/skeleton.tsx +0 -70
- package/src/core/primitives/skeleton/textSkeleton.tsx +0 -49
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -16
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +0 -14
- package/src/core/primitives/spinner/spinner.tsx +0 -45
- package/src/core/primitives/srOnly/srOnly.tsx +0 -33
- package/src/core/primitives/stack/__workshop__/index.ts +0 -16
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/stack/stack.tsx +0 -60
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -13
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/switch/switch.tsx +0 -84
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -23
- package/src/core/primitives/text/__workshop__/example.tsx +0 -28
- package/src/core/primitives/text/__workshop__/index.ts +0 -26
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/text/text.tsx +0 -76
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -16
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -61
- package/src/core/primitives/textArea/textArea.tsx +0 -84
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -46
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -110
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
- package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/core/primitives/textInput/textInput.tsx +0 -258
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -31
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -112
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/primitives/tooltip/constants.ts +0 -23
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
- package/src/core/primitives/tooltip/tooltip.tsx +0 -482
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -13
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
- package/src/core/primitives/tooltip/tooltipLayer.tsx +0 -106
- package/src/core/types.ts +0 -56
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -16
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -102
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -10
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -18
- package/src/core/utils/boundaryElement/types.ts +0 -5
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -24
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -41
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -16
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -75
- package/src/core/utils/elementQuery/helpers.ts +0 -27
- package/src/core/utils/errorBoundary.tsx +0 -50
- package/src/core/utils/getElementRef.ts +0 -29
- package/src/core/utils/portal/__workshop__/index.ts +0 -16
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/portal/portal.test.tsx +0 -105
- package/src/core/utils/portal/portal.tsx +0 -36
- package/src/core/utils/portal/portalContext.ts +0 -37
- package/src/core/utils/portal/portalProvider.tsx +0 -70
- package/src/core/utils/portal/types.ts +0 -7
- package/src/core/utils/portal/usePortal.ts +0 -23
- package/src/css/_assign.ts +0 -3
- package/src/css/_composeClassNames.ts +0 -12
- package/src/css/_fromEntries.ts +0 -3
- package/src/css/_getClassNames.ts +0 -9
- package/src/css/_responsiveClassName.ts +0 -45
- package/src/css/_responsiveStyle.css.ts +0 -34
- package/src/css/_style.css.ts +0 -9
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +0 -6
- package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -7
- package/src/css/components/dialog/dialog.css.ts +0 -98
- package/src/css/components/dialog/dialog.ts +0 -58
- package/src/css/components/menu/menu.css.ts +0 -14
- package/src/css/components/menu/menu.ts +0 -12
- package/src/css/components/skeleton/skeleton.css.ts +0 -128
- package/src/css/components/skeleton/skeleton.ts +0 -38
- package/src/css/components/skeleton/types.ts +0 -36
- package/src/css/components/toast/toast.css.ts +0 -17
- package/src/css/components/toast/toast.ts +0 -11
- package/src/css/components/tree/tree.css.ts +0 -65
- package/src/css/components/tree/tree.ts +0 -7
- package/src/css/constants.ts +0 -10
- package/src/css/getVarName.ts +0 -27
- package/src/css/index.ts +0 -146
- package/src/css/layers.css.ts +0 -12
- package/src/css/primitives/_arrow/_arrow.css.ts +0 -68
- package/src/css/primitives/_arrow/_arrow.ts +0 -26
- package/src/css/primitives/_input/_input.css.ts +0 -261
- package/src/css/primitives/_input/input.ts +0 -29
- package/src/css/primitives/_input/types.ts +0 -13
- package/src/css/primitives/avatar/avatar.css.ts +0 -201
- package/src/css/primitives/avatar/avatar.ts +0 -68
- package/src/css/primitives/avatar/types.ts +0 -10
- package/src/css/primitives/badge/badge.css.ts +0 -27
- package/src/css/primitives/badge/badge.ts +0 -8
- package/src/css/primitives/badge/types.ts +0 -13
- package/src/css/primitives/box/box.css.ts +0 -19
- package/src/css/primitives/box/box.ts +0 -82
- package/src/css/primitives/box/types.ts +0 -75
- package/src/css/primitives/button/button.css.ts +0 -287
- package/src/css/primitives/button/button.ts +0 -26
- package/src/css/primitives/button/types.ts +0 -12
- package/src/css/primitives/card/__workshop__/color.tsx +0 -75
- package/src/css/primitives/card/__workshop__/index.ts +0 -16
- package/src/css/primitives/card/card.css.ts +0 -387
- package/src/css/primitives/card/card.ts +0 -13
- package/src/css/primitives/card/types.ts +0 -9
- package/src/css/primitives/checkbox/checkbox.css.ts +0 -193
- package/src/css/primitives/checkbox/checkbox.ts +0 -17
- package/src/css/primitives/code/code.css.ts +0 -272
- package/src/css/primitives/code/code.ts +0 -19
- package/src/css/primitives/code/types.ts +0 -11
- package/src/css/primitives/container/container.css.ts +0 -4
- package/src/css/primitives/container/container.ts +0 -17
- package/src/css/primitives/container/types.ts +0 -9
- package/src/css/primitives/heading/heading.css.ts +0 -86
- package/src/css/primitives/heading/heading.ts +0 -22
- package/src/css/primitives/heading/types.ts +0 -14
- package/src/css/primitives/kbd/kbd.css.ts +0 -16
- package/src/css/primitives/kbd/kbd.ts +0 -9
- package/src/css/primitives/kbd/types.ts +0 -6
- package/src/css/primitives/label/label.css.ts +0 -87
- package/src/css/primitives/label/label.ts +0 -22
- package/src/css/primitives/label/types.ts +0 -14
- package/src/css/primitives/popover/popover.css.ts +0 -6
- package/src/css/primitives/popover/popover.ts +0 -12
- package/src/css/primitives/radio/radio.css.ts +0 -78
- package/src/css/primitives/radio/radio.ts +0 -17
- package/src/css/primitives/root/root.css.ts +0 -19
- package/src/css/primitives/root/root.ts +0 -17
- package/src/css/primitives/root/types.ts +0 -10
- package/src/css/primitives/select/select.css.ts +0 -24
- package/src/css/primitives/select/select.ts +0 -14
- package/src/css/primitives/select/types.ts +0 -5
- package/src/css/primitives/selectable/selectable.css.ts +0 -131
- package/src/css/primitives/selectable/selectable.ts +0 -9
- package/src/css/primitives/selectable/types.ts +0 -9
- package/src/css/primitives/spinner/spinner.css.ts +0 -19
- package/src/css/primitives/spinner/spinner.ts +0 -13
- package/src/css/primitives/spinner/types.ts +0 -4
- package/src/css/primitives/srOnly/srOnly.css.ts +0 -10
- package/src/css/primitives/srOnly/srOnly.ts +0 -7
- package/src/css/primitives/stack/stack.css.ts +0 -6
- package/src/css/primitives/stack/stack.ts +0 -7
- package/src/css/primitives/switch/switch.css.ts +0 -98
- package/src/css/primitives/switch/switch.ts +0 -27
- package/src/css/primitives/text/text.css.ts +0 -86
- package/src/css/primitives/text/text.ts +0 -24
- package/src/css/primitives/text/types.ts +0 -18
- package/src/css/primitives/textArea/textArea.css.ts +0 -4
- package/src/css/primitives/textArea/textArea.ts +0 -9
- package/src/css/primitives/textArea/types.ts +0 -7
- package/src/css/primitives/textInput/textInput.css.ts +0 -43
- package/src/css/primitives/textInput/textInput.ts +0 -24
- package/src/css/primitives/textInput/types.ts +0 -7
- package/src/css/primitives/tooltip/tooltip.css.ts +0 -4
- package/src/css/primitives/tooltip/tooltip.ts +0 -8
- package/src/css/primitives/tooltip/types.ts +0 -4
- package/src/css/props/alignItems/alignItems.css.ts +0 -22
- package/src/css/props/alignItems/alignItems.ts +0 -8
- package/src/css/props/alignItems/types.ts +0 -9
- package/src/css/props/border/border.css.ts +0 -65
- package/src/css/props/border/border.ts +0 -21
- package/src/css/props/border/types.ts +0 -13
- package/src/css/props/boxSizing/boxSizing.css.ts +0 -12
- package/src/css/props/boxSizing/boxSizing.ts +0 -7
- package/src/css/props/boxSizing/types.ts +0 -7
- package/src/css/props/display/display.css.ts +0 -56
- package/src/css/props/display/display.ts +0 -8
- package/src/css/props/display/types.ts +0 -16
- package/src/css/props/flex/flex.css.ts +0 -52
- package/src/css/props/flex/flex.ts +0 -8
- package/src/css/props/flex/types.ts +0 -9
- package/src/css/props/flexDirection/flexDirection.css.ts +0 -19
- package/src/css/props/flexDirection/flexDirection.ts +0 -8
- package/src/css/props/flexDirection/types.ts +0 -9
- package/src/css/props/flexWrap/flexWrap.css.ts +0 -16
- package/src/css/props/flexWrap/flexWrap.ts +0 -8
- package/src/css/props/flexWrap/types.ts +0 -9
- package/src/css/props/font/font.css.ts +0 -94
- package/src/css/props/font/font.ts +0 -8
- package/src/css/props/font/types.ts +0 -6
- package/src/css/props/gap/gap.css.ts +0 -40
- package/src/css/props/gap/gap.ts +0 -13
- package/src/css/props/gap/types.ts +0 -10
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +0 -19
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +0 -8
- package/src/css/props/gridAutoColumns/types.ts +0 -9
- package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +0 -19
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +0 -8
- package/src/css/props/gridAutoFlow/types.ts +0 -9
- package/src/css/props/gridAutoRows/gridAutoRows.css.ts +0 -19
- package/src/css/props/gridAutoRows/gridAutoRows.ts +0 -8
- package/src/css/props/gridAutoRows/types.ts +0 -9
- package/src/css/props/gridColumn/gridColumn.css.ts +0 -49
- package/src/css/props/gridColumn/gridColumn.ts +0 -8
- package/src/css/props/gridColumn/types.ts +0 -9
- package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +0 -46
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +0 -8
- package/src/css/props/gridColumnEnd/types.ts +0 -9
- package/src/css/props/gridColumnStart/gridColumnStart.css.ts +0 -46
- package/src/css/props/gridColumnStart/gridColumnStart.ts +0 -8
- package/src/css/props/gridColumnStart/types.ts +0 -9
- package/src/css/props/gridRow/gridRow.css.ts +0 -49
- package/src/css/props/gridRow/gridRow.ts +0 -8
- package/src/css/props/gridRow/types.ts +0 -9
- package/src/css/props/gridRowEnd/gridRowEnd.css.ts +0 -46
- package/src/css/props/gridRowEnd/gridRowEnd.ts +0 -8
- package/src/css/props/gridRowEnd/types.ts +0 -9
- package/src/css/props/gridRowStart/gridRowStart.css.ts +0 -46
- package/src/css/props/gridRowStart/gridRowStart.ts +0 -8
- package/src/css/props/gridRowStart/types.ts +0 -9
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +0 -43
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +0 -8
- package/src/css/props/gridTemplateColumns/types.ts +0 -9
- package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +0 -43
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +0 -8
- package/src/css/props/gridTemplateRows/types.ts +0 -9
- package/src/css/props/height/height.css.ts +0 -25
- package/src/css/props/height/height.ts +0 -8
- package/src/css/props/height/types.ts +0 -9
- package/src/css/props/inset/inset.css.ts +0 -37
- package/src/css/props/inset/inset.ts +0 -21
- package/src/css/props/inset/types.ts +0 -13
- package/src/css/props/justifyContent/justifyContent.css.ts +0 -25
- package/src/css/props/justifyContent/justifyContent.ts +0 -8
- package/src/css/props/justifyContent/types.ts +0 -15
- package/src/css/props/margin/margin.css.ts +0 -117
- package/src/css/props/margin/margin.ts +0 -25
- package/src/css/props/margin/types.ts +0 -17
- package/src/css/props/maxWidth/maxWidth.css.ts +0 -32
- package/src/css/props/maxWidth/maxWidth.ts +0 -8
- package/src/css/props/maxWidth/types.ts +0 -11
- package/src/css/props/minHeight/minHeight.css.ts +0 -13
- package/src/css/props/minHeight/minHeight.ts +0 -8
- package/src/css/props/minHeight/types.ts +0 -9
- package/src/css/props/minWidth/minWidth.css.ts +0 -25
- package/src/css/props/minWidth/minWidth.ts +0 -8
- package/src/css/props/minWidth/types.ts +0 -9
- package/src/css/props/outline/outline.css.ts +0 -10
- package/src/css/props/outline/outline.ts +0 -8
- package/src/css/props/outline/types.ts +0 -7
- package/src/css/props/overflow/overflow.css.ts +0 -16
- package/src/css/props/overflow/overflow.ts +0 -8
- package/src/css/props/overflow/types.ts +0 -11
- package/src/css/props/padding/padding.css.ts +0 -87
- package/src/css/props/padding/padding.ts +0 -25
- package/src/css/props/padding/types.ts +0 -17
- package/src/css/props/pointerEvents/pointerEvents.css.ts +0 -13
- package/src/css/props/pointerEvents/pointerEvents.ts +0 -8
- package/src/css/props/pointerEvents/types.ts +0 -7
- package/src/css/props/position/position.css.ts +0 -22
- package/src/css/props/position/position.ts +0 -8
- package/src/css/props/position/types.ts +0 -9
- package/src/css/props/radius/radius.css.ts +0 -21
- package/src/css/props/radius/radius.ts +0 -8
- package/src/css/props/radius/types.ts +0 -8
- package/src/css/props/shadow/shadow.css.ts +0 -23
- package/src/css/props/shadow/shadow.ts +0 -8
- package/src/css/props/shadow/types.ts +0 -8
- package/src/css/props/textAlign/textAlign.css.ts +0 -22
- package/src/css/props/textAlign/textAlign.ts +0 -8
- package/src/css/props/textAlign/types.ts +0 -7
- package/src/css/props/textOverflow/textOverflow.css.ts +0 -19
- package/src/css/props/textOverflow/textOverflow.ts +0 -8
- package/src/css/props/textOverflow/types.ts +0 -12
- package/src/css/props/width/types.ts +0 -11
- package/src/css/props/width/width.css.ts +0 -31
- package/src/css/props/width/width.ts +0 -8
- package/src/css/theme/buildCSSTheme.ts +0 -488
- package/src/css/theme/defaultTheme.css.ts +0 -64
- package/src/css/types.ts +0 -427
- package/src/css/vars.css.ts +0 -676
- package/src/theme/_parseColorToken.ts +0 -180
- package/src/theme/buildTheme.ts +0 -32
- package/src/theme/constants.ts +0 -90
- package/src/theme/defaults/color.ts +0 -197
- package/src/theme/defaults/common.ts +0 -71
- package/src/theme/defaults/fonts.ts +0 -250
- package/src/theme/index.ts +0 -5
- package/src/theme/merge.ts +0 -24
- package/src/theme/resolveTokens.ts +0 -204
- package/src/theme/types.ts +0 -366
package/dist/index.d.ts
CHANGED
|
@@ -1,1893 +1,1039 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {CodeStyleProps} from '@sanity/ui/css'
|
|
11
|
-
import type {ColorScheme} from '@sanity/ui/theme'
|
|
12
|
-
import {Component} from 'react'
|
|
13
|
-
import type {ComponentClass} from 'react'
|
|
14
|
-
import type {ComponentProps} from 'react'
|
|
15
|
-
import type {ComponentType as ComponentType_2} from 'react'
|
|
16
|
-
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
|
-
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
18
|
-
import type {Context} from 'react'
|
|
19
|
-
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
20
|
-
import type {ElementTone} from '@sanity/ui/theme'
|
|
21
|
-
import {ElementType as ElementType_2} from 'react'
|
|
22
|
-
import {ErrorInfo} from 'react'
|
|
23
|
-
import type {ExoticComponent} from 'react'
|
|
24
|
-
import type {FlexDirection} from '@sanity/ui/css'
|
|
25
|
-
import {FlexStyleProps} from '@sanity/ui/css'
|
|
26
|
-
import type {FlexWrap} from '@sanity/ui/css'
|
|
27
|
-
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
28
|
-
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
29
|
-
import type {FontLabelSize} from '@sanity/ui/theme'
|
|
30
|
-
import type {FontTextSize} from '@sanity/ui/theme'
|
|
31
|
-
import type {FontWeight} from '@sanity/ui/theme'
|
|
32
|
-
import {ForwardedRef} from 'react'
|
|
33
|
-
import type {FunctionComponent} from 'react'
|
|
34
|
-
import {GapStyleProps} from '@sanity/ui/css'
|
|
35
|
-
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
36
|
-
import {HTMLAttributes} from 'react'
|
|
37
|
-
import {InputStyleProps} from '@sanity/ui/css'
|
|
38
|
-
import type {JSX} from 'react'
|
|
39
|
-
import type {JustifyContent} from '@sanity/ui/css'
|
|
40
|
-
import {LabelStyleProps} from '@sanity/ui/css'
|
|
41
|
-
import {MaxWidth} from '@sanity/ui/css'
|
|
42
|
-
import {MouseEventHandler} from 'react'
|
|
43
|
-
import {PaddingStyleProps} from '@sanity/ui/css'
|
|
44
|
-
import {PropsWithChildren} from 'react'
|
|
45
|
-
import type {Radius} from '@sanity/ui/theme'
|
|
46
|
-
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
47
|
-
import {ReactElement} from 'react'
|
|
48
|
-
import {ReactNode} from 'react'
|
|
49
|
-
import type {ReactPortal} from 'react'
|
|
50
|
-
import {Ref} from 'react'
|
|
51
|
-
import {RefAttributes} from 'react'
|
|
52
|
-
import {ResponsiveProp} from '@sanity/ui/css'
|
|
53
|
-
import {RootStyleProps} from '@sanity/ui/css'
|
|
54
|
-
import {SelectableStyleProps} from '@sanity/ui/css'
|
|
55
|
-
import {SelectStyleProps} from '@sanity/ui/css'
|
|
56
|
-
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
57
|
-
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
58
|
-
import type {Space} from '@sanity/ui/theme'
|
|
59
|
-
import {TextAreaStyleProps} from '@sanity/ui/css'
|
|
60
|
-
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
61
|
-
import {TextStyleProps} from '@sanity/ui/css'
|
|
62
|
-
import type {Width} from '@sanity/ui/css'
|
|
63
|
-
|
|
64
|
-
/** @internal */
|
|
65
|
-
export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
|
|
66
|
-
props: ArrowProps<E>,
|
|
67
|
-
): React.JSX.Element
|
|
68
|
-
|
|
69
|
-
/** @internal */
|
|
70
|
-
export declare type ArrowElementType = 'div' | 'span' | ComponentType
|
|
71
|
-
|
|
72
|
-
/** @internal */
|
|
73
|
-
export declare type ArrowOwnProps = {
|
|
74
|
-
width: number
|
|
75
|
-
height: number
|
|
76
|
-
radius?: number
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** @internal */
|
|
80
|
-
export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
|
|
81
|
-
ArrowOwnProps,
|
|
82
|
-
E
|
|
83
|
-
>
|
|
84
|
-
|
|
1
|
+
import { a as Props, i as EmptyProps, n as ComponentType, o as TagType, r as ElementType, t as Assign } from "./component-DVlwaWB-.js";
|
|
2
|
+
import { A as FlexWrap, C as GridAutoCols, D as FlexDirection, E as FlexAlign, M as BoxHeight, N as BoxOverflow, O as FlexJustify, P as BoxSizing, S as GridItemRowStart, T as GridAutoRows, _ as GridItemColumn, a as ResponsiveBorderProps, b as GridItemRow, c as ResponsiveFlexProps, d as ResponsiveMarginProps, f as ResponsivePaddingProps, g as Radius, h as ResponsiveWidthProps, i as Delay, j as BoxDisplay, k as FlexValue, l as ResponsiveGridItemProps, m as ResponsiveShadowProps, n as LayerProps, o as ResponsiveBoxProps, p as ResponsiveRadiusProps, r as Placement, s as ResponsiveFlexItemProps, t as Layer, u as ResponsiveGridProps, v as GridItemColumnEnd, w as GridAutoFlow, x as GridItemRowEnd, y as GridItemColumnStart } from "./layer-ChlP9Ik6.js";
|
|
3
|
+
import { a as ButtonTextAlign, c as Box, i as ButtonMode, l as BoxOwnProps, n as ButtonOwnProps, o as ButtonTone, r as ButtonProps, s as ButtonWidth, t as Button, u as BoxProps } from "./button-dnqMFkWg.js";
|
|
4
|
+
import { i as ThemeColorCardToneKey, l as ThemeColorStateToneKey, r as ThemeColorButtonModeKey$1, s as ThemeColorSchemeKey$1, t as ThemeColorAvatarColorKey } from "./_system-CTe2lb5l.js";
|
|
5
|
+
import { t as CardTone } from "./card-C0a0wQTc.js";
|
|
6
|
+
import { a as ThemeFontWeightKey$1, i as ThemeFontWeight$1, n as ThemeFontKey$1, o as ThemeFonts$1, r as ThemeFontSize$1, t as ThemeFont$1 } from "./font-EtfxKPUz.js";
|
|
7
|
+
import { A as ThemeColorMutedTone, B as ThemeColorBase, C as ThemeColorSpotKey, D as ThemeColorSelectableState, E as ThemeColorSelectable, F as ThemeColorCardState, H as ThemeColorToneKey, I as ThemeColorButton, L as ThemeColorButtonState, M as ThemeColorInputState, N as ThemeColorInputStates, O as ThemeColorSelectableStates, P as ThemeColorCard, R as ThemeColorButtonStates, S as ThemeColorSpot, T as ThemeColorSolidTone, U as ThemeColorGenericState, V as ThemeColorName, W as ThemeAvatar, _ as Theme_v2, _t as ThemeColorSyntax$1, a as rgbToHex$1, b as ThemeColorScheme, c as screen$1, d as ThemeColorBuilderOpts, f as createColorTheme$1, ft as ThemeStyles, g as Theme$1, gt as ThemeLayer$1, ht as ThemeShadow$1, i as hslToRgb$1, j as ThemeColorInput, k as ThemeColorMuted, l as multiply$1, m as RootTheme$1, mt as ThemeBoxShadow, n as parseColor$1, o as rgbToHsl$1, p as BaseTheme$1, pt as CSSObject, r as hexToRgb$1, t as rgba$1, u as PartialThemeColorBuilderOpts, v as ThemeInput, vt as HSL$1, w as ThemeColorSolid, x as ThemeColorSchemes, y as ThemeColor, yt as RGB$1, z as ThemeColorButtonTones } from "./rgba-BSYaEUW6.js";
|
|
8
|
+
import { t as SelectableTone } from "./selectable-B0GUIL74.js";
|
|
9
|
+
import { Component, HTMLProps, PropsWithChildren } from "react";
|
|
85
10
|
/**
|
|
86
|
-
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
87
|
-
*
|
|
88
11
|
* @public
|
|
12
|
+
* @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
|
|
89
13
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
14
|
+
type BaseTheme = BaseTheme$1;
|
|
92
15
|
/**
|
|
93
|
-
* @
|
|
16
|
+
* @public
|
|
17
|
+
* @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
|
|
94
18
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
19
|
+
type BoxShadow = ThemeBoxShadow;
|
|
97
20
|
/**
|
|
98
|
-
* The Autocomplete component is typically used for search components.
|
|
99
|
-
* It consists of a text input for writing a query, and properties for rendering suggestions.
|
|
100
|
-
*
|
|
101
21
|
* @public
|
|
22
|
+
* @deprecated Use `HSL` from `@sanity/ui/theme` instead.
|
|
102
23
|
*/
|
|
103
|
-
|
|
104
|
-
E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
|
|
105
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
106
|
-
>(props: AutocompleteProps<E, O>): React.JSX.Element
|
|
107
|
-
|
|
108
|
-
/** @public */
|
|
109
|
-
export declare type AutocompleteElementType = 'input' | ComponentType
|
|
110
|
-
|
|
24
|
+
type HSL = HSL$1;
|
|
111
25
|
/**
|
|
112
|
-
* @
|
|
26
|
+
* @public
|
|
27
|
+
* @deprecated Use `RGB` from `@sanity/ui/theme` instead.
|
|
113
28
|
*/
|
|
114
|
-
|
|
115
|
-
type: 'input/change'
|
|
116
|
-
query: string | null
|
|
117
|
-
}
|
|
118
|
-
|
|
29
|
+
type RGB = RGB$1;
|
|
119
30
|
/**
|
|
120
|
-
* @
|
|
31
|
+
* @public
|
|
32
|
+
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
121
33
|
*/
|
|
122
|
-
|
|
123
|
-
type: 'input/focus'
|
|
124
|
-
}
|
|
125
|
-
|
|
34
|
+
type RootTheme = RootTheme$1;
|
|
126
35
|
/**
|
|
127
|
-
* @
|
|
36
|
+
* @public
|
|
37
|
+
* @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
|
|
128
38
|
*/
|
|
129
|
-
|
|
130
|
-
| AutocompleteRootBlurMsg
|
|
131
|
-
| AutocompleteRootClearMsg
|
|
132
|
-
| AutocompleteRootEscapeMsg
|
|
133
|
-
| AutocompleteRootOpenMsg
|
|
134
|
-
| AutocompleteRootSetActiveValueMsg
|
|
135
|
-
| AutocompleteRootSetListFocusedMsg
|
|
136
|
-
| AutocompleteInputChangeMsg
|
|
137
|
-
| AutocompleteInputFoocusMsg
|
|
138
|
-
| AutocompleteValueChangeMsg
|
|
139
|
-
|
|
140
|
-
/** @public */
|
|
141
|
-
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
|
|
142
|
-
|
|
143
|
-
/** @public */
|
|
144
|
-
export declare type AutocompleteOwnProps<
|
|
145
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
146
|
-
> = TextInputOwnProps & {
|
|
147
|
-
border?: boolean
|
|
148
|
-
customValidity?: string
|
|
149
|
-
filterOption?: (query: string, option: O) => boolean
|
|
150
|
-
icon?: ElementType_2 | ReactNode
|
|
151
|
-
/** @beta */
|
|
152
|
-
listBox?: BoxOwnProps
|
|
153
|
-
loading?: boolean
|
|
154
|
-
onChange?: (value: string) => void
|
|
155
|
-
onQueryChange?: (query: string | null) => void
|
|
156
|
-
onSelect?: (value: string) => void
|
|
157
|
-
/** @beta */
|
|
158
|
-
openButton?: boolean | AutocompleteOpenButtonProps
|
|
159
|
-
/** @beta */
|
|
160
|
-
openOnFocus?: boolean
|
|
161
|
-
/** The options to render. */
|
|
162
|
-
options?: O[]
|
|
163
|
-
padding?: ResponsiveProp<Space>
|
|
164
|
-
popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
165
|
-
prefix?: ReactNode
|
|
166
|
-
radius?: Radius | Radius[]
|
|
167
|
-
/** @beta */
|
|
168
|
-
relatedElements?: HTMLElement[]
|
|
169
|
-
/** The callback function for rendering each option. */
|
|
170
|
-
renderOption?: (option: O) => React.JSX.Element
|
|
171
|
-
/** @beta */
|
|
172
|
-
renderPopover?: (
|
|
173
|
-
props: {
|
|
174
|
-
content: React.JSX.Element | null
|
|
175
|
-
hidden: boolean
|
|
176
|
-
inputElement: HTMLInputElement | null
|
|
177
|
-
onMouseEnter: () => void
|
|
178
|
-
onMouseLeave: () => void
|
|
179
|
-
},
|
|
180
|
-
ref: ForwardedRef<HTMLDivElement>,
|
|
181
|
-
) => ReactNode
|
|
182
|
-
renderValue?: (value: string, option?: O) => string
|
|
183
|
-
suffix?: ReactNode
|
|
184
|
-
value?: string
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/** @public */
|
|
188
|
-
export declare type AutocompleteProps<
|
|
189
|
-
E extends AutocompleteElementType = AutocompleteElementType,
|
|
190
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
191
|
-
> = Props<AutocompleteOwnProps<O>, E>
|
|
192
|
-
|
|
39
|
+
type Styles = ThemeStyles;
|
|
193
40
|
/**
|
|
194
|
-
* @
|
|
41
|
+
* @public
|
|
42
|
+
* @deprecated Use `Theme` from `@sanity/ui/theme` instead.
|
|
195
43
|
*/
|
|
196
|
-
|
|
197
|
-
type: 'root/blur'
|
|
198
|
-
}
|
|
199
|
-
|
|
44
|
+
type Theme = Theme$1;
|
|
200
45
|
/**
|
|
201
|
-
* @
|
|
46
|
+
* @public
|
|
47
|
+
* @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
|
|
202
48
|
*/
|
|
203
|
-
|
|
204
|
-
type: 'root/clear'
|
|
205
|
-
}
|
|
206
|
-
|
|
49
|
+
type ThemeColorButtonModeKey = ThemeColorButtonModeKey$1;
|
|
207
50
|
/**
|
|
208
|
-
* @
|
|
51
|
+
* @public
|
|
52
|
+
* @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
|
|
209
53
|
*/
|
|
210
|
-
|
|
211
|
-
type: 'root/escape'
|
|
212
|
-
}
|
|
213
|
-
|
|
54
|
+
type ThemeColorSchemeKey = ThemeColorSchemeKey$1;
|
|
214
55
|
/**
|
|
215
|
-
* @
|
|
56
|
+
* @public
|
|
57
|
+
* @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
|
|
216
58
|
*/
|
|
217
|
-
|
|
218
|
-
type: 'root/open'
|
|
219
|
-
query: string | null
|
|
220
|
-
}
|
|
221
|
-
|
|
59
|
+
type ThemeColorSyntax = ThemeColorSyntax$1;
|
|
222
60
|
/**
|
|
223
|
-
* @
|
|
61
|
+
* @public
|
|
62
|
+
* @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
|
|
224
63
|
*/
|
|
225
|
-
|
|
226
|
-
type: 'root/setActiveValue'
|
|
227
|
-
value: string
|
|
228
|
-
listFocused?: boolean
|
|
229
|
-
}
|
|
230
|
-
|
|
64
|
+
type ThemeFont = ThemeFont$1;
|
|
231
65
|
/**
|
|
232
|
-
* @
|
|
66
|
+
* @public
|
|
67
|
+
* @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
|
|
233
68
|
*/
|
|
234
|
-
|
|
235
|
-
type: 'root/setListFocused'
|
|
236
|
-
listFocused: boolean
|
|
237
|
-
}
|
|
238
|
-
|
|
69
|
+
type ThemeFontKey = ThemeFontKey$1;
|
|
239
70
|
/**
|
|
240
|
-
* @
|
|
71
|
+
* @public
|
|
72
|
+
* @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
|
|
241
73
|
*/
|
|
242
|
-
|
|
243
|
-
activeValue: string | null
|
|
244
|
-
focused: boolean
|
|
245
|
-
listFocused: boolean
|
|
246
|
-
query: string | null
|
|
247
|
-
value: string | null
|
|
248
|
-
}
|
|
249
|
-
|
|
74
|
+
type ThemeFontSize = ThemeFontSize$1;
|
|
250
75
|
/**
|
|
251
|
-
* @
|
|
76
|
+
* @public
|
|
77
|
+
* @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
|
|
252
78
|
*/
|
|
253
|
-
|
|
254
|
-
type: 'value/change'
|
|
255
|
-
value: string | null
|
|
256
|
-
}
|
|
257
|
-
|
|
79
|
+
type ThemeFontWeight = ThemeFontWeight$1;
|
|
258
80
|
/**
|
|
259
|
-
* Avatars are used to represent people and other agents (e.g. bots).
|
|
260
|
-
*
|
|
261
81
|
* @public
|
|
82
|
+
* @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
|
|
262
83
|
*/
|
|
263
|
-
|
|
264
|
-
props: AvatarProps<E>,
|
|
265
|
-
): React.JSX.Element
|
|
266
|
-
|
|
267
|
-
/** @public */
|
|
268
|
-
export declare function AvatarCounter<
|
|
269
|
-
E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
270
|
-
>(props: AvatarCounterProps<E>): React.JSX.Element
|
|
271
|
-
|
|
272
|
-
/** @public */
|
|
273
|
-
export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
|
|
274
|
-
|
|
275
|
-
/** @public */
|
|
276
|
-
export declare interface AvatarCounterOwnProps {
|
|
277
|
-
count: number
|
|
278
|
-
size?: ResponsiveProp<AvatarSize>
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/** @public */
|
|
282
|
-
export declare type AvatarCounterProps<
|
|
283
|
-
E extends AvatarCounterElementType = AvatarCounterElementType,
|
|
284
|
-
> = Props<AvatarCounterOwnProps, E>
|
|
285
|
-
|
|
286
|
-
/** @public */
|
|
287
|
-
export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
|
|
288
|
-
|
|
289
|
-
/** @public */
|
|
290
|
-
export declare interface AvatarOwnProps {
|
|
291
|
-
/** @beta */
|
|
292
|
-
__unstable_hideInnerStroke?: boolean
|
|
293
|
-
animateArrowFrom?: AvatarPosition
|
|
294
|
-
arrowPosition?: AvatarPosition
|
|
295
|
-
color?: AvatarColor
|
|
296
|
-
initials?: string
|
|
297
|
-
onImageLoadError?: (event: Error) => void
|
|
298
|
-
size?: ResponsiveProp<AvatarSize>
|
|
299
|
-
src?: string
|
|
300
|
-
title?: string
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/** @public */
|
|
304
|
-
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
305
|
-
|
|
306
|
-
/** @public */
|
|
307
|
-
export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
|
|
308
|
-
AvatarOwnProps,
|
|
309
|
-
E
|
|
310
|
-
>
|
|
311
|
-
|
|
312
|
-
/** @public */
|
|
313
|
-
export declare function AvatarStack<
|
|
314
|
-
E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
|
|
315
|
-
>(props: AvatarStackProps<E>): React.JSX.Element
|
|
316
|
-
|
|
317
|
-
/** @public */
|
|
318
|
-
export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
|
|
319
|
-
|
|
320
|
-
/** @public */
|
|
321
|
-
export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
|
|
322
|
-
|
|
323
|
-
/** @public */
|
|
324
|
-
export declare type AvatarStackOwnProps = Omit<
|
|
325
|
-
BoxOwnProps,
|
|
326
|
-
'align' | 'alignItems' | 'display' | 'justify' | 'justifyContent'
|
|
327
|
-
> & {
|
|
328
|
-
children: AvatarStackChild | AvatarStackChild[]
|
|
329
|
-
maxLength?: number
|
|
330
|
-
size?: ResponsiveProp<AvatarSize>
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/** @public */
|
|
334
|
-
export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
|
|
335
|
-
Props<AvatarStackOwnProps, E>
|
|
336
|
-
|
|
84
|
+
type ThemeFontWeightKey = ThemeFontWeightKey$1;
|
|
337
85
|
/**
|
|
338
|
-
* Badges are used to tag resources.
|
|
339
|
-
*
|
|
340
86
|
* @public
|
|
87
|
+
* @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
|
|
341
88
|
*/
|
|
342
|
-
|
|
343
|
-
props: BadgeProps<E>,
|
|
344
|
-
): React.JSX.Element
|
|
345
|
-
|
|
346
|
-
/** @public */
|
|
347
|
-
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
348
|
-
|
|
349
|
-
/** @public */
|
|
350
|
-
export declare type BadgeOwnProps = BadgeStyleProps &
|
|
351
|
-
FlexStyleProps &
|
|
352
|
-
PaddingStyleProps &
|
|
353
|
-
RadiusStyleProps
|
|
354
|
-
|
|
355
|
-
/** @public */
|
|
356
|
-
export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
|
|
357
|
-
BadgeOwnProps,
|
|
358
|
-
E
|
|
359
|
-
>
|
|
360
|
-
|
|
361
|
-
/** @public */
|
|
362
|
-
export declare interface BaseAutocompleteOption {
|
|
363
|
-
value: string
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/** @public */
|
|
367
|
-
export declare interface BoundaryElementContextValue {
|
|
368
|
-
version: 0.0
|
|
369
|
-
element: HTMLElement | null
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/** @public */
|
|
373
|
-
export declare function BoundaryElementProvider(
|
|
374
|
-
props: BoundaryElementProviderProps,
|
|
375
|
-
): React.JSX.Element
|
|
376
|
-
|
|
377
|
-
/** @public */
|
|
378
|
-
export declare interface BoundaryElementProviderProps {
|
|
379
|
-
children: ReactNode
|
|
380
|
-
element: HTMLElement | null
|
|
381
|
-
}
|
|
382
|
-
|
|
89
|
+
type ThemeFonts = ThemeFonts$1;
|
|
383
90
|
/**
|
|
384
|
-
* The `Box` component is a basic layout wrapper component which provides utility properties
|
|
385
|
-
* for flex, margins and padding.
|
|
386
|
-
*
|
|
387
91
|
* @public
|
|
92
|
+
* @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
|
|
388
93
|
*/
|
|
389
|
-
|
|
390
|
-
props: BoxProps<E>,
|
|
391
|
-
): React.JSX.Element
|
|
392
|
-
|
|
393
|
-
/** @public */
|
|
394
|
-
export declare type BoxElementType =
|
|
395
|
-
| 'a'
|
|
396
|
-
| 'article'
|
|
397
|
-
| 'aside'
|
|
398
|
-
| 'blockquote'
|
|
399
|
-
| 'body'
|
|
400
|
-
| 'button'
|
|
401
|
-
| 'details'
|
|
402
|
-
| 'div'
|
|
403
|
-
| 'header'
|
|
404
|
-
| 'fieldset'
|
|
405
|
-
| 'figure'
|
|
406
|
-
| 'figcaption'
|
|
407
|
-
| 'footer'
|
|
408
|
-
| 'form'
|
|
409
|
-
| 'html'
|
|
410
|
-
| 'iframe'
|
|
411
|
-
| 'kbd'
|
|
412
|
-
| 'label'
|
|
413
|
-
| 'legend'
|
|
414
|
-
| 'li'
|
|
415
|
-
| 'main'
|
|
416
|
-
| 'nav'
|
|
417
|
-
| 'ol'
|
|
418
|
-
| 'pre'
|
|
419
|
-
| 'section'
|
|
420
|
-
| 'span'
|
|
421
|
-
| 'summary'
|
|
422
|
-
| 'table'
|
|
423
|
-
| 'tbody'
|
|
424
|
-
| 'td'
|
|
425
|
-
| 'tfoot'
|
|
426
|
-
| 'th'
|
|
427
|
-
| 'thead'
|
|
428
|
-
| 'tr'
|
|
429
|
-
| 'ul'
|
|
430
|
-
| ComponentType
|
|
431
|
-
|
|
432
|
-
/** @public */
|
|
433
|
-
export declare type BoxOwnProps = BoxStyleProps
|
|
434
|
-
|
|
435
|
-
/** @public */
|
|
436
|
-
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
437
|
-
|
|
438
|
-
/** @beta */
|
|
439
|
-
export declare function Breadcrumbs<
|
|
440
|
-
E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
|
|
441
|
-
>(props: BreadcrumbsProps<E>): React.JSX.Element
|
|
442
|
-
|
|
443
|
-
/** @beta */
|
|
444
|
-
export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
|
|
445
|
-
|
|
446
|
-
/** @beta */
|
|
447
|
-
export declare type BreadcrumbsOwnProps = GapStyleProps & {
|
|
448
|
-
expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
|
|
449
|
-
maxLength?: number
|
|
450
|
-
separator?: ReactNode
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/** @beta */
|
|
454
|
-
export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
|
|
455
|
-
Props<BreadcrumbsOwnProps, E>
|
|
456
|
-
|
|
457
|
-
/** @public */
|
|
458
|
-
export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
|
|
459
|
-
props: ButtonProps<E>,
|
|
460
|
-
): React.JSX.Element
|
|
461
|
-
|
|
462
|
-
/** @public */
|
|
463
|
-
export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
464
|
-
|
|
465
|
-
/** @public */
|
|
466
|
-
export declare type ButtonOwnProps = ButtonStyleProps &
|
|
467
|
-
DisplayStyleProps &
|
|
468
|
-
GapStyleProps &
|
|
469
|
-
PaddingStyleProps & {
|
|
470
|
-
'align'?: BoxStyleProps['alignItems']
|
|
471
|
-
'data-ui'?: string
|
|
472
|
-
'disabled'?: boolean
|
|
473
|
-
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
474
|
-
'icon'?: ElementType_2 | ReactNode
|
|
475
|
-
'iconRight'?: ElementType_2 | ReactNode
|
|
476
|
-
'justify'?: BoxStyleProps['justifyContent']
|
|
477
|
-
/** @beta Do not use in production, as this might change.*/
|
|
478
|
-
'loading'?: boolean
|
|
479
|
-
'selected'?: boolean
|
|
480
|
-
'textAlign'?: ButtonTextAlign
|
|
481
|
-
'muted'?: boolean
|
|
482
|
-
'target'?: string
|
|
483
|
-
'text'?: ReactNode
|
|
484
|
-
'textOverflow'?: TextOwnProps['textOverflow']
|
|
485
|
-
'textWeight'?: TextOwnProps['weight']
|
|
486
|
-
'width'?: ResponsiveProp<Width>
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/** @public */
|
|
490
|
-
export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
|
|
491
|
-
ButtonOwnProps,
|
|
492
|
-
E
|
|
493
|
-
>
|
|
494
|
-
|
|
495
|
-
/** @public */
|
|
496
|
-
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
497
|
-
|
|
94
|
+
type ThemeLayer = ThemeLayer$1;
|
|
498
95
|
/**
|
|
499
|
-
* The `Card` component acts much like a `Box`, but with a background and foreground color.
|
|
500
|
-
* Components within a `Card` inherit its colors.
|
|
501
|
-
*
|
|
502
96
|
* @public
|
|
97
|
+
* @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
|
|
503
98
|
*/
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
99
|
+
type ThemeShadow = ThemeShadow$1;
|
|
100
|
+
/**
|
|
101
|
+
* @public
|
|
102
|
+
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
103
|
+
*/
|
|
104
|
+
declare const createColorTheme: typeof createColorTheme$1;
|
|
105
|
+
/**
|
|
106
|
+
* @public
|
|
107
|
+
* @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
|
|
108
|
+
*/
|
|
109
|
+
declare const hexToRgb: typeof hexToRgb$1;
|
|
110
|
+
/**
|
|
111
|
+
* @public
|
|
112
|
+
* @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
|
|
113
|
+
*/
|
|
114
|
+
declare const hslToRgb: typeof hslToRgb$1;
|
|
115
|
+
/**
|
|
116
|
+
* @public
|
|
117
|
+
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
118
|
+
*/
|
|
119
|
+
declare const multiply: typeof multiply$1;
|
|
120
|
+
/**
|
|
121
|
+
* @public
|
|
122
|
+
* @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
|
|
123
|
+
*/
|
|
124
|
+
declare const parseColor: typeof parseColor$1;
|
|
125
|
+
/**
|
|
126
|
+
* @public
|
|
127
|
+
* @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
|
|
128
|
+
*/
|
|
129
|
+
declare const rgbToHex: typeof rgbToHex$1;
|
|
130
|
+
/**
|
|
131
|
+
* @public
|
|
132
|
+
* @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
|
|
133
|
+
*/
|
|
134
|
+
declare const rgbToHsl: typeof rgbToHsl$1;
|
|
135
|
+
/**
|
|
136
|
+
* @public
|
|
137
|
+
* @deprecated Use `rgba` from `@sanity/ui/theme` instead.
|
|
138
|
+
*/
|
|
139
|
+
declare const rgba: typeof rgba$1;
|
|
140
|
+
/**
|
|
141
|
+
* @public
|
|
142
|
+
* @deprecated Use `screen` from `@sanity/ui/theme` instead.
|
|
143
|
+
*/
|
|
144
|
+
declare const screen: typeof screen$1;
|
|
145
|
+
/**
|
|
146
|
+
* @public
|
|
147
|
+
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
148
|
+
*/
|
|
149
|
+
declare const studioTheme: BaseTheme$1;
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
type DialogPosition = 'absolute' | 'fixed';
|
|
154
|
+
/**
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
|
|
528
158
|
/**
|
|
529
|
-
* Do not use in production.
|
|
530
159
|
* @beta
|
|
531
160
|
*/
|
|
532
|
-
|
|
161
|
+
__unstable_autoFocus?: boolean;
|
|
533
162
|
/**
|
|
534
|
-
* Do not use in production.
|
|
535
163
|
* @beta
|
|
536
164
|
*/
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
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;
|
|
542
187
|
}
|
|
543
|
-
|
|
544
|
-
/** @public */
|
|
545
|
-
export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
|
|
546
|
-
|
|
547
|
-
/** @public */
|
|
548
|
-
export declare function CardProvider(props: {
|
|
549
|
-
children?: ReactNode
|
|
550
|
-
tone: CardTone
|
|
551
|
-
scheme: ColorScheme
|
|
552
|
-
/** @internal */
|
|
553
|
-
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
554
|
-
}): React.JSX.Element
|
|
555
|
-
|
|
556
188
|
/**
|
|
557
|
-
*
|
|
189
|
+
* The Dialog component.
|
|
558
190
|
*
|
|
559
191
|
* @public
|
|
560
192
|
*/
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
indeterminate?: boolean
|
|
571
|
-
customValidity?: string
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/** @public */
|
|
575
|
-
export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
|
|
576
|
-
CheckboxOwnProps,
|
|
577
|
-
E
|
|
578
|
-
>
|
|
579
|
-
|
|
580
|
-
/** @public */
|
|
581
|
-
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
582
|
-
|
|
583
|
-
/** @public */
|
|
584
|
-
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
585
|
-
|
|
586
|
-
/** @public */
|
|
587
|
-
export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
|
|
588
|
-
props: CodeProps<E>,
|
|
589
|
-
): React.JSX.Element
|
|
590
|
-
|
|
591
|
-
/** @public */
|
|
592
|
-
export declare type CodeElementType = 'div' | 'pre' | ComponentType
|
|
593
|
-
|
|
594
|
-
/** @public */
|
|
595
|
-
export declare type CodeOwnProps = CodeStyleProps & {
|
|
596
|
-
/** Define the language to use for syntax highlighting. */
|
|
597
|
-
language?: string
|
|
598
|
-
size?: ResponsiveProp<FontCodeSize>
|
|
193
|
+
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[];
|
|
599
202
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
203
|
+
/**
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
declare const DialogContext: import("react").Context<DialogContextValue>;
|
|
604
207
|
/**
|
|
605
208
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
606
209
|
* @beta
|
|
607
210
|
*/
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
/** @beta */
|
|
613
|
-
export declare type CodeSkeletonElementType = SkeletonElementType
|
|
614
|
-
|
|
615
|
-
/** @beta */
|
|
616
|
-
export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
|
|
617
|
-
size?: ResponsiveProp<FontCodeSize>
|
|
211
|
+
interface DialogProviderProps {
|
|
212
|
+
children?: React.ReactNode;
|
|
213
|
+
position?: DialogPosition | DialogPosition[];
|
|
214
|
+
zOffset?: number | number[];
|
|
618
215
|
}
|
|
619
|
-
|
|
620
216
|
/**
|
|
621
217
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
622
218
|
* @beta
|
|
623
219
|
*/
|
|
624
|
-
|
|
625
|
-
Props<CodeSkeletonOwnProps, E>
|
|
626
|
-
|
|
627
|
-
/** @public */
|
|
628
|
-
export declare type ComponentType<P = any> =
|
|
629
|
-
| FunctionComponent<P>
|
|
630
|
-
| ComponentClass<P>
|
|
631
|
-
| ExoticComponent<P>
|
|
632
|
-
|
|
220
|
+
declare function DialogProvider(props: DialogProviderProps): React.JSX.Element;
|
|
633
221
|
/**
|
|
634
|
-
*
|
|
222
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
223
|
+
* @beta
|
|
224
|
+
*/
|
|
225
|
+
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[];
|
|
234
|
+
/**
|
|
235
|
+
* @deprecated Use `gap` instead.
|
|
236
|
+
*/
|
|
237
|
+
space?: never;
|
|
238
|
+
keys?: string[];
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
635
242
|
*
|
|
636
243
|
* @public
|
|
637
244
|
*/
|
|
638
|
-
|
|
639
|
-
E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
|
|
640
|
-
>(props: ContainerProps<E>): React.JSX.Element
|
|
641
|
-
|
|
642
|
-
/** @public */
|
|
643
|
-
export declare type ContainerElementType = BoxElementType
|
|
644
|
-
|
|
645
|
-
/** @public */
|
|
646
|
-
export declare type ContainerOwnProps = Omit<BoxOwnProps, 'width'> & ContainerStyleProps
|
|
647
|
-
|
|
648
|
-
/** @public */
|
|
649
|
-
export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
|
|
650
|
-
ContainerOwnProps,
|
|
651
|
-
E
|
|
652
|
-
>
|
|
653
|
-
|
|
245
|
+
declare function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>): import("react").JSX.Element;
|
|
654
246
|
/**
|
|
655
|
-
*
|
|
247
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
248
|
+
* @beta
|
|
656
249
|
*/
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
/** @public */
|
|
663
|
-
export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
|
|
664
|
-
|
|
665
|
-
/** @public */
|
|
666
|
-
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
|
|
667
|
-
|
|
668
|
-
/** @public */
|
|
669
|
-
export declare const DEFAULT_AVATAR_ELEMENT = 'span'
|
|
670
|
-
|
|
671
|
-
/** @public */
|
|
672
|
-
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
|
|
673
|
-
|
|
674
|
-
/** @public */
|
|
675
|
-
export declare const DEFAULT_BADGE_ELEMENT = 'span'
|
|
676
|
-
|
|
677
|
-
/** @public */
|
|
678
|
-
export declare const DEFAULT_BOX_ELEMENT = 'div'
|
|
679
|
-
|
|
680
|
-
/** @beta */
|
|
681
|
-
export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
|
|
682
|
-
|
|
683
|
-
/** @public */
|
|
684
|
-
export declare const DEFAULT_BUTTON_ELEMENT = 'button'
|
|
685
|
-
|
|
686
|
-
/** @public */
|
|
687
|
-
export declare const DEFAULT_CARD_ELEMENT = 'div'
|
|
688
|
-
|
|
689
|
-
/** @public */
|
|
690
|
-
export declare const DEFAULT_CHECKBOX_ELEMENT = 'input'
|
|
691
|
-
|
|
692
|
-
/** @public */
|
|
693
|
-
export declare const DEFAULT_CODE_ELEMENT = 'pre'
|
|
694
|
-
|
|
695
|
-
/** @beta */
|
|
696
|
-
export declare const DEFAULT_CODE_SKELETON_ELEMENT = 'div'
|
|
697
|
-
|
|
698
|
-
/** @public */
|
|
699
|
-
export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
|
|
700
|
-
|
|
701
|
-
/** @public */
|
|
702
|
-
export declare const DEFAULT_DIALOG_ELEMENT = 'div'
|
|
703
|
-
|
|
704
|
-
/** @beta */
|
|
705
|
-
export declare const DEFAULT_ELEMENT_QUERY_ELEMENT = 'div'
|
|
706
|
-
|
|
707
|
-
/** @public */
|
|
708
|
-
export declare const DEFAULT_FLEX_ELEMENT = 'div'
|
|
709
|
-
|
|
710
|
-
/** @public */
|
|
711
|
-
export declare const DEFAULT_GRID_ELEMENT = 'div'
|
|
712
|
-
|
|
713
|
-
/** @public */
|
|
714
|
-
export declare const DEFAULT_HEADING_ELEMENT = 'div'
|
|
715
|
-
|
|
716
|
-
/** @beta */
|
|
717
|
-
export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
|
|
718
|
-
|
|
719
|
-
/** @public */
|
|
720
|
-
export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
|
|
721
|
-
|
|
722
|
-
/** @public */
|
|
723
|
-
export declare const DEFAULT_INLINE_ELEMENT = 'div'
|
|
724
|
-
|
|
725
|
-
/** @public */
|
|
726
|
-
export declare const DEFAULT_KBD_ELEMENT = 'kbd'
|
|
727
|
-
|
|
728
|
-
/** @public */
|
|
729
|
-
export declare const DEFAULT_LABEL_ELEMENT = 'div'
|
|
730
|
-
|
|
731
|
-
/** @beta */
|
|
732
|
-
export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
|
|
733
|
-
|
|
734
|
-
/** @public */
|
|
735
|
-
export declare const DEFAULT_LAYER_ELEMENT = 'div'
|
|
736
|
-
|
|
737
|
-
/** @public */
|
|
738
|
-
export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
|
|
739
|
-
|
|
740
|
-
/** @public */
|
|
741
|
-
export declare const DEFAULT_MENU_ELEMENT = 'div'
|
|
742
|
-
|
|
743
|
-
/** @public */
|
|
744
|
-
export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
|
|
745
|
-
|
|
746
|
-
/** @public */
|
|
747
|
-
export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
|
|
748
|
-
|
|
749
|
-
/** @public */
|
|
750
|
-
export declare const DEFAULT_POPOVER_ELEMENT = 'div'
|
|
751
|
-
|
|
752
|
-
/** @public */
|
|
753
|
-
export declare const DEFAULT_RADIO_ELEMENT = 'input'
|
|
754
|
-
|
|
755
|
-
/** @public */
|
|
756
|
-
export declare const DEFAULT_ROOT_ELEMENT = 'html'
|
|
757
|
-
|
|
758
|
-
/** @public */
|
|
759
|
-
export declare const DEFAULT_SELECT_ELEMENT = 'select'
|
|
760
|
-
|
|
761
|
-
/** @internal */
|
|
762
|
-
export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
|
|
763
|
-
|
|
764
|
-
/** @beta */
|
|
765
|
-
export declare const DEFAULT_SKELETON_ELEMENT = 'div'
|
|
766
|
-
|
|
767
|
-
/** @public */
|
|
768
|
-
export declare const DEFAULT_SPINNER_ELEMENT = 'div'
|
|
769
|
-
|
|
770
|
-
/** @public */
|
|
771
|
-
export declare const DEFAULT_SR_ONLY_ELEMENT = 'span'
|
|
772
|
-
|
|
773
|
-
/** @public */
|
|
774
|
-
export declare const DEFAULT_STACK_ELEMENT = 'div'
|
|
775
|
-
|
|
776
|
-
/** @public */
|
|
777
|
-
export declare const DEFAULT_SWITCH_ELEMENT = 'input'
|
|
778
|
-
|
|
779
|
-
/** @public */
|
|
780
|
-
export declare const DEFAULT_TAB_ELEMENT = 'button'
|
|
781
|
-
|
|
782
|
-
/** @public */
|
|
783
|
-
export declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
|
|
784
|
-
|
|
785
|
-
/** @public */
|
|
786
|
-
export declare const DEFAULT_TAB_PANEL_ELEMENT = 'div'
|
|
787
|
-
|
|
788
|
-
/** @public */
|
|
789
|
-
export declare const DEFAULT_TEXT_AREA_ELEMENT = 'textarea'
|
|
790
|
-
|
|
791
|
-
/** @public */
|
|
792
|
-
export declare const DEFAULT_TEXT_ELEMENT = 'div'
|
|
793
|
-
|
|
794
|
-
/** @public */
|
|
795
|
-
export declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
|
|
796
|
-
|
|
797
|
-
/** @beta */
|
|
798
|
-
export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
|
|
799
|
-
|
|
800
|
-
/** @internal */
|
|
801
|
-
export declare const DEFAULT_TOAST_ELEMENT = 'li'
|
|
802
|
-
|
|
803
|
-
/** @public */
|
|
804
|
-
export declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
|
|
805
|
-
|
|
806
|
-
/** @beta */
|
|
807
|
-
export declare const DEFAULT_TREE_ELEMENT = 'div'
|
|
808
|
-
|
|
809
|
-
/** @beta */
|
|
810
|
-
export declare const DEFAULT_TREE_ITEM_ELEMENT = 'a'
|
|
811
|
-
|
|
812
|
-
/** @beta */
|
|
813
|
-
export declare const DEFAULT_VIRTUAL_LIST_ELEMENT = 'div'
|
|
814
|
-
|
|
815
|
-
/** @public */
|
|
816
|
-
export declare type Delay =
|
|
817
|
-
| number
|
|
818
|
-
| Partial<{
|
|
819
|
-
open: number
|
|
820
|
-
close: number
|
|
821
|
-
}>
|
|
822
|
-
|
|
250
|
+
interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxOwnProps, 'children'> {
|
|
251
|
+
animated?: boolean;
|
|
252
|
+
delay?: number;
|
|
253
|
+
}
|
|
823
254
|
/**
|
|
824
|
-
*
|
|
255
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
256
|
+
* @beta
|
|
257
|
+
*/
|
|
258
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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'> {
|
|
332
|
+
/**
|
|
333
|
+
* @deprecated Use `gap` instead.
|
|
334
|
+
*/
|
|
335
|
+
space?: never;
|
|
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.
|
|
825
345
|
*
|
|
826
346
|
* @public
|
|
827
347
|
*/
|
|
828
|
-
|
|
829
|
-
props: DialogProps<E>,
|
|
830
|
-
): React.JSX.Element
|
|
831
|
-
|
|
348
|
+
declare const Inline: <E extends ElementType = 'div'>(props: InlineProps<E>) => React.JSX.Element;
|
|
832
349
|
/**
|
|
833
|
-
* @
|
|
350
|
+
* @public
|
|
834
351
|
*/
|
|
835
|
-
|
|
836
|
-
|
|
352
|
+
interface TabListProps extends Omit<InlineOwnProps, 'height'> {
|
|
353
|
+
children: Array<React.JSX.Element | null | undefined | false>;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @public
|
|
357
|
+
*/
|
|
358
|
+
declare function TabList(props: TabListProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>): import("react").JSX.Element;
|
|
359
|
+
/**
|
|
360
|
+
* @public
|
|
361
|
+
*/
|
|
362
|
+
interface TabPanelProps extends BoxOwnProps {
|
|
363
|
+
/**
|
|
364
|
+
* The `id` of the correlating `Tab` component.
|
|
365
|
+
*/
|
|
366
|
+
'aria-labelledby': string;
|
|
367
|
+
'id': string;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
372
|
+
declare function TabPanel(props: TabPanelProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'aria-labelledby' | 'id' | 'role'>): import("react").JSX.Element;
|
|
837
373
|
/**
|
|
838
374
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
839
375
|
* @beta
|
|
840
376
|
*/
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
377
|
+
interface TreeProps {
|
|
378
|
+
gap?: number | number[];
|
|
379
|
+
/**
|
|
380
|
+
* @deprecated Use `gap` instead.
|
|
381
|
+
*/
|
|
382
|
+
space?: never;
|
|
845
383
|
}
|
|
846
|
-
|
|
847
|
-
/** @public */
|
|
848
|
-
export declare type DialogElementType = 'div' | 'span' | ComponentType
|
|
849
|
-
|
|
850
|
-
/** @public */
|
|
851
|
-
export declare type DialogOwnProps = ContainerStyleProps &
|
|
852
|
-
Omit<LayerOwnProps, 'width'> & {
|
|
853
|
-
/**
|
|
854
|
-
* @beta
|
|
855
|
-
*/
|
|
856
|
-
__unstable_autoFocus?: boolean
|
|
857
|
-
/**
|
|
858
|
-
* @beta
|
|
859
|
-
*/
|
|
860
|
-
__unstable_hideCloseButton?: boolean
|
|
861
|
-
/**
|
|
862
|
-
* Whether the dialog should animate in on mount.
|
|
863
|
-
*
|
|
864
|
-
* @beta
|
|
865
|
-
* @defaultValue false
|
|
866
|
-
*/
|
|
867
|
-
animate?: boolean
|
|
868
|
-
cardRadius?: ResponsiveProp<Radius>
|
|
869
|
-
contentRef?: ForwardedRef<HTMLDivElement>
|
|
870
|
-
footer?: ReactNode
|
|
871
|
-
header?: ReactNode
|
|
872
|
-
id: string
|
|
873
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
874
|
-
onActivate?: LayerProps['onActivate']
|
|
875
|
-
onClickOutside?: () => void
|
|
876
|
-
onClose?: () => void
|
|
877
|
-
open?: boolean
|
|
878
|
-
portal?: string
|
|
879
|
-
position?: ResponsiveProp<DialogPosition>
|
|
880
|
-
scheme?: ColorScheme
|
|
881
|
-
tone?: CardTone | 'inherit'
|
|
882
|
-
zOffset?: number | number[]
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
/** @public */
|
|
886
|
-
export declare type DialogPosition = 'absolute' | 'fixed'
|
|
887
|
-
|
|
888
|
-
/** @public */
|
|
889
|
-
export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
|
|
890
|
-
DialogOwnProps,
|
|
891
|
-
E
|
|
892
|
-
>
|
|
893
|
-
|
|
894
384
|
/**
|
|
895
385
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
896
386
|
* @beta
|
|
897
387
|
*/
|
|
898
|
-
|
|
899
|
-
|
|
388
|
+
declare function Tree(props: TreeProps & Omit<React.HTMLProps<HTMLUListElement>, 'align' | 'as' | 'height' | 'role' | 'wrap'>): React.JSX.Element;
|
|
389
|
+
/**
|
|
390
|
+
* @beta
|
|
391
|
+
*/
|
|
392
|
+
interface TreeItemProps {
|
|
393
|
+
expanded?: boolean;
|
|
394
|
+
fontSize?: number | number[];
|
|
395
|
+
icon?: React.ElementType;
|
|
396
|
+
/**
|
|
397
|
+
* Allows passing a custom element type to the link component
|
|
398
|
+
*/
|
|
399
|
+
linkAs?: ElementType;
|
|
400
|
+
/**
|
|
401
|
+
* Additional props for the link element that is rendered when `href` is set — e.g. `next/link`'s
|
|
402
|
+
* `prefetch` together with `linkAs={Link}`. Props controlled by `TreeItem` itself (`href`,
|
|
403
|
+
* `role`, `tabIndex`, `aria-expanded` and the ref) take precedence.
|
|
404
|
+
*/
|
|
405
|
+
linkProps?: React.HTMLProps<HTMLAnchorElement> & Record<string, unknown>;
|
|
406
|
+
padding?: number | number[];
|
|
407
|
+
gap?: number | number[];
|
|
408
|
+
/**
|
|
409
|
+
* @deprecated Use `gap` instead.
|
|
410
|
+
*/
|
|
411
|
+
space?: never;
|
|
412
|
+
text?: React.ReactNode;
|
|
413
|
+
weight?: ThemeFontWeightKey$1;
|
|
414
|
+
}
|
|
900
415
|
/**
|
|
901
416
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
902
417
|
* @beta
|
|
903
418
|
*/
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
419
|
+
declare function TreeItem(props: TreeItemProps & Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'ref' | 'role'>): React.JSX.Element;
|
|
420
|
+
/**
|
|
421
|
+
* @beta
|
|
422
|
+
*/
|
|
423
|
+
interface TreeState {
|
|
424
|
+
[key: string]: {
|
|
425
|
+
element: HTMLElement;
|
|
426
|
+
expanded: boolean;
|
|
427
|
+
} | undefined;
|
|
908
428
|
}
|
|
909
|
-
|
|
910
429
|
/**
|
|
911
|
-
* DO NOT USE IN PRODUCTION.
|
|
912
430
|
* @beta
|
|
913
431
|
*/
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
432
|
+
interface TreeContextValue {
|
|
433
|
+
version: 0.0;
|
|
434
|
+
focusedElement: HTMLElement | null;
|
|
435
|
+
level: number;
|
|
436
|
+
path: string[];
|
|
437
|
+
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void;
|
|
438
|
+
setExpanded: (path: string, expanded: boolean) => void;
|
|
439
|
+
setFocusedElement: (focusedElement: HTMLElement | null) => void;
|
|
440
|
+
gap: number | number[];
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated Use `gap` instead.
|
|
443
|
+
*/
|
|
444
|
+
space?: never;
|
|
445
|
+
state: TreeState;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @beta
|
|
449
|
+
*/
|
|
450
|
+
declare function useTree(): TreeContextValue;
|
|
451
|
+
/**
|
|
452
|
+
* @internal
|
|
453
|
+
*/
|
|
454
|
+
declare function _raf(fn: () => void): () => void;
|
|
455
|
+
/**
|
|
456
|
+
* @internal
|
|
457
|
+
*/
|
|
458
|
+
declare function _raf2(fn: () => void): () => void;
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
declare function _isEnterToClickElement(element: HTMLElement): boolean;
|
|
463
|
+
/**
|
|
464
|
+
* @internal
|
|
465
|
+
*/
|
|
466
|
+
declare function isHTMLElement(node: unknown): node is HTMLElement;
|
|
467
|
+
/**
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
470
|
+
declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement;
|
|
471
|
+
/**
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
declare function isHTMLInputElement(element: unknown): element is HTMLInputElement;
|
|
475
|
+
/**
|
|
476
|
+
* @internal
|
|
477
|
+
*/
|
|
478
|
+
declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement;
|
|
479
|
+
/**
|
|
480
|
+
* @internal
|
|
481
|
+
*/
|
|
482
|
+
declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement;
|
|
483
|
+
/**
|
|
484
|
+
* @internal
|
|
485
|
+
*/
|
|
486
|
+
declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement;
|
|
487
|
+
/**
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
490
|
+
declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean;
|
|
491
|
+
/**
|
|
492
|
+
* @internal
|
|
493
|
+
*/
|
|
494
|
+
declare function _hasFocus(element: HTMLElement): boolean;
|
|
495
|
+
/**
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
498
|
+
declare function isFocusable(element: HTMLElement): boolean;
|
|
499
|
+
/**
|
|
500
|
+
* @internal
|
|
501
|
+
*/
|
|
502
|
+
declare function attemptFocus(element: HTMLElement): boolean;
|
|
503
|
+
/**
|
|
504
|
+
* @internal
|
|
505
|
+
*/
|
|
506
|
+
declare function focusFirstDescendant(element: HTMLElement): boolean;
|
|
507
|
+
/**
|
|
508
|
+
* @internal
|
|
509
|
+
*/
|
|
510
|
+
declare function focusLastDescendant(element: HTMLElement): boolean;
|
|
511
|
+
/**
|
|
512
|
+
* @internal
|
|
513
|
+
*/
|
|
514
|
+
declare function _isScrollable(el: Node): boolean;
|
|
918
515
|
/** @beta */
|
|
919
|
-
|
|
920
|
-
|
|
516
|
+
type ArrayPropPrimitive = string | number | boolean | undefined | null;
|
|
921
517
|
/**
|
|
922
|
-
*
|
|
518
|
+
* @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
|
|
923
519
|
* @beta
|
|
924
520
|
*/
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
521
|
+
declare function useArrayProp(_val?: never, _defaultVal?: never): never;
|
|
522
|
+
/**
|
|
523
|
+
* @public
|
|
524
|
+
*/
|
|
525
|
+
type ClickOutsideListener = (event: MouseEvent) => void;
|
|
526
|
+
/**
|
|
527
|
+
* @public
|
|
528
|
+
*/
|
|
529
|
+
type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[];
|
|
530
|
+
/**
|
|
531
|
+
* @public
|
|
532
|
+
* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
|
|
533
|
+
* ```tsx
|
|
534
|
+
* const [button, setButtonElement] = useState(null)
|
|
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
|
+
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
|
+
declare function useClickOutsideEvent(listener: ClickOutsideEventListener | false | undefined, elementsArg?: () => ClickOutsideEventElements, boundaryElement?: () => HTMLElement | null): void;
|
|
929
558
|
/**
|
|
930
|
-
* DO NOT USE IN PRODUCTION.
|
|
931
559
|
* @beta
|
|
932
560
|
*/
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
561
|
+
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
|
+
declare function useElementRect(_element?: never): never;
|
|
936
573
|
/**
|
|
937
574
|
* @beta
|
|
938
575
|
*/
|
|
939
|
-
|
|
940
|
-
width: number
|
|
941
|
-
height: number
|
|
576
|
+
interface ElementRectValue {
|
|
577
|
+
width: number;
|
|
578
|
+
height: number;
|
|
942
579
|
}
|
|
943
|
-
|
|
944
580
|
/**
|
|
945
581
|
* @beta
|
|
946
582
|
*/
|
|
947
|
-
|
|
948
|
-
content: ElementRectValue
|
|
949
|
-
border: ElementRectValue
|
|
583
|
+
interface ElementSize {
|
|
584
|
+
content: ElementRectValue;
|
|
585
|
+
border: ElementRectValue;
|
|
950
586
|
/** @deprecated INTERNAL ONLY */
|
|
951
|
-
_contentRect: DOMRectReadOnly
|
|
587
|
+
_contentRect: DOMRectReadOnly;
|
|
952
588
|
}
|
|
953
|
-
|
|
954
589
|
/**
|
|
955
590
|
* @internal
|
|
956
591
|
*/
|
|
957
|
-
|
|
958
|
-
|
|
592
|
+
type _ElementSizeSubscriber = (elementRect: ElementSize) => void;
|
|
593
|
+
/**
|
|
594
|
+
* @internal
|
|
595
|
+
*/
|
|
596
|
+
interface _ElementSizeObserver {
|
|
597
|
+
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
|
|
959
598
|
}
|
|
960
|
-
|
|
961
599
|
/**
|
|
962
600
|
* @internal
|
|
963
601
|
*/
|
|
964
|
-
|
|
965
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
|
|
602
|
+
interface _ElementSizeListener {
|
|
603
|
+
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
|
|
966
604
|
}
|
|
967
|
-
|
|
968
605
|
/**
|
|
969
606
|
* @internal
|
|
970
607
|
*/
|
|
971
|
-
|
|
972
|
-
|
|
608
|
+
declare const _elementSizeObserver: _ElementSizeObserver;
|
|
609
|
+
/**
|
|
610
|
+
* Subscribe to the size of a DOM element.
|
|
611
|
+
* @beta
|
|
612
|
+
*/
|
|
613
|
+
declare function useElementSize(element: HTMLElement | null): ElementSize | null;
|
|
614
|
+
/**
|
|
615
|
+
* @beta
|
|
616
|
+
* @deprecated use `useImperativeHandle` instead
|
|
617
|
+
* @example
|
|
618
|
+
* ```diff
|
|
619
|
+
* -const ref = useForwardedRef(forwardedRef)
|
|
620
|
+
* +const ref = useRef(null)
|
|
621
|
+
* +useImperativeHandle(forwardedRef, () => ref.current)
|
|
622
|
+
* ```
|
|
623
|
+
*/
|
|
624
|
+
declare function useForwardedRef(_ref?: never): never;
|
|
625
|
+
/**
|
|
626
|
+
* Adds global keydown event listener to the window.
|
|
627
|
+
*
|
|
628
|
+
* @param onKeyDown - The function to call when a keydown event is triggered.
|
|
629
|
+
* @param options - The options to pass to the addEventListener function (example, capture: true)
|
|
630
|
+
* @beta
|
|
631
|
+
*/
|
|
632
|
+
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
|
+
declare function useMatchMedia(mediaQueryString: `(${string})`, getServerSnapshot?: () => boolean): boolean;
|
|
641
|
+
/**
|
|
642
|
+
* @internal
|
|
643
|
+
*/
|
|
644
|
+
interface _MediaStore {
|
|
645
|
+
subscribe: (onStoreChange: () => void) => () => void;
|
|
646
|
+
getSnapshot: () => number;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
650
|
+
* @beta
|
|
651
|
+
*/
|
|
652
|
+
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
|
+
declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean;
|
|
665
|
+
/**
|
|
666
|
+
* Returns true if motion should be reduced
|
|
667
|
+
*
|
|
668
|
+
* @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-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
669
|
+
*
|
|
670
|
+
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
671
|
+
* Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
|
|
672
|
+
* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
|
|
673
|
+
*
|
|
674
|
+
* @public
|
|
675
|
+
*/
|
|
676
|
+
declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean;
|
|
677
|
+
/**
|
|
678
|
+
* @public
|
|
679
|
+
*/
|
|
680
|
+
type AvatarPosition = 'top' | 'bottom' | 'inside';
|
|
681
|
+
/**
|
|
682
|
+
* @public
|
|
683
|
+
*/
|
|
684
|
+
type AvatarSize = 0 | 1 | 2 | 3;
|
|
685
|
+
/**
|
|
686
|
+
* @public
|
|
687
|
+
*/
|
|
688
|
+
type AvatarStatus = 'online' | 'editing' | 'inactive';
|
|
689
|
+
/**
|
|
690
|
+
* @public
|
|
691
|
+
*/
|
|
692
|
+
interface AvatarOwnProps {
|
|
693
|
+
/** @beta */
|
|
694
|
+
__unstable_hideInnerStroke?: boolean;
|
|
695
|
+
animateArrowFrom?: AvatarPosition;
|
|
696
|
+
arrowPosition?: AvatarPosition;
|
|
697
|
+
color?: ThemeColorAvatarColorKey;
|
|
698
|
+
initials?: string;
|
|
699
|
+
onImageLoadError?: (event: Error) => void;
|
|
700
|
+
size?: AvatarSize | AvatarSize[];
|
|
701
|
+
src?: string;
|
|
702
|
+
/**
|
|
703
|
+
* The status of the entity this Avatar represents.
|
|
704
|
+
* @alpha
|
|
705
|
+
*/
|
|
706
|
+
status?: AvatarStatus;
|
|
707
|
+
title?: string;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* @public
|
|
711
|
+
*/
|
|
712
|
+
type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>;
|
|
973
713
|
/**
|
|
974
|
-
*
|
|
714
|
+
* Avatars are used to represent people and other agents (e.g. bots).
|
|
715
|
+
*
|
|
716
|
+
* @public
|
|
975
717
|
*/
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
/** @public */
|
|
979
|
-
export declare type ElementType<P> = TagType | ComponentType<P>
|
|
980
|
-
|
|
981
|
-
/** @public */
|
|
982
|
-
export declare type EmptyProps = {}
|
|
983
|
-
|
|
718
|
+
declare const Avatar: <E extends ElementType = 'div'>(props: AvatarProps<E>) => React.JSX.Element;
|
|
984
719
|
/**
|
|
985
|
-
*
|
|
986
|
-
* @beta
|
|
720
|
+
* @public
|
|
987
721
|
*/
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
render(): ReactNode
|
|
722
|
+
interface AvatarCounterProps {
|
|
723
|
+
count: number;
|
|
724
|
+
size?: AvatarSize | AvatarSize[];
|
|
725
|
+
/** @deprecated No longer supported. */
|
|
726
|
+
tone?: never;
|
|
994
727
|
}
|
|
995
|
-
|
|
996
728
|
/**
|
|
997
|
-
*
|
|
998
|
-
* @beta
|
|
729
|
+
* @public
|
|
999
730
|
*/
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
|
|
731
|
+
declare function AvatarCounter(props: AvatarCounterProps & {
|
|
732
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
733
|
+
}): import("react").JSX.Element;
|
|
1004
734
|
/**
|
|
1005
|
-
*
|
|
1006
|
-
* @beta
|
|
735
|
+
* @public
|
|
1007
736
|
*/
|
|
1008
|
-
|
|
1009
|
-
|
|
737
|
+
interface AvatarStackProps {
|
|
738
|
+
children: React.ReactNode;
|
|
739
|
+
maxLength?: number;
|
|
740
|
+
size?: AvatarSize | AvatarSize[];
|
|
741
|
+
/** @deprecated No longer supported. */
|
|
742
|
+
tone?: never;
|
|
1010
743
|
}
|
|
1011
|
-
|
|
1012
744
|
/**
|
|
1013
|
-
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
1014
|
-
*
|
|
1015
745
|
* @public
|
|
1016
746
|
*/
|
|
1017
|
-
|
|
1018
|
-
props: FlexProps<E>,
|
|
1019
|
-
): React.JSX.Element
|
|
1020
|
-
|
|
1021
|
-
/** @public */
|
|
1022
|
-
export declare type FlexElementType = BoxElementType
|
|
1023
|
-
|
|
1024
|
-
/** @public */
|
|
1025
|
-
export declare type FlexOwnProps = Omit<
|
|
1026
|
-
BoxOwnProps,
|
|
1027
|
-
'align' | 'display' | 'flexDirection' | 'flexWrap'
|
|
1028
|
-
> & {
|
|
1029
|
-
align?: ResponsiveProp<AlignItems>
|
|
1030
|
-
direction?: ResponsiveProp<FlexDirection>
|
|
1031
|
-
justify?: ResponsiveProp<JustifyContent>
|
|
1032
|
-
wrap?: ResponsiveProp<FlexWrap>
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
/** @public */
|
|
1036
|
-
export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
|
|
1037
|
-
|
|
747
|
+
declare function AvatarStack(props: AvatarStackProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>): import("react").JSX.Element;
|
|
1038
748
|
/**
|
|
1039
749
|
* @internal
|
|
1040
750
|
*/
|
|
1041
|
-
|
|
1042
|
-
|
|
751
|
+
interface AvatarRootStyleProps {
|
|
752
|
+
$color: ThemeColorAvatarColorKey;
|
|
753
|
+
}
|
|
1043
754
|
/**
|
|
1044
755
|
* @internal
|
|
1045
756
|
*/
|
|
1046
|
-
|
|
1047
|
-
|
|
757
|
+
interface ResponsiveAvatarSizeStyleProps {
|
|
758
|
+
$size: AvatarSize[];
|
|
759
|
+
}
|
|
1048
760
|
/**
|
|
1049
|
-
* @
|
|
761
|
+
* @public
|
|
762
|
+
* @deprecated No longer used
|
|
1050
763
|
*/
|
|
1051
|
-
|
|
1052
|
-
|
|
764
|
+
type BadgeMode = never;
|
|
1053
765
|
/**
|
|
1054
|
-
* @
|
|
766
|
+
* @public
|
|
1055
767
|
*/
|
|
1056
|
-
|
|
1057
|
-
val: ResponsiveProp<T> | undefined,
|
|
1058
|
-
defaultVal?: Partial<Record<Breakpoint, T>>,
|
|
1059
|
-
): Partial<Record<Breakpoint, T>>
|
|
1060
|
-
|
|
768
|
+
type BadgeTone = ThemeColorStateToneKey;
|
|
1061
769
|
/**
|
|
1062
|
-
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
1063
|
-
*
|
|
1064
770
|
* @public
|
|
1065
771
|
*/
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
/** @public */
|
|
1074
|
-
export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1075
|
-
|
|
1076
|
-
/** @public */
|
|
1077
|
-
export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
|
|
1078
|
-
|
|
772
|
+
interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
|
|
773
|
+
fontSize?: number | number[];
|
|
774
|
+
/** @deprecated No longer used. */
|
|
775
|
+
mode?: never;
|
|
776
|
+
tone?: BadgeTone;
|
|
777
|
+
}
|
|
1079
778
|
/**
|
|
1080
|
-
* @
|
|
779
|
+
* @public
|
|
1081
780
|
*/
|
|
1082
|
-
|
|
1083
|
-
|
|
781
|
+
type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>;
|
|
1084
782
|
/**
|
|
1085
|
-
*
|
|
783
|
+
* Badges are used to tag resources.
|
|
1086
784
|
*
|
|
1087
785
|
* @public
|
|
1088
786
|
*/
|
|
1089
|
-
|
|
1090
|
-
props: HeadingProps<E>,
|
|
1091
|
-
): React.JSX.Element
|
|
1092
|
-
|
|
1093
|
-
/** @public */
|
|
1094
|
-
export declare type HeadingElementType =
|
|
1095
|
-
| 'div'
|
|
1096
|
-
| 'h1'
|
|
1097
|
-
| 'h2'
|
|
1098
|
-
| 'h3'
|
|
1099
|
-
| 'h4'
|
|
1100
|
-
| 'h5'
|
|
1101
|
-
| 'h6'
|
|
1102
|
-
| 'label'
|
|
1103
|
-
| 'span'
|
|
1104
|
-
| ComponentType
|
|
1105
|
-
|
|
1106
|
-
/** @public */
|
|
1107
|
-
export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
|
|
1108
|
-
|
|
1109
|
-
/** @public */
|
|
1110
|
-
export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
|
|
1111
|
-
HeadingOwnProps,
|
|
1112
|
-
E
|
|
1113
|
-
>
|
|
1114
|
-
|
|
787
|
+
declare const Badge: <E extends ElementType = 'div'>(props: BadgeProps<E>) => React.JSX.Element;
|
|
1115
788
|
/**
|
|
1116
|
-
*
|
|
1117
|
-
* @beta
|
|
789
|
+
* @public
|
|
1118
790
|
*/
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
791
|
+
interface CardOwnProps extends BoxOwnProps, ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps {
|
|
792
|
+
/**
|
|
793
|
+
* Do not use in production.
|
|
794
|
+
* @beta
|
|
795
|
+
*/
|
|
796
|
+
__unstable_checkered?: boolean;
|
|
797
|
+
/**
|
|
798
|
+
* Do not use in production.
|
|
799
|
+
* @beta
|
|
800
|
+
*/
|
|
801
|
+
__unstable_focusRing?: boolean;
|
|
802
|
+
disabled?: boolean;
|
|
803
|
+
muted?: boolean;
|
|
804
|
+
pressed?: boolean;
|
|
805
|
+
scheme?: ThemeColorSchemeKey$1;
|
|
806
|
+
selected?: boolean;
|
|
807
|
+
tone?: CardTone;
|
|
1129
808
|
}
|
|
1130
|
-
|
|
1131
809
|
/**
|
|
1132
|
-
*
|
|
1133
|
-
* @beta
|
|
810
|
+
* @public
|
|
1134
811
|
*/
|
|
1135
|
-
|
|
1136
|
-
E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
|
|
1137
|
-
> = Props<HeadingSkeletonOwnProps, E>
|
|
1138
|
-
|
|
812
|
+
type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>;
|
|
1139
813
|
/**
|
|
1140
|
-
*
|
|
814
|
+
* The `Card` component acts much like a `Box`, but with a background and foreground color.
|
|
815
|
+
* Components within a `Card` inherit its colors.
|
|
1141
816
|
*
|
|
1142
817
|
* @public
|
|
1143
818
|
*/
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1154
|
-
padding?: ResponsiveProp<Space>
|
|
1155
|
-
keys?: string[]
|
|
819
|
+
declare const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element;
|
|
820
|
+
/**
|
|
821
|
+
* @internal
|
|
822
|
+
*/
|
|
823
|
+
interface CardStyleProps {
|
|
824
|
+
$checkered: boolean;
|
|
825
|
+
$focusRing: boolean;
|
|
826
|
+
$muted: boolean;
|
|
827
|
+
$tone: ThemeColorCardToneKey;
|
|
1156
828
|
}
|
|
1157
|
-
|
|
1158
|
-
/** @public */
|
|
1159
|
-
export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
|
|
1160
|
-
HotkeysOwnProps,
|
|
1161
|
-
E
|
|
1162
|
-
>
|
|
1163
|
-
|
|
1164
829
|
/**
|
|
1165
|
-
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
1166
|
-
*
|
|
1167
830
|
* @public
|
|
1168
831
|
*/
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
/** @public */
|
|
1174
|
-
export declare type InlineElementType = BoxElementType
|
|
1175
|
-
|
|
1176
|
-
/** @public */
|
|
1177
|
-
export declare type InlineOwnProps = Omit<
|
|
1178
|
-
BoxOwnProps,
|
|
1179
|
-
| 'alignItems'
|
|
1180
|
-
| 'flexDirection'
|
|
1181
|
-
| 'flexWrap'
|
|
1182
|
-
| 'justifyContent'
|
|
1183
|
-
| 'gridAutoColumns'
|
|
1184
|
-
| 'gridAutoFlow'
|
|
1185
|
-
| 'gridAutoRows'
|
|
1186
|
-
| 'gridColumnEnd'
|
|
1187
|
-
| 'gridColumnStart'
|
|
1188
|
-
| 'gridColumn'
|
|
1189
|
-
| 'gridRowEnd'
|
|
1190
|
-
| 'gridRowStart'
|
|
1191
|
-
| 'gridRow'
|
|
1192
|
-
| 'gridTemplateColumns'
|
|
1193
|
-
| 'gridTemplateRows'
|
|
1194
|
-
>
|
|
1195
|
-
|
|
1196
|
-
/** @public */
|
|
1197
|
-
export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
|
|
1198
|
-
InlineOwnProps,
|
|
1199
|
-
E
|
|
1200
|
-
>
|
|
1201
|
-
|
|
832
|
+
interface CheckboxProps {
|
|
833
|
+
indeterminate?: boolean;
|
|
834
|
+
customValidity?: string;
|
|
835
|
+
}
|
|
1202
836
|
/**
|
|
1203
|
-
*
|
|
837
|
+
* Checkboxes allow the user to select one or more items from a set.
|
|
838
|
+
*
|
|
839
|
+
* @public
|
|
1204
840
|
*/
|
|
1205
|
-
|
|
1206
|
-
|
|
841
|
+
declare function Checkbox(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & CheckboxProps): import("react").JSX.Element;
|
|
1207
842
|
/**
|
|
1208
|
-
* @
|
|
843
|
+
* @public
|
|
1209
844
|
*/
|
|
1210
|
-
|
|
1211
|
-
|
|
845
|
+
interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
|
|
1212
846
|
/**
|
|
1213
|
-
* @
|
|
847
|
+
* @public
|
|
1214
848
|
*/
|
|
1215
|
-
|
|
1216
|
-
|
|
849
|
+
type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>;
|
|
1217
850
|
/**
|
|
1218
|
-
*
|
|
851
|
+
* The `Container` component wraps content layout in a defined set of widths.
|
|
852
|
+
*
|
|
853
|
+
* @public
|
|
1219
854
|
*/
|
|
1220
|
-
|
|
1221
|
-
|
|
855
|
+
declare const Container: <E extends ElementType = 'div'>(props: ContainerProps<E>) => React.JSX.Element;
|
|
1222
856
|
/**
|
|
1223
857
|
* @internal
|
|
1224
858
|
*/
|
|
1225
|
-
|
|
1226
|
-
|
|
859
|
+
interface ResponsiveWidthStyleProps {
|
|
860
|
+
$width: (number | 'auto')[];
|
|
861
|
+
}
|
|
1227
862
|
/**
|
|
1228
|
-
* @
|
|
863
|
+
* @public
|
|
1229
864
|
*/
|
|
1230
|
-
|
|
1231
|
-
|
|
865
|
+
interface FlexOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {
|
|
866
|
+
gap?: number | number[];
|
|
867
|
+
}
|
|
1232
868
|
/**
|
|
1233
|
-
* @
|
|
869
|
+
* @public
|
|
1234
870
|
*/
|
|
1235
|
-
|
|
1236
|
-
|
|
871
|
+
type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>;
|
|
1237
872
|
/**
|
|
1238
|
-
*
|
|
873
|
+
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
874
|
+
*
|
|
875
|
+
* @public
|
|
1239
876
|
*/
|
|
1240
|
-
|
|
1241
|
-
|
|
877
|
+
declare const Flex: <E extends ElementType = 'div'>(props: FlexProps<E>) => React.JSX.Element;
|
|
1242
878
|
/**
|
|
1243
|
-
* @
|
|
879
|
+
* @public
|
|
1244
880
|
*/
|
|
1245
|
-
|
|
1246
|
-
|
|
881
|
+
interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
|
|
1247
882
|
/**
|
|
1248
|
-
* Used to define some text as keyboard input.
|
|
1249
|
-
*
|
|
1250
883
|
* @public
|
|
1251
884
|
*/
|
|
1252
|
-
|
|
1253
|
-
props: KBDProps<E>,
|
|
1254
|
-
): React.JSX.Element
|
|
1255
|
-
|
|
1256
|
-
/** @public */
|
|
1257
|
-
export declare type KBDElementType = 'kbd' | ComponentType
|
|
1258
|
-
|
|
1259
|
-
/** @public */
|
|
1260
|
-
export declare type KBDOwnProps = BoxOwnProps &
|
|
1261
|
-
RadiusStyleProps & {
|
|
1262
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
/** @public */
|
|
1266
|
-
export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
|
|
1267
|
-
|
|
885
|
+
type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>;
|
|
1268
886
|
/**
|
|
1269
|
-
*
|
|
887
|
+
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
1270
888
|
*
|
|
1271
889
|
* @public
|
|
1272
890
|
*/
|
|
1273
|
-
|
|
1274
|
-
props: LabelProps<E>,
|
|
1275
|
-
): React.JSX.Element
|
|
1276
|
-
|
|
1277
|
-
/** @public */
|
|
1278
|
-
export declare type LabelElementType =
|
|
1279
|
-
| 'div'
|
|
1280
|
-
| 'h1'
|
|
1281
|
-
| 'h2'
|
|
1282
|
-
| 'h3'
|
|
1283
|
-
| 'h4'
|
|
1284
|
-
| 'h5'
|
|
1285
|
-
| 'h6'
|
|
1286
|
-
| 'label'
|
|
1287
|
-
| 'li'
|
|
1288
|
-
| 'p'
|
|
1289
|
-
| 'span'
|
|
1290
|
-
| ComponentType
|
|
1291
|
-
|
|
1292
|
-
/** @public */
|
|
1293
|
-
export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
|
|
1294
|
-
|
|
1295
|
-
/** @public */
|
|
1296
|
-
export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
|
|
1297
|
-
LabelOwnProps,
|
|
1298
|
-
E
|
|
1299
|
-
>
|
|
1300
|
-
|
|
891
|
+
declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element;
|
|
1301
892
|
/**
|
|
1302
|
-
*
|
|
1303
|
-
* @beta
|
|
893
|
+
* @public
|
|
1304
894
|
*/
|
|
1305
|
-
|
|
1306
|
-
E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
|
|
1307
|
-
>(props: LabelSkeletonProps<E>): React.JSX.Element
|
|
1308
|
-
|
|
1309
|
-
/** @beta */
|
|
1310
|
-
export declare type LabelSkeletonElementType = SkeletonElementType
|
|
1311
|
-
|
|
1312
|
-
/** @beta */
|
|
1313
|
-
export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
|
|
1314
|
-
size?: ResponsiveProp<FontLabelSize>
|
|
1315
|
-
}
|
|
1316
|
-
|
|
895
|
+
type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial';
|
|
1317
896
|
/**
|
|
1318
|
-
*
|
|
1319
|
-
* @beta
|
|
897
|
+
* @public
|
|
1320
898
|
*/
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
isTopLayer: boolean
|
|
1334
|
-
level?: number
|
|
1335
|
-
registerChild: (childLevel?: number) => () => void
|
|
1336
|
-
size: number
|
|
1337
|
-
zIndex: number
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
/** @public */
|
|
1341
|
-
export declare type LayerElementType = CardElementType
|
|
1342
|
-
|
|
1343
|
-
/** @public */
|
|
1344
|
-
export declare type LayerOwnProps = CardOwnProps & {
|
|
1345
|
-
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1346
|
-
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1347
|
-
zOffset?: ResponsiveProp<number>
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/** @public */
|
|
1351
|
-
export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
|
|
1352
|
-
LayerOwnProps,
|
|
1353
|
-
E
|
|
1354
|
-
>
|
|
1355
|
-
|
|
1356
|
-
/** @public */
|
|
1357
|
-
export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
|
|
1358
|
-
|
|
1359
|
-
/** @public */
|
|
1360
|
-
export declare interface LayerProviderProps {
|
|
1361
|
-
children?: ReactNode
|
|
1362
|
-
zOffset?: ResponsiveProp<number>
|
|
899
|
+
interface HeadingOwnProps {
|
|
900
|
+
accent?: boolean;
|
|
901
|
+
align?: TextAlign | TextAlign[];
|
|
902
|
+
muted?: boolean;
|
|
903
|
+
size?: number | number[];
|
|
904
|
+
/**
|
|
905
|
+
* Controls how overflowing text is treated.
|
|
906
|
+
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
907
|
+
* @beta
|
|
908
|
+
*/
|
|
909
|
+
textOverflow?: 'ellipsis';
|
|
910
|
+
weight?: ThemeFontWeightKey$1;
|
|
1363
911
|
}
|
|
1364
|
-
|
|
1365
912
|
/**
|
|
1366
|
-
* @
|
|
913
|
+
* @public
|
|
1367
914
|
*/
|
|
1368
|
-
|
|
1369
|
-
subscribe: (onStoreChange: () => void) => () => void
|
|
1370
|
-
getSnapshot: () => Breakpoint
|
|
1371
|
-
}
|
|
1372
|
-
|
|
915
|
+
type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>;
|
|
1373
916
|
/**
|
|
1374
|
-
*
|
|
917
|
+
* Typographic headings.
|
|
1375
918
|
*
|
|
1376
919
|
* @public
|
|
1377
920
|
*/
|
|
1378
|
-
|
|
1379
|
-
props: MenuProps<E>,
|
|
1380
|
-
): React.JSX.Element
|
|
1381
|
-
|
|
921
|
+
declare const Heading: <E extends ElementType = 'div'>(props: HeadingProps<E>) => React.JSX.Element;
|
|
1382
922
|
/**
|
|
1383
|
-
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1384
|
-
*
|
|
1385
923
|
* @public
|
|
1386
924
|
*/
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
* @beta Do not use in production.
|
|
1393
|
-
*/
|
|
1394
|
-
__unstable_disableRestoreFocusOnClose?: boolean
|
|
1395
|
-
button: ReactElement<ButtonProps>
|
|
1396
|
-
id: string
|
|
1397
|
-
menu?: ReactElement
|
|
1398
|
-
onClose?: () => void
|
|
1399
|
-
onOpen?: () => void
|
|
1400
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1401
|
-
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
/** @public */
|
|
1405
|
-
export declare function MenuDivider<
|
|
1406
|
-
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1407
|
-
>(props: MenuDividerProps<E>): React.JSX.Element
|
|
1408
|
-
|
|
1409
|
-
/** @public */
|
|
1410
|
-
export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
1411
|
-
|
|
1412
|
-
/** @public */
|
|
1413
|
-
export declare type MenuDividerOwnProps = {}
|
|
1414
|
-
|
|
1415
|
-
/** @public */
|
|
1416
|
-
export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
|
|
1417
|
-
Props<MenuDividerOwnProps, E>
|
|
1418
|
-
|
|
1419
|
-
/** @public */
|
|
1420
|
-
export declare type MenuElementType = 'div' | 'span' | ComponentType
|
|
1421
|
-
|
|
1422
|
-
/** @public */
|
|
1423
|
-
export declare function MenuGroup<
|
|
1424
|
-
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
1425
|
-
>(props: MenuGroupProps<E>): React.JSX.Element
|
|
1426
|
-
|
|
1427
|
-
/** @public */
|
|
1428
|
-
export declare type MenuGroupElementType = 'button' | ComponentType
|
|
1429
|
-
|
|
1430
|
-
/** @public */
|
|
1431
|
-
export declare type MenuGroupOwnProps = RadiusStyleProps & {
|
|
1432
|
-
disabled?: boolean
|
|
1433
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1434
|
-
gap?: ResponsiveProp<Space>
|
|
1435
|
-
icon?: ElementType_2 | ReactNode
|
|
1436
|
-
menu?: Omit<
|
|
1437
|
-
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1438
|
-
| 'onClickOutside'
|
|
1439
|
-
| 'onEscape'
|
|
1440
|
-
| 'onItemClick'
|
|
1441
|
-
| 'onKeyDown'
|
|
1442
|
-
| 'onMouseEnter'
|
|
1443
|
-
| 'registerElement'
|
|
1444
|
-
| 'shouldFocus'
|
|
1445
|
-
| 'onBlurCapture'
|
|
1446
|
-
>
|
|
1447
|
-
padding?: ResponsiveProp<Space>
|
|
1448
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1449
|
-
text?: ReactNode
|
|
1450
|
-
tone?: ElementTone
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
/** @public */
|
|
1454
|
-
export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
|
|
1455
|
-
MenuGroupOwnProps,
|
|
1456
|
-
E
|
|
1457
|
-
>
|
|
1458
|
-
|
|
1459
|
-
/** @public */
|
|
1460
|
-
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
1461
|
-
props: MenuItemProps<E>,
|
|
1462
|
-
): React.JSX.Element
|
|
1463
|
-
|
|
1464
|
-
/** @public */
|
|
1465
|
-
export declare type MenuItemElementType = 'button' | 'a' | ComponentType
|
|
1466
|
-
|
|
1467
|
-
/** @public */
|
|
1468
|
-
export declare type MenuItemOwnProps = GapStyleProps &
|
|
1469
|
-
PaddingStyleProps &
|
|
1470
|
-
RadiusStyleProps & {
|
|
1471
|
-
disabled?: boolean
|
|
1472
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1473
|
-
hotkeys?: string[]
|
|
1474
|
-
icon?: ElementType_2 | ReactNode
|
|
1475
|
-
iconRight?: ElementType_2 | ReactNode
|
|
1476
|
-
pressed?: boolean
|
|
1477
|
-
selected?: boolean
|
|
1478
|
-
text?: ReactNode
|
|
1479
|
-
tone?: ElementTone
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
/** @public */
|
|
1483
|
-
export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Props<
|
|
1484
|
-
MenuItemOwnProps,
|
|
1485
|
-
E
|
|
1486
|
-
>
|
|
1487
|
-
|
|
1488
|
-
/** @public */
|
|
1489
|
-
export declare type MenuOwnProps = PaddingStyleProps & {
|
|
1490
|
-
'gap'?: ResponsiveProp<Space>
|
|
1491
|
-
'onClickOutside'?: (event: MouseEvent) => void
|
|
1492
|
-
'onEscape'?: () => void
|
|
1493
|
-
'onItemClick'?: () => void
|
|
1494
|
-
'onItemSelect'?: (index: number) => void
|
|
1495
|
-
'originElement'?: HTMLElement | null
|
|
1496
|
-
'registerElement'?: (el: HTMLElement) => () => void
|
|
1497
|
-
'shouldFocus'?: 'first' | 'last' | null
|
|
1498
|
-
'aria-labelledby'?: string
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
/** @public */
|
|
1502
|
-
export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
|
|
1503
|
-
|
|
925
|
+
interface KBDOwnProps {
|
|
926
|
+
fontSize?: number | number[];
|
|
927
|
+
padding?: number | number[];
|
|
928
|
+
radius?: Radius | Radius[];
|
|
929
|
+
}
|
|
1504
930
|
/**
|
|
1505
|
-
* Placement of floating UI elements.
|
|
1506
|
-
*
|
|
1507
931
|
* @public
|
|
1508
932
|
*/
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
| 'top-end'
|
|
1513
|
-
| 'right'
|
|
1514
|
-
| 'right-start'
|
|
1515
|
-
| 'right-end'
|
|
1516
|
-
| 'bottom'
|
|
1517
|
-
| 'bottom-start'
|
|
1518
|
-
| 'bottom-end'
|
|
1519
|
-
| 'left'
|
|
1520
|
-
| 'left-start'
|
|
1521
|
-
| 'left-end'
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* The `Popover` component is used to display some content on top of another.
|
|
933
|
+
type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>;
|
|
934
|
+
/**
|
|
935
|
+
* Used to define some text as keyboard input.
|
|
1525
936
|
*
|
|
1526
937
|
* @public
|
|
1527
938
|
*/
|
|
1528
|
-
|
|
1529
|
-
props: PopoverProps<E>,
|
|
1530
|
-
): React.JSX.Element
|
|
1531
|
-
|
|
1532
|
-
/** @public */
|
|
1533
|
-
export declare type PopoverElementType = 'div' | ComponentType
|
|
1534
|
-
|
|
939
|
+
declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element;
|
|
1535
940
|
/**
|
|
1536
|
-
* @
|
|
941
|
+
* @public
|
|
1537
942
|
*/
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
__unstable_margins?: PopoverMargins
|
|
1544
|
-
/**
|
|
1545
|
-
* Whether the popover should animate in and out.
|
|
1546
|
-
*
|
|
1547
|
-
* @beta
|
|
1548
|
-
* @defaultValue false
|
|
1549
|
-
*/
|
|
1550
|
-
animate?: boolean
|
|
1551
|
-
arrow?: boolean
|
|
1552
|
-
children?: ReactElement<{
|
|
1553
|
-
ref: ForwardedRef<HTMLElement>
|
|
1554
|
-
}>
|
|
1555
|
-
/**
|
|
1556
|
-
* When `true`, prevent overflow within the current boundary:
|
|
1557
|
-
* - by flipping on its side axis
|
|
1558
|
-
* - by resizing
|
|
1559
|
-
*
|
|
1560
|
-
* Note that:
|
|
1561
|
-
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1562
|
-
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1563
|
-
*
|
|
1564
|
-
* @defaultValue false
|
|
1565
|
-
*/
|
|
1566
|
-
constrainSize?: boolean
|
|
1567
|
-
content?: ReactNode
|
|
1568
|
-
disabled?: boolean
|
|
1569
|
-
fallbackPlacements?: Placement[]
|
|
1570
|
-
floatingBoundary?: HTMLElement | null
|
|
1571
|
-
/**
|
|
1572
|
-
* When `true`, set the maximum width to match the reference element, and also prevent overflow within
|
|
1573
|
-
* the current boundary by resizing.
|
|
1574
|
-
*
|
|
1575
|
-
* Note that setting `constrainSize` to `true` also causes the popover to resize
|
|
1576
|
-
*
|
|
1577
|
-
* @defaultValue false
|
|
1578
|
-
*/
|
|
1579
|
-
matchReferenceWidth?: boolean
|
|
1580
|
-
/**
|
|
1581
|
-
* When true, blocks all pointer interaction with elements beneath the popover until closed.
|
|
1582
|
-
*
|
|
1583
|
-
* @beta
|
|
1584
|
-
* @defaultValue false
|
|
1585
|
-
*/
|
|
1586
|
-
modal?: boolean
|
|
1587
|
-
open?: boolean
|
|
1588
|
-
placement?: Placement
|
|
1589
|
-
/**
|
|
1590
|
-
* When 'flip' (default), the placement is determined from the initial placement and the
|
|
1591
|
-
* fallback placements in order. Whichever fits in the viewport first.
|
|
1592
|
-
*
|
|
1593
|
-
* When 'autoPlacement', the initial placement and all fallback placements are evaluated
|
|
1594
|
-
* and the placement with the most viewport space available.
|
|
1595
|
-
*
|
|
1596
|
-
* Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
|
|
1597
|
-
*/
|
|
1598
|
-
placementStrategy?: 'flip' | 'autoPlacement'
|
|
1599
|
-
/** Whether or not to render the popover in a portal element. */
|
|
1600
|
-
portal?: boolean | string
|
|
1601
|
-
preventOverflow?: boolean
|
|
1602
|
-
referenceBoundary?: HTMLElement | null
|
|
1603
|
-
/**
|
|
1604
|
-
* When defined, the popover will be positioned relative to this element.
|
|
1605
|
-
* The children of the popover won't be rendered.
|
|
1606
|
-
*/
|
|
1607
|
-
referenceElement?: HTMLElement | null
|
|
1608
|
-
/** @beta */
|
|
1609
|
-
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1610
|
-
width?: ResponsiveProp<MaxWidth>
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
/** @public */
|
|
1614
|
-
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1615
|
-
PopoverOwnProps,
|
|
1616
|
-
E
|
|
1617
|
-
>
|
|
1618
|
-
|
|
1619
|
-
/** @beta */
|
|
1620
|
-
export declare type PopoverUpdateCallback = () => void
|
|
1621
|
-
|
|
1622
|
-
/** @public */
|
|
1623
|
-
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
1624
|
-
|
|
1625
|
-
/** @public */
|
|
1626
|
-
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
1627
|
-
|
|
1628
|
-
/** @public */
|
|
1629
|
-
export declare interface PortalContextValue {
|
|
1630
|
-
version: 0.0
|
|
1631
|
-
boundaryElement: HTMLElement | null
|
|
1632
|
-
element: HTMLElement | null
|
|
1633
|
-
elements?: Record<string, HTMLElement | null | undefined>
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
/** @public */
|
|
1637
|
-
export declare interface PortalProps {
|
|
1638
|
-
children: ReactNode
|
|
1639
|
-
/**
|
|
1640
|
-
* @beta This API might change. DO NOT USE IN PRODUCTION.
|
|
1641
|
-
*/
|
|
1642
|
-
__unstable_name?: string
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
/** @public */
|
|
1646
|
-
export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
|
|
1647
|
-
|
|
1648
|
-
/** @public */
|
|
1649
|
-
export declare interface PortalProviderProps {
|
|
1650
|
-
children: ReactNode
|
|
1651
|
-
element?: HTMLElement | null
|
|
943
|
+
interface LabelOwnProps {
|
|
944
|
+
accent?: boolean;
|
|
945
|
+
align?: TextAlign | TextAlign[];
|
|
946
|
+
muted?: boolean;
|
|
947
|
+
size?: number | number[];
|
|
1652
948
|
/**
|
|
949
|
+
* Controls how overflowing text is treated.
|
|
950
|
+
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
1653
951
|
* @beta
|
|
1654
952
|
*/
|
|
1655
|
-
|
|
953
|
+
textOverflow?: 'ellipsis';
|
|
954
|
+
weight?: ThemeFontWeightKey$1;
|
|
1656
955
|
}
|
|
1657
|
-
|
|
1658
|
-
/** @public */
|
|
1659
|
-
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
1660
|
-
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
1661
|
-
P & {
|
|
1662
|
-
as?: E
|
|
1663
|
-
}
|
|
1664
|
-
>
|
|
1665
|
-
|
|
1666
956
|
/**
|
|
1667
|
-
* The `Radio` component allows the user to select one option from a set.
|
|
1668
|
-
*
|
|
1669
957
|
* @public
|
|
1670
958
|
*/
|
|
1671
|
-
|
|
1672
|
-
props: RadioProps<E>,
|
|
1673
|
-
): React.JSX.Element
|
|
1674
|
-
|
|
1675
|
-
/** @public */
|
|
1676
|
-
export declare type RadioElementType = 'input' | ComponentType
|
|
1677
|
-
|
|
1678
|
-
/** @public */
|
|
1679
|
-
export declare type RadioOwnProps = {
|
|
1680
|
-
customValidity?: string
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
/** @public */
|
|
1684
|
-
export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
|
|
1685
|
-
RadioOwnProps,
|
|
1686
|
-
E
|
|
1687
|
-
>
|
|
1688
|
-
|
|
1689
|
-
/**
|
|
1690
|
-
* @internal
|
|
1691
|
-
*/
|
|
1692
|
-
export declare function _raf(fn: () => void): () => void
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
* @internal
|
|
1696
|
-
*/
|
|
1697
|
-
export declare function _raf2(fn: () => void): () => void
|
|
1698
|
-
|
|
959
|
+
type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>;
|
|
1699
960
|
/**
|
|
1700
|
-
*
|
|
961
|
+
* Typographic labels.
|
|
962
|
+
*
|
|
963
|
+
* @public
|
|
1701
964
|
*/
|
|
1702
|
-
|
|
1703
|
-
|
|
965
|
+
declare const Label: <E extends ElementType = 'div'>(props: LabelProps<E>) => React.JSX.Element;
|
|
1704
966
|
/**
|
|
1705
|
-
* @
|
|
967
|
+
* @public
|
|
1706
968
|
*/
|
|
1707
|
-
|
|
1708
|
-
|
|
969
|
+
interface RadioProps {
|
|
970
|
+
customValidity?: string;
|
|
1709
971
|
}
|
|
1710
|
-
|
|
1711
972
|
/**
|
|
1712
|
-
* The `
|
|
973
|
+
* The `Radio` component allows the user to select one option from a set.
|
|
1713
974
|
*
|
|
1714
975
|
* @public
|
|
1715
976
|
*/
|
|
1716
|
-
|
|
1717
|
-
props: RootProps<E>,
|
|
1718
|
-
): React.JSX.Element
|
|
1719
|
-
|
|
1720
|
-
/** @public */
|
|
1721
|
-
export declare type RootElementType = 'html' | 'body' | 'div'
|
|
1722
|
-
|
|
1723
|
-
/** @public */
|
|
1724
|
-
export declare interface RootOwnProps extends BoxOwnProps, RootStyleProps {}
|
|
1725
|
-
|
|
1726
|
-
/** @public */
|
|
1727
|
-
export declare type RootProps<E extends RootElementType = RootElementType> = Props<RootOwnProps, E>
|
|
1728
|
-
|
|
1729
|
-
/** @public */
|
|
1730
|
-
export declare function RootProvider(props: RootProviderProps): React.JSX.Element
|
|
1731
|
-
|
|
1732
|
-
/** @public */
|
|
1733
|
-
export declare interface RootProviderProps {
|
|
1734
|
-
boundaryElement?: HTMLElement | null
|
|
1735
|
-
children?: ReactNode
|
|
1736
|
-
portalElement?: HTMLElement | null
|
|
1737
|
-
scheme?: ColorScheme
|
|
1738
|
-
tone?: CardTone
|
|
1739
|
-
}
|
|
1740
|
-
|
|
977
|
+
declare function Radio(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & RadioProps): import("react").JSX.Element;
|
|
1741
978
|
/**
|
|
1742
|
-
* The `Select` component provides control of options.
|
|
1743
|
-
*
|
|
1744
979
|
* @public
|
|
1745
980
|
*/
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
export declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1757
|
-
|
|
1758
|
-
/** @internal */
|
|
1759
|
-
export declare type SelectableOwnProps = BoxOwnProps &
|
|
1760
|
-
SelectableStyleProps & {
|
|
1761
|
-
disabled?: boolean
|
|
1762
|
-
href?: string
|
|
1763
|
-
selected?: boolean
|
|
1764
|
-
tone?: ElementTone
|
|
1765
|
-
type?: 'button'
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
/** @internal */
|
|
1769
|
-
export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
|
|
1770
|
-
Props<SelectableOwnProps, E>
|
|
1771
|
-
|
|
1772
|
-
/** @public */
|
|
1773
|
-
export declare type SelectElementType = 'select' | ComponentType
|
|
1774
|
-
|
|
1775
|
-
/** @public */
|
|
1776
|
-
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1777
|
-
customValidity?: string
|
|
1778
|
-
readOnly?: boolean
|
|
981
|
+
interface SelectProps {
|
|
982
|
+
fontSize?: number | number[];
|
|
983
|
+
gap?: number | number[];
|
|
984
|
+
padding?: number | number[];
|
|
985
|
+
radius?: Radius | Radius[];
|
|
986
|
+
/**
|
|
987
|
+
* @deprecated Use `gap` instead.
|
|
988
|
+
*/
|
|
989
|
+
space?: never;
|
|
990
|
+
customValidity?: string;
|
|
1779
991
|
}
|
|
1780
|
-
|
|
1781
|
-
/** @public */
|
|
1782
|
-
export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
|
|
1783
|
-
SelectOwnProps,
|
|
1784
|
-
E
|
|
1785
|
-
>
|
|
1786
|
-
|
|
1787
992
|
/**
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
993
|
+
* The `Select` component provides control of options.
|
|
994
|
+
*
|
|
995
|
+
* @public
|
|
1790
996
|
*/
|
|
1791
|
-
|
|
1792
|
-
props: SkeletonProps<E>,
|
|
1793
|
-
): React.JSX.Element
|
|
1794
|
-
|
|
1795
|
-
/** @beta */
|
|
1796
|
-
export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
1797
|
-
|
|
997
|
+
declare function Select(props: SelectProps & Omit<React.HTMLProps<HTMLSelectElement>, 'as'>): import("react").JSX.Element;
|
|
1798
998
|
/**
|
|
1799
|
-
*
|
|
1800
|
-
* @beta
|
|
999
|
+
* @public
|
|
1801
1000
|
*/
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1001
|
+
interface SpinnerProps {
|
|
1002
|
+
muted?: boolean;
|
|
1003
|
+
size?: number | number[];
|
|
1805
1004
|
}
|
|
1806
|
-
|
|
1807
|
-
/** @beta */
|
|
1808
|
-
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
1809
|
-
SkeletonOwnProps,
|
|
1810
|
-
E
|
|
1811
|
-
>
|
|
1812
|
-
|
|
1813
1005
|
/**
|
|
1814
1006
|
* Indicate that something is loading for an indeterminate amount of time.
|
|
1815
1007
|
*
|
|
1816
1008
|
* @public
|
|
1817
1009
|
*/
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
SpinnerOwnProps,
|
|
1834
|
-
E
|
|
1835
|
-
>
|
|
1836
|
-
|
|
1837
|
-
/** @public */
|
|
1838
|
-
export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
|
|
1839
|
-
props: SrOnlyProps<E>,
|
|
1840
|
-
): React.JSX.Element
|
|
1841
|
-
|
|
1842
|
-
/** @public */
|
|
1843
|
-
export declare type SrOnlyElementType = 'span' | ComponentType
|
|
1844
|
-
|
|
1845
|
-
/** @public */
|
|
1846
|
-
export declare type SrOnlyOwnProps = {}
|
|
1847
|
-
|
|
1848
|
-
/** @public */
|
|
1849
|
-
export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
|
|
1850
|
-
SrOnlyOwnProps,
|
|
1851
|
-
E
|
|
1852
|
-
>
|
|
1853
|
-
|
|
1010
|
+
declare function Spinner(props: SpinnerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>): import("react").JSX.Element;
|
|
1011
|
+
/**
|
|
1012
|
+
* @public
|
|
1013
|
+
*/
|
|
1014
|
+
interface StackOwnProps extends BoxOwnProps {
|
|
1015
|
+
gap?: number | number[];
|
|
1016
|
+
/**
|
|
1017
|
+
* @deprecated Use `gap` instead.
|
|
1018
|
+
*/
|
|
1019
|
+
space?: never;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* @public
|
|
1023
|
+
*/
|
|
1024
|
+
type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>;
|
|
1854
1025
|
/**
|
|
1855
1026
|
* The `Stack` component is used to place elements on top of each other.
|
|
1856
1027
|
*
|
|
1857
1028
|
* @public
|
|
1858
1029
|
*/
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
/** @public */
|
|
1867
|
-
export declare type StackOwnProps = Omit<
|
|
1868
|
-
BoxOwnProps,
|
|
1869
|
-
| 'align'
|
|
1870
|
-
| 'alignItems'
|
|
1871
|
-
| 'columns'
|
|
1872
|
-
| 'gridTemplateColumns'
|
|
1873
|
-
| 'direction'
|
|
1874
|
-
| 'display'
|
|
1875
|
-
| 'flexDirection'
|
|
1876
|
-
| 'flexWrap'
|
|
1877
|
-
| 'gapX'
|
|
1878
|
-
| 'gapY'
|
|
1879
|
-
| 'justify'
|
|
1880
|
-
| 'justifyContent'
|
|
1881
|
-
| 'rows'
|
|
1882
|
-
| 'gridTemplateRows'
|
|
1883
|
-
>
|
|
1884
|
-
|
|
1885
|
-
/** @public */
|
|
1886
|
-
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
1887
|
-
StackOwnProps,
|
|
1888
|
-
E
|
|
1889
|
-
>
|
|
1890
|
-
|
|
1030
|
+
declare const Stack: <E extends ElementType = 'div'>(props: StackProps<E>) => React.JSX.Element;
|
|
1031
|
+
/**
|
|
1032
|
+
* @public
|
|
1033
|
+
*/
|
|
1034
|
+
interface SwitchProps {
|
|
1035
|
+
indeterminate?: boolean;
|
|
1036
|
+
}
|
|
1891
1037
|
/**
|
|
1892
1038
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
1893
1039
|
*
|
|
@@ -1895,627 +1041,505 @@ export declare type StackProps<E extends StackElementType = StackElementType> =
|
|
|
1895
1041
|
*
|
|
1896
1042
|
* @public
|
|
1897
1043
|
*/
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
/**
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
/** @public */
|
|
1911
|
-
export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
|
|
1912
|
-
SwitchOwnProps,
|
|
1913
|
-
E
|
|
1914
|
-
>
|
|
1915
|
-
|
|
1916
|
-
/** @public */
|
|
1917
|
-
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
1918
|
-
props: TabProps<E>,
|
|
1919
|
-
): React.JSX.Element
|
|
1920
|
-
|
|
1921
|
-
/** @public */
|
|
1922
|
-
export declare type TabElementType = 'button' | ComponentType
|
|
1923
|
-
|
|
1924
|
-
/** @public */
|
|
1925
|
-
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
1926
|
-
props: TabListProps<E>,
|
|
1927
|
-
): React.JSX.Element
|
|
1928
|
-
|
|
1929
|
-
/** @public */
|
|
1930
|
-
export declare type TabListChild =
|
|
1931
|
-
| ReactElement<Props<TabProps, 'button'>>
|
|
1932
|
-
| null
|
|
1933
|
-
| undefined
|
|
1934
|
-
| false
|
|
1935
|
-
|
|
1936
|
-
/** @public */
|
|
1937
|
-
export declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
1938
|
-
|
|
1939
|
-
/** @public */
|
|
1940
|
-
export declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
|
|
1941
|
-
children: TabListChild[]
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
/** @public */
|
|
1945
|
-
export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
|
|
1946
|
-
TabListOwnProps,
|
|
1947
|
-
E
|
|
1948
|
-
>
|
|
1949
|
-
|
|
1950
|
-
/** @public */
|
|
1951
|
-
export declare type TabOwnProps = {
|
|
1952
|
-
/**
|
|
1953
|
-
* The `id` of the corresponding `TabPanel` component.
|
|
1954
|
-
*/
|
|
1955
|
-
'aria-controls': string
|
|
1956
|
-
'id': string
|
|
1957
|
-
'icon'?: ElementType_2 | ReactNode
|
|
1958
|
-
'focused'?: boolean
|
|
1959
|
-
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
1960
|
-
'label'?: ReactNode
|
|
1961
|
-
'padding'?: ResponsiveProp<Space>
|
|
1962
|
-
'selected'?: boolean
|
|
1963
|
-
'tone'?: ElementTone
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
/** @public */
|
|
1967
|
-
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
1968
|
-
props: TabPanelProps<E>,
|
|
1969
|
-
): React.JSX.Element
|
|
1970
|
-
|
|
1971
|
-
/** @public */
|
|
1972
|
-
export declare type TabPanelElementType = 'div' | 'span' | ComponentType
|
|
1973
|
-
|
|
1974
|
-
/** @public */
|
|
1975
|
-
export declare type TabPanelOwnProps = BoxOwnProps & {
|
|
1044
|
+
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[];
|
|
1976
1054
|
/**
|
|
1977
|
-
*
|
|
1055
|
+
* Controls how overflowing text is treated.
|
|
1056
|
+
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
1057
|
+
* @beta
|
|
1978
1058
|
*/
|
|
1979
|
-
'
|
|
1980
|
-
|
|
1059
|
+
textOverflow?: 'ellipsis';
|
|
1060
|
+
weight?: ThemeFontWeightKey$1;
|
|
1981
1061
|
}
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
E
|
|
1987
|
-
>
|
|
1988
|
-
|
|
1989
|
-
/** @public */
|
|
1990
|
-
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
1991
|
-
|
|
1992
|
-
/** @public */
|
|
1993
|
-
export declare type TagType = keyof JSX.IntrinsicElements
|
|
1994
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* @public
|
|
1064
|
+
*/
|
|
1065
|
+
type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>;
|
|
1995
1066
|
/**
|
|
1996
1067
|
* The `Text` component is an agile, themed typographic element.
|
|
1997
1068
|
*
|
|
1998
1069
|
* @public
|
|
1999
1070
|
*/
|
|
2000
|
-
declare
|
|
2001
|
-
props: TextProps<E>,
|
|
2002
|
-
): React.JSX.Element
|
|
2003
|
-
export {Text_2 as Text}
|
|
2004
|
-
|
|
1071
|
+
declare const Text: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element;
|
|
2005
1072
|
/**
|
|
2006
|
-
* A multiline text input.
|
|
2007
|
-
*
|
|
2008
1073
|
* @public
|
|
2009
1074
|
*/
|
|
2010
|
-
|
|
2011
|
-
props: TextAreaProps<E>,
|
|
2012
|
-
): React.JSX.Element
|
|
2013
|
-
|
|
2014
|
-
/** @public */
|
|
2015
|
-
export declare type TextAreaElementType = 'textarea' | ComponentType
|
|
2016
|
-
|
|
2017
|
-
/** @public */
|
|
2018
|
-
export declare type TextAreaOwnProps = TextAreaStyleProps & {
|
|
1075
|
+
interface TextAreaProps extends ResponsiveRadiusProps {
|
|
2019
1076
|
/**
|
|
2020
1077
|
* @beta
|
|
2021
1078
|
*/
|
|
2022
|
-
__unstable_disableFocusRing?: boolean
|
|
2023
|
-
|
|
1079
|
+
__unstable_disableFocusRing?: boolean;
|
|
1080
|
+
border?: boolean;
|
|
1081
|
+
customValidity?: string;
|
|
1082
|
+
fontSize?: number | number[];
|
|
1083
|
+
padding?: number | number[];
|
|
1084
|
+
weight?: ThemeFontWeightKey$1;
|
|
2024
1085
|
}
|
|
2025
|
-
|
|
2026
|
-
/** @public */
|
|
2027
|
-
export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
|
|
2028
|
-
TextAreaOwnProps,
|
|
2029
|
-
E
|
|
2030
|
-
>
|
|
2031
|
-
|
|
2032
|
-
/** @public */
|
|
2033
|
-
export declare type TextElementType =
|
|
2034
|
-
| 'div'
|
|
2035
|
-
| 'h1'
|
|
2036
|
-
| 'h2'
|
|
2037
|
-
| 'h3'
|
|
2038
|
-
| 'h4'
|
|
2039
|
-
| 'h5'
|
|
2040
|
-
| 'h6'
|
|
2041
|
-
| 'label'
|
|
2042
|
-
| 'li'
|
|
2043
|
-
| 'p'
|
|
2044
|
-
| 'span'
|
|
2045
|
-
| 'summary'
|
|
2046
|
-
| 'time'
|
|
2047
|
-
| ComponentType
|
|
2048
|
-
|
|
2049
1086
|
/**
|
|
2050
|
-
*
|
|
1087
|
+
* A multiline text input.
|
|
2051
1088
|
*
|
|
2052
1089
|
* @public
|
|
2053
1090
|
*/
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
/** @public */
|
|
2068
|
-
export declare type TextInputOwnProps = InputStyleProps & {
|
|
1091
|
+
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 {
|
|
2069
1104
|
/**
|
|
2070
1105
|
* @beta
|
|
2071
1106
|
*/
|
|
2072
|
-
__unstable_disableFocusRing?: boolean
|
|
1107
|
+
__unstable_disableFocusRing?: boolean;
|
|
1108
|
+
border?: boolean;
|
|
2073
1109
|
/**
|
|
2074
1110
|
* @beta
|
|
2075
1111
|
*/
|
|
2076
|
-
clearButton?: boolean | TextInputClearButtonProps
|
|
2077
|
-
customValidity?: string
|
|
2078
|
-
|
|
2079
|
-
|
|
1112
|
+
clearButton?: boolean | TextInputClearButtonProps;
|
|
1113
|
+
customValidity?: string;
|
|
1114
|
+
fontSize?: number | number[];
|
|
1115
|
+
icon?: React.ElementType | React.ReactNode;
|
|
1116
|
+
iconRight?: React.ElementType | React.ReactNode;
|
|
2080
1117
|
/**
|
|
2081
1118
|
* @beta
|
|
2082
1119
|
*/
|
|
2083
|
-
onClear?: () => void
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
1120
|
+
onClear?: () => void;
|
|
1121
|
+
padding?: number | number[];
|
|
1122
|
+
prefix?: React.ReactNode;
|
|
1123
|
+
radius?: Radius | Radius[];
|
|
1124
|
+
/**
|
|
1125
|
+
* @deprecated Use `gap` instead.
|
|
1126
|
+
*/
|
|
1127
|
+
space?: never;
|
|
1128
|
+
gap?: number | number[];
|
|
1129
|
+
suffix?: React.ReactNode;
|
|
1130
|
+
type?: TextInputType;
|
|
1131
|
+
weight?: ThemeFontWeightKey$1;
|
|
2087
1132
|
}
|
|
2088
|
-
|
|
2089
|
-
/** @public */
|
|
2090
|
-
export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
|
|
2091
|
-
TextInputOwnProps,
|
|
2092
|
-
E
|
|
2093
|
-
>
|
|
2094
|
-
|
|
2095
|
-
/** @public */
|
|
2096
|
-
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2097
|
-
|
|
2098
|
-
/** @public */
|
|
2099
|
-
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2100
|
-
|
|
2101
1133
|
/**
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
1134
|
+
* Single line text input.
|
|
1135
|
+
*
|
|
1136
|
+
* @public
|
|
2104
1137
|
*/
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
/** @beta */
|
|
2113
|
-
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2114
|
-
size?: ResponsiveProp<FontTextSize>
|
|
1138
|
+
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;
|
|
2115
1144
|
}
|
|
2116
|
-
|
|
2117
1145
|
/**
|
|
2118
|
-
*
|
|
2119
|
-
* @beta
|
|
1146
|
+
* @internal
|
|
2120
1147
|
*/
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
1148
|
+
interface ResponsiveFontSizeStyleProps {
|
|
1149
|
+
$size: number[];
|
|
1150
|
+
}
|
|
2124
1151
|
/**
|
|
2125
|
-
* The `Toast` component gives feedback to users when an action has taken place.
|
|
2126
|
-
*
|
|
2127
|
-
* Toasts can be closed with a close button, or auto-dismiss when the duration expires.
|
|
2128
|
-
*
|
|
2129
1152
|
* @internal
|
|
2130
1153
|
*/
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
): React.JSX.Element
|
|
2134
|
-
|
|
2135
|
-
/** @public */
|
|
2136
|
-
export declare interface ToastContextValue {
|
|
2137
|
-
version: 0.0
|
|
2138
|
-
/**
|
|
2139
|
-
* Creates or updates a toast notification.
|
|
2140
|
-
* If a toast with the same ID already exists, it will be updated.
|
|
2141
|
-
* If an ID is not provided, a random one will be generated.
|
|
2142
|
-
* The returned ID can be used to programatically update a toast.
|
|
2143
|
-
*/
|
|
2144
|
-
push: (params: ToastParams) => string
|
|
1154
|
+
interface FontWeightStyleProps {
|
|
1155
|
+
$weight?: ThemeFontWeightKey$1;
|
|
2145
1156
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
declare type ToastLayerElementType = 'ul' | ComponentType
|
|
2152
|
-
|
|
2153
|
-
/** @internal */
|
|
2154
|
-
declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
|
|
2155
|
-
|
|
2156
|
-
/** @internal */
|
|
2157
|
-
declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
|
|
2158
|
-
ToastLayerOwnProps,
|
|
2159
|
-
E
|
|
2160
|
-
>
|
|
2161
|
-
|
|
2162
|
-
/** @internal */
|
|
2163
|
-
export declare type ToastOwnProps = RadiusStyleProps & {
|
|
2164
|
-
closable?: boolean
|
|
2165
|
-
description?: ReactNode
|
|
2166
|
-
onClose?: () => void
|
|
2167
|
-
title?: ReactNode
|
|
2168
|
-
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2169
|
-
duration?: number
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
/** @public */
|
|
2173
|
-
export declare interface ToastParams {
|
|
2174
|
-
closable?: boolean
|
|
2175
|
-
description?: ReactNode
|
|
2176
|
-
duration?: number
|
|
2177
|
-
id?: string
|
|
2178
|
-
onClose?: () => void
|
|
2179
|
-
title?: ReactNode
|
|
2180
|
-
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
/** @internal */
|
|
2184
|
-
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2185
|
-
ToastOwnProps,
|
|
2186
|
-
E
|
|
2187
|
-
>
|
|
2188
|
-
|
|
2189
|
-
/** @public */
|
|
2190
|
-
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2191
|
-
|
|
2192
|
-
/** @public */
|
|
2193
|
-
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2194
|
-
children?: React.ReactNode
|
|
2195
|
-
zOffset?: ResponsiveProp<number>
|
|
1157
|
+
/**
|
|
1158
|
+
* @internal
|
|
1159
|
+
*/
|
|
1160
|
+
interface ResponsiveTextAlignStyleProps {
|
|
1161
|
+
$align: TextAlign[];
|
|
2196
1162
|
}
|
|
2197
|
-
|
|
2198
1163
|
/**
|
|
2199
|
-
*
|
|
2200
|
-
|
|
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
|
+
declare function responsiveCodeFontStyle(props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps): CSSObject[];
|
|
1175
|
+
/**
|
|
1176
|
+
* Get responsive CSS for the `heading` font style.
|
|
1177
|
+
* @internal
|
|
1178
|
+
*/
|
|
1179
|
+
declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1180
|
+
/**
|
|
1181
|
+
* Get responsive CSS for the `label` font style.
|
|
1182
|
+
* @internal
|
|
1183
|
+
*/
|
|
1184
|
+
declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1185
|
+
/**
|
|
1186
|
+
* Get responsive text align styles.
|
|
1187
|
+
* @internal
|
|
1188
|
+
*/
|
|
1189
|
+
declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
|
|
1190
|
+
/**
|
|
1191
|
+
* Get responsive CSS for the `text` font style.
|
|
1192
|
+
* @internal
|
|
1193
|
+
*/
|
|
1194
|
+
declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1195
|
+
/**
|
|
1196
|
+
* @internal
|
|
1197
|
+
*/
|
|
1198
|
+
declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
|
|
1199
|
+
/**
|
|
2201
1200
|
* @public
|
|
2202
1201
|
*/
|
|
2203
|
-
|
|
2204
|
-
props: TooltipProps<E>,
|
|
2205
|
-
): React.JSX.Element
|
|
2206
|
-
|
|
1202
|
+
declare function rem(pixelValue: number): string | 0;
|
|
2207
1203
|
/**
|
|
2208
|
-
* @
|
|
1204
|
+
* @internal
|
|
2209
1205
|
*/
|
|
2210
|
-
|
|
2211
|
-
|
|
1206
|
+
declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
|
|
2212
1207
|
/**
|
|
2213
|
-
* @
|
|
1208
|
+
* @internal
|
|
1209
|
+
*/
|
|
1210
|
+
declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
|
|
1211
|
+
/**
|
|
1212
|
+
* @internal
|
|
1213
|
+
*/
|
|
1214
|
+
declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
|
|
1215
|
+
/**
|
|
1216
|
+
* @public
|
|
2214
1217
|
*/
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
closeDelay: number
|
|
2220
|
-
openTooltipId: string | null
|
|
1218
|
+
interface ThemeColorProviderProps {
|
|
1219
|
+
children?: React.ReactNode;
|
|
1220
|
+
scheme?: ThemeColorSchemeKey$1;
|
|
1221
|
+
tone?: ThemeColorCardToneKey;
|
|
2221
1222
|
}
|
|
2222
|
-
|
|
2223
1223
|
/**
|
|
2224
1224
|
* @public
|
|
2225
|
-
* Provides context for a group of tooltip elements that should share a delay
|
|
2226
|
-
* which temporarily becomes 1 ms after the first floating element of the group opens.
|
|
2227
1225
|
*/
|
|
2228
|
-
|
|
2229
|
-
props: TooltipDelayGroupProviderProps,
|
|
2230
|
-
): React.JSX.Element
|
|
2231
|
-
|
|
1226
|
+
declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
|
|
2232
1227
|
/**
|
|
2233
1228
|
* @public
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
children?: ReactNode
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2241
|
-
*
|
|
2242
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2243
|
-
*
|
|
2244
|
-
* @public
|
|
2245
|
-
*/
|
|
2246
|
-
delay: Delay
|
|
1229
|
+
*/
|
|
1230
|
+
interface ThemeProviderProps {
|
|
1231
|
+
children?: React.ReactNode;
|
|
1232
|
+
scheme?: ThemeColorSchemeKey$1;
|
|
1233
|
+
theme?: RootTheme$1;
|
|
1234
|
+
tone?: ThemeColorCardToneKey;
|
|
2247
1235
|
}
|
|
2248
|
-
|
|
2249
|
-
/** @public */
|
|
2250
|
-
export declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
2251
|
-
|
|
2252
|
-
/** @public */
|
|
2253
|
-
export declare type TooltipOwnProps = LayerOwnProps &
|
|
2254
|
-
RadiusStyleProps &
|
|
2255
|
-
ShadowStyleProps & {
|
|
2256
|
-
/**
|
|
2257
|
-
* Whether the tooltip should animate in and out.
|
|
2258
|
-
*
|
|
2259
|
-
* @beta
|
|
2260
|
-
* @defaultValue false
|
|
2261
|
-
*/
|
|
2262
|
-
animate?: boolean
|
|
2263
|
-
arrow?: boolean
|
|
2264
|
-
boundaryElement?: HTMLElement | null
|
|
2265
|
-
children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
|
|
2266
|
-
content?: ReactNode
|
|
2267
|
-
/**
|
|
2268
|
-
* Adds a delay to open or close the tooltip.
|
|
2269
|
-
*
|
|
2270
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2271
|
-
*
|
|
2272
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2273
|
-
*
|
|
2274
|
-
* @public
|
|
2275
|
-
* @defaultValue 0
|
|
2276
|
-
*/
|
|
2277
|
-
delay?: Delay
|
|
2278
|
-
disabled?: boolean
|
|
2279
|
-
fallbackPlacements?: Placement[]
|
|
2280
|
-
placement?: Placement
|
|
2281
|
-
/** Whether or not to render the tooltip in a portal element. */
|
|
2282
|
-
portal?: boolean | string
|
|
2283
|
-
scheme?: ColorScheme
|
|
2284
|
-
tone?: CardTone
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
/** @public */
|
|
2288
|
-
export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
|
|
2289
|
-
TooltipOwnProps,
|
|
2290
|
-
E
|
|
2291
|
-
>
|
|
2292
|
-
|
|
2293
1236
|
/**
|
|
2294
|
-
*
|
|
2295
|
-
* @beta
|
|
1237
|
+
* @public
|
|
2296
1238
|
*/
|
|
2297
|
-
|
|
2298
|
-
props: TreeProps<E>,
|
|
2299
|
-
): React.JSX.Element
|
|
2300
|
-
|
|
1239
|
+
declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
|
|
2301
1240
|
/**
|
|
2302
|
-
* @
|
|
1241
|
+
* @public
|
|
2303
1242
|
*/
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
setExpanded: (path: string, expanded: boolean) => void
|
|
2312
|
-
setFocusedElement: (focusedElement: HTMLElement | null) => void
|
|
2313
|
-
state: TreeState
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
/** @beta */
|
|
2317
|
-
export declare type TreeElementType = 'div' | ComponentType
|
|
2318
|
-
|
|
1243
|
+
interface ThemeContextValue {
|
|
1244
|
+
/** @deprecated No longer used */
|
|
1245
|
+
version: 0.0;
|
|
1246
|
+
scheme: ThemeColorSchemeKey$1;
|
|
1247
|
+
theme: RootTheme$1;
|
|
1248
|
+
tone: ThemeColorCardToneKey;
|
|
1249
|
+
}
|
|
2319
1250
|
/**
|
|
2320
|
-
*
|
|
2321
|
-
* @beta
|
|
1251
|
+
* @public
|
|
2322
1252
|
*/
|
|
2323
|
-
|
|
2324
|
-
props: TreeItemProps<E>,
|
|
2325
|
-
): React.JSX.Element
|
|
2326
|
-
|
|
2327
|
-
/** @beta */
|
|
2328
|
-
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
2329
|
-
|
|
2330
|
-
/** @beta */
|
|
2331
|
-
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2332
|
-
expanded?: boolean
|
|
2333
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
2334
|
-
icon?: ElementType_2
|
|
2335
|
-
/**
|
|
2336
|
-
* Allows passing a custom element type to the link component
|
|
2337
|
-
* @internal
|
|
2338
|
-
*/
|
|
2339
|
-
linkAs?: SelectableElementType
|
|
2340
|
-
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2341
|
-
padding?: ResponsiveProp<Space>
|
|
2342
|
-
space?: ResponsiveProp<Space>
|
|
2343
|
-
text?: ReactNode
|
|
2344
|
-
weight?: FontWeight
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
/** @beta */
|
|
2348
|
-
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
2349
|
-
TreeItemOwnProps,
|
|
2350
|
-
E
|
|
2351
|
-
>
|
|
2352
|
-
|
|
1253
|
+
declare function useRootTheme(): ThemeContextValue;
|
|
2353
1254
|
/**
|
|
2354
|
-
*
|
|
2355
|
-
|
|
1255
|
+
* @public
|
|
1256
|
+
*/
|
|
1257
|
+
declare function useTheme(): Theme$1;
|
|
1258
|
+
/**
|
|
1259
|
+
* @public
|
|
1260
|
+
*/
|
|
1261
|
+
declare function useTheme_v2(): Theme_v2;
|
|
1262
|
+
/** @internal */
|
|
1263
|
+
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
|
|
2356
1270
|
*/
|
|
2357
|
-
|
|
2358
|
-
|
|
1271
|
+
interface BoundaryElementProviderProps {
|
|
1272
|
+
children: React.ReactNode;
|
|
1273
|
+
element: HTMLElement | null;
|
|
2359
1274
|
}
|
|
2360
|
-
|
|
2361
|
-
/** @beta */
|
|
2362
|
-
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
2363
|
-
|
|
2364
1275
|
/**
|
|
1276
|
+
* @public
|
|
1277
|
+
*/
|
|
1278
|
+
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
|
+
declare function useBoundaryElement(): BoundaryElementContextValue;
|
|
1290
|
+
/**
|
|
1291
|
+
* @internal
|
|
1292
|
+
* @deprecated ConditionalWrapper was removed in @sanity/ui v4. Inline the conditional wrapping logic instead.
|
|
1293
|
+
*/
|
|
1294
|
+
declare function ConditionalWrapper(_props?: never): never;
|
|
1295
|
+
/**
|
|
1296
|
+
* DO NOT USE IN PRODUCTION.
|
|
2365
1297
|
* @beta
|
|
2366
1298
|
*/
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
element: HTMLElement
|
|
2371
|
-
expanded: boolean
|
|
2372
|
-
}
|
|
2373
|
-
| undefined
|
|
1299
|
+
interface MediaQueryProps {
|
|
1300
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1301
|
+
media?: number[];
|
|
2374
1302
|
}
|
|
2375
|
-
|
|
2376
|
-
/** @public */
|
|
2377
|
-
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2378
|
-
|
|
2379
|
-
/** @public */
|
|
2380
|
-
export declare function useCard(): CardContextValue
|
|
2381
|
-
|
|
2382
|
-
/** @public */
|
|
2383
|
-
export declare function useClickOutsideEvent(
|
|
2384
|
-
listener: ClickOutsideEventListener | false | undefined,
|
|
2385
|
-
elementsArg?: () => ClickOutsideEventElements,
|
|
2386
|
-
boundaryElement?: () => HTMLElement | null,
|
|
2387
|
-
): void
|
|
2388
|
-
|
|
2389
1303
|
/**
|
|
1304
|
+
* DO NOT USE IN PRODUCTION.
|
|
2390
1305
|
* @beta
|
|
2391
1306
|
*/
|
|
2392
|
-
|
|
2393
|
-
ref: {
|
|
2394
|
-
current: null | {
|
|
2395
|
-
setCustomValidity: (validity: string) => void
|
|
2396
|
-
}
|
|
2397
|
-
},
|
|
2398
|
-
customValidity: string | undefined,
|
|
2399
|
-
): void
|
|
2400
|
-
|
|
1307
|
+
declare function ElementQuery(props: MediaQueryProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'media'>): import("react").JSX.Element;
|
|
2401
1308
|
/**
|
|
2402
|
-
*
|
|
1309
|
+
* DO NOT USE IN PRODUCTION
|
|
2403
1310
|
* @beta
|
|
2404
1311
|
*/
|
|
2405
|
-
|
|
2406
|
-
|
|
1312
|
+
type ErrorBoundaryProps = PropsWithChildren<{
|
|
1313
|
+
onCatch: (params: {
|
|
1314
|
+
error: Error;
|
|
1315
|
+
info: React.ErrorInfo;
|
|
1316
|
+
}) => void;
|
|
1317
|
+
}>;
|
|
2407
1318
|
/**
|
|
2408
|
-
*
|
|
1319
|
+
* DO NOT USE IN PRODUCTION
|
|
2409
1320
|
* @beta
|
|
2410
1321
|
*/
|
|
2411
|
-
|
|
2412
|
-
|
|
1322
|
+
interface ErrorBoundaryState {
|
|
1323
|
+
error: Error | null;
|
|
1324
|
+
}
|
|
2413
1325
|
/**
|
|
1326
|
+
* DO NOT USE IN PRODUCTION
|
|
2414
1327
|
* @beta
|
|
2415
1328
|
*/
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
1329
|
+
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
1330
|
+
state: ErrorBoundaryState;
|
|
1331
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
1332
|
+
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
1333
|
+
render(): React.ReactNode;
|
|
1334
|
+
}
|
|
2421
1335
|
/**
|
|
2422
|
-
* Efficiently subscribes to `window.matchMedia` queries
|
|
2423
|
-
*
|
|
2424
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2425
|
-
*
|
|
2426
1336
|
* @public
|
|
2427
1337
|
*/
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
1338
|
+
interface LayerProviderProps {
|
|
1339
|
+
children?: React.ReactNode;
|
|
1340
|
+
zOffset?: number | number[];
|
|
1341
|
+
}
|
|
2433
1342
|
/**
|
|
2434
|
-
*
|
|
2435
|
-
* @beta
|
|
1343
|
+
* @public
|
|
2436
1344
|
*/
|
|
2437
|
-
|
|
2438
|
-
|
|
1345
|
+
declare function LayerProvider(props: LayerProviderProps): React.JSX.Element;
|
|
2439
1346
|
/** @public */
|
|
2440
|
-
|
|
2441
|
-
|
|
1347
|
+
interface LayerContextValue {
|
|
1348
|
+
version: 0.0;
|
|
1349
|
+
isTopLayer: boolean;
|
|
1350
|
+
level?: number;
|
|
1351
|
+
registerChild: (childLevel?: number) => () => void;
|
|
1352
|
+
size: number;
|
|
1353
|
+
zIndex: number;
|
|
1354
|
+
}
|
|
2442
1355
|
/**
|
|
2443
|
-
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
2444
|
-
*
|
|
2445
|
-
* @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://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2446
|
-
*
|
|
2447
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2448
|
-
* 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
|
|
2449
|
-
* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
|
|
2450
|
-
*
|
|
2451
1356
|
* @public
|
|
2452
1357
|
*/
|
|
2453
|
-
|
|
2454
|
-
|
|
1358
|
+
declare function useLayer(): LayerContextValue;
|
|
1359
|
+
/**
|
|
1360
|
+
* @public
|
|
1361
|
+
*/
|
|
1362
|
+
interface PortalProps {
|
|
1363
|
+
children: React.ReactNode;
|
|
1364
|
+
/**
|
|
1365
|
+
* @beta This API might change. DO NOT USE IN PRODUCTION.
|
|
1366
|
+
*/
|
|
1367
|
+
__unstable_name?: string;
|
|
1368
|
+
}
|
|
2455
1369
|
/**
|
|
2456
|
-
* Returns true if motion should be reduced
|
|
2457
|
-
*
|
|
2458
|
-
* @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-reduced-motion: no-preference)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2459
|
-
*
|
|
2460
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2461
|
-
* Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
|
|
2462
|
-
* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
|
|
2463
|
-
*
|
|
2464
1370
|
* @public
|
|
2465
1371
|
*/
|
|
2466
|
-
|
|
2467
|
-
|
|
1372
|
+
declare function Portal(props: PortalProps): React.ReactPortal | null;
|
|
1373
|
+
/**
|
|
1374
|
+
* @public
|
|
1375
|
+
*/
|
|
1376
|
+
interface PortalProviderProps {
|
|
1377
|
+
/**
|
|
1378
|
+
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
1379
|
+
*/
|
|
1380
|
+
boundaryElement?: HTMLElement | null;
|
|
1381
|
+
children: React.ReactNode;
|
|
1382
|
+
element?: HTMLElement | null;
|
|
1383
|
+
/**
|
|
1384
|
+
* @beta
|
|
1385
|
+
*/
|
|
1386
|
+
__unstable_elements?: Record<string, HTMLElement | null | undefined>;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* @public
|
|
1390
|
+
*/
|
|
1391
|
+
declare function PortalProvider(props: PortalProviderProps): React.JSX.Element;
|
|
1392
|
+
/**
|
|
1393
|
+
* @public
|
|
1394
|
+
*/
|
|
1395
|
+
interface PortalContextValue {
|
|
1396
|
+
version: 0.0;
|
|
1397
|
+
boundaryElement: HTMLElement | null;
|
|
1398
|
+
element: HTMLElement | null;
|
|
1399
|
+
elements?: Record<string, HTMLElement | null | undefined>;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* @public
|
|
1403
|
+
*/
|
|
1404
|
+
declare function usePortal(): PortalContextValue;
|
|
1405
|
+
/**
|
|
1406
|
+
* @public
|
|
1407
|
+
*/
|
|
1408
|
+
interface SrOnlyProps {
|
|
1409
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1410
|
+
children?: React.ReactNode;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* @public
|
|
1414
|
+
*/
|
|
1415
|
+
declare function SrOnly(props: SrOnlyProps & Omit<React.HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>): import("react").JSX.Element;
|
|
2468
1416
|
/**
|
|
2469
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2470
1417
|
* @beta
|
|
2471
1418
|
*/
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
1419
|
+
interface VirtualListChangeOpts {
|
|
1420
|
+
fromIndex: number;
|
|
1421
|
+
gap: number;
|
|
1422
|
+
itemHeight: number;
|
|
1423
|
+
scrollHeight: number;
|
|
1424
|
+
scrollTop: number;
|
|
1425
|
+
toIndex: number;
|
|
1426
|
+
}
|
|
2480
1427
|
/**
|
|
2481
1428
|
* @beta
|
|
2482
1429
|
*/
|
|
2483
|
-
|
|
2484
|
-
|
|
1430
|
+
interface VirtualListProps<Item = any> {
|
|
1431
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1432
|
+
gap?: number;
|
|
1433
|
+
getItemKey?: (item: Item, itemIndex: number) => string;
|
|
1434
|
+
items?: Item[];
|
|
1435
|
+
onChange?: (opts: VirtualListChangeOpts) => void;
|
|
1436
|
+
renderItem?: (item: Item) => React.ReactNode;
|
|
1437
|
+
}
|
|
2485
1438
|
/**
|
|
2486
1439
|
* @beta
|
|
2487
1440
|
*/
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
/** @
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
/** @
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
/** @
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
1441
|
+
declare function VirtualList(props: VirtualListProps & StackOwnProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'onChange'>): React.JSX.Element;
|
|
1442
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1443
|
+
declare const Autocomplete: never;
|
|
1444
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1445
|
+
type AutocompleteInputChangeMsg = never;
|
|
1446
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1447
|
+
type AutocompleteInputFoocusMsg = never;
|
|
1448
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1449
|
+
type AutocompleteMsg = never;
|
|
1450
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1451
|
+
type AutocompleteOpenButtonProps = never;
|
|
1452
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1453
|
+
type AutocompleteProps = never;
|
|
1454
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1455
|
+
type AutocompleteRootBlurMsg = never;
|
|
1456
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1457
|
+
type AutocompleteRootClearMsg = never;
|
|
1458
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1459
|
+
type AutocompleteRootEscapeMsg = never;
|
|
1460
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1461
|
+
type AutocompleteRootOpenMsg = never;
|
|
1462
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1463
|
+
type AutocompleteRootSetActiveValueMsg = never;
|
|
1464
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1465
|
+
type AutocompleteRootSetListFocusedMsg = never;
|
|
1466
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1467
|
+
type AutocompleteState = never;
|
|
1468
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1469
|
+
type AutocompleteValueChangeMsg = never;
|
|
1470
|
+
/** @deprecated Moved to `@sanity/ui/autocomplete` */
|
|
1471
|
+
type BaseAutocompleteOption = never;
|
|
1472
|
+
/** @deprecated Moved to `@sanity/ui/breadcrumbs` */
|
|
1473
|
+
declare const Breadcrumbs: never;
|
|
1474
|
+
/** @deprecated Moved to `@sanity/ui/breadcrumbs` */
|
|
1475
|
+
type BreadcrumbsProps = never;
|
|
1476
|
+
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1477
|
+
declare const Code: never;
|
|
1478
|
+
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1479
|
+
type CodeOwnProps = never;
|
|
1480
|
+
/** @deprecated Moved to `@sanity/ui/code` */
|
|
1481
|
+
type CodeProps = never;
|
|
1482
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1483
|
+
declare const Menu: never;
|
|
1484
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1485
|
+
declare const MenuButton: never;
|
|
1486
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1487
|
+
type MenuButtonProps = never;
|
|
1488
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1489
|
+
declare const MenuDivider: never;
|
|
1490
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1491
|
+
type MenuDividerProps = never;
|
|
1492
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1493
|
+
declare const MenuGroup: never;
|
|
1494
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1495
|
+
type MenuGroupOwnProps = never;
|
|
1496
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1497
|
+
type MenuGroupProps = never;
|
|
1498
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1499
|
+
declare const MenuItem: never;
|
|
1500
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1501
|
+
type MenuItemOwnProps = never;
|
|
1502
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1503
|
+
type MenuItemProps = never;
|
|
1504
|
+
/** @deprecated Moved to `@sanity/ui/menu` */
|
|
1505
|
+
type MenuProps = never;
|
|
1506
|
+
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1507
|
+
declare const Popover: never;
|
|
1508
|
+
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1509
|
+
type PopoverMargins = never;
|
|
1510
|
+
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1511
|
+
type PopoverProps = never;
|
|
1512
|
+
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1513
|
+
type PopoverUpdateCallback = never;
|
|
1514
|
+
/** @deprecated Moved to `@sanity/ui/popover` */
|
|
1515
|
+
type PopoverWidth = never;
|
|
1516
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1517
|
+
declare const Toast: never;
|
|
1518
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1519
|
+
type ToastContextValue = never;
|
|
1520
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1521
|
+
type ToastParams = never;
|
|
1522
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1523
|
+
type ToastProps = never;
|
|
1524
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1525
|
+
declare const ToastProvider: never;
|
|
1526
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1527
|
+
type ToastProviderProps = never;
|
|
1528
|
+
/** @deprecated Moved to `@sanity/ui/toast` */
|
|
1529
|
+
declare const useToast: never;
|
|
1530
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1531
|
+
declare const Tooltip: never;
|
|
1532
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1533
|
+
declare const TooltipDelayGroupContext: never;
|
|
1534
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1535
|
+
type TooltipDelayGroupContextValue = never;
|
|
1536
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1537
|
+
declare const TooltipDelayGroupProvider: never;
|
|
1538
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1539
|
+
type TooltipDelayGroupProviderProps = never;
|
|
1540
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1541
|
+
type TooltipProps = never;
|
|
1542
|
+
/** @deprecated Moved to `@sanity/ui/tooltip` */
|
|
1543
|
+
declare const useTooltipDelayGroup: never;
|
|
1544
|
+
export { type ArrayPropPrimitive, Arrow, type Assign, Autocomplete, AutocompleteInputChangeMsg, AutocompleteInputFoocusMsg, AutocompleteMsg, AutocompleteOpenButtonProps, AutocompleteProps, AutocompleteRootBlurMsg, AutocompleteRootClearMsg, AutocompleteRootEscapeMsg, AutocompleteRootOpenMsg, AutocompleteRootSetActiveValueMsg, AutocompleteRootSetListFocusedMsg, AutocompleteState, AutocompleteValueChangeMsg, Avatar, AvatarCounter, type AvatarCounterProps, type AvatarOwnProps, type AvatarPosition, type AvatarProps, type AvatarRootStyleProps, type AvatarSize, AvatarStack, type AvatarStackProps, type AvatarStatus, Badge, type BadgeMode, type BadgeOwnProps, type BadgeProps, type BadgeTone, BaseAutocompleteOption, type BaseTheme, type BoundaryElementContextValue, BoundaryElementProvider, type BoundaryElementProviderProps, Box, type BoxDisplay, type BoxHeight, type BoxOverflow, type BoxOwnProps, type BoxProps, type BoxShadow, type BoxSizing, Breadcrumbs, BreadcrumbsProps, Button, type ButtonMode, type ButtonOwnProps, type ButtonProps, type ButtonTextAlign, type ButtonTone, type ButtonWidth, Card, type CardOwnProps, type CardProps, type CardStyleProps, type CardTone, Checkbox, type CheckboxProps, type ClickOutsideElements, type ClickOutsideEventElements, type ClickOutsideEventListener, type ClickOutsideListener, Code, CodeOwnProps, CodeProps, CodeSkeleton, type CodeSkeletonProps, type ComponentType, ConditionalWrapper, Container, type ContainerOwnProps, type ContainerProps, type Delay, Dialog, DialogContext, type DialogContextValue, type DialogPosition, type DialogProps, DialogProvider, type DialogProviderProps, ElementQuery, type ElementRectValue, type ElementSize, type ElementType, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, type ErrorBoundaryState, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexOwnProps, type FlexProps, type FlexValue, type FlexWrap, type FontWeightStyleProps, Grid, type GridAutoCols, type GridAutoFlow, type GridAutoRows, type GridItemColumn, type GridItemColumnEnd, type GridItemColumnStart, type GridItemRow, type GridItemRowEnd, type GridItemRowStart, type GridOwnProps, type GridProps, type HSL, Heading, type HeadingOwnProps, type HeadingProps, HeadingSkeleton, type HeadingSkeletonProps, Hotkeys, type HotkeysProps, Inline, type InlineOwnProps, type InlineProps, KBD, type KBDOwnProps, type KBDProps, Label, type LabelOwnProps, type LabelProps, LabelSkeleton, type LabelSkeletonProps, Layer, type LayerContextValue, type LayerProps, LayerProvider, type LayerProviderProps, type MediaQueryProps, Menu, MenuButton, MenuButtonProps, MenuDivider, MenuDividerProps, MenuGroup, MenuGroupOwnProps, MenuGroupProps, MenuItem, MenuItemOwnProps, MenuItemProps, MenuProps, type PartialThemeColorBuilderOpts, type Placement, Popover, PopoverMargins, PopoverProps, PopoverUpdateCallback, PopoverWidth, Portal, type PortalContextValue, type PortalProps, PortalProvider, type PortalProviderProps, type Props, type RGB, Radio, 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, Select, type SelectProps, type SelectableTone, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, SrOnly, type SrOnlyProps, Stack, type StackOwnProps, type StackProps, type Styles, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, type TagType, Text, type TextAlign, TextArea, type TextAreaProps, TextInput, type TextInputClearButtonProps, type TextInputProps, type TextInputType, type TextOwnProps, type TextProps, TextSkeleton, 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, ThemeColorProvider, 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, ThemeProvider, type ThemeProviderProps, type ThemeShadow, Toast, ToastContextValue, ToastParams, ToastProps, ToastProvider, ToastProviderProps, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupContextValue, TooltipDelayGroupProvider, TooltipDelayGroupProviderProps, TooltipProps, Tree, type TreeContextValue, TreeItem, type TreeItemProps, type TreeProps, type TreeState, VirtualList, type VirtualListChangeOpts, type VirtualListProps, type _ElementSizeListener, type _ElementSizeObserver, type _ElementSizeSubscriber, type _MediaStore, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
1545
|
+
//# sourceMappingURL=index.d.ts.map
|