@sanity/ui 0.37.12 → 0.37.14-next.6
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/lib/dts/src/components/autocomplete/autocomplete.d.ts +2 -2
- package/lib/dts/src/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/lib/dts/src/components/autocomplete/autocomplete.styles.d.ts +1 -1
- package/lib/dts/src/components/autocomplete/autocomplete.styles.d.ts.map +1 -1
- package/lib/dts/src/components/autocomplete/constants.d.ts +0 -4
- package/lib/dts/src/components/autocomplete/constants.d.ts.map +1 -1
- package/lib/dts/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/lib/dts/src/components/dialog/dialog.d.ts.map +1 -1
- package/lib/dts/src/components/dialog/styles.d.ts +1 -1
- package/lib/dts/src/components/dialog/styles.d.ts.map +1 -1
- package/lib/dts/src/components/hotkeys/hotkeys.d.ts.map +1 -1
- package/lib/dts/src/components/menu/menuButton.d.ts.map +1 -1
- package/lib/dts/src/components/menu/menuGroup.d.ts.map +1 -1
- package/lib/dts/src/components/menu/menuItem.d.ts.map +1 -1
- package/lib/dts/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/dts/src/constants.d.ts +10 -0
- package/lib/dts/src/constants.d.ts.map +1 -1
- package/lib/dts/src/hooks/_internal/useUnique.d.ts +2 -3
- package/lib/dts/src/hooks/_internal/useUnique.d.ts.map +1 -1
- package/lib/dts/src/hooks/index.d.ts +2 -1
- package/lib/dts/src/hooks/index.d.ts.map +1 -1
- package/lib/dts/src/hooks/useArrayProp.d.ts +7 -0
- package/lib/dts/src/hooks/useArrayProp.d.ts.map +1 -0
- package/lib/dts/src/hooks/useElementRect/useElementRect.d.ts +1 -1
- package/lib/dts/src/hooks/useElementRect/useElementRect.d.ts.map +1 -1
- package/lib/dts/src/hooks/useElementSize.d.ts +7 -0
- package/lib/dts/src/hooks/useElementSize.d.ts.map +1 -0
- package/lib/dts/src/index.d.ts +1 -0
- package/lib/dts/src/index.d.ts.map +1 -1
- package/lib/dts/src/observers/elementSizeObserver.d.ts +37 -0
- package/lib/dts/src/observers/elementSizeObserver.d.ts.map +1 -0
- package/lib/dts/src/observers/index.d.ts +3 -0
- package/lib/dts/src/observers/index.d.ts.map +1 -0
- package/lib/dts/src/observers/resizeObserver.d.ts +5 -0
- package/lib/dts/src/observers/resizeObserver.d.ts.map +1 -0
- package/lib/dts/src/primitives/_selectable/selectable.d.ts +1 -2
- package/lib/dts/src/primitives/_selectable/selectable.d.ts.map +1 -1
- package/lib/dts/src/primitives/avatar/avatar.d.ts.map +1 -1
- package/lib/dts/src/primitives/avatar/avatarCounter.d.ts +1 -0
- package/lib/dts/src/primitives/avatar/avatarCounter.d.ts.map +1 -1
- package/lib/dts/src/primitives/avatar/avatarStack.d.ts +1 -0
- package/lib/dts/src/primitives/avatar/avatarStack.d.ts.map +1 -1
- package/lib/dts/src/primitives/avatar/styles.d.ts.map +1 -1
- package/lib/dts/src/primitives/badge/badge.d.ts.map +1 -1
- package/lib/dts/src/primitives/box/box.d.ts.map +1 -1
- package/lib/dts/src/primitives/button/button.d.ts.map +1 -1
- package/lib/dts/src/primitives/card/card.d.ts.map +1 -1
- package/lib/dts/src/primitives/code/code.d.ts.map +1 -1
- package/lib/dts/src/primitives/container/container.d.ts.map +1 -1
- package/lib/dts/src/primitives/container/styles.d.ts.map +1 -1
- package/lib/dts/src/primitives/container/types.d.ts +1 -1
- package/lib/dts/src/primitives/container/types.d.ts.map +1 -1
- package/lib/dts/src/primitives/flex/flex.d.ts.map +1 -1
- package/lib/dts/src/primitives/grid/grid.d.ts.map +1 -1
- package/lib/dts/src/primitives/heading/heading.d.ts.map +1 -1
- package/lib/dts/src/primitives/inline/inline.d.ts.map +1 -1
- package/lib/dts/src/primitives/inline/styles.d.ts.map +1 -1
- package/lib/dts/src/primitives/inline/types.d.ts +1 -1
- package/lib/dts/src/primitives/inline/types.d.ts.map +1 -1
- package/lib/dts/src/primitives/kbd/kbd.d.ts.map +1 -1
- package/lib/dts/src/primitives/label/label.d.ts.map +1 -1
- package/lib/dts/src/primitives/popover/popover.d.ts +6 -5
- package/lib/dts/src/primitives/popover/popover.d.ts.map +1 -1
- package/lib/dts/src/primitives/popover/{arrow.d.ts → popoverArrow.d.ts} +1 -1
- package/lib/dts/src/primitives/popover/popoverArrow.d.ts.map +1 -0
- package/lib/dts/src/primitives/popover/popoverCard.d.ts +33 -0
- package/lib/dts/src/primitives/popover/popoverCard.d.ts.map +1 -0
- package/lib/dts/src/primitives/select/styles.d.ts +5 -1
- package/lib/dts/src/primitives/select/styles.d.ts.map +1 -1
- package/lib/dts/src/primitives/stack/stack.d.ts.map +1 -1
- package/lib/dts/src/primitives/stack/styles.d.ts +1 -1
- package/lib/dts/src/primitives/stack/styles.d.ts.map +1 -1
- package/lib/dts/src/primitives/text/text.d.ts.map +1 -1
- package/lib/dts/src/primitives/textArea/textArea.d.ts.map +1 -1
- package/lib/dts/src/primitives/textInput/textInput.d.ts.map +1 -1
- package/lib/dts/src/primitives/tooltip/tooltip.d.ts +2 -0
- package/lib/dts/src/primitives/tooltip/tooltip.d.ts.map +1 -1
- package/lib/dts/src/primitives/tooltip/tooltipArrow.d.ts.map +1 -1
- package/lib/dts/src/primitives/types.d.ts +1 -1
- package/lib/dts/src/primitives/types.d.ts.map +1 -1
- package/lib/dts/src/styles/border/types.d.ts +5 -5
- package/lib/dts/src/styles/border/types.d.ts.map +1 -1
- package/lib/dts/src/styles/box/types.d.ts +4 -4
- package/lib/dts/src/styles/box/types.d.ts.map +1 -1
- package/lib/dts/src/styles/flex/flexItemStyle.d.ts.map +1 -1
- package/lib/dts/src/styles/flex/types.d.ts +6 -6
- package/lib/dts/src/styles/flex/types.d.ts.map +1 -1
- package/lib/dts/src/styles/font/responsiveFont.d.ts +1 -1
- package/lib/dts/src/styles/font/responsiveFont.d.ts.map +1 -1
- package/lib/dts/src/styles/font/types.d.ts +3 -3
- package/lib/dts/src/styles/font/types.d.ts.map +1 -1
- package/lib/dts/src/styles/grid/types.d.ts +14 -14
- package/lib/dts/src/styles/grid/types.d.ts.map +1 -1
- package/lib/dts/src/styles/helpers.d.ts +4 -4
- package/lib/dts/src/styles/helpers.d.ts.map +1 -1
- package/lib/dts/src/styles/input/responsiveInputPaddingStyle.d.ts +12 -12
- package/lib/dts/src/styles/input/responsiveInputPaddingStyle.d.ts.map +1 -1
- package/lib/dts/src/styles/input/textInputStyle.d.ts +4 -1
- package/lib/dts/src/styles/input/textInputStyle.d.ts.map +1 -1
- package/lib/dts/src/styles/margin/types.d.ts +7 -7
- package/lib/dts/src/styles/margin/types.d.ts.map +1 -1
- package/lib/dts/src/styles/padding/types.d.ts +7 -7
- package/lib/dts/src/styles/padding/types.d.ts.map +1 -1
- package/lib/dts/src/styles/radius/types.d.ts +1 -1
- package/lib/dts/src/styles/radius/types.d.ts.map +1 -1
- package/lib/dts/src/styles/shadow/shadowStyle.d.ts.map +1 -1
- package/lib/dts/src/styles/shadow/types.d.ts +1 -1
- package/lib/dts/src/styles/shadow/types.d.ts.map +1 -1
- package/lib/dts/src/theme/lib/theme/fonts.d.ts +1 -3
- package/lib/dts/src/theme/lib/theme/fonts.d.ts.map +1 -1
- package/lib/dts/src/theme/studioTheme/fonts.d.ts.map +1 -1
- package/lib/dts/src/types/index.d.ts +2 -1
- package/lib/dts/src/types/index.d.ts.map +1 -1
- package/lib/dts/src/types/placement.d.ts +7 -0
- package/lib/dts/src/types/placement.d.ts.map +1 -0
- package/lib/dts/src/types/text.d.ts +5 -0
- package/lib/dts/src/types/text.d.ts.map +1 -0
- package/lib/dts/src/utils/elementQuery/elementQuery.d.ts.map +1 -1
- package/lib/dts/src/utils/index.d.ts +0 -1
- package/lib/dts/src/utils/index.d.ts.map +1 -1
- package/lib/dts/src/utils/virtualList/virtualList.d.ts.map +1 -1
- package/lib/sanity-ui.js +1214 -1054
- package/lib/sanity-ui.js.map +1 -1
- package/lib/{sanity-ui.modern.js → sanity-ui.modern.mjs} +1246 -1120
- package/lib/sanity-ui.modern.mjs.map +1 -0
- package/lib/sanity-ui.module.js +1106 -947
- package/lib/sanity-ui.module.js.map +1 -1
- package/package.json +11 -12
- package/src/__workshop__/color/overview.tsx +9 -11
- package/src/components/autocomplete/__workshop__/async.tsx +14 -12
- package/src/components/autocomplete/__workshop__/constrainedHeight.tsx +36 -0
- package/src/components/autocomplete/autocomplete.styles.tsx +0 -6
- package/src/components/autocomplete/autocomplete.tsx +14 -7
- package/src/components/autocomplete/constants.ts +3 -8
- package/src/components/breadcrumbs/breadcrumbs.tsx +3 -2
- package/src/components/dialog/dialog.tsx +17 -9
- package/src/components/dialog/styles.ts +3 -3
- package/src/components/hotkeys/hotkeys.tsx +3 -1
- package/src/components/menu/__workshop__/constrainedInBoundary.tsx +11 -14
- package/src/components/menu/__workshop__/groups.tsx +1 -1
- package/src/components/menu/menuButton.tsx +21 -13
- package/src/components/menu/menuGroup.tsx +3 -2
- package/src/components/menu/menuItem.tsx +4 -5
- package/src/components/skeleton/skeleton.tsx +10 -1
- package/src/components/skeleton/textSkeleton.tsx +7 -7
- package/src/constants.ts +17 -0
- package/src/hooks/_internal/useUnique.ts +4 -5
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useArrayProp.ts +23 -0
- package/src/hooks/useElementRect/useElementRect.ts +4 -16
- package/src/hooks/useElementSize.ts +18 -0
- package/src/index.ts +1 -0
- package/src/observers/elementSizeObserver.ts +116 -0
- package/src/observers/index.ts +2 -0
- package/src/{utils → observers}/resizeObserver.ts +1 -4
- package/src/primitives/_selectable/selectable.tsx +5 -4
- package/src/primitives/avatar/avatar.tsx +7 -5
- package/src/primitives/avatar/avatarCounter.tsx +14 -12
- package/src/primitives/avatar/avatarStack.tsx +19 -13
- package/src/primitives/avatar/styles.ts +2 -2
- package/src/primitives/badge/badge.tsx +3 -2
- package/src/primitives/box/box.tsx +27 -26
- package/src/primitives/button/button.tsx +22 -10
- package/src/primitives/card/card.tsx +13 -11
- package/src/primitives/checkbox/__workshop__/example.tsx +4 -2
- package/src/primitives/checkbox/__workshop__/props.tsx +4 -2
- package/src/primitives/checkbox/__workshop__/readOnly.tsx +4 -2
- package/src/primitives/code/__workshop__/props.tsx +1 -1
- package/src/primitives/code/code.tsx +2 -1
- package/src/primitives/container/container.tsx +10 -1
- package/src/primitives/container/styles.ts +2 -2
- package/src/primitives/container/types.ts +1 -1
- package/src/primitives/flex/flex.tsx +6 -5
- package/src/primitives/grid/__workshop__/responsive.tsx +13 -12
- package/src/primitives/grid/grid.tsx +9 -8
- package/src/primitives/heading/__workshop__/opticalAlignment.tsx +19 -7
- package/src/primitives/heading/heading.tsx +3 -2
- package/src/primitives/inline/inline.tsx +12 -6
- package/src/primitives/inline/styles.ts +2 -2
- package/src/primitives/inline/types.ts +1 -1
- package/src/primitives/kbd/kbd.tsx +2 -1
- package/src/primitives/label/label.tsx +4 -3
- package/src/primitives/popover/__workshop__/{margins.tsx → MarginsStory.tsx} +1 -1
- package/src/primitives/popover/__workshop__/{matchReferenceWidth.tsx → MatchReferenceWidthStory.tsx} +0 -0
- package/src/primitives/popover/__workshop__/{plain.tsx → PlainStory.tsx} +13 -14
- package/src/primitives/popover/__workshop__/{recursive.tsx → RecursiveStory.tsx} +4 -1
- package/src/primitives/popover/__workshop__/RightAlignedStory.tsx +61 -0
- package/src/primitives/popover/__workshop__/TestStory.tsx +80 -0
- package/src/primitives/popover/__workshop__/index.ts +10 -5
- package/src/primitives/popover/popover.tsx +245 -193
- package/src/primitives/popover/{arrow.tsx → popoverArrow.tsx} +5 -5
- package/src/primitives/popover/popoverCard.tsx +160 -0
- package/src/primitives/select/select.tsx +9 -9
- package/src/primitives/select/styles.ts +10 -4
- package/src/primitives/stack/stack.tsx +2 -1
- package/src/primitives/stack/styles.ts +3 -3
- package/src/primitives/text/__workshop__/opticalAlignment.tsx +15 -5
- package/src/primitives/text/text.tsx +3 -2
- package/src/primitives/textArea/__workshop__/plain.tsx +23 -18
- package/src/primitives/textArea/textArea.tsx +17 -5
- package/src/primitives/textInput/__workshop__/clearButton.tsx +14 -8
- package/src/primitives/textInput/__workshop__/index.ts +2 -2
- package/src/primitives/textInput/__workshop__/plain.tsx +39 -32
- package/src/primitives/textInput/__workshop__/tones.tsx +97 -75
- package/src/primitives/textInput/__workshop__/typed.tsx +8 -2
- package/src/primitives/textInput/textInput.tsx +43 -12
- package/src/primitives/tooltip/__workshop__/props.tsx +7 -1
- package/src/primitives/tooltip/tooltip.tsx +162 -85
- package/src/primitives/tooltip/tooltipArrow.tsx +25 -10
- package/src/primitives/types.ts +1 -1
- package/src/styles/border/borderStyle.ts +6 -6
- package/src/styles/border/types.ts +5 -5
- package/src/styles/box/boxStyle.ts +5 -5
- package/src/styles/box/types.ts +4 -4
- package/src/styles/flex/flexItemStyle.ts +5 -4
- package/src/styles/flex/flexStyle.ts +6 -6
- package/src/styles/flex/types.ts +6 -6
- package/src/styles/font/responsiveFont.ts +7 -27
- package/src/styles/font/textAlignStyle.ts +2 -2
- package/src/styles/font/types.ts +4 -3
- package/src/styles/grid/gridItemStyle.ts +7 -7
- package/src/styles/grid/gridStyle.ts +9 -9
- package/src/styles/grid/types.ts +14 -14
- package/src/styles/helpers.ts +9 -9
- package/src/styles/input/responsiveInputPaddingStyle.ts +24 -27
- package/src/styles/input/textInputStyle.ts +89 -79
- package/src/styles/margin/marginStyle.ts +8 -8
- package/src/styles/margin/marginsStyle.test.ts +1 -1
- package/src/styles/margin/types.ts +7 -7
- package/src/styles/padding/paddingStyle.test.ts +1 -1
- package/src/styles/padding/paddingStyle.ts +8 -8
- package/src/styles/padding/types.ts +7 -7
- package/src/styles/radius/radiusStyle.ts +2 -2
- package/src/styles/radius/types.ts +1 -1
- package/src/styles/shadow/shadowStyle.ts +2 -5
- package/src/styles/shadow/types.ts +1 -1
- package/src/theme/lib/theme/fonts.ts +1 -3
- package/src/theme/studioTheme/fonts.ts +5 -9
- package/src/types/index.ts +2 -2
- package/src/types/placement.ts +18 -0
- package/src/types/text.ts +4 -0
- package/src/utils/elementQuery/elementQuery.tsx +5 -18
- package/src/utils/index.ts +0 -1
- package/src/utils/layer/layer.tsx +1 -1
- package/src/utils/layer/layerProvider.tsx +2 -2
- package/src/utils/virtualList/virtualList.tsx +8 -7
- package/lib/dts/src/hooks/useResponsiveProp.d.ts +0 -6
- package/lib/dts/src/hooks/useResponsiveProp.d.ts.map +0 -1
- package/lib/dts/src/primitives/popover/arrow.d.ts.map +0 -1
- package/lib/dts/src/primitives/popover/modifiers/getPopoverModifiers.d.ts +0 -4
- package/lib/dts/src/primitives/popover/modifiers/getPopoverModifiers.d.ts.map +0 -1
- package/lib/dts/src/primitives/popover/modifiers/index.d.ts +0 -2
- package/lib/dts/src/primitives/popover/modifiers/index.d.ts.map +0 -1
- package/lib/dts/src/primitives/popover/modifiers/types.d.ts +0 -18
- package/lib/dts/src/primitives/popover/modifiers/types.d.ts.map +0 -1
- package/lib/dts/src/primitives/popover/modifiers/usePopoverModifiers.d.ts +0 -4
- package/lib/dts/src/primitives/popover/modifiers/usePopoverModifiers.d.ts.map +0 -1
- package/lib/dts/src/types/common.d.ts +0 -11
- package/lib/dts/src/types/common.d.ts.map +0 -1
- package/lib/dts/src/utils/resizeObserver.d.ts +0 -6
- package/lib/dts/src/utils/resizeObserver.d.ts.map +0 -1
- package/lib/sanity-ui.modern.js.map +0 -1
- package/src/hooks/useResponsiveProp.ts +0 -10
- package/src/primitives/popover/__workshop__/rightAligned.tsx +0 -57
- package/src/primitives/popover/modifiers/getPopoverModifiers.ts +0 -137
- package/src/primitives/popover/modifiers/index.ts +0 -1
- package/src/primitives/popover/modifiers/types.ts +0 -18
- package/src/primitives/popover/modifiers/usePopoverModifiers.ts +0 -58
- package/src/types/common.ts +0 -12
|
@@ -17,11 +17,11 @@ const Root = styled.div`
|
|
|
17
17
|
transform-origin: 13.5px 13.5px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
[data-
|
|
20
|
+
[data-placement^='top'] > & {
|
|
21
21
|
bottom: -27px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
[data-
|
|
24
|
+
[data-placement^='right'] > & {
|
|
25
25
|
left: -27px;
|
|
26
26
|
|
|
27
27
|
& > svg {
|
|
@@ -29,7 +29,7 @@ const Root = styled.div`
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
[data-
|
|
32
|
+
[data-placement^='left'] > & {
|
|
33
33
|
right: -27px;
|
|
34
34
|
|
|
35
35
|
& > svg {
|
|
@@ -37,7 +37,7 @@ const Root = styled.div`
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
[data-
|
|
40
|
+
[data-placement^='bottom'] > & {
|
|
41
41
|
top: -27px;
|
|
42
42
|
|
|
43
43
|
& > svg {
|
|
@@ -59,7 +59,7 @@ export const PopoverArrow = forwardRef(function PopoverArrow(
|
|
|
59
59
|
ref: React.ForwardedRef<HTMLDivElement>
|
|
60
60
|
) {
|
|
61
61
|
return (
|
|
62
|
-
<Root data-ui="
|
|
62
|
+
<Root data-ui="Popover__arrow" {...props} ref={ref}>
|
|
63
63
|
<svg
|
|
64
64
|
width="27"
|
|
65
65
|
height="11"
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import {Strategy} from '@floating-ui/react-dom'
|
|
2
|
+
import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
|
|
3
|
+
import styled, {CSSObject} from 'styled-components'
|
|
4
|
+
import {FLOATING_STATIC_SIDES} from '../../constants'
|
|
5
|
+
import {ThemeColorSchemeKey} from '../../theme'
|
|
6
|
+
import {BoxOverflow, CardTone, Placement, PopoverMargins} from '../../types'
|
|
7
|
+
import {useLayer} from '../../utils'
|
|
8
|
+
import {Box} from '../box'
|
|
9
|
+
import {Card} from '../card'
|
|
10
|
+
import {PopoverArrow} from './popoverArrow'
|
|
11
|
+
|
|
12
|
+
function popoverCardStyle(props: {$boundaryWidth?: number}): CSSObject {
|
|
13
|
+
const {$boundaryWidth} = props
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
maxWidth: $boundaryWidth ? `${$boundaryWidth - 16}px` : 'calc(100% - 16px)',
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const Root = memo(styled(Card)(popoverCardStyle))
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export const PopoverCard = memo(
|
|
26
|
+
forwardRef(function PopoverCard(
|
|
27
|
+
props: {
|
|
28
|
+
/**
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
__unstable_margins?: PopoverMargins
|
|
32
|
+
arrow: boolean
|
|
33
|
+
arrowRef: React.Ref<HTMLDivElement>
|
|
34
|
+
arrowX?: number
|
|
35
|
+
arrowY?: number
|
|
36
|
+
availableHeight?: number
|
|
37
|
+
availableWidth?: number
|
|
38
|
+
boundaryWidth?: number
|
|
39
|
+
overflow?: BoxOverflow
|
|
40
|
+
padding?: number | number[]
|
|
41
|
+
placement?: Placement
|
|
42
|
+
radius?: number | number[]
|
|
43
|
+
referenceWidth?: number
|
|
44
|
+
scheme?: ThemeColorSchemeKey
|
|
45
|
+
shadow?: number | number[]
|
|
46
|
+
strategy: Strategy
|
|
47
|
+
tone: CardTone
|
|
48
|
+
width?: number | 'auto' | (number | 'auto')[]
|
|
49
|
+
x: number | null
|
|
50
|
+
y: number | null
|
|
51
|
+
} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width'>,
|
|
52
|
+
ref: React.ForwardedRef<HTMLDivElement>
|
|
53
|
+
) {
|
|
54
|
+
const {
|
|
55
|
+
__unstable_margins: marginsProp,
|
|
56
|
+
arrow,
|
|
57
|
+
arrowRef,
|
|
58
|
+
arrowX,
|
|
59
|
+
arrowY,
|
|
60
|
+
availableHeight,
|
|
61
|
+
availableWidth,
|
|
62
|
+
boundaryWidth,
|
|
63
|
+
children,
|
|
64
|
+
padding,
|
|
65
|
+
placement,
|
|
66
|
+
overflow,
|
|
67
|
+
radius,
|
|
68
|
+
referenceWidth: referenceWidthProp,
|
|
69
|
+
scheme,
|
|
70
|
+
shadow,
|
|
71
|
+
strategy,
|
|
72
|
+
tone,
|
|
73
|
+
width,
|
|
74
|
+
x: xProp,
|
|
75
|
+
y: yProp,
|
|
76
|
+
...restProps
|
|
77
|
+
} = props
|
|
78
|
+
|
|
79
|
+
const {zIndex} = useLayer()
|
|
80
|
+
|
|
81
|
+
// top right bottom left
|
|
82
|
+
const margins: PopoverMargins = useMemo(() => marginsProp || [0, 0, 0, 0], [marginsProp])
|
|
83
|
+
|
|
84
|
+
// translate according to margins
|
|
85
|
+
const referenceWidth = referenceWidthProp
|
|
86
|
+
? referenceWidthProp - margins[1] - margins[3]
|
|
87
|
+
: undefined
|
|
88
|
+
const x = (xProp ?? 0) + margins[3]
|
|
89
|
+
const y = (yProp ?? 0) + margins[0]
|
|
90
|
+
|
|
91
|
+
const maxWidth = availableWidth
|
|
92
|
+
? Math.min(availableWidth - 8, referenceWidth || Infinity)
|
|
93
|
+
: undefined
|
|
94
|
+
|
|
95
|
+
const rootStyle: CSSProperties = useMemo(
|
|
96
|
+
() => ({
|
|
97
|
+
position: strategy,
|
|
98
|
+
top: y,
|
|
99
|
+
left: x,
|
|
100
|
+
zIndex,
|
|
101
|
+
width: referenceWidth,
|
|
102
|
+
maxWidth: referenceWidth ? undefined : maxWidth,
|
|
103
|
+
}),
|
|
104
|
+
[referenceWidth, maxWidth, strategy, x, y, zIndex]
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
const wrapperStyle: CSSProperties = useMemo(
|
|
108
|
+
() => ({
|
|
109
|
+
minHeight: 25,
|
|
110
|
+
maxHeight: availableHeight ? availableHeight - 8 : undefined,
|
|
111
|
+
}),
|
|
112
|
+
[availableHeight]
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
const staticSide = placement && FLOATING_STATIC_SIDES[placement.split('-')[0]]
|
|
116
|
+
|
|
117
|
+
const arrowStyle: CSSProperties = useMemo(() => {
|
|
118
|
+
const style: CSSProperties = {
|
|
119
|
+
left: arrowX !== null ? arrowX : undefined,
|
|
120
|
+
top: arrowY !== null ? arrowY : undefined,
|
|
121
|
+
right: undefined,
|
|
122
|
+
bottom: undefined,
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (staticSide) style[staticSide] = -27
|
|
126
|
+
|
|
127
|
+
return style
|
|
128
|
+
}, [arrowX, arrowY, staticSide])
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<Root
|
|
132
|
+
{...restProps}
|
|
133
|
+
$boundaryWidth={boundaryWidth}
|
|
134
|
+
data-placement={placement}
|
|
135
|
+
data-ui="Popover"
|
|
136
|
+
radius={radius}
|
|
137
|
+
ref={ref}
|
|
138
|
+
scheme={scheme}
|
|
139
|
+
shadow={shadow}
|
|
140
|
+
style={rootStyle}
|
|
141
|
+
tone={tone}
|
|
142
|
+
$width={width}
|
|
143
|
+
>
|
|
144
|
+
<Box
|
|
145
|
+
data-ui="Popover__wrapper"
|
|
146
|
+
overflow={overflow}
|
|
147
|
+
padding={padding}
|
|
148
|
+
sizing="border"
|
|
149
|
+
style={wrapperStyle}
|
|
150
|
+
>
|
|
151
|
+
{children}
|
|
152
|
+
</Box>
|
|
153
|
+
|
|
154
|
+
{arrow && <PopoverArrow ref={arrowRef} style={arrowStyle} />}
|
|
155
|
+
</Root>
|
|
156
|
+
)
|
|
157
|
+
})
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
PopoverCard.displayName = 'PopoverCard'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {SelectIcon} from '@sanity/icons'
|
|
2
2
|
import React, {forwardRef} from 'react'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import {useForwardedRef, useCustomValidity} from '../../hooks'
|
|
4
|
+
import {useForwardedRef, useCustomValidity, useArrayProp} from '../../hooks'
|
|
5
5
|
import {Box} from '../box'
|
|
6
6
|
import {Text} from '../text'
|
|
7
7
|
import {selectStyle} from './styles'
|
|
@@ -20,10 +20,10 @@ export interface SelectProps {
|
|
|
20
20
|
const Root = styled.div(selectStyle.root)
|
|
21
21
|
|
|
22
22
|
const Input = styled.select<{
|
|
23
|
-
$fontSize
|
|
24
|
-
$padding
|
|
25
|
-
$radius
|
|
26
|
-
$space
|
|
23
|
+
$fontSize: number[]
|
|
24
|
+
$padding: number[]
|
|
25
|
+
$radius: number[]
|
|
26
|
+
$space: number[]
|
|
27
27
|
}>(selectStyle.input)
|
|
28
28
|
|
|
29
29
|
const IconBox = styled(Box)(selectStyle.iconBox)
|
|
@@ -57,10 +57,10 @@ export const Select = forwardRef(function Select(
|
|
|
57
57
|
data-read-only={!disabled && readOnly ? '' : undefined}
|
|
58
58
|
data-ui="Select"
|
|
59
59
|
{...restProps}
|
|
60
|
-
$fontSize={fontSize}
|
|
61
|
-
$padding={padding}
|
|
62
|
-
$radius={radius}
|
|
63
|
-
$space={space}
|
|
60
|
+
$fontSize={useArrayProp(fontSize)}
|
|
61
|
+
$padding={useArrayProp(padding)}
|
|
62
|
+
$radius={useArrayProp(radius)}
|
|
63
|
+
$space={useArrayProp(space)}
|
|
64
64
|
disabled={disabled || readOnly}
|
|
65
65
|
ref={ref}
|
|
66
66
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {css, CSSObject, FlattenSimpleInterpolation} from 'styled-components'
|
|
2
|
-
import {
|
|
2
|
+
import {rem, _responsive, ThemeProps} from '../../styles'
|
|
3
3
|
import {
|
|
4
4
|
focusRingBorderStyle,
|
|
5
5
|
focusRingStyle,
|
|
@@ -100,17 +100,23 @@ function textSize(size: ThemeFontSize) {
|
|
|
100
100
|
return {fontSize: rem(size.fontSize), lineHeight: rem(size.lineHeight)}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
function inputTextSizeStyle(props: {$fontSize
|
|
103
|
+
function inputTextSizeStyle(props: {$fontSize: number[]} & ThemeProps) {
|
|
104
104
|
const {theme, $fontSize} = props
|
|
105
105
|
const {sizes} = theme.sanity.fonts.text
|
|
106
106
|
|
|
107
|
-
return
|
|
107
|
+
return _responsive(theme.sanity.media, $fontSize, (sizeIndex) =>
|
|
108
108
|
textSize(sizes[sizeIndex] || sizes[2])
|
|
109
109
|
)
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function inputStyle(): Array<
|
|
113
|
-
| ((
|
|
113
|
+
| ((
|
|
114
|
+
props: ResponsiveRadiusStyleProps & {
|
|
115
|
+
$fontSize: number[]
|
|
116
|
+
$padding: number[]
|
|
117
|
+
$space: number[]
|
|
118
|
+
} & ThemeProps
|
|
119
|
+
) => CSSObject[])
|
|
114
120
|
| ((props: ThemeProps) => FlattenSimpleInterpolation)
|
|
115
121
|
> {
|
|
116
122
|
return [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, {forwardRef} from 'react'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
|
+
import {useArrayProp} from '../../hooks'
|
|
3
4
|
import {Box, BoxProps} from '../box'
|
|
4
5
|
import {stackBaseStyle, responsiveStackSpaceStyle, ResponsiveStackSpaceStyleProps} from './styles'
|
|
5
6
|
|
|
@@ -27,7 +28,7 @@ export const Stack = forwardRef(function Stack(
|
|
|
27
28
|
data-as={typeof as === 'string' ? as : undefined}
|
|
28
29
|
data-ui="Stack"
|
|
29
30
|
{...restProps}
|
|
30
|
-
$space={space}
|
|
31
|
+
$space={useArrayProp(space)}
|
|
31
32
|
forwardedAs={as}
|
|
32
33
|
ref={ref}
|
|
33
34
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {CSSObject} from 'styled-components'
|
|
2
|
-
import {
|
|
2
|
+
import {rem, _responsive, ThemeProps} from '../../styles'
|
|
3
3
|
|
|
4
4
|
export interface ResponsiveStackSpaceStyleProps {
|
|
5
|
-
$space
|
|
5
|
+
$space: number[]
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const BASE_STYLE: CSSObject = {
|
|
@@ -26,7 +26,7 @@ export function responsiveStackSpaceStyle(
|
|
|
26
26
|
const {theme} = props
|
|
27
27
|
const {media, space} = theme.sanity
|
|
28
28
|
|
|
29
|
-
return
|
|
29
|
+
return _responsive(media, props.$space, (spaceIndex) => ({
|
|
30
30
|
gridGap: rem(space[spaceIndex]),
|
|
31
31
|
}))
|
|
32
32
|
}
|
|
@@ -8,31 +8,41 @@ export default function OpticalAlignment() {
|
|
|
8
8
|
<Stack space={1}>
|
|
9
9
|
<Flex>
|
|
10
10
|
<Card padding={0} scheme="dark">
|
|
11
|
-
<Text size={4}>
|
|
11
|
+
<Text accent size={4}>
|
|
12
|
+
Hamburgefonstiv M
|
|
13
|
+
</Text>
|
|
12
14
|
</Card>
|
|
13
15
|
</Flex>
|
|
14
16
|
|
|
15
17
|
<Flex>
|
|
16
18
|
<Card padding={0} scheme="dark">
|
|
17
|
-
<Text size={3}>
|
|
19
|
+
<Text accent size={3}>
|
|
20
|
+
Hamburgefonstiv M
|
|
21
|
+
</Text>
|
|
18
22
|
</Card>
|
|
19
23
|
</Flex>
|
|
20
24
|
|
|
21
25
|
<Flex>
|
|
22
26
|
<Card padding={0} scheme="dark">
|
|
23
|
-
<Text size={2}>
|
|
27
|
+
<Text accent size={2}>
|
|
28
|
+
Hamburgefonstiv M
|
|
29
|
+
</Text>
|
|
24
30
|
</Card>
|
|
25
31
|
</Flex>
|
|
26
32
|
|
|
27
33
|
<Flex>
|
|
28
34
|
<Card padding={0} scheme="dark">
|
|
29
|
-
<Text size={1}>
|
|
35
|
+
<Text accent size={1}>
|
|
36
|
+
Hamburgefonstiv M
|
|
37
|
+
</Text>
|
|
30
38
|
</Card>
|
|
31
39
|
</Flex>
|
|
32
40
|
|
|
33
41
|
<Flex>
|
|
34
42
|
<Card padding={0} scheme="dark">
|
|
35
|
-
<Text size={0}>
|
|
43
|
+
<Text accent size={0}>
|
|
44
|
+
Hamburgefonstiv M
|
|
45
|
+
</Text>
|
|
36
46
|
</Card>
|
|
37
47
|
</Flex>
|
|
38
48
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, {forwardRef} from 'react'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
|
+
import {useArrayProp} from '../../hooks'
|
|
3
4
|
import {
|
|
4
5
|
ResponsiveFontStyleProps,
|
|
5
6
|
responsiveTextAlignStyle,
|
|
@@ -69,10 +70,10 @@ export const Text = forwardRef(function Text(
|
|
|
69
70
|
data-ui="Text"
|
|
70
71
|
{...restProps}
|
|
71
72
|
$accent={accent}
|
|
72
|
-
$align={align}
|
|
73
|
+
$align={useArrayProp(align)}
|
|
73
74
|
$muted={muted}
|
|
74
75
|
ref={ref}
|
|
75
|
-
$size={size}
|
|
76
|
+
$size={useArrayProp(size)}
|
|
76
77
|
$weight={weight}
|
|
77
78
|
>
|
|
78
79
|
<span>{children}</span>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {Container, Flex, Stack, Text, TextArea} from '@sanity/ui'
|
|
1
|
+
import {Card, Container, Flex, Stack, Text, TextArea} from '@sanity/ui'
|
|
2
2
|
import {useBoolean, useSelect, useText} from '@sanity/ui-workshop'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import {
|
|
5
|
+
WORKSHOP_CARD_TONE_OPTIONS,
|
|
5
6
|
WORKSHOP_FONT_WEIGHT_OPTIONS,
|
|
6
7
|
WORKSHOP_RADIUS_OPTIONS,
|
|
7
8
|
WORKSHOP_SPACE_OPTIONS,
|
|
@@ -9,6 +10,8 @@ import {
|
|
|
9
10
|
} from '../../../__workshop__/constants'
|
|
10
11
|
|
|
11
12
|
export default function PlainStory() {
|
|
13
|
+
const tone = useSelect('Tone', WORKSHOP_CARD_TONE_OPTIONS)
|
|
14
|
+
|
|
12
15
|
const border = useBoolean('Border', true, 'Props')
|
|
13
16
|
const customValidity = useText('Custom validity', '', 'Props') || undefined
|
|
14
17
|
const disabled = useBoolean('Disabled', false, 'Props')
|
|
@@ -22,23 +25,25 @@ export default function PlainStory() {
|
|
|
22
25
|
return (
|
|
23
26
|
<Flex align="center" height="fill" justify="center" padding={[4, 5, 6]} sizing="border">
|
|
24
27
|
<Container width={0}>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
<Card padding={3} tone={tone}>
|
|
29
|
+
<Stack space={3}>
|
|
30
|
+
<Text as="label" htmlFor="text-area-example" size={1} weight="semibold">
|
|
31
|
+
TextArea
|
|
32
|
+
</Text>
|
|
33
|
+
<TextArea
|
|
34
|
+
border={border}
|
|
35
|
+
customValidity={customValidity}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
fontSize={fontSize}
|
|
38
|
+
id="text-area-example"
|
|
39
|
+
padding={padding}
|
|
40
|
+
placeholder={placeholder}
|
|
41
|
+
radius={radius}
|
|
42
|
+
readOnly={readOnly}
|
|
43
|
+
weight={weight}
|
|
44
|
+
/>
|
|
45
|
+
</Stack>
|
|
46
|
+
</Card>
|
|
42
47
|
</Container>
|
|
43
48
|
</Flex>
|
|
44
49
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {forwardRef} from 'react'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
|
-
import {useForwardedRef, useCustomValidity} from '../../hooks'
|
|
3
|
+
import {useForwardedRef, useCustomValidity, useArrayProp} from '../../hooks'
|
|
4
4
|
import {
|
|
5
5
|
responsiveInputPaddingStyle,
|
|
6
6
|
responsiveRadiusStyle,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
textInputFontSizeStyle,
|
|
14
14
|
textInputRepresentationStyle,
|
|
15
15
|
} from '../../styles/internal'
|
|
16
|
-
import {ThemeFontWeightKey} from '../../theme'
|
|
16
|
+
import {ThemeFontWeightKey, useRootTheme} from '../../theme'
|
|
17
17
|
import {ResponsiveRadiusProps} from '../types'
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -61,11 +61,14 @@ export const TextArea = forwardRef(function TextArea(
|
|
|
61
61
|
fontSize = 2,
|
|
62
62
|
padding = 3,
|
|
63
63
|
radius = 1,
|
|
64
|
+
weight,
|
|
64
65
|
...restProps
|
|
65
66
|
} = props
|
|
66
67
|
|
|
67
68
|
const ref = useForwardedRef(forwardedRef)
|
|
68
69
|
|
|
70
|
+
const rootTheme = useRootTheme()
|
|
71
|
+
|
|
69
72
|
useCustomValidity(ref, customValidity)
|
|
70
73
|
|
|
71
74
|
return (
|
|
@@ -73,13 +76,22 @@ export const TextArea = forwardRef(function TextArea(
|
|
|
73
76
|
<InputRoot>
|
|
74
77
|
<Input
|
|
75
78
|
data-as="textarea"
|
|
79
|
+
data-tone={rootTheme.tone}
|
|
76
80
|
{...restProps}
|
|
77
|
-
$fontSize={fontSize}
|
|
78
|
-
$padding={padding}
|
|
81
|
+
$fontSize={useArrayProp(fontSize)}
|
|
82
|
+
$padding={useArrayProp(padding)}
|
|
83
|
+
$space={useArrayProp(0)}
|
|
84
|
+
$tone={rootTheme.tone}
|
|
85
|
+
$weight={weight}
|
|
79
86
|
disabled={disabled}
|
|
80
87
|
ref={ref}
|
|
81
88
|
/>
|
|
82
|
-
<Presentation
|
|
89
|
+
<Presentation
|
|
90
|
+
$border={border}
|
|
91
|
+
$radius={useArrayProp(radius)}
|
|
92
|
+
$tone={rootTheme.tone}
|
|
93
|
+
data-tone={rootTheme.tone}
|
|
94
|
+
/>
|
|
83
95
|
</InputRoot>
|
|
84
96
|
</Root>
|
|
85
97
|
)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {TextInput} from '@sanity/ui'
|
|
1
|
+
import {Box, TextInput} from '@sanity/ui'
|
|
2
|
+
import {useText} from '@sanity/ui-workshop'
|
|
2
3
|
import React, {useCallback, useState} from 'react'
|
|
3
4
|
|
|
4
5
|
export default function ClearButtonStory() {
|
|
6
|
+
const customValidity = useText('Custom validitiy')
|
|
7
|
+
|
|
5
8
|
const [value, setValue] = useState('')
|
|
6
9
|
|
|
7
10
|
const handleChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
|
|
@@ -13,12 +16,15 @@ export default function ClearButtonStory() {
|
|
|
13
16
|
}, [])
|
|
14
17
|
|
|
15
18
|
return (
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
<Box padding={4}>
|
|
20
|
+
<TextInput
|
|
21
|
+
clearButton
|
|
22
|
+
customValidity={customValidity}
|
|
23
|
+
onChange={handleChange}
|
|
24
|
+
onClear={handleClear}
|
|
25
|
+
placeholder="Enter text"
|
|
26
|
+
value={value}
|
|
27
|
+
/>
|
|
28
|
+
</Box>
|
|
23
29
|
)
|
|
24
30
|
}
|
|
@@ -13,8 +13,8 @@ export default defineScope('primitives/text-input', 'TextInput', [
|
|
|
13
13
|
component: lazy(() => import('./customValidity')),
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
name: '
|
|
17
|
-
title: '
|
|
16
|
+
name: 'typed',
|
|
17
|
+
title: 'Typed',
|
|
18
18
|
component: lazy(() => import('./typed')),
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -30,15 +30,33 @@ const typingPerfTest: PerfTestProps<HTMLInputElement> = {
|
|
|
30
30
|
export default function PlainStory() {
|
|
31
31
|
const {ref, Wrapper} = usePerfTest(typingPerfTest)
|
|
32
32
|
|
|
33
|
+
return (
|
|
34
|
+
<Flex align="center" height="fill" justify="center" padding={[4, 5, 6]} sizing="border">
|
|
35
|
+
<Container width={0}>
|
|
36
|
+
<Stack space={3}>
|
|
37
|
+
<Text as="label" htmlFor="text-input-example" size={1} weight="semibold">
|
|
38
|
+
TextInput
|
|
39
|
+
</Text>
|
|
40
|
+
<Wrapper>
|
|
41
|
+
<TextInputTest inputRef={ref} />
|
|
42
|
+
</Wrapper>
|
|
43
|
+
</Stack>
|
|
44
|
+
</Container>
|
|
45
|
+
</Flex>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function TextInputTest(props: {inputRef: React.Ref<HTMLInputElement>}) {
|
|
50
|
+
const {inputRef: ref} = props
|
|
33
51
|
const border = useBoolean('Border', true, 'Props')
|
|
34
52
|
const customValidity = useText('Custom validity', '', 'Props') || undefined
|
|
35
53
|
const disabled = useBoolean('Disabled', false, 'Props')
|
|
36
54
|
const fontSize = useSelect('Font size', WORKSHOP_TEXT_FONT_SIZE_OPTIONS, 2, 'Props')
|
|
37
|
-
const icon = useSelect('Icon', WORKSHOP_ICON_SYMBOL_OPTIONS, '
|
|
55
|
+
const icon = useSelect('Icon', WORKSHOP_ICON_SYMBOL_OPTIONS, 'search', 'Props') as IconSymbol
|
|
38
56
|
const iconRight = useSelect(
|
|
39
57
|
'Icon (right)',
|
|
40
58
|
WORKSHOP_ICON_SYMBOL_OPTIONS,
|
|
41
|
-
'
|
|
59
|
+
'close',
|
|
42
60
|
'Props'
|
|
43
61
|
) as IconSymbol
|
|
44
62
|
const padding = useSelect('Padding', WORKSHOP_SPACE_OPTIONS, 3, 'Props')
|
|
@@ -56,35 +74,24 @@ export default function PlainStory() {
|
|
|
56
74
|
)
|
|
57
75
|
|
|
58
76
|
return (
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
radius={radius}
|
|
79
|
-
readOnly={readOnly}
|
|
80
|
-
ref={ref}
|
|
81
|
-
space={space}
|
|
82
|
-
value={value}
|
|
83
|
-
weight={weight}
|
|
84
|
-
/>
|
|
85
|
-
</Wrapper>
|
|
86
|
-
</Stack>
|
|
87
|
-
</Container>
|
|
88
|
-
</Flex>
|
|
77
|
+
<TextInput
|
|
78
|
+
border={border}
|
|
79
|
+
customValidity={customValidity}
|
|
80
|
+
disabled={disabled}
|
|
81
|
+
fontSize={fontSize}
|
|
82
|
+
icon={icon && icons[icon]}
|
|
83
|
+
iconRight={iconRight && icons[iconRight]}
|
|
84
|
+
id="text-input-example"
|
|
85
|
+
name="email"
|
|
86
|
+
onChange={handleChange}
|
|
87
|
+
padding={padding}
|
|
88
|
+
placeholder={placeholder}
|
|
89
|
+
radius={radius}
|
|
90
|
+
readOnly={readOnly}
|
|
91
|
+
ref={ref}
|
|
92
|
+
space={space}
|
|
93
|
+
value={value}
|
|
94
|
+
weight={weight}
|
|
95
|
+
/>
|
|
89
96
|
)
|
|
90
97
|
}
|