@reown/appkit-react-native 0.0.0-fix-ui-changes-20250829144656 → 0.0.0-fix-ui-changes-20250829182619
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/AppKit.js +6 -1
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js +1 -2
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/index.js +58 -55
- package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/styles.js +9 -10
- package/lib/commonjs/partials/w3m-selector-modal/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js +3 -2
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js +6 -4
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/styles.js +4 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js +3 -2
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js +2 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/styles.js +3 -0
- package/lib/commonjs/views/w3m-onramp-view/styles.js.map +1 -1
- package/lib/module/AppKit.js +6 -1
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js +4 -2
- package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/index.js +1 -2
- package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/index.js +59 -56
- package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/styles.js +9 -10
- package/lib/module/partials/w3m-selector-modal/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js +3 -2
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/index.js +6 -4
- package/lib/module/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/styles.js +4 -1
- package/lib/module/views/w3m-onramp-settings-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Currency.js +3 -2
- package/lib/module/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/index.js +2 -1
- package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/styles.js +3 -0
- package/lib/module/views/w3m-onramp-view/styles.js.map +1 -1
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/styles.d.ts +6 -7
- package/lib/typescript/partials/w3m-selector-modal/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts +3 -1
- package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/styles.d.ts +4 -1
- package/lib/typescript/views/w3m-onramp-settings-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts +3 -1
- package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/styles.d.ts +3 -0
- package/lib/typescript/views/w3m-onramp-view/styles.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/AppKit.ts +6 -1
- package/src/partials/w3m-all-wallets-list/components/WalletList.tsx +5 -2
- package/src/partials/w3m-all-wallets-list/index.tsx +2 -3
- package/src/partials/w3m-selector-modal/index.tsx +69 -61
- package/src/partials/w3m-selector-modal/styles.ts +9 -10
- package/src/views/w3m-onramp-settings-view/components/Country.tsx +8 -3
- package/src/views/w3m-onramp-settings-view/index.tsx +4 -2
- package/src/views/w3m-onramp-settings-view/styles.ts +4 -1
- package/src/views/w3m-onramp-view/components/Currency.tsx +4 -3
- package/src/views/w3m-onramp-view/index.tsx +1 -0
- package/src/views/w3m-onramp-view/styles.ts +3 -0
|
@@ -57,68 +57,76 @@ export function SelectorModal({
|
|
|
57
57
|
return (
|
|
58
58
|
<Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
|
|
59
59
|
<View style={styles.modal}>
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
) : (
|
|
81
|
-
<IconBox
|
|
82
|
-
style={styles.iconPlaceholder}
|
|
83
|
-
icon="networkPlaceholder"
|
|
84
|
-
background
|
|
85
|
-
iconColor="fg-200"
|
|
86
|
-
size="sm"
|
|
60
|
+
<FlatList
|
|
61
|
+
data={items}
|
|
62
|
+
renderItem={renderItem}
|
|
63
|
+
fadingEdgeLength={20}
|
|
64
|
+
automaticallyAdjustKeyboardInsets={false}
|
|
65
|
+
keyboardShouldPersistTaps="always"
|
|
66
|
+
style={[styles.container, { backgroundColor: Theme['bg-100'], maxHeight }]}
|
|
67
|
+
ListHeaderComponentStyle={styles.header}
|
|
68
|
+
ListHeaderComponent={
|
|
69
|
+
<>
|
|
70
|
+
<FlexView
|
|
71
|
+
alignItems="center"
|
|
72
|
+
justifyContent="space-between"
|
|
73
|
+
flexDirection="row"
|
|
74
|
+
style={styles.headerTop}
|
|
75
|
+
>
|
|
76
|
+
<IconLink
|
|
77
|
+
icon="chevronLeft"
|
|
78
|
+
onPress={onClose}
|
|
79
|
+
testID="selector-modal-button-back"
|
|
87
80
|
/>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
81
|
+
{!!title && <Text variant="paragraph-600">{title}</Text>}
|
|
82
|
+
{showNetwork ? (
|
|
83
|
+
networkImage ? (
|
|
84
|
+
<FlexView
|
|
85
|
+
alignItems="center"
|
|
86
|
+
justifyContent="center"
|
|
87
|
+
style={styles.iconPlaceholder}
|
|
88
|
+
>
|
|
89
|
+
<Image source={networkImage} style={styles.networkImage} />
|
|
90
|
+
</FlexView>
|
|
91
|
+
) : (
|
|
92
|
+
<IconBox
|
|
93
|
+
style={styles.iconPlaceholder}
|
|
94
|
+
icon="networkPlaceholder"
|
|
95
|
+
background
|
|
96
|
+
iconColor="fg-200"
|
|
97
|
+
size="sm"
|
|
98
|
+
/>
|
|
99
|
+
)
|
|
100
|
+
) : (
|
|
101
|
+
<View style={styles.iconPlaceholder} />
|
|
102
|
+
)}
|
|
103
|
+
</FlexView>
|
|
104
|
+
<SearchBar
|
|
105
|
+
onChangeText={onSearch}
|
|
106
|
+
style={styles.searchBar}
|
|
107
|
+
placeholder={searchPlaceholder}
|
|
108
|
+
/>
|
|
109
|
+
{selectedItem ? (
|
|
110
|
+
<FlexView>
|
|
111
|
+
{renderItem({ item: selectedItem })}
|
|
112
|
+
<Separator style={styles.separator} color="gray-glass-005" />
|
|
113
|
+
</FlexView>
|
|
114
|
+
) : null}
|
|
115
|
+
</>
|
|
116
|
+
}
|
|
117
|
+
contentContainerStyle={styles.listContent}
|
|
118
|
+
ItemSeparatorComponent={renderSeparator}
|
|
119
|
+
keyExtractor={keyExtractor}
|
|
120
|
+
getItemLayout={
|
|
121
|
+
itemHeight
|
|
122
|
+
? (_, index) => ({
|
|
123
|
+
length: itemHeight + SEPARATOR_HEIGHT,
|
|
124
|
+
offset: (itemHeight + SEPARATOR_HEIGHT) * index,
|
|
125
|
+
index
|
|
126
|
+
})
|
|
127
|
+
: undefined
|
|
128
|
+
}
|
|
129
|
+
/>
|
|
122
130
|
</View>
|
|
123
131
|
</Modal>
|
|
124
132
|
);
|
|
@@ -8,20 +8,19 @@ export default StyleSheet.create({
|
|
|
8
8
|
justifyContent: 'flex-end'
|
|
9
9
|
},
|
|
10
10
|
header: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
paddingTop: Spacing['2xs'],
|
|
12
|
+
paddingBottom: Spacing.s
|
|
13
|
+
},
|
|
14
|
+
headerTop: {
|
|
15
|
+
paddingHorizontal: Spacing.m,
|
|
16
|
+
paddingBottom: Spacing.xs
|
|
13
17
|
},
|
|
14
18
|
container: {
|
|
15
19
|
borderTopLeftRadius: BorderRadius.l,
|
|
16
|
-
borderTopRightRadius: BorderRadius.l
|
|
17
|
-
paddingTop: Spacing.m
|
|
18
|
-
},
|
|
19
|
-
selectedContainer: {
|
|
20
|
-
paddingHorizontal: Spacing.m
|
|
20
|
+
borderTopRightRadius: BorderRadius.l
|
|
21
21
|
},
|
|
22
22
|
listContent: {
|
|
23
|
-
paddingTop: Spacing.s
|
|
24
|
-
paddingHorizontal: Spacing.m
|
|
23
|
+
paddingTop: Spacing.s
|
|
25
24
|
},
|
|
26
25
|
iconPlaceholder: {
|
|
27
26
|
height: 32,
|
|
@@ -37,6 +36,6 @@ export default StyleSheet.create({
|
|
|
37
36
|
marginHorizontal: Spacing.s
|
|
38
37
|
},
|
|
39
38
|
separator: {
|
|
40
|
-
|
|
39
|
+
marginVertical: Spacing.xs
|
|
41
40
|
}
|
|
42
41
|
});
|
|
@@ -7,24 +7,29 @@ import {
|
|
|
7
7
|
Icon,
|
|
8
8
|
BorderRadius
|
|
9
9
|
} from '@reown/appkit-ui-react-native';
|
|
10
|
-
import { StyleSheet } from 'react-native';
|
|
10
|
+
import { StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
11
11
|
import { SvgUri } from 'react-native-svg';
|
|
12
12
|
|
|
13
13
|
interface Props {
|
|
14
14
|
onPress: (item: OnRampCountry) => void;
|
|
15
15
|
item: OnRampCountry;
|
|
16
16
|
selected: boolean;
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const ITEM_HEIGHT = 60;
|
|
20
21
|
|
|
21
|
-
export function Country({ onPress, item, selected }: Props) {
|
|
22
|
+
export function Country({ onPress, item, selected, style }: Props) {
|
|
22
23
|
const handlePress = () => {
|
|
23
24
|
onPress(item);
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
|
-
<Pressable
|
|
28
|
+
<Pressable
|
|
29
|
+
onPress={handlePress}
|
|
30
|
+
style={[styles.container, style]}
|
|
31
|
+
backgroundColor="transparent"
|
|
32
|
+
>
|
|
28
33
|
<FlexView flexDirection="row" alignItems="center" justifyContent="flex-start" padding="s">
|
|
29
34
|
<FlexView style={styles.imageContainer}>
|
|
30
35
|
{item.flagImageUrl && SvgUri ? (
|
|
@@ -55,6 +55,7 @@ export function OnRampSettingsView() {
|
|
|
55
55
|
item={parsedItem}
|
|
56
56
|
onPress={onPressModalItem}
|
|
57
57
|
selected={parsedItem.countryCode === selectedCountry?.countryCode}
|
|
58
|
+
style={styles.selectorItem}
|
|
58
59
|
/>
|
|
59
60
|
);
|
|
60
61
|
}
|
|
@@ -68,6 +69,7 @@ export function OnRampSettingsView() {
|
|
|
68
69
|
selected={parsedItem.currencyCode === paymentCurrency?.currencyCode}
|
|
69
70
|
title={parsedItem.name}
|
|
70
71
|
subtitle={parsedItem.currencyCode}
|
|
72
|
+
style={styles.selectorItem}
|
|
71
73
|
/>
|
|
72
74
|
);
|
|
73
75
|
};
|
|
@@ -79,7 +81,7 @@ export function OnRampSettingsView() {
|
|
|
79
81
|
onPress={onCountryPress}
|
|
80
82
|
chevron
|
|
81
83
|
style={styles.firstItem}
|
|
82
|
-
contentStyle={styles.
|
|
84
|
+
contentStyle={styles.listItem}
|
|
83
85
|
>
|
|
84
86
|
<FlexView
|
|
85
87
|
alignItems="center"
|
|
@@ -101,7 +103,7 @@ export function OnRampSettingsView() {
|
|
|
101
103
|
) : null}
|
|
102
104
|
</FlexView>
|
|
103
105
|
</ListItem>
|
|
104
|
-
<ListItem onPress={onPaymentCurrencyPress} chevron contentStyle={styles.
|
|
106
|
+
<ListItem onPress={onPaymentCurrencyPress} chevron contentStyle={styles.listItem}>
|
|
105
107
|
<FlexView
|
|
106
108
|
alignItems="center"
|
|
107
109
|
justifyContent="center"
|
|
@@ -2,7 +2,7 @@ import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
export const styles = StyleSheet.create({
|
|
5
|
-
|
|
5
|
+
listItem: {
|
|
6
6
|
paddingLeft: 0
|
|
7
7
|
},
|
|
8
8
|
firstItem: {
|
|
@@ -21,5 +21,8 @@ export const styles = StyleSheet.create({
|
|
|
21
21
|
imageBorder: {
|
|
22
22
|
borderRadius: BorderRadius.full,
|
|
23
23
|
overflow: 'hidden'
|
|
24
|
+
},
|
|
25
|
+
selectorItem: {
|
|
26
|
+
paddingHorizontal: Spacing.m
|
|
24
27
|
}
|
|
25
28
|
});
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Icon,
|
|
12
12
|
BorderRadius
|
|
13
13
|
} from '@reown/appkit-ui-react-native';
|
|
14
|
-
import { StyleSheet, Image } from 'react-native';
|
|
14
|
+
import { StyleSheet, Image, type StyleProp, type ViewStyle } from 'react-native';
|
|
15
15
|
|
|
16
16
|
export const ITEM_HEIGHT = 60;
|
|
17
17
|
|
|
@@ -22,9 +22,10 @@ interface Props {
|
|
|
22
22
|
title: string;
|
|
23
23
|
subtitle: string;
|
|
24
24
|
testID?: string;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
export function Currency({ onPress, item, selected, title, subtitle, testID }: Props) {
|
|
28
|
+
export function Currency({ onPress, item, selected, title, subtitle, testID, style }: Props) {
|
|
28
29
|
const Theme = useTheme();
|
|
29
30
|
|
|
30
31
|
const handlePress = () => {
|
|
@@ -34,7 +35,7 @@ export function Currency({ onPress, item, selected, title, subtitle, testID }: P
|
|
|
34
35
|
return (
|
|
35
36
|
<Pressable
|
|
36
37
|
onPress={handlePress}
|
|
37
|
-
style={styles.container}
|
|
38
|
+
style={[styles.container, style]}
|
|
38
39
|
backgroundColor="transparent"
|
|
39
40
|
testID={testID}
|
|
40
41
|
>
|