@sanity/ui 3.0.0-static.33 → 3.0.0-static.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_chunks-cjs/_visual-editing.cjs +263 -375
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +263 -377
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -1
- package/dist/_visual-editing.cjs +0 -2
- package/dist/_visual-editing.cjs.map +1 -1
- package/dist/_visual-editing.d.cts +34 -85
- package/dist/_visual-editing.d.ts +34 -85
- package/dist/_visual-editing.js +2 -4
- package/dist/css/index.cjs +12 -12
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +383 -13934
- package/dist/css/index.d.ts +383 -13934
- package/dist/css/index.js +12 -12
- package/dist/css/index.js.map +1 -1
- package/dist/index.cjs +241 -366
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -817
- package/dist/index.d.ts +107 -817
- package/dist/index.js +243 -360
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +367 -4288
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +180 -1582
- package/dist/theme.d.ts +180 -1582
- package/dist/theme.js +371 -4292
- package/dist/theme.js.map +1 -1
- package/exports/_visual-editing.ts +0 -2
- package/package.json +3 -4
- package/src/core/Root.tsx +4 -2
- package/src/core/RootProvider.tsx +4 -4
- package/src/core/__workshop__/boundary.tsx +1 -1
- package/src/core/__workshop__/index.ts +5 -3
- package/src/core/components/autocomplete/__workshop__/async.tsx +1 -1
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/custom.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/example.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +1 -1
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
- package/src/core/components/autocomplete/__workshop__/index.ts +5 -3
- package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +1 -1
- package/src/core/components/autocomplete/__workshop__/mock/countries.ts +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +2 -2
- package/src/core/components/autocomplete/autocompleteOption.tsx +2 -2
- package/src/core/components/autocomplete/constants.ts +2 -2
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -1
- package/src/core/components/breadcrumbs/__workshop__/index.ts +5 -3
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +6 -11
- package/src/core/components/dialog/__workshop__/activate.tsx +1 -1
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +1 -1
- package/src/core/components/dialog/__workshop__/index.ts +5 -3
- package/src/core/components/dialog/__workshop__/layering.tsx +1 -1
- package/src/core/components/dialog/__workshop__/nested.tsx +2 -3
- package/src/core/components/dialog/__workshop__/onScroll.tsx +1 -1
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/__workshop__/position.tsx +1 -1
- package/src/core/components/dialog/__workshop__/props.tsx +1 -1
- package/src/core/components/dialog/__workshop__/provider.tsx +1 -1
- package/src/core/components/dialog/__workshop__/wrapped.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +5 -6
- package/src/core/components/dialog/dialogCard.tsx +2 -2
- package/src/core/components/dialog/dialogContext.ts +3 -4
- package/src/core/components/dialog/dialogProvider.tsx +2 -2
- package/src/core/components/hotkeys/__workshop__/index.ts +5 -3
- package/src/core/components/hotkeys/__workshop__/plain.tsx +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +4 -15
- package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +1 -1
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +1 -1
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +3 -3
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +1 -1
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +1 -1
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +1 -1
- package/src/core/components/menu/__workshop__/groups.tsx +1 -1
- package/src/core/components/menu/__workshop__/index.ts +5 -3
- package/src/core/components/menu/__workshop__/menuButton.tsx +2 -2
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +1 -1
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +1 -1
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +1 -1
- package/src/core/components/menu/__workshop__/selectedItem.tsx +1 -1
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -1
- package/src/core/components/menu/__workshop__/tones.tsx +3 -3
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +1 -1
- package/src/core/components/menu/menu.test.tsx +2 -1
- package/src/core/components/menu/menu.tsx +7 -22
- package/src/core/components/menu/menuButton.tsx +4 -50
- package/src/core/components/menu/menuContext.ts +3 -15
- package/src/core/components/menu/menuDivider.tsx +2 -2
- package/src/core/components/menu/menuGroup.tsx +10 -15
- package/src/core/components/menu/menuItem.tsx +7 -18
- package/src/core/components/tab/__workshop__/example.tsx +1 -1
- package/src/core/components/tab/__workshop__/index.ts +5 -3
- package/src/core/components/tab/tab.tsx +6 -4
- package/src/core/components/tab/tabList.tsx +3 -8
- package/src/core/components/tab/tabPanel.tsx +2 -2
- package/src/core/components/toast/__workshop__/hook.tsx +1 -1
- package/src/core/components/toast/__workshop__/index.ts +5 -3
- package/src/core/components/toast/__workshop__/toast.tsx +1 -1
- package/src/core/components/toast/toast.test.tsx +2 -1
- package/src/core/components/toast/toast.tsx +2 -2
- package/src/core/components/toast/toastContext.ts +4 -4
- package/src/core/components/toast/toastLayer.tsx +3 -3
- package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/core/components/tree/__workshop__/basic.tsx +1 -1
- package/src/core/components/tree/__workshop__/index.ts +5 -3
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/tree.tsx +8 -9
- package/src/core/components/tree/treeContext.ts +4 -4
- package/src/core/components/tree/treeGroup.tsx +6 -8
- package/src/core/components/tree/treeItem.tsx +4 -4
- package/src/core/components/tree/types.ts +1 -1
- package/src/core/components/virtualList/__workshop__/changingProps.tsx +1 -1
- package/src/core/components/virtualList/__workshop__/elementScroll.tsx +1 -1
- package/src/core/components/virtualList/__workshop__/index.ts +5 -3
- package/src/core/components/virtualList/__workshop__/infiniteList.tsx +1 -1
- package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +1 -1
- package/src/core/components/virtualList/virtualList.tsx +2 -2
- package/src/core/constants.ts +0 -18
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +5 -3
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +6 -1
- package/src/core/index.ts +1 -24
- package/src/core/lib/createGlobalScopedContext.ts +1 -1
- package/src/core/lib/globalScope.ts +1 -1
- package/src/core/observers/elementSize.ts +1 -1
- package/src/core/primitives/arrow/arrow.tsx +2 -2
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/index.ts +5 -3
- package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +3 -10
- package/src/core/primitives/avatar/avatarCounter.tsx +2 -2
- package/src/core/primitives/avatar/avatarStack.tsx +2 -4
- package/src/core/primitives/avatar/types.ts +0 -32
- package/src/core/primitives/badge/__workshop__/index.ts +5 -3
- package/src/core/primitives/badge/__workshop__/props.tsx +1 -1
- package/src/core/primitives/badge/__workshop__/tones.tsx +3 -3
- package/src/core/primitives/badge/badge.test.tsx +2 -1
- package/src/core/primitives/badge/badge.tsx +12 -11
- package/src/core/primitives/box/__workshop__/index.ts +5 -3
- package/src/core/primitives/box/__workshop__/props.tsx +1 -1
- package/src/core/primitives/box/__workshop__/responsive.tsx +1 -1
- package/src/core/primitives/box/box.tsx +28 -32
- package/src/core/primitives/button/__workshop__/custom.tsx +5 -5
- package/src/core/primitives/button/__workshop__/customIcons.tsx +1 -1
- package/src/core/primitives/button/__workshop__/disabled.tsx +3 -3
- package/src/core/primitives/button/__workshop__/index.ts +5 -3
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +1 -1
- package/src/core/primitives/button/__workshop__/props.tsx +1 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/stacked.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +1 -1
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +1 -1
- package/src/core/primitives/button/button.test.tsx +2 -1
- package/src/core/primitives/button/button.tsx +4 -7
- package/src/core/primitives/button/types.ts +0 -20
- package/src/core/primitives/card/__workshop__/asButton.tsx +2 -2
- package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/core/primitives/card/__workshop__/checkered.tsx +3 -3
- package/src/core/primitives/card/__workshop__/index.ts +5 -3
- package/src/core/primitives/card/__workshop__/interactive.tsx +1 -1
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +1 -1
- package/src/core/primitives/card/__workshop__/props.tsx +1 -1
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/__workshop__/tones.tsx +3 -3
- package/src/core/primitives/card/card.tsx +4 -2
- package/src/core/primitives/card/cardContext.ts +1 -1
- package/src/core/primitives/card/cardProvider.tsx +4 -4
- package/src/core/primitives/card/types.ts +5 -19
- package/src/core/primitives/checkbox/__workshop__/example.tsx +1 -1
- package/src/core/primitives/checkbox/__workshop__/index.ts +5 -3
- package/src/core/primitives/checkbox/__workshop__/props.tsx +1 -1
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +3 -3
- package/src/core/primitives/checkbox/checkbox.tsx +2 -2
- package/src/core/primitives/code/__workshop__/index.ts +5 -3
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/code/__workshop__/props.tsx +1 -1
- package/src/core/primitives/code/code.tsx +4 -2
- package/src/core/primitives/code/refractor.tsx +1 -1
- package/src/core/primitives/container/__workshop__/example.tsx +1 -1
- package/src/core/primitives/container/__workshop__/index.ts +5 -3
- package/src/core/primitives/container/container.tsx +2 -2
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/__workshop__/gap.tsx +1 -1
- package/src/core/primitives/flex/__workshop__/index.ts +5 -3
- package/src/core/primitives/flex/flex.tsx +4 -2
- package/src/core/primitives/grid/__workshop__/index.ts +5 -3
- package/src/core/primitives/grid/__workshop__/responsive.tsx +3 -3
- package/src/core/primitives/grid/grid.tsx +4 -2
- package/src/core/primitives/heading/__workshop__/index.ts +5 -3
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/heading/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/heading/heading.tsx +2 -4
- package/src/core/primitives/inline/__workshop__/index.ts +5 -3
- package/src/core/primitives/inline/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +4 -11
- package/src/core/primitives/kbd/__workshop__/index.ts +5 -3
- package/src/core/primitives/kbd/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +4 -2
- package/src/core/primitives/label/__workshop__/index.ts +5 -3
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/label/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/label/label.tsx +2 -4
- package/src/core/primitives/layer/__workshop__/_debug.tsx +1 -1
- package/src/core/primitives/layer/__workshop__/index.ts +5 -3
- package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +1 -1
- package/src/core/primitives/layer/__workshop__/nested.tsx +1 -1
- package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +1 -1
- package/src/core/primitives/layer/layer.test.tsx +2 -1
- package/src/core/primitives/layer/layer.tsx +2 -2
- package/src/core/primitives/layer/layerCard.tsx +2 -2
- package/src/core/primitives/layer/layerContext.ts +4 -4
- package/src/core/primitives/layer/layerProvider.tsx +2 -10
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/index.ts +5 -3
- package/src/core/primitives/popover/popover.tsx +4 -9
- package/src/core/primitives/popover/popoverLayer.tsx +2 -2
- package/src/core/primitives/radio/__workshop__/example.tsx +1 -1
- package/src/core/primitives/radio/__workshop__/index.ts +5 -3
- package/src/core/primitives/radio/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +2 -2
- package/src/core/primitives/select/__workshop__/index.ts +5 -3
- package/src/core/primitives/select/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/select/select.tsx +5 -15
- package/src/core/primitives/selectable/selectable.tsx +4 -4
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +1 -1
- package/src/core/primitives/skeleton/__workshop__/index.ts +5 -3
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +2 -2
- package/src/core/primitives/skeleton/codeSkeleton.tsx +2 -2
- package/src/core/primitives/skeleton/headingSkeleton.tsx +2 -2
- package/src/core/primitives/skeleton/labelSkeleton.tsx +2 -2
- package/src/core/primitives/skeleton/skeleton.tsx +2 -2
- package/src/core/primitives/skeleton/textSkeleton.tsx +2 -2
- package/src/core/primitives/spinner/__workshop__/Props.tsx +1 -1
- package/src/core/primitives/spinner/__workshop__/index.ts +5 -3
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +2 -2
- package/src/core/primitives/spinner/spinner.tsx +2 -2
- package/src/core/primitives/srOnly/srOnly.tsx +2 -2
- package/src/core/primitives/stack/__workshop__/index.ts +5 -3
- package/src/core/primitives/stack/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +5 -10
- package/src/core/primitives/switch/__workshop__/example.tsx +1 -1
- package/src/core/primitives/switch/__workshop__/index.ts +5 -3
- package/src/core/primitives/switch/__workshop__/props.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +2 -2
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/__workshop__/example.tsx +1 -1
- package/src/core/primitives/text/__workshop__/index.ts +5 -3
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/text/text.tsx +4 -4
- package/src/core/primitives/textArea/__workshop__/index.ts +5 -3
- package/src/core/primitives/textArea/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textArea/textArea.tsx +5 -15
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/index.ts +5 -3
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/states.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/tones.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/typed.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +6 -9
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/index.ts +5 -3
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/props.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +1 -1
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.test.tsx +2 -4
- package/src/core/primitives/tooltip/tooltip.tsx +5 -9
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +4 -2
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +5 -3
- package/src/core/primitives/tooltip/tooltipLayer.tsx +2 -2
- package/src/core/{types/props.ts → types.ts} +27 -0
- package/src/core/utils/boundaryElement/__workshop__/index.ts +5 -3
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +1 -1
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +2 -1
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -4
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +2 -2
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/index.ts +5 -3
- package/src/core/utils/elementQuery/elementQuery.tsx +2 -2
- package/src/core/utils/getElementRef.ts +1 -1
- package/src/core/utils/portal/__workshop__/index.ts +5 -3
- package/src/core/utils/portal/__workshop__/named.tsx +1 -1
- package/src/core/utils/portal/portal.test.tsx +2 -1
- package/src/core/utils/portal/portalContext.ts +5 -2
- package/src/core/utils/portal/portalProvider.tsx +5 -9
- package/src/css/_responsiveClassName.ts +2 -2
- package/src/css/_style.css.ts +1 -1
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +1 -1
- package/src/css/components/dialog/dialog.css.ts +9 -17
- package/src/css/components/menu/menu.css.ts +2 -2
- package/src/css/components/menu/menu.ts +2 -2
- package/src/css/components/skeleton/skeleton.css.ts +2 -6
- package/src/css/components/toast/toast.css.ts +2 -2
- package/src/css/components/toast/toast.ts +2 -2
- package/src/css/components/tree/tree.css.ts +1 -1
- package/src/css/components/tree/tree.ts +1 -1
- package/src/css/defaultTheme.css.ts +59 -60
- package/src/css/layers.css.ts +4 -1
- package/src/css/primitives/_arrow/_arrow.css.ts +5 -5
- package/src/css/primitives/_input/_input.css.ts +4 -4
- package/src/css/primitives/_selectable/_selectable.css.ts +4 -4
- package/src/css/primitives/_selectable/types.ts +2 -2
- package/src/css/primitives/avatar/avatar.css.ts +10 -10
- package/src/css/primitives/badge/badge.css.ts +4 -4
- package/src/css/primitives/badge/types.ts +8 -2
- package/src/css/primitives/box/box.css.ts +2 -2
- package/src/css/primitives/button/button.css.ts +6 -6
- package/src/css/primitives/button/button.ts +2 -2
- package/src/css/primitives/button/types.ts +3 -3
- package/src/css/primitives/card/__workshop__/color.tsx +9 -9
- package/src/css/primitives/card/__workshop__/index.ts +5 -3
- package/src/css/primitives/card/card.css.ts +12 -18
- package/src/css/primitives/card/types.ts +3 -3
- package/src/css/primitives/checkbox/checkbox.css.ts +3 -3
- package/src/css/primitives/checkbox/checkbox.ts +3 -3
- package/src/css/primitives/code/code.css.ts +4 -3
- package/src/css/primitives/code/types.ts +3 -4
- package/src/css/primitives/container/container.css.ts +1 -1
- package/src/css/primitives/heading/heading.css.ts +5 -4
- package/src/css/primitives/heading/types.ts +3 -6
- package/src/css/primitives/kbd/kbd.css.ts +1 -1
- package/src/css/primitives/label/label.css.ts +5 -4
- package/src/css/primitives/label/types.ts +0 -8
- package/src/css/primitives/popover/popover.css.ts +2 -2
- package/src/css/primitives/popover/popover.ts +2 -2
- package/src/css/primitives/radio/radio.css.ts +3 -3
- package/src/css/primitives/radio/radio.ts +3 -3
- package/src/css/primitives/root/root.css.ts +1 -1
- package/src/css/primitives/root/root.ts +1 -1
- package/src/css/primitives/root/types.ts +3 -3
- package/src/css/primitives/select/select.css.ts +3 -3
- package/src/css/primitives/spinner/spinner.css.ts +2 -6
- package/src/css/primitives/spinner/spinner.ts +2 -2
- package/src/css/primitives/srOnly/srOnly.css.ts +1 -1
- package/src/css/primitives/srOnly/srOnly.ts +1 -1
- package/src/css/primitives/stack/stack.css.ts +1 -1
- package/src/css/primitives/stack/stack.ts +1 -1
- package/src/css/primitives/switch/switch.css.ts +5 -5
- package/src/css/primitives/text/text.css.ts +5 -4
- package/src/css/primitives/text/types.ts +3 -5
- package/src/css/primitives/textArea/textArea.css.ts +1 -1
- package/src/css/primitives/textInput/textInput.css.ts +4 -4
- package/src/css/primitives/tooltip/tooltip.css.ts +1 -1
- package/src/css/props/alignItems/alignItems.ts +1 -1
- package/src/css/props/border/border.ts +1 -16
- package/src/css/props/boxSizing/boxSizing.css.ts +2 -1
- package/src/css/props/boxSizing/boxSizing.ts +0 -3
- package/src/css/props/display/display.ts +1 -10
- package/src/css/props/flex/flex.ts +1 -1
- package/src/css/props/flexDirection/flexDirection.ts +1 -1
- package/src/css/props/flexWrap/flexWrap.ts +1 -1
- package/src/css/props/font/font.css.ts +3 -2
- package/src/css/props/font/font.ts +1 -1
- package/src/css/props/gap/gap.ts +1 -1
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +2 -2
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +2 -2
- package/src/css/props/gridAutoColumns/types.ts +0 -10
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +2 -2
- package/src/css/props/gridAutoFlow/types.ts +0 -4
- package/src/css/props/gridAutoRows/gridAutoRows.ts +2 -2
- package/src/css/props/gridAutoRows/types.ts +0 -4
- package/src/css/props/gridColumn/gridColumn.ts +3 -3
- package/src/css/props/gridColumn/types.ts +0 -10
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +3 -3
- package/src/css/props/gridColumnEnd/types.ts +0 -10
- package/src/css/props/gridColumnStart/gridColumnStart.ts +3 -6
- package/src/css/props/gridColumnStart/types.ts +0 -10
- package/src/css/props/gridRow/gridRow.ts +3 -3
- package/src/css/props/gridRow/types.ts +0 -10
- package/src/css/props/gridRowEnd/gridRowEnd.ts +3 -3
- package/src/css/props/gridRowEnd/types.ts +0 -10
- package/src/css/props/gridRowStart/gridRowStart.ts +3 -3
- package/src/css/props/gridRowStart/types.ts +0 -10
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +2 -2
- package/src/css/props/gridTemplateColumns/types.ts +0 -10
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +2 -2
- package/src/css/props/gridTemplateRows/types.ts +0 -10
- package/src/css/props/height/height.ts +1 -1
- package/src/css/props/height/types.ts +0 -6
- package/src/css/props/inset/inset.ts +1 -1
- package/src/css/props/justifyContent/justifyContent.ts +1 -1
- package/src/css/props/margin/margin.ts +1 -1
- package/src/css/props/maxWidth/maxWidth.ts +1 -1
- package/src/css/props/minHeight/minHeight.ts +1 -1
- package/src/css/props/minWidth/minWidth.ts +1 -1
- package/src/css/props/outline/outline.ts +1 -1
- package/src/css/props/overflow/overflow.ts +1 -1
- package/src/css/props/overflow/types.ts +0 -6
- package/src/css/props/padding/padding.ts +1 -1
- package/src/css/props/pointerEvents/pointerEvents.ts +1 -1
- package/src/css/props/position/position.ts +1 -1
- package/src/css/props/radius/radius.ts +1 -1
- package/src/css/props/shadow/shadow.ts +1 -1
- package/src/css/props/textAlign/textAlign.ts +1 -1
- package/src/css/props/textOverflow/textOverflow.ts +1 -1
- package/src/css/props/width/width.ts +1 -1
- package/src/css/types.ts +225 -53
- package/src/css/util.ts +2 -2
- package/src/css/vars.css.ts +33 -36
- package/src/theme/{v3/_parseColorToken.ts → _parseColorToken.ts} +2 -2
- package/src/theme/buildTheme.ts +33 -0
- package/src/theme/constants.ts +90 -0
- package/src/theme/defaults/color.ts +197 -0
- package/src/theme/{v2/defaults/config.ts → defaults/common.ts} +3 -16
- package/src/theme/{v3/defaultFonts.ts → defaults/fonts.ts} +2 -2
- package/src/theme/index.ts +4 -5
- package/src/theme/{v3/resolveTokens.ts → resolveTokens.ts} +15 -15
- package/src/theme/types.ts +355 -15
- package/src/core/__DEV__.ts +0 -5
- package/src/core/_compat/helpers.ts +0 -72
- package/src/core/_compat/styles/_responsive.ts +0 -19
- package/src/core/_compat/theme/theme.test.tsx +0 -73
- package/src/core/_compat/theme/themeColorProvider.tsx +0 -24
- package/src/core/_compat/theme/themeContext.ts +0 -10
- package/src/core/_compat/theme/themeProvider.tsx +0 -68
- package/src/core/_compat/theme/types.ts +0 -10
- package/src/core/_compat/theme/useRootTheme.ts +0 -15
- package/src/core/_compat/theme/useTheme.ts +0 -12
- package/src/core/_compat/types.ts +0 -191
- package/src/core/hooks/useArrayProp.ts +0 -26
- package/src/core/hooks/useClickOutside.test.tsx +0 -481
- package/src/core/hooks/useClickOutside.ts +0 -113
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -30
- package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
- package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
- package/src/core/hooks/useForwardedRef.ts +0 -19
- package/src/core/hooks/useIsomorphicEffect.ts +0 -7
- package/src/core/primitives/badge/types.ts +0 -18
- package/src/core/primitives/box/types.ts +0 -22
- package/src/core/primitives/flex/types.ts +0 -27
- package/src/core/primitives/grid/types.ts +0 -17
- package/src/core/primitives/selectable/types.ts +0 -7
- package/src/core/primitives/types.ts +0 -153
- package/src/core/types/gridItem.ts +0 -32
- package/src/core/types/placement.ts +0 -18
- package/src/core/types/radius.ts +0 -7
- package/src/core/types/textAlign.ts +0 -7
- package/src/core/utils/spanWithTextOverflow.tsx +0 -10
- package/src/theme/getScopedTheme.ts +0 -88
- package/src/theme/v0/avatar.ts +0 -10
- package/src/theme/v0/color/_generic.ts +0 -35
- package/src/theme/v0/color/_system.ts +0 -17
- package/src/theme/v0/color/base.ts +0 -21
- package/src/theme/v0/color/button.ts +0 -42
- package/src/theme/v0/color/card.ts +0 -19
- package/src/theme/v0/color/color.ts +0 -40
- package/src/theme/v0/color/index.ts +0 -11
- package/src/theme/v0/color/input.ts +0 -34
- package/src/theme/v0/color/muted.ts +0 -26
- package/src/theme/v0/color/selectable.ts +0 -31
- package/src/theme/v0/color/solid.ts +0 -26
- package/src/theme/v0/color/spot.ts +0 -13
- package/src/theme/v0/css.ts +0 -10
- package/src/theme/v0/focusRing.ts +0 -5
- package/src/theme/v0/font.ts +0 -40
- package/src/theme/v0/index.ts +0 -10
- package/src/theme/v0/input.ts +0 -23
- package/src/theme/v0/layer.ts +0 -6
- package/src/theme/v0/shadow.ts +0 -15
- package/src/theme/v0/styles.ts +0 -13
- package/src/theme/v0/theme.ts +0 -72
- package/src/theme/v2/avatar.ts +0 -12
- package/src/theme/v2/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
- package/src/theme/v2/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
- package/src/theme/v2/build/_deprecated/color/button/createButtonModes.ts +0 -22
- package/src/theme/v2/build/_deprecated/color/button/createButtonTones.ts +0 -55
- package/src/theme/v2/build/_deprecated/color/card/createCardStates.ts +0 -60
- package/src/theme/v2/build/_deprecated/color/color.test.ts +0 -63
- package/src/theme/v2/build/_deprecated/color/defaults.ts +0 -390
- package/src/theme/v2/build/_deprecated/color/factory.ts +0 -141
- package/src/theme/v2/build/_deprecated/color/index.ts +0 -1
- package/src/theme/v2/build/_deprecated/color/input/createInputModes.ts +0 -86
- package/src/theme/v2/build/_deprecated/color/muted/createMuted.ts +0 -54
- package/src/theme/v2/build/_deprecated/color/spot/createSpot.ts +0 -20
- package/src/theme/v2/build/buildColorTheme.test.ts +0 -185
- package/src/theme/v2/build/buildColorTheme.ts +0 -494
- package/src/theme/v2/build/buildTheme.test.ts +0 -89
- package/src/theme/v2/build/buildTheme.ts +0 -37
- package/src/theme/v2/build/colorToken/colorToken.ts +0 -19
- package/src/theme/v2/build/colorToken/compileColorToken.ts +0 -21
- package/src/theme/v2/build/colorToken/index.ts +0 -2
- package/src/theme/v2/build/colorToken/types.ts +0 -6
- package/src/theme/v2/build/index.ts +0 -3
- package/src/theme/v2/build/lib/color-fns/blend/index.ts +0 -3
- package/src/theme/v2/build/lib/color-fns/blend/mix.ts +0 -21
- package/src/theme/v2/build/lib/color-fns/blend/multiply.ts +0 -18
- package/src/theme/v2/build/lib/color-fns/blend/screen.ts +0 -18
- package/src/theme/v2/build/lib/color-fns/color-fns.test.ts +0 -68
- package/src/theme/v2/build/lib/color-fns/contrastRatio.ts +0 -34
- package/src/theme/v2/build/lib/color-fns/convert.ts +0 -150
- package/src/theme/v2/build/lib/color-fns/index.ts +0 -6
- package/src/theme/v2/build/lib/color-fns/parse.ts +0 -60
- package/src/theme/v2/build/lib/color-fns/rgba.ts +0 -14
- package/src/theme/v2/build/lib/color-fns/types.ts +0 -28
- package/src/theme/v2/build/lib/isRecord.ts +0 -3
- package/src/theme/v2/build/lib/utils.ts +0 -19
- package/src/theme/v2/build/merge.ts +0 -28
- package/src/theme/v2/build/mixThemeColor.test.ts +0 -23
- package/src/theme/v2/build/mixThemeColor.ts +0 -53
- package/src/theme/v2/build/renderColorTheme.ts +0 -532
- package/src/theme/v2/build/renderColorValue.ts +0 -85
- package/src/theme/v2/build/resolveColorTokens.ts +0 -268
- package/src/theme/v2/color/_constants.ts +0 -45
- package/src/theme/v2/color/_helpers.ts +0 -24
- package/src/theme/v2/color/_system.ts +0 -38
- package/src/theme/v2/color/avatar.ts +0 -11
- package/src/theme/v2/color/badge.ts +0 -12
- package/src/theme/v2/color/button.ts +0 -11
- package/src/theme/v2/color/color.ts +0 -28
- package/src/theme/v2/color/index.ts +0 -13
- package/src/theme/v2/color/input.ts +0 -23
- package/src/theme/v2/color/kbd.ts +0 -6
- package/src/theme/v2/color/selectable.ts +0 -8
- package/src/theme/v2/color/shadow.ts +0 -7
- package/src/theme/v2/color/state.ts +0 -41
- package/src/theme/v2/color/syntax.ts +0 -39
- package/src/theme/v2/config/helpers.ts +0 -48
- package/src/theme/v2/config/index.ts +0 -4
- package/src/theme/v2/config/system.ts +0 -114
- package/src/theme/v2/config/tokens/color/index.ts +0 -1
- package/src/theme/v2/config/tokens/color/types.ts +0 -137
- package/src/theme/v2/config/tokens/index.ts +0 -3
- package/src/theme/v2/config/tokens/parseTokenValue.test.ts +0 -44
- package/src/theme/v2/config/tokens/parseTokenValue.ts +0 -133
- package/src/theme/v2/config/tokens/types.ts +0 -53
- package/src/theme/v2/config/types.ts +0 -47
- package/src/theme/v2/defaults/colorPalette.ts +0 -5
- package/src/theme/v2/defaults/colorTokens.ts +0 -648
- package/src/theme/v2/defaults/fonts.ts +0 -227
- package/src/theme/v2/index.ts +0 -6
- package/src/theme/v2/input.ts +0 -31
- package/src/theme/v2/theme.ts +0 -45
- package/src/theme/v3/_constants.ts +0 -29
- package/src/theme/v3/buildTheme_v3.ts +0 -39
- package/src/theme/v3/color/_constants.ts +0 -15
- package/src/theme/v3/color/avatar.ts +0 -14
- package/src/theme/v3/color/card.ts +0 -79
- package/src/theme/v3/color/color.ts +0 -98
- package/src/theme/v3/color/element.ts +0 -19
- package/src/theme/v3/color/index.ts +0 -7
- package/src/theme/v3/color/token.ts +0 -32
- package/src/theme/v3/color/tokens.ts +0 -5
- package/src/theme/v3/defaultTokens.ts +0 -199
- package/src/theme/v3/index.ts +0 -9
- package/src/theme/v3/palette/constants.ts +0 -15
- package/src/theme/v3/palette/index.ts +0 -2
- package/src/theme/v3/palette/types.ts +0 -7
- package/src/theme/v3/tokens.ts +0 -16
- package/src/theme/v3/types.ts +0 -133
- package/src/theme/versioning/getTheme_v2.ts +0 -58
- package/src/theme/versioning/index.ts +0 -1
- package/src/theme/versioning/is_v0.ts +0 -7
- package/src/theme/versioning/is_v2.ts +0 -7
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -245
- package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
- package/src/theme/versioning/themeColor_v3_v2.ts +0 -383
- package/src/theme/versioning/v0_v2.ts +0 -95
- package/src/theme/versioning/v2_v0.ts +0 -127
- package/src/theme/versioning/v3_v2.ts +0 -130
- /package/src/theme/{v3/merge.ts → merge.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refractor.js","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import Refractor from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n) {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? Refractor.hasLanguage(language) : false\n\n return (\n <>\n {!(language && registered) && <code>{value}</code>}\n {language && registered && <Refractor inline language={language} value={String(value)} />}\n </>\n )\n}\n"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","Refractor","hasLanguage","registered","t1","t2","String","t3"],"mappings":";;;AAEA,SAAeA,cAAAC,OAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAWA,eAAYE;AAAYC,MAAAA;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,UAAAC,YAAsBN,QAAQ,IAAS,IAAAF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAArE,QAAAS,aAAmBH;AAAkDI,MAAAA;AAAAV,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SAIhEM,KAAA,EAAER,YAAYO,2CAAsBL,EAAAA,UAAAA,MAAAA,CAAM,GAAOJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAAW,MAAAA;AAAAX,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SACjDO,KAAAT,YAAYO,kCAAe,WAAU,EAAA,QAAK,IAAYP,UAAiB,OAAAU,OAAOR,KAAK,EAAA,CAAK,GAAAJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAW,MAAAA,KAAAX,EAAA,CAAA;AAAAa,MAAAA;AAAAb,SAAAA,EAAAU,EAAAA,MAAAA,MAAAV,UAAAW,MAF3FE,KACGH,qBAAAA,UAAAA,EAAAA,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAwF,CAAA,GACxFX,QAAAU,IAAAV,QAAAW,IAAAX,QAAAa,MAAAA,KAAAb,EAAA,EAAA,GAHHa;AAGG;"}
|
|
1
|
+
{"version":3,"file":"refractor.js","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import Refractor from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n): React.JSX.Element {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? Refractor.hasLanguage(language) : false\n\n return (\n <>\n {!(language && registered) && <code>{value}</code>}\n {language && registered && <Refractor inline language={language} value={String(value)} />}\n </>\n )\n}\n"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","Refractor","hasLanguage","registered","t1","t2","String","t3"],"mappings":";;;AAEA,SAAeA,cAAAC,OAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAWA,eAAYE;AAAYC,MAAAA;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,UAAAC,YAAsBN,QAAQ,IAAS,IAAAF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAArE,QAAAS,aAAmBH;AAAkDI,MAAAA;AAAAV,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SAIhEM,KAAA,EAAER,YAAYO,2CAAsBL,EAAAA,UAAAA,MAAAA,CAAM,GAAOJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAAW,MAAAA;AAAAX,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SACjDO,KAAAT,YAAYO,kCAAe,WAAU,EAAA,QAAK,IAAYP,UAAiB,OAAAU,OAAOR,KAAK,EAAA,CAAK,GAAAJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAW,MAAAA,KAAAX,EAAA,CAAA;AAAAa,MAAAA;AAAAb,SAAAA,EAAAU,EAAAA,MAAAA,MAAAV,UAAAW,MAF3FE,KACGH,qBAAAA,UAAAA,EAAAA,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAwF,CAAA,GACxFX,QAAAU,IAAAV,QAAAW,IAAAX,QAAAa,MAAAA,KAAAb,EAAA,EAAA,GAHHa;AAGG;"}
|
package/dist/_visual-editing.cjs
CHANGED
|
@@ -21,10 +21,8 @@ exports.Tab = _visualEditing.Tab;
|
|
|
21
21
|
exports.TabList = _visualEditing.TabList;
|
|
22
22
|
exports.Text = _visualEditing.Text;
|
|
23
23
|
exports.TextInput = _visualEditing.TextInput;
|
|
24
|
-
exports.ThemeProvider = _visualEditing.ThemeProvider;
|
|
25
24
|
exports.Tooltip = _visualEditing.Tooltip;
|
|
26
25
|
exports.isHTMLAnchorElement = _visualEditing.isHTMLAnchorElement;
|
|
27
26
|
exports.isHTMLElement = _visualEditing.isHTMLElement;
|
|
28
27
|
exports.usePrefersDark = _visualEditing.usePrefersDark;
|
|
29
|
-
exports.useTheme_v2 = _visualEditing.useTheme_v2;
|
|
30
28
|
//# sourceMappingURL=_visual-editing.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_visual-editing.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_visual-editing.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import type {AlignItems} from '@sanity/ui/css'
|
|
2
|
-
import
|
|
2
|
+
import {BoxStyleProps} from '@sanity/ui/css'
|
|
3
3
|
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
4
4
|
import {CardStyleProps} from '@sanity/ui/css'
|
|
5
|
+
import type {CardTone} from '@sanity/ui/theme'
|
|
6
|
+
import type {ColorScheme} from '@sanity/ui/theme'
|
|
5
7
|
import type {ComponentClass} from 'react'
|
|
6
8
|
import type {ComponentProps} from 'react'
|
|
7
9
|
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
10
|
+
import type {ElementTone} from '@sanity/ui/theme'
|
|
8
11
|
import {ElementType as ElementType_2} from 'react'
|
|
9
12
|
import type {ExoticComponent} from 'react'
|
|
10
13
|
import type {FlexDirection} from '@sanity/ui/css'
|
|
11
14
|
import type {FlexWrap} from '@sanity/ui/css'
|
|
12
15
|
import type {FontTextSize} from '@sanity/ui/theme'
|
|
16
|
+
import type {FontWeight} from '@sanity/ui/theme'
|
|
13
17
|
import {ForwardedRef} from 'react'
|
|
14
18
|
import type {FunctionComponent} from 'react'
|
|
15
19
|
import type {GapStyleProps} from '@sanity/ui/css'
|
|
16
20
|
import {HTMLAttributes} from 'react'
|
|
17
21
|
import {InputStyleProps} from '@sanity/ui/css'
|
|
18
|
-
import type {
|
|
19
|
-
import {JSX} from 'react'
|
|
22
|
+
import type {JSX} from 'react'
|
|
20
23
|
import type {JustifyContent} from '@sanity/ui/css'
|
|
21
24
|
import {MaxWidth} from '@sanity/ui/css'
|
|
22
25
|
import {PaddingStyleProps} from '@sanity/ui/css'
|
|
23
|
-
import type {PositionStyleProps} from '@sanity/ui/css'
|
|
24
26
|
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
25
27
|
import {ReactElement} from 'react'
|
|
26
28
|
import {ReactNode} from 'react'
|
|
@@ -28,16 +30,10 @@ import type {ReactPortal} from 'react'
|
|
|
28
30
|
import {Ref} from 'react'
|
|
29
31
|
import {RefAttributes} from 'react'
|
|
30
32
|
import {ResponsiveProp} from '@sanity/ui/css'
|
|
31
|
-
import {RootTheme} from '@sanity/ui/theme'
|
|
32
33
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
33
34
|
import type {Space} from '@sanity/ui/theme'
|
|
34
35
|
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
35
36
|
import {TextStyleProps} from '@sanity/ui/css'
|
|
36
|
-
import {Theme_v2} from '@sanity/ui/theme'
|
|
37
|
-
import {ThemeColorCardToneKey} from '@sanity/ui/theme'
|
|
38
|
-
import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
39
|
-
import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
40
|
-
import type {ThemeFontWeightKey} from '@sanity/ui/theme'
|
|
41
37
|
import type {Width} from '@sanity/ui/css'
|
|
42
38
|
|
|
43
39
|
/**
|
|
@@ -55,7 +51,7 @@ declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
|
|
|
55
51
|
*/
|
|
56
52
|
export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
|
|
57
53
|
props: BoxProps<E>,
|
|
58
|
-
): JSX.Element
|
|
54
|
+
): React.JSX.Element
|
|
59
55
|
|
|
60
56
|
/** @public */
|
|
61
57
|
declare type BoxElementType =
|
|
@@ -90,7 +86,7 @@ declare type BoxElementType =
|
|
|
90
86
|
| ComponentType
|
|
91
87
|
|
|
92
88
|
/** @public */
|
|
93
|
-
declare type BoxOwnProps = BoxStyleProps
|
|
89
|
+
declare type BoxOwnProps = BoxStyleProps
|
|
94
90
|
|
|
95
91
|
/** @public */
|
|
96
92
|
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
@@ -98,7 +94,7 @@ export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<
|
|
|
98
94
|
/** @public */
|
|
99
95
|
export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
|
|
100
96
|
props: ButtonProps<E>,
|
|
101
|
-
): JSX.Element
|
|
97
|
+
): React.JSX.Element
|
|
102
98
|
|
|
103
99
|
/** @public */
|
|
104
100
|
declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
@@ -118,8 +114,6 @@ declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
118
114
|
/** @beta Do not use in production, as this might change.*/
|
|
119
115
|
'loading'?: boolean
|
|
120
116
|
'selected'?: boolean
|
|
121
|
-
/** @deprecated Use `gap` instead. */
|
|
122
|
-
'space'?: ResponsiveProp<Space>
|
|
123
117
|
'textAlign'?: ButtonTextAlign
|
|
124
118
|
'muted'?: boolean
|
|
125
119
|
'target'?: string
|
|
@@ -146,7 +140,7 @@ declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
|
146
140
|
*/
|
|
147
141
|
export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
|
|
148
142
|
props: CardProps<E>,
|
|
149
|
-
): JSX.Element
|
|
143
|
+
): React.JSX.Element
|
|
150
144
|
|
|
151
145
|
/** @public */
|
|
152
146
|
declare type CardElementType = BoxElementType
|
|
@@ -250,7 +244,7 @@ declare type EmptyProps = {}
|
|
|
250
244
|
*/
|
|
251
245
|
export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
|
|
252
246
|
props: FlexProps<E>,
|
|
253
|
-
): JSX.Element
|
|
247
|
+
): React.JSX.Element
|
|
254
248
|
|
|
255
249
|
/** @public */
|
|
256
250
|
declare type FlexElementType = BoxElementType
|
|
@@ -276,7 +270,7 @@ export declare type FlexProps<E extends FlexElementType = FlexElementType> = Pro
|
|
|
276
270
|
*/
|
|
277
271
|
export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
|
|
278
272
|
props: GridProps<E>,
|
|
279
|
-
): JSX.Element
|
|
273
|
+
): React.JSX.Element
|
|
280
274
|
|
|
281
275
|
/** @public */
|
|
282
276
|
declare type GridElementType = BoxElementType
|
|
@@ -294,7 +288,7 @@ export declare type GridProps<E extends GridElementType = GridElementType> = Pro
|
|
|
294
288
|
*/
|
|
295
289
|
export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
|
|
296
290
|
props: HotkeysProps<E>,
|
|
297
|
-
): JSX.Element | undefined
|
|
291
|
+
): React.JSX.Element | undefined
|
|
298
292
|
|
|
299
293
|
/** @public */
|
|
300
294
|
declare type HotkeysElementType = 'kbd' | ComponentType
|
|
@@ -303,8 +297,6 @@ declare type HotkeysElementType = 'kbd' | ComponentType
|
|
|
303
297
|
declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
|
|
304
298
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
305
299
|
padding?: ResponsiveProp<Space>
|
|
306
|
-
/** @deprecated Use `gap` instead. */
|
|
307
|
-
space?: ResponsiveProp<Space>
|
|
308
300
|
keys?: string[]
|
|
309
301
|
}
|
|
310
302
|
|
|
@@ -332,7 +324,7 @@ declare type LayerOwnProps = CardOwnProps & {
|
|
|
332
324
|
}
|
|
333
325
|
|
|
334
326
|
/** @public */
|
|
335
|
-
export declare function LayerProvider(props: LayerProviderProps):
|
|
327
|
+
export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
|
|
336
328
|
|
|
337
329
|
/** @public */
|
|
338
330
|
declare interface LayerProviderProps {
|
|
@@ -347,12 +339,12 @@ declare interface LayerProviderProps {
|
|
|
347
339
|
*/
|
|
348
340
|
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
349
341
|
props: MenuProps<E>,
|
|
350
|
-
): JSX.Element
|
|
342
|
+
): React.JSX.Element
|
|
351
343
|
|
|
352
344
|
/** @public */
|
|
353
345
|
export declare function MenuDivider<
|
|
354
346
|
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
355
|
-
>(props: MenuDividerProps<E>): JSX.Element
|
|
347
|
+
>(props: MenuDividerProps<E>): React.JSX.Element
|
|
356
348
|
|
|
357
349
|
/** @public */
|
|
358
350
|
declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
@@ -372,7 +364,7 @@ declare type MenuElementType = 'div' | 'span' | ComponentType
|
|
|
372
364
|
/** @public */
|
|
373
365
|
export declare function MenuGroup<
|
|
374
366
|
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
375
|
-
>(props: MenuGroupProps<E>): JSX.Element
|
|
367
|
+
>(props: MenuGroupProps<E>): React.JSX.Element
|
|
376
368
|
|
|
377
369
|
/** @public */
|
|
378
370
|
declare type MenuGroupElementType = 'button' | ComponentType
|
|
@@ -396,10 +388,8 @@ declare type MenuGroupOwnProps = RadiusStyleProps & {
|
|
|
396
388
|
>
|
|
397
389
|
padding?: ResponsiveProp<Space>
|
|
398
390
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
399
|
-
/** @deprecated Use `gap` instead. */
|
|
400
|
-
space?: ResponsiveProp<Space>
|
|
401
391
|
text?: ReactNode
|
|
402
|
-
tone?:
|
|
392
|
+
tone?: ElementTone
|
|
403
393
|
}
|
|
404
394
|
|
|
405
395
|
/** @public */
|
|
@@ -411,7 +401,7 @@ export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupEle
|
|
|
411
401
|
/** @public */
|
|
412
402
|
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
413
403
|
props: MenuItemProps<E>,
|
|
414
|
-
): JSX.Element
|
|
404
|
+
): React.JSX.Element
|
|
415
405
|
|
|
416
406
|
/** @public */
|
|
417
407
|
declare type MenuItemElementType = 'button' | 'a' | ComponentType
|
|
@@ -427,10 +417,8 @@ declare type MenuItemOwnProps = GapStyleProps &
|
|
|
427
417
|
iconRight?: ElementType_2 | ReactNode
|
|
428
418
|
pressed?: boolean
|
|
429
419
|
selected?: boolean
|
|
430
|
-
/** @deprecated Use `gap` instead. */
|
|
431
|
-
space?: ResponsiveProp<Space>
|
|
432
420
|
text?: ReactNode
|
|
433
|
-
tone?:
|
|
421
|
+
tone?: ElementTone
|
|
434
422
|
}
|
|
435
423
|
|
|
436
424
|
/** @public */
|
|
@@ -441,14 +429,6 @@ export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElemen
|
|
|
441
429
|
|
|
442
430
|
/** @public */
|
|
443
431
|
declare type MenuOwnProps = PaddingStyleProps & {
|
|
444
|
-
/**
|
|
445
|
-
* @deprecated Use `shouldFocus="first"` instead.
|
|
446
|
-
*/
|
|
447
|
-
'focusFirst'?: boolean
|
|
448
|
-
/**
|
|
449
|
-
* @deprecated Use `shouldFocus="last"` instead.
|
|
450
|
-
*/
|
|
451
|
-
'focusLast'?: boolean
|
|
452
432
|
'gap'?: ResponsiveProp<Space>
|
|
453
433
|
'onClickOutside'?: (event: MouseEvent) => void
|
|
454
434
|
'onEscape'?: () => void
|
|
@@ -457,8 +437,6 @@ declare type MenuOwnProps = PaddingStyleProps & {
|
|
|
457
437
|
'originElement'?: HTMLElement | null
|
|
458
438
|
'registerElement'?: (el: HTMLElement) => () => void
|
|
459
439
|
'shouldFocus'?: 'first' | 'last' | null
|
|
460
|
-
/** @deprecated Use `gap` property instead. */
|
|
461
|
-
'space'?: ResponsiveProp<Space>
|
|
462
440
|
'aria-labelledby'?: string
|
|
463
441
|
}
|
|
464
442
|
|
|
@@ -491,7 +469,7 @@ declare type Placement =
|
|
|
491
469
|
*/
|
|
492
470
|
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
493
471
|
props: PopoverProps<E>,
|
|
494
|
-
): JSX.Element
|
|
472
|
+
): React.JSX.Element
|
|
495
473
|
|
|
496
474
|
/** @public */
|
|
497
475
|
declare type PopoverElementType = 'div' | ComponentType
|
|
@@ -513,8 +491,6 @@ declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
|
|
|
513
491
|
*/
|
|
514
492
|
animate?: boolean
|
|
515
493
|
arrow?: boolean
|
|
516
|
-
/** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
|
|
517
|
-
boundaryElement?: HTMLElement | null
|
|
518
494
|
children?: ReactElement<{
|
|
519
495
|
ref: ForwardedRef<HTMLElement>
|
|
520
496
|
}>
|
|
@@ -598,14 +574,10 @@ export declare interface PortalProps {
|
|
|
598
574
|
}
|
|
599
575
|
|
|
600
576
|
/** @public */
|
|
601
|
-
export declare function PortalProvider(props: PortalProviderProps):
|
|
577
|
+
export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
|
|
602
578
|
|
|
603
579
|
/** @public */
|
|
604
580
|
export declare interface PortalProviderProps {
|
|
605
|
-
/**
|
|
606
|
-
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
607
|
-
*/
|
|
608
|
-
boundaryElement?: HTMLElement | null
|
|
609
581
|
children: ReactNode
|
|
610
582
|
element?: HTMLElement | null
|
|
611
583
|
/**
|
|
@@ -629,7 +601,7 @@ declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
|
629
601
|
*/
|
|
630
602
|
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
631
603
|
props: SpinnerProps<E>,
|
|
632
|
-
): JSX.Element
|
|
604
|
+
): React.JSX.Element
|
|
633
605
|
|
|
634
606
|
/** @public */
|
|
635
607
|
declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
@@ -653,7 +625,7 @@ export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementTy
|
|
|
653
625
|
*/
|
|
654
626
|
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
655
627
|
props: StackProps<E>,
|
|
656
|
-
): JSX.Element
|
|
628
|
+
): React.JSX.Element
|
|
657
629
|
|
|
658
630
|
/** @public */
|
|
659
631
|
declare type StackElementType = BoxElementType
|
|
@@ -675,10 +647,7 @@ declare type StackOwnProps = Omit<
|
|
|
675
647
|
| 'justifyContent'
|
|
676
648
|
| 'rows'
|
|
677
649
|
| 'gridTemplateRows'
|
|
678
|
-
>
|
|
679
|
-
/** @deprecated Use `gap` instead. */
|
|
680
|
-
space?: ResponsiveProp<Space>
|
|
681
|
-
}
|
|
650
|
+
>
|
|
682
651
|
|
|
683
652
|
/** @public */
|
|
684
653
|
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
@@ -689,7 +658,7 @@ export declare type StackProps<E extends StackElementType = StackElementType> =
|
|
|
689
658
|
/** @public */
|
|
690
659
|
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
691
660
|
props: TabProps<E>,
|
|
692
|
-
): JSX.Element
|
|
661
|
+
): React.JSX.Element
|
|
693
662
|
|
|
694
663
|
/** @public */
|
|
695
664
|
declare type TabElementType = 'button' | ComponentType
|
|
@@ -697,7 +666,7 @@ declare type TabElementType = 'button' | ComponentType
|
|
|
697
666
|
/** @public */
|
|
698
667
|
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
699
668
|
props: TabListProps<E>,
|
|
700
|
-
): JSX.Element
|
|
669
|
+
): React.JSX.Element
|
|
701
670
|
|
|
702
671
|
/** @public */
|
|
703
672
|
declare type TabListChild = ReactElement<Props<TabProps, 'button'>> | null | undefined | false
|
|
@@ -708,8 +677,6 @@ declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
|
708
677
|
/** @public */
|
|
709
678
|
declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
|
|
710
679
|
children: TabListChild[]
|
|
711
|
-
/** @deprecated Use `gap` instead */
|
|
712
|
-
space?: ResponsiveProp<Space>
|
|
713
680
|
}
|
|
714
681
|
|
|
715
682
|
/** @public */
|
|
@@ -731,7 +698,7 @@ declare type TabOwnProps = {
|
|
|
731
698
|
'label'?: ReactNode
|
|
732
699
|
'padding'?: ResponsiveProp<Space>
|
|
733
700
|
'selected'?: boolean
|
|
734
|
-
'tone'?:
|
|
701
|
+
'tone'?: ElementTone
|
|
735
702
|
}
|
|
736
703
|
|
|
737
704
|
/** @public */
|
|
@@ -747,7 +714,7 @@ declare type TagType = keyof JSX.IntrinsicElements
|
|
|
747
714
|
*/
|
|
748
715
|
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
749
716
|
props: TextProps<E>,
|
|
750
|
-
): JSX.Element
|
|
717
|
+
): React.JSX.Element
|
|
751
718
|
export {Text_2 as Text}
|
|
752
719
|
|
|
753
720
|
/** @public */
|
|
@@ -772,7 +739,7 @@ declare type TextElementType =
|
|
|
772
739
|
*/
|
|
773
740
|
export declare function TextInput<
|
|
774
741
|
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
775
|
-
>(props: TextInputProps<E>): JSX.Element
|
|
742
|
+
>(props: TextInputProps<E>): React.JSX.Element
|
|
776
743
|
|
|
777
744
|
/** @public */
|
|
778
745
|
declare type TextInputClearButtonProps = Omit<
|
|
@@ -801,10 +768,8 @@ declare type TextInputOwnProps = InputStyleProps & {
|
|
|
801
768
|
*/
|
|
802
769
|
onClear?: () => void
|
|
803
770
|
prefix?: ReactNode
|
|
804
|
-
/** @deprecated Use `gap` instead. */
|
|
805
|
-
space?: ResponsiveProp<Space>
|
|
806
771
|
suffix?: ReactNode
|
|
807
|
-
weight?:
|
|
772
|
+
weight?: FontWeight
|
|
808
773
|
}
|
|
809
774
|
|
|
810
775
|
/** @public */
|
|
@@ -819,17 +784,6 @@ declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
|
819
784
|
/** @public */
|
|
820
785
|
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
821
786
|
|
|
822
|
-
/** @public */
|
|
823
|
-
export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
|
|
824
|
-
|
|
825
|
-
/** @public */
|
|
826
|
-
export declare interface ThemeProviderProps {
|
|
827
|
-
children?: ReactNode
|
|
828
|
-
scheme?: ThemeColorSchemeKey
|
|
829
|
-
theme?: RootTheme
|
|
830
|
-
tone?: ThemeColorCardToneKey
|
|
831
|
-
}
|
|
832
|
-
|
|
833
787
|
/**
|
|
834
788
|
* Tooltips display information when hovering, focusing or tapping.
|
|
835
789
|
*
|
|
@@ -837,7 +791,7 @@ export declare interface ThemeProviderProps {
|
|
|
837
791
|
*/
|
|
838
792
|
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
839
793
|
props: TooltipProps<E>,
|
|
840
|
-
): JSX.Element
|
|
794
|
+
): React.JSX.Element
|
|
841
795
|
|
|
842
796
|
/** @public */
|
|
843
797
|
declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
@@ -846,8 +800,6 @@ declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
|
846
800
|
declare type TooltipOwnProps = LayerOwnProps &
|
|
847
801
|
RadiusStyleProps &
|
|
848
802
|
ShadowStyleProps & {
|
|
849
|
-
/** @deprecated Use `fallbackPlacements` instead. */
|
|
850
|
-
allowedAutoPlacements?: Placement[]
|
|
851
803
|
/**
|
|
852
804
|
* Whether the tooltip should animate in and out.
|
|
853
805
|
*
|
|
@@ -875,8 +827,8 @@ declare type TooltipOwnProps = LayerOwnProps &
|
|
|
875
827
|
placement?: Placement
|
|
876
828
|
/** Whether or not to render the tooltip in a portal element. */
|
|
877
829
|
portal?: boolean | string
|
|
878
|
-
scheme?:
|
|
879
|
-
tone?:
|
|
830
|
+
scheme?: ColorScheme
|
|
831
|
+
tone?: CardTone
|
|
880
832
|
}
|
|
881
833
|
|
|
882
834
|
/** @public */
|
|
@@ -898,7 +850,4 @@ export declare type TooltipProps<E extends TooltipElementType = TooltipElementTy
|
|
|
898
850
|
*/
|
|
899
851
|
export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
|
|
900
852
|
|
|
901
|
-
/** @public */
|
|
902
|
-
export declare function useTheme_v2(): Theme_v2
|
|
903
|
-
|
|
904
853
|
export {}
|