@sanity/ui 4.0.0-static.9 → 5.0.0-alpha.1
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 +201 -17
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +78 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +744 -2272
- package/dist/index.js +1743 -4395
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -0
- package/package.json +66 -206
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +107 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/box/Box.tsx +25 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +24 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +104 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +54 -0
- package/src/components/checkbox/Checkbox.tsx +63 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +25 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +37 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +24 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +24 -0
- package/src/components/flex/Flex.tsx +25 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +29 -0
- package/src/components/grid/Grid.tsx +25 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +29 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +15 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +25 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +31 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +26 -0
- package/src/components/index.css +25 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +20 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +13 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +96 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +19 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +112 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +14 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +20 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +19 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +16 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +20 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +24 -0
- package/src/components/tooltip/Tooltip.tsx +93 -0
- package/src/components/tooltip/tooltip.css +52 -0
- package/src/components/tooltip/tooltip.props.ts +20 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +67 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +13 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +15 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +19 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +171 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +4 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +74 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +21 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/index.css +18 -0
- package/src/index.ts +60 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_chunks-cjs/refractor.cjs +0 -22
- package/dist/_chunks-cjs/refractor.cjs.map +0 -1
- package/dist/_chunks-es/refractor.js +0 -25
- package/dist/_chunks-es/refractor.js.map +0 -1
- package/dist/css/index.cjs +0 -966
- package/dist/css/index.cjs.map +0 -1
- package/dist/css/index.css +0 -23387
- package/dist/css/index.css.map +0 -1
- package/dist/css/index.d.cts +0 -1394
- package/dist/css/index.d.ts +0 -1394
- package/dist/css/index.js +0 -967
- package/dist/css/index.js.map +0 -1
- package/dist/index.cjs +0 -4515
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2521
- package/dist/theme.cjs +0 -870
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -499
- package/dist/theme.d.ts +0 -499
- package/dist/theme.js +0 -870
- package/dist/theme.js.map +0 -1
- package/exports/css.ts +0 -1
- package/exports/index.ts +0 -1
- package/exports/theme.ts +0 -1
- package/src/core/Root.tsx +0 -88
- package/src/core/RootProvider.tsx +0 -40
- package/src/core/__workshop__/boundary.tsx +0 -28
- package/src/core/__workshop__/index.ts +0 -16
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -91
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -80
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -292
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -41
- package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__workshop__/mock/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/autocomplete/autocomplete.tsx +0 -690
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
- package/src/core/components/autocomplete/constants.ts +0 -28
- package/src/core/components/autocomplete/types.ts +0 -103
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -61
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -16
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -131
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -141
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -21
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -71
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -51
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -89
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -77
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/dialog/dialog.tsx +0 -232
- package/src/core/components/dialog/dialogCard.tsx +0 -233
- package/src/core/components/dialog/dialogContext.ts +0 -21
- package/src/core/components/dialog/dialogProvider.tsx +0 -34
- package/src/core/components/dialog/isTargetWithinScope.ts +0 -14
- package/src/core/components/dialog/types.ts +0 -2
- package/src/core/components/dialog/useDialog.ts +0 -11
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -16
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/hotkeys/hotkeys.tsx +0 -60
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -57
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -47
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -133
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -35
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
- package/src/core/components/menu/__workshop__/groups.tsx +0 -156
- package/src/core/components/menu/__workshop__/index.ts +0 -91
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -50
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -42
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/menu/helpers.ts +0 -82
- package/src/core/components/menu/menu.test.tsx +0 -129
- package/src/core/components/menu/menu.tsx +0 -179
- package/src/core/components/menu/menuButton.tsx +0 -225
- package/src/core/components/menu/menuContext.ts +0 -19
- package/src/core/components/menu/menuDivider.tsx +0 -32
- package/src/core/components/menu/menuGroup.tsx +0 -233
- package/src/core/components/menu/menuItem.tsx +0 -184
- package/src/core/components/menu/useMenu.ts +0 -21
- package/src/core/components/menu/useMenuController.ts +0 -241
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -16
- package/src/core/components/tab/tab.tsx +0 -109
- package/src/core/components/tab/tabList.tsx +0 -90
- package/src/core/components/tab/tabPanel.tsx +0 -47
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -21
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/toast/toast.test.tsx +0 -103
- package/src/core/components/toast/toast.tsx +0 -191
- package/src/core/components/toast/toastContext.ts +0 -7
- package/src/core/components/toast/toastLayer.tsx +0 -54
- package/src/core/components/toast/toastProvider.tsx +0 -112
- package/src/core/components/toast/toastState.ts +0 -6
- package/src/core/components/toast/types.ts +0 -24
- package/src/core/components/toast/useToast.ts +0 -23
- package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
- package/src/core/components/tree/__workshop__/basic.tsx +0 -105
- package/src/core/components/tree/__workshop__/index.ts +0 -23
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/components/tree/helpers.ts +0 -105
- package/src/core/components/tree/tree.tsx +0 -248
- package/src/core/components/tree/treeContext.ts +0 -10
- package/src/core/components/tree/treeGroup.tsx +0 -46
- package/src/core/components/tree/treeItem.tsx +0 -237
- package/src/core/components/tree/types.ts +0 -24
- package/src/core/components/tree/useTree.ts +0 -17
- package/src/core/components/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/components/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/components/virtualList/__workshop__/index.ts +0 -31
- package/src/core/components/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +0 -22
- package/src/core/components/virtualList/virtualList.tsx +0 -209
- package/src/core/constants.ts +0 -67
- package/src/core/helpers/animation.ts +0 -27
- package/src/core/helpers/element.ts +0 -55
- package/src/core/helpers/focus.ts +0 -92
- package/src/core/helpers/props.ts +0 -28
- package/src/core/helpers/scroll.ts +0 -15
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -114
- package/src/core/hooks/useClickOutsideEvent.ts +0 -67
- package/src/core/hooks/useCustomValidity.ts +0 -13
- package/src/core/hooks/useDelayed.test.ts +0 -67
- package/src/core/hooks/useDelayedState.ts +0 -28
- package/src/core/hooks/useElementSize.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -17
- package/src/core/hooks/useMatchMedia.ts +0 -28
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -16
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -21
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -107
- package/src/core/hooks/useMounted.ts +0 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersDark.test.tsx +0 -20
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -20
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/hooks/useResponsiveProp.ts +0 -28
- package/src/core/index.ts +0 -115
- package/src/core/lib/createGlobalScopedContext.ts +0 -37
- package/src/core/lib/globalScope.ts +0 -19
- package/src/core/lib/isArray.ts +0 -3
- package/src/core/lib/isRecord.ts +0 -3
- package/src/core/middleware/origin.ts +0 -47
- package/src/core/observers/elementSize.ts +0 -116
- package/src/core/observers/resize.ts +0 -9
- package/src/core/primitives/arrow/arrow.tsx +0 -74
- package/src/core/primitives/arrow/cmds.ts +0 -91
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -31
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -55
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
- package/src/core/primitives/avatar/avatar.tsx +0 -147
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -69
- package/src/core/primitives/avatar/avatarStack.tsx +0 -79
- package/src/core/primitives/avatar/types.ts +0 -2
- package/src/core/primitives/badge/__workshop__/index.ts +0 -21
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -19
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -16
- package/src/core/primitives/badge/badge.test.tsx +0 -16
- package/src/core/primitives/badge/badge.tsx +0 -61
- package/src/core/primitives/box/__workshop__/index.ts +0 -21
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/box/box.tsx +0 -222
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -27
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -54
- package/src/core/primitives/button/__workshop__/index.ts +0 -66
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
- package/src/core/primitives/button/__workshop__/props.tsx +0 -55
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +0 -13
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -29
- package/src/core/primitives/button/button.test.tsx +0 -30
- package/src/core/primitives/button/button.tsx +0 -193
- package/src/core/primitives/button/types.ts +0 -2
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
- package/src/core/primitives/card/__workshop__/index.ts +0 -20
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -29
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -78
- package/src/core/primitives/card/__workshop__/props.tsx +0 -52
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -62
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/card/card.tsx +0 -109
- package/src/core/primitives/card/cardContext.ts +0 -10
- package/src/core/primitives/card/cardProvider.tsx +0 -27
- package/src/core/primitives/card/types.ts +0 -17
- package/src/core/primitives/card/useCard.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -35
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/checkbox/checkbox.tsx +0 -80
- package/src/core/primitives/code/__workshop__/index.ts +0 -21
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/code/__workshop__/props.tsx +0 -18
- package/src/core/primitives/code/code.tsx +0 -48
- package/src/core/primitives/code/refractor.tsx +0 -18
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -10
- package/src/core/primitives/container/container.tsx +0 -37
- package/src/core/primitives/container/types.ts +0 -6
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/__workshop__/index.ts +0 -13
- package/src/core/primitives/flex/flex.tsx +0 -58
- package/src/core/primitives/grid/__workshop__/index.ts +0 -12
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.tsx +0 -35
- package/src/core/primitives/heading/__workshop__/index.ts +0 -21
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -29
- package/src/core/primitives/heading/heading.tsx +0 -78
- package/src/core/primitives/inline/__workshop__/index.ts +0 -10
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/inline/inline.tsx +0 -62
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -10
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/kbd/kbd.tsx +0 -57
- package/src/core/primitives/label/__workshop__/index.ts +0 -21
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/label/label.tsx +0 -75
- package/src/core/primitives/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/primitives/layer/__workshop__/index.ts +0 -26
- package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/primitives/layer/__workshop__/nested.tsx +0 -98
- package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +0 -17
- package/src/core/primitives/layer/getLayerContext.test.ts +0 -32
- package/src/core/primitives/layer/getLayerContext.ts +0 -21
- package/src/core/primitives/layer/layer.test.tsx +0 -110
- package/src/core/primitives/layer/layer.tsx +0 -42
- package/src/core/primitives/layer/layerCard.tsx +0 -90
- package/src/core/primitives/layer/layerContext.ts +0 -7
- package/src/core/primitives/layer/layerProvider.tsx +0 -106
- package/src/core/primitives/layer/types.ts +0 -9
- package/src/core/primitives/layer/useLayer.ts +0 -24
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -69
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -96
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -100
- package/src/core/primitives/popover/__workshop__/index.ts +0 -51
- package/src/core/primitives/popover/constants.ts +0 -22
- package/src/core/primitives/popover/floating-ui/size.ts +0 -83
- package/src/core/primitives/popover/helpers.ts +0 -32
- package/src/core/primitives/popover/popover.tsx +0 -443
- package/src/core/primitives/popover/popoverLayer.tsx +0 -149
- package/src/core/primitives/popover/types.ts +0 -12
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -13
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/radio.tsx +0 -64
- package/src/core/primitives/select/__workshop__/index.ts +0 -13
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -39
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/select.tsx +0 -75
- package/src/core/primitives/selectable/selectable.tsx +0 -50
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/primitives/skeleton/__workshop__/index.ts +0 -13
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/primitives/skeleton/codeSkeleton.tsx +0 -49
- package/src/core/primitives/skeleton/headingSkeleton.tsx +0 -48
- package/src/core/primitives/skeleton/labelSkeleton.tsx +0 -47
- package/src/core/primitives/skeleton/skeleton.tsx +0 -70
- package/src/core/primitives/skeleton/textSkeleton.tsx +0 -49
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -16
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +0 -14
- package/src/core/primitives/spinner/spinner.tsx +0 -45
- package/src/core/primitives/srOnly/srOnly.tsx +0 -33
- package/src/core/primitives/stack/__workshop__/index.ts +0 -16
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/stack/stack.tsx +0 -60
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -13
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/switch/switch.tsx +0 -84
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -23
- package/src/core/primitives/text/__workshop__/example.tsx +0 -28
- package/src/core/primitives/text/__workshop__/index.ts +0 -26
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/text/text.tsx +0 -76
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -16
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -61
- package/src/core/primitives/textArea/textArea.tsx +0 -84
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -46
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -110
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
- package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/core/primitives/textInput/textInput.tsx +0 -258
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -31
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -112
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/primitives/tooltip/constants.ts +0 -23
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
- package/src/core/primitives/tooltip/tooltip.tsx +0 -482
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -13
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
- package/src/core/primitives/tooltip/tooltipLayer.tsx +0 -106
- package/src/core/types.ts +0 -56
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -16
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -102
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -10
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -18
- package/src/core/utils/boundaryElement/types.ts +0 -5
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -24
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -41
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -16
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -75
- package/src/core/utils/elementQuery/helpers.ts +0 -27
- package/src/core/utils/errorBoundary.tsx +0 -50
- package/src/core/utils/getElementRef.ts +0 -29
- package/src/core/utils/portal/__workshop__/index.ts +0 -16
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/portal/portal.test.tsx +0 -105
- package/src/core/utils/portal/portal.tsx +0 -36
- package/src/core/utils/portal/portalContext.ts +0 -37
- package/src/core/utils/portal/portalProvider.tsx +0 -70
- package/src/core/utils/portal/types.ts +0 -7
- package/src/core/utils/portal/usePortal.ts +0 -23
- package/src/css/_assign.ts +0 -3
- package/src/css/_composeClassNames.ts +0 -12
- package/src/css/_fromEntries.ts +0 -3
- package/src/css/_getClassNames.ts +0 -9
- package/src/css/_responsiveClassName.ts +0 -45
- package/src/css/_responsiveStyle.css.ts +0 -34
- package/src/css/_style.css.ts +0 -9
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +0 -6
- package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -7
- package/src/css/components/dialog/dialog.css.ts +0 -98
- package/src/css/components/dialog/dialog.ts +0 -58
- package/src/css/components/menu/menu.css.ts +0 -14
- package/src/css/components/menu/menu.ts +0 -12
- package/src/css/components/skeleton/skeleton.css.ts +0 -128
- package/src/css/components/skeleton/skeleton.ts +0 -38
- package/src/css/components/skeleton/types.ts +0 -36
- package/src/css/components/toast/toast.css.ts +0 -17
- package/src/css/components/toast/toast.ts +0 -11
- package/src/css/components/tree/tree.css.ts +0 -65
- package/src/css/components/tree/tree.ts +0 -7
- package/src/css/constants.ts +0 -10
- package/src/css/getVarName.ts +0 -27
- package/src/css/index.ts +0 -146
- package/src/css/layers.css.ts +0 -12
- package/src/css/primitives/_arrow/_arrow.css.ts +0 -68
- package/src/css/primitives/_arrow/_arrow.ts +0 -26
- package/src/css/primitives/_input/_input.css.ts +0 -261
- package/src/css/primitives/_input/input.ts +0 -29
- package/src/css/primitives/_input/types.ts +0 -13
- package/src/css/primitives/avatar/avatar.css.ts +0 -201
- package/src/css/primitives/avatar/avatar.ts +0 -68
- package/src/css/primitives/avatar/types.ts +0 -10
- package/src/css/primitives/badge/badge.css.ts +0 -27
- package/src/css/primitives/badge/badge.ts +0 -8
- package/src/css/primitives/badge/types.ts +0 -13
- package/src/css/primitives/box/box.css.ts +0 -19
- package/src/css/primitives/box/box.ts +0 -82
- package/src/css/primitives/box/types.ts +0 -75
- package/src/css/primitives/button/button.css.ts +0 -287
- package/src/css/primitives/button/button.ts +0 -26
- package/src/css/primitives/button/types.ts +0 -12
- package/src/css/primitives/card/__workshop__/color.tsx +0 -75
- package/src/css/primitives/card/__workshop__/index.ts +0 -16
- package/src/css/primitives/card/card.css.ts +0 -387
- package/src/css/primitives/card/card.ts +0 -13
- package/src/css/primitives/card/types.ts +0 -9
- package/src/css/primitives/checkbox/checkbox.css.ts +0 -193
- package/src/css/primitives/checkbox/checkbox.ts +0 -17
- package/src/css/primitives/code/code.css.ts +0 -272
- package/src/css/primitives/code/code.ts +0 -19
- package/src/css/primitives/code/types.ts +0 -11
- package/src/css/primitives/container/container.css.ts +0 -4
- package/src/css/primitives/container/container.ts +0 -17
- package/src/css/primitives/container/types.ts +0 -9
- package/src/css/primitives/heading/heading.css.ts +0 -86
- package/src/css/primitives/heading/heading.ts +0 -22
- package/src/css/primitives/heading/types.ts +0 -14
- package/src/css/primitives/kbd/kbd.css.ts +0 -16
- package/src/css/primitives/kbd/kbd.ts +0 -9
- package/src/css/primitives/kbd/types.ts +0 -6
- package/src/css/primitives/label/label.css.ts +0 -87
- package/src/css/primitives/label/label.ts +0 -22
- package/src/css/primitives/label/types.ts +0 -14
- package/src/css/primitives/popover/popover.css.ts +0 -6
- package/src/css/primitives/popover/popover.ts +0 -12
- package/src/css/primitives/radio/radio.css.ts +0 -78
- package/src/css/primitives/radio/radio.ts +0 -17
- package/src/css/primitives/root/root.css.ts +0 -19
- package/src/css/primitives/root/root.ts +0 -17
- package/src/css/primitives/root/types.ts +0 -10
- package/src/css/primitives/select/select.css.ts +0 -24
- package/src/css/primitives/select/select.ts +0 -14
- package/src/css/primitives/select/types.ts +0 -5
- package/src/css/primitives/selectable/selectable.css.ts +0 -131
- package/src/css/primitives/selectable/selectable.ts +0 -9
- package/src/css/primitives/selectable/types.ts +0 -9
- package/src/css/primitives/spinner/spinner.css.ts +0 -19
- package/src/css/primitives/spinner/spinner.ts +0 -13
- package/src/css/primitives/spinner/types.ts +0 -4
- package/src/css/primitives/srOnly/srOnly.css.ts +0 -10
- package/src/css/primitives/srOnly/srOnly.ts +0 -7
- package/src/css/primitives/stack/stack.css.ts +0 -6
- package/src/css/primitives/stack/stack.ts +0 -7
- package/src/css/primitives/switch/switch.css.ts +0 -98
- package/src/css/primitives/switch/switch.ts +0 -27
- package/src/css/primitives/text/text.css.ts +0 -86
- package/src/css/primitives/text/text.ts +0 -24
- package/src/css/primitives/text/types.ts +0 -18
- package/src/css/primitives/textArea/textArea.css.ts +0 -4
- package/src/css/primitives/textArea/textArea.ts +0 -9
- package/src/css/primitives/textArea/types.ts +0 -7
- package/src/css/primitives/textInput/textInput.css.ts +0 -43
- package/src/css/primitives/textInput/textInput.ts +0 -24
- package/src/css/primitives/textInput/types.ts +0 -7
- package/src/css/primitives/tooltip/tooltip.css.ts +0 -4
- package/src/css/primitives/tooltip/tooltip.ts +0 -8
- package/src/css/primitives/tooltip/types.ts +0 -4
- package/src/css/props/alignItems/alignItems.css.ts +0 -22
- package/src/css/props/alignItems/alignItems.ts +0 -8
- package/src/css/props/alignItems/types.ts +0 -9
- package/src/css/props/border/border.css.ts +0 -65
- package/src/css/props/border/border.ts +0 -21
- package/src/css/props/border/types.ts +0 -13
- package/src/css/props/boxSizing/boxSizing.css.ts +0 -12
- package/src/css/props/boxSizing/boxSizing.ts +0 -7
- package/src/css/props/boxSizing/types.ts +0 -7
- package/src/css/props/display/display.css.ts +0 -56
- package/src/css/props/display/display.ts +0 -8
- package/src/css/props/display/types.ts +0 -16
- package/src/css/props/flex/flex.css.ts +0 -52
- package/src/css/props/flex/flex.ts +0 -8
- package/src/css/props/flex/types.ts +0 -9
- package/src/css/props/flexDirection/flexDirection.css.ts +0 -19
- package/src/css/props/flexDirection/flexDirection.ts +0 -8
- package/src/css/props/flexDirection/types.ts +0 -9
- package/src/css/props/flexWrap/flexWrap.css.ts +0 -16
- package/src/css/props/flexWrap/flexWrap.ts +0 -8
- package/src/css/props/flexWrap/types.ts +0 -9
- package/src/css/props/font/font.css.ts +0 -94
- package/src/css/props/font/font.ts +0 -8
- package/src/css/props/font/types.ts +0 -6
- package/src/css/props/gap/gap.css.ts +0 -40
- package/src/css/props/gap/gap.ts +0 -13
- package/src/css/props/gap/types.ts +0 -10
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +0 -19
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +0 -8
- package/src/css/props/gridAutoColumns/types.ts +0 -9
- package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +0 -19
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +0 -8
- package/src/css/props/gridAutoFlow/types.ts +0 -9
- package/src/css/props/gridAutoRows/gridAutoRows.css.ts +0 -19
- package/src/css/props/gridAutoRows/gridAutoRows.ts +0 -8
- package/src/css/props/gridAutoRows/types.ts +0 -9
- package/src/css/props/gridColumn/gridColumn.css.ts +0 -49
- package/src/css/props/gridColumn/gridColumn.ts +0 -8
- package/src/css/props/gridColumn/types.ts +0 -9
- package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +0 -46
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +0 -8
- package/src/css/props/gridColumnEnd/types.ts +0 -9
- package/src/css/props/gridColumnStart/gridColumnStart.css.ts +0 -46
- package/src/css/props/gridColumnStart/gridColumnStart.ts +0 -8
- package/src/css/props/gridColumnStart/types.ts +0 -9
- package/src/css/props/gridRow/gridRow.css.ts +0 -49
- package/src/css/props/gridRow/gridRow.ts +0 -8
- package/src/css/props/gridRow/types.ts +0 -9
- package/src/css/props/gridRowEnd/gridRowEnd.css.ts +0 -46
- package/src/css/props/gridRowEnd/gridRowEnd.ts +0 -8
- package/src/css/props/gridRowEnd/types.ts +0 -9
- package/src/css/props/gridRowStart/gridRowStart.css.ts +0 -46
- package/src/css/props/gridRowStart/gridRowStart.ts +0 -8
- package/src/css/props/gridRowStart/types.ts +0 -9
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +0 -43
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +0 -8
- package/src/css/props/gridTemplateColumns/types.ts +0 -9
- package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +0 -43
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +0 -8
- package/src/css/props/gridTemplateRows/types.ts +0 -9
- package/src/css/props/height/height.css.ts +0 -25
- package/src/css/props/height/height.ts +0 -8
- package/src/css/props/height/types.ts +0 -9
- package/src/css/props/inset/inset.css.ts +0 -37
- package/src/css/props/inset/inset.ts +0 -21
- package/src/css/props/inset/types.ts +0 -13
- package/src/css/props/justifyContent/justifyContent.css.ts +0 -25
- package/src/css/props/justifyContent/justifyContent.ts +0 -8
- package/src/css/props/justifyContent/types.ts +0 -15
- package/src/css/props/margin/margin.css.ts +0 -117
- package/src/css/props/margin/margin.ts +0 -25
- package/src/css/props/margin/types.ts +0 -17
- package/src/css/props/maxWidth/maxWidth.css.ts +0 -32
- package/src/css/props/maxWidth/maxWidth.ts +0 -8
- package/src/css/props/maxWidth/types.ts +0 -11
- package/src/css/props/minHeight/minHeight.css.ts +0 -13
- package/src/css/props/minHeight/minHeight.ts +0 -8
- package/src/css/props/minHeight/types.ts +0 -9
- package/src/css/props/minWidth/minWidth.css.ts +0 -25
- package/src/css/props/minWidth/minWidth.ts +0 -8
- package/src/css/props/minWidth/types.ts +0 -9
- package/src/css/props/outline/outline.css.ts +0 -10
- package/src/css/props/outline/outline.ts +0 -8
- package/src/css/props/outline/types.ts +0 -7
- package/src/css/props/overflow/overflow.css.ts +0 -16
- package/src/css/props/overflow/overflow.ts +0 -8
- package/src/css/props/overflow/types.ts +0 -11
- package/src/css/props/padding/padding.css.ts +0 -87
- package/src/css/props/padding/padding.ts +0 -25
- package/src/css/props/padding/types.ts +0 -17
- package/src/css/props/pointerEvents/pointerEvents.css.ts +0 -13
- package/src/css/props/pointerEvents/pointerEvents.ts +0 -8
- package/src/css/props/pointerEvents/types.ts +0 -7
- package/src/css/props/position/position.css.ts +0 -22
- package/src/css/props/position/position.ts +0 -8
- package/src/css/props/position/types.ts +0 -9
- package/src/css/props/radius/radius.css.ts +0 -21
- package/src/css/props/radius/radius.ts +0 -8
- package/src/css/props/radius/types.ts +0 -8
- package/src/css/props/shadow/shadow.css.ts +0 -23
- package/src/css/props/shadow/shadow.ts +0 -8
- package/src/css/props/shadow/types.ts +0 -8
- package/src/css/props/textAlign/textAlign.css.ts +0 -22
- package/src/css/props/textAlign/textAlign.ts +0 -8
- package/src/css/props/textAlign/types.ts +0 -7
- package/src/css/props/textOverflow/textOverflow.css.ts +0 -19
- package/src/css/props/textOverflow/textOverflow.ts +0 -8
- package/src/css/props/textOverflow/types.ts +0 -12
- package/src/css/props/width/types.ts +0 -11
- package/src/css/props/width/width.css.ts +0 -31
- package/src/css/props/width/width.ts +0 -8
- package/src/css/theme/buildCSSTheme.ts +0 -488
- package/src/css/theme/defaultTheme.css.ts +0 -64
- package/src/css/types.ts +0 -427
- package/src/css/vars.css.ts +0 -676
- package/src/theme/_parseColorToken.ts +0 -180
- package/src/theme/buildTheme.ts +0 -32
- package/src/theme/constants.ts +0 -90
- package/src/theme/defaults/color.ts +0 -197
- package/src/theme/defaults/common.ts +0 -71
- package/src/theme/defaults/fonts.ts +0 -250
- package/src/theme/index.ts +0 -5
- package/src/theme/merge.ts +0 -24
- package/src/theme/resolveTokens.ts +0 -204
- package/src/theme/types.ts +0 -366
package/dist/index.d.ts
CHANGED
|
@@ -1,2521 +1,993 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import type {ComponentType as ComponentType_2} from 'react'
|
|
16
|
-
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
|
-
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
18
|
-
import type {Context} from 'react'
|
|
19
|
-
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
20
|
-
import type {ElementTone} from '@sanity/ui/theme'
|
|
21
|
-
import {ElementType as ElementType_2} from 'react'
|
|
22
|
-
import {ErrorInfo} from 'react'
|
|
23
|
-
import type {ExoticComponent} from 'react'
|
|
24
|
-
import type {FlexDirection} from '@sanity/ui/css'
|
|
25
|
-
import {FlexStyleProps} from '@sanity/ui/css'
|
|
26
|
-
import type {FlexWrap} from '@sanity/ui/css'
|
|
27
|
-
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
28
|
-
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
29
|
-
import type {FontLabelSize} from '@sanity/ui/theme'
|
|
30
|
-
import type {FontTextSize} from '@sanity/ui/theme'
|
|
31
|
-
import type {FontWeight} from '@sanity/ui/theme'
|
|
32
|
-
import {ForwardedRef} from 'react'
|
|
33
|
-
import type {FunctionComponent} from 'react'
|
|
34
|
-
import {GapStyleProps} from '@sanity/ui/css'
|
|
35
|
-
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
36
|
-
import {HTMLAttributes} from 'react'
|
|
37
|
-
import {InputStyleProps} from '@sanity/ui/css'
|
|
38
|
-
import type {JSX} from 'react'
|
|
39
|
-
import type {JustifyContent} from '@sanity/ui/css'
|
|
40
|
-
import {LabelStyleProps} from '@sanity/ui/css'
|
|
41
|
-
import {MaxWidth} from '@sanity/ui/css'
|
|
42
|
-
import {MouseEventHandler} from 'react'
|
|
43
|
-
import {PaddingStyleProps} from '@sanity/ui/css'
|
|
44
|
-
import {PropsWithChildren} from 'react'
|
|
45
|
-
import type {Radius} from '@sanity/ui/theme'
|
|
46
|
-
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
47
|
-
import {ReactElement} from 'react'
|
|
48
|
-
import {ReactNode} from 'react'
|
|
49
|
-
import type {ReactPortal} from 'react'
|
|
50
|
-
import {Ref} from 'react'
|
|
51
|
-
import {RefAttributes} from 'react'
|
|
52
|
-
import {ResponsiveProp} from '@sanity/ui/css'
|
|
53
|
-
import {RootStyleProps} from '@sanity/ui/css'
|
|
54
|
-
import {SelectableStyleProps} from '@sanity/ui/css'
|
|
55
|
-
import {SelectStyleProps} from '@sanity/ui/css'
|
|
56
|
-
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
57
|
-
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
58
|
-
import type {Space} from '@sanity/ui/theme'
|
|
59
|
-
import {TextAreaStyleProps} from '@sanity/ui/css'
|
|
60
|
-
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
61
|
-
import {TextStyleProps} from '@sanity/ui/css'
|
|
62
|
-
import type {Width} from '@sanity/ui/css'
|
|
63
|
-
|
|
64
|
-
/** @internal */
|
|
65
|
-
export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
|
|
66
|
-
props: ArrowProps<E>,
|
|
67
|
-
): React.JSX.Element
|
|
68
|
-
|
|
69
|
-
/** @internal */
|
|
70
|
-
export declare type ArrowElementType = 'div' | 'span' | ComponentType
|
|
71
|
-
|
|
72
|
-
/** @internal */
|
|
73
|
-
export declare type ArrowOwnProps = {
|
|
74
|
-
width: number
|
|
75
|
-
height: number
|
|
76
|
-
radius?: number
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** @internal */
|
|
80
|
-
export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
|
|
81
|
-
ArrowOwnProps,
|
|
82
|
-
E
|
|
83
|
-
>
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Assign properties from `U` to `T`, excluding properties that already exist in `T`.
|
|
87
|
-
*
|
|
88
|
-
* @public
|
|
89
|
-
*/
|
|
90
|
-
export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @internal
|
|
94
|
-
*/
|
|
95
|
-
export declare function attemptFocus(element: HTMLElement): boolean
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The Autocomplete component is typically used for search components.
|
|
99
|
-
* It consists of a text input for writing a query, and properties for rendering suggestions.
|
|
100
|
-
*
|
|
101
|
-
* @public
|
|
102
|
-
*/
|
|
103
|
-
export declare function Autocomplete<
|
|
104
|
-
E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
|
|
105
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
106
|
-
>(props: AutocompleteProps<E, O>): React.JSX.Element
|
|
107
|
-
|
|
108
|
-
/** @public */
|
|
109
|
-
export declare type AutocompleteElementType = 'input' | ComponentType
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
export declare interface AutocompleteInputChangeMsg {
|
|
115
|
-
type: 'input/change'
|
|
116
|
-
query: string | null
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
|
-
export declare interface AutocompleteInputFoocusMsg {
|
|
123
|
-
type: 'input/focus'
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @internal
|
|
128
|
-
*/
|
|
129
|
-
export declare type AutocompleteMsg =
|
|
130
|
-
| AutocompleteRootBlurMsg
|
|
131
|
-
| AutocompleteRootClearMsg
|
|
132
|
-
| AutocompleteRootEscapeMsg
|
|
133
|
-
| AutocompleteRootOpenMsg
|
|
134
|
-
| AutocompleteRootSetActiveValueMsg
|
|
135
|
-
| AutocompleteRootSetListFocusedMsg
|
|
136
|
-
| AutocompleteInputChangeMsg
|
|
137
|
-
| AutocompleteInputFoocusMsg
|
|
138
|
-
| AutocompleteValueChangeMsg
|
|
139
|
-
|
|
140
|
-
/** @public */
|
|
141
|
-
export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
|
|
142
|
-
|
|
143
|
-
/** @public */
|
|
144
|
-
export declare type AutocompleteOwnProps<
|
|
145
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
146
|
-
> = TextInputOwnProps & {
|
|
147
|
-
border?: boolean
|
|
148
|
-
customValidity?: string
|
|
149
|
-
filterOption?: (query: string, option: O) => boolean
|
|
150
|
-
icon?: ElementType_2 | ReactNode
|
|
151
|
-
/** @beta */
|
|
152
|
-
listBox?: BoxOwnProps
|
|
153
|
-
loading?: boolean
|
|
154
|
-
onChange?: (value: string) => void
|
|
155
|
-
onQueryChange?: (query: string | null) => void
|
|
156
|
-
onSelect?: (value: string) => void
|
|
157
|
-
/** @beta */
|
|
158
|
-
openButton?: boolean | AutocompleteOpenButtonProps
|
|
159
|
-
/** @beta */
|
|
160
|
-
openOnFocus?: boolean
|
|
161
|
-
/** The options to render. */
|
|
162
|
-
options?: O[]
|
|
163
|
-
padding?: ResponsiveProp<Space>
|
|
164
|
-
popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
|
|
165
|
-
prefix?: ReactNode
|
|
166
|
-
radius?: Radius | Radius[]
|
|
167
|
-
/** @beta */
|
|
168
|
-
relatedElements?: HTMLElement[]
|
|
169
|
-
/** The callback function for rendering each option. */
|
|
170
|
-
renderOption?: (option: O) => React.JSX.Element
|
|
171
|
-
/** @beta */
|
|
172
|
-
renderPopover?: (
|
|
173
|
-
props: {
|
|
174
|
-
content: React.JSX.Element | null
|
|
175
|
-
hidden: boolean
|
|
176
|
-
inputElement: HTMLInputElement | null
|
|
177
|
-
onMouseEnter: () => void
|
|
178
|
-
onMouseLeave: () => void
|
|
179
|
-
},
|
|
180
|
-
ref: ForwardedRef<HTMLDivElement>,
|
|
181
|
-
) => ReactNode
|
|
182
|
-
renderValue?: (value: string, option?: O) => string
|
|
183
|
-
suffix?: ReactNode
|
|
184
|
-
value?: string
|
|
185
|
-
}
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { ElementType } from "react";
|
|
4
|
+
import { JSX } from "react";
|
|
5
|
+
import type { default as React_2 } from "react";
|
|
6
|
+
import type { SVGProps } from "react";
|
|
7
|
+
|
|
8
|
+
declare const ALIGN_ITEMS: readonly [
|
|
9
|
+
"baseline",
|
|
10
|
+
"center",
|
|
11
|
+
"flex-end",
|
|
12
|
+
"flex-start",
|
|
13
|
+
"stretch",
|
|
14
|
+
];
|
|
186
15
|
|
|
187
16
|
/** @public */
|
|
188
|
-
export declare type
|
|
189
|
-
E extends AutocompleteElementType = AutocompleteElementType,
|
|
190
|
-
O extends BaseAutocompleteOption = BaseAutocompleteOption,
|
|
191
|
-
> = Props<AutocompleteOwnProps<O>, E>
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
export declare interface AutocompleteRootBlurMsg {
|
|
197
|
-
type: 'root/blur'
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @internal
|
|
202
|
-
*/
|
|
203
|
-
export declare interface AutocompleteRootClearMsg {
|
|
204
|
-
type: 'root/clear'
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @internal
|
|
209
|
-
*/
|
|
210
|
-
export declare interface AutocompleteRootEscapeMsg {
|
|
211
|
-
type: 'root/escape'
|
|
212
|
-
}
|
|
17
|
+
export declare type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
213
18
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
listFocused?: boolean
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @internal
|
|
233
|
-
*/
|
|
234
|
-
export declare interface AutocompleteRootSetListFocusedMsg {
|
|
235
|
-
type: 'root/setListFocused'
|
|
236
|
-
listFocused: boolean
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* @internal
|
|
241
|
-
*/
|
|
242
|
-
export declare interface AutocompleteState {
|
|
243
|
-
activeValue: string | null
|
|
244
|
-
focused: boolean
|
|
245
|
-
listFocused: boolean
|
|
246
|
-
query: string | null
|
|
247
|
-
value: string | null
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @internal
|
|
252
|
-
*/
|
|
253
|
-
export declare interface AutocompleteValueChangeMsg {
|
|
254
|
-
type: 'value/change'
|
|
255
|
-
value: string | null
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Avatars are used to represent people and other agents (e.g. bots).
|
|
260
|
-
*
|
|
261
|
-
* @public
|
|
262
|
-
*/
|
|
263
|
-
export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
|
|
264
|
-
props: AvatarProps<E>,
|
|
265
|
-
): React.JSX.Element
|
|
266
|
-
|
|
267
|
-
/** @public */
|
|
268
|
-
export declare function AvatarCounter<
|
|
269
|
-
E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
270
|
-
>(props: AvatarCounterProps<E>): React.JSX.Element
|
|
19
|
+
declare type BorderProps = {
|
|
20
|
+
/** CSS **border** property */
|
|
21
|
+
border?: Responsive<boolean>;
|
|
22
|
+
/** CSS **border-top** property */
|
|
23
|
+
borderTop?: Responsive<boolean>;
|
|
24
|
+
/** CSS **border-right** property */
|
|
25
|
+
borderRight?: Responsive<boolean>;
|
|
26
|
+
/** CSS **border-bottom** property */
|
|
27
|
+
borderBottom?: Responsive<boolean>;
|
|
28
|
+
/** CSS **border-left** property */
|
|
29
|
+
borderLeft?: Responsive<boolean>;
|
|
30
|
+
/** CSS **border-radius** property */
|
|
31
|
+
radius?: Responsive<Radius>;
|
|
32
|
+
};
|
|
271
33
|
|
|
272
34
|
/** @public */
|
|
273
|
-
export declare
|
|
35
|
+
export declare function Box<T extends ElementType = "div">({
|
|
36
|
+
display,
|
|
37
|
+
...props
|
|
38
|
+
}: BoxProps<T> &
|
|
39
|
+
Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): JSX.Element;
|
|
274
40
|
|
|
275
41
|
/** @public */
|
|
276
|
-
export declare interface
|
|
277
|
-
|
|
278
|
-
|
|
42
|
+
export declare interface BoxProps<
|
|
43
|
+
T extends React.ElementType = "div",
|
|
44
|
+
> extends LayoutProps {
|
|
45
|
+
/** Element to render */
|
|
46
|
+
as?: T;
|
|
47
|
+
/** CSS **display** property */
|
|
48
|
+
display?: Responsive<DisplayBlock>;
|
|
279
49
|
}
|
|
280
50
|
|
|
281
51
|
/** @public */
|
|
282
|
-
export declare
|
|
283
|
-
|
|
284
|
-
|
|
52
|
+
export declare function Button<T extends ElementType = "button">({
|
|
53
|
+
density,
|
|
54
|
+
level,
|
|
55
|
+
tone,
|
|
56
|
+
...props
|
|
57
|
+
}: ButtonProps<T> &
|
|
58
|
+
Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): JSX.Element;
|
|
285
59
|
|
|
286
|
-
|
|
287
|
-
export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
|
|
288
|
-
|
|
289
|
-
/** @public */
|
|
290
|
-
export declare interface AvatarOwnProps {
|
|
291
|
-
/** @beta */
|
|
292
|
-
__unstable_hideInnerStroke?: boolean
|
|
293
|
-
animateArrowFrom?: AvatarPosition
|
|
294
|
-
arrowPosition?: AvatarPosition
|
|
295
|
-
color?: AvatarColor
|
|
296
|
-
initials?: string
|
|
297
|
-
onImageLoadError?: (event: Error) => void
|
|
298
|
-
size?: ResponsiveProp<AvatarSize>
|
|
299
|
-
src?: string
|
|
300
|
-
title?: string
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/** @public */
|
|
304
|
-
export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
|
|
305
|
-
|
|
306
|
-
/** @public */
|
|
307
|
-
export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
|
|
308
|
-
AvatarOwnProps,
|
|
309
|
-
E
|
|
310
|
-
>
|
|
311
|
-
|
|
312
|
-
/** @public */
|
|
313
|
-
export declare function AvatarStack<
|
|
314
|
-
E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
|
|
315
|
-
>(props: AvatarStackProps<E>): React.JSX.Element
|
|
316
|
-
|
|
317
|
-
/** @public */
|
|
318
|
-
export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
|
|
60
|
+
declare const BUTTON_DENSITY: readonly ["regular", "loose"];
|
|
319
61
|
|
|
320
|
-
|
|
321
|
-
export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
|
|
322
|
-
|
|
323
|
-
/** @public */
|
|
324
|
-
export declare type AvatarStackOwnProps = Omit<
|
|
325
|
-
BoxOwnProps,
|
|
326
|
-
'align' | 'alignItems' | 'display' | 'justify' | 'justifyContent'
|
|
327
|
-
> & {
|
|
328
|
-
children: AvatarStackChild | AvatarStackChild[]
|
|
329
|
-
maxLength?: number
|
|
330
|
-
size?: ResponsiveProp<AvatarSize>
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/** @public */
|
|
334
|
-
export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
|
|
335
|
-
Props<AvatarStackOwnProps, E>
|
|
62
|
+
declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
|
|
336
63
|
|
|
337
|
-
|
|
338
|
-
* Badges are used to tag resources.
|
|
339
|
-
*
|
|
340
|
-
* @public
|
|
341
|
-
*/
|
|
342
|
-
export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
|
|
343
|
-
props: BadgeProps<E>,
|
|
344
|
-
): React.JSX.Element
|
|
64
|
+
declare const BUTTON_TONE: readonly ["neutral", "critical"];
|
|
345
65
|
|
|
346
|
-
|
|
347
|
-
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
348
|
-
|
|
349
|
-
/** @public */
|
|
350
|
-
export declare type BadgeOwnProps = BadgeStyleProps &
|
|
351
|
-
FlexStyleProps &
|
|
352
|
-
PaddingStyleProps &
|
|
353
|
-
RadiusStyleProps
|
|
66
|
+
declare type ButtonDensity = (typeof BUTTON_DENSITY)[number];
|
|
354
67
|
|
|
355
|
-
|
|
356
|
-
export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
|
|
357
|
-
BadgeOwnProps,
|
|
358
|
-
E
|
|
359
|
-
>
|
|
68
|
+
declare type ButtonLevel = (typeof BUTTON_LEVEL)[number];
|
|
360
69
|
|
|
361
70
|
/** @public */
|
|
362
|
-
export declare interface
|
|
363
|
-
|
|
71
|
+
export declare interface ButtonProps<T extends React.ElementType = "button"> {
|
|
72
|
+
/** Element to render */
|
|
73
|
+
as?: InteractiveAs<T>;
|
|
74
|
+
/** Composite prop for setting padding and gap */
|
|
75
|
+
density?: ButtonDensity;
|
|
76
|
+
/** Set CSS **width** property to 100% */
|
|
77
|
+
fullWidth?: Responsive<boolean>;
|
|
78
|
+
/** Starting icon */
|
|
79
|
+
iconStart?: React.ElementType | React.ReactNode;
|
|
80
|
+
/** Ending icon */
|
|
81
|
+
iconEnd?: React.ElementType | React.ReactNode;
|
|
82
|
+
/** Button level */
|
|
83
|
+
level?: ButtonLevel;
|
|
84
|
+
/** Loading state */
|
|
85
|
+
loading?: boolean;
|
|
86
|
+
/** Button text */
|
|
87
|
+
text?: string;
|
|
88
|
+
/** Button tone */
|
|
89
|
+
tone?: ButtonTone;
|
|
364
90
|
}
|
|
365
91
|
|
|
366
|
-
|
|
367
|
-
export declare interface BoundaryElementContextValue {
|
|
368
|
-
version: 0.0
|
|
369
|
-
element: HTMLElement | null
|
|
370
|
-
}
|
|
92
|
+
declare type ButtonTone = (typeof BUTTON_TONE)[number];
|
|
371
93
|
|
|
372
94
|
/** @public */
|
|
373
|
-
export declare function
|
|
374
|
-
|
|
375
|
-
|
|
95
|
+
export declare function Card<T extends ElementType = "div">({
|
|
96
|
+
density,
|
|
97
|
+
tone,
|
|
98
|
+
...props
|
|
99
|
+
}: CardProps<T> &
|
|
100
|
+
Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): JSX.Element;
|
|
376
101
|
|
|
377
102
|
/** @public */
|
|
378
|
-
export declare interface
|
|
379
|
-
|
|
380
|
-
|
|
103
|
+
export declare interface CardProps<T extends React.ElementType = "div">
|
|
104
|
+
extends MarginProps, ToneProps {
|
|
105
|
+
/** Element to render */
|
|
106
|
+
as?: T;
|
|
107
|
+
/** Composite prop for setting padding and border radius */
|
|
108
|
+
density?: Responsive<Density>;
|
|
381
109
|
}
|
|
382
110
|
|
|
383
|
-
/**
|
|
384
|
-
* The `Box` component is a basic layout wrapper component which provides utility properties
|
|
385
|
-
* for flex, margins and padding.
|
|
386
|
-
*
|
|
387
|
-
* @public
|
|
388
|
-
*/
|
|
389
|
-
export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
|
|
390
|
-
props: BoxProps<E>,
|
|
391
|
-
): React.JSX.Element
|
|
392
|
-
|
|
393
|
-
/** @public */
|
|
394
|
-
export declare type BoxElementType =
|
|
395
|
-
| 'a'
|
|
396
|
-
| 'article'
|
|
397
|
-
| 'aside'
|
|
398
|
-
| 'blockquote'
|
|
399
|
-
| 'body'
|
|
400
|
-
| 'button'
|
|
401
|
-
| 'details'
|
|
402
|
-
| 'div'
|
|
403
|
-
| 'header'
|
|
404
|
-
| 'fieldset'
|
|
405
|
-
| 'figure'
|
|
406
|
-
| 'figcaption'
|
|
407
|
-
| 'footer'
|
|
408
|
-
| 'form'
|
|
409
|
-
| 'html'
|
|
410
|
-
| 'iframe'
|
|
411
|
-
| 'kbd'
|
|
412
|
-
| 'label'
|
|
413
|
-
| 'legend'
|
|
414
|
-
| 'li'
|
|
415
|
-
| 'main'
|
|
416
|
-
| 'nav'
|
|
417
|
-
| 'ol'
|
|
418
|
-
| 'pre'
|
|
419
|
-
| 'section'
|
|
420
|
-
| 'span'
|
|
421
|
-
| 'summary'
|
|
422
|
-
| 'table'
|
|
423
|
-
| 'tbody'
|
|
424
|
-
| 'td'
|
|
425
|
-
| 'tfoot'
|
|
426
|
-
| 'th'
|
|
427
|
-
| 'thead'
|
|
428
|
-
| 'tr'
|
|
429
|
-
| 'ul'
|
|
430
|
-
| ComponentType
|
|
431
|
-
|
|
432
|
-
/** @public */
|
|
433
|
-
export declare type BoxOwnProps = BoxStyleProps
|
|
434
|
-
|
|
435
|
-
/** @public */
|
|
436
|
-
export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
|
|
437
|
-
|
|
438
|
-
/** @beta */
|
|
439
|
-
export declare function Breadcrumbs<
|
|
440
|
-
E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
|
|
441
|
-
>(props: BreadcrumbsProps<E>): React.JSX.Element
|
|
442
|
-
|
|
443
111
|
/** @beta */
|
|
444
|
-
export declare
|
|
445
|
-
|
|
446
|
-
/** @beta */
|
|
447
|
-
export declare type BreadcrumbsOwnProps = GapStyleProps & {
|
|
448
|
-
expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
|
|
449
|
-
maxLength?: number
|
|
450
|
-
separator?: ReactNode
|
|
451
|
-
}
|
|
112
|
+
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
452
113
|
|
|
453
114
|
/** @beta */
|
|
454
|
-
export declare
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
/** @public */
|
|
463
|
-
export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
|
|
464
|
-
|
|
465
|
-
/** @public */
|
|
466
|
-
export declare type ButtonOwnProps = ButtonStyleProps &
|
|
467
|
-
DisplayStyleProps &
|
|
468
|
-
GapStyleProps &
|
|
469
|
-
PaddingStyleProps & {
|
|
470
|
-
'align'?: BoxStyleProps['alignItems']
|
|
471
|
-
'data-ui'?: string
|
|
472
|
-
'disabled'?: boolean
|
|
473
|
-
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
474
|
-
'icon'?: ElementType_2 | ReactNode
|
|
475
|
-
'iconRight'?: ElementType_2 | ReactNode
|
|
476
|
-
'justify'?: BoxStyleProps['justifyContent']
|
|
477
|
-
/** @beta Do not use in production, as this might change.*/
|
|
478
|
-
'loading'?: boolean
|
|
479
|
-
'selected'?: boolean
|
|
480
|
-
'textAlign'?: ButtonTextAlign
|
|
481
|
-
'muted'?: boolean
|
|
482
|
-
'target'?: string
|
|
483
|
-
'text'?: ReactNode
|
|
484
|
-
'textOverflow'?: TextOwnProps['textOverflow']
|
|
485
|
-
'textWeight'?: TextOwnProps['weight']
|
|
486
|
-
'width'?: ResponsiveProp<Width>
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/** @public */
|
|
490
|
-
export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
|
|
491
|
-
ButtonOwnProps,
|
|
492
|
-
E
|
|
493
|
-
>
|
|
494
|
-
|
|
495
|
-
/** @public */
|
|
496
|
-
export declare type ButtonTextAlign = 'left' | 'right' | 'center'
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* The `Card` component acts much like a `Box`, but with a background and foreground color.
|
|
500
|
-
* Components within a `Card` inherit its colors.
|
|
501
|
-
*
|
|
502
|
-
* @public
|
|
503
|
-
*/
|
|
504
|
-
export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
|
|
505
|
-
props: CardProps<E>,
|
|
506
|
-
): React.JSX.Element
|
|
507
|
-
|
|
508
|
-
/** @internal */
|
|
509
|
-
export declare type _CardCompatProviderComponent = ComponentType_2<{
|
|
510
|
-
children?: ReactNode
|
|
511
|
-
tone: CardTone | 'inherit'
|
|
512
|
-
scheme: ColorScheme
|
|
513
|
-
}>
|
|
514
|
-
|
|
515
|
-
/** @public */
|
|
516
|
-
export declare interface CardContextValue {
|
|
517
|
-
tone: CardTone
|
|
518
|
-
scheme: ColorScheme
|
|
519
|
-
/** @internal */
|
|
520
|
-
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/** @public */
|
|
524
|
-
export declare type CardElementType = BoxElementType
|
|
525
|
-
|
|
526
|
-
/** @public */
|
|
527
|
-
export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps {
|
|
528
|
-
/**
|
|
529
|
-
* Do not use in production.
|
|
530
|
-
* @beta
|
|
531
|
-
*/
|
|
532
|
-
__unstable_checkered?: boolean
|
|
533
|
-
/**
|
|
534
|
-
* Do not use in production.
|
|
535
|
-
* @beta
|
|
536
|
-
*/
|
|
537
|
-
__unstable_focusRing?: boolean
|
|
538
|
-
disabled?: boolean
|
|
539
|
-
pressed?: boolean
|
|
540
|
-
selected?: boolean
|
|
541
|
-
target?: string
|
|
115
|
+
export declare interface CheckboxProps
|
|
116
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
117
|
+
/** Error state */
|
|
118
|
+
error?: boolean;
|
|
119
|
+
/** Indeterminate state */
|
|
120
|
+
indeterminate?: boolean;
|
|
121
|
+
/** Input label */
|
|
122
|
+
label: React.ReactNode;
|
|
542
123
|
}
|
|
543
124
|
|
|
544
125
|
/** @public */
|
|
545
|
-
export declare
|
|
126
|
+
export declare function Code<T extends CodeTag = "pre">({
|
|
127
|
+
size,
|
|
128
|
+
...props
|
|
129
|
+
}: CodeProps<T> &
|
|
130
|
+
Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): JSX.Element;
|
|
546
131
|
|
|
547
|
-
|
|
548
|
-
export declare function CardProvider(props: {
|
|
549
|
-
children?: ReactNode
|
|
550
|
-
tone: CardTone
|
|
551
|
-
scheme: ColorScheme
|
|
552
|
-
/** @internal */
|
|
553
|
-
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
554
|
-
}): React.JSX.Element
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
558
|
-
*
|
|
559
|
-
* @public
|
|
560
|
-
*/
|
|
561
|
-
export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
|
|
562
|
-
props: CheckboxProps<E>,
|
|
563
|
-
): React.JSX.Element
|
|
132
|
+
declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
|
|
564
133
|
|
|
565
|
-
|
|
566
|
-
export declare type CheckboxElementType = 'input' | ComponentType
|
|
134
|
+
declare const CODE_TAG: readonly ["pre", "span"];
|
|
567
135
|
|
|
568
136
|
/** @public */
|
|
569
|
-
export declare
|
|
570
|
-
|
|
571
|
-
|
|
137
|
+
export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
|
|
138
|
+
TypographyProps,
|
|
139
|
+
"align" | "truncate" | "tone"
|
|
140
|
+
> {
|
|
141
|
+
/** Element to render */
|
|
142
|
+
as?: T;
|
|
143
|
+
/** Refractor language for syntax highlighting */
|
|
144
|
+
language?: string;
|
|
145
|
+
/** CSS **font-size** property */
|
|
146
|
+
size?: Responsive<CodeSize>;
|
|
572
147
|
}
|
|
573
148
|
|
|
574
149
|
/** @public */
|
|
575
|
-
export declare type
|
|
576
|
-
CheckboxOwnProps,
|
|
577
|
-
E
|
|
578
|
-
>
|
|
150
|
+
export declare type CodeSize = (typeof CODE_SIZE)[number];
|
|
579
151
|
|
|
580
|
-
|
|
581
|
-
export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
|
|
582
|
-
|
|
583
|
-
/** @public */
|
|
584
|
-
export declare type ClickOutsideEventListener = (event: MouseEvent) => void
|
|
152
|
+
declare type CodeTag = (typeof CODE_TAG)[number];
|
|
585
153
|
|
|
586
154
|
/** @public */
|
|
587
|
-
export declare function
|
|
588
|
-
|
|
589
|
-
|
|
155
|
+
export declare function Container<T extends ElementType = "div">({
|
|
156
|
+
marginX,
|
|
157
|
+
...props
|
|
158
|
+
}: ContainerProps<T> &
|
|
159
|
+
Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): JSX.Element;
|
|
590
160
|
|
|
591
|
-
|
|
592
|
-
export declare type CodeElementType = 'div' | 'pre' | ComponentType
|
|
593
|
-
|
|
594
|
-
/** @public */
|
|
595
|
-
export declare type CodeOwnProps = CodeStyleProps & {
|
|
596
|
-
/** Define the language to use for syntax highlighting. */
|
|
597
|
-
language?: string
|
|
598
|
-
size?: ResponsiveProp<FontCodeSize>
|
|
599
|
-
}
|
|
161
|
+
declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
600
162
|
|
|
601
163
|
/** @public */
|
|
602
|
-
export declare
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
*/
|
|
608
|
-
|
|
609
|
-
E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
|
|
610
|
-
>(props: CodeSkeletonProps<E>): React.JSX.Element
|
|
611
|
-
|
|
612
|
-
/** @beta */
|
|
613
|
-
export declare type CodeSkeletonElementType = SkeletonElementType
|
|
614
|
-
|
|
615
|
-
/** @beta */
|
|
616
|
-
export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
|
|
617
|
-
size?: ResponsiveProp<FontCodeSize>
|
|
164
|
+
export declare interface ContainerProps<
|
|
165
|
+
T extends React.ElementType = "div",
|
|
166
|
+
> extends LayoutProps {
|
|
167
|
+
/** Element to render */
|
|
168
|
+
as?: T;
|
|
169
|
+
/** CSS **max-width** property */
|
|
170
|
+
size?: Responsive<ContainerSize>;
|
|
618
171
|
}
|
|
619
172
|
|
|
620
|
-
/**
|
|
621
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
622
|
-
* @beta
|
|
623
|
-
*/
|
|
624
|
-
export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
|
|
625
|
-
Props<CodeSkeletonOwnProps, E>
|
|
626
|
-
|
|
627
|
-
/** @public */
|
|
628
|
-
export declare type ComponentType<P = any> =
|
|
629
|
-
| FunctionComponent<P>
|
|
630
|
-
| ComponentClass<P>
|
|
631
|
-
| ExoticComponent<P>
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* The `Container` component wraps content layout in a defined set of widths.
|
|
635
|
-
*
|
|
636
|
-
* @public
|
|
637
|
-
*/
|
|
638
|
-
export declare function Container<
|
|
639
|
-
E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
|
|
640
|
-
>(props: ContainerProps<E>): React.JSX.Element
|
|
641
|
-
|
|
642
|
-
/** @public */
|
|
643
|
-
export declare type ContainerElementType = BoxElementType
|
|
644
|
-
|
|
645
173
|
/** @public */
|
|
646
|
-
export declare type
|
|
174
|
+
export declare type ContainerSize = (typeof CONTAINER_SIZE)[number];
|
|
647
175
|
|
|
648
|
-
|
|
649
|
-
export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
|
|
650
|
-
ContainerOwnProps,
|
|
651
|
-
E
|
|
652
|
-
>
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* @internal
|
|
656
|
-
*/
|
|
657
|
-
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
658
|
-
|
|
659
|
-
/** @internal */
|
|
660
|
-
export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
176
|
+
declare const DENSITY: readonly ["compact", "regular", "loose"];
|
|
661
177
|
|
|
662
178
|
/** @public */
|
|
663
|
-
export declare
|
|
179
|
+
export declare type Density = (typeof DENSITY)[number];
|
|
664
180
|
|
|
665
|
-
|
|
666
|
-
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
|
|
181
|
+
declare const DISPLAY_BLOCK: readonly ["block", "inline-block", "none"];
|
|
667
182
|
|
|
668
|
-
|
|
669
|
-
export declare const DEFAULT_AVATAR_ELEMENT = 'span'
|
|
183
|
+
declare const DISPLAY_FLEX: readonly ["flex", "inline-flex", "none"];
|
|
670
184
|
|
|
671
|
-
|
|
672
|
-
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
|
|
185
|
+
declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
|
|
673
186
|
|
|
674
187
|
/** @public */
|
|
675
|
-
export declare
|
|
188
|
+
export declare type DisplayBlock = (typeof DISPLAY_BLOCK)[number];
|
|
676
189
|
|
|
677
190
|
/** @public */
|
|
678
|
-
export declare
|
|
679
|
-
|
|
680
|
-
/** @beta */
|
|
681
|
-
export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
|
|
191
|
+
export declare type DisplayFlex = (typeof DISPLAY_FLEX)[number];
|
|
682
192
|
|
|
683
193
|
/** @public */
|
|
684
|
-
export declare
|
|
194
|
+
export declare type DisplayGrid = (typeof DISPLAY_GRID)[number];
|
|
685
195
|
|
|
686
196
|
/** @public */
|
|
687
|
-
export declare
|
|
197
|
+
export declare function Divider(props: DividerProps): JSX.Element;
|
|
688
198
|
|
|
689
199
|
/** @public */
|
|
690
|
-
export declare
|
|
200
|
+
export declare interface DividerProps
|
|
201
|
+
extends React.ComponentProps<"hr">, MarginProps {}
|
|
691
202
|
|
|
692
203
|
/** @public */
|
|
693
|
-
export declare
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
204
|
+
export declare function Eyebrow<T extends ElementType = "span">({
|
|
205
|
+
size,
|
|
206
|
+
weight,
|
|
207
|
+
...props
|
|
208
|
+
}: EyebrowProps<T> &
|
|
209
|
+
Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): JSX.Element;
|
|
697
210
|
|
|
698
|
-
|
|
699
|
-
export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
|
|
211
|
+
declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
|
|
700
212
|
|
|
701
213
|
/** @public */
|
|
702
|
-
export declare
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
/** @public */
|
|
711
|
-
export declare const DEFAULT_GRID_ELEMENT = 'div'
|
|
712
|
-
|
|
713
|
-
/** @public */
|
|
714
|
-
export declare const DEFAULT_HEADING_ELEMENT = 'div'
|
|
715
|
-
|
|
716
|
-
/** @beta */
|
|
717
|
-
export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
|
|
718
|
-
|
|
719
|
-
/** @public */
|
|
720
|
-
export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
|
|
721
|
-
|
|
722
|
-
/** @public */
|
|
723
|
-
export declare const DEFAULT_INLINE_ELEMENT = 'div'
|
|
724
|
-
|
|
725
|
-
/** @public */
|
|
726
|
-
export declare const DEFAULT_KBD_ELEMENT = 'kbd'
|
|
727
|
-
|
|
728
|
-
/** @public */
|
|
729
|
-
export declare const DEFAULT_LABEL_ELEMENT = 'div'
|
|
730
|
-
|
|
731
|
-
/** @beta */
|
|
732
|
-
export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
|
|
733
|
-
|
|
734
|
-
/** @public */
|
|
735
|
-
export declare const DEFAULT_LAYER_ELEMENT = 'div'
|
|
736
|
-
|
|
737
|
-
/** @public */
|
|
738
|
-
export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
|
|
739
|
-
|
|
740
|
-
/** @public */
|
|
741
|
-
export declare const DEFAULT_MENU_ELEMENT = 'div'
|
|
742
|
-
|
|
743
|
-
/** @public */
|
|
744
|
-
export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
|
|
745
|
-
|
|
746
|
-
/** @public */
|
|
747
|
-
export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
|
|
748
|
-
|
|
749
|
-
/** @public */
|
|
750
|
-
export declare const DEFAULT_POPOVER_ELEMENT = 'div'
|
|
214
|
+
export declare interface EyebrowProps<
|
|
215
|
+
T extends React.ElementType = "span",
|
|
216
|
+
> extends TypographyProps {
|
|
217
|
+
/** Element to render */
|
|
218
|
+
as?: T;
|
|
219
|
+
/** CSS **font-size** property */
|
|
220
|
+
size?: Responsive<EyebrowSize>;
|
|
221
|
+
}
|
|
751
222
|
|
|
752
223
|
/** @public */
|
|
753
|
-
export declare
|
|
224
|
+
export declare type EyebrowSize = (typeof EYEBROW_SIZE)[number];
|
|
754
225
|
|
|
755
226
|
/** @public */
|
|
756
|
-
export declare
|
|
227
|
+
export declare function Flex<T extends ElementType = "div">({
|
|
228
|
+
display,
|
|
229
|
+
...props
|
|
230
|
+
}: FlexProps<T> &
|
|
231
|
+
Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): JSX.Element;
|
|
757
232
|
|
|
758
|
-
|
|
759
|
-
|
|
233
|
+
declare const FLEX_DIRECTION: readonly [
|
|
234
|
+
"row",
|
|
235
|
+
"row-reverse",
|
|
236
|
+
"column",
|
|
237
|
+
"column-reverse",
|
|
238
|
+
];
|
|
760
239
|
|
|
761
|
-
|
|
762
|
-
export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
|
|
240
|
+
declare const FLEX_WRAP: readonly ["wrap", "wrap-reverse", "nowrap"];
|
|
763
241
|
|
|
764
|
-
|
|
765
|
-
|
|
242
|
+
declare type FlexChildProps = {
|
|
243
|
+
/** CSS **flex-basis** property */
|
|
244
|
+
flexBasis?: Responsive<string>;
|
|
245
|
+
/** CSS **flex-grow** property */
|
|
246
|
+
flexGrow?: Responsive<number>;
|
|
247
|
+
/** CSS **flex-shrink** property */
|
|
248
|
+
flexShrink?: Responsive<number>;
|
|
249
|
+
};
|
|
766
250
|
|
|
767
251
|
/** @public */
|
|
768
|
-
export declare
|
|
252
|
+
export declare type FlexDirection = (typeof FLEX_DIRECTION)[number];
|
|
769
253
|
|
|
770
254
|
/** @public */
|
|
771
|
-
export declare
|
|
255
|
+
export declare type FlexParentProps = {
|
|
256
|
+
/** CSS **align-items** property */
|
|
257
|
+
alignItems?: Responsive<AlignItems>;
|
|
258
|
+
/** CSS **justify-content** property */
|
|
259
|
+
justifyContent?: Responsive<JustifyContent>;
|
|
260
|
+
/** CSS **flex-direction** property */
|
|
261
|
+
flexDirection?: Responsive<FlexDirection>;
|
|
262
|
+
/** CSS **flex-wrap** property */
|
|
263
|
+
flexWrap?: Responsive<FlexWrap>;
|
|
264
|
+
};
|
|
772
265
|
|
|
773
266
|
/** @public */
|
|
774
|
-
export declare
|
|
267
|
+
export declare interface FlexProps<T extends React.ElementType = "div">
|
|
268
|
+
extends FlexParentProps, GapProps, LayoutProps {
|
|
269
|
+
/** Element to render */
|
|
270
|
+
as?: T;
|
|
271
|
+
/** CSS **display** property */
|
|
272
|
+
display?: Responsive<DisplayFlex>;
|
|
273
|
+
}
|
|
775
274
|
|
|
776
275
|
/** @public */
|
|
777
|
-
export declare
|
|
276
|
+
export declare type FlexWrap = (typeof FLEX_WRAP)[number];
|
|
778
277
|
|
|
779
|
-
|
|
780
|
-
export declare const DEFAULT_TAB_ELEMENT = 'button'
|
|
278
|
+
declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
|
|
781
279
|
|
|
782
280
|
/** @public */
|
|
783
|
-
export declare
|
|
281
|
+
export declare type FontWeight = (typeof FONT_WEIGHT)[number];
|
|
784
282
|
|
|
785
283
|
/** @public */
|
|
786
|
-
export declare
|
|
284
|
+
export declare type GapProps = {
|
|
285
|
+
/** CSS **gap** property */
|
|
286
|
+
gap?: Responsive<SpaceInherit>;
|
|
287
|
+
/** CSS **row-gap** property */
|
|
288
|
+
rowGap?: Responsive<SpaceInherit>;
|
|
289
|
+
/** CSS **column-gap** property */
|
|
290
|
+
columnGap?: Responsive<SpaceInherit>;
|
|
291
|
+
};
|
|
787
292
|
|
|
788
293
|
/** @public */
|
|
789
|
-
export declare
|
|
294
|
+
export declare function Grid<T extends ElementType = "div">({
|
|
295
|
+
display,
|
|
296
|
+
...props
|
|
297
|
+
}: GridProps<T> &
|
|
298
|
+
Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): JSX.Element;
|
|
790
299
|
|
|
791
|
-
|
|
792
|
-
|
|
300
|
+
declare const GRID_AUTO_FLOW: readonly [
|
|
301
|
+
"row",
|
|
302
|
+
"column",
|
|
303
|
+
"row dense",
|
|
304
|
+
"column dense",
|
|
305
|
+
"dense",
|
|
306
|
+
];
|
|
793
307
|
|
|
794
308
|
/** @public */
|
|
795
|
-
export declare
|
|
796
|
-
|
|
797
|
-
/** @beta */
|
|
798
|
-
export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
|
|
309
|
+
export declare type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
|
|
799
310
|
|
|
800
|
-
|
|
801
|
-
|
|
311
|
+
declare type GridChildProps = {
|
|
312
|
+
/** CSS **grid-column** property */
|
|
313
|
+
gridColumn?: Responsive<string>;
|
|
314
|
+
/** CSS **grid-column-start** property */
|
|
315
|
+
gridColumnStart?: Responsive<string>;
|
|
316
|
+
/** CSS **grid-column-end** property */
|
|
317
|
+
gridColumnEnd?: Responsive<string>;
|
|
318
|
+
/** CSS **grid-row** property */
|
|
319
|
+
gridRow?: Responsive<string>;
|
|
320
|
+
/** CSS **grid-row-start** property */
|
|
321
|
+
gridRowStart?: Responsive<string>;
|
|
322
|
+
/** CSS **grid-row-end** property */
|
|
323
|
+
gridRowEnd?: Responsive<string>;
|
|
324
|
+
};
|
|
802
325
|
|
|
803
326
|
/** @public */
|
|
804
|
-
export declare
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
export declare type Delay =
|
|
817
|
-
| number
|
|
818
|
-
| Partial<{
|
|
819
|
-
open: number
|
|
820
|
-
close: number
|
|
821
|
-
}>
|
|
822
|
-
|
|
823
|
-
/**
|
|
824
|
-
* The Dialog component.
|
|
825
|
-
*
|
|
826
|
-
* @public
|
|
827
|
-
*/
|
|
828
|
-
export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
|
|
829
|
-
props: DialogProps<E>,
|
|
830
|
-
): React.JSX.Element
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* @internal
|
|
834
|
-
*/
|
|
835
|
-
export declare const DialogContext: Context<DialogContextValue>
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
839
|
-
* @beta
|
|
840
|
-
*/
|
|
841
|
-
export declare interface DialogContextValue {
|
|
842
|
-
version: 0.0
|
|
843
|
-
position?: ResponsiveProp<DialogPosition>
|
|
844
|
-
zOffset?: ResponsiveProp<number>
|
|
845
|
-
}
|
|
327
|
+
export declare type GridParentProps = {
|
|
328
|
+
/** CSS **grid-auto-flow** property */
|
|
329
|
+
gridAutoFlow?: Responsive<GridAutoFlow>;
|
|
330
|
+
/** CSS **grid-auto-columns** property */
|
|
331
|
+
gridAutoColumns?: Responsive<string>;
|
|
332
|
+
/** CSS **grid-auto-row** property */
|
|
333
|
+
gridAutoRows?: Responsive<string>;
|
|
334
|
+
/** CSS **grid-template-columns** property */
|
|
335
|
+
gridTemplateColumns?: Responsive<string>;
|
|
336
|
+
/** CSS **grid-template-rows** property */
|
|
337
|
+
gridTemplateRows?: Responsive<string>;
|
|
338
|
+
};
|
|
846
339
|
|
|
847
340
|
/** @public */
|
|
848
|
-
export declare
|
|
849
|
-
|
|
850
|
-
/**
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
* @beta
|
|
855
|
-
*/
|
|
856
|
-
__unstable_autoFocus?: boolean
|
|
857
|
-
/**
|
|
858
|
-
* @beta
|
|
859
|
-
*/
|
|
860
|
-
__unstable_hideCloseButton?: boolean
|
|
861
|
-
/**
|
|
862
|
-
* Whether the dialog should animate in on mount.
|
|
863
|
-
*
|
|
864
|
-
* @beta
|
|
865
|
-
* @defaultValue false
|
|
866
|
-
*/
|
|
867
|
-
animate?: boolean
|
|
868
|
-
cardRadius?: ResponsiveProp<Radius>
|
|
869
|
-
contentRef?: ForwardedRef<HTMLDivElement>
|
|
870
|
-
footer?: ReactNode
|
|
871
|
-
header?: ReactNode
|
|
872
|
-
id: string
|
|
873
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
874
|
-
onActivate?: LayerProps['onActivate']
|
|
875
|
-
onClickOutside?: () => void
|
|
876
|
-
onClose?: () => void
|
|
877
|
-
open?: boolean
|
|
878
|
-
portal?: string
|
|
879
|
-
position?: ResponsiveProp<DialogPosition>
|
|
880
|
-
scheme?: ColorScheme
|
|
881
|
-
tone?: CardTone | 'inherit'
|
|
882
|
-
zOffset?: number | number[]
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
/** @public */
|
|
886
|
-
export declare type DialogPosition = 'absolute' | 'fixed'
|
|
887
|
-
|
|
888
|
-
/** @public */
|
|
889
|
-
export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
|
|
890
|
-
DialogOwnProps,
|
|
891
|
-
E
|
|
892
|
-
>
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
896
|
-
* @beta
|
|
897
|
-
*/
|
|
898
|
-
export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
902
|
-
* @beta
|
|
903
|
-
*/
|
|
904
|
-
export declare interface DialogProviderProps {
|
|
905
|
-
children?: ReactNode
|
|
906
|
-
position?: ResponsiveProp<DialogPosition>
|
|
907
|
-
zOffset?: ResponsiveProp<number>
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* DO NOT USE IN PRODUCTION.
|
|
912
|
-
* @beta
|
|
913
|
-
*/
|
|
914
|
-
export declare function ElementQuery<
|
|
915
|
-
E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
|
|
916
|
-
>(props: ElementQueryProps<E>): React.JSX.Element
|
|
917
|
-
|
|
918
|
-
/** @beta */
|
|
919
|
-
export declare type ElementQueryElementType = 'div' | ComponentType
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* DO NOT USE IN PRODUCTION.
|
|
923
|
-
* @beta
|
|
924
|
-
*/
|
|
925
|
-
export declare type ElementQueryOwnProps = {
|
|
926
|
-
media?: number[]
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* DO NOT USE IN PRODUCTION.
|
|
931
|
-
* @beta
|
|
932
|
-
*/
|
|
933
|
-
export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
|
|
934
|
-
Props<ElementQueryOwnProps, E>
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* @beta
|
|
938
|
-
*/
|
|
939
|
-
export declare interface ElementRectValue {
|
|
940
|
-
width: number
|
|
941
|
-
height: number
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* @beta
|
|
946
|
-
*/
|
|
947
|
-
export declare interface ElementSize {
|
|
948
|
-
content: ElementRectValue
|
|
949
|
-
border: ElementRectValue
|
|
950
|
-
/** @deprecated INTERNAL ONLY */
|
|
951
|
-
_contentRect: DOMRectReadOnly
|
|
341
|
+
export declare interface GridProps<T extends React.ElementType = "div">
|
|
342
|
+
extends GridParentProps, GapProps, LayoutProps {
|
|
343
|
+
/** Element to render */
|
|
344
|
+
as?: T;
|
|
345
|
+
/** CSS **display** property */
|
|
346
|
+
display?: Responsive<DisplayGrid>;
|
|
952
347
|
}
|
|
953
348
|
|
|
954
|
-
/**
|
|
955
|
-
* @internal
|
|
956
|
-
*/
|
|
957
|
-
export declare interface _ElementSizeListener {
|
|
958
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* @internal
|
|
963
|
-
*/
|
|
964
|
-
export declare interface _ElementSizeObserver {
|
|
965
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* @internal
|
|
970
|
-
*/
|
|
971
|
-
export declare const _elementSizeObserver: _ElementSizeObserver
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* @internal
|
|
975
|
-
*/
|
|
976
|
-
export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
|
|
977
|
-
|
|
978
349
|
/** @public */
|
|
979
|
-
export declare
|
|
350
|
+
export declare function Heading<T extends ElementType = "h2">({
|
|
351
|
+
size,
|
|
352
|
+
weight,
|
|
353
|
+
...props
|
|
354
|
+
}: HeadingProps &
|
|
355
|
+
Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): JSX.Element;
|
|
980
356
|
|
|
981
|
-
|
|
982
|
-
export declare type EmptyProps = {}
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* DO NOT USE IN PRODUCTION
|
|
986
|
-
* @beta
|
|
987
|
-
*/
|
|
988
|
-
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
989
|
-
state: ErrorBoundaryState
|
|
990
|
-
static displayName: string
|
|
991
|
-
static getDerivedStateFromError(error: Error): ErrorBoundaryState
|
|
992
|
-
componentDidCatch(error: Error, info: ErrorInfo): void
|
|
993
|
-
render(): ReactNode
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* DO NOT USE IN PRODUCTION
|
|
998
|
-
* @beta
|
|
999
|
-
*/
|
|
1000
|
-
export declare type ErrorBoundaryProps = PropsWithChildren<{
|
|
1001
|
-
onCatch: (params: {error: Error; info: ErrorInfo}) => void
|
|
1002
|
-
}>
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* DO NOT USE IN PRODUCTION
|
|
1006
|
-
* @beta
|
|
1007
|
-
*/
|
|
1008
|
-
export declare interface ErrorBoundaryState {
|
|
1009
|
-
error: Error | null
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
1014
|
-
*
|
|
1015
|
-
* @public
|
|
1016
|
-
*/
|
|
1017
|
-
export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
|
|
1018
|
-
props: FlexProps<E>,
|
|
1019
|
-
): React.JSX.Element
|
|
357
|
+
declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
1020
358
|
|
|
1021
|
-
|
|
1022
|
-
export declare type FlexElementType = BoxElementType
|
|
359
|
+
declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
1023
360
|
|
|
1024
361
|
/** @public */
|
|
1025
|
-
export declare
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
direction?: ResponsiveProp<FlexDirection>
|
|
1031
|
-
justify?: ResponsiveProp<JustifyContent>
|
|
1032
|
-
wrap?: ResponsiveProp<FlexWrap>
|
|
362
|
+
export declare interface HeadingProps extends TypographyProps {
|
|
363
|
+
/** Element to render */
|
|
364
|
+
as?: HeadingTag;
|
|
365
|
+
/** CSS **font-size** property */
|
|
366
|
+
size?: Responsive<HeadingSize>;
|
|
1033
367
|
}
|
|
1034
368
|
|
|
1035
369
|
/** @public */
|
|
1036
|
-
export declare type
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* @internal
|
|
1040
|
-
*/
|
|
1041
|
-
export declare function focusFirstDescendant(element: HTMLElement): boolean
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* @internal
|
|
1045
|
-
*/
|
|
1046
|
-
export declare function focusLastDescendant(element: HTMLElement): boolean
|
|
370
|
+
export declare type HeadingSize = (typeof HEADING_SIZE)[number];
|
|
1047
371
|
|
|
1048
|
-
|
|
1049
|
-
* @internal
|
|
1050
|
-
*/
|
|
1051
|
-
export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
|
|
372
|
+
declare type HeadingTag = (typeof HEADING_TAG)[number];
|
|
1052
373
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* The `Grid` component is for building 2-dimensional layers (based on CSS grid).
|
|
1063
|
-
*
|
|
1064
|
-
* @public
|
|
1065
|
-
*/
|
|
1066
|
-
export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
|
|
1067
|
-
props: GridProps<E>,
|
|
1068
|
-
): React.JSX.Element
|
|
374
|
+
declare type HeightProps = {
|
|
375
|
+
/** CSS **height** property */
|
|
376
|
+
height?: Responsive<string>;
|
|
377
|
+
/** CSS **min-height** property */
|
|
378
|
+
minHeight?: Responsive<string>;
|
|
379
|
+
/** CSS **max-height** property */
|
|
380
|
+
maxHeight?: Responsive<string>;
|
|
381
|
+
};
|
|
1069
382
|
|
|
1070
383
|
/** @public */
|
|
1071
|
-
export declare
|
|
384
|
+
export declare function HStack<T extends ElementType = "div">(
|
|
385
|
+
props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
|
|
386
|
+
): JSX.Element;
|
|
1072
387
|
|
|
1073
388
|
/** @public */
|
|
1074
|
-
export declare
|
|
389
|
+
export declare interface HStackProps<
|
|
390
|
+
T extends React.ElementType = "div",
|
|
391
|
+
> extends Pick<GapProps, "gap"> {
|
|
392
|
+
/** Element to render */
|
|
393
|
+
as?: T;
|
|
394
|
+
}
|
|
1075
395
|
|
|
1076
396
|
/** @public */
|
|
1077
|
-
export declare
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* @internal
|
|
1081
|
-
*/
|
|
1082
|
-
export declare function _hasFocus(element: HTMLElement): boolean
|
|
397
|
+
export declare function Icon({ size, ...props }: IconProps): JSX.Element;
|
|
1083
398
|
|
|
1084
|
-
|
|
1085
|
-
* Typographic headings.
|
|
1086
|
-
*
|
|
1087
|
-
* @public
|
|
1088
|
-
*/
|
|
1089
|
-
export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
|
|
1090
|
-
props: HeadingProps<E>,
|
|
1091
|
-
): React.JSX.Element
|
|
399
|
+
declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
|
|
1092
400
|
|
|
1093
401
|
/** @public */
|
|
1094
|
-
export declare
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
| 'h3'
|
|
1099
|
-
| 'h4'
|
|
1100
|
-
| 'h5'
|
|
1101
|
-
| 'h6'
|
|
1102
|
-
| 'label'
|
|
1103
|
-
| 'span'
|
|
1104
|
-
| ComponentType
|
|
402
|
+
export declare function IconButton<T extends ElementType = "button">(
|
|
403
|
+
props: IconButtonProps<T> &
|
|
404
|
+
Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
|
|
405
|
+
): JSX.Element;
|
|
1105
406
|
|
|
1106
407
|
/** @public */
|
|
1107
|
-
export declare
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
|
|
1117
|
-
* @beta
|
|
1118
|
-
*/
|
|
1119
|
-
export declare function HeadingSkeleton<
|
|
1120
|
-
E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
|
|
1121
|
-
>(props: HeadingSkeletonProps<E>): React.JSX.Element
|
|
1122
|
-
|
|
1123
|
-
/** @beta */
|
|
1124
|
-
export declare type HeadingSkeletonElementType = SkeletonElementType
|
|
1125
|
-
|
|
1126
|
-
/** @beta */
|
|
1127
|
-
export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
|
|
1128
|
-
size?: ResponsiveProp<FontHeadingSize>
|
|
408
|
+
export declare interface IconButtonProps<
|
|
409
|
+
T extends React_2.ElementType = "button",
|
|
410
|
+
> extends Pick<
|
|
411
|
+
ButtonProps<T>,
|
|
412
|
+
"as" | "density" | "level" | "loading" | "tone"
|
|
413
|
+
> {
|
|
414
|
+
/** Button label */
|
|
415
|
+
"aria-label": string;
|
|
416
|
+
/** Icon */
|
|
417
|
+
icon: React_2.ComponentType<SVGProps<SVGSVGElement>>;
|
|
1129
418
|
}
|
|
1130
419
|
|
|
1131
|
-
/**
|
|
1132
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1133
|
-
* @beta
|
|
1134
|
-
*/
|
|
1135
|
-
export declare type HeadingSkeletonProps<
|
|
1136
|
-
E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
|
|
1137
|
-
> = Props<HeadingSkeletonOwnProps, E>
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
1141
|
-
*
|
|
1142
|
-
* @public
|
|
1143
|
-
*/
|
|
1144
|
-
export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
|
|
1145
|
-
props: HotkeysProps<E>,
|
|
1146
|
-
): React.JSX.Element | undefined
|
|
1147
|
-
|
|
1148
420
|
/** @public */
|
|
1149
|
-
export declare
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
421
|
+
export declare interface IconProps
|
|
422
|
+
extends
|
|
423
|
+
ComponentProps<"svg">,
|
|
424
|
+
Pick<TypographyProps, "muted">,
|
|
425
|
+
MarginProps,
|
|
426
|
+
ToneProps {
|
|
427
|
+
/** Icon to render */
|
|
428
|
+
icon: React.ComponentType<SVGProps<SVGSVGElement>>;
|
|
429
|
+
/** CSS **font-size** property */
|
|
430
|
+
size?: Responsive<IconSize>;
|
|
1156
431
|
}
|
|
1157
432
|
|
|
1158
433
|
/** @public */
|
|
1159
|
-
export declare type
|
|
1160
|
-
HotkeysOwnProps,
|
|
1161
|
-
E
|
|
1162
|
-
>
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
1166
|
-
*
|
|
1167
|
-
* @public
|
|
1168
|
-
*/
|
|
1169
|
-
export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
|
|
1170
|
-
props: InlineProps<E>,
|
|
1171
|
-
): React.JSX.Element
|
|
1172
|
-
|
|
1173
|
-
/** @public */
|
|
1174
|
-
export declare type InlineElementType = BoxElementType
|
|
1175
|
-
|
|
1176
|
-
/** @public */
|
|
1177
|
-
export declare type InlineOwnProps = Omit<
|
|
1178
|
-
BoxOwnProps,
|
|
1179
|
-
| 'alignItems'
|
|
1180
|
-
| 'flexDirection'
|
|
1181
|
-
| 'flexWrap'
|
|
1182
|
-
| 'justifyContent'
|
|
1183
|
-
| 'gridAutoColumns'
|
|
1184
|
-
| 'gridAutoFlow'
|
|
1185
|
-
| 'gridAutoRows'
|
|
1186
|
-
| 'gridColumnEnd'
|
|
1187
|
-
| 'gridColumnStart'
|
|
1188
|
-
| 'gridColumn'
|
|
1189
|
-
| 'gridRowEnd'
|
|
1190
|
-
| 'gridRowStart'
|
|
1191
|
-
| 'gridRow'
|
|
1192
|
-
| 'gridTemplateColumns'
|
|
1193
|
-
| 'gridTemplateRows'
|
|
1194
|
-
>
|
|
1195
|
-
|
|
1196
|
-
/** @public */
|
|
1197
|
-
export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
|
|
1198
|
-
InlineOwnProps,
|
|
1199
|
-
E
|
|
1200
|
-
>
|
|
1201
|
-
|
|
1202
|
-
/**
|
|
1203
|
-
* @internal
|
|
1204
|
-
*/
|
|
1205
|
-
export declare function _isEnterToClickElement(element: HTMLElement): boolean
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* @internal
|
|
1209
|
-
*/
|
|
1210
|
-
export declare function isFocusable(element: HTMLElement): boolean
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* @internal
|
|
1214
|
-
*/
|
|
1215
|
-
export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* @internal
|
|
1219
|
-
*/
|
|
1220
|
-
export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* @internal
|
|
1224
|
-
*/
|
|
1225
|
-
export declare function isHTMLElement(node: unknown): node is HTMLElement
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* @internal
|
|
1229
|
-
*/
|
|
1230
|
-
export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
* @internal
|
|
1234
|
-
*/
|
|
1235
|
-
export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* @internal
|
|
1239
|
-
*/
|
|
1240
|
-
export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* @internal
|
|
1244
|
-
*/
|
|
1245
|
-
export declare function _isScrollable(el: Node): boolean
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* Used to define some text as keyboard input.
|
|
1249
|
-
*
|
|
1250
|
-
* @public
|
|
1251
|
-
*/
|
|
1252
|
-
export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
|
|
1253
|
-
props: KBDProps<E>,
|
|
1254
|
-
): React.JSX.Element
|
|
1255
|
-
|
|
1256
|
-
/** @public */
|
|
1257
|
-
export declare type KBDElementType = 'kbd' | ComponentType
|
|
1258
|
-
|
|
1259
|
-
/** @public */
|
|
1260
|
-
export declare type KBDOwnProps = BoxOwnProps &
|
|
1261
|
-
RadiusStyleProps & {
|
|
1262
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
/** @public */
|
|
1266
|
-
export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
|
|
1267
|
-
|
|
1268
|
-
/**
|
|
1269
|
-
* Typographic labels.
|
|
1270
|
-
*
|
|
1271
|
-
* @public
|
|
1272
|
-
*/
|
|
1273
|
-
export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
|
|
1274
|
-
props: LabelProps<E>,
|
|
1275
|
-
): React.JSX.Element
|
|
1276
|
-
|
|
1277
|
-
/** @public */
|
|
1278
|
-
export declare type LabelElementType =
|
|
1279
|
-
| 'div'
|
|
1280
|
-
| 'h1'
|
|
1281
|
-
| 'h2'
|
|
1282
|
-
| 'h3'
|
|
1283
|
-
| 'h4'
|
|
1284
|
-
| 'h5'
|
|
1285
|
-
| 'h6'
|
|
1286
|
-
| 'label'
|
|
1287
|
-
| 'li'
|
|
1288
|
-
| 'p'
|
|
1289
|
-
| 'span'
|
|
1290
|
-
| ComponentType
|
|
1291
|
-
|
|
1292
|
-
/** @public */
|
|
1293
|
-
export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
|
|
1294
|
-
|
|
1295
|
-
/** @public */
|
|
1296
|
-
export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
|
|
1297
|
-
LabelOwnProps,
|
|
1298
|
-
E
|
|
1299
|
-
>
|
|
1300
|
-
|
|
1301
|
-
/**
|
|
1302
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1303
|
-
* @beta
|
|
1304
|
-
*/
|
|
1305
|
-
export declare function LabelSkeleton<
|
|
1306
|
-
E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
|
|
1307
|
-
>(props: LabelSkeletonProps<E>): React.JSX.Element
|
|
434
|
+
export declare type IconSize = (typeof ICON_SIZE)[number];
|
|
1308
435
|
|
|
1309
436
|
/** @beta */
|
|
1310
|
-
export declare
|
|
437
|
+
export declare function Indicator<T extends ElementType = "span">({
|
|
438
|
+
tone,
|
|
439
|
+
...props
|
|
440
|
+
}: IndicatorProps<T> &
|
|
441
|
+
Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): JSX.Element;
|
|
1311
442
|
|
|
1312
443
|
/** @beta */
|
|
1313
|
-
export declare
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
*/
|
|
1321
|
-
export declare type LabelSkeletonProps<
|
|
1322
|
-
E extends LabelSkeletonElementType = LabelSkeletonElementType,
|
|
1323
|
-
> = Props<LabelSkeletonOwnProps, E>
|
|
1324
|
-
|
|
1325
|
-
/** @public */
|
|
1326
|
-
export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
|
|
1327
|
-
props: LayerProps<E>,
|
|
1328
|
-
): React.JSX.Element
|
|
1329
|
-
|
|
1330
|
-
/** @public */
|
|
1331
|
-
export declare interface LayerContextValue {
|
|
1332
|
-
version: 0.0
|
|
1333
|
-
isTopLayer: boolean
|
|
1334
|
-
level?: number
|
|
1335
|
-
registerChild: (childLevel?: number) => () => void
|
|
1336
|
-
size: number
|
|
1337
|
-
zIndex: number
|
|
444
|
+
export declare interface IndicatorProps<
|
|
445
|
+
T extends React.ElementType = "span",
|
|
446
|
+
> extends ToneProps {
|
|
447
|
+
/** Element to render */
|
|
448
|
+
as?: T;
|
|
449
|
+
/** Label for aria-label attribute */
|
|
450
|
+
label?: string;
|
|
1338
451
|
}
|
|
1339
452
|
|
|
1340
453
|
/** @public */
|
|
1341
|
-
export declare
|
|
454
|
+
export declare function IndicatorStack<T extends ElementType = "div">(
|
|
455
|
+
props: IndicatorStackProps<T> &
|
|
456
|
+
Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
|
|
457
|
+
): JSX.Element;
|
|
1342
458
|
|
|
1343
459
|
/** @public */
|
|
1344
|
-
export declare
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
460
|
+
export declare interface IndicatorStackProps<
|
|
461
|
+
T extends React.ElementType = "div",
|
|
462
|
+
> {
|
|
463
|
+
/** Element to render */
|
|
464
|
+
as?: T;
|
|
1348
465
|
}
|
|
1349
466
|
|
|
467
|
+
/** @deprecated Use HStack component instead */
|
|
1350
468
|
/** @public */
|
|
1351
|
-
export declare
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
>
|
|
1355
|
-
|
|
1356
|
-
/** @public */
|
|
1357
|
-
export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
|
|
1358
|
-
|
|
1359
|
-
/** @public */
|
|
1360
|
-
export declare interface LayerProviderProps {
|
|
1361
|
-
children?: ReactNode
|
|
1362
|
-
zOffset?: ResponsiveProp<number>
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* @internal
|
|
1367
|
-
*/
|
|
1368
|
-
export declare interface _MediaStore {
|
|
1369
|
-
subscribe: (onStoreChange: () => void) => () => void
|
|
1370
|
-
getSnapshot: () => Breakpoint
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
/**
|
|
1374
|
-
* The `Menu` component is a building block for application menus.
|
|
1375
|
-
*
|
|
1376
|
-
* @public
|
|
1377
|
-
*/
|
|
1378
|
-
export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
|
|
1379
|
-
props: MenuProps<E>,
|
|
1380
|
-
): React.JSX.Element
|
|
1381
|
-
|
|
1382
|
-
/**
|
|
1383
|
-
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
1384
|
-
*
|
|
1385
|
-
* @public
|
|
1386
|
-
*/
|
|
1387
|
-
export declare function MenuButton(props: MenuButtonProps): React.JSX.Element
|
|
469
|
+
export declare function Inline<T extends ElementType = "div">(
|
|
470
|
+
props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
|
|
471
|
+
): JSX.Element;
|
|
1388
472
|
|
|
473
|
+
/** @deprecated Use HStack component instead */
|
|
1389
474
|
/** @public */
|
|
1390
|
-
export declare
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
menu?: ReactElement
|
|
1398
|
-
onClose?: () => void
|
|
1399
|
-
onOpen?: () => void
|
|
1400
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1401
|
-
ref?: ForwardedRef<HTMLButtonElement | null>
|
|
475
|
+
export declare interface InlineProps<
|
|
476
|
+
T extends React.ElementType = "div",
|
|
477
|
+
> extends PaddingProps {
|
|
478
|
+
/** Element to render */
|
|
479
|
+
as?: T;
|
|
480
|
+
/** CSS **gap** property */
|
|
481
|
+
gap?: Responsive<SpaceInherit>;
|
|
1402
482
|
}
|
|
1403
483
|
|
|
1404
|
-
|
|
1405
|
-
export declare function MenuDivider<
|
|
1406
|
-
E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
1407
|
-
>(props: MenuDividerProps<E>): React.JSX.Element
|
|
484
|
+
declare const INTERACTIVE_TAG: readonly ["button", "a"];
|
|
1408
485
|
|
|
1409
|
-
|
|
1410
|
-
|
|
486
|
+
declare type InteractiveAs<T extends React.ElementType> =
|
|
487
|
+
T extends InteractiveTag ? T : T extends string ? never : T;
|
|
1411
488
|
|
|
1412
|
-
|
|
1413
|
-
export declare type MenuDividerOwnProps = {}
|
|
489
|
+
declare type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
|
|
1414
490
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
491
|
+
declare const JUSTIFY_CONTENT: readonly [
|
|
492
|
+
"flex-start",
|
|
493
|
+
"flex-end",
|
|
494
|
+
"center",
|
|
495
|
+
"space-between",
|
|
496
|
+
"space-around",
|
|
497
|
+
"space-evenly",
|
|
498
|
+
];
|
|
1421
499
|
|
|
1422
500
|
/** @public */
|
|
1423
|
-
export declare
|
|
1424
|
-
E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
|
|
1425
|
-
>(props: MenuGroupProps<E>): React.JSX.Element
|
|
501
|
+
export declare type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
|
|
1426
502
|
|
|
1427
|
-
/** @
|
|
1428
|
-
export declare
|
|
503
|
+
/** @beta */
|
|
504
|
+
export declare function Label(props: LabelProps): JSX.Element;
|
|
1429
505
|
|
|
1430
|
-
/** @
|
|
1431
|
-
export declare
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
menu?: Omit<
|
|
1437
|
-
MenuProps<typeof DEFAULT_MENU_ELEMENT>,
|
|
1438
|
-
| 'onClickOutside'
|
|
1439
|
-
| 'onEscape'
|
|
1440
|
-
| 'onItemClick'
|
|
1441
|
-
| 'onKeyDown'
|
|
1442
|
-
| 'onMouseEnter'
|
|
1443
|
-
| 'registerElement'
|
|
1444
|
-
| 'shouldFocus'
|
|
1445
|
-
| 'onBlurCapture'
|
|
1446
|
-
>
|
|
1447
|
-
padding?: ResponsiveProp<Space>
|
|
1448
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
1449
|
-
text?: ReactNode
|
|
1450
|
-
tone?: ElementTone
|
|
506
|
+
/** @beta */
|
|
507
|
+
export declare interface LabelProps
|
|
508
|
+
extends React.ComponentProps<"label">, MarginProps {
|
|
509
|
+
/** Element to render */
|
|
510
|
+
disabled?: boolean;
|
|
511
|
+
error?: boolean;
|
|
1451
512
|
}
|
|
1452
513
|
|
|
1453
514
|
/** @public */
|
|
1454
|
-
export declare
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
export declare type MenuItemOwnProps = GapStyleProps &
|
|
1469
|
-
PaddingStyleProps &
|
|
1470
|
-
RadiusStyleProps & {
|
|
1471
|
-
disabled?: boolean
|
|
1472
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
1473
|
-
hotkeys?: string[]
|
|
1474
|
-
icon?: ElementType_2 | ReactNode
|
|
1475
|
-
iconRight?: ElementType_2 | ReactNode
|
|
1476
|
-
pressed?: boolean
|
|
1477
|
-
selected?: boolean
|
|
1478
|
-
text?: ReactNode
|
|
1479
|
-
tone?: ElementTone
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
/** @public */
|
|
1483
|
-
export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Props<
|
|
1484
|
-
MenuItemOwnProps,
|
|
1485
|
-
E
|
|
1486
|
-
>
|
|
515
|
+
export declare interface LayoutProps
|
|
516
|
+
extends
|
|
517
|
+
ToneProps,
|
|
518
|
+
WidthProps,
|
|
519
|
+
HeightProps,
|
|
520
|
+
MarginProps,
|
|
521
|
+
BorderProps,
|
|
522
|
+
PaddingProps,
|
|
523
|
+
PositionProps,
|
|
524
|
+
OverflowProps,
|
|
525
|
+
FlexChildProps,
|
|
526
|
+
GridChildProps,
|
|
527
|
+
ZIndexProps,
|
|
528
|
+
ShadowProps {}
|
|
1487
529
|
|
|
1488
|
-
/** @
|
|
1489
|
-
export declare
|
|
1490
|
-
'gap'?: ResponsiveProp<Space>
|
|
1491
|
-
'onClickOutside'?: (event: MouseEvent) => void
|
|
1492
|
-
'onEscape'?: () => void
|
|
1493
|
-
'onItemClick'?: () => void
|
|
1494
|
-
'onItemSelect'?: (index: number) => void
|
|
1495
|
-
'originElement'?: HTMLElement | null
|
|
1496
|
-
'registerElement'?: (el: HTMLElement) => () => void
|
|
1497
|
-
'shouldFocus'?: 'first' | 'last' | null
|
|
1498
|
-
'aria-labelledby'?: string
|
|
1499
|
-
}
|
|
530
|
+
/** @beta */
|
|
531
|
+
export declare function Link({ underlined, ...props }: LinkProps): JSX.Element;
|
|
1500
532
|
|
|
1501
|
-
/** @
|
|
1502
|
-
export declare
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
* Placement of floating UI elements.
|
|
1506
|
-
*
|
|
1507
|
-
* @public
|
|
1508
|
-
*/
|
|
1509
|
-
export declare type Placement =
|
|
1510
|
-
| 'top'
|
|
1511
|
-
| 'top-start'
|
|
1512
|
-
| 'top-end'
|
|
1513
|
-
| 'right'
|
|
1514
|
-
| 'right-start'
|
|
1515
|
-
| 'right-end'
|
|
1516
|
-
| 'bottom'
|
|
1517
|
-
| 'bottom-start'
|
|
1518
|
-
| 'bottom-end'
|
|
1519
|
-
| 'left'
|
|
1520
|
-
| 'left-start'
|
|
1521
|
-
| 'left-end'
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* The `Popover` component is used to display some content on top of another.
|
|
1525
|
-
*
|
|
1526
|
-
* @public
|
|
1527
|
-
*/
|
|
1528
|
-
export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
|
|
1529
|
-
props: PopoverProps<E>,
|
|
1530
|
-
): React.JSX.Element
|
|
1531
|
-
|
|
1532
|
-
/** @public */
|
|
1533
|
-
export declare type PopoverElementType = 'div' | ComponentType
|
|
1534
|
-
|
|
1535
|
-
/**
|
|
1536
|
-
* @beta
|
|
1537
|
-
*/
|
|
1538
|
-
export declare type PopoverMargins = [number, number, number, number]
|
|
1539
|
-
|
|
1540
|
-
/** @public */
|
|
1541
|
-
export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
|
|
1542
|
-
/** @beta */
|
|
1543
|
-
__unstable_margins?: PopoverMargins
|
|
1544
|
-
/**
|
|
1545
|
-
* Whether the popover should animate in and out.
|
|
1546
|
-
*
|
|
1547
|
-
* @beta
|
|
1548
|
-
* @defaultValue false
|
|
1549
|
-
*/
|
|
1550
|
-
animate?: boolean
|
|
1551
|
-
arrow?: boolean
|
|
1552
|
-
children?: ReactElement<{
|
|
1553
|
-
ref: ForwardedRef<HTMLElement>
|
|
1554
|
-
}>
|
|
1555
|
-
/**
|
|
1556
|
-
* When `true`, prevent overflow within the current boundary:
|
|
1557
|
-
* - by flipping on its side axis
|
|
1558
|
-
* - by resizing
|
|
1559
|
-
*
|
|
1560
|
-
* Note that:
|
|
1561
|
-
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1562
|
-
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1563
|
-
*
|
|
1564
|
-
* @defaultValue false
|
|
1565
|
-
*/
|
|
1566
|
-
constrainSize?: boolean
|
|
1567
|
-
content?: ReactNode
|
|
1568
|
-
disabled?: boolean
|
|
1569
|
-
fallbackPlacements?: Placement[]
|
|
1570
|
-
floatingBoundary?: HTMLElement | null
|
|
1571
|
-
/**
|
|
1572
|
-
* When `true`, set the maximum width to match the reference element, and also prevent overflow within
|
|
1573
|
-
* the current boundary by resizing.
|
|
1574
|
-
*
|
|
1575
|
-
* Note that setting `constrainSize` to `true` also causes the popover to resize
|
|
1576
|
-
*
|
|
1577
|
-
* @defaultValue false
|
|
1578
|
-
*/
|
|
1579
|
-
matchReferenceWidth?: boolean
|
|
1580
|
-
/**
|
|
1581
|
-
* When true, blocks all pointer interaction with elements beneath the popover until closed.
|
|
1582
|
-
*
|
|
1583
|
-
* @beta
|
|
1584
|
-
* @defaultValue false
|
|
1585
|
-
*/
|
|
1586
|
-
modal?: boolean
|
|
1587
|
-
open?: boolean
|
|
1588
|
-
placement?: Placement
|
|
533
|
+
/** @beta */
|
|
534
|
+
export declare interface LinkProps extends React.ComponentProps<"a"> {
|
|
535
|
+
/** If true, sets `target="_blank"` and `rel="noopener noreferrer"` */
|
|
536
|
+
openInNewTab?: boolean;
|
|
1589
537
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
* fallback placements in order. Whichever fits in the viewport first.
|
|
1592
|
-
*
|
|
1593
|
-
* When 'autoPlacement', the initial placement and all fallback placements are evaluated
|
|
1594
|
-
* and the placement with the most viewport space available.
|
|
538
|
+
* If true, sets `text-decoration: underline`
|
|
1595
539
|
*
|
|
1596
|
-
*
|
|
1597
|
-
*/
|
|
1598
|
-
placementStrategy?: 'flip' | 'autoPlacement'
|
|
1599
|
-
/** Whether or not to render the popover in a portal element. */
|
|
1600
|
-
portal?: boolean | string
|
|
1601
|
-
preventOverflow?: boolean
|
|
1602
|
-
referenceBoundary?: HTMLElement | null
|
|
1603
|
-
/**
|
|
1604
|
-
* When defined, the popover will be positioned relative to this element.
|
|
1605
|
-
* The children of the popover won't be rendered.
|
|
540
|
+
* @defaultValue true
|
|
1606
541
|
*/
|
|
1607
|
-
|
|
1608
|
-
/** @beta */
|
|
1609
|
-
updateRef?: Ref<PopoverUpdateCallback | undefined>
|
|
1610
|
-
width?: ResponsiveProp<MaxWidth>
|
|
542
|
+
underlined?: boolean;
|
|
1611
543
|
}
|
|
1612
544
|
|
|
1613
|
-
/** @public */
|
|
1614
|
-
export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
|
|
1615
|
-
PopoverOwnProps,
|
|
1616
|
-
E
|
|
1617
|
-
>
|
|
1618
|
-
|
|
1619
545
|
/** @beta */
|
|
1620
|
-
export declare
|
|
546
|
+
export declare const List: typeof ListRoot;
|
|
1621
547
|
|
|
1622
|
-
|
|
1623
|
-
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
548
|
+
declare const LIST_TAG: readonly ["ol", "ul"];
|
|
1624
549
|
|
|
1625
|
-
|
|
1626
|
-
|
|
550
|
+
declare function ListButtonItem<T extends ElementType = "button">({
|
|
551
|
+
density,
|
|
552
|
+
...props
|
|
553
|
+
}: ListButtonItemProps<T> &
|
|
554
|
+
Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): JSX.Element;
|
|
1627
555
|
|
|
1628
|
-
/** @
|
|
1629
|
-
export declare interface
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
/** @public */
|
|
1637
|
-
export declare interface PortalProps {
|
|
1638
|
-
children: ReactNode
|
|
1639
|
-
/**
|
|
1640
|
-
* @beta This API might change. DO NOT USE IN PRODUCTION.
|
|
1641
|
-
*/
|
|
1642
|
-
__unstable_name?: string
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
/** @public */
|
|
1646
|
-
export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
|
|
1647
|
-
|
|
1648
|
-
/** @public */
|
|
1649
|
-
export declare interface PortalProviderProps {
|
|
1650
|
-
children: ReactNode
|
|
1651
|
-
element?: HTMLElement | null
|
|
1652
|
-
/**
|
|
1653
|
-
* @beta
|
|
1654
|
-
*/
|
|
1655
|
-
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
556
|
+
/** @beta */
|
|
557
|
+
export declare interface ListButtonItemProps<
|
|
558
|
+
T extends React_2.ElementType = "button",
|
|
559
|
+
> extends ListItemProps {
|
|
560
|
+
/** Element to render */
|
|
561
|
+
as?: InteractiveAs<T>;
|
|
562
|
+
/** Selected state */
|
|
563
|
+
selected?: boolean;
|
|
1656
564
|
}
|
|
1657
565
|
|
|
1658
|
-
|
|
1659
|
-
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
1660
|
-
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
1661
|
-
P & {
|
|
1662
|
-
as?: E
|
|
1663
|
-
}
|
|
1664
|
-
>
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* The `Radio` component allows the user to select one option from a set.
|
|
1668
|
-
*
|
|
1669
|
-
* @public
|
|
1670
|
-
*/
|
|
1671
|
-
export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
|
|
1672
|
-
props: RadioProps<E>,
|
|
1673
|
-
): React.JSX.Element
|
|
566
|
+
declare function ListItem({ density, ...props }: ListItemProps): JSX.Element;
|
|
1674
567
|
|
|
1675
|
-
|
|
1676
|
-
export declare type RadioElementType = 'input' | ComponentType
|
|
568
|
+
declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
|
|
1677
569
|
|
|
1678
|
-
/** @
|
|
1679
|
-
export declare
|
|
1680
|
-
|
|
570
|
+
/** @beta */
|
|
571
|
+
export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
|
|
572
|
+
/** Composite prop for setting padding and gap */
|
|
573
|
+
density?: Responsive<Density>;
|
|
574
|
+
/** Starting slot */
|
|
575
|
+
start?: React_2.ReactNode;
|
|
576
|
+
/** Ending slot */
|
|
577
|
+
end?: React_2.ReactNode;
|
|
1681
578
|
}
|
|
1682
579
|
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
|
|
1696
|
-
*/
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
/**
|
|
1700
|
-
* @internal
|
|
1701
|
-
*/
|
|
1702
|
-
export declare const _ResizeObserver: typeof ResizeObserver
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
* @internal
|
|
1706
|
-
*/
|
|
1707
|
-
export declare interface ResponsiveWidthStyleProps {
|
|
1708
|
-
$width: (number | 'auto')[]
|
|
580
|
+
declare function ListItemText<T extends ElementType = "div">(
|
|
581
|
+
props: ListItemTextProps<T> &
|
|
582
|
+
Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>,
|
|
583
|
+
): JSX.Element;
|
|
584
|
+
|
|
585
|
+
/** @beta */
|
|
586
|
+
export declare interface ListItemTextProps<
|
|
587
|
+
T extends React_2.ElementType = "div",
|
|
588
|
+
> {
|
|
589
|
+
/** Element to render */
|
|
590
|
+
as?: T;
|
|
591
|
+
/** Title text */
|
|
592
|
+
title?: React_2.ReactNode;
|
|
593
|
+
/** Subtitle text */
|
|
594
|
+
subtitle?: React_2.ReactNode;
|
|
1709
595
|
}
|
|
1710
596
|
|
|
1711
|
-
/**
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
597
|
+
/** @beta */
|
|
598
|
+
export declare interface ListProps<T extends ListTag = "ul"> extends Pick<
|
|
599
|
+
GapProps,
|
|
600
|
+
"gap"
|
|
601
|
+
> {
|
|
602
|
+
/** Element to render */
|
|
603
|
+
as?: T;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
declare function ListRoot<T extends ListTag = "ul">(
|
|
607
|
+
props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>,
|
|
608
|
+
): JSX.Element;
|
|
609
|
+
|
|
610
|
+
declare namespace ListRoot {
|
|
611
|
+
var displayName: string;
|
|
612
|
+
var Item: typeof ListItem;
|
|
613
|
+
var ButtonItem: typeof ListButtonItem;
|
|
614
|
+
var ItemText: typeof ListItemText;
|
|
615
|
+
var ItemImage: typeof ListItemImage;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
declare type ListTag = (typeof LIST_TAG)[number];
|
|
619
|
+
|
|
620
|
+
/** @public */
|
|
621
|
+
export declare type MarginProps = {
|
|
622
|
+
/** CSS **margin** property */
|
|
623
|
+
margin?: Responsive<SpaceAutoNegative>;
|
|
624
|
+
/** CSS **margin-left** and **margin-right** properties */
|
|
625
|
+
marginX?: Responsive<SpaceAutoNegative>;
|
|
626
|
+
/** CSS **margin-top** and **margin-bottom** properties */
|
|
627
|
+
marginY?: Responsive<SpaceAutoNegative>;
|
|
628
|
+
/** CSS **margin-top** property */
|
|
629
|
+
marginTop?: Responsive<SpaceAutoNegative>;
|
|
630
|
+
/** CSS **margin-right** property */
|
|
631
|
+
marginRight?: Responsive<SpaceAutoNegative>;
|
|
632
|
+
/** CSS **margin-bottom** property */
|
|
633
|
+
marginBottom?: Responsive<SpaceAutoNegative>;
|
|
634
|
+
/** CSS **margin-left** property */
|
|
635
|
+
marginLeft?: Responsive<SpaceAutoNegative>;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
declare const OVERFLOW: readonly [
|
|
639
|
+
"visible",
|
|
640
|
+
"hidden",
|
|
641
|
+
"auto",
|
|
642
|
+
"scroll",
|
|
643
|
+
"clip",
|
|
644
|
+
];
|
|
645
|
+
|
|
646
|
+
/** @public */
|
|
647
|
+
export declare type Overflow = (typeof OVERFLOW)[number];
|
|
648
|
+
|
|
649
|
+
declare type OverflowProps = {
|
|
650
|
+
/** CSS **overflow** property */
|
|
651
|
+
overflow?: Responsive<Overflow>;
|
|
652
|
+
/** CSS **overflow-x** property */
|
|
653
|
+
overflowX?: Responsive<Overflow>;
|
|
654
|
+
/** CSS **overflow-y** property */
|
|
655
|
+
overflowY?: Responsive<Overflow>;
|
|
656
|
+
};
|
|
1725
657
|
|
|
1726
658
|
/** @public */
|
|
1727
|
-
export declare
|
|
659
|
+
export declare interface PaddingProps {
|
|
660
|
+
/** CSS **padding** property */
|
|
661
|
+
padding?: Responsive<Space>;
|
|
662
|
+
/** CSS **padding-left** and **padding-right** properties */
|
|
663
|
+
paddingX?: Responsive<Space>;
|
|
664
|
+
/** CSS **padding-top** and **padding-bottom** properties */
|
|
665
|
+
paddingY?: Responsive<Space>;
|
|
666
|
+
/** CSS **padding-top** property */
|
|
667
|
+
paddingTop?: Responsive<Space>;
|
|
668
|
+
/** CSS **padding-right** property */
|
|
669
|
+
paddingRight?: Responsive<Space>;
|
|
670
|
+
/** CSS **padding-bottom** property */
|
|
671
|
+
paddingBottom?: Responsive<Space>;
|
|
672
|
+
/** CSS **padding-left** property */
|
|
673
|
+
paddingLeft?: Responsive<Space>;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
declare const PLACEMENT: readonly [
|
|
677
|
+
"top",
|
|
678
|
+
"top-start",
|
|
679
|
+
"top-end",
|
|
680
|
+
"right",
|
|
681
|
+
"right-start",
|
|
682
|
+
"right-end",
|
|
683
|
+
"bottom",
|
|
684
|
+
"bottom-start",
|
|
685
|
+
"bottom-end",
|
|
686
|
+
"left",
|
|
687
|
+
"left-start",
|
|
688
|
+
"left-end",
|
|
689
|
+
];
|
|
690
|
+
|
|
691
|
+
/** @public */
|
|
692
|
+
export declare type Placement = (typeof PLACEMENT)[number];
|
|
693
|
+
|
|
694
|
+
/** @public */
|
|
695
|
+
export declare type PlacementProps = {
|
|
696
|
+
/** Placement relative to anchor */
|
|
697
|
+
placement?: Placement;
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
declare const POSITION: readonly [
|
|
701
|
+
"absolute",
|
|
702
|
+
"fixed",
|
|
703
|
+
"relative",
|
|
704
|
+
"static",
|
|
705
|
+
"sticky",
|
|
706
|
+
];
|
|
707
|
+
|
|
708
|
+
/** @public */
|
|
709
|
+
export declare type Position = (typeof POSITION)[number];
|
|
710
|
+
|
|
711
|
+
declare type PositionProps = {
|
|
712
|
+
/** CSS **position** property */
|
|
713
|
+
position?: Responsive<Position>;
|
|
714
|
+
/** CSS **inset** property */
|
|
715
|
+
inset?: Responsive<SpaceAuto>;
|
|
716
|
+
/** CSS **top** property */
|
|
717
|
+
top?: Responsive<SpaceAuto>;
|
|
718
|
+
/** CSS **right** property */
|
|
719
|
+
right?: Responsive<SpaceAuto>;
|
|
720
|
+
/** CSS **bottom** property */
|
|
721
|
+
bottom?: Responsive<SpaceAuto>;
|
|
722
|
+
/** CSS **left** property */
|
|
723
|
+
left?: Responsive<SpaceAuto>;
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
/** @public */
|
|
727
|
+
export declare function PressArea<T extends ElementType = "button">(
|
|
728
|
+
props: PressAreaProps<T> &
|
|
729
|
+
Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>,
|
|
730
|
+
): JSX.Element;
|
|
731
|
+
|
|
732
|
+
/** @public */
|
|
733
|
+
export declare interface PressAreaProps<
|
|
734
|
+
T extends React.ElementType = "button",
|
|
735
|
+
> {
|
|
736
|
+
/** Element to render */
|
|
737
|
+
as?: InteractiveAs<T>;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/** @beta */
|
|
741
|
+
export declare function Radio(props: RadioProps): JSX.Element;
|
|
1728
742
|
|
|
1729
|
-
/** @
|
|
1730
|
-
export declare
|
|
743
|
+
/** @beta */
|
|
744
|
+
export declare interface RadioProps
|
|
745
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
746
|
+
/** Error state */
|
|
747
|
+
error?: boolean;
|
|
748
|
+
/** Input label */
|
|
749
|
+
label: React.ReactNode;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
|
|
1731
753
|
|
|
1732
754
|
/** @public */
|
|
1733
|
-
export declare
|
|
1734
|
-
boundaryElement?: HTMLElement | null
|
|
1735
|
-
children?: ReactNode
|
|
1736
|
-
portalElement?: HTMLElement | null
|
|
1737
|
-
scheme?: ColorScheme
|
|
1738
|
-
tone?: CardTone
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
/**
|
|
1742
|
-
* The `Select` component provides control of options.
|
|
1743
|
-
*
|
|
1744
|
-
* @public
|
|
1745
|
-
*/
|
|
1746
|
-
export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
|
|
1747
|
-
props: SelectProps<E>,
|
|
1748
|
-
): React.JSX.Element
|
|
1749
|
-
|
|
1750
|
-
/** @internal */
|
|
1751
|
-
export declare function Selectable<
|
|
1752
|
-
E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
|
|
1753
|
-
>(props: SelectableProps<E>): React.JSX.Element
|
|
1754
|
-
|
|
1755
|
-
/** @internal */
|
|
1756
|
-
export declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
1757
|
-
|
|
1758
|
-
/** @internal */
|
|
1759
|
-
export declare type SelectableOwnProps = BoxOwnProps &
|
|
1760
|
-
SelectableStyleProps & {
|
|
1761
|
-
disabled?: boolean
|
|
1762
|
-
href?: string
|
|
1763
|
-
selected?: boolean
|
|
1764
|
-
tone?: ElementTone
|
|
1765
|
-
type?: 'button'
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
/** @internal */
|
|
1769
|
-
export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
|
|
1770
|
-
Props<SelectableOwnProps, E>
|
|
755
|
+
export declare type Radius = (typeof RADIUS)[number];
|
|
1771
756
|
|
|
1772
757
|
/** @public */
|
|
1773
|
-
export declare type
|
|
758
|
+
export declare type Responsive<T> =
|
|
759
|
+
| T
|
|
760
|
+
| []
|
|
761
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
762
|
+
length: 1;
|
|
763
|
+
})
|
|
764
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
765
|
+
length: 2;
|
|
766
|
+
})
|
|
767
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
768
|
+
length: 3;
|
|
769
|
+
})
|
|
770
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
771
|
+
length: 4;
|
|
772
|
+
})
|
|
773
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
774
|
+
length: 5;
|
|
775
|
+
})
|
|
776
|
+
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
777
|
+
length: 6;
|
|
778
|
+
});
|
|
1774
779
|
|
|
1775
|
-
|
|
1776
|
-
export declare type SelectOwnProps = SelectStyleProps & {
|
|
1777
|
-
customValidity?: string
|
|
1778
|
-
readOnly?: boolean
|
|
1779
|
-
}
|
|
780
|
+
declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
|
|
1780
781
|
|
|
1781
782
|
/** @public */
|
|
1782
|
-
export declare type
|
|
1783
|
-
SelectOwnProps,
|
|
1784
|
-
E
|
|
1785
|
-
>
|
|
783
|
+
export declare type Shadow = (typeof SHADOW)[number];
|
|
1786
784
|
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
|
|
1792
|
-
props: SkeletonProps<E>,
|
|
1793
|
-
): React.JSX.Element
|
|
785
|
+
declare type ShadowProps = {
|
|
786
|
+
/** CSS **box-shadow** property */
|
|
787
|
+
shadow?: Shadow;
|
|
788
|
+
};
|
|
1794
789
|
|
|
1795
790
|
/** @beta */
|
|
1796
|
-
export declare
|
|
1797
|
-
|
|
1798
|
-
/**
|
|
1799
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
1800
|
-
* @beta
|
|
1801
|
-
*/
|
|
1802
|
-
export declare type SkeletonOwnProps = SkeletonStyleProps & {
|
|
1803
|
-
animated?: boolean
|
|
1804
|
-
delay?: number
|
|
1805
|
-
}
|
|
791
|
+
export declare function SkipToContent(props: SkipToContentProps): JSX.Element;
|
|
1806
792
|
|
|
1807
793
|
/** @beta */
|
|
1808
|
-
export declare
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
*/
|
|
1818
|
-
export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
|
|
1819
|
-
props: SpinnerProps<E>,
|
|
1820
|
-
): React.JSX.Element
|
|
1821
|
-
|
|
1822
|
-
/** @public */
|
|
1823
|
-
export declare type SpinnerElementType = 'div' | 'span' | ComponentType
|
|
1824
|
-
|
|
1825
|
-
/** @public */
|
|
1826
|
-
export declare type SpinnerOwnProps = {
|
|
1827
|
-
muted?: boolean
|
|
1828
|
-
size?: ResponsiveProp<FontTextSize>
|
|
794
|
+
export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
|
|
795
|
+
/**
|
|
796
|
+
* Anchor href. The target element should be focusable or have `tabindex="-1"`.
|
|
797
|
+
*/
|
|
798
|
+
href: string;
|
|
799
|
+
/** Visible/announced label */
|
|
800
|
+
label: string;
|
|
801
|
+
/** Use label instead */
|
|
802
|
+
children?: never;
|
|
1829
803
|
}
|
|
1830
804
|
|
|
1831
|
-
|
|
1832
|
-
export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
|
|
1833
|
-
SpinnerOwnProps,
|
|
1834
|
-
E
|
|
1835
|
-
>
|
|
805
|
+
declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
1836
806
|
|
|
1837
807
|
/** @public */
|
|
1838
|
-
export declare
|
|
1839
|
-
props: SrOnlyProps<E>,
|
|
1840
|
-
): React.JSX.Element
|
|
808
|
+
export declare type Space = (typeof SPACE)[number];
|
|
1841
809
|
|
|
1842
|
-
|
|
1843
|
-
export declare type SrOnlyElementType = 'span' | ComponentType
|
|
810
|
+
declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
|
|
1844
811
|
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
812
|
+
declare const SPACE_AUTO_NEGATIVE: readonly [
|
|
813
|
+
-9,
|
|
814
|
+
-8,
|
|
815
|
+
-7,
|
|
816
|
+
-6,
|
|
817
|
+
-5,
|
|
818
|
+
-4,
|
|
819
|
+
-3,
|
|
820
|
+
-2,
|
|
821
|
+
-1,
|
|
822
|
+
0,
|
|
823
|
+
1,
|
|
824
|
+
2,
|
|
825
|
+
3,
|
|
826
|
+
4,
|
|
827
|
+
5,
|
|
828
|
+
6,
|
|
829
|
+
7,
|
|
830
|
+
8,
|
|
831
|
+
9,
|
|
832
|
+
"auto",
|
|
833
|
+
];
|
|
1853
834
|
|
|
1854
|
-
|
|
1855
|
-
* The `Stack` component is used to place elements on top of each other.
|
|
1856
|
-
*
|
|
1857
|
-
* @public
|
|
1858
|
-
*/
|
|
1859
|
-
export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
|
|
1860
|
-
props: StackProps<E>,
|
|
1861
|
-
): React.JSX.Element
|
|
835
|
+
declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
|
|
1862
836
|
|
|
1863
837
|
/** @public */
|
|
1864
|
-
export declare type
|
|
838
|
+
export declare type SpaceAuto = (typeof SPACE_AUTO)[number];
|
|
1865
839
|
|
|
1866
840
|
/** @public */
|
|
1867
|
-
export declare type
|
|
1868
|
-
BoxOwnProps,
|
|
1869
|
-
| 'align'
|
|
1870
|
-
| 'alignItems'
|
|
1871
|
-
| 'columns'
|
|
1872
|
-
| 'gridTemplateColumns'
|
|
1873
|
-
| 'direction'
|
|
1874
|
-
| 'display'
|
|
1875
|
-
| 'flexDirection'
|
|
1876
|
-
| 'flexWrap'
|
|
1877
|
-
| 'gapX'
|
|
1878
|
-
| 'gapY'
|
|
1879
|
-
| 'justify'
|
|
1880
|
-
| 'justifyContent'
|
|
1881
|
-
| 'rows'
|
|
1882
|
-
| 'gridTemplateRows'
|
|
1883
|
-
>
|
|
841
|
+
export declare type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
|
|
1884
842
|
|
|
1885
843
|
/** @public */
|
|
1886
|
-
export declare type
|
|
1887
|
-
StackOwnProps,
|
|
1888
|
-
E
|
|
1889
|
-
>
|
|
1890
|
-
|
|
1891
|
-
/**
|
|
1892
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
1893
|
-
*
|
|
1894
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
1895
|
-
*
|
|
1896
|
-
* @public
|
|
1897
|
-
*/
|
|
1898
|
-
export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
|
|
1899
|
-
props: SwitchProps<E>,
|
|
1900
|
-
): React.JSX.Element
|
|
844
|
+
export declare type SpaceInherit = (typeof SPACE_INHERIT)[number];
|
|
1901
845
|
|
|
1902
846
|
/** @public */
|
|
1903
|
-
export declare
|
|
847
|
+
export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
|
|
1904
848
|
|
|
1905
849
|
/** @public */
|
|
1906
|
-
export declare
|
|
1907
|
-
|
|
850
|
+
export declare interface SpinnerProps extends React.ComponentProps<"svg"> {
|
|
851
|
+
size?: Responsive<IconSize>;
|
|
1908
852
|
}
|
|
1909
853
|
|
|
1910
|
-
/** @
|
|
1911
|
-
export declare
|
|
1912
|
-
SwitchOwnProps,
|
|
1913
|
-
E
|
|
1914
|
-
>
|
|
1915
|
-
|
|
1916
|
-
/** @public */
|
|
1917
|
-
export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
|
|
1918
|
-
props: TabProps<E>,
|
|
1919
|
-
): React.JSX.Element
|
|
1920
|
-
|
|
1921
|
-
/** @public */
|
|
1922
|
-
export declare type TabElementType = 'button' | ComponentType
|
|
1923
|
-
|
|
1924
|
-
/** @public */
|
|
1925
|
-
export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
|
|
1926
|
-
props: TabListProps<E>,
|
|
1927
|
-
): React.JSX.Element
|
|
1928
|
-
|
|
1929
|
-
/** @public */
|
|
1930
|
-
export declare type TabListChild =
|
|
1931
|
-
| ReactElement<Props<TabProps, 'button'>>
|
|
1932
|
-
| null
|
|
1933
|
-
| undefined
|
|
1934
|
-
| false
|
|
1935
|
-
|
|
1936
|
-
/** @public */
|
|
1937
|
-
export declare type TabListElementType = 'div' | 'span' | ComponentType
|
|
854
|
+
/** @beta */
|
|
855
|
+
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
1938
856
|
|
|
1939
|
-
/** @
|
|
1940
|
-
export declare
|
|
1941
|
-
|
|
857
|
+
/** @beta */
|
|
858
|
+
export declare interface SwitchProps
|
|
859
|
+
extends React.ComponentProps<"input">, MarginProps {
|
|
860
|
+
/** Error state */
|
|
861
|
+
error?: boolean;
|
|
862
|
+
/** Input label */
|
|
863
|
+
label: React.ReactNode;
|
|
1942
864
|
}
|
|
1943
865
|
|
|
1944
866
|
/** @public */
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
>
|
|
867
|
+
declare function Text_2<T extends ElementType = "span">({
|
|
868
|
+
size,
|
|
869
|
+
...props
|
|
870
|
+
}: TextProps<T> &
|
|
871
|
+
Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): JSX.Element;
|
|
872
|
+
export { Text_2 as Text };
|
|
1949
873
|
|
|
1950
|
-
|
|
1951
|
-
export declare type TabOwnProps = {
|
|
1952
|
-
/**
|
|
1953
|
-
* The `id` of the corresponding `TabPanel` component.
|
|
1954
|
-
*/
|
|
1955
|
-
'aria-controls': string
|
|
1956
|
-
'id': string
|
|
1957
|
-
'icon'?: ElementType_2 | ReactNode
|
|
1958
|
-
'focused'?: boolean
|
|
1959
|
-
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
1960
|
-
'label'?: ReactNode
|
|
1961
|
-
'padding'?: ResponsiveProp<Space>
|
|
1962
|
-
'selected'?: boolean
|
|
1963
|
-
'tone'?: ElementTone
|
|
1964
|
-
}
|
|
874
|
+
declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
|
|
1965
875
|
|
|
1966
|
-
|
|
1967
|
-
export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
|
|
1968
|
-
props: TabPanelProps<E>,
|
|
1969
|
-
): React.JSX.Element
|
|
876
|
+
declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
|
|
1970
877
|
|
|
1971
878
|
/** @public */
|
|
1972
|
-
export declare type
|
|
879
|
+
export declare type TextAlign = (typeof TEXT_ALIGN)[number];
|
|
1973
880
|
|
|
1974
881
|
/** @public */
|
|
1975
|
-
export declare
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
882
|
+
export declare interface TextProps<
|
|
883
|
+
T extends React.ElementType = "span",
|
|
884
|
+
> extends TypographyProps {
|
|
885
|
+
/** Element to render */
|
|
886
|
+
as?: T;
|
|
887
|
+
/** CSS **font-size** property */
|
|
888
|
+
size?: Responsive<TextSize>;
|
|
1981
889
|
}
|
|
1982
890
|
|
|
1983
891
|
/** @public */
|
|
1984
|
-
export declare type
|
|
1985
|
-
TabPanelOwnProps,
|
|
1986
|
-
E
|
|
1987
|
-
>
|
|
1988
|
-
|
|
1989
|
-
/** @public */
|
|
1990
|
-
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
1991
|
-
|
|
1992
|
-
/** @public */
|
|
1993
|
-
export declare type TagType = keyof JSX.IntrinsicElements
|
|
1994
|
-
|
|
1995
|
-
/**
|
|
1996
|
-
* The `Text` component is an agile, themed typographic element.
|
|
1997
|
-
*
|
|
1998
|
-
* @public
|
|
1999
|
-
*/
|
|
2000
|
-
declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
|
|
2001
|
-
props: TextProps<E>,
|
|
2002
|
-
): React.JSX.Element
|
|
2003
|
-
export {Text_2 as Text}
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* A multiline text input.
|
|
2007
|
-
*
|
|
2008
|
-
* @public
|
|
2009
|
-
*/
|
|
2010
|
-
export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
|
|
2011
|
-
props: TextAreaProps<E>,
|
|
2012
|
-
): React.JSX.Element
|
|
2013
|
-
|
|
2014
|
-
/** @public */
|
|
2015
|
-
export declare type TextAreaElementType = 'textarea' | ComponentType
|
|
2016
|
-
|
|
2017
|
-
/** @public */
|
|
2018
|
-
export declare type TextAreaOwnProps = TextAreaStyleProps & {
|
|
2019
|
-
/**
|
|
2020
|
-
* @beta
|
|
2021
|
-
*/
|
|
2022
|
-
__unstable_disableFocusRing?: boolean
|
|
2023
|
-
customValidity?: string
|
|
2024
|
-
}
|
|
892
|
+
export declare type TextSize = (typeof TEXT_SIZE)[number];
|
|
2025
893
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
894
|
+
declare const TONE: readonly [
|
|
895
|
+
"neutral",
|
|
896
|
+
"positive",
|
|
897
|
+
"suggest",
|
|
898
|
+
"caution",
|
|
899
|
+
"critical",
|
|
900
|
+
];
|
|
2031
901
|
|
|
2032
902
|
/** @public */
|
|
2033
|
-
export declare type
|
|
2034
|
-
| 'div'
|
|
2035
|
-
| 'h1'
|
|
2036
|
-
| 'h2'
|
|
2037
|
-
| 'h3'
|
|
2038
|
-
| 'h4'
|
|
2039
|
-
| 'h5'
|
|
2040
|
-
| 'h6'
|
|
2041
|
-
| 'label'
|
|
2042
|
-
| 'li'
|
|
2043
|
-
| 'p'
|
|
2044
|
-
| 'span'
|
|
2045
|
-
| 'summary'
|
|
2046
|
-
| 'time'
|
|
2047
|
-
| ComponentType
|
|
903
|
+
export declare type Tone = (typeof TONE)[number];
|
|
2048
904
|
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
*/
|
|
2054
|
-
export declare function TextInput<
|
|
2055
|
-
E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
|
|
2056
|
-
>(props: TextInputProps<E>): React.JSX.Element
|
|
905
|
+
declare type ToneProps = {
|
|
906
|
+
/** CSS **background-color** property */
|
|
907
|
+
tone?: Tone;
|
|
908
|
+
};
|
|
2057
909
|
|
|
2058
910
|
/** @public */
|
|
2059
|
-
export declare
|
|
2060
|
-
ButtonProps<'button'>,
|
|
2061
|
-
'as' | 'onClick' | 'onMouseDown'
|
|
2062
|
-
>
|
|
911
|
+
export declare function Tooltip({ placement, ...props }: TooltipProps): any;
|
|
2063
912
|
|
|
2064
913
|
/** @public */
|
|
2065
|
-
export declare
|
|
914
|
+
export declare function TooltipGroup<T extends ElementType = "div">(
|
|
915
|
+
props: TooltipGroupProps<T> &
|
|
916
|
+
Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>,
|
|
917
|
+
): JSX.Element;
|
|
2066
918
|
|
|
2067
919
|
/** @public */
|
|
2068
|
-
export declare
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
/**
|
|
2074
|
-
* @beta
|
|
2075
|
-
*/
|
|
2076
|
-
clearButton?: boolean | TextInputClearButtonProps
|
|
2077
|
-
customValidity?: string
|
|
2078
|
-
icon?: ElementType_2 | ReactNode
|
|
2079
|
-
iconRight?: ElementType_2 | ReactNode
|
|
2080
|
-
/**
|
|
2081
|
-
* @beta
|
|
2082
|
-
*/
|
|
2083
|
-
onClear?: () => void
|
|
2084
|
-
prefix?: ReactNode
|
|
2085
|
-
suffix?: ReactNode
|
|
2086
|
-
weight?: FontWeight
|
|
920
|
+
export declare interface TooltipGroupProps<
|
|
921
|
+
T extends React.ElementType = "div",
|
|
922
|
+
> {
|
|
923
|
+
/** Element to render */
|
|
924
|
+
as?: T;
|
|
2087
925
|
}
|
|
2088
926
|
|
|
2089
927
|
/** @public */
|
|
2090
|
-
export declare
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
|
|
2097
|
-
|
|
2098
|
-
/** @public */
|
|
2099
|
-
export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
|
|
2100
|
-
|
|
2101
|
-
/**
|
|
2102
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2103
|
-
* @beta
|
|
2104
|
-
*/
|
|
2105
|
-
export declare function TextSkeleton<
|
|
2106
|
-
E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
|
|
2107
|
-
>(props: TextSkeletonProps<E>): React.JSX.Element
|
|
2108
|
-
|
|
2109
|
-
/** @beta */
|
|
2110
|
-
export declare type TextSkeletonElementType = SkeletonElementType
|
|
2111
|
-
|
|
2112
|
-
/** @beta */
|
|
2113
|
-
export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
|
|
2114
|
-
size?: ResponsiveProp<FontTextSize>
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
/**
|
|
2118
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2119
|
-
* @beta
|
|
2120
|
-
*/
|
|
2121
|
-
export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
|
|
2122
|
-
Props<TextSkeletonOwnProps, E>
|
|
2123
|
-
|
|
2124
|
-
/**
|
|
2125
|
-
* The `Toast` component gives feedback to users when an action has taken place.
|
|
2126
|
-
*
|
|
2127
|
-
* Toasts can be closed with a close button, or auto-dismiss when the duration expires.
|
|
2128
|
-
*
|
|
2129
|
-
* @internal
|
|
2130
|
-
*/
|
|
2131
|
-
export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
|
|
2132
|
-
props: ToastProps<E>,
|
|
2133
|
-
): React.JSX.Element
|
|
2134
|
-
|
|
2135
|
-
/** @public */
|
|
2136
|
-
export declare interface ToastContextValue {
|
|
2137
|
-
version: 0.0
|
|
2138
|
-
/**
|
|
2139
|
-
* Creates or updates a toast notification.
|
|
2140
|
-
* If a toast with the same ID already exists, it will be updated.
|
|
2141
|
-
* If an ID is not provided, a random one will be generated.
|
|
2142
|
-
* The returned ID can be used to programatically update a toast.
|
|
2143
|
-
*/
|
|
2144
|
-
push: (params: ToastParams) => string
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
/** @internal */
|
|
2148
|
-
export declare type ToastElementType = 'li' | ComponentType
|
|
2149
|
-
|
|
2150
|
-
/** @internal */
|
|
2151
|
-
declare type ToastLayerElementType = 'ul' | ComponentType
|
|
2152
|
-
|
|
2153
|
-
/** @internal */
|
|
2154
|
-
declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
|
|
2155
|
-
|
|
2156
|
-
/** @internal */
|
|
2157
|
-
declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
|
|
2158
|
-
ToastLayerOwnProps,
|
|
2159
|
-
E
|
|
2160
|
-
>
|
|
2161
|
-
|
|
2162
|
-
/** @internal */
|
|
2163
|
-
export declare type ToastOwnProps = RadiusStyleProps & {
|
|
2164
|
-
closable?: boolean
|
|
2165
|
-
description?: ReactNode
|
|
2166
|
-
onClose?: () => void
|
|
2167
|
-
title?: ReactNode
|
|
2168
|
-
status?: 'error' | 'warning' | 'success' | 'info'
|
|
2169
|
-
duration?: number
|
|
928
|
+
export declare interface TooltipProps
|
|
929
|
+
extends React.ComponentProps<"div">, PlacementProps {
|
|
930
|
+
/** Tooltip text */
|
|
931
|
+
text?: React.ReactNode;
|
|
932
|
+
/** Disabled state */
|
|
933
|
+
disabled?: boolean;
|
|
2170
934
|
}
|
|
2171
935
|
|
|
2172
936
|
/** @public */
|
|
2173
|
-
export declare interface
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
937
|
+
export declare interface TypographyProps extends MarginProps, ToneProps {
|
|
938
|
+
/** CSS **text-align** property */
|
|
939
|
+
align?: Responsive<TextAlign>;
|
|
940
|
+
/** CSS **color** property */
|
|
941
|
+
muted?: boolean;
|
|
942
|
+
/** CSS **text-box-trim** property */
|
|
943
|
+
trim?: boolean;
|
|
944
|
+
/** Number of lines to truncate */
|
|
945
|
+
truncate?: Responsive<number>;
|
|
946
|
+
/** CSS **font-weight** property */
|
|
947
|
+
weight?: FontWeight;
|
|
2181
948
|
}
|
|
2182
949
|
|
|
2183
|
-
/** @internal */
|
|
2184
|
-
export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
|
|
2185
|
-
ToastOwnProps,
|
|
2186
|
-
E
|
|
2187
|
-
>
|
|
2188
|
-
|
|
2189
950
|
/** @public */
|
|
2190
|
-
export declare function
|
|
951
|
+
export declare function VisuallyHidden<T extends ElementType = "span">(
|
|
952
|
+
props: VisuallyHiddenProps<T> &
|
|
953
|
+
Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>,
|
|
954
|
+
): JSX.Element;
|
|
2191
955
|
|
|
2192
956
|
/** @public */
|
|
2193
|
-
export declare interface
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
/**
|
|
2199
|
-
|
|
2200
|
-
*
|
|
2201
|
-
* @public
|
|
2202
|
-
*/
|
|
2203
|
-
export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
|
|
2204
|
-
props: TooltipProps<E>,
|
|
2205
|
-
): React.JSX.Element
|
|
2206
|
-
|
|
2207
|
-
/**
|
|
2208
|
-
* @beta
|
|
2209
|
-
*/
|
|
2210
|
-
export declare const TooltipDelayGroupContext: Context<TooltipDelayGroupContextValue | null>
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* @beta
|
|
2214
|
-
*/
|
|
2215
|
-
export declare interface TooltipDelayGroupContextValue {
|
|
2216
|
-
setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
|
|
2217
|
-
setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
|
|
2218
|
-
openDelay: number
|
|
2219
|
-
closeDelay: number
|
|
2220
|
-
openTooltipId: string | null
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
/**
|
|
2224
|
-
* @public
|
|
2225
|
-
* Provides context for a group of tooltip elements that should share a delay
|
|
2226
|
-
* which temporarily becomes 1 ms after the first floating element of the group opens.
|
|
2227
|
-
*/
|
|
2228
|
-
export declare function TooltipDelayGroupProvider(
|
|
2229
|
-
props: TooltipDelayGroupProviderProps,
|
|
2230
|
-
): React.JSX.Element
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* @public
|
|
2234
|
-
* */
|
|
2235
|
-
export declare interface TooltipDelayGroupProviderProps {
|
|
2236
|
-
children?: ReactNode
|
|
2237
|
-
/**
|
|
2238
|
-
* Handles the delays to open or close a tooltip inside a group
|
|
2239
|
-
*
|
|
2240
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2241
|
-
*
|
|
2242
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2243
|
-
*
|
|
2244
|
-
* @public
|
|
2245
|
-
*/
|
|
2246
|
-
delay: Delay
|
|
957
|
+
export declare interface VisuallyHiddenProps<
|
|
958
|
+
T extends React.ElementType = "span",
|
|
959
|
+
> {
|
|
960
|
+
/** Element to render */
|
|
961
|
+
as?: T;
|
|
962
|
+
/** If true, element is visible on :focus-visible */
|
|
963
|
+
visibleOnFocus?: boolean;
|
|
2247
964
|
}
|
|
2248
965
|
|
|
2249
966
|
/** @public */
|
|
2250
|
-
export declare
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
export declare type TooltipOwnProps = LayerOwnProps &
|
|
2254
|
-
RadiusStyleProps &
|
|
2255
|
-
ShadowStyleProps & {
|
|
2256
|
-
/**
|
|
2257
|
-
* Whether the tooltip should animate in and out.
|
|
2258
|
-
*
|
|
2259
|
-
* @beta
|
|
2260
|
-
* @defaultValue false
|
|
2261
|
-
*/
|
|
2262
|
-
animate?: boolean
|
|
2263
|
-
arrow?: boolean
|
|
2264
|
-
boundaryElement?: HTMLElement | null
|
|
2265
|
-
children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
|
|
2266
|
-
content?: ReactNode
|
|
2267
|
-
/**
|
|
2268
|
-
* Adds a delay to open or close the tooltip.
|
|
2269
|
-
*
|
|
2270
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
2271
|
-
*
|
|
2272
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
2273
|
-
*
|
|
2274
|
-
* @public
|
|
2275
|
-
* @defaultValue 0
|
|
2276
|
-
*/
|
|
2277
|
-
delay?: Delay
|
|
2278
|
-
disabled?: boolean
|
|
2279
|
-
fallbackPlacements?: Placement[]
|
|
2280
|
-
placement?: Placement
|
|
2281
|
-
/** Whether or not to render the tooltip in a portal element. */
|
|
2282
|
-
portal?: boolean | string
|
|
2283
|
-
scheme?: ColorScheme
|
|
2284
|
-
tone?: CardTone
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
/** @public */
|
|
2288
|
-
export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
|
|
2289
|
-
TooltipOwnProps,
|
|
2290
|
-
E
|
|
2291
|
-
>
|
|
2292
|
-
|
|
2293
|
-
/**
|
|
2294
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2295
|
-
* @beta
|
|
2296
|
-
*/
|
|
2297
|
-
export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
|
|
2298
|
-
props: TreeProps<E>,
|
|
2299
|
-
): React.JSX.Element
|
|
2300
|
-
|
|
2301
|
-
/**
|
|
2302
|
-
* @beta
|
|
2303
|
-
*/
|
|
2304
|
-
export declare interface TreeContextValue {
|
|
2305
|
-
version: 0.0
|
|
2306
|
-
focusedElement: HTMLElement | null
|
|
2307
|
-
gap: ResponsiveProp<Space>
|
|
2308
|
-
level: number
|
|
2309
|
-
path: string[]
|
|
2310
|
-
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
|
|
2311
|
-
setExpanded: (path: string, expanded: boolean) => void
|
|
2312
|
-
setFocusedElement: (focusedElement: HTMLElement | null) => void
|
|
2313
|
-
state: TreeState
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
/** @beta */
|
|
2317
|
-
export declare type TreeElementType = 'div' | ComponentType
|
|
2318
|
-
|
|
2319
|
-
/**
|
|
2320
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2321
|
-
* @beta
|
|
2322
|
-
*/
|
|
2323
|
-
export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
|
|
2324
|
-
props: TreeItemProps<E>,
|
|
2325
|
-
): React.JSX.Element
|
|
2326
|
-
|
|
2327
|
-
/** @beta */
|
|
2328
|
-
export declare type TreeItemElementType = 'a' | 'li' | ComponentType
|
|
2329
|
-
|
|
2330
|
-
/** @beta */
|
|
2331
|
-
export declare type TreeItemOwnProps = CardOwnProps & {
|
|
2332
|
-
expanded?: boolean
|
|
2333
|
-
fontSize?: ResponsiveProp<FontTextSize>
|
|
2334
|
-
icon?: ElementType_2
|
|
2335
|
-
/**
|
|
2336
|
-
* Allows passing a custom element type to the link component
|
|
2337
|
-
* @internal
|
|
2338
|
-
*/
|
|
2339
|
-
linkAs?: SelectableElementType
|
|
2340
|
-
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
|
2341
|
-
padding?: ResponsiveProp<Space>
|
|
2342
|
-
space?: ResponsiveProp<Space>
|
|
2343
|
-
text?: ReactNode
|
|
2344
|
-
weight?: FontWeight
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
/** @beta */
|
|
2348
|
-
export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
|
|
2349
|
-
TreeItemOwnProps,
|
|
2350
|
-
E
|
|
2351
|
-
>
|
|
2352
|
-
|
|
2353
|
-
/**
|
|
2354
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2355
|
-
* @beta
|
|
2356
|
-
*/
|
|
2357
|
-
export declare type TreeOwnProps = {
|
|
2358
|
-
gap?: ResponsiveProp<Space>
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
/** @beta */
|
|
2362
|
-
export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
|
|
2363
|
-
|
|
2364
|
-
/**
|
|
2365
|
-
* @beta
|
|
2366
|
-
*/
|
|
2367
|
-
export declare interface TreeState {
|
|
2368
|
-
[key: string]:
|
|
2369
|
-
| {
|
|
2370
|
-
element: HTMLElement
|
|
2371
|
-
expanded: boolean
|
|
2372
|
-
}
|
|
2373
|
-
| undefined
|
|
2374
|
-
}
|
|
967
|
+
export declare function VStack<T extends ElementType = "div">(
|
|
968
|
+
props: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>,
|
|
969
|
+
): JSX.Element;
|
|
2375
970
|
|
|
2376
971
|
/** @public */
|
|
2377
|
-
export declare
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
/** @public */
|
|
2383
|
-
export declare function useClickOutsideEvent(
|
|
2384
|
-
listener: ClickOutsideEventListener | false | undefined,
|
|
2385
|
-
elementsArg?: () => ClickOutsideEventElements,
|
|
2386
|
-
boundaryElement?: () => HTMLElement | null,
|
|
2387
|
-
): void
|
|
2388
|
-
|
|
2389
|
-
/**
|
|
2390
|
-
* @beta
|
|
2391
|
-
*/
|
|
2392
|
-
export declare function useCustomValidity(
|
|
2393
|
-
ref: {
|
|
2394
|
-
current: null | {
|
|
2395
|
-
setCustomValidity: (validity: string) => void
|
|
2396
|
-
}
|
|
2397
|
-
},
|
|
2398
|
-
customValidity: string | undefined,
|
|
2399
|
-
): void
|
|
2400
|
-
|
|
2401
|
-
/**
|
|
2402
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2403
|
-
* @beta
|
|
2404
|
-
*/
|
|
2405
|
-
export declare function useDialog(): DialogContextValue
|
|
2406
|
-
|
|
2407
|
-
/**
|
|
2408
|
-
* Subscribe to the size of a DOM element.
|
|
2409
|
-
* @beta
|
|
2410
|
-
*/
|
|
2411
|
-
export declare function useElementSize(element: HTMLElement | null): ElementSize | null
|
|
2412
|
-
|
|
2413
|
-
/**
|
|
2414
|
-
* @beta
|
|
2415
|
-
*/
|
|
2416
|
-
export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
|
|
2417
|
-
|
|
2418
|
-
/** @public */
|
|
2419
|
-
export declare function useLayer(): LayerContextValue
|
|
2420
|
-
|
|
2421
|
-
/**
|
|
2422
|
-
* Efficiently subscribes to `window.matchMedia` queries
|
|
2423
|
-
*
|
|
2424
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2425
|
-
*
|
|
2426
|
-
* @public
|
|
2427
|
-
*/
|
|
2428
|
-
export declare function useMatchMedia(
|
|
2429
|
-
mediaQueryString: `(${string})`,
|
|
2430
|
-
getServerSnapshot?: () => boolean,
|
|
2431
|
-
): boolean
|
|
2432
|
-
|
|
2433
|
-
/**
|
|
2434
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2435
|
-
* @beta
|
|
2436
|
-
*/
|
|
2437
|
-
export declare function useMediaIndex(): Breakpoint
|
|
2438
|
-
|
|
2439
|
-
/** @public */
|
|
2440
|
-
export declare function usePortal(): PortalContextValue
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
2444
|
-
*
|
|
2445
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2446
|
-
*
|
|
2447
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2448
|
-
* Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
|
|
2449
|
-
* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
|
|
2450
|
-
*
|
|
2451
|
-
* @public
|
|
2452
|
-
*/
|
|
2453
|
-
export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* Returns true if motion should be reduced
|
|
2457
|
-
*
|
|
2458
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
2459
|
-
*
|
|
2460
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
2461
|
-
* Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
|
|
2462
|
-
* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
|
|
2463
|
-
*
|
|
2464
|
-
* @public
|
|
2465
|
-
*/
|
|
2466
|
-
export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
|
|
2467
|
-
|
|
2468
|
-
/**
|
|
2469
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2470
|
-
* @beta
|
|
2471
|
-
*/
|
|
2472
|
-
export declare function useResponsiveProp<T>(
|
|
2473
|
-
val: ResponsiveProp<T> | undefined,
|
|
2474
|
-
defaultVal?: Partial<Record<Breakpoint, T>>,
|
|
2475
|
-
): Partial<Record<Breakpoint, T>>
|
|
2476
|
-
|
|
2477
|
-
/** @public */
|
|
2478
|
-
export declare function useToast(): ToastContextValue
|
|
2479
|
-
|
|
2480
|
-
/**
|
|
2481
|
-
* @beta
|
|
2482
|
-
*/
|
|
2483
|
-
export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
|
|
2484
|
-
|
|
2485
|
-
/**
|
|
2486
|
-
* @beta
|
|
2487
|
-
*/
|
|
2488
|
-
export declare function useTree(): TreeContextValue
|
|
2489
|
-
|
|
2490
|
-
/** @beta */
|
|
2491
|
-
export declare function VirtualList<
|
|
2492
|
-
E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
2493
|
-
>(props: VirtualListProps<E>): React.JSX.Element
|
|
2494
|
-
|
|
2495
|
-
/** @beta */
|
|
2496
|
-
export declare interface VirtualListChangeOpts {
|
|
2497
|
-
fromIndex: number
|
|
2498
|
-
gap: number
|
|
2499
|
-
itemHeight: number
|
|
2500
|
-
scrollHeight: number
|
|
2501
|
-
scrollTop: number
|
|
2502
|
-
toIndex: number
|
|
972
|
+
export declare interface VStackProps<
|
|
973
|
+
T extends React.ElementType = "div",
|
|
974
|
+
> extends Pick<GapProps, "gap"> {
|
|
975
|
+
/** Element to render */
|
|
976
|
+
as?: T;
|
|
2503
977
|
}
|
|
2504
978
|
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
onChange?: (opts: VirtualListChangeOpts) => void
|
|
2514
|
-
renderItem?: (item: Item) => ReactNode
|
|
2515
|
-
}
|
|
979
|
+
declare type WidthProps = {
|
|
980
|
+
/** CSS **width** property */
|
|
981
|
+
width?: Responsive<string>;
|
|
982
|
+
/** CSS **min-width** property */
|
|
983
|
+
minWidth?: Responsive<string>;
|
|
984
|
+
/** CSS **max-width** property */
|
|
985
|
+
maxWidth?: Responsive<string>;
|
|
986
|
+
};
|
|
2516
987
|
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
988
|
+
declare type ZIndexProps = {
|
|
989
|
+
/** CSS z-index property */
|
|
990
|
+
zIndex?: Responsive<number>;
|
|
991
|
+
};
|
|
2520
992
|
|
|
2521
|
-
export {}
|
|
993
|
+
export {};
|