@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.mts
DELETED
|
@@ -1,2966 +0,0 @@
|
|
|
1
|
-
import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
|
|
2
|
-
import {Component} from 'react'
|
|
3
|
-
import {Context} from 'react'
|
|
4
|
-
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
5
|
-
import {CSSObject} from '@sanity/ui/theme'
|
|
6
|
-
import {DetailedHTMLProps} from 'react'
|
|
7
|
-
import {ElementType} from 'react'
|
|
8
|
-
import {FastOmit} from 'styled-components'
|
|
9
|
-
import {ForwardRefExoticComponent} from 'react'
|
|
10
|
-
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
11
|
-
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
12
|
-
import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
13
|
-
import {HTMLAttributes} from 'react'
|
|
14
|
-
import {HTMLProps} from 'react'
|
|
15
|
-
import {IStyledComponentBase} from 'styled-components/dist/types'
|
|
16
|
-
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
17
|
-
import {MutableRefObject} from 'react'
|
|
18
|
-
import {NamedExoticComponent} from 'react'
|
|
19
|
-
import {parseColor as parseColor_2} from '@sanity/ui/theme'
|
|
20
|
-
import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
21
|
-
import {PropsWithChildren} from 'react'
|
|
22
|
-
import {ReactNode} from 'react'
|
|
23
|
-
import {Ref} from 'react'
|
|
24
|
-
import {RefAttributes} from 'react'
|
|
25
|
-
import {RefCallback} from 'react'
|
|
26
|
-
import {RGB as RGB_2} from '@sanity/ui/theme'
|
|
27
|
-
import {rgba as rgba_2} from '@sanity/ui/theme'
|
|
28
|
-
import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
|
|
29
|
-
import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
|
|
30
|
-
import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
|
|
31
|
-
import {screen as screen_3} from '@sanity/ui/theme'
|
|
32
|
-
import {Theme as Theme_2} from '@sanity/ui/theme'
|
|
33
|
-
import {Theme_v2} from '@sanity/ui/theme'
|
|
34
|
-
import {ThemeAvatar} from '@sanity/ui/theme'
|
|
35
|
-
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
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'
|
|
78
|
-
|
|
79
|
-
/** @beta */
|
|
80
|
-
export declare type ArrayPropPrimitive = string | number | boolean | undefined | null
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
export declare const Arrow: ForwardRefExoticComponent<
|
|
84
|
-
Omit<
|
|
85
|
-
{
|
|
86
|
-
width: number
|
|
87
|
-
height: number
|
|
88
|
-
radius?: number
|
|
89
|
-
} & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width'>,
|
|
90
|
-
'ref'
|
|
91
|
-
> &
|
|
92
|
-
RefAttributes<HTMLDivElement>
|
|
93
|
-
>
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
export declare function attemptFocus(element: HTMLElement): boolean
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The Autocomplete component is typically used for search components.
|
|
102
|
-
* It consists of a text input for writing a query, and properties for rendering suggestions.
|
|
103
|
-
*
|
|
104
|
-
* @public
|
|
105
|
-
*/
|
|
106
|
-
export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
|
|
107
|
-
props: AutocompleteProps<Option> &
|
|
108
|
-
Omit<
|
|
109
|
-
HTMLProps<HTMLInputElement>,
|
|
110
|
-
| 'aria-activedescendant'
|
|
111
|
-
| 'aria-autocomplete'
|
|
112
|
-
| 'aria-expanded'
|
|
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
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @internal
|
|
136
|
-
*/
|
|
137
|
-
export declare interface AutocompleteInputChangeMsg {
|
|
138
|
-
type: 'input/change'
|
|
139
|
-
query: string | null
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @internal
|
|
144
|
-
*/
|
|
145
|
-
export declare interface AutocompleteInputFoocusMsg {
|
|
146
|
-
type: 'input/focus'
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @internal
|
|
151
|
-
*/
|
|
152
|
-
export declare type AutocompleteMsg =
|
|
153
|
-
| AutocompleteRootBlurMsg
|
|
154
|
-
| AutocompleteRootClearMsg
|
|
155
|
-
| AutocompleteRootEscapeMsg
|
|
156
|
-
| AutocompleteRootOpenMsg
|
|
157
|
-
| AutocompleteRootSetActiveValueMsg
|
|
158
|
-
| AutocompleteRootSetListFocusedMsg
|
|
159
|
-
| AutocompleteInputChangeMsg
|
|
160
|
-
| AutocompleteInputFoocusMsg
|
|
161
|
-
| AutocompleteValueChangeMsg
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* @public
|
|
165
|
-
*/
|
|
166
|
-
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps, 'as'> &
|
|
167
|
-
Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
export declare interface AutocompleteProps<
|
|
173
|
-
Option extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
174
|
-
> {
|
|
175
|
-
border?: boolean
|
|
176
|
-
customValidity?: string
|
|
177
|
-
filterOption?: (query: string, option: Option) => boolean
|
|
178
|
-
fontSize?: number | number[]
|
|
179
|
-
icon?: ElementType | ReactNode
|
|
180
|
-
id: string
|
|
181
|
-
/** @beta */
|
|
182
|
-
listBox?: BoxProps
|
|
183
|
-
loading?: boolean
|
|
184
|
-
onChange?: (value: string) => void
|
|
185
|
-
onQueryChange?: (query: string | null) => void
|
|
186
|
-
onSelect?: (value: string) => void
|
|
187
|
-
/** @beta */
|
|
188
|
-
openButton?: boolean | AutocompleteOpenButtonProps
|
|
189
|
-
/** @beta */
|
|
190
|
-
openOnFocus?: boolean
|
|
191
|
-
/** The options to render. */
|
|
192
|
-
options?: Option[]
|
|
193
|
-
padding?: number | number[]
|
|
194
|
-
popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> &
|
|
195
|
-
Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>
|
|
196
|
-
prefix?: ReactNode
|
|
197
|
-
radius?: Radius | Radius[]
|
|
198
|
-
/** @beta */
|
|
199
|
-
relatedElements?: HTMLElement[]
|
|
200
|
-
/** The callback function for rendering each option. */
|
|
201
|
-
renderOption?: (option: Option) => React.JSX.Element
|
|
202
|
-
/** @beta */
|
|
203
|
-
renderPopover?: (
|
|
204
|
-
props: {
|
|
205
|
-
content: React.JSX.Element | null
|
|
206
|
-
hidden: boolean
|
|
207
|
-
inputElement: HTMLInputElement | null
|
|
208
|
-
onMouseEnter: () => void
|
|
209
|
-
onMouseLeave: () => void
|
|
210
|
-
},
|
|
211
|
-
ref: Ref<HTMLDivElement>,
|
|
212
|
-
) => ReactNode
|
|
213
|
-
renderValue?: (value: string, option?: Option) => string
|
|
214
|
-
suffix?: ReactNode
|
|
215
|
-
/** The current value. */
|
|
216
|
-
value?: string
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
export declare interface AutocompleteRootBlurMsg {
|
|
223
|
-
type: 'root/blur'
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @internal
|
|
228
|
-
*/
|
|
229
|
-
export declare interface AutocompleteRootClearMsg {
|
|
230
|
-
type: 'root/clear'
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @internal
|
|
235
|
-
*/
|
|
236
|
-
export declare interface AutocompleteRootEscapeMsg {
|
|
237
|
-
type: 'root/escape'
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @internal
|
|
242
|
-
*/
|
|
243
|
-
export declare interface AutocompleteRootOpenMsg {
|
|
244
|
-
type: 'root/open'
|
|
245
|
-
query: string | null
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @internal
|
|
250
|
-
*/
|
|
251
|
-
export declare interface AutocompleteRootSetActiveValueMsg {
|
|
252
|
-
type: 'root/setActiveValue'
|
|
253
|
-
value: string
|
|
254
|
-
listFocused?: boolean
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @internal
|
|
259
|
-
*/
|
|
260
|
-
export declare interface AutocompleteRootSetListFocusedMsg {
|
|
261
|
-
type: 'root/setListFocused'
|
|
262
|
-
listFocused: boolean
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @internal
|
|
267
|
-
*/
|
|
268
|
-
export declare interface AutocompleteState {
|
|
269
|
-
activeValue: string | null
|
|
270
|
-
focused: boolean
|
|
271
|
-
listFocused: boolean
|
|
272
|
-
query: string | null
|
|
273
|
-
value: string | null
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* @internal
|
|
278
|
-
*/
|
|
279
|
-
export declare interface AutocompleteValueChangeMsg {
|
|
280
|
-
type: 'value/change'
|
|
281
|
-
value: string | null
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Avatars are used to represent people and other agents (e.g. bots).
|
|
286
|
-
*
|
|
287
|
-
* @public
|
|
288
|
-
*/
|
|
289
|
-
export declare const Avatar: ForwardRefExoticComponent<
|
|
290
|
-
AvatarProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
291
|
-
>
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare const AvatarCounter: ForwardRefExoticComponent<
|
|
297
|
-
AvatarCounterProps & RefAttributes<HTMLDivElement>
|
|
298
|
-
>
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* @public
|
|
302
|
-
*/
|
|
303
|
-
export declare interface AvatarCounterProps {
|
|
304
|
-
count: number
|
|
305
|
-
size?: AvatarSize | AvatarSize[]
|
|
306
|
-
/** @deprecated No longer supported. */
|
|
307
|
-
tone?: 'navbar'
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* @public
|
|
312
|
-
*/
|
|
313
|
-
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* @public
|
|
317
|
-
*/
|
|
318
|
-
export declare interface AvatarProps {
|
|
319
|
-
/** @beta */
|
|
320
|
-
__unstable_hideInnerStroke?: boolean
|
|
321
|
-
animateArrowFrom?: AvatarPosition
|
|
322
|
-
arrowPosition?: AvatarPosition
|
|
323
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
324
|
-
color?: ThemeColorAvatarColorKey
|
|
325
|
-
initials?: string
|
|
326
|
-
onImageLoadError?: (event: Error) => void
|
|
327
|
-
size?: AvatarSize | AvatarSize[]
|
|
328
|
-
src?: string
|
|
329
|
-
/**
|
|
330
|
-
* The status of the entity this Avatar represents.
|
|
331
|
-
* @alpha
|
|
332
|
-
*/
|
|
333
|
-
status?: AvatarStatus
|
|
334
|
-
title?: string
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @internal
|
|
339
|
-
*/
|
|
340
|
-
export declare interface AvatarRootStyleProps {
|
|
341
|
-
$color: ThemeColorAvatarColorKey
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* @public
|
|
346
|
-
*/
|
|
347
|
-
export declare type AvatarSize = 0 | 1 | 2 | 3
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* @public
|
|
351
|
-
*/
|
|
352
|
-
export declare const AvatarStack: ForwardRefExoticComponent<
|
|
353
|
-
AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
354
|
-
>
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* @public
|
|
358
|
-
*/
|
|
359
|
-
export declare interface AvatarStackProps {
|
|
360
|
-
children: React.ReactNode
|
|
361
|
-
maxLength?: number
|
|
362
|
-
size?: AvatarSize | AvatarSize[]
|
|
363
|
-
/** @deprecated No longer supported. */
|
|
364
|
-
tone?: 'navbar'
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* @public
|
|
369
|
-
*/
|
|
370
|
-
export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Badges are used to tag resources.
|
|
374
|
-
*
|
|
375
|
-
* @public
|
|
376
|
-
*/
|
|
377
|
-
export declare const Badge: ForwardRefExoticComponent<
|
|
378
|
-
Omit<BadgeProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<unknown>
|
|
379
|
-
>
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* @public
|
|
383
|
-
* @deprecated No longer used
|
|
384
|
-
*/
|
|
385
|
-
export declare type BadgeMode = 'default' | 'outline'
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* @public
|
|
389
|
-
*/
|
|
390
|
-
export declare interface BadgeProps extends BoxProps, ResponsiveRadiusProps {
|
|
391
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
392
|
-
fontSize?: number | number[]
|
|
393
|
-
/** @deprecated No longer used. */
|
|
394
|
-
mode?: BadgeMode
|
|
395
|
-
tone?: BadgeTone
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* @public
|
|
400
|
-
*/
|
|
401
|
-
export declare type BadgeTone = ThemeColorStateToneKey
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* @public
|
|
405
|
-
*/
|
|
406
|
-
export declare interface BaseAutocompleteOption {
|
|
407
|
-
value: string
|
|
408
|
-
}
|
|
409
|
-
|
|
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
|
-
*/
|
|
419
|
-
export declare interface BoundaryElementContextValue {
|
|
420
|
-
version: 0.0
|
|
421
|
-
element: HTMLElement | null
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @public
|
|
426
|
-
*/
|
|
427
|
-
export declare function BoundaryElementProvider(
|
|
428
|
-
props: BoundaryElementProviderProps,
|
|
429
|
-
): React.JSX.Element
|
|
430
|
-
|
|
431
|
-
export declare namespace BoundaryElementProvider {
|
|
432
|
-
var displayName: string
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* @public
|
|
437
|
-
*/
|
|
438
|
-
export declare interface BoundaryElementProviderProps {
|
|
439
|
-
children: React.ReactNode
|
|
440
|
-
element: HTMLElement | null
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* The `Box` component is a basic layout wrapper component which provides utility properties
|
|
445
|
-
* for flex, margins and padding.
|
|
446
|
-
*
|
|
447
|
-
* @public
|
|
448
|
-
*/
|
|
449
|
-
export declare const Box: ForwardRefExoticComponent<
|
|
450
|
-
Omit<BoxProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
451
|
-
RefAttributes<HTMLDivElement>
|
|
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'
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* @public
|
|
466
|
-
*/
|
|
467
|
-
export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* @public
|
|
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
|
-
}
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* @public
|
|
484
|
-
* @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
|
|
485
|
-
*/
|
|
486
|
-
export declare type BoxShadow = ThemeBoxShadow
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* @public
|
|
490
|
-
*/
|
|
491
|
-
export declare type BoxSizing = 'content' | 'border'
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* @beta
|
|
495
|
-
*/
|
|
496
|
-
export declare const Breadcrumbs: ForwardRefExoticComponent<
|
|
497
|
-
BreadcrumbsProps &
|
|
498
|
-
Omit<HTMLProps<HTMLOListElement>, 'type' | 'ref' | 'as'> &
|
|
499
|
-
RefAttributes<HTMLOListElement>
|
|
500
|
-
>
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* @beta
|
|
504
|
-
*/
|
|
505
|
-
export declare interface BreadcrumbsProps {
|
|
506
|
-
maxLength?: number
|
|
507
|
-
separator?: React.ReactNode
|
|
508
|
-
space?: number | number[]
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* @public
|
|
513
|
-
*/
|
|
514
|
-
export declare const Button: ForwardRefExoticComponent<
|
|
515
|
-
Omit<ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'width' | 'as'>, 'ref'> &
|
|
516
|
-
RefAttributes<HTMLButtonElement>
|
|
517
|
-
>
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* @public
|
|
521
|
-
*/
|
|
522
|
-
export declare type ButtonMode = ThemeColorButtonModeKey_2
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* @public
|
|
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
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @public
|
|
551
|
-
*/
|
|
552
|
-
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* @public
|
|
556
|
-
*/
|
|
557
|
-
export declare type ButtonTone = ThemeColorStateToneKey
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* @public
|
|
561
|
-
*/
|
|
562
|
-
export declare type ButtonWidth = 'fill'
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* The `Card` component acts much like a `Box`, but with a background and foreground color.
|
|
566
|
-
* Components within a `Card` inherit its colors.
|
|
567
|
-
*
|
|
568
|
-
* @public
|
|
569
|
-
*/
|
|
570
|
-
export declare const Card: ForwardRefExoticComponent<
|
|
571
|
-
Omit<CardProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
572
|
-
RefAttributes<HTMLDivElement>
|
|
573
|
-
>
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* @public
|
|
577
|
-
*/
|
|
578
|
-
export declare interface CardProps
|
|
579
|
-
extends BoxProps,
|
|
580
|
-
ResponsiveBorderProps,
|
|
581
|
-
ResponsiveRadiusProps,
|
|
582
|
-
ResponsiveShadowProps {
|
|
583
|
-
/**
|
|
584
|
-
* Do not use in production.
|
|
585
|
-
* @beta
|
|
586
|
-
*/
|
|
587
|
-
__unstable_checkered?: boolean
|
|
588
|
-
/**
|
|
589
|
-
* Do not use in production.
|
|
590
|
-
* @beta
|
|
591
|
-
*/
|
|
592
|
-
__unstable_focusRing?: boolean
|
|
593
|
-
muted?: boolean
|
|
594
|
-
pressed?: boolean
|
|
595
|
-
scheme?: ThemeColorSchemeKey_2
|
|
596
|
-
tone?: CardTone
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* @internal
|
|
601
|
-
*/
|
|
602
|
-
export declare interface CardStyleProps {
|
|
603
|
-
$checkered: boolean
|
|
604
|
-
$focusRing: boolean
|
|
605
|
-
$muted: boolean
|
|
606
|
-
$tone: ThemeColorToneKey
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* @public
|
|
611
|
-
*/
|
|
612
|
-
export declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
616
|
-
*
|
|
617
|
-
* @public
|
|
618
|
-
*/
|
|
619
|
-
export declare const Checkbox: ForwardRefExoticComponent<
|
|
620
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & CheckboxProps, 'ref'> &
|
|
621
|
-
RefAttributes<HTMLInputElement>
|
|
622
|
-
>
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* @public
|
|
626
|
-
*/
|
|
627
|
-
export declare interface CheckboxProps {
|
|
628
|
-
indeterminate?: boolean
|
|
629
|
-
customValidity?: string
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* @public
|
|
634
|
-
*/
|
|
635
|
-
export declare type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* @public
|
|
639
|
-
*/
|
|
640
|
-
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* @public
|
|
644
|
-
*/
|
|
645
|
-
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* @public
|
|
649
|
-
*/
|
|
650
|
-
export declare type ClickOutsideListener = (event: MouseEvent) => void
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* @public
|
|
654
|
-
*/
|
|
655
|
-
export declare const Code: ForwardRefExoticComponent<
|
|
656
|
-
Omit<CodeProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> & RefAttributes<HTMLElement>
|
|
657
|
-
>
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* @public
|
|
661
|
-
*/
|
|
662
|
-
export declare interface CodeProps {
|
|
663
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
664
|
-
/** Define the language to use for syntax highlighting. */
|
|
665
|
-
language?: string
|
|
666
|
-
size?: number | number[]
|
|
667
|
-
weight?: string
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
672
|
-
* @beta
|
|
673
|
-
*/
|
|
674
|
-
export declare const CodeSkeleton: ForwardRefExoticComponent<
|
|
675
|
-
Omit<
|
|
676
|
-
CodeSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'size' | 'children' | 'as'>,
|
|
677
|
-
'ref'
|
|
678
|
-
> &
|
|
679
|
-
RefAttributes<HTMLDivElement>
|
|
680
|
-
>
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
684
|
-
* @beta
|
|
685
|
-
*/
|
|
686
|
-
export declare interface CodeSkeletonProps extends SkeletonProps {
|
|
687
|
-
size?: number | number[]
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @internal
|
|
692
|
-
* @deprecated this component will be removed in the next major release
|
|
693
|
-
*/
|
|
694
|
-
export declare function ConditionalWrapper({
|
|
695
|
-
children,
|
|
696
|
-
condition,
|
|
697
|
-
wrapper,
|
|
698
|
-
}: {
|
|
699
|
-
children: React.ReactNode
|
|
700
|
-
condition: boolean
|
|
701
|
-
wrapper: (children: React.ReactNode) => React.ReactNode
|
|
702
|
-
}): React.ReactNode
|
|
703
|
-
|
|
704
|
-
export declare namespace ConditionalWrapper {
|
|
705
|
-
var displayName: string
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* The `Container` component wraps content layout in a defined set of widths.
|
|
710
|
-
*
|
|
711
|
-
* @public
|
|
712
|
-
*/
|
|
713
|
-
export declare const Container: ForwardRefExoticComponent<
|
|
714
|
-
Omit<ContainerProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'as'>, 'ref'> &
|
|
715
|
-
RefAttributes<HTMLDivElement>
|
|
716
|
-
>
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* @public
|
|
720
|
-
*/
|
|
721
|
-
export declare interface ContainerProps extends BoxProps, ResponsiveWidthProps {}
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* @internal
|
|
725
|
-
*/
|
|
726
|
-
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* @public
|
|
730
|
-
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
731
|
-
*/
|
|
732
|
-
export declare const createColorTheme: typeof createColorTheme_2
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* @public
|
|
736
|
-
*/
|
|
737
|
-
export declare type Delay =
|
|
738
|
-
| number
|
|
739
|
-
| Partial<{
|
|
740
|
-
open: number
|
|
741
|
-
close: number
|
|
742
|
-
}>
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* The Dialog component.
|
|
746
|
-
*
|
|
747
|
-
* @public
|
|
748
|
-
*/
|
|
749
|
-
export declare const Dialog: ForwardRefExoticComponent<
|
|
750
|
-
Omit<DialogProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'width' | 'as'>, 'ref'> &
|
|
751
|
-
RefAttributes<HTMLDivElement>
|
|
752
|
-
>
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* @internal
|
|
756
|
-
*/
|
|
757
|
-
export declare const DialogContext: Context<DialogContextValue>
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
761
|
-
* @beta
|
|
762
|
-
*/
|
|
763
|
-
export declare interface DialogContextValue {
|
|
764
|
-
version: 0.0
|
|
765
|
-
position?: DialogPosition | DialogPosition[]
|
|
766
|
-
zOffset?: number | number[]
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* @public
|
|
771
|
-
*/
|
|
772
|
-
export declare type DialogPosition = 'absolute' | 'fixed'
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* @public
|
|
776
|
-
*/
|
|
777
|
-
export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
|
|
778
|
-
/**
|
|
779
|
-
* @beta
|
|
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
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
811
|
-
* @beta
|
|
812
|
-
*/
|
|
813
|
-
export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element
|
|
814
|
-
|
|
815
|
-
export declare namespace DialogProvider {
|
|
816
|
-
var displayName: string
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
821
|
-
* @beta
|
|
822
|
-
*/
|
|
823
|
-
export declare interface DialogProviderProps {
|
|
824
|
-
children?: React.ReactNode
|
|
825
|
-
position?: DialogPosition | DialogPosition[]
|
|
826
|
-
zOffset?: number | number[]
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* DO NOT USE IN PRODUCTION.
|
|
831
|
-
* @beta
|
|
832
|
-
*/
|
|
833
|
-
export declare const ElementQuery: ForwardRefExoticComponent<
|
|
834
|
-
Omit<MediaQueryProps & Omit<HTMLProps<HTMLDivElement>, 'media' | 'as'>, 'ref'> &
|
|
835
|
-
RefAttributes<HTMLDivElement>
|
|
836
|
-
>
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* @beta
|
|
840
|
-
*/
|
|
841
|
-
export declare interface ElementRectValue {
|
|
842
|
-
width: number
|
|
843
|
-
height: number
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* @beta
|
|
848
|
-
*/
|
|
849
|
-
export declare interface ElementSize {
|
|
850
|
-
content: ElementRectValue
|
|
851
|
-
border: ElementRectValue
|
|
852
|
-
/** @deprecated INTERNAL ONLY */
|
|
853
|
-
_contentRect: DOMRectReadOnly
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* @internal
|
|
858
|
-
*/
|
|
859
|
-
export declare interface _ElementSizeListener {
|
|
860
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* @internal
|
|
865
|
-
*/
|
|
866
|
-
export declare interface _ElementSizeObserver {
|
|
867
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* @internal
|
|
872
|
-
*/
|
|
873
|
-
export declare const _elementSizeObserver: _ElementSizeObserver
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
* @internal
|
|
877
|
-
*/
|
|
878
|
-
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* DO NOT USE IN PRODUCTION
|
|
882
|
-
* @beta
|
|
883
|
-
*/
|
|
884
|
-
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
885
|
-
state: ErrorBoundaryState
|
|
886
|
-
static getDerivedStateFromError(error: Error): ErrorBoundaryState
|
|
887
|
-
componentDidCatch(error: Error, info: React.ErrorInfo): void
|
|
888
|
-
render(): React.ReactNode
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* DO NOT USE IN PRODUCTION
|
|
893
|
-
* @beta
|
|
894
|
-
*/
|
|
895
|
-
export declare type ErrorBoundaryProps = PropsWithChildren<{
|
|
896
|
-
onCatch: (params: {error: Error; info: React.ErrorInfo}) => void
|
|
897
|
-
}>
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* DO NOT USE IN PRODUCTION
|
|
901
|
-
* @beta
|
|
902
|
-
*/
|
|
903
|
-
export declare interface ErrorBoundaryState {
|
|
904
|
-
error: Error | null
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* @internal
|
|
909
|
-
*/
|
|
910
|
-
export declare function _fillCSSObject(
|
|
911
|
-
keys: string[],
|
|
912
|
-
value: string | number | CSSObject,
|
|
913
|
-
): CSSObject
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
917
|
-
*
|
|
918
|
-
* @public
|
|
919
|
-
*/
|
|
920
|
-
export declare const Flex: ForwardRefExoticComponent<
|
|
921
|
-
Omit<FlexProps & Omit<HTMLProps<HTMLDivElement>, 'wrap' | 'as'>, 'ref'> &
|
|
922
|
-
RefAttributes<HTMLDivElement>
|
|
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'
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* @public
|
|
937
|
-
*/
|
|
938
|
-
export declare type FlexJustify =
|
|
939
|
-
| 'flex-start'
|
|
940
|
-
| 'flex-end'
|
|
941
|
-
| 'center'
|
|
942
|
-
| 'space-between'
|
|
943
|
-
| 'space-around'
|
|
944
|
-
| 'space-evenly'
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* @public
|
|
948
|
-
*/
|
|
949
|
-
export declare interface FlexProps
|
|
950
|
-
extends Omit<BoxProps, 'display'>,
|
|
951
|
-
ResponsiveFlexProps,
|
|
952
|
-
ResponsiveFlexItemProps {
|
|
953
|
-
gap?: number | number[]
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* @public
|
|
958
|
-
*/
|
|
959
|
-
export declare type FlexValue = number | 'none' | 'auto' | 'initial'
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* @public
|
|
963
|
-
*/
|
|
964
|
-
export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* @internal
|
|
968
|
-
*/
|
|
969
|
-
export declare function focusFirstDescendant(element: HTMLElement): boolean
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* @internal
|
|
973
|
-
*/
|
|
974
|
-
export declare function focusLastDescendant(element: HTMLElement): boolean
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* @internal
|
|
978
|
-
*/
|
|
979
|
-
export declare interface FontWeightStyleProps {
|
|
980
|
-
$weight?: ThemeFontWeightKey_2
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* @internal
|
|
985
|
-
*/
|
|
986
|
-
export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* @internal
|
|
990
|
-
*/
|
|
991
|
-
export declare function _getResponsiveSpace(
|
|
992
|
-
theme: Theme_2,
|
|
993
|
-
props: string[],
|
|
994
|
-
spaceIndexes?: number[],
|
|
995
|
-
): CSSObject[] | null
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
999
|
-
*
|
|
1000
|
-
* @public
|
|
1001
|
-
*/
|
|
1002
|
-
export declare const Grid: ForwardRefExoticComponent<
|
|
1003
|
-
Omit<GridProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'rows'>, 'ref'> &
|
|
1004
|
-
RefAttributes<HTMLDivElement>
|
|
1005
|
-
>
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* @public
|
|
1009
|
-
*/
|
|
1010
|
-
export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
* @public
|
|
1014
|
-
*/
|
|
1015
|
-
export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* @public
|
|
1019
|
-
*/
|
|
1020
|
-
export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
|
|
1021
|
-
|
|
1022
|
-
/**
|
|
1023
|
-
* @public
|
|
1024
|
-
*/
|
|
1025
|
-
export declare type GridItemColumn = 'auto' | 'full' | number
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* @public
|
|
1029
|
-
*/
|
|
1030
|
-
export declare type GridItemColumnEnd = 'auto' | number
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* @public
|
|
1034
|
-
*/
|
|
1035
|
-
export declare type GridItemColumnStart = 'auto' | number
|
|
1036
|
-
|
|
1037
|
-
/**
|
|
1038
|
-
* @public
|
|
1039
|
-
*/
|
|
1040
|
-
export declare type GridItemRow = 'auto' | 'full' | number
|
|
1041
|
-
|
|
1042
|
-
/**
|
|
1043
|
-
* @public
|
|
1044
|
-
*/
|
|
1045
|
-
export declare type GridItemRowEnd = 'auto' | number
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* @public
|
|
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
|
|
1059
|
-
*/
|
|
1060
|
-
export declare function _hasFocus(element: HTMLElement): boolean
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* Typographic headings.
|
|
1064
|
-
*
|
|
1065
|
-
* @public
|
|
1066
|
-
*/
|
|
1067
|
-
export declare const Heading: ForwardRefExoticComponent<
|
|
1068
|
-
Omit<HeadingProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> &
|
|
1069
|
-
RefAttributes<HTMLElement>
|
|
1070
|
-
>
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* @public
|
|
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
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1092
|
-
* @beta
|
|
1093
|
-
*/
|
|
1094
|
-
export declare const HeadingSkeleton: ForwardRefExoticComponent<
|
|
1095
|
-
Omit<
|
|
1096
|
-
HeadingSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'size' | 'children' | 'as'>,
|
|
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
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
1118
|
-
*
|
|
1119
|
-
* @public
|
|
1120
|
-
*/
|
|
1121
|
-
export declare const Hotkeys: ForwardRefExoticComponent<
|
|
1122
|
-
HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLElement>
|
|
1123
|
-
>
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* @public
|
|
1127
|
-
*/
|
|
1128
|
-
export declare interface HotkeysProps {
|
|
1129
|
-
fontSize?: number | number[]
|
|
1130
|
-
padding?: number | number[]
|
|
1131
|
-
radius?: Radius | Radius[]
|
|
1132
|
-
space?: number | number[]
|
|
1133
|
-
keys?: string[]
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
/**
|
|
1137
|
-
* @public
|
|
1138
|
-
* @deprecated Use `HSL` from `@sanity/ui/theme` instead.
|
|
1139
|
-
*/
|
|
1140
|
-
export declare type HSL = HSL_2
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* @public
|
|
1144
|
-
* @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
|
|
1145
|
-
*/
|
|
1146
|
-
export declare const hslToRgb: typeof hslToRgb_2
|
|
1147
|
-
|
|
1148
|
-
/**
|
|
1149
|
-
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
1150
|
-
*
|
|
1151
|
-
* @public
|
|
1152
|
-
*/
|
|
1153
|
-
export declare const Inline: ForwardRefExoticComponent<
|
|
1154
|
-
Omit<InlineProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<unknown>
|
|
1155
|
-
>
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1158
|
-
* @public
|
|
1159
|
-
*/
|
|
1160
|
-
export declare interface InlineProps extends Omit<BoxProps, 'display'> {
|
|
1161
|
-
/** The spacing between children. */
|
|
1162
|
-
space?: number | number[]
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
/**
|
|
1166
|
-
* @internal
|
|
1167
|
-
*/
|
|
1168
|
-
export declare function _isEnterToClickElement(element: HTMLElement): boolean
|
|
1169
|
-
|
|
1170
|
-
/**
|
|
1171
|
-
* @internal
|
|
1172
|
-
*/
|
|
1173
|
-
export declare function isFocusable(element: HTMLElement): boolean
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* @internal
|
|
1177
|
-
*/
|
|
1178
|
-
export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
|
|
1179
|
-
|
|
1180
|
-
/**
|
|
1181
|
-
* @internal
|
|
1182
|
-
*/
|
|
1183
|
-
export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* @internal
|
|
1187
|
-
*/
|
|
1188
|
-
export declare function isHTMLElement(node: unknown): node is HTMLElement
|
|
1189
|
-
|
|
1190
|
-
/**
|
|
1191
|
-
* @internal
|
|
1192
|
-
*/
|
|
1193
|
-
export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* @internal
|
|
1197
|
-
*/
|
|
1198
|
-
export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* @internal
|
|
1202
|
-
*/
|
|
1203
|
-
export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement
|
|
1204
|
-
|
|
1205
|
-
/**
|
|
1206
|
-
* @internal
|
|
1207
|
-
*/
|
|
1208
|
-
export declare function _isScrollable(el: Node): boolean
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* Used to define some text as keyboard input.
|
|
1212
|
-
*
|
|
1213
|
-
* @public
|
|
1214
|
-
*/
|
|
1215
|
-
export declare const KBD: ForwardRefExoticComponent<
|
|
1216
|
-
KBDProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
1217
|
-
>
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* @public
|
|
1221
|
-
*/
|
|
1222
|
-
export declare interface KBDProps {
|
|
1223
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1224
|
-
fontSize?: number | number[]
|
|
1225
|
-
padding?: number | number[]
|
|
1226
|
-
radius?: Radius | Radius[]
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* Typographic labels.
|
|
1231
|
-
*
|
|
1232
|
-
* @public
|
|
1233
|
-
*/
|
|
1234
|
-
export declare const Label: ForwardRefExoticComponent<
|
|
1235
|
-
Omit<LabelProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
|
|
1236
|
-
RefAttributes<HTMLDivElement>
|
|
1237
|
-
>
|
|
1238
|
-
|
|
1239
|
-
/**
|
|
1240
|
-
* @public
|
|
1241
|
-
*/
|
|
1242
|
-
export declare interface LabelProps {
|
|
1243
|
-
accent?: boolean
|
|
1244
|
-
align?: TextAlign | TextAlign[]
|
|
1245
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1246
|
-
muted?: boolean
|
|
1247
|
-
size?: number | number[]
|
|
1248
|
-
/**
|
|
1249
|
-
* Controls how overflowing text is treated.
|
|
1250
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
1251
|
-
* @beta
|
|
1252
|
-
*/
|
|
1253
|
-
textOverflow?: 'ellipsis'
|
|
1254
|
-
weight?: ThemeFontWeightKey_2
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
/**
|
|
1258
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1259
|
-
* @beta
|
|
1260
|
-
*/
|
|
1261
|
-
export declare const LabelSkeleton: ForwardRefExoticComponent<
|
|
1262
|
-
Omit<
|
|
1263
|
-
LabelSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'size' | 'children' | 'as'>,
|
|
1264
|
-
'ref'
|
|
1265
|
-
> &
|
|
1266
|
-
RefAttributes<HTMLDivElement>
|
|
1267
|
-
>
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1271
|
-
* @beta
|
|
1272
|
-
*/
|
|
1273
|
-
export declare interface LabelSkeletonProps extends SkeletonProps {
|
|
1274
|
-
size?: number | number[]
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* @public
|
|
1279
|
-
*/
|
|
1280
|
-
export declare const Layer: ForwardRefExoticComponent<
|
|
1281
|
-
Omit<LayerProps & Omit<HTMLProps<HTMLDivElement>, 'as'>, 'ref'> & RefAttributes<HTMLDivElement>
|
|
1282
|
-
>
|
|
1283
|
-
|
|
1284
|
-
/** @public */
|
|
1285
|
-
export declare interface LayerContextValue {
|
|
1286
|
-
version: 0.0
|
|
1287
|
-
isTopLayer: boolean
|
|
1288
|
-
level?: number
|
|
1289
|
-
registerChild: (childLevel?: number) => () => void
|
|
1290
|
-
size: number
|
|
1291
|
-
zIndex: number
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
/**
|
|
1295
|
-
* @public
|
|
1296
|
-
*/
|
|
1297
|
-
export declare interface LayerProps {
|
|
1298
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1299
|
-
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1300
|
-
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1301
|
-
zOffset?: number | number[]
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
/**
|
|
1305
|
-
* @public
|
|
1306
|
-
*/
|
|
1307
|
-
export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
|
|
1308
|
-
|
|
1309
|
-
export declare namespace LayerProvider {
|
|
1310
|
-
var displayName: string
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* @public
|
|
1315
|
-
*/
|
|
1316
|
-
export declare interface LayerProviderProps {
|
|
1317
|
-
children?: React.ReactNode
|
|
1318
|
-
zOffset?: number | 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[]
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1331
|
-
* @internal
|
|
1332
|
-
*/
|
|
1333
|
-
export declare interface _MediaStore {
|
|
1334
|
-
subscribe: (onStoreChange: () => void) => () => void
|
|
1335
|
-
getSnapshot: () => number
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
/**
|
|
1339
|
-
* The `Menu` component is a building block for application menus.
|
|
1340
|
-
*
|
|
1341
|
-
* @public
|
|
1342
|
-
*/
|
|
1343
|
-
export declare const Menu: ForwardRefExoticComponent<
|
|
1344
|
-
Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'role' | 'as'>, 'ref'> &
|
|
1345
|
-
RefAttributes<HTMLDivElement>
|
|
1346
|
-
>
|
|
1347
|
-
|
|
1348
|
-
/**
|
|
1349
|
-
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1350
|
-
*
|
|
1351
|
-
* @public
|
|
1352
|
-
*/
|
|
1353
|
-
export declare const MenuButton: ForwardRefExoticComponent<
|
|
1354
|
-
MenuButtonProps & RefAttributes<HTMLButtonElement | null>
|
|
1355
|
-
>
|
|
1356
|
-
|
|
1357
|
-
/**
|
|
1358
|
-
* @public
|
|
1359
|
-
*/
|
|
1360
|
-
export declare interface MenuButtonProps {
|
|
1361
|
-
/**
|
|
1362
|
-
* @beta Do not use in production.
|
|
1363
|
-
*/
|
|
1364
|
-
__unstable_disableRestoreFocusOnClose?: boolean
|
|
1365
|
-
/**
|
|
1366
|
-
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1367
|
-
*/
|
|
1368
|
-
boundaryElement?: HTMLElement
|
|
1369
|
-
button: React.JSX.Element
|
|
1370
|
-
id: string
|
|
1371
|
-
menu?: React.JSX.Element
|
|
1372
|
-
onClose?: () => void
|
|
1373
|
-
onOpen?: () => void
|
|
1374
|
-
/**
|
|
1375
|
-
* @deprecated Use `popover={{placement: 'top'}}` instead.
|
|
1376
|
-
*/
|
|
1377
|
-
placement?: Placement
|
|
1378
|
-
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
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* @public
|
|
1400
|
-
*/
|
|
1401
|
-
export declare const MenuDivider: IStyledComponentBase<
|
|
1402
|
-
'web',
|
|
1403
|
-
FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLHRElement>, HTMLHRElement>, never>
|
|
1404
|
-
> &
|
|
1405
|
-
string
|
|
1406
|
-
|
|
1407
|
-
/**
|
|
1408
|
-
* @public
|
|
1409
|
-
*/
|
|
1410
|
-
export declare function MenuGroup(
|
|
1411
|
-
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
1412
|
-
MenuGroupProps,
|
|
1413
|
-
): React.JSX.Element
|
|
1414
|
-
|
|
1415
|
-
export declare namespace MenuGroup {
|
|
1416
|
-
var displayName: string
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
/**
|
|
1420
|
-
* @public
|
|
1421
|
-
*/
|
|
1422
|
-
export declare interface MenuGroupProps {
|
|
1423
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
1424
|
-
fontSize?: number | number[]
|
|
1425
|
-
icon?: React.ElementType | React.ReactNode
|
|
1426
|
-
menu?: Omit<
|
|
1427
|
-
MenuProps,
|
|
1428
|
-
| 'onClickOutside'
|
|
1429
|
-
| 'onEscape'
|
|
1430
|
-
| 'onItemClick'
|
|
1431
|
-
| 'onKeyDown'
|
|
1432
|
-
| 'onMouseEnter'
|
|
1433
|
-
| 'registerElement'
|
|
1434
|
-
| 'shouldFocus'
|
|
1435
|
-
| 'onBlurCapture'
|
|
1436
|
-
>
|
|
1437
|
-
padding?: number | number[]
|
|
1438
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1439
|
-
radius?: Radius | Radius[]
|
|
1440
|
-
space?: number | number[]
|
|
1441
|
-
text: React.ReactNode
|
|
1442
|
-
tone?: SelectableTone
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
/**
|
|
1446
|
-
* @public
|
|
1447
|
-
*/
|
|
1448
|
-
export declare const MenuItem: ForwardRefExoticComponent<
|
|
1449
|
-
MenuItemProps &
|
|
1450
|
-
Omit<HTMLProps<HTMLDivElement>, 'selected' | 'height' | 'ref' | 'tabIndex' | 'as'> &
|
|
1451
|
-
RefAttributes<HTMLDivElement>
|
|
1452
|
-
>
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* @public
|
|
1456
|
-
*/
|
|
1457
|
-
export declare interface MenuItemProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
|
|
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
|
-
}
|
|
1469
|
-
|
|
1470
|
-
/**
|
|
1471
|
-
* @public
|
|
1472
|
-
*/
|
|
1473
|
-
export declare interface MenuProps extends ResponsivePaddingProps {
|
|
1474
|
-
/**
|
|
1475
|
-
* @deprecated Use `shouldFocus="first"` instead.
|
|
1476
|
-
*/
|
|
1477
|
-
'focusFirst'?: boolean
|
|
1478
|
-
/**
|
|
1479
|
-
* @deprecated Use `shouldFocus="last"` instead.
|
|
1480
|
-
*/
|
|
1481
|
-
'focusLast'?: boolean
|
|
1482
|
-
'onClickOutside'?: (event: MouseEvent) => void
|
|
1483
|
-
'onEscape'?: () => void
|
|
1484
|
-
'onItemClick'?: () => void
|
|
1485
|
-
'onItemSelect'?: (index: number) => void
|
|
1486
|
-
'originElement'?: HTMLElement | null
|
|
1487
|
-
'registerElement'?: (el: HTMLElement) => () => void
|
|
1488
|
-
'shouldFocus'?: 'first' | 'last' | null
|
|
1489
|
-
'space'?: number | number[]
|
|
1490
|
-
'aria-labelledby'?: string
|
|
1491
|
-
'onBlurCapture'?: (event: FocusEvent) => void
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
/**
|
|
1495
|
-
* @public
|
|
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}
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* Placement of floating UI elements.
|
|
1510
|
-
*
|
|
1511
|
-
* @public
|
|
1512
|
-
*/
|
|
1513
|
-
export declare type Placement =
|
|
1514
|
-
| 'top'
|
|
1515
|
-
| 'top-start'
|
|
1516
|
-
| 'top-end'
|
|
1517
|
-
| 'right'
|
|
1518
|
-
| 'right-start'
|
|
1519
|
-
| 'right-end'
|
|
1520
|
-
| 'bottom'
|
|
1521
|
-
| 'bottom-start'
|
|
1522
|
-
| 'bottom-end'
|
|
1523
|
-
| 'left'
|
|
1524
|
-
| 'left-start'
|
|
1525
|
-
| 'left-end'
|
|
1526
|
-
|
|
1527
|
-
/**
|
|
1528
|
-
* The `Popover` component is used to display some content on top of another.
|
|
1529
|
-
*
|
|
1530
|
-
* @public
|
|
1531
|
-
*/
|
|
1532
|
-
export declare const Popover: NamedExoticComponent<
|
|
1533
|
-
Omit<
|
|
1534
|
-
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'children' | 'as'>,
|
|
1535
|
-
'ref'
|
|
1536
|
-
> &
|
|
1537
|
-
RefAttributes<HTMLDivElement>
|
|
1538
|
-
>
|
|
1539
|
-
|
|
1540
|
-
/**
|
|
1541
|
-
* @beta
|
|
1542
|
-
*/
|
|
1543
|
-
export declare type PopoverMargins = [number, number, number, number]
|
|
1544
|
-
|
|
1545
|
-
/** @public */
|
|
1546
|
-
export declare interface PopoverProps
|
|
1547
|
-
extends Omit<LayerProps, 'as'>,
|
|
1548
|
-
ResponsiveRadiusProps,
|
|
1549
|
-
ResponsiveShadowProps {
|
|
1550
|
-
/** @beta */
|
|
1551
|
-
__unstable_margins?: PopoverMargins
|
|
1552
|
-
/**
|
|
1553
|
-
* Whether the popover should animate in and out.
|
|
1554
|
-
*
|
|
1555
|
-
* @beta
|
|
1556
|
-
* @defaultValue false
|
|
1557
|
-
*/
|
|
1558
|
-
animate?: boolean
|
|
1559
|
-
arrow?: boolean
|
|
1560
|
-
/** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
|
|
1561
|
-
boundaryElement?: HTMLElement | null
|
|
1562
|
-
children?: React.JSX.Element
|
|
1563
|
-
/**
|
|
1564
|
-
* When `true`, prevent overflow within the current boundary:
|
|
1565
|
-
* - by flipping on its side axis
|
|
1566
|
-
* - by resizing
|
|
1567
|
-
/*
|
|
1568
|
-
* Note that:
|
|
1569
|
-
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1570
|
-
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1571
|
-
*
|
|
1572
|
-
* @defaultValue false
|
|
1573
|
-
*/
|
|
1574
|
-
constrainSize?: boolean
|
|
1575
|
-
content?: React.ReactNode
|
|
1576
|
-
disabled?: boolean
|
|
1577
|
-
fallbackPlacements?: Placement[]
|
|
1578
|
-
floatingBoundary?: HTMLElement | null
|
|
1579
|
-
/**
|
|
1580
|
-
* When `true`, set the maximum width to match the reference element, and also prevent overflow within
|
|
1581
|
-
* the current boundary by resizing.
|
|
1582
|
-
*
|
|
1583
|
-
* Note that setting `constrainSize` to `true` also causes the popover to resize
|
|
1584
|
-
*
|
|
1585
|
-
* @defaultValue false
|
|
1586
|
-
*/
|
|
1587
|
-
matchReferenceWidth?: boolean
|
|
1588
|
-
/**
|
|
1589
|
-
* When true, blocks all pointer interaction with elements beneath the popover until closed.
|
|
1590
|
-
*
|
|
1591
|
-
* @beta
|
|
1592
|
-
* @defaultValue false
|
|
1593
|
-
*/
|
|
1594
|
-
modal?: boolean
|
|
1595
|
-
open?: boolean
|
|
1596
|
-
overflow?: BoxOverflow
|
|
1597
|
-
padding?: number | number[]
|
|
1598
|
-
placement?: Placement
|
|
1599
|
-
/**
|
|
1600
|
-
* When 'flip' (default), the placement is determined from the initial placement and the
|
|
1601
|
-
* fallback placements in order. Whichever fits in the viewport first.
|
|
1602
|
-
*
|
|
1603
|
-
* When 'autoPlacement', the initial placement and all fallback placements are evaluated
|
|
1604
|
-
* and the placement with the most viewport space available.
|
|
1605
|
-
*
|
|
1606
|
-
* Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
|
|
1607
|
-
*/
|
|
1608
|
-
placementStrategy?: 'flip' | 'autoPlacement'
|
|
1609
|
-
/** Whether or not to render the popover in a portal element. */
|
|
1610
|
-
portal?: boolean | string
|
|
1611
|
-
preventOverflow?: boolean
|
|
1612
|
-
referenceBoundary?: HTMLElement | null
|
|
1613
|
-
/**
|
|
1614
|
-
* When defined, the popover will be positioned relative to this element.
|
|
1615
|
-
* The children of the popover won't be rendered.
|
|
1616
|
-
*/
|
|
1617
|
-
referenceElement?: HTMLElement | null
|
|
1618
|
-
scheme?: ThemeColorSchemeKey_2
|
|
1619
|
-
tone?: CardTone
|
|
1620
|
-
/** @beta */
|
|
1621
|
-
updateRef?:
|
|
1622
|
-
| MutableRefObject<PopoverUpdateCallback | undefined>
|
|
1623
|
-
| RefCallback<PopoverUpdateCallback | undefined>
|
|
1624
|
-
width?: PopoverWidth | PopoverWidth[]
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
/** @beta */
|
|
1628
|
-
export declare type PopoverUpdateCallback = () => void
|
|
1629
|
-
|
|
1630
|
-
/** @public */
|
|
1631
|
-
export declare type PopoverWidth = number | 'auto'
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* @public
|
|
1635
|
-
*/
|
|
1636
|
-
export declare function Portal(props: PortalProps): React.ReactPortal | null
|
|
1637
|
-
|
|
1638
|
-
export declare namespace Portal {
|
|
1639
|
-
var displayName: string
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* @public
|
|
1644
|
-
*/
|
|
1645
|
-
export declare interface PortalContextValue {
|
|
1646
|
-
version: 0.0
|
|
1647
|
-
boundaryElement: HTMLElement | null
|
|
1648
|
-
element: HTMLElement | null
|
|
1649
|
-
elements?: Record<string, HTMLElement | null | undefined>
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
/**
|
|
1653
|
-
* @public
|
|
1654
|
-
*/
|
|
1655
|
-
export declare interface PortalProps {
|
|
1656
|
-
children: React.ReactNode
|
|
1657
|
-
/**
|
|
1658
|
-
* @beta This API might change. DO NOT USE IN PRODUCTION.
|
|
1659
|
-
*/
|
|
1660
|
-
__unstable_name?: string
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
/**
|
|
1664
|
-
* @public
|
|
1665
|
-
*/
|
|
1666
|
-
export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
|
|
1667
|
-
|
|
1668
|
-
export declare namespace PortalProvider {
|
|
1669
|
-
var displayName: string
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* @public
|
|
1674
|
-
*/
|
|
1675
|
-
export declare interface PortalProviderProps {
|
|
1676
|
-
/**
|
|
1677
|
-
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
1678
|
-
*/
|
|
1679
|
-
boundaryElement?: HTMLElement | null
|
|
1680
|
-
children: React.ReactNode
|
|
1681
|
-
element?: HTMLElement | null
|
|
1682
|
-
/**
|
|
1683
|
-
* @beta
|
|
1684
|
-
*/
|
|
1685
|
-
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* The `Radio` component allows the user to select one option from a set.
|
|
1690
|
-
*
|
|
1691
|
-
* @public
|
|
1692
|
-
*/
|
|
1693
|
-
export declare const Radio: ForwardRefExoticComponent<
|
|
1694
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & RadioProps, 'ref'> &
|
|
1695
|
-
RefAttributes<HTMLInputElement>
|
|
1696
|
-
>
|
|
1697
|
-
|
|
1698
|
-
/**
|
|
1699
|
-
* @public
|
|
1700
|
-
*/
|
|
1701
|
-
export declare interface RadioProps {
|
|
1702
|
-
customValidity?: string
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
/**
|
|
1706
|
-
* @public
|
|
1707
|
-
*/
|
|
1708
|
-
export declare type Radius = number | 'full'
|
|
1709
|
-
|
|
1710
|
-
/**
|
|
1711
|
-
* @internal
|
|
1712
|
-
*/
|
|
1713
|
-
export declare function _raf(fn: () => void): () => void
|
|
1714
|
-
|
|
1715
|
-
/**
|
|
1716
|
-
* @internal
|
|
1717
|
-
*/
|
|
1718
|
-
export declare function _raf2(fn: () => void): () => void
|
|
1719
|
-
|
|
1720
|
-
/**
|
|
1721
|
-
* @public
|
|
1722
|
-
*/
|
|
1723
|
-
export declare function rem(pixelValue: number): string | 0
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* @internal
|
|
1727
|
-
*/
|
|
1728
|
-
export declare const _ResizeObserver: typeof ResizeObserver
|
|
1729
|
-
|
|
1730
|
-
/**
|
|
1731
|
-
* @internal
|
|
1732
|
-
*/
|
|
1733
|
-
export declare function _responsive<T>(
|
|
1734
|
-
media: number[],
|
|
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
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* @public
|
|
1813
|
-
*/
|
|
1814
|
-
export declare interface ResponsiveGridItemProps {
|
|
1815
|
-
column?: GridItemColumn | GridItemColumn[]
|
|
1816
|
-
columnStart?: GridItemColumnStart | GridItemColumnStart[]
|
|
1817
|
-
columnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
|
|
1818
|
-
row?: GridItemRow | GridItemRow[]
|
|
1819
|
-
rowStart?: GridItemRowStart | GridItemRowStart[]
|
|
1820
|
-
rowEnd?: GridItemRowEnd | GridItemRowEnd[]
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
/**
|
|
1824
|
-
* @public
|
|
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
|
-
}
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* Get responsive CSS for the `heading` font style.
|
|
1839
|
-
* @internal
|
|
1840
|
-
*/
|
|
1841
|
-
export declare function responsiveHeadingFont(
|
|
1842
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1843
|
-
): CSSObject[]
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* Get responsive CSS for the `label` font style.
|
|
1847
|
-
* @internal
|
|
1848
|
-
*/
|
|
1849
|
-
export declare function responsiveLabelFont(
|
|
1850
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1851
|
-
): CSSObject[]
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* @public
|
|
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
|
-
}
|
|
1868
|
-
|
|
1869
|
-
/**
|
|
1870
|
-
* @public
|
|
1871
|
-
*/
|
|
1872
|
-
export declare interface ResponsivePaddingProps {
|
|
1873
|
-
padding?: number | number[]
|
|
1874
|
-
paddingX?: number | number[]
|
|
1875
|
-
paddingY?: number | number[]
|
|
1876
|
-
paddingTop?: number | number[]
|
|
1877
|
-
paddingRight?: number | number[]
|
|
1878
|
-
paddingBottom?: number | number[]
|
|
1879
|
-
paddingLeft?: number | number[]
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
/**
|
|
1883
|
-
* @public
|
|
1884
|
-
*/
|
|
1885
|
-
export declare interface ResponsiveRadiusProps {
|
|
1886
|
-
radius?: Radius | Radius[]
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
/**
|
|
1890
|
-
* @public
|
|
1891
|
-
*/
|
|
1892
|
-
export declare interface ResponsiveShadowProps {
|
|
1893
|
-
shadow?: number | number[]
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
/**
|
|
1897
|
-
* Get responsive text align styles.
|
|
1898
|
-
* @internal
|
|
1899
|
-
*/
|
|
1900
|
-
export declare function responsiveTextAlignStyle(
|
|
1901
|
-
props: ResponsiveTextAlignStyleProps & ThemeProps,
|
|
1902
|
-
): CSSObject[]
|
|
1903
|
-
|
|
1904
|
-
/**
|
|
1905
|
-
* @internal
|
|
1906
|
-
*/
|
|
1907
|
-
export declare interface ResponsiveTextAlignStyleProps {
|
|
1908
|
-
$align: TextAlign[]
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
/**
|
|
1912
|
-
* Get responsive CSS for the `text` font style.
|
|
1913
|
-
* @internal
|
|
1914
|
-
*/
|
|
1915
|
-
export declare function responsiveTextFont(
|
|
1916
|
-
props: ResponsiveFontStyleProps & ThemeProps,
|
|
1917
|
-
): CSSObject[]
|
|
1918
|
-
|
|
1919
|
-
/**
|
|
1920
|
-
* @public
|
|
1921
|
-
*/
|
|
1922
|
-
export declare interface ResponsiveWidthProps {
|
|
1923
|
-
width?: number | 'auto' | (number | 'auto')[]
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
/**
|
|
1927
|
-
* @internal
|
|
1928
|
-
*/
|
|
1929
|
-
export declare interface ResponsiveWidthStyleProps {
|
|
1930
|
-
$width: (number | 'auto')[]
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
/**
|
|
1934
|
-
* @public
|
|
1935
|
-
* @deprecated Use `RGB` from `@sanity/ui/theme` instead.
|
|
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>
|
|
1978
|
-
>
|
|
1979
|
-
|
|
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
|
-
/**
|
|
1997
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1998
|
-
* @beta
|
|
1999
|
-
*/
|
|
2000
|
-
export declare const Skeleton: ForwardRefExoticComponent<
|
|
2001
|
-
Omit<SkeletonProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>
|
|
2002
|
-
>
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2006
|
-
* @beta
|
|
2007
|
-
*/
|
|
2008
|
-
export declare interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxProps, 'children'> {
|
|
2009
|
-
animated?: boolean
|
|
2010
|
-
delay?: number
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
/**
|
|
2014
|
-
* Indicate that something is loading for an indeterminate amount of time.
|
|
2015
|
-
*
|
|
2016
|
-
* @public
|
|
2017
|
-
*/
|
|
2018
|
-
export declare const Spinner: ForwardRefExoticComponent<
|
|
2019
|
-
Omit<SpinnerProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
|
|
2020
|
-
RefAttributes<HTMLDivElement>
|
|
2021
|
-
>
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* @public
|
|
2025
|
-
*/
|
|
2026
|
-
export declare interface SpinnerProps {
|
|
2027
|
-
muted?: boolean
|
|
2028
|
-
size?: number | number[]
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
/**
|
|
2032
|
-
* @public
|
|
2033
|
-
*/
|
|
2034
|
-
export declare const SrOnly: ForwardRefExoticComponent<
|
|
2035
|
-
Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>, 'ref'> &
|
|
2036
|
-
RefAttributes<HTMLDivElement>
|
|
2037
|
-
>
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* @public
|
|
2041
|
-
*/
|
|
2042
|
-
export declare interface SrOnlyProps {
|
|
2043
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2044
|
-
children?: React.ReactNode
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
/**
|
|
2048
|
-
* The `Stack` component is used to place elements on top of each other.
|
|
2049
|
-
*
|
|
2050
|
-
* @public
|
|
2051
|
-
*/
|
|
2052
|
-
export declare const Stack: ForwardRefExoticComponent<
|
|
2053
|
-
StackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
|
|
2054
|
-
>
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* @public
|
|
2058
|
-
*/
|
|
2059
|
-
export declare interface StackProps extends BoxProps {
|
|
2060
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2061
|
-
space?: number | number[]
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* @public
|
|
2066
|
-
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
2067
|
-
*/
|
|
2068
|
-
export declare const studioTheme: BaseTheme_2
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* @public
|
|
2072
|
-
* @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
|
|
2073
|
-
*/
|
|
2074
|
-
export declare type Styles = ThemeStyles
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
2078
|
-
*
|
|
2079
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
2080
|
-
*
|
|
2081
|
-
* @public
|
|
2082
|
-
*/
|
|
2083
|
-
export declare const Switch: ForwardRefExoticComponent<
|
|
2084
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & SwitchProps, 'ref'> &
|
|
2085
|
-
RefAttributes<HTMLInputElement>
|
|
2086
|
-
>
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* @public
|
|
2090
|
-
*/
|
|
2091
|
-
export declare interface SwitchProps {
|
|
2092
|
-
indeterminate?: boolean
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
/**
|
|
2096
|
-
* @public
|
|
2097
|
-
*/
|
|
2098
|
-
export declare const Tab: ForwardRefExoticComponent<
|
|
2099
|
-
Omit<
|
|
2100
|
-
TabProps &
|
|
2101
|
-
Omit<
|
|
2102
|
-
HTMLProps<HTMLButtonElement>,
|
|
2103
|
-
'label' | 'id' | 'type' | 'width' | 'aria-controls' | 'as'
|
|
2104
|
-
>,
|
|
2105
|
-
'ref'
|
|
2106
|
-
> &
|
|
2107
|
-
RefAttributes<HTMLButtonElement>
|
|
2108
|
-
>
|
|
2109
|
-
|
|
2110
|
-
/**
|
|
2111
|
-
* @public
|
|
2112
|
-
*/
|
|
2113
|
-
export declare const TabList: ForwardRefExoticComponent<
|
|
2114
|
-
Omit<TabListProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
|
|
2115
|
-
RefAttributes<unknown>
|
|
2116
|
-
>
|
|
2117
|
-
|
|
2118
|
-
/**
|
|
2119
|
-
* @public
|
|
2120
|
-
*/
|
|
2121
|
-
export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
|
|
2122
|
-
children: Array<React.JSX.Element | null | undefined | false>
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
/**
|
|
2126
|
-
* @public
|
|
2127
|
-
*/
|
|
2128
|
-
export declare const TabPanel: ForwardRefExoticComponent<
|
|
2129
|
-
Omit<
|
|
2130
|
-
TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'role' | 'aria-labelledby' | 'as'>,
|
|
2131
|
-
'ref'
|
|
2132
|
-
> &
|
|
2133
|
-
RefAttributes<HTMLDivElement>
|
|
2134
|
-
>
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
* @public
|
|
2138
|
-
*/
|
|
2139
|
-
export declare interface TabPanelProps extends BoxProps {
|
|
2140
|
-
/**
|
|
2141
|
-
* The `id` of the correlating `Tab` component.
|
|
2142
|
-
*/
|
|
2143
|
-
'aria-labelledby': string
|
|
2144
|
-
'id': string
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
/**
|
|
2148
|
-
* @public
|
|
2149
|
-
*/
|
|
2150
|
-
export declare interface TabProps {
|
|
2151
|
-
/**
|
|
2152
|
-
* The `id` of the correlating `TabPanel` component.
|
|
2153
|
-
*/
|
|
2154
|
-
'aria-controls': string
|
|
2155
|
-
'id': string
|
|
2156
|
-
'icon'?: React.ElementType | React.ReactNode
|
|
2157
|
-
'focused'?: boolean
|
|
2158
|
-
'fontSize'?: number | number[]
|
|
2159
|
-
'label'?: React.ReactNode
|
|
2160
|
-
'padding'?: number | number[]
|
|
2161
|
-
'selected'?: boolean
|
|
2162
|
-
'tone'?: ButtonTone
|
|
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
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
/**
|
|
2208
|
-
* Single line text input.
|
|
2209
|
-
*
|
|
2210
|
-
* @public
|
|
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
|
-
}
|
|
2252
|
-
|
|
2253
|
-
/**
|
|
2254
|
-
* @public
|
|
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'
|
|
2270
|
-
|
|
2271
|
-
/**
|
|
2272
|
-
* @public
|
|
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[]
|
|
2281
|
-
/**
|
|
2282
|
-
* Controls how overflowing text is treated.
|
|
2283
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
2284
|
-
* @beta
|
|
2285
|
-
*/
|
|
2286
|
-
textOverflow?: 'ellipsis'
|
|
2287
|
-
weight?: ThemeFontWeightKey_2
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
/**
|
|
2291
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2292
|
-
* @beta
|
|
2293
|
-
*/
|
|
2294
|
-
export declare const TextSkeleton: ForwardRefExoticComponent<
|
|
2295
|
-
Omit<
|
|
2296
|
-
TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'size' | 'children' | 'as'>,
|
|
2297
|
-
'ref'
|
|
2298
|
-
> &
|
|
2299
|
-
RefAttributes<HTMLDivElement>
|
|
2300
|
-
>
|
|
2301
|
-
|
|
2302
|
-
/**
|
|
2303
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
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}
|
|
2395
|
-
|
|
2396
|
-
export {ThemeColorSpotKey}
|
|
2397
|
-
|
|
2398
|
-
/**
|
|
2399
|
-
* @public
|
|
2400
|
-
* @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
|
|
2401
|
-
*/
|
|
2402
|
-
export declare type ThemeColorSyntax = ThemeColorSyntax_2
|
|
2403
|
-
|
|
2404
|
-
export {ThemeColorToneKey}
|
|
2405
|
-
|
|
2406
|
-
/**
|
|
2407
|
-
* @public
|
|
2408
|
-
*/
|
|
2409
|
-
export declare interface ThemeContextValue {
|
|
2410
|
-
/** @deprecated No longer used */
|
|
2411
|
-
version: 0.0
|
|
2412
|
-
scheme: ThemeColorSchemeKey_2
|
|
2413
|
-
theme: RootTheme_2
|
|
2414
|
-
tone: ThemeColorCardToneKey
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
/**
|
|
2418
|
-
* @public
|
|
2419
|
-
* @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
|
|
2420
|
-
*/
|
|
2421
|
-
export declare type ThemeFont = ThemeFont_2
|
|
2422
|
-
|
|
2423
|
-
/**
|
|
2424
|
-
* @public
|
|
2425
|
-
* @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
|
|
2426
|
-
*/
|
|
2427
|
-
export declare type ThemeFontKey = ThemeFontKey_2
|
|
2428
|
-
|
|
2429
|
-
/**
|
|
2430
|
-
* @public
|
|
2431
|
-
* @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
|
|
2432
|
-
*/
|
|
2433
|
-
export declare type ThemeFonts = ThemeFonts_2
|
|
2434
|
-
|
|
2435
|
-
/**
|
|
2436
|
-
* @public
|
|
2437
|
-
* @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
|
|
2438
|
-
*/
|
|
2439
|
-
export declare type ThemeFontSize = ThemeFontSize_2
|
|
2440
|
-
|
|
2441
|
-
/**
|
|
2442
|
-
* @public
|
|
2443
|
-
* @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
|
|
2444
|
-
*/
|
|
2445
|
-
export declare type ThemeFontWeight = ThemeFontWeight_2
|
|
2446
|
-
|
|
2447
|
-
/**
|
|
2448
|
-
* @public
|
|
2449
|
-
* @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
|
|
2450
|
-
*/
|
|
2451
|
-
export declare type ThemeFontWeightKey = ThemeFontWeightKey_2
|
|
2452
|
-
|
|
2453
|
-
export {ThemeInput}
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* @public
|
|
2457
|
-
* @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
|
|
2458
|
-
*/
|
|
2459
|
-
export declare type ThemeLayer = ThemeLayer_2
|
|
2460
|
-
|
|
2461
|
-
/**
|
|
2462
|
-
* @internal
|
|
2463
|
-
*/
|
|
2464
|
-
export declare interface ThemeProps {
|
|
2465
|
-
theme: Theme_2
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
|
-
/**
|
|
2469
|
-
* @public
|
|
2470
|
-
*/
|
|
2471
|
-
export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element
|
|
2472
|
-
|
|
2473
|
-
export declare namespace ThemeProvider {
|
|
2474
|
-
var displayName: string
|
|
2475
|
-
}
|
|
2476
|
-
|
|
2477
|
-
/**
|
|
2478
|
-
* @public
|
|
2479
|
-
*/
|
|
2480
|
-
export declare interface ThemeProviderProps {
|
|
2481
|
-
children?: React.ReactNode
|
|
2482
|
-
scheme?: ThemeColorSchemeKey_2
|
|
2483
|
-
theme?: RootTheme_2
|
|
2484
|
-
tone?: ThemeColorCardToneKey
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
/**
|
|
2488
|
-
* @public
|
|
2489
|
-
* @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
|
|
2490
|
-
*/
|
|
2491
|
-
export declare type ThemeShadow = ThemeShadow_2
|
|
2492
|
-
|
|
2493
|
-
/**
|
|
2494
|
-
* The `Toast` component gives feedback to users when an action has taken place.
|
|
2495
|
-
*
|
|
2496
|
-
* Toasts can be closed with a close button, or auto-dismiss after a certain timeout.
|
|
2497
|
-
*
|
|
2498
|
-
* @public
|
|
2499
|
-
*/
|
|
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
|
-
>,
|
|
2513
|
-
): React.JSX.Element
|
|
2514
|
-
|
|
2515
|
-
export declare namespace Toast {
|
|
2516
|
-
var displayName: string
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
/**
|
|
2520
|
-
* @public
|
|
2521
|
-
*/
|
|
2522
|
-
export declare interface ToastContextValue {
|
|
2523
|
-
version: 0.0
|
|
2524
|
-
/**
|
|
2525
|
-
* Creates or updates a toast notification.
|
|
2526
|
-
* If a toast with the same ID already exists, it will be updated.
|
|
2527
|
-
* If an ID is not provided, a random one will be generated.
|
|
2528
|
-
* The returned ID can be used to programatically update a toast.
|
|
2529
|
-
*/
|
|
2530
|
-
push: (params: ToastParams) => string
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
/**
|
|
2534
|
-
* @public
|
|
2535
|
-
*/
|
|
2536
|
-
declare interface ToastLayerProps {
|
|
2537
|
-
children: React.ReactNode
|
|
2538
|
-
padding?: number | number[]
|
|
2539
|
-
paddingX?: number | number[]
|
|
2540
|
-
paddingY?: number | number[]
|
|
2541
|
-
gap?: number | number[]
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
/**
|
|
2545
|
-
* @public
|
|
2546
|
-
*/
|
|
2547
|
-
export declare interface ToastParams {
|
|
2548
|
-
closable?: boolean
|
|
2549
|
-
description?: React.ReactNode
|
|
2550
|
-
duration?: number
|
|
2551
|
-
id?: string
|
|
2552
|
-
onClose?: () => void
|
|
2553
|
-
title?: React.ReactNode
|
|
2554
|
-
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
/**
|
|
2558
|
-
* @public
|
|
2559
|
-
*/
|
|
2560
|
-
export declare interface ToastProps {
|
|
2561
|
-
closable?: boolean
|
|
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
|
-
}
|
|
2570
|
-
|
|
2571
|
-
/**
|
|
2572
|
-
* @public
|
|
2573
|
-
*/
|
|
2574
|
-
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2575
|
-
|
|
2576
|
-
export declare namespace ToastProvider {
|
|
2577
|
-
var displayName: string
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
/**
|
|
2581
|
-
* @public
|
|
2582
|
-
*/
|
|
2583
|
-
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2584
|
-
children?: React.ReactNode
|
|
2585
|
-
zOffset?: number | number[]
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
/**
|
|
2589
|
-
* Tooltips display information when hovering, focusing or tapping.
|
|
2590
|
-
*
|
|
2591
|
-
* @public
|
|
2592
|
-
*/
|
|
2593
|
-
export declare const Tooltip: ForwardRefExoticComponent<
|
|
2594
|
-
Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'children' | 'as'>, 'ref'> &
|
|
2595
|
-
RefAttributes<HTMLDivElement>
|
|
2596
|
-
>
|
|
2597
|
-
|
|
2598
|
-
/**
|
|
2599
|
-
* @beta
|
|
2600
|
-
*/
|
|
2601
|
-
export declare const TooltipDelayGroupContext: Context<TooltipDelayGroupContextValue | null>
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* @beta
|
|
2605
|
-
*/
|
|
2606
|
-
export declare interface TooltipDelayGroupContextValue {
|
|
2607
|
-
setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
|
|
2608
|
-
setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
|
|
2609
|
-
openDelay: number
|
|
2610
|
-
closeDelay: number
|
|
2611
|
-
openTooltipId: string | null
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
/**
|
|
2615
|
-
* @public
|
|
2616
|
-
* Provides context for a group of tooltip elements that should share a delay
|
|
2617
|
-
* which temporarily becomes 1 ms after the first floating element of the group opens.
|
|
2618
|
-
*/
|
|
2619
|
-
export declare function TooltipDelayGroupProvider(
|
|
2620
|
-
props: TooltipDelayGroupProviderProps,
|
|
2621
|
-
): React.JSX.Element
|
|
2622
|
-
|
|
2623
|
-
export declare namespace TooltipDelayGroupProvider {
|
|
2624
|
-
var displayName: string
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
/**
|
|
2628
|
-
* @public
|
|
2629
|
-
* */
|
|
2630
|
-
export declare interface TooltipDelayGroupProviderProps {
|
|
2631
|
-
children?: React.ReactNode
|
|
2632
|
-
/**
|
|
2633
|
-
* Handles the delays to open or close a tooltip inside a group
|
|
2634
|
-
*
|
|
2635
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2636
|
-
*
|
|
2637
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2638
|
-
*
|
|
2639
|
-
* @public
|
|
2640
|
-
*/
|
|
2641
|
-
delay: Delay
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
/**
|
|
2645
|
-
* @public
|
|
2646
|
-
*/
|
|
2647
|
-
export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
2648
|
-
/** @deprecated Use `fallbackPlacements` instead. */
|
|
2649
|
-
allowedAutoPlacements?: Placement[]
|
|
2650
|
-
arrow?: boolean
|
|
2651
|
-
boundaryElement?: HTMLElement | null
|
|
2652
|
-
children?: React.JSX.Element
|
|
2653
|
-
content?: React.ReactNode
|
|
2654
|
-
disabled?: boolean
|
|
2655
|
-
fallbackPlacements?: Placement[]
|
|
2656
|
-
padding?: number | number[]
|
|
2657
|
-
placement?: Placement
|
|
2658
|
-
/** Whether or not to render the tooltip in a portal element. */
|
|
2659
|
-
portal?: boolean | string
|
|
2660
|
-
radius?: number | number[]
|
|
2661
|
-
scheme?: ThemeColorSchemeKey_2
|
|
2662
|
-
shadow?: number | number[]
|
|
2663
|
-
/**
|
|
2664
|
-
* Adds a delay to open or close the tooltip.
|
|
2665
|
-
*
|
|
2666
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2667
|
-
*
|
|
2668
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2669
|
-
*
|
|
2670
|
-
* @public
|
|
2671
|
-
* @defaultValue 0
|
|
2672
|
-
*/
|
|
2673
|
-
delay?: Delay
|
|
2674
|
-
/**
|
|
2675
|
-
* Whether the tooltip should animate in and out.
|
|
2676
|
-
*
|
|
2677
|
-
* @beta
|
|
2678
|
-
* @defaultValue false
|
|
2679
|
-
*/
|
|
2680
|
-
animate?: boolean
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
/**
|
|
2684
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2685
|
-
* @beta
|
|
2686
|
-
*/
|
|
2687
|
-
export declare const Tree: NamedExoticComponent<
|
|
2688
|
-
TreeProps &
|
|
2689
|
-
Omit<HTMLProps<HTMLDivElement>, 'height' | 'wrap' | 'ref' | 'role' | 'as' | 'align'> &
|
|
2690
|
-
RefAttributes<HTMLDivElement>
|
|
2691
|
-
>
|
|
2692
|
-
|
|
2693
|
-
/**
|
|
2694
|
-
* @beta
|
|
2695
|
-
*/
|
|
2696
|
-
export declare interface TreeContextValue {
|
|
2697
|
-
version: 0.0
|
|
2698
|
-
focusedElement: HTMLElement | null
|
|
2699
|
-
level: number
|
|
2700
|
-
path: string[]
|
|
2701
|
-
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
|
|
2702
|
-
setExpanded: (path: string, expanded: boolean) => void
|
|
2703
|
-
setFocusedElement: (focusedElement: HTMLElement | null) => void
|
|
2704
|
-
space: number | number[]
|
|
2705
|
-
state: TreeState
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
/**
|
|
2709
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2710
|
-
* @beta
|
|
2711
|
-
*/
|
|
2712
|
-
export declare const TreeItem: NamedExoticComponent<
|
|
2713
|
-
TreeItemProps & Omit<HTMLProps<HTMLLIElement>, 'ref' | 'role' | 'as'>
|
|
2714
|
-
>
|
|
2715
|
-
|
|
2716
|
-
/**
|
|
2717
|
-
* @beta
|
|
2718
|
-
*/
|
|
2719
|
-
export declare interface TreeItemProps {
|
|
2720
|
-
expanded?: boolean
|
|
2721
|
-
fontSize?: number | number[]
|
|
2722
|
-
icon?: React.ElementType
|
|
2723
|
-
/**
|
|
2724
|
-
* Allows passing a custom element type to the link component
|
|
2725
|
-
*/
|
|
2726
|
-
linkAs?: BoxProps['as']
|
|
2727
|
-
padding?: number | number[]
|
|
2728
|
-
space?: number | number[]
|
|
2729
|
-
text?: React.ReactNode
|
|
2730
|
-
weight?: ThemeFontWeightKey_2
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
/**
|
|
2734
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2735
|
-
* @beta
|
|
2736
|
-
*/
|
|
2737
|
-
export declare interface TreeProps {
|
|
2738
|
-
space?: number | number[]
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
/**
|
|
2742
|
-
* @beta
|
|
2743
|
-
*/
|
|
2744
|
-
export declare interface TreeState {
|
|
2745
|
-
[key: string]:
|
|
2746
|
-
| {
|
|
2747
|
-
element: HTMLElement
|
|
2748
|
-
expanded: boolean
|
|
2749
|
-
}
|
|
2750
|
-
| undefined
|
|
2751
|
-
}
|
|
2752
|
-
|
|
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
|
-
*/
|
|
2765
|
-
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2766
|
-
|
|
2767
|
-
/**
|
|
2768
|
-
* @public
|
|
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
|
|
2787
|
-
|
|
2788
|
-
/**
|
|
2789
|
-
* @public
|
|
2790
|
-
*/
|
|
2791
|
-
export declare function useClickOutsideEvent(
|
|
2792
|
-
listener: ClickOutsideEventListener | false | undefined,
|
|
2793
|
-
elementsArg?: () => ClickOutsideEventElements,
|
|
2794
|
-
boundaryElement?: () => HTMLElement | null,
|
|
2795
|
-
): void
|
|
2796
|
-
|
|
2797
|
-
/**
|
|
2798
|
-
* @beta
|
|
2799
|
-
*/
|
|
2800
|
-
export declare function useCustomValidity(
|
|
2801
|
-
ref: {
|
|
2802
|
-
current: null | {
|
|
2803
|
-
setCustomValidity: (validity: string) => void
|
|
2804
|
-
}
|
|
2805
|
-
},
|
|
2806
|
-
customValidity: string | undefined,
|
|
2807
|
-
): void
|
|
2808
|
-
|
|
2809
|
-
/**
|
|
2810
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2811
|
-
* @beta
|
|
2812
|
-
*/
|
|
2813
|
-
export declare function useDialog(): DialogContextValue
|
|
2814
|
-
|
|
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
|
-
/**
|
|
2824
|
-
* Subscribe to the size of a DOM element.
|
|
2825
|
-
* @beta
|
|
2826
|
-
*/
|
|
2827
|
-
export declare function useElementSize(element: HTMLElement | null): ElementSize | null
|
|
2828
|
-
|
|
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
|
-
/**
|
|
2844
|
-
* @beta
|
|
2845
|
-
*/
|
|
2846
|
-
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2847
|
-
|
|
2848
|
-
/**
|
|
2849
|
-
* @public
|
|
2850
|
-
*/
|
|
2851
|
-
export declare function useLayer(): LayerContextValue
|
|
2852
|
-
|
|
2853
|
-
/**
|
|
2854
|
-
* Efficiently subscribes to `window.matchMedia` queries
|
|
2855
|
-
*
|
|
2856
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2857
|
-
*
|
|
2858
|
-
* @public
|
|
2859
|
-
*/
|
|
2860
|
-
export declare function useMatchMedia(
|
|
2861
|
-
mediaQueryString: `(${string})`,
|
|
2862
|
-
getServerSnapshot?: () => boolean,
|
|
2863
|
-
): boolean
|
|
2864
|
-
|
|
2865
|
-
/**
|
|
2866
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2867
|
-
* @beta
|
|
2868
|
-
*/
|
|
2869
|
-
export declare function useMediaIndex(): number
|
|
2870
|
-
|
|
2871
|
-
/**
|
|
2872
|
-
* @public
|
|
2873
|
-
*/
|
|
2874
|
-
export declare function usePortal(): PortalContextValue
|
|
2875
|
-
|
|
2876
|
-
/**
|
|
2877
|
-
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
2878
|
-
*
|
|
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://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2880
|
-
*
|
|
2881
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2882
|
-
* 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
|
|
2883
|
-
* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
|
|
2884
|
-
*
|
|
2885
|
-
* @public
|
|
2886
|
-
*/
|
|
2887
|
-
export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
|
|
2888
|
-
|
|
2889
|
-
/**
|
|
2890
|
-
* Returns true if motion should be reduced
|
|
2891
|
-
*
|
|
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://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2893
|
-
*
|
|
2894
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2895
|
-
* 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
|
|
2896
|
-
* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
|
|
2897
|
-
*
|
|
2898
|
-
* @public
|
|
2899
|
-
*/
|
|
2900
|
-
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2901
|
-
|
|
2902
|
-
/**
|
|
2903
|
-
* @public
|
|
2904
|
-
*/
|
|
2905
|
-
export declare function useRootTheme(): ThemeContextValue
|
|
2906
|
-
|
|
2907
|
-
/**
|
|
2908
|
-
* @public
|
|
2909
|
-
*/
|
|
2910
|
-
export declare function useTheme(): Theme_2
|
|
2911
|
-
|
|
2912
|
-
/**
|
|
2913
|
-
* @public
|
|
2914
|
-
*/
|
|
2915
|
-
export declare function useTheme_v2(): Theme_v2
|
|
2916
|
-
|
|
2917
|
-
/**
|
|
2918
|
-
* @public
|
|
2919
|
-
*/
|
|
2920
|
-
export declare function useToast(): ToastContextValue
|
|
2921
|
-
|
|
2922
|
-
/**
|
|
2923
|
-
* @beta
|
|
2924
|
-
*/
|
|
2925
|
-
export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
|
|
2926
|
-
|
|
2927
|
-
/**
|
|
2928
|
-
* @beta
|
|
2929
|
-
*/
|
|
2930
|
-
export declare function useTree(): TreeContextValue
|
|
2931
|
-
|
|
2932
|
-
/**
|
|
2933
|
-
* @beta
|
|
2934
|
-
*/
|
|
2935
|
-
export declare const VirtualList: ForwardRefExoticComponent<
|
|
2936
|
-
VirtualListProps<any> &
|
|
2937
|
-
StackProps &
|
|
2938
|
-
Omit<HTMLProps<HTMLDivElement>, 'children' | 'ref' | 'onChange' | 'as'> &
|
|
2939
|
-
RefAttributes<HTMLDivElement>
|
|
2940
|
-
>
|
|
2941
|
-
|
|
2942
|
-
/**
|
|
2943
|
-
* @beta
|
|
2944
|
-
*/
|
|
2945
|
-
export declare interface VirtualListChangeOpts {
|
|
2946
|
-
fromIndex: number
|
|
2947
|
-
gap: number
|
|
2948
|
-
itemHeight: number
|
|
2949
|
-
scrollHeight: number
|
|
2950
|
-
scrollTop: number
|
|
2951
|
-
toIndex: number
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
/**
|
|
2955
|
-
* @beta
|
|
2956
|
-
*/
|
|
2957
|
-
export declare interface VirtualListProps<Item = any> {
|
|
2958
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements
|
|
2959
|
-
gap?: number
|
|
2960
|
-
getItemKey?: (item: Item, itemIndex: number) => string
|
|
2961
|
-
items?: Item[]
|
|
2962
|
-
onChange?: (opts: VirtualListChangeOpts) => void
|
|
2963
|
-
renderItem?: (item: Item) => React.ReactNode
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
export {}
|