From 2097b560bf4f25c0dffcf0470755a39cc51cd7e6 Mon Sep 17 00:00:00 2001 From: abhijithsajeev27 <115783517+abhijithsajeev27@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:54:39 +0530 Subject: [PATCH 1/6] React native paper updates --- package.json | 2 +- src/components/TextInput/Adornment/TextInputAdornment.tsx | 5 ++--- src/components/TextInput/Adornment/TextInputAffix.tsx | 3 +-- src/components/TextInput/TextInputOutlined.tsx | 1 + src/components/TextInput/helpers.tsx | 2 ++ 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 77f21b1ecd..528ac9faa6 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "lint": "yarn lint-no-fix --fix", "lint-no-fix": "eslint --ext '.js,.ts,.tsx' .", "test": "jest", - "prepack": "bob build && node ./scripts/generate-mappings.js", + "prepare": "bob build && node ./scripts/generate-mappings.js", "release": "release-it", "bootstrap": "yarn --cwd example && yarn --cwd docs && yarn", "docs": "yarn --cwd docs", diff --git a/src/components/TextInput/Adornment/TextInputAdornment.tsx b/src/components/TextInput/Adornment/TextInputAdornment.tsx index 698aae955b..9f03eb2472 100644 --- a/src/components/TextInput/Adornment/TextInputAdornment.tsx +++ b/src/components/TextInput/Adornment/TextInputAdornment.tsx @@ -4,7 +4,6 @@ import type { TextStyle, StyleProp, Animated, - DimensionValue, } from 'react-native'; import type { ThemeProp } from 'src/types'; @@ -63,7 +62,7 @@ export function getAdornmentStyleAdjustmentForNativeInput({ leftAffixWidth: number; rightAffixWidth: number; mode?: 'outlined' | 'flat'; - paddingHorizontal?: DimensionValue; + paddingHorizontal?: number | string; isV3?: boolean; }): AdornmentStyleAdjustmentForNativeInput | {} { const { OUTLINED_INPUT_OFFSET, ADORNMENT_OFFSET } = getConstants(isV3); @@ -131,7 +130,7 @@ export interface TextInputAdornmentProps { textStyle?: StyleProp; visible?: Animated.Value; isTextInputFocused: boolean; - paddingHorizontal?: DimensionValue; + paddingHorizontal?: number | string; maxFontSizeMultiplier?: number | undefined | null; theme?: ThemeProp; disabled?: boolean; diff --git a/src/components/TextInput/Adornment/TextInputAffix.tsx b/src/components/TextInput/Adornment/TextInputAffix.tsx index 22062449ac..21003968af 100644 --- a/src/components/TextInput/Adornment/TextInputAffix.tsx +++ b/src/components/TextInput/Adornment/TextInputAffix.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Animated, - DimensionValue, GestureResponderEvent, LayoutChangeEvent, Pressable, @@ -48,7 +47,7 @@ type ContextState = { visible?: Animated.Value; textStyle?: StyleProp; side: AdornmentSide; - paddingHorizontal?: DimensionValue; + paddingHorizontal?: number | string; maxFontSizeMultiplier?: number | undefined | null; testID?: string; disabled?: boolean; diff --git a/src/components/TextInput/TextInputOutlined.tsx b/src/components/TextInput/TextInputOutlined.tsx index 7f1fe926e8..5abcb73434 100644 --- a/src/components/TextInput/TextInputOutlined.tsx +++ b/src/components/TextInput/TextInputOutlined.tsx @@ -372,6 +372,7 @@ const TextInputOutlined = ({ {...labelProps} labelBackground={LabelBackground} maxFontSizeMultiplier={rest.maxFontSizeMultiplier} + placeholderColor={outlineColor ?? null} /> ) : null} {render?.({ diff --git a/src/components/TextInput/helpers.tsx b/src/components/TextInput/helpers.tsx index 4a5da1d24a..37e4feef24 100644 --- a/src/components/TextInput/helpers.tsx +++ b/src/components/TextInput/helpers.tsx @@ -460,8 +460,10 @@ const getOutlinedOutlineInputColor = ({ if (theme.isV3) { if (disabled) { if (theme.dark) { + if(customOutlineColor) return customOutlineColor return 'transparent'; } + if(customOutlineColor) return customOutlineColor return theme.colors.surfaceDisabled; } From 40e7901f582808113791a779ae3198f7a48ac942 Mon Sep 17 00:00:00 2001 From: abhijithsajeev27 <115783517+abhijithsajeev27@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:07:54 +0530 Subject: [PATCH 2/6] updates for accordion --- src/components/List/ListAccordion.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/List/ListAccordion.tsx b/src/components/List/ListAccordion.tsx index 7c85098898..29db5883c3 100644 --- a/src/components/List/ListAccordion.tsx +++ b/src/components/List/ListAccordion.tsx @@ -12,6 +12,7 @@ import { ViewProps, ViewStyle, PressableAndroidRippleConfig, + Platform, } from 'react-native'; import { ListAccordionGroupContext } from './ListAccordionGroup'; @@ -121,6 +122,10 @@ export type Props = { * `pointerEvents` passed to the `View` container */ pointerEvents?: ViewProps['pointerEvents']; + /** + * containerStyle that is passed to the wrapping TouchableRipple element View. + */ + containerStyle?: StyleProp; }; /** @@ -184,6 +189,7 @@ const ListAccordion = ({ pointerEvents = 'none', titleMaxFontSizeMultiplier, descriptionMaxFontSizeMultiplier, + containerStyle, }: Props) => { const theme = useInternalTheme(themeOverrides); const [expanded, setExpanded] = React.useState( @@ -236,7 +242,7 @@ const ListAccordion = ({ : handlePressAction; return ( - + Date: Thu, 19 Dec 2024 17:11:04 +0530 Subject: [PATCH 3/6] Reverting unwanted changes --- src/components/TextInput/Adornment/TextInputAdornment.tsx | 5 +++-- src/components/TextInput/Adornment/TextInputAffix.tsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/TextInput/Adornment/TextInputAdornment.tsx b/src/components/TextInput/Adornment/TextInputAdornment.tsx index 9f03eb2472..698aae955b 100644 --- a/src/components/TextInput/Adornment/TextInputAdornment.tsx +++ b/src/components/TextInput/Adornment/TextInputAdornment.tsx @@ -4,6 +4,7 @@ import type { TextStyle, StyleProp, Animated, + DimensionValue, } from 'react-native'; import type { ThemeProp } from 'src/types'; @@ -62,7 +63,7 @@ export function getAdornmentStyleAdjustmentForNativeInput({ leftAffixWidth: number; rightAffixWidth: number; mode?: 'outlined' | 'flat'; - paddingHorizontal?: number | string; + paddingHorizontal?: DimensionValue; isV3?: boolean; }): AdornmentStyleAdjustmentForNativeInput | {} { const { OUTLINED_INPUT_OFFSET, ADORNMENT_OFFSET } = getConstants(isV3); @@ -130,7 +131,7 @@ export interface TextInputAdornmentProps { textStyle?: StyleProp; visible?: Animated.Value; isTextInputFocused: boolean; - paddingHorizontal?: number | string; + paddingHorizontal?: DimensionValue; maxFontSizeMultiplier?: number | undefined | null; theme?: ThemeProp; disabled?: boolean; diff --git a/src/components/TextInput/Adornment/TextInputAffix.tsx b/src/components/TextInput/Adornment/TextInputAffix.tsx index 21003968af..22062449ac 100644 --- a/src/components/TextInput/Adornment/TextInputAffix.tsx +++ b/src/components/TextInput/Adornment/TextInputAffix.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Animated, + DimensionValue, GestureResponderEvent, LayoutChangeEvent, Pressable, @@ -47,7 +48,7 @@ type ContextState = { visible?: Animated.Value; textStyle?: StyleProp; side: AdornmentSide; - paddingHorizontal?: number | string; + paddingHorizontal?: DimensionValue; maxFontSizeMultiplier?: number | undefined | null; testID?: string; disabled?: boolean; From dfef2425feab1df40f78a6976ff25bf3352355ac Mon Sep 17 00:00:00 2001 From: abhijithsajeev27 <115783517+abhijithsajeev27@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:21:41 +0530 Subject: [PATCH 4/6] paper updates for automation --- src/components/TextInput/TextInputOutlined.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/TextInput/TextInputOutlined.tsx b/src/components/TextInput/TextInputOutlined.tsx index 5abcb73434..013bf10f15 100644 --- a/src/components/TextInput/TextInputOutlined.tsx +++ b/src/components/TextInput/TextInputOutlined.tsx @@ -333,7 +333,7 @@ const TextInputOutlined = ({ } return ( - + {/* Render the outline separately from the container This is so that the label can overlap the outline @@ -358,6 +358,7 @@ const TextInputOutlined = ({ minHeight, }, ]} + accessible={Platform.OS !== 'ios'} > {label ? ( ) : null} {render?.({ From a5429842eced4cf755caa6cd66ffff289b2a33b6 Mon Sep 17 00:00:00 2001 From: abhijithsajeev27 <115783517+abhijithsajeev27@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:25:42 +0530 Subject: [PATCH 5/6] Unwanted update for automation --- src/components/TextInput/TextInputOutlined.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInput/TextInputOutlined.tsx b/src/components/TextInput/TextInputOutlined.tsx index 013bf10f15..e208fd8914 100644 --- a/src/components/TextInput/TextInputOutlined.tsx +++ b/src/components/TextInput/TextInputOutlined.tsx @@ -374,7 +374,6 @@ const TextInputOutlined = ({ labelBackground={LabelBackground} maxFontSizeMultiplier={rest.maxFontSizeMultiplier} placeholderColor={outlineColor ?? null} - accessible={Platform.OS !== 'ios'} /> ) : null} {render?.({ From c58cf205f7af16c13d9750c08f01c92dcac2278a Mon Sep 17 00:00:00 2001 From: abhijithsajeev27 <115783517+abhijithsajeev27@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:04:28 +0530 Subject: [PATCH 6/6] List accordion updates --- package.json | 2 +- src/components/List/ListAccordion.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 528ac9faa6..77f21b1ecd 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "lint": "yarn lint-no-fix --fix", "lint-no-fix": "eslint --ext '.js,.ts,.tsx' .", "test": "jest", - "prepare": "bob build && node ./scripts/generate-mappings.js", + "prepack": "bob build && node ./scripts/generate-mappings.js", "release": "release-it", "bootstrap": "yarn --cwd example && yarn --cwd docs && yarn", "docs": "yarn --cwd docs", diff --git a/src/components/List/ListAccordion.tsx b/src/components/List/ListAccordion.tsx index 29db5883c3..0f053f8966 100644 --- a/src/components/List/ListAccordion.tsx +++ b/src/components/List/ListAccordion.tsx @@ -261,6 +261,7 @@ const ListAccordion = ({ {left ? left({ @@ -270,6 +271,7 @@ const ListAccordion = ({ : null} {right ? ( right({