@sanity/ui 3.0.2 → 4.0.0-static.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -9
- package/dist/_chunks-cjs/{refractor.js → refractor.cjs} +3 -4
- package/dist/_chunks-cjs/refractor.cjs.map +1 -0
- package/dist/_chunks-es/{refractor.mjs → refractor.js} +2 -3
- package/dist/_chunks-es/refractor.js.map +1 -0
- package/dist/css/index.cjs +966 -0
- package/dist/css/index.cjs.map +1 -0
- package/dist/css/index.css +1 -0
- package/dist/css/index.d.cts +1370 -0
- package/dist/css/index.d.ts +1370 -0
- package/dist/css/index.js +967 -0
- package/dist/css/index.js.map +1 -0
- package/dist/index.cjs +4515 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2521 -0
- package/dist/index.d.ts +1379 -1824
- package/dist/index.js +3872 -1066
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +870 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +499 -0
- package/dist/theme.d.ts +375 -1376
- package/dist/theme.js +548 -3790
- package/dist/theme.js.map +1 -1
- package/exports/css.ts +1 -0
- package/package.json +77 -76
- package/src/core/Root.tsx +88 -0
- package/src/core/RootProvider.tsx +40 -0
- package/src/core/__workshop__/boundary.tsx +28 -0
- package/src/core/__workshop__/index.ts +16 -0
- package/src/core/components/autocomplete/__workshop__/async.tsx +7 -7
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +13 -19
- package/src/core/components/autocomplete/__workshop__/custom.tsx +19 -17
- package/src/core/components/autocomplete/__workshop__/example.tsx +16 -15
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +6 -6
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +58 -60
- package/src/core/components/autocomplete/__workshop__/index.ts +5 -3
- package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/apiStore.ts +1 -1
- package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/countries.ts +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +121 -160
- package/src/core/components/autocomplete/autocompleteOption.tsx +4 -4
- package/src/core/components/autocomplete/autocompleteReducer.ts +1 -1
- package/src/core/components/autocomplete/constants.ts +2 -2
- package/src/core/components/autocomplete/types.ts +4 -9
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +3 -4
- package/src/core/components/breadcrumbs/__workshop__/index.ts +5 -3
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +62 -30
- package/src/core/components/dialog/__workshop__/activate.tsx +17 -10
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +3 -3
- package/src/core/components/dialog/__workshop__/index.ts +5 -3
- package/src/core/components/dialog/__workshop__/layering.tsx +1 -1
- package/src/core/components/dialog/__workshop__/nested.tsx +5 -6
- package/src/core/components/dialog/__workshop__/onScroll.tsx +17 -5
- package/src/core/components/dialog/__workshop__/panes.tsx +13 -6
- package/src/core/components/dialog/__workshop__/position.tsx +5 -5
- package/src/core/components/dialog/__workshop__/props.tsx +9 -7
- package/src/core/components/dialog/__workshop__/provider.tsx +1 -1
- package/src/core/components/dialog/__workshop__/wrapped.tsx +3 -3
- package/src/core/components/dialog/dialog.tsx +117 -319
- package/src/core/components/dialog/dialogCard.tsx +233 -0
- package/src/core/components/dialog/dialogContext.ts +8 -7
- package/src/core/components/dialog/dialogProvider.tsx +7 -8
- package/src/core/components/dialog/isTargetWithinScope.ts +14 -0
- package/src/core/{types/dialog.ts → components/dialog/types.ts} +1 -3
- package/src/core/components/dialog/useDialog.ts +1 -1
- package/src/core/components/hotkeys/__workshop__/index.ts +5 -3
- package/src/core/components/hotkeys/__workshop__/plain.tsx +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +42 -44
- package/src/core/components/menu/__workshop__/asComponent.tsx +7 -7
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +13 -7
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +6 -5
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +4 -5
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +4 -4
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +2 -6
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +2 -2
- package/src/core/components/menu/__workshop__/groups.tsx +3 -3
- package/src/core/components/menu/__workshop__/index.ts +5 -3
- package/src/core/components/menu/__workshop__/menuButton.tsx +6 -6
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +2 -2
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +2 -2
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +14 -5
- package/src/core/components/menu/__workshop__/selectedItem.tsx +3 -3
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +2 -7
- package/src/core/components/menu/__workshop__/tones.tsx +6 -6
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +2 -2
- package/src/core/components/menu/helpers.ts +1 -1
- package/src/core/components/menu/menu.test.tsx +18 -17
- package/src/core/components/menu/menu.tsx +48 -46
- package/src/core/components/menu/menuButton.tsx +40 -83
- package/src/core/components/menu/menuContext.ts +6 -16
- package/src/core/components/menu/menuDivider.tsx +32 -0
- package/src/core/components/menu/menuGroup.tsx +67 -51
- package/src/core/components/menu/menuItem.tsx +76 -72
- package/src/core/components/menu/useMenu.ts +1 -1
- package/src/core/components/menu/useMenuController.ts +17 -7
- package/src/core/components/tab/__workshop__/example.tsx +3 -3
- package/src/core/components/tab/__workshop__/index.ts +5 -3
- package/src/core/components/tab/tab.tsx +43 -35
- package/src/core/components/tab/tabList.tsx +53 -33
- package/src/core/components/tab/tabPanel.tsx +30 -22
- package/src/core/components/toast/__workshop__/hook.tsx +2 -2
- package/src/core/components/toast/__workshop__/index.ts +5 -3
- package/src/core/components/toast/__workshop__/toast.tsx +6 -6
- package/src/core/components/toast/toast.test.tsx +15 -13
- package/src/core/components/toast/toast.tsx +59 -66
- package/src/core/components/toast/toastContext.ts +5 -5
- package/src/core/components/toast/toastLayer.tsx +35 -32
- package/src/core/components/toast/toastProvider.tsx +20 -21
- package/src/core/components/toast/types.ts +6 -8
- package/src/core/components/toast/useToast.ts +2 -4
- package/src/core/components/tree/__workshop__/basic.perf.ts +2 -2
- package/src/core/components/tree/__workshop__/basic.tsx +2 -2
- package/src/core/components/tree/__workshop__/index.ts +5 -3
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +2 -2
- package/src/core/components/tree/helpers.ts +1 -1
- package/src/core/components/tree/tree.tsx +198 -187
- package/src/core/components/tree/treeContext.ts +5 -5
- package/src/core/components/tree/treeGroup.tsx +28 -12
- package/src/core/components/tree/treeItem.tsx +90 -58
- package/src/core/components/tree/types.ts +4 -1
- package/src/core/components/tree/useTree.ts +1 -1
- package/src/core/{utils → components}/virtualList/__workshop__/changingProps.tsx +1 -1
- package/src/core/{utils → components}/virtualList/__workshop__/elementScroll.tsx +1 -1
- package/src/core/{utils → components}/virtualList/__workshop__/index.ts +6 -4
- package/src/core/{utils → components}/virtualList/__workshop__/infiniteList.tsx +2 -2
- package/src/core/{utils → components}/virtualList/__workshop__/windowScrolll.tsx +1 -1
- package/src/core/{utils → components}/virtualList/virtualList.tsx +96 -61
- package/src/core/constants.ts +4 -16
- package/src/core/helpers/focus.ts +0 -8
- package/src/core/helpers/props.ts +28 -0
- package/src/core/hooks/useClickOutsideEvent.test.tsx +4 -5
- package/src/core/hooks/useClickOutsideEvent.ts +3 -9
- package/src/core/hooks/useDelayed.test.ts +6 -7
- package/src/core/hooks/useDelayedState.ts +1 -1
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useMatchMedia.ts +1 -1
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +5 -3
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +2 -2
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +3 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +20 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +5 -5
- package/src/core/hooks/usePrefersDark.test.tsx +1 -0
- package/src/core/hooks/usePrefersDark.ts +1 -1
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +5 -5
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +1 -0
- package/src/core/hooks/usePrefersReducedMotion.ts +1 -1
- package/src/core/hooks/useResponsiveProp.ts +28 -0
- package/src/core/index.ts +114 -9
- package/src/core/lib/createGlobalScopedContext.ts +6 -3
- package/src/core/lib/globalScope.ts +1 -1
- package/src/core/lib/isArray.ts +3 -0
- package/src/core/middleware/origin.ts +1 -1
- package/src/core/observers/{elementSizeObserver.ts → elementSize.ts} +2 -2
- package/src/core/primitives/arrow/arrow.tsx +74 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +3 -3
- package/src/core/primitives/avatar/__workshop__/index.ts +5 -3
- package/src/core/primitives/avatar/__workshop__/stack.tsx +3 -3
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +7 -15
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +28 -26
- package/src/core/primitives/avatar/avatar.tsx +77 -122
- package/src/core/primitives/avatar/avatarCounter.tsx +52 -77
- package/src/core/primitives/avatar/avatarStack.tsx +55 -77
- package/src/core/primitives/avatar/types.ts +2 -17
- package/src/core/primitives/badge/__workshop__/index.ts +5 -3
- package/src/core/primitives/badge/__workshop__/props.tsx +7 -18
- package/src/core/primitives/badge/__workshop__/tones.tsx +7 -12
- package/src/core/primitives/badge/badge.test.tsx +3 -3
- package/src/core/primitives/badge/badge.tsx +41 -42
- package/src/core/primitives/box/__workshop__/index.ts +5 -3
- package/src/core/primitives/box/__workshop__/props.tsx +3 -3
- package/src/core/primitives/box/__workshop__/responsive.tsx +3 -3
- package/src/core/primitives/box/box.tsx +188 -97
- package/src/core/primitives/button/__workshop__/custom.tsx +20 -44
- package/src/core/primitives/button/__workshop__/customIcons.tsx +4 -4
- package/src/core/primitives/button/__workshop__/disabled.tsx +41 -61
- package/src/core/primitives/button/__workshop__/index.ts +10 -3
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +1 -1
- package/src/core/primitives/button/__workshop__/props.tsx +20 -20
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +4 -4
- package/src/core/primitives/button/__workshop__/stacked.tsx +15 -15
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +13 -0
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +3 -2
- package/src/core/primitives/button/button.test.tsx +5 -19
- package/src/core/primitives/button/button.tsx +149 -143
- package/src/core/primitives/button/types.ts +2 -0
- package/src/core/primitives/card/__workshop__/asButton.tsx +15 -15
- package/src/core/primitives/card/__workshop__/asComponent.tsx +4 -4
- package/src/core/primitives/card/__workshop__/checkered.tsx +4 -4
- package/src/core/primitives/card/__workshop__/index.ts +6 -4
- package/src/core/primitives/card/__workshop__/interactive.tsx +4 -5
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +6 -8
- package/src/core/primitives/card/__workshop__/props.tsx +14 -15
- package/src/core/primitives/card/__workshop__/selected.tsx +11 -43
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/__workshop__/tones.tsx +27 -0
- package/src/core/primitives/card/card.tsx +77 -84
- package/src/core/primitives/card/cardContext.ts +10 -0
- package/src/core/primitives/card/cardProvider.tsx +27 -0
- package/src/core/primitives/card/types.ts +15 -9
- package/src/core/primitives/card/useCard.ts +15 -0
- package/src/core/primitives/checkbox/__workshop__/example.tsx +1 -1
- package/src/core/primitives/checkbox/__workshop__/index.ts +5 -3
- package/src/core/primitives/checkbox/__workshop__/props.tsx +7 -5
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +20 -21
- package/src/core/primitives/checkbox/checkbox.tsx +33 -26
- package/src/core/primitives/code/__workshop__/index.ts +5 -3
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +18 -43
- package/src/core/primitives/code/__workshop__/props.tsx +5 -8
- package/src/core/primitives/code/code.tsx +33 -25
- package/src/core/primitives/code/refractor.tsx +2 -4
- package/src/core/primitives/container/__workshop__/example.tsx +3 -3
- package/src/core/primitives/container/__workshop__/index.ts +5 -3
- package/src/core/primitives/container/container.tsx +27 -31
- package/src/core/primitives/flex/__workshop__/example.tsx +3 -3
- package/src/core/primitives/flex/__workshop__/gap.tsx +7 -7
- package/src/core/primitives/flex/__workshop__/index.ts +5 -3
- package/src/core/primitives/flex/flex.tsx +43 -39
- package/src/core/primitives/grid/__workshop__/index.ts +5 -3
- package/src/core/primitives/grid/__workshop__/responsive.tsx +3 -3
- package/src/core/primitives/grid/grid.tsx +22 -35
- package/src/core/primitives/heading/__workshop__/index.ts +5 -3
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +3 -3
- package/src/core/primitives/heading/__workshop__/plain.tsx +13 -16
- package/src/core/primitives/heading/heading.tsx +60 -62
- package/src/core/primitives/inline/__workshop__/index.ts +5 -3
- package/src/core/primitives/inline/__workshop__/plain.tsx +3 -6
- package/src/core/primitives/inline/inline.tsx +47 -32
- package/src/core/primitives/kbd/__workshop__/index.ts +5 -3
- package/src/core/primitives/kbd/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +43 -47
- package/src/core/primitives/label/__workshop__/index.ts +5 -3
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +14 -8
- package/src/core/primitives/label/__workshop__/plain.tsx +16 -12
- package/src/core/primitives/label/label.tsx +57 -61
- package/src/core/{utils → primitives}/layer/__workshop__/_debug.tsx +1 -1
- package/src/core/{utils → primitives}/layer/__workshop__/index.ts +6 -4
- package/src/core/{utils → primitives}/layer/__workshop__/multipleRoots.tsx +6 -6
- package/src/core/{utils → primitives}/layer/__workshop__/nested.tsx +4 -4
- package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +17 -0
- package/src/core/{utils → primitives}/layer/getLayerContext.test.ts +3 -1
- package/src/core/{utils → primitives}/layer/getLayerContext.ts +1 -1
- package/src/core/{utils → primitives}/layer/layer.test.tsx +16 -14
- package/src/core/primitives/layer/layer.tsx +42 -0
- package/src/core/{utils/layer/layer.tsx → primitives/layer/layerCard.tsx} +40 -48
- package/src/core/primitives/layer/layerContext.ts +7 -0
- package/src/core/{utils → primitives}/layer/layerProvider.tsx +13 -17
- package/src/core/{utils → primitives}/layer/useLayer.ts +2 -4
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +8 -8
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +4 -4
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +4 -6
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +20 -13
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +10 -7
- package/src/core/primitives/popover/__workshop__/index.ts +5 -3
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +2 -2
- package/src/core/primitives/popover/helpers.ts +4 -3
- package/src/core/primitives/popover/popover.tsx +310 -351
- package/src/core/primitives/popover/popoverLayer.tsx +149 -0
- package/src/core/primitives/popover/types.ts +8 -2
- package/src/core/primitives/radio/__workshop__/example.tsx +4 -4
- package/src/core/primitives/radio/__workshop__/index.ts +5 -3
- package/src/core/primitives/radio/__workshop__/plain.tsx +4 -4
- package/src/core/primitives/radio/radio.tsx +36 -23
- package/src/core/primitives/select/__workshop__/index.ts +5 -3
- package/src/core/primitives/select/__workshop__/plain.tsx +18 -6
- package/src/core/primitives/select/__workshop__/readOnly.tsx +2 -2
- package/src/core/primitives/select/select.tsx +42 -54
- package/src/core/primitives/selectable/selectable.tsx +50 -0
- package/src/core/{components → primitives}/skeleton/__workshop__/delay.tsx +4 -4
- package/src/core/{components → primitives}/skeleton/__workshop__/index.ts +6 -4
- package/src/core/{components → primitives}/skeleton/__workshop__/skeleton.tsx +6 -6
- package/src/core/primitives/skeleton/codeSkeleton.tsx +49 -0
- package/src/core/primitives/skeleton/headingSkeleton.tsx +48 -0
- package/src/core/primitives/skeleton/labelSkeleton.tsx +47 -0
- package/src/core/primitives/skeleton/skeleton.tsx +70 -0
- package/src/core/primitives/skeleton/textSkeleton.tsx +49 -0
- package/src/core/primitives/spinner/__workshop__/Props.tsx +4 -4
- package/src/core/primitives/spinner/__workshop__/index.ts +5 -3
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +14 -0
- package/src/core/primitives/spinner/spinner.tsx +31 -32
- package/src/core/primitives/srOnly/srOnly.tsx +33 -0
- package/src/core/primitives/stack/__workshop__/index.ts +5 -3
- package/src/core/primitives/stack/__workshop__/plain.tsx +3 -3
- package/src/core/primitives/stack/stack.tsx +46 -29
- package/src/core/primitives/switch/__workshop__/example.tsx +1 -1
- package/src/core/primitives/switch/__workshop__/index.ts +5 -3
- package/src/core/primitives/switch/__workshop__/props.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +50 -34
- package/src/core/primitives/text/__workshop__/colored.tsx +10 -17
- package/src/core/primitives/text/__workshop__/example.tsx +10 -21
- package/src/core/primitives/text/__workshop__/index.ts +5 -3
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +18 -43
- package/src/core/primitives/text/text.tsx +59 -64
- package/src/core/primitives/textArea/__workshop__/index.ts +5 -3
- package/src/core/primitives/textArea/__workshop__/plain.tsx +45 -34
- package/src/core/primitives/textArea/textArea.tsx +49 -84
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +3 -3
- package/src/core/primitives/textInput/__workshop__/index.ts +5 -3
- package/src/core/primitives/textInput/__workshop__/plain.tsx +36 -24
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/states.tsx +6 -6
- package/src/core/primitives/textInput/__workshop__/tones.tsx +3 -3
- package/src/core/primitives/textInput/__workshop__/typed.tsx +3 -3
- package/src/core/primitives/textInput/textInput.tsx +173 -304
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +6 -6
- package/src/core/primitives/tooltip/__workshop__/index.ts +5 -3
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +3 -3
- package/src/core/primitives/tooltip/__workshop__/props.tsx +14 -9
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +2 -2
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.test.tsx +63 -63
- package/src/core/primitives/tooltip/tooltip.tsx +115 -98
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +5 -3
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +4 -6
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +1 -1
- package/src/core/primitives/tooltip/tooltipLayer.tsx +106 -0
- package/src/core/types.ts +56 -0
- package/src/core/utils/boundaryElement/__workshop__/index.ts +5 -3
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +1 -1
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +15 -13
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +8 -5
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +5 -11
- package/src/core/utils/boundaryElement/types.ts +1 -3
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +2 -4
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +20 -9
- package/src/core/utils/elementQuery/__workshop__/index.ts +5 -3
- package/src/core/utils/elementQuery/elementQuery.tsx +42 -20
- package/src/core/utils/errorBoundary.tsx +8 -6
- package/src/core/utils/getElementRef.ts +4 -1
- package/src/core/utils/portal/__workshop__/index.ts +5 -3
- package/src/core/utils/portal/__workshop__/named.tsx +4 -4
- package/src/core/utils/portal/portal.test.tsx +15 -13
- package/src/core/utils/portal/portal.tsx +36 -0
- package/src/core/utils/portal/portalContext.ts +16 -10
- package/src/core/utils/portal/portalProvider.tsx +10 -19
- package/src/core/utils/portal/types.ts +1 -3
- package/src/core/utils/portal/usePortal.ts +2 -4
- package/src/css/_assign.ts +3 -0
- package/src/css/_composeClassNames.ts +12 -0
- package/src/css/_fromEntries.ts +3 -0
- package/src/css/_getClassNames.ts +9 -0
- package/src/css/_responsiveClassName.ts +45 -0
- package/src/css/_responsiveStyle.css.ts +34 -0
- package/src/css/_style.css.ts +9 -0
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +6 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +7 -0
- package/src/css/components/dialog/dialog.css.ts +98 -0
- package/src/css/components/dialog/dialog.ts +58 -0
- package/src/css/components/menu/menu.css.ts +14 -0
- package/src/css/components/menu/menu.ts +12 -0
- package/src/css/components/skeleton/skeleton.css.ts +128 -0
- package/src/css/components/skeleton/skeleton.ts +38 -0
- package/src/css/components/skeleton/types.ts +36 -0
- package/src/css/components/toast/toast.css.ts +17 -0
- package/src/css/components/toast/toast.ts +11 -0
- package/src/css/components/tree/tree.css.ts +65 -0
- package/src/css/components/tree/tree.ts +7 -0
- package/src/css/constants.ts +10 -0
- package/src/css/getVarName.ts +27 -0
- package/src/css/index.ts +146 -0
- package/src/css/layers.css.ts +12 -0
- package/src/css/primitives/_arrow/_arrow.css.ts +68 -0
- package/src/css/primitives/_arrow/_arrow.ts +26 -0
- package/src/css/primitives/_input/_input.css.ts +261 -0
- package/src/css/primitives/_input/input.ts +29 -0
- package/src/css/primitives/_input/types.ts +13 -0
- package/src/css/primitives/avatar/avatar.css.ts +197 -0
- package/src/css/primitives/avatar/avatar.ts +68 -0
- package/src/css/primitives/avatar/types.ts +10 -0
- package/src/css/primitives/badge/badge.css.ts +27 -0
- package/src/css/primitives/badge/badge.ts +8 -0
- package/src/css/primitives/badge/types.ts +13 -0
- package/src/css/primitives/box/box.css.ts +19 -0
- package/src/css/primitives/box/box.ts +82 -0
- package/src/css/primitives/box/types.ts +75 -0
- package/src/css/primitives/button/button.css.ts +287 -0
- package/src/css/primitives/button/button.ts +26 -0
- package/src/css/primitives/button/types.ts +12 -0
- package/src/css/primitives/card/__workshop__/color.tsx +75 -0
- package/src/css/primitives/card/__workshop__/index.ts +16 -0
- package/src/css/primitives/card/card.css.ts +387 -0
- package/src/css/primitives/card/card.ts +13 -0
- package/src/css/primitives/card/types.ts +9 -0
- package/src/css/primitives/checkbox/checkbox.css.ts +193 -0
- package/src/css/primitives/checkbox/checkbox.ts +17 -0
- package/src/css/primitives/code/code.css.ts +272 -0
- package/src/css/primitives/code/code.ts +19 -0
- package/src/css/primitives/code/types.ts +11 -0
- package/src/css/primitives/container/container.css.ts +4 -0
- package/src/css/primitives/container/container.ts +17 -0
- package/src/css/primitives/container/types.ts +9 -0
- package/src/css/primitives/heading/heading.css.ts +86 -0
- package/src/css/primitives/heading/heading.ts +22 -0
- package/src/css/primitives/heading/types.ts +14 -0
- package/src/css/primitives/kbd/kbd.css.ts +16 -0
- package/src/css/primitives/kbd/kbd.ts +9 -0
- package/src/css/primitives/kbd/types.ts +6 -0
- package/src/css/primitives/label/label.css.ts +87 -0
- package/src/css/primitives/label/label.ts +22 -0
- package/src/css/primitives/label/types.ts +14 -0
- package/src/css/primitives/popover/popover.css.ts +6 -0
- package/src/css/primitives/popover/popover.ts +12 -0
- package/src/css/primitives/radio/radio.css.ts +78 -0
- package/src/css/primitives/radio/radio.ts +17 -0
- package/src/css/primitives/root/root.css.ts +19 -0
- package/src/css/primitives/root/root.ts +17 -0
- package/src/css/primitives/root/types.ts +10 -0
- package/src/css/primitives/select/select.css.ts +24 -0
- package/src/css/primitives/select/select.ts +14 -0
- package/src/css/primitives/select/types.ts +5 -0
- package/src/css/primitives/selectable/selectable.css.ts +131 -0
- package/src/css/primitives/selectable/selectable.ts +9 -0
- package/src/css/primitives/selectable/types.ts +9 -0
- package/src/css/primitives/spinner/spinner.css.ts +19 -0
- package/src/css/primitives/spinner/spinner.ts +13 -0
- package/src/css/primitives/spinner/types.ts +4 -0
- package/src/css/primitives/srOnly/srOnly.css.ts +10 -0
- package/src/css/primitives/srOnly/srOnly.ts +7 -0
- package/src/css/primitives/stack/stack.css.ts +6 -0
- package/src/css/primitives/stack/stack.ts +7 -0
- package/src/css/primitives/switch/switch.css.ts +98 -0
- package/src/css/primitives/switch/switch.ts +27 -0
- package/src/css/primitives/text/text.css.ts +86 -0
- package/src/css/primitives/text/text.ts +24 -0
- package/src/css/primitives/text/types.ts +18 -0
- package/src/css/primitives/textArea/textArea.css.ts +4 -0
- package/src/css/primitives/textArea/textArea.ts +9 -0
- package/src/css/primitives/textArea/types.ts +7 -0
- package/src/css/primitives/textInput/textInput.css.ts +43 -0
- package/src/css/primitives/textInput/textInput.ts +24 -0
- package/src/css/primitives/textInput/types.ts +7 -0
- package/src/css/primitives/tooltip/tooltip.css.ts +4 -0
- package/src/css/primitives/tooltip/tooltip.ts +8 -0
- package/src/css/primitives/tooltip/types.ts +4 -0
- package/src/css/props/alignItems/alignItems.css.ts +22 -0
- package/src/css/props/alignItems/alignItems.ts +8 -0
- package/src/css/props/alignItems/types.ts +9 -0
- package/src/css/props/border/border.css.ts +65 -0
- package/src/css/props/border/border.ts +21 -0
- package/src/css/props/border/types.ts +13 -0
- package/src/css/props/boxSizing/boxSizing.css.ts +12 -0
- package/src/css/props/boxSizing/boxSizing.ts +7 -0
- package/src/css/props/boxSizing/types.ts +7 -0
- package/src/css/props/display/display.css.ts +56 -0
- package/src/css/props/display/display.ts +8 -0
- package/src/css/props/display/types.ts +16 -0
- package/src/css/props/flex/flex.css.ts +52 -0
- package/src/css/props/flex/flex.ts +8 -0
- package/src/css/props/flex/types.ts +9 -0
- package/src/css/props/flexDirection/flexDirection.css.ts +19 -0
- package/src/css/props/flexDirection/flexDirection.ts +8 -0
- package/src/css/props/flexDirection/types.ts +9 -0
- package/src/css/props/flexWrap/flexWrap.css.ts +16 -0
- package/src/css/props/flexWrap/flexWrap.ts +8 -0
- package/src/css/props/flexWrap/types.ts +9 -0
- package/src/css/props/font/font.css.ts +94 -0
- package/src/css/props/font/font.ts +8 -0
- package/src/css/props/font/types.ts +6 -0
- package/src/css/props/gap/gap.css.ts +40 -0
- package/src/css/props/gap/gap.ts +13 -0
- package/src/css/props/gap/types.ts +10 -0
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +19 -0
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +8 -0
- package/src/css/props/gridAutoColumns/types.ts +9 -0
- package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +19 -0
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +8 -0
- package/src/css/props/gridAutoFlow/types.ts +9 -0
- package/src/css/props/gridAutoRows/gridAutoRows.css.ts +19 -0
- package/src/css/props/gridAutoRows/gridAutoRows.ts +8 -0
- package/src/css/props/gridAutoRows/types.ts +9 -0
- package/src/css/props/gridColumn/gridColumn.css.ts +49 -0
- package/src/css/props/gridColumn/gridColumn.ts +8 -0
- package/src/css/props/gridColumn/types.ts +9 -0
- package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +46 -0
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +8 -0
- package/src/css/props/gridColumnEnd/types.ts +9 -0
- package/src/css/props/gridColumnStart/gridColumnStart.css.ts +46 -0
- package/src/css/props/gridColumnStart/gridColumnStart.ts +8 -0
- package/src/css/props/gridColumnStart/types.ts +9 -0
- package/src/css/props/gridRow/gridRow.css.ts +49 -0
- package/src/css/props/gridRow/gridRow.ts +8 -0
- package/src/css/props/gridRow/types.ts +9 -0
- package/src/css/props/gridRowEnd/gridRowEnd.css.ts +46 -0
- package/src/css/props/gridRowEnd/gridRowEnd.ts +8 -0
- package/src/css/props/gridRowEnd/types.ts +9 -0
- package/src/css/props/gridRowStart/gridRowStart.css.ts +46 -0
- package/src/css/props/gridRowStart/gridRowStart.ts +8 -0
- package/src/css/props/gridRowStart/types.ts +9 -0
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +43 -0
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +8 -0
- package/src/css/props/gridTemplateColumns/types.ts +9 -0
- package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +43 -0
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +8 -0
- package/src/css/props/gridTemplateRows/types.ts +9 -0
- package/src/css/props/height/height.css.ts +25 -0
- package/src/css/props/height/height.ts +8 -0
- package/src/css/props/height/types.ts +9 -0
- package/src/css/props/inset/inset.css.ts +37 -0
- package/src/css/props/inset/inset.ts +21 -0
- package/src/css/props/inset/types.ts +13 -0
- package/src/css/props/justifyContent/justifyContent.css.ts +25 -0
- package/src/css/props/justifyContent/justifyContent.ts +8 -0
- package/src/css/props/justifyContent/types.ts +15 -0
- package/src/css/props/margin/margin.css.ts +117 -0
- package/src/css/props/margin/margin.ts +25 -0
- package/src/css/props/margin/types.ts +17 -0
- package/src/css/props/maxWidth/maxWidth.css.ts +32 -0
- package/src/css/props/maxWidth/maxWidth.ts +8 -0
- package/src/css/props/maxWidth/types.ts +11 -0
- package/src/css/props/minHeight/minHeight.css.ts +13 -0
- package/src/css/props/minHeight/minHeight.ts +8 -0
- package/src/css/props/minHeight/types.ts +9 -0
- package/src/css/props/minWidth/minWidth.css.ts +25 -0
- package/src/css/props/minWidth/minWidth.ts +8 -0
- package/src/css/props/minWidth/types.ts +9 -0
- package/src/css/props/outline/outline.css.ts +10 -0
- package/src/css/props/outline/outline.ts +8 -0
- package/src/css/props/outline/types.ts +7 -0
- package/src/css/props/overflow/overflow.css.ts +16 -0
- package/src/css/props/overflow/overflow.ts +8 -0
- package/src/css/props/overflow/types.ts +11 -0
- package/src/css/props/padding/padding.css.ts +87 -0
- package/src/css/props/padding/padding.ts +25 -0
- package/src/css/props/padding/types.ts +17 -0
- package/src/css/props/pointerEvents/pointerEvents.css.ts +13 -0
- package/src/css/props/pointerEvents/pointerEvents.ts +8 -0
- package/src/css/props/pointerEvents/types.ts +7 -0
- package/src/css/props/position/position.css.ts +22 -0
- package/src/css/props/position/position.ts +8 -0
- package/src/css/props/position/types.ts +9 -0
- package/src/css/props/radius/radius.css.ts +21 -0
- package/src/css/props/radius/radius.ts +8 -0
- package/src/css/props/radius/types.ts +8 -0
- package/src/css/props/shadow/shadow.css.ts +23 -0
- package/src/css/props/shadow/shadow.ts +8 -0
- package/src/css/props/shadow/types.ts +8 -0
- package/src/css/props/textAlign/textAlign.css.ts +22 -0
- package/src/css/props/textAlign/textAlign.ts +8 -0
- package/src/css/props/textAlign/types.ts +7 -0
- package/src/css/props/textOverflow/textOverflow.css.ts +19 -0
- package/src/css/props/textOverflow/textOverflow.ts +8 -0
- package/src/css/props/textOverflow/types.ts +12 -0
- package/src/css/props/width/types.ts +11 -0
- package/src/css/props/width/width.css.ts +31 -0
- package/src/css/props/width/width.ts +8 -0
- package/src/css/theme/buildCSSTheme.ts +488 -0
- package/src/css/theme/defaultTheme.css.ts +64 -0
- package/src/css/types.ts +427 -0
- package/src/css/vars.css.ts +676 -0
- package/src/theme/_parseColorToken.ts +180 -0
- package/src/theme/buildTheme.ts +32 -0
- package/src/theme/constants.ts +90 -0
- package/src/theme/defaults/color.ts +197 -0
- package/src/theme/defaults/{config.ts → common.ts} +4 -17
- package/src/theme/defaults/fonts.ts +54 -31
- package/src/theme/index.ts +5 -5
- package/src/theme/{build/merge.ts → merge.ts} +6 -8
- package/src/theme/resolveTokens.ts +204 -0
- package/src/theme/types.ts +366 -0
- package/dist/_chunks-cjs/_visual-editing.js +0 -5409
- package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
- package/dist/_chunks-cjs/refractor.js.map +0 -1
- package/dist/_chunks-es/_visual-editing.mjs +0 -5415
- package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
- package/dist/_chunks-es/refractor.mjs.map +0 -1
- package/dist/_visual-editing.d.mts +0 -1011
- package/dist/_visual-editing.d.ts +0 -1011
- package/dist/_visual-editing.js +0 -31
- package/dist/_visual-editing.js.map +0 -1
- package/dist/_visual-editing.mjs +0 -31
- package/dist/_visual-editing.mjs.map +0 -1
- package/dist/index.d.mts +0 -2966
- package/dist/index.mjs +0 -1726
- package/dist/index.mjs.map +0 -1
- package/dist/theme.d.mts +0 -1500
- package/dist/theme.mjs +0 -4112
- package/dist/theme.mjs.map +0 -1
- package/exports/_visual-editing.ts +0 -31
- package/src/core/__workshop__/constants.ts +0 -293
- package/src/core/_compat.ts +0 -264
- package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -39
- package/src/core/components/autocomplete/index.ts +0 -2
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -18
- package/src/core/components/breadcrumbs/index.ts +0 -1
- package/src/core/components/dialog/index.ts +0 -4
- package/src/core/components/dialog/styles.ts +0 -77
- package/src/core/components/hotkeys/index.ts +0 -1
- package/src/core/components/index.ts +0 -9
- package/src/core/components/menu/index.ts +0 -5
- package/src/core/components/menu/menuDivider.ts +0 -12
- package/src/core/components/skeleton/index.ts +0 -2
- package/src/core/components/skeleton/skeleton.tsx +0 -57
- package/src/core/components/skeleton/styles.ts +0 -50
- package/src/core/components/skeleton/textSkeleton.tsx +0 -123
- package/src/core/components/tab/index.ts +0 -3
- package/src/core/components/toast/index.ts +0 -4
- package/src/core/components/toast/styles.ts +0 -77
- package/src/core/components/tree/index.ts +0 -4
- package/src/core/components/tree/style.ts +0 -105
- package/src/core/global.ts +0 -6
- package/src/core/helpers/index.ts +0 -4
- package/src/core/hooks/index.ts +0 -12
- package/src/core/hooks/useArrayProp.ts +0 -31
- package/src/core/hooks/useClickOutside.test.tsx +0 -482
- package/src/core/hooks/useClickOutside.ts +0 -117
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
- package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
- package/src/core/hooks/useElementRect/index.ts +0 -1
- package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
- package/src/core/hooks/useForwardedRef.ts +0 -19
- package/src/core/hooks/useIsomorphicEffect.ts +0 -7
- package/src/core/hooks/useMediaIndex/index.ts +0 -1
- package/src/core/observers/index.ts +0 -2
- package/src/core/primitives/_selectable/index.ts +0 -1
- package/src/core/primitives/_selectable/selectable.tsx +0 -15
- package/src/core/primitives/_selectable/style.ts +0 -115
- package/src/core/primitives/avatar/index.ts +0 -4
- package/src/core/primitives/avatar/styles.ts +0 -167
- package/src/core/primitives/badge/index.ts +0 -1
- package/src/core/primitives/badge/styles.ts +0 -20
- package/src/core/primitives/badge/types.ts +0 -8
- package/src/core/primitives/box/index.ts +0 -1
- package/src/core/primitives/button/index.ts +0 -1
- package/src/core/primitives/button/styles.ts +0 -117
- package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
- package/src/core/primitives/card/index.ts +0 -2
- package/src/core/primitives/card/styles.ts +0 -147
- package/src/core/primitives/checkbox/index.ts +0 -1
- package/src/core/primitives/checkbox/styles.ts +0 -128
- package/src/core/primitives/code/index.ts +0 -1
- package/src/core/primitives/code/styles.ts +0 -77
- package/src/core/primitives/container/index.ts +0 -2
- package/src/core/primitives/container/styles.ts +0 -23
- package/src/core/primitives/flex/index.ts +0 -1
- package/src/core/primitives/grid/index.ts +0 -1
- package/src/core/primitives/heading/index.ts +0 -1
- package/src/core/primitives/heading/styles.ts +0 -64
- package/src/core/primitives/heading/types.ts +0 -7
- package/src/core/primitives/index.ts +0 -27
- package/src/core/primitives/inline/index.ts +0 -1
- package/src/core/primitives/inline/styles.ts +0 -32
- package/src/core/primitives/inline/types.ts +0 -6
- package/src/core/primitives/kbd/index.ts +0 -1
- package/src/core/primitives/label/index.ts +0 -1
- package/src/core/primitives/label/styles.ts +0 -45
- package/src/core/primitives/popover/index.ts +0 -2
- package/src/core/primitives/popover/popoverCard.tsx +0 -168
- package/src/core/primitives/radio/index.ts +0 -1
- package/src/core/primitives/radio/styles.ts +0 -117
- package/src/core/primitives/select/index.ts +0 -1
- package/src/core/primitives/select/styles.ts +0 -166
- package/src/core/primitives/spinner/index.ts +0 -1
- package/src/core/primitives/stack/index.ts +0 -1
- package/src/core/primitives/stack/styles.ts +0 -32
- package/src/core/primitives/switch/index.ts +0 -1
- package/src/core/primitives/switch/styles.ts +0 -173
- package/src/core/primitives/text/index.ts +0 -1
- package/src/core/primitives/text/styles.ts +0 -74
- package/src/core/primitives/textArea/index.ts +0 -1
- package/src/core/primitives/textInput/index.ts +0 -1
- package/src/core/primitives/tooltip/index.ts +0 -2
- package/src/core/primitives/tooltip/tooltipCard.tsx +0 -111
- package/src/core/primitives/types.ts +0 -146
- package/src/core/styles/border/borderStyle.ts +0 -56
- package/src/core/styles/border/index.ts +0 -2
- package/src/core/styles/border/types.ts +0 -10
- package/src/core/styles/box/boxStyle.ts +0 -69
- package/src/core/styles/box/index.ts +0 -2
- package/src/core/styles/box/types.ts +0 -11
- package/src/core/styles/card/_cardColorStyle.ts +0 -108
- package/src/core/styles/card/index.ts +0 -1
- package/src/core/styles/flex/flexItemStyle.ts +0 -27
- package/src/core/styles/flex/flexStyle.ts +0 -70
- package/src/core/styles/flex/index.ts +0 -3
- package/src/core/styles/flex/types.ts +0 -25
- package/src/core/styles/focusRing/index.ts +0 -25
- package/src/core/styles/font/codeFontStyle.ts +0 -13
- package/src/core/styles/font/headingFontStyle.ts +0 -13
- package/src/core/styles/font/index.ts +0 -6
- package/src/core/styles/font/labelFontStyle.ts +0 -13
- package/src/core/styles/font/responsiveFont.ts +0 -101
- package/src/core/styles/font/textAlignStyle.ts +0 -19
- package/src/core/styles/font/textFontStyle.ts +0 -13
- package/src/core/styles/font/types.ts +0 -35
- package/src/core/styles/grid/gridItemStyle.ts +0 -82
- package/src/core/styles/grid/gridStyle.ts +0 -108
- package/src/core/styles/grid/index.ts +0 -3
- package/src/core/styles/grid/types.ts +0 -37
- package/src/core/styles/helpers.ts +0 -72
- package/src/core/styles/index.ts +0 -5
- package/src/core/styles/input/index.ts +0 -2
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +0 -78
- package/src/core/styles/input/textInputStyle.ts +0 -263
- package/src/core/styles/internal.ts +0 -12
- package/src/core/styles/margin/index.ts +0 -2
- package/src/core/styles/margin/marginStyle.ts +0 -21
- package/src/core/styles/margin/marginsStyle.test.ts +0 -33
- package/src/core/styles/margin/types.ts +0 -9
- package/src/core/styles/padding/index.ts +0 -2
- package/src/core/styles/padding/paddingStyle.test.ts +0 -33
- package/src/core/styles/padding/paddingStyle.ts +0 -21
- package/src/core/styles/padding/types.ts +0 -12
- package/src/core/styles/radius/index.ts +0 -2
- package/src/core/styles/radius/radiusStyle.ts +0 -23
- package/src/core/styles/radius/types.ts +0 -8
- package/src/core/styles/shadow/index.ts +0 -2
- package/src/core/styles/shadow/shadowStyle.ts +0 -29
- package/src/core/styles/shadow/types.ts +0 -6
- package/src/core/styles/types.ts +0 -8
- package/src/core/theme/__workshop__/build/Root.tsx +0 -367
- package/src/core/theme/__workshop__/build/helpers.ts +0 -46
- package/src/core/theme/__workshop__/build/story.tsx +0 -465
- package/src/core/theme/__workshop__/canvas.tsx +0 -351
- package/src/core/theme/__workshop__/color.tsx +0 -62
- package/src/core/theme/__workshop__/debug/story.tsx +0 -408
- package/src/core/theme/__workshop__/index.ts +0 -39
- package/src/core/theme/__workshop__/layer.tsx +0 -78
- package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
- package/src/core/theme/index.ts +0 -5
- package/src/core/theme/theme.test.tsx +0 -73
- package/src/core/theme/themeColorProvider.tsx +0 -29
- package/src/core/theme/themeContext.ts +0 -10
- package/src/core/theme/themeProvider.tsx +0 -62
- package/src/core/theme/types.ts +0 -12
- package/src/core/theme/useRootTheme.ts +0 -17
- package/src/core/theme/useTheme.ts +0 -16
- package/src/core/types/avatar.ts +0 -14
- package/src/core/types/badge.ts +0 -12
- package/src/core/types/box.ts +0 -19
- package/src/core/types/button.ts +0 -21
- package/src/core/types/card.ts +0 -6
- package/src/core/types/flex.ts +0 -30
- package/src/core/types/grid.ts +0 -14
- package/src/core/types/gridItem.ts +0 -29
- package/src/core/types/index.ts +0 -14
- package/src/core/types/placement.ts +0 -18
- package/src/core/types/popover.ts +0 -4
- package/src/core/types/radius.ts +0 -4
- package/src/core/types/selectable.ts +0 -6
- package/src/core/types/text.ts +0 -4
- package/src/core/utils/arrow/arrow.tsx +0 -123
- package/src/core/utils/arrow/index.ts +0 -1
- package/src/core/utils/boundaryElement/index.ts +0 -3
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -21
- package/src/core/utils/conditionalWrapper/index.ts +0 -1
- package/src/core/utils/elementQuery/index.ts +0 -1
- package/src/core/utils/index.ts +0 -9
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
- package/src/core/utils/layer/index.ts +0 -4
- package/src/core/utils/layer/layerContext.ts +0 -7
- package/src/core/utils/portal/index.ts +0 -4
- package/src/core/utils/portal/portal.ts +0 -32
- package/src/core/utils/spanWithTextOverflow.tsx +0 -10
- package/src/core/utils/srOnly/index.ts +0 -1
- package/src/core/utils/srOnly/srOnly.tsx +0 -36
- package/src/core/utils/virtualList/index.ts +0 -1
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -22
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
- package/src/theme/build/_deprecated/color/color.test.ts +0 -63
- package/src/theme/build/_deprecated/color/defaults.ts +0 -390
- package/src/theme/build/_deprecated/color/factory.ts +0 -142
- package/src/theme/build/_deprecated/color/index.ts +0 -1
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
- package/src/theme/build/buildColorTheme.test.ts +0 -183
- package/src/theme/build/buildColorTheme.ts +0 -494
- package/src/theme/build/buildTheme.test.ts +0 -87
- package/src/theme/build/buildTheme.ts +0 -36
- package/src/theme/build/colorToken/colorToken.ts +0 -19
- package/src/theme/build/colorToken/compileColorToken.ts +0 -21
- package/src/theme/build/colorToken/index.ts +0 -2
- package/src/theme/build/colorToken/types.ts +0 -6
- package/src/theme/build/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/index.ts +0 -3
- package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
- package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
- package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
- package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
- package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
- package/src/theme/build/lib/color-fns/convert.ts +0 -150
- package/src/theme/build/lib/color-fns/index.ts +0 -6
- package/src/theme/build/lib/color-fns/parse.ts +0 -60
- package/src/theme/build/lib/color-fns/rgba.ts +0 -10
- package/src/theme/build/lib/color-fns/types.ts +0 -28
- package/src/theme/build/lib/isRecord.ts +0 -3
- package/src/theme/build/lib/utils.ts +0 -19
- package/src/theme/build/mixThemeColor.test.ts +0 -21
- package/src/theme/build/mixThemeColor.ts +0 -53
- package/src/theme/build/renderColorTheme.ts +0 -532
- package/src/theme/build/renderColorValue.ts +0 -85
- package/src/theme/build/resolveColorTokens.ts +0 -268
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/helpers.ts +0 -55
- package/src/theme/config/index.ts +0 -4
- package/src/theme/config/system.ts +0 -115
- package/src/theme/config/tokens/color/index.ts +0 -1
- package/src/theme/config/tokens/color/types.ts +0 -133
- package/src/theme/config/tokens/index.ts +0 -4
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
- package/src/theme/config/tokens/parseTokenValue.ts +0 -133
- package/src/theme/config/tokens/types.ts +0 -53
- package/src/theme/config/types.ts +0 -46
- package/src/theme/defaults/colorPalette.ts +0 -5
- package/src/theme/defaults/colorTokens.ts +0 -648
- package/src/theme/getScopedTheme.ts +0 -91
- package/src/theme/system/avatar.ts +0 -14
- package/src/theme/system/color/_constants.ts +0 -45
- package/src/theme/system/color/_helpers.ts +0 -24
- package/src/theme/system/color/_system.ts +0 -40
- package/src/theme/system/color/avatar.ts +0 -15
- package/src/theme/system/color/badge.ts +0 -16
- package/src/theme/system/color/button.ts +0 -17
- package/src/theme/system/color/color.ts +0 -34
- package/src/theme/system/color/index.ts +0 -13
- package/src/theme/system/color/input.ts +0 -25
- package/src/theme/system/color/kbd.ts +0 -8
- package/src/theme/system/color/selectable.ts +0 -12
- package/src/theme/system/color/shadow.ts +0 -7
- package/src/theme/system/color/state.ts +0 -43
- package/src/theme/system/color/syntax.ts +0 -41
- package/src/theme/system/css.ts +0 -8
- package/src/theme/system/focusRing.ts +0 -7
- package/src/theme/system/font.ts +0 -52
- package/src/theme/system/index.ts +0 -11
- package/src/theme/system/input.ts +0 -33
- package/src/theme/system/layer.ts +0 -8
- package/src/theme/system/shadow.ts +0 -19
- package/src/theme/system/styles.ts +0 -13
- package/src/theme/system/theme.ts +0 -138
- package/src/theme/system/v0/avatar.ts +0 -10
- package/src/theme/system/v0/color/_generic.ts +0 -35
- package/src/theme/system/v0/color/_system.ts +0 -17
- package/src/theme/system/v0/color/base.ts +0 -21
- package/src/theme/system/v0/color/button.ts +0 -42
- package/src/theme/system/v0/color/card.ts +0 -19
- package/src/theme/system/v0/color/color.ts +0 -40
- package/src/theme/system/v0/color/index.ts +0 -11
- package/src/theme/system/v0/color/input.ts +0 -34
- package/src/theme/system/v0/color/muted.ts +0 -26
- package/src/theme/system/v0/color/selectable.ts +0 -31
- package/src/theme/system/v0/color/solid.ts +0 -26
- package/src/theme/system/v0/color/spot.ts +0 -13
- package/src/theme/system/v0/index.ts +0 -3
- package/src/theme/system/v0/input.ts +0 -23
- package/src/theme/versioning/getTheme_v2.ts +0 -57
- package/src/theme/versioning/index.ts +0 -5
- package/src/theme/versioning/is_v0.ts +0 -6
- package/src/theme/versioning/is_v2.ts +0 -6
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -243
- package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
- package/src/theme/versioning/v0_v2.ts +0 -94
- package/src/theme/versioning/v2_v0.ts +0 -127
- /package/src/core/observers/{resizeObserver.ts → resize.ts} +0 -0
- /package/src/core/{utils → primitives}/arrow/cmds.ts +0 -0
- /package/src/core/{utils → primitives}/layer/types.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,97 +1,94 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {AlignItems} from '@sanity/ui/css'
|
|
2
|
+
import type {AvatarColor} from '@sanity/ui/theme'
|
|
3
|
+
import type {AvatarSize} from '@sanity/ui/theme'
|
|
4
|
+
import {BadgeStyleProps} from '@sanity/ui/css'
|
|
5
|
+
import {BoxStyleProps} from '@sanity/ui/css'
|
|
6
|
+
import {Breakpoint} from '@sanity/ui/css'
|
|
7
|
+
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
8
|
+
import {CardStyleProps} from '@sanity/ui/css'
|
|
9
|
+
import type {CardTone} from '@sanity/ui/theme'
|
|
10
|
+
import {CodeStyleProps} from '@sanity/ui/css'
|
|
11
|
+
import type {ColorScheme} from '@sanity/ui/theme'
|
|
2
12
|
import {Component} from 'react'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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'
|
|
13
36
|
import {HTMLAttributes} from 'react'
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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'
|
|
21
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'
|
|
22
48
|
import {ReactNode} from 'react'
|
|
49
|
+
import type {ReactPortal} from 'react'
|
|
23
50
|
import {Ref} from 'react'
|
|
24
51
|
import {RefAttributes} from 'react'
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {ThemeColor} from '@sanity/ui/theme'
|
|
37
|
-
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
38
|
-
import {ThemeColorBase} from '@sanity/ui/theme'
|
|
39
|
-
import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
40
|
-
import {ThemeColorButton} from '@sanity/ui/theme'
|
|
41
|
-
import {ThemeColorButtonModeKey as ThemeColorButtonModeKey_2} from '@sanity/ui/theme'
|
|
42
|
-
import {ThemeColorButtonState} from '@sanity/ui/theme'
|
|
43
|
-
import {ThemeColorButtonStates} from '@sanity/ui/theme'
|
|
44
|
-
import {ThemeColorButtonTones} from '@sanity/ui/theme'
|
|
45
|
-
import {ThemeColorCard} from '@sanity/ui/theme'
|
|
46
|
-
import {ThemeColorCardState} from '@sanity/ui/theme'
|
|
47
|
-
import {ThemeColorCardToneKey} from '@sanity/ui/theme'
|
|
48
|
-
import {ThemeColorGenericState} from '@sanity/ui/theme'
|
|
49
|
-
import {ThemeColorInput} from '@sanity/ui/theme'
|
|
50
|
-
import {ThemeColorInputState} from '@sanity/ui/theme'
|
|
51
|
-
import {ThemeColorInputStates} from '@sanity/ui/theme'
|
|
52
|
-
import {ThemeColorMuted} from '@sanity/ui/theme'
|
|
53
|
-
import {ThemeColorMutedTone} from '@sanity/ui/theme'
|
|
54
|
-
import {ThemeColorName} from '@sanity/ui/theme'
|
|
55
|
-
import {ThemeColorScheme} from '@sanity/ui/theme'
|
|
56
|
-
import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@sanity/ui/theme'
|
|
57
|
-
import {ThemeColorSchemes} from '@sanity/ui/theme'
|
|
58
|
-
import {ThemeColorSelectable} from '@sanity/ui/theme'
|
|
59
|
-
import {ThemeColorSelectableState} from '@sanity/ui/theme'
|
|
60
|
-
import {ThemeColorSelectableStates} from '@sanity/ui/theme'
|
|
61
|
-
import {ThemeColorSolid} from '@sanity/ui/theme'
|
|
62
|
-
import {ThemeColorSolidTone} from '@sanity/ui/theme'
|
|
63
|
-
import {ThemeColorSpot} from '@sanity/ui/theme'
|
|
64
|
-
import {ThemeColorSpotKey} from '@sanity/ui/theme'
|
|
65
|
-
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
66
|
-
import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
|
|
67
|
-
import {ThemeColorToneKey} from '@sanity/ui/theme'
|
|
68
|
-
import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
|
|
69
|
-
import {ThemeFontKey as ThemeFontKey_2} from '@sanity/ui/theme'
|
|
70
|
-
import {ThemeFonts as ThemeFonts_2} from '@sanity/ui/theme'
|
|
71
|
-
import {ThemeFontSize as ThemeFontSize_2} from '@sanity/ui/theme'
|
|
72
|
-
import {ThemeFontWeight as ThemeFontWeight_2} from '@sanity/ui/theme'
|
|
73
|
-
import {ThemeFontWeightKey as ThemeFontWeightKey_2} from '@sanity/ui/theme'
|
|
74
|
-
import {ThemeInput} from '@sanity/ui/theme'
|
|
75
|
-
import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
|
|
76
|
-
import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
|
|
77
|
-
import {ThemeStyles} from '@sanity/ui/theme'
|
|
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'
|
|
78
63
|
|
|
79
|
-
/** @
|
|
80
|
-
export declare
|
|
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
|
+
}
|
|
81
78
|
|
|
82
79
|
/** @internal */
|
|
83
|
-
export declare
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
width: number
|
|
87
|
-
height: number
|
|
88
|
-
radius?: number
|
|
89
|
-
} & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width'>,
|
|
90
|
-
'ref'
|
|
91
|
-
> &
|
|
92
|
-
RefAttributes<HTMLDivElement>
|
|
80
|
+
export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
|
|
81
|
+
ArrowOwnProps,
|
|
82
|
+
E
|
|
93
83
|
>
|
|
94
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
|
|
91
|
+
|
|
95
92
|
/**
|
|
96
93
|
* @internal
|
|
97
94
|
*/
|
|
@@ -103,33 +100,13 @@ export declare function attemptFocus(element: HTMLElement): boolean
|
|
|
103
100
|
*
|
|
104
101
|
* @public
|
|
105
102
|
*/
|
|
106
|
-
export declare
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| 'aria-owns'
|
|
114
|
-
| 'as'
|
|
115
|
-
| 'autoCapitalize'
|
|
116
|
-
| 'autoComplete'
|
|
117
|
-
| 'autoCorrect'
|
|
118
|
-
| 'id'
|
|
119
|
-
| 'inputMode'
|
|
120
|
-
| 'onChange'
|
|
121
|
-
| 'onSelect'
|
|
122
|
-
| 'popover'
|
|
123
|
-
| 'prefix'
|
|
124
|
-
| 'ref'
|
|
125
|
-
| 'role'
|
|
126
|
-
| 'spellCheck'
|
|
127
|
-
| 'type'
|
|
128
|
-
| 'value'
|
|
129
|
-
> & {
|
|
130
|
-
ref?: Ref<HTMLInputElement>
|
|
131
|
-
},
|
|
132
|
-
) => React.JSX.Element
|
|
103
|
+
export declare function Autocomplete<
|
|
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
|
|
133
110
|
|
|
134
111
|
/**
|
|
135
112
|
* @internal
|
|
@@ -160,26 +137,19 @@ export declare type AutocompleteMsg =
|
|
|
160
137
|
| AutocompleteInputFoocusMsg
|
|
161
138
|
| AutocompleteValueChangeMsg
|
|
162
139
|
|
|
163
|
-
/**
|
|
164
|
-
|
|
165
|
-
*/
|
|
166
|
-
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps, 'as'> &
|
|
167
|
-
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
|
|
140
|
+
/** @public */
|
|
141
|
+
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
|
|
168
142
|
|
|
169
|
-
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Option extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
174
|
-
> {
|
|
143
|
+
/** @public */
|
|
144
|
+
export declare type AutocompleteOwnProps<
|
|
145
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
146
|
+
> = TextInputOwnProps & {
|
|
175
147
|
border?: boolean
|
|
176
148
|
customValidity?: string
|
|
177
|
-
filterOption?: (query: string, option:
|
|
178
|
-
|
|
179
|
-
icon?: ElementType | ReactNode
|
|
180
|
-
id: string
|
|
149
|
+
filterOption?: (query: string, option: O) => boolean
|
|
150
|
+
icon?: ElementType_2 | ReactNode
|
|
181
151
|
/** @beta */
|
|
182
|
-
listBox?:
|
|
152
|
+
listBox?: BoxOwnProps
|
|
183
153
|
loading?: boolean
|
|
184
154
|
onChange?: (value: string) => void
|
|
185
155
|
onQueryChange?: (query: string | null) => void
|
|
@@ -189,16 +159,15 @@ export declare interface AutocompleteProps<
|
|
|
189
159
|
/** @beta */
|
|
190
160
|
openOnFocus?: boolean
|
|
191
161
|
/** The options to render. */
|
|
192
|
-
options?:
|
|
193
|
-
padding?:
|
|
194
|
-
popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
195
|
-
Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>
|
|
162
|
+
options?: O[]
|
|
163
|
+
padding?: ResponsiveProp<Space>
|
|
164
|
+
popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
196
165
|
prefix?: ReactNode
|
|
197
166
|
radius?: Radius | Radius[]
|
|
198
167
|
/** @beta */
|
|
199
168
|
relatedElements?: HTMLElement[]
|
|
200
169
|
/** The callback function for rendering each option. */
|
|
201
|
-
renderOption?: (option:
|
|
170
|
+
renderOption?: (option: O) => React.JSX.Element
|
|
202
171
|
/** @beta */
|
|
203
172
|
renderPopover?: (
|
|
204
173
|
props: {
|
|
@@ -208,14 +177,19 @@ export declare interface AutocompleteProps<
|
|
|
208
177
|
onMouseEnter: () => void
|
|
209
178
|
onMouseLeave: () => void
|
|
210
179
|
},
|
|
211
|
-
ref:
|
|
180
|
+
ref: ForwardedRef<HTMLDivElement>,
|
|
212
181
|
) => ReactNode
|
|
213
|
-
renderValue?: (value: string, option?:
|
|
182
|
+
renderValue?: (value: string, option?: O) => string
|
|
214
183
|
suffix?: ReactNode
|
|
215
|
-
/** The current value. */
|
|
216
184
|
value?: string
|
|
217
185
|
}
|
|
218
186
|
|
|
187
|
+
/** @public */
|
|
188
|
+
export declare type AutocompleteProps<
|
|
189
|
+
E extends AutocompleteElementType = AutocompleteElementType,
|
|
190
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
191
|
+
> = Props<AutocompleteOwnProps<O>, E>
|
|
192
|
+
|
|
219
193
|
/**
|
|
220
194
|
* @internal
|
|
221
195
|
*/
|
|
@@ -286,157 +260,123 @@ export declare interface AutocompleteValueChangeMsg {
|
|
|
286
260
|
*
|
|
287
261
|
* @public
|
|
288
262
|
*/
|
|
289
|
-
export declare
|
|
290
|
-
AvatarProps
|
|
291
|
-
|
|
263
|
+
export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
|
|
264
|
+
props: AvatarProps<E>,
|
|
265
|
+
): React.JSX.Element
|
|
292
266
|
|
|
293
|
-
/**
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
AvatarCounterProps & RefAttributes<HTMLDivElement>
|
|
298
|
-
>
|
|
267
|
+
/** @public */
|
|
268
|
+
export declare function AvatarCounter<
|
|
269
|
+
E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
270
|
+
>(props: AvatarCounterProps<E>): React.JSX.Element
|
|
299
271
|
|
|
300
|
-
/**
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
272
|
+
/** @public */
|
|
273
|
+
export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
|
|
274
|
+
|
|
275
|
+
/** @public */
|
|
276
|
+
export declare interface AvatarCounterOwnProps {
|
|
304
277
|
count: number
|
|
305
|
-
size?: AvatarSize
|
|
306
|
-
/** @deprecated No longer supported. */
|
|
307
|
-
tone?: 'navbar'
|
|
278
|
+
size?: ResponsiveProp<AvatarSize>
|
|
308
279
|
}
|
|
309
280
|
|
|
310
|
-
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
281
|
+
/** @public */
|
|
282
|
+
export declare type AvatarCounterProps<
|
|
283
|
+
E extends AvatarCounterElementType = AvatarCounterElementType,
|
|
284
|
+
> = Props<AvatarCounterOwnProps, E>
|
|
314
285
|
|
|
315
|
-
/**
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
286
|
+
/** @public */
|
|
287
|
+
export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
|
|
288
|
+
|
|
289
|
+
/** @public */
|
|
290
|
+
export declare interface AvatarOwnProps {
|
|
319
291
|
/** @beta */
|
|
320
292
|
__unstable_hideInnerStroke?: boolean
|
|
321
293
|
animateArrowFrom?: AvatarPosition
|
|
322
294
|
arrowPosition?: AvatarPosition
|
|
323
|
-
|
|
324
|
-
color?: ThemeColorAvatarColorKey
|
|
295
|
+
color?: AvatarColor
|
|
325
296
|
initials?: string
|
|
326
297
|
onImageLoadError?: (event: Error) => void
|
|
327
|
-
size?: AvatarSize
|
|
298
|
+
size?: ResponsiveProp<AvatarSize>
|
|
328
299
|
src?: string
|
|
329
|
-
/**
|
|
330
|
-
* The status of the entity this Avatar represents.
|
|
331
|
-
* @alpha
|
|
332
|
-
*/
|
|
333
|
-
status?: AvatarStatus
|
|
334
300
|
title?: string
|
|
335
301
|
}
|
|
336
302
|
|
|
337
|
-
/**
|
|
338
|
-
|
|
339
|
-
*/
|
|
340
|
-
export declare interface AvatarRootStyleProps {
|
|
341
|
-
$color: ThemeColorAvatarColorKey
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* @public
|
|
346
|
-
*/
|
|
347
|
-
export declare type AvatarSize = 0 | 1 | 2 | 3
|
|
303
|
+
/** @public */
|
|
304
|
+
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
348
305
|
|
|
349
|
-
/**
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
306
|
+
/** @public */
|
|
307
|
+
export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
|
|
308
|
+
AvatarOwnProps,
|
|
309
|
+
E
|
|
354
310
|
>
|
|
355
311
|
|
|
356
|
-
/**
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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[]
|
|
361
329
|
maxLength?: number
|
|
362
|
-
size?: AvatarSize
|
|
363
|
-
/** @deprecated No longer supported. */
|
|
364
|
-
tone?: 'navbar'
|
|
330
|
+
size?: ResponsiveProp<AvatarSize>
|
|
365
331
|
}
|
|
366
332
|
|
|
367
|
-
/**
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
333
|
+
/** @public */
|
|
334
|
+
export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
|
|
335
|
+
Props<AvatarStackOwnProps, E>
|
|
371
336
|
|
|
372
337
|
/**
|
|
373
338
|
* Badges are used to tag resources.
|
|
374
339
|
*
|
|
375
340
|
* @public
|
|
376
341
|
*/
|
|
377
|
-
export declare
|
|
378
|
-
|
|
379
|
-
|
|
342
|
+
export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
|
|
343
|
+
props: BadgeProps<E>,
|
|
344
|
+
): React.JSX.Element
|
|
380
345
|
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
* @deprecated No longer used
|
|
384
|
-
*/
|
|
385
|
-
export declare type BadgeMode = 'default' | 'outline'
|
|
346
|
+
/** @public */
|
|
347
|
+
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
386
348
|
|
|
387
|
-
/**
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
fontSize?: number | number[]
|
|
393
|
-
/** @deprecated No longer used. */
|
|
394
|
-
mode?: BadgeMode
|
|
395
|
-
tone?: BadgeTone
|
|
396
|
-
}
|
|
349
|
+
/** @public */
|
|
350
|
+
export declare type BadgeOwnProps = BadgeStyleProps &
|
|
351
|
+
FlexStyleProps &
|
|
352
|
+
PaddingStyleProps &
|
|
353
|
+
RadiusStyleProps
|
|
397
354
|
|
|
398
|
-
/**
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
355
|
+
/** @public */
|
|
356
|
+
export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
|
|
357
|
+
BadgeOwnProps,
|
|
358
|
+
E
|
|
359
|
+
>
|
|
402
360
|
|
|
403
|
-
/**
|
|
404
|
-
* @public
|
|
405
|
-
*/
|
|
361
|
+
/** @public */
|
|
406
362
|
export declare interface BaseAutocompleteOption {
|
|
407
363
|
value: string
|
|
408
364
|
}
|
|
409
365
|
|
|
410
|
-
/**
|
|
411
|
-
* @public
|
|
412
|
-
* @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
|
|
413
|
-
*/
|
|
414
|
-
export declare type BaseTheme = BaseTheme_2
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* @public
|
|
418
|
-
*/
|
|
366
|
+
/** @public */
|
|
419
367
|
export declare interface BoundaryElementContextValue {
|
|
420
368
|
version: 0.0
|
|
421
369
|
element: HTMLElement | null
|
|
422
370
|
}
|
|
423
371
|
|
|
424
|
-
/**
|
|
425
|
-
* @public
|
|
426
|
-
*/
|
|
372
|
+
/** @public */
|
|
427
373
|
export declare function BoundaryElementProvider(
|
|
428
374
|
props: BoundaryElementProviderProps,
|
|
429
375
|
): React.JSX.Element
|
|
430
376
|
|
|
431
|
-
|
|
432
|
-
var displayName: string
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* @public
|
|
437
|
-
*/
|
|
377
|
+
/** @public */
|
|
438
378
|
export declare interface BoundaryElementProviderProps {
|
|
439
|
-
children:
|
|
379
|
+
children: ReactNode
|
|
440
380
|
element: HTMLElement | null
|
|
441
381
|
}
|
|
442
382
|
|
|
@@ -446,120 +386,114 @@ export declare interface BoundaryElementProviderProps {
|
|
|
446
386
|
*
|
|
447
387
|
* @public
|
|
448
388
|
*/
|
|
449
|
-
export declare
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
>
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* @public
|
|
456
|
-
*/
|
|
457
|
-
export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* @public
|
|
461
|
-
*/
|
|
462
|
-
export declare type BoxHeight = 'stretch' | 'fill'
|
|
389
|
+
export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
|
|
390
|
+
props: BoxProps<E>,
|
|
391
|
+
): React.JSX.Element
|
|
463
392
|
|
|
464
|
-
/**
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
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
|
|
468
431
|
|
|
469
|
-
/**
|
|
470
|
-
|
|
471
|
-
*/
|
|
472
|
-
export declare interface BoxProps
|
|
473
|
-
extends ResponsiveFlexItemProps,
|
|
474
|
-
ResponsiveBoxProps,
|
|
475
|
-
ResponsiveGridItemProps,
|
|
476
|
-
ResponsiveMarginProps,
|
|
477
|
-
ResponsivePaddingProps {
|
|
478
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
479
|
-
forwardedAs?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
480
|
-
}
|
|
432
|
+
/** @public */
|
|
433
|
+
export declare type BoxOwnProps = BoxStyleProps
|
|
481
434
|
|
|
482
|
-
/**
|
|
483
|
-
|
|
484
|
-
* @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
|
|
485
|
-
*/
|
|
486
|
-
export declare type BoxShadow = ThemeBoxShadow
|
|
435
|
+
/** @public */
|
|
436
|
+
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
487
437
|
|
|
488
|
-
/**
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
438
|
+
/** @beta */
|
|
439
|
+
export declare function Breadcrumbs<
|
|
440
|
+
E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
|
|
441
|
+
>(props: BreadcrumbsProps<E>): React.JSX.Element
|
|
492
442
|
|
|
493
|
-
/**
|
|
494
|
-
|
|
495
|
-
*/
|
|
496
|
-
export declare const Breadcrumbs: ForwardRefExoticComponent<
|
|
497
|
-
BreadcrumbsProps &
|
|
498
|
-
Omit<HTMLProps<HTMLOListElement>, 'type' | 'ref' | 'as'> &
|
|
499
|
-
RefAttributes<HTMLOListElement>
|
|
500
|
-
>
|
|
443
|
+
/** @beta */
|
|
444
|
+
export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
|
|
501
445
|
|
|
502
|
-
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
export declare interface BreadcrumbsProps {
|
|
446
|
+
/** @beta */
|
|
447
|
+
export declare type BreadcrumbsOwnProps = GapStyleProps & {
|
|
448
|
+
expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
|
|
506
449
|
maxLength?: number
|
|
507
|
-
separator?:
|
|
508
|
-
space?: number | number[]
|
|
450
|
+
separator?: ReactNode
|
|
509
451
|
}
|
|
510
452
|
|
|
511
|
-
/**
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
export declare const Button: ForwardRefExoticComponent<
|
|
515
|
-
Omit<ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'width' | 'as'>, 'ref'> &
|
|
516
|
-
RefAttributes<HTMLButtonElement>
|
|
517
|
-
>
|
|
453
|
+
/** @beta */
|
|
454
|
+
export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
|
|
455
|
+
Props<BreadcrumbsOwnProps, E>
|
|
518
456
|
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
457
|
+
/** @public */
|
|
458
|
+
export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
|
|
459
|
+
props: ButtonProps<E>,
|
|
460
|
+
): React.JSX.Element
|
|
523
461
|
|
|
524
|
-
/**
|
|
525
|
-
|
|
526
|
-
*/
|
|
527
|
-
export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
528
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
529
|
-
fontSize?: number | number[]
|
|
530
|
-
mode?: ButtonMode
|
|
531
|
-
icon?: React.ElementType | React.ReactNode
|
|
532
|
-
iconRight?: React.ElementType | React.ReactNode
|
|
533
|
-
justify?: FlexJustify | FlexJustify[]
|
|
534
|
-
/**
|
|
535
|
-
* @beta Do not use in production, as this might change.
|
|
536
|
-
*/
|
|
537
|
-
loading?: boolean
|
|
538
|
-
selected?: boolean
|
|
539
|
-
space?: number | number[]
|
|
540
|
-
muted?: boolean
|
|
541
|
-
text?: React.ReactNode
|
|
542
|
-
textAlign?: ButtonTextAlign
|
|
543
|
-
textWeight?: ThemeFontWeightKey_2
|
|
544
|
-
tone?: ButtonTone
|
|
545
|
-
type?: 'button' | 'reset' | 'submit'
|
|
546
|
-
width?: ButtonWidth
|
|
547
|
-
}
|
|
462
|
+
/** @public */
|
|
463
|
+
export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
548
464
|
|
|
549
|
-
/**
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
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
|
+
}
|
|
553
488
|
|
|
554
|
-
/**
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
489
|
+
/** @public */
|
|
490
|
+
export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
|
|
491
|
+
ButtonOwnProps,
|
|
492
|
+
E
|
|
493
|
+
>
|
|
558
494
|
|
|
559
|
-
/**
|
|
560
|
-
|
|
561
|
-
*/
|
|
562
|
-
export declare type ButtonWidth = 'fill'
|
|
495
|
+
/** @public */
|
|
496
|
+
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
563
497
|
|
|
564
498
|
/**
|
|
565
499
|
* The `Card` component acts much like a `Box`, but with a background and foreground color.
|
|
@@ -567,19 +501,30 @@ export declare type ButtonWidth = 'fill'
|
|
|
567
501
|
*
|
|
568
502
|
* @public
|
|
569
503
|
*/
|
|
570
|
-
export declare
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
>
|
|
504
|
+
export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
|
|
505
|
+
props: CardProps<E>,
|
|
506
|
+
): React.JSX.Element
|
|
574
507
|
|
|
575
|
-
/**
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
508
|
+
/** @internal */
|
|
509
|
+
export declare type _CardCompatProviderComponent = ComponentType_2<{
|
|
510
|
+
children?: ReactNode
|
|
511
|
+
tone: CardTone | 'inherit'
|
|
512
|
+
scheme: ColorScheme
|
|
513
|
+
}>
|
|
514
|
+
|
|
515
|
+
/** @public */
|
|
516
|
+
export declare interface CardContextValue {
|
|
517
|
+
tone: CardTone
|
|
518
|
+
scheme: ColorScheme
|
|
519
|
+
/** @internal */
|
|
520
|
+
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/** @public */
|
|
524
|
+
export declare type CardElementType = BoxElementType
|
|
525
|
+
|
|
526
|
+
/** @public */
|
|
527
|
+
export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps {
|
|
583
528
|
/**
|
|
584
529
|
* Do not use in production.
|
|
585
530
|
* @beta
|
|
@@ -590,150 +535,284 @@ export declare interface CardProps
|
|
|
590
535
|
* @beta
|
|
591
536
|
*/
|
|
592
537
|
__unstable_focusRing?: boolean
|
|
593
|
-
|
|
538
|
+
disabled?: boolean
|
|
594
539
|
pressed?: boolean
|
|
595
|
-
|
|
596
|
-
|
|
540
|
+
selected?: boolean
|
|
541
|
+
target?: string
|
|
597
542
|
}
|
|
598
543
|
|
|
599
|
-
/**
|
|
600
|
-
|
|
601
|
-
*/
|
|
602
|
-
export declare interface CardStyleProps {
|
|
603
|
-
$checkered: boolean
|
|
604
|
-
$focusRing: boolean
|
|
605
|
-
$muted: boolean
|
|
606
|
-
$tone: ThemeColorToneKey
|
|
607
|
-
}
|
|
544
|
+
/** @public */
|
|
545
|
+
export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
|
|
608
546
|
|
|
609
|
-
/**
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
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
|
|
613
555
|
|
|
614
556
|
/**
|
|
615
557
|
* Checkboxes allow the user to select one or more items from a set.
|
|
616
558
|
*
|
|
617
559
|
* @public
|
|
618
560
|
*/
|
|
619
|
-
export declare
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
>
|
|
561
|
+
export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
|
|
562
|
+
props: CheckboxProps<E>,
|
|
563
|
+
): React.JSX.Element
|
|
623
564
|
|
|
624
|
-
/**
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
565
|
+
/** @public */
|
|
566
|
+
export declare type CheckboxElementType = 'input' | ComponentType
|
|
567
|
+
|
|
568
|
+
/** @public */
|
|
569
|
+
export declare type CheckboxOwnProps = {
|
|
628
570
|
indeterminate?: boolean
|
|
629
571
|
customValidity?: string
|
|
630
572
|
}
|
|
631
573
|
|
|
632
|
-
/**
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
574
|
+
/** @public */
|
|
575
|
+
export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
|
|
576
|
+
CheckboxOwnProps,
|
|
577
|
+
E
|
|
578
|
+
>
|
|
636
579
|
|
|
637
|
-
/**
|
|
638
|
-
* @public
|
|
639
|
-
*/
|
|
580
|
+
/** @public */
|
|
640
581
|
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
641
582
|
|
|
642
|
-
/**
|
|
643
|
-
* @public
|
|
644
|
-
*/
|
|
583
|
+
/** @public */
|
|
645
584
|
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
646
585
|
|
|
647
|
-
/**
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
586
|
+
/** @public */
|
|
587
|
+
export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
|
|
588
|
+
props: CodeProps<E>,
|
|
589
|
+
): React.JSX.Element
|
|
651
590
|
|
|
652
|
-
/**
|
|
653
|
-
|
|
654
|
-
*/
|
|
655
|
-
export declare const Code: ForwardRefExoticComponent<
|
|
656
|
-
Omit<CodeProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> & RefAttributes<HTMLElement>
|
|
657
|
-
>
|
|
591
|
+
/** @public */
|
|
592
|
+
export declare type CodeElementType = 'div' | 'pre' | ComponentType
|
|
658
593
|
|
|
659
|
-
/**
|
|
660
|
-
|
|
661
|
-
*/
|
|
662
|
-
export declare interface CodeProps {
|
|
663
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
594
|
+
/** @public */
|
|
595
|
+
export declare type CodeOwnProps = CodeStyleProps & {
|
|
664
596
|
/** Define the language to use for syntax highlighting. */
|
|
665
597
|
language?: string
|
|
666
|
-
size?:
|
|
667
|
-
weight?: string
|
|
598
|
+
size?: ResponsiveProp<FontCodeSize>
|
|
668
599
|
}
|
|
669
600
|
|
|
601
|
+
/** @public */
|
|
602
|
+
export declare type CodeProps<E extends CodeElementType = CodeElementType> = Props<CodeOwnProps, E>
|
|
603
|
+
|
|
670
604
|
/**
|
|
671
605
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
672
606
|
* @beta
|
|
673
607
|
*/
|
|
674
|
-
export declare
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
'ref'
|
|
678
|
-
> &
|
|
679
|
-
RefAttributes<HTMLDivElement>
|
|
680
|
-
>
|
|
608
|
+
export declare function CodeSkeleton<
|
|
609
|
+
E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
|
|
610
|
+
>(props: CodeSkeletonProps<E>): React.JSX.Element
|
|
681
611
|
|
|
682
|
-
/**
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
*/
|
|
686
|
-
export declare
|
|
687
|
-
size?:
|
|
612
|
+
/** @beta */
|
|
613
|
+
export declare type CodeSkeletonElementType = SkeletonElementType
|
|
614
|
+
|
|
615
|
+
/** @beta */
|
|
616
|
+
export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
|
|
617
|
+
size?: ResponsiveProp<FontCodeSize>
|
|
688
618
|
}
|
|
689
619
|
|
|
690
620
|
/**
|
|
691
|
-
*
|
|
692
|
-
* @
|
|
621
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
622
|
+
* @beta
|
|
693
623
|
*/
|
|
694
|
-
export declare
|
|
695
|
-
|
|
696
|
-
condition,
|
|
697
|
-
wrapper,
|
|
698
|
-
}: {
|
|
699
|
-
children: React.ReactNode
|
|
700
|
-
condition: boolean
|
|
701
|
-
wrapper: (children: React.ReactNode) => React.ReactNode
|
|
702
|
-
}): React.ReactNode
|
|
624
|
+
export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
|
|
625
|
+
Props<CodeSkeletonOwnProps, E>
|
|
703
626
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
627
|
+
/** @public */
|
|
628
|
+
export declare type ComponentType<P = any> =
|
|
629
|
+
| FunctionComponent<P>
|
|
630
|
+
| ComponentClass<P>
|
|
631
|
+
| ExoticComponent<P>
|
|
707
632
|
|
|
708
633
|
/**
|
|
709
634
|
* The `Container` component wraps content layout in a defined set of widths.
|
|
710
635
|
*
|
|
711
636
|
* @public
|
|
712
637
|
*/
|
|
713
|
-
export declare
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
>
|
|
638
|
+
export declare function Container<
|
|
639
|
+
E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
|
|
640
|
+
>(props: ContainerProps<E>): React.JSX.Element
|
|
717
641
|
|
|
718
|
-
/**
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
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
|
+
>
|
|
722
653
|
|
|
723
654
|
/**
|
|
724
655
|
* @internal
|
|
725
656
|
*/
|
|
726
657
|
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
727
658
|
|
|
728
|
-
/**
|
|
729
|
-
|
|
730
|
-
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
731
|
-
*/
|
|
732
|
-
export declare const createColorTheme: typeof createColorTheme_2
|
|
659
|
+
/** @internal */
|
|
660
|
+
export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
733
661
|
|
|
734
|
-
/**
|
|
735
|
-
|
|
736
|
-
|
|
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 */
|
|
737
816
|
export declare type Delay =
|
|
738
817
|
| number
|
|
739
818
|
| Partial<{
|
|
@@ -746,10 +825,9 @@ export declare type Delay =
|
|
|
746
825
|
*
|
|
747
826
|
* @public
|
|
748
827
|
*/
|
|
749
|
-
export declare
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
>
|
|
828
|
+
export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
|
|
829
|
+
props: DialogProps<E>,
|
|
830
|
+
): React.JSX.Element
|
|
753
831
|
|
|
754
832
|
/**
|
|
755
833
|
* @internal
|
|
@@ -762,78 +840,98 @@ export declare const DialogContext: Context<DialogContextValue>
|
|
|
762
840
|
*/
|
|
763
841
|
export declare interface DialogContextValue {
|
|
764
842
|
version: 0.0
|
|
765
|
-
position?: DialogPosition
|
|
766
|
-
zOffset?: number
|
|
843
|
+
position?: ResponsiveProp<DialogPosition>
|
|
844
|
+
zOffset?: ResponsiveProp<number>
|
|
767
845
|
}
|
|
768
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
|
+
|
|
769
894
|
/**
|
|
770
|
-
*
|
|
895
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
896
|
+
* @beta
|
|
771
897
|
*/
|
|
772
|
-
export declare
|
|
898
|
+
export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element
|
|
773
899
|
|
|
774
900
|
/**
|
|
775
|
-
*
|
|
901
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
902
|
+
* @beta
|
|
776
903
|
*/
|
|
777
|
-
export declare interface
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
__unstable_autoFocus?: boolean
|
|
782
|
-
/**
|
|
783
|
-
* @beta
|
|
784
|
-
*/
|
|
785
|
-
__unstable_hideCloseButton?: boolean
|
|
786
|
-
cardRadius?: Radius | Radius[]
|
|
787
|
-
cardShadow?: number | number[]
|
|
788
|
-
contentRef?: React.ForwardedRef<HTMLDivElement>
|
|
789
|
-
footer?: React.ReactNode
|
|
790
|
-
header?: React.ReactNode
|
|
791
|
-
id: string
|
|
792
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
793
|
-
onActivate?: LayerProps['onActivate']
|
|
794
|
-
onClickOutside?: () => void
|
|
795
|
-
onClose?: () => void
|
|
796
|
-
portal?: string
|
|
797
|
-
position?: DialogPosition | DialogPosition[]
|
|
798
|
-
scheme?: ThemeColorSchemeKey_2
|
|
799
|
-
zOffset?: number | number[]
|
|
800
|
-
/**
|
|
801
|
-
* Whether the dialog should animate in on mount.
|
|
802
|
-
*
|
|
803
|
-
* @beta
|
|
804
|
-
* @defaultValue false
|
|
805
|
-
*/
|
|
806
|
-
animate?: boolean
|
|
904
|
+
export declare interface DialogProviderProps {
|
|
905
|
+
children?: ReactNode
|
|
906
|
+
position?: ResponsiveProp<DialogPosition>
|
|
907
|
+
zOffset?: ResponsiveProp<number>
|
|
807
908
|
}
|
|
808
909
|
|
|
809
910
|
/**
|
|
810
|
-
*
|
|
911
|
+
* DO NOT USE IN PRODUCTION.
|
|
811
912
|
* @beta
|
|
812
913
|
*/
|
|
813
|
-
export declare function
|
|
914
|
+
export declare function ElementQuery<
|
|
915
|
+
E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
|
|
916
|
+
>(props: ElementQueryProps<E>): React.JSX.Element
|
|
814
917
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
}
|
|
918
|
+
/** @beta */
|
|
919
|
+
export declare type ElementQueryElementType = 'div' | ComponentType
|
|
818
920
|
|
|
819
921
|
/**
|
|
820
|
-
*
|
|
922
|
+
* DO NOT USE IN PRODUCTION.
|
|
821
923
|
* @beta
|
|
822
924
|
*/
|
|
823
|
-
export declare
|
|
824
|
-
|
|
825
|
-
position?: DialogPosition | DialogPosition[]
|
|
826
|
-
zOffset?: number | number[]
|
|
925
|
+
export declare type ElementQueryOwnProps = {
|
|
926
|
+
media?: number[]
|
|
827
927
|
}
|
|
828
928
|
|
|
829
929
|
/**
|
|
830
930
|
* DO NOT USE IN PRODUCTION.
|
|
831
931
|
* @beta
|
|
832
932
|
*/
|
|
833
|
-
export declare
|
|
834
|
-
|
|
835
|
-
RefAttributes<HTMLDivElement>
|
|
836
|
-
>
|
|
933
|
+
export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
|
|
934
|
+
Props<ElementQueryOwnProps, E>
|
|
837
935
|
|
|
838
936
|
/**
|
|
839
937
|
* @beta
|
|
@@ -877,15 +975,22 @@ export declare const _elementSizeObserver: _ElementSizeObserver
|
|
|
877
975
|
*/
|
|
878
976
|
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
879
977
|
|
|
978
|
+
/** @public */
|
|
979
|
+
export declare type ElementType<P> = TagType | ComponentType<P>
|
|
980
|
+
|
|
981
|
+
/** @public */
|
|
982
|
+
export declare type EmptyProps = {}
|
|
983
|
+
|
|
880
984
|
/**
|
|
881
985
|
* DO NOT USE IN PRODUCTION
|
|
882
986
|
* @beta
|
|
883
987
|
*/
|
|
884
988
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
885
989
|
state: ErrorBoundaryState
|
|
990
|
+
static displayName: string
|
|
886
991
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState
|
|
887
|
-
componentDidCatch(error: Error, info:
|
|
888
|
-
render():
|
|
992
|
+
componentDidCatch(error: Error, info: ErrorInfo): void
|
|
993
|
+
render(): ReactNode
|
|
889
994
|
}
|
|
890
995
|
|
|
891
996
|
/**
|
|
@@ -893,7 +998,7 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
893
998
|
* @beta
|
|
894
999
|
*/
|
|
895
1000
|
export declare type ErrorBoundaryProps = PropsWithChildren<{
|
|
896
|
-
onCatch: (params: {error: Error; info:
|
|
1001
|
+
onCatch: (params: {error: Error; info: ErrorInfo}) => void
|
|
897
1002
|
}>
|
|
898
1003
|
|
|
899
1004
|
/**
|
|
@@ -904,64 +1009,31 @@ export declare interface ErrorBoundaryState {
|
|
|
904
1009
|
error: Error | null
|
|
905
1010
|
}
|
|
906
1011
|
|
|
907
|
-
/**
|
|
908
|
-
* @internal
|
|
909
|
-
*/
|
|
910
|
-
export declare function _fillCSSObject(
|
|
911
|
-
keys: string[],
|
|
912
|
-
value: string | number | CSSObject,
|
|
913
|
-
): CSSObject
|
|
914
|
-
|
|
915
1012
|
/**
|
|
916
1013
|
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
917
1014
|
*
|
|
918
1015
|
* @public
|
|
919
1016
|
*/
|
|
920
|
-
export declare
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
>
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* @public
|
|
927
|
-
*/
|
|
928
|
-
export declare type FlexAlign = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* @public
|
|
932
|
-
*/
|
|
933
|
-
export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse'
|
|
1017
|
+
export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
|
|
1018
|
+
props: FlexProps<E>,
|
|
1019
|
+
): React.JSX.Element
|
|
934
1020
|
|
|
935
|
-
/**
|
|
936
|
-
|
|
937
|
-
*/
|
|
938
|
-
export declare type FlexJustify =
|
|
939
|
-
| 'flex-start'
|
|
940
|
-
| 'flex-end'
|
|
941
|
-
| 'center'
|
|
942
|
-
| 'space-between'
|
|
943
|
-
| 'space-around'
|
|
944
|
-
| 'space-evenly'
|
|
1021
|
+
/** @public */
|
|
1022
|
+
export declare type FlexElementType = BoxElementType
|
|
945
1023
|
|
|
946
|
-
/**
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
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>
|
|
954
1033
|
}
|
|
955
1034
|
|
|
956
|
-
/**
|
|
957
|
-
|
|
958
|
-
*/
|
|
959
|
-
export declare type FlexValue = number | 'none' | 'auto' | 'initial'
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* @public
|
|
963
|
-
*/
|
|
964
|
-
export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
|
|
1035
|
+
/** @public */
|
|
1036
|
+
export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
|
|
965
1037
|
|
|
966
1038
|
/**
|
|
967
1039
|
* @internal
|
|
@@ -976,191 +1048,156 @@ export declare function focusLastDescendant(element: HTMLElement): boolean
|
|
|
976
1048
|
/**
|
|
977
1049
|
* @internal
|
|
978
1050
|
*/
|
|
979
|
-
export declare
|
|
980
|
-
$weight?: ThemeFontWeightKey_2
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* @internal
|
|
985
|
-
*/
|
|
986
|
-
export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
1051
|
+
export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
987
1052
|
|
|
988
1053
|
/**
|
|
989
1054
|
* @internal
|
|
990
1055
|
*/
|
|
991
|
-
export declare function
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
): CSSObject[] | null
|
|
1056
|
+
export declare function _getResponsiveProp<T>(
|
|
1057
|
+
val: ResponsiveProp<T> | undefined,
|
|
1058
|
+
defaultVal?: Partial<Record<Breakpoint, T>>,
|
|
1059
|
+
): Partial<Record<Breakpoint, T>>
|
|
996
1060
|
|
|
997
1061
|
/**
|
|
998
1062
|
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
999
1063
|
*
|
|
1000
1064
|
* @public
|
|
1001
1065
|
*/
|
|
1002
|
-
export declare
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
>
|
|
1066
|
+
export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
|
|
1067
|
+
props: GridProps<E>,
|
|
1068
|
+
): React.JSX.Element
|
|
1006
1069
|
|
|
1007
|
-
/**
|
|
1008
|
-
|
|
1009
|
-
*/
|
|
1010
|
-
export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
|
|
1070
|
+
/** @public */
|
|
1071
|
+
export declare type GridElementType = BoxElementType
|
|
1011
1072
|
|
|
1012
|
-
/**
|
|
1013
|
-
|
|
1014
|
-
*/
|
|
1015
|
-
export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
|
|
1073
|
+
/** @public */
|
|
1074
|
+
export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1016
1075
|
|
|
1017
|
-
/**
|
|
1018
|
-
|
|
1019
|
-
*/
|
|
1020
|
-
export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
|
|
1076
|
+
/** @public */
|
|
1077
|
+
export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
|
|
1021
1078
|
|
|
1022
1079
|
/**
|
|
1023
|
-
* @
|
|
1080
|
+
* @internal
|
|
1024
1081
|
*/
|
|
1025
|
-
export declare
|
|
1082
|
+
export declare function _hasFocus(element: HTMLElement): boolean
|
|
1026
1083
|
|
|
1027
1084
|
/**
|
|
1085
|
+
* Typographic headings.
|
|
1086
|
+
*
|
|
1028
1087
|
* @public
|
|
1029
1088
|
*/
|
|
1030
|
-
export declare
|
|
1089
|
+
export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
|
|
1090
|
+
props: HeadingProps<E>,
|
|
1091
|
+
): React.JSX.Element
|
|
1031
1092
|
|
|
1032
|
-
/**
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
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
|
|
1036
1105
|
|
|
1037
|
-
/**
|
|
1038
|
-
|
|
1039
|
-
*/
|
|
1040
|
-
export declare type GridItemRow = 'auto' | 'full' | number
|
|
1106
|
+
/** @public */
|
|
1107
|
+
export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
|
|
1041
1108
|
|
|
1042
|
-
/**
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1109
|
+
/** @public */
|
|
1110
|
+
export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
|
|
1111
|
+
HeadingOwnProps,
|
|
1112
|
+
E
|
|
1113
|
+
>
|
|
1046
1114
|
|
|
1047
1115
|
/**
|
|
1048
|
-
*
|
|
1049
|
-
|
|
1050
|
-
export declare type GridItemRowStart = 'auto' | number
|
|
1051
|
-
|
|
1052
|
-
/**
|
|
1053
|
-
* @public
|
|
1054
|
-
*/
|
|
1055
|
-
export declare interface GridProps extends Omit<BoxProps, 'display'>, ResponsiveGridProps {}
|
|
1056
|
-
|
|
1057
|
-
/**
|
|
1058
|
-
* @internal
|
|
1116
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1117
|
+
* @beta
|
|
1059
1118
|
*/
|
|
1060
|
-
export declare function
|
|
1119
|
+
export declare function HeadingSkeleton<
|
|
1120
|
+
E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
|
|
1121
|
+
>(props: HeadingSkeletonProps<E>): React.JSX.Element
|
|
1061
1122
|
|
|
1062
|
-
/**
|
|
1063
|
-
|
|
1064
|
-
*
|
|
1065
|
-
* @public
|
|
1066
|
-
*/
|
|
1067
|
-
export declare const Heading: ForwardRefExoticComponent<
|
|
1068
|
-
Omit<HeadingProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> &
|
|
1069
|
-
RefAttributes<HTMLElement>
|
|
1070
|
-
>
|
|
1123
|
+
/** @beta */
|
|
1124
|
+
export declare type HeadingSkeletonElementType = SkeletonElementType
|
|
1071
1125
|
|
|
1072
|
-
/**
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
export declare interface HeadingProps {
|
|
1076
|
-
accent?: boolean
|
|
1077
|
-
align?: TextAlign | TextAlign[]
|
|
1078
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1079
|
-
muted?: boolean
|
|
1080
|
-
size?: number | number[]
|
|
1081
|
-
/**
|
|
1082
|
-
* Controls how overflowing text is treated.
|
|
1083
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
1084
|
-
* @beta
|
|
1085
|
-
*/
|
|
1086
|
-
textOverflow?: 'ellipsis'
|
|
1087
|
-
weight?: ThemeFontWeightKey_2
|
|
1126
|
+
/** @beta */
|
|
1127
|
+
export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
|
|
1128
|
+
size?: ResponsiveProp<FontHeadingSize>
|
|
1088
1129
|
}
|
|
1089
1130
|
|
|
1090
1131
|
/**
|
|
1091
1132
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1092
1133
|
* @beta
|
|
1093
1134
|
*/
|
|
1094
|
-
export declare
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
'ref'
|
|
1098
|
-
> &
|
|
1099
|
-
RefAttributes<HTMLDivElement>
|
|
1100
|
-
>
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1104
|
-
* @beta
|
|
1105
|
-
*/
|
|
1106
|
-
export declare interface HeadingSkeletonProps extends SkeletonProps {
|
|
1107
|
-
size?: number | number[]
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* @public
|
|
1112
|
-
* @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
|
|
1113
|
-
*/
|
|
1114
|
-
export declare const hexToRgb: typeof hexToRgb_2
|
|
1135
|
+
export declare type HeadingSkeletonProps<
|
|
1136
|
+
E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
|
|
1137
|
+
> = Props<HeadingSkeletonOwnProps, E>
|
|
1115
1138
|
|
|
1116
1139
|
/**
|
|
1117
1140
|
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
1118
1141
|
*
|
|
1119
1142
|
* @public
|
|
1120
1143
|
*/
|
|
1121
|
-
export declare
|
|
1122
|
-
HotkeysProps
|
|
1123
|
-
|
|
1144
|
+
export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
|
|
1145
|
+
props: HotkeysProps<E>,
|
|
1146
|
+
): React.JSX.Element | undefined
|
|
1124
1147
|
|
|
1125
|
-
/**
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
space?: number | number[]
|
|
1148
|
+
/** @public */
|
|
1149
|
+
export declare type HotkeysElementType = 'kbd' | ComponentType
|
|
1150
|
+
|
|
1151
|
+
/** @public */
|
|
1152
|
+
export declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
|
|
1153
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
1154
|
+
padding?: ResponsiveProp<Space>
|
|
1133
1155
|
keys?: string[]
|
|
1134
1156
|
}
|
|
1135
1157
|
|
|
1136
|
-
/**
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* @public
|
|
1144
|
-
* @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
|
|
1145
|
-
*/
|
|
1146
|
-
export declare const hslToRgb: typeof hslToRgb_2
|
|
1158
|
+
/** @public */
|
|
1159
|
+
export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
|
|
1160
|
+
HotkeysOwnProps,
|
|
1161
|
+
E
|
|
1162
|
+
>
|
|
1147
1163
|
|
|
1148
1164
|
/**
|
|
1149
1165
|
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
1150
1166
|
*
|
|
1151
1167
|
* @public
|
|
1152
1168
|
*/
|
|
1153
|
-
export declare
|
|
1154
|
-
|
|
1169
|
+
export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
|
|
1170
|
+
props: InlineProps<E>,
|
|
1171
|
+
): React.JSX.Element
|
|
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'
|
|
1155
1194
|
>
|
|
1156
1195
|
|
|
1157
|
-
/**
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
space?: number | number[]
|
|
1163
|
-
}
|
|
1196
|
+
/** @public */
|
|
1197
|
+
export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
|
|
1198
|
+
InlineOwnProps,
|
|
1199
|
+
E
|
|
1200
|
+
>
|
|
1164
1201
|
|
|
1165
1202
|
/**
|
|
1166
1203
|
* @internal
|
|
@@ -1212,74 +1249,83 @@ export declare function _isScrollable(el: Node): boolean
|
|
|
1212
1249
|
*
|
|
1213
1250
|
* @public
|
|
1214
1251
|
*/
|
|
1215
|
-
export declare
|
|
1216
|
-
KBDProps
|
|
1217
|
-
|
|
1252
|
+
export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
|
|
1253
|
+
props: KBDProps<E>,
|
|
1254
|
+
): React.JSX.Element
|
|
1218
1255
|
|
|
1219
|
-
/**
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
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>
|
|
1228
1267
|
|
|
1229
1268
|
/**
|
|
1230
1269
|
* Typographic labels.
|
|
1231
1270
|
*
|
|
1232
1271
|
* @public
|
|
1233
1272
|
*/
|
|
1234
|
-
export declare
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
>
|
|
1273
|
+
export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
|
|
1274
|
+
props: LabelProps<E>,
|
|
1275
|
+
): React.JSX.Element
|
|
1238
1276
|
|
|
1239
|
-
/**
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
textOverflow?: 'ellipsis'
|
|
1254
|
-
weight?: ThemeFontWeightKey_2
|
|
1255
|
-
}
|
|
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
|
|
1256
1291
|
|
|
1257
|
-
/**
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
*/
|
|
1261
|
-
export declare
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
'ref'
|
|
1265
|
-
> &
|
|
1266
|
-
RefAttributes<HTMLDivElement>
|
|
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
|
|
1267
1299
|
>
|
|
1268
1300
|
|
|
1269
1301
|
/**
|
|
1270
1302
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1271
1303
|
* @beta
|
|
1272
1304
|
*/
|
|
1273
|
-
export declare
|
|
1274
|
-
|
|
1305
|
+
export declare function LabelSkeleton<
|
|
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>
|
|
1275
1315
|
}
|
|
1276
1316
|
|
|
1277
1317
|
/**
|
|
1278
|
-
*
|
|
1318
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1319
|
+
* @beta
|
|
1279
1320
|
*/
|
|
1280
|
-
export declare
|
|
1281
|
-
|
|
1282
|
-
>
|
|
1321
|
+
export declare type LabelSkeletonProps<
|
|
1322
|
+
E extends LabelSkeletonElementType = LabelSkeletonElementType,
|
|
1323
|
+
> = Props<LabelSkeletonOwnProps, E>
|
|
1324
|
+
|
|
1325
|
+
/** @public */
|
|
1326
|
+
export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
|
|
1327
|
+
props: LayerProps<E>,
|
|
1328
|
+
): React.JSX.Element
|
|
1283
1329
|
|
|
1284
1330
|
/** @public */
|
|
1285
1331
|
export declare interface LayerContextValue {
|
|
@@ -1291,40 +1337,29 @@ export declare interface LayerContextValue {
|
|
|
1291
1337
|
zIndex: number
|
|
1292
1338
|
}
|
|
1293
1339
|
|
|
1294
|
-
/**
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1340
|
+
/** @public */
|
|
1341
|
+
export declare type LayerElementType = CardElementType
|
|
1342
|
+
|
|
1343
|
+
/** @public */
|
|
1344
|
+
export declare type LayerOwnProps = CardOwnProps & {
|
|
1299
1345
|
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1300
1346
|
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1301
|
-
zOffset?: number
|
|
1347
|
+
zOffset?: ResponsiveProp<number>
|
|
1302
1348
|
}
|
|
1303
1349
|
|
|
1304
|
-
/**
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1350
|
+
/** @public */
|
|
1351
|
+
export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
|
|
1352
|
+
LayerOwnProps,
|
|
1353
|
+
E
|
|
1354
|
+
>
|
|
1308
1355
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1356
|
+
/** @public */
|
|
1357
|
+
export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
|
|
1312
1358
|
|
|
1313
|
-
/**
|
|
1314
|
-
* @public
|
|
1315
|
-
*/
|
|
1359
|
+
/** @public */
|
|
1316
1360
|
export declare interface LayerProviderProps {
|
|
1317
|
-
children?:
|
|
1318
|
-
zOffset?: number
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
/**
|
|
1322
|
-
* DO NOT USE IN PRODUCTION.
|
|
1323
|
-
* @beta
|
|
1324
|
-
*/
|
|
1325
|
-
export declare interface MediaQueryProps {
|
|
1326
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1327
|
-
media?: number[]
|
|
1361
|
+
children?: ReactNode
|
|
1362
|
+
zOffset?: ResponsiveProp<number>
|
|
1328
1363
|
}
|
|
1329
1364
|
|
|
1330
1365
|
/**
|
|
@@ -1332,7 +1367,7 @@ export declare interface MediaQueryProps {
|
|
|
1332
1367
|
*/
|
|
1333
1368
|
export declare interface _MediaStore {
|
|
1334
1369
|
subscribe: (onStoreChange: () => void) => () => void
|
|
1335
|
-
getSnapshot: () =>
|
|
1370
|
+
getSnapshot: () => Breakpoint
|
|
1336
1371
|
}
|
|
1337
1372
|
|
|
1338
1373
|
/**
|
|
@@ -1340,91 +1375,66 @@ export declare interface _MediaStore {
|
|
|
1340
1375
|
*
|
|
1341
1376
|
* @public
|
|
1342
1377
|
*/
|
|
1343
|
-
export declare
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
>
|
|
1378
|
+
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
1379
|
+
props: MenuProps<E>,
|
|
1380
|
+
): React.JSX.Element
|
|
1347
1381
|
|
|
1348
1382
|
/**
|
|
1349
1383
|
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1350
1384
|
*
|
|
1351
1385
|
* @public
|
|
1352
1386
|
*/
|
|
1353
|
-
export declare
|
|
1354
|
-
MenuButtonProps & RefAttributes<HTMLButtonElement | null>
|
|
1355
|
-
>
|
|
1387
|
+
export declare function MenuButton(props: MenuButtonProps): React.JSX.Element
|
|
1356
1388
|
|
|
1357
|
-
/**
|
|
1358
|
-
|
|
1359
|
-
*/
|
|
1360
|
-
export declare interface MenuButtonProps {
|
|
1389
|
+
/** @public */
|
|
1390
|
+
export declare type MenuButtonProps = {
|
|
1361
1391
|
/**
|
|
1362
1392
|
* @beta Do not use in production.
|
|
1363
1393
|
*/
|
|
1364
1394
|
__unstable_disableRestoreFocusOnClose?: boolean
|
|
1365
|
-
|
|
1366
|
-
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1367
|
-
*/
|
|
1368
|
-
boundaryElement?: HTMLElement
|
|
1369
|
-
button: React.JSX.Element
|
|
1395
|
+
button: ReactElement<ButtonProps>
|
|
1370
1396
|
id: string
|
|
1371
|
-
menu?:
|
|
1397
|
+
menu?: ReactElement
|
|
1372
1398
|
onClose?: () => void
|
|
1373
1399
|
onOpen?: () => void
|
|
1374
|
-
/**
|
|
1375
|
-
* @deprecated Use `popover={{placement: 'top'}}` instead.
|
|
1376
|
-
*/
|
|
1377
|
-
placement?: Placement
|
|
1378
1400
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1379
|
-
|
|
1380
|
-
* @deprecated Use `popover={{scheme: 'dark'}}` instead.
|
|
1381
|
-
*/
|
|
1382
|
-
popoverScheme?: ThemeColorSchemeKey_2
|
|
1383
|
-
/**
|
|
1384
|
-
* @deprecated Use `popover={{radius: 2}}` instead.
|
|
1385
|
-
*/
|
|
1386
|
-
popoverRadius?: Radius | Radius[]
|
|
1387
|
-
/**
|
|
1388
|
-
* @beta Do not use in production.
|
|
1389
|
-
* @deprecated Use `popover={{portal: true}}` instead.
|
|
1390
|
-
*/
|
|
1391
|
-
portal?: boolean
|
|
1392
|
-
/**
|
|
1393
|
-
* @deprecated Use `popover={{preventOverflow: true}}` instead.
|
|
1394
|
-
*/
|
|
1395
|
-
preventOverflow?: boolean
|
|
1401
|
+
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
1396
1402
|
}
|
|
1397
1403
|
|
|
1398
|
-
/**
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
'web',
|
|
1403
|
-
FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLHRElement>, HTMLHRElement>, never>
|
|
1404
|
-
> &
|
|
1405
|
-
string
|
|
1404
|
+
/** @public */
|
|
1405
|
+
export declare function MenuDivider<
|
|
1406
|
+
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1407
|
+
>(props: MenuDividerProps<E>): React.JSX.Element
|
|
1406
1408
|
|
|
1407
|
-
/**
|
|
1408
|
-
|
|
1409
|
-
*/
|
|
1410
|
-
export declare function MenuGroup(
|
|
1411
|
-
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
1412
|
-
MenuGroupProps,
|
|
1413
|
-
): React.JSX.Element
|
|
1409
|
+
/** @public */
|
|
1410
|
+
export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
1414
1411
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
}
|
|
1412
|
+
/** @public */
|
|
1413
|
+
export declare type MenuDividerOwnProps = {}
|
|
1418
1414
|
|
|
1419
|
-
/**
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
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
|
|
1426
1436
|
menu?: Omit<
|
|
1427
|
-
MenuProps
|
|
1437
|
+
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1428
1438
|
| 'onClickOutside'
|
|
1429
1439
|
| 'onEscape'
|
|
1430
1440
|
| 'onItemClick'
|
|
@@ -1434,51 +1444,50 @@ export declare interface MenuGroupProps {
|
|
|
1434
1444
|
| 'shouldFocus'
|
|
1435
1445
|
| 'onBlurCapture'
|
|
1436
1446
|
>
|
|
1437
|
-
padding?:
|
|
1447
|
+
padding?: ResponsiveProp<Space>
|
|
1438
1448
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
text: React.ReactNode
|
|
1442
|
-
tone?: SelectableTone
|
|
1449
|
+
text?: ReactNode
|
|
1450
|
+
tone?: ElementTone
|
|
1443
1451
|
}
|
|
1444
1452
|
|
|
1445
|
-
/**
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
MenuItemProps &
|
|
1450
|
-
Omit<HTMLProps<HTMLDivElement>, 'selected' | 'height' | 'ref' | 'tabIndex' | 'as'> &
|
|
1451
|
-
RefAttributes<HTMLDivElement>
|
|
1453
|
+
/** @public */
|
|
1454
|
+
export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
|
|
1455
|
+
MenuGroupOwnProps,
|
|
1456
|
+
E
|
|
1452
1457
|
>
|
|
1453
1458
|
|
|
1454
|
-
/**
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1459
|
-
fontSize?: number | number[]
|
|
1460
|
-
hotkeys?: string[]
|
|
1461
|
-
icon?: React.ElementType | React.ReactNode
|
|
1462
|
-
iconRight?: React.ElementType | React.ReactNode
|
|
1463
|
-
pressed?: boolean
|
|
1464
|
-
selected?: boolean
|
|
1465
|
-
space?: number | number[]
|
|
1466
|
-
text?: React.ReactNode
|
|
1467
|
-
tone?: SelectableTone
|
|
1468
|
-
}
|
|
1459
|
+
/** @public */
|
|
1460
|
+
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
1461
|
+
props: MenuItemProps<E>,
|
|
1462
|
+
): React.JSX.Element
|
|
1469
1463
|
|
|
1470
|
-
/**
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
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>
|
|
1482
1491
|
'onClickOutside'?: (event: MouseEvent) => void
|
|
1483
1492
|
'onEscape'?: () => void
|
|
1484
1493
|
'onItemClick'?: () => void
|
|
@@ -1486,24 +1495,11 @@ export declare interface MenuProps extends ResponsivePaddingProps {
|
|
|
1486
1495
|
'originElement'?: HTMLElement | null
|
|
1487
1496
|
'registerElement'?: (el: HTMLElement) => () => void
|
|
1488
1497
|
'shouldFocus'?: 'first' | 'last' | null
|
|
1489
|
-
'space'?: number | number[]
|
|
1490
1498
|
'aria-labelledby'?: string
|
|
1491
|
-
'onBlurCapture'?: (event: FocusEvent) => void
|
|
1492
1499
|
}
|
|
1493
1500
|
|
|
1494
|
-
/**
|
|
1495
|
-
|
|
1496
|
-
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
1497
|
-
*/
|
|
1498
|
-
export declare const multiply: typeof multiply_2
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* @public
|
|
1502
|
-
* @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
|
|
1503
|
-
*/
|
|
1504
|
-
export declare const parseColor: typeof parseColor_2
|
|
1505
|
-
|
|
1506
|
-
export {PartialThemeColorBuilderOpts}
|
|
1501
|
+
/** @public */
|
|
1502
|
+
export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
|
|
1507
1503
|
|
|
1508
1504
|
/**
|
|
1509
1505
|
* Placement of floating UI elements.
|
|
@@ -1529,13 +1525,12 @@ export declare type Placement =
|
|
|
1529
1525
|
*
|
|
1530
1526
|
* @public
|
|
1531
1527
|
*/
|
|
1532
|
-
export declare
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
>
|
|
1528
|
+
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
1529
|
+
props: PopoverProps<E>,
|
|
1530
|
+
): React.JSX.Element
|
|
1531
|
+
|
|
1532
|
+
/** @public */
|
|
1533
|
+
export declare type PopoverElementType = 'div' | ComponentType
|
|
1539
1534
|
|
|
1540
1535
|
/**
|
|
1541
1536
|
* @beta
|
|
@@ -1543,10 +1538,7 @@ export declare const Popover: NamedExoticComponent<
|
|
|
1543
1538
|
export declare type PopoverMargins = [number, number, number, number]
|
|
1544
1539
|
|
|
1545
1540
|
/** @public */
|
|
1546
|
-
export declare
|
|
1547
|
-
extends Omit<LayerProps, 'as'>,
|
|
1548
|
-
ResponsiveRadiusProps,
|
|
1549
|
-
ResponsiveShadowProps {
|
|
1541
|
+
export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
|
|
1550
1542
|
/** @beta */
|
|
1551
1543
|
__unstable_margins?: PopoverMargins
|
|
1552
1544
|
/**
|
|
@@ -1557,22 +1549,22 @@ export declare interface PopoverProps
|
|
|
1557
1549
|
*/
|
|
1558
1550
|
animate?: boolean
|
|
1559
1551
|
arrow?: boolean
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1552
|
+
children?: ReactElement<{
|
|
1553
|
+
ref: ForwardedRef<HTMLElement>
|
|
1554
|
+
}>
|
|
1563
1555
|
/**
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
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
|
+
*/
|
|
1574
1566
|
constrainSize?: boolean
|
|
1575
|
-
content?:
|
|
1567
|
+
content?: ReactNode
|
|
1576
1568
|
disabled?: boolean
|
|
1577
1569
|
fallbackPlacements?: Placement[]
|
|
1578
1570
|
floatingBoundary?: HTMLElement | null
|
|
@@ -1593,8 +1585,6 @@ export declare interface PopoverProps
|
|
|
1593
1585
|
*/
|
|
1594
1586
|
modal?: boolean
|
|
1595
1587
|
open?: boolean
|
|
1596
|
-
overflow?: BoxOverflow
|
|
1597
|
-
padding?: number | number[]
|
|
1598
1588
|
placement?: Placement
|
|
1599
1589
|
/**
|
|
1600
1590
|
* When 'flip' (default), the placement is determined from the initial placement and the
|
|
@@ -1615,33 +1605,27 @@ export declare interface PopoverProps
|
|
|
1615
1605
|
* The children of the popover won't be rendered.
|
|
1616
1606
|
*/
|
|
1617
1607
|
referenceElement?: HTMLElement | null
|
|
1618
|
-
scheme?: ThemeColorSchemeKey_2
|
|
1619
|
-
tone?: CardTone
|
|
1620
1608
|
/** @beta */
|
|
1621
|
-
updateRef?:
|
|
1622
|
-
|
|
1623
|
-
| RefCallback<PopoverUpdateCallback | undefined>
|
|
1624
|
-
width?: PopoverWidth | PopoverWidth[]
|
|
1609
|
+
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1610
|
+
width?: ResponsiveProp<MaxWidth>
|
|
1625
1611
|
}
|
|
1626
1612
|
|
|
1613
|
+
/** @public */
|
|
1614
|
+
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1615
|
+
PopoverOwnProps,
|
|
1616
|
+
E
|
|
1617
|
+
>
|
|
1618
|
+
|
|
1627
1619
|
/** @beta */
|
|
1628
1620
|
export declare type PopoverUpdateCallback = () => void
|
|
1629
1621
|
|
|
1630
1622
|
/** @public */
|
|
1631
|
-
export declare type PopoverWidth =
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* @public
|
|
1635
|
-
*/
|
|
1636
|
-
export declare function Portal(props: PortalProps): React.ReactPortal | null
|
|
1623
|
+
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
1637
1624
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
}
|
|
1625
|
+
/** @public */
|
|
1626
|
+
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
1641
1627
|
|
|
1642
|
-
/**
|
|
1643
|
-
* @public
|
|
1644
|
-
*/
|
|
1628
|
+
/** @public */
|
|
1645
1629
|
export declare interface PortalContextValue {
|
|
1646
1630
|
version: 0.0
|
|
1647
1631
|
boundaryElement: HTMLElement | null
|
|
@@ -1649,35 +1633,21 @@ export declare interface PortalContextValue {
|
|
|
1649
1633
|
elements?: Record<string, HTMLElement | null | undefined>
|
|
1650
1634
|
}
|
|
1651
1635
|
|
|
1652
|
-
/**
|
|
1653
|
-
* @public
|
|
1654
|
-
*/
|
|
1636
|
+
/** @public */
|
|
1655
1637
|
export declare interface PortalProps {
|
|
1656
|
-
children:
|
|
1638
|
+
children: ReactNode
|
|
1657
1639
|
/**
|
|
1658
1640
|
* @beta This API might change. DO NOT USE IN PRODUCTION.
|
|
1659
1641
|
*/
|
|
1660
1642
|
__unstable_name?: string
|
|
1661
1643
|
}
|
|
1662
1644
|
|
|
1663
|
-
/**
|
|
1664
|
-
* @public
|
|
1665
|
-
*/
|
|
1645
|
+
/** @public */
|
|
1666
1646
|
export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
|
|
1667
1647
|
|
|
1668
|
-
|
|
1669
|
-
var displayName: string
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* @public
|
|
1674
|
-
*/
|
|
1648
|
+
/** @public */
|
|
1675
1649
|
export declare interface PortalProviderProps {
|
|
1676
|
-
|
|
1677
|
-
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
1678
|
-
*/
|
|
1679
|
-
boundaryElement?: HTMLElement | null
|
|
1680
|
-
children: React.ReactNode
|
|
1650
|
+
children: ReactNode
|
|
1681
1651
|
element?: HTMLElement | null
|
|
1682
1652
|
/**
|
|
1683
1653
|
* @beta
|
|
@@ -1685,27 +1655,36 @@ export declare interface PortalProviderProps {
|
|
|
1685
1655
|
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
1686
1656
|
}
|
|
1687
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
|
+
|
|
1688
1666
|
/**
|
|
1689
1667
|
* The `Radio` component allows the user to select one option from a set.
|
|
1690
1668
|
*
|
|
1691
1669
|
* @public
|
|
1692
1670
|
*/
|
|
1693
|
-
export declare
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
>
|
|
1671
|
+
export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
|
|
1672
|
+
props: RadioProps<E>,
|
|
1673
|
+
): React.JSX.Element
|
|
1697
1674
|
|
|
1698
|
-
/**
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1675
|
+
/** @public */
|
|
1676
|
+
export declare type RadioElementType = 'input' | ComponentType
|
|
1677
|
+
|
|
1678
|
+
/** @public */
|
|
1679
|
+
export declare type RadioOwnProps = {
|
|
1702
1680
|
customValidity?: string
|
|
1703
1681
|
}
|
|
1704
1682
|
|
|
1705
|
-
/**
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1683
|
+
/** @public */
|
|
1684
|
+
export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
|
|
1685
|
+
RadioOwnProps,
|
|
1686
|
+
E
|
|
1687
|
+
>
|
|
1709
1688
|
|
|
1710
1689
|
/**
|
|
1711
1690
|
* @internal
|
|
@@ -1717,11 +1696,6 @@ export declare function _raf(fn: () => void): () => void
|
|
|
1717
1696
|
*/
|
|
1718
1697
|
export declare function _raf2(fn: () => void): () => void
|
|
1719
1698
|
|
|
1720
|
-
/**
|
|
1721
|
-
* @public
|
|
1722
|
-
*/
|
|
1723
|
-
export declare function rem(pixelValue: number): string | 0
|
|
1724
|
-
|
|
1725
1699
|
/**
|
|
1726
1700
|
* @internal
|
|
1727
1701
|
*/
|
|
@@ -1730,348 +1704,189 @@ export declare const _ResizeObserver: typeof ResizeObserver
|
|
|
1730
1704
|
/**
|
|
1731
1705
|
* @internal
|
|
1732
1706
|
*/
|
|
1733
|
-
export declare
|
|
1734
|
-
|
|
1735
|
-
values: T[],
|
|
1736
|
-
callback: (value: T, index: number, array: T[]) => CSSObject,
|
|
1737
|
-
): CSSObject[]
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* @internal
|
|
1741
|
-
*/
|
|
1742
|
-
export declare interface ResponsiveAvatarSizeStyleProps {
|
|
1743
|
-
$size: AvatarSize[]
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
/**
|
|
1747
|
-
* @public
|
|
1748
|
-
*/
|
|
1749
|
-
export declare interface ResponsiveBorderProps {
|
|
1750
|
-
border?: boolean | boolean[]
|
|
1751
|
-
borderTop?: boolean | boolean[]
|
|
1752
|
-
borderRight?: boolean | boolean[]
|
|
1753
|
-
borderBottom?: boolean | boolean[]
|
|
1754
|
-
borderLeft?: boolean | boolean[]
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
/**
|
|
1758
|
-
* @public
|
|
1759
|
-
*/
|
|
1760
|
-
export declare interface ResponsiveBoxProps {
|
|
1761
|
-
display?: BoxDisplay | BoxDisplay[]
|
|
1762
|
-
height?: BoxHeight | BoxHeight[]
|
|
1763
|
-
overflow?: BoxOverflow | BoxOverflow[]
|
|
1764
|
-
sizing?: BoxSizing | BoxSizing[]
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* Get responsive CSS for the `code` font style.
|
|
1769
|
-
* @internal
|
|
1770
|
-
*/
|
|
1771
|
-
export declare function responsiveCodeFontStyle(
|
|
1772
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1773
|
-
): CSSObject[]
|
|
1774
|
-
|
|
1775
|
-
/**
|
|
1776
|
-
* @public
|
|
1777
|
-
*/
|
|
1778
|
-
export declare interface ResponsiveFlexItemProps {
|
|
1779
|
-
/** Sets the flex CSS attribute. The property is responsive. */
|
|
1780
|
-
flex?: FlexValue | FlexValue[]
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
/**
|
|
1784
|
-
* @public
|
|
1785
|
-
*/
|
|
1786
|
-
export declare interface ResponsiveFlexProps {
|
|
1787
|
-
align?: FlexAlign | FlexAlign[]
|
|
1788
|
-
direction?: FlexDirection | FlexDirection[]
|
|
1789
|
-
justify?: FlexJustify | FlexJustify[]
|
|
1790
|
-
wrap?: FlexWrap | FlexWrap[]
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
/**
|
|
1794
|
-
* @internal
|
|
1795
|
-
*/
|
|
1796
|
-
export declare interface ResponsiveFontSizeStyleProps {
|
|
1797
|
-
$size: number[]
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
/**
|
|
1801
|
-
* @internal
|
|
1802
|
-
*/
|
|
1803
|
-
export declare interface ResponsiveFontStyleProps
|
|
1804
|
-
extends FontWeightStyleProps,
|
|
1805
|
-
ResponsiveFontSizeStyleProps,
|
|
1806
|
-
ResponsiveTextAlignStyleProps {
|
|
1807
|
-
$accent?: boolean
|
|
1808
|
-
$muted?: boolean
|
|
1707
|
+
export declare interface ResponsiveWidthStyleProps {
|
|
1708
|
+
$width: (number | 'auto')[]
|
|
1809
1709
|
}
|
|
1810
1710
|
|
|
1811
1711
|
/**
|
|
1712
|
+
* The `Root` component.
|
|
1713
|
+
*
|
|
1812
1714
|
* @public
|
|
1813
1715
|
*/
|
|
1814
|
-
export declare
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
columnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
|
|
1818
|
-
row?: GridItemRow | GridItemRow[]
|
|
1819
|
-
rowStart?: GridItemRowStart | GridItemRowStart[]
|
|
1820
|
-
rowEnd?: GridItemRowEnd | GridItemRowEnd[]
|
|
1821
|
-
}
|
|
1716
|
+
export declare function Root<E extends RootElementType = typeof DEFAULT_ROOT_ELEMENT>(
|
|
1717
|
+
props: RootProps<E>,
|
|
1718
|
+
): React.JSX.Element
|
|
1822
1719
|
|
|
1823
|
-
/**
|
|
1824
|
-
|
|
1825
|
-
*/
|
|
1826
|
-
export declare interface ResponsiveGridProps {
|
|
1827
|
-
autoRows?: GridAutoRows | GridAutoRows[]
|
|
1828
|
-
autoCols?: GridAutoCols | GridAutoCols[]
|
|
1829
|
-
autoFlow?: GridAutoFlow | GridAutoFlow[]
|
|
1830
|
-
columns?: number | number[]
|
|
1831
|
-
gap?: number | number[]
|
|
1832
|
-
gapX?: number | number[]
|
|
1833
|
-
gapY?: number | number[]
|
|
1834
|
-
rows?: number | number[]
|
|
1835
|
-
}
|
|
1720
|
+
/** @public */
|
|
1721
|
+
export declare type RootElementType = 'html' | 'body' | 'div'
|
|
1836
1722
|
|
|
1837
|
-
/**
|
|
1838
|
-
|
|
1839
|
-
* @internal
|
|
1840
|
-
*/
|
|
1841
|
-
export declare function responsiveHeadingFont(
|
|
1842
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1843
|
-
): CSSObject[]
|
|
1723
|
+
/** @public */
|
|
1724
|
+
export declare interface RootOwnProps extends BoxOwnProps, RootStyleProps {}
|
|
1844
1725
|
|
|
1845
|
-
/**
|
|
1846
|
-
|
|
1847
|
-
* @internal
|
|
1848
|
-
*/
|
|
1849
|
-
export declare function responsiveLabelFont(
|
|
1850
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1851
|
-
): CSSObject[]
|
|
1726
|
+
/** @public */
|
|
1727
|
+
export declare type RootProps<E extends RootElementType = RootElementType> = Props<RootOwnProps, E>
|
|
1852
1728
|
|
|
1853
|
-
/**
|
|
1854
|
-
|
|
1855
|
-
*/
|
|
1856
|
-
export declare interface ResponsiveMarginProps {
|
|
1857
|
-
/** Applies margins to all sides. The property is responsive. */
|
|
1858
|
-
margin?: number | number[]
|
|
1859
|
-
/** Applies margins to the left and right sides. The property is responsive. */
|
|
1860
|
-
marginX?: number | number[]
|
|
1861
|
-
/** Applies margins to the top and bottom sides. The property is responsive. */
|
|
1862
|
-
marginY?: number | number[]
|
|
1863
|
-
marginTop?: number | number[]
|
|
1864
|
-
marginRight?: number | number[]
|
|
1865
|
-
marginBottom?: number | number[]
|
|
1866
|
-
marginLeft?: number | number[]
|
|
1867
|
-
}
|
|
1729
|
+
/** @public */
|
|
1730
|
+
export declare function RootProvider(props: RootProviderProps): React.JSX.Element
|
|
1868
1731
|
|
|
1869
|
-
/**
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
paddingTop?: number | number[]
|
|
1877
|
-
paddingRight?: number | number[]
|
|
1878
|
-
paddingBottom?: number | number[]
|
|
1879
|
-
paddingLeft?: number | number[]
|
|
1732
|
+
/** @public */
|
|
1733
|
+
export declare interface RootProviderProps {
|
|
1734
|
+
boundaryElement?: HTMLElement | null
|
|
1735
|
+
children?: ReactNode
|
|
1736
|
+
portalElement?: HTMLElement | null
|
|
1737
|
+
scheme?: ColorScheme
|
|
1738
|
+
tone?: CardTone
|
|
1880
1739
|
}
|
|
1881
1740
|
|
|
1882
1741
|
/**
|
|
1742
|
+
* The `Select` component provides control of options.
|
|
1743
|
+
*
|
|
1883
1744
|
* @public
|
|
1884
1745
|
*/
|
|
1885
|
-
export declare
|
|
1886
|
-
|
|
1887
|
-
|
|
1746
|
+
export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
|
|
1747
|
+
props: SelectProps<E>,
|
|
1748
|
+
): React.JSX.Element
|
|
1888
1749
|
|
|
1889
|
-
/**
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
shadow?: number | number[]
|
|
1894
|
-
}
|
|
1750
|
+
/** @internal */
|
|
1751
|
+
export declare function Selectable<
|
|
1752
|
+
E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
|
|
1753
|
+
>(props: SelectableProps<E>): React.JSX.Element
|
|
1895
1754
|
|
|
1896
|
-
/**
|
|
1897
|
-
|
|
1898
|
-
* @internal
|
|
1899
|
-
*/
|
|
1900
|
-
export declare function responsiveTextAlignStyle(
|
|
1901
|
-
props: ResponsiveTextAlignStyleProps & ThemeProps,
|
|
1902
|
-
): CSSObject[]
|
|
1755
|
+
/** @internal */
|
|
1756
|
+
export declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1903
1757
|
|
|
1904
|
-
/**
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
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
|
+
}
|
|
1910
1767
|
|
|
1911
|
-
/**
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
*/
|
|
1915
|
-
export declare function responsiveTextFont(
|
|
1916
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1917
|
-
): CSSObject[]
|
|
1768
|
+
/** @internal */
|
|
1769
|
+
export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
|
|
1770
|
+
Props<SelectableOwnProps, E>
|
|
1918
1771
|
|
|
1919
|
-
/**
|
|
1920
|
-
|
|
1921
|
-
*/
|
|
1922
|
-
export declare interface ResponsiveWidthProps {
|
|
1923
|
-
width?: number | 'auto' | (number | 'auto')[]
|
|
1924
|
-
}
|
|
1772
|
+
/** @public */
|
|
1773
|
+
export declare type SelectElementType = 'select' | ComponentType
|
|
1925
1774
|
|
|
1926
|
-
/**
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
$width: (number | 'auto')[]
|
|
1775
|
+
/** @public */
|
|
1776
|
+
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1777
|
+
customValidity?: string
|
|
1778
|
+
readOnly?: boolean
|
|
1931
1779
|
}
|
|
1932
1780
|
|
|
1933
|
-
/**
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
export declare type RGB = RGB_2
|
|
1938
|
-
|
|
1939
|
-
/**
|
|
1940
|
-
* @public
|
|
1941
|
-
* @deprecated Use `rgba` from `@sanity/ui/theme` instead.
|
|
1942
|
-
*/
|
|
1943
|
-
export declare const rgba: typeof rgba_2
|
|
1944
|
-
|
|
1945
|
-
/**
|
|
1946
|
-
* @public
|
|
1947
|
-
* @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
|
|
1948
|
-
*/
|
|
1949
|
-
export declare const rgbToHex: typeof rgbToHex_2
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
* @public
|
|
1953
|
-
* @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
|
|
1954
|
-
*/
|
|
1955
|
-
export declare const rgbToHsl: typeof rgbToHsl_2
|
|
1956
|
-
|
|
1957
|
-
/**
|
|
1958
|
-
* @public
|
|
1959
|
-
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
1960
|
-
*/
|
|
1961
|
-
export declare type RootTheme = RootTheme_2
|
|
1962
|
-
|
|
1963
|
-
/**
|
|
1964
|
-
* @public
|
|
1965
|
-
* @deprecated Use `screen` from `@sanity/ui/theme` instead.
|
|
1966
|
-
*/
|
|
1967
|
-
declare const screen_2: typeof screen_3
|
|
1968
|
-
export {screen_2 as screen}
|
|
1969
|
-
|
|
1970
|
-
/**
|
|
1971
|
-
* The `Select` component provides control of options.
|
|
1972
|
-
*
|
|
1973
|
-
* @public
|
|
1974
|
-
*/
|
|
1975
|
-
export declare const Select: ForwardRefExoticComponent<
|
|
1976
|
-
Omit<SelectProps & Omit<HTMLProps<HTMLSelectElement>, 'as'>, 'ref'> &
|
|
1977
|
-
RefAttributes<HTMLSelectElement>
|
|
1781
|
+
/** @public */
|
|
1782
|
+
export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
|
|
1783
|
+
SelectOwnProps,
|
|
1784
|
+
E
|
|
1978
1785
|
>
|
|
1979
1786
|
|
|
1980
|
-
/**
|
|
1981
|
-
* @public
|
|
1982
|
-
*/
|
|
1983
|
-
export declare type SelectableTone = ThemeColorStateToneKey
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* @public
|
|
1987
|
-
*/
|
|
1988
|
-
export declare interface SelectProps {
|
|
1989
|
-
fontSize?: number | number[]
|
|
1990
|
-
padding?: number | number[]
|
|
1991
|
-
radius?: Radius | Radius[]
|
|
1992
|
-
space?: number | number[]
|
|
1993
|
-
customValidity?: string
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
1787
|
/**
|
|
1997
1788
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1998
1789
|
* @beta
|
|
1999
1790
|
*/
|
|
2000
|
-
export declare
|
|
2001
|
-
|
|
2002
|
-
|
|
1791
|
+
export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
|
|
1792
|
+
props: SkeletonProps<E>,
|
|
1793
|
+
): React.JSX.Element
|
|
1794
|
+
|
|
1795
|
+
/** @beta */
|
|
1796
|
+
export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
2003
1797
|
|
|
2004
1798
|
/**
|
|
2005
1799
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2006
1800
|
* @beta
|
|
2007
1801
|
*/
|
|
2008
|
-
export declare
|
|
1802
|
+
export declare type SkeletonOwnProps = SkeletonStyleProps & {
|
|
2009
1803
|
animated?: boolean
|
|
2010
1804
|
delay?: number
|
|
2011
1805
|
}
|
|
2012
1806
|
|
|
1807
|
+
/** @beta */
|
|
1808
|
+
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
1809
|
+
SkeletonOwnProps,
|
|
1810
|
+
E
|
|
1811
|
+
>
|
|
1812
|
+
|
|
2013
1813
|
/**
|
|
2014
1814
|
* Indicate that something is loading for an indeterminate amount of time.
|
|
2015
1815
|
*
|
|
2016
1816
|
* @public
|
|
2017
1817
|
*/
|
|
2018
|
-
export declare
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
>
|
|
1818
|
+
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
1819
|
+
props: SpinnerProps<E>,
|
|
1820
|
+
): React.JSX.Element
|
|
2022
1821
|
|
|
2023
|
-
/**
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
1822
|
+
/** @public */
|
|
1823
|
+
export declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
1824
|
+
|
|
1825
|
+
/** @public */
|
|
1826
|
+
export declare type SpinnerOwnProps = {
|
|
2027
1827
|
muted?: boolean
|
|
2028
|
-
size?:
|
|
1828
|
+
size?: ResponsiveProp<FontTextSize>
|
|
2029
1829
|
}
|
|
2030
1830
|
|
|
2031
|
-
/**
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>, 'ref'> &
|
|
2036
|
-
RefAttributes<HTMLDivElement>
|
|
1831
|
+
/** @public */
|
|
1832
|
+
export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
|
|
1833
|
+
SpinnerOwnProps,
|
|
1834
|
+
E
|
|
2037
1835
|
>
|
|
2038
1836
|
|
|
2039
|
-
/**
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
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
|
+
>
|
|
2046
1853
|
|
|
2047
1854
|
/**
|
|
2048
1855
|
* The `Stack` component is used to place elements on top of each other.
|
|
2049
1856
|
*
|
|
2050
1857
|
* @public
|
|
2051
1858
|
*/
|
|
2052
|
-
export declare
|
|
2053
|
-
StackProps
|
|
2054
|
-
|
|
1859
|
+
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
1860
|
+
props: StackProps<E>,
|
|
1861
|
+
): React.JSX.Element
|
|
2055
1862
|
|
|
2056
|
-
/**
|
|
2057
|
-
|
|
2058
|
-
*/
|
|
2059
|
-
export declare interface StackProps extends BoxProps {
|
|
2060
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2061
|
-
space?: number | number[]
|
|
2062
|
-
}
|
|
1863
|
+
/** @public */
|
|
1864
|
+
export declare type StackElementType = BoxElementType
|
|
2063
1865
|
|
|
2064
|
-
/**
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
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
|
+
>
|
|
2069
1884
|
|
|
2070
|
-
/**
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
1885
|
+
/** @public */
|
|
1886
|
+
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
1887
|
+
StackOwnProps,
|
|
1888
|
+
E
|
|
1889
|
+
>
|
|
2075
1890
|
|
|
2076
1891
|
/**
|
|
2077
1892
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
@@ -2080,445 +1895,244 @@ export declare type Styles = ThemeStyles
|
|
|
2080
1895
|
*
|
|
2081
1896
|
* @public
|
|
2082
1897
|
*/
|
|
2083
|
-
export declare
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
>
|
|
1898
|
+
export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
|
|
1899
|
+
props: SwitchProps<E>,
|
|
1900
|
+
): React.JSX.Element
|
|
2087
1901
|
|
|
2088
|
-
/**
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
1902
|
+
/** @public */
|
|
1903
|
+
export declare type SwitchElementType = 'input' | ComponentType
|
|
1904
|
+
|
|
1905
|
+
/** @public */
|
|
1906
|
+
export declare type SwitchOwnProps = {
|
|
2092
1907
|
indeterminate?: boolean
|
|
2093
1908
|
}
|
|
2094
1909
|
|
|
2095
|
-
/**
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
Omit<
|
|
2100
|
-
TabProps &
|
|
2101
|
-
Omit<
|
|
2102
|
-
HTMLProps<HTMLButtonElement>,
|
|
2103
|
-
'label' | 'id' | 'type' | 'width' | 'aria-controls' | 'as'
|
|
2104
|
-
>,
|
|
2105
|
-
'ref'
|
|
2106
|
-
> &
|
|
2107
|
-
RefAttributes<HTMLButtonElement>
|
|
1910
|
+
/** @public */
|
|
1911
|
+
export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
|
|
1912
|
+
SwitchOwnProps,
|
|
1913
|
+
E
|
|
2108
1914
|
>
|
|
2109
1915
|
|
|
2110
|
-
/**
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
Omit<TabListProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
2115
|
-
RefAttributes<unknown>
|
|
2116
|
-
>
|
|
1916
|
+
/** @public */
|
|
1917
|
+
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
1918
|
+
props: TabProps<E>,
|
|
1919
|
+
): React.JSX.Element
|
|
2117
1920
|
|
|
2118
|
-
/**
|
|
2119
|
-
|
|
2120
|
-
*/
|
|
2121
|
-
export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
|
|
2122
|
-
children: Array<React.JSX.Element | null | undefined | false>
|
|
2123
|
-
}
|
|
1921
|
+
/** @public */
|
|
1922
|
+
export declare type TabElementType = 'button' | ComponentType
|
|
2124
1923
|
|
|
2125
|
-
/**
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
Omit<
|
|
2130
|
-
TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'role' | 'aria-labelledby' | 'as'>,
|
|
2131
|
-
'ref'
|
|
2132
|
-
> &
|
|
2133
|
-
RefAttributes<HTMLDivElement>
|
|
2134
|
-
>
|
|
1924
|
+
/** @public */
|
|
1925
|
+
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
1926
|
+
props: TabListProps<E>,
|
|
1927
|
+
): React.JSX.Element
|
|
2135
1928
|
|
|
2136
|
-
/**
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
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[]
|
|
2145
1942
|
}
|
|
2146
1943
|
|
|
2147
|
-
/**
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
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 = {
|
|
2151
1952
|
/**
|
|
2152
|
-
* The `id` of the
|
|
1953
|
+
* The `id` of the corresponding `TabPanel` component.
|
|
2153
1954
|
*/
|
|
2154
1955
|
'aria-controls': string
|
|
2155
1956
|
'id': string
|
|
2156
|
-
'icon'?:
|
|
1957
|
+
'icon'?: ElementType_2 | ReactNode
|
|
2157
1958
|
'focused'?: boolean
|
|
2158
|
-
'fontSize'?:
|
|
2159
|
-
'label'?:
|
|
2160
|
-
'padding'?:
|
|
1959
|
+
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
1960
|
+
'label'?: ReactNode
|
|
1961
|
+
'padding'?: ResponsiveProp<Space>
|
|
2161
1962
|
'selected'?: boolean
|
|
2162
|
-
'tone'?:
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
/**
|
|
2166
|
-
* The `Text` component is an agile, themed typographic element.
|
|
2167
|
-
*
|
|
2168
|
-
* @public
|
|
2169
|
-
*/
|
|
2170
|
-
declare const Text_2: ForwardRefExoticComponent<
|
|
2171
|
-
Omit<TextProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
|
|
2172
|
-
RefAttributes<HTMLDivElement>
|
|
2173
|
-
>
|
|
2174
|
-
export {Text_2 as Text}
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
* @public
|
|
2178
|
-
*/
|
|
2179
|
-
export declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
|
|
2180
|
-
|
|
2181
|
-
/**
|
|
2182
|
-
* A multiline text input.
|
|
2183
|
-
*
|
|
2184
|
-
|
|
2185
|
-
* @public
|
|
2186
|
-
*/
|
|
2187
|
-
export declare const TextArea: ForwardRefExoticComponent<
|
|
2188
|
-
Omit<TextAreaProps & Omit<HTMLProps<HTMLTextAreaElement>, 'as'>, 'ref'> &
|
|
2189
|
-
RefAttributes<HTMLTextAreaElement>
|
|
2190
|
-
>
|
|
2191
|
-
|
|
2192
|
-
/**
|
|
2193
|
-
* @public
|
|
2194
|
-
*/
|
|
2195
|
-
export declare interface TextAreaProps extends ResponsiveRadiusProps {
|
|
2196
|
-
/**
|
|
2197
|
-
* @beta
|
|
2198
|
-
*/
|
|
2199
|
-
__unstable_disableFocusRing?: boolean
|
|
2200
|
-
border?: boolean
|
|
2201
|
-
customValidity?: string
|
|
2202
|
-
fontSize?: number | number[]
|
|
2203
|
-
padding?: number | number[]
|
|
2204
|
-
weight?: ThemeFontWeightKey_2
|
|
1963
|
+
'tone'?: ElementTone
|
|
2205
1964
|
}
|
|
2206
1965
|
|
|
2207
|
-
/**
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
*/
|
|
2212
|
-
export declare const TextInput: ForwardRefExoticComponent<
|
|
2213
|
-
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'prefix' | 'as'>, 'ref'> &
|
|
2214
|
-
RefAttributes<HTMLInputElement>
|
|
2215
|
-
>
|
|
2216
|
-
|
|
2217
|
-
/**
|
|
2218
|
-
* @public
|
|
2219
|
-
*/
|
|
2220
|
-
export declare type TextInputClearButtonProps = Omit<ButtonProps, 'as'> &
|
|
2221
|
-
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
|
|
2222
|
-
|
|
2223
|
-
/**
|
|
2224
|
-
* @public
|
|
2225
|
-
*/
|
|
2226
|
-
export declare interface TextInputProps {
|
|
2227
|
-
/**
|
|
2228
|
-
* @beta
|
|
2229
|
-
*/
|
|
2230
|
-
__unstable_disableFocusRing?: boolean
|
|
2231
|
-
border?: boolean
|
|
2232
|
-
/**
|
|
2233
|
-
* @beta
|
|
2234
|
-
*/
|
|
2235
|
-
clearButton?: boolean | TextInputClearButtonProps
|
|
2236
|
-
customValidity?: string
|
|
2237
|
-
fontSize?: number | number[]
|
|
2238
|
-
icon?: React.ElementType | React.ReactNode
|
|
2239
|
-
iconRight?: React.ElementType | React.ReactNode
|
|
2240
|
-
/**
|
|
2241
|
-
* @beta
|
|
2242
|
-
*/
|
|
2243
|
-
onClear?: () => void
|
|
2244
|
-
padding?: number | number[]
|
|
2245
|
-
prefix?: React.ReactNode
|
|
2246
|
-
radius?: Radius | Radius[]
|
|
2247
|
-
space?: number | number[]
|
|
2248
|
-
suffix?: React.ReactNode
|
|
2249
|
-
type?: TextInputType
|
|
2250
|
-
weight?: ThemeFontWeightKey_2
|
|
2251
|
-
}
|
|
1966
|
+
/** @public */
|
|
1967
|
+
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
1968
|
+
props: TabPanelProps<E>,
|
|
1969
|
+
): React.JSX.Element
|
|
2252
1970
|
|
|
2253
|
-
/**
|
|
2254
|
-
|
|
2255
|
-
*/
|
|
2256
|
-
export declare type TextInputType =
|
|
2257
|
-
| 'search'
|
|
2258
|
-
| 'date'
|
|
2259
|
-
| 'datetime-local'
|
|
2260
|
-
| 'email'
|
|
2261
|
-
| 'url'
|
|
2262
|
-
| 'month'
|
|
2263
|
-
| 'number'
|
|
2264
|
-
| 'password'
|
|
2265
|
-
| 'tel'
|
|
2266
|
-
| 'time'
|
|
2267
|
-
| 'text'
|
|
2268
|
-
| 'week'
|
|
2269
|
-
| 'color'
|
|
1971
|
+
/** @public */
|
|
1972
|
+
export declare type TabPanelElementType = 'div' | 'span' | ComponentType
|
|
2270
1973
|
|
|
2271
|
-
/**
|
|
2272
|
-
|
|
2273
|
-
*/
|
|
2274
|
-
export declare interface TextProps {
|
|
2275
|
-
accent?: boolean
|
|
2276
|
-
align?: TextAlign | TextAlign[]
|
|
2277
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2278
|
-
/** When `true` the text color will be muted. */
|
|
2279
|
-
muted?: boolean
|
|
2280
|
-
size?: number | number[]
|
|
1974
|
+
/** @public */
|
|
1975
|
+
export declare type TabPanelOwnProps = BoxOwnProps & {
|
|
2281
1976
|
/**
|
|
2282
|
-
*
|
|
2283
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
2284
|
-
* @beta
|
|
1977
|
+
* The `id` of the correlating `Tab` component.
|
|
2285
1978
|
*/
|
|
2286
|
-
|
|
2287
|
-
|
|
1979
|
+
'aria-labelledby': string
|
|
1980
|
+
'id': string
|
|
2288
1981
|
}
|
|
2289
1982
|
|
|
2290
|
-
/**
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
export declare const TextSkeleton: ForwardRefExoticComponent<
|
|
2295
|
-
Omit<
|
|
2296
|
-
TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'size' | 'children' | 'as'>,
|
|
2297
|
-
'ref'
|
|
2298
|
-
> &
|
|
2299
|
-
RefAttributes<HTMLDivElement>
|
|
1983
|
+
/** @public */
|
|
1984
|
+
export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
|
|
1985
|
+
TabPanelOwnProps,
|
|
1986
|
+
E
|
|
2300
1987
|
>
|
|
2301
1988
|
|
|
2302
|
-
/**
|
|
2303
|
-
|
|
2304
|
-
* @beta
|
|
2305
|
-
*/
|
|
2306
|
-
export declare interface TextSkeletonProps extends SkeletonProps {
|
|
2307
|
-
size?: number | number[]
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
* @public
|
|
2312
|
-
* @deprecated Use `Theme` from `@sanity/ui/theme` instead.
|
|
2313
|
-
*/
|
|
2314
|
-
export declare type Theme = Theme_2
|
|
2315
|
-
|
|
2316
|
-
export {ThemeAvatar}
|
|
2317
|
-
|
|
2318
|
-
export {ThemeColor}
|
|
2319
|
-
|
|
2320
|
-
export {ThemeColorBase}
|
|
2321
|
-
|
|
2322
|
-
export {ThemeColorBuilderOpts}
|
|
2323
|
-
|
|
2324
|
-
export {ThemeColorButton}
|
|
2325
|
-
|
|
2326
|
-
/**
|
|
2327
|
-
* @public
|
|
2328
|
-
* @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
|
|
2329
|
-
*/
|
|
2330
|
-
export declare type ThemeColorButtonModeKey = ThemeColorButtonModeKey_2
|
|
2331
|
-
|
|
2332
|
-
export {ThemeColorButtonState}
|
|
2333
|
-
|
|
2334
|
-
export {ThemeColorButtonStates}
|
|
2335
|
-
|
|
2336
|
-
export {ThemeColorButtonTones}
|
|
2337
|
-
|
|
2338
|
-
export {ThemeColorCard}
|
|
2339
|
-
|
|
2340
|
-
export {ThemeColorCardState}
|
|
2341
|
-
|
|
2342
|
-
export {ThemeColorGenericState}
|
|
2343
|
-
|
|
2344
|
-
export {ThemeColorInput}
|
|
2345
|
-
|
|
2346
|
-
export {ThemeColorInputState}
|
|
2347
|
-
|
|
2348
|
-
export {ThemeColorInputStates}
|
|
2349
|
-
|
|
2350
|
-
export {ThemeColorMuted}
|
|
2351
|
-
|
|
2352
|
-
export {ThemeColorMutedTone}
|
|
2353
|
-
|
|
2354
|
-
export {ThemeColorName}
|
|
2355
|
-
|
|
2356
|
-
/**
|
|
2357
|
-
* @public
|
|
2358
|
-
*/
|
|
2359
|
-
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element
|
|
2360
|
-
|
|
2361
|
-
export declare namespace ThemeColorProvider {
|
|
2362
|
-
var displayName: string
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* @public
|
|
2367
|
-
*/
|
|
2368
|
-
export declare interface ThemeColorProviderProps {
|
|
2369
|
-
children?: React.ReactNode
|
|
2370
|
-
scheme?: ThemeColorSchemeKey_2
|
|
2371
|
-
tone?: ThemeColorCardToneKey
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
export {ThemeColorScheme}
|
|
2375
|
-
|
|
2376
|
-
/**
|
|
2377
|
-
* @public
|
|
2378
|
-
* @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
|
|
2379
|
-
*/
|
|
2380
|
-
export declare type ThemeColorSchemeKey = ThemeColorSchemeKey_2
|
|
2381
|
-
|
|
2382
|
-
export {ThemeColorSchemes}
|
|
2383
|
-
|
|
2384
|
-
export {ThemeColorSelectable}
|
|
2385
|
-
|
|
2386
|
-
export {ThemeColorSelectableState}
|
|
2387
|
-
|
|
2388
|
-
export {ThemeColorSelectableStates}
|
|
2389
|
-
|
|
2390
|
-
export {ThemeColorSolid}
|
|
2391
|
-
|
|
2392
|
-
export {ThemeColorSolidTone}
|
|
2393
|
-
|
|
2394
|
-
export {ThemeColorSpot}
|
|
1989
|
+
/** @public */
|
|
1990
|
+
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
2395
1991
|
|
|
2396
|
-
|
|
1992
|
+
/** @public */
|
|
1993
|
+
export declare type TagType = keyof JSX.IntrinsicElements
|
|
2397
1994
|
|
|
2398
1995
|
/**
|
|
1996
|
+
* The `Text` component is an agile, themed typographic element.
|
|
1997
|
+
*
|
|
2399
1998
|
* @public
|
|
2400
|
-
* @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
|
|
2401
1999
|
*/
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2000
|
+
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
2001
|
+
props: TextProps<E>,
|
|
2002
|
+
): React.JSX.Element
|
|
2003
|
+
export {Text_2 as Text}
|
|
2405
2004
|
|
|
2406
2005
|
/**
|
|
2006
|
+
* A multiline text input.
|
|
2007
|
+
*
|
|
2407
2008
|
* @public
|
|
2408
2009
|
*/
|
|
2409
|
-
export declare
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2010
|
+
export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
|
|
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 & {
|
|
2019
|
+
/**
|
|
2020
|
+
* @beta
|
|
2021
|
+
*/
|
|
2022
|
+
__unstable_disableFocusRing?: boolean
|
|
2023
|
+
customValidity?: string
|
|
2415
2024
|
}
|
|
2416
2025
|
|
|
2417
|
-
/**
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2026
|
+
/** @public */
|
|
2027
|
+
export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
|
|
2028
|
+
TextAreaOwnProps,
|
|
2029
|
+
E
|
|
2030
|
+
>
|
|
2422
2031
|
|
|
2423
|
-
/**
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
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
|
|
2428
2048
|
|
|
2429
2049
|
/**
|
|
2050
|
+
* Single line text input.
|
|
2051
|
+
*
|
|
2430
2052
|
* @public
|
|
2431
|
-
* @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
|
|
2432
2053
|
*/
|
|
2433
|
-
export declare
|
|
2054
|
+
export declare function TextInput<
|
|
2055
|
+
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
2056
|
+
>(props: TextInputProps<E>): React.JSX.Element
|
|
2434
2057
|
|
|
2435
|
-
/**
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2058
|
+
/** @public */
|
|
2059
|
+
export declare type TextInputClearButtonProps = Omit<
|
|
2060
|
+
ButtonProps<'button'>,
|
|
2061
|
+
'as' | 'onClick' | 'onMouseDown'
|
|
2062
|
+
>
|
|
2440
2063
|
|
|
2441
|
-
/**
|
|
2442
|
-
|
|
2443
|
-
* @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
|
|
2444
|
-
*/
|
|
2445
|
-
export declare type ThemeFontWeight = ThemeFontWeight_2
|
|
2064
|
+
/** @public */
|
|
2065
|
+
export declare type TextInputElementType = 'input' | ComponentType
|
|
2446
2066
|
|
|
2447
|
-
/**
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2067
|
+
/** @public */
|
|
2068
|
+
export declare type TextInputOwnProps = InputStyleProps & {
|
|
2069
|
+
/**
|
|
2070
|
+
* @beta
|
|
2071
|
+
*/
|
|
2072
|
+
__unstable_disableFocusRing?: boolean
|
|
2073
|
+
/**
|
|
2074
|
+
* @beta
|
|
2075
|
+
*/
|
|
2076
|
+
clearButton?: boolean | TextInputClearButtonProps
|
|
2077
|
+
customValidity?: string
|
|
2078
|
+
icon?: ElementType_2 | ReactNode
|
|
2079
|
+
iconRight?: ElementType_2 | ReactNode
|
|
2080
|
+
/**
|
|
2081
|
+
* @beta
|
|
2082
|
+
*/
|
|
2083
|
+
onClear?: () => void
|
|
2084
|
+
prefix?: ReactNode
|
|
2085
|
+
suffix?: ReactNode
|
|
2086
|
+
weight?: FontWeight
|
|
2087
|
+
}
|
|
2452
2088
|
|
|
2453
|
-
|
|
2089
|
+
/** @public */
|
|
2090
|
+
export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
|
|
2091
|
+
TextInputOwnProps,
|
|
2092
|
+
E
|
|
2093
|
+
>
|
|
2454
2094
|
|
|
2455
|
-
/**
|
|
2456
|
-
|
|
2457
|
-
* @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
|
|
2458
|
-
*/
|
|
2459
|
-
export declare type ThemeLayer = ThemeLayer_2
|
|
2095
|
+
/** @public */
|
|
2096
|
+
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2460
2097
|
|
|
2461
|
-
/**
|
|
2462
|
-
|
|
2463
|
-
*/
|
|
2464
|
-
export declare interface ThemeProps {
|
|
2465
|
-
theme: Theme_2
|
|
2466
|
-
}
|
|
2098
|
+
/** @public */
|
|
2099
|
+
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2467
2100
|
|
|
2468
2101
|
/**
|
|
2469
|
-
*
|
|
2102
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2103
|
+
* @beta
|
|
2470
2104
|
*/
|
|
2471
|
-
export declare function
|
|
2105
|
+
export declare function TextSkeleton<
|
|
2106
|
+
E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
|
|
2107
|
+
>(props: TextSkeletonProps<E>): React.JSX.Element
|
|
2472
2108
|
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
}
|
|
2109
|
+
/** @beta */
|
|
2110
|
+
export declare type TextSkeletonElementType = SkeletonElementType
|
|
2476
2111
|
|
|
2477
|
-
/**
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
export declare interface ThemeProviderProps {
|
|
2481
|
-
children?: React.ReactNode
|
|
2482
|
-
scheme?: ThemeColorSchemeKey_2
|
|
2483
|
-
theme?: RootTheme_2
|
|
2484
|
-
tone?: ThemeColorCardToneKey
|
|
2112
|
+
/** @beta */
|
|
2113
|
+
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2114
|
+
size?: ResponsiveProp<FontTextSize>
|
|
2485
2115
|
}
|
|
2486
2116
|
|
|
2487
2117
|
/**
|
|
2488
|
-
*
|
|
2489
|
-
* @
|
|
2118
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2119
|
+
* @beta
|
|
2490
2120
|
*/
|
|
2491
|
-
export declare type
|
|
2121
|
+
export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
|
|
2122
|
+
Props<TextSkeletonOwnProps, E>
|
|
2492
2123
|
|
|
2493
2124
|
/**
|
|
2494
2125
|
* The `Toast` component gives feedback to users when an action has taken place.
|
|
2495
2126
|
*
|
|
2496
|
-
* Toasts can be closed with a close button, or auto-dismiss
|
|
2127
|
+
* Toasts can be closed with a close button, or auto-dismiss when the duration expires.
|
|
2497
2128
|
*
|
|
2498
|
-
* @
|
|
2129
|
+
* @internal
|
|
2499
2130
|
*/
|
|
2500
|
-
export declare function Toast(
|
|
2501
|
-
props: ToastProps
|
|
2502
|
-
Omit<
|
|
2503
|
-
React.HTMLProps<HTMLDivElement>,
|
|
2504
|
-
| 'as'
|
|
2505
|
-
| 'height'
|
|
2506
|
-
| 'ref'
|
|
2507
|
-
| 'title'
|
|
2508
|
-
| 'onAnimationStart'
|
|
2509
|
-
| 'onDragStart'
|
|
2510
|
-
| 'onDragEnd'
|
|
2511
|
-
| 'onDrag'
|
|
2512
|
-
>,
|
|
2131
|
+
export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
|
|
2132
|
+
props: ToastProps<E>,
|
|
2513
2133
|
): React.JSX.Element
|
|
2514
2134
|
|
|
2515
|
-
|
|
2516
|
-
var displayName: string
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
/**
|
|
2520
|
-
* @public
|
|
2521
|
-
*/
|
|
2135
|
+
/** @public */
|
|
2522
2136
|
export declare interface ToastContextValue {
|
|
2523
2137
|
version: 0.0
|
|
2524
2138
|
/**
|
|
@@ -2530,59 +2144,55 @@ export declare interface ToastContextValue {
|
|
|
2530
2144
|
push: (params: ToastParams) => string
|
|
2531
2145
|
}
|
|
2532
2146
|
|
|
2533
|
-
/**
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2147
|
+
/** @internal */
|
|
2148
|
+
export declare type ToastElementType = 'li' | ComponentType
|
|
2149
|
+
|
|
2150
|
+
/** @internal */
|
|
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
|
|
2542
2170
|
}
|
|
2543
2171
|
|
|
2544
|
-
/**
|
|
2545
|
-
* @public
|
|
2546
|
-
*/
|
|
2172
|
+
/** @public */
|
|
2547
2173
|
export declare interface ToastParams {
|
|
2548
2174
|
closable?: boolean
|
|
2549
|
-
description?:
|
|
2175
|
+
description?: ReactNode
|
|
2550
2176
|
duration?: number
|
|
2551
2177
|
id?: string
|
|
2552
2178
|
onClose?: () => void
|
|
2553
|
-
title?:
|
|
2179
|
+
title?: ReactNode
|
|
2554
2180
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2555
2181
|
}
|
|
2556
2182
|
|
|
2557
|
-
/**
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
description?: React.ReactNode
|
|
2563
|
-
onClose: () => void
|
|
2564
|
-
radius?: number | number[]
|
|
2565
|
-
title?: React.ReactNode
|
|
2566
|
-
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2567
|
-
duration?: number
|
|
2568
|
-
updatedAt?: number
|
|
2569
|
-
}
|
|
2183
|
+
/** @internal */
|
|
2184
|
+
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2185
|
+
ToastOwnProps,
|
|
2186
|
+
E
|
|
2187
|
+
>
|
|
2570
2188
|
|
|
2571
|
-
/**
|
|
2572
|
-
* @public
|
|
2573
|
-
*/
|
|
2189
|
+
/** @public */
|
|
2574
2190
|
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2575
2191
|
|
|
2576
|
-
|
|
2577
|
-
var displayName: string
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
/**
|
|
2581
|
-
* @public
|
|
2582
|
-
*/
|
|
2192
|
+
/** @public */
|
|
2583
2193
|
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2584
2194
|
children?: React.ReactNode
|
|
2585
|
-
zOffset?: number
|
|
2195
|
+
zOffset?: ResponsiveProp<number>
|
|
2586
2196
|
}
|
|
2587
2197
|
|
|
2588
2198
|
/**
|
|
@@ -2590,10 +2200,9 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
|
|
|
2590
2200
|
*
|
|
2591
2201
|
* @public
|
|
2592
2202
|
*/
|
|
2593
|
-
export declare
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
>
|
|
2203
|
+
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
2204
|
+
props: TooltipProps<E>,
|
|
2205
|
+
): React.JSX.Element
|
|
2597
2206
|
|
|
2598
2207
|
/**
|
|
2599
2208
|
* @beta
|
|
@@ -2620,15 +2229,11 @@ export declare function TooltipDelayGroupProvider(
|
|
|
2620
2229
|
props: TooltipDelayGroupProviderProps,
|
|
2621
2230
|
): React.JSX.Element
|
|
2622
2231
|
|
|
2623
|
-
export declare namespace TooltipDelayGroupProvider {
|
|
2624
|
-
var displayName: string
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
2232
|
/**
|
|
2628
2233
|
* @public
|
|
2629
2234
|
* */
|
|
2630
2235
|
export declare interface TooltipDelayGroupProviderProps {
|
|
2631
|
-
children?:
|
|
2236
|
+
children?: ReactNode
|
|
2632
2237
|
/**
|
|
2633
2238
|
* Handles the delays to open or close a tooltip inside a group
|
|
2634
2239
|
*
|
|
@@ -2641,54 +2246,57 @@ export declare interface TooltipDelayGroupProviderProps {
|
|
|
2641
2246
|
delay: Delay
|
|
2642
2247
|
}
|
|
2643
2248
|
|
|
2644
|
-
/**
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
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
|
+
>
|
|
2682
2292
|
|
|
2683
2293
|
/**
|
|
2684
2294
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2685
2295
|
* @beta
|
|
2686
2296
|
*/
|
|
2687
|
-
export declare
|
|
2688
|
-
TreeProps
|
|
2689
|
-
|
|
2690
|
-
RefAttributes<HTMLDivElement>
|
|
2691
|
-
>
|
|
2297
|
+
export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
|
|
2298
|
+
props: TreeProps<E>,
|
|
2299
|
+
): React.JSX.Element
|
|
2692
2300
|
|
|
2693
2301
|
/**
|
|
2694
2302
|
* @beta
|
|
@@ -2696,48 +2304,63 @@ export declare const Tree: NamedExoticComponent<
|
|
|
2696
2304
|
export declare interface TreeContextValue {
|
|
2697
2305
|
version: 0.0
|
|
2698
2306
|
focusedElement: HTMLElement | null
|
|
2307
|
+
gap: ResponsiveProp<Space>
|
|
2699
2308
|
level: number
|
|
2700
2309
|
path: string[]
|
|
2701
2310
|
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
|
|
2702
2311
|
setExpanded: (path: string, expanded: boolean) => void
|
|
2703
2312
|
setFocusedElement: (focusedElement: HTMLElement | null) => void
|
|
2704
|
-
space: number | number[]
|
|
2705
2313
|
state: TreeState
|
|
2706
2314
|
}
|
|
2707
2315
|
|
|
2316
|
+
/** @beta */
|
|
2317
|
+
export declare type TreeElementType = 'div' | ComponentType
|
|
2318
|
+
|
|
2708
2319
|
/**
|
|
2709
2320
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2710
2321
|
* @beta
|
|
2711
2322
|
*/
|
|
2712
|
-
export declare
|
|
2713
|
-
TreeItemProps
|
|
2714
|
-
|
|
2323
|
+
export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
|
|
2324
|
+
props: TreeItemProps<E>,
|
|
2325
|
+
): React.JSX.Element
|
|
2715
2326
|
|
|
2716
|
-
/**
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2327
|
+
/** @beta */
|
|
2328
|
+
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
2329
|
+
|
|
2330
|
+
/** @beta */
|
|
2331
|
+
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2720
2332
|
expanded?: boolean
|
|
2721
|
-
fontSize?:
|
|
2722
|
-
icon?:
|
|
2333
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
2334
|
+
icon?: ElementType_2
|
|
2723
2335
|
/**
|
|
2724
2336
|
* Allows passing a custom element type to the link component
|
|
2337
|
+
* @internal
|
|
2725
2338
|
*/
|
|
2726
|
-
linkAs?:
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2339
|
+
linkAs?: SelectableElementType
|
|
2340
|
+
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2341
|
+
padding?: ResponsiveProp<Space>
|
|
2342
|
+
space?: ResponsiveProp<Space>
|
|
2343
|
+
text?: ReactNode
|
|
2344
|
+
weight?: FontWeight
|
|
2731
2345
|
}
|
|
2732
2346
|
|
|
2347
|
+
/** @beta */
|
|
2348
|
+
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
2349
|
+
TreeItemOwnProps,
|
|
2350
|
+
E
|
|
2351
|
+
>
|
|
2352
|
+
|
|
2733
2353
|
/**
|
|
2734
2354
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2735
2355
|
* @beta
|
|
2736
2356
|
*/
|
|
2737
|
-
export declare
|
|
2738
|
-
|
|
2357
|
+
export declare type TreeOwnProps = {
|
|
2358
|
+
gap?: ResponsiveProp<Space>
|
|
2739
2359
|
}
|
|
2740
2360
|
|
|
2361
|
+
/** @beta */
|
|
2362
|
+
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
2363
|
+
|
|
2741
2364
|
/**
|
|
2742
2365
|
* @beta
|
|
2743
2366
|
*/
|
|
@@ -2750,44 +2373,13 @@ export declare interface TreeState {
|
|
|
2750
2373
|
| undefined
|
|
2751
2374
|
}
|
|
2752
2375
|
|
|
2753
|
-
/**
|
|
2754
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2755
|
-
* @beta
|
|
2756
|
-
*/
|
|
2757
|
-
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
|
2758
|
-
val: T | T[] | undefined,
|
|
2759
|
-
defaultVal?: T[],
|
|
2760
|
-
): T[]
|
|
2761
|
-
|
|
2762
|
-
/**
|
|
2763
|
-
* @public
|
|
2764
|
-
*/
|
|
2376
|
+
/** @public */
|
|
2765
2377
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2766
2378
|
|
|
2767
|
-
/**
|
|
2768
|
-
|
|
2769
|
-
* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
|
|
2770
|
-
* ```tsx
|
|
2771
|
-
* const [button, setButtonElement] = useState(null)
|
|
2772
|
-
* useClickOutside((event) => {}, [button])
|
|
2773
|
-
* return <button ref={setButtonElement} />
|
|
2774
|
-
* ```
|
|
2775
|
-
* do:
|
|
2776
|
-
* ```tsx
|
|
2777
|
-
* const buttonRef = useRef()
|
|
2778
|
-
* useClickOutsideEvent((event) => {}, () => [buttonRef.current])
|
|
2779
|
-
* return <button ref={buttonRef} />
|
|
2780
|
-
* ```
|
|
2781
|
-
*/
|
|
2782
|
-
export declare function useClickOutside(
|
|
2783
|
-
listener: ClickOutsideListener,
|
|
2784
|
-
elementsArg?: ClickOutsideElements,
|
|
2785
|
-
boundaryElement?: HTMLElement | null,
|
|
2786
|
-
): (el: HTMLElement | null) => void
|
|
2379
|
+
/** @public */
|
|
2380
|
+
export declare function useCard(): CardContextValue
|
|
2787
2381
|
|
|
2788
|
-
/**
|
|
2789
|
-
* @public
|
|
2790
|
-
*/
|
|
2382
|
+
/** @public */
|
|
2791
2383
|
export declare function useClickOutsideEvent(
|
|
2792
2384
|
listener: ClickOutsideEventListener | false | undefined,
|
|
2793
2385
|
elementsArg?: () => ClickOutsideEventElements,
|
|
@@ -2812,48 +2404,24 @@ export declare function useCustomValidity(
|
|
|
2812
2404
|
*/
|
|
2813
2405
|
export declare function useDialog(): DialogContextValue
|
|
2814
2406
|
|
|
2815
|
-
/**
|
|
2816
|
-
* Subscribe to the rect of a DOM element.
|
|
2817
|
-
* @beta
|
|
2818
|
-
*
|
|
2819
|
-
* @deprecated Use `useElementSize` instead
|
|
2820
|
-
*/
|
|
2821
|
-
export declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null
|
|
2822
|
-
|
|
2823
2407
|
/**
|
|
2824
2408
|
* Subscribe to the size of a DOM element.
|
|
2825
2409
|
* @beta
|
|
2826
2410
|
*/
|
|
2827
2411
|
export declare function useElementSize(element: HTMLElement | null): ElementSize | null
|
|
2828
2412
|
|
|
2829
|
-
/**
|
|
2830
|
-
* @beta
|
|
2831
|
-
* @deprecated use `useImperativeHandle` instead
|
|
2832
|
-
* @example
|
|
2833
|
-
* ```diff
|
|
2834
|
-
* -const ref = useForwardedRef(forwardedRef)
|
|
2835
|
-
* +const ref = useRef(null)
|
|
2836
|
-
* +useImperativeHandle(forwardedRef, () => ref.current)
|
|
2837
|
-
* ```
|
|
2838
|
-
*/
|
|
2839
|
-
export declare function useForwardedRef<T>(
|
|
2840
|
-
ref: React.ForwardedRef<T>,
|
|
2841
|
-
): React.MutableRefObject<T | null>
|
|
2842
|
-
|
|
2843
2413
|
/**
|
|
2844
2414
|
* @beta
|
|
2845
2415
|
*/
|
|
2846
2416
|
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2847
2417
|
|
|
2848
|
-
/**
|
|
2849
|
-
* @public
|
|
2850
|
-
*/
|
|
2418
|
+
/** @public */
|
|
2851
2419
|
export declare function useLayer(): LayerContextValue
|
|
2852
2420
|
|
|
2853
2421
|
/**
|
|
2854
2422
|
* Efficiently subscribes to `window.matchMedia` queries
|
|
2855
2423
|
*
|
|
2856
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://
|
|
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)
|
|
2857
2425
|
*
|
|
2858
2426
|
* @public
|
|
2859
2427
|
*/
|
|
@@ -2866,17 +2434,15 @@ export declare function useMatchMedia(
|
|
|
2866
2434
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2867
2435
|
* @beta
|
|
2868
2436
|
*/
|
|
2869
|
-
export declare function useMediaIndex():
|
|
2437
|
+
export declare function useMediaIndex(): Breakpoint
|
|
2870
2438
|
|
|
2871
|
-
/**
|
|
2872
|
-
* @public
|
|
2873
|
-
*/
|
|
2439
|
+
/** @public */
|
|
2874
2440
|
export declare function usePortal(): PortalContextValue
|
|
2875
2441
|
|
|
2876
2442
|
/**
|
|
2877
2443
|
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
2878
2444
|
*
|
|
2879
|
-
* @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://
|
|
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)
|
|
2880
2446
|
*
|
|
2881
2447
|
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2882
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
|
|
@@ -2889,7 +2455,7 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
|
|
|
2889
2455
|
/**
|
|
2890
2456
|
* Returns true if motion should be reduced
|
|
2891
2457
|
*
|
|
2892
|
-
* @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://
|
|
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)
|
|
2893
2459
|
*
|
|
2894
2460
|
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2895
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
|
|
@@ -2900,23 +2466,15 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
|
|
|
2900
2466
|
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2901
2467
|
|
|
2902
2468
|
/**
|
|
2903
|
-
*
|
|
2904
|
-
|
|
2905
|
-
export declare function useRootTheme(): ThemeContextValue
|
|
2906
|
-
|
|
2907
|
-
/**
|
|
2908
|
-
* @public
|
|
2909
|
-
*/
|
|
2910
|
-
export declare function useTheme(): Theme_2
|
|
2911
|
-
|
|
2912
|
-
/**
|
|
2913
|
-
* @public
|
|
2469
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2470
|
+
* @beta
|
|
2914
2471
|
*/
|
|
2915
|
-
export declare function
|
|
2472
|
+
export declare function useResponsiveProp<T>(
|
|
2473
|
+
val: ResponsiveProp<T> | undefined,
|
|
2474
|
+
defaultVal?: Partial<Record<Breakpoint, T>>,
|
|
2475
|
+
): Partial<Record<Breakpoint, T>>
|
|
2916
2476
|
|
|
2917
|
-
/**
|
|
2918
|
-
* @public
|
|
2919
|
-
*/
|
|
2477
|
+
/** @public */
|
|
2920
2478
|
export declare function useToast(): ToastContextValue
|
|
2921
2479
|
|
|
2922
2480
|
/**
|
|
@@ -2929,19 +2487,12 @@ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue |
|
|
|
2929
2487
|
*/
|
|
2930
2488
|
export declare function useTree(): TreeContextValue
|
|
2931
2489
|
|
|
2932
|
-
/**
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
VirtualListProps<any> &
|
|
2937
|
-
StackProps &
|
|
2938
|
-
Omit<HTMLProps<HTMLDivElement>, 'children' | 'ref' | 'onChange' | 'as'> &
|
|
2939
|
-
RefAttributes<HTMLDivElement>
|
|
2940
|
-
>
|
|
2490
|
+
/** @beta */
|
|
2491
|
+
export declare function VirtualList<
|
|
2492
|
+
E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
2493
|
+
>(props: VirtualListProps<E>): React.JSX.Element
|
|
2941
2494
|
|
|
2942
|
-
/**
|
|
2943
|
-
* @beta
|
|
2944
|
-
*/
|
|
2495
|
+
/** @beta */
|
|
2945
2496
|
export declare interface VirtualListChangeOpts {
|
|
2946
2497
|
fromIndex: number
|
|
2947
2498
|
gap: number
|
|
@@ -2951,16 +2502,20 @@ export declare interface VirtualListChangeOpts {
|
|
|
2951
2502
|
toIndex: number
|
|
2952
2503
|
}
|
|
2953
2504
|
|
|
2954
|
-
/**
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
gap?:
|
|
2505
|
+
/** @beta */
|
|
2506
|
+
export declare type VirtualListElementType = 'div' | ComponentType
|
|
2507
|
+
|
|
2508
|
+
/** @beta */
|
|
2509
|
+
export declare type VirtualListOwnProps<Item = any> = {
|
|
2510
|
+
gap?: Space
|
|
2960
2511
|
getItemKey?: (item: Item, itemIndex: number) => string
|
|
2961
2512
|
items?: Item[]
|
|
2962
2513
|
onChange?: (opts: VirtualListChangeOpts) => void
|
|
2963
|
-
renderItem?: (item: Item) =>
|
|
2514
|
+
renderItem?: (item: Item) => ReactNode
|
|
2964
2515
|
}
|
|
2965
2516
|
|
|
2517
|
+
/** @beta */
|
|
2518
|
+
export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
|
|
2519
|
+
Props<VirtualListOwnProps, E>
|
|
2520
|
+
|
|
2966
2521
|
export {}
|