docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
bg: 'muted.50',
_text: {
color: 'text.900', | <mask> export const PopoverBody = {
<mask> baseStyle: () => ({
<mask> p: '3',
<mask> shadow: '6',
<mask> _light: {
<mask> bg: 'muted.50',
<mask> _text: {
<mask> color: 'text.900',
<mask> },
<mask> },
<mask> _dark: {
<mask> bg: 'muted.800',
<mask> _text: {
<mask> color: 'text.50',
</s> fix: remove light pseudo props from base style </s> remove _light: {
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
</s> add borderColor: 'muted.300',
_text: {
color: 'text.900', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
},
</s> add bg: 'muted.50', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
borderColor: 'muted.300',
_text: {
color: 'text.900', | <mask> export const PopoverContent = {
<mask> baseStyle: () => ({
<mask> //TODO: Box inside PopperContent is not able to resolve shadow
<mask> // shadow: '6',
<mask> _light: {
<mask> borderColor: 'muted.300',
<mask> _text: {
<mask> color: 'text.900',
<mask> },
<mask> },
<mask> _dark: {
<mask> borderColor: 'muted.700',
<mask> _text: {
<mask> color: 'text.50',
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
_text: {
color: 'text.900',
},
</s> add bg: 'muted.50',
_text: {
color: 'text.900', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
_text: { color: `${colorScheme}.600` },
_icon: { color: `${colorScheme}.600` },
borderColor: `${colorScheme}.600`,
},
</s> add _text: { color: `${colorScheme}.600` },
_icon: { color: `${colorScheme}.600` },
borderColor: `${colorScheme}.600`, </s> remove color: 'text.900',
},
_disabled: {
_text: {
color: 'text.400',
},
},
_hover: {
bg: 'muted.200',
</s> add color: 'text.400', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
color: 'text.900', | <mask> _text: {
<mask> fontSize: 'md',
<mask> fontWeight: '700',
<mask> lineHeight: 'sm',
<mask> },
<mask> bg: 'muted.50',
<mask> borderColor: 'muted.300',
<mask> _dark: {
<mask> bg: 'muted.800',
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
},
</s> add bg: 'muted.50', </s> remove _light: {
bg: `muted.800`,
_text: {
color: `text.50`,
},
},
</s> add bg: `muted.800`, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
bg: 'muted.50',
borderColor: 'muted.300', | <mask> fontSize: 'md',
<mask> fontWeight: '700',
<mask> lineHeight: 'sm',
<mask> },
<mask> _light: {
<mask> bg: 'muted.50',
<mask> borderColor: 'muted.300',
<mask> _text: {
<mask> color: 'text.900',
<mask> },
<mask> },
<mask> _dark: {
<mask> bg: 'muted.800',
<mask> borderColor: 'muted.700',
<mask> _text: {
<mask> color: 'text.50',
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
_text: {
color: 'text.900',
},
</s> add bg: 'muted.50',
_text: {
color: 'text.900', </s> remove _light: {
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
</s> add borderColor: 'muted.300',
_text: {
color: 'text.900', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
bg: 'muted.50',
borderColor: 'muted.300', | <mask> };
<mask>
<mask> export const PopoverArrow = {
<mask> baseStyle: () => ({
<mask> _light: {
<mask> bg: 'muted.50',
<mask> borderColor: 'muted.300',
<mask> },
<mask> _dark: {
<mask> bg: 'muted.800',
<mask> borderColor: 'muted.700',
<mask> },
<mask> }),
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
_text: {
color: 'text.900',
},
</s> add bg: 'muted.50',
_text: {
color: 'text.900', </s> remove _light: {
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
</s> add borderColor: 'muted.300',
_text: {
color: 'text.900', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
},
</s> add bg: 'muted.50', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
bg: 'muted.50',
borderColor: 'muted.300', | <mask> flexDirection: 'row',
<mask> justifyContent: 'flex-end',
<mask> flexWrap: 'wrap',
<mask> borderTopWidth: 1,
<mask> _light: {
<mask> bg: 'muted.50',
<mask> borderColor: 'muted.300',
<mask> },
<mask> _dark: {
<mask> bg: 'muted.800',
<mask> borderColor: 'muted.700',
<mask> },
<mask> };
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.300',
},
</s> add bg: 'muted.300', </s> remove _light: {
bg: 'muted.50',
},
</s> add bg: 'muted.50', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/popover.ts |
bg: `${c}.600`, | <mask>
<mask> return {
<mask> overflow: 'hidden',
<mask> _filledTrack: {
<mask> shadow: 0,
<mask> height: '100%',
<mask> display: 'flex',
<mask> alignItems: 'center',
</s> fix: remove light pseudo props from base style </s> remove _light: {
borderColor: 'gray.800',
},
</s> add borderColor: 'gray.800', </s> remove _light: {
bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid',
},
</s> add bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid', </s> remove _light: {
bg: 'muted.200',
_filledTrack: {
bg: `${c}.600`,
},
},
</s> add bg: 'muted.200', </s> remove _light: {
bg: 'muted.300',
},
</s> add bg: 'muted.300', </s> remove _light: {
bg: `${colorScheme}.600`,
},
</s> add bg: `${colorScheme}.600`, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/progress.ts |
bg: 'muted.200', | <mask> color: 'white',
<mask> fontWeight: 'bold',
<mask> },
<mask> },
<mask> _light: {
<mask> bg: 'muted.200',
<mask> _filledTrack: {
<mask> bg: `${c}.600`,
<mask> },
<mask> },
<mask> _dark: {
<mask> bg: 'muted.700',
<mask> _filledTrack: {
<mask> bg: `${c}.400`,
<mask> },
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
bg: 'muted.200',
},
</s> add bg: 'muted.200', </s> remove _focus: {
</s> add },
_hover: {
bg: 'muted.200',
},
_focus: {
bg: 'muted.300',
},
_pressed: {
bg: 'muted.400',
},
_focusVisible: {
_web: {
outlineWidth: '0',
style: { boxShadow: `none` }, </s> remove color: 'text.900',
},
_disabled: {
_text: {
color: 'text.400',
},
},
_hover: {
bg: 'muted.200',
</s> add color: 'text.400', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/progress.ts |
bg: 'muted.200', | <mask> width: !isVertical ? '100%' : size,
<mask> py: !isVertical ? '3' : undefined,
<mask> px: isVertical ? '3' : undefined,
<mask> },
<mask> _light: {
<mask> bg: 'muted.200',
<mask> },
<mask> _dark: {
<mask> bg: 'muted.700',
<mask> },
<mask> };
<mask> },
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: `${colorScheme}.600`,
},
</s> add bg: `${colorScheme}.600`, </s> remove _light: {
bg: lightBg,
_icon: { color: `${colorScheme}.700` },
},
</s> add bg: lightBg,
_icon: { color: `${colorScheme}.700` }, </s> remove _light: {
bg: lightBg,
_icon: { color: `${colorScheme}.700` },
borderLeftColor: `${colorScheme}.700`,
},
</s> add bg: lightBg,
_icon: { color: `${colorScheme}.700` },
borderLeftColor: `${colorScheme}.700`, </s> remove _light: {
bg: lightBg,
_icon: { color: `${colorScheme}.700` },
borderTopColor: `${colorScheme}.700`,
},
</s> add bg: lightBg,
_icon: { color: `${colorScheme}.700` },
borderTopColor: `${colorScheme}.700`, </s> remove _light: {
_icon: { color: `${colorScheme}.700` },
borderColor: `${colorScheme}.700`,
},
</s> add _icon: { color: `${colorScheme}.700` },
borderColor: `${colorScheme}.700`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/slider.ts |
bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid', | <mask> alignItems: 'center',
<mask> justifyContent: 'center',
<mask> space: 2,
<mask> },
<mask> _light: {
<mask> bg: `${colorScheme}.600`,
<mask> _hover: {
<mask> _web: {
<mask> outlineWidth: '4px',
<mask> outlineColor: primary[300],
<mask> outlineStyle: 'solid',
<mask> },
<mask> },
<mask> _focus: {
<mask> _web: {
<mask> outlineWidth: '2px',
<mask> outlineColor: primary[400],
</s> fix: remove light pseudo props from base style </s> remove _focus: {
_web: {
outlineWidth: '2px',
outlineColor: primary[400],
outlineStyle: 'solid',
},
</s> add },
_focus: {
_web: {
outlineWidth: '2px',
outlineColor: primary[400],
outlineStyle: 'solid', </s> remove const focusRing = mode(
{
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][600]}`,
outlineStyle: 'solid',
},
{
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][500]}`,
outlineStyle: 'solid',
}
)(props);
</s> add </s> remove style: { ...focusRing },
</s> add style: {
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][600]}`,
outlineStyle: 'solid',
}, </s> remove _pressed: {
_interactionBox: {
borderWidth: '8',
borderColor: `${colorScheme}.300`,
},
</s> add },
_pressed: {
_interactionBox: {
borderWidth: '8',
borderColor: `${colorScheme}.300`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/slider.ts |
},
_focus: {
_web: {
outlineWidth: '2px',
outlineColor: primary[400],
outlineStyle: 'solid', | <mask> outlineColor: primary[300],
<mask> outlineStyle: 'solid',
<mask> },
<mask> },
<mask> _focus: {
<mask> _web: {
<mask> outlineWidth: '2px',
<mask> outlineColor: primary[400],
<mask> outlineStyle: 'solid',
<mask> },
<mask> },
<mask> _pressed: {
<mask> _interactionBox: {
<mask> borderWidth: '8',
<mask> borderColor: `${colorScheme}.300`,
</s> fix: remove light pseudo props from base style </s> remove _pressed: {
_interactionBox: {
borderWidth: '8',
borderColor: `${colorScheme}.300`,
},
</s> add },
_pressed: {
_interactionBox: {
borderWidth: '8',
borderColor: `${colorScheme}.300`, </s> remove _light: {
bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid',
},
</s> add bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid', </s> remove style: { ...focusRing },
</s> add style: {
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][600]}`,
outlineStyle: 'solid',
}, </s> remove const focusRing = mode(
{
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][600]}`,
outlineStyle: 'solid',
},
{
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][500]}`,
outlineStyle: 'solid',
}
)(props);
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/slider.ts |
},
_pressed: {
_interactionBox: {
borderWidth: '8',
borderColor: `${colorScheme}.300`, | <mask> outlineColor: primary[400],
<mask> outlineStyle: 'solid',
<mask> },
<mask> },
<mask> _pressed: {
<mask> _interactionBox: {
<mask> borderWidth: '8',
<mask> borderColor: `${colorScheme}.300`,
<mask> },
<mask> },
<mask> },
<mask> _dark: {
<mask> bg: `${colorScheme}.500`,
<mask> _hover: {
</s> fix: remove light pseudo props from base style </s> remove _focus: {
_web: {
outlineWidth: '2px',
outlineColor: primary[400],
outlineStyle: 'solid',
},
</s> add },
_focus: {
_web: {
outlineWidth: '2px',
outlineColor: primary[400],
outlineStyle: 'solid', </s> remove _light: {
bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid',
},
</s> add bg: `${colorScheme}.600`,
_hover: {
_web: {
outlineWidth: '4px',
outlineColor: primary[300],
outlineStyle: 'solid', </s> remove _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
</s> add bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`, </s> remove style: { ...focusRing },
</s> add style: {
outlineWidth: '2px',
outlineColor: `${colors[colorScheme][600]}`,
outlineStyle: 'solid',
}, </s> remove _light: {
_icon: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
</s> add _icon: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/slider.ts |
bg: `${colorScheme}.600`, | <mask> style:
<mask> orientation === 'vertical'
<mask> ? { height: sliderTrackPosition, width: size }
<mask> : { width: sliderTrackPosition, height: size },
<mask> _light: {
<mask> bg: `${colorScheme}.600`,
<mask> },
<mask> _dark: {
<mask> bg: `${colorScheme}.500`,
<mask> },
<mask> };
<mask> },
</s> fix: remove light pseudo props from base style </s> remove _light: {
borderColor: 'gray.800',
},
</s> add borderColor: 'gray.800', </s> remove _light: {
bg: 'muted.200',
},
</s> add bg: 'muted.200', </s> remove _light: {
bg: 'muted.300',
},
</s> add bg: 'muted.300', </s> remove _light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
_icon: {
color: 'muted.50',
},
</s> add bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
_icon: {
color: 'muted.50', </s> remove _light: {
_icon: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
</s> add _icon: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/slider.ts |
color: `text.50`, | <mask> _text: {
<mask> fontSize: 'sm',
<mask> },
<mask> bg: `muted.800`,
<mask> _dark: {
<mask> bg: `muted.50`,
<mask> _text: {
<mask> color: `text.900`,
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: `muted.800`,
_text: {
color: `text.50`,
},
},
</s> add bg: `muted.800`, </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
_text: {
color: 'text.500',
},
_astrick: {
color: 'error.600',
},
</s> add _astrick: {
color: 'error.600', | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/tooltip.ts |
bg: `muted.800`, | <mask> rounded: 'sm',
<mask> _text: {
<mask> fontSize: 'sm',
<mask> },
<mask> _light: {
<mask> bg: `muted.800`,
<mask> _text: {
<mask> color: `text.50`,
<mask> },
<mask> },
<mask> _dark: {
<mask> bg: `muted.50`,
<mask> _text: {
<mask> color: `text.900`,
<mask> },
</s> fix: remove light pseudo props from base style </s> remove _light: {
bg: 'muted.50',
borderColor: 'muted.300',
_text: {
color: 'text.900',
},
},
</s> add bg: 'muted.50',
borderColor: 'muted.300', </s> remove _light: {
_text: {
color: 'text.500',
},
_astrick: {
color: 'error.600',
},
</s> add _astrick: {
color: 'error.600', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/06b901fcf7960c0af5159ed3f38fe90d286d2e3a | src/theme/components/tooltip.ts |
duration: newProps.duration ?? 1900, | <mask> const degree: any = new Animated.Value(0);
<mask> Animated.loop(
<mask> Animated.timing(degree, {
<mask> toValue: 1,
<mask> duration: 900,
<mask> easing: Easing.linear,
<mask> useNativeDriver: false,
<mask> })
<mask> ).start();
<mask>
</s> feat: added duration in spinner </s> remove variant?: string;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/07dc3fb78e6eb60a4a653ee8484fc425278b1bde | src/components/primitives/Spinner/index.tsx |
<mask> PositionProps & {
<mask> color?: string | undefined;
<mask> style?: any | undefined;
<mask> size?: 'sm' | 'lg' | 'small' | 'large';
<mask> variant?: string;
<mask> accessibilityLabel?: string;
<mask> renderProp?: JSX.Element | JSX.Element[];
<mask> };
</s> feat: added duration in spinner </s> remove duration: 900,
</s> add duration: newProps.duration ?? 1900, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/07dc3fb78e6eb60a4a653ee8484fc425278b1bde | src/components/primitives/Spinner/props.tsx | |
variant?: string;
duration?: number; | <mask> color?: string | undefined;
<mask> style?: any | undefined;
<mask> size?: 'sm' | 'lg' | 'small' | 'large';
<mask> accessibilityLabel?: string;
<mask> renderProp?: JSX.Element | JSX.Element[];
<mask> };
</s> feat: added duration in spinner </s> remove variant?: string;
</s> add </s> remove duration: 900,
</s> add duration: newProps.duration ?? 1900, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/07dc3fb78e6eb60a4a653ee8484fc425278b1bde | src/components/primitives/Spinner/props.tsx |
lightText: '#FFFFFF', | <mask> contrastThreshold: 3,
<mask> // Singleton colors
<mask> white: '#FFFFFF',
<mask> black: '#000000',
<mask> lightText: '#FFF',
<mask> darkText: '#27272a',
<mask> // Primary colors
<mask> whiteAlpha: {
<mask> 50: 'rgba(255, 255, 255, 0.04)',
<mask> 100: 'rgba(255, 255, 255, 0.06)',
</s> fix: removed white alpha and black alpha colors </s> remove whiteAlpha: {
50: 'rgba(255, 255, 255, 0.04)',
100: 'rgba(255, 255, 255, 0.06)',
200: 'rgba(255, 255, 255, 0.08)',
300: 'rgba(255, 255, 255, 0.16)',
400: 'rgba(255, 255, 255, 0.24)',
500: 'rgba(255, 255, 255, 0.36)',
600: 'rgba(255, 255, 255, 0.48)',
700: 'rgba(255, 255, 255, 0.64)',
800: 'rgba(255, 255, 255, 0.80)',
900: 'rgba(255, 255, 255, 0.92)',
},
blackAlpha: {
50: 'rgba(0, 0, 0, 0.04)',
100: 'rgba(0, 0, 0, 0.06)',
200: 'rgba(0, 0, 0, 0.08)',
300: 'rgba(0, 0, 0, 0.16)',
400: 'rgba(0, 0, 0, 0.24)',
500: 'rgba(0, 0, 0, 0.36)',
600: 'rgba(0, 0, 0, 0.48)',
700: 'rgba(0, 0, 0, 0.64)',
800: 'rgba(0, 0, 0, 0.80)',
900: 'rgba(0, 0, 0, 0.92)',
},
</s> add </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/base/colors.ts |
<mask> black: '#000000',
<mask> lightText: '#FFF',
<mask> darkText: '#27272a',
<mask> // Primary colors
<mask> whiteAlpha: {
<mask> 50: 'rgba(255, 255, 255, 0.04)',
<mask> 100: 'rgba(255, 255, 255, 0.06)',
<mask> 200: 'rgba(255, 255, 255, 0.08)',
<mask> 300: 'rgba(255, 255, 255, 0.16)',
<mask> 400: 'rgba(255, 255, 255, 0.24)',
<mask> 500: 'rgba(255, 255, 255, 0.36)',
<mask> 600: 'rgba(255, 255, 255, 0.48)',
<mask> 700: 'rgba(255, 255, 255, 0.64)',
<mask> 800: 'rgba(255, 255, 255, 0.80)',
<mask> 900: 'rgba(255, 255, 255, 0.92)',
<mask> },
<mask>
<mask> blackAlpha: {
<mask> 50: 'rgba(0, 0, 0, 0.04)',
<mask> 100: 'rgba(0, 0, 0, 0.06)',
<mask> 200: 'rgba(0, 0, 0, 0.08)',
<mask> 300: 'rgba(0, 0, 0, 0.16)',
<mask> 400: 'rgba(0, 0, 0, 0.24)',
<mask> 500: 'rgba(0, 0, 0, 0.36)',
<mask> 600: 'rgba(0, 0, 0, 0.48)',
<mask> 700: 'rgba(0, 0, 0, 0.64)',
<mask> 800: 'rgba(0, 0, 0, 0.80)',
<mask> 900: 'rgba(0, 0, 0, 0.92)',
<mask> },
<mask> rose: {
<mask> 50: '#fff1f2',
<mask> 100: '#ffe4e6',
<mask> 200: '#fecdd3',
<mask> 300: '#fda4af',
</s> fix: removed white alpha and black alpha colors </s> remove lightText: '#FFF',
</s> add lightText: '#FFFFFF', </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/base/colors.ts | |
color: mode(`gray.500`, `white`)(props), | <mask> const { colorScheme: c } = props;
<mask> if (c === 'gray') {
<mask> return {
<mask> _text: {
<mask> color: mode(`gray.500`, `whiteAlpha.900`)(props),
<mask> },
<mask> };
<mask> }
<mask>
<mask> return {
</s> fix: removed white alpha and black alpha colors </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);
</s> add const borderColor = mode(`gray.200`, `gray.500`)(props); </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove whiteAlpha: {
50: 'rgba(255, 255, 255, 0.04)',
100: 'rgba(255, 255, 255, 0.06)',
200: 'rgba(255, 255, 255, 0.08)',
300: 'rgba(255, 255, 255, 0.16)',
400: 'rgba(255, 255, 255, 0.24)',
500: 'rgba(255, 255, 255, 0.36)',
600: 'rgba(255, 255, 255, 0.48)',
700: 'rgba(255, 255, 255, 0.64)',
800: 'rgba(255, 255, 255, 0.80)',
900: 'rgba(255, 255, 255, 0.92)',
},
blackAlpha: {
50: 'rgba(0, 0, 0, 0.04)',
100: 'rgba(0, 0, 0, 0.06)',
200: 'rgba(0, 0, 0, 0.08)',
300: 'rgba(0, 0, 0, 0.16)',
400: 'rgba(0, 0, 0, 0.24)',
500: 'rgba(0, 0, 0, 0.36)',
600: 'rgba(0, 0, 0, 0.48)',
700: 'rgba(0, 0, 0, 0.64)',
800: 'rgba(0, 0, 0, 0.80)',
900: 'rgba(0, 0, 0, 0.92)',
},
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/components/button.ts |
const borderColor = mode(`gray.200`, `gray.500`)(props); | <mask> }
<mask>
<mask> function variantOutline(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);
<mask> return {
<mask> border: '1px solid',
<mask> borderColor:
<mask> c === 'gray' ? borderColor : mode(`${c}.500`, `${c}.200`)(props),
<mask> ...variantGhost(props),
</s> fix: removed white alpha and black alpha colors </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), </s> remove lightText: '#FFF',
</s> add lightText: '#FFFFFF', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/components/button.ts |
bg: mode(`gray.100`, `gray.800`)(props), | <mask> function variantSolid(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> if (c === 'gray')
<mask> return {
<mask> bg: mode(`gray.100`, `whiteAlpha.200`)(props),
<mask> };
<mask> const { bg = `${c}.500` } = accessibleColorMap[c] || {};
<mask> return {
<mask> bg: mode(bg, `${c}.400`)(props),
<mask> };
</s> fix: removed white alpha and black alpha colors </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);
</s> add const borderColor = mode(`gray.200`, `gray.500`)(props); </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove lightText: '#FFF',
</s> add lightText: '#FFFFFF', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/components/button.ts |
placeholderTextColor: mode(colors.gray[600], colors.black)(props), | <mask> return {
<mask> w: '100%',
<mask> p: Platform.OS === 'android' ? 2 : 3, // Android's input have default padding.
<mask> color: mode('black', 'white')(props),
<mask> placeholderTextColor: mode(
<mask> colors.blackAlpha[600],
<mask> colors.whiteAlpha[600]
<mask> )(props),
<mask> _isDisabledProps: {
<mask> opacity: 0.4,
<mask> },
<mask> borderColor: isInvalid
<mask> ? mode('danger.600', 'danger.200')(props)
</s> fix: removed white alpha and black alpha colors </s> remove const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);
</s> add const borderColor = mode(`gray.200`, `gray.500`)(props); </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove lightText: '#FFF',
</s> add lightText: '#FFFFFF', </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove bg: mode('gray.200', 'whiteAlpha.200')(props),
borderColor: mode('gray.300', 'whiteAlpha.300')(props),
</s> add bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/components/input.ts |
bg: mode('gray.200', 'gray.700')(props),
borderColor: mode('gray.300', 'gray.600')(props), | <mask> import { mode } from '../tools';
<mask>
<mask> function baseStyle(props: Record<string, any>) {
<mask> return {
<mask> bg: mode('gray.200', 'whiteAlpha.200')(props),
<mask> borderColor: mode('gray.300', 'whiteAlpha.300')(props),
<mask> borderWidth: 2,
<mask> borderBottomWidth: 4,
<mask> borderRadius: 'md',
<mask> px: 2,
<mask> _text: {
</s> fix: removed white alpha and black alpha colors </s> remove bg: mode(`gray.100`, `whiteAlpha.200`)(props),
</s> add bg: mode(`gray.100`, `gray.800`)(props), </s> remove color: mode(`gray.500`, `whiteAlpha.900`)(props),
</s> add color: mode(`gray.500`, `white`)(props), </s> remove const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);
</s> add const borderColor = mode(`gray.200`, `gray.500`)(props); </s> remove placeholderTextColor: mode(
colors.blackAlpha[600],
colors.whiteAlpha[600]
)(props),
</s> add placeholderTextColor: mode(colors.gray[600], colors.black)(props), </s> remove lightText: '#FFF',
</s> add lightText: '#FFFFFF', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0886b51a0392f7a81bdab212f49eb5654388e3ae | src/theme/components/kbd.ts |
setTimeout(() => {
Animated.spring(pan, {
toValue: { x: 0, y: 0 },
overshootClamping: true,
useNativeDriver: true,
}).start();
}); | <mask> duration: 150,
<mask> useNativeDriver: true,
<mask> }).start(handleClose);
<mask> } else {
<mask> Animated.spring(pan, {
<mask> toValue: { x: 0, y: 0 },
<mask> overshootClamping: true,
</s> fix: performance fixes slide and overlay </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove setAnimationExited(true);
</s> add </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove setAnimationExited(false);
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Actionsheet/ActionsheetContent.tsx |
// console.log('action sheet render '); | <mask> if (useHasResponsiveProps(props)) {
<mask> return null;
<mask> }
<mask> return (
<mask> <Animated.View
<mask> style={{
<mask> transform: [{ translateY: pan.y }],
<mask> width: '100%',
</s> fix: performance fixes slide and overlay </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove const [animationExited, setAnimationExited] = React.useState(!visible);
</s> add // const [animationExited, setAnimationExited] = React.useState(!visible); </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Actionsheet/ActionsheetContent.tsx |
// console.log('visible here', visible); | <mask> return null;
<mask> }
<mask> return (
<mask> <Overlay
<mask> isOpen={visible}
<mask> onRequestClose={handleClose}
<mask> isKeyboardDismissable={isKeyboardDismissable}
<mask> useRNModalOnAndroid
</s> fix: performance fixes slide and overlay </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } </s> remove const [animationExited, setAnimationExited] = React.useState(!visible);
</s> add // const [animationExited, setAnimationExited] = React.useState(!visible); | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Modal/Modal.tsx |
// const [animationExited, setAnimationExited] = React.useState(!visible); | <mask> const PresenceTransition = (
<mask> { visible = false, onTransitionComplete, ...rest }: IPresenceTransitionProps,
<mask> ref: any
<mask> ) => {
<mask> const [animationExited, setAnimationExited] = React.useState(!visible);
<mask>
<mask> const { setExited } = React.useContext(ExitAnimationContext);
<mask> //TODO: refactor for responsive prop
<mask> if (useHasResponsiveProps(rest)) {
<mask> return null;
</s> fix: performance fixes slide and overlay </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } </s> remove // Exit request
</s> add // if (!visible) { </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/PresenceTransition.tsx |
// if (!visible && animationExited) {
// return null;
// } | <mask> if (useHasResponsiveProps(rest)) {
<mask> return null;
<mask> }
<mask>
<mask> if (!visible && animationExited) {
<mask> return null;
<mask> }
<mask>
<mask> return (
<mask> <Transition
<mask> visible={visible}
<mask> onTransitionComplete={(state) => {
</s> fix: performance fixes slide and overlay </s> remove setAnimationExited(true);
</s> add </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove const [animationExited, setAnimationExited] = React.useState(!visible);
</s> add // const [animationExited, setAnimationExited] = React.useState(!visible); </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/PresenceTransition.tsx |
<mask> <Transition
<mask> visible={visible}
<mask> onTransitionComplete={(state) => {
<mask> if (state === 'exited') {
<mask> setAnimationExited(true);
<mask> setExited(true);
<mask> } else {
<mask> setAnimationExited(false);
<mask> setExited(false);
<mask> }
</s> fix: performance fixes slide and overlay </s> remove setAnimationExited(false);
</s> add </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/PresenceTransition.tsx | |
<mask> if (state === 'exited') {
<mask> setAnimationExited(true);
<mask> setExited(true);
<mask> } else {
<mask> setAnimationExited(false);
<mask> setExited(false);
<mask> }
<mask> onTransitionComplete && onTransitionComplete(state);
<mask> }}
<mask> {...rest}
</s> fix: performance fixes slide and overlay </s> remove setAnimationExited(true);
</s> add </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/PresenceTransition.tsx | |
<mask> import React, { forwardRef } from 'react';
<mask> import { Animated } from 'react-native';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask> import type {
<mask> ISupportedTransitions,
<mask> ITransitionConfig,
<mask> ITransitionProps,
<mask> } from './types';
</s> fix: performance fixes slide and overlay </s> remove setAnimationExited(true);
</s> add </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx | |
const [displayState, setDisplayState] = React.useState('flex'); | <mask> const animateValue = React.useRef(new Animated.Value(0)).current;
<mask>
<mask> const Component = React.useMemo(() => {
<mask> if (as) {
<mask> return Animated.createAnimatedComponent(as);
<mask> }
<mask> return Animated.View;
<mask> }, [as]);
</s> fix: performance fixes slide and overlay </s> remove const [animationState, setAnimationState] = React.useState(
visible ? 'entering' : 'exited'
);
</s> add const [animationState, setAnimationState] = React.useState(''); </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; </s> remove initial as ISupportedTransitions,
animate as ISupportedTransitions
</s> add initialState as ISupportedTransitions,
animateState as ISupportedTransitions </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
const [animationState, setAnimationState] = React.useState(''); | <mask> }
<mask> return Animated.View;
<mask> }, [as]);
<mask>
<mask> const [animationState, setAnimationState] = React.useState(
<mask> visible ? 'entering' : 'exited'
<mask> );
<mask>
<mask> const prevVisible = React.useRef(visible);
<mask>
<mask> React.useEffect(
<mask> function startEntryTransition() {
</s> fix: performance fixes slide and overlay </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | <mask> );
<mask>
<mask> const prevVisible = React.useRef(visible);
<mask>
<mask> React.useEffect(
<mask> function startEntryTransition() {
<mask> const entryTransition = {
<mask> ...defaultTransitionConfig,
<mask> ...animate?.transition,
<mask> };
<mask>
</s> fix: performance fixes slide and overlay </s> remove const [animationState, setAnimationState] = React.useState(
visible ? 'entering' : 'exited'
);
</s> add const [animationState, setAnimationState] = React.useState(''); </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
}; | <mask> const entryTransition = {
<mask> ...defaultTransitionConfig,
<mask> ...animate?.transition,
<mask> };
<mask>
<mask> const startAnimation = animationState === 'entering' ? 1 : 0;
<mask>
<mask> const transition = startAnimation ? entryTransition : exitTransition;
</s> fix: performance fixes slide and overlay </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { | <mask> ...defaultTransitionConfig,
<mask> ...animate?.transition,
<mask> };
<mask>
<mask> if (visible) {
<mask> Animated.sequence([
<mask> // @ts-ignore - delay is present in defaultTransitionConfig
<mask> Animated.delay(entryTransition.delay),
<mask> Animated[entryTransition.type ?? 'timing'](animateValue, {
<mask> toValue: 1,
<mask> useNativeDriver: true,
<mask> ...entryTransition,
<mask> }),
<mask> ]).start(() => {
<mask> setAnimationState('entered');
<mask> });
<mask> }
<mask> },
<mask> [visible, onTransitionComplete, animateValue, animate]
</s> fix: performance fixes slide and overlay </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove // Exit request
</s> add // if (!visible) { </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
} else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); | <mask> ...entryTransition,
<mask> }),
<mask> ]).start(() => {
<mask> setAnimationState('entered');
<mask> });
<mask> }
<mask> },
<mask> [visible, onTransitionComplete, animateValue, animate]
<mask> );
<mask>
<mask> React.useEffect(() => {
<mask> // Exit request
<mask> if (prevVisible.current !== visible && !visible) {
<mask> setAnimationState('exiting');
</s> fix: performance fixes slide and overlay </s> remove // Exit request
</s> add // if (!visible) { </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// if (!visible) { | <mask> [visible, onTransitionComplete, animateValue, animate]
<mask> );
<mask>
<mask> React.useEffect(() => {
<mask> // Exit request
<mask> if (prevVisible.current !== visible && !visible) {
<mask> setAnimationState('exiting');
<mask> }
<mask> prevVisible.current = visible;
<mask> }, [visible]);
</s> fix: performance fixes slide and overlay </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
if (visible) {
setAnimationState('entering');
} | <mask> if (prevVisible.current !== visible && !visible) {
<mask> setAnimationState('exiting');
<mask> }
<mask> prevVisible.current = visible;
<mask> // }
<mask> }, [visible]);
<mask>
</s> fix: performance fixes slide and overlay </s> remove // Exit request
</s> add // if (!visible) { </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove React.useEffect(
function startEntryTransition() {
</s> add // React.useEffect(() => {
// }, [visible]);
React.useEffect(() => {
if (animationState === 'entering' || animationState === 'exiting') {
// setDisplayState('flex');
// if (animationState === 'entering') {
// setTimeout(() => {
setDisplayState('flex');
// });
// return;
// }
// setTimeout(() => { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// } | <mask> setAnimationState('entering');
<mask> }
<mask> prevVisible.current = visible;
<mask> }, [visible]);
<mask>
<mask> // If exit animation is present and state is exiting, we replace 'initial' with 'exit' animation
<mask>
<mask> // const initialState = { ...defaultStyles, ...initial };
<mask> const initialState =
</s> fix: performance fixes slide and overlay </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
<mask> }
<mask> prevVisible.current = visible;
<mask> }, [visible]);
<mask>
<mask> React.useEffect(
<mask> function startExitTransition() {
<mask> const exitTransition = {
<mask> ...defaultTransitionConfig,
<mask> ...exit?.transition,
<mask> };
<mask>
<mask> if (animationState === 'exiting') {
<mask> Animated.sequence([
<mask> // @ts-ignore - delay is present in defaultTransitionConfig
<mask> Animated.delay(exitTransition.delay),
<mask> Animated[exitTransition.type ?? 'timing'](animateValue, {
<mask> toValue: 0,
<mask> useNativeDriver: true,
<mask> ...exitTransition,
<mask> }),
<mask> ]).start(() => {
<mask> setAnimationState('exited');
<mask> });
<mask> }
<mask> },
<mask> [
<mask> exit,
<mask> onTransitionComplete,
<mask> setAnimationState,
<mask> animationState,
<mask> animateValue,
<mask> ]
<mask> );
<mask>
<mask> // If exit animation is present and state is exiting, we replace 'initial' with 'exit' animation
<mask> initial =
<mask> animationState === 'exiting' && exit
<mask> ? { ...defaultStyles, ...exit }
<mask> : { ...defaultStyles, ...initial };
</s> fix: performance fixes slide and overlay </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx | |
// const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit | <mask> ]
<mask> );
<mask>
<mask> // If exit animation is present and state is exiting, we replace 'initial' with 'exit' animation
<mask> initial =
<mask> animationState === 'exiting' && exit
<mask> ? { ...defaultStyles, ...exit }
<mask> : { ...defaultStyles, ...initial };
<mask>
<mask> animate = { ...defaultStyles, ...animate };
<mask>
</s> fix: performance fixes slide and overlay </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// const initialState = { ...defaultStyles, ...initial };
// initial =
// animationState === 'exited'
// ? { ...defaultStyles, ...exit }
// : { ...defaultStyles, ...initial }; | <mask> const initialState =
<mask> animationState === 'exited' && exit
<mask> ? { ...defaultStyles, ...exit }
<mask> : { ...defaultStyles, ...initial };
<mask>
<mask> const animateState = { ...defaultStyles, ...animate };
<mask>
<mask> // const [initialState, setInitialState] = React.useState({
<mask> // ...defaultStyles,
<mask> // ...initial,
</s> fix: performance fixes slide and overlay </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
const animateState = { ...defaultStyles, ...animate }; | <mask> animationState === 'exiting' && exit
<mask> ? { ...defaultStyles, ...exit }
<mask> : { ...defaultStyles, ...initial };
<mask>
<mask> animate = { ...defaultStyles, ...animate };
<mask>
<mask> const styles = React.useMemo(() => {
<mask> return [
<mask> getAnimatedStyles(animateValue)(
<mask> initial as ISupportedTransitions,
</s> fix: performance fixes slide and overlay </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit </s> remove initial as ISupportedTransitions,
animate as ISupportedTransitions
</s> add initialState as ISupportedTransitions,
animateState as ISupportedTransitions | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// const [initialState, setInitialState] = React.useState({
// ...defaultStyles,
// ...initial,
// });
// console.log('Initial state ', initial);
// const [animateState] = React.useState({ ...defaultStyles, ...animate }); | <mask> const animateState = { ...defaultStyles, ...animate };
<mask>
<mask> const styles = React.useMemo(() => {
<mask> // console.log('display state here', initial);
<mask> return [
<mask> getAnimatedStyles(animateValue)(
<mask> initialState as ISupportedTransitions,
</s> fix: performance fixes slide and overlay </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; </s> remove initial as ISupportedTransitions,
animate as ISupportedTransitions
</s> add initialState as ISupportedTransitions,
animateState as ISupportedTransitions </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// console.log('display state here', initial); | <mask>
<mask> // const [animateState] = React.useState({ ...defaultStyles, ...animate });
<mask> const styles = React.useMemo(() => {
<mask> return [
<mask> getAnimatedStyles(animateValue)(
<mask> initialState as ISupportedTransitions,
<mask> animateState as ISupportedTransitions
<mask> ),
</s> fix: performance fixes slide and overlay </s> remove initial as ISupportedTransitions,
animate as ISupportedTransitions
</s> add initialState as ISupportedTransitions,
animateState as ISupportedTransitions </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
initialState as ISupportedTransitions,
animateState as ISupportedTransitions | <mask>
<mask> const styles = React.useMemo(() => {
<mask> return [
<mask> getAnimatedStyles(animateValue)(
<mask> initial as ISupportedTransitions,
<mask> animate as ISupportedTransitions
<mask> ),
<mask> style,
<mask> ];
<mask> }, [animateValue, initial, animate, style]);
<mask>
</s> fix: performance fixes slide and overlay </s> remove animate = { ...defaultStyles, ...animate };
</s> add const animateState = { ...defaultStyles, ...animate }; </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
<mask> style,
<mask> ];
<mask> }, [animateValue, initial, animate, style]);
<mask>
<mask> React.useEffect(() => {
<mask> if (animationState === 'exited') {
<mask> onTransitionComplete && onTransitionComplete('exited');
<mask> } else if (animationState === 'entered') {
<mask> onTransitionComplete && onTransitionComplete('entered');
<mask> }
<mask> }, [animationState, onTransitionComplete]);
<mask> //TODO: refactor for responsive prop
<mask> if (useHasResponsiveProps(rest)) {
<mask> return null;
<mask> }
<mask>
<mask> return (
<mask> <Component
<mask> pointerEvents="box-none"
<mask> // https://github.com/facebook/react-native/issues/23090#issuecomment-710803743
<mask> needsOffscreenAlphaCompositing
</s> fix: performance fixes slide and overlay </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove const [animationExited, setAnimationExited] = React.useState(!visible);
</s> add // const [animationExited, setAnimationExited] = React.useState(!visible); </s> remove setAnimationExited(false);
</s> add </s> remove initial as ISupportedTransitions,
animate as ISupportedTransitions
</s> add initialState as ISupportedTransitions,
animateState as ISupportedTransitions </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx | |
// pointerEvents="box-none"
pointerEvents={!visible ? 'none' : 'box-none'} | <mask> }
<mask>
<mask> return (
<mask> <Component
<mask> pointerEvents="box-none"
<mask> // https://github.com/facebook/react-native/issues/23090#issuecomment-710803743
<mask> needsOffscreenAlphaCompositing
<mask> style={styles}
<mask> ref={ref}
<mask> {...rest}
</s> fix: performance fixes slide and overlay </s> remove needsOffscreenAlphaCompositing
style={styles}
</s> add // needsOffscreenAlphaCompositing
// style={[styles]}
style={[styles, { display: displayState }]} </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove setAnimationExited(false);
</s> add </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// needsOffscreenAlphaCompositing
// style={[styles]}
style={[styles, { display: displayState }]} | <mask> return (
<mask> <Component
<mask> pointerEvents="box-none"
<mask> // https://github.com/facebook/react-native/issues/23090#issuecomment-710803743
<mask> needsOffscreenAlphaCompositing
<mask> style={styles}
<mask> ref={ref}
<mask> {...rest}
<mask> >
<mask> {children}
<mask> </Component>
</s> fix: performance fixes slide and overlay </s> remove pointerEvents="box-none"
</s> add // pointerEvents="box-none"
pointerEvents={!visible ? 'none' : 'box-none'} </s> remove React.useEffect(() => {
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
}
}, [animationState, onTransitionComplete]);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(rest)) {
return null;
}
</s> add </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
// style={{ }} | <mask> style={[styles, { display: displayState }]}
<mask> ref={ref}
<mask> {...rest}
<mask> >
<mask> {children}
<mask> </Component>
<mask> );
</s> fix: performance fixes slide and overlay </s> remove needsOffscreenAlphaCompositing
style={styles}
</s> add // needsOffscreenAlphaCompositing
// style={[styles]}
style={[styles, { display: displayState }]} </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> </s> remove pointerEvents="box-none"
</s> add // pointerEvents="box-none"
pointerEvents={!visible ? 'none' : 'box-none'} </s> remove setAnimationExited(false);
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/Transition.tsx |
animationExited?: boolean; | <mask> /**
<mask> * Determines whether to start the animation
<mask> */
<mask> visible?: boolean;
<mask> children?: any;
<mask> as?: any;
<mask> }
<mask>
<mask> export interface IPresenceTransitionProps extends ViewProps {
</s> fix: performance fixes slide and overlay </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> </s> remove initial =
animationState === 'exiting' && exit
</s> add // const initialState = { ...defaultStyles, ...initial };
const initialState =
animationState === 'exited' && exit </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/composites/Transitions/types.tsx |
// if (exited && !isOpen) {
// return null;
// } | <mask> enabled: isOpen && isKeyboardDismissable,
<mask> callback: onRequestClose ? onRequestClose : () => {},
<mask> });
<mask>
<mask> if (exited && !isOpen) {
<mask> return null;
<mask> }
<mask>
<mask> // Android handles multiple Modal in RN and is better for accessibility as it shifts accessibility focus on mount, however it may not needed in case of tooltips, toast where one doesn't need to shift accessibility focus
<mask> if (Platform.OS === 'android' && useRNModalOnAndroid) {
<mask> return (
<mask> <ExitAnimationContext.Provider value={{ exited, setExited }}>
</s> fix: performance fixes slide and overlay </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> </s> remove React.useEffect(
function startExitTransition() {
const exitTransition = {
...defaultTransitionConfig,
...exit?.transition,
};
if (animationState === 'exiting') {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(exitTransition.delay),
Animated[exitTransition.type ?? 'timing'](animateValue, {
toValue: 0,
useNativeDriver: true,
...exitTransition,
}),
]).start(() => {
setAnimationState('exited');
});
}
},
[
exit,
onTransitionComplete,
setAnimationState,
animationState,
animateValue,
]
);
</s> add </s> remove if (visible) {
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(entryTransition.delay),
Animated[entryTransition.type ?? 'timing'](animateValue, {
toValue: 1,
useNativeDriver: true,
...entryTransition,
}),
]).start(() => {
</s> add const startAnimation = animationState === 'entering' ? 1 : 0;
const transition = startAnimation ? entryTransition : exitTransition;
// console.log(
// 'Transition state',
// transition,
// animationState,
// defaultTransitionConfig
// );
Animated.sequence([
// @ts-ignore - delay is present in defaultTransitionConfig
Animated.delay(transition.delay),
Animated[transition.type ?? 'timing'](animateValue, {
toValue: startAnimation,
useNativeDriver: true,
...transition,
}),
]).start(() => {
if (animationState === 'entering') { </s> remove if (!visible && animationExited) {
return null;
}
</s> add // if (!visible && animationExited) {
// return null;
// } | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/primitives/Overlay/Overlay.tsx |
// return <> {children}</>; | <mask> );
<mask> }
<mask>
<mask> // Since OverlayContainer mounts children in NativeBaseProvider using Context, we need to pass the context by wrapping children
<mask> return (
<mask> <OverlayContainer
<mask> style={{ display: exited && !isOpen ? 'none' : 'contents' }}
<mask> >
<mask> <ExitAnimationContext.Provider value={{ exited, setExited }}>
</s> fix: performance fixes slide and overlay </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } </s> remove pointerEvents="box-none"
</s> add // pointerEvents="box-none"
pointerEvents={!visible ? 'none' : 'box-none'} </s> remove needsOffscreenAlphaCompositing
style={styles}
</s> add // needsOffscreenAlphaCompositing
// style={[styles]}
style={[styles, { display: displayState }]} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/primitives/Overlay/Overlay.tsx |
<OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> | <mask> }
<mask>
<mask> // Since OverlayContainer mounts children in NativeBaseProvider using Context, we need to pass the context by wrapping children
<mask> return (
<mask> <OverlayContainer>
<mask> <ExitAnimationContext.Provider value={{ exited, setExited }}>
<mask> {children}
<mask> </ExitAnimationContext.Provider>
<mask> </OverlayContainer>
<mask> );
</s> fix: performance fixes slide and overlay </s> remove if (exited && !isOpen) {
return null;
}
</s> add // if (exited && !isOpen) {
// return null;
// } </s> remove needsOffscreenAlphaCompositing
style={styles}
</s> add // needsOffscreenAlphaCompositing
// style={[styles]}
style={[styles, { display: displayState }]} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/primitives/Overlay/Overlay.tsx |
// </Box> | <mask> </ExitAnimationContext.Provider>
<mask> </OverlayContainer>
<mask> );
<mask> }
</s> fix: performance fixes slide and overlay </s> remove <OverlayContainer>
</s> add <OverlayContainer
style={{ display: exited && !isOpen ? 'none' : 'contents' }}
> </s> remove });
}
},
[visible, onTransitionComplete, animateValue, animate]
);
</s> add } else if (animationState === 'exiting') {
setAnimationState('exited');
setTimeout(() => {
setDisplayState('none');
});
}
});
// });
}
if (animationState === 'exited') {
onTransitionComplete && onTransitionComplete('exited');
// setDisplayState('none');
// setInitialState({ ...exit });
} else if (animationState === 'entered') {
onTransitionComplete && onTransitionComplete('entered');
// setInitialState({ ...initial });
}
// if (animationState === 'entering') {
// //
// }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [animationState, onTransitionComplete]); </s> remove const [animationState, setAnimationState] = React.useState(
visible ? 'entering' : 'exited'
);
</s> add const [animationState, setAnimationState] = React.useState(''); </s> remove // Exit request
</s> add // if (!visible) { | [
"keep",
"add",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/08eaabb1a21458c7d7b3464b414f5ccf31d0c662 | src/components/primitives/Overlay/Overlay.tsx |
<Stack
{..._stack}
{...layoutProps}
ref={mergeRefs([_ref, wrapperRef])}
isFocused={isFocused}
> | <mask> return null;
<mask> }
<mask>
<mask> return (
<mask> <Stack {..._stack} {...layoutProps} ref={mergeRefs([_ref, wrapperRef])}>
<mask> {InputLeftElement || leftElement ? InputLeftElement || leftElement : null}
<mask> <StyledInput
<mask> {...inputProps}
<mask> secureTextEntry={type === 'password'}
<mask> accessible
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/components/primitives/Input/Input.tsx |
{
isDisabled: props.isDisabled,
isHovered: props.isHovered,
isFocused: props.isFocused,
isInvalid: props.isInvalid,
isReadOnly: props.isReadOnly,
}, | <mask> ...resolvedProps
<mask> }: any = usePropsResolution(
<mask> 'Stack',
<mask> { ...props, size: space },
<mask> {},
<mask> { resolveResponsively: ['space', 'direction'] }
<mask> );
<mask>
<mask> const responsiveQueryContext = React.useContext(ResponsiveQueryContext);
<mask> const disableCSSMediaQueries = responsiveQueryContext.disableCSSMediaQueries;
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/components/primitives/Stack/Stack.tsx |
<mask> lineHeight: 'lg', // Todo: Move to _web inside size so that sm and xs don't have this much height
<mask> style: { outline: 'none' },
<mask> cursor: 'auto',
<mask> },
<mask> _stack: {
<mask> flexDirection: 'row',
<mask> alignItems: 'center',
<mask> // justifyContent: 'space-between',
<mask> overflow: 'hidden',
<mask> },
<mask> _input: {
<mask> bg: 'transparent',
<mask> flex: 1,
<mask> },
<mask> _light: {
</s> fix: input shift on focus </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts | |
_stack: {
flexDirection: 'row',
alignItems: 'center',
// justifyContent: 'space-between',
overflow: 'hidden',
_focus: {
style: {
outlineWidth: '1px',
outlineColor: 'primary.600',
outlineStyle: 'solid',
},
},
}, | <mask> },
<mask> },
<mask> },
<mask> _dark: {
<mask> placeholderTextColor: 'text.600',
<mask> color: 'text.50',
</s> fix: input shift on focus </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
_stack: {
flexDirection: 'row',
alignItems: 'center',
// justifyContent: 'space-between',
overflow: 'hidden',
_focus: {
style: {
outlineWidth: '3px',
outlineColor: 'primary.500',
outlineStyle: 'solid',
},
},
}, | <mask> _hover: {
<mask> borderColor: 'muted.700',
<mask> },
<mask> },
<mask> },
<mask> };
<mask> };
<mask>
<mask> function roundedStyle(props: Record<string, any>) {
</s> fix: input shift on focus </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove borderWidth: '2',
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
<mask> return {
<mask> borderRadius: 'full',
<mask> borderWidth: '1',
<mask> _focus: {
<mask> borderWidth: '2',
<mask> bg: transparentize('primary.600', 0.1)(theme),
<mask> },
<mask> _invalid: {
<mask> borderWidth: '2',
<mask> },
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts | |
<mask> const { theme } = props;
<mask> return {
<mask> borderWidth: '1',
<mask> _focus: {
<mask> borderWidth: '2',
<mask> bg: transparentize('primary.600', 0.1)(theme),
<mask> },
<mask> _invalid: {
<mask> borderWidth: '2',
<mask> },
</s> fix: input shift on focus </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts | |
borderWidth: '1', | <mask> }
<mask> function filledStyle(props: Record<string, any>) {
<mask> const { theme } = props;
<mask> return {
<mask> borderWidth: '0',
<mask> borderColor: 'transparent',
<mask> _focus: {
<mask> borderWidth: '2',
<mask> bg: transparentize('primary.600', 0.1)(theme),
<mask> },
<mask> _hover: {
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
<mask> return {
<mask> borderWidth: '0',
<mask> borderColor: 'transparent',
<mask> _focus: {
<mask> borderWidth: '2',
<mask> bg: transparentize('primary.600', 0.1)(theme),
<mask> },
<mask> _hover: {
<mask> borderWidth: '1',
<mask> _disabled: {
</s> fix: input shift on focus </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts | |
borderColor: 'muted.100', | <mask> borderWidth: '2',
<mask> },
<mask> _light: {
<mask> bg: 'muted.100',
<mask> },
<mask> _dark: {
<mask> bg: 'muted.800',
<mask> borderColor: 'muted.800',
<mask> },
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
borderColor: 'muted.800', | <mask> _dark: {
<mask> bg: 'muted.800',
<mask> },
<mask> };
<mask> }
<mask> function unstyledStyle() {
</s> fix: input shift on focus </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
_stack: {
_focus: {
style: {
outlineWidth: '0',
},
},
}, | <mask> _focus: {
<mask> bg: 'transparent',
<mask> },
<mask> };
<mask> }
<mask> function underlinedStyle() {
<mask> return {
<mask> borderWidth: '0',
<mask> pl: '0',
</s> fix: input shift on focus </s> remove _focus: {
borderBottomWidth: '2',
fontWeight: '500',
</s> add _stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', </s> remove borderWidth: '2',
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
_stack: {
_focus: {
style: {
outlineWidth: '0',
boxShadow: '0 1px 0 0 #0891B2',
},
}, | <mask> return {
<mask> borderWidth: '0',
<mask> pl: '0',
<mask> borderBottomWidth: '1',
<mask> _focus: {
<mask> borderBottomWidth: '2',
<mask> fontWeight: '500',
<mask> },
<mask> _invalid: {
<mask> borderBottomWidth: '2',
<mask> },
<mask> borderRadius: 0,
</s> fix: input shift on focus </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '2',
</s> add </s> remove borderWidth: '0',
borderColor: 'transparent',
</s> add borderWidth: '1', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/092c0a4aded7e43eb1dca388b7961b47a96dec1d | src/theme/components/input.ts |
import { Pressable } from '../../primitives/Pressable'; | <mask> import React from 'react';
<mask> import { usePropsResolution } from '../../../hooks';
<mask> import { default as IconButton, IIconButtonProps } from '../IconButton';
<mask> import { CloseIcon } from '../../primitives/Icon/Icons';
<mask> import { PopoverContext } from './PopoverContext';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask> import { useHover } from '@react-native-aria/interactions';
<mask> import { mergeRefs } from '../../../utils';
</s> fix: hover and press issue </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; </s> remove const PopoverCloseButton = (
props: Omit<IIconButtonProps, 'icon'>,
ref: any
) => {
</s> add const PopoverCloseButton = (props: IButtonProps, ref: any) => { </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
import type { IButtonProps } from '../../primitives/Button'; | <mask> import { Pressable } from '../../primitives/Pressable';
<mask> import { CloseIcon } from '../../primitives/Icon/Icons';
<mask> import { PopoverContext } from './PopoverContext';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask> import {
<mask> useHover,
<mask> useFocus,
<mask> useIsPressed,
<mask> } from '../../primitives/Pressable/Pressable';
</s> fix: hover and press issue </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); </s> remove const PopoverCloseButton = (
props: Omit<IIconButtonProps, 'icon'>,
ref: any
) => {
</s> add const PopoverCloseButton = (props: IButtonProps, ref: any) => { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; | <mask> import { default as IconButton, IIconButtonProps } from '../IconButton';
<mask> import { CloseIcon } from '../../primitives/Icon/Icons';
<mask> import { PopoverContext } from './PopoverContext';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask> import { useHover } from '@react-native-aria/interactions';
<mask> import { mergeRefs } from '../../../utils';
<mask>
<mask> const PopoverCloseButton = (
<mask> props: Omit<IIconButtonProps, 'icon'>,
<mask> ref: any
<mask> ) => {
</s> fix: hover and press issue </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; </s> remove const PopoverCloseButton = (
props: Omit<IIconButtonProps, 'icon'>,
ref: any
) => {
</s> add const PopoverCloseButton = (props: IButtonProps, ref: any) => { </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
const PopoverCloseButton = (props: IButtonProps, ref: any) => { | <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask> import { useHover } from '@react-native-aria/interactions';
<mask> import { mergeRefs } from '../../../utils';
<mask>
<mask> const PopoverCloseButton = (
<mask> props: Omit<IIconButtonProps, 'icon'>,
<mask> ref: any
<mask> ) => {
<mask> const { onClose }: any = React.useContext(PopoverContext);
<mask> const _ref = React.useRef(null);
<mask>
<mask> const { isHovered } = useHover({}, _ref);
<mask>
</s> fix: hover and press issue </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); | <mask> props: Omit<IIconButtonProps, 'icon'>,
<mask> ref: any
<mask> ) => {
<mask> const { onClose }: any = React.useContext(PopoverContext);
<mask> const _ref = React.useRef(null);
<mask>
<mask> const { isHovered } = useHover({}, _ref);
<mask>
<mask> const { _icon, ...resolvedPorps } = usePropsResolution(
<mask> 'PopoverCloseButton',
</s> fix: hover and press issue </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); </s> remove const PopoverCloseButton = (
props: Omit<IIconButtonProps, 'icon'>,
ref: any
) => {
</s> add const PopoverCloseButton = (props: IButtonProps, ref: any) => { </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); | <mask> ) => {
<mask> const { onClose }: any = React.useContext(PopoverContext);
<mask> const _ref = React.useRef(null);
<mask>
<mask> const { isHovered } = useHover({}, _ref);
<mask>
<mask> const { _icon, ...resolvedPorps } = usePropsResolution(
<mask> 'PopoverCloseButton',
<mask> props,
<mask> { isHovered }
<mask> );
<mask> //TODO: refactor for responsive prop
<mask> if (useHasResponsiveProps(props)) {
<mask> return null;
<mask> }
<mask> return (
</s> fix: hover and press issue </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); </s> remove const PopoverCloseButton = (
props: Omit<IIconButtonProps, 'icon'>,
ref: any
) => {
</s> add const PopoverCloseButton = (props: IButtonProps, ref: any) => { </s> remove <IconButton
ref={mergeRefs([ref, _ref])}
{...resolvedPorps}
icon={<CloseIcon {..._icon} />}
</s> add <Pressable
accessibilityRole="button"
ref={ref}
onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)}
onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)}
// @ts-ignore - web only
onHoverIn={composeEventHandlers(onHoverIn, hoverProps.onHoverIn)}
// @ts-ignore - web only
onHoverOut={composeEventHandlers(onHoverOut, hoverProps.onHoverOut)}
// @ts-ignore - web only
onFocus={composeEventHandlers(
composeEventHandlers(onFocus, focusProps.onFocus),
focusRingProps.onFocus
)}
// @ts-ignore - web only
onBlur={composeEventHandlers(
composeEventHandlers(onBlur, focusProps.onBlur),
focusRingProps.onBlur
)} </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
<Pressable
accessibilityRole="button"
ref={ref}
onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)}
onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)}
// @ts-ignore - web only
onHoverIn={composeEventHandlers(onHoverIn, hoverProps.onHoverIn)}
// @ts-ignore - web only
onHoverOut={composeEventHandlers(onHoverOut, hoverProps.onHoverOut)}
// @ts-ignore - web only
onFocus={composeEventHandlers(
composeEventHandlers(onFocus, focusProps.onFocus),
focusRingProps.onFocus
)}
// @ts-ignore - web only
onBlur={composeEventHandlers(
composeEventHandlers(onBlur, focusProps.onBlur),
focusRingProps.onBlur
)} | <mask> if (useHasResponsiveProps(props)) {
<mask> return null;
<mask> }
<mask> return (
<mask> <IconButton
<mask> ref={mergeRefs([ref, _ref])}
<mask> {...resolvedPorps}
<mask> icon={<CloseIcon {..._icon} />}
<mask> onPress={onClose}
<mask> />
<mask> );
<mask> };
<mask>
</s> fix: hover and press issue </s> remove />
</s> add {...resolvedProps}
>
<CloseIcon {..._icon} />
</Pressable> </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
{...resolvedProps}
>
<CloseIcon {..._icon} />
</Pressable> | <mask> ref={mergeRefs([ref, _ref])}
<mask> {...resolvedPorps}
<mask> icon={<CloseIcon {..._icon} />}
<mask> onPress={onClose}
<mask> />
<mask> );
<mask> };
<mask>
<mask> export default React.memo(React.forwardRef(PopoverCloseButton));
</s> fix: hover and press issue </s> remove <IconButton
ref={mergeRefs([ref, _ref])}
{...resolvedPorps}
icon={<CloseIcon {..._icon} />}
</s> add <Pressable
accessibilityRole="button"
ref={ref}
onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)}
onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)}
// @ts-ignore - web only
onHoverIn={composeEventHandlers(onHoverIn, hoverProps.onHoverIn)}
// @ts-ignore - web only
onHoverOut={composeEventHandlers(onHoverOut, hoverProps.onHoverOut)}
// @ts-ignore - web only
onFocus={composeEventHandlers(
composeEventHandlers(onFocus, focusProps.onFocus),
focusRingProps.onFocus
)}
// @ts-ignore - web only
onBlur={composeEventHandlers(
composeEventHandlers(onBlur, focusProps.onBlur),
focusRingProps.onBlur
)} </s> remove import { default as IconButton, IIconButtonProps } from '../IconButton';
</s> add import { Pressable } from '../../primitives/Pressable'; </s> remove const { isHovered } = useHover({}, _ref);
const { _icon, ...resolvedPorps } = usePropsResolution(
'PopoverCloseButton',
props,
{ isHovered }
);
</s> add const {
_icon,
onPressIn,
onPressOut,
onHoverIn,
onHoverOut,
onFocus,
onBlur,
...resolvedProps
} = usePropsResolution('PopoverCloseButton', props, {
isHovered,
isPressed,
isFocused,
isFocusVisible,
}); </s> remove import { useHover } from '@react-native-aria/interactions';
import { mergeRefs } from '../../../utils';
</s> add import {
useHover,
useFocus,
useIsPressed,
} from '../../primitives/Pressable/Pressable';
import { composeEventHandlers } from '../../../utils';
import { useFocusRing } from '@react-native-aria/focus'; </s> remove const _ref = React.useRef(null);
</s> add const { hoverProps, isHovered } = useHover();
const { pressableProps, isPressed } = useIsPressed();
const { focusProps, isFocused } = useFocus();
const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0993690c3572858dabfe073d38529e2d2d476105 | src/components/composites/Popover/PopoverCloseButton.tsx |
import { Heading, VStack, NativeBaseProvider, extendTheme } from 'native-base'; | <mask> import React from 'react';
<mask> import { Heading, VStack } from 'native-base';
<mask>
<mask> export default function () {
<mask> return (
<mask> <VStack>
<mask> <Heading> I'm a Heading</Heading>
</s> fix: updated custom theme examples </s> remove <VStack>
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</s> add <NativeBaseProvider theme={theme}>
<VStack flex={1} justifyContent="center" alignItems="center">
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</NativeBaseProvider> </s> remove import Wrapper from './../../components/Wrapper';
</s> add </s> remove import { extendTheme } from 'native-base';
const theme = extendTheme({
colors: {
custom: {
100: '#f7c',
200: '#faa',
300: '#1ac',
},
},
components: {
Heading: {
baseStyle: {
color: 'custom.100',
},
},
},
});
</s> add import CustomizingTheme from './CustomizingTheme';
import CustomizingComponents from './CustomizingComponents'; </s> remove .addDecorator((getStory: any) => (
<Wrapper theme={theme}>{getStory()}</Wrapper>
))
.add('Basic', () => <Basic />);
</s> add .addDecorator((getStory: any) => getStory())
.add('Basic', () => <Basic />)
.add('CustomizingTheme', () => <CustomizingTheme />)
.add('CustomizingComponents', () => <CustomizingComponents />); | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09de3b6b76ddb3b50e63c38770ff5ee50cf89233 | example/storybook/stories/theme/Custom/Basic.tsx |
<NativeBaseProvider theme={theme}>
<VStack flex={1} justifyContent="center" alignItems="center">
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</NativeBaseProvider> | <mask> import { Heading, VStack } from 'native-base';
<mask>
<mask> export default function () {
<mask> return (
<mask> <VStack>
<mask> <Heading> I'm a Heading</Heading>
<mask> <Heading color="custom.300"> I'm a Heading</Heading>
<mask> </VStack>
<mask> );
<mask> }
</s> fix: updated custom theme examples </s> remove import { Heading, VStack } from 'native-base';
</s> add import { Heading, VStack, NativeBaseProvider, extendTheme } from 'native-base'; </s> remove import Wrapper from './../../components/Wrapper';
</s> add </s> remove import { extendTheme } from 'native-base';
const theme = extendTheme({
colors: {
custom: {
100: '#f7c',
200: '#faa',
300: '#1ac',
},
},
components: {
Heading: {
baseStyle: {
color: 'custom.100',
},
},
},
});
</s> add import CustomizingTheme from './CustomizingTheme';
import CustomizingComponents from './CustomizingComponents'; </s> remove .addDecorator((getStory: any) => (
<Wrapper theme={theme}>{getStory()}</Wrapper>
))
.add('Basic', () => <Basic />);
</s> add .addDecorator((getStory: any) => getStory())
.add('Basic', () => <Basic />)
.add('CustomizingTheme', () => <CustomizingTheme />)
.add('CustomizingComponents', () => <CustomizingComponents />); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09de3b6b76ddb3b50e63c38770ff5ee50cf89233 | example/storybook/stories/theme/Custom/Basic.tsx |
<mask> import React from 'react';
<mask> import { storiesOf } from '@storybook/react-native';
<mask> import { withKnobs } from '@storybook/addon-knobs';
<mask> import Wrapper from './../../components/Wrapper';
<mask> import Basic from './Basic';
<mask> import { extendTheme } from 'native-base';
<mask>
<mask> const theme = extendTheme({
<mask> colors: {
</s> fix: updated custom theme examples </s> remove import { extendTheme } from 'native-base';
const theme = extendTheme({
colors: {
custom: {
100: '#f7c',
200: '#faa',
300: '#1ac',
},
},
components: {
Heading: {
baseStyle: {
color: 'custom.100',
},
},
},
});
</s> add import CustomizingTheme from './CustomizingTheme';
import CustomizingComponents from './CustomizingComponents'; </s> remove import { Heading, VStack } from 'native-base';
</s> add import { Heading, VStack, NativeBaseProvider, extendTheme } from 'native-base'; </s> remove <VStack>
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</s> add <NativeBaseProvider theme={theme}>
<VStack flex={1} justifyContent="center" alignItems="center">
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</NativeBaseProvider> </s> remove .addDecorator((getStory: any) => (
<Wrapper theme={theme}>{getStory()}</Wrapper>
))
.add('Basic', () => <Basic />);
</s> add .addDecorator((getStory: any) => getStory())
.add('Basic', () => <Basic />)
.add('CustomizingTheme', () => <CustomizingTheme />)
.add('CustomizingComponents', () => <CustomizingComponents />); | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09de3b6b76ddb3b50e63c38770ff5ee50cf89233 | example/storybook/stories/theme/Custom/index.tsx | |
import CustomizingTheme from './CustomizingTheme';
import CustomizingComponents from './CustomizingComponents'; | <mask> import { storiesOf } from '@storybook/react-native';
<mask> import { withKnobs } from '@storybook/addon-knobs';
<mask> import Wrapper from './../../components/Wrapper';
<mask> import Basic from './Basic';
<mask> import { extendTheme } from 'native-base';
<mask>
<mask> const theme = extendTheme({
<mask> colors: {
<mask> custom: {
<mask> 100: '#f7c',
<mask> 200: '#faa',
<mask> 300: '#1ac',
<mask> },
<mask> },
<mask> components: {
<mask> Heading: {
<mask> baseStyle: {
<mask> color: 'custom.100',
<mask> },
<mask> },
<mask> },
<mask> });
<mask>
<mask> storiesOf('Custom Theme', module)
<mask> .addDecorator(withKnobs)
<mask> .addDecorator((getStory: any) => (
<mask> <Wrapper theme={theme}>{getStory()}</Wrapper>
</s> fix: updated custom theme examples </s> remove import Wrapper from './../../components/Wrapper';
</s> add </s> remove import { Heading, VStack } from 'native-base';
</s> add import { Heading, VStack, NativeBaseProvider, extendTheme } from 'native-base'; </s> remove .addDecorator((getStory: any) => (
<Wrapper theme={theme}>{getStory()}</Wrapper>
))
.add('Basic', () => <Basic />);
</s> add .addDecorator((getStory: any) => getStory())
.add('Basic', () => <Basic />)
.add('CustomizingTheme', () => <CustomizingTheme />)
.add('CustomizingComponents', () => <CustomizingComponents />); </s> remove <VStack>
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</s> add <NativeBaseProvider theme={theme}>
<VStack flex={1} justifyContent="center" alignItems="center">
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</NativeBaseProvider> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"k... | https://github.com/GeekyAnts/NativeBase/commit/09de3b6b76ddb3b50e63c38770ff5ee50cf89233 | example/storybook/stories/theme/Custom/index.tsx |
.addDecorator((getStory: any) => getStory())
.add('Basic', () => <Basic />)
.add('CustomizingTheme', () => <CustomizingTheme />)
.add('CustomizingComponents', () => <CustomizingComponents />); | <mask> });
<mask>
<mask> storiesOf('Custom Theme', module)
<mask> .addDecorator(withKnobs)
<mask> .addDecorator((getStory: any) => (
<mask> <Wrapper theme={theme}>{getStory()}</Wrapper>
<mask> ))
<mask> .add('Basic', () => <Basic />);
</s> fix: updated custom theme examples </s> remove import { extendTheme } from 'native-base';
const theme = extendTheme({
colors: {
custom: {
100: '#f7c',
200: '#faa',
300: '#1ac',
},
},
components: {
Heading: {
baseStyle: {
color: 'custom.100',
},
},
},
});
</s> add import CustomizingTheme from './CustomizingTheme';
import CustomizingComponents from './CustomizingComponents'; </s> remove import { Heading, VStack } from 'native-base';
</s> add import { Heading, VStack, NativeBaseProvider, extendTheme } from 'native-base'; </s> remove <VStack>
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</s> add <NativeBaseProvider theme={theme}>
<VStack flex={1} justifyContent="center" alignItems="center">
<Heading> I'm a Heading</Heading>
<Heading color="custom.300"> I'm a Heading</Heading>
</VStack>
</NativeBaseProvider> </s> remove import Wrapper from './../../components/Wrapper';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace"
] | https://github.com/GeekyAnts/NativeBase/commit/09de3b6b76ddb3b50e63c38770ff5ee50cf89233 | example/storybook/stories/theme/Custom/index.tsx |
brandLight: '#a9a9a9', | <mask> brandSuccess: '#5cb85c',
<mask> brandDanger: '#d9534f',
<mask> brandWarning: '#f0ad4e',
<mask> brandDark: '#000',
<mask> brandLight: '#f4f4f4',
<mask>
<mask> // Container
<mask> containerBgColor: '#fff',
<mask>
<mask> // Date Picker
</s> bug fix 3071 (#3089)
Co-authored-by: Hany Kumar <hanykumar@Hanys-Air.blr-office.geekyants.com> </s> remove brandLight: '#f4f4f4',
</s> add brandLight: '#a9a9a9', </s> remove brandLight: '#f4f4f4',
</s> add brandLight: '#a9a9a9', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09e90958291086e7846e5942c644ff89f04815a5 | src/theme/variables/commonColor.js |
brandLight: '#a9a9a9', | <mask> brandSuccess: '#5cb85c',
<mask> brandDanger: '#d9534f',
<mask> brandWarning: '#f0ad4e',
<mask> brandDark: '#000',
<mask> brandLight: '#f4f4f4',
<mask>
<mask> // Container
<mask> containerBgColor: '#fff',
<mask>
<mask> // Date Picker
</s> bug fix 3071 (#3089)
Co-authored-by: Hany Kumar <hanykumar@Hanys-Air.blr-office.geekyants.com> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09e90958291086e7846e5942c644ff89f04815a5 | src/theme/variables/material.js |
brandLight: '#a9a9a9', | <mask> brandSuccess: '#5cb85c',
<mask> brandDanger: '#d9534f',
<mask> brandWarning: '#f0ad4e',
<mask> brandDark: '#000',
<mask> brandLight: '#f4f4f4',
<mask>
<mask> // Container
<mask> containerBgColor: '#fff',
<mask>
<mask> // Date Picker
</s> bug fix 3071 (#3089)
Co-authored-by: Hany Kumar <hanykumar@Hanys-Air.blr-office.geekyants.com> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/09e90958291086e7846e5942c644ff89f04815a5 | src/theme/variables/platform.js |
import Select from './Select';
import Textarea from './Textarea'; | <mask> import Invalid from './Invalid';
<mask> import WithIcon from './WithIcon';
<mask> import Basic from './Basic';
<mask>
<mask> storiesOf('TextField', module)
<mask> .addDecorator(withKnobs)
<mask> .addDecorator((getStory: any) => <Wrapper>{getStory()}</Wrapper>)
</s> feat: added support for component prop to provide select and textarea </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | example/storybook/stories/components/composites/TextField/index.tsx |
.add('Textarea', () => <Textarea />)
.add('Select', () => <Select />) | <mask> .addDecorator((getStory: any) => <Wrapper>{getStory()}</Wrapper>)
<mask> .add('Basic', () => <Basic />)
<mask> .add('WithIcon', () => <WithIcon />)
<mask> .add('Invalid', () => <Invalid />);
</s> feat: added support for component prop to provide select and textarea </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
</s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', | [
"keep",
"add",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | example/storybook/stories/components/composites/TextField/index.tsx |
import Select from '../../primitives/Select';
import TextArea from '../../primitives/TextArea'; | <mask> import { Stack } from '../../primitives/Stack';
<mask> import { Input } from '../../primitives/Input';
<mask> import Text from '../../primitives/Text';
<mask> import { extractInObject, stylingProps } from '../../../theme/tools/utils';
<mask>
<mask> const TextField = (mainProps: ITextFieldProps, ref?: any) => {
<mask> //TODO: Remove `any`
<mask> const {
<mask> children,
</s> feat: added support for component prop to provide select and textarea </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, | <mask> import { Input } from '../../primitives/Input';
<mask> import Text from '../../primitives/Text';
<mask> import { extractInObject, stylingProps } from '../../../theme/tools/utils';
<mask>
<mask> const TextField = (
<mask> {
<mask> helperText,
<mask> errorMessage,
<mask> InputLeftElement,
<mask> InputRightElement,
<mask> ...props
</s> feat: added support for component prop to provide select and textarea </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
</s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
dropdownIcon, | <mask> errorMessage,
<mask> InputLeftElement,
<mask> InputRightElement,
<mask> ...props
<mask> }: any = mainProps;
<mask>
<mask> const { divider, ...themedProps } = useThemeProps('TextField', props);
<mask>
</s> feat: added support for component prop to provide select and textarea </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
</s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
}: any = mainProps;
| <mask> errorMessage,
<mask> InputLeftElement,
<mask> InputRightElement,
<mask> ...props
<mask> }: ITextFieldProps,
<mask> ref?: any
<mask> ) => {
<mask> // NOTE:
<mask> const { divider, ...themedProps } = useThemeProps('TextField', props);
<mask>
<mask> // usePlatformProps is merging Platform specific props to themedProps
<mask> const {
<mask> _errorMessageProps,
</s> feat: added support for component prop to provide select and textarea </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
component, | <mask> // usePlatformProps is merging Platform specific props to themedProps
<mask> const {
<mask> _errorMessageProps,
<mask> _helperTextProps,
<mask> ...platformProps
<mask> } = usePlatformProps(themedProps);
<mask>
<mask> const [layoutProps, componentProps] = extractInObject(platformProps, [
<mask> 'space',
</s> feat: added support for component prop to provide select and textarea </s> remove const [layoutProps, inputProps] = extractInObject(platformProps, [
</s> add const [layoutProps, componentProps] = extractInObject(platformProps, [ </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
</s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
const [layoutProps, componentProps] = extractInObject(platformProps, [ | <mask> _helperTextProps,
<mask> ...platformProps
<mask> } = usePlatformProps(themedProps);
<mask>
<mask> const [layoutProps, inputProps] = extractInObject(platformProps, [
<mask> 'space',
<mask> 'reversed',
<mask> ...stylingProps.margin,
<mask> ...stylingProps.layout,
<mask> ...stylingProps.flexbox,
</s> feat: added support for component prop to provide select and textarea </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
{activeComponent()}
{componentProps.isInvalid && ( | <mask> ]);
<mask>
<mask> return (
<mask> <Stack divider={divider} {...layoutProps}>
<mask> <Input
<mask> InputLeftElement={InputLeftElement}
<mask> InputRightElement={InputRightElement}
<mask> {...inputProps}
<mask> ref={ref}
<mask> />
<mask> {inputProps.isInvalid && (
<mask> <Text {..._errorMessageProps}>{errorMessage}</Text>
<mask> )}
<mask> {!inputProps.isInvalid && <Text {..._helperTextProps}>{helperText}</Text>}
<mask> </Stack>
<mask> );
</s> feat: added support for component prop to provide select and textarea </s> remove {!inputProps.isInvalid && <Text {..._helperTextProps}>{helperText}</Text>}
</s> add {!componentProps.isInvalid && (
<Text {..._helperTextProps}>{helperText}</Text>
)} </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', </s> remove defaultProps: {},
</s> add </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
{!componentProps.isInvalid && (
<Text {..._helperTextProps}>{helperText}</Text>
)} | <mask> />
<mask> {inputProps.isInvalid && (
<mask> <Text {..._errorMessageProps}>{errorMessage}</Text>
<mask> )}
<mask> {!inputProps.isInvalid && <Text {..._helperTextProps}>{helperText}</Text>}
<mask> </Stack>
<mask> );
<mask> };
<mask>
<mask> export default React.memo(React.forwardRef(TextField));
</s> feat: added support for component prop to provide select and textarea </s> remove <Input
InputLeftElement={InputLeftElement}
InputRightElement={InputRightElement}
{...inputProps}
ref={ref}
/>
{inputProps.isInvalid && (
</s> add {activeComponent()}
{componentProps.isInvalid && ( </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', </s> remove defaultProps: {},
</s> add </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/TextField.tsx |
import type { ISelectProps } from '../../primitives/Select';
import type { ITextAreaProps } from '../../primitives/TextArea'; | <mask> import type { IInputProps } from '../../primitives/Input';
<mask> import type { IStackProps } from '../../primitives/Stack';
<mask>
<mask> type componentsSpecificProps =
<mask> | ({ component?: 'input' } & IInputProps)
<mask> | ({ component?: 'textarea' } & ITextAreaProps)
<mask> | ({ component?: 'select' } & ISelectProps);
<mask>
</s> feat: added support for component prop to provide select and textarea </s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/types.tsx |
type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | <mask> import type { IInputProps } from '../../primitives/Input';
<mask> import type { IStackProps } from '../../primitives/Stack';
<mask>
<mask> export type ITextFieldProps = IInputProps &
<mask> IStackProps & {
<mask> helperText?: string;
<mask> errorMessage?: string;
<mask> _helperTextProps?: any;
<mask> _errorMessageProps?: any;
</s> feat: added support for component prop to provide select and textarea </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove baseStyle: (props: Record<string, any>) => {
return {
_errorMessageProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: 'error.400',
},
_helperTextProps: {
mt: 1,
ml: 3,
fontSize: 'xs',
color: mode('muted.400', 'muted.500')(props),
},
};
</s> add baseStyle,
defaultProps: {
component: 'input', </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
| [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/components/composites/TextField/types.tsx |
baseStyle,
defaultProps: {
component: 'input', | <mask> import { mode } from '../tools';
<mask>
<mask> // TextField
<mask> export const TextField = {
<mask> baseStyle: (props: Record<string, any>) => {
<mask> return {
<mask> _errorMessageProps: {
<mask> mt: 1,
<mask> ml: 3,
<mask> fontSize: 'xs',
<mask> color: 'error.400',
<mask> },
<mask> _helperTextProps: {
<mask> mt: 1,
<mask> ml: 3,
<mask> fontSize: 'xs',
<mask> color: mode('muted.400', 'muted.500')(props),
<mask> },
<mask> };
<mask> },
<mask> defaultProps: {},
<mask> };
</s> feat: added support for component prop to provide select and textarea </s> remove defaultProps: {},
</s> add </s> remove const TextField = (
{
</s> add const TextField = (mainProps: ITextFieldProps, ref?: any) => {
//TODO: Remove `any`
const {
children, </s> remove }: ITextFieldProps,
ref?: any
) => {
// NOTE:
</s> add }: any = mainProps;
</s> remove export type ITextFieldProps = IInputProps &
</s> add type componentsSpecificProps =
| ({ component?: 'input' } & IInputProps)
| ({ component?: 'textarea' } & ITextAreaProps)
| ({ component?: 'select' } & ISelectProps);
export type ITextFieldProps = componentsSpecificProps & | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0a8486af075a289ddda35bebe4225483ebc97941 | src/theme/components/textField.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.