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