@reown/appkit-ui-react-native 0.0.0-refactor-modal-migration-20241009160232 → 0.0.0-refactor-modal-migration-20241015194516

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 (57) hide show
  1. package/lib/commonjs/assets/visual/Google.js +59 -0
  2. package/lib/commonjs/assets/visual/Google.js.map +1 -0
  3. package/lib/commonjs/assets/visual/Lightbulb.js +58 -0
  4. package/lib/commonjs/assets/visual/Lightbulb.js.map +1 -0
  5. package/lib/commonjs/assets/visual/Pencil.js +81 -0
  6. package/lib/commonjs/assets/visual/Pencil.js.map +1 -0
  7. package/lib/commonjs/components/wui-visual/index.js +6 -0
  8. package/lib/commonjs/components/wui-visual/index.js.map +1 -1
  9. package/lib/commonjs/composites/wui-compatible-network/index.js +6 -6
  10. package/lib/commonjs/composites/wui-compatible-network/index.js.map +1 -1
  11. package/lib/commonjs/composites/wui-otp/index.js +1 -1
  12. package/lib/commonjs/composites/wui-otp/index.js.map +1 -1
  13. package/lib/commonjs/composites/wui-promo/index.js +48 -0
  14. package/lib/commonjs/composites/wui-promo/index.js.map +1 -0
  15. package/lib/commonjs/index.js +7 -0
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/module/assets/visual/Google.js +51 -0
  18. package/lib/module/assets/visual/Google.js.map +1 -0
  19. package/lib/module/assets/visual/Lightbulb.js +50 -0
  20. package/lib/module/assets/visual/Lightbulb.js.map +1 -0
  21. package/lib/module/assets/visual/Pencil.js +73 -0
  22. package/lib/module/assets/visual/Pencil.js.map +1 -0
  23. package/lib/module/components/wui-visual/index.js +6 -0
  24. package/lib/module/components/wui-visual/index.js.map +1 -1
  25. package/lib/module/composites/wui-compatible-network/index.js +6 -6
  26. package/lib/module/composites/wui-compatible-network/index.js.map +1 -1
  27. package/lib/module/composites/wui-otp/index.js +2 -2
  28. package/lib/module/composites/wui-otp/index.js.map +1 -1
  29. package/lib/module/composites/wui-promo/index.js +42 -0
  30. package/lib/module/composites/wui-promo/index.js.map +1 -0
  31. package/lib/module/index.js +1 -0
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/typescript/assets/visual/Google.d.ts +4 -0
  34. package/lib/typescript/assets/visual/Google.d.ts.map +1 -0
  35. package/lib/typescript/assets/visual/Lightbulb.d.ts +4 -0
  36. package/lib/typescript/assets/visual/Lightbulb.d.ts.map +1 -0
  37. package/lib/typescript/assets/visual/Pencil.d.ts +4 -0
  38. package/lib/typescript/assets/visual/Pencil.d.ts.map +1 -0
  39. package/lib/typescript/components/wui-visual/index.d.ts.map +1 -1
  40. package/lib/typescript/composites/wui-compatible-network/index.d.ts.map +1 -1
  41. package/lib/typescript/composites/wui-otp/index.d.ts.map +1 -1
  42. package/lib/typescript/composites/wui-promo/index.d.ts +8 -0
  43. package/lib/typescript/composites/wui-promo/index.d.ts.map +1 -0
  44. package/lib/typescript/index.d.ts +1 -0
  45. package/lib/typescript/index.d.ts.map +1 -1
  46. package/lib/typescript/utils/TypesUtil.d.ts +2 -2
  47. package/lib/typescript/utils/TypesUtil.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/assets/visual/Google.tsx +43 -0
  50. package/src/assets/visual/Lightbulb.tsx +54 -0
  51. package/src/assets/visual/Pencil.tsx +80 -0
  52. package/src/components/wui-visual/index.tsx +6 -0
  53. package/src/composites/wui-compatible-network/index.tsx +4 -4
  54. package/src/composites/wui-otp/index.tsx +2 -3
  55. package/src/composites/wui-promo/index.tsx +42 -0
  56. package/src/index.ts +1 -0
  57. package/src/utils/TypesUtil.ts +12 -0
@@ -0,0 +1,80 @@
1
+ import Svg, { ClipPath, Defs, G, Path, Rect, type SvgProps } from 'react-native-svg';
2
+
3
+ const PencilSvg = (props: SvgProps) => (
4
+ <Svg width="64" height="64" viewBox="0 0 64 64" fill="none" {...props}>
5
+ <G clip-path="url(#clip0_241_31635)">
6
+ <Path
7
+ d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58317 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58317 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9268C60.4784 58.4158 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4158 2.1019 55.9268C0 52.2418 0 47.3077 0 37.4395V26.5595Z"
8
+ fill="#EB8B47"
9
+ />
10
+ <Path
11
+ d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z"
12
+ stroke="#141414"
13
+ strokeOpacity="0.1"
14
+ />
15
+ <Path
16
+ d="M28.1042 49.2329L13.1024 51.2077L15.0772 36.2059L37.1015 14.1815C39.2441 12.039 40.3154 10.9677 41.5718 10.624C42.4205 10.3918 43.3159 10.3918 44.1645 10.624C45.421 10.9677 46.4922 12.039 48.6348 14.1815L50.1286 15.6753C52.2711 17.8179 53.3424 18.8891 53.6861 20.1456C53.9183 20.9942 53.9183 21.8896 53.6861 22.7383C53.3424 23.9947 52.2711 25.066 50.1286 27.2086L28.1042 49.2329Z"
17
+ fill="#FF974C"
18
+ stroke="#E4E7E7"
19
+ strokeWidth="2"
20
+ strokeLinecap="round"
21
+ strokeLinejoin="round"
22
+ />
23
+ <Path
24
+ d="M38.5962 20.5376L22.4199 36.7139"
25
+ stroke="#E4E7E7"
26
+ strokeWidth="2"
27
+ strokeLinecap="round"
28
+ strokeLinejoin="round"
29
+ />
30
+ <Path
31
+ d="M43.7727 25.714L27.5964 41.8903"
32
+ stroke="#E4E7E7"
33
+ strokeWidth="2"
34
+ strokeLinecap="round"
35
+ strokeLinejoin="round"
36
+ />
37
+ <Path
38
+ d="M22.3703 36.7635C19.3258 39.808 16.0198 36.6395 16.2616 35.0324"
39
+ stroke="#E4E7E7"
40
+ strokeWidth="2"
41
+ strokeLinecap="round"
42
+ strokeLinejoin="round"
43
+ />
44
+ <Path
45
+ d="M27.5466 41.9399C24.5034 44.9831 28.155 48.7098 29.2738 48.0475"
46
+ stroke="#E4E7E7"
47
+ strokeWidth="2"
48
+ strokeLinecap="round"
49
+ strokeLinejoin="round"
50
+ />
51
+ <Path
52
+ d="M27.5468 41.9398C23.428 46.0586 18.2516 40.8822 22.3704 36.7634"
53
+ stroke="#E4E7E7"
54
+ strokeWidth="2"
55
+ strokeLinecap="round"
56
+ strokeLinejoin="round"
57
+ />
58
+ <Path
59
+ d="M15.8191 50.5214C15.4711 49.5823 14.728 48.8392 13.7889 48.4912"
60
+ stroke="#E4E7E7"
61
+ strokeWidth="2"
62
+ strokeLinecap="round"
63
+ strokeLinejoin="round"
64
+ />
65
+ <Path
66
+ d="M49.2862 29.5805L34.7275 15.0219"
67
+ stroke="#E4E7E7"
68
+ strokeWidth="2"
69
+ strokeLinejoin="round"
70
+ />
71
+ </G>
72
+ <Defs>
73
+ <ClipPath id="clip0_241_31635">
74
+ <Rect width="64" height="64" fill="white" />
75
+ </ClipPath>
76
+ </Defs>
77
+ </Svg>
78
+ );
79
+
80
+ export default PencilSvg;
@@ -14,6 +14,9 @@ import NounSvg from '../../assets/visual/Noun';
14
14
  import ProfileSvg from '../../assets/visual/Profile';
15
15
  import SystemSvg from '../../assets/visual/System';
16
16
  import type { VisualType } from '../../utils/TypesUtil';
17
+ import GoogleSvg from '../../assets/visual/Google';
18
+ import LightbulbSvg from '../../assets/visual/Lightbulb';
19
+ import PencilSvg from '../../assets/visual/Pencil';
17
20
 
18
21
  const svgOptions: Record<VisualType, (props: SvgProps) => JSX.Element> = {
19
22
  browser: BrowserSvg,
@@ -21,12 +24,15 @@ const svgOptions: Record<VisualType, (props: SvgProps) => JSX.Element> = {
21
24
  defi: DefiSvg,
22
25
  defiAlt: DefiAltSvg,
23
26
  eth: EthSvg,
27
+ google: GoogleSvg,
24
28
  layers: LayersSvg,
29
+ lightbulb: LightbulbSvg,
25
30
  lock: LockSvg,
26
31
  login: LoginSvg,
27
32
  network: NetworkSvg,
28
33
  nft: NftSvg,
29
34
  noun: NounSvg,
35
+ pencil: PencilSvg,
30
36
  profile: ProfileSvg,
31
37
  system: SystemSvg
32
38
  };
@@ -13,9 +13,6 @@ export interface CompatibleNetworkProps {
13
13
  style?: StyleProp<ViewStyle>;
14
14
  }
15
15
 
16
- const offset = [20, 15, 10, 5, 0];
17
- const zIndex = [5, 4, 3, 2, 1];
18
-
19
16
  export function CompatibleNetwork({
20
17
  text,
21
18
  onPress,
@@ -44,7 +41,7 @@ export function CompatibleNetwork({
44
41
  imageHeaders={imageHeaders}
45
42
  borderColor={Theme['bg-200']}
46
43
  borderWidth={2}
47
- style={{ left: offset[index], zIndex: zIndex[index] }}
44
+ style={[styles.item, { zIndex: networkImages.length - index }]}
48
45
  />
49
46
  ))}
50
47
  </FlexView>
@@ -60,5 +57,8 @@ const styles = StyleSheet.create({
60
57
  flexDirection: 'row',
61
58
  justifyContent: 'space-between',
62
59
  paddingRight: 0
60
+ },
61
+ item: {
62
+ marginLeft: -5
63
63
  }
64
64
  });
@@ -3,8 +3,7 @@ import {
3
3
  type NativeSyntheticEvent,
4
4
  TextInput,
5
5
  type TextInputKeyPressEventData,
6
- View,
7
- Platform
6
+ View
8
7
  } from 'react-native';
9
8
  import { InputNumeric, type InputNumericProps } from '../wui-input-numeric';
10
9
  import styles from './styles';
@@ -90,7 +89,7 @@ export function Otp({ length, style, onChangeText, autoFocus }: OtpProps) {
90
89
  inputRef={refArray[index]}
91
90
  onChangeText={text => _onChangeText(text, index)}
92
91
  onKeyPress={(e: any) => onKeyPress(e, index)}
93
- autoComplete={Platform.OS === 'android' ? 'sms-otp' : 'one-time-code'}
92
+ autoComplete="off"
94
93
  />
95
94
  ))}
96
95
  </View>
@@ -0,0 +1,42 @@
1
+ import { Pressable, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
2
+ import { Icon } from '../../components/wui-icon';
3
+ import { Text } from '../../components/wui-text';
4
+ import { useTheme } from '../../hooks/useTheme';
5
+ import { FlexView } from '../../layout/wui-flex';
6
+ import { BorderRadius, Spacing } from '../../utils/ThemeUtil';
7
+
8
+ export interface PromoProps {
9
+ text: string;
10
+ style?: StyleProp<ViewStyle>;
11
+ onPress?: () => void;
12
+ }
13
+
14
+ export function Promo({ text, style, onPress }: PromoProps) {
15
+ const Theme = useTheme();
16
+
17
+ return (
18
+ <Pressable style={style} onPress={onPress}>
19
+ <FlexView
20
+ alignItems="center"
21
+ justifyContent="center"
22
+ flexDirection="row"
23
+ padding={['xs', 'xs', 'xs', 'm']}
24
+ style={[styles.container, { backgroundColor: Theme['gray-glass-090'] }]}
25
+ >
26
+ <Text variant="small-600" color="bg-100">
27
+ {text}
28
+ </Text>
29
+ <Icon style={styles.icon} name="arrowRight" color="bg-100" size="xs" />
30
+ </FlexView>
31
+ </Pressable>
32
+ );
33
+ }
34
+
35
+ const styles = StyleSheet.create({
36
+ container: {
37
+ borderRadius: BorderRadius.full
38
+ },
39
+ icon: {
40
+ marginLeft: Spacing['2xs']
41
+ }
42
+ });
package/src/index.ts CHANGED
@@ -49,6 +49,7 @@ export { LogoSelect, type LogoSelectProps } from './composites/wui-logo-select';
49
49
  export { NetworkButton, type NetworkButtonProps } from './composites/wui-network-button';
50
50
  export { NetworkImage, type NetworkImageProps } from './composites/wui-network-image';
51
51
  export { Otp, type OtpProps } from './composites/wui-otp';
52
+ export { Promo, type PromoProps } from './composites/wui-promo';
52
53
  export { QrCode, type QrCodeProps } from './composites/wui-qr-code';
53
54
  export { SearchBar, type SearchBarProps } from './composites/wui-search-bar';
54
55
  export { Snackbar, type SnackbarProps } from './composites/wui-snackbar';
@@ -96,6 +96,15 @@ export type ColorType =
96
96
  | 'fg-250'
97
97
  | 'fg-275'
98
98
  | 'fg-300'
99
+ | 'bg-100'
100
+ | 'bg-125'
101
+ | 'bg-150'
102
+ | 'bg-175'
103
+ | 'bg-200'
104
+ | 'bg-225'
105
+ | 'bg-250'
106
+ | 'bg-275'
107
+ | 'bg-300'
99
108
  | 'accent-glass-020'
100
109
  | 'accent-glass-015'
101
110
  | 'accent-glass-010'
@@ -186,12 +195,15 @@ export type VisualType =
186
195
  | 'defi'
187
196
  | 'defiAlt'
188
197
  | 'eth'
198
+ | 'google'
189
199
  | 'layers'
200
+ | 'lightbulb'
190
201
  | 'lock'
191
202
  | 'login'
192
203
  | 'network'
193
204
  | 'nft'
194
205
  | 'noun'
206
+ | 'pencil'
195
207
  | 'profile'
196
208
  | 'system';
197
209