@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.
Files changed (72) hide show
  1. package/lib/commonjs/AppKit.js +6 -1
  2. package/lib/commonjs/AppKit.js.map +1 -1
  3. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
  4. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
  5. package/lib/commonjs/partials/w3m-all-wallets-list/index.js +1 -2
  6. package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
  7. package/lib/commonjs/partials/w3m-selector-modal/index.js +58 -55
  8. package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
  9. package/lib/commonjs/partials/w3m-selector-modal/styles.js +9 -10
  10. package/lib/commonjs/partials/w3m-selector-modal/styles.js.map +1 -1
  11. package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js +3 -2
  12. package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
  13. package/lib/commonjs/views/w3m-onramp-settings-view/index.js +6 -4
  14. package/lib/commonjs/views/w3m-onramp-settings-view/index.js.map +1 -1
  15. package/lib/commonjs/views/w3m-onramp-settings-view/styles.js +4 -1
  16. package/lib/commonjs/views/w3m-onramp-settings-view/styles.js.map +1 -1
  17. package/lib/commonjs/views/w3m-onramp-view/components/Currency.js +3 -2
  18. package/lib/commonjs/views/w3m-onramp-view/components/Currency.js.map +1 -1
  19. package/lib/commonjs/views/w3m-onramp-view/index.js +2 -1
  20. package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
  21. package/lib/commonjs/views/w3m-onramp-view/styles.js +3 -0
  22. package/lib/commonjs/views/w3m-onramp-view/styles.js.map +1 -1
  23. package/lib/module/AppKit.js +6 -1
  24. package/lib/module/AppKit.js.map +1 -1
  25. package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js +4 -2
  26. package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
  27. package/lib/module/partials/w3m-all-wallets-list/index.js +1 -2
  28. package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
  29. package/lib/module/partials/w3m-selector-modal/index.js +59 -56
  30. package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
  31. package/lib/module/partials/w3m-selector-modal/styles.js +9 -10
  32. package/lib/module/partials/w3m-selector-modal/styles.js.map +1 -1
  33. package/lib/module/views/w3m-onramp-settings-view/components/Country.js +3 -2
  34. package/lib/module/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
  35. package/lib/module/views/w3m-onramp-settings-view/index.js +6 -4
  36. package/lib/module/views/w3m-onramp-settings-view/index.js.map +1 -1
  37. package/lib/module/views/w3m-onramp-settings-view/styles.js +4 -1
  38. package/lib/module/views/w3m-onramp-settings-view/styles.js.map +1 -1
  39. package/lib/module/views/w3m-onramp-view/components/Currency.js +3 -2
  40. package/lib/module/views/w3m-onramp-view/components/Currency.js.map +1 -1
  41. package/lib/module/views/w3m-onramp-view/index.js +2 -1
  42. package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
  43. package/lib/module/views/w3m-onramp-view/styles.js +3 -0
  44. package/lib/module/views/w3m-onramp-view/styles.js.map +1 -1
  45. package/lib/typescript/AppKit.d.ts.map +1 -1
  46. package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts.map +1 -1
  47. package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
  48. package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
  49. package/lib/typescript/partials/w3m-selector-modal/styles.d.ts +6 -7
  50. package/lib/typescript/partials/w3m-selector-modal/styles.d.ts.map +1 -1
  51. package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts +3 -1
  52. package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts.map +1 -1
  53. package/lib/typescript/views/w3m-onramp-settings-view/index.d.ts.map +1 -1
  54. package/lib/typescript/views/w3m-onramp-settings-view/styles.d.ts +4 -1
  55. package/lib/typescript/views/w3m-onramp-settings-view/styles.d.ts.map +1 -1
  56. package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts +3 -1
  57. package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts.map +1 -1
  58. package/lib/typescript/views/w3m-onramp-view/index.d.ts.map +1 -1
  59. package/lib/typescript/views/w3m-onramp-view/styles.d.ts +3 -0
  60. package/lib/typescript/views/w3m-onramp-view/styles.d.ts.map +1 -1
  61. package/package.json +5 -5
  62. package/src/AppKit.ts +6 -1
  63. package/src/partials/w3m-all-wallets-list/components/WalletList.tsx +5 -2
  64. package/src/partials/w3m-all-wallets-list/index.tsx +2 -3
  65. package/src/partials/w3m-selector-modal/index.tsx +69 -61
  66. package/src/partials/w3m-selector-modal/styles.ts +9 -10
  67. package/src/views/w3m-onramp-settings-view/components/Country.tsx +8 -3
  68. package/src/views/w3m-onramp-settings-view/index.tsx +4 -2
  69. package/src/views/w3m-onramp-settings-view/styles.ts +4 -1
  70. package/src/views/w3m-onramp-view/components/Currency.tsx +4 -3
  71. package/src/views/w3m-onramp-view/index.tsx +1 -0
  72. 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
- <FlexView
61
- style={[styles.container, { backgroundColor: Theme['bg-100'], height: maxHeight }]}
62
- >
63
- <FlexView
64
- alignItems="center"
65
- justifyContent="space-between"
66
- flexDirection="row"
67
- style={styles.header}
68
- >
69
- <IconLink icon="chevronLeft" onPress={onClose} testID="selector-modal-button-back" />
70
- {!!title && <Text variant="paragraph-600">{title}</Text>}
71
- {showNetwork ? (
72
- networkImage ? (
73
- <FlexView
74
- alignItems="center"
75
- justifyContent="center"
76
- style={styles.iconPlaceholder}
77
- >
78
- <Image source={networkImage} style={styles.networkImage} />
79
- </FlexView>
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
- <View style={styles.iconPlaceholder} />
91
- )}
92
- </FlexView>
93
- <SearchBar
94
- onChangeText={onSearch}
95
- style={styles.searchBar}
96
- placeholder={searchPlaceholder}
97
- />
98
- {selectedItem ? (
99
- <FlexView style={styles.selectedContainer}>
100
- {renderItem({ item: selectedItem })}
101
- <Separator style={styles.separator} color="gray-glass-020" />
102
- </FlexView>
103
- ) : null}
104
- <FlatList
105
- data={items}
106
- renderItem={renderItem}
107
- fadingEdgeLength={20}
108
- contentContainerStyle={styles.listContent}
109
- ItemSeparatorComponent={renderSeparator}
110
- keyExtractor={keyExtractor}
111
- getItemLayout={
112
- itemHeight
113
- ? (_, index) => ({
114
- length: itemHeight + SEPARATOR_HEIGHT,
115
- offset: (itemHeight + SEPARATOR_HEIGHT) * index,
116
- index
117
- })
118
- : undefined
119
- }
120
- />
121
- </FlexView>
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
- marginBottom: Spacing.s,
12
- paddingHorizontal: Spacing.m
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
- marginTop: Spacing.m
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 onPress={handlePress} style={styles.container} backgroundColor="transparent">
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.itemContent}
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.itemContent}>
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
- itemContent: {
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
  >
@@ -135,6 +135,7 @@ export function OnRampView() {
135
135
  title={item.name}
136
136
  subtitle={item.currencyCode.split('_')[0] ?? item.currencyCode}
137
137
  testID={`currency-item-${item.currencyCode}`}
138
+ style={styles.currencyItem}
138
139
  />
139
140
  );
140
141
  };
@@ -24,6 +24,9 @@ export default StyleSheet.create({
24
24
  borderWidth: 0,
25
25
  borderRadius: BorderRadius['3xs']
26
26
  },
27
+ currencyItem: {
28
+ paddingHorizontal: Spacing.m
29
+ },
27
30
  currencyInput: {
28
31
  marginBottom: Spacing.m
29
32
  },