mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-29 09:02:03 +00:00
Fix optional value flow types
This commit is contained in:
+33
-31
@@ -24,43 +24,45 @@ type FontWeightValue =
|
|||||||
| '800'
|
| '800'
|
||||||
| '900';
|
| '900';
|
||||||
|
|
||||||
|
type NumberOrString = number | string;
|
||||||
|
|
||||||
export type TextStyle = {
|
export type TextStyle = {
|
||||||
...ViewStyle,
|
...ViewStyle,
|
||||||
color?: ColorValue,
|
color?: ?ColorValue,
|
||||||
fontFamily?: string,
|
fontFamily?: ?string,
|
||||||
fontFeatureSettings?: string,
|
fontFeatureSettings?: ?string,
|
||||||
fontSize?: number | string,
|
fontSize?: ?NumberOrString,
|
||||||
fontStyle?: 'italic' | 'normal',
|
fontStyle?: 'italic' | 'normal',
|
||||||
fontWeight?: FontWeightValue,
|
fontWeight?: ?FontWeightValue,
|
||||||
fontVariant?: $ReadOnlyArray<
|
fontVariant?: $ReadOnlyArray<
|
||||||
'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'proportional-nums'
|
'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'proportional-nums'
|
||||||
>,
|
>,
|
||||||
letterSpacing?: number | string,
|
letterSpacing?: ?NumberOrString,
|
||||||
lineHeight?: number | string,
|
lineHeight?: ?NumberOrString,
|
||||||
textAlign?: 'center' | 'end' | 'inherit' | 'justify' | 'justify-all' | 'left' | 'right' | 'start',
|
textAlign?: 'center' | 'end' | 'inherit' | 'justify' | 'justify-all' | 'left' | 'right' | 'start',
|
||||||
textAlignVertical?: string,
|
textAlignVertical?: ?string,
|
||||||
textDecorationColor?: ColorValue,
|
textDecorationColor?: ?ColorValue,
|
||||||
textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through',
|
textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through',
|
||||||
textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed',
|
textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed',
|
||||||
textIndent?: number | string,
|
textIndent?: ?NumberOrString,
|
||||||
textOverflow?: string,
|
textOverflow?: ?string,
|
||||||
textRendering?: 'auto' | 'geometricPrecision' | 'optimizeLegibility' | 'optimizeSpeed',
|
textRendering?: 'auto' | 'geometricPrecision' | 'optimizeLegibility' | 'optimizeSpeed',
|
||||||
textShadowColor?: ColorValue,
|
textShadowColor?: ?ColorValue,
|
||||||
textShadowOffset?: {| width?: number, height?: number |},
|
textShadowOffset?: {| width?: number, height?: number |},
|
||||||
textShadowRadius?: number,
|
textShadowRadius?: ?number,
|
||||||
textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase',
|
textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase',
|
||||||
unicodeBidi?: 'normal' | 'bidi-override' | 'embed' | 'isolate' | 'isolate-override' | 'plaintext',
|
unicodeBidi?: 'normal' | 'bidi-override' | 'embed' | 'isolate' | 'isolate-override' | 'plaintext',
|
||||||
whiteSpace?: string,
|
whiteSpace?: ?string,
|
||||||
wordBreak?: 'normal' | 'break-all' | 'break-word' | 'keep-all',
|
wordBreak?: 'normal' | 'break-all' | 'break-word' | 'keep-all',
|
||||||
wordWrap?: string,
|
wordWrap?: ?string,
|
||||||
writingDirection?: 'auto' | 'ltr' | 'rtl',
|
writingDirection?: 'auto' | 'ltr' | 'rtl',
|
||||||
/* @platform web */
|
/* @platform web */
|
||||||
MozOsxFontSmoothing?: string,
|
MozOsxFontSmoothing?: ?string,
|
||||||
WebkitFontSmoothing?: string
|
WebkitFontSmoothing?: ?string
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TextProps = {
|
export type TextProps = {
|
||||||
accessibilityLabel?: string,
|
accessibilityLabel?: ?string,
|
||||||
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',
|
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',
|
||||||
accessibilityRelationship?: {
|
accessibilityRelationship?: {
|
||||||
activedescendant?: ?string,
|
activedescendant?: ?string,
|
||||||
@@ -93,13 +95,13 @@ export type TextProps = {
|
|||||||
required?: ?boolean,
|
required?: ?boolean,
|
||||||
selected?: ?boolean
|
selected?: ?boolean
|
||||||
},
|
},
|
||||||
accessible?: boolean,
|
accessible?: ?boolean,
|
||||||
children?: any,
|
children?: ?any,
|
||||||
dir?: 'auto' | 'ltr' | 'rtl',
|
dir?: 'auto' | 'ltr' | 'rtl',
|
||||||
forwardedRef?: any,
|
forwardedRef?: any,
|
||||||
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
||||||
nativeID?: string,
|
nativeID?: ?string,
|
||||||
numberOfLines?: number,
|
numberOfLines?: ?number,
|
||||||
onBlur?: (e: any) => void,
|
onBlur?: (e: any) => void,
|
||||||
onFocus?: (e: any) => void,
|
onFocus?: (e: any) => void,
|
||||||
onLayout?: (e: LayoutEvent) => void,
|
onLayout?: (e: LayoutEvent) => void,
|
||||||
@@ -122,7 +124,7 @@ export type TextProps = {
|
|||||||
onStartShouldSetResponderCapture?: (e: any) => boolean,
|
onStartShouldSetResponderCapture?: (e: any) => boolean,
|
||||||
selectable?: boolean,
|
selectable?: boolean,
|
||||||
style?: GenericStyleProp<TextStyle>,
|
style?: GenericStyleProp<TextStyle>,
|
||||||
testID?: string,
|
testID?: ?string,
|
||||||
// unstable
|
// unstable
|
||||||
onContextMenu?: (e: any) => void,
|
onContextMenu?: (e: any) => void,
|
||||||
onKeyDown?: (e: any) => void,
|
onKeyDown?: (e: any) => void,
|
||||||
@@ -143,14 +145,14 @@ export type TextProps = {
|
|||||||
onTouchMoveCapture?: (e: any) => void,
|
onTouchMoveCapture?: (e: any) => void,
|
||||||
onTouchStart?: (e: any) => void,
|
onTouchStart?: (e: any) => void,
|
||||||
onTouchStartCapture?: (e: any) => void,
|
onTouchStartCapture?: (e: any) => void,
|
||||||
href?: string,
|
href?: ?string,
|
||||||
itemID?: string,
|
itemID?: ?string,
|
||||||
itemRef?: string,
|
itemRef?: ?string,
|
||||||
itemProp?: string,
|
itemProp?: ?string,
|
||||||
itemScope?: string,
|
itemScope?: ?string,
|
||||||
itemType?: string,
|
itemType?: ?string,
|
||||||
rel?: string,
|
rel?: ?string,
|
||||||
target?: string,
|
target?: ?string,
|
||||||
unstable_ariaSet?: Object,
|
unstable_ariaSet?: Object,
|
||||||
unstable_dataSet?: Object
|
unstable_dataSet?: Object
|
||||||
};
|
};
|
||||||
|
|||||||
+21
-21
@@ -20,16 +20,16 @@ export type TextInputStyle = {
|
|||||||
export type TextInputProps = {
|
export type TextInputProps = {
|
||||||
...ViewProps,
|
...ViewProps,
|
||||||
autoCapitalize?: 'characters' | 'none' | 'sentences' | 'words',
|
autoCapitalize?: 'characters' | 'none' | 'sentences' | 'words',
|
||||||
autoComplete?: string,
|
autoComplete?: ?string,
|
||||||
autoCompleteType?: string, // Compat with React Native (Bug react-native#26003)
|
autoCompleteType?: ?string, // Compat with React Native (Bug react-native#26003)
|
||||||
autoCorrect?: boolean,
|
autoCorrect?: ?boolean,
|
||||||
autoFocus?: boolean,
|
autoFocus?: ?boolean,
|
||||||
blurOnSubmit?: boolean,
|
blurOnSubmit?: ?boolean,
|
||||||
clearTextOnFocus?: boolean,
|
clearTextOnFocus?: ?boolean,
|
||||||
defaultValue?: string,
|
defaultValue?: ?string,
|
||||||
disabled?: boolean,
|
disabled?: ?boolean,
|
||||||
editable?: boolean,
|
editable?: ?boolean,
|
||||||
inputAccessoryViewID?: string,
|
inputAccessoryViewID?: ?string,
|
||||||
keyboardType?:
|
keyboardType?:
|
||||||
| 'default'
|
| 'default'
|
||||||
| 'email-address'
|
| 'email-address'
|
||||||
@@ -40,9 +40,9 @@ export type TextInputProps = {
|
|||||||
| 'search'
|
| 'search'
|
||||||
| 'url'
|
| 'url'
|
||||||
| 'web-search',
|
| 'web-search',
|
||||||
maxLength?: number,
|
maxLength?: ?number,
|
||||||
multiline?: boolean,
|
multiline?: ?boolean,
|
||||||
numberOfLines?: number,
|
numberOfLines?: ?number,
|
||||||
onBlur?: (e: any) => void,
|
onBlur?: (e: any) => void,
|
||||||
onChange?: (e: any) => void,
|
onChange?: (e: any) => void,
|
||||||
onChangeText?: (e: string) => void,
|
onChangeText?: (e: string) => void,
|
||||||
@@ -53,17 +53,17 @@ export type TextInputProps = {
|
|||||||
onSelectionChange?: (e: any) => void,
|
onSelectionChange?: (e: any) => void,
|
||||||
onScroll?: (e: any) => void,
|
onScroll?: (e: any) => void,
|
||||||
onSubmitEditing?: (e: any) => void,
|
onSubmitEditing?: (e: any) => void,
|
||||||
placeholder?: string,
|
placeholder?: ?string,
|
||||||
placeholderTextColor?: ColorValue,
|
placeholderTextColor?: ?ColorValue,
|
||||||
returnKeyType?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send',
|
returnKeyType?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send',
|
||||||
secureTextEntry?: boolean,
|
secureTextEntry?: ?boolean,
|
||||||
selectTextOnFocus?: boolean,
|
selectTextOnFocus?: ?boolean,
|
||||||
selection?: {|
|
selection?: {|
|
||||||
start: number,
|
start: number,
|
||||||
end?: number
|
end?: number
|
||||||
|},
|
|},
|
||||||
selectionColor?: ColorValue,
|
selectionColor?: ?ColorValue,
|
||||||
spellCheck?: boolean,
|
spellCheck?: ?boolean,
|
||||||
style?: GenericStyleProp<TextInputStyle>,
|
style?: ?GenericStyleProp<TextInputStyle>,
|
||||||
value?: string
|
value?: ?string
|
||||||
};
|
};
|
||||||
|
|||||||
+37
-35
@@ -19,6 +19,8 @@ import type {
|
|||||||
TransformStyles
|
TransformStyles
|
||||||
} from '../../types/styles';
|
} from '../../types/styles';
|
||||||
|
|
||||||
|
type NumberOrString = number | string;
|
||||||
|
|
||||||
type OverscrollBehaviorValue = 'auto' | 'contain' | 'none';
|
type OverscrollBehaviorValue = 'auto' | 'contain' | 'none';
|
||||||
|
|
||||||
export type ViewStyle = {
|
export type ViewStyle = {
|
||||||
@@ -28,36 +30,36 @@ export type ViewStyle = {
|
|||||||
...LayoutStyles,
|
...LayoutStyles,
|
||||||
...ShadowStyles,
|
...ShadowStyles,
|
||||||
...TransformStyles,
|
...TransformStyles,
|
||||||
backdropFilter?: string,
|
backdropFilter?: ?string,
|
||||||
backgroundAttachment?: string,
|
backgroundAttachment?: ?string,
|
||||||
backgroundBlendMode?: string,
|
backgroundBlendMode?: ?string,
|
||||||
backgroundClip?: string,
|
backgroundClip?: ?string,
|
||||||
backgroundColor?: ColorValue,
|
backgroundColor?: ?ColorValue,
|
||||||
backgroundImage?: ?string,
|
backgroundImage?: ?string,
|
||||||
backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box',
|
backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box',
|
||||||
backgroundPosition?: string,
|
backgroundPosition?: ?string,
|
||||||
backgroundRepeat?: string,
|
backgroundRepeat?: ?string,
|
||||||
backgroundSize?: string,
|
backgroundSize?: ?string,
|
||||||
boxShadow?: string,
|
boxShadow?: ?string,
|
||||||
clip?: string,
|
clip?: ?string,
|
||||||
filter?: ?string,
|
filter?: ?string,
|
||||||
opacity?: number,
|
opacity?: ?number,
|
||||||
outlineColor?: ColorValue,
|
outlineColor?: ?ColorValue,
|
||||||
outlineOffset?: string | number,
|
outlineOffset?: ?NumberOrString,
|
||||||
outlineStyle?: string,
|
outlineStyle?: ?string,
|
||||||
outlineWidth?: string | number,
|
outlineWidth?: ?NumberOrString,
|
||||||
overscrollBehavior?: OverscrollBehaviorValue,
|
overscrollBehavior?: ?OverscrollBehaviorValue,
|
||||||
overscrollBehaviorX?: OverscrollBehaviorValue,
|
overscrollBehaviorX?: ?OverscrollBehaviorValue,
|
||||||
overscrollBehaviorY?: OverscrollBehaviorValue,
|
overscrollBehaviorY?: ?OverscrollBehaviorValue,
|
||||||
scrollbarWidth?: 'auto' | 'none' | 'thin',
|
scrollbarWidth?: 'auto' | 'none' | 'thin',
|
||||||
scrollSnapAlign?: string,
|
scrollSnapAlign?: ?string,
|
||||||
scrollSnapType?: string,
|
scrollSnapType?: ?string,
|
||||||
WebkitMaskImage?: string,
|
WebkitMaskImage?: ?string,
|
||||||
WebkitOverflowScrolling?: 'auto' | 'touch'
|
WebkitOverflowScrolling?: 'auto' | 'touch'
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ViewProps = {
|
export type ViewProps = {
|
||||||
accessibilityLabel?: string,
|
accessibilityLabel?: ?string,
|
||||||
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',
|
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',
|
||||||
accessibilityRelationship?: {
|
accessibilityRelationship?: {
|
||||||
activedescendant?: ?string,
|
activedescendant?: ?string,
|
||||||
@@ -68,7 +70,7 @@ export type ViewProps = {
|
|||||||
labelledby?: ?string,
|
labelledby?: ?string,
|
||||||
owns?: ?string
|
owns?: ?string
|
||||||
},
|
},
|
||||||
accessibilityRole?: string,
|
accessibilityRole?: ?string,
|
||||||
accessibilityState?: {
|
accessibilityState?: {
|
||||||
busy?: ?boolean,
|
busy?: ?boolean,
|
||||||
checked?: ?boolean | 'mixed',
|
checked?: ?boolean | 'mixed',
|
||||||
@@ -90,11 +92,11 @@ export type ViewProps = {
|
|||||||
text?: ?string
|
text?: ?string
|
||||||
},
|
},
|
||||||
accessible?: boolean,
|
accessible?: boolean,
|
||||||
children?: any,
|
children?: ?any,
|
||||||
forwardedRef?: any,
|
forwardedRef?: any,
|
||||||
hitSlop?: EdgeInsetsValue,
|
hitSlop?: ?EdgeInsetsValue,
|
||||||
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
||||||
nativeID?: string,
|
nativeID?: ?string,
|
||||||
onBlur?: (e: any) => void,
|
onBlur?: (e: any) => void,
|
||||||
onFocus?: (e: any) => void,
|
onFocus?: (e: any) => void,
|
||||||
onLayout?: (e: LayoutEvent) => void,
|
onLayout?: (e: LayoutEvent) => void,
|
||||||
@@ -116,7 +118,7 @@ export type ViewProps = {
|
|||||||
onStartShouldSetResponderCapture?: (e: any) => boolean,
|
onStartShouldSetResponderCapture?: (e: any) => boolean,
|
||||||
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto',
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto',
|
||||||
style?: GenericStyleProp<ViewStyle>,
|
style?: GenericStyleProp<ViewStyle>,
|
||||||
testID?: string,
|
testID?: ?string,
|
||||||
// unstable
|
// unstable
|
||||||
onClick?: (e: any) => void,
|
onClick?: (e: any) => void,
|
||||||
onClickCapture?: (e: any) => void,
|
onClickCapture?: (e: any) => void,
|
||||||
@@ -141,14 +143,14 @@ export type ViewProps = {
|
|||||||
onTouchMoveCapture?: (e: any) => void,
|
onTouchMoveCapture?: (e: any) => void,
|
||||||
onTouchStart?: (e: any) => void,
|
onTouchStart?: (e: any) => void,
|
||||||
onTouchStartCapture?: (e: any) => void,
|
onTouchStartCapture?: (e: any) => void,
|
||||||
href?: string,
|
href?: ?string,
|
||||||
itemID?: string,
|
itemID?: ?string,
|
||||||
itemRef?: string,
|
itemRef?: ?string,
|
||||||
itemProp?: string,
|
itemProp?: ?string,
|
||||||
itemScope?: string,
|
itemScope?: ?string,
|
||||||
itemType?: string,
|
itemType?: ?string,
|
||||||
rel?: string,
|
rel?: ?string,
|
||||||
target?: string,
|
target?: ?string,
|
||||||
unstable_ariaSet?: Object,
|
unstable_ariaSet?: Object,
|
||||||
unstable_dataSet?: Object
|
unstable_dataSet?: Object
|
||||||
};
|
};
|
||||||
|
|||||||
+118
-117
@@ -22,18 +22,18 @@ type AnimationKeyframes = string | Object;
|
|||||||
type AnimationPlayState = 'paused' | 'running';
|
type AnimationPlayState = 'paused' | 'running';
|
||||||
|
|
||||||
export type AnimationStyles = {|
|
export type AnimationStyles = {|
|
||||||
animationDelay?: string | Array<string>,
|
animationDelay?: ?(string | Array<string>),
|
||||||
animationDirection?: AnimationDirection | Array<AnimationDirection>,
|
animationDirection?: ?(AnimationDirection | Array<AnimationDirection>),
|
||||||
animationDuration?: string | Array<string>,
|
animationDuration?: ?(string | Array<string>),
|
||||||
animationFillMode?: AnimationFillMode | Array<AnimationFillMode>,
|
animationFillMode?: ?(AnimationFillMode | Array<AnimationFillMode>),
|
||||||
animationIterationCount?: AnimationIterationCount | Array<AnimationIterationCount>,
|
animationIterationCount?: ?(AnimationIterationCount | Array<AnimationIterationCount>),
|
||||||
animationKeyframes?: AnimationKeyframes | Array<AnimationKeyframes>,
|
animationKeyframes?: ?(AnimationKeyframes | Array<AnimationKeyframes>),
|
||||||
animationPlayState?: AnimationPlayState | Array<AnimationPlayState>,
|
animationPlayState?: ?(AnimationPlayState | Array<AnimationPlayState>),
|
||||||
animationTimingFunction?: string | Array<string>,
|
animationTimingFunction?: ?(string | Array<string>),
|
||||||
transitionDelay?: string | Array<string>,
|
transitionDelay?: ?(string | Array<string>),
|
||||||
transitionDuration?: string | Array<string>,
|
transitionDuration?: ?(string | Array<string>),
|
||||||
transitionProperty?: string | Array<string>,
|
transitionProperty?: ?(string | Array<string>),
|
||||||
transitionTimingFunction?: string | Array<string>
|
transitionTimingFunction?: ?(string | Array<string>)
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,29 +44,29 @@ type BorderRadiusValue = number | string;
|
|||||||
type BorderStyleValue = 'solid' | 'dotted' | 'dashed';
|
type BorderStyleValue = 'solid' | 'dotted' | 'dashed';
|
||||||
|
|
||||||
export type BorderStyles = {|
|
export type BorderStyles = {|
|
||||||
borderColor?: ColorValue,
|
borderColor?: ?ColorValue,
|
||||||
borderBottomColor?: ColorValue,
|
borderBottomColor?: ?ColorValue,
|
||||||
borderEndColor?: ColorValue,
|
borderEndColor?: ?ColorValue,
|
||||||
borderLeftColor?: ColorValue,
|
borderLeftColor?: ?ColorValue,
|
||||||
borderRightColor?: ColorValue,
|
borderRightColor?: ?ColorValue,
|
||||||
borderStartColor?: ColorValue,
|
borderStartColor?: ?ColorValue,
|
||||||
borderTopColor?: ColorValue,
|
borderTopColor?: ?ColorValue,
|
||||||
borderRadius?: BorderRadiusValue,
|
borderRadius?: ?BorderRadiusValue,
|
||||||
borderBottomEndRadius?: BorderRadiusValue,
|
borderBottomEndRadius?: ?BorderRadiusValue,
|
||||||
borderBottomLeftRadius?: BorderRadiusValue,
|
borderBottomLeftRadius?: ?BorderRadiusValue,
|
||||||
borderBottomRightRadius?: BorderRadiusValue,
|
borderBottomRightRadius?: ?BorderRadiusValue,
|
||||||
borderBottomStartRadius?: BorderRadiusValue,
|
borderBottomStartRadius?: ?BorderRadiusValue,
|
||||||
borderTopEndRadius?: BorderRadiusValue,
|
borderTopEndRadius?: ?BorderRadiusValue,
|
||||||
borderTopLeftRadius?: BorderRadiusValue,
|
borderTopLeftRadius?: ?BorderRadiusValue,
|
||||||
borderTopRightRadius?: BorderRadiusValue,
|
borderTopRightRadius?: ?BorderRadiusValue,
|
||||||
borderTopStartRadius?: BorderRadiusValue,
|
borderTopStartRadius?: ?BorderRadiusValue,
|
||||||
borderStyle?: BorderStyleValue,
|
borderStyle?: ?BorderStyleValue,
|
||||||
borderBottomStyle?: BorderStyleValue,
|
borderBottomStyle?: ?BorderStyleValue,
|
||||||
borderEndStyle?: BorderStyleValue,
|
borderEndStyle?: ?BorderStyleValue,
|
||||||
borderLeftStyle?: BorderStyleValue,
|
borderLeftStyle?: ?BorderStyleValue,
|
||||||
borderRightStyle?: BorderStyleValue,
|
borderRightStyle?: ?BorderStyleValue,
|
||||||
borderStartStyle?: BorderStyleValue,
|
borderStartStyle?: ?BorderStyleValue,
|
||||||
borderTopStyle?: BorderStyleValue
|
borderTopStyle?: ?BorderStyleValue
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,12 +129,12 @@ type UserSelect = 'all' | 'auto' | 'contain' | 'none' | 'text';
|
|||||||
|
|
||||||
export type InteractionStyles = {|
|
export type InteractionStyles = {|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Formal_syntax
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Formal_syntax
|
||||||
cursor?: CursorValue,
|
cursor?: ?CursorValue,
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action#Formal_syntax
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action#Formal_syntax
|
||||||
touchAction?: TouchActionValue,
|
touchAction?: ?TouchActionValue,
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#Formal_syntax_2
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#Formal_syntax_2
|
||||||
userSelect?: UserSelect,
|
userSelect?: ?UserSelect,
|
||||||
willChange?: string
|
willChange?: ?string
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -152,88 +152,89 @@ export type LayoutStyles = {|
|
|||||||
| 'space-around'
|
| 'space-around'
|
||||||
| 'space-between'
|
| 'space-between'
|
||||||
| 'stretch',
|
| 'stretch',
|
||||||
alignItems?: 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch',
|
alignItems?: ?('baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'),
|
||||||
alignSelf?: 'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch',
|
alignSelf?: ?('auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'),
|
||||||
backfaceVisibility?: VisiblilityValue,
|
backfaceVisibility?: ?VisiblilityValue,
|
||||||
borderWidth?: DimensionValue,
|
borderWidth?: ?DimensionValue,
|
||||||
borderBottomWidth?: DimensionValue,
|
borderBottomWidth?: ?DimensionValue,
|
||||||
borderEndWidth?: DimensionValue,
|
borderEndWidth?: ?DimensionValue,
|
||||||
borderLeftWidth?: DimensionValue,
|
borderLeftWidth?: ?DimensionValue,
|
||||||
borderRightWidth?: DimensionValue,
|
borderRightWidth?: ?DimensionValue,
|
||||||
borderStartWidth?: DimensionValue,
|
borderStartWidth?: ?DimensionValue,
|
||||||
borderTopWidth?: DimensionValue,
|
borderTopWidth?: ?DimensionValue,
|
||||||
bottom?: DimensionValue,
|
bottom?: ?DimensionValue,
|
||||||
boxSizing?: 'border-box' | 'content-box' | 'padding-box',
|
boxSizing?: ?('border-box' | 'content-box' | 'padding-box'),
|
||||||
direction?: 'inherit' | 'ltr' | 'rtl',
|
direction?: ?('inherit' | 'ltr' | 'rtl'),
|
||||||
display?: string,
|
display?: ?string,
|
||||||
end?: DimensionValue,
|
end?: ?DimensionValue,
|
||||||
flex?: number,
|
flex?: ?number,
|
||||||
flexBasis?: DimensionValue,
|
flexBasis?: ?DimensionValue,
|
||||||
flexDirection?: 'column' | 'column-reverse' | 'row' | 'row-reverse',
|
flexDirection?: ?('column' | 'column-reverse' | 'row' | 'row-reverse'),
|
||||||
flexGrow?: number,
|
flexGrow?: ?number,
|
||||||
flexShrink?: number,
|
flexShrink?: ?number,
|
||||||
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse',
|
flexWrap?: ?('nowrap' | 'wrap' | 'wrap-reverse'),
|
||||||
height?: DimensionValue,
|
height?: ?DimensionValue,
|
||||||
justifyContent?:
|
justifyContent?: ?(
|
||||||
| 'center'
|
| 'center'
|
||||||
| 'flex-end'
|
| 'flex-end'
|
||||||
| 'flex-start'
|
| 'flex-start'
|
||||||
| 'space-around'
|
| 'space-around'
|
||||||
| 'space-between'
|
| 'space-between'
|
||||||
| 'space-evenly',
|
| 'space-evenly'
|
||||||
left?: DimensionValue,
|
),
|
||||||
margin?: DimensionValue,
|
left?: ?DimensionValue,
|
||||||
marginBottom?: DimensionValue,
|
margin?: ?DimensionValue,
|
||||||
marginHorizontal?: DimensionValue,
|
marginBottom?: ?DimensionValue,
|
||||||
marginEnd?: DimensionValue,
|
marginHorizontal?: ?DimensionValue,
|
||||||
marginLeft?: DimensionValue,
|
marginEnd?: ?DimensionValue,
|
||||||
marginRight?: DimensionValue,
|
marginLeft?: ?DimensionValue,
|
||||||
marginStart?: DimensionValue,
|
marginRight?: ?DimensionValue,
|
||||||
marginTop?: DimensionValue,
|
marginStart?: ?DimensionValue,
|
||||||
marginVertical?: DimensionValue,
|
marginTop?: ?DimensionValue,
|
||||||
maxHeight?: DimensionValue,
|
marginVertical?: ?DimensionValue,
|
||||||
maxWidth?: DimensionValue,
|
maxHeight?: ?DimensionValue,
|
||||||
minHeight?: DimensionValue,
|
maxWidth?: ?DimensionValue,
|
||||||
minWidth?: DimensionValue,
|
minHeight?: ?DimensionValue,
|
||||||
order?: number,
|
minWidth?: ?DimensionValue,
|
||||||
overflow?: OverflowValue,
|
order?: ?number,
|
||||||
overflowX?: OverflowValue,
|
overflow?: ?OverflowValue,
|
||||||
overflowY?: OverflowValue,
|
overflowX?: ?OverflowValue,
|
||||||
padding?: DimensionValue,
|
overflowY?: ?OverflowValue,
|
||||||
paddingBottom?: DimensionValue,
|
padding?: ?DimensionValue,
|
||||||
paddingHorizontal?: DimensionValue,
|
paddingBottom?: ?DimensionValue,
|
||||||
paddingEnd?: DimensionValue,
|
paddingHorizontal?: ?DimensionValue,
|
||||||
paddingLeft?: DimensionValue,
|
paddingEnd?: ?DimensionValue,
|
||||||
paddingRight?: DimensionValue,
|
paddingLeft?: ?DimensionValue,
|
||||||
paddingStart?: DimensionValue,
|
paddingRight?: ?DimensionValue,
|
||||||
paddingTop?: DimensionValue,
|
paddingStart?: ?DimensionValue,
|
||||||
paddingVertical?: DimensionValue,
|
paddingTop?: ?DimensionValue,
|
||||||
position?: 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky',
|
paddingVertical?: ?DimensionValue,
|
||||||
right?: DimensionValue,
|
position?: ?('absolute' | 'fixed' | 'relative' | 'static' | 'sticky'),
|
||||||
start?: DimensionValue,
|
right?: ?DimensionValue,
|
||||||
top?: DimensionValue,
|
start?: ?DimensionValue,
|
||||||
visibility?: VisiblilityValue,
|
top?: ?DimensionValue,
|
||||||
width?: DimensionValue,
|
visibility?: ?VisiblilityValue,
|
||||||
zIndex?: number,
|
width?: ?DimensionValue,
|
||||||
|
zIndex?: ?number,
|
||||||
/**
|
/**
|
||||||
* @platform unsupported
|
* @platform unsupported
|
||||||
*/
|
*/
|
||||||
aspectRatio?: number,
|
aspectRatio?: ?number,
|
||||||
/**
|
/**
|
||||||
* @platform web
|
* @platform web
|
||||||
*/
|
*/
|
||||||
gridAutoColumns?: string,
|
gridAutoColumns?: ?string,
|
||||||
gridAutoFlow?: string,
|
gridAutoFlow?: ?string,
|
||||||
gridAutoRows?: string,
|
gridAutoRows?: ?string,
|
||||||
gridColumnEnd?: string,
|
gridColumnEnd?: ?string,
|
||||||
gridColumnGap?: string,
|
gridColumnGap?: ?string,
|
||||||
gridColumnStart?: string,
|
gridColumnStart?: ?string,
|
||||||
gridRowEnd?: string,
|
gridRowEnd?: ?string,
|
||||||
gridRowGap?: string,
|
gridRowGap?: ?string,
|
||||||
gridRowStart?: string,
|
gridRowStart?: ?string,
|
||||||
gridTemplateColumns?: string,
|
gridTemplateColumns?: ?string,
|
||||||
gridTemplateRows?: string,
|
gridTemplateRows?: ?string,
|
||||||
gridTemplateAreas?: string
|
gridTemplateAreas?: ?string
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -241,13 +242,13 @@ export type LayoutStyles = {|
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export type ShadowStyles = {|
|
export type ShadowStyles = {|
|
||||||
shadowColor?: ColorValue,
|
shadowColor?: ?ColorValue,
|
||||||
shadowOffset?: {|
|
shadowOffset?: {|
|
||||||
width?: DimensionValue,
|
width?: DimensionValue,
|
||||||
height?: DimensionValue
|
height?: DimensionValue
|
||||||
|},
|
|},
|
||||||
shadowOpacity?: number,
|
shadowOpacity?: ?number,
|
||||||
shadowRadius?: DimensionValue
|
shadowRadius?: ?DimensionValue
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -255,8 +256,8 @@ export type ShadowStyles = {|
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export type TransformStyles = {|
|
export type TransformStyles = {|
|
||||||
perspective?: NumberOrString,
|
perspective?: ?NumberOrString,
|
||||||
perspectiveOrigin?: string,
|
perspectiveOrigin?: ?string,
|
||||||
transform?: Array<
|
transform?: Array<
|
||||||
| {| +perspective: NumberOrString |}
|
| {| +perspective: NumberOrString |}
|
||||||
| {| +rotate: string |}
|
| {| +rotate: string |}
|
||||||
@@ -275,6 +276,6 @@ export type TransformStyles = {|
|
|||||||
| {| +translateZ: NumberOrString |}
|
| {| +translateZ: NumberOrString |}
|
||||||
| {| +translate3d: string |}
|
| {| +translate3d: string |}
|
||||||
>,
|
>,
|
||||||
transformOrigin?: string,
|
transformOrigin?: ?string,
|
||||||
transformStyle?: 'flat' | 'preserve-3d'
|
transformStyle?: ?('flat' | 'preserve-3d')
|
||||||
|};
|
|};
|
||||||
|
|||||||
Reference in New Issue
Block a user