@sanity/ui 3.0.0-static.2 → 3.0.0-static.20
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 +6 -6
- package/bin/{ui.js → sanity-ui.cjs} +1 -1
- package/dist/_chunks-cjs/_visual-editing.cjs +3152 -0
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
- package/dist/_chunks-cjs/buildCommand.cjs +71 -0
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -0
- package/dist/_chunks-cjs/{refractor.js → refractor.cjs} +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -0
- package/dist/_chunks-es/_visual-editing.js +3163 -0
- package/dist/_chunks-es/_visual-editing.js.map +1 -0
- package/dist/_chunks-es/{refractor.mjs → refractor.js} +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -0
- package/dist/_visual-editing.cjs +30 -0
- package/dist/_visual-editing.cjs.map +1 -0
- package/dist/_visual-editing.d.cts +959 -0
- package/dist/_visual-editing.d.ts +545 -392
- package/dist/_visual-editing.js +29 -30
- package/dist/_visual-editing.js.map +1 -1
- package/dist/{cli.js → cli.cjs} +4 -4
- package/dist/cli.cjs.map +1 -0
- package/dist/css.cjs +4353 -0
- package/dist/css.cjs.map +1 -0
- package/dist/css.d.cts +10251 -0
- package/dist/css.d.ts +9714 -1598
- package/dist/css.js +3460 -3818
- package/dist/css.js.map +1 -1
- package/dist/index.cjs +1594 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +1435 -918
- package/dist/index.d.ts +1435 -918
- package/dist/index.js +622 -572
- package/dist/index.js.map +1 -1
- package/dist/{theme.mjs → theme.cjs} +2821 -2570
- package/dist/theme.cjs.map +1 -0
- package/dist/{theme.d.mts → theme.d.cts} +330 -310
- package/dist/theme.d.ts +330 -310
- package/dist/theme.js +2822 -2569
- package/dist/theme.js.map +1 -1
- package/dist/ui-system.css +24528 -0
- package/dist/ui-system.min.css +1 -0
- package/dist/ui-theme.css +1184 -0
- package/dist/ui-theme.min.css +1 -0
- package/dist/ui.css +25715 -0
- package/dist/ui.min.css +1 -0
- package/exports/_visual-editing.ts +0 -1
- package/package.json +78 -78
- package/src/cli/buildCommand.ts +77 -25
- package/src/cli/index.ts +2 -14
- package/src/core/StyleTags.tsx +8 -14
- package/src/core/_compat/helpers.ts +72 -0
- package/src/core/_compat/index.ts +1 -6
- package/src/core/_compat/styles/_responsive.ts +1 -1
- package/src/core/_compat/theme/theme.test.tsx +4 -5
- package/src/core/_compat/theme/themeColorProvider.tsx +4 -8
- package/src/core/_compat/theme/themeContext.ts +5 -5
- package/src/core/_compat/theme/themeProvider.tsx +19 -11
- package/src/core/_compat/theme/types.ts +2 -4
- package/src/core/_compat/theme/useRootTheme.ts +2 -4
- package/src/core/_compat/theme/useTheme.ts +3 -7
- package/src/core/_compat/types.ts +0 -73
- package/src/core/components/autocomplete/__workshop__/async.tsx +6 -6
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +11 -18
- package/src/core/components/autocomplete/__workshop__/custom.tsx +21 -20
- package/src/core/components/autocomplete/__workshop__/example.tsx +17 -17
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +5 -5
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +57 -59
- package/src/core/components/autocomplete/autocomplete.tsx +92 -126
- package/src/core/components/autocomplete/autocompleteOption.tsx +3 -1
- package/src/core/components/autocomplete/autocompleteReducer.ts +1 -1
- package/src/core/components/autocomplete/constants.ts +1 -1
- package/src/core/components/autocomplete/types.ts +4 -9
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +2 -3
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +34 -28
- package/src/core/components/dialog/__workshop__/activate.tsx +4 -4
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +2 -2
- package/src/core/components/dialog/__workshop__/onScroll.tsx +16 -4
- package/src/core/components/dialog/__workshop__/position.tsx +4 -4
- package/src/core/components/dialog/__workshop__/props.tsx +7 -7
- package/src/core/components/dialog/__workshop__/wrapped.tsx +2 -2
- package/src/core/components/dialog/dialog.tsx +104 -300
- package/src/core/components/dialog/dialogCard.tsx +198 -0
- package/src/core/components/dialog/dialogContext.ts +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +3 -3
- package/src/core/components/dialog/isTargetWithinScope.ts +14 -0
- package/src/core/components/dialog/useDialog.ts +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +42 -26
- package/src/core/components/menu/__workshop__/asComponent.tsx +6 -6
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +5 -4
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +2 -2
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +3 -3
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +1 -1
- package/src/core/components/menu/__workshop__/groups.tsx +2 -2
- package/src/core/components/menu/__workshop__/menuButton.tsx +4 -4
- 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 +13 -4
- package/src/core/components/menu/__workshop__/selectedItem.tsx +2 -2
- 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 +6 -7
- package/src/core/components/menu/menu.tsx +28 -34
- package/src/core/components/menu/menuButton.tsx +19 -23
- package/src/core/components/menu/menuContext.ts +1 -1
- package/src/core/components/menu/menuDivider.tsx +26 -14
- package/src/core/components/menu/menuGroup.tsx +39 -31
- package/src/core/components/menu/menuItem.tsx +59 -45
- package/src/core/components/menu/useMenu.ts +1 -1
- package/src/core/components/menu/useMenuController.ts +4 -4
- package/src/core/components/skeleton/__workshop__/delay.tsx +3 -3
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +4 -4
- package/src/core/components/skeleton/codeSkeleton.tsx +53 -0
- package/src/core/components/skeleton/headingSkeleton.tsx +52 -0
- package/src/core/components/skeleton/index.ts +3 -0
- package/src/core/components/skeleton/labelSkeleton.tsx +51 -0
- package/src/core/components/skeleton/skeleton.tsx +40 -17
- package/src/core/components/skeleton/textSkeleton.tsx +32 -111
- package/src/core/components/tab/__workshop__/example.tsx +2 -2
- package/src/core/components/tab/tab.tsx +29 -25
- package/src/core/components/tab/tabList.tsx +51 -28
- package/src/core/components/tab/tabPanel.tsx +30 -21
- package/src/core/components/toast/__workshop__/hook.tsx +1 -1
- package/src/core/components/toast/__workshop__/toast.tsx +5 -5
- package/src/core/components/toast/toast.test.tsx +5 -5
- package/src/core/components/toast/toast.tsx +25 -22
- package/src/core/components/toast/toastContext.ts +1 -1
- package/src/core/components/toast/toastLayer.tsx +29 -11
- package/src/core/components/toast/toastProvider.tsx +3 -7
- package/src/core/components/toast/types.ts +3 -7
- package/src/core/components/toast/useToast.ts +2 -4
- 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__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/helpers.ts +1 -1
- package/src/core/components/tree/tree.tsx +198 -191
- package/src/core/components/tree/treeContext.ts +1 -1
- package/src/core/components/tree/treeGroup.tsx +26 -6
- package/src/core/components/tree/treeItem.tsx +45 -33
- package/src/core/components/tree/types.ts +2 -2
- package/src/core/components/tree/useTree.ts +1 -1
- package/src/core/constants.ts +6 -0
- package/src/core/hooks/useClickOutside.test.tsx +15 -16
- package/src/core/hooks/useClickOutside.ts +2 -6
- package/src/core/hooks/useClickOutsideEvent.test.tsx +4 -5
- package/src/core/hooks/useClickOutsideEvent.ts +3 -9
- package/src/core/hooks/useDelayed.test.ts +6 -7
- package/src/core/hooks/useDelayedState.ts +1 -1
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +1 -1
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useForwardedRef.ts +1 -1
- package/src/core/hooks/useMatchMedia.ts +13 -31
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +3 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +12 -12
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersDark.test.tsx +1 -0
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +1 -0
- package/src/core/middleware/origin.ts +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +34 -21
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +2 -2
- package/src/core/primitives/avatar/__workshop__/stack.tsx +2 -2
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +2 -2
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +33 -36
- package/src/core/primitives/avatar/avatarCounter.tsx +35 -27
- package/src/core/primitives/avatar/avatarStack.tsx +35 -28
- package/src/core/primitives/avatar/types.ts +3 -3
- package/src/core/primitives/badge/__workshop__/props.tsx +6 -17
- package/src/core/primitives/badge/__workshop__/tones.tsx +1 -6
- package/src/core/primitives/badge/badge.test.tsx +2 -3
- package/src/core/primitives/badge/badge.tsx +34 -33
- package/src/core/primitives/badge/types.ts +2 -1
- package/src/core/primitives/box/__workshop__/props.tsx +2 -2
- package/src/core/primitives/box/__workshop__/responsive.tsx +2 -1
- package/src/core/primitives/box/box.tsx +76 -31
- package/src/core/primitives/button/__workshop__/custom.tsx +19 -42
- package/src/core/primitives/button/__workshop__/customIcons.tsx +3 -3
- package/src/core/primitives/button/__workshop__/disabled.tsx +9 -9
- package/src/core/primitives/button/__workshop__/props.tsx +19 -22
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
- package/src/core/primitives/button/__workshop__/stacked.tsx +15 -16
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +2 -1
- package/src/core/primitives/button/button.test.tsx +3 -18
- package/src/core/primitives/button/button.tsx +75 -73
- package/src/core/primitives/card/__workshop__/asButton.tsx +14 -14
- package/src/core/primitives/card/__workshop__/asComponent.tsx +3 -3
- package/src/core/primitives/card/__workshop__/checkered.tsx +1 -1
- package/src/core/primitives/card/__workshop__/index.ts +1 -1
- package/src/core/primitives/card/__workshop__/interactive.tsx +3 -4
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +3 -3
- package/src/core/primitives/card/__workshop__/props.tsx +14 -17
- package/src/core/primitives/card/__workshop__/selected.tsx +10 -41
- package/src/core/primitives/card/__workshop__/{allTones.tsx → tones.tsx} +3 -3
- package/src/core/primitives/card/card.tsx +53 -43
- package/src/core/primitives/card/cardContext.ts +10 -0
- package/src/core/primitives/card/cardProvider.tsx +27 -0
- package/src/core/primitives/card/index.ts +2 -0
- package/src/core/primitives/card/types.ts +19 -3
- package/src/core/primitives/card/useCard.ts +8 -0
- package/src/core/primitives/checkbox/__workshop__/props.tsx +6 -4
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +11 -20
- package/src/core/primitives/checkbox/checkbox.tsx +30 -21
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/code/__workshop__/props.tsx +4 -7
- package/src/core/primitives/code/code.tsx +28 -26
- package/src/core/primitives/container/__workshop__/example.tsx +2 -2
- package/src/core/primitives/container/container.tsx +29 -18
- package/src/core/primitives/flex/__workshop__/example.tsx +2 -2
- package/src/core/primitives/flex/flex.tsx +21 -19
- package/src/core/primitives/grid/grid.tsx +21 -16
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +2 -2
- package/src/core/primitives/heading/__workshop__/plain.tsx +12 -15
- package/src/core/primitives/heading/heading.tsx +46 -23
- package/src/core/primitives/inline/__workshop__/plain.tsx +2 -5
- package/src/core/primitives/inline/inline.tsx +27 -24
- package/src/core/primitives/inline/types.ts +1 -0
- package/src/core/primitives/kbd/kbd.tsx +29 -27
- package/src/core/primitives/label/__workshop__/plain.tsx +8 -17
- package/src/core/primitives/label/label.tsx +45 -30
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +6 -6
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +3 -4
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +10 -6
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +5 -4
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +2 -2
- package/src/core/primitives/popover/helpers.ts +1 -1
- package/src/core/primitives/popover/popover.tsx +296 -334
- package/src/core/primitives/popover/popoverLayer.tsx +149 -0
- package/src/core/primitives/popover/types.ts +3 -2
- package/src/core/primitives/radio/__workshop__/example.tsx +3 -3
- package/src/core/primitives/radio/__workshop__/plain.tsx +3 -3
- package/src/core/primitives/radio/radio.tsx +33 -17
- package/src/core/primitives/select/__workshop__/plain.tsx +15 -6
- package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/select/select.tsx +29 -27
- package/src/core/primitives/spinner/__workshop__/Props.tsx +4 -5
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +7 -5
- package/src/core/primitives/spinner/spinner.tsx +26 -14
- package/src/core/primitives/stack/__workshop__/plain.tsx +2 -2
- package/src/core/primitives/stack/stack.tsx +33 -19
- package/src/core/primitives/switch/switch.tsx +33 -16
- package/src/core/primitives/text/__workshop__/colored.tsx +6 -6
- package/src/core/primitives/text/__workshop__/example.tsx +9 -20
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/text/text.tsx +48 -30
- package/src/core/primitives/textArea/__workshop__/plain.tsx +44 -33
- package/src/core/primitives/textArea/textArea.tsx +48 -21
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +2 -2
- package/src/core/primitives/textInput/__workshop__/plain.tsx +36 -30
- package/src/core/primitives/textInput/__workshop__/states.tsx +5 -5
- package/src/core/primitives/textInput/__workshop__/tones.tsx +2 -2
- package/src/core/primitives/textInput/__workshop__/typed.tsx +2 -2
- package/src/core/primitives/textInput/textInput.tsx +52 -71
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +5 -5
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +2 -2
- package/src/core/primitives/tooltip/__workshop__/props.tsx +9 -8
- 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 +61 -60
- package/src/core/primitives/tooltip/tooltip.tsx +112 -87
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +3 -3
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +1 -1
- package/src/core/primitives/tooltip/tooltipLayer.tsx +107 -0
- package/src/core/primitives/types.ts +16 -27
- package/src/core/types/avatar.ts +3 -6
- package/src/core/types/badge.ts +2 -4
- package/src/core/types/button.ts +2 -4
- package/src/core/types/card.ts +2 -4
- package/src/core/types/dialog.ts +1 -3
- package/src/core/types/props.ts +20 -10
- package/src/core/types/selectable.ts +1 -1
- package/src/core/utils/arrow/arrow.tsx +37 -28
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +5 -5
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +1 -1
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +4 -8
- package/src/core/utils/boundaryElement/types.ts +1 -3
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +2 -4
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +15 -8
- package/src/core/utils/elementQuery/elementQuery.tsx +43 -19
- package/src/core/utils/errorBoundary.tsx +6 -4
- package/src/core/utils/index.ts +0 -1
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +5 -5
- package/src/core/utils/layer/__workshop__/nested.tsx +3 -3
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +9 -5
- package/src/core/utils/layer/getLayerContext.test.ts +3 -1
- package/src/core/utils/layer/getLayerContext.ts +1 -1
- package/src/core/utils/layer/layer.test.tsx +5 -5
- package/src/core/utils/layer/layer.tsx +24 -94
- package/src/core/utils/layer/layerCard.tsx +92 -0
- package/src/core/utils/layer/layerContext.ts +1 -1
- package/src/core/utils/layer/layerProvider.tsx +13 -9
- package/src/core/utils/layer/useLayer.ts +2 -4
- package/src/core/utils/portal/__workshop__/named.tsx +3 -3
- package/src/core/utils/portal/portal.test.tsx +5 -5
- package/src/core/utils/portal/{portal.ts → portal.tsx} +17 -9
- package/src/core/utils/portal/portalContext.ts +1 -1
- package/src/core/utils/portal/portalProvider.tsx +4 -8
- package/src/core/utils/portal/types.ts +1 -3
- package/src/core/utils/portal/usePortal.ts +2 -4
- package/src/core/utils/srOnly/srOnly.tsx +27 -22
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +72 -54
- package/src/css/_assign.ts +3 -0
- package/src/css/_compileStyle.ts +156 -0
- package/src/css/_compileSystem.ts +7 -0
- package/src/css/_compileTheme.ts +13 -0
- package/src/css/_composeClassNames.ts +12 -0
- package/src/css/_fromEntries.ts +3 -0
- package/src/css/_getClassNames.ts +9 -0
- package/src/css/_hash.ts +9 -0
- package/src/css/_mergeStyles.ts +24 -0
- package/src/css/_resp.ts +2 -2
- package/src/css/_responsiveRule.ts +38 -0
- package/src/css/_scopeClassName.ts +9 -0
- package/src/css/_scopeClassNames.ts +12 -0
- package/src/css/_system.style.ts +166 -0
- package/src/css/aspects/border/border.style.ts +13 -0
- package/src/css/aspects/border/border.ts +14 -0
- package/src/css/{styles → aspects}/border/types.ts +1 -1
- package/src/css/aspects/boxSizing/boxSizing.style.ts +10 -0
- package/src/css/aspects/boxSizing/boxSizing.ts +8 -0
- package/src/css/aspects/boxSizing/index.ts +2 -0
- package/src/css/aspects/boxSizing/types.ts +9 -0
- package/src/css/aspects/display/display.style.ts +34 -0
- package/src/css/aspects/display/display.ts +8 -0
- package/src/css/{styles → aspects}/display/types.ts +3 -4
- package/src/css/aspects/flex/flex.ts +13 -0
- package/src/css/aspects/flex/flexAlign.style.ts +12 -0
- package/src/css/aspects/flex/flexDirection.style.ts +11 -0
- package/src/css/aspects/flex/flexJustify.style.ts +13 -0
- package/src/css/aspects/flex/flexWrap.style.ts +10 -0
- package/src/css/{styles → aspects}/flex/types.ts +5 -13
- package/src/css/aspects/flexItem/flex.style.ts +22 -0
- package/src/css/aspects/flexItem/flexItem.ts +8 -0
- package/src/css/aspects/flexItem/types.ts +25 -0
- package/src/css/aspects/font/font.style.ts +83 -0
- package/src/css/aspects/font/font.ts +7 -0
- package/src/css/aspects/font/types.ts +6 -0
- package/src/css/aspects/gap/gap.style.ts +21 -0
- package/src/css/aspects/gap/gap.ts +8 -0
- package/src/css/{styles → aspects}/gap/types.ts +2 -2
- package/src/css/{styles → aspects}/grid/grid.ts +6 -5
- package/src/css/aspects/grid/gridAutoColumns.style.ts +11 -0
- package/src/css/aspects/grid/gridAutoFlow.style.ts +11 -0
- package/src/css/aspects/grid/gridAutoRows.style.ts +11 -0
- package/src/css/aspects/grid/gridColumns.style.ts +18 -0
- package/src/css/aspects/grid/gridRows.style.ts +18 -0
- package/src/css/{styles → aspects}/grid/types.ts +8 -12
- package/src/css/aspects/gridItem/gridColumn.style.ts +20 -0
- package/src/css/aspects/gridItem/gridColumnEnd.style.ts +20 -0
- package/src/css/aspects/gridItem/gridColumnStart.style.ts +20 -0
- package/src/css/{styles → aspects}/gridItem/gridItem.ts +4 -4
- package/src/css/aspects/gridItem/gridRow.style.ts +20 -0
- package/src/css/aspects/gridItem/gridRowEnd.style.ts +20 -0
- package/src/css/aspects/gridItem/gridRowStart.style.ts +20 -0
- package/src/css/{styles → aspects}/gridItem/types.ts +8 -19
- package/src/css/aspects/height/height.style.ts +9 -0
- package/src/css/aspects/height/height.ts +16 -0
- package/src/css/aspects/height/index.ts +1 -0
- package/src/css/{styles → aspects}/index.ts +5 -0
- package/src/css/aspects/inset/inset.style.ts +12 -0
- package/src/css/{styles → aspects}/inset/inset.ts +4 -3
- package/src/css/{styles → aspects}/inset/types.ts +1 -1
- package/src/css/aspects/margin/margin.style.ts +56 -0
- package/src/css/{styles → aspects}/margin/margin.ts +4 -3
- package/src/css/aspects/margin/types.ts +17 -0
- package/src/css/aspects/maxWidth/maxWidth.style.ts +16 -0
- package/src/css/aspects/maxWidth/maxWidth.ts +8 -0
- package/src/css/aspects/maxWidth/types.ts +8 -0
- package/src/css/aspects/minHeight/index.ts +2 -0
- package/src/css/aspects/minHeight/minHeight.style.ts +9 -0
- package/src/css/aspects/minHeight/minHeight.ts +8 -0
- package/src/css/aspects/minHeight/types.ts +9 -0
- package/src/css/aspects/minWidth/index.ts +2 -0
- package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
- package/src/css/aspects/minWidth/minWidth.ts +8 -0
- package/src/css/aspects/minWidth/types.ts +9 -0
- package/src/css/aspects/outline/outline.style.ts +9 -0
- package/src/css/aspects/overflow/overflow.style.ts +11 -0
- package/src/css/{styles → aspects}/overflow/overflow.ts +4 -3
- package/src/css/{styles → aspects}/overflow/types.ts +1 -1
- package/src/css/aspects/padding/padding.style.ts +43 -0
- package/src/css/{styles → aspects}/padding/padding.ts +4 -3
- package/src/css/{styles → aspects}/padding/types.ts +2 -2
- package/src/css/aspects/pointerEvents/pointerEvents.style.ts +13 -0
- package/src/css/aspects/pointerEvents/pointerEvents.ts +7 -0
- package/src/css/aspects/position/position.style.ts +12 -0
- package/src/css/aspects/position/position.ts +8 -0
- package/src/css/{styles → aspects}/position/types.ts +1 -1
- package/src/css/aspects/radius/radius.style.ts +16 -0
- package/src/css/aspects/radius/radius.ts +8 -0
- package/src/css/aspects/radius/types.ts +8 -0
- package/src/css/aspects/shadow/shadow.style.ts +24 -0
- package/src/css/aspects/shadow/shadow.ts +8 -0
- package/src/css/aspects/shadow/types.ts +8 -0
- package/src/css/aspects/textAlign/index.ts +2 -0
- package/src/css/aspects/textAlign/textAlign.style.ts +26 -0
- package/src/css/aspects/textAlign/textAlign.ts +8 -0
- package/src/css/aspects/textAlign/types.ts +7 -0
- package/src/css/aspects/textOverflow/textOverflow.style.ts +21 -0
- package/src/css/aspects/textOverflow/textOverflow.ts +7 -0
- package/src/css/{styles → aspects}/textOverflow/types.ts +1 -0
- package/src/css/aspects/width/types.ts +11 -0
- package/src/css/aspects/width/width.style.ts +11 -0
- package/src/css/aspects/width/width.ts +8 -0
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +9 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +3 -2
- package/src/css/components/dialog/dialog.style.ts +77 -0
- package/src/css/components/dialog/dialog.ts +17 -8
- package/src/css/components/menu/menu.style.ts +17 -0
- package/src/css/components/menu/menu.ts +5 -3
- package/src/css/components/skeleton/skeleton.style.ts +104 -0
- package/src/css/components/skeleton/skeleton.ts +13 -8
- package/src/css/components/skeleton/types.ts +8 -6
- package/src/css/components/toast/toast.style.ts +20 -0
- package/src/css/components/toast/toast.ts +11 -6
- package/src/css/components/tree/tree.style.ts +39 -0
- package/src/css/components/tree/tree.ts +3 -2
- package/src/css/constants.ts +10 -0
- package/src/css/index.ts +8 -8
- package/src/css/prefix/constants.ts +6 -0
- package/src/css/prefix/types.ts +1 -0
- package/src/css/primitives/_arrow/{rules.ts → _arrow.style.ts} +23 -25
- package/src/css/primitives/_arrow/_arrow.ts +13 -6
- package/src/css/primitives/_input/_input.style.ts +235 -0
- package/src/css/primitives/_input/input.ts +18 -13
- package/src/css/primitives/_input/types.ts +3 -3
- package/src/css/primitives/_selectable/{rules.ts → _selectable.style.ts} +36 -36
- package/src/css/primitives/_selectable/selectable.ts +5 -5
- package/src/css/primitives/_selectable/types.ts +2 -2
- package/src/css/primitives/avatar/{rules.ts → avatar.style.ts} +62 -67
- package/src/css/primitives/avatar/avatar.ts +14 -8
- package/src/css/primitives/avatar/types.ts +4 -3
- package/src/css/primitives/badge/badge.style.ts +21 -0
- package/src/css/primitives/badge/badge.ts +8 -4
- package/src/css/primitives/badge/types.ts +2 -2
- package/src/css/primitives/box/box.style.ts +22 -0
- package/src/css/primitives/box/box.ts +16 -10
- package/src/css/primitives/box/types.ts +12 -15
- package/src/css/primitives/button/button.style.ts +275 -0
- package/src/css/primitives/button/button.ts +9 -30
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/types.ts +13 -0
- package/src/css/primitives/card/card.style.ts +295 -0
- package/src/css/primitives/card/card.ts +7 -11
- package/src/css/primitives/card/types.ts +4 -5
- package/src/css/primitives/checkbox/checkbox.style.ts +178 -0
- package/src/css/primitives/checkbox/checkbox.ts +5 -3
- package/src/css/primitives/code/code.style.ts +61 -0
- package/src/css/primitives/code/code.ts +8 -4
- package/src/css/primitives/code/types.ts +2 -2
- package/src/css/primitives/container/container.style.ts +10 -0
- package/src/css/primitives/container/container.ts +6 -4
- package/src/css/primitives/container/types.ts +3 -2
- package/src/css/primitives/heading/heading.style.ts +56 -0
- package/src/css/primitives/heading/heading.ts +13 -10
- package/src/css/primitives/heading/types.ts +4 -2
- package/src/css/primitives/kbd/kbd.style.ts +19 -0
- package/src/css/primitives/kbd/kbd.ts +6 -4
- package/src/css/primitives/kbd/types.ts +1 -1
- package/src/css/primitives/label/label.style.ts +52 -0
- package/src/css/primitives/label/label.ts +7 -9
- package/src/css/primitives/label/types.ts +11 -4
- package/src/css/primitives/popover/popover.style.ts +9 -0
- package/src/css/primitives/popover/popover.ts +8 -2
- package/src/css/primitives/radio/radio.style.ts +84 -0
- package/src/css/primitives/radio/radio.ts +3 -2
- package/src/css/primitives/select/{rules.ts → select.style.ts} +8 -6
- package/src/css/primitives/select/select.ts +7 -4
- package/src/css/primitives/select/types.ts +1 -1
- package/src/css/primitives/spinner/spinner.style.ts +22 -0
- package/src/css/primitives/spinner/spinner.ts +5 -3
- package/src/css/primitives/stack/index.ts +1 -0
- package/src/css/primitives/stack/stack.style.ts +13 -0
- package/src/css/primitives/stack/stack.ts +6 -0
- package/src/css/primitives/switch/switch.style.ts +102 -0
- package/src/css/primitives/switch/switch.ts +11 -6
- package/src/css/primitives/text/text.style.ts +65 -0
- package/src/css/primitives/text/text.ts +7 -9
- package/src/css/primitives/text/types.ts +7 -2
- package/src/css/primitives/textArea/textArea.style.ts +11 -0
- package/src/css/primitives/textArea/textArea.ts +5 -3
- package/src/css/primitives/textArea/types.ts +1 -1
- package/src/css/primitives/textInput/textInput.style.ts +46 -0
- package/src/css/primitives/textInput/textInput.ts +20 -4
- package/src/css/primitives/textInput/types.ts +2 -8
- package/src/css/primitives/token/token.style.ts +50 -0
- package/src/css/primitives/tooltip/tooltip.style.ts +9 -0
- package/src/css/primitives/tooltip/tooltip.ts +3 -6
- package/src/css/renderColor.ts +31 -0
- package/src/css/responsiveRules.ts +12 -19
- package/src/css/theme/index.ts +14 -0
- package/src/css/theme/lib/contract/buildVarContract.ts +76 -0
- package/src/css/theme/lib/contract/index.ts +2 -0
- package/src/css/theme/lib/contract/types.ts +15 -0
- package/src/css/theme/resolveTheme.ts +863 -0
- package/src/css/types.ts +29 -755
- package/src/css/util.ts +5 -0
- package/src/css/utils/srOnly/srOnly.style.ts +14 -0
- package/src/css/utils/srOnly/srOnly.ts +4 -2
- package/src/theme/getScopedTheme.ts +4 -4
- package/src/theme/index.ts +0 -5
- package/src/theme/types.ts +6 -10
- package/src/theme/v0/color/_generic.ts +1 -1
- package/src/theme/v0/color/button.ts +1 -1
- package/src/theme/v0/color/card.ts +1 -1
- package/src/theme/v0/color/color.ts +11 -11
- package/src/theme/v0/color/input.ts +1 -1
- package/src/theme/v0/color/muted.ts +1 -1
- package/src/theme/v0/color/selectable.ts +1 -1
- package/src/theme/v0/color/solid.ts +1 -1
- package/src/theme/v0/color/spot.ts +1 -1
- package/src/theme/v0/focusRing.ts +1 -3
- package/src/theme/v0/font.ts +6 -19
- package/src/theme/v0/layer.ts +1 -3
- package/src/theme/v0/shadow.ts +2 -6
- package/src/theme/v0/styles.ts +1 -1
- package/src/theme/v0/theme.ts +7 -7
- package/src/theme/v2/avatar.ts +2 -4
- package/src/theme/{build → v2/build}/_deprecated/color/_selectable/createSelectableTones.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/_solid/createSolidTones.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonTones.ts +4 -4
- package/src/theme/{build → v2/build}/_deprecated/color/card/createCardStates.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/color.test.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/defaults.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/factory.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/input/createInputModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/spot/createSpot.ts +2 -2
- package/src/theme/{build → v2/build}/buildColorTheme.test.ts +3 -1
- package/src/theme/{build → v2/build}/buildColorTheme.ts +24 -24
- package/src/theme/{build → v2/build}/buildTheme.test.ts +10 -8
- package/src/theme/v2/build/buildTheme.ts +12 -0
- package/src/theme/{build → v2/build}/colorToken/colorToken.ts +2 -2
- package/src/theme/{build → v2/build}/colorToken/compileColorToken.ts +1 -1
- package/src/theme/{build → v2/build}/colorToken/types.ts +2 -2
- package/src/theme/{build → v2/build}/lib/color-fns/blend/mix.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/multiply.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/screen.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/color-fns.test.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/contrastRatio.ts +5 -2
- package/src/theme/{build → v2/build}/lib/color-fns/convert.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/parse.ts +1 -1
- package/src/theme/{build → v2/build}/mixThemeColor.test.ts +2 -0
- package/src/theme/{build → v2/build}/mixThemeColor.ts +1 -1
- package/src/theme/{build → v2/build}/renderColorTheme.ts +27 -27
- package/src/theme/{build → v2/build}/renderColorValue.ts +3 -3
- package/src/theme/{build → v2/build}/resolveColorTokens.ts +13 -13
- package/src/theme/v2/color/_helpers.ts +2 -2
- package/src/theme/v2/color/_system.ts +2 -4
- package/src/theme/v2/color/avatar.ts +3 -7
- package/src/theme/v2/color/badge.ts +3 -7
- package/src/theme/v2/color/button.ts +5 -11
- package/src/theme/v2/color/color.ts +10 -16
- package/src/theme/v2/color/input.ts +8 -10
- package/src/theme/v2/color/kbd.ts +1 -3
- package/src/theme/v2/color/selectable.ts +4 -8
- package/src/theme/v2/color/state.ts +5 -7
- package/src/theme/v2/color/syntax.ts +1 -3
- package/src/theme/{config → v2/config}/helpers.ts +6 -13
- package/src/theme/{config → v2/config}/system.ts +11 -12
- package/src/theme/{config → v2/config}/tokens/color/types.ts +14 -10
- package/src/theme/{config → v2/config}/tokens/index.ts +0 -1
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.test.ts +2 -0
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.ts +2 -2
- package/src/theme/{config → v2/config}/tokens/types.ts +3 -3
- package/src/theme/{config → v2/config}/types.ts +8 -6
- package/src/theme/{defaults → v2/defaults}/colorPalette.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/colorTokens.ts +3 -3
- package/src/theme/{defaults → v2/defaults}/config.ts +2 -2
- package/src/theme/{defaults → v2/defaults}/fonts.ts +5 -6
- package/src/theme/v2/index.ts +2 -0
- package/src/theme/v2/input.ts +2 -4
- package/src/theme/v2/theme.ts +10 -14
- package/src/theme/{_constants.ts → v3/_constants.ts} +6 -3
- package/src/theme/v3/{color/parseColor.ts → _parseColorToken.ts} +59 -46
- package/src/theme/v3/buildTheme_v3.ts +14 -10
- package/src/theme/v3/color/_constants.ts +15 -0
- package/src/theme/v3/color/avatar.ts +14 -0
- package/src/theme/v3/color/card.ts +58 -95
- package/src/theme/v3/color/color.ts +75 -71
- package/src/theme/v3/color/element.ts +8 -8
- package/src/theme/v3/color/index.ts +2 -2
- package/src/theme/v3/color/token.ts +19 -4
- package/src/theme/v3/color/tokens.ts +2 -2
- package/src/theme/v3/defaultFonts.ts +250 -0
- package/src/theme/v3/defaultTokens.ts +199 -0
- package/src/theme/v3/index.ts +4 -1
- package/src/theme/{palette → v3/palette}/constants.ts +3 -3
- package/src/theme/v3/palette/index.ts +2 -0
- package/src/theme/v3/palette/types.ts +7 -0
- package/src/theme/v3/resolveTokens.ts +70 -65
- package/src/theme/v3/tokens.ts +2 -2
- package/src/theme/v3/types.ts +95 -11
- package/src/theme/versioning/getTheme_v2.ts +3 -3
- package/src/theme/versioning/is_v0.ts +2 -2
- package/src/theme/versioning/is_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
- package/src/theme/versioning/themeColor_v3_v2.ts +229 -52
- package/src/theme/versioning/v0_v2.ts +3 -3
- package/src/theme/versioning/v2_v0.ts +4 -4
- package/src/theme/versioning/v3_v2.ts +39 -38
- package/dist/_chunks-cjs/_visual-editing.js +0 -3059
- package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
- package/dist/_chunks-cjs/buildCommand.js +0 -32
- package/dist/_chunks-cjs/buildCommand.js.map +0 -1
- package/dist/_chunks-cjs/refractor.js.map +0 -1
- package/dist/_chunks-cjs/v3_v2.js +0 -251
- package/dist/_chunks-cjs/v3_v2.js.map +0 -1
- package/dist/_chunks-es/_visual-editing.mjs +0 -3066
- package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
- package/dist/_chunks-es/refractor.mjs.map +0 -1
- package/dist/_chunks-es/v3_v2.mjs +0 -252
- package/dist/_chunks-es/v3_v2.mjs.map +0 -1
- package/dist/_visual-editing.d.mts +0 -806
- package/dist/_visual-editing.mjs +0 -31
- package/dist/_visual-editing.mjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/css.d.mts +0 -2135
- package/dist/css.mjs +0 -4713
- package/dist/css.mjs.map +0 -1
- package/dist/index.mjs +0 -1542
- package/dist/index.mjs.map +0 -1
- package/dist/sanity-palette.css +0 -9
- package/dist/sanity-theme.css +0 -1
- package/dist/system.css +0 -3577
- package/dist/theme.mjs.map +0 -1
- package/src/core/primitives/popover/popoverCard.tsx +0 -148
- package/src/core/primitives/tooltip/tooltipCard.tsx +0 -115
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/core/utils/conditionalWrapper/index.ts +0 -1
- package/src/css/compile/compilePalette.ts +0 -60
- package/src/css/compile/compileRule.ts +0 -90
- package/src/css/compile/compileRules.test.ts +0 -35
- package/src/css/compile/compileRules.ts +0 -40
- package/src/css/compile/compileSystem.ts +0 -7
- package/src/css/compile/compileTheme.ts +0 -15
- package/src/css/compile/compileTheme_v3.ts +0 -410
- package/src/css/compile/types.ts +0 -6
- package/src/css/components/breadcrumbs/rules.ts +0 -25
- package/src/css/components/dialog/rules.ts +0 -76
- package/src/css/components/menu/rules.ts +0 -15
- package/src/css/components/skeleton/rules.ts +0 -112
- package/src/css/components/toast/rules.ts +0 -17
- package/src/css/components/tree/rules.ts +0 -168
- package/src/css/composeClassNames.ts +0 -13
- package/src/css/primitives/_input/rules.ts +0 -163
- package/src/css/primitives/_selectable/__style.ts +0 -117
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/badge/rules.ts +0 -22
- package/src/css/primitives/box/rules.ts +0 -28
- package/src/css/primitives/button/_constants.ts +0 -17
- package/src/css/primitives/button/rules.ts +0 -293
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/css/primitives/card/rules.ts +0 -471
- package/src/css/primitives/checkbox/__styles.ts +0 -129
- package/src/css/primitives/checkbox/rules.ts +0 -152
- package/src/css/primitives/code/rules.ts +0 -96
- package/src/css/primitives/container/rules.ts +0 -8
- package/src/css/primitives/heading/rules.ts +0 -155
- package/src/css/primitives/kbd/rules.ts +0 -20
- package/src/css/primitives/label/rules.ts +0 -137
- package/src/css/primitives/popover/rules.ts +0 -5
- package/src/css/primitives/radio/rules.ts +0 -121
- package/src/css/primitives/spinner/rules.ts +0 -20
- package/src/css/primitives/switch/rules.ts +0 -340
- package/src/css/primitives/text/rules.ts +0 -164
- package/src/css/primitives/textArea/rules.ts +0 -7
- package/src/css/primitives/textInput/rules.ts +0 -224
- package/src/css/primitives/token/rules.ts +0 -45
- package/src/css/primitives/tooltip/rules.ts +0 -19
- package/src/css/rules.ts +0 -113
- package/src/css/styles/border/border.ts +0 -22
- package/src/css/styles/border/rules.ts +0 -24
- package/src/css/styles/display/display.ts +0 -7
- package/src/css/styles/display/rules.ts +0 -62
- package/src/css/styles/flex/flex.ts +0 -20
- package/src/css/styles/flex/rules.ts +0 -28
- package/src/css/styles/flexItem/flexItem.ts +0 -8
- package/src/css/styles/flexItem/rules.ts +0 -12
- package/src/css/styles/flexItem/types.ts +0 -11
- package/src/css/styles/font/font.ts +0 -17
- package/src/css/styles/font/rules.ts +0 -148
- package/src/css/styles/font/types.ts +0 -12
- package/src/css/styles/gap/gap.ts +0 -8
- package/src/css/styles/gap/rules.ts +0 -34
- package/src/css/styles/grid/rules.ts +0 -146
- package/src/css/styles/gridItem/rules.ts +0 -96
- package/src/css/styles/height/rules.ts +0 -7
- package/src/css/styles/inset/rules.ts +0 -16
- package/src/css/styles/margin/rules.ts +0 -64
- package/src/css/styles/margin/types.ts +0 -11
- package/src/css/styles/maxWidth/maxWidth.ts +0 -6
- package/src/css/styles/maxWidth/rules.ts +0 -13
- package/src/css/styles/maxWidth/types.ts +0 -7
- package/src/css/styles/outline/rules.ts +0 -7
- package/src/css/styles/overflow/rules.ts +0 -9
- package/src/css/styles/padding/rules.ts +0 -62
- package/src/css/styles/pointerEvents/pointerEvents.ts +0 -6
- package/src/css/styles/pointerEvents/rules.ts +0 -11
- package/src/css/styles/position/position.ts +0 -7
- package/src/css/styles/position/rules.ts +0 -24
- package/src/css/styles/radius/radius.ts +0 -8
- package/src/css/styles/radius/rules.ts +0 -13
- package/src/css/styles/radius/types.ts +0 -8
- package/src/css/styles/shadow/rules.ts +0 -53
- package/src/css/styles/shadow/shadow.ts +0 -7
- package/src/css/styles/shadow/types.ts +0 -8
- package/src/css/styles/textOverflow/rules.ts +0 -17
- package/src/css/styles/textOverflow/textOverflow.ts +0 -6
- package/src/css/styles/width/rules.ts +0 -7
- package/src/css/styles/width/types.ts +0 -9
- package/src/css/styles/width/width.ts +0 -6
- package/src/css/utils/srOnly/rules.ts +0 -11
- package/src/css/varNames.ts +0 -473
- package/src/css/vars.ts +0 -443
- package/src/theme/_types.ts +0 -41
- package/src/theme/build/buildTheme.ts +0 -12
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/palette/types.ts +0 -16
- package/src/theme/v3/buildTheme_v3.test.ts +0 -40
- package/src/theme/v3/color/buildColor_v3.ts +0 -193
- package/src/theme/v3/color/parseColor.test.ts +0 -79
- package/src/theme/v3/color/renderColor.test.ts +0 -19
- package/src/theme/v3/color/renderColor.ts +0 -33
- package/src/theme/v3/defaults.ts +0 -205
- /package/dist/{cli.d.ts → cli.d.cts} +0 -0
- /package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/apiStore.ts +0 -0
- /package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/countries.ts +0 -0
- /package/src/css/{styles → aspects}/border/index.ts +0 -0
- /package/src/css/{styles → aspects}/display/index.ts +0 -0
- /package/src/css/{styles → aspects}/flex/index.ts +0 -0
- /package/src/css/{styles → aspects}/flexItem/index.ts +0 -0
- /package/src/css/{styles → aspects}/font/index.ts +0 -0
- /package/src/css/{styles → aspects}/gap/index.ts +0 -0
- /package/src/css/{styles → aspects}/grid/index.ts +0 -0
- /package/src/css/{styles → aspects}/gridItem/index.ts +0 -0
- /package/src/css/{styles → aspects}/inset/index.ts +0 -0
- /package/src/css/{styles → aspects}/margin/index.ts +0 -0
- /package/src/css/{styles → aspects}/maxWidth/index.ts +0 -0
- /package/src/css/{styles → aspects}/overflow/index.ts +0 -0
- /package/src/css/{styles → aspects}/padding/index.ts +0 -0
- /package/src/css/{styles → aspects}/pointerEvents/index.ts +0 -0
- /package/src/css/{styles → aspects}/pointerEvents/types.ts +0 -0
- /package/src/css/{styles → aspects}/position/index.ts +0 -0
- /package/src/css/{styles → aspects}/radius/index.ts +0 -0
- /package/src/css/{styles → aspects}/shadow/index.ts +0 -0
- /package/src/css/{styles → aspects}/textOverflow/index.ts +0 -0
- /package/src/css/{styles → aspects}/width/index.ts +0 -0
- /package/src/{theme/palette → css/prefix}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/_deprecated/color/index.ts +0 -0
- /package/src/theme/{build → v2/build}/colorToken/index.ts +0 -0
- /package/src/theme/{build → v2/build}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/blend/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/rgba.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/types.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/isRecord.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/utils.ts +0 -0
- /package/src/theme/{build → v2/build}/merge.ts +0 -0
- /package/src/theme/{config → v2/config}/index.ts +0 -0
- /package/src/theme/{config → v2/config}/tokens/color/index.ts +0 -0
|
@@ -1,35 +1,40 @@
|
|
|
1
|
+
import type {AvatarColor} from '@sanity/ui/theme'
|
|
1
2
|
import {AvatarSize} from '@sanity/ui/theme'
|
|
2
3
|
import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
|
|
3
4
|
import {Display as BoxDisplay} from '@sanity/ui/css'
|
|
4
5
|
import {BoxHeight} from '@sanity/ui/css'
|
|
5
6
|
import {BoxOverflow} from '@sanity/ui/css'
|
|
6
7
|
import {BoxSizing} from '@sanity/ui/css'
|
|
7
|
-
import {BoxStyleProps} from '@sanity/ui/css'
|
|
8
|
-
import {
|
|
8
|
+
import type {BoxStyleProps} from '@sanity/ui/css'
|
|
9
|
+
import {Breakpoint} from '@sanity/ui/css'
|
|
10
|
+
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
9
11
|
import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
|
|
10
12
|
import {Component} from 'react'
|
|
13
|
+
import type {ComponentClass} from 'react'
|
|
11
14
|
import type {ComponentProps} from 'react'
|
|
15
|
+
import type {ComponentType as ComponentType_2} from 'react'
|
|
12
16
|
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
|
+
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
13
18
|
import {Context} from 'react'
|
|
14
19
|
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
15
|
-
import {CSSObject} from '@sanity/ui/theme'
|
|
16
|
-
import {DisplayStyleProps} from '@sanity/ui/css'
|
|
17
|
-
import {
|
|
18
|
-
import {ElementType} from 'react'
|
|
20
|
+
import type {CSSObject} from '@sanity/ui/theme'
|
|
21
|
+
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
22
|
+
import {ElementType as ElementType_2} from 'react'
|
|
19
23
|
import {ErrorInfo} from 'react'
|
|
24
|
+
import type {ExoticComponent} from 'react'
|
|
20
25
|
import {FlexAlign} from '@sanity/ui/css'
|
|
21
26
|
import {FlexDirection} from '@sanity/ui/css'
|
|
22
27
|
import {FlexJustify} from '@sanity/ui/css'
|
|
23
|
-
import {FlexStyleProps} from '@sanity/ui/css'
|
|
28
|
+
import type {FlexStyleProps} from '@sanity/ui/css'
|
|
24
29
|
import {FlexValue} from '@sanity/ui/css'
|
|
25
30
|
import {FlexWrap} from '@sanity/ui/css'
|
|
26
|
-
import {FontCodeSize} from '@sanity/ui/theme'
|
|
27
|
-
import {FontHeadingSize} from '@sanity/ui/theme'
|
|
28
|
-
import {FontLabelSize} from '@sanity/ui/theme'
|
|
31
|
+
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
32
|
+
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
33
|
+
import type {FontLabelSize} from '@sanity/ui/theme'
|
|
29
34
|
import {FontStyleProps} from '@sanity/ui/css'
|
|
30
|
-
import {FontTextSize} from '@sanity/ui/theme'
|
|
35
|
+
import type {FontTextSize} from '@sanity/ui/theme'
|
|
31
36
|
import {ForwardedRef} from 'react'
|
|
32
|
-
import {
|
|
37
|
+
import type {FunctionComponent} from 'react'
|
|
33
38
|
import {GapStyleProps} from '@sanity/ui/css'
|
|
34
39
|
import {GridAutoCols} from '@sanity/ui/css'
|
|
35
40
|
import {GridAutoFlow} from '@sanity/ui/css'
|
|
@@ -40,30 +45,32 @@ import {GridItemColumnStart} from '@sanity/ui/css'
|
|
|
40
45
|
import {GridItemRow} from '@sanity/ui/css'
|
|
41
46
|
import {GridItemRowEnd} from '@sanity/ui/css'
|
|
42
47
|
import {GridItemRowStart} from '@sanity/ui/css'
|
|
48
|
+
import type {GridStyleProps} from '@sanity/ui/css'
|
|
43
49
|
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
44
50
|
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
45
51
|
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
46
52
|
import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
53
|
+
import {HTMLAttributes} from 'react'
|
|
47
54
|
import {InputStyleProps} from '@sanity/ui/css'
|
|
48
|
-
import {InsetStyleProps} from '@sanity/ui/css'
|
|
49
|
-
import {
|
|
55
|
+
import type {InsetStyleProps} from '@sanity/ui/css'
|
|
56
|
+
import {JSX} from 'react'
|
|
57
|
+
import {LabelStyleProps} from '@sanity/ui/css'
|
|
58
|
+
import {MouseEventHandler} from 'react'
|
|
50
59
|
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
51
60
|
import {MutableRefObject} from 'react'
|
|
52
|
-
import {NamedExoticComponent} from 'react'
|
|
53
61
|
import {PaddingStyleProps} from '@sanity/ui/css'
|
|
54
62
|
import {parseColor as parseColor_2} from '@sanity/ui/theme'
|
|
55
63
|
import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
56
|
-
import {
|
|
57
|
-
import {PositionStyleProps} from '@sanity/ui/css'
|
|
64
|
+
import type {PositionStyleProps} from '@sanity/ui/css'
|
|
58
65
|
import {PropsWithChildren} from 'react'
|
|
59
66
|
import {px} from '@sanity/ui/css'
|
|
60
67
|
import {Radius} from '@sanity/ui/theme'
|
|
61
68
|
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
62
69
|
import {ReactElement} from 'react'
|
|
63
70
|
import {ReactNode} from 'react'
|
|
64
|
-
import {ReactPortal} from 'react'
|
|
71
|
+
import type {ReactPortal} from 'react'
|
|
72
|
+
import {Ref} from 'react'
|
|
65
73
|
import {RefAttributes} from 'react'
|
|
66
|
-
import {RefCallback} from 'react'
|
|
67
74
|
import {rem} from '@sanity/ui/css'
|
|
68
75
|
import {ResponsiveProp} from '@sanity/ui/css'
|
|
69
76
|
import {RGB as RGB_2} from '@sanity/ui/theme'
|
|
@@ -75,18 +82,17 @@ import {screen as screen_3} from '@sanity/ui/theme'
|
|
|
75
82
|
import {SelectStyleProps} from '@sanity/ui/css'
|
|
76
83
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
77
84
|
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
78
|
-
import {Space} from '@sanity/ui/theme'
|
|
85
|
+
import type {Space} from '@sanity/ui/theme'
|
|
79
86
|
import {TextAlign} from '@sanity/ui/css'
|
|
80
87
|
import {TextAreaStyleProps} from '@sanity/ui/css'
|
|
81
88
|
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
82
89
|
import {TextStyleProps} from '@sanity/ui/css'
|
|
83
90
|
import {Theme as Theme_2} from '@sanity/ui/theme'
|
|
84
91
|
import {Theme_v2} from '@sanity/ui/theme'
|
|
85
|
-
import {Theme_v3} from '@sanity/ui/theme'
|
|
86
92
|
import {ThemeAvatar} from '@sanity/ui/theme'
|
|
87
93
|
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
88
94
|
import {ThemeColor} from '@sanity/ui/theme'
|
|
89
|
-
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
95
|
+
import type {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
90
96
|
import {ThemeColorBase} from '@sanity/ui/theme'
|
|
91
97
|
import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
92
98
|
import {ThemeColorButton} from '@sanity/ui/theme'
|
|
@@ -114,7 +120,7 @@ import {ThemeColorSolid} from '@sanity/ui/theme'
|
|
|
114
120
|
import {ThemeColorSolidTone} from '@sanity/ui/theme'
|
|
115
121
|
import {ThemeColorSpot} from '@sanity/ui/theme'
|
|
116
122
|
import {ThemeColorSpotKey} from '@sanity/ui/theme'
|
|
117
|
-
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
123
|
+
import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
118
124
|
import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
|
|
119
125
|
import {ThemeColorToneKey} from '@sanity/ui/theme'
|
|
120
126
|
import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
|
|
@@ -127,19 +133,39 @@ import {ThemeInput} from '@sanity/ui/theme'
|
|
|
127
133
|
import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
|
|
128
134
|
import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
|
|
129
135
|
import {ThemeStyles} from '@sanity/ui/theme'
|
|
130
|
-
import {Width} from '@sanity/ui/css'
|
|
136
|
+
import type {Width} from '@sanity/ui/css'
|
|
131
137
|
|
|
132
138
|
/** @internal */
|
|
133
|
-
export declare
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
|
|
140
|
+
props: ArrowProps<E>,
|
|
141
|
+
): JSX.Element
|
|
142
|
+
|
|
143
|
+
export declare namespace Arrow {
|
|
144
|
+
var displayName: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export declare type ArrowElementType = 'div' | 'span' | ComponentType
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export declare type ArrowOwnProps = {
|
|
152
|
+
width: number
|
|
153
|
+
height: number
|
|
154
|
+
radius?: number
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
|
|
159
|
+
ArrowOwnProps,
|
|
160
|
+
E
|
|
139
161
|
>
|
|
140
162
|
|
|
141
|
-
/**
|
|
142
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
165
|
+
*
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
|
|
143
169
|
|
|
144
170
|
/**
|
|
145
171
|
* @internal
|
|
@@ -152,22 +178,17 @@ export declare function attemptFocus(element: HTMLElement): boolean
|
|
|
152
178
|
*
|
|
153
179
|
* @public
|
|
154
180
|
*/
|
|
155
|
-
export declare
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
| 'role'
|
|
167
|
-
| 'spellCheck'
|
|
168
|
-
| 'type'
|
|
169
|
-
>,
|
|
170
|
-
) => ReactElement
|
|
181
|
+
export declare function Autocomplete<
|
|
182
|
+
E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
|
|
183
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
184
|
+
>(props: AutocompleteProps<E, O>): JSX.Element
|
|
185
|
+
|
|
186
|
+
export declare namespace Autocomplete {
|
|
187
|
+
var displayName: string
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** @public */
|
|
191
|
+
export declare type AutocompleteElementType = 'input' | ComponentType
|
|
171
192
|
|
|
172
193
|
/**
|
|
173
194
|
* @internal
|
|
@@ -198,24 +219,17 @@ export declare type AutocompleteMsg =
|
|
|
198
219
|
| AutocompleteInputFoocusMsg
|
|
199
220
|
| AutocompleteValueChangeMsg
|
|
200
221
|
|
|
201
|
-
/**
|
|
202
|
-
|
|
203
|
-
*/
|
|
204
|
-
export declare type AutocompleteOpenButtonProps = Omit<Props<ButtonProps, 'button'>, 'as'>
|
|
222
|
+
/** @public */
|
|
223
|
+
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
|
|
205
224
|
|
|
206
|
-
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Option extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
211
|
-
> {
|
|
225
|
+
/** @public */
|
|
226
|
+
export declare type AutocompleteOwnProps<
|
|
227
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
228
|
+
> = TextInputOwnProps & {
|
|
212
229
|
border?: boolean
|
|
213
230
|
customValidity?: string
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
217
|
-
icon?: ElementType | ReactNode
|
|
218
|
-
id: string
|
|
231
|
+
filterOption?: (query: string, option: O) => boolean
|
|
232
|
+
icon?: ElementType_2 | ReactNode
|
|
219
233
|
/** @beta */
|
|
220
234
|
listBox?: BoxProps
|
|
221
235
|
loading?: boolean
|
|
@@ -227,17 +241,15 @@ export declare interface AutocompleteProps<
|
|
|
227
241
|
/** @beta */
|
|
228
242
|
openOnFocus?: boolean
|
|
229
243
|
/** The options to render. */
|
|
230
|
-
options?:
|
|
244
|
+
options?: O[]
|
|
231
245
|
padding?: ResponsiveProp<Space>
|
|
232
246
|
popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
233
247
|
prefix?: ReactNode
|
|
234
248
|
radius?: Radius | Radius[]
|
|
235
|
-
readOnly?: boolean
|
|
236
|
-
ref?: ForwardedRef<HTMLInputElement>
|
|
237
249
|
/** @beta */
|
|
238
250
|
relatedElements?: HTMLElement[]
|
|
239
251
|
/** The callback function for rendering each option. */
|
|
240
|
-
renderOption?: (option:
|
|
252
|
+
renderOption?: (option: O) => React.JSX.Element
|
|
241
253
|
/** @beta */
|
|
242
254
|
renderPopover?: (
|
|
243
255
|
props: {
|
|
@@ -249,12 +261,17 @@ export declare interface AutocompleteProps<
|
|
|
249
261
|
},
|
|
250
262
|
ref: ForwardedRef<HTMLDivElement>,
|
|
251
263
|
) => ReactNode
|
|
252
|
-
renderValue?: (value: string, option?:
|
|
264
|
+
renderValue?: (value: string, option?: O) => string
|
|
253
265
|
suffix?: ReactNode
|
|
254
|
-
/** The current value. */
|
|
255
266
|
value?: string
|
|
256
267
|
}
|
|
257
268
|
|
|
269
|
+
/** @public */
|
|
270
|
+
export declare type AutocompleteProps<
|
|
271
|
+
E extends AutocompleteElementType = AutocompleteElementType,
|
|
272
|
+
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
273
|
+
> = Props<AutocompleteOwnProps<O>, E>
|
|
274
|
+
|
|
258
275
|
/**
|
|
259
276
|
* @internal
|
|
260
277
|
*/
|
|
@@ -325,60 +342,71 @@ export declare interface AutocompleteValueChangeMsg {
|
|
|
325
342
|
*
|
|
326
343
|
* @public
|
|
327
344
|
*/
|
|
328
|
-
export declare
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
RefAttributes<HTMLDivElement>
|
|
332
|
-
>
|
|
345
|
+
export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
|
|
346
|
+
props: AvatarProps<E>,
|
|
347
|
+
): JSX.Element
|
|
333
348
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
export declare const AvatarCounter: ForwardRefExoticComponent<
|
|
338
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarCounterProps> &
|
|
339
|
-
AvatarCounterProps &
|
|
340
|
-
RefAttributes<HTMLDivElement>
|
|
341
|
-
>
|
|
349
|
+
export declare namespace Avatar {
|
|
350
|
+
var displayName: string
|
|
351
|
+
}
|
|
342
352
|
|
|
343
|
-
/**
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
353
|
+
/** @public */
|
|
354
|
+
export declare function AvatarCounter<
|
|
355
|
+
E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
356
|
+
>(props: AvatarCounterProps<E>): JSX.Element
|
|
357
|
+
|
|
358
|
+
export declare namespace AvatarCounter {
|
|
359
|
+
var displayName: string
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/** @public */
|
|
363
|
+
export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
|
|
364
|
+
|
|
365
|
+
/** @public */
|
|
366
|
+
export declare interface AvatarCounterOwnProps {
|
|
348
367
|
count: number
|
|
349
368
|
size?: ResponsiveProp<AvatarSize>
|
|
350
|
-
/** @deprecated No longer supported. */
|
|
351
|
-
tone?: 'navbar'
|
|
352
369
|
}
|
|
353
370
|
|
|
354
|
-
/**
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
371
|
+
/** @public */
|
|
372
|
+
export declare type AvatarCounterProps<
|
|
373
|
+
E extends AvatarCounterElementType = AvatarCounterElementType,
|
|
374
|
+
> = Props<AvatarCounterOwnProps, E>
|
|
358
375
|
|
|
359
|
-
/**
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
376
|
+
/** @public */
|
|
377
|
+
export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
|
|
378
|
+
|
|
379
|
+
/** @public */
|
|
380
|
+
export declare interface AvatarOwnProps {
|
|
363
381
|
/** @beta */
|
|
364
382
|
__unstable_hideInnerStroke?: boolean
|
|
365
383
|
animateArrowFrom?: AvatarPosition
|
|
366
384
|
arrowPosition?: AvatarPosition
|
|
367
|
-
color?:
|
|
385
|
+
color?: AvatarColor
|
|
368
386
|
initials?: string
|
|
369
387
|
onImageLoadError?: (event: Error) => void
|
|
370
388
|
size?: ResponsiveProp<AvatarSize>
|
|
371
389
|
src?: string
|
|
372
390
|
/**
|
|
373
391
|
* The status of the entity this Avatar represents.
|
|
374
|
-
* @
|
|
392
|
+
* @deprecated Will be removed in next major version.
|
|
375
393
|
*/
|
|
376
394
|
status?: AvatarStatus
|
|
377
395
|
title?: string
|
|
378
396
|
}
|
|
379
397
|
|
|
398
|
+
/** @public */
|
|
399
|
+
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
400
|
+
|
|
401
|
+
/** @public */
|
|
402
|
+
export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
|
|
403
|
+
AvatarOwnProps,
|
|
404
|
+
E
|
|
405
|
+
>
|
|
406
|
+
|
|
380
407
|
/**
|
|
381
408
|
* @internal
|
|
409
|
+
* @deprecated This will be removed in next major version.
|
|
382
410
|
*/
|
|
383
411
|
export declare interface AvatarRootStyleProps {
|
|
384
412
|
$color: ThemeColorAvatarColorKey
|
|
@@ -386,29 +414,23 @@ export declare interface AvatarRootStyleProps {
|
|
|
386
414
|
|
|
387
415
|
export {AvatarSize}
|
|
388
416
|
|
|
389
|
-
/**
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarStackProps> &
|
|
394
|
-
AvatarStackProps &
|
|
395
|
-
RefAttributes<HTMLDivElement>
|
|
396
|
-
>
|
|
417
|
+
/** @public */
|
|
418
|
+
export declare function AvatarStack<
|
|
419
|
+
E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
|
|
420
|
+
>(props: AvatarStackProps<E>): JSX.Element
|
|
397
421
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
export declare type AvatarStackChild =
|
|
402
|
-
| ReactElement<Props<AvatarProps, 'div'>>
|
|
403
|
-
| null
|
|
404
|
-
| undefined
|
|
405
|
-
| false
|
|
422
|
+
export declare namespace AvatarStack {
|
|
423
|
+
var displayName: string
|
|
424
|
+
}
|
|
406
425
|
|
|
407
|
-
/**
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
426
|
+
/** @public */
|
|
427
|
+
export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
|
|
428
|
+
|
|
429
|
+
/** @public */
|
|
430
|
+
export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
|
|
431
|
+
|
|
432
|
+
/** @public */
|
|
433
|
+
export declare type AvatarStackOwnProps = Omit<BoxOwnProps, 'align' | 'display'> & {
|
|
412
434
|
children: AvatarStackChild | AvatarStackChild[]
|
|
413
435
|
maxLength?: number
|
|
414
436
|
size?: ResponsiveProp<AvatarSize>
|
|
@@ -416,11 +438,14 @@ export declare interface AvatarStackProps
|
|
|
416
438
|
tone?: 'navbar'
|
|
417
439
|
}
|
|
418
440
|
|
|
441
|
+
/** @public */
|
|
442
|
+
export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
|
|
443
|
+
Props<AvatarStackOwnProps, E>
|
|
444
|
+
|
|
445
|
+
/** @public */
|
|
419
446
|
/**
|
|
420
447
|
* @public
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* @public
|
|
448
|
+
* @deprecated Will be removed in next major version.
|
|
424
449
|
*/
|
|
425
450
|
export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
426
451
|
|
|
@@ -429,11 +454,16 @@ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
|
|
|
429
454
|
*
|
|
430
455
|
* @public
|
|
431
456
|
*/
|
|
432
|
-
export declare
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
457
|
+
export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
|
|
458
|
+
props: BadgeProps<E>,
|
|
459
|
+
): JSX.Element
|
|
460
|
+
|
|
461
|
+
export declare namespace Badge {
|
|
462
|
+
var displayName: string
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/** @public */
|
|
466
|
+
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
437
467
|
|
|
438
468
|
/**
|
|
439
469
|
* @public
|
|
@@ -441,25 +471,23 @@ export declare const Badge: ForwardRefExoticComponent<
|
|
|
441
471
|
*/
|
|
442
472
|
export declare type BadgeMode = 'default' | 'outline'
|
|
443
473
|
|
|
444
|
-
/**
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
mode?: BadgeMode
|
|
451
|
-
textAlign?: TextProps['align']
|
|
452
|
-
tone?: BadgeTone
|
|
453
|
-
}
|
|
474
|
+
/** @public */
|
|
475
|
+
export declare type BadgeOwnProps = PaddingStyleProps &
|
|
476
|
+
RadiusStyleProps & {
|
|
477
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
478
|
+
tone?: BadgeTone
|
|
479
|
+
}
|
|
454
480
|
|
|
455
|
-
/**
|
|
456
|
-
|
|
457
|
-
|
|
481
|
+
/** @public */
|
|
482
|
+
export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
|
|
483
|
+
BadgeOwnProps,
|
|
484
|
+
E
|
|
485
|
+
>
|
|
486
|
+
|
|
487
|
+
/** @public */
|
|
458
488
|
export declare type BadgeTone = ThemeColorStateToneKey
|
|
459
489
|
|
|
460
|
-
/**
|
|
461
|
-
* @public
|
|
462
|
-
*/
|
|
490
|
+
/** @public */
|
|
463
491
|
export declare interface BaseAutocompleteOption {
|
|
464
492
|
value: string
|
|
465
493
|
}
|
|
@@ -470,26 +498,20 @@ export declare interface BaseAutocompleteOption {
|
|
|
470
498
|
*/
|
|
471
499
|
export declare type BaseTheme = BaseTheme_2
|
|
472
500
|
|
|
473
|
-
/**
|
|
474
|
-
* @public
|
|
475
|
-
*/
|
|
501
|
+
/** @public */
|
|
476
502
|
export declare interface BoundaryElementContextValue {
|
|
477
503
|
version: 0.0
|
|
478
504
|
element: HTMLElement | null
|
|
479
505
|
}
|
|
480
506
|
|
|
481
|
-
/**
|
|
482
|
-
* @public
|
|
483
|
-
*/
|
|
507
|
+
/** @public */
|
|
484
508
|
export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): ReactElement
|
|
485
509
|
|
|
486
510
|
export declare namespace BoundaryElementProvider {
|
|
487
511
|
var displayName: string
|
|
488
512
|
}
|
|
489
513
|
|
|
490
|
-
/**
|
|
491
|
-
* @public
|
|
492
|
-
*/
|
|
514
|
+
/** @public */
|
|
493
515
|
export declare interface BoundaryElementProviderProps {
|
|
494
516
|
children: ReactNode
|
|
495
517
|
element: HTMLElement | null
|
|
@@ -501,26 +523,60 @@ export declare interface BoundaryElementProviderProps {
|
|
|
501
523
|
*
|
|
502
524
|
* @public
|
|
503
525
|
*/
|
|
504
|
-
export declare
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
526
|
+
export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
|
|
527
|
+
props: BoxProps<E>,
|
|
528
|
+
): JSX.Element
|
|
529
|
+
|
|
530
|
+
export declare namespace Box {
|
|
531
|
+
var displayName: string
|
|
532
|
+
}
|
|
509
533
|
|
|
510
534
|
export {BoxDisplay}
|
|
511
535
|
|
|
536
|
+
/** @public */
|
|
537
|
+
export declare type BoxElementType =
|
|
538
|
+
| 'a'
|
|
539
|
+
| 'article'
|
|
540
|
+
| 'aside'
|
|
541
|
+
| 'blockquote'
|
|
542
|
+
| 'body'
|
|
543
|
+
| 'button'
|
|
544
|
+
| 'details'
|
|
545
|
+
| 'div'
|
|
546
|
+
| 'header'
|
|
547
|
+
| 'fieldset'
|
|
548
|
+
| 'figure'
|
|
549
|
+
| 'figcaption'
|
|
550
|
+
| 'footer'
|
|
551
|
+
| 'form'
|
|
552
|
+
| 'html'
|
|
553
|
+
| 'iframe'
|
|
554
|
+
| 'kbd'
|
|
555
|
+
| 'label'
|
|
556
|
+
| 'legend'
|
|
557
|
+
| 'li'
|
|
558
|
+
| 'main'
|
|
559
|
+
| 'nav'
|
|
560
|
+
| 'ol'
|
|
561
|
+
| 'pre'
|
|
562
|
+
| 'section'
|
|
563
|
+
| 'span'
|
|
564
|
+
| 'summary'
|
|
565
|
+
| 'ul'
|
|
566
|
+
| ComponentType
|
|
567
|
+
|
|
512
568
|
export {BoxHeight}
|
|
513
569
|
|
|
514
570
|
export {BoxOverflow}
|
|
515
571
|
|
|
516
|
-
/**
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
572
|
+
/** @public */
|
|
573
|
+
export declare type BoxOwnProps = BoxStyleProps &
|
|
574
|
+
GapStyleProps &
|
|
575
|
+
InsetStyleProps &
|
|
576
|
+
PositionStyleProps
|
|
577
|
+
|
|
578
|
+
/** @public */
|
|
579
|
+
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
524
580
|
|
|
525
581
|
/**
|
|
526
582
|
* @public
|
|
@@ -530,34 +586,42 @@ export declare type BoxShadow = ThemeBoxShadow
|
|
|
530
586
|
|
|
531
587
|
export {BoxSizing}
|
|
532
588
|
|
|
533
|
-
/**
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BreadcrumbsProps> &
|
|
538
|
-
BreadcrumbsProps &
|
|
539
|
-
RefAttributes<HTMLDivElement>
|
|
540
|
-
>
|
|
589
|
+
/** @beta */
|
|
590
|
+
export declare function Breadcrumbs<
|
|
591
|
+
E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
|
|
592
|
+
>(props: BreadcrumbsProps<E>): JSX.Element
|
|
541
593
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
594
|
+
export declare namespace Breadcrumbs {
|
|
595
|
+
var displayName: string
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/** @beta */
|
|
599
|
+
export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
|
|
600
|
+
|
|
601
|
+
/** @beta */
|
|
602
|
+
export declare type BreadcrumbsOwnProps = GapStyleProps & {
|
|
603
|
+
expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
|
|
547
604
|
maxLength?: number
|
|
548
605
|
separator?: ReactNode
|
|
549
606
|
/** @deprecated - Use `gap`, `gapX`, `gapY` instead */
|
|
550
607
|
space?: number | number[]
|
|
551
608
|
}
|
|
552
609
|
|
|
553
|
-
/**
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
610
|
+
/** @beta */
|
|
611
|
+
export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
|
|
612
|
+
Props<BreadcrumbsOwnProps, E>
|
|
613
|
+
|
|
614
|
+
/** @public */
|
|
615
|
+
export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
|
|
616
|
+
props: ButtonProps<E>,
|
|
617
|
+
): JSX.Element
|
|
618
|
+
|
|
619
|
+
export declare namespace Button {
|
|
620
|
+
var displayName: string
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** @public */
|
|
624
|
+
export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
561
625
|
|
|
562
626
|
/**
|
|
563
627
|
* @public
|
|
@@ -565,40 +629,41 @@ export declare const Button: ForwardRefExoticComponent<
|
|
|
565
629
|
*/
|
|
566
630
|
export declare type ButtonMode = ThemeColorButtonModeKey_2
|
|
567
631
|
|
|
568
|
-
/**
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
'type'?: 'button' | 'reset' | 'submit'
|
|
596
|
-
'width'?: ResponsiveProp<Width>
|
|
597
|
-
}
|
|
632
|
+
/** @public */
|
|
633
|
+
export declare type ButtonOwnProps = ButtonStyleProps &
|
|
634
|
+
DisplayStyleProps &
|
|
635
|
+
GapStyleProps &
|
|
636
|
+
PaddingStyleProps & {
|
|
637
|
+
'align'?: FlexStyleProps['align']
|
|
638
|
+
'data-ui'?: string
|
|
639
|
+
'disabled'?: boolean
|
|
640
|
+
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
641
|
+
'mode'?: ThemeColorButtonModeKey_2
|
|
642
|
+
'icon'?: ElementType_2 | ReactNode
|
|
643
|
+
'iconRight'?: ElementType_2 | ReactNode
|
|
644
|
+
'justify'?: FlexStyleProps['justify']
|
|
645
|
+
/** @beta Do not use in production, as this might change.*/
|
|
646
|
+
'loading'?: boolean
|
|
647
|
+
'selected'?: boolean
|
|
648
|
+
/** @deprecated Use `gap` instead. */
|
|
649
|
+
'space'?: ResponsiveProp<Space>
|
|
650
|
+
'textAlign'?: ButtonTextAlign
|
|
651
|
+
'muted'?: boolean
|
|
652
|
+
'target'?: string
|
|
653
|
+
'text'?: ReactNode
|
|
654
|
+
'textOverflow'?: TextOwnProps['textOverflow']
|
|
655
|
+
'textWeight'?: TextOwnProps['weight']
|
|
656
|
+
'tone'?: ThemeColorStateToneKey
|
|
657
|
+
'width'?: ResponsiveProp<Width>
|
|
658
|
+
}
|
|
598
659
|
|
|
599
|
-
/**
|
|
600
|
-
|
|
601
|
-
|
|
660
|
+
/** @public */
|
|
661
|
+
export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
|
|
662
|
+
ButtonOwnProps,
|
|
663
|
+
E
|
|
664
|
+
>
|
|
665
|
+
|
|
666
|
+
/** @public */
|
|
602
667
|
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
603
668
|
|
|
604
669
|
/**
|
|
@@ -619,16 +684,34 @@ export declare type ButtonWidth = 'fill'
|
|
|
619
684
|
*
|
|
620
685
|
* @public
|
|
621
686
|
*/
|
|
622
|
-
export declare
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
RefAttributes<HTMLDivElement>
|
|
626
|
-
>
|
|
687
|
+
export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
|
|
688
|
+
props: CardProps<E>,
|
|
689
|
+
): JSX.Element
|
|
627
690
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
691
|
+
export declare namespace Card {
|
|
692
|
+
var displayName: string
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/** @internal */
|
|
696
|
+
export declare type _CardCompatProviderComponent = ComponentType_2<{
|
|
697
|
+
children?: ReactNode
|
|
698
|
+
tone: ThemeColorCardToneKey
|
|
699
|
+
scheme: ThemeColorSchemeKey_2
|
|
700
|
+
}>
|
|
701
|
+
|
|
702
|
+
/** @public */
|
|
703
|
+
export declare interface CardContextValue {
|
|
704
|
+
tone: ThemeColorCardToneKey
|
|
705
|
+
scheme: ThemeColorSchemeKey_2
|
|
706
|
+
/** @internal */
|
|
707
|
+
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** @public */
|
|
711
|
+
export declare type CardElementType = BoxElementType
|
|
712
|
+
|
|
713
|
+
/** @public */
|
|
714
|
+
export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps_2 {
|
|
632
715
|
/**
|
|
633
716
|
* Do not use in production.
|
|
634
717
|
* @beta
|
|
@@ -640,26 +723,37 @@ export declare interface CardProps extends BoxProps, CardStyleProps_2 {
|
|
|
640
723
|
*/
|
|
641
724
|
__unstable_focusRing?: boolean
|
|
642
725
|
disabled?: boolean
|
|
643
|
-
href?: string
|
|
644
726
|
pressed?: boolean
|
|
645
727
|
selected?: boolean
|
|
646
728
|
target?: string
|
|
647
729
|
}
|
|
648
730
|
|
|
731
|
+
/** @public */
|
|
732
|
+
export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
|
|
733
|
+
|
|
734
|
+
export declare function CardProvider(props: {
|
|
735
|
+
children?: ReactNode
|
|
736
|
+
tone: ThemeColorCardToneKey
|
|
737
|
+
scheme: ThemeColorSchemeKey_2
|
|
738
|
+
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
739
|
+
}): JSX.Element
|
|
740
|
+
|
|
741
|
+
export declare namespace CardProvider {
|
|
742
|
+
var displayName: string
|
|
743
|
+
}
|
|
744
|
+
|
|
649
745
|
/**
|
|
650
746
|
* @internal
|
|
651
|
-
* @deprecated
|
|
747
|
+
* @deprecated Use `CardStyleProps` from `@sanity/ui/css` instead.
|
|
652
748
|
*/
|
|
653
749
|
export declare interface CardStyleProps {
|
|
654
750
|
$checkered: boolean
|
|
655
751
|
$focusRing: boolean
|
|
656
752
|
$muted: boolean
|
|
657
|
-
$tone:
|
|
753
|
+
$tone: ThemeColorCardToneKey
|
|
658
754
|
}
|
|
659
755
|
|
|
660
|
-
/**
|
|
661
|
-
* @public
|
|
662
|
-
*/
|
|
756
|
+
/** @public */
|
|
663
757
|
export declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
664
758
|
|
|
665
759
|
/**
|
|
@@ -667,124 +761,283 @@ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
|
|
|
667
761
|
*
|
|
668
762
|
* @public
|
|
669
763
|
*/
|
|
670
|
-
export declare
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
RefAttributes<HTMLInputElement>
|
|
674
|
-
>
|
|
764
|
+
export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
|
|
765
|
+
props: CheckboxProps<E>,
|
|
766
|
+
): JSX.Element
|
|
675
767
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
768
|
+
export declare namespace Checkbox {
|
|
769
|
+
var displayName: string
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/** @public */
|
|
773
|
+
export declare type CheckboxElementType = 'input' | ComponentType
|
|
774
|
+
|
|
775
|
+
/** @public */
|
|
776
|
+
export declare type CheckboxOwnProps = {
|
|
680
777
|
indeterminate?: boolean
|
|
681
778
|
customValidity?: string
|
|
682
779
|
}
|
|
683
780
|
|
|
684
|
-
/**
|
|
685
|
-
|
|
686
|
-
|
|
781
|
+
/** @public */
|
|
782
|
+
export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
|
|
783
|
+
CheckboxOwnProps,
|
|
784
|
+
E
|
|
785
|
+
>
|
|
786
|
+
|
|
787
|
+
/** @public */
|
|
687
788
|
export declare type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
688
789
|
|
|
689
|
-
/**
|
|
690
|
-
* @public
|
|
691
|
-
*/
|
|
790
|
+
/** @public */
|
|
692
791
|
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
693
792
|
|
|
793
|
+
/** @public */
|
|
794
|
+
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
795
|
+
|
|
796
|
+
/** @public */
|
|
797
|
+
export declare type ClickOutsideListener = (event: MouseEvent) => void
|
|
798
|
+
|
|
799
|
+
/** @public */
|
|
800
|
+
export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
|
|
801
|
+
props: CodeProps<E>,
|
|
802
|
+
): JSX.Element
|
|
803
|
+
|
|
804
|
+
export declare namespace Code {
|
|
805
|
+
var displayName: string
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/** @public */
|
|
809
|
+
export declare type CodeElementType = 'div' | 'pre' | ComponentType
|
|
810
|
+
|
|
811
|
+
/** @public */
|
|
812
|
+
export declare type CodeOwnProps = Omit<FontStyleProps, 'align'> & {
|
|
813
|
+
/** Define the language to use for syntax highlighting. */
|
|
814
|
+
language?: string
|
|
815
|
+
size?: number | number[]
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/** @public */
|
|
819
|
+
export declare type CodeProps<E extends CodeElementType = CodeElementType> = Props<CodeOwnProps, E>
|
|
820
|
+
|
|
694
821
|
/**
|
|
695
|
-
*
|
|
822
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
823
|
+
* @beta
|
|
696
824
|
*/
|
|
697
|
-
export declare
|
|
825
|
+
export declare function CodeSkeleton<
|
|
826
|
+
E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
|
|
827
|
+
>(props: CodeSkeletonProps<E>): JSX.Element
|
|
828
|
+
|
|
829
|
+
export declare namespace CodeSkeleton {
|
|
830
|
+
var displayName: string
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/** @public */
|
|
834
|
+
export declare type CodeSkeletonElementType = SkeletonElementType
|
|
835
|
+
|
|
836
|
+
/** @beta */
|
|
837
|
+
export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
|
|
838
|
+
size?: ResponsiveProp<FontCodeSize>
|
|
839
|
+
}
|
|
698
840
|
|
|
699
841
|
/**
|
|
700
|
-
*
|
|
842
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
843
|
+
* @beta
|
|
701
844
|
*/
|
|
702
|
-
export declare type
|
|
845
|
+
export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
|
|
846
|
+
Props<CodeSkeletonOwnProps, E>
|
|
847
|
+
|
|
848
|
+
/** @public */
|
|
849
|
+
export declare type ComponentType<P = any> =
|
|
850
|
+
| FunctionComponent<P>
|
|
851
|
+
| ComponentClass<P>
|
|
852
|
+
| ExoticComponent<P>
|
|
703
853
|
|
|
704
854
|
/**
|
|
855
|
+
* The `Container` component wraps content layout in a defined set of widths.
|
|
856
|
+
*
|
|
705
857
|
* @public
|
|
706
858
|
*/
|
|
707
|
-
export declare
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
859
|
+
export declare function Container<
|
|
860
|
+
E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
|
|
861
|
+
>(props: ContainerProps<E>): JSX.Element
|
|
862
|
+
|
|
863
|
+
export declare namespace Container {
|
|
864
|
+
var displayName: string
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/** @public */
|
|
868
|
+
export declare type ContainerElementType = BoxElementType
|
|
869
|
+
|
|
870
|
+
/** @public */
|
|
871
|
+
export declare type ContainerOwnProps = Omit<BoxOwnProps, 'width'> & ContainerStyleProps
|
|
872
|
+
|
|
873
|
+
/** @public */
|
|
874
|
+
export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
|
|
875
|
+
ContainerOwnProps,
|
|
876
|
+
E
|
|
711
877
|
>
|
|
712
878
|
|
|
713
879
|
/**
|
|
714
|
-
* @
|
|
880
|
+
* @internal
|
|
715
881
|
*/
|
|
716
|
-
export declare
|
|
717
|
-
/** Define the language to use for syntax highlighting. */
|
|
718
|
-
language?: string
|
|
719
|
-
size?: number | number[]
|
|
720
|
-
}
|
|
882
|
+
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
721
883
|
|
|
722
884
|
/**
|
|
723
|
-
*
|
|
724
|
-
* @
|
|
885
|
+
* @public
|
|
886
|
+
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
725
887
|
*/
|
|
726
|
-
export declare const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
888
|
+
export declare const createColorTheme: typeof createColorTheme_2
|
|
889
|
+
|
|
890
|
+
/** @internal */
|
|
891
|
+
export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
892
|
+
|
|
893
|
+
/** @public */
|
|
894
|
+
export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
|
|
895
|
+
|
|
896
|
+
/** @public */
|
|
897
|
+
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'div'
|
|
898
|
+
|
|
899
|
+
/** @public */
|
|
900
|
+
export declare const DEFAULT_AVATAR_ELEMENT = 'div'
|
|
901
|
+
|
|
902
|
+
/** @public */
|
|
903
|
+
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'div'
|
|
904
|
+
|
|
905
|
+
/** @public */
|
|
906
|
+
export declare const DEFAULT_BADGE_ELEMENT = 'span'
|
|
907
|
+
|
|
908
|
+
/** @public */
|
|
909
|
+
export declare const DEFAULT_BOX_ELEMENT = 'div'
|
|
910
|
+
|
|
911
|
+
/** @beta */
|
|
912
|
+
export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
|
|
913
|
+
|
|
914
|
+
/** @public */
|
|
915
|
+
export declare const DEFAULT_BUTTON_ELEMENT = 'button'
|
|
916
|
+
|
|
917
|
+
/** @public */
|
|
918
|
+
export declare const DEFAULT_CARD_ELEMENT = 'div'
|
|
919
|
+
|
|
920
|
+
/** @public */
|
|
921
|
+
export declare const DEFAULT_CHECKBOX_ELEMENT = 'input'
|
|
922
|
+
|
|
923
|
+
/** @public */
|
|
924
|
+
export declare const DEFAULT_CODE_ELEMENT = 'pre'
|
|
925
|
+
|
|
926
|
+
/** @public */
|
|
927
|
+
export declare const DEFAULT_CODE_SKELETON_ELEMENT = 'div'
|
|
928
|
+
|
|
929
|
+
/** @public */
|
|
930
|
+
export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
|
|
931
|
+
|
|
932
|
+
/** @public */
|
|
933
|
+
export declare const DEFAULT_DIALOG_ELEMENT = 'div'
|
|
934
|
+
|
|
935
|
+
/** @beta */
|
|
936
|
+
export declare const DEFAULT_ELEMENT_QUERY_ELEMENT = 'div'
|
|
937
|
+
|
|
938
|
+
/** @public */
|
|
939
|
+
export declare const DEFAULT_FLEX_ELEMENT = 'div'
|
|
940
|
+
|
|
941
|
+
/** @public */
|
|
942
|
+
export declare const DEFAULT_GRID_ELEMENT = 'div'
|
|
943
|
+
|
|
944
|
+
/** @public */
|
|
945
|
+
export declare const DEFAULT_HEADING_ELEMENT = 'div'
|
|
946
|
+
|
|
947
|
+
/** @public */
|
|
948
|
+
export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
|
|
949
|
+
|
|
950
|
+
/** @public */
|
|
951
|
+
export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
|
|
952
|
+
|
|
953
|
+
/** @public */
|
|
954
|
+
export declare const DEFAULT_INLINE_ELEMENT = 'div'
|
|
955
|
+
|
|
956
|
+
/** @public */
|
|
957
|
+
export declare const DEFAULT_KBD_ELEMENT = 'kbd'
|
|
958
|
+
|
|
959
|
+
/** @public */
|
|
960
|
+
export declare const DEFAULT_LABEL_ELEMENT = 'div'
|
|
961
|
+
|
|
962
|
+
/** @public */
|
|
963
|
+
export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
|
|
964
|
+
|
|
965
|
+
/** @public */
|
|
966
|
+
export declare const DEFAULT_LAYER_ELEMENT = 'div'
|
|
967
|
+
|
|
968
|
+
/** @public */
|
|
969
|
+
export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
|
|
970
|
+
|
|
971
|
+
/** @public */
|
|
972
|
+
export declare const DEFAULT_MENU_ELEMENT = 'div'
|
|
973
|
+
|
|
974
|
+
/** @public */
|
|
975
|
+
export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
|
|
976
|
+
|
|
977
|
+
/** @public */
|
|
978
|
+
export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
|
|
979
|
+
|
|
980
|
+
/** @public */
|
|
981
|
+
export declare const DEFAULT_POPOVER_ELEMENT = 'div'
|
|
982
|
+
|
|
983
|
+
/** @public */
|
|
984
|
+
export declare const DEFAULT_RADIO_ELEMENT = 'input'
|
|
985
|
+
|
|
986
|
+
/** @public */
|
|
987
|
+
export declare const DEFAULT_SELECT_ELEMENT = 'select'
|
|
988
|
+
|
|
989
|
+
/** @beta */
|
|
990
|
+
export declare const DEFAULT_SKELETON_ELEMENT = 'div'
|
|
991
|
+
|
|
992
|
+
/** @public */
|
|
993
|
+
export declare const DEFAULT_SPINNER_ELEMENT = 'div'
|
|
994
|
+
|
|
995
|
+
/** @public */
|
|
996
|
+
export declare const DEFAULT_SR_ONLY_ELEMENT = 'span'
|
|
997
|
+
|
|
998
|
+
/** @public */
|
|
999
|
+
export declare const DEFAULT_STACK_ELEMENT = 'div'
|
|
1000
|
+
|
|
1001
|
+
/** @public */
|
|
1002
|
+
export declare const DEFAULT_SWITCH_ELEMENT = 'input'
|
|
1003
|
+
|
|
1004
|
+
/** @public */
|
|
1005
|
+
export declare const DEFAULT_TAB_ELEMENT = 'button'
|
|
1006
|
+
|
|
1007
|
+
/** @public */
|
|
1008
|
+
export declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
|
|
1009
|
+
|
|
1010
|
+
/** @public */
|
|
1011
|
+
export declare const DEFAULT_TAB_PANEL_ELEMENT = 'div'
|
|
731
1012
|
|
|
732
|
-
/**
|
|
733
|
-
|
|
734
|
-
* @beta
|
|
735
|
-
*/
|
|
736
|
-
export declare interface CodeSkeletonProps extends SkeletonProps {
|
|
737
|
-
size?: ResponsiveProp<FontCodeSize>
|
|
738
|
-
}
|
|
1013
|
+
/** @public */
|
|
1014
|
+
export declare const DEFAULT_TEXT_AREA_ELEMENT = 'textarea'
|
|
739
1015
|
|
|
740
|
-
/**
|
|
741
|
-
|
|
742
|
-
* @deprecated this component will be removed in the next major release
|
|
743
|
-
*/
|
|
744
|
-
export declare function ConditionalWrapper({
|
|
745
|
-
children,
|
|
746
|
-
condition,
|
|
747
|
-
wrapper,
|
|
748
|
-
}: {
|
|
749
|
-
children: ReactNode
|
|
750
|
-
condition: boolean
|
|
751
|
-
wrapper: (children: ReactNode) => ReactNode
|
|
752
|
-
}): ReactNode
|
|
1016
|
+
/** @public */
|
|
1017
|
+
export declare const DEFAULT_TEXT_ELEMENT = 'div'
|
|
753
1018
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}
|
|
1019
|
+
/** @public */
|
|
1020
|
+
export declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
|
|
757
1021
|
|
|
758
|
-
/**
|
|
759
|
-
|
|
760
|
-
*
|
|
761
|
-
* @public
|
|
762
|
-
*/
|
|
763
|
-
export declare const Container: ForwardRefExoticComponent<
|
|
764
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof ContainerProps> &
|
|
765
|
-
ContainerProps &
|
|
766
|
-
RefAttributes<HTMLDivElement>
|
|
767
|
-
>
|
|
1022
|
+
/** @public */
|
|
1023
|
+
export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
|
|
768
1024
|
|
|
769
|
-
/**
|
|
770
|
-
|
|
771
|
-
*/
|
|
772
|
-
export declare interface ContainerProps extends Omit<BoxProps, 'width'>, ContainerStyleProps {}
|
|
1025
|
+
/** @public */
|
|
1026
|
+
export declare const DEFAULT_TOAST_ELEMENT = 'li'
|
|
773
1027
|
|
|
774
|
-
/**
|
|
775
|
-
|
|
776
|
-
*/
|
|
777
|
-
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
1028
|
+
/** @public */
|
|
1029
|
+
export declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
|
|
778
1030
|
|
|
779
|
-
/**
|
|
780
|
-
|
|
781
|
-
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
782
|
-
*/
|
|
783
|
-
export declare const createColorTheme: typeof createColorTheme_2
|
|
1031
|
+
/** @beta */
|
|
1032
|
+
export declare const DEFAULT_TREE_ELEMENT = 'div'
|
|
784
1033
|
|
|
785
|
-
/**
|
|
786
|
-
|
|
787
|
-
|
|
1034
|
+
/** @beta */
|
|
1035
|
+
export declare const DEFAULT_TREE_ITEM_ELEMENT = 'a'
|
|
1036
|
+
|
|
1037
|
+
/** @beta */
|
|
1038
|
+
export declare const DEFAULT_VIRTUAL_LIST_ELEMENT = 'div'
|
|
1039
|
+
|
|
1040
|
+
/** @public */
|
|
788
1041
|
export declare type Delay =
|
|
789
1042
|
| number
|
|
790
1043
|
| Partial<{
|
|
@@ -797,11 +1050,13 @@ export declare type Delay =
|
|
|
797
1050
|
*
|
|
798
1051
|
* @public
|
|
799
1052
|
*/
|
|
800
|
-
export declare
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1053
|
+
export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
|
|
1054
|
+
props: DialogProps<E>,
|
|
1055
|
+
): JSX.Element
|
|
1056
|
+
|
|
1057
|
+
export declare namespace Dialog {
|
|
1058
|
+
var displayName: string
|
|
1059
|
+
}
|
|
805
1060
|
|
|
806
1061
|
/**
|
|
807
1062
|
* @internal
|
|
@@ -818,49 +1073,52 @@ export declare interface DialogContextValue {
|
|
|
818
1073
|
zOffset?: number | number[]
|
|
819
1074
|
}
|
|
820
1075
|
|
|
821
|
-
/**
|
|
822
|
-
|
|
823
|
-
|
|
1076
|
+
/** @public */
|
|
1077
|
+
export declare type DialogElementType = 'div' | 'span' | ComponentType
|
|
1078
|
+
|
|
1079
|
+
/** @public */
|
|
1080
|
+
export declare type DialogOwnProps = ContainerStyleProps &
|
|
1081
|
+
Omit<LayerOwnProps, 'width'> & {
|
|
1082
|
+
/**
|
|
1083
|
+
* @beta
|
|
1084
|
+
*/
|
|
1085
|
+
__unstable_autoFocus?: boolean
|
|
1086
|
+
/**
|
|
1087
|
+
* @beta
|
|
1088
|
+
*/
|
|
1089
|
+
__unstable_hideCloseButton?: boolean
|
|
1090
|
+
/**
|
|
1091
|
+
* Whether the dialog should animate in on mount.
|
|
1092
|
+
*
|
|
1093
|
+
* @beta
|
|
1094
|
+
* @defaultValue false
|
|
1095
|
+
*/
|
|
1096
|
+
animate?: boolean
|
|
1097
|
+
cardRadius?: ResponsiveProp<Radius>
|
|
1098
|
+
contentRef?: ForwardedRef<HTMLDivElement>
|
|
1099
|
+
footer?: ReactNode
|
|
1100
|
+
header?: ReactNode
|
|
1101
|
+
id: string
|
|
1102
|
+
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
1103
|
+
onActivate?: LayerProps['onActivate']
|
|
1104
|
+
onClickOutside?: () => void
|
|
1105
|
+
onClose?: () => void
|
|
1106
|
+
open?: boolean
|
|
1107
|
+
portal?: string
|
|
1108
|
+
position?: DialogPosition | DialogPosition[]
|
|
1109
|
+
scheme?: ThemeColorSchemeKey_2
|
|
1110
|
+
tone?: CardTone
|
|
1111
|
+
zOffset?: number | number[]
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/** @public */
|
|
824
1115
|
export declare type DialogPosition = 'absolute' | 'fixed'
|
|
825
1116
|
|
|
826
|
-
/**
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
PaddingStyleProps,
|
|
832
|
-
ShadowStyleProps {
|
|
833
|
-
/**
|
|
834
|
-
* @beta
|
|
835
|
-
*/
|
|
836
|
-
__unstable_autoFocus?: boolean
|
|
837
|
-
/**
|
|
838
|
-
* @beta
|
|
839
|
-
*/
|
|
840
|
-
__unstable_hideCloseButton?: boolean
|
|
841
|
-
/**
|
|
842
|
-
* Whether the dialog should animate in on mount.
|
|
843
|
-
*
|
|
844
|
-
* @beta
|
|
845
|
-
* @defaultValue false
|
|
846
|
-
*/
|
|
847
|
-
animate?: boolean
|
|
848
|
-
cardRadius?: ResponsiveProp<Radius>
|
|
849
|
-
contentRef?: ForwardedRef<HTMLDivElement>
|
|
850
|
-
footer?: ReactNode
|
|
851
|
-
header?: ReactNode
|
|
852
|
-
id: string
|
|
853
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
854
|
-
onActivate?: LayerProps['onActivate']
|
|
855
|
-
onClickOutside?: () => void
|
|
856
|
-
onClose?: () => void
|
|
857
|
-
open?: boolean
|
|
858
|
-
portal?: string
|
|
859
|
-
position?: DialogPosition | DialogPosition[]
|
|
860
|
-
scheme?: ThemeColorSchemeKey_2
|
|
861
|
-
tone?: CardTone
|
|
862
|
-
zOffset?: number | number[]
|
|
863
|
-
}
|
|
1117
|
+
/** @public */
|
|
1118
|
+
export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
|
|
1119
|
+
DialogOwnProps,
|
|
1120
|
+
E
|
|
1121
|
+
>
|
|
864
1122
|
|
|
865
1123
|
/**
|
|
866
1124
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
@@ -882,18 +1140,35 @@ export declare interface DialogProviderProps {
|
|
|
882
1140
|
zOffset?: number | number[]
|
|
883
1141
|
}
|
|
884
1142
|
|
|
885
|
-
/**
|
|
886
|
-
|
|
1143
|
+
/**
|
|
1144
|
+
* DO NOT USE IN PRODUCTION.
|
|
1145
|
+
* @beta
|
|
1146
|
+
*/
|
|
1147
|
+
export declare function ElementQuery<
|
|
1148
|
+
E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
|
|
1149
|
+
>(props: ElementQueryProps<E>): JSX.Element
|
|
1150
|
+
|
|
1151
|
+
export declare namespace ElementQuery {
|
|
1152
|
+
var displayName: string
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/** @beta */
|
|
1156
|
+
export declare type ElementQueryElementType = 'div' | ComponentType
|
|
887
1157
|
|
|
888
1158
|
/**
|
|
889
1159
|
* DO NOT USE IN PRODUCTION.
|
|
890
1160
|
* @beta
|
|
891
1161
|
*/
|
|
892
|
-
export declare
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
1162
|
+
export declare type ElementQueryOwnProps = {
|
|
1163
|
+
media?: number[]
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* DO NOT USE IN PRODUCTION.
|
|
1168
|
+
* @beta
|
|
1169
|
+
*/
|
|
1170
|
+
export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
|
|
1171
|
+
Props<ElementQueryOwnProps, E>
|
|
897
1172
|
|
|
898
1173
|
/**
|
|
899
1174
|
* @beta
|
|
@@ -937,12 +1212,19 @@ export declare const _elementSizeObserver: _ElementSizeObserver
|
|
|
937
1212
|
*/
|
|
938
1213
|
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
939
1214
|
|
|
1215
|
+
/** @public */
|
|
1216
|
+
export declare type ElementType<P> = TagType | ComponentType<P>
|
|
1217
|
+
|
|
1218
|
+
/** @public */
|
|
1219
|
+
export declare type EmptyProps = {}
|
|
1220
|
+
|
|
940
1221
|
/**
|
|
941
1222
|
* DO NOT USE IN PRODUCTION
|
|
942
1223
|
* @beta
|
|
943
1224
|
*/
|
|
944
1225
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
945
1226
|
state: ErrorBoundaryState
|
|
1227
|
+
static displayName: string
|
|
946
1228
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState
|
|
947
1229
|
componentDidCatch(error: Error, info: ErrorInfo): void
|
|
948
1230
|
render(): ReactNode
|
|
@@ -969,24 +1251,28 @@ export declare interface ErrorBoundaryState {
|
|
|
969
1251
|
*
|
|
970
1252
|
* @public
|
|
971
1253
|
*/
|
|
972
|
-
export declare
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1254
|
+
export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
|
|
1255
|
+
props: FlexProps<E>,
|
|
1256
|
+
): JSX.Element
|
|
1257
|
+
|
|
1258
|
+
export declare namespace Flex {
|
|
1259
|
+
var displayName: string
|
|
1260
|
+
}
|
|
977
1261
|
|
|
978
1262
|
export {FlexAlign}
|
|
979
1263
|
|
|
980
1264
|
export {FlexDirection}
|
|
981
1265
|
|
|
1266
|
+
/** @public */
|
|
1267
|
+
export declare type FlexElementType = BoxElementType
|
|
1268
|
+
|
|
982
1269
|
export {FlexJustify}
|
|
983
1270
|
|
|
984
|
-
/**
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
}
|
|
1271
|
+
/** @public */
|
|
1272
|
+
export declare type FlexOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1273
|
+
|
|
1274
|
+
/** @public */
|
|
1275
|
+
export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
|
|
990
1276
|
|
|
991
1277
|
export {FlexValue}
|
|
992
1278
|
|
|
@@ -1012,11 +1298,13 @@ export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?:
|
|
|
1012
1298
|
*
|
|
1013
1299
|
* @public
|
|
1014
1300
|
*/
|
|
1015
|
-
export declare
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1301
|
+
export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
|
|
1302
|
+
props: GridProps<E>,
|
|
1303
|
+
): JSX.Element
|
|
1304
|
+
|
|
1305
|
+
export declare namespace Grid {
|
|
1306
|
+
var displayName: string
|
|
1307
|
+
}
|
|
1020
1308
|
|
|
1021
1309
|
export {GridAutoCols}
|
|
1022
1310
|
|
|
@@ -1024,6 +1312,9 @@ export {GridAutoFlow}
|
|
|
1024
1312
|
|
|
1025
1313
|
export {GridAutoRows}
|
|
1026
1314
|
|
|
1315
|
+
/** @public */
|
|
1316
|
+
export declare type GridElementType = BoxElementType
|
|
1317
|
+
|
|
1027
1318
|
export {GridItemColumn}
|
|
1028
1319
|
|
|
1029
1320
|
export {GridItemColumnEnd}
|
|
@@ -1036,10 +1327,11 @@ export {GridItemRowEnd}
|
|
|
1036
1327
|
|
|
1037
1328
|
export {GridItemRowStart}
|
|
1038
1329
|
|
|
1039
|
-
/**
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1330
|
+
/** @public */
|
|
1331
|
+
export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
|
|
1332
|
+
|
|
1333
|
+
/** @public */
|
|
1334
|
+
export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
|
|
1043
1335
|
|
|
1044
1336
|
/**
|
|
1045
1337
|
* @internal
|
|
@@ -1051,34 +1343,63 @@ export declare function _hasFocus(element: HTMLElement): boolean
|
|
|
1051
1343
|
*
|
|
1052
1344
|
* @public
|
|
1053
1345
|
*/
|
|
1054
|
-
export declare
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
RefAttributes<HTMLElement>
|
|
1058
|
-
>
|
|
1346
|
+
export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
|
|
1347
|
+
props: HeadingProps<E>,
|
|
1348
|
+
): JSX.Element
|
|
1059
1349
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1350
|
+
export declare namespace Heading {
|
|
1351
|
+
var displayName: string
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/** @public */
|
|
1355
|
+
export declare type HeadingElementType =
|
|
1356
|
+
| 'div'
|
|
1357
|
+
| 'h1'
|
|
1358
|
+
| 'h2'
|
|
1359
|
+
| 'h3'
|
|
1360
|
+
| 'h4'
|
|
1361
|
+
| 'h5'
|
|
1362
|
+
| 'h6'
|
|
1363
|
+
| 'label'
|
|
1364
|
+
| 'span'
|
|
1365
|
+
| ComponentType
|
|
1366
|
+
|
|
1367
|
+
/** @public */
|
|
1368
|
+
export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
|
|
1369
|
+
|
|
1370
|
+
/** @public */
|
|
1371
|
+
export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
|
|
1372
|
+
HeadingOwnProps,
|
|
1373
|
+
E
|
|
1374
|
+
>
|
|
1064
1375
|
|
|
1065
1376
|
/**
|
|
1066
1377
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1067
1378
|
* @beta
|
|
1068
1379
|
*/
|
|
1069
|
-
export declare
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1380
|
+
export declare function HeadingSkeleton<
|
|
1381
|
+
E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
|
|
1382
|
+
>(props: HeadingSkeletonProps<E>): JSX.Element
|
|
1383
|
+
|
|
1384
|
+
export declare namespace HeadingSkeleton {
|
|
1385
|
+
var displayName: string
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
/** @public */
|
|
1389
|
+
export declare type HeadingSkeletonElementType = SkeletonElementType
|
|
1390
|
+
|
|
1391
|
+
/** @beta */
|
|
1392
|
+
export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
|
|
1393
|
+
size?: ResponsiveProp<FontHeadingSize>
|
|
1394
|
+
}
|
|
1074
1395
|
|
|
1075
1396
|
/**
|
|
1076
1397
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1077
1398
|
* @beta
|
|
1078
1399
|
*/
|
|
1079
|
-
export declare
|
|
1080
|
-
|
|
1081
|
-
|
|
1400
|
+
export declare type HeadingSkeletonProps<
|
|
1401
|
+
E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
|
|
1402
|
+
> = Props<HeadingSkeletonOwnProps, E>
|
|
1082
1403
|
|
|
1083
1404
|
/**
|
|
1084
1405
|
* @public
|
|
@@ -1091,16 +1412,19 @@ export declare const hexToRgb: typeof hexToRgb_2
|
|
|
1091
1412
|
*
|
|
1092
1413
|
* @public
|
|
1093
1414
|
*/
|
|
1094
|
-
export declare
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
RefAttributes<HTMLDivElement>
|
|
1098
|
-
>
|
|
1415
|
+
export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
|
|
1416
|
+
props: HotkeysProps<E>,
|
|
1417
|
+
): JSX.Element | undefined
|
|
1099
1418
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1419
|
+
export declare namespace Hotkeys {
|
|
1420
|
+
var displayName: string
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/** @public */
|
|
1424
|
+
export declare type HotkeysElementType = 'kbd' | ComponentType
|
|
1425
|
+
|
|
1426
|
+
/** @public */
|
|
1427
|
+
export declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
|
|
1104
1428
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
1105
1429
|
padding?: ResponsiveProp<Space>
|
|
1106
1430
|
/** @deprecated Use `gap` instead. */
|
|
@@ -1108,6 +1432,12 @@ export declare interface HotkeysProps extends GapStyleProps, RadiusStyleProps {
|
|
|
1108
1432
|
keys?: string[]
|
|
1109
1433
|
}
|
|
1110
1434
|
|
|
1435
|
+
/** @public */
|
|
1436
|
+
export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
|
|
1437
|
+
HotkeysOwnProps,
|
|
1438
|
+
E
|
|
1439
|
+
>
|
|
1440
|
+
|
|
1111
1441
|
/**
|
|
1112
1442
|
* @public
|
|
1113
1443
|
* @deprecated Use `HSL` from `@sanity/ui/theme` instead.
|
|
@@ -1125,20 +1455,32 @@ export declare const hslToRgb: typeof hslToRgb_2
|
|
|
1125
1455
|
*
|
|
1126
1456
|
* @public
|
|
1127
1457
|
*/
|
|
1128
|
-
export declare
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
RefAttributes<HTMLDivElement>
|
|
1132
|
-
>
|
|
1458
|
+
export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
|
|
1459
|
+
props: InlineProps<E>,
|
|
1460
|
+
): JSX.Element
|
|
1133
1461
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1462
|
+
export declare namespace Inline {
|
|
1463
|
+
var displayName: string
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
/** @public */
|
|
1467
|
+
export declare type InlineElementType = BoxElementType
|
|
1468
|
+
|
|
1469
|
+
/** @public */
|
|
1470
|
+
export declare type InlineOwnProps = Omit<
|
|
1471
|
+
BoxOwnProps,
|
|
1472
|
+
keyof FlexStyleProps | keyof GridStyleProps
|
|
1473
|
+
> & {
|
|
1138
1474
|
/** @deprecated Use `gap` instead. */
|
|
1139
1475
|
space?: ResponsiveProp<Space>
|
|
1140
1476
|
}
|
|
1141
1477
|
|
|
1478
|
+
/** @public */
|
|
1479
|
+
export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
|
|
1480
|
+
InlineOwnProps,
|
|
1481
|
+
E
|
|
1482
|
+
>
|
|
1483
|
+
|
|
1142
1484
|
/**
|
|
1143
1485
|
* @internal
|
|
1144
1486
|
*/
|
|
@@ -1189,67 +1531,99 @@ export declare function _isScrollable(el: Node): boolean
|
|
|
1189
1531
|
*
|
|
1190
1532
|
* @public
|
|
1191
1533
|
*/
|
|
1192
|
-
export declare
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
RefAttributes<HTMLDivElement>
|
|
1196
|
-
>
|
|
1534
|
+
export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
|
|
1535
|
+
props: KBDProps<E>,
|
|
1536
|
+
): JSX.Element
|
|
1197
1537
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
*/
|
|
1201
|
-
export declare interface KBDProps extends BoxProps, RadiusStyleProps {
|
|
1202
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1203
|
-
padding?: ResponsiveProp<Space>
|
|
1538
|
+
export declare namespace KBD {
|
|
1539
|
+
var displayName: string
|
|
1204
1540
|
}
|
|
1205
1541
|
|
|
1542
|
+
/** @public */
|
|
1543
|
+
export declare type KBDElementType = 'kbd' | ComponentType
|
|
1544
|
+
|
|
1545
|
+
/** @public */
|
|
1546
|
+
export declare type KBDOwnProps = BoxOwnProps &
|
|
1547
|
+
RadiusStyleProps & {
|
|
1548
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/** @public */
|
|
1552
|
+
export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
|
|
1553
|
+
|
|
1206
1554
|
/**
|
|
1207
1555
|
* Typographic labels.
|
|
1208
1556
|
*
|
|
1209
1557
|
* @public
|
|
1210
1558
|
*/
|
|
1211
|
-
export declare
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
RefAttributes<HTMLDivElement>
|
|
1215
|
-
>
|
|
1559
|
+
export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
|
|
1560
|
+
props: LabelProps<E>,
|
|
1561
|
+
): JSX.Element
|
|
1216
1562
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
*/
|
|
1220
|
-
export declare interface LabelProps extends FontStyleProps, TextOverflowStyleProps {
|
|
1221
|
-
accent?: boolean
|
|
1222
|
-
htmlFor?: string
|
|
1223
|
-
muted?: boolean
|
|
1224
|
-
size?: ResponsiveProp<LabelSize>
|
|
1563
|
+
export declare namespace Label {
|
|
1564
|
+
var displayName: string
|
|
1225
1565
|
}
|
|
1226
1566
|
|
|
1227
|
-
/**
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1567
|
+
/** @public */
|
|
1568
|
+
export declare type LabelElementType =
|
|
1569
|
+
| 'div'
|
|
1570
|
+
| 'h1'
|
|
1571
|
+
| 'h2'
|
|
1572
|
+
| 'h3'
|
|
1573
|
+
| 'h4'
|
|
1574
|
+
| 'h5'
|
|
1575
|
+
| 'h6'
|
|
1576
|
+
| 'label'
|
|
1577
|
+
| 'li'
|
|
1578
|
+
| 'p'
|
|
1579
|
+
| 'span'
|
|
1580
|
+
| ComponentType
|
|
1581
|
+
|
|
1582
|
+
/** @public */
|
|
1583
|
+
export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
|
|
1584
|
+
|
|
1585
|
+
/** @public */
|
|
1586
|
+
export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
|
|
1587
|
+
LabelOwnProps,
|
|
1588
|
+
E
|
|
1235
1589
|
>
|
|
1236
1590
|
|
|
1237
1591
|
/**
|
|
1238
1592
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1239
1593
|
* @beta
|
|
1240
1594
|
*/
|
|
1241
|
-
export declare
|
|
1595
|
+
export declare function LabelSkeleton<
|
|
1596
|
+
E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
|
|
1597
|
+
>(props: LabelSkeletonProps<E>): JSX.Element
|
|
1598
|
+
|
|
1599
|
+
export declare namespace LabelSkeleton {
|
|
1600
|
+
var displayName: string
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/** @public */
|
|
1604
|
+
export declare type LabelSkeletonElementType = SkeletonElementType
|
|
1605
|
+
|
|
1606
|
+
/** @beta */
|
|
1607
|
+
export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
|
|
1242
1608
|
size?: ResponsiveProp<FontLabelSize>
|
|
1243
1609
|
}
|
|
1244
1610
|
|
|
1245
1611
|
/**
|
|
1246
|
-
*
|
|
1612
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1613
|
+
* @beta
|
|
1247
1614
|
*/
|
|
1248
|
-
export declare
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1615
|
+
export declare type LabelSkeletonProps<
|
|
1616
|
+
E extends LabelSkeletonElementType = LabelSkeletonElementType,
|
|
1617
|
+
> = Props<LabelSkeletonOwnProps, E>
|
|
1618
|
+
|
|
1619
|
+
/** @public */
|
|
1620
|
+
export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
|
|
1621
|
+
props: LayerProps<E>,
|
|
1622
|
+
): JSX.Element
|
|
1623
|
+
|
|
1624
|
+
export declare namespace Layer {
|
|
1625
|
+
var displayName: string
|
|
1626
|
+
}
|
|
1253
1627
|
|
|
1254
1628
|
/** @public */
|
|
1255
1629
|
export declare interface LayerContextValue {
|
|
@@ -1261,46 +1635,41 @@ export declare interface LayerContextValue {
|
|
|
1261
1635
|
zIndex: number
|
|
1262
1636
|
}
|
|
1263
1637
|
|
|
1264
|
-
/**
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1638
|
+
/** @public */
|
|
1639
|
+
export declare type LayerElementType = CardElementType
|
|
1640
|
+
|
|
1641
|
+
/** @public */
|
|
1642
|
+
export declare type LayerOwnProps = CardOwnProps & {
|
|
1268
1643
|
/** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
|
|
1269
1644
|
onActivate?: (props: {activeElement: HTMLElement | null}) => void
|
|
1270
1645
|
zOffset?: number | number[]
|
|
1271
1646
|
}
|
|
1272
1647
|
|
|
1273
|
-
/**
|
|
1274
|
-
|
|
1275
|
-
|
|
1648
|
+
/** @public */
|
|
1649
|
+
export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
|
|
1650
|
+
LayerOwnProps,
|
|
1651
|
+
E
|
|
1652
|
+
>
|
|
1653
|
+
|
|
1654
|
+
/** @public */
|
|
1276
1655
|
export declare function LayerProvider(props: LayerProviderProps): ReactElement
|
|
1277
1656
|
|
|
1278
1657
|
export declare namespace LayerProvider {
|
|
1279
1658
|
var displayName: string
|
|
1280
1659
|
}
|
|
1281
1660
|
|
|
1282
|
-
/**
|
|
1283
|
-
* @public
|
|
1284
|
-
*/
|
|
1661
|
+
/** @public */
|
|
1285
1662
|
export declare interface LayerProviderProps {
|
|
1286
1663
|
children?: ReactNode
|
|
1287
1664
|
zOffset?: number | number[]
|
|
1288
1665
|
}
|
|
1289
1666
|
|
|
1290
|
-
/**
|
|
1291
|
-
* DO NOT USE IN PRODUCTION.
|
|
1292
|
-
* @beta
|
|
1293
|
-
*/
|
|
1294
|
-
export declare interface MediaQueryProps {
|
|
1295
|
-
media?: number[]
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
1667
|
/**
|
|
1299
1668
|
* @internal
|
|
1300
1669
|
*/
|
|
1301
1670
|
export declare interface _MediaStore {
|
|
1302
1671
|
subscribe: (onStoreChange: () => void) => () => void
|
|
1303
|
-
getSnapshot: () =>
|
|
1672
|
+
getSnapshot: () => Breakpoint
|
|
1304
1673
|
}
|
|
1305
1674
|
|
|
1306
1675
|
/**
|
|
@@ -1308,25 +1677,27 @@ export declare interface _MediaStore {
|
|
|
1308
1677
|
*
|
|
1309
1678
|
* @public
|
|
1310
1679
|
*/
|
|
1311
|
-
export declare
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1680
|
+
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
1681
|
+
props: MenuProps<E>,
|
|
1682
|
+
): JSX.Element
|
|
1683
|
+
|
|
1684
|
+
export declare namespace Menu {
|
|
1685
|
+
var displayName: string
|
|
1686
|
+
}
|
|
1316
1687
|
|
|
1317
1688
|
/**
|
|
1318
1689
|
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1319
1690
|
*
|
|
1320
1691
|
* @public
|
|
1321
1692
|
*/
|
|
1322
|
-
export declare
|
|
1323
|
-
MenuButtonProps & RefAttributes<HTMLButtonElement | null>
|
|
1324
|
-
>
|
|
1693
|
+
export declare function MenuButton(props: MenuButtonProps): JSX.Element
|
|
1325
1694
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1695
|
+
export declare namespace MenuButton {
|
|
1696
|
+
var displayName: string
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/** @public */
|
|
1700
|
+
export declare type MenuButtonProps = {
|
|
1330
1701
|
/**
|
|
1331
1702
|
* @beta Do not use in production.
|
|
1332
1703
|
*/
|
|
@@ -1335,7 +1706,7 @@ export declare interface MenuButtonProps {
|
|
|
1335
1706
|
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1336
1707
|
*/
|
|
1337
1708
|
boundaryElement?: HTMLElement
|
|
1338
|
-
button: ReactElement<
|
|
1709
|
+
button: ReactElement<ButtonProps>
|
|
1339
1710
|
id: string
|
|
1340
1711
|
menu?: ReactElement
|
|
1341
1712
|
onClose?: () => void
|
|
@@ -1362,38 +1733,51 @@ export declare interface MenuButtonProps {
|
|
|
1362
1733
|
* @deprecated Use `popover={{preventOverflow: true}}` instead.
|
|
1363
1734
|
*/
|
|
1364
1735
|
preventOverflow?: boolean
|
|
1736
|
+
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
1365
1737
|
}
|
|
1366
1738
|
|
|
1367
|
-
/**
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1739
|
+
/** @public */
|
|
1740
|
+
export declare function MenuDivider<
|
|
1741
|
+
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1742
|
+
>(props: MenuDividerProps<E>): JSX.Element
|
|
1743
|
+
|
|
1744
|
+
export declare namespace MenuDivider {
|
|
1745
|
+
var displayName: string
|
|
1746
|
+
}
|
|
1375
1747
|
|
|
1376
1748
|
/** @public */
|
|
1377
|
-
export declare
|
|
1749
|
+
export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
|
|
1378
1750
|
|
|
1379
|
-
/**
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1751
|
+
/** @public */
|
|
1752
|
+
export declare type MenuDividerOwnProps = {}
|
|
1753
|
+
|
|
1754
|
+
/** @public */
|
|
1755
|
+
export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
|
|
1756
|
+
Props<MenuDividerOwnProps, E>
|
|
1757
|
+
|
|
1758
|
+
/** @public */
|
|
1759
|
+
export declare type MenuElementType = 'div' | 'span' | ComponentType
|
|
1760
|
+
|
|
1761
|
+
/** @public */
|
|
1762
|
+
export declare function MenuGroup<
|
|
1763
|
+
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
1764
|
+
>(props: MenuGroupProps<E>): JSX.Element
|
|
1383
1765
|
|
|
1384
1766
|
export declare namespace MenuGroup {
|
|
1385
1767
|
var displayName: string
|
|
1386
1768
|
}
|
|
1387
1769
|
|
|
1388
|
-
/**
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1770
|
+
/** @public */
|
|
1771
|
+
export declare type MenuGroupElementType = 'button' | ComponentType
|
|
1772
|
+
|
|
1773
|
+
/** @public */
|
|
1774
|
+
export declare type MenuGroupOwnProps = RadiusStyleProps & {
|
|
1392
1775
|
disabled?: boolean
|
|
1393
1776
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
1394
|
-
|
|
1777
|
+
gap?: ResponsiveProp<Space>
|
|
1778
|
+
icon?: ElementType_2 | ReactNode
|
|
1395
1779
|
menu?: Omit<
|
|
1396
|
-
MenuProps
|
|
1780
|
+
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1397
1781
|
| 'onClickOutside'
|
|
1398
1782
|
| 'onEscape'
|
|
1399
1783
|
| 'onItemClick'
|
|
@@ -1405,43 +1789,55 @@ export declare interface MenuGroupProps extends GapStyleProps {
|
|
|
1405
1789
|
>
|
|
1406
1790
|
padding?: ResponsiveProp<Space>
|
|
1407
1791
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1408
|
-
radius?: Radius | Radius[]
|
|
1409
1792
|
/** @deprecated Use `gap` instead. */
|
|
1410
1793
|
space?: ResponsiveProp<Space>
|
|
1411
|
-
text
|
|
1412
|
-
tone?:
|
|
1794
|
+
text?: ReactNode
|
|
1795
|
+
tone?: ThemeColorStateToneKey
|
|
1413
1796
|
}
|
|
1414
1797
|
|
|
1415
|
-
/**
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuItemProps> &
|
|
1420
|
-
MenuItemProps &
|
|
1421
|
-
RefAttributes<HTMLDivElement>
|
|
1798
|
+
/** @public */
|
|
1799
|
+
export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
|
|
1800
|
+
MenuGroupOwnProps,
|
|
1801
|
+
E
|
|
1422
1802
|
>
|
|
1423
1803
|
|
|
1424
|
-
/**
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
icon?: ElementType | ReactNode
|
|
1432
|
-
iconRight?: ElementType | ReactNode
|
|
1433
|
-
pressed?: boolean
|
|
1434
|
-
selected?: boolean
|
|
1435
|
-
/** @deprecated Use `gap` instead. */
|
|
1436
|
-
space?: ResponsiveProp<Space>
|
|
1437
|
-
text?: ReactNode
|
|
1438
|
-
tone?: SelectableTone
|
|
1804
|
+
/** @public */
|
|
1805
|
+
export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
|
|
1806
|
+
props: MenuItemProps<E>,
|
|
1807
|
+
): JSX.Element
|
|
1808
|
+
|
|
1809
|
+
export declare namespace MenuItem {
|
|
1810
|
+
var displayName: string
|
|
1439
1811
|
}
|
|
1440
1812
|
|
|
1441
|
-
/**
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1813
|
+
/** @public */
|
|
1814
|
+
export declare type MenuItemElementType = 'button' | 'a' | ComponentType
|
|
1815
|
+
|
|
1816
|
+
/** @public */
|
|
1817
|
+
export declare type MenuItemOwnProps = GapStyleProps &
|
|
1818
|
+
PaddingStyleProps &
|
|
1819
|
+
RadiusStyleProps & {
|
|
1820
|
+
disabled?: boolean
|
|
1821
|
+
fontSize?: number | number[]
|
|
1822
|
+
hotkeys?: string[]
|
|
1823
|
+
icon?: ElementType_2 | ReactNode
|
|
1824
|
+
iconRight?: ElementType_2 | ReactNode
|
|
1825
|
+
pressed?: boolean
|
|
1826
|
+
selected?: boolean
|
|
1827
|
+
/** @deprecated Use `gap` instead. */
|
|
1828
|
+
space?: ResponsiveProp<Space>
|
|
1829
|
+
text?: ReactNode
|
|
1830
|
+
tone?: ThemeColorStateToneKey
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
/** @public */
|
|
1834
|
+
export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
|
|
1835
|
+
Props<MenuItemOwnProps, E>,
|
|
1836
|
+
'role'
|
|
1837
|
+
>
|
|
1838
|
+
|
|
1839
|
+
/** @public */
|
|
1840
|
+
export declare type MenuOwnProps = PaddingStyleProps & {
|
|
1445
1841
|
/**
|
|
1446
1842
|
* @deprecated Use `shouldFocus="first"` instead.
|
|
1447
1843
|
*/
|
|
@@ -1450,6 +1846,7 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1450
1846
|
* @deprecated Use `shouldFocus="last"` instead.
|
|
1451
1847
|
*/
|
|
1452
1848
|
'focusLast'?: boolean
|
|
1849
|
+
'gap'?: ResponsiveProp<Space>
|
|
1453
1850
|
'onClickOutside'?: (event: MouseEvent) => void
|
|
1454
1851
|
'onEscape'?: () => void
|
|
1455
1852
|
'onItemClick'?: () => void
|
|
@@ -1462,6 +1859,9 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
|
|
|
1462
1859
|
'aria-labelledby'?: string
|
|
1463
1860
|
}
|
|
1464
1861
|
|
|
1862
|
+
/** @public */
|
|
1863
|
+
export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
|
|
1864
|
+
|
|
1465
1865
|
/**
|
|
1466
1866
|
* @public
|
|
1467
1867
|
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
@@ -1495,20 +1895,21 @@ export declare type Placement =
|
|
|
1495
1895
|
| 'left-start'
|
|
1496
1896
|
| 'left-end'
|
|
1497
1897
|
|
|
1498
|
-
export declare interface PolymorphicProps {
|
|
1499
|
-
as?: ElementType
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
1898
|
/**
|
|
1503
1899
|
* The `Popover` component is used to display some content on top of another.
|
|
1504
1900
|
*
|
|
1505
1901
|
* @public
|
|
1506
1902
|
*/
|
|
1507
|
-
export declare
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1903
|
+
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
1904
|
+
props: PopoverProps<E>,
|
|
1905
|
+
): JSX.Element
|
|
1906
|
+
|
|
1907
|
+
export declare namespace Popover {
|
|
1908
|
+
var displayName: string
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/** @public */
|
|
1912
|
+
export declare type PopoverElementType = 'div' | ComponentType
|
|
1512
1913
|
|
|
1513
1914
|
/**
|
|
1514
1915
|
* @beta
|
|
@@ -1516,7 +1917,7 @@ export declare const Popover: NamedExoticComponent<
|
|
|
1516
1917
|
export declare type PopoverMargins = [number, number, number, number]
|
|
1517
1918
|
|
|
1518
1919
|
/** @public */
|
|
1519
|
-
export declare
|
|
1920
|
+
export declare type PopoverOwnProps = LayerOwnProps & {
|
|
1520
1921
|
/** @beta */
|
|
1521
1922
|
__unstable_margins?: PopoverMargins
|
|
1522
1923
|
/**
|
|
@@ -1533,16 +1934,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1533
1934
|
ref: ForwardedRef<HTMLElement>
|
|
1534
1935
|
}>
|
|
1535
1936
|
/**
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1937
|
+
* When `true`, prevent overflow within the current boundary:
|
|
1938
|
+
* - by flipping on its side axis
|
|
1939
|
+
* - by resizing
|
|
1940
|
+
*
|
|
1941
|
+
* Note that:
|
|
1942
|
+
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1943
|
+
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1944
|
+
*
|
|
1945
|
+
* @defaultValue false
|
|
1946
|
+
*/
|
|
1546
1947
|
constrainSize?: boolean
|
|
1547
1948
|
content?: ReactNode
|
|
1548
1949
|
disabled?: boolean
|
|
@@ -1576,29 +1977,29 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1576
1977
|
*/
|
|
1577
1978
|
referenceElement?: HTMLElement | null
|
|
1578
1979
|
/** @beta */
|
|
1579
|
-
updateRef?:
|
|
1580
|
-
| MutableRefObject<PopoverUpdateCallback | undefined>
|
|
1581
|
-
| RefCallback<PopoverUpdateCallback | undefined>
|
|
1980
|
+
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1582
1981
|
}
|
|
1583
1982
|
|
|
1983
|
+
/** @public */
|
|
1984
|
+
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1985
|
+
PopoverOwnProps,
|
|
1986
|
+
E
|
|
1987
|
+
>
|
|
1988
|
+
|
|
1584
1989
|
/** @beta */
|
|
1585
1990
|
export declare type PopoverUpdateCallback = () => void
|
|
1586
1991
|
|
|
1587
1992
|
/** @public */
|
|
1588
|
-
export declare type PopoverWidth =
|
|
1993
|
+
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
1589
1994
|
|
|
1590
|
-
/**
|
|
1591
|
-
* @public
|
|
1592
|
-
*/
|
|
1995
|
+
/** @public */
|
|
1593
1996
|
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
1594
1997
|
|
|
1595
1998
|
export declare namespace Portal {
|
|
1596
1999
|
var displayName: string
|
|
1597
2000
|
}
|
|
1598
2001
|
|
|
1599
|
-
/**
|
|
1600
|
-
* @public
|
|
1601
|
-
*/
|
|
2002
|
+
/** @public */
|
|
1602
2003
|
export declare interface PortalContextValue {
|
|
1603
2004
|
version: 0.0
|
|
1604
2005
|
boundaryElement: HTMLElement | null
|
|
@@ -1606,9 +2007,7 @@ export declare interface PortalContextValue {
|
|
|
1606
2007
|
elements?: Record<string, HTMLElement | null | undefined>
|
|
1607
2008
|
}
|
|
1608
2009
|
|
|
1609
|
-
/**
|
|
1610
|
-
* @public
|
|
1611
|
-
*/
|
|
2010
|
+
/** @public */
|
|
1612
2011
|
export declare interface PortalProps {
|
|
1613
2012
|
children: ReactNode
|
|
1614
2013
|
/**
|
|
@@ -1617,18 +2016,14 @@ export declare interface PortalProps {
|
|
|
1617
2016
|
__unstable_name?: string
|
|
1618
2017
|
}
|
|
1619
2018
|
|
|
1620
|
-
/**
|
|
1621
|
-
* @public
|
|
1622
|
-
*/
|
|
2019
|
+
/** @public */
|
|
1623
2020
|
export declare function PortalProvider(props: PortalProviderProps): ReactElement
|
|
1624
2021
|
|
|
1625
2022
|
export declare namespace PortalProvider {
|
|
1626
2023
|
var displayName: string
|
|
1627
2024
|
}
|
|
1628
2025
|
|
|
1629
|
-
/**
|
|
1630
|
-
* @public
|
|
1631
|
-
*/
|
|
2026
|
+
/** @public */
|
|
1632
2027
|
export declare interface PortalProviderProps {
|
|
1633
2028
|
/**
|
|
1634
2029
|
* @deprecated Use `<BoundaryElementProvider element={...} />` instead
|
|
@@ -1643,9 +2038,11 @@ export declare interface PortalProviderProps {
|
|
|
1643
2038
|
}
|
|
1644
2039
|
|
|
1645
2040
|
/** @public */
|
|
1646
|
-
export declare type Props<P extends
|
|
1647
|
-
|
|
1648
|
-
P
|
|
2041
|
+
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
2042
|
+
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
2043
|
+
P & {
|
|
2044
|
+
as?: E
|
|
2045
|
+
}
|
|
1649
2046
|
>
|
|
1650
2047
|
|
|
1651
2048
|
export {px}
|
|
@@ -1655,19 +2052,28 @@ export {px}
|
|
|
1655
2052
|
*
|
|
1656
2053
|
* @public
|
|
1657
2054
|
*/
|
|
1658
|
-
export declare
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
RefAttributes<HTMLInputElement>
|
|
1662
|
-
>
|
|
2055
|
+
export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
|
|
2056
|
+
props: RadioProps<E>,
|
|
2057
|
+
): JSX.Element
|
|
1663
2058
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
2059
|
+
export declare namespace Radio {
|
|
2060
|
+
var displayName: string
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/** @public */
|
|
2064
|
+
export declare type RadioElementType = 'input' | ComponentType
|
|
2065
|
+
|
|
2066
|
+
/** @public */
|
|
2067
|
+
export declare type RadioOwnProps = {
|
|
1668
2068
|
customValidity?: string
|
|
1669
2069
|
}
|
|
1670
2070
|
|
|
2071
|
+
/** @public */
|
|
2072
|
+
export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
|
|
2073
|
+
RadioOwnProps,
|
|
2074
|
+
E
|
|
2075
|
+
>
|
|
2076
|
+
|
|
1671
2077
|
export {Radius}
|
|
1672
2078
|
|
|
1673
2079
|
/**
|
|
@@ -1699,6 +2105,7 @@ export declare function _responsive<T>(
|
|
|
1699
2105
|
|
|
1700
2106
|
/**
|
|
1701
2107
|
* @internal
|
|
2108
|
+
* @deprecated This will be removed in next major version.
|
|
1702
2109
|
*/
|
|
1703
2110
|
export declare interface ResponsiveAvatarSizeStyleProps {
|
|
1704
2111
|
$size: AvatarSize[]
|
|
@@ -1876,11 +2283,16 @@ export {screen_2 as screen}
|
|
|
1876
2283
|
*
|
|
1877
2284
|
* @public
|
|
1878
2285
|
*/
|
|
1879
|
-
export declare
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2286
|
+
export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
|
|
2287
|
+
props: SelectProps<E>,
|
|
2288
|
+
): JSX.Element
|
|
2289
|
+
|
|
2290
|
+
export declare namespace Select {
|
|
2291
|
+
var displayName: string
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
/** @internal */
|
|
2295
|
+
declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1884
2296
|
|
|
1885
2297
|
/**
|
|
1886
2298
|
* @public
|
|
@@ -1888,95 +2300,133 @@ export declare const Select: ForwardRefExoticComponent<
|
|
|
1888
2300
|
*/
|
|
1889
2301
|
export declare type SelectableTone = ThemeColorStateToneKey
|
|
1890
2302
|
|
|
1891
|
-
/**
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
2303
|
+
/** @public */
|
|
2304
|
+
export declare type SelectElementType = 'select' | ComponentType
|
|
2305
|
+
|
|
2306
|
+
/** @public */
|
|
2307
|
+
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1895
2308
|
customValidity?: string
|
|
1896
2309
|
readOnly?: boolean
|
|
1897
2310
|
/** @deprecated Use `gap` instead. */
|
|
1898
2311
|
space?: ResponsiveProp<Space>
|
|
1899
2312
|
}
|
|
1900
2313
|
|
|
2314
|
+
/** @public */
|
|
2315
|
+
export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
|
|
2316
|
+
SelectOwnProps,
|
|
2317
|
+
E
|
|
2318
|
+
>
|
|
2319
|
+
|
|
1901
2320
|
/**
|
|
1902
2321
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1903
2322
|
* @beta
|
|
1904
2323
|
*/
|
|
1905
|
-
export declare
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
2324
|
+
export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
|
|
2325
|
+
props: SkeletonProps<E>,
|
|
2326
|
+
): JSX.Element
|
|
2327
|
+
|
|
2328
|
+
export declare namespace Skeleton {
|
|
2329
|
+
var displayName: string
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
/** @beta */
|
|
2333
|
+
export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
1910
2334
|
|
|
1911
2335
|
/**
|
|
1912
2336
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1913
2337
|
* @beta
|
|
1914
2338
|
*/
|
|
1915
|
-
export declare
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
2339
|
+
export declare type SkeletonOwnProps = BoxOwnProps &
|
|
2340
|
+
SkeletonStyleProps & {
|
|
2341
|
+
animated?: boolean
|
|
2342
|
+
delay?: number
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
/** @beta */
|
|
2346
|
+
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
2347
|
+
SkeletonOwnProps,
|
|
2348
|
+
E
|
|
2349
|
+
>
|
|
1919
2350
|
|
|
1920
2351
|
/**
|
|
1921
2352
|
* Indicate that something is loading for an indeterminate amount of time.
|
|
1922
2353
|
*
|
|
1923
2354
|
* @public
|
|
1924
2355
|
*/
|
|
1925
|
-
export declare
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
RefAttributes<HTMLDivElement>
|
|
1929
|
-
>
|
|
2356
|
+
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
2357
|
+
props: SpinnerProps<E>,
|
|
2358
|
+
): JSX.Element
|
|
1930
2359
|
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2360
|
+
export declare namespace Spinner {
|
|
2361
|
+
var displayName: string
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
/** @public */
|
|
2365
|
+
export declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
2366
|
+
|
|
2367
|
+
/** @public */
|
|
2368
|
+
export declare type SpinnerOwnProps = {
|
|
1935
2369
|
muted?: boolean
|
|
1936
2370
|
size?: ResponsiveProp<FontTextSize>
|
|
1937
2371
|
}
|
|
1938
2372
|
|
|
1939
|
-
/**
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'children'> &
|
|
1944
|
-
SrOnlyProps &
|
|
1945
|
-
RefAttributes<HTMLDivElement>
|
|
2373
|
+
/** @public */
|
|
2374
|
+
export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
|
|
2375
|
+
SpinnerOwnProps,
|
|
2376
|
+
E
|
|
1946
2377
|
>
|
|
1947
2378
|
|
|
1948
|
-
/**
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
2379
|
+
/** @public */
|
|
2380
|
+
export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
|
|
2381
|
+
props: SrOnlyProps<E>,
|
|
2382
|
+
): JSX.Element
|
|
2383
|
+
|
|
2384
|
+
export declare namespace SrOnly {
|
|
2385
|
+
var displayName: string
|
|
1953
2386
|
}
|
|
1954
2387
|
|
|
2388
|
+
/** @public */
|
|
2389
|
+
export declare type SrOnlyElementType = 'span' | ComponentType
|
|
2390
|
+
|
|
2391
|
+
/** @public */
|
|
2392
|
+
export declare type SrOnlyOwnProps = {}
|
|
2393
|
+
|
|
2394
|
+
/** @public */
|
|
2395
|
+
export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
|
|
2396
|
+
SrOnlyOwnProps,
|
|
2397
|
+
E
|
|
2398
|
+
>
|
|
2399
|
+
|
|
1955
2400
|
/**
|
|
1956
2401
|
* The `Stack` component is used to place elements on top of each other.
|
|
1957
2402
|
*
|
|
1958
2403
|
* @public
|
|
1959
2404
|
*/
|
|
1960
|
-
export declare
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
RefAttributes<HTMLDivElement>
|
|
1964
|
-
>
|
|
2405
|
+
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
2406
|
+
props: StackProps<E>,
|
|
2407
|
+
): JSX.Element
|
|
1965
2408
|
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
2409
|
+
export declare namespace Stack {
|
|
2410
|
+
var displayName: string
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/** @public */
|
|
2414
|
+
export declare type StackElementType = BoxElementType
|
|
2415
|
+
|
|
2416
|
+
/** @public */
|
|
2417
|
+
export declare type StackOwnProps = Omit<
|
|
2418
|
+
BoxOwnProps,
|
|
2419
|
+
'align' | 'columns' | 'direction' | 'display' | 'gapX' | 'gapY' | 'justify'
|
|
2420
|
+
> & {
|
|
1971
2421
|
/** @deprecated Use `gap` instead. */
|
|
1972
2422
|
space?: ResponsiveProp<Space>
|
|
1973
2423
|
}
|
|
1974
2424
|
|
|
1975
|
-
/**
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2425
|
+
/** @public */
|
|
2426
|
+
export declare type StackProps<E extends StackElementType = StackElementType> = Props<
|
|
2427
|
+
StackOwnProps,
|
|
2428
|
+
E
|
|
2429
|
+
>
|
|
1980
2430
|
|
|
1981
2431
|
/**
|
|
1982
2432
|
* @public
|
|
@@ -1984,7 +2434,12 @@ export declare const studioTheme: RootTheme_2
|
|
|
1984
2434
|
*/
|
|
1985
2435
|
export declare type Styles = ThemeStyles
|
|
1986
2436
|
|
|
1987
|
-
|
|
2437
|
+
/** @beta */
|
|
2438
|
+
export declare function StyleTags(): ReactNode
|
|
2439
|
+
|
|
2440
|
+
export declare namespace StyleTags {
|
|
2441
|
+
var displayName: string
|
|
2442
|
+
}
|
|
1988
2443
|
|
|
1989
2444
|
/**
|
|
1990
2445
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
@@ -1993,101 +2448,133 @@ export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
|
|
|
1993
2448
|
*
|
|
1994
2449
|
* @public
|
|
1995
2450
|
*/
|
|
1996
|
-
export declare
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
RefAttributes<HTMLInputElement>
|
|
2000
|
-
>
|
|
2451
|
+
export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
|
|
2452
|
+
props: SwitchProps<E>,
|
|
2453
|
+
): JSX.Element
|
|
2001
2454
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2455
|
+
export declare namespace Switch {
|
|
2456
|
+
var displayName: string
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
/** @public */
|
|
2460
|
+
export declare type SwitchElementType = 'input' | ComponentType
|
|
2461
|
+
|
|
2462
|
+
/** @public */
|
|
2463
|
+
export declare type SwitchOwnProps = {
|
|
2006
2464
|
indeterminate?: boolean
|
|
2007
2465
|
}
|
|
2008
2466
|
|
|
2009
|
-
/**
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof TabProps> &
|
|
2014
|
-
TabProps &
|
|
2015
|
-
RefAttributes<HTMLButtonElement>
|
|
2467
|
+
/** @public */
|
|
2468
|
+
export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
|
|
2469
|
+
SwitchOwnProps,
|
|
2470
|
+
E
|
|
2016
2471
|
>
|
|
2017
2472
|
|
|
2018
|
-
/**
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabListProps> &
|
|
2023
|
-
TabListProps &
|
|
2024
|
-
RefAttributes<HTMLDivElement>
|
|
2025
|
-
>
|
|
2473
|
+
/** @public */
|
|
2474
|
+
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
2475
|
+
props: TabProps<E>,
|
|
2476
|
+
): JSX.Element
|
|
2026
2477
|
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2478
|
+
export declare namespace Tab {
|
|
2479
|
+
var displayName: string
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
/** @public */
|
|
2483
|
+
export declare type TabElementType = 'button' | ComponentType
|
|
2484
|
+
|
|
2485
|
+
/** @public */
|
|
2486
|
+
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
2487
|
+
props: TabListProps<E>,
|
|
2488
|
+
): JSX.Element
|
|
2489
|
+
|
|
2490
|
+
export declare namespace TabList {
|
|
2491
|
+
var displayName: string
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
/** @public */
|
|
2030
2495
|
export declare type TabListChild =
|
|
2031
2496
|
| ReactElement<Props<TabProps, 'button'>>
|
|
2032
2497
|
| null
|
|
2033
2498
|
| undefined
|
|
2034
2499
|
| false
|
|
2035
2500
|
|
|
2036
|
-
/**
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2501
|
+
/** @public */
|
|
2502
|
+
export declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
2503
|
+
|
|
2504
|
+
/** @public */
|
|
2505
|
+
export declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
|
|
2040
2506
|
children: TabListChild[]
|
|
2507
|
+
/** @deprecated Use `gap` instead */
|
|
2508
|
+
space?: ResponsiveProp<Space>
|
|
2041
2509
|
}
|
|
2042
2510
|
|
|
2043
|
-
/**
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabPanelProps> &
|
|
2048
|
-
TabPanelProps &
|
|
2049
|
-
RefAttributes<HTMLDivElement>
|
|
2511
|
+
/** @public */
|
|
2512
|
+
export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
|
|
2513
|
+
TabListOwnProps,
|
|
2514
|
+
E
|
|
2050
2515
|
>
|
|
2051
2516
|
|
|
2052
|
-
/**
|
|
2053
|
-
|
|
2054
|
-
*/
|
|
2055
|
-
export declare interface TabPanelProps extends BoxProps {
|
|
2517
|
+
/** @public */
|
|
2518
|
+
export declare type TabOwnProps = {
|
|
2056
2519
|
/**
|
|
2057
|
-
* The `id` of the
|
|
2520
|
+
* The `id` of the corresponding `TabPanel` component.
|
|
2058
2521
|
*/
|
|
2059
|
-
'aria-
|
|
2522
|
+
'aria-controls': string
|
|
2060
2523
|
'id': string
|
|
2524
|
+
'icon'?: ElementType_2 | ReactNode
|
|
2525
|
+
'focused'?: boolean
|
|
2526
|
+
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
2527
|
+
'label'?: ReactNode
|
|
2528
|
+
'padding'?: ResponsiveProp<Space>
|
|
2529
|
+
'selected'?: boolean
|
|
2530
|
+
'tone'?: ThemeColorStateToneKey
|
|
2061
2531
|
}
|
|
2062
2532
|
|
|
2063
|
-
/**
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2533
|
+
/** @public */
|
|
2534
|
+
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
2535
|
+
props: TabPanelProps<E>,
|
|
2536
|
+
): JSX.Element
|
|
2537
|
+
|
|
2538
|
+
export declare namespace TabPanel {
|
|
2539
|
+
var displayName: string
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
/** @public */
|
|
2543
|
+
export declare type TabPanelElementType = 'div' | 'span' | ComponentType
|
|
2544
|
+
|
|
2545
|
+
/** @public */
|
|
2546
|
+
export declare type TabPanelOwnProps = BoxOwnProps & {
|
|
2067
2547
|
/**
|
|
2068
|
-
* The `id` of the
|
|
2548
|
+
* The `id` of the correlating `Tab` component.
|
|
2069
2549
|
*/
|
|
2070
|
-
'aria-
|
|
2550
|
+
'aria-labelledby': string
|
|
2071
2551
|
'id': string
|
|
2072
|
-
'icon'?: ElementType | ReactNode
|
|
2073
|
-
'focused'?: boolean
|
|
2074
|
-
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
2075
|
-
'label'?: ReactNode
|
|
2076
|
-
'padding'?: ResponsiveProp<Space>
|
|
2077
|
-
'selected'?: boolean
|
|
2078
|
-
'tone'?: ButtonTone
|
|
2079
2552
|
}
|
|
2080
2553
|
|
|
2554
|
+
/** @public */
|
|
2555
|
+
export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
|
|
2556
|
+
TabPanelOwnProps,
|
|
2557
|
+
E
|
|
2558
|
+
>
|
|
2559
|
+
|
|
2560
|
+
/** @public */
|
|
2561
|
+
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
2562
|
+
|
|
2563
|
+
/** @public */
|
|
2564
|
+
export declare type TagType = keyof JSX.IntrinsicElements
|
|
2565
|
+
|
|
2081
2566
|
/**
|
|
2082
2567
|
* The `Text` component is an agile, themed typographic element.
|
|
2083
2568
|
*
|
|
2084
2569
|
* @public
|
|
2085
2570
|
*/
|
|
2086
|
-
declare
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2571
|
+
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
2572
|
+
props: TextProps<E>,
|
|
2573
|
+
): JSX.Element
|
|
2574
|
+
|
|
2575
|
+
declare namespace Text_2 {
|
|
2576
|
+
var displayName: string
|
|
2577
|
+
}
|
|
2091
2578
|
export {Text_2 as Text}
|
|
2092
2579
|
|
|
2093
2580
|
export {TextAlign}
|
|
@@ -2097,16 +2584,19 @@ export {TextAlign}
|
|
|
2097
2584
|
*
|
|
2098
2585
|
* @public
|
|
2099
2586
|
*/
|
|
2100
|
-
export declare
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
RefAttributes<HTMLTextAreaElement>
|
|
2104
|
-
>
|
|
2587
|
+
export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
|
|
2588
|
+
props: TextAreaProps<E>,
|
|
2589
|
+
): JSX.Element
|
|
2105
2590
|
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2591
|
+
export declare namespace TextArea {
|
|
2592
|
+
var displayName: string
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
/** @public */
|
|
2596
|
+
export declare type TextAreaElementType = 'textarea' | ComponentType
|
|
2597
|
+
|
|
2598
|
+
/** @public */
|
|
2599
|
+
export declare type TextAreaOwnProps = TextAreaStyleProps & {
|
|
2110
2600
|
/**
|
|
2111
2601
|
* @beta
|
|
2112
2602
|
*/
|
|
@@ -2114,32 +2604,53 @@ export declare interface TextAreaProps extends TextAreaStyleProps {
|
|
|
2114
2604
|
customValidity?: string
|
|
2115
2605
|
/** @deprecated Use `gap` instead. */
|
|
2116
2606
|
space?: ResponsiveProp<Space>
|
|
2117
|
-
weight?: ThemeFontWeightKey_2
|
|
2118
2607
|
}
|
|
2119
2608
|
|
|
2609
|
+
/** @public */
|
|
2610
|
+
export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
|
|
2611
|
+
TextAreaOwnProps,
|
|
2612
|
+
E
|
|
2613
|
+
>
|
|
2614
|
+
|
|
2615
|
+
/** @public */
|
|
2616
|
+
export declare type TextElementType =
|
|
2617
|
+
| 'div'
|
|
2618
|
+
| 'h1'
|
|
2619
|
+
| 'h2'
|
|
2620
|
+
| 'h3'
|
|
2621
|
+
| 'h4'
|
|
2622
|
+
| 'h5'
|
|
2623
|
+
| 'h6'
|
|
2624
|
+
| 'label'
|
|
2625
|
+
| 'li'
|
|
2626
|
+
| 'p'
|
|
2627
|
+
| 'span'
|
|
2628
|
+
| ComponentType
|
|
2629
|
+
|
|
2120
2630
|
/**
|
|
2121
2631
|
* Single line text input.
|
|
2122
2632
|
*
|
|
2123
2633
|
* @public
|
|
2124
2634
|
*/
|
|
2125
|
-
export declare
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
RefAttributes<HTMLInputElement>
|
|
2129
|
-
>
|
|
2635
|
+
export declare function TextInput<
|
|
2636
|
+
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
2637
|
+
>(props: TextInputProps<E>): JSX.Element
|
|
2130
2638
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2639
|
+
export declare namespace TextInput {
|
|
2640
|
+
var displayName: string
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
/** @public */
|
|
2134
2644
|
export declare type TextInputClearButtonProps = Omit<
|
|
2135
|
-
|
|
2645
|
+
ButtonProps<'button'>,
|
|
2136
2646
|
'as' | 'onClick' | 'onMouseDown'
|
|
2137
2647
|
>
|
|
2138
2648
|
|
|
2139
|
-
/**
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2649
|
+
/** @public */
|
|
2650
|
+
export declare type TextInputElementType = 'input' | ComponentType
|
|
2651
|
+
|
|
2652
|
+
/** @public */
|
|
2653
|
+
export declare type TextInputOwnProps = InputStyleProps & {
|
|
2143
2654
|
/**
|
|
2144
2655
|
* @beta
|
|
2145
2656
|
*/
|
|
@@ -2149,8 +2660,8 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2149
2660
|
*/
|
|
2150
2661
|
clearButton?: boolean | TextInputClearButtonProps
|
|
2151
2662
|
customValidity?: string
|
|
2152
|
-
icon?:
|
|
2153
|
-
iconRight?:
|
|
2663
|
+
icon?: ElementType_2 | ReactNode
|
|
2664
|
+
iconRight?: ElementType_2 | ReactNode
|
|
2154
2665
|
/**
|
|
2155
2666
|
* @beta
|
|
2156
2667
|
*/
|
|
@@ -2159,52 +2670,47 @@ export declare interface TextInputProps extends InputStyleProps {
|
|
|
2159
2670
|
/** @deprecated Use `gap` instead. */
|
|
2160
2671
|
space?: ResponsiveProp<Space>
|
|
2161
2672
|
suffix?: ReactNode
|
|
2162
|
-
type?: TextInputType
|
|
2163
2673
|
weight?: ThemeFontWeightKey_2
|
|
2164
2674
|
}
|
|
2165
2675
|
|
|
2166
|
-
/**
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
| 'date'
|
|
2172
|
-
| 'datetime-local'
|
|
2173
|
-
| 'email'
|
|
2174
|
-
| 'url'
|
|
2175
|
-
| 'month'
|
|
2176
|
-
| 'number'
|
|
2177
|
-
| 'password'
|
|
2178
|
-
| 'tel'
|
|
2179
|
-
| 'time'
|
|
2180
|
-
| 'text'
|
|
2181
|
-
| 'week'
|
|
2182
|
-
| 'color'
|
|
2676
|
+
/** @public */
|
|
2677
|
+
export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
|
|
2678
|
+
TextInputOwnProps,
|
|
2679
|
+
E
|
|
2680
|
+
>
|
|
2183
2681
|
|
|
2184
|
-
/**
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
}
|
|
2682
|
+
/** @public */
|
|
2683
|
+
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2684
|
+
|
|
2685
|
+
/** @public */
|
|
2686
|
+
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2190
2687
|
|
|
2191
2688
|
/**
|
|
2192
2689
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2193
2690
|
* @beta
|
|
2194
2691
|
*/
|
|
2195
|
-
export declare
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2692
|
+
export declare function TextSkeleton<
|
|
2693
|
+
E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
|
|
2694
|
+
>(props: TextSkeletonProps<E>): JSX.Element
|
|
2695
|
+
|
|
2696
|
+
export declare namespace TextSkeleton {
|
|
2697
|
+
var displayName: string
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
/** @public */
|
|
2701
|
+
export declare type TextSkeletonElementType = SkeletonElementType
|
|
2702
|
+
|
|
2703
|
+
/** @beta */
|
|
2704
|
+
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2705
|
+
size?: ResponsiveProp<FontTextSize>
|
|
2706
|
+
}
|
|
2200
2707
|
|
|
2201
2708
|
/**
|
|
2202
2709
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2203
2710
|
* @beta
|
|
2204
2711
|
*/
|
|
2205
|
-
export declare
|
|
2206
|
-
|
|
2207
|
-
}
|
|
2712
|
+
export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
|
|
2713
|
+
Props<TextSkeletonOwnProps, E>
|
|
2208
2714
|
|
|
2209
2715
|
/**
|
|
2210
2716
|
* @public
|
|
@@ -2252,18 +2758,14 @@ export {ThemeColorMutedTone}
|
|
|
2252
2758
|
|
|
2253
2759
|
export {ThemeColorName}
|
|
2254
2760
|
|
|
2255
|
-
/**
|
|
2256
|
-
* @public
|
|
2257
|
-
*/
|
|
2761
|
+
/** @public */
|
|
2258
2762
|
export declare function ThemeColorProvider(props: ThemeColorProviderProps): ReactElement
|
|
2259
2763
|
|
|
2260
2764
|
export declare namespace ThemeColorProvider {
|
|
2261
2765
|
var displayName: string
|
|
2262
2766
|
}
|
|
2263
2767
|
|
|
2264
|
-
/**
|
|
2265
|
-
* @public
|
|
2266
|
-
*/
|
|
2768
|
+
/** @public */
|
|
2267
2769
|
export declare interface ThemeColorProviderProps {
|
|
2268
2770
|
children?: ReactNode
|
|
2269
2771
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2302,9 +2804,7 @@ export declare type ThemeColorSyntax = ThemeColorSyntax_2
|
|
|
2302
2804
|
|
|
2303
2805
|
export {ThemeColorToneKey}
|
|
2304
2806
|
|
|
2305
|
-
/**
|
|
2306
|
-
* @public
|
|
2307
|
-
*/
|
|
2807
|
+
/** @public */
|
|
2308
2808
|
export declare interface ThemeContextValue {
|
|
2309
2809
|
/** @deprecated No longer used */
|
|
2310
2810
|
version: 0.0
|
|
@@ -2357,18 +2857,14 @@ export {ThemeInput}
|
|
|
2357
2857
|
*/
|
|
2358
2858
|
export declare type ThemeLayer = ThemeLayer_2
|
|
2359
2859
|
|
|
2360
|
-
/**
|
|
2361
|
-
* @public
|
|
2362
|
-
*/
|
|
2860
|
+
/** @public */
|
|
2363
2861
|
export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
|
|
2364
2862
|
|
|
2365
2863
|
export declare namespace ThemeProvider {
|
|
2366
2864
|
var displayName: string
|
|
2367
2865
|
}
|
|
2368
2866
|
|
|
2369
|
-
/**
|
|
2370
|
-
* @public
|
|
2371
|
-
*/
|
|
2867
|
+
/** @public */
|
|
2372
2868
|
export declare interface ThemeProviderProps {
|
|
2373
2869
|
children?: ReactNode
|
|
2374
2870
|
scheme?: ThemeColorSchemeKey_2
|
|
@@ -2389,20 +2885,15 @@ export declare type ThemeShadow = ThemeShadow_2
|
|
|
2389
2885
|
*
|
|
2390
2886
|
* @public
|
|
2391
2887
|
*/
|
|
2392
|
-
export declare function Toast(
|
|
2393
|
-
props:
|
|
2394
|
-
|
|
2395
|
-
'onDrag' | 'onDragEnd' | 'onDragStart' | 'onAnimationStart'
|
|
2396
|
-
>,
|
|
2397
|
-
): ReactElement
|
|
2888
|
+
export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
|
|
2889
|
+
props: ToastProps<E>,
|
|
2890
|
+
): JSX.Element
|
|
2398
2891
|
|
|
2399
2892
|
export declare namespace Toast {
|
|
2400
2893
|
var displayName: string
|
|
2401
2894
|
}
|
|
2402
2895
|
|
|
2403
|
-
/**
|
|
2404
|
-
* @public
|
|
2405
|
-
*/
|
|
2896
|
+
/** @public */
|
|
2406
2897
|
export declare interface ToastContextValue {
|
|
2407
2898
|
version: 0.0
|
|
2408
2899
|
/**
|
|
@@ -2414,51 +2905,57 @@ export declare interface ToastContextValue {
|
|
|
2414
2905
|
push: (params: ToastParams) => string
|
|
2415
2906
|
}
|
|
2416
2907
|
|
|
2417
|
-
/**
|
|
2418
|
-
|
|
2419
|
-
*/
|
|
2420
|
-
declare interface ToastLayerProps extends GapStyleProps, PaddingStyleProps {
|
|
2421
|
-
children: ReactNode
|
|
2422
|
-
}
|
|
2908
|
+
/** @public */
|
|
2909
|
+
export declare type ToastElementType = 'li' | ComponentType
|
|
2423
2910
|
|
|
2424
|
-
/**
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2911
|
+
/** @internal */
|
|
2912
|
+
declare type ToastLayerElementType = 'ul' | ComponentType
|
|
2913
|
+
|
|
2914
|
+
/** @internal */
|
|
2915
|
+
declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
|
|
2916
|
+
|
|
2917
|
+
/** @internal */
|
|
2918
|
+
declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
|
|
2919
|
+
ToastLayerOwnProps,
|
|
2920
|
+
E
|
|
2921
|
+
>
|
|
2922
|
+
|
|
2923
|
+
/** @public */
|
|
2924
|
+
export declare type ToastOwnProps = RadiusStyleProps & {
|
|
2428
2925
|
closable?: boolean
|
|
2429
2926
|
description?: ReactNode
|
|
2430
|
-
duration?: number
|
|
2431
|
-
id?: string
|
|
2432
2927
|
onClose?: () => void
|
|
2433
2928
|
title?: ReactNode
|
|
2434
2929
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2930
|
+
duration?: number
|
|
2931
|
+
updatedAt?: number
|
|
2435
2932
|
}
|
|
2436
2933
|
|
|
2437
|
-
/**
|
|
2438
|
-
|
|
2439
|
-
*/
|
|
2440
|
-
export declare interface ToastProps extends RadiusStyleProps {
|
|
2934
|
+
/** @public */
|
|
2935
|
+
export declare interface ToastParams {
|
|
2441
2936
|
closable?: boolean
|
|
2442
2937
|
description?: ReactNode
|
|
2938
|
+
duration?: number
|
|
2939
|
+
id?: string
|
|
2443
2940
|
onClose?: () => void
|
|
2444
2941
|
title?: ReactNode
|
|
2445
2942
|
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2446
|
-
duration?: number
|
|
2447
|
-
updatedAt?: number
|
|
2448
2943
|
}
|
|
2449
2944
|
|
|
2450
|
-
/**
|
|
2451
|
-
|
|
2452
|
-
|
|
2945
|
+
/** @public */
|
|
2946
|
+
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2947
|
+
ToastOwnProps,
|
|
2948
|
+
E
|
|
2949
|
+
>
|
|
2950
|
+
|
|
2951
|
+
/** @public */
|
|
2453
2952
|
export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
|
|
2454
2953
|
|
|
2455
2954
|
export declare namespace ToastProvider {
|
|
2456
2955
|
var displayName: string
|
|
2457
2956
|
}
|
|
2458
2957
|
|
|
2459
|
-
/**
|
|
2460
|
-
* @public
|
|
2461
|
-
*/
|
|
2958
|
+
/** @public */
|
|
2462
2959
|
export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
2463
2960
|
children?: React.ReactNode
|
|
2464
2961
|
zOffset?: number | number[]
|
|
@@ -2469,11 +2966,13 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
|
|
|
2469
2966
|
*
|
|
2470
2967
|
* @public
|
|
2471
2968
|
*/
|
|
2472
|
-
export declare
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2969
|
+
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
2970
|
+
props: TooltipProps<E>,
|
|
2971
|
+
): JSX.Element
|
|
2972
|
+
|
|
2973
|
+
export declare namespace Tooltip {
|
|
2974
|
+
var displayName: string
|
|
2975
|
+
}
|
|
2477
2976
|
|
|
2478
2977
|
/**
|
|
2479
2978
|
* @beta
|
|
@@ -2521,55 +3020,63 @@ export declare interface TooltipDelayGroupProviderProps {
|
|
|
2521
3020
|
delay: Delay
|
|
2522
3021
|
}
|
|
2523
3022
|
|
|
2524
|
-
/**
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
}
|
|
3023
|
+
/** @public */
|
|
3024
|
+
export declare type TooltipElementType = 'div' | 'span' | ComponentType
|
|
3025
|
+
|
|
3026
|
+
/** @public */
|
|
3027
|
+
export declare type TooltipOwnProps = LayerOwnProps &
|
|
3028
|
+
RadiusStyleProps &
|
|
3029
|
+
ShadowStyleProps & {
|
|
3030
|
+
/** @deprecated Use `fallbackPlacements` instead. */
|
|
3031
|
+
allowedAutoPlacements?: Placement[]
|
|
3032
|
+
/**
|
|
3033
|
+
* Whether the tooltip should animate in and out.
|
|
3034
|
+
*
|
|
3035
|
+
* @beta
|
|
3036
|
+
* @defaultValue false
|
|
3037
|
+
*/
|
|
3038
|
+
animate?: boolean
|
|
3039
|
+
arrow?: boolean
|
|
3040
|
+
boundaryElement?: HTMLElement | null
|
|
3041
|
+
children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
|
|
3042
|
+
content?: ReactNode
|
|
3043
|
+
/**
|
|
3044
|
+
* Adds a delay to open or close the tooltip.
|
|
3045
|
+
*
|
|
3046
|
+
* If only a `number` is passed, it will be used for both opening and closing.
|
|
3047
|
+
*
|
|
3048
|
+
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
3049
|
+
*
|
|
3050
|
+
* @public
|
|
3051
|
+
* @defaultValue 0
|
|
3052
|
+
*/
|
|
3053
|
+
delay?: Delay
|
|
3054
|
+
disabled?: boolean
|
|
3055
|
+
fallbackPlacements?: Placement[]
|
|
3056
|
+
placement?: Placement
|
|
3057
|
+
/** Whether or not to render the tooltip in a portal element. */
|
|
3058
|
+
portal?: boolean | string
|
|
3059
|
+
scheme?: ThemeColorSchemeKey_2
|
|
3060
|
+
tone?: ThemeColorCardToneKey
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
/** @public */
|
|
3064
|
+
export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
|
|
3065
|
+
TooltipOwnProps,
|
|
3066
|
+
E
|
|
3067
|
+
>
|
|
2563
3068
|
|
|
2564
3069
|
/**
|
|
2565
3070
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2566
3071
|
* @beta
|
|
2567
3072
|
*/
|
|
2568
|
-
export declare
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
3073
|
+
export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
|
|
3074
|
+
props: TreeProps<E>,
|
|
3075
|
+
): JSX.Element
|
|
3076
|
+
|
|
3077
|
+
export declare namespace Tree {
|
|
3078
|
+
var displayName: string
|
|
3079
|
+
}
|
|
2573
3080
|
|
|
2574
3081
|
/**
|
|
2575
3082
|
* @beta
|
|
@@ -2586,38 +3093,59 @@ export declare interface TreeContextValue {
|
|
|
2586
3093
|
state: TreeState
|
|
2587
3094
|
}
|
|
2588
3095
|
|
|
3096
|
+
/** @beta */
|
|
3097
|
+
export declare type TreeElementType = 'div' | ComponentType
|
|
3098
|
+
|
|
2589
3099
|
/**
|
|
2590
3100
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2591
3101
|
* @beta
|
|
2592
3102
|
*/
|
|
2593
|
-
export declare
|
|
3103
|
+
export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
|
|
3104
|
+
props: TreeItemProps<E>,
|
|
3105
|
+
): JSX.Element
|
|
2594
3106
|
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
3107
|
+
export declare namespace TreeItem {
|
|
3108
|
+
var displayName: string
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
/** @beta */
|
|
3112
|
+
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
3113
|
+
|
|
3114
|
+
/** @beta */
|
|
3115
|
+
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2599
3116
|
expanded?: boolean
|
|
2600
3117
|
fontSize?: ResponsiveProp<FontTextSize>
|
|
2601
|
-
icon?:
|
|
3118
|
+
icon?: ElementType_2
|
|
2602
3119
|
/**
|
|
2603
3120
|
* Allows passing a custom element type to the link component
|
|
2604
3121
|
*/
|
|
2605
|
-
linkAs?:
|
|
3122
|
+
linkAs?: SelectableElementType
|
|
3123
|
+
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2606
3124
|
padding?: ResponsiveProp<Space>
|
|
2607
3125
|
space?: ResponsiveProp<Space>
|
|
2608
3126
|
text?: ReactNode
|
|
2609
3127
|
weight?: ThemeFontWeightKey_2
|
|
2610
3128
|
}
|
|
2611
3129
|
|
|
3130
|
+
/** @beta */
|
|
3131
|
+
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
3132
|
+
TreeItemOwnProps,
|
|
3133
|
+
E
|
|
3134
|
+
>
|
|
3135
|
+
|
|
2612
3136
|
/**
|
|
2613
3137
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2614
3138
|
* @beta
|
|
2615
3139
|
*/
|
|
2616
|
-
export declare
|
|
3140
|
+
export declare type TreeOwnProps = {
|
|
3141
|
+
gap?: ResponsiveProp<Space>
|
|
2617
3142
|
/** @deprecated Use `gap` instead. */
|
|
2618
3143
|
space?: ResponsiveProp<Space>
|
|
2619
3144
|
}
|
|
2620
3145
|
|
|
3146
|
+
/** @beta */
|
|
3147
|
+
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
3148
|
+
|
|
2621
3149
|
/**
|
|
2622
3150
|
* @beta
|
|
2623
3151
|
*/
|
|
@@ -2637,11 +3165,11 @@ export declare interface TreeState {
|
|
|
2637
3165
|
*/
|
|
2638
3166
|
export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
2639
3167
|
|
|
2640
|
-
/**
|
|
2641
|
-
* @public
|
|
2642
|
-
*/
|
|
3168
|
+
/** @public */
|
|
2643
3169
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
2644
3170
|
|
|
3171
|
+
export declare function useCard(): CardContextValue | null
|
|
3172
|
+
|
|
2645
3173
|
/**
|
|
2646
3174
|
* @public
|
|
2647
3175
|
* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
|
|
@@ -2663,9 +3191,7 @@ export declare function useClickOutside(
|
|
|
2663
3191
|
boundaryElement?: HTMLElement | null,
|
|
2664
3192
|
): (el: HTMLElement | null) => void
|
|
2665
3193
|
|
|
2666
|
-
/**
|
|
2667
|
-
* @public
|
|
2668
|
-
*/
|
|
3194
|
+
/** @public */
|
|
2669
3195
|
export declare function useClickOutsideEvent(
|
|
2670
3196
|
listener: ClickOutsideEventListener | false | undefined,
|
|
2671
3197
|
elementsArg?: () => ClickOutsideEventElements,
|
|
@@ -2721,9 +3247,7 @@ export declare function useForwardedRef<T>(ref: ForwardedRef<T>): MutableRefObje
|
|
|
2721
3247
|
*/
|
|
2722
3248
|
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2723
3249
|
|
|
2724
|
-
/**
|
|
2725
|
-
* @public
|
|
2726
|
-
*/
|
|
3250
|
+
/** @public */
|
|
2727
3251
|
export declare function useLayer(): LayerContextValue
|
|
2728
3252
|
|
|
2729
3253
|
/**
|
|
@@ -2742,11 +3266,9 @@ export declare function useMatchMedia(
|
|
|
2742
3266
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2743
3267
|
* @beta
|
|
2744
3268
|
*/
|
|
2745
|
-
export declare function useMediaIndex():
|
|
3269
|
+
export declare function useMediaIndex(): Breakpoint
|
|
2746
3270
|
|
|
2747
|
-
/**
|
|
2748
|
-
* @public
|
|
2749
|
-
*/
|
|
3271
|
+
/** @public */
|
|
2750
3272
|
export declare function usePortal(): PortalContextValue
|
|
2751
3273
|
|
|
2752
3274
|
/**
|
|
@@ -2775,24 +3297,16 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
|
|
|
2775
3297
|
*/
|
|
2776
3298
|
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2777
3299
|
|
|
2778
|
-
/**
|
|
2779
|
-
* @public
|
|
2780
|
-
*/
|
|
3300
|
+
/** @public */
|
|
2781
3301
|
export declare function useRootTheme(): ThemeContextValue
|
|
2782
3302
|
|
|
2783
|
-
/**
|
|
2784
|
-
* @public
|
|
2785
|
-
*/
|
|
3303
|
+
/** @public */
|
|
2786
3304
|
export declare function useTheme(): Theme_2
|
|
2787
3305
|
|
|
2788
|
-
/**
|
|
2789
|
-
* @public
|
|
2790
|
-
*/
|
|
3306
|
+
/** @public */
|
|
2791
3307
|
export declare function useTheme_v2(): Theme_v2
|
|
2792
3308
|
|
|
2793
|
-
/**
|
|
2794
|
-
* @public
|
|
2795
|
-
*/
|
|
3309
|
+
/** @public */
|
|
2796
3310
|
export declare function useToast(): ToastContextValue
|
|
2797
3311
|
|
|
2798
3312
|
/**
|
|
@@ -2805,18 +3319,16 @@ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue |
|
|
|
2805
3319
|
*/
|
|
2806
3320
|
export declare function useTree(): TreeContextValue
|
|
2807
3321
|
|
|
2808
|
-
/**
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof VirtualListProps<any>> &
|
|
2813
|
-
VirtualListProps<any> &
|
|
2814
|
-
RefAttributes<HTMLDivElement>
|
|
2815
|
-
>
|
|
3322
|
+
/** @beta */
|
|
3323
|
+
export declare function VirtualList<
|
|
3324
|
+
E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
3325
|
+
>(props: VirtualListProps<E>): JSX.Element
|
|
2816
3326
|
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
3327
|
+
export declare namespace VirtualList {
|
|
3328
|
+
var displayName: string
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
/** @beta */
|
|
2820
3332
|
export declare interface VirtualListChangeOpts {
|
|
2821
3333
|
fromIndex: number
|
|
2822
3334
|
gap: number
|
|
@@ -2826,15 +3338,20 @@ export declare interface VirtualListChangeOpts {
|
|
|
2826
3338
|
toIndex: number
|
|
2827
3339
|
}
|
|
2828
3340
|
|
|
2829
|
-
/**
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
3341
|
+
/** @beta */
|
|
3342
|
+
export declare type VirtualListElementType = 'div' | ComponentType
|
|
3343
|
+
|
|
3344
|
+
/** @beta */
|
|
3345
|
+
export declare type VirtualListOwnProps<Item = any> = {
|
|
3346
|
+
gap?: Space
|
|
2834
3347
|
getItemKey?: (item: Item, itemIndex: number) => string
|
|
2835
3348
|
items?: Item[]
|
|
2836
3349
|
onChange?: (opts: VirtualListChangeOpts) => void
|
|
2837
3350
|
renderItem?: (item: Item) => ReactNode
|
|
2838
3351
|
}
|
|
2839
3352
|
|
|
3353
|
+
/** @beta */
|
|
3354
|
+
export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
|
|
3355
|
+
Props<VirtualListOwnProps, E>
|
|
3356
|
+
|
|
2840
3357
|
export {}
|