@sanity/ui 2.9.0-corel.0 → 3.0.0-static.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ui.js +6 -0
- package/dist/_chunks-cjs/buildCommand.js +2836 -0
- package/dist/_chunks-cjs/buildCommand.js.map +1 -0
- package/dist/_chunks-cjs/getTheme_v2.js +1 -27
- package/dist/_chunks-cjs/getTheme_v2.js.map +1 -1
- package/dist/_chunks-es/getTheme_v2.mjs +1 -27
- package/dist/_chunks-es/getTheme_v2.mjs.map +1 -1
- package/dist/_legacy/getTheme_v2.esm.js +1 -27
- package/dist/_legacy/getTheme_v2.esm.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +23 -0
- package/dist/cli.js.map +1 -0
- package/dist/css.d.mts +943 -0
- package/dist/css.d.ts +943 -0
- package/dist/css.esm.js +3135 -0
- package/dist/css.esm.js.map +1 -0
- package/dist/css.js +3135 -0
- package/dist/css.js.map +1 -0
- package/dist/css.mjs +3135 -0
- package/dist/css.mjs.map +1 -0
- package/dist/index.d.mts +175 -164
- package/dist/index.d.ts +175 -164
- package/dist/index.esm.js +864 -1955
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +870 -1962
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +864 -1955
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +25 -0
- package/dist/system.css +2953 -0
- package/dist/theme.d.mts +84 -22
- package/dist/theme.d.ts +84 -22
- package/dist/theme.esm.js +232 -283
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +232 -283
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +232 -283
- package/dist/theme.mjs.map +1 -1
- package/exports/css.ts +1 -0
- package/package.json +25 -4
- package/src/core/__workshop__/constants.ts +15 -15
- package/src/core/__workshop__/fontsPlugin.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +12 -4
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -3
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -5
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +14 -2
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +14 -9
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +77 -92
- package/src/core/components/hotkeys/hotkeys.tsx +18 -29
- package/src/core/components/menu/menu.tsx +8 -5
- package/src/core/components/menu/menuDivider.ts +2 -1
- package/src/core/components/menu/menuGroup.tsx +16 -8
- package/src/core/components/menu/menuItem.tsx +23 -14
- package/src/core/components/skeleton/skeleton.tsx +1 -1
- package/src/core/components/skeleton/styles.ts +1 -1
- package/src/core/components/skeleton/textSkeleton.tsx +1 -1
- package/src/core/components/tab/tab.tsx +6 -7
- package/src/core/components/tab/tabList.tsx +3 -2
- package/src/core/components/toast/styles.ts +1 -1
- package/src/core/components/toast/toast.tsx +6 -4
- package/src/core/components/toast/toastProvider.tsx +31 -22
- package/src/core/components/tree/style.ts +1 -1
- package/src/core/components/tree/tree.tsx +8 -2
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +38 -25
- package/src/core/components/tree/types.ts +5 -1
- package/src/core/lib/styled/elements.ts +135 -0
- package/src/core/lib/styled/index.ts +2 -0
- package/src/core/lib/styled/members.ts +15 -0
- package/src/core/lib/styled/styled.ts +79 -0
- package/src/core/primitives/_selectable/selectable.tsx +27 -14
- package/src/core/primitives/avatar/avatar.tsx +52 -32
- package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/__workshop__/tones.tsx +9 -16
- package/src/core/primitives/badge/badge.tsx +18 -20
- package/src/core/primitives/box/box.tsx +62 -74
- package/src/core/primitives/button/__workshop__/props.tsx +3 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/button.tsx +38 -45
- package/src/core/primitives/button/styles.ts +2 -2
- package/src/core/primitives/card/RootCardContext.ts +3 -0
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +44 -46
- package/src/core/primitives/card/styles.ts +1 -1
- package/src/core/primitives/checkbox/checkbox.tsx +6 -8
- package/src/core/primitives/code/code.tsx +23 -12
- package/src/core/primitives/code/styles.ts +1 -1
- package/src/core/primitives/container/container.tsx +7 -15
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +6 -19
- package/src/core/primitives/grid/grid.tsx +2 -1
- package/src/core/primitives/heading/heading.tsx +32 -19
- package/src/core/primitives/heading/styles.ts +1 -1
- package/src/core/primitives/inline/inline.tsx +22 -13
- package/src/core/primitives/kbd/kbd.tsx +30 -37
- package/src/core/primitives/label/label.tsx +15 -4
- package/src/core/primitives/label/styles.ts +1 -1
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -1
- package/src/core/primitives/popover/popover.tsx +21 -15
- package/src/core/primitives/popover/popoverCard.tsx +36 -38
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/radio/styles.ts +1 -1
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/select/styles.ts +1 -1
- package/src/core/primitives/spinner/spinner.tsx +6 -20
- package/src/core/primitives/stack/stack.tsx +12 -10
- package/src/core/primitives/switch/styles.ts +9 -9
- package/src/core/primitives/switch/switch.tsx +20 -21
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/styles.ts +1 -2
- package/src/core/primitives/text/text.tsx +17 -21
- package/src/core/primitives/textArea/textArea.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +176 -123
- package/src/core/primitives/tooltip/tooltip.test.tsx +1 -0
- package/src/core/primitives/tooltip/tooltip.tsx +13 -13
- package/src/core/primitives/tooltip/tooltipCard.tsx +15 -14
- package/src/core/primitives/types.ts +35 -16
- package/src/core/styles/border/borderStyle.ts +6 -0
- package/src/core/styles/border/types.ts +1 -0
- package/src/core/styles/box/boxStyle.ts +6 -0
- package/src/core/styles/card/_cardColorStyle.ts +0 -8
- package/src/core/styles/flex/flexStyle.ts +0 -18
- package/src/core/styles/flex/types.ts +1 -3
- package/src/core/styles/grid/gridStyle.ts +0 -10
- package/src/core/styles/helpers.ts +9 -0
- package/src/core/styles/input/textInputStyle.ts +1 -1
- package/src/core/theme/__workshop__/build/Root.tsx +1 -1
- package/src/core/theme/themeProvider.tsx +1 -1
- package/src/core/theme/useTheme.ts +1 -1
- package/src/core/types/avatar.ts +6 -1
- package/src/core/types/button.ts +1 -0
- package/src/core/types/flex.ts +27 -26
- package/src/core/types/gridItem.ts +32 -24
- package/src/core/types/radius.ts +7 -4
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +28 -11
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
- package/src/css/_resp.ts +28 -0
- package/src/css/cli/buildCommand.ts +36 -0
- package/src/css/cli/index.ts +38 -0
- package/src/css/compile/comileRules.ts +59 -0
- package/src/css/compile/compileRule.ts +58 -0
- package/src/css/compile/compileSystem.ts +7 -0
- package/src/css/compile/compileTheme.ts +509 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +5 -0
- package/src/css/components/breadcrumbs/index.ts +1 -0
- package/src/css/components/breadcrumbs/rules.ts +7 -0
- package/src/css/components/dialog/classes.ts +29 -0
- package/src/css/components/dialog/index.ts +1 -0
- package/src/css/components/dialog/rules.ts +75 -0
- package/src/css/components/tree/index.ts +1 -0
- package/src/css/components/tree/rules.ts +52 -0
- package/src/css/components/tree/tree.ts +5 -0
- package/src/css/composeClassNames.ts +3 -0
- package/src/css/index.ts +47 -0
- package/src/css/primitives/avatar/avatar.ts +32 -0
- package/src/css/primitives/avatar/index.ts +2 -0
- package/src/css/primitives/avatar/rules.ts +190 -0
- package/src/css/primitives/avatar/types.ts +9 -0
- package/src/css/primitives/badge/badge.ts +8 -0
- package/src/css/primitives/badge/index.ts +2 -0
- package/src/css/primitives/badge/rules.ts +25 -0
- package/src/css/primitives/badge/types.ts +8 -0
- package/src/css/primitives/box/box.ts +34 -0
- package/src/css/primitives/box/index.ts +2 -0
- package/src/css/primitives/box/rules.ts +25 -0
- package/src/css/primitives/box/types.ts +49 -0
- package/src/css/primitives/button/button.ts +26 -0
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/rules.ts +58 -0
- package/src/css/primitives/card/card.ts +21 -0
- package/src/css/primitives/card/index.ts +1 -0
- package/src/css/primitives/card/rules.ts +93 -0
- package/src/{core/primitives/checkbox/styles.ts → css/primitives/checkbox/__styles.ts} +3 -3
- package/src/css/primitives/checkbox/checkbox.ts +9 -0
- package/src/css/primitives/checkbox/index.ts +1 -0
- package/src/css/primitives/checkbox/rules.ts +136 -0
- package/src/css/primitives/code/code.ts +9 -0
- package/src/css/primitives/code/index.ts +2 -0
- package/src/css/primitives/code/rules.ts +71 -0
- package/src/css/primitives/code/types.ts +10 -0
- package/src/css/primitives/container/container.ts +7 -0
- package/src/css/primitives/container/index.ts +2 -0
- package/src/css/primitives/container/rules.ts +8 -0
- package/src/css/primitives/container/types.ts +6 -0
- package/src/css/primitives/heading/heading.ts +16 -0
- package/src/css/primitives/heading/index.ts +2 -0
- package/src/css/primitives/heading/rules.ts +84 -0
- package/src/css/primitives/heading/types.ts +12 -0
- package/src/css/primitives/kbd/index.ts +2 -0
- package/src/css/primitives/kbd/kbd.ts +7 -0
- package/src/css/primitives/kbd/rules.ts +20 -0
- package/src/css/primitives/kbd/types.ts +5 -0
- package/src/css/primitives/label/index.ts +2 -0
- package/src/css/primitives/label/label.ts +16 -0
- package/src/css/primitives/label/rules.ts +85 -0
- package/src/css/primitives/label/types.ts +12 -0
- package/src/css/primitives/popover/index.ts +1 -0
- package/src/css/primitives/popover/popover.ts +5 -0
- package/src/css/primitives/popover/rules.ts +5 -0
- package/src/css/primitives/radio/index.ts +1 -0
- package/src/css/primitives/radio/radio.ts +5 -0
- package/src/css/primitives/radio/rules.ts +5 -0
- package/src/css/primitives/select/index.ts +1 -0
- package/src/css/primitives/select/rules.ts +5 -0
- package/src/css/primitives/select/select.ts +5 -0
- package/src/{core/primitives/_selectable/style.ts → css/primitives/selectable/__style.ts} +5 -4
- package/src/css/primitives/selectable/index.ts +2 -0
- package/src/css/primitives/selectable/rules.ts +27 -0
- package/src/css/primitives/selectable/selectable.ts +9 -0
- package/src/css/primitives/selectable/types.ts +6 -0
- package/src/css/primitives/spinner/index.ts +1 -0
- package/src/css/primitives/spinner/rules.ts +22 -0
- package/src/css/primitives/spinner/spinner.ts +5 -0
- package/src/css/primitives/switch/index.ts +1 -0
- package/src/css/primitives/switch/rules.ts +132 -0
- package/src/css/primitives/switch/switch.ts +5 -0
- package/src/css/primitives/text/index.ts +2 -0
- package/src/css/primitives/text/rules.ts +75 -0
- package/src/css/primitives/text/text.ts +16 -0
- package/src/css/primitives/text/types.ts +11 -0
- package/src/css/primitives/textArea/index.ts +1 -0
- package/src/css/primitives/textArea/rules.ts +5 -0
- package/src/css/primitives/textArea/textArea.ts +5 -0
- package/src/css/primitives/textInput/index.ts +1 -0
- package/src/css/primitives/textInput/rules.ts +226 -0
- package/src/css/primitives/textInput/textInput.ts +7 -0
- package/src/css/primitives/token/rules.ts +45 -0
- package/src/css/primitives/tooltip/index.ts +1 -0
- package/src/css/primitives/tooltip/rules.ts +17 -0
- package/src/css/primitives/tooltip/tooltip.ts +9 -0
- package/src/css/responsiveRules.ts +25 -0
- package/src/css/rules.ts +121 -0
- package/src/css/styles/border/border.ts +22 -0
- package/src/css/styles/border/index.ts +2 -0
- package/src/css/styles/border/rules.ts +24 -0
- package/src/css/styles/border/types.ts +10 -0
- package/src/css/styles/display/rules.ts +62 -0
- package/src/css/styles/flex/flex.ts +20 -0
- package/src/css/styles/flex/index.ts +2 -0
- package/src/css/styles/flex/rules.ts +28 -0
- package/src/css/styles/flex/types.ts +35 -0
- package/src/css/styles/flexItem/flexItem.ts +8 -0
- package/src/css/styles/flexItem/index.ts +2 -0
- package/src/css/styles/flexItem/rules.ts +11 -0
- package/src/css/styles/flexItem/types.ts +11 -0
- package/src/css/styles/font/font.ts +12 -0
- package/src/css/styles/font/index.ts +2 -0
- package/src/css/styles/font/rules.ts +125 -0
- package/src/css/styles/font/types.ts +6 -0
- package/src/css/styles/gap/gap.ts +8 -0
- package/src/css/styles/gap/index.ts +2 -0
- package/src/css/styles/gap/rules.ts +33 -0
- package/src/css/styles/gap/types.ts +9 -0
- package/src/css/styles/grid/rules.ts +35 -0
- package/src/css/styles/gridItem/gridItem.ts +15 -0
- package/src/css/styles/gridItem/index.ts +2 -0
- package/src/css/styles/gridItem/rules.ts +96 -0
- package/src/css/styles/gridItem/types.ts +41 -0
- package/src/css/styles/height/rules.ts +7 -0
- package/src/css/styles/margin/index.ts +2 -0
- package/src/css/styles/margin/margin.ts +15 -0
- package/src/css/styles/margin/rules.ts +59 -0
- package/src/css/styles/margin/types.ts +11 -0
- package/src/css/styles/maxWidth/index.ts +2 -0
- package/src/css/styles/maxWidth/maxWidth.ts +6 -0
- package/src/css/styles/maxWidth/rules.ts +36 -0
- package/src/css/styles/maxWidth/types.ts +6 -0
- package/src/css/styles/overflow/rules.ts +9 -0
- package/src/css/styles/padding/index.ts +2 -0
- package/src/css/styles/padding/padding.ts +15 -0
- package/src/css/styles/padding/rules.ts +59 -0
- package/src/css/styles/padding/types.ts +12 -0
- package/src/css/styles/pointerEvents/index.ts +2 -0
- package/src/css/styles/pointerEvents/pointerEvents.ts +6 -0
- package/src/css/styles/pointerEvents/rules.ts +11 -0
- package/src/css/styles/pointerEvents/types.ts +7 -0
- package/src/css/styles/position/index.ts +2 -0
- package/src/css/styles/position/position.ts +7 -0
- package/src/css/styles/position/rules.ts +31 -0
- package/src/css/styles/position/types.ts +13 -0
- package/src/css/styles/radius/index.ts +2 -0
- package/src/css/styles/radius/radius.ts +8 -0
- package/src/css/styles/radius/rules.ts +13 -0
- package/src/css/styles/radius/types.ts +7 -0
- package/src/css/styles/shadow/rules.ts +53 -0
- package/src/css/styles/width/index.ts +2 -0
- package/src/css/styles/width/rules.ts +7 -0
- package/src/css/styles/width/types.ts +8 -0
- package/src/css/styles/width/width.ts +6 -0
- package/src/css/types.ts +591 -0
- package/src/css/varNames.ts +381 -0
- package/src/css/vars.ts +313 -0
- package/src/theme/build/_deprecated/color/factory.ts +1 -1
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/build/buildColorTheme.ts +39 -45
- package/src/theme/build/renderColorTheme.ts +65 -239
- package/src/theme/build/resolveColorTokens.ts +115 -51
- package/src/theme/config/tokens/color/types.ts +18 -4
- package/src/theme/defaults/colorTokens.ts +10 -17
- package/src/theme/defaults/config.ts +1 -1
- package/src/theme/getScopedTheme.ts +2 -9
- package/src/theme/system/_constants.ts +25 -0
- package/src/theme/system/_types.ts +41 -0
- package/src/theme/system/color/_constants.ts +0 -8
- package/src/theme/system/color/badge.ts +7 -3
- package/src/theme/system/index.ts +2 -0
- package/src/theme/system/v0/color/_system.ts +4 -8
- package/src/theme/system/v0/color/color.ts +2 -3
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -26
- package/src/theme/versioning/v0_v2.ts +0 -4
- package/src/core/components/breadcrumbs/__workshop__/buttons.tsx +0 -58
- package/src/core/components/dialog/styles.ts +0 -76
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {CloseIcon} from '@sanity/icons'
|
|
2
|
-
import {
|
|
2
|
+
import {composeClassNames, RadiusStyleProps, ResponsiveProp, textInput} from '@sanity/ui/css'
|
|
3
|
+
import {FontTextSize, Space, ThemeFontWeightKey} from '@sanity/ui/theme'
|
|
3
4
|
import {forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'
|
|
4
5
|
import {isValidElementType} from 'react-is'
|
|
5
|
-
import {styled} from 'styled-components'
|
|
6
6
|
import {EMPTY_RECORD} from '../../constants'
|
|
7
7
|
import {useArrayProp, useCustomValidity} from '../../hooks'
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
import {styled} from '../../lib/styled'
|
|
9
|
+
// import {
|
|
10
|
+
// // responsiveRadiusStyle,
|
|
11
|
+
// // ResponsiveRadiusStyleProps,
|
|
12
|
+
// responsiveInputPaddingStyle,
|
|
13
|
+
// TextInputInputStyleProps,
|
|
14
|
+
// // TextInputRepresentationStyleProps,
|
|
15
|
+
// TextInputResponsivePaddingStyleProps,
|
|
16
|
+
// textInputBaseStyle,
|
|
17
|
+
// textInputFontSizeStyle,
|
|
18
|
+
// // textInputRepresentationStyle,
|
|
19
|
+
// // textInputRootStyle,
|
|
20
|
+
// } from '../../styles/internal'
|
|
20
21
|
import {useRootTheme} from '../../theme'
|
|
21
|
-
import {Radius} from '../../types'
|
|
22
22
|
import {Box} from '../box'
|
|
23
23
|
import {Button, ButtonProps} from '../button'
|
|
24
24
|
import {Card} from '../card'
|
|
@@ -50,7 +50,7 @@ export type TextInputType =
|
|
|
50
50
|
/**
|
|
51
51
|
* @public
|
|
52
52
|
*/
|
|
53
|
-
export interface TextInputProps {
|
|
53
|
+
export interface TextInputProps extends RadiusStyleProps {
|
|
54
54
|
/**
|
|
55
55
|
* @beta
|
|
56
56
|
*/
|
|
@@ -61,82 +61,89 @@ export interface TextInputProps {
|
|
|
61
61
|
*/
|
|
62
62
|
clearButton?: boolean | TextInputClearButtonProps
|
|
63
63
|
customValidity?: string
|
|
64
|
-
fontSize?:
|
|
64
|
+
fontSize?: ResponsiveProp<FontTextSize>
|
|
65
65
|
icon?: React.ElementType | React.ReactNode
|
|
66
66
|
iconRight?: React.ElementType | React.ReactNode
|
|
67
67
|
/**
|
|
68
68
|
* @beta
|
|
69
69
|
*/
|
|
70
70
|
onClear?: () => void
|
|
71
|
-
padding
|
|
71
|
+
padding: ResponsiveProp<Space>
|
|
72
|
+
// padding?: number | number[]
|
|
72
73
|
prefix?: React.ReactNode
|
|
73
|
-
radius?: Radius | Radius[]
|
|
74
|
-
space?: number | number[]
|
|
74
|
+
// radius?: Radius | Radius[]
|
|
75
|
+
// space?: number | number[]
|
|
76
|
+
space?: ResponsiveProp<Space>
|
|
75
77
|
suffix?: React.ReactNode
|
|
76
78
|
type?: TextInputType
|
|
77
79
|
weight?: ThemeFontWeightKey
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
const CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
`
|
|
82
|
+
const CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {
|
|
83
|
+
backgroundColor: 'transparent',
|
|
84
|
+
top: 0,
|
|
85
|
+
right: 0,
|
|
86
|
+
zIndex: 2,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// const Root = styled(Card).attrs({forwardedAs: 'span'})(textInputRootStyle)
|
|
90
|
+
|
|
91
|
+
// const InputRoot = styled.span`
|
|
92
|
+
// flex: 1;
|
|
93
|
+
// min-width: 0;
|
|
94
|
+
// display: block;
|
|
95
|
+
// position: relative;
|
|
96
|
+
// `
|
|
97
|
+
|
|
98
|
+
// const Prefix = styled(Card).attrs({forwardedAs: 'span'})`
|
|
99
|
+
// border-top-right-radius: 0;
|
|
100
|
+
// border-bottom-right-radius: 0;
|
|
101
|
+
|
|
102
|
+
// & > span {
|
|
103
|
+
// display: block;
|
|
104
|
+
// margin: -1px;
|
|
105
|
+
// }
|
|
106
|
+
// `
|
|
107
|
+
|
|
108
|
+
// const Suffix = styled(Card).attrs({forwardedAs: 'span'})`
|
|
109
|
+
// border-top-left-radius: 0;
|
|
110
|
+
// border-bottom-left-radius: 0;
|
|
111
|
+
|
|
112
|
+
// & > span {
|
|
113
|
+
// display: block;
|
|
114
|
+
// margin: -1px;
|
|
115
|
+
// }
|
|
116
|
+
// `
|
|
117
|
+
|
|
118
|
+
// const Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(
|
|
119
|
+
// responsiveInputPaddingStyle,
|
|
120
|
+
// textInputBaseStyle,
|
|
121
|
+
// textInputFontSizeStyle,
|
|
122
|
+
// )
|
|
123
|
+
|
|
124
|
+
// const Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(
|
|
125
|
+
// responsiveRadiusStyle,
|
|
126
|
+
// textInputRepresentationStyle,
|
|
127
|
+
// )
|
|
128
|
+
|
|
129
|
+
// const LeftBox = styled(Box)`
|
|
130
|
+
// position: absolute;
|
|
131
|
+
// top: 0;
|
|
132
|
+
// left: 0;
|
|
133
|
+
// `
|
|
134
|
+
|
|
135
|
+
// const RightBox = styled(Box)`
|
|
136
|
+
// position: absolute;
|
|
137
|
+
// top: 0;
|
|
138
|
+
// right: 0;
|
|
139
|
+
// `
|
|
140
|
+
|
|
141
|
+
// const RightCard = styled(Card)`
|
|
142
|
+
// background-color: transparent;
|
|
143
|
+
// position: absolute;
|
|
144
|
+
// top: 0;
|
|
145
|
+
// right: 0;
|
|
146
|
+
// `
|
|
140
147
|
|
|
141
148
|
const TextInputClearButton = styled(Button)({
|
|
142
149
|
'&:not([hidden])': {
|
|
@@ -156,6 +163,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
156
163
|
const {
|
|
157
164
|
__unstable_disableFocusRing,
|
|
158
165
|
border = true,
|
|
166
|
+
className,
|
|
159
167
|
clearButton,
|
|
160
168
|
disabled = false,
|
|
161
169
|
fontSize: fontSizeProp = 2,
|
|
@@ -166,11 +174,11 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
166
174
|
prefix,
|
|
167
175
|
radius: radiusProp = 2,
|
|
168
176
|
readOnly,
|
|
169
|
-
space:
|
|
177
|
+
space: _space = 3,
|
|
170
178
|
suffix,
|
|
171
179
|
customValidity,
|
|
172
180
|
type = 'text',
|
|
173
|
-
weight,
|
|
181
|
+
weight: _width,
|
|
174
182
|
...restProps
|
|
175
183
|
} = props
|
|
176
184
|
const ref = useRef<HTMLInputElement | null>(null)
|
|
@@ -180,14 +188,14 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
180
188
|
const fontSize = useArrayProp(fontSizeProp)
|
|
181
189
|
const padding = useArrayProp(paddingProp)
|
|
182
190
|
const radius = useArrayProp(radiusProp)
|
|
183
|
-
const space = useArrayProp(spaceProp)
|
|
191
|
+
// const space = useArrayProp(spaceProp)
|
|
184
192
|
|
|
185
193
|
// Transient properties
|
|
186
194
|
const $hasClearButton = Boolean(clearButton)
|
|
187
|
-
const $hasIcon = Boolean(IconComponent)
|
|
188
|
-
const $hasIconRight = Boolean(IconRightComponent)
|
|
189
|
-
const $hasSuffix = Boolean(suffix)
|
|
190
|
-
const $hasPrefix = Boolean(prefix)
|
|
195
|
+
// const $hasIcon = Boolean(IconComponent)
|
|
196
|
+
// const $hasIconRight = Boolean(IconRightComponent)
|
|
197
|
+
// const $hasSuffix = Boolean(suffix)
|
|
198
|
+
// const $hasPrefix = Boolean(prefix)
|
|
191
199
|
|
|
192
200
|
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
|
|
193
201
|
forwardedRef,
|
|
@@ -219,9 +227,18 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
219
227
|
const prefixNode = useMemo(
|
|
220
228
|
() =>
|
|
221
229
|
prefix && (
|
|
222
|
-
<
|
|
230
|
+
<Card
|
|
231
|
+
as="span"
|
|
232
|
+
borderTop
|
|
233
|
+
borderLeft
|
|
234
|
+
borderBottom
|
|
235
|
+
className="text-input-prefix"
|
|
236
|
+
radius={radius}
|
|
237
|
+
sizing="border"
|
|
238
|
+
tone="inherit"
|
|
239
|
+
>
|
|
223
240
|
<span>{prefix}</span>
|
|
224
|
-
</
|
|
241
|
+
</Card>
|
|
225
242
|
),
|
|
226
243
|
[prefix, radius],
|
|
227
244
|
)
|
|
@@ -229,35 +246,41 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
229
246
|
// Render presentation (memoized)
|
|
230
247
|
const presentationNode = useMemo(
|
|
231
248
|
() => (
|
|
232
|
-
<
|
|
233
|
-
|
|
234
|
-
$
|
|
235
|
-
$
|
|
236
|
-
$
|
|
237
|
-
$
|
|
238
|
-
$
|
|
249
|
+
<Card
|
|
250
|
+
as="span"
|
|
251
|
+
// $hasPrefix={$hasPrefix}
|
|
252
|
+
// $unstableDisableFocusRing={__unstable_disableFocusRing}
|
|
253
|
+
// $hasSuffix={$hasSuffix}
|
|
254
|
+
// $radius={radius}
|
|
255
|
+
// $scheme={rootTheme.scheme}
|
|
256
|
+
// $tone={rootTheme.tone}
|
|
257
|
+
border={border}
|
|
258
|
+
className="text-input-presentation"
|
|
239
259
|
data-border={border ? '' : undefined}
|
|
260
|
+
data-disable-focus-ring={__unstable_disableFocusRing ? '' : undefined}
|
|
240
261
|
data-scheme={rootTheme.scheme}
|
|
241
262
|
data-tone={rootTheme.tone}
|
|
263
|
+
position="absolute"
|
|
264
|
+
radius={radius}
|
|
242
265
|
>
|
|
243
266
|
{IconComponent && (
|
|
244
|
-
<
|
|
267
|
+
<Box as="span" padding={padding} position="absolute" style={{top: 0, left: 0}}>
|
|
245
268
|
<Text size={fontSize}>
|
|
246
269
|
{isValidElement(IconComponent) && IconComponent}
|
|
247
270
|
{isValidElementType(IconComponent) && <IconComponent />}
|
|
248
271
|
</Text>
|
|
249
|
-
</
|
|
272
|
+
</Box>
|
|
250
273
|
)}
|
|
251
274
|
|
|
252
275
|
{!$hasClearButton && IconRightComponent && (
|
|
253
|
-
<
|
|
276
|
+
<Box as="span" padding={padding} position="absolute" style={{top: 0, right: 0}}>
|
|
254
277
|
<Text size={fontSize}>
|
|
255
278
|
{isValidElement(IconRightComponent) && IconRightComponent}
|
|
256
279
|
{isValidElementType(IconRightComponent) && <IconRightComponent />}
|
|
257
280
|
</Text>
|
|
258
|
-
</
|
|
281
|
+
</Box>
|
|
259
282
|
)}
|
|
260
|
-
</
|
|
283
|
+
</Card>
|
|
261
284
|
),
|
|
262
285
|
[
|
|
263
286
|
__unstable_disableFocusRing,
|
|
@@ -269,8 +292,8 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
269
292
|
radius,
|
|
270
293
|
rootTheme,
|
|
271
294
|
$hasClearButton,
|
|
272
|
-
$hasPrefix,
|
|
273
|
-
$hasSuffix,
|
|
295
|
+
// $hasPrefix,
|
|
296
|
+
// $hasSuffix,
|
|
274
297
|
],
|
|
275
298
|
)
|
|
276
299
|
|
|
@@ -282,10 +305,11 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
282
305
|
if (v === 1) return 1
|
|
283
306
|
if (v === 2) return 1
|
|
284
307
|
|
|
285
|
-
return v - 2
|
|
308
|
+
return (v as Space) - 2
|
|
286
309
|
}),
|
|
287
310
|
[padding],
|
|
288
311
|
)
|
|
312
|
+
|
|
289
313
|
const clearButtonPadding = useMemo(
|
|
290
314
|
() =>
|
|
291
315
|
padding.map((v) => {
|
|
@@ -293,7 +317,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
293
317
|
if (v === 1) return 0
|
|
294
318
|
if (v === 2) return 1
|
|
295
319
|
|
|
296
|
-
return v - 1
|
|
320
|
+
return (v as Space) - 1
|
|
297
321
|
}),
|
|
298
322
|
[padding],
|
|
299
323
|
)
|
|
@@ -306,11 +330,16 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
306
330
|
!disabled &&
|
|
307
331
|
!readOnly &&
|
|
308
332
|
clearButton && (
|
|
309
|
-
<
|
|
310
|
-
forwardedAs="span"
|
|
333
|
+
<Card
|
|
334
|
+
// forwardedAs="span"
|
|
311
335
|
padding={clearButtonBoxPadding}
|
|
336
|
+
position="absolute"
|
|
312
337
|
style={CLEAR_BUTTON_BOX_STYLE}
|
|
313
338
|
tone={customValidity ? 'critical' : 'inherit'}
|
|
339
|
+
|
|
340
|
+
// position: absolute;
|
|
341
|
+
// top: 0;
|
|
342
|
+
// right: 0;
|
|
314
343
|
>
|
|
315
344
|
<TextInputClearButton
|
|
316
345
|
aria-label="Clear"
|
|
@@ -324,7 +353,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
324
353
|
onClick={handleClearClick}
|
|
325
354
|
onMouseDown={handleClearMouseDown}
|
|
326
355
|
/>
|
|
327
|
-
</
|
|
356
|
+
</Card>
|
|
328
357
|
),
|
|
329
358
|
[
|
|
330
359
|
clearButton,
|
|
@@ -345,31 +374,54 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
345
374
|
const suffixNode = useMemo(
|
|
346
375
|
() =>
|
|
347
376
|
suffix && (
|
|
348
|
-
<
|
|
377
|
+
<Card
|
|
378
|
+
as="span"
|
|
379
|
+
borderTop
|
|
380
|
+
borderRight
|
|
381
|
+
borderBottom
|
|
382
|
+
className="text-input-suffix"
|
|
383
|
+
radius={radius}
|
|
384
|
+
sizing="border"
|
|
385
|
+
tone="inherit"
|
|
386
|
+
>
|
|
349
387
|
<span>{suffix}</span>
|
|
350
|
-
</
|
|
388
|
+
</Card>
|
|
351
389
|
),
|
|
352
390
|
[radius, suffix],
|
|
353
391
|
)
|
|
354
392
|
|
|
355
393
|
return (
|
|
356
|
-
<
|
|
394
|
+
<Card
|
|
395
|
+
align="center"
|
|
396
|
+
as="span"
|
|
397
|
+
className={composeClassNames(className, textInput({size: fontSizeProp}))}
|
|
398
|
+
data-ui="TextInput"
|
|
399
|
+
display="flex"
|
|
400
|
+
tone={rootTheme.tone}
|
|
401
|
+
>
|
|
357
402
|
{prefixNode}
|
|
358
403
|
|
|
359
|
-
<
|
|
360
|
-
|
|
404
|
+
<Box
|
|
405
|
+
as="span"
|
|
406
|
+
className="text-input-wrapper"
|
|
407
|
+
flex={1}
|
|
408
|
+
// todo
|
|
409
|
+
// minWidth={0}
|
|
410
|
+
position="relative"
|
|
411
|
+
>
|
|
412
|
+
<input
|
|
361
413
|
data-as="input"
|
|
362
414
|
data-scheme={rootTheme.scheme}
|
|
363
415
|
data-tone={rootTheme.tone}
|
|
364
416
|
{...restProps}
|
|
365
|
-
$fontSize={fontSize}
|
|
366
|
-
$iconLeft={$hasIcon}
|
|
367
|
-
$iconRight={$hasIconRight || $hasClearButton}
|
|
368
|
-
$padding={padding}
|
|
369
|
-
$scheme={rootTheme.scheme}
|
|
370
|
-
$space={space}
|
|
371
|
-
$tone={rootTheme.tone}
|
|
372
|
-
$weight={weight}
|
|
417
|
+
// $fontSize={fontSize}
|
|
418
|
+
// $iconLeft={$hasIcon}
|
|
419
|
+
// $iconRight={$hasIconRight || $hasClearButton}
|
|
420
|
+
// $padding={padding}
|
|
421
|
+
// $scheme={rootTheme.scheme}
|
|
422
|
+
// $space={space}
|
|
423
|
+
// $tone={rootTheme.tone}
|
|
424
|
+
// $weight={weight}
|
|
373
425
|
disabled={disabled}
|
|
374
426
|
readOnly={readOnly}
|
|
375
427
|
ref={ref}
|
|
@@ -378,10 +430,11 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
378
430
|
|
|
379
431
|
{presentationNode}
|
|
380
432
|
{clearButtonNode}
|
|
381
|
-
</
|
|
433
|
+
</Box>
|
|
382
434
|
|
|
383
435
|
{suffixNode}
|
|
384
|
-
</
|
|
436
|
+
</Card>
|
|
385
437
|
)
|
|
386
438
|
})
|
|
439
|
+
|
|
387
440
|
TextInput.displayName = 'ForwardRef(TextInput)'
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
type Middleware,
|
|
10
10
|
type RootBoundary,
|
|
11
11
|
} from '@floating-ui/react-dom'
|
|
12
|
+
import {composeClassNames, RadiusStyleProps, tooltip} from '@sanity/ui/css'
|
|
12
13
|
import type {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
13
14
|
import {AnimatePresence} from 'framer-motion'
|
|
14
15
|
import {
|
|
@@ -23,7 +24,6 @@ import {
|
|
|
23
24
|
useImperativeHandle,
|
|
24
25
|
useLayoutEffect,
|
|
25
26
|
} from 'react'
|
|
26
|
-
import {styled} from 'styled-components'
|
|
27
27
|
import {useEffectEvent} from 'use-effect-event'
|
|
28
28
|
import {useArrayProp, usePrefersReducedMotion} from '../../hooks'
|
|
29
29
|
import {useDelayedState} from '../../hooks/useDelayedState'
|
|
@@ -43,7 +43,7 @@ import {useTooltipDelayGroup} from './tooltipDelayGroup'
|
|
|
43
43
|
/**
|
|
44
44
|
* @public
|
|
45
45
|
*/
|
|
46
|
-
export interface TooltipProps extends Omit<LayerProps, 'as'
|
|
46
|
+
export interface TooltipProps extends Omit<LayerProps, 'as'>, RadiusStyleProps {
|
|
47
47
|
/** @deprecated Use `fallbackPlacements` instead. */
|
|
48
48
|
allowedAutoPlacements?: Placement[]
|
|
49
49
|
arrow?: boolean
|
|
@@ -56,7 +56,7 @@ export interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
56
56
|
placement?: Placement
|
|
57
57
|
/** Whether or not to render the tooltip in a portal element. */
|
|
58
58
|
portal?: boolean | string
|
|
59
|
-
radius?: number | number[]
|
|
59
|
+
// radius?: number | number[]
|
|
60
60
|
scheme?: ThemeColorSchemeKey
|
|
61
61
|
shadow?: number | number[]
|
|
62
62
|
/**
|
|
@@ -79,17 +79,14 @@ export interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
79
79
|
animate?: boolean
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
const Root = styled(Layer)`
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
`
|
|
85
|
-
|
|
86
82
|
/**
|
|
87
83
|
* Tooltips display information when hovering, focusing or tapping.
|
|
88
84
|
*
|
|
89
85
|
* @public
|
|
90
86
|
*/
|
|
91
87
|
export const Tooltip = forwardRef(function Tooltip(
|
|
92
|
-
props: TooltipProps &
|
|
88
|
+
props: TooltipProps &
|
|
89
|
+
Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'width' | 'wrap'>,
|
|
93
90
|
forwardedRef: React.ForwardedRef<HTMLDivElement>,
|
|
94
91
|
) {
|
|
95
92
|
const boundaryElementContext = useBoundaryElement()
|
|
@@ -99,6 +96,7 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
99
96
|
arrow: arrowProp = false,
|
|
100
97
|
boundaryElement = boundaryElementContext?.element,
|
|
101
98
|
children: childProp,
|
|
99
|
+
className,
|
|
102
100
|
content,
|
|
103
101
|
disabled,
|
|
104
102
|
fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements ??
|
|
@@ -364,10 +362,11 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
364
362
|
|
|
365
363
|
if (disabled) return child
|
|
366
364
|
|
|
367
|
-
const
|
|
368
|
-
<
|
|
365
|
+
const node = (
|
|
366
|
+
<Layer
|
|
369
367
|
data-ui="Tooltip"
|
|
370
368
|
{...restProps}
|
|
369
|
+
className={composeClassNames(className, tooltip())}
|
|
371
370
|
ref={setFloating}
|
|
372
371
|
style={{
|
|
373
372
|
...floatingStyles,
|
|
@@ -393,17 +392,17 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
393
392
|
>
|
|
394
393
|
{content}
|
|
395
394
|
</TooltipCard>
|
|
396
|
-
</
|
|
395
|
+
</Layer>
|
|
397
396
|
)
|
|
398
397
|
|
|
399
398
|
const children =
|
|
400
399
|
showTooltip &&
|
|
401
400
|
(portalProp ? (
|
|
402
401
|
<Portal __unstable_name={typeof portalProp === 'string' ? portalProp : undefined}>
|
|
403
|
-
{
|
|
402
|
+
{node}
|
|
404
403
|
</Portal>
|
|
405
404
|
) : (
|
|
406
|
-
|
|
405
|
+
node
|
|
407
406
|
))
|
|
408
407
|
|
|
409
408
|
return (
|
|
@@ -416,6 +415,7 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
416
415
|
</>
|
|
417
416
|
)
|
|
418
417
|
})
|
|
418
|
+
|
|
419
419
|
Tooltip.displayName = 'ForwardRef(Tooltip)'
|
|
420
420
|
|
|
421
421
|
/**
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {RadiusStyleProps, tooltipCard} from '@sanity/ui/css'
|
|
1
2
|
import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
2
|
-
import {
|
|
3
|
+
import {motion} from 'framer-motion'
|
|
3
4
|
import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import {
|
|
6
|
+
// POPOVER_MOTION_CONTENT_OPACITY_PROPERTY,
|
|
7
|
+
POPOVER_MOTION_PROPS,
|
|
8
|
+
} from '../../constants'
|
|
9
|
+
import {Placement} from '../../types'
|
|
7
10
|
import {Arrow} from '../../utils'
|
|
8
11
|
import {Card, CardProps} from '../card'
|
|
9
12
|
import {
|
|
@@ -12,12 +15,7 @@ import {
|
|
|
12
15
|
DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
13
16
|
} from './constants'
|
|
14
17
|
|
|
15
|
-
const MotionCard =
|
|
16
|
-
& > * {
|
|
17
|
-
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
18
|
-
will-change: opacity;
|
|
19
|
-
}
|
|
20
|
-
`
|
|
18
|
+
const MotionCard = motion(Card)
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* @internal
|
|
@@ -34,10 +32,10 @@ export const TooltipCard = memo(
|
|
|
34
32
|
originY?: number
|
|
35
33
|
padding?: number | number[]
|
|
36
34
|
placement?: Placement
|
|
37
|
-
radius?: Radius | Radius[]
|
|
38
35
|
scheme?: ThemeColorSchemeKey
|
|
39
36
|
shadow?: number | number[]
|
|
40
|
-
} &
|
|
37
|
+
} & RadiusStyleProps &
|
|
38
|
+
Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width' | 'wrap'>,
|
|
41
39
|
ref: React.ForwardedRef<HTMLDivElement>,
|
|
42
40
|
) {
|
|
43
41
|
const {
|
|
@@ -81,7 +79,9 @@ export const TooltipCard = memo(
|
|
|
81
79
|
return (
|
|
82
80
|
<MotionCard
|
|
83
81
|
data-ui="Tooltip__card"
|
|
84
|
-
{...(restProps as CardProps
|
|
82
|
+
{...(restProps as CardProps)}
|
|
83
|
+
data-animate={animate ? '' : undefined}
|
|
84
|
+
className={tooltipCard()}
|
|
85
85
|
data-placement={placement}
|
|
86
86
|
padding={padding}
|
|
87
87
|
radius={radius}
|
|
@@ -89,7 +89,7 @@ export const TooltipCard = memo(
|
|
|
89
89
|
scheme={scheme}
|
|
90
90
|
shadow={shadow}
|
|
91
91
|
style={rootStyle}
|
|
92
|
-
{...(animate ? POPOVER_MOTION_PROPS : {})}
|
|
92
|
+
{...((animate ? POPOVER_MOTION_PROPS : {}) as CardProps)}
|
|
93
93
|
>
|
|
94
94
|
{children}
|
|
95
95
|
|
|
@@ -106,4 +106,5 @@ export const TooltipCard = memo(
|
|
|
106
106
|
)
|
|
107
107
|
}),
|
|
108
108
|
)
|
|
109
|
+
|
|
109
110
|
TooltipCard.displayName = 'Memo(ForwardRef(TooltipCard))'
|