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
_text: _text, ...child.props,
<mask> index: ind, <mask> py: spacing, <mask> }, <mask> child.props.children <mask> ); <mask> }); <mask> return ( </s> fix: updated theme and styling approch </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, ...props, ul: true, py: spacing, }, child.props.children ); } </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/List.tsx
<VStack ref={ref} {...newProps}>
<mask> child.props.children <mask> ); <mask> }); <mask> return ( <mask> <VStack ref={ref} {...themeProps.listStyle} {...props}> <mask> {children} <mask> </VStack> <mask> ); <mask> }; <mask> </s> fix: updated theme and styling approch </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack> </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}> </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove // </Box> </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/List.tsx
import { useThemeProps } from '../../../hooks';
<mask> import React from 'react'; <mask> import { IIconProps, default as Icon } from '../Icon'; <mask> <mask> const ListIcon = React.memo((props: IIconProps) => { <mask> const newProps = useThemeProps('List', props); <mask> </s> fix: updated theme and styling approch </s> remove return <Icon mr={2} {...props} />; </s> add const newProps = useThemeProps('List', props); return <Icon mr={2} {...newProps} />; </s> remove import Text from '../Text'; </s> add </s> remove import Box from '../Box'; </s> add </s> remove // import Box from '../Box'; </s> add </s> remove import List from './list'; </s> add import { List, ListItem, ListIcon } from './list';
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListIcon.tsx
const newProps = useThemeProps('List', props); return <Icon mr={2} {...newProps} />;
<mask> import React from 'react'; <mask> import { IIconProps, default as Icon } from '../Icon'; <mask> <mask> const ListIcon = React.memo((props: IIconProps) => { <mask> return <Icon mr={2} {...props} />; <mask> }); <mask> <mask> export default React.memo(ListIcon); </s> fix: updated theme and styling approch </s> remove import List from './list'; </s> add import { List, ListItem, ListIcon } from './list'; </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove import Text from '../Text'; </s> add </s> remove import Box from '../Box'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListIcon.tsx
<mask> import React from 'react'; <mask> import Box from '../Box'; <mask> import Text from '../Text'; <mask> import type { IListItemProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const ListItem = React.memo(({ children, ...props }: IListItemProps) => { </s> fix: updated theme and styling approch </s> remove import { findProps } from './utils'; </s> add </s> remove import Box from '../Box'; </s> add </s> remove // import Box from '../Box'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import { findProps } from './utils'; </s> add
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
<mask> import Box from '../Box'; <mask> import Text from '../Text'; <mask> import type { IListItemProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const ListItem = React.memo(({ children, ...props }: IListItemProps) => { <mask> const themeProps = useThemeProps('List', props); <mask> let [textProps, remainingProps, layoutProps, borderProps] = findProps(props); <mask> const startNum = remainingProps.start ? remainingProps.start : 1; // Ordered list starting number </s> fix: updated theme and styling approch </s> remove const themeProps = useThemeProps('List', props); let [textProps, remainingProps, layoutProps, borderProps] = findProps(props); const startNum = remainingProps.start ? remainingProps.start : 1; // Ordered list starting number </s> add const { index, start, unordered, ul, ordered, ol, _text, borderTopWidth, ...newProps } = useThemeProps('ListItem', props); </s> remove import Text from '../Text'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove // import Box from '../Box'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
const { index, start, unordered, ul, ordered, ol, _text, borderTopWidth, ...newProps } = useThemeProps('ListItem', props);
<mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const ListItem = React.memo(({ children, ...props }: IListItemProps) => { <mask> const themeProps = useThemeProps('List', props); <mask> let [textProps, remainingProps, layoutProps, borderProps] = findProps(props); <mask> const startNum = remainingProps.start ? remainingProps.start : 1; // Ordered list starting number <mask> <mask> return ( <mask> <Box <mask> flexDirection="row" <mask> alignItems="center" </s> fix: updated theme and styling approch </s> remove import { findProps } from './utils'; </s> add </s> remove import Text from '../Text'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove // import Box from '../Box'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
{...newProps} borderTopWidth={index ? borderTopWidth : 0}
<mask> return ( <mask> <Box <mask> flexDirection="row" <mask> alignItems="center" <mask> {...themeProps.listItemStyle} <mask> {...borderProps} <mask> {...layoutProps} <mask> > <mask> <Box flexDirection="row" alignItems="center" {...remainingProps} pl={2}> <mask> {remainingProps.unordered || remainingProps.ul ? ( //Adding disc in front of ListItem <mask> <Text <mask> {...themeProps.listItemNumberingStyle} </s> fix: updated theme and styling approch </s> remove <Box flexDirection="row" alignItems="center" {...remainingProps} pl={2}> {remainingProps.unordered || remainingProps.ul ? ( //Adding disc in front of ListItem <Text {...themeProps.listItemNumberingStyle} {...textProps} </s> add <Box flexDirection="row" alignItems="center" pl={2}> {ul || unordered ? ( //Adding disc in front of ListItem <Box </s> remove {remainingProps.ordered || remainingProps.ol ? ( //Adding index number in front of ListItem <Text mr={2} fontWeight="bold" {...textProps}> {remainingProps.index + startNum + '.'} </Text> </s> add {ol || ordered ? ( //Adding index number in front of ListItem <Box mr={2} _text={{ fontWeight: 'bold', ..._text }}> {index + start + '.'} </Box> </s> remove <Box flexDirection="row" alignItems="center" {...themeProps.listItemTextStyle} {...remainingProps} {...textProps} > </s> add <Box flexDirection="row" alignItems="center" _text={{ ..._text }}> </s> remove const themeProps = useThemeProps('List', props); let [textProps, remainingProps, layoutProps, borderProps] = findProps(props); const startNum = remainingProps.start ? remainingProps.start : 1; // Ordered list starting number </s> add const { index, start, unordered, ul, ordered, ol, _text, borderTopWidth, ...newProps } = useThemeProps('ListItem', props); </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
<Box flexDirection="row" alignItems="center" pl={2}> {ul || unordered ? ( //Adding disc in front of ListItem <Box
<mask> {...themeProps.listItemStyle} <mask> {...borderProps} <mask> {...layoutProps} <mask> > <mask> <Box flexDirection="row" alignItems="center" {...remainingProps} pl={2}> <mask> {remainingProps.unordered || remainingProps.ul ? ( //Adding disc in front of ListItem <mask> <Text <mask> {...themeProps.listItemNumberingStyle} <mask> {...textProps} <mask> style={{ transform: [{ scale: 1.5 }] }} <mask> > <mask> {`\u2022`} <mask> </Text> <mask> ) : null} </s> fix: updated theme and styling approch </s> remove {...themeProps.listItemStyle} {...borderProps} {...layoutProps} </s> add {...newProps} borderTopWidth={index ? borderTopWidth : 0} </s> remove {remainingProps.ordered || remainingProps.ol ? ( //Adding index number in front of ListItem <Text mr={2} fontWeight="bold" {...textProps}> {remainingProps.index + startNum + '.'} </Text> </s> add {ol || ordered ? ( //Adding index number in front of ListItem <Box mr={2} _text={{ fontWeight: 'bold', ..._text }}> {index + start + '.'} </Box> </s> remove <Box flexDirection="row" alignItems="center" {...themeProps.listItemTextStyle} {...remainingProps} {...textProps} > </s> add <Box flexDirection="row" alignItems="center" _text={{ ..._text }}> </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}> </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
{ol || ordered ? ( //Adding index number in front of ListItem <Box mr={2} _text={{ fontWeight: 'bold', ..._text }}> {index + start + '.'} </Box>
<mask> > <mask> {`\u2022`} <mask> </Text> <mask> ) : null} <mask> {remainingProps.ordered || remainingProps.ol ? ( //Adding index number in front of ListItem <mask> <Text mr={2} fontWeight="bold" {...textProps}> <mask> {remainingProps.index + startNum + '.'} <mask> </Text> <mask> ) : null} <mask> </Box> <mask> <Box <mask> flexDirection="row" <mask> alignItems="center" </s> fix: updated theme and styling approch </s> remove <Box flexDirection="row" alignItems="center" {...themeProps.listItemTextStyle} {...remainingProps} {...textProps} > </s> add <Box flexDirection="row" alignItems="center" _text={{ ..._text }}> </s> remove <Box flexDirection="row" alignItems="center" {...remainingProps} pl={2}> {remainingProps.unordered || remainingProps.ul ? ( //Adding disc in front of ListItem <Text {...themeProps.listItemNumberingStyle} {...textProps} </s> add <Box flexDirection="row" alignItems="center" pl={2}> {ul || unordered ? ( //Adding disc in front of ListItem <Box </s> remove {...themeProps.listItemStyle} {...borderProps} {...layoutProps} </s> add {...newProps} borderTopWidth={index ? borderTopWidth : 0} </s> remove const themeProps = useThemeProps('List', props); let [textProps, remainingProps, layoutProps, borderProps] = findProps(props); const startNum = remainingProps.start ? remainingProps.start : 1; // Ordered list starting number </s> add const { index, start, unordered, ul, ordered, ol, _text, borderTopWidth, ...newProps } = useThemeProps('ListItem', props); </s> remove import { findProps } from './utils'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
<Box flexDirection="row" alignItems="center" _text={{ ..._text }}>
<mask> {remainingProps.index + startNum + '.'} <mask> </Text> <mask> ) : null} <mask> </Box> <mask> <Box <mask> flexDirection="row" <mask> alignItems="center" <mask> {...themeProps.listItemTextStyle} <mask> {...remainingProps} <mask> {...textProps} <mask> > <mask> {children} <mask> </Box> <mask> </Box> <mask> ); <mask> }); </s> fix: updated theme and styling approch </s> remove {remainingProps.ordered || remainingProps.ol ? ( //Adding index number in front of ListItem <Text mr={2} fontWeight="bold" {...textProps}> {remainingProps.index + startNum + '.'} </Text> </s> add {ol || ordered ? ( //Adding index number in front of ListItem <Box mr={2} _text={{ fontWeight: 'bold', ..._text }}> {index + start + '.'} </Box> </s> remove <Box flexDirection="row" alignItems="center" {...remainingProps} pl={2}> {remainingProps.unordered || remainingProps.ul ? ( //Adding disc in front of ListItem <Text {...themeProps.listItemNumberingStyle} {...textProps} </s> add <Box flexDirection="row" alignItems="center" pl={2}> {ul || unordered ? ( //Adding disc in front of ListItem <Box </s> remove // </Box> </s> add </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack> </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/ListItem.tsx
<mask> import React from 'react'; <mask> import { VStack } from '../Stack'; <mask> import Box from '../Box'; <mask> import type { IListProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const OrderedList = ({ style, children, spacing, ...props }: IListProps) => { </s> fix: updated theme and styling approch </s> remove // import Box from '../Box'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import Text from '../Text'; </s> add </s> remove import { findProps } from './utils'; </s> add
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<mask> import { VStack } from '../Stack'; <mask> import Box from '../Box'; <mask> import type { IListProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const OrderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> let childrenArray = React.Children.toArray(children); <mask> const themeProps = useThemeProps('List', props); </s> fix: updated theme and styling approch </s> remove import { findProps } from './utils'; </s> add </s> remove import Box from '../Box'; </s> add </s> remove // import Box from '../Box'; </s> add </s> remove let childrenArray = React.Children.toArray(children); const themeProps = useThemeProps('List', props); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
const { _text, start, ...newProps } = useThemeProps('List', props);
<mask> import { useThemeProps } from '../../../hooks'; <mask> <mask> const OrderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> return React.cloneElement( <mask> child, <mask> { </s> fix: updated theme and styling approch </s> remove let childrenArray = React.Children.toArray(children); const themeProps = useThemeProps('List', props); </s> add </s> remove const themeProps = useThemeProps('List', props); let childrenArray = React.Children.toArray(children); </s> add </s> remove let childrenArray = React.Children.toArray(children); </s> add </s> remove const themeProps = useThemeProps('List', props); </s> add const { _text, ...newProps } = useThemeProps('List', props);
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<mask> import { findProps } from './utils'; <mask> <mask> const OrderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> let childrenArray = React.Children.toArray(children); <mask> const themeProps = useThemeProps('List', props); <mask> <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> if (ind === childrenArray.length - 1) { <mask> return React.cloneElement( <mask> child, <mask> { </s> fix: updated theme and styling approch </s> remove const themeProps = useThemeProps('List', props); let childrenArray = React.Children.toArray(children); </s> add </s> remove let childrenArray = React.Children.toArray(children); </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, py: spacing, }, child.props.children ); } </s> add </s> remove const themeProps = useThemeProps('List', props); </s> add const { _text, ...newProps } = useThemeProps('List', props);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<mask> let childrenArray = React.Children.toArray(children); <mask> const themeProps = useThemeProps('List', props); <mask> <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> if (ind === childrenArray.length - 1) { <mask> return React.cloneElement( <mask> child, <mask> { <mask> ...themeProps.lastListItemStyle, <mask> ...child.props, <mask> ...props, <mask> ol: true, <mask> py: spacing, <mask> index: ind, <mask> }, <mask> child.props.children <mask> ); <mask> } <mask> return React.cloneElement( <mask> child, <mask> { ...child.props, ...props, ol: true, py: spacing, index: ind }, <mask> child.props.children <mask> ); </s> fix: updated theme and styling approch </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, ...props, ul: true, py: spacing, }, child.props.children ); } </s> add </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, py: spacing, }, child.props.children ); } </s> add </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add
[ "keep", "keep", "keep", "keep", "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/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
{ ol: true, index: ind, py: spacing, _text, start, ...child.props, },
<mask> ); <mask> } <mask> return React.cloneElement( <mask> child, <mask> { ...child.props, ...props, ol: true, py: spacing, index: ind }, <mask> child.props.children <mask> ); <mask> }); <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); <mask> return ( </s> fix: updated theme and styling approch </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, ...props, ul: true, py: spacing, }, child.props.children ); } </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<mask> { ...child.props, ...props, ol: true, py: spacing, index: ind }, <mask> child.props.children <mask> ); <mask> }); <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); <mask> return ( <mask> <Box <mask> style={style} <mask> {...layoutProps} <mask> {...themeProps.listStyle} </s> fix: updated theme and styling approch </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<VStack style={style} {...newProps}> {children} </VStack>
<mask> ); <mask> }); <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); <mask> return ( <mask> <Box <mask> style={style} <mask> {...layoutProps} <mask> {...themeProps.listStyle} <mask> {...borderProps} <mask> > <mask> <VStack {...remainingProps}>{children}</VStack> <mask> </Box> <mask> ); <mask> }; <mask> <mask> export default React.memo(OrderedList); </s> fix: updated theme and styling approch </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}> </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove <VStack ref={ref} {...themeProps.listStyle} {...props}> </s> add <VStack ref={ref} {...newProps}> </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, },
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Ordered.tsx
<mask> import React from 'react'; <mask> import { VStack } from '../Stack'; <mask> // import Box from '../Box'; <mask> import type { IListProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const UnorderedList = ({ style, children, spacing, ...props }: IListProps) => { </s> fix: updated theme and styling approch </s> remove import Box from '../Box'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import Text from '../Text'; </s> add </s> remove import { findProps } from './utils'; </s> add
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<mask> import { VStack } from '../Stack'; <mask> // import Box from '../Box'; <mask> import type { IListProps } from './types'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { findProps } from './utils'; <mask> <mask> const UnorderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> const themeProps = useThemeProps('List', props); <mask> let childrenArray = React.Children.toArray(children); </s> fix: updated theme and styling approch </s> remove import { findProps } from './utils'; </s> add </s> remove // import Box from '../Box'; </s> add </s> remove import Box from '../Box'; </s> add </s> remove const themeProps = useThemeProps('List', props); let childrenArray = React.Children.toArray(children); </s> add </s> remove const themeProps = useThemeProps('List', props); </s> add const { _text, ...newProps } = useThemeProps('List', props);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
const { _text, ...newProps } = useThemeProps('List', props);
<mask> <mask> const UnorderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> return React.cloneElement( <mask> child, </s> fix: updated theme and styling approch </s> remove const themeProps = useThemeProps('List', props); let childrenArray = React.Children.toArray(children); </s> add </s> remove let childrenArray = React.Children.toArray(children); const themeProps = useThemeProps('List', props); </s> add </s> remove let childrenArray = React.Children.toArray(children); </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, py: spacing, }, child.props.children ); } </s> add
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<mask> import { findProps } from './utils'; <mask> <mask> const UnorderedList = ({ style, children, spacing, ...props }: IListProps) => { <mask> // add props to children <mask> const themeProps = useThemeProps('List', props); <mask> let childrenArray = React.Children.toArray(children); <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> if (ind === childrenArray.length - 1) { <mask> return React.cloneElement( <mask> child, <mask> { </s> fix: updated theme and styling approch </s> remove let childrenArray = React.Children.toArray(children); const themeProps = useThemeProps('List', props); </s> add </s> remove let childrenArray = React.Children.toArray(children); </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, py: spacing, }, child.props.children ); } </s> add </s> remove const themeProps = useThemeProps('List', props); </s> add const { _text, ...newProps } = useThemeProps('List', props);
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<mask> // add props to children <mask> const themeProps = useThemeProps('List', props); <mask> let childrenArray = React.Children.toArray(children); <mask> children = React.Children.map(children, (child: any, ind: number) => { <mask> if (ind === childrenArray.length - 1) { <mask> return React.cloneElement( <mask> child, <mask> { <mask> index: ind, <mask> ...themeProps.lastListItemStyle, <mask> ...props, <mask> ul: true, <mask> py: spacing, <mask> }, <mask> child.props.children <mask> ); <mask> } <mask> return React.cloneElement( <mask> child, <mask> { index: ind, ...props, ul: true, py: spacing }, <mask> child.props.children <mask> ); </s> fix: updated theme and styling approch </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, py: spacing, }, child.props.children ); } </s> add </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove let childrenArray = React.Children.toArray(children); </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
{ index: ind, ul: true, py: spacing, _text: _text, ...child.props, },
<mask> ); <mask> } <mask> return React.cloneElement( <mask> child, <mask> { index: ind, ...props, ul: true, py: spacing }, <mask> child.props.children <mask> ); <mask> }); <mask> <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> fix: updated theme and styling approch </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { index: ind, ...themeProps.lastListItemStyle, ...props, ul: true, py: spacing, }, child.props.children ); } </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<mask> child.props.children <mask> ); <mask> }); <mask> <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); <mask> <mask> return ( <mask> // <Box> <mask> <VStack <mask> style={style} <mask> {...themeProps.listStyle} </s> fix: updated theme and styling approch </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}> </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack> </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, }, </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, },
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<VStack style={style} {...newProps}>
<mask> <mask> let [, remainingProps, layoutProps, borderProps] = findProps(props); <mask> <mask> return ( <mask> // <Box> <mask> <VStack <mask> style={style} <mask> {...themeProps.listStyle} <mask> {...layoutProps} <mask> {...borderProps} <mask> {...remainingProps} <mask> > <mask> {children} <mask> </VStack> <mask> // </Box> <mask> ); <mask> }; </s> fix: updated theme and styling approch </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack> </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove let [, remainingProps, layoutProps, borderProps] = findProps(props); </s> add </s> remove // </Box> </s> add </s> remove <VStack ref={ref} {...themeProps.listStyle} {...props}> </s> add <VStack ref={ref} {...newProps}>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
<mask> {...remainingProps} <mask> > <mask> {children} <mask> </VStack> <mask> // </Box> <mask> ); <mask> }; <mask> <mask> export default React.memo(UnorderedList); </s> fix: updated theme and styling approch </s> remove // <Box> <VStack style={style} {...themeProps.listStyle} {...layoutProps} {...borderProps} {...remainingProps} > </s> add <VStack style={style} {...newProps}> </s> remove <Box style={style} {...layoutProps} {...themeProps.listStyle} {...borderProps} > <VStack {...remainingProps}>{children}</VStack> </Box> </s> add <VStack style={style} {...newProps}> {children} </VStack> </s> remove <Box flexDirection="row" alignItems="center" {...themeProps.listItemTextStyle} {...remainingProps} {...textProps} > </s> add <Box flexDirection="row" alignItems="center" _text={{ ..._text }}> </s> remove <VStack ref={ref} {...themeProps.listStyle} {...props}> </s> add <VStack ref={ref} {...newProps}> </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {};
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/Unordered.tsx
import type { ViewStyle } from 'react-native'; import type { IStackProps } from '../Stack';
<mask> import type { ScrollViewProps, ViewStyle } from 'react-native'; <mask> import type { <mask> BorderProps, <mask> ColorProps, <mask> LayoutProps, <mask> SpaceProps, <mask> TypographyProps, <mask> } from 'styled-system'; <mask> import type { IBoxProps } from '../Box'; <mask> import type { <mask> customBorderProps, <mask> customBackgroundProps, <mask> customOutlineProps, </s> fix: updated theme and styling approch </s> remove import type { customBorderProps, customBackgroundProps, customOutlineProps, customLayoutProps, customExtraProps, customTypographyProps, } from '../../../utils/customProps'; </s> add </s> remove import Box from '../Box'; </s> add </s> remove import Text from '../Text'; </s> add </s> remove // import Box from '../Box'; </s> add </s> remove import { findProps } from './utils'; </s> add
[ "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/types.ts
<mask> SpaceProps, <mask> TypographyProps, <mask> } from 'styled-system'; <mask> import type { IBoxProps } from '../Box'; <mask> import type { <mask> customBorderProps, <mask> customBackgroundProps, <mask> customOutlineProps, <mask> customLayoutProps, <mask> customExtraProps, <mask> customTypographyProps, <mask> } from '../../../utils/customProps'; <mask> import type { IIconProps } from '../Icon/types'; <mask> <mask> export type IListProps = ScrollViewProps & <mask> ColorProps & <mask> SpaceProps & </s> fix: updated theme and styling approch </s> remove export type IListProps = ScrollViewProps & ColorProps & SpaceProps & LayoutProps & TypographyProps & customTypographyProps & customBorderProps & customExtraProps & customOutlineProps & customLayoutProps & customBackgroundProps & BorderProps & { style?: ViewStyle; spacing?: number; children: JSX.Element[] | JSX.Element; unordered?: boolean; ul?: boolean; ordered?: boolean; ol?: boolean; start?: number; }; </s> add export type IListProps = IStackProps & { style?: ViewStyle; spacing?: number; children: JSX.Element[] | JSX.Element; unordered?: boolean; ul?: boolean; ordered?: boolean; ol?: boolean; start?: number; }; </s> remove import type { ScrollViewProps, ViewStyle } from 'react-native'; import type { BorderProps, ColorProps, LayoutProps, SpaceProps, TypographyProps, } from 'styled-system'; </s> add import type { ViewStyle } from 'react-native'; import type { IStackProps } from '../Stack'; </s> remove fontSize?: any; </s> add </s> remove import Box from '../Box'; </s> add </s> remove // import Box from '../Box'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/types.ts
export type IListProps = IStackProps & { style?: ViewStyle; spacing?: number; children: JSX.Element[] | JSX.Element; unordered?: boolean; ul?: boolean; ordered?: boolean; ol?: boolean; start?: number; };
<mask> customTypographyProps, <mask> } from '../../../utils/customProps'; <mask> import type { IIconProps } from '../Icon/types'; <mask> <mask> export type IListProps = ScrollViewProps & <mask> ColorProps & <mask> SpaceProps & <mask> LayoutProps & <mask> TypographyProps & <mask> customTypographyProps & <mask> customBorderProps & <mask> customExtraProps & <mask> customOutlineProps & <mask> customLayoutProps & <mask> customBackgroundProps & <mask> BorderProps & { <mask> style?: ViewStyle; <mask> spacing?: number; <mask> children: JSX.Element[] | JSX.Element; <mask> unordered?: boolean; <mask> ul?: boolean; <mask> ordered?: boolean; <mask> ol?: boolean; <mask> start?: number; <mask> }; <mask> <mask> export type IListItemProps = IBoxProps & { <mask> fontSize?: any; <mask> unordered?: boolean; <mask> ul?: boolean; </s> fix: updated theme and styling approch </s> remove fontSize?: any; </s> add </s> remove import type { customBorderProps, customBackgroundProps, customOutlineProps, customLayoutProps, customExtraProps, customTypographyProps, } from '../../../utils/customProps'; </s> add </s> remove import type { ScrollViewProps, ViewStyle } from 'react-native'; import type { BorderProps, ColorProps, LayoutProps, SpaceProps, TypographyProps, } from 'styled-system'; </s> add import type { ViewStyle } from 'react-native'; import type { IStackProps } from '../Stack'; </s> remove import Text from '../Text'; </s> add </s> remove import Box from '../Box'; </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/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/types.ts
<mask> start?: number; <mask> }; <mask> <mask> export type IListItemProps = IBoxProps & { <mask> fontSize?: any; <mask> unordered?: boolean; <mask> ul?: boolean; <mask> ordered?: boolean; <mask> ol?: boolean; <mask> index?: any; </s> fix: updated theme and styling approch </s> remove export type IListProps = ScrollViewProps & ColorProps & SpaceProps & LayoutProps & TypographyProps & customTypographyProps & customBorderProps & customExtraProps & customOutlineProps & customLayoutProps & customBackgroundProps & BorderProps & { style?: ViewStyle; spacing?: number; children: JSX.Element[] | JSX.Element; unordered?: boolean; ul?: boolean; ordered?: boolean; ol?: boolean; start?: number; }; </s> add export type IListProps = IStackProps & { style?: ViewStyle; spacing?: number; children: JSX.Element[] | JSX.Element; unordered?: boolean; ul?: boolean; ordered?: boolean; ol?: boolean; start?: number; }; </s> remove import type { customBorderProps, customBackgroundProps, customOutlineProps, customLayoutProps, customExtraProps, customTypographyProps, } from '../../../utils/customProps'; </s> add </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove import type { ScrollViewProps, ViewStyle } from 'react-native'; import type { BorderProps, ColorProps, LayoutProps, SpaceProps, TypographyProps, } from 'styled-system'; </s> add import type { ViewStyle } from 'react-native'; import type { IStackProps } 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/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/components/primitives/List/types.ts
import { List, ListItem, ListIcon } from './list';
<mask> import TextArea from './textarea'; <mask> import Toast from './toast'; <mask> import { Fade, ScaleFade, Slide, SlideFade } from './transitions'; <mask> import Wrap from './wrap'; <mask> import List from './list'; <mask> <mask> export default { <mask> Accordion, <mask> AccordionItem, <mask> AccordionIcon, </s> fix: updated theme and styling approch </s> remove import Box from '../Box'; </s> add </s> remove import type { ScrollViewProps, ViewStyle } from 'react-native'; import type { BorderProps, ColorProps, LayoutProps, SpaceProps, TypographyProps, } from 'styled-system'; </s> add import type { ViewStyle } from 'react-native'; import type { IStackProps } from '../Stack'; </s> remove // import Box from '../Box'; </s> add </s> remove import Text from '../Text'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/index.ts
ListItem, ListIcon,
<mask> Input, <mask> Kbd, <mask> Link, <mask> List, <mask> Menu, <mask> MenuGroup, <mask> MenuItem, <mask> Modal, <mask> NumberInput, </s> fix: updated theme and styling approch </s> remove import List from './list'; </s> add import { List, ListItem, ListIcon } from './list'; </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove import Text from '../Text'; </s> add </s> remove import { findProps } from './utils'; </s> add </s> remove import Box from '../Box'; </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/index.ts
// const defaultProps = { // listStyle: { // borderWidth: 1, // borderColor: 'gray.300', // borderRadius: 'lg', // }, // listItemStyle: { // borderBottomWidth: 1, // borderColor: 'gray.300', // }, // lastListItemStyle: { // borderBottomWidth: 0, // borderRadius: 'lg', // }, // listItemNumberingStyle: { // mr: 2, // fontWeight: 'bold', // }, // listItemTextStyle: { // fontWeight: 'bold', // flex: 1, // pr: 2, // }, // }; // export default { defaultProps }; ///// New Area // List export const List = { baseStyle: {
<mask> const defaultProps = { <mask> listStyle: { <mask> borderWidth: 1, <mask> borderColor: 'gray.300', <mask> borderRadius: 6, <mask> borderBottomWidth: 0, <mask> }, </s> fix: updated theme and styling approch </s> remove borderRadius: 6, borderBottomWidth: 0, </s> add borderRadius: 'lg', </s> remove listItemStyle: { borderBottomWidth: 1, </s> add }; // ListItem export const ListItem = { baseStyle: { borderTopWidth: 1, </s> remove lastListItemStyle: { borderRadius: 6, }, listItemNumberingStyle: { mr: 2, fontWeight: 'bold', }, listItemTextStyle: { fontWeight: 'bold', flex: 1, pr: 2, </s> add defaultProps: { start: 1, </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add
[ "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/list.ts
borderRadius: 'lg',
<mask> const defaultProps = { <mask> listStyle: { <mask> borderWidth: 1, <mask> borderColor: 'gray.300', <mask> borderRadius: 6, <mask> borderBottomWidth: 0, <mask> }, <mask> listItemStyle: { <mask> borderBottomWidth: 1, <mask> borderColor: 'gray.300', <mask> }, </s> fix: updated theme and styling approch </s> remove listItemStyle: { borderBottomWidth: 1, </s> add }; // ListItem export const ListItem = { baseStyle: { borderTopWidth: 1, </s> remove const defaultProps = { listStyle: { </s> add // const defaultProps = { // listStyle: { // borderWidth: 1, // borderColor: 'gray.300', // borderRadius: 'lg', // }, // listItemStyle: { // borderBottomWidth: 1, // borderColor: 'gray.300', // }, // lastListItemStyle: { // borderBottomWidth: 0, // borderRadius: 'lg', // }, // listItemNumberingStyle: { // mr: 2, // fontWeight: 'bold', // }, // listItemTextStyle: { // fontWeight: 'bold', // flex: 1, // pr: 2, // }, // }; // export default { defaultProps }; ///// New Area // List export const List = { baseStyle: { </s> remove lastListItemStyle: { borderRadius: 6, }, listItemNumberingStyle: { mr: 2, fontWeight: 'bold', }, listItemTextStyle: { fontWeight: 'bold', flex: 1, pr: 2, </s> add defaultProps: { start: 1, </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove if (ind === childrenArray.length - 1) { return React.cloneElement( child, { ...themeProps.lastListItemStyle, ...child.props, ...props, ol: true, py: spacing, index: ind, }, child.props.children ); } </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/list.ts
}; // ListItem export const ListItem = { baseStyle: { borderTopWidth: 1,
<mask> borderColor: 'gray.300', <mask> borderRadius: 6, <mask> borderBottomWidth: 0, <mask> }, <mask> listItemStyle: { <mask> borderBottomWidth: 1, <mask> borderColor: 'gray.300', <mask> }, <mask> lastListItemStyle: { <mask> borderRadius: 6, <mask> }, </s> fix: updated theme and styling approch </s> remove borderRadius: 6, borderBottomWidth: 0, </s> add borderRadius: 'lg', </s> remove const defaultProps = { listStyle: { </s> add // const defaultProps = { // listStyle: { // borderWidth: 1, // borderColor: 'gray.300', // borderRadius: 'lg', // }, // listItemStyle: { // borderBottomWidth: 1, // borderColor: 'gray.300', // }, // lastListItemStyle: { // borderBottomWidth: 0, // borderRadius: 'lg', // }, // listItemNumberingStyle: { // mr: 2, // fontWeight: 'bold', // }, // listItemTextStyle: { // fontWeight: 'bold', // flex: 1, // pr: 2, // }, // }; // export default { defaultProps }; ///// New Area // List export const List = { baseStyle: { </s> remove lastListItemStyle: { borderRadius: 6, }, listItemNumberingStyle: { mr: 2, fontWeight: 'bold', }, listItemTextStyle: { fontWeight: 'bold', flex: 1, pr: 2, </s> add defaultProps: { start: 1, </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, }, </s> remove { ...child.props, ...props, ol: true, py: spacing, index: ind }, </s> add { ol: true, index: ind, py: spacing, _text, start, ...child.props, },
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/list.ts
defaultProps: { start: 1,
<mask> listItemStyle: { <mask> borderBottomWidth: 1, <mask> borderColor: 'gray.300', <mask> }, <mask> lastListItemStyle: { <mask> borderRadius: 6, <mask> }, <mask> listItemNumberingStyle: { <mask> mr: 2, <mask> fontWeight: 'bold', <mask> }, <mask> listItemTextStyle: { <mask> fontWeight: 'bold', <mask> flex: 1, <mask> pr: 2, <mask> }, <mask> }; <mask> <mask> export default { defaultProps }; </s> fix: updated theme and styling approch </s> remove const defaultProps = { listStyle: { </s> add // const defaultProps = { // listStyle: { // borderWidth: 1, // borderColor: 'gray.300', // borderRadius: 'lg', // }, // listItemStyle: { // borderBottomWidth: 1, // borderColor: 'gray.300', // }, // lastListItemStyle: { // borderBottomWidth: 0, // borderRadius: 'lg', // }, // listItemNumberingStyle: { // mr: 2, // fontWeight: 'bold', // }, // listItemTextStyle: { // fontWeight: 'bold', // flex: 1, // pr: 2, // }, // }; // export default { defaultProps }; ///// New Area // List export const List = { baseStyle: { </s> remove listItemStyle: { borderBottomWidth: 1, </s> add }; // ListItem export const ListItem = { baseStyle: { borderTopWidth: 1, </s> remove borderRadius: 6, borderBottomWidth: 0, </s> add borderRadius: 'lg', </s> remove export default { defaultProps }; </s> add // ListIcon export const ListIcon = {}; </s> remove { index: ind, ...props, ul: true, py: spacing }, </s> add { index: ind, ul: true, py: spacing, _text: _text, ...child.props, },
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/list.ts
// ListIcon export const ListIcon = {};
<mask> pr: 2, <mask> }, <mask> }; <mask> <mask> export default { defaultProps }; </s> fix: updated theme and styling approch </s> remove lastListItemStyle: { borderRadius: 6, }, listItemNumberingStyle: { mr: 2, fontWeight: 'bold', }, listItemTextStyle: { fontWeight: 'bold', flex: 1, pr: 2, </s> add defaultProps: { start: 1, </s> remove const defaultProps = { listStyle: { </s> add // const defaultProps = { // listStyle: { // borderWidth: 1, // borderColor: 'gray.300', // borderRadius: 'lg', // }, // listItemStyle: { // borderBottomWidth: 1, // borderColor: 'gray.300', // }, // lastListItemStyle: { // borderBottomWidth: 0, // borderRadius: 'lg', // }, // listItemNumberingStyle: { // mr: 2, // fontWeight: 'bold', // }, // listItemTextStyle: { // fontWeight: 'bold', // flex: 1, // pr: 2, // }, // }; // export default { defaultProps }; ///// New Area // List export const List = { baseStyle: { </s> remove // </Box> </s> add </s> remove listItemStyle: { borderBottomWidth: 1, </s> add }; // ListItem export const ListItem = { baseStyle: { borderTopWidth: 1, </s> remove borderRadius: 6, borderBottomWidth: 0, </s> add borderRadius: 'lg',
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/350242d66ed92b8ff4ef49632737ca45a97c17f4
src/theme/components/list.ts
// Components //Baisc export * from './components/basic/ScrollView'; export * from './components/basic/FlatList'; export * from './components/basic/SectionList'; export * from './components/basic/StatusBar'; export * from './components/basic/KeyboardAvoidingView';
<mask> // Components; <mask> // export * from './components/composites/Accordion'; <mask> export * from './components/composites/Actionsheet'; <mask> export * from './components/composites/Alert'; <mask> // export * from './components/composites/AlertDialog'; <mask> // export * from './components/composites/AppBar'; </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove export function usePropsResolution(component: string, incomingProps: any) { const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ 'children', 'onPress', 'icon', 'onOpen', 'onClose', ]); </s> add export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) ); </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View);
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
example/storybook/stories/index.ts
<mask> import React, { memo, forwardRef } from 'react'; <mask> import { View } from 'react-native'; <mask> import styled from 'styled-components/native'; <mask> import { <mask> border, <mask> color, <mask> flexbox, <mask> layout, <mask> position, <mask> space, <mask> typography, <mask> } from 'styled-system'; <mask> import { usePropsResolution } from '../../../hooks'; <mask> import Text from './../Text'; <mask> import { <mask> customBackground, <mask> customBorder, </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View);
[ "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
import { makeStyledBox } from '../../../utils/styled';
<mask> typography, <mask> } from 'styled-system'; <mask> import { usePropsResolution } from '../../../hooks'; <mask> import Text from './../Text'; <mask> import { <mask> customBackground, <mask> customBorder, <mask> customExtra, <mask> customLayout, <mask> customOutline, <mask> customPosition, <mask> customShadow, <mask> customTypography, <mask> } from '../../../utils/customProps'; <mask> import type { IBoxProps } from './types'; <mask> import { useSafeArea } from '../../../hooks/useSafeArea'; <mask> import { useNativeBaseConfig } from '../../../core/NativeBaseContext'; <mask> <mask> const getStyledBox = (Comp: any) => </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
const StyledBox = makeStyledBox(View);
<mask> import type { IBoxProps } from './types'; <mask> import { useSafeArea } from '../../../hooks/useSafeArea'; <mask> import { useNativeBaseConfig } from '../../../core/NativeBaseContext'; <mask> <mask> const getStyledBox = (Comp: any) => <mask> styled(Comp)<IBoxProps>( <mask> color, <mask> space, <mask> layout, <mask> flexbox, <mask> border, <mask> position, <mask> typography, <mask> customPosition, <mask> customBorder, <mask> customBackground, <mask> customOutline, <mask> customShadow, <mask> customExtra, <mask> customTypography, <mask> customLayout <mask> ); <mask> <mask> const StyledBox = getStyledBox(View); <mask> <mask> let MemoizedGradient: any = undefined; <mask> <mask> const Box = ({ children, ...props }: IBoxProps, ref: any) => { <mask> // const { _text, ...resolvedProps } = useThemeProps('Box', props); </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add </s> remove export function usePropsResolution(component: string, incomingProps: any) { const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ 'children', 'onPress', 'icon', 'onOpen', 'onClose', ]); </s> add export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) );
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep"...
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
MemoizedGradient = makeStyledBox(Gradient);
<mask> resolvedProps.backgroundColor?.linearGradient; <mask> <mask> if (Gradient) { <mask> if (!MemoizedGradient) { <mask> MemoizedGradient = getStyledBox(Gradient); <mask> } <mask> <mask> Gradient = MemoizedGradient; <mask> <mask> return ( </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
let startObj = { x: 1, y: 0 }; let endObj = { x: 0, y: 1 }; if (lgrad.start && lgrad.start.length === 2) { startObj = { x: lgrad.start[0], y: lgrad.start[1], }; } if (lgrad.end && lgrad.end.length === 2) { endObj = { x: lgrad.end[0], y: lgrad.end[1], }; }
<mask> <mask> Gradient = MemoizedGradient; <mask> <mask> return ( <mask> <Gradient <mask> ref={ref} <mask> {...safeAreaProps} <mask> colors={lgrad.colors} <mask> start={startObj} </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove start={lgrad.start} end={lgrad.end} </s> add start={startObj} end={endObj} </s> remove MemoizedGradient = getStyledBox(Gradient); </s> add MemoizedGradient = makeStyledBox(Gradient); </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove export function usePropsResolution(component: string, incomingProps: any) { const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ 'children', 'onPress', 'icon', 'onOpen', 'onClose', ]); </s> add export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) ); </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled';
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
start={startObj} end={endObj}
<mask> <Gradient <mask> ref={ref} <mask> {...safeAreaProps} <mask> colors={lgrad.colors} <mask> start={lgrad.start} <mask> end={lgrad.end} <mask> locations={lgrad.locations} <mask> > <mask> {React.Children.map(children, (child) => <mask> typeof child === 'string' ? <Text {..._text}>{child}</Text> : child <mask> )} </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled';
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/components/primitives/Box/index.tsx
export { useStyledSystemPropsResolver } from './useStyledSystemPropsResolver';
<mask> export { useNativeBase } from './useNativeBase'; <mask> export { useMediaQuery } from './useMediaQuery'; <mask> export { useBreakpointValue } from './useBreakpointValue'; <mask> export { usePlatformProps } from './usePlatformProps'; <mask> export { <mask> useControllableProp, <mask> useControllableState, <mask> } from './useControllableProp'; </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove // Components; </s> add // Components //Baisc export * from './components/basic/ScrollView'; export * from './components/basic/FlatList'; export * from './components/basic/SectionList'; export * from './components/basic/StatusBar'; export * from './components/basic/KeyboardAvoidingView';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/hooks/index.ts
export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) );
<mask> * @arg {string} component - Name of the component. <mask> * @arg {object} incomingProps - Props passed by the user. <mask> * @returns {object} Resolved props. <mask> */ <mask> export function usePropsResolution(component: string, incomingProps: any) { <mask> const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ <mask> 'children', <mask> 'onPress', <mask> 'icon', <mask> 'onOpen', <mask> 'onClose', <mask> ]); <mask> const { theme } = useNativeBase(); <mask> const colorModeProps = useColorMode(); <mask> <mask> const componentTheme = get(theme, `components.${component}`, {}); <mask> const notComponentTheme = omit(theme, ['components']); </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove // Components; </s> add // Components //Baisc export * from './components/basic/ScrollView'; export * from './components/basic/FlatList'; export * from './components/basic/SectionList'; export * from './components/basic/StatusBar'; export * from './components/basic/KeyboardAvoidingView'; </s> remove MemoizedGradient = getStyledBox(Gradient); </s> add MemoizedGradient = makeStyledBox(Gradient);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/hooks/useThemeProps/usePropsResolution.tsx
export * from './components/basic';
<mask> } from './components/primitives'; <mask> <mask> export * from './components/primitives/Icon/Icons'; <mask> export * from './theme'; <mask> export * from './core'; <mask> export * from './hooks'; <mask> export * from './factory'; <mask> </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove // Components; </s> add // Components //Baisc export * from './components/basic/ScrollView'; export * from './components/basic/FlatList'; export * from './components/basic/SectionList'; export * from './components/basic/StatusBar'; export * from './components/basic/KeyboardAvoidingView'; </s> remove export function usePropsResolution(component: string, incomingProps: any) { const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ 'children', 'onPress', 'icon', 'onOpen', 'onClose', ]); </s> add export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) ); </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/index.tsx
import FlatList from './flatList'; import KeyboardAvoidingView from './keyboardAvoidingView'; import ScrollView from './scrollView'; import SectionList from './sectionList'; import StatusBar from './statusBar';
<mask> import Checkbox from './checkbox'; <mask> import Box from './box'; <mask> import CircularProgress from './circular-progress'; <mask> import Code from './code'; <mask> import Container from './container'; <mask> import HStack from './hstack'; <mask> import VStack from './vstack'; </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled'; </s> remove const getStyledBox = (Comp: any) => styled(Comp)<IBoxProps>( color, space, layout, flexbox, border, position, typography, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customTypography, customLayout ); const StyledBox = getStyledBox(View); </s> add const StyledBox = makeStyledBox(View); </s> remove // Components; </s> add // Components //Baisc export * from './components/basic/ScrollView'; export * from './components/basic/FlatList'; export * from './components/basic/SectionList'; export * from './components/basic/StatusBar'; export * from './components/basic/KeyboardAvoidingView';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/theme/components/index.ts
FlatList, KeyboardAvoidingView, ScrollView, SectionList, StatusBar,
<mask> <mask> export default { <mask> Accordion, <mask> AccordionItem, <mask> AccordionIcon, <mask> AccordionSummary, <mask> AccordionDetails, </s> Feat/basic components (#3737) * feat: added ScrollView and KAV * feat: added new basic compoents with examples * fix: theme mapping updated * fix: added theme file * fix: added refs </s> remove export function usePropsResolution(component: string, incomingProps: any) { const [ignoredProps, cleanIncomingProps] = extractInObject(incomingProps, [ 'children', 'onPress', 'icon', 'onOpen', 'onClose', ]); </s> add export function usePropsResolution( component: string, incomingProps: any, config?: any ) { const [ignoredProps, cleanIncomingProps] = extractInObject( incomingProps, ['children', 'onPress', 'icon', 'onOpen', 'onClose'].concat( config?.ignoreProps || [] ) ); </s> remove import styled from 'styled-components/native'; import { border, color, flexbox, layout, position, space, typography, } from 'styled-system'; </s> add </s> remove import { customBackground, customBorder, customExtra, customLayout, customOutline, customPosition, customShadow, customTypography, } from '../../../utils/customProps'; </s> add import { makeStyledBox } from '../../../utils/styled';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35208e8627fceea19baf7bc48b5553ef76435245
src/theme/components/index.ts
color:variables.btnDisabledBg}, "NativeBase.Icon":{ color:variables.btnDisabledBg}, "NativeBase.IconNB":{
<mask> ".transparent":{ <mask> backgroundColor:null, <mask> "NativeBase.Text":{ <mask> color:variables.btnDisabledBg}}, <mask> <mask> <mask> "NativeBase.Icon":{ <mask> color:variables.brandLight}, </s> Fixed theme for disabled button with icon
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35938a62eb4a1da6120511fcba03c0b612a0ac5d
dist/src/theme/components/Button.js
"NativeBase.Icon":{ color:variables.brandLight}, "NativeBase.IconNB":{ color:variables.brandLight},
<mask> <mask> <mask> backgroundColor:variables.btnDisabledBg}, <mask> <mask> '.bordered':_extends({ <mask> '.dark':_extends({}, <mask> darkCommon,{ </s> Fixed theme for disabled button with icon
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35938a62eb4a1da6120511fcba03c0b612a0ac5d
dist/src/theme/components/Button.js
}, "NativeBase.Icon": { color: variables.btnDisabledBg }, "NativeBase.IconNB": { color: variables.btnDisabledBg
<mask> ".transparent": { <mask> backgroundColor: null, <mask> "NativeBase.Text": { <mask> color: variables.btnDisabledBg <mask> } <mask> }, <mask> "NativeBase.Icon": { <mask> color: variables.brandLight </s> Fixed theme for disabled button with icon
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35938a62eb4a1da6120511fcba03c0b612a0ac5d
src/theme/components/Button.js
"NativeBase.Icon": { color: variables.brandLight }, "NativeBase.IconNB": { color: variables.brandLight },
<mask> } <mask> }, <mask> backgroundColor: variables.btnDisabledBg <mask> }, <mask> '.bordered': { <mask> '.dark': { <mask> ...darkCommon, <mask> backgroundColor: 'transparent', </s> Fixed theme for disabled button with icon
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/35938a62eb4a1da6120511fcba03c0b612a0ac5d
src/theme/components/Button.js
"@types/use-sync-external-store": "^0.0.3",
<mask> "@types/lodash.pick": "^4.4.6", <mask> "@types/react": "^16.9.19", <mask> "@types/react-native": "~0.63.2", <mask> "@types/tinycolor2": "^1.4.2", <mask> "@types/use-subscription": "^1.0.0", <mask> "babel-plugin-transform-remove-console": "^6.9.4", <mask> "commitlint": "^8.3.5", <mask> "eslint": "^7.10.0", <mask> "eslint-config-prettier": "^6.11.0", <mask> "eslint-plugin-prettier": "^3.1.3", </s> refactor: replaces use-subscription with use-sync-external-store migrates to use-sync-external-store to support react 18 and nextjs </s> remove "use-subscription": "^1.8.0" </s> add "use-sync-external-store": "^1.2.0" </s> remove let value = await colorModeManager.get(initialColorMode); </s> add const value = await colorModeManager.get(initialColorMode); </s> remove return useSubscription(subscription); </s> add return useSyncExternalStore( subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue ); </s> remove import { useSubscription } from 'use-subscription'; </s> add import { useSyncExternalStore } from 'use-sync-external-store/shim';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/36c8102e1c19eca5d40be0d6f08423242278a411
package.json
"use-sync-external-store": "^1.2.0"
<mask> "lodash.omitby": "^4.6.0", <mask> "lodash.pick": "^4.4.0", <mask> "stable-hash": "^0.0.2", <mask> "tinycolor2": "^1.4.2", <mask> "use-subscription": "^1.8.0" <mask> }, <mask> "directories": { <mask> "example": "example", <mask> "lib": "lib" <mask> }, </s> refactor: replaces use-subscription with use-sync-external-store migrates to use-sync-external-store to support react 18 and nextjs </s> remove import { useSubscription } from 'use-subscription'; </s> add import { useSyncExternalStore } from 'use-sync-external-store/shim'; </s> remove let value = await colorModeManager.get(initialColorMode); </s> add const value = await colorModeManager.get(initialColorMode); </s> remove "@types/use-subscription": "^1.0.0", </s> add "@types/use-sync-external-store": "^0.0.3", </s> remove return useSubscription(subscription); </s> add return useSyncExternalStore( subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/36c8102e1c19eca5d40be0d6f08423242278a411
package.json
import { useSyncExternalStore } from 'use-sync-external-store/shim';
<mask> } from './types'; <mask> import { HybridContext } from './../hybrid-overlay/Context'; <mask> import type { IHybridContextProps } from './../hybrid-overlay/types'; <mask> import { AppState, useColorScheme as _useColorScheme } from 'react-native'; <mask> import { useSubscription } from 'use-subscription'; <mask> import { useNativeBaseConfig } from '../NativeBaseContext'; <mask> <mask> export const useColorMode = (): IColorModeContextProps => { <mask> const { <mask> colorMode: colorModeContext, </s> refactor: replaces use-subscription with use-sync-external-store migrates to use-sync-external-store to support react 18 and nextjs </s> remove let value = await colorModeManager.get(initialColorMode); </s> add const value = await colorModeManager.get(initialColorMode); </s> remove return useSubscription(subscription); </s> add return useSyncExternalStore( subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue ); </s> remove "use-subscription": "^1.8.0" </s> add "use-sync-external-store": "^1.2.0" </s> remove "@types/use-subscription": "^1.0.0", </s> add "@types/use-sync-external-store": "^0.0.3",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/36c8102e1c19eca5d40be0d6f08423242278a411
src/core/color-mode/hooks.tsx
return useSyncExternalStore( subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue );
<mask> } else { <mask> // This if statement technically breaks the rules of hooks, but is safe <mask> // because the condition never changes after mounting. <mask> // eslint-disable-next-line react-hooks/rules-of-hooks <mask> return useSubscription(subscription); <mask> } <mask> }; <mask> <mask> export const useColorScheme = () => { <mask> const colorScheme = _useColorScheme(); </s> refactor: replaces use-subscription with use-sync-external-store migrates to use-sync-external-store to support react 18 and nextjs </s> remove let value = await colorModeManager.get(initialColorMode); </s> add const value = await colorModeManager.get(initialColorMode); </s> remove import { useSubscription } from 'use-subscription'; </s> add import { useSyncExternalStore } from 'use-sync-external-store/shim'; </s> remove "use-subscription": "^1.8.0" </s> add "use-sync-external-store": "^1.2.0" </s> remove "@types/use-subscription": "^1.0.0", </s> add "@types/use-sync-external-store": "^0.0.3",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/36c8102e1c19eca5d40be0d6f08423242278a411
src/core/color-mode/hooks.tsx
const value = await colorModeManager.get(initialColorMode);
<mask> // For initial setting initial color mode from storage <mask> useEffect(() => { <mask> if (colorModeManager) { <mask> (async function getMode() { <mask> let value = await colorModeManager.get(initialColorMode); <mask> if (value && value !== colorMode) { <mask> setRawMode(value); <mask> } <mask> })(); <mask> } </s> refactor: replaces use-subscription with use-sync-external-store migrates to use-sync-external-store to support react 18 and nextjs </s> remove import { useSubscription } from 'use-subscription'; </s> add import { useSyncExternalStore } from 'use-sync-external-store/shim'; </s> remove return useSubscription(subscription); </s> add return useSyncExternalStore( subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue ); </s> remove "use-subscription": "^1.8.0" </s> add "use-sync-external-store": "^1.2.0" </s> remove "@types/use-subscription": "^1.0.0", </s> add "@types/use-sync-external-store": "^0.0.3",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/36c8102e1c19eca5d40be0d6f08423242278a411
src/core/color-mode/hooks.tsx
* Function that returns a React Element. This element will be used as a Trigger for the menu.
<mask> import type { CustomProps } from '../../../components/types'; <mask> <mask> export interface InterfaceMenuProps extends InterfaceBoxProps<IMenuProps> { <mask> /** <mask> * Function that returns a React Element. This element will be used as a Trigger for the menu <mask> */ <mask> trigger: (_props: any, state: { open: boolean }) => JSX.Element; <mask> /** <mask> * This function will be invoked when menu is opened <mask> */ </s> fix: content changes in menu types </s> remove * This function will be invoked when menu is opened </s> add * This function will be invoked when the menu is opened. </s> remove * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. </s> add * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press. </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * Function called when selection changes </s> add * Function called when selection changes.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* This function will be invoked when the menu is opened.
<mask> * Function that returns a React Element. This element will be used as a Trigger for the menu <mask> */ <mask> trigger: (_props: any, state: { open: boolean }) => JSX.Element; <mask> /** <mask> * This function will be invoked when menu is opened <mask> */ <mask> onOpen?: () => void; <mask> /** <mask> * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. <mask> */ </s> fix: content changes in menu types </s> remove * Function that returns a React Element. This element will be used as a Trigger for the menu </s> add * Function that returns a React Element. This element will be used as a Trigger for the menu. </s> remove * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. </s> add * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * Props to be passed to Text </s> add * Props to be passed to Text. </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press.
<mask> * This function will be invoked when menu is opened <mask> */ <mask> onOpen?: () => void; <mask> /** <mask> * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. <mask> */ <mask> onClose?: () => void; <mask> /** <mask> * Whether menu should be closed when a menu item is pressed <mask> * @default true </s> fix: content changes in menu types </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * This function will be invoked when menu is opened </s> add * This function will be invoked when the menu is opened. </s> remove * Function that returns a React Element. This element will be used as a Trigger for the menu </s> add * Function that returns a React Element. This element will be used as a Trigger for the menu. </s> remove * If true, the menu will be opened by default </s> add * If true, the menu will be opened by default. </s> remove * Props to be passed to Text </s> add * Props to be passed to Text.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Whether menu should be closed when a menu item is pressed.
<mask> * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. <mask> */ <mask> onClose?: () => void; <mask> /** <mask> * Whether menu should be closed when a menu item is pressed <mask> * @default true <mask> */ <mask> closeOnSelect?: boolean; <mask> /** <mask> * If true, the menu will be opened by default </s> fix: content changes in menu types </s> remove * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. </s> add * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press. </s> remove * This function will be invoked when menu is opened </s> add * This function will be invoked when the menu is opened. </s> remove * If true, the menu will be opened by default </s> add * If true, the menu will be opened by default. </s> remove * Whether the menu is opened. Useful for conrolling the open state </s> add * Whether the menu is opened. Useful for controlling the open state. </s> remove * Function that returns a React Element. This element will be used as a Trigger for the menu </s> add * Function that returns a React Element. This element will be used as a Trigger for the menu.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* If true, the menu will be opened by default.
<mask> * @default true <mask> */ <mask> closeOnSelect?: boolean; <mask> /** <mask> * If true, the menu will be opened by default <mask> */ <mask> defaultIsOpen?: boolean; <mask> /** <mask> * Whether the menu is opened. Useful for conrolling the open state <mask> */ </s> fix: content changes in menu types </s> remove * Whether the menu is opened. Useful for conrolling the open state </s> add * Whether the menu is opened. Useful for controlling the open state. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * Props to be passed to Text </s> add * Props to be passed to Text. </s> remove * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. </s> add * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press. </s> remove * This function will be invoked when menu is opened </s> add * This function will be invoked when the menu is opened.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Whether the menu is opened. Useful for controlling the open state.
<mask> * If true, the menu will be opened by default <mask> */ <mask> defaultIsOpen?: boolean; <mask> /** <mask> * Whether the menu is opened. Useful for conrolling the open state <mask> */ <mask> isOpen?: boolean; <mask> /** <mask> * The additional offset applied along the cross axis between the element and its trigger element. <mask> */ </s> fix: content changes in menu types </s> remove * If true, the menu will be opened by default </s> add * If true, the menu will be opened by default. </s> remove * Determines whether menu content should overlap with the trigger </s> add * Determines whether menu content should overlap with the trigger. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * This function will be invoked when menu is opened </s> add * This function will be invoked when the menu is opened. </s> remove * Props to be passed to Text </s> add * Props to be passed to Text.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Determines whether menu content should overlap with the trigger.
<mask> * The additional offset applied along the main axis between the element and its trigger element. <mask> */ <mask> offset?: number; <mask> /** <mask> * Determines whether menu content should overlap with the trigger <mask> * @default false <mask> */ <mask> shouldOverlapWithTrigger?: boolean; <mask> /** <mask> * menu placement </s> fix: content changes in menu types </s> remove * Whether the menu is opened. Useful for conrolling the open state </s> add * Whether the menu is opened. Useful for controlling the open state. </s> remove * If true, the menu will be opened by default </s> add * If true, the menu will be opened by default. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * This function will be invoked when menu is closed. It'll also be called when user attempts to close the menu via Escape key or backdrop press. </s> add * This function will be invoked when menu is closed. It will also be called when the user attempts to close the menu via Escape key or backdrop press. </s> remove * The title of the menu group </s> add * The title of the menu group.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Children of Menu Item.
<mask> } <mask> <mask> export interface IMenuItemProps extends IPressableProps { <mask> /** <mask> * Children of Menu Item <mask> */ <mask> children: string | JSX.Element | Array<JSX.Element>; <mask> /** <mask> * Whether menu item is disabled <mask> */ </s> fix: content changes in menu types </s> remove * Whether menu item is disabled </s> add * Whether menu item is disabled. </s> remove * The children of Menu group </s> add * The children of the Menu group. </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature. </s> remove * The title of the menu group </s> add * The title of the menu group. </s> remove * Function called when selection changes </s> add * Function called when selection changes.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Whether menu item is disabled.
<mask> * Children of Menu Item <mask> */ <mask> children: string | JSX.Element | Array<JSX.Element>; <mask> /** <mask> * Whether menu item is disabled <mask> */ <mask> isDisabled?: boolean; <mask> /** <mask> * Props to be passed to Text <mask> */ </s> fix: content changes in menu types </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * Props to be passed to Text </s> add * Props to be passed to Text. </s> remove * The children of Menu group </s> add * The children of the Menu group. </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature. </s> remove * The value of the option group </s> add * The value of the option group.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Props to be passed to Text.
<mask> * Whether menu item is disabled <mask> */ <mask> isDisabled?: boolean; <mask> /** <mask> * Props to be passed to Text <mask> */ <mask> _text?: Partial<ITextProps>; <mask> /** <mask> * This value will be available for the typeahead menu feature <mask> */ </s> fix: content changes in menu types </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature. </s> remove * Whether menu item is disabled </s> add * Whether menu item is disabled. </s> remove * Whether menu should be closed when a menu item is pressed </s> add * Whether menu should be closed when a menu item is pressed. </s> remove * If true, the menu will be opened by default </s> add * If true, the menu will be opened by default. </s> remove * The title of the menu group </s> add * The title of the menu group.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* This value will be available for the typeahead menu feature.
<mask> * Props to be passed to Text <mask> */ <mask> _text?: Partial<ITextProps>; <mask> /** <mask> * This value will be available for the typeahead menu feature <mask> */ <mask> textValue?: string; <mask> } <mask> <mask> export interface IMenuItemOptionProps extends IMenuItemProps { </s> fix: content changes in menu types </s> remove * Props to be passed to Text </s> add * Props to be passed to Text. </s> remove * The title of the menu group </s> add * The title of the menu group. </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * Function that returns a React Element. This element will be used as a Trigger for the menu </s> add * Function that returns a React Element. This element will be used as a Trigger for the menu. </s> remove * Whether menu item is disabled </s> add * Whether menu item is disabled.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* The title of the menu group.
<mask> _text?: Partial<ITextProps>; <mask> } <mask> export interface IMenuGroupProps { <mask> /** <mask> * The title of the menu group <mask> */ <mask> title: string; <mask> /** <mask> * The children of Menu group <mask> */ </s> fix: content changes in menu types </s> remove * The children of Menu group </s> add * The children of the Menu group. </s> remove * This value will be available for the typeahead menu feature </s> add * This value will be available for the typeahead menu feature. </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * The initial value of the option group </s> add * The initial value of the option group. </s> remove * Function called when selection changes </s> add * Function called when selection changes.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* The children of the Menu group.
<mask> * The title of the menu group <mask> */ <mask> title: string; <mask> /** <mask> * The children of Menu group <mask> */ <mask> children: JSX.Element | Array<JSX.Element>; <mask> /** <mask> * Props to pass on to Text. <mask> */ </s> fix: content changes in menu types </s> remove * The title of the menu group </s> add * The title of the menu group. </s> remove * Whether menu item is disabled </s> add * Whether menu item is disabled. </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * The initial value of the option group </s> add * The initial value of the option group. </s> remove * The value of the option group </s> add * The value of the option group.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* The initial value of the option group.
<mask> * Used to add selection type of menu group. <mask> */ <mask> type: 'radio' | 'checkbox'; <mask> /** <mask> * The initial value of the option group <mask> */ <mask> defaultValue?: string | number | string[] | number[]; <mask> /** <mask> * The value of the option group <mask> */ </s> fix: content changes in menu types </s> remove * The value of the option group </s> add * The value of the option group. </s> remove * Function called when selection changes </s> add * Function called when selection changes. </s> remove * The children of Menu group </s> add * The children of the Menu group. </s> remove * The title of the menu group </s> add * The title of the menu group. </s> remove * Children of Menu Item </s> add * Children of Menu Item.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* The value of the option group.
<mask> * The initial value of the option group <mask> */ <mask> defaultValue?: string | number | string[] | number[]; <mask> /** <mask> * The value of the option group <mask> */ <mask> value?: string | number | Array<string> | Array<number>; <mask> /** <mask> * Function called when selection changes <mask> */ </s> fix: content changes in menu types </s> remove * The initial value of the option group </s> add * The initial value of the option group. </s> remove * Function called when selection changes </s> add * Function called when selection changes. </s> remove * The children of Menu group </s> add * The children of the Menu group. </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * Whether menu item is disabled </s> add * Whether menu item is disabled.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
* Function called when selection changes.
<mask> * The value of the option group <mask> */ <mask> value?: string | number | Array<string> | Array<number>; <mask> /** <mask> * Function called when selection changes <mask> */ <mask> onChange?: (val: any) => void; <mask> } <mask> <mask> export type IMenuOptionContextProps = { </s> fix: content changes in menu types </s> remove * The value of the option group </s> add * The value of the option group. </s> remove * The initial value of the option group </s> add * The initial value of the option group. </s> remove * Children of Menu Item </s> add * Children of Menu Item. </s> remove * Function that returns a React Element. This element will be used as a Trigger for the menu </s> add * Function that returns a React Element. This element will be used as a Trigger for the menu. </s> remove * The title of the menu group </s> add * The title of the menu group.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/375e9f342a8b5ccb6408e92131e6318df0bfc9e8
src/components/composites/Menu/types.ts
const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
<mask> groupItemInputProps.checked, <mask> groupItemInputProps.disabled, <mask> ]); <mask> <mask> const [contextCombinedProps] = React.useState({ <mask> ...checkboxGroupContext, <mask> ...combinedProps, <mask> }); <mask> return ( <mask> <CheckboxComponent <mask> inputProps={inputProps} <mask> combinedProps={contextCombinedProps} <mask> isInvalid={isInvalid} </s> fix: radio and checkbox dynamic size change </s> remove const [contextCombinedProps] = React.useState({ ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...checkboxGroupContext, ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3801923aee4cc6d6fbdaab286c88276ffec8cc9e
src/components/primitives/Checkbox/Checkbox.tsx
const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
<mask> groupItemInputProps.disabled, <mask> groupItemInputProps, <mask> ]); <mask> <mask> const [contextCombinedProps] = React.useState({ <mask> ...checkboxGroupContext, <mask> ...combinedProps, <mask> }); <mask> <mask> return ( <mask> <CheckboxComponent <mask> wrapperRef={wrapperRef} <mask> mergedRef={mergedRef} </s> fix: radio and checkbox dynamic size change </s> remove const [contextCombinedProps] = React.useState({ ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...checkboxGroupContext, ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3801923aee4cc6d6fbdaab286c88276ffec8cc9e
src/components/primitives/Checkbox/Checkbox.web.tsx
const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
<mask> radioState.inputProps.checked, <mask> radioState.inputProps.disabled, <mask> ]); <mask> <mask> const [contextCombinedProps] = React.useState({ <mask> ...combinedProps, <mask> }); <mask> <mask> //TODO: refactor for responsive prop <mask> if (useHasResponsiveProps(props)) { <mask> return null; <mask> } </s> fix: radio and checkbox dynamic size change </s> remove const [contextCombinedProps] = React.useState({ ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...checkboxGroupContext, ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]); </s> remove const [contextCombinedProps] = React.useState({ ...checkboxGroupContext, ...combinedProps, }); </s> add const contextCombinedProps = React.useMemo(() => { return { ...checkboxGroupContext, ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3801923aee4cc6d6fbdaab286c88276ffec8cc9e
src/components/primitives/Radio/Radio.tsx
const contextCombinedProps = React.useMemo(() => { return { ...combinedProps }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [combinedProps]);
<mask> radioState.inputProps.checked, <mask> radioState.inputProps.disabled, <mask> ]); <mask> <mask> const [contextCombinedProps] = React.useState({ <mask> ...combinedProps, <mask> }); <mask> <mask> //TODO: refactor for responsive prop <mask> if (useHasResponsiveProps(props)) { <mask> return null; <mask> } </s> fix: radio and checkbox dynamic size change
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3801923aee4cc6d6fbdaab286c88276ffec8cc9e
src/components/primitives/Radio/Radio.web.tsx
<mask> placeholderTextColor="blueGray.400" <mask> /> <mask> </Provider> <mask> ); <mask> const inputElement = getByTestId('test'); <mask> expect(inputElement.props.style.width).toBe('100%'); <mask> <mask> expect(inputElement.props.placeholderTextColor).toBe( <mask> defaultTheme.colors.blueGray['400'] <mask> ); <mask> expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); </s> add expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] ); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1);
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
const inputElement = getByTestId('test'); expect(inputElement.props.style[0].width).toBe('100%');
<mask> /> <mask> </Provider> <mask> ); <mask> <mask> expect(inputElement.props.placeholderTextColor).toBe( <mask> defaultTheme.colors.blueGray['400'] <mask> ); <mask> expect(inputElement.props.style[0].marginLeft).toBe( <mask> defaultTheme.space['3'] <mask> ); </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); </s> add expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] ); </s> remove const inputElement = getByTestId('test'); expect(inputElement.props.style.width).toBe('100%'); </s> add </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1);
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] );
<mask> <mask> expect(inputElement.props.placeholderTextColor).toBe( <mask> defaultTheme.colors.blueGray['400'] <mask> ); <mask> expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); <mask> expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); <mask> }); <mask> <mask> it('Input: color mode', () => { <mask> const newTheme = extendTheme({ <mask> config: { initialColorMode: 'dark' }, </s> fix: usepropresolution test cases fixes </s> remove const inputElement = getByTestId('test'); expect(inputElement.props.style.width).toBe('100%'); </s> add </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.xs );
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm );
<mask> /> <mask> </Provider> <mask> ); <mask> const inputElement = getByTestId('test'); <mask> expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); <mask> }); <mask> <mask> it('Input: variant', () => { <mask> const { getByTestId } = render( <mask> <Provider> </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.xs ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); </s> add expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] ); </s> remove const inputElement = getByTestId('test'); expect(inputElement.props.style.width).toBe('100%'); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
expect(inputElement.props.style[0].borderBottomWidth).toBe(1);
<mask> <Input testID="test" variant="underlined" /> <mask> </Provider> <mask> ); <mask> const inputElement = getByTestId('test'); <mask> expect(inputElement.props.style.borderBottomWidth).toBe(1); <mask> }); <mask> <mask> // it('Input: inputElements', () => { <mask> // const { getByTestId } = render( <mask> // <Provider> </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.xs ); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); </s> add expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] ); </s> remove const inputElement = getByTestId('test'); expect(inputElement.props.style.width).toBe('100%'); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
expect(inputElement.props.style[0].borderBottomWidth).toBe(1);
<mask> /> <mask> </Provider> <mask> ); <mask> const inputElement = getByTestId('test'); <mask> expect(inputElement.props.style.borderBottomWidth).toBe(1); <mask> // as input of 'sm' size is mapped to 'xs' fontsize <mask> expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); <mask> }); <mask> <mask> // it('Input: inputElemets', () => { </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.xs ); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove const inputElement = getByTestId('test'); expect(inputElement.props.style.width).toBe('100%'); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.xs );
<mask> ); <mask> const inputElement = getByTestId('test'); <mask> expect(inputElement.props.style.borderBottomWidth).toBe(1); <mask> // as input of 'sm' size is mapped to 'xs' fontsize <mask> expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.xs); <mask> }); <mask> <mask> // it('Input: inputElemets', () => { <mask> // const { getByTestId } = render( <mask> // <Provider> </s> fix: usepropresolution test cases fixes </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.borderBottomWidth).toBe(1); </s> add expect(inputElement.props.style[0].borderBottomWidth).toBe(1); </s> remove expect(inputElement.props.style.fontSize).toBe(defaultTheme.fontSizes.sm); </s> add expect(inputElement.props.style[0].fontSize).toBe( defaultTheme.fontSizes.sm ); </s> remove expect(inputElement.props.style.marginLeft).toBe(defaultTheme.space['3']); expect(inputElement.props.style.marginRight).toBe(defaultTheme.space['3']); </s> add expect(inputElement.props.style[0].marginLeft).toBe( defaultTheme.space['3'] ); expect(inputElement.props.style[0].marginRight).toBe( defaultTheme.space['3'] );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3885f8ba3d4a55e0a67340dfcf9a153d4a7de325
src/hooks/useThemeProps/usePropsResolution.test.tsx
isFocused: false,
<mask> class Item extends Component { <mask> constructor(props) { <mask> super(props); <mask> this.state = { <mask> isFocussed: true, <mask> text: '', <mask> topAnim: new Animated.Value(18), <mask> opacAnim: new Animated.Value(1) <mask> }; <mask> } </s> fix(item): Foating label with initial value (#2997) * fix(item): Foating label has incorrect styles when rendering an input with an initial value #2895 * use setState inside an effect function
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3924fa6b901b5d3cc315be64ffe11a9b8392556e
src/basic/Item.js
const effect = () => { this.setState({ isFocused: true }); };
<mask> if (this.props.floatingLabel) { <mask> if (this.inputProps && this.inputProps.value) { <mask> this.floatUp(-16); <mask> effect(); <mask> } <mask> if (this.inputProps && this.inputProps.getRef) <mask> this.inputProps.getRef(this._inputRef); <mask> } </s> fix(item): Foating label with initial value (#2997) * fix(item): Foating label has incorrect styles when rendering an input with an initial value #2895 * use setState inside an effect function </s> remove isFocussed: true, </s> add isFocused: false,
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3924fa6b901b5d3cc315be64ffe11a9b8392556e
src/basic/Item.js
effect();
<mask> }; <mask> this.floatUp(-16); <mask> } <mask> if (this.inputProps && this.inputProps.getRef) <mask> this.inputProps.getRef(this._inputRef); <mask> } <mask> } <mask> </s> fix(item): Foating label with initial value (#2997) * fix(item): Foating label has incorrect styles when rendering an input with an initial value #2895 * use setState inside an effect function </s> remove isFocussed: true, </s> add isFocused: false,
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3924fa6b901b5d3cc315be64ffe11a9b8392556e
src/basic/Item.js
Input, Checkbox, Slider, Icon, HStack,
<mask> Spinner, <mask> Text, <mask> } from '../../components/primitives'; <mask> import { FormControl, Menu, Modal } from '../../components/composites'; <mask> import { Platform } from 'react-native'; <mask> import { extendTheme } from '../../core/extendTheme'; <mask> import { fireEvent } from '@testing-library/react-native'; <mask> import { InfoIcon } from '../../components/primitives/Icon/Icons'; </s> fix: test cases for input, slider, hstack and checkbox --no-verify </s> remove import { FormControl, Menu } from '../../components/composites'; </s> add import { FormControl, Menu, Modal } from '../../components/composites';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3938af98108de308beb3449b5a8033007f2a86bf
src/hooks/useThemeProps/usePropsResolution.test.tsx
import { FormControl, Menu, Modal } from '../../components/composites';
<mask> Image, <mask> Spinner, <mask> Text, <mask> } from '../../components/primitives'; <mask> import { FormControl, Menu } from '../../components/composites'; <mask> import { Platform } from 'react-native'; <mask> import { extendTheme } from '../../core/extendTheme'; <mask> import { fireEvent } from '@testing-library/react-native'; <mask> <mask> const inset = { </s> fix: test cases for input, slider, hstack and checkbox --no-verify
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3938af98108de308beb3449b5a8033007f2a86bf
src/hooks/useThemeProps/usePropsResolution.test.tsx
import { InfoIcon } from '../../components/primitives/Icon/Icons';
<mask> import { extendTheme } from '../../core/extendTheme'; <mask> import { fireEvent } from '@testing-library/react-native'; <mask> <mask> const inset = { <mask> frame: { x: 0, y: 0, width: 0, height: 0 }, <mask> insets: { top: 0, left: 0, right: 0, bottom: 0 }, </s> fix: test cases for input, slider, hstack and checkbox --no-verify </s> remove import { FormControl, Menu } from '../../components/composites'; </s> add import { FormControl, Menu, Modal } from '../../components/composites';
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/3938af98108de308beb3449b5a8033007f2a86bf
src/hooks/useThemeProps/usePropsResolution.test.tsx
import type { SpaceType, SizeType, ColorType } from '../components/types/utils';
<mask> import get from 'lodash.get'; <mask> import type { Properties as CSSProperties } from 'csstype'; <mask> import { transparentize } from './tools'; <mask> import type { ResponsiveValue } from '../components/types/responsiveValue'; <mask> import type { SpaceType, SizeType, ColorType } from '../components/types'; <mask> import type { ViewStyle } from 'react-native'; <mask> import type { ITheme } from './base'; <mask> <mask> type RNStyles = ViewStyle; <mask> </s> fix: generate type from styled system </s> remove type GetRNStyles<key extends any> = key extends keyof RNStyles </s> add type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles </s> remove type PropConfig = { [key: string]: PropRule }; </s> add </s> remove : any; </s> add : key extends keyof CSSProperties ? ResponsiveValue<CSSProperties[key]> : unknown; </s> remove console.log('hhf ', a); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
<mask> scale?: string; <mask> }; <mask> }; <mask> <mask> type PropConfig = { [key: string]: PropRule }; <mask> <mask> const propConfig = { <mask> ...flexbox, <mask> } as const; <mask> <mask> type StyledProps = typeof propConfig; </s> fix: generate type from styled system </s> remove console.log('hhf ', a); </s> add </s> remove : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? GetRNStyles<T[key]['properties']['0']> </s> add : T[key] extends PropRule ? 'shadow' extends key ? GetRNStyles<key, T[key]['scale']> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? //@ts-ignore GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown </s> remove type GetRNStyles<key extends any> = key extends keyof RNStyles </s> add type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
...space, ...color, ...extraProps,
<mask> }; <mask> <mask> const propConfig = { <mask> ...flexbox, <mask> } as const; <mask> <mask> type StyledProps = typeof propConfig; <mask> </s> fix: generate type from styled system </s> remove type PropConfig = { [key: string]: PropRule }; </s> add </s> remove console.log('hhf ', a); </s> add </s> remove type GetRNStyles<key extends any> = key extends keyof RNStyles </s> add type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles </s> remove import type { SpaceType, SizeType, ColorType } from '../components/types'; </s> add import type { SpaceType, SizeType, ColorType } from '../components/types/utils';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles
<mask> } as const; <mask> <mask> type StyledProps = typeof propConfig; <mask> <mask> type GetRNStyles<key extends any> = key extends keyof RNStyles <mask> ? RNStyles[key] <mask> : any; <mask> <mask> type AllProps<T extends any> = { <mask> [key in Extract<keyof T, string>]?: T[key] extends boolean </s> fix: generate type from styled system </s> remove : any; </s> add : key extends keyof CSSProperties ? ResponsiveValue<CSSProperties[key]> : unknown; </s> remove : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? GetRNStyles<T[key]['properties']['0']> </s> add : T[key] extends PropRule ? 'shadow' extends key ? GetRNStyles<key, T[key]['scale']> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? //@ts-ignore GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown </s> remove type PropConfig = { [key: string]: PropRule }; </s> add </s> remove console.log('hhf ', a); </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
: key extends keyof CSSProperties ? ResponsiveValue<CSSProperties[key]> : unknown;
<mask> type StyledProps = typeof propConfig; <mask> <mask> type GetRNStyles<key extends any> = key extends keyof RNStyles <mask> ? RNStyles[key] <mask> : any; <mask> <mask> type AllProps<T extends any> = { <mask> [key in Extract<keyof T, string>]?: T[key] extends boolean <mask> ? GetRNStyles<key> <mask> : 'property' extends keyof T[key] </s> fix: generate type from styled system </s> remove type GetRNStyles<key extends any> = key extends keyof RNStyles </s> add type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles </s> remove : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? GetRNStyles<T[key]['properties']['0']> </s> add : T[key] extends PropRule ? 'shadow' extends key ? GetRNStyles<key, T[key]['scale']> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? //@ts-ignore GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown </s> remove console.log('hhf ', a); </s> add </s> remove type PropConfig = { [key: string]: PropRule }; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
: T[key] extends PropRule ? 'shadow' extends key ? GetRNStyles<key, T[key]['scale']> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? //@ts-ignore GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown
<mask> <mask> type AllProps<T extends any> = { <mask> [key in Extract<keyof T, string>]?: T[key] extends boolean <mask> ? GetRNStyles<key> <mask> : 'property' extends keyof T[key] <mask> ? GetRNStyles<T[key]['property']> <mask> : 'properties' extends keyof T[key] <mask> ? T[key]['properties'] extends { '0': string } <mask> ? GetRNStyles<T[key]['properties']['0']> <mask> : unknown <mask> : unknown; <mask> }; <mask> <mask> const a: AllProps<StyledProps> = { </s> fix: generate type from styled system </s> remove : any; </s> add : key extends keyof CSSProperties ? ResponsiveValue<CSSProperties[key]> : unknown; </s> remove type GetRNStyles<key extends any> = key extends keyof RNStyles </s> add type GetThemeScaleValues<T extends keyof ITheme> = 'colors' extends T ? ColorType : ResponsiveValue<keyof ITheme[T] | (string & {}) | number>; type GetRNStyles<key, scale = null> = scale extends keyof ITheme ? GetThemeScaleValues<scale> : key extends keyof RNStyles </s> remove console.log('hhf ', a); </s> add </s> remove type PropConfig = { [key: string]: PropRule }; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts
shadow: '1',
<mask> <mask> const a: AllProps<StyledProps> = { <mask> flexDir: 'column', <mask> }; <mask> <mask> // type SpaceProps = { <mask> // [key in keyof typeof space]?: SpaceType; <mask> // }; </s> fix: generate type from styled system </s> remove console.log('hhf ', a); </s> add </s> remove type PropConfig = { [key: string]: PropRule }; </s> add </s> remove : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? GetRNStyles<T[key]['properties']['0']> </s> add : T[key] extends PropRule ? 'shadow' extends key ? GetRNStyles<key, T[key]['scale']> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends { '0': string } ? //@ts-ignore GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown </s> remove : any; </s> add : key extends keyof CSSProperties ? ResponsiveValue<CSSProperties[key]> : unknown;
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512
src/theme/types.ts