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
<mask> const colorModeProps = useColorMode(); <mask> <mask> const componentTheme = get(theme, `components.${component}`, {}); <mask> <mask> // const windowWidth = useWindowDimensions()?.width; <mask> // const currentBreakpoint = React.useMemo( <mask> // () => getClosestBreakpoint(theme.breakpoints, windowWidth), <mask> // [windowWidth, theme.breakpoints] <mask> // ); <mask> <mask> // STEP 1: combine default props and incoming props <mask> <mask> const incomingWithDefaultProps = merge( <mask> {}, <mask> componentTheme.defaultProps || {}, </s> fix: fixed spread props in prop resolution </s> remove flattenSizeStyle; </s> add flattenSizeStyle, sizeSpecificityMap; </s> remove flattenProps = overrideDefaultProps(flattenProps, defaultStyles); </s> add flattenProps = propsSpreader(defaultStyles, defaultSpecificity); </s> remove const compareSpecificity = ( </s> add export const compareSpecificity = (
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
flattenSizeStyle, sizeSpecificityMap;
<mask> <mask> const size = flattenProps.size; <mask> <mask> let componentSizeProps = {}, <mask> flattenSizeStyle; <mask> // Extracting props from size <mask> if (size && componentTheme.sizes && componentTheme.sizes[size]) { <mask> // Type - sizes: {lg: 1}. Refer icon theme <mask> if ( <mask> typeof componentTheme.sizes[size] === 'string' || </s> fix: fixed spread props in prop resolution </s> remove // const windowWidth = useWindowDimensions()?.width; // const currentBreakpoint = React.useMemo( // () => getClosestBreakpoint(theme.breakpoints, windowWidth), // [windowWidth, theme.breakpoints] // ); </s> add </s> remove flattenProps = overrideDefaultProps(flattenProps, defaultStyles); </s> add flattenProps = propsSpreader(defaultStyles, defaultSpecificity); </s> remove [flattenSizeStyle] = propsFlattener( </s> add [flattenSizeStyle, sizeSpecificityMap] = propsFlattener(
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
[flattenSizeStyle, sizeSpecificityMap] = propsFlattener(
<mask> flattenProps.size = undefined; <mask> componentSizeProps = componentTheme.sizes[size]; <mask> } <mask> <mask> [flattenSizeStyle] = propsFlattener( <mask> { <mask> props: componentSizeProps, <mask> platform: Platform.OS, <mask> colormode: colorModeProps.colorMode, <mask> state: state || {}, </s> fix: fixed spread props in prop resolution </s> remove flattenSizeStyle; </s> add flattenSizeStyle, sizeSpecificityMap; </s> remove // const windowWidth = useWindowDimensions()?.width; // const currentBreakpoint = React.useMemo( // () => getClosestBreakpoint(theme.breakpoints, windowWidth), // [windowWidth, theme.breakpoints] // ); </s> add </s> remove delete flattenedDefaultProps[prop]; specificityMaps[prop].forEach((newProp: string) => { flattenedDefaultProps[newProp] = val; </s> add if (!FINAL_SPREAD_PROPS.includes(prop)) delete flattenedDefaultProps[prop]; specificity[prop] = incomingSpecifity[prop]; SPREAD_PROP_SPECIFICITY_MAP[prop].forEach((newProp: string) => { if (compareSpecificity(specificity[newProp], specificity[prop])) { specificity[newProp] = incomingSpecifity[prop]; flattenedDefaultProps[newProp] = val; } </s> remove const specificityMaps: any = { ...paddingMap, ...marginMap, </s> add const SPREAD_PROP_SPECIFICITY_MAP: any = { ...PADDING_MAP, ...MARGIN_MAP,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
{}, flattenProps,
<mask> <mask> // // STEP 4: merge <mask> const defaultStyles = merge( <mask> flattenBaseStyle, <mask> flattenVariantStyle, <mask> flattenSizeStyle <mask> ); <mask> const defaultSpecificity = merge( <mask> {}, </s> fix: fixed spread props in prop resolution </s> remove // const windowWidth = useWindowDimensions()?.width; // const currentBreakpoint = React.useMemo( // () => getClosestBreakpoint(theme.breakpoints, windowWidth), // [windowWidth, theme.breakpoints] // ); </s> add </s> remove flattenProps = overrideDefaultProps(flattenProps, defaultStyles); </s> add flattenProps = propsSpreader(defaultStyles, defaultSpecificity); </s> remove flattenSizeStyle; </s> add flattenSizeStyle, sizeSpecificityMap; </s> remove const compareSpecificity = ( </s> add export const compareSpecificity = (
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
const defaultSpecificity = merge( {}, specificityMap, baseSpecificityMap, variantSpecificityMap, sizeSpecificityMap );
<mask> flattenVariantStyle, <mask> flattenSizeStyle <mask> ); <mask> <mask> flattenProps = propsSpreader(defaultStyles, defaultSpecificity); <mask> <mask> // // STEP 5: linear Grad and contrastText <mask> let ignore: any = []; </s> fix: fixed spread props in prop resolution </s> remove flattenProps = overrideDefaultProps(flattenProps, defaultStyles); </s> add flattenProps = propsSpreader(defaultStyles, defaultSpecificity); </s> remove // const windowWidth = useWindowDimensions()?.width; // const currentBreakpoint = React.useMemo( // () => getClosestBreakpoint(theme.breakpoints, windowWidth), // [windowWidth, theme.breakpoints] // ); </s> add </s> remove flattenSizeStyle; </s> add flattenSizeStyle, sizeSpecificityMap; </s> remove const compareSpecificity = ( </s> add export const compareSpecificity = (
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
flattenProps = propsSpreader(defaultStyles, defaultSpecificity);
<mask> flattenVariantStyle, <mask> flattenSizeStyle <mask> ); <mask> <mask> flattenProps = overrideDefaultProps(flattenProps, defaultStyles); <mask> <mask> // // STEP 5: linear Grad and contrastText <mask> let ignore: any = []; <mask> if ( <mask> flattenProps.bg?.linearGradient || </s> fix: fixed spread props in prop resolution </s> remove // const windowWidth = useWindowDimensions()?.width; // const currentBreakpoint = React.useMemo( // () => getClosestBreakpoint(theme.breakpoints, windowWidth), // [windowWidth, theme.breakpoints] // ); </s> add </s> remove flattenSizeStyle; </s> add flattenSizeStyle, sizeSpecificityMap; </s> remove [SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, </s> add ...INITIAL_PROP_SPECIFICITY,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/484ce923c0e2b1513f1e9a899ffa735b7a57958c
src/hooks/useThemeProps/usePropsResolution.tsx
<mask> import React, { memo, forwardRef } from 'react'; <mask> import { View } from 'react-native'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import Text from './../Text'; <mask> import { makeStyledComponent } from '../../../utils/styled'; <mask> import type { IBoxProps } from './types'; <mask> import { useSafeArea } from '../../../hooks/useSafeArea'; <mask> import { useNativeBaseConfig } from '../../../core/NativeBaseContext'; <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack'; </s> remove import type { IBoxProps } from '../../primitives'; </s> add import type { IStackProps } from '../../primitives/Stack'; import type { IBoxProps } from '../../primitives/Box/types';
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
import { wrapStringChild } from '../../../utils/wrapStringChild';
<mask> import React, { memo, forwardRef } from 'react'; <mask> import { View } from 'react-native'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { makeStyledComponent } from '../../../utils/styled'; <mask> import type { IBoxProps } from './types'; <mask> import { useSafeArea } from '../../../hooks/useSafeArea'; <mask> import { useNativeBaseConfig } from '../../../core/NativeBaseContext'; <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; <mask> </s> fix: api update for Radio </s> remove import Text from './../Text'; </s> add </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack'; </s> remove import type { IBoxProps } from '../../primitives'; </s> add import type { IStackProps } from '../../primitives/Stack'; import type { IBoxProps } from '../../primitives/Box/types';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
{/* {React.Children.map(children, (child) =>
<mask> start={startObj} <mask> end={endObj} <mask> locations={lgrad.locations} <mask> > <mask> {React.Children.map(children, (child) => <mask> typeof child === 'string' || typeof child === 'number' ? ( <mask> <Text {..._text}>{child}</Text> <mask> ) : ( <mask> child <mask> ) </s> fix: api update for Radio </s> remove {React.Children.map(children, (child) => { </s> add {/* {React.Children.map(children, (child) => { </s> remove )} </s> add )} */} {wrapStringChild(children, _text)} </s> remove })} </s> add })} */} {wrapStringChild(children, _text)} </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
)} */} {wrapStringChild(children, _text)}
<mask> <Text {..._text}>{child}</Text> <mask> ) : ( <mask> child <mask> ) <mask> )} <mask> </Gradient> <mask> ); <mask> } <mask> } <mask> return ( </s> fix: api update for Radio </s> remove })} </s> add })} */} {wrapStringChild(children, _text)} </s> remove {React.Children.map(children, (child) => </s> add {/* {React.Children.map(children, (child) => </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove {children} </Center> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
{/* {React.Children.map(children, (child) => {
<mask> } <mask> } <mask> return ( <mask> <StyledBox ref={ref} {...safeAreaProps}> <mask> {React.Children.map(children, (child) => { <mask> return typeof child === 'string' || <mask> typeof child === 'number' || <mask> (child?.type === React.Fragment && <mask> (typeof child.props?.children === 'string' || <mask> typeof child.props?.children === 'number')) ? ( </s> fix: api update for Radio </s> remove {React.Children.map(children, (child) => </s> add {/* {React.Children.map(children, (child) => </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add </s> remove )} </s> add )} */} {wrapStringChild(children, _text)} </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove // return null; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
})} */} {wrapStringChild(children, _text)}
<mask> <Text {..._text}>{child}</Text> <mask> ) : ( <mask> child <mask> ); <mask> })} <mask> </StyledBox> <mask> ); <mask> }; <mask> <mask> export type { IBoxProps }; </s> fix: api update for Radio </s> remove )} </s> add )} */} {wrapStringChild(children, _text)} </s> remove {React.Children.map(children, (child) => </s> add {/* {React.Children.map(children, (child) => </s> remove <Box ref={ref}> <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> </RadioContext.Provider> </Box> </s> add <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider> </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10, </s> remove import type { IBoxProps } from '../../primitives'; </s> add import type { IStackProps } from '../../primitives/Stack'; import type { IBoxProps } from '../../primitives/Box/types';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Box/index.tsx
import { HStack } from '../Stack';
<mask> import { Pressable, IPressableProps } from '../Pressable'; <mask> import { Center } from '../../composites/Center'; <mask> import Box from '../Box'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { wrapStringChild } from '../../../utils/wrapStringChild'; <mask> import type { IRadioProps } from './types'; <mask> import { useRadio } from '@react-native-aria/radio'; <mask> import { RadioContext } from './RadioGroup'; <mask> import { mergeRefs } from '../../../utils'; </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack';
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
import { wrapStringChild } from '../../../utils/wrapStringChild';
<mask> import { Center } from '../../composites/Center'; <mask> import Box from '../Box'; <mask> import { HStack } from '../Stack'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import type { IRadioProps } from './types'; <mask> import { useRadio } from '@react-native-aria/radio'; <mask> import { RadioContext } from './RadioGroup'; <mask> import { mergeRefs } from '../../../utils'; <mask> import { CircleIcon } from '../Icon/Icons'; <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
_stack, _text,
<mask> onBlur, <mask> _interactionBox, <mask> _icon, <mask> ...resolvedProps <mask> } = usePropsResolution( <mask> 'Radio', <mask> { <mask> ...combinedProps, </s> fix: api update for Radio </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools'; </s> remove import { extractInObject, stylingProps } from '../../../theme/tools/utils'; </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
const [, cleanInputProps] = extractInObject(inputProps, [
<mask> isFocused: isFocusedProp || isFocused, <mask> } <mask> ); <mask> <mask> const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ <mask> ...stylingProps.margin, <mask> ...stylingProps.layout, <mask> ...stylingProps.flexbox, <mask> ...stylingProps.position, <mask> '_text', </s> fix: api update for Radio </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove // console.log('radio', radioState); </s> add </s> remove // console.log('radio', radioState); </s> add </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
...stylingProps.background, ...stylingProps.padding, ...stylingProps.border,
<mask> ...stylingProps.layout, <mask> ...stylingProps.flexbox, <mask> ...stylingProps.position, <mask> '_text', <mask> ]); <mask> <mask> // only calling below function when icon exist. <mask> const sizedIcon = () => </s> fix: api update for Radio </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ </s> add const [, cleanInputProps] = extractInObject(inputProps, [ </s> remove // console.log('radio', radioState); </s> add </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => { </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
{...(cleanInputProps as IPressableProps)}
<mask> <mask> return ( <mask> <Pressable <mask> {...pressableProps} <mask> {...(inputProps as IPressableProps)} <mask> ref={mergeRefs([ref, wrapperRef])} <mask> accessibilityRole="radio" <mask> onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)} <mask> onPressOut={composeEventHandlers( <mask> onPressOut, </s> fix: api update for Radio </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => { </s> remove // console.log(inputProps, focusProps, ref); // return null; </s> add </s> remove // return null; </s> add </s> remove )} </s> add )} */} {wrapStringChild(children, _text)} </s> remove {React.Children.map(children, (child) => { </s> add {/* {React.Children.map(children, (child) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
<HStack {..._stack}>
<mask> composeEventHandlers(onBlur, focusProps.onBlur) <mask> // focusRingProps.onBlur <mask> )} <mask> > <mask> <Center <mask> flexDirection="row" <mask> justifyContent="center" <mask> alignItems="center" <mask> borderRadius="full" <mask> {...layoutProps} <mask> > <mask> <Center> <mask> {/* Interaction Wrapper */} <mask> <Box {..._interactionBox} p={5} w="100%" height="100%" /> <mask> {/* radio */} <mask> <Center {...nonLayoutProps}> </s> fix: api update for Radio </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Box flexDirection="row" alignItems="center" {...layoutProps} opacity={isDisabled ? 0.4 : 1} cursor={isDisabled ? 'not-allowed' : 'pointer'} > </s> add <HStack {..._stack} cursor={isDisabled ? 'not-allowed' : 'pointer'}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
<Box position="absolute" zIndex={-1} {..._interactionBox} />
<mask> {...layoutProps} <mask> > <mask> <Center> <mask> {/* Interaction Wrapper */} <mask> <Box {..._interactionBox} p={5} w="100%" height="100%" /> <mask> {/* radio */} <mask> <Center {...nonLayoutProps}> <mask> {icon && sizedIcon && isChecked ? ( <mask> sizedIcon() <mask> ) : ( </s> fix: api update for Radio </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Center flexDirection="row" justifyContent="center" alignItems="center" borderRadius="full" {...layoutProps} > </s> add <HStack {..._stack}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add </s> remove <Box flexDirection="row" alignItems="center" {...layoutProps} opacity={isDisabled ? 0.4 : 1} cursor={isDisabled ? 'not-allowed' : 'pointer'} > </s> add <HStack {..._stack} cursor={isDisabled ? 'not-allowed' : 'pointer'}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
<Center {...resolvedProps}>
<mask> <Center> <mask> {/* Interaction Wrapper */} <mask> <Box {..._interactionBox} p={5} w="100%" height="100%" /> <mask> {/* radio */} <mask> <Center {...nonLayoutProps}> <mask> {icon && sizedIcon && isChecked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <CircleIcon {..._icon} opacity={isChecked ? 1 : 0} /> <mask> )} </s> fix: api update for Radio </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Center flexDirection="row" justifyContent="center" alignItems="center" borderRadius="full" {...layoutProps} > </s> add <HStack {..._stack}> </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
{wrapStringChild(children, _text)} </HStack>
<mask> )} <mask> </Center> <mask> </Center> <mask> {/* Label */} <mask> {children} <mask> </Center> <mask> </Pressable> <mask> ); <mask> } <mask> ) <mask> ); </s> fix: api update for Radio </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove )} </s> add )} */} {wrapStringChild(children, _text)} </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove })} </s> add })} */} {wrapStringChild(children, _text)} </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
<mask> contextState.state ?? {}, <mask> inputRef <mask> ); <mask> <mask> // console.log('radio', radioState); <mask> <mask> // eslint-disable-next-line react-hooks/exhaustive-deps <mask> const inputProps = React.useMemo(() => radioState.inputProps, [ <mask> radioState.inputProps.checked, <mask> radioState.inputProps.disabled, <mask> ]); </s> fix: api update for Radio </s> remove // console.log('radio', radioState); </s> add </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ </s> add const [, cleanInputProps] = extractInObject(inputProps, [ </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.tsx
import { HStack } from '../Stack';
<mask> import React, { memo, forwardRef } from 'react'; <mask> import Box from '../Box'; <mask> import { Center } from '../../composites/Center'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { wrapStringChild } from '../../../utils/wrapStringChild'; <mask> import type { IRadioProps } from './types'; <mask> import { mergeRefs } from './../../../utils'; <mask> import { useHover } from '@react-native-aria/interactions'; </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
import { wrapStringChild } from '../../../utils/wrapStringChild';
<mask> import { Center } from '../../composites/Center'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import type { IRadioProps } from './types'; <mask> import { mergeRefs } from './../../../utils'; <mask> import { useHover } from '@react-native-aria/interactions'; <mask> import { useRadio } from '@react-native-aria/radio'; <mask> import { VisuallyHidden } from '@react-aria/visually-hidden'; <mask> import { RadioContext } from './RadioGroup'; </s> fix: api update for Radio </s> remove import Text from './../Text'; </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<mask> import { useFocusRing } from '@react-native-aria/focus'; <mask> import { CircleIcon } from '../Icon/Icons'; <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; <mask> import { combineContextAndProps, isEmptyObj } from '../../../utils'; <mask> import { extractInObject, stylingProps } from '../../../theme/tools/utils'; <mask> import { useFormControlContext } from '../../composites/FormControl'; <mask> <mask> const RadioComponent = memo( <mask> forwardRef( <mask> ( </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack'; </s> remove import Text from './../Text'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<mask> const _ref = React.useRef(null); <mask> const { isHovered } = useHover({}, _ref); <mask> const mergedRefs = mergeRefs([_ref, wrapperRef]); <mask> const { focusProps, isFocusVisible } = useFocusRing(); <mask> // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); <mask> <mask> const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( <mask> 'Radio', <mask> combinedProps, <mask> { </s> fix: api update for Radio </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools'; </s> remove { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> add { size, colorScheme, _radio, children, ...props }: IRadioGroupProps,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, });
<mask> const mergedRefs = mergeRefs([_ref, wrapperRef]); <mask> const { focusProps, isFocusVisible } = useFocusRing(); <mask> // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); <mask> <mask> const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( <mask> 'Radio', <mask> combinedProps, <mask> { <mask> isInvalid, <mask> isReadOnly, <mask> isFocusVisible: isFocusVisibleProp || isFocusVisible, <mask> isDisabled, <mask> isIndeterminate, <mask> isChecked, <mask> isHovered: isHoveredProp || isHovered, <mask> } <mask> ); <mask> <mask> const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ <mask> ...stylingProps.margin, <mask> ...stylingProps.layout, <mask> ...stylingProps.flexbox, <mask> ...stylingProps.position, <mask> '_text', <mask> ]); <mask> <mask> // only calling below function when icon exist. <mask> const sizedIcon = () => <mask> //@ts-ignore <mask> React.cloneElement(icon, { </s> fix: api update for Radio </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add </s> remove const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ </s> add const [, cleanInputProps] = extractInObject(inputProps, [ </s> remove // console.log('radio', radioState); </s> add
[ "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", "ke...
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<HStack {..._stack} cursor={isDisabled ? 'not-allowed' : 'pointer'}>
<mask> ..._icon, <mask> }); <mask> <mask> const component = ( <mask> <Box <mask> flexDirection="row" <mask> alignItems="center" <mask> {...layoutProps} <mask> opacity={isDisabled ? 0.4 : 1} <mask> cursor={isDisabled ? 'not-allowed' : 'pointer'} <mask> > <mask> <Center> <mask> {/* Interaction Box */} <mask> <Box <mask> {..._interactionBox} <mask> style={{ </s> fix: api update for Radio </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove <Center flexDirection="row" justifyContent="center" alignItems="center" borderRadius="full" {...layoutProps} > </s> add <HStack {..._stack}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
position="absolute" zIndex={-1} pointerEvents="none"
<mask> <HStack {..._stack} cursor={isDisabled ? 'not-allowed' : 'pointer'}> <mask> <Center> <mask> {/* Interaction Box */} <mask> <Box <mask> {..._interactionBox} <mask> style={{ <mask> // @ts-ignore - only for web" <mask> transition: 'height 200ms, width 200ms', </s> fix: api update for Radio </s> remove <Box flexDirection="row" alignItems="center" {...layoutProps} opacity={isDisabled ? 0.4 : 1} cursor={isDisabled ? 'not-allowed' : 'pointer'} > </s> add <HStack {..._stack} cursor={isDisabled ? 'not-allowed' : 'pointer'}> </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove <Center flexDirection="row" justifyContent="center" alignItems="center" borderRadius="full" {...layoutProps} > </s> add <HStack {..._stack}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}>
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<mask> style={{ <mask> // @ts-ignore - only for web" <mask> transition: 'height 200ms, width 200ms', <mask> }} <mask> h={ <mask> isFocusVisible || <mask> isFocusVisibleProp || <mask> isHovered || <mask> isHoveredProp <mask> ? '200%' <mask> : '100%' <mask> } <mask> w={ <mask> isFocusVisible || <mask> isFocusVisibleProp || <mask> isHovered || <mask> isHoveredProp <mask> ? '200%' <mask> : '100%' <mask> } <mask> pointerEvents="none" <mask> /> <mask> {/* Radio */} <mask> <Center {...nonLayoutProps}> <mask> {icon && sizedIcon && isChecked ? ( <mask> sizedIcon() </s> fix: api update for Radio </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<Center {...resolvedProps}>
<mask> } <mask> pointerEvents="none" <mask> /> <mask> {/* Radio */} <mask> <Center {...nonLayoutProps}> <mask> {icon && sizedIcon && isChecked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <CircleIcon {..._icon} opacity={isChecked ? 1 : 0} /> <mask> )} </s> fix: api update for Radio </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Box {..._interactionBox} p={5} w="100%" height="100%" /> </s> add <Box position="absolute" zIndex={-1} {..._interactionBox} /> </s> remove h={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } w={ isFocusVisible || isFocusVisibleProp || isHovered || isHoveredProp ? '200%' : '100%' } pointerEvents="none" </s> add </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove )} </s> add )} */} {wrapStringChild(children, _text)}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
{wrapStringChild(children, _text)} </HStack>
<mask> <CircleIcon {..._icon} opacity={isChecked ? 1 : 0} /> <mask> )} <mask> </Center> <mask> </Center> <mask> {children} <mask> </Box> <mask> ); <mask> //TODO: refactor for responsive prop <mask> if (useHasResponsiveProps(props)) { <mask> return null; <mask> } </s> fix: api update for Radio </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove <Center {...nonLayoutProps}> </s> add <Center {...resolvedProps}> </s> remove {children} </Center> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove // console.log(inputProps, focusProps, ref); // return null; </s> add </s> remove <Box ref={ref}> <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> </RadioContext.Provider> </Box> </s> add <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<mask> if (useHasResponsiveProps(props)) { <mask> return null; <mask> } <mask> <mask> // console.log(inputProps, focusProps, ref); <mask> // return null; <mask> <mask> return ( <mask> <Box <mask> // @ts-ignore - RN web supports accessibilityRole="label" <mask> accessibilityRole="label" <mask> ref={mergedRefs} </s> fix: api update for Radio </s> remove // return null; </s> add </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove <Box ref={ref}> <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> </RadioContext.Provider> </Box> </s> add <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider> </s> remove <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> {props.children} </Box> </s> add <Stack alignItems="flex-start" {...props.radioGroupProps} {...props} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
<mask> contextState.state ?? {}, <mask> inputRef <mask> ); <mask> <mask> // console.log('radio', radioState); <mask> //@ts-ignore <mask> // eslint-disable-next-line react-hooks/exhaustive-deps <mask> const inputProps = React.useMemo(() => radioState.inputProps, [ <mask> radioState.inputProps.checked, <mask> radioState.inputProps.disabled, </s> fix: api update for Radio </s> remove // console.log('radio', radioState); </s> add </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ </s> add const [, cleanInputProps] = extractInObject(inputProps, [ </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/Radio.web.tsx
import { Stack } from '../Stack';
<mask> import React, { memo, forwardRef } from 'react'; <mask> import Box from '../Box'; <mask> import { useFormControlContext } from '../../composites/FormControl'; <mask> import type { IRadioContext, IRadioGroupProps } from './types'; <mask> import { useRadioGroupState } from '@react-stately/radio'; <mask> import { useRadioGroup } from '@react-native-aria/radio'; <mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; </s> fix: api update for Radio </s> remove import Text from './../Text'; </s> add
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
const RadioWrapper = memo((props: any) => {
<mask> <mask> export const RadioContext = React.createContext<IRadioContext>( <mask> {} as IRadioContext <mask> ); <mask> const RadioWrapper = React.memo((props: any) => { <mask> // console.log('hello here group'); <mask> return ( <mask> <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> <mask> {props.children} <mask> </Box> <mask> ); </s> fix: api update for Radio </s> remove <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> {props.children} </Box> </s> add <Stack alignItems="flex-start" {...props.radioGroupProps} {...props} /> </s> remove <Box ref={ref}> <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> </RadioContext.Provider> </Box> </s> add <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider> </s> remove { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> add { size, colorScheme, _radio, children, ...props }: IRadioGroupProps, </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, }); </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
<Stack alignItems="flex-start" {...props.radioGroupProps} {...props} />
<mask> ); <mask> const RadioWrapper = React.memo((props: any) => { <mask> // console.log('hello here group'); <mask> return ( <mask> <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> <mask> {props.children} <mask> </Box> <mask> ); <mask> }); <mask> <mask> const RadioGroup = ( <mask> { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> fix: api update for Radio </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => { </s> remove { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> add { size, colorScheme, _radio, children, ...props }: IRadioGroupProps, </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools'; </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, });
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
{ size, colorScheme, _radio, children, ...props }: IRadioGroupProps,
<mask> ); <mask> }); <mask> <mask> const RadioGroup = ( <mask> { size, colorScheme, _radio, ...props }: IRadioGroupProps, <mask> ref: any <mask> ) => { <mask> const formControlContext = useFormControlContext(); <mask> <mask> const state = useRadioGroupState(props); </s> fix: api update for Radio </s> remove <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> {props.children} </Box> </s> add <Stack alignItems="flex-start" {...props.radioGroupProps} {...props} /> </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => { </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools'; </s> remove const { _interactionBox, _icon, ...resolvedProps } = usePropsResolution( 'Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, } ); const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [ ...stylingProps.margin, ...stylingProps.layout, ...stylingProps.flexbox, ...stylingProps.position, '_text', ]); </s> add const { _interactionBox, _icon, _stack, _text, ...resolvedProps } = usePropsResolution('Radio', combinedProps, { isInvalid, isReadOnly, isFocusVisible: isFocusVisibleProp || isFocusVisible, isDisabled, isIndeterminate, isChecked, isHovered: isHoveredProp || isHovered, });
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
<mask> if (useHasResponsiveProps({ ...props, size, colorScheme })) { <mask> return null; <mask> } <mask> <mask> // return null; <mask> return ( <mask> <Box ref={ref}> <mask> <RadioContext.Provider value={contextValue}> <mask> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> <mask> </RadioContext.Provider> </s> fix: api update for Radio </s> remove <Box ref={ref}> <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> </RadioContext.Provider> </Box> </s> add <RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider> </s> remove // console.log(inputProps, focusProps, ref); // return null; </s> add </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> {props.children} </Box> </s> add <Stack alignItems="flex-start" {...props.radioGroupProps} {...props} /> </s> remove {React.Children.map(children, (child) => { </s> add {/* {React.Children.map(children, (child) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
<RadioContext.Provider value={contextValue}> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref}> {children} </RadioWrapper> </RadioContext.Provider>
<mask> } <mask> <mask> // return null; <mask> return ( <mask> <Box ref={ref}> <mask> <RadioContext.Provider value={contextValue}> <mask> <RadioWrapper {...radioGroupProps} {...propsState} ref={ref} /> <mask> </RadioContext.Provider> <mask> </Box> <mask> ); <mask> }; <mask> <mask> export default memo(forwardRef(RadioGroup)); </s> fix: api update for Radio </s> remove // return null; </s> add </s> remove // console.log(inputProps, focusProps, ref); // return null; </s> add </s> remove {children} </Box> </s> add {wrapStringChild(children, _text)} </HStack> </s> remove const RadioWrapper = React.memo((props: any) => { // console.log('hello here group'); </s> add const RadioWrapper = memo((props: any) => { </s> remove <Box alignItems="flex-start" {...props.radioGroupProps} {...props}> {props.children} </Box> </s> add <Stack alignItems="flex-start" {...props.radioGroupProps} {...props} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/RadioGroup.tsx
import type { IStackProps } from '../../primitives/Stack'; import type { IBoxProps } from '../../primitives/Box/types';
<mask> import type { IBoxProps } from '../../primitives'; <mask> import type { IFormControlContext } from '../../composites'; <mask> import type { AccessibilityRole } from 'react-native'; <mask> import type { RadioGroupState } from '@react-stately/radio'; <mask> import type { MutableRefObject } from 'react'; <mask> import type { ResponsiveValue } from '../../../components/types'; </s> fix: api update for Radio </s> remove import Text from './../Text'; </s> add </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack';
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/types.tsx
/** * Props to be passed to the HStack used inside. */ _stack?: IStackProps;
<mask> /** <mask> * Ref to be passed to Icon's wrapper Box <mask> */ <mask> wrapperRef?: any; <mask> } <mask> export interface IRadioGroupProps extends IStackProps { <mask> /** <mask> * The value of the radio group. <mask> */ <mask> value?: IRadioValue; </s> fix: api update for Radio </s> remove export interface IRadioGroupProps extends IBoxProps<IRadioGroupProps> { </s> add export interface IRadioGroupProps extends IStackProps { </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack'; </s> remove import type { IBoxProps } from '../../primitives'; </s> add import type { IStackProps } from '../../primitives/Stack'; import type { IBoxProps } from '../../primitives/Box/types';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/types.tsx
export interface IRadioGroupProps extends IStackProps {
<mask> * Ref to be passed to Icon's wrapper Box <mask> */ <mask> wrapperRef?: any; <mask> } <mask> export interface IRadioGroupProps extends IBoxProps<IRadioGroupProps> { <mask> /** <mask> * The value of the radio group. <mask> */ <mask> value?: IRadioValue; <mask> /** </s> fix: api update for Radio </s> remove import Box from '../Box'; </s> add import { Stack } from '../Stack';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/components/primitives/Radio/types.tsx
import { mode } from '../tools';
<mask> import { mode, transparentize } from '../tools'; <mask> <mask> const baseStyle = (props: Record<string, any>) => { <mask> const { colorScheme, theme } = props; <mask> return { <mask> borderWidth: 2, </s> fix: api update for Radio </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove p: '2px', </s> add p: 0.5, </s> remove import { extractInObject, stylingProps } from '../../../theme/tools/utils'; </s> add </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add </s> remove { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> add { size, colorScheme, _radio, children, ...props }: IRadioGroupProps,
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
const { colorScheme } = props;
<mask> import { mode, transparentize } from '../tools'; <mask> <mask> const baseStyle = (props: Record<string, any>) => { <mask> const { colorScheme, theme } = props; <mask> return { <mask> borderWidth: 2, <mask> borderRadius: 'full', <mask> p: '2px', <mask> borderColor: mode('muted.300', 'muted.600')(props), </s> fix: api update for Radio </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools'; </s> remove p: '2px', </s> add p: 0.5, </s> remove _text: { ml: 2, </s> add _stack: { flexDirection: 'row', alignItems: 'center', space: 2, </s> remove import { extractInObject, stylingProps } from '../../../theme/tools/utils'; </s> add </s> remove // const mergedWrapperRef = React.useMemo(() => mergeRefs([wrapperRef, _ref]), []); </s> add
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
p: 0.5,
<mask> const { colorScheme, theme } = props; <mask> return { <mask> borderWidth: 2, <mask> borderRadius: 'full', <mask> p: '2px', <mask> borderColor: mode('muted.300', 'muted.600')(props), <mask> bg: mode('muted.50', 'muted.700')(props), // matching background color <mask> _text: { <mask> ml: 2, <mask> }, </s> fix: api update for Radio </s> remove _text: { ml: 2, </s> add _stack: { flexDirection: 'row', alignItems: 'center', space: 2, </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove position: 'absolute', zIndex: -1, </s> add </s> remove import { mode, transparentize } from '../tools'; </s> add import { mode } from '../tools';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
_stack: { flexDirection: 'row', alignItems: 'center', space: 2,
<mask> borderRadius: 'full', <mask> p: '2px', <mask> borderColor: mode('muted.300', 'muted.600')(props), <mask> bg: mode('muted.50', 'muted.700')(props), // matching background color <mask> _text: { <mask> ml: 2, <mask> }, <mask> _interactionBox: { <mask> position: 'absolute', <mask> zIndex: -1, <mask> borderRadius: 'full', </s> fix: api update for Radio </s> remove p: '2px', </s> add p: 0.5, </s> remove position: 'absolute', zIndex: -1, </s> add </s> remove const { colorScheme, theme } = props; </s> add const { colorScheme } = props; </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
<mask> _text: { <mask> ml: 2, <mask> }, <mask> _interactionBox: { <mask> position: 'absolute', <mask> zIndex: -1, <mask> borderRadius: 'full', <mask> }, <mask> _icon: { <mask> color: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), // matching background color <mask> }, </s> fix: api update for Radio </s> remove _text: { ml: 2, </s> add _stack: { flexDirection: 'row', alignItems: 'center', space: 2, </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8, </s> remove p: '2px', </s> add p: 0.5, </s> remove lg: { _icon: { size: 4 }, _text: { fontSize: 'lg' } }, md: { _icon: { size: 3 }, _text: { fontSize: 'md' } }, sm: { _icon: { size: 2 }, _text: { fontSize: 'sm' } }, </s> add lg: { _icon: { size: 4 }, // _interactionBox: { size: 5 }, _text: { fontSize: 'lg' }, }, md: { _icon: { size: 3 }, // _interactionBox: { size: 16 }, _text: { fontSize: 'md' }, }, sm: { _icon: { size: 2 }, // _interactionBox: { size: 3 }, _text: { fontSize: 'sm' }, },
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
size: 3,
<mask> _interactionBox: { <mask> borderRadius: 'full', <mask> }, <mask> _icon: { <mask> color: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), // matching background color <mask> }, </s> fix: api update for Radio </s> remove position: 'absolute', zIndex: -1, </s> add </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8, </s> remove _text: { ml: 2, </s> add _stack: { flexDirection: 'row', alignItems: 'center', space: 2, </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add </s> remove p: '2px', </s> add p: 0.5,
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
bg: 'muted.200:alpha.30', size: 8,
<mask> color: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), // matching background color <mask> }, <mask> _hover: { <mask> _interactionBox: { <mask> bg: transparentize('muted.200', 0.3)(theme), <mask> }, <mask> }, <mask> _focus: { <mask> _interactionBox: { <mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove position: 'absolute', zIndex: -1, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
bg: `${colorScheme}.200:alpha.50`, size: 8,
<mask> }, <mask> }, <mask> _focus: { <mask> _interactionBox: { <mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), <mask> }, <mask> }, <mask> _focusVisible: { <mask> _interactionBox: { <mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10, </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
bg: `${colorScheme}.200:alpha.50`, size: 8,
<mask> }, <mask> }, <mask> _focusVisible: { <mask> _interactionBox: { <mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), <mask> }, <mask> }, <mask> _checked: { <mask> _interactionBox: { <mask> borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), </s> fix: api update for Radio </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
<mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), <mask> }, <mask> }, <mask> _checked: { <mask> _interactionBox: { <mask> borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), <mask> }, <mask> borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), <mask> }, <mask> _disabled: { <mask> opacity: 0.4, <mask> _interactionBox: { </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
_stack: { opacity: '0.4', },
<mask> bg: 'transparent', <mask> }, <mask> }, <mask> _invalid: { <mask> borderColor: mode('error.600', 'error.400')(props), <mask> }, </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8,
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
bg: `${colorScheme}.200:alpha.50`, size: 10,
<mask> borderColor: mode('error.600', 'error.400')(props), <mask> }, <mask> _pressed: { <mask> _interactionBox: { <mask> bg: transparentize(`${colorScheme}.200`, 0.5)(theme), <mask> }, <mask> }, <mask> }; <mask> }; <mask> </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove _interactionBox: { borderColor: mode(`${colorScheme}.600`, `${colorScheme}.200`)(props), }, </s> add </s> remove bg: transparentize('muted.200', 0.3)(theme), </s> add bg: 'muted.200:alpha.30', size: 8,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
lg: { _icon: { size: 4 }, // _interactionBox: { size: 5 }, _text: { fontSize: 'lg' }, }, md: { _icon: { size: 3 }, // _interactionBox: { size: 16 }, _text: { fontSize: 'md' }, }, sm: { _icon: { size: 2 }, // _interactionBox: { size: 3 }, _text: { fontSize: 'sm' }, },
<mask> }; <mask> }; <mask> <mask> const sizes = { <mask> lg: { _icon: { size: 4 }, _text: { fontSize: 'lg' } }, <mask> md: { _icon: { size: 3 }, _text: { fontSize: 'md' } }, <mask> sm: { _icon: { size: 2 }, _text: { fontSize: 'sm' } }, <mask> }; <mask> <mask> const defaultProps = { <mask> defaultIsChecked: false, <mask> size: 'md', </s> fix: api update for Radio </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 10, </s> remove position: 'absolute', zIndex: -1, </s> add </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8, </s> remove bg: transparentize(`${colorScheme}.200`, 0.5)(theme), </s> add bg: `${colorScheme}.200:alpha.50`, size: 8,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4881be7bfb089839a6a2bbdacbf1a19188802c84
src/theme/components/radio.ts
text: '',
<mask> class Item extends Component { <mask> constructor(props) { <mask> super(props); <mask> this.state = { <mask> text: "", <mask> topAnim: new Animated.Value(18), <mask> opacAnim: new Animated.Value(1) <mask> }; <mask> } <mask> componentDidMount() { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove opacAnim: new Animated.Value(1) </s> add opacAnim: new Animated.Value(1), isFocused: false, </s> remove style: this.getInitialStyle().roundedInputGroup </s> add style: this.getInitialStyle().roundedInputGroup, </s> remove : undefined } </s> add : undefined, }, </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
opacAnim: new Animated.Value(1), isFocused: false,
<mask> super(props); <mask> this.state = { <mask> text: "", <mask> topAnim: new Animated.Value(18), <mask> opacAnim: new Animated.Value(1) <mask> }; <mask> } <mask> componentDidMount() { <mask> if (this.props.floatingLabel) { <mask> if (this.inputProps && this.inputProps.value) { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove text: "", </s> add text: '', </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
if (this.inputProps && this.inputProps.getRef) {
<mask> this.floatUp(-16); <mask> } else { <mask> this.setState({ isFocused: false }); <mask> } <mask> if (this.inputProps && this.inputProps.getRef) <mask> this.inputProps.getRef(this._inputRef); <mask> } <mask> } <mask> componentWillReceiveProps(nextProps) { <mask> const childrenArray = React.Children.toArray(nextProps.children); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
}
<mask> } <mask> if (this.inputProps && this.inputProps.getRef) { <mask> this.inputProps.getRef(this._inputRef); <mask> } <mask> } <mask> <mask> componentWillReceiveProps(nextProps) { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
_.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
<mask> } <mask> } <mask> componentWillReceiveProps(nextProps) { <mask> const childrenArray = React.Children.toArray(nextProps.children); <mask> let inputProps = {}; <mask> _.remove(childrenArray, item => { <mask> if (item.type.displayName === "Styled(Input)") { <mask> inputProps = item.props; <mask> this.inputProps = item.props; <mask> return item; <mask> } <mask> }); <mask> if (this.props.floatingLabel) { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove input.push(item); </s> add inputChild = item; </s> remove label.push(item); </s> add labelChild = item; </s> remove } else if (item.type.displayName === 'Styled(Label)') { </s> add } else if (item.type.displayName === 'Styled(Icon)') { </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
return false;
<mask> if (item.type.displayName === 'Styled(Input)') { <mask> this.inputProps = item.props; <mask> return item; <mask> } <mask> }); <mask> if (this.props.floatingLabel) { <mask> if (this.inputProps && this.inputProps.value) { <mask> this.setState({ isFocused: true }); <mask> this.floatUp(-16); <mask> } else { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove input.push(item); </s> add inputChild = item; </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove label.push(item); </s> add labelChild = item;
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
if (this.inputProps && this.inputProps.getRef) {
<mask> this.floatUp(-16); <mask> } else { <mask> this.setState({ isFocused: false }); <mask> } <mask> if (this.inputProps && this.inputProps.getRef) <mask> this.inputProps.getRef(this._inputRef); <mask> } <mask> } <mask> <mask> floatBack() { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
}
<mask> if (this.inputProps && this.inputProps.getRef) { <mask> this.inputProps.getRef(this._inputRef); <mask> } <mask> } <mask> <mask> floatBack() { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) { </s> remove opacAnim: new Animated.Value(1) </s> add opacAnim: new Animated.Value(1), isFocused: false,
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
duration: 150,
<mask> <mask> floatBack() { <mask> Animated.timing(this.state.topAnim, { <mask> toValue: 18, <mask> duration: 150 <mask> }).start(); <mask> Animated.timing(this.state.opacAnim, { <mask> toValue: 1, <mask> duration: 150 <mask> }).start(); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
duration: 150,
<mask> duration: 150 <mask> }).start(); <mask> Animated.timing(this.state.opacAnim, { <mask> toValue: 1, <mask> duration: 150 <mask> }).start(); <mask> } <mask> <mask> floatUp(e) { <mask> Animated.timing(this.state.topAnim, { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
duration: 150,
<mask> <mask> floatUp(e) { <mask> Animated.timing(this.state.topAnim, { <mask> toValue: e || -22, <mask> duration: 150 <mask> }).start(); <mask> Animated.timing(this.state.opacAnim, { <mask> toValue: 0.7, <mask> duration: 150 <mask> }).start(); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
duration: 150,
<mask> duration: 150 <mask> }).start(); <mask> Animated.timing(this.state.opacAnim, { <mask> toValue: 0.7, <mask> duration: 150 <mask> }).start(); <mask> } <mask> <mask> renderLabel(label, labelProps) { <mask> const newLabel = []; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove duration: 150 </s> add duration: 150, </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove const label = []; </s> add let labelChild = null;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
if (!label) { return React.createElement(Label, { ...labelProps }); }
<mask> }).start(); <mask> } <mask> <mask> renderLabel(label, labelProps) { <mask> const newLabel = []; <mask> let labelStyle = StyleSheet.flatten( <mask> { fontSize: 15, lineHeight: 30 }, <mask> labelProps.style <mask> ); <mask> if (this.props.floatingLabel) { <mask> if (this.state.isFocused) { <mask> newLabel.push( <mask> React.createElement(Label, { <mask> ...labelProps, </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove newLabel.push( React.createElement(Label, { ...labelProps, key: "newFLabel", float: true, style: labelStyle }) </s> add const labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style, </s> remove duration: 150 </s> add duration: 150, </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove const label = []; </s> add let labelChild = null;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
const labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style,
<mask> labelProps.style <mask> ); <mask> if (this.props.floatingLabel) { <mask> if (this.state.isFocused) { <mask> newLabel.push( <mask> React.createElement(Label, { <mask> ...labelProps, <mask> key: "newFLabel", <mask> float: true, <mask> style: labelStyle <mask> }) <mask> ); <mask> this.floatUp(-16); <mask> } else { <mask> newLabel.push(label); <mask> this.floatBack(); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove return newLabel; </s> add return React.cloneElement(inputElement, props);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
return React.cloneElement(label, {
<mask> style: labelStyle <mask> }) <mask> ); <mask> this.floatUp(-16); <mask> } else { <mask> newLabel.push(label); <mask> this.floatBack(); <mask> } <mask> } else { <mask> newLabel.push( <mask> React.createElement(Label, { <mask> ...labelProps, <mask> key: "newLabel" <mask> }) <mask> ); <mask> } </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove newLabel.push( React.createElement(Label, { ...labelProps, key: "newFLabel", float: true, style: labelStyle }) </s> add const labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style, </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove return newLabel; </s> add return React.cloneElement(inputElement, props); </s> remove if (this.inputProps && this.inputProps.getRef) </s> add if (this.inputProps && this.inputProps.getRef) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props);
<mask> } else { <mask> newLabel.push( <mask> React.createElement(Label, { <mask> ...labelProps, <mask> key: "newLabel" <mask> }) <mask> ); <mask> } <mask> return newLabel; <mask> } <mask> <mask> renderChildren() { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove return newLabel; </s> add return React.cloneElement(inputElement, props); </s> remove newLabel.push( React.createElement(Label, { ...labelProps, key: "newFLabel", float: true, style: labelStyle }) </s> add const labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style, </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove return this.props.children; </s> add newChildren = this.props.children;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
return React.cloneElement(inputElement, props);
<mask> key: "newLabel" <mask> }) <mask> ); <mask> } <mask> return newLabel; <mask> } <mask> <mask> renderChildren() { <mask> const label = []; <mask> let labelProps = {}; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove const label = []; </s> add let labelChild = null; </s> remove const input = []; </s> add let inputChild = null; </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
let labelChild = null;
<mask> return newLabel; <mask> } <mask> <mask> renderChildren() { <mask> const label = []; <mask> let labelProps = {}; <mask> const input = []; <mask> let inputProps = {}; <mask> const icon = []; <mask> let iconProps = {}; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove const input = []; </s> add let inputChild = null; </s> remove return newLabel; </s> add return React.cloneElement(inputElement, props); </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove duration: 150 </s> add duration: 150,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
let inputChild = null;
<mask> <mask> renderChildren() { <mask> const label = []; <mask> let labelProps = {}; <mask> const input = []; <mask> let inputProps = {}; <mask> const icon = []; <mask> let iconProps = {}; <mask> let newChildren = []; <mask> </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove const label = []; </s> add let labelChild = null; </s> remove return newLabel; </s> add return React.cloneElement(inputElement, props); </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove const newLabel = []; let labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style ); </s> add if (!label) { return React.createElement(Label, { ...labelProps }); } </s> remove duration: 150 </s> add duration: 150,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
labelChild = item;
<mask> <mask> React.Children.toArray(this.props.children) <mask> .forEach((item) => { <mask> if (item.type.displayName === 'Styled(Label)') { <mask> label.push(item); <mask> labelProps = item.props; <mask> return false; <mask> } else if (item.type.displayName === 'Styled(Input)') { <mask> input.push(item); <mask> inputProps = item.props; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove input.push(item); </s> add inputChild = item; </s> remove } else if (item.type.displayName === 'Styled(Label)') { </s> add } else if (item.type.displayName === 'Styled(Icon)') { </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); });
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
inputChild = item;
<mask> label.push(item); <mask> labelProps = item.props; <mask> return false; <mask> } else if (item.type.displayName === 'Styled(Input)') { <mask> input.push(item); <mask> inputProps = item.props; <mask> this.inputProps = item.props; <mask> return false; <mask> } else if (item.type.displayName === 'Styled(Label)') { <mask> icon.push(item); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove } else if (item.type.displayName === 'Styled(Label)') { </s> add } else if (item.type.displayName === 'Styled(Icon)') { </s> remove label.push(item); </s> add labelChild = item; </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove const label = []; </s> add let labelChild = null;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
} else if (item.type.displayName === 'Styled(Icon)') {
<mask> input.push(item); <mask> inputProps = item.props; <mask> this.inputProps = item.props; <mask> return false; <mask> } else if (item.type.displayName === 'Styled(Label)') { <mask> icon.push(item); <mask> iconProps = item.props; <mask> return false; <mask> } <mask> return true; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove input.push(item); </s> add inputChild = item; </s> remove label.push(item); </s> add labelChild = item; </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove const label = []; </s> add let labelChild = null;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); });
<mask> } <mask> return true; <mask> }); <mask> <mask> if (this.props.floatingLabel && icon.length) { <mask> let isIcon = false; <mask> for (let i = 0; i < this.props.children.length; i++) { <mask> if (this.props.children[i].props.name) { <mask> isIcon = true; <mask> newChildren.push( <mask> <Icon key={[i]} {...this.props.children[i].props} /> <mask> ); <mask> } <mask> if (this.props.children[i].props.children) { <mask> newChildren.push( <mask> <Animated.View <mask> key="float" <mask> style={{ <mask> position: "absolute", <mask> left: <mask> this.props.last && isIcon <mask> ? 40 <mask> : this.props.last <mask> ? 15 <mask> : isIcon <mask> ? 26 <mask> : 0, <mask> right: 0, <mask> top: this.state.topAnim, <mask> opacity: this.state.opacAnim, <mask> paddingTop: Platform.OS === "ios" ? undefined : undefined, <mask> paddingBottom: Platform.OS === "ios" ? undefined : 12 <mask> }} <mask> > <mask> <Label {...labelProps}> <mask> {this.renderLabel(label, labelProps)} <mask> </Label> <mask> </Animated.View> <mask> ); <mask> newChildren.push( <mask> <Input <mask> ref={c => (this._inputRef = c)} <mask> key="l2" <mask> {...inputProps} <mask> onFocus={() => { <mask> this.setState({ isFocused: true }); <mask> inputProps.onFocus && inputProps.onFocus(); <mask> }} <mask> onBlur={() => { <mask> inputProps.value <mask> ? this.setState({ <mask> isFocused: true <mask> }) <mask> : !this.state.text.length && <mask> this.setState({ isFocused: false }); <mask> inputProps.onBlur && inputProps.onBlur(); <mask> }} <mask> onChangeText={text => { <mask> this.setState({ text }); <mask> inputProps.onChangeText && inputProps.onChangeText(text); <mask> }} <mask> /> <mask> ); <mask> } <mask> } <mask> } else if (this.props.floatingLabel) { <mask> newChildren.push( <mask> <Animated.View <mask> key="float" </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>, </s> remove position: "absolute", left: this.props.last ? 15 : 0, </s> add position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0, </s> remove paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 </s> add paddingTop: Platform.OS === 'ios' ? undefined : undefined, paddingBottom: Platform.OS === 'ios' ? undefined : 12, </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove : undefined } </s> add : undefined, },
[ "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/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
<mask> /> <mask> ); <mask> } <mask> } <mask> } else if (this.props.floatingLabel) { <mask> newChildren.push( <mask> <Animated.View <mask> key="float" <mask> style={{ <mask> position: "absolute", </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove position: "absolute", left: this.props.last ? 15 : 0, </s> add position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0, </s> remove </View> </s> add </View>, </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0,
<mask> newChildren.push( <mask> <Animated.View <mask> key="float" <mask> style={{ <mask> position: "absolute", <mask> left: this.props.last ? 15 : 0, <mask> right: 0, <mask> top: this.state.topAnim, <mask> opacity: this.state.opacAnim, <mask> paddingTop: Platform.OS === "ios" ? undefined : undefined, <mask> paddingBottom: Platform.OS === "ios" ? undefined : 12 </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 </s> add paddingTop: Platform.OS === 'ios' ? undefined : undefined, paddingBottom: Platform.OS === 'ios' ? undefined : 12, </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>, </s> remove : undefined } </s> add : undefined, }, </s> remove } else if (this.props.floatingLabel) { </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
paddingTop: Platform.OS === 'ios' ? undefined : undefined, paddingBottom: Platform.OS === 'ios' ? undefined : 12,
<mask> left: this.props.last ? 15 : 0, <mask> right: 0, <mask> top: this.state.topAnim, <mask> opacity: this.state.opacAnim, <mask> paddingTop: Platform.OS === "ios" ? undefined : undefined, <mask> paddingBottom: Platform.OS === "ios" ? undefined : 12 <mask> }} <mask> > <mask> <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> <mask> </Animated.View> <mask> ); </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove position: "absolute", left: this.props.last ? 15 : 0, </s> add position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0, </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>, </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove : undefined } </s> add : undefined, }, </s> remove <View style={{ flexDirection: "column" }}> </s> add <View style={{ flexDirection: 'column' }}>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
{this.renderLabel(labelChild, labelProps)} </Animated.View>,
<mask> paddingTop: Platform.OS === "ios" ? undefined : undefined, <mask> paddingBottom: Platform.OS === "ios" ? undefined : 12 <mask> }} <mask> > <mask> <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> <mask> </Animated.View> <mask> ); <mask> newChildren.push( <mask> <Input <mask> ref={c => (this._inputRef = c)} <mask> value={this.state.text} <mask> key="l2" <mask> {...inputProps} <mask> onFocus={() => { <mask> this.setState({ isFocused: true }); <mask> inputProps.onFocus && inputProps.onFocus(); <mask> }} <mask> onBlur={() => { <mask> inputProps.value <mask> ? this.setState({ <mask> isFocused: true <mask> }) <mask> : !this.state.text.length && this.setState({ isFocused: false }); <mask> inputProps.onBlur && inputProps.onBlur(); <mask> }} <mask> onChangeText={text => { <mask> this.setState({ text }); <mask> inputProps.onChangeText && inputProps.onChangeText(text); <mask> }} <mask> /> <mask> ); <mask> } else if (this.props.stackedLabel && icon.length) { <mask> newChildren.push( <mask> <View <mask> key="s" </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 </s> add paddingTop: Platform.OS === 'ios' ? undefined : undefined, paddingBottom: Platform.OS === 'ios' ? undefined : 12, </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove position: "absolute", left: this.props.last ? 15 : 0, </s> add position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0,
[ "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/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
newChildren.push(this.renderInput(inputChild, inputProps));
<mask> > <mask> {this.renderLabel(labelChild, labelProps)} <mask> </Animated.View>, <mask> ); <mask> } else if (this.props.stackedLabel && icon.length) { <mask> newChildren.push( <mask> <View <mask> key="s" </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>, </s> remove flexDirection: "row", </s> add flexDirection: 'row', </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove } else if (this.props.floatingLabel) { </s> add </s> remove width: variables.deviceWidth - 15 </s> add width: variables.deviceWidth - 15,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
flexDirection: 'row',
<mask> newChildren.push( <mask> <View <mask> key="s" <mask> style={{ <mask> flexDirection: "row", <mask> flex: 1, <mask> width: variables.deviceWidth - 15 <mask> }} <mask> > <mask> <Icon key="s1" {...iconProps} /> </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove width: variables.deviceWidth - 15 </s> add width: variables.deviceWidth - 15, </s> remove <View style={{ flexDirection: "column" }}> </s> add <View style={{ flexDirection: 'column' }}> </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })} </s> remove </View> </s> add </View>,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
width: variables.deviceWidth - 15,
<mask> key="s" <mask> style={{ <mask> flexDirection: "row", <mask> flex: 1, <mask> width: variables.deviceWidth - 15 <mask> }} <mask> > <mask> <Icon key="s1" {...iconProps} /> <mask> <View style={{ flexDirection: "column" }}> <mask> <Label key="s2" {...labelProps} /> </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <View style={{ flexDirection: "column" }}> </s> add <View style={{ flexDirection: 'column' }}> </s> remove flexDirection: "row", </s> add flexDirection: 'row', </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })} </s> remove </View> </s> add </View>, </s> remove } else if (this.props.floatingLabel) { </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
<View style={{ flexDirection: 'column' }}>
<mask> width: variables.deviceWidth - 15 <mask> }} <mask> > <mask> <Icon key="s1" {...iconProps} /> <mask> <View style={{ flexDirection: "column" }}> <mask> <Label key="s2" {...labelProps} /> <mask> <Input <mask> key="s3" <mask> {...inputProps} <mask> style={{ width: variables.deviceWidth - 40 }} </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove width: variables.deviceWidth - 15 </s> add width: variables.deviceWidth - 15, </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })} </s> remove flexDirection: "row", </s> add flexDirection: 'row', </s> remove </View> </s> add </View>, </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
{React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })}
<mask> > <mask> <Icon key="s1" {...iconProps} /> <mask> <View style={{ flexDirection: "column" }}> <mask> <Label key="s2" {...labelProps} /> <mask> <Input <mask> key="s3" <mask> {...inputProps} <mask> style={{ width: variables.deviceWidth - 40 }} <mask> /> <mask> </View> <mask> </View> <mask> ); <mask> } else { <mask> return this.props.children; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <View style={{ flexDirection: "column" }}> </s> add <View style={{ flexDirection: 'column' }}> </s> remove width: variables.deviceWidth - 15 </s> add width: variables.deviceWidth - 15, </s> remove </View> </s> add </View>, </s> remove flexDirection: "row", </s> add flexDirection: 'row', </s> remove return this.props.children; </s> add newChildren = this.props.children;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
</View>,
<mask> {...inputProps} <mask> style={{ width: variables.deviceWidth - 40 }} <mask> /> <mask> </View> <mask> </View> <mask> ); <mask> } else { <mask> return this.props.children; <mask> } <mask> return newChildren; </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })} </s> remove return this.props.children; </s> add newChildren = this.props.children; </s> remove <View style={{ flexDirection: "column" }}> </s> add <View style={{ flexDirection: 'column' }}> </s> remove width: variables.deviceWidth - 15 </s> add width: variables.deviceWidth - 15, </s> remove flexDirection: "row", </s> add flexDirection: 'row',
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
newChildren = this.props.children;
<mask> </View> <mask> </View> <mask> ); <mask> } else { <mask> return this.props.children; <mask> } <mask> return newChildren; <mask> } <mask> getInitialStyle() { <mask> return { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove </View> </s> add </View>, </s> remove <Input key="s3" {...inputProps} style={{ width: variables.deviceWidth - 40 }} /> </s> add {React.cloneElement(inputChild, { ...inputProps, key: 's3', style: { width: variables.deviceWidth - 40 }, })} </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
: undefined, },
<mask> roundedInputGroup: { <mask> borderWidth: this.props.rounded ? variables.borderWidth * 2 : undefined, <mask> borderRadius: this.props.rounded <mask> ? variables.inputGroupRoundedBorderRadius <mask> : undefined <mask> } <mask> }; <mask> } <mask> <mask> prepareRootProps() { <mask> const defaultProps = { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove style: this.getInitialStyle().roundedInputGroup </s> add style: this.getInitialStyle().roundedInputGroup, </s> remove paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 </s> add paddingTop: Platform.OS === 'ios' ? undefined : undefined, paddingBottom: Platform.OS === 'ios' ? undefined : 12, </s> remove position: "absolute", left: this.props.last ? 15 : 0, </s> add position: 'absolute', left: this.props.last && hasIcon ? 40 : this.props.last ? 15 : hasIcon ? 26 : 0, </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
style: this.getInitialStyle().roundedInputGroup,
<mask> } <mask> <mask> prepareRootProps() { <mask> const defaultProps = { <mask> style: this.getInitialStyle().roundedInputGroup <mask> }; <mask> <mask> return computeProps(this.props, defaultProps); <mask> } <mask> render() { </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove : undefined } </s> add : undefined, }, </s> remove ref={c => (this._root = c)} </s> add ref={(c) => { this._root = c; }} </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props); </s> remove } else { newLabel.push(label); this.floatBack(); } } else { newLabel.push( React.createElement(Label, { </s> add return React.cloneElement(label, { </s> remove newLabel.push( React.createElement(Label, { ...labelProps, key: "newFLabel", float: true, style: labelStyle }) </s> add const labelStyle = StyleSheet.flatten( { fontSize: 15, lineHeight: 30 }, labelProps.style,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
ref={(c) => { this._root = c; }}
<mask> } <mask> render() { <mask> return ( <mask> <TouchableOpacity <mask> ref={c => (this._root = c)} <mask> {...this.prepareRootProps()} <mask> activeOpacity={1} <mask> > <mask> {this.renderChildren()} <mask> </TouchableOpacity> </s> Keeping the HOC types immutable and optimizing renderChildren Changed the component behavior so the original component is just cloned with new props, instead of creating a new one and appending to the children. Also optimized the renderChildren verification so rendering the icons would not run all children unnecessarily. </s> remove <Label {...labelProps}>{this.renderLabel(label, labelProps)}</Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} value={this.state.text} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> </s> add {this.renderLabel(labelChild, labelProps)} </Animated.View>, </s> remove style: this.getInitialStyle().roundedInputGroup </s> add style: this.getInitialStyle().roundedInputGroup, </s> remove if (this.props.floatingLabel && icon.length) { let isIcon = false; for (let i = 0; i < this.props.children.length; i++) { if (this.props.children[i].props.name) { isIcon = true; newChildren.push( <Icon key={[i]} {...this.props.children[i].props} /> ); } if (this.props.children[i].props.children) { newChildren.push( <Animated.View key="float" style={{ position: "absolute", left: this.props.last && isIcon ? 40 : this.props.last ? 15 : isIcon ? 26 : 0, right: 0, top: this.state.topAnim, opacity: this.state.opacAnim, paddingTop: Platform.OS === "ios" ? undefined : undefined, paddingBottom: Platform.OS === "ios" ? undefined : 12 }} > <Label {...labelProps}> {this.renderLabel(label, labelProps)} </Label> </Animated.View> ); newChildren.push( <Input ref={c => (this._inputRef = c)} key="l2" {...inputProps} onFocus={() => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }} onBlur={() => { inputProps.value ? this.setState({ isFocused: true }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }} onChangeText={text => { this.setState({ text }); inputProps.onChangeText && inputProps.onChangeText(text); }} /> ); } </s> add if (this.props.floatingLabel) { const hasIcon = icon && icon.length; if (hasIcon) { icon.forEach((iconItem) => { newChildren.push(<Icon key={iconItem.key} {...iconItem.props} />); }); </s> remove let inputProps = {}; _.remove(childrenArray, item => { if (item.type.displayName === "Styled(Input)") { inputProps = item.props; </s> add _.remove(childrenArray, (item) => { if (item.type.displayName === 'Styled(Input)') { </s> remove key: "newLabel" }) ); </s> add key: 'newFLabel', float: true, style: labelStyle, }); } this.floatBack(); return label; } return React.cloneElement(label, { ...labelProps, key: 'newLabel', }); } renderInput(inputElement, inputProps) { const props = { value: this.state.text, ...inputProps, ref: (c) => { this._inputRef = c; }, key: 'l2', onFocus: () => { this.setState({ isFocused: true }); inputProps.onFocus && inputProps.onFocus(); }, onBlur: () => { inputProps.value ? this.setState({ isFocused: true, }) : !this.state.text.length && this.setState({ isFocused: false }); inputProps.onBlur && inputProps.onBlur(); }, onChangeText: (text) => { this.setState({ text }); inputProps.onChangeText && this.inputProps.onChangeText(text); }, }; if (!inputElement) { return React.createElement(Input, props);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/495530b5f7412681b3003f4d0db3907627219391
src/basic/Item.js
import { baseFontSize } from '../../theme/tools/utils';
<mask> import { themeTools } from '../../theme'; <mask> import type { SafeAreaProps } from './../../components/types/ExtraProps'; <mask> import isNil from 'lodash.isnil'; <mask> <mask> export function calculatePaddingProps( </s> fix: safe area inset calculation with rem units </s> remove const baseFontSize = 16; </s> add export const baseFontSize = 16;
[ "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/49bbf90fc5b4bdbf6ac9d8633447464b4319ac5f
src/hooks/useSafeArea/utils.ts
if (typeof originalValue === 'string') { if (originalValue.endsWith('px')) { return parseInt(originalValue, 10) + parseInt(appliedInset, 10) + 'px'; } else if (originalValue.endsWith('rem')) { return ( parseFloat(originalValue) * baseFontSize + parseInt(appliedInset, 10) + 'px' ); } }
<mask> } else { <mask> // DOC: Handles case of auto inset <mask> appliedInset = inset; <mask> } <mask> return originalValue <mask> ? parseInt(originalValue, 10) + parseInt(appliedInset, 10) + 'px' <mask> : parseInt(appliedInset, 10) + 'px'; <mask> } <mask> <mask> export function calculatePaddingTop( </s> fix: safe area inset calculation with rem units </s> remove const baseFontSize = 16; </s> add export const baseFontSize = 16;
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/49bbf90fc5b4bdbf6ac9d8633447464b4319ac5f
src/hooks/useSafeArea/utils.ts
export const baseFontSize = 16;
<mask> } <mask> return index; <mask> } <mask> <mask> const baseFontSize = 16; <mask> <mask> const convertAbsoluteToRem = (px: number) => { <mask> return `${px / baseFontSize}rem`; <mask> }; <mask> </s> fix: safe area inset calculation with rem units
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/49bbf90fc5b4bdbf6ac9d8633447464b4319ac5f
src/theme/tools/utils.ts
WEB: 'web',
<mask> export const PLATFORM = { <mask> ANDROID: 'android', <mask> IOS: 'ios', <mask> MATERIAL: 'material', <mask> WEB: 'web' <mask> }; <mask> <mask> const deviceHeight = Dimensions.get('window').height; <mask> const deviceWidth = Dimensions.get('window').width; <mask> const platform = Platform.OS; </s> fix: checkbox fontsize and iconSize changed </s> remove bottomInset: 21 } } </s> add bottomInset: 21, }, }, </s> remove bottomInset: 21 } } </s> add bottomInset: 21, }, }, </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex(); </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex(); </s> remove return color(this.tabBgColor) .darken(0.03) .hex(); </s> add return color(this.tabBgColor).darken(0.03).hex();
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4a2b387f6ae3cd0457784185bf9e7cbcd1c499c9
src/theme/variables/commonColor.js
CheckboxIconSize: platform === PLATFORM.IOS ? 19 : 16,
<mask> CheckboxRadius: platform === PLATFORM.IOS ? 13 : 0, <mask> CheckboxBorderWidth: platform === PLATFORM.IOS ? 1 : 2, <mask> CheckboxPaddingLeft: platform === PLATFORM.IOS ? 4 : 2, <mask> CheckboxPaddingBottom: platform === PLATFORM.IOS ? 0 : 5, <mask> CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16, <mask> CheckboxIconMarginTop: platform === PLATFORM.IOS ? undefined : 1, <mask> CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17, <mask> checkboxBgColor: '#039BE5', <mask> checkboxSize: 20, <mask> checkboxTickColor: '#fff', </s> fix: checkbox fontsize and iconSize changed </s> remove CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16, </s> add CheckboxIconSize: platform === PLATFORM.IOS ? 19 : 16, </s> remove CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17, </s> add CheckboxFontSize: platform === PLATFORM.IOS ? 12 / 0.9 : 17, </s> remove CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17, </s> add CheckboxFontSize: platform === PLATFORM.IOS ? 12 / 0.9 : 17, </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex(); </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex();
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4a2b387f6ae3cd0457784185bf9e7cbcd1c499c9
src/theme/variables/commonColor.js
CheckboxFontSize: platform === PLATFORM.IOS ? 12 / 0.9 : 17,
<mask> CheckboxPaddingLeft: platform === PLATFORM.IOS ? 4 : 2, <mask> CheckboxPaddingBottom: platform === PLATFORM.IOS ? 0 : 5, <mask> CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16, <mask> CheckboxIconMarginTop: platform === PLATFORM.IOS ? undefined : 1, <mask> CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17, <mask> checkboxBgColor: '#039BE5', <mask> checkboxSize: 20, <mask> checkboxTickColor: '#fff', <mask> <mask> // Color </s> fix: checkbox fontsize and iconSize changed </s> remove CheckboxFontSize: platform === PLATFORM.IOS ? 23 / 0.9 : 17, </s> add CheckboxFontSize: platform === PLATFORM.IOS ? 12 / 0.9 : 17, </s> remove CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16, </s> add CheckboxIconSize: platform === PLATFORM.IOS ? 19 : 16, </s> remove CheckboxIconSize: platform === PLATFORM.IOS ? 21 : 16, </s> add CheckboxIconSize: platform === PLATFORM.IOS ? 19 : 16, </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex(); </s> remove return color(this.toolbarDefaultBg) .darken(0.2) .hex(); </s> add return color(this.toolbarDefaultBg).darken(0.2).hex();
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/4a2b387f6ae3cd0457784185bf9e7cbcd1c499c9
src/theme/variables/commonColor.js