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 |
|---|---|---|---|---|
_disabled: {
opacity: '40', | <mask> };
<mask> }
<mask>
<mask> return {
<mask> _text: {
<mask> color: props.isDisabled
<mask> ? disabledTextColor(props)
<mask> : mode(`${c}.500`, `${c}.300`)(props),
<mask> },
<mask> bg: 'transparent',
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> _hover: {
<mask> borderColor: mode(`${c}.500`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
<mask> },
<mask> _focusVisible: {
<mask> borderColor: mode(`${c}.700`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove _focusVisible: {
borderColor: mode(`${c}.700`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _loading: {
opacity: '40', </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, </s> remove _spinner: {
size: 'sm',
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
}, </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_loading: {
opacity: '40', | <mask> _hover: {
<mask> borderColor: mode(`${c}.500`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
<mask> },
<mask> _focusVisible: {
<mask> borderColor: mode(`${c}.700`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
<mask> },
<mask> _pressed: {
<mask> borderColor: mode(`${c}.600`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, </s> remove _spinner: {
size: 'sm',
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
}, </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, | <mask> _focusVisible: {
<mask> borderColor: mode(`${c}.700`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
<mask> },
<mask> _pressed: {
<mask> borderColor: mode(`${c}.600`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
<mask> },
<mask> _spinner: {
<mask> size: 'sm',
<mask> },
<mask> };
</s> feat: _icon internal prop and design changes for button and divider </s> remove _focusVisible: {
borderColor: mode(`${c}.700`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _loading: {
opacity: '40', </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove _spinner: {
size: 'sm',
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
}, </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_dark: {
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
}, | <mask> _pressed: {
<mask> borderColor: mode(`${c}.600`, `${c}.200`)(props),
<mask> bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
<mask> },
<mask> _spinner: {
<mask> size: 'sm',
<mask> },
<mask> };
<mask> }
<mask>
<mask> function variantOutline(props: Dict) {
</s> feat: _icon internal prop and design changes for button and divider </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, </s> remove _focusVisible: {
borderColor: mode(`${c}.700`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _loading: {
opacity: '40', </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
function variantOutline({ colorScheme }: Dict) { | <mask> },
<mask> };
<mask> }
<mask>
<mask> function variantOutline(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> const borderColor = mode(`muted.200`, `muted.500`)(props);
<mask> return {
<mask> borderWidth: '1',
<mask> borderColor:
<mask> c === 'muted'
<mask> ? borderColor
</s> feat: _icon internal prop and design changes for button and divider </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove
return styleObject;
</s> add </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, | <mask> function variantOutline(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> const borderColor = mode(`muted.200`, `muted.500`)(props);
<mask> return {
<mask> borderWidth: '1',
<mask> borderColor:
<mask> c === 'muted'
<mask> ? borderColor
<mask> : props.isDisabled
<mask> ? disabledTextColor(props)
<mask> : mode(`${c}.300`, `${c}.300`)(props),
<mask> ...variantGhost(props),
<mask> };
<mask> }
<mask>
<mask> function variantSolid(props: Dict) {
<mask> const { colorScheme: c } = props;
</s> feat: _icon internal prop and design changes for button and divider </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove function variantLink(props: Dict) {
const { colorScheme: c } = props;
</s> add function variantLink({ colorScheme }: Dict) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', | <mask> ...variantGhost(props),
<mask> };
<mask> }
<mask>
<mask> function variantSolid(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> let bg = `${c}.500`;
<mask> if (props.isDisabled) {
<mask> bg = mode(`muted.300`, `muted.500`)(props);
<mask> }
<mask>
<mask> const styleObject = {
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> bg,
<mask> _hover: {
<mask> bg: `${c}.600`,
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { </s> remove color: color,
</s> add color: `${colorScheme}.900`, | [
"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/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
color: 'text.50', | <mask> const styleObject = {
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> bg,
<mask> _hover: {
<mask> bg: `${c}.600`,
<mask> },
<mask> _pressed: {
<mask> bg: `${c}.700`,
<mask> },
<mask> _focus: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove _pressed: {
bg: `${c}.700`,
</s> add _spinner: {
color: 'text.50', </s> remove _web: {
outlineWidth: '0',
</s> add _icon: {
color: `${colorScheme}.900`, </s> remove _focus: {
bg: `${c}.600`,
</s> add _disabled: {
opacity: '40', </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove color: color,
</s> add color: `${colorScheme}.900`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_spinner: {
color: 'text.50', | <mask> bg,
<mask> _hover: {
<mask> bg: `${c}.600`,
<mask> },
<mask> _pressed: {
<mask> bg: `${c}.700`,
<mask> },
<mask> _focus: {
<mask> bg: `${c}.600`,
<mask> },
<mask> _loading: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove _focus: {
bg: `${c}.600`,
</s> add _disabled: {
opacity: '40', </s> remove bg: mode(`warmGray.50`, `${c}.300`)(props),
opacity: '50',
</s> add opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_disabled: {
opacity: '40', | <mask> },
<mask> _pressed: {
<mask> bg: `${c}.700`,
<mask> },
<mask> _focus: {
<mask> bg: `${c}.600`,
<mask> },
<mask> _loading: {
<mask> bg: mode(`warmGray.50`, `${c}.300`)(props),
<mask> opacity: '50',
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg: mode(`warmGray.50`, `${c}.300`)(props),
opacity: '50',
</s> add opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, </s> remove _pressed: {
bg: `${c}.700`,
</s> add _spinner: {
color: 'text.50', </s> remove _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
</s> add </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, | <mask> _focus: {
<mask> bg: `${c}.600`,
<mask> },
<mask> _loading: {
<mask> bg: mode(`warmGray.50`, `${c}.300`)(props),
<mask> opacity: '50',
<mask> },
<mask> _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
<mask> };
<mask>
<mask> return styleObject;
</s> feat: _icon internal prop and design changes for button and divider </s> remove _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
</s> add </s> remove _focus: {
bg: `${c}.600`,
</s> add _disabled: {
opacity: '40', </s> remove
return styleObject;
</s> add </s> remove _pressed: {
bg: `${c}.700`,
</s> add _spinner: {
color: 'text.50', </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
<mask> _loading: {
<mask> bg: mode(`warmGray.50`, `${c}.300`)(props),
<mask> opacity: '50',
<mask> },
<mask> _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
<mask> };
<mask>
<mask> return styleObject;
<mask> }
<mask>
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg: mode(`warmGray.50`, `${c}.300`)(props),
opacity: '50',
</s> add opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, </s> remove _focus: {
bg: `${c}.600`,
</s> add _disabled: {
opacity: '40', </s> remove
return styleObject;
</s> add </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts | |
<mask> opacity: '50',
<mask> },
<mask> _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
<mask> };
<mask>
<mask> return styleObject;
<mask> }
<mask>
<mask> // function getBg(props: Record<string, any>) {
<mask> // const { theme, status, variant } = props;
<mask> // let { colorScheme } = props;
</s> feat: _icon internal prop and design changes for button and divider </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
</s> add </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove bg: mode(`warmGray.50`, `${c}.300`)(props),
opacity: '50',
</s> add opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts | |
function variantSubtle({ colorScheme }: Dict) {
return { | <mask>
<mask> return styleObject;
<mask> }
<mask>
<mask> // function getBg(props: Record<string, any>) {
<mask> // const { theme, status, variant } = props;
<mask> // let { colorScheme } = props;
<mask>
<mask> // colorScheme = getColorScheme(
<mask> // props,
<mask> // colorScheme !== 'primary' ? colorScheme : status
<mask> // );
<mask> // const lightBg =
<mask> // variant === 'solid'
<mask> // ? getColor(theme, `${colorScheme}.400`, colorScheme)
<mask> // : getColor(theme, `${colorScheme}.100`, colorScheme);
<mask>
<mask> // const darkBg =
<mask> // variant === 'solid'
<mask> // ? getColor(theme, `${colorScheme}.700`, colorScheme)
<mask> // : getColor(theme, `${colorScheme}.400`, colorScheme);
<mask> // return mode(lightBg, darkBg)(props);
<mask> // }
<mask>
<mask> function variantSubtle(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> let bg = `${c}.100`;
<mask> bg = mode(bg, `${c}.200`)(props);
<mask> let color;
<mask> if (props.isDisabled) {
<mask> bg = mode(`muted.300`, `muted.500`)(props);
<mask> } else {
<mask> color = mode(`${c}.500`, `${c}.600`)(props);
<mask> }
<mask> const styleObject = {
<mask> _text: {
<mask> color: color,
<mask> },
<mask> _web: {
<mask> outlineWidth: '0',
</s> feat: _icon internal prop and design changes for button and divider </s> remove
return styleObject;
</s> add </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove borderRadius: 'sm',
</s> add borderRadius: 'sm', // '4px' | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
color: `${colorScheme}.900`, | <mask> color = mode(`${c}.500`, `${c}.600`)(props);
<mask> }
<mask> const styleObject = {
<mask> _text: {
<mask> color: color,
<mask> },
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> bg,
</s> feat: _icon internal prop and design changes for button and divider </s> remove _web: {
outlineWidth: '0',
</s> add _icon: {
color: `${colorScheme}.900`, </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
color: `${colorScheme}.900`, | <mask> const styleObject = {
<mask> _text: {
<mask> color: color,
<mask> },
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> bg,
<mask> _hover: {
<mask> _text: { color: mode(`${c}.600`, `${c}.700`)(props) },
<mask> bg: mode(`${c}.200`, `${c}.300`)(props),
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove color: color,
</s> add color: `${colorScheme}.900`, </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | <mask> },
<mask> _web: {
<mask> outlineWidth: '0',
<mask> },
<mask> bg,
<mask> _hover: {
<mask> _text: { color: mode(`${c}.600`, `${c}.700`)(props) },
<mask> bg: mode(`${c}.200`, `${c}.300`)(props),
<mask> },
<mask> _pressed: {
<mask> _text: { color: mode(`${c}.700`, `${c}.800`)(props) },
<mask> bg: mode(`${c}.300`, `${c}.400`)(props),
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, </s> remove _web: {
outlineWidth: '0',
</s> add _icon: {
color: `${colorScheme}.900`, </s> remove bg,
_hover: {
bg: `${c}.600`,
</s> add _icon: {
color: 'text.50', </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, | <mask> _hover: {
<mask> _text: { color: mode(`${c}.600`, `${c}.700`)(props) },
<mask> bg: mode(`${c}.200`, `${c}.300`)(props),
<mask> },
<mask> _pressed: {
<mask> _text: { color: mode(`${c}.700`, `${c}.800`)(props) },
<mask> bg: mode(`${c}.300`, `${c}.400`)(props),
<mask> },
<mask> };
<mask>
<mask> return styleObject;
<mask> }
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove
return styleObject;
</s> add </s> remove _web: {
outlineWidth: '0',
</s> add _icon: {
color: `${colorScheme}.900`, </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.500`)(props) },
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
<mask> _text: { color: mode(`${c}.700`, `${c}.800`)(props) },
<mask> bg: mode(`${c}.300`, `${c}.400`)(props),
<mask> },
<mask> };
<mask>
<mask> return styleObject;
<mask> }
<mask>
<mask> function variantLink(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask>
</s> feat: _icon internal prop and design changes for button and divider </s> remove function variantLink(props: Dict) {
const { colorScheme: c } = props;
</s> add function variantLink({ colorScheme }: Dict) { </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts | |
function variantLink({ colorScheme }: Dict) { | <mask>
<mask> return styleObject;
<mask> }
<mask>
<mask> function variantLink(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask>
<mask> return {
<mask> ...variantGhost(props),
<mask> _text: {
<mask> textDecorationLine: Platform.select({
<mask> ios: 'underline',
</s> feat: _icon internal prop and design changes for button and divider </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove
return styleObject;
</s> add </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | <mask> function variantLink(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask>
<mask> return {
<mask> ...variantGhost(props),
<mask> _text: {
<mask> textDecorationLine: Platform.select({
<mask> ios: 'underline',
<mask> web: 'underline',
<mask> }),
<mask> color:
<mask> c === 'muted'
<mask> ? mode(`muted.800`, `${c}.200`)(props)
<mask> : props.isDisabled
<mask> ? disabledTextColor(props)
<mask> : mode(`${c}.500`, `${c}.300`)(props),
<mask> },
<mask> _hover: {
<mask> _text: {
<mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
</s> feat: _icon internal prop and design changes for button and divider </s> remove function variantLink(props: Dict) {
const { colorScheme: c } = props;
</s> add function variantLink({ colorScheme }: Dict) { </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove _focusVisible: {
</s> add _light: { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
<mask> : mode(`${c}.500`, `${c}.300`)(props),
<mask> },
<mask> _hover: {
<mask> _text: {
<mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
<mask> },
<mask> },
<mask> _focusVisible: {
<mask> _text: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove _focusVisible: {
</s> add _light: { </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
textDecorationLine: 'underline',
</s> add color: `${colorScheme}.600`, </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.500`)(props) },
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts | |
_light: { | <mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
<mask> },
<mask> },
<mask> _focusVisible: {
<mask> _text: {
<mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
<mask> },
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
textDecorationLine: 'underline',
</s> add color: `${colorScheme}.600`, </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.500`)(props) },
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
}, </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
color: `${colorScheme}.600`, | <mask> },
<mask> },
<mask> _focusVisible: {
<mask> _text: {
<mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
<mask> },
<mask> },
<mask> _pressed: {
<mask> _text: { color: mode(`${c}.700`, `${c}.500`)(props) },
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.500`)(props) },
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
}, </s> remove _focusVisible: {
</s> add _light: { </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add </s> remove _pressed: {
borderColor: mode(`${c}.600`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.300`, `${c}.500`)(props), 0.5)(props.theme),
</s> add _light: {
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
}, </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_dark: {
_text: {
color: `${colorScheme}.500`,
}, | <mask> color: mode(`${c}.600`, `${c}.400`)(props),
<mask> textDecorationLine: 'underline',
<mask> },
<mask> },
<mask> _pressed: {
<mask> _text: { color: mode(`${c}.700`, `${c}.500`)(props) },
<mask> },
<mask> };
<mask> }
<mask>
<mask> function variantUnstyled() {
</s> feat: _icon internal prop and design changes for button and divider </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
textDecorationLine: 'underline',
</s> add color: `${colorScheme}.600`, </s> remove _focusVisible: {
</s> add _light: { </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove _pressed: {
_text: { color: mode(`${c}.700`, `${c}.800`)(props) },
bg: mode(`${c}.300`, `${c}.400`)(props),
</s> add _light: {
bg: `${colorScheme}.100`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.300`,
},
},
_dark: {
bg: `${colorScheme}.300`,
_hover: {
bg: `${colorScheme}.200`,
},
_pressed: {
bg: `${colorScheme}.100`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
size: 'xs',
}, | <mask> fontSize: 'md',
<mask> },
<mask> },
<mask> md: {
<mask> px: '3',
<mask> py: '2',
<mask> _text: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove px: '2',
</s> add px: '3', </s> remove variant: 'solid',
</s> add variant: 'link', | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
size: 'xs',
}, | <mask> py: '2',
<mask> _text: {
<mask> fontSize: 'sm',
<mask> },
<mask> },
<mask> sm: {
<mask> px: '2',
<mask> py: '2',
<mask> _text: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove px: '2',
</s> add px: '3', </s> remove _spinner: {
size: 'sm',
</s> add _dark: {
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
}, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
size: 'xxs',
}, | <mask> fontSize: 'xs',
<mask> },
<mask> },
<mask> xs: {
<mask> px: '3',
<mask> py: '2',
<mask> _text: {
</s> feat: _icon internal prop and design changes for button and divider </s> remove px: '2',
</s> add px: '3', </s> remove bg,
_hover: {
_text: { color: mode(`${c}.600`, `${c}.700`)(props) },
bg: mode(`${c}.200`, `${c}.300`)(props),
</s> add _spinner: {
color: `${colorScheme}.900`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
px: '3', | <mask> fontSize: 'xs',
<mask> },
<mask> },
<mask> xs: {
<mask> px: '2',
<mask> py: '2',
<mask> _text: {
<mask> fontSize: '2xs',
<mask> },
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
textDecorationLine: 'underline',
</s> add color: `${colorScheme}.600`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
_icon: {
size: 'xxs',
}, | <mask> _text: {
<mask> fontSize: '2xs',
<mask> },
<mask> },
<mask> };
<mask>
<mask> const defaultProps = {
</s> feat: _icon internal prop and design changes for button and divider </s> remove px: '2',
</s> add px: '3', </s> remove variant: 'solid',
</s> add variant: 'link', | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
variant: 'link', | <mask> },
<mask> };
<mask>
<mask> const defaultProps = {
<mask> variant: 'solid',
<mask> size: 'md',
<mask> colorScheme: 'primary',
<mask> };
<mask>
<mask> export const ButtonGroup = {
</s> feat: _icon internal prop and design changes for button and divider </s> remove
return styleObject;
</s> add </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { </s> remove bg: mode('coolGray.200', 'gray.600')(props),
</s> add _light: {
bg: 'muted.300',
},
_dark: {
bg: 'muted.600',
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
<mask> import { mode } from '../tools';
<mask>
<mask> function baseStyle(props: Record<string, any>) {
<mask> const { orientation, thickness } = props;
<mask> const orientationProps =
<mask> orientation === 'vertical'
<mask> ? {
</s> feat: _icon internal prop and design changes for button and divider </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove
return styleObject;
</s> add </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/divider.ts | |
_light: {
bg: 'muted.300',
},
_dark: {
bg: 'muted.600',
}, | <mask> height: `${thickness}px`,
<mask> };
<mask>
<mask> return {
<mask> bg: mode('coolGray.200', 'gray.600')(props),
<mask> ...orientationProps,
<mask> };
<mask> }
<mask>
<mask> export default {
</s> feat: _icon internal prop and design changes for button and divider </s> remove variant: 'solid',
</s> add variant: 'link', </s> remove _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
</s> add </s> remove
return styleObject;
</s> add </s> remove function variantGhost(props: Dict) {
const { colorScheme: c } = props;
if (c === 'muted') {
return {
_text: {
color: disabledTextColor(props),
},
};
}
</s> add function variantGhost({ colorScheme }: Dict) { </s> remove
return styleObject;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/divider.ts |
import { useKeyboardBottomInset } from '../../../utils'; | <mask> import { AccessibilityInfo, Platform, SafeAreaView } from 'react-native';
<mask> import Box from '../../primitives/Box';
<mask> import { usePropsResolution } from '../../../hooks';
<mask> import type { IToastContext, IToastInfo, IToast, IToastProps } from './types';
<mask>
<mask> const INSET = 50;
<mask>
<mask> const POSITIONS = {
<mask> 'top': {
<mask> top: INSET,
</s> fix: toast keyboardavoiding view using bottom inset </s> remove <SafeAreaView>{toast.component}</SafeAreaView>
</s> add <SafeAreaView>
<Box
bottom={
['bottom', 'bottom-left', 'bottom-right'].includes(
position
)
? bottomInset + 'px'
: undefined
}
>
{toast.component}
</Box>
</SafeAreaView> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13218c711515acf7f4c7be97d52c38b8ed923273 | src/components/composites/Toast/Toast.tsx |
const bottomInset = useKeyboardBottomInset() * 2; | <mask> ToastContext
<mask> );
<mask>
<mask> const getPositions = () => {
<mask> return Object.keys(toastInfo);
<mask> };
<mask>
</s> fix: toast keyboardavoiding view using bottom inset </s> remove
</s> add import { useKeyboardBottomInset } from '../../../utils'; </s> remove <SafeAreaView>{toast.component}</SafeAreaView>
</s> add <SafeAreaView>
<Box
bottom={
['bottom', 'bottom-left', 'bottom-right'].includes(
position
)
? bottomInset + 'px'
: undefined
}
>
{toast.component}
</Box>
</SafeAreaView> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13218c711515acf7f4c7be97d52c38b8ed923273 | src/components/composites/Toast/Toast.tsx |
<SafeAreaView>
<Box
bottom={
['bottom', 'bottom-left', 'bottom-right'].includes(
position
)
? bottomInset + 'px'
: undefined
}
>
{toast.component}
</Box>
</SafeAreaView> | <mask> opacity: 0,
<mask> translateY: transitionConfig[position],
<mask> }}
<mask> >
<mask> <SafeAreaView>{toast.component}</SafeAreaView>
<mask> </PresenceTransition>
<mask> ))
<mask> }
<mask> </VStack>
<mask> );
</s> fix: toast keyboardavoiding view using bottom inset </s> remove
</s> add import { useKeyboardBottomInset } from '../../../utils'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13218c711515acf7f4c7be97d52c38b8ed923273 | src/components/composites/Toast/Toast.tsx |
pointerEvents={'box-none'} | <mask> accessibilityModal={isModal}
<mask> // @ts-ignore
<mask> accessibilityRole={isModal ? 'dialog' : undefined}
<mask> style={[overlayStyle.wrapper, { opacity: fadeValue }]}
<mask> pointerEvents={
<mask> overlayItem
<mask> ? overlayConfig.disableOverlay
<mask> ? 'box-none'
<mask> : 'auto'
<mask> : 'none'
<mask> }
<mask> >
<mask> <TouchableWithoutFeedback
<mask> accessibilityLabel="Close Overlay"
<mask> onPress={() => {
<mask> if (overlayConfig.closeOnPress) {
</s> fix: menu clicks and talkback not focusing elements </s> remove pointerEvents={popoverItem ? 'auto' : 'none'}
</s> add pointerEvents="box-none" </s> remove <TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
</s> add {popoverItem && (
<TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
)} </s> remove <TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
</s> add {isOverlayOpen && !overlayConfig.disableOverlay && (
<TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
)} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/135c1d9dbc536e15b3be8b685a6d881d337489d1 | src/core/Overlay/Wrapper.tsx |
{isOverlayOpen && !overlayConfig.disableOverlay && (
<TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
)} | <mask> : 'auto'
<mask> : 'none'
<mask> }
<mask> >
<mask> <TouchableWithoutFeedback
<mask> accessibilityLabel="Close Overlay"
<mask> onPress={() => {
<mask> if (overlayConfig.closeOnPress) {
<mask> handleClose();
<mask> }
<mask> }}
<mask> >
<mask> <View style={overlayStyle.background} />
<mask> </TouchableWithoutFeedback>
<mask> {/* Added box-none instead of none to fix Web modal not able to get clicked inside Modal.Body */}
<mask> <View
<mask> pointerEvents="box-none"
<mask> style={overlayStyle.itemBackground}
<mask> onLayout={(e) => provideWindowSize(e.nativeEvent.layout)}
</s> fix: menu clicks and talkback not focusing elements </s> remove pointerEvents={
overlayItem
? overlayConfig.disableOverlay
? 'box-none'
: 'auto'
: 'none'
}
</s> add pointerEvents={'box-none'} </s> remove <TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
</s> add {popoverItem && (
<TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
)} </s> remove pointerEvents={popoverItem ? 'auto' : 'none'}
</s> add pointerEvents="box-none" | [
"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/135c1d9dbc536e15b3be8b685a6d881d337489d1 | src/core/Overlay/Wrapper.tsx |
pointerEvents="box-none" | <mask> );
<mask> return (
<mask> <Animated.View
<mask> style={[providerStyle.wrapper, { opacity: fadeValue }]}
<mask> pointerEvents={popoverItem ? 'auto' : 'none'}
<mask> >
<mask> <TouchableWithoutFeedback
<mask> onPress={() => {
<mask> setPopoverItem(null);
<mask> popoverConfig.onClose && popoverConfig.onClose();
</s> fix: menu clicks and talkback not focusing elements </s> remove <TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
</s> add {popoverItem && (
<TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
)} </s> remove pointerEvents={
overlayItem
? overlayConfig.disableOverlay
? 'box-none'
: 'auto'
: 'none'
}
</s> add pointerEvents={'box-none'} </s> remove <TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
</s> add {isOverlayOpen && !overlayConfig.disableOverlay && (
<TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
)} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/135c1d9dbc536e15b3be8b685a6d881d337489d1 | src/core/Popover/Wrapper.tsx |
{popoverItem && (
<TouchableWithoutFeedback
onPress={() => {
setPopoverItem(null);
popoverConfig.onClose && popoverConfig.onClose();
}}
>
<View style={providerStyle.wrapper} />
</TouchableWithoutFeedback>
)} | <mask> <Animated.View
<mask> style={[providerStyle.wrapper, { opacity: fadeValue }]}
<mask> pointerEvents={popoverItem ? 'auto' : 'none'}
<mask> >
<mask> <TouchableWithoutFeedback
<mask> onPress={() => {
<mask> setPopoverItem(null);
<mask> popoverConfig.onClose && popoverConfig.onClose();
<mask> }}
<mask> >
<mask> <View style={providerStyle.wrapper} />
<mask> </TouchableWithoutFeedback>
<mask> <View
<mask> style={{
<mask> position: 'absolute',
<mask> zIndex: 99999,
<mask> ...positions,
</s> fix: menu clicks and talkback not focusing elements </s> remove pointerEvents={popoverItem ? 'auto' : 'none'}
</s> add pointerEvents="box-none" </s> remove pointerEvents={
overlayItem
? overlayConfig.disableOverlay
? 'box-none'
: 'auto'
: 'none'
}
</s> add pointerEvents={'box-none'} </s> remove <TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
</s> add {isOverlayOpen && !overlayConfig.disableOverlay && (
<TouchableWithoutFeedback
accessibilityLabel="Close Overlay"
onPress={() => {
if (overlayConfig.closeOnPress) {
handleClose();
}
}}
>
<View style={overlayStyle.background} />
</TouchableWithoutFeedback>
)} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/135c1d9dbc536e15b3be8b685a6d881d337489d1 | src/core/Popover/Wrapper.tsx |
suppressColorAccessibilityWarning: true, | <mask> export default {
<mask> dependencies: {
<mask> 'linear-gradient': require('expo-linear-gradient').LinearGradient,
<mask> },
<mask> suppressAccessibilityWarning: true,
<mask> } as INativebaseConfig;
</s> chore: rename suppress accessibility warning </s> remove suppressAccessibilityWarning?: boolean;
</s> add suppressColorAccessibilityWarning?: boolean; </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove ).config.suppressAccessibilityWarning;
</s> add ).config.suppressColorAccessibilityWarning; </s> remove suppressAccessibilityWarning
</s> add suppressColorAccessibilityWarning | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | example/nativebase.config.ts |
suppressColorAccessibilityWarning?: boolean; | <mask> };
<mask>
<mask> export interface INativebaseConfig {
<mask> theme?: ITheme;
<mask> suppressAccessibilityWarning?: boolean;
<mask> dependencies?: {
<mask> 'linear-gradient': any;
<mask> };
<mask> }
<mask>
</s> chore: rename suppress accessibility warning </s> remove suppressAccessibilityWarning: true,
</s> add suppressColorAccessibilityWarning: true, </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove ).config.suppressAccessibilityWarning;
</s> add ).config.suppressColorAccessibilityWarning; </s> remove suppressAccessibilityWarning
</s> add suppressColorAccessibilityWarning | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/core/NativeBaseContext.ts |
let suppressColorAccessibilityWarning = useNativeBaseConfig( | <mask> bg,
<mask> color ?? '',
<mask> ]);
<mask>
<mask> let suppressAccessibilityWarning = useNativeBaseConfig(
<mask> 'NativeBaseConfigProvider'
<mask> ).config.suppressAccessibilityWarning;
<mask>
<mask> let [accessibleColors] = useAccessibleColors();
<mask>
</s> chore: rename suppress accessibility warning </s> remove ).config.suppressAccessibilityWarning;
</s> add ).config.suppressColorAccessibilityWarning; </s> remove suppressAccessibilityWarning
</s> add suppressColorAccessibilityWarning </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean </s> remove suppressAccessibilityWarning?: boolean;
</s> add suppressColorAccessibilityWarning?: boolean; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/hooks/useContrastText.ts |
).config.suppressColorAccessibilityWarning; | <mask> ]);
<mask>
<mask> let suppressAccessibilityWarning = useNativeBaseConfig(
<mask> 'NativeBaseConfigProvider'
<mask> ).config.suppressAccessibilityWarning;
<mask>
<mask> let [accessibleColors] = useAccessibleColors();
<mask>
<mask> if (typeof bg !== 'string') {
<mask> return;
</s> chore: rename suppress accessibility warning </s> remove let suppressAccessibilityWarning = useNativeBaseConfig(
</s> add let suppressColorAccessibilityWarning = useNativeBaseConfig( </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove suppressAccessibilityWarning: true,
</s> add suppressColorAccessibilityWarning: true, </s> remove suppressAccessibilityWarning?: boolean;
</s> add suppressColorAccessibilityWarning?: boolean; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/hooks/useContrastText.ts |
suppressColorAccessibilityWarning | <mask> trueBg,
<mask> trueColor,
<mask> bg,
<mask> color,
<mask> suppressAccessibilityWarning
<mask> );
<mask>
<mask> return textColor;
<mask> }
<mask>
</s> chore: rename suppress accessibility warning </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove let suppressAccessibilityWarning = useNativeBaseConfig(
</s> add let suppressColorAccessibilityWarning = useNativeBaseConfig( </s> remove suppressAccessibilityWarning: true,
</s> add suppressColorAccessibilityWarning: true, </s> remove suppressAccessibilityWarning?: boolean;
</s> add suppressColorAccessibilityWarning?: boolean; </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/hooks/useContrastText.ts |
suppressColorAccessibilityWarning?: boolean | <mask> trueBg: string,
<mask> trueColor: string,
<mask> bg: string,
<mask> color?: string,
<mask> suppressAccessibilityWarning?: boolean
<mask> ) {
<mask> if (typeof trueBg !== 'string') {
<mask> trueBg = bg;
<mask> }
<mask> let trueContrastColor;
</s> chore: rename suppress accessibility warning </s> remove ).config.suppressAccessibilityWarning;
</s> add ).config.suppressColorAccessibilityWarning; </s> remove suppressAccessibilityWarning?: boolean;
</s> add suppressColorAccessibilityWarning?: boolean; </s> remove if (contrast < 3 && !suppressAccessibilityWarning) {
</s> add if (contrast < 3 && !suppressColorAccessibilityWarning) { </s> remove suppressAccessibilityWarning: true,
</s> add suppressColorAccessibilityWarning: true, </s> remove let suppressAccessibilityWarning = useNativeBaseConfig(
</s> add let suppressColorAccessibilityWarning = useNativeBaseConfig( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/hooks/useContrastText.ts |
if (contrast < 3 && !suppressColorAccessibilityWarning) { | <mask> const contrast = getContrastRatio(
<mask> trueBg,
<mask> trueColor ? trueColor : trueContrastColor
<mask> );
<mask> if (contrast < 3 && !suppressAccessibilityWarning) {
<mask> console.warn(
<mask> [
<mask> `NativeBase: The contrast ratio of ${contrast}:1 for ${
<mask> color ? color : contrastColorToken
<mask> } on ${bg}`,
</s> chore: rename suppress accessibility warning </s> remove suppressAccessibilityWarning
</s> add suppressColorAccessibilityWarning </s> remove let suppressAccessibilityWarning = useNativeBaseConfig(
</s> add let suppressColorAccessibilityWarning = useNativeBaseConfig( </s> remove suppressAccessibilityWarning?: boolean
</s> add suppressColorAccessibilityWarning?: boolean </s> remove ).config.suppressAccessibilityWarning;
</s> add ).config.suppressColorAccessibilityWarning; </s> remove suppressAccessibilityWarning: true,
</s> add suppressColorAccessibilityWarning: true, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13c54ebc0d3a77d168cf6dd3aae7c40cfce93b0f | src/hooks/useContrastText.ts |
import Box from '../../primitives/Box'; | <mask> import React, { memo, forwardRef } from 'react';
<mask> import { Pressable } from '../../primitives/Pressable';
<mask> import Box, { IBoxProps } from '../../primitives/Box';
<mask> import { HStack } from '../../primitives/Stack';
<mask> import Spinner from '../../primitives/Spinner';
<mask> import type { IButtonProps } from '../../primitives/Button';
<mask> import { usePropsResolution } from '../../../hooks';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
</s> fix: actionsheet item typing fix </s> remove import type { IButtonProps } from '../../primitives/Button';
</s> add </s> remove export interface IActionsheetItemProps extends InterfaceButtonProps {}
</s> add export interface IActionsheetItemProps
extends Omit<InterfaceButtonProps, 'variant' | 'size' | 'colorScheme'> {} </s> remove }: IButtonProps & IBoxProps,
</s> add }: IActionsheetItemProps, | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f1d767826b53275c43ffa67d1285fda052b6cb | src/components/composites/Actionsheet/ActionsheetItem.tsx |
<mask> import { Pressable } from '../../primitives/Pressable';
<mask> import Box, { IBoxProps } from '../../primitives/Box';
<mask> import { HStack } from '../../primitives/Stack';
<mask> import Spinner from '../../primitives/Spinner';
<mask> import type { IButtonProps } from '../../primitives/Button';
<mask> import { usePropsResolution } from '../../../hooks';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask>
<mask> const ActionsheetItem = (
<mask> {
</s> fix: actionsheet item typing fix </s> remove import Box, { IBoxProps } from '../../primitives/Box';
</s> add import Box from '../../primitives/Box'; </s> remove export interface IActionsheetItemProps extends InterfaceButtonProps {}
</s> add export interface IActionsheetItemProps
extends Omit<InterfaceButtonProps, 'variant' | 'size' | 'colorScheme'> {} </s> remove }: IButtonProps & IBoxProps,
</s> add }: IActionsheetItemProps, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f1d767826b53275c43ffa67d1285fda052b6cb | src/components/composites/Actionsheet/ActionsheetItem.tsx | |
import type { IActionsheetItemProps } from './types'; | <mask> import Spinner from '../../primitives/Spinner';
<mask> import { usePropsResolution } from '../../../hooks';
<mask> import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
<mask>
<mask> const ActionsheetItem = (
<mask> {
<mask> //@ts-ignore
<mask> children,
</s> fix: actionsheet item typing fix </s> remove import type { IButtonProps } from '../../primitives/Button';
</s> add </s> remove import Box, { IBoxProps } from '../../primitives/Box';
</s> add import Box from '../../primitives/Box'; </s> remove }: IButtonProps & IBoxProps,
</s> add }: IActionsheetItemProps, </s> remove export interface IActionsheetItemProps extends InterfaceButtonProps {}
</s> add export interface IActionsheetItemProps
extends Omit<InterfaceButtonProps, 'variant' | 'size' | 'colorScheme'> {} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f1d767826b53275c43ffa67d1285fda052b6cb | src/components/composites/Actionsheet/ActionsheetItem.tsx |
}: IActionsheetItemProps, | <mask> isDisabled,
<mask> isLoading,
<mask> spinnerPlacement = 'start',
<mask> ...props
<mask> }: IButtonProps & IBoxProps,
<mask> ref: any
<mask> ) => {
<mask> const {
<mask> _text,
<mask> _stack,
</s> fix: actionsheet item typing fix </s> remove export interface IActionsheetItemProps extends InterfaceButtonProps {}
</s> add export interface IActionsheetItemProps
extends Omit<InterfaceButtonProps, 'variant' | 'size' | 'colorScheme'> {} </s> remove import type { IButtonProps } from '../../primitives/Button';
</s> add </s> remove import Box, { IBoxProps } from '../../primitives/Box';
</s> add import Box from '../../primitives/Box'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f1d767826b53275c43ffa67d1285fda052b6cb | src/components/composites/Actionsheet/ActionsheetItem.tsx |
export interface IActionsheetItemProps
extends Omit<InterfaceButtonProps, 'variant' | 'size' | 'colorScheme'> {} | <mask> export interface IActionsheetFooterProps
<mask> extends InterfaceBoxProps<IActionsheetFooterProps> {}
<mask> export interface IActionsheetHeaderProps
<mask> extends InterfaceBoxProps<IActionsheetHeaderProps> {}
<mask> export interface IActionsheetItemProps extends InterfaceButtonProps {}
<mask>
<mask> export type IActionsheetComponentType = ((
<mask> props: IActionsheetProps & { ref?: MutableRefObject<any> }
<mask> ) => JSX.Element) & {
<mask> Content: React.MemoExoticComponent<
</s> fix: actionsheet item typing fix </s> remove }: IButtonProps & IBoxProps,
</s> add }: IActionsheetItemProps, </s> remove import type { IButtonProps } from '../../primitives/Button';
</s> add </s> remove import Box, { IBoxProps } from '../../primitives/Box';
</s> add import Box from '../../primitives/Box'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f1d767826b53275c43ffa67d1285fda052b6cb | src/components/composites/Actionsheet/types.tsx |
const { getResponsiveStyles } = useResponsiveQuery(); | <mask> 'makeStyledComponent'
<mask> );
<mask> const strictMode = config.strictMode;
<mask>
<mask> const { getResponsiveStyles } = useResponsiveQuery({
<mask> disableCSSMediaQueries: true,
<mask> });
<mask>
<mask> const { styledSystemProps, restProps } = getStyledSystemPropsAndRestProps(
<mask> props
<mask> );
<mask>
</s> feat: media query disable using isSSR </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
</s> add if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/hooks/useStyledSystemPropsResolver.ts |
if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); | <mask> .initial,
<mask> ]
<mask> : [];
<mask>
<mask> queries.query.forEach((queryRule) => {
<mask> if (queryRule.style) {
<mask> const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
<mask>
<mask> if (
<mask> typeof queryRule.maxWidth === 'number' &&
<mask> typeof queryRule.minWidth === 'number'
<mask> ) {
</s> feat: media query disable using isSSR </s> remove if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
</s> add if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
</s> add // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/common.ts |
if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} | <mask> queries.query.forEach((queryRule) => {
<mask> if (queryRule.style) {
<mask> const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
<mask>
<mask> if (
<mask> typeof queryRule.maxWidth === 'number' &&
<mask> typeof queryRule.minWidth === 'number'
<mask> ) {
<mask> if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
<mask> styles.push(
<mask> StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
<mask> );
<mask> }
<mask> } else if (typeof queryRule.minWidth === 'number') {
<mask> if (width >= queryRule.minWidth) {
<mask> styles.push(
<mask> StyleSheet.create({ minWidthStyle: flattenQueryStyle })
<mask> .minWidthStyle
<mask> );
<mask> }
<mask> } else if (typeof queryRule.maxWidth === 'number') {
<mask> if (width <= queryRule.maxWidth) {
<mask> styles.push(
<mask> StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
<mask> .maxWidthStyle
<mask> );
<mask> }
<mask> }
<mask> }
<mask> });
<mask> return { styles };
</s> feat: media query disable using isSSR </s> remove queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); </s> remove }
});
return { styles };
</s> add });
return { styles };
} </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/common.ts |
});
return { styles };
} | <mask> .maxWidthStyle
<mask> );
<mask> }
<mask> }
<mask> }
<mask> });
<mask> return { styles };
<mask> }
<mask>
<mask> return {};
<mask> };
<mask>
</s> feat: media query disable using isSSR </s> remove }
});
</s> add });
} </s> remove if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
</s> add if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/common.ts |
query?: Query[]; | <mask> };
<mask>
<mask> export type UseResponsiveQueryParams = {
<mask> initial?: StyleSheetStyle | StyleSheetStyle[];
<mask> query: Query[];
<mask> disableCSSMediaQueries?: boolean;
<mask> };
<mask>
<mask> export type DataSet = { [key: string]: string };
<mask>
</s> feat: media query disable using isSSR </s> remove export type GetResponsiveStylesParams = UseResponsiveQueryParams;
</s> add export type GetResponsiveStylesParams = Omit<
UseResponsiveQueryParams,
'disableCSSMediaQueries'
>; </s> remove }
});
return { styles };
</s> add });
return { styles };
} </s> remove }
});
</s> add });
} </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/types.ts |
export type GetResponsiveStylesParams = Omit<
UseResponsiveQueryParams,
'disableCSSMediaQueries'
>; | <mask> };
<mask>
<mask> export type DataSet = { [key: string]: string };
<mask>
<mask> export type GetResponsiveStylesParams = UseResponsiveQueryParams;
<mask>
<mask> export type GetResponsiveStylesReturnType = {
<mask> styles?: StyleSheetStyle[];
<mask> dataSet?: DataSet;
<mask> };
</s> feat: media query disable using isSSR </s> remove query: Query[];
</s> add query?: Query[]; </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); </s> remove }
});
return { styles };
</s> add });
return { styles };
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/types.ts |
if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); | <mask> : undefined;
<mask>
<mask> let dataSet: DataSet = {};
<mask>
<mask> queries.query.forEach((queryRule) => {
<mask> const queryHash = queriesHash + hash(stableHash(queryRule));
<mask> const dataAttribute = getDataAttribute(queryRule);
<mask>
<mask> if (dataAttribute) {
<mask> const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
<mask> dataSet[dataAttribute] = queryHash;
<mask>
<mask> let mediaRules = '';
<mask>
<mask> const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
<mask> const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
<mask> const results = atomic(newStyle);
<mask>
<mask> Object.keys(results).forEach((key) => {
<mask> const oldIdentifier = results[key].identifier;
<mask>
<mask> if (process.env.NODE_ENV !== 'production') {
</s> feat: media query disable using isSSR </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); </s> remove if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
</s> add // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</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/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/useResponsiveQuery.web.ts |
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); | <mask> const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
<mask> const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
<mask> const results = atomic(newStyle);
<mask>
<mask> Object.keys(results).forEach((key) => {
<mask> const oldIdentifier = results[key].identifier;
<mask>
<mask> if (process.env.NODE_ENV !== 'production') {
<mask> dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
<mask> }
<mask>
</s> feat: media query disable using isSSR </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
</s> add // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/useResponsiveQuery.web.ts |
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); | <mask>
<mask> Object.keys(results).forEach((key) => {
<mask> const oldIdentifier = results[key].identifier;
<mask>
<mask> if (process.env.NODE_ENV !== 'production') {
<mask> dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
<mask> }
<mask>
<mask> results[key].rules.forEach((oldRule: string) => {
<mask> // Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
<mask> const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
</s> feat: media query disable using isSSR </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
if (queryRule.style) {
const flattenQueryStyle = StyleSheet.flatten(queryRule.style); </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/useResponsiveQuery.web.ts |
<mask>
<mask> if (process.env.NODE_ENV !== 'production') {
<mask> dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
<mask> }
<mask>
<mask> results[key].rules.forEach((oldRule: string) => {
<mask> // Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
<mask> const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
<mask> mediaRules += newRule;
<mask> });
<mask> });
<mask>
<mask> if (mediaRules) {
<mask> const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
<mask>
<mask> // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
<mask> // Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
<mask> // Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
<mask> styleResolver.sheet.insert(
<mask> `/*${queryHash}{}*/${mediaQueryRule}`,
<mask> MEDIA_QUERY_STYLESHEET_GROUP
<mask> );
<mask> }
<mask> }
<mask> });
<mask>
<mask> return { styles, dataSet };
</s> feat: media query disable using isSSR </s> remove if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
</s> add // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); </s> remove queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}*="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
</s> add if (queries.query) {
queries.query.forEach((queryRule) => {
const queryHash = queriesHash + hash(stableHash(queryRule));
const dataAttribute = getDataAttribute(queryRule);
if (dataAttribute) {
const newIdentifier = `[data-${dataAttribute}$="${queryHash}"]`;
dataSet[dataAttribute] = queryHash;
let mediaRules = '';
const flattenQueryStyle = StyleSheet.flatten(queryRule.style);
const newStyle = createCompileableStyle(i18nStyle(flattenQueryStyle));
const results = atomic(newStyle);
Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] =
oldIdentifier + ' ' + dataSet[dataAttribute];
}
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
}); </s> remove Object.keys(results).forEach((key) => {
const oldIdentifier = results[key].identifier;
</s> add if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules); </s> remove }
});
</s> add });
} </s> remove if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
</s> add if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"k... | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/useResponsiveQuery.web.ts | |
});
} | <mask> `/*${queryHash}{}*/${mediaQueryRule}`,
<mask> MEDIA_QUERY_STYLESHEET_GROUP
<mask> );
<mask> }
<mask> }
<mask> });
<mask>
<mask> return { styles, dataSet };
<mask> };
</s> feat: media query disable using isSSR </s> remove
results[key].rules.forEach((oldRule: string) => {
// Rule returned by atomic has css selectors, so we'll replace it with data-attr selector
const newRule = oldRule.replace('.' + oldIdentifier, newIdentifier);
mediaRules += newRule;
});
});
if (mediaRules) {
const mediaQueryRule = getMediaQueryRule(queryRule, mediaRules);
// Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
);
</s> add </s> remove }
});
return { styles };
</s> add });
return { styles };
} </s> remove if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
</s> add if (
typeof queryRule.maxWidth === 'number' &&
typeof queryRule.minWidth === 'number'
) {
if (width >= queryRule.minWidth && width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ rangeStyle: flattenQueryStyle }).rangeStyle
);
}
} else if (typeof queryRule.minWidth === 'number') {
if (width >= queryRule.minWidth) {
styles.push(
StyleSheet.create({ minWidthStyle: flattenQueryStyle })
.minWidthStyle
);
}
} else if (typeof queryRule.maxWidth === 'number') {
if (width <= queryRule.maxWidth) {
styles.push(
StyleSheet.create({ maxWidthStyle: flattenQueryStyle })
.maxWidthStyle
);
} </s> remove const { getResponsiveStyles } = useResponsiveQuery({
disableCSSMediaQueries: true,
});
</s> add const { getResponsiveStyles } = useResponsiveQuery(); </s> remove if (process.env.NODE_ENV !== 'production') {
dataSet[dataAttribute] = oldIdentifier + ' ' + dataSet[dataAttribute];
</s> add // Here by prepending the /*${queryHash}{}*/ comment, we're kind of tricking the regex used by rn-web to verify if a rule is inserted or not.
// Looks safe to me, just need to keep a check if there are any implementation changes in createStyleSheet file in rn-web in future.
// Second argument defines the order of the insertion. DataSet and class selectors have same CSS specificity so we need to make sure that media rules have higher precedence. Max precendence in RN web is around 2.2 so 3 ensures styles will be appended later
styleResolver.sheet.insert(
`/*${queryHash}{}*/${mediaQueryRule}`,
MEDIA_QUERY_STYLESHEET_GROUP
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/13f9cfc1079b4778ec56e57f29116275e54ca4ad | src/utils/useResponsiveQuery/useResponsiveQuery.web.ts |
<mask> colorModeProps: any,
<mask> componentTheme: any,
<mask> currentBreakpoint: number
<mask> ) {
<mask> // TODO: This function needs a lot of comments
<mask> let newProps: any = {};
<mask> for (let property in props) {
<mask> // If the property exists in theme map then get its value
<mask> if (themePropertyMap[property]) {
<mask> // TODO: Need some documentation
</s> chore: added docs in comments for use-theme-props </s> remove // If the property exists in theme map then get its value
</s> add // If the property exists in themePropertyMap then get its value </s> remove // TODO: Need some documentation
</s> add </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts | |
// If the property exists in themePropertyMap then get its value | <mask> ) {
<mask> // TODO: This function needs a lot of comments
<mask> let newProps: any = {};
<mask> for (let property in props) {
<mask> // If the property exists in theme map then get its value
<mask> if (themePropertyMap[property]) {
<mask> // TODO: Need some documentation
<mask> let propValues = extractPropertyFromFunction(
<mask> property,
<mask> props,
</s> chore: added docs in comments for use-theme-props </s> remove // TODO: This function needs a lot of comments
</s> add </s> remove // TODO: Need some documentation
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
<mask> let newProps: any = {};
<mask> for (let property in props) {
<mask> // If the property exists in theme map then get its value
<mask> if (themePropertyMap[property]) {
<mask> // TODO: Need some documentation
<mask> let propValues = extractPropertyFromFunction(
<mask> property,
<mask> props,
<mask> theme,
<mask> componentTheme
</s> chore: added docs in comments for use-theme-props </s> remove // If the property exists in theme map then get its value
</s> add // If the property exists in themePropertyMap then get its value </s> remove // TODO: This function needs a lot of comments
</s> add </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts | |
/**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ | <mask> let [, resultProps] = extractInObject(defaultProps, Object.keys(props));
<mask> return resultProps;
<mask> }
<mask>
<mask> /*
<mask> If property is functional in componentTheme, get its returned object
<mask> */
<mask> const extractPropertyFromFunction = (
<mask> property: string,
<mask> props: any,
<mask> theme: any,
<mask> componentTheme: any
</s> chore: added docs in comments for use-theme-props </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ </s> remove // TODO: This function needs a lot of comments
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
// Check if the entry in the theme is a function then calling it with all theme and props as params | <mask> theme: any,
<mask> componentTheme: any
<mask> ) => {
<mask> let propValues;
<mask> if (
<mask> componentTheme &&
<mask> typeof componentTheme[themePropertyMap[property]] === 'function'
<mask> ) {
<mask> let funcProps = componentTheme[themePropertyMap[property]]({
<mask> theme,
</s> chore: added docs in comments for use-theme-props </s> remove // TODO: Need some documentation
</s> add </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ </s> remove // TODO: This function needs a lot of comments
</s> add </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
// If the returned value is nested object then find the property value in it, otherwise return the whole object | <mask> let isNested: boolean = Object.keys(funcProps).some(function (key) {
<mask> return funcProps[key] && typeof funcProps[key] === 'object';
<mask> });
<mask> propValues = isNested
<mask> ? { ...get(funcProps, `${props[property]}`) }
<mask> : { ...funcProps };
<mask> } else {
</s> chore: added docs in comments for use-theme-props </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ </s> remove // TODO: Need some documentation
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
// If the entry is any value other than function then return the whole object or value | <mask> : { ...funcProps };
<mask> } else {
<mask> propValues = get(
<mask> componentTheme,
<mask> `${themePropertyMap[property]}.${props[property]}`
<mask> );
<mask> }
</s> chore: added docs in comments for use-theme-props </s> remove console.log('propValues &*&', propValues);
</s> add </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
<mask> componentTheme,
<mask> `${themePropertyMap[property]}.${props[property]}`
<mask> );
<mask> }
<mask> console.log('propValues &*&', propValues);
<mask> return propValues;
<mask> };
<mask>
<mask> /*
<mask> Merge _props and apply contrastText color if not passed by theme or user
</s> chore: added docs in comments for use-theme-props </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts | |
/**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ | <mask> });
<mask> return newProps;
<mask> }
<mask>
<mask> /*
<mask> Checks the property and resolves it if it has breakpoints
<mask> */
<mask> const resolveValueWithBreakpoint = (
<mask> values: any,
<mask> currentBreakpoint: number,
<mask> property: any
<mask> ) => {
</s> chore: added docs in comments for use-theme-props </s> remove /*
If property is functional in componentTheme, get its returned object
*/
</s> add /**
* If property is functional in componentTheme, get its returned object
*
* @param property : name of the prop
* @param props : all props
* @param theme : provided theme without components
* @param componentTheme : component specific theme
* @returns
*/ </s> remove // TODO: This function needs a lot of comments
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
// Check the last valid breakpoint value from all values
// If current breakpoint is `md` and we have `base` then `lg`, then last value will be taken(`base` in this case) | <mask> ) => {
<mask> if (hasValidBreakpointFormat(values, property)) {
<mask> return findLastValidBreakpoint(values, currentBreakpoint);
<mask> } else {
<mask> return values;
<mask> }
<mask> };
</s> chore: added docs in comments for use-theme-props </s> remove /*
Checks the property and resolves it if it has breakpoints
*/
</s> add /**
*
* Checks the property and resolves it if it has breakpoints
* @param values : value from props
* @param currentBreakpoint : current value for which breakpoint will be calculated
* @param property : property name
* @returns
*/ </s> remove console.log('propValues &*&', propValues);
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/143c6f305c2afb82dcf2bfbdd751f86970f227be | src/hooks/useThemeProps/utils.ts |
React.useEffect(() => {
if (value !== undefined && value != numberInputValue)
setNumberInputValue(value);
}, [value, numberInputValue, setNumberInputValue]); | <mask> setNumberInputValue(temp);
<mask> };
<mask> return (
<mask> <NumberInputContext.Provider
<mask> value={{
<mask> ...formControlContext,
<mask> ...newProps,
</s> fix: added controlled value support </s> remove if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value);
</s> add if (isControlled) handleChange && handleChange(value);
else if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value); | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1500af548b9bcec48032448f29df9ef614e0ca39 | src/components/composites/NumberInput/NumberInput.tsx |
isControlled: value !== undefined, | <mask> numberInputValue,
<mask> numberInputStepper,
<mask> setNumberInputStepper,
<mask> }}
<mask> >
<mask> {children}
<mask> </NumberInputContext.Provider>
<mask> );
</s> fix: added controlled value support </s> remove if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value);
</s> add if (isControlled) handleChange && handleChange(value);
else if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1500af548b9bcec48032448f29df9ef614e0ca39 | src/components/composites/NumberInput/NumberInput.tsx |
isControlled, | <mask> handleChange,
<mask> handleChangeWithoutCheck,
<mask> numberInputStepper,
<mask> numberInputValue,
<mask> ...context
<mask> }: INumberInputContext & {
<mask> handleChange?: (value: string | number) => void;
<mask> numberInputStepper?: any;
<mask> } = React.useContext(NumberInputContext);
<mask> const changeHandler = (inputValue: any) => {
</s> fix: added controlled value support </s> remove if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value);
</s> add if (isControlled) handleChange && handleChange(value);
else if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1500af548b9bcec48032448f29df9ef614e0ca39 | src/components/composites/NumberInput/NumberInputField.tsx |
if (isControlled) handleChange && handleChange(value);
else if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value); | <mask> inputValue = inputValue.replace('-', '');
<mask> inputValue = '-' + inputValue;
<mask> }
<mask> const value = parseInt(inputValue, 10);
<mask> if (value) handleChangeWithoutCheck && handleChangeWithoutCheck(value);
<mask> else handleChangeWithoutCheck && handleChangeWithoutCheck(0);
<mask> };
<mask> const blurHandler = () => {
<mask> if (numberInputValue) handleChange && handleChange(numberInputValue);
<mask> };
</s> fix: added controlled value support | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1500af548b9bcec48032448f29df9ef614e0ca39 | src/components/composites/NumberInput/NumberInputField.tsx |
<mask> closeOnOverlayClick = false,
<mask> isKeyboardDismissable = true,
<mask> overlayVisible = true,
<mask> backdropVisible = true,
<mask> //@ts-ignore - internal purpose only
<mask> animationPreset = 'fade',
<mask> ...rest
<mask> }: IAlertDialogProps,
<mask> ref: any
<mask> ) => {
</s> fix: added pseudo props for alert-dialog </s> remove <Slide overlay={false} in={visible} duration={200}>
</s> add <Slide overlay={false} in={visible} duration={200} {..._slide}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/AlertDialog.tsx | |
_backdropFade,
_fade,
_slide, | <mask> const {
<mask> contentSize,
<mask> _backdrop,
<mask> _child,
<mask> ...restThemeProps
<mask> } = usePropsResolution('AlertDialog', rest);
<mask>
<mask> const [visible, setVisible] = useControllableState({
<mask> value: isOpen,
<mask> defaultValue: defaultIsOpen,
</s> fix: added pseudo props for alert-dialog </s> remove //@ts-ignore - internal purpose only
</s> add </s> remove <Slide overlay={false} in={visible} duration={200}>
</s> add <Slide overlay={false} in={visible} duration={200} {..._slide}> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/AlertDialog.tsx |
{..._backdropFade} | <mask> entryDuration={200}
<mask> in={visible}
<mask> style={StyleSheet.absoluteFill}
<mask> >
<mask> {overlayVisible && backdropVisible && (
<mask> <Backdrop
<mask> onPress={() => {
</s> fix: added pseudo props for alert-dialog </s> remove //@ts-ignore - internal purpose only
</s> add </s> remove <Slide overlay={false} in={visible} duration={200}>
</s> add <Slide overlay={false} in={visible} duration={200} {..._slide}> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/AlertDialog.tsx |
<Slide overlay={false} in={visible} duration={200} {..._slide}> | <mask> />
<mask> )}
<mask> </Fade>
<mask> {animationPreset === 'slide' ? (
<mask> <Slide overlay={false} in={visible} duration={200}>
<mask> <FocusScope
<mask> contain={visible}
<mask> autoFocus={visible && !initialFocusRef}
<mask> restoreFocus={visible && !finalFocusRef}
<mask> >
</s> fix: added pseudo props for alert-dialog </s> remove //@ts-ignore - internal purpose only
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/AlertDialog.tsx |
{..._fade} | <mask> exitDuration={100}
<mask> entryDuration={200}
<mask> in={visible}
<mask> style={StyleSheet.absoluteFill}
<mask> >
<mask> <FocusScope
<mask> contain={visible}
<mask> autoFocus={visible && !initialFocusRef}
<mask> restoreFocus={visible && !finalFocusRef}
<mask> >
</s> fix: added pseudo props for alert-dialog </s> remove <Slide overlay={false} in={visible} duration={200}>
</s> add <Slide overlay={false} in={visible} duration={200} {..._slide}> </s> remove //@ts-ignore - internal purpose only
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/AlertDialog.tsx |
import type { IFadeProps, ISlideProps } from '../Transitions'; | <mask> import type { IIconButtonProps } from '../IconButton';
<mask> import type { MutableRefObject } from 'react';
<mask>
<mask> export interface IAlertDialogProps extends IBoxProps {
<mask> /**
<mask> * If true, the AlertDialog will open. Useful for controllable state behaviour
<mask> */
<mask> isOpen?: boolean;
</s> fix: added pseudo props for alert-dialog </s> remove //@ts-ignore - internal purpose only
</s> add </s> remove <Slide overlay={false} in={visible} duration={200}>
</s> add <Slide overlay={false} in={visible} duration={200} {..._slide}> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15939461bd84725194ca5d6d3849a55f19cc5626 | src/components/composites/AlertDialog/types.ts |
<mask> import { Platform } from 'react-native';
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps';
<mask> import Box from './../../primitives/Box';
<mask> import type { IDividerProps } from './types';
<mask> import { extractInObject } from '../../../theme/tools';
<mask>
<mask> const Divider = (props: IDividerProps, ref?: any) => {
<mask> const { orientation, ...newProps } = usePropsResolution('Divider', props);
<mask> const [, remainingProps] = extractInObject(newProps, ['size']);
<mask> return (
</s> feat: new prop resolution cheanges in divider </s> remove {...remainingProps}
</s> add {...resolvedProps} </s> remove const { orientation, ...newProps } = usePropsResolution('Divider', props);
const [, remainingProps] = extractInObject(newProps, ['size']);
</s> add const { orientation, ...resolvedProps } = usePropsResolution(
'Divider',
props
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15b3c361d2d24a7a83e5ac3a5d77cdcacd17c490 | src/components/composites/Divider/index.tsx | |
const { orientation, ...resolvedProps } = usePropsResolution(
'Divider',
props
); | <mask> import type { IDividerProps } from './types';
<mask> import { extractInObject } from '../../../theme/tools';
<mask>
<mask> const Divider = (props: IDividerProps, ref?: any) => {
<mask> const { orientation, ...newProps } = usePropsResolution('Divider', props);
<mask> const [, remainingProps] = extractInObject(newProps, ['size']);
<mask> return (
<mask> <Box
<mask> {...remainingProps}
<mask> ref={ref}
<mask> aria-orientation={orientation}
</s> feat: new prop resolution cheanges in divider </s> remove {...remainingProps}
</s> add {...resolvedProps} </s> remove import { extractInObject } from '../../../theme/tools';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15b3c361d2d24a7a83e5ac3a5d77cdcacd17c490 | src/components/composites/Divider/index.tsx |
{...resolvedProps} | <mask> const { orientation, ...newProps } = usePropsResolution('Divider', props);
<mask> const [, remainingProps] = extractInObject(newProps, ['size']);
<mask> return (
<mask> <Box
<mask> {...remainingProps}
<mask> ref={ref}
<mask> aria-orientation={orientation}
<mask> //@ts-ignore web only role
<mask> accessibilityRole={Platform.OS === 'web' ? 'separator' : undefined}
<mask> />
</s> feat: new prop resolution cheanges in divider </s> remove import { extractInObject } from '../../../theme/tools';
</s> add </s> remove const { orientation, ...newProps } = usePropsResolution('Divider', props);
const [, remainingProps] = extractInObject(newProps, ['size']);
</s> add const { orientation, ...resolvedProps } = usePropsResolution(
'Divider',
props
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/15b3c361d2d24a7a83e5ac3a5d77cdcacd17c490 | src/components/composites/Divider/index.tsx |
startIcon={<Icon name="menu" size={6} type="MaterialIcons" />} | <mask> export default function () {
<mask> return (
<mask> <HStack space={2}>
<mask> <Button
<mask> leftIcon={<Icon name="menu" size={6} type="MaterialIcons" />}
<mask> colorScheme="blue"
<mask> >
<mask> Menu
<mask> </Button>
<mask> <Button
</s> Fixes for Icon button and changes for Button icon props </s> remove rightIcon={<Icon name="menu" size={6} type="MaterialIcons" />}
</s> add endIcon={<Icon name="menu" size={6} type="MaterialIcons" />} </s> remove {icon && label ? (
<HStack
// NOTE: Don't know why but it works
pt={Platform.OS === 'ios' ? 2 : undefined}
space={1}
justifyContent="center"
alignItems="center"
>
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</s> add {icon} </s> remove />
</s> add >
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> </s> remove const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
</s> add const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => { </s> remove <IconButton
</s> add <Button | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | example/storybook/stories/components/primitives/Button/icons.tsx |
endIcon={<Icon name="menu" size={6} type="MaterialIcons" />} | <mask> Menu
<mask> </Button>
<mask> <Button
<mask> isDisabled
<mask> rightIcon={<Icon name="menu" size={6} type="MaterialIcons" />}
<mask> colorScheme="cyan"
<mask> >
<mask> Menu
<mask> </Button>
<mask> </HStack>
</s> Fixes for Icon button and changes for Button icon props </s> remove leftIcon={<Icon name="menu" size={6} type="MaterialIcons" />}
</s> add startIcon={<Icon name="menu" size={6} type="MaterialIcons" />} </s> remove />
</s> add >
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> </s> remove {icon && label ? (
<HStack
// NOTE: Don't know why but it works
pt={Platform.OS === 'ios' ? 2 : undefined}
space={1}
justifyContent="center"
alignItems="center"
>
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</s> add {icon} </s> remove {leftIcon ? (
<Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{leftIcon}</Box>
</s> add {startIcon ? (
<Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{startIcon}</Box> </s> remove <IconButton
</s> add <Button | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | example/storybook/stories/components/primitives/Button/icons.tsx |
import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; | <mask> import React from 'react';
<mask> import { omitUndefined } from '../../../theme/tools/utils';
<mask> import IconButton from '../IconButton';
<mask> import type { IFabProps } from './types';
<mask>
<mask> const Fab = (props: IFabProps) => {
<mask> const { placement, ...newProps } = omitUndefined(props);
<mask>
</s> Fixes for Icon button and changes for Button icon props </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); </s> remove import { Platform } from 'react-native';
</s> add </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove // export { default as FabList } from './FabList';
// export { default as FabItem } from './FabItem';
</s> add | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/Fab.tsx |
const { label, icon, placement, ...newProps } = omitUndefined(props); | <mask> import IconButton from '../IconButton';
<mask> import type { IFabProps } from './types';
<mask>
<mask> const Fab = (props: IFabProps) => {
<mask> const { placement, ...newProps } = omitUndefined(props);
<mask>
<mask> const placementProps: any = {
<mask> topRight: { top: 4, right: 4, position: 'absolute' },
<mask> topLeft: { top: 4, left: 4, position: 'absolute' },
<mask> bottomRight: { bottom: 4, right: 4, position: 'absolute' },
</s> Fixes for Icon button and changes for Button icon props </s> remove <IconButton
</s> add <Button </s> remove import IconButton from '../IconButton';
</s> add import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove import { Platform } from 'react-native';
</s> add </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/Fab.tsx |
<Button | <mask> bottomRight: { bottom: 4, right: 4, position: 'absolute' },
<mask> bottomLeft: { bottom: 4, left: 4, position: 'absolute' },
<mask> };
<mask> return (
<mask> <IconButton
<mask> variant="unstyled"
<mask> bg="default.200"
<mask> rounded="full"
<mask> zIndex={20}
<mask> p={2}
</s> Fixes for Icon button and changes for Button icon props </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); </s> remove };
const sizes = {
lg: {
py: 0,
px: 0,
fontSize: '3xl',
},
md: {
py: 0,
px: 0,
fontSize: '2xl',
},
sm: {
py: 0,
px: 0,
fontSize: 'xl',
},
</s> add py: 2,
px: 2, </s> remove size: 'md',
</s> add </s> remove />
</s> add >
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/Fab.tsx |
>
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> | <mask> zIndex={20}
<mask> p={2}
<mask> {...placementProps[placement]}
<mask> {...newProps}
<mask> />
<mask> );
<mask> };
<mask>
<mask> export default React.memo(Fab);
</s> Fixes for Icon button and changes for Button icon props </s> remove <IconButton
</s> add <Button </s> remove sizes,
</s> add </s> remove {icon && label ? (
<HStack
// NOTE: Don't know why but it works
pt={Platform.OS === 'ios' ? 2 : undefined}
space={1}
justifyContent="center"
alignItems="center"
>
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</s> add {icon} </s> remove size: 'md',
</s> add </s> remove {rightIcon ? (
<Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{rightIcon}</Box>
</s> add {endIcon ? (
<Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{endIcon}</Box> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/Fab.tsx |
<mask> export { default as Fab } from './Fab';
<mask> // export { default as FabList } from './FabList';
<mask> // export { default as FabItem } from './FabItem';
<mask> export type { IFabProps } from './types';
</s> Fixes for Icon button and changes for Button icon props </s> remove import IconButton from '../IconButton';
</s> add import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; </s> remove import { Platform } from 'react-native';
</s> add </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; | [
"keep",
"replace",
"replace",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/index.tsx | |
<mask>
<mask> export type IFabProps = IIconButtonProps & {
<mask> placement?: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft';
<mask> };
<mask> // export type IFabListProps = IBoxProps;
<mask> // export type IFabItemProps = IButtonProps;
</s> Fixes for Icon button and changes for Button icon props </s> remove leftIcon?: JSX.Element | Array<JSX.Element>;
rightIcon?: JSX.Element | Array<JSX.Element>;
</s> add startIcon?: JSX.Element | Array<JSX.Element>;
endIcon?: JSX.Element | Array<JSX.Element>; </s> remove // export { default as FabList } from './FabList';
// export { default as FabItem } from './FabItem';
</s> add </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove import { Platform } from 'react-native';
</s> add </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/Fab/types.tsx | |
<mask> import React, { forwardRef } from 'react';
<mask> import type { TouchableHighlight, TouchableOpacity } from 'react-native';
<mask> import { Platform } from 'react-native';
<mask> import { useThemeProps } from '../../../hooks';
<mask> import { Button, HStack, IButtonProps } from '../../primitives';
<mask>
<mask> export type IIconButtonProps = IButtonProps & {
<mask> icon?: JSX.Element;
</s> Fixes for Icon button and changes for Button icon props </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove import IconButton from '../IconButton';
</s> add import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); </s> remove // export { default as FabList } from './FabList';
// export { default as FabItem } from './FabItem';
</s> add | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/IconButton/index.tsx | |
import Button, { IButtonProps } from '../../primitives/Button'; | <mask> import React, { forwardRef } from 'react';
<mask> import type { TouchableHighlight, TouchableOpacity } from 'react-native';
<mask> import { Platform } from 'react-native';
<mask> import { useThemeProps } from '../../../hooks';
<mask> import { Button, HStack, IButtonProps } from '../../primitives';
<mask>
<mask> export type IIconButtonProps = IButtonProps & {
<mask> icon?: JSX.Element;
<mask> label?: JSX.Element;
<mask> };
</s> Fixes for Icon button and changes for Button icon props </s> remove import { Platform } from 'react-native';
</s> add </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove import IconButton from '../IconButton';
</s> add import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); </s> remove // export { default as FabList } from './FabList';
// export { default as FabItem } from './FabItem';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/IconButton/index.tsx |
export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; | <mask> import { Platform } from 'react-native';
<mask> import { useThemeProps } from '../../../hooks';
<mask> import { Button, HStack, IButtonProps } from '../../primitives';
<mask>
<mask> export type IIconButtonProps = IButtonProps & {
<mask> icon?: JSX.Element;
<mask> label?: JSX.Element;
<mask> };
<mask>
<mask> const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = useThemeProps('IconButton', props);
<mask> return (
</s> Fixes for Icon button and changes for Button icon props </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove import { Platform } from 'react-native';
</s> add </s> remove const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
</s> add const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => { </s> remove import IconButton from '../IconButton';
</s> add import Button from '../../primitives/Button';
import { HStack } from '../../primitives/Stack'; </s> remove const { placement, ...newProps } = omitUndefined(props);
</s> add const { label, icon, placement, ...newProps } = omitUndefined(props); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/IconButton/index.tsx |
const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => { | <mask> icon?: JSX.Element;
<mask> label?: JSX.Element;
<mask> };
<mask>
<mask> const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = useThemeProps('IconButton', props);
<mask> return (
<mask> <Button ref={ref} {...newProps}>
<mask> {icon && label ? (
<mask> <HStack
</s> Fixes for Icon button and changes for Button icon props </s> remove {icon && label ? (
<HStack
// NOTE: Don't know why but it works
pt={Platform.OS === 'ios' ? 2 : undefined}
space={1}
justifyContent="center"
alignItems="center"
>
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</s> add {icon} </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove />
</s> add >
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove leftIcon,
rightIcon,
</s> add startIcon,
endIcon, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/IconButton/index.tsx |
{icon} | <mask> const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = useThemeProps('IconButton', props);
<mask> return (
<mask> <Button ref={ref} {...newProps}>
<mask> {icon && label ? (
<mask> <HStack
<mask> // NOTE: Don't know why but it works
<mask> pt={Platform.OS === 'ios' ? 2 : undefined}
<mask> space={1}
<mask> justifyContent="center"
<mask> alignItems="center"
<mask> >
<mask> {icon}
<mask> {label}
<mask> </HStack>
<mask> ) : (
<mask> icon ?? label
<mask> )}
<mask> </Button>
<mask> );
<mask> };
<mask>
<mask> export default React.memo(
</s> Fixes for Icon button and changes for Button icon props </s> remove const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
</s> add const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => { </s> remove />
</s> add >
{icon && label ? (
<HStack space={1} justifyContent="center" alignItems="center">
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</Button> </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove {rightIcon ? (
<Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{rightIcon}</Box>
</s> add {endIcon ? (
<Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{endIcon}</Box> </s> remove {leftIcon ? (
<Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{leftIcon}</Box>
</s> add {startIcon ? (
<Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{startIcon}</Box> | [
"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/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/composites/IconButton/index.tsx |
startIcon,
endIcon, | <mask> highlight,
<mask> isLoading,
<mask> isLoadingText,
<mask> size,
<mask> leftIcon,
<mask> rightIcon,
<mask> spinner,
<mask> ...props
<mask> }: IButtonProps & IBoxProps,
<mask> ref: any
<mask> ) => {
</s> Fixes for Icon button and changes for Button icon props </s> remove export type IIconButtonProps = IButtonProps & {
icon?: JSX.Element;
label?: JSX.Element;
</s> add export type IIconButtonProps = Omit<IButtonProps, '_text'> & {
icon: JSX.Element; </s> remove const IconButton = ({ icon, label, ...props }: IIconButtonProps, ref: any) => {
</s> add const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => { </s> remove {icon && label ? (
<HStack
// NOTE: Don't know why but it works
pt={Platform.OS === 'ios' ? 2 : undefined}
space={1}
justifyContent="center"
alignItems="center"
>
{icon}
{label}
</HStack>
) : (
icon ?? label
)}
</s> add {icon} </s> remove import { Button, HStack, IButtonProps } from '../../primitives';
</s> add import Button, { IButtonProps } from '../../primitives/Button'; </s> remove import { Platform } from 'react-native';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1706397fb9f7c3102ee33c4bf02dbae44f5c4815 | src/components/primitives/Button/index.tsx |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.