11import type { RefObject } from 'react' ;
22import type {
33 ColorValue ,
4+ DimensionValue ,
45 NativeMethods ,
56 NativeSyntheticEvent ,
67 ReturnKeyTypeOptions ,
@@ -10,6 +11,171 @@ import type {
1011 ViewStyle ,
1112} from 'react-native' ;
1213
14+ export interface EnrichedInputStyle {
15+ // Layout / FlexStyle
16+ alignSelf ?: TextStyle [ 'alignSelf' ] ;
17+ aspectRatio ?: number | string ;
18+ borderBottomWidth ?: number ;
19+ borderEndWidth ?: number ;
20+ borderLeftWidth ?: number ;
21+ borderRightWidth ?: number ;
22+ borderStartWidth ?: number ;
23+ borderTopWidth ?: number ;
24+ borderWidth ?: number ;
25+ bottom ?: DimensionValue ;
26+ boxSizing ?: TextStyle [ 'boxSizing' ] ;
27+ display ?: TextStyle [ 'display' ] ;
28+ end ?: DimensionValue ;
29+ flex ?: number ;
30+ flexBasis ?: DimensionValue ;
31+ flexGrow ?: number ;
32+ flexShrink ?: number ;
33+ height ?: DimensionValue ;
34+ inset ?: DimensionValue ;
35+ insetBlock ?: DimensionValue ;
36+ insetBlockEnd ?: DimensionValue ;
37+ insetBlockStart ?: DimensionValue ;
38+ insetInline ?: DimensionValue ;
39+ insetInlineEnd ?: DimensionValue ;
40+ insetInlineStart ?: DimensionValue ;
41+ left ?: DimensionValue ;
42+ margin ?: DimensionValue ;
43+ marginBlock ?: DimensionValue ;
44+ marginBlockEnd ?: DimensionValue ;
45+ marginBlockStart ?: DimensionValue ;
46+ marginBottom ?: DimensionValue ;
47+ marginEnd ?: DimensionValue ;
48+ marginHorizontal ?: DimensionValue ;
49+ marginInline ?: DimensionValue ;
50+ marginInlineEnd ?: DimensionValue ;
51+ marginInlineStart ?: DimensionValue ;
52+ marginLeft ?: DimensionValue ;
53+ marginRight ?: DimensionValue ;
54+ marginStart ?: DimensionValue ;
55+ marginTop ?: DimensionValue ;
56+ marginVertical ?: DimensionValue ;
57+ maxHeight ?: DimensionValue ;
58+ maxWidth ?: DimensionValue ;
59+ minHeight ?: DimensionValue ;
60+ minWidth ?: DimensionValue ;
61+ padding ?: DimensionValue ;
62+ paddingBlock ?: DimensionValue ;
63+ paddingBlockEnd ?: DimensionValue ;
64+ paddingBlockStart ?: DimensionValue ;
65+ paddingBottom ?: DimensionValue ;
66+ paddingEnd ?: DimensionValue ;
67+ paddingHorizontal ?: DimensionValue ;
68+ paddingInline ?: DimensionValue ;
69+ paddingInlineEnd ?: DimensionValue ;
70+ paddingInlineStart ?: DimensionValue ;
71+ paddingLeft ?: DimensionValue ;
72+ paddingRight ?: DimensionValue ;
73+ paddingStart ?: DimensionValue ;
74+ paddingTop ?: DimensionValue ;
75+ paddingVertical ?: DimensionValue ;
76+ position ?: TextStyle [ 'position' ] ;
77+ right ?: DimensionValue ;
78+ start ?: DimensionValue ;
79+ top ?: DimensionValue ;
80+ width ?: DimensionValue ;
81+ zIndex ?: number ;
82+
83+ // Shadows
84+ /** @platform ios */
85+ shadowColor ?: ColorValue ;
86+ /** @platform ios */
87+ shadowOffset ?: TextStyle [ 'shadowOffset' ] ;
88+ /** @platform ios */
89+ shadowOpacity ?: TextStyle [ 'shadowOpacity' ] ;
90+ /** @platform ios */
91+ shadowRadius ?: number ;
92+
93+ // Transforms
94+ transform ?: TextStyle [ 'transform' ] ;
95+ transformOrigin ?: TextStyle [ 'transformOrigin' ] ;
96+
97+ // View appearance
98+ /** @platform ios web */
99+ backfaceVisibility ?: TextStyle [ 'backfaceVisibility' ] ;
100+ backgroundColor ?: ColorValue ;
101+ /** @platform ios web */
102+ borderBlockColor ?: ColorValue ;
103+ /** @platform ios web */
104+ borderBlockEndColor ?: ColorValue ;
105+ /** @platform ios web */
106+ borderBlockStartColor ?: ColorValue ;
107+ /** @platform ios web */
108+ borderBottomColor ?: ColorValue ;
109+ /** @platform ios web */
110+ borderBottomEndRadius ?: TextStyle [ 'borderBottomEndRadius' ] ;
111+ /** @platform ios web */
112+ borderBottomLeftRadius ?: TextStyle [ 'borderBottomLeftRadius' ] ;
113+ /** @platform ios web */
114+ borderBottomRightRadius ?: TextStyle [ 'borderBottomRightRadius' ] ;
115+ /** @platform ios web */
116+ borderBottomStartRadius ?: TextStyle [ 'borderBottomStartRadius' ] ;
117+ /** @platform ios web */
118+ borderColor ?: ColorValue ;
119+ /** @platform ios web */
120+ borderEndColor ?: ColorValue ;
121+ /** @platform ios web */
122+ borderEndEndRadius ?: TextStyle [ 'borderEndEndRadius' ] ;
123+ /** @platform ios web */
124+ borderEndStartRadius ?: TextStyle [ 'borderEndStartRadius' ] ;
125+ /** @platform ios web */
126+ borderLeftColor ?: ColorValue ;
127+ /** @platform ios web */
128+ borderRadius ?: TextStyle [ 'borderRadius' ] ;
129+ /** @platform ios web */
130+ borderRightColor ?: ColorValue ;
131+ /** @platform ios web */
132+ borderStartColor ?: ColorValue ;
133+ /** @platform ios web */
134+ borderStartEndRadius ?: TextStyle [ 'borderStartEndRadius' ] ;
135+ /** @platform ios web */
136+ borderStartStartRadius ?: TextStyle [ 'borderStartStartRadius' ] ;
137+ /** @platform ios web */
138+ borderStyle ?: TextStyle [ 'borderStyle' ] ;
139+ /** @platform ios web */
140+ borderTopColor ?: ColorValue ;
141+ /** @platform ios web */
142+ borderTopEndRadius ?: TextStyle [ 'borderTopEndRadius' ] ;
143+ /** @platform ios web */
144+ borderTopLeftRadius ?: TextStyle [ 'borderTopLeftRadius' ] ;
145+ /** @platform ios web */
146+ borderTopRightRadius ?: TextStyle [ 'borderTopRightRadius' ] ;
147+ /** @platform ios web */
148+ borderTopStartRadius ?: TextStyle [ 'borderTopStartRadius' ] ;
149+ boxShadow ?: TextStyle [ 'boxShadow' ] ;
150+ /** @platform web */
151+ cursor ?: TextStyle [ 'cursor' ] ;
152+ /** @platform android */
153+ elevation ?: number ;
154+ /** @platform android web */
155+ filter ?: TextStyle [ 'filter' ] ;
156+ /** @platform android web */
157+ mixBlendMode ?: TextStyle [ 'mixBlendMode' ] ;
158+ opacity ?: TextStyle [ 'opacity' ] ;
159+ /** @platform ios web */
160+ outlineColor ?: ColorValue ;
161+ outlineOffset ?: TextStyle [ 'outlineOffset' ] ;
162+ /** @platform android web */
163+ outlineStyle ?: TextStyle [ 'outlineStyle' ] ;
164+ outlineWidth ?: TextStyle [ 'outlineWidth' ] ;
165+ /** @platform ios web */
166+ pointerEvents ?: TextStyle [ 'pointerEvents' ] ;
167+
168+ // Typography
169+ color ?: ColorValue ;
170+ fontFamily ?: string ;
171+ fontSize ?: number ;
172+ fontStyle ?: TextStyle [ 'fontStyle' ] ;
173+ fontWeight ?: TextStyle [ 'fontWeight' ] ;
174+ lineHeight ?: number ;
175+ /** @platform web */
176+ letterSpacing ?: number ;
177+ }
178+
13179interface HeadingStyle {
14180 fontSize ?: number ;
15181 bold ?: boolean ;
@@ -322,3 +488,11 @@ export interface EnrichedTextInputProps extends Omit<ViewProps, 'children'> {
322488 */
323489 useHtmlNormalizer ?: boolean ;
324490}
491+
492+ // Web-only for now. Native will eventually migrate to EnrichedInputStyle too,
493+ // at which point this interface will be removed and EnrichedTextInputProps
494+ // will use EnrichedInputStyle directly.
495+ export interface EnrichedTextInputWebProps
496+ extends Omit < EnrichedTextInputProps , 'style' > {
497+ style ?: EnrichedInputStyle ;
498+ }
0 commit comments