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