@sanity/ui 2.0.0-alpha.19 → 2.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -11,12 +11,12 @@ import {avatarStyle, responsiveAvatarSizeStyle} from './styles'
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
export interface AvatarProps {
|
|
14
|
+
/** @beta */
|
|
15
|
+
__unstable_hideInnerStroke?: boolean
|
|
14
16
|
animateArrowFrom?: AvatarPosition
|
|
15
17
|
arrowPosition?: AvatarPosition
|
|
16
18
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
17
19
|
color?: ThemeColorSpotKey
|
|
18
|
-
/** @beta */
|
|
19
|
-
hideInnerStroke?: boolean
|
|
20
20
|
initials?: string
|
|
21
21
|
onImageLoadError?: (event: Error) => void
|
|
22
22
|
size?: AvatarSize | AvatarSize[]
|
|
@@ -52,6 +52,7 @@ export const Avatar = forwardRef(function Avatar(
|
|
|
52
52
|
ref: React.ForwardedRef<HTMLDivElement>,
|
|
53
53
|
) {
|
|
54
54
|
const {
|
|
55
|
+
__unstable_hideInnerStroke,
|
|
55
56
|
as: asProp,
|
|
56
57
|
color: colorKey = 'gray',
|
|
57
58
|
src,
|
|
@@ -60,7 +61,6 @@ export const Avatar = forwardRef(function Avatar(
|
|
|
60
61
|
onImageLoadError,
|
|
61
62
|
arrowPosition: arrowPositionProp,
|
|
62
63
|
animateArrowFrom,
|
|
63
|
-
hideInnerStroke,
|
|
64
64
|
status = 'online',
|
|
65
65
|
size: sizeProp = 0,
|
|
66
66
|
...restProps
|
|
@@ -145,7 +145,7 @@ export const Avatar = forwardRef(function Avatar(
|
|
|
145
145
|
</defs>
|
|
146
146
|
|
|
147
147
|
<circle cx={_radius} cy={_radius} r={_radius} fill={`url(#${imageId})`} />
|
|
148
|
-
{!
|
|
148
|
+
{!__unstable_hideInnerStroke && (
|
|
149
149
|
<BgStroke
|
|
150
150
|
cx={_radius}
|
|
151
151
|
cy={_radius}
|
|
@@ -50,6 +50,10 @@ export type TextInputType =
|
|
|
50
50
|
* @public
|
|
51
51
|
*/
|
|
52
52
|
export interface TextInputProps {
|
|
53
|
+
/**
|
|
54
|
+
* @beta
|
|
55
|
+
*/
|
|
56
|
+
__unstable_disableFocusRing?: boolean
|
|
53
57
|
border?: boolean
|
|
54
58
|
/**
|
|
55
59
|
* @beta
|
|
@@ -70,10 +74,6 @@ export interface TextInputProps {
|
|
|
70
74
|
suffix?: React.ReactNode
|
|
71
75
|
type?: TextInputType
|
|
72
76
|
weight?: ThemeFontWeightKey
|
|
73
|
-
/**
|
|
74
|
-
* @beta
|
|
75
|
-
*/
|
|
76
|
-
unstableDisableFocusRing?: boolean
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
const CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}
|
|
@@ -153,6 +153,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
153
153
|
forwardedRef: React.Ref<HTMLInputElement>,
|
|
154
154
|
) {
|
|
155
155
|
const {
|
|
156
|
+
__unstable_disableFocusRing,
|
|
156
157
|
border = true,
|
|
157
158
|
clearButton,
|
|
158
159
|
disabled = false,
|
|
@@ -169,7 +170,6 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
169
170
|
customValidity,
|
|
170
171
|
type = 'text',
|
|
171
172
|
weight,
|
|
172
|
-
unstableDisableFocusRing,
|
|
173
173
|
...restProps
|
|
174
174
|
} = props
|
|
175
175
|
|
|
@@ -226,7 +226,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
226
226
|
() => (
|
|
227
227
|
<Presentation
|
|
228
228
|
$hasPrefix={$hasPrefix}
|
|
229
|
-
$unstableDisableFocusRing={
|
|
229
|
+
$unstableDisableFocusRing={__unstable_disableFocusRing}
|
|
230
230
|
$hasSuffix={$hasSuffix}
|
|
231
231
|
$radius={radius}
|
|
232
232
|
$scheme={rootTheme.scheme}
|
|
@@ -255,6 +255,7 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
255
255
|
</Presentation>
|
|
256
256
|
),
|
|
257
257
|
[
|
|
258
|
+
__unstable_disableFocusRing,
|
|
258
259
|
border,
|
|
259
260
|
fontSize,
|
|
260
261
|
icon,
|
|
@@ -265,7 +266,6 @@ export const TextInput = forwardRef(function TextInput(
|
|
|
265
266
|
$hasClearButton,
|
|
266
267
|
$hasPrefix,
|
|
267
268
|
$hasSuffix,
|
|
268
|
-
unstableDisableFocusRing,
|
|
269
269
|
],
|
|
270
270
|
)
|
|
271
271
|
|