@reown/appkit-ui-react-native 0.0.0-feat-multichain-20250801190527 → 0.0.0-feat-multichain-20250805142032

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 (130) hide show
  1. package/lib/commonjs/assets/svg/Reown.js +47 -0
  2. package/lib/commonjs/assets/svg/Reown.js.map +1 -0
  3. package/lib/commonjs/components/wui-icon/index.js +2 -0
  4. package/lib/commonjs/components/wui-icon/index.js.map +1 -1
  5. package/lib/commonjs/components/wui-modal/index.js +4 -4
  6. package/lib/commonjs/components/wui-modal/index.js.map +1 -1
  7. package/lib/commonjs/composites/wui-account-button/index.js +2 -2
  8. package/lib/commonjs/composites/wui-account-button/index.js.map +1 -1
  9. package/lib/commonjs/composites/wui-button/index.js +5 -5
  10. package/lib/commonjs/composites/wui-button/index.js.map +1 -1
  11. package/lib/commonjs/composites/wui-card-select/index.js +1 -1
  12. package/lib/commonjs/composites/wui-card-select/index.js.map +1 -1
  13. package/lib/commonjs/composites/wui-chip/index.js +5 -5
  14. package/lib/commonjs/composites/wui-chip/index.js.map +1 -1
  15. package/lib/commonjs/composites/wui-email-input/index.js +3 -3
  16. package/lib/commonjs/composites/wui-email-input/index.js.map +1 -1
  17. package/lib/commonjs/composites/wui-input-text/index.js +2 -2
  18. package/lib/commonjs/composites/wui-input-text/index.js.map +1 -1
  19. package/lib/commonjs/composites/wui-link/index.js +4 -4
  20. package/lib/commonjs/composites/wui-link/index.js.map +1 -1
  21. package/lib/commonjs/composites/wui-list-transaction/index.js +2 -2
  22. package/lib/commonjs/composites/wui-list-transaction/index.js.map +1 -1
  23. package/lib/commonjs/composites/wui-logo-select/index.js +1 -1
  24. package/lib/commonjs/composites/wui-logo-select/index.js.map +1 -1
  25. package/lib/commonjs/composites/wui-otp/index.js +1 -1
  26. package/lib/commonjs/composites/wui-otp/index.js.map +1 -1
  27. package/lib/commonjs/composites/wui-qr-code/index.js +6 -24
  28. package/lib/commonjs/composites/wui-qr-code/index.js.map +1 -1
  29. package/lib/commonjs/composites/wui-qr-code/styles.js +0 -3
  30. package/lib/commonjs/composites/wui-qr-code/styles.js.map +1 -1
  31. package/lib/commonjs/composites/wui-search-bar/index.js +2 -2
  32. package/lib/commonjs/composites/wui-search-bar/index.js.map +1 -1
  33. package/lib/commonjs/composites/wui-tabs/index.js +2 -2
  34. package/lib/commonjs/composites/wui-tabs/index.js.map +1 -1
  35. package/lib/commonjs/composites/wui-toggle/index.js +2 -2
  36. package/lib/commonjs/composites/wui-toggle/index.js.map +1 -1
  37. package/lib/commonjs/composites/wui-token-button/index.js +4 -4
  38. package/lib/commonjs/composites/wui-token-button/index.js.map +1 -1
  39. package/lib/commonjs/composites/wui-transaction-visual/index.js +3 -3
  40. package/lib/commonjs/composites/wui-transaction-visual/index.js.map +1 -1
  41. package/lib/commonjs/composites/wui-wallet-image/index.js +2 -2
  42. package/lib/commonjs/composites/wui-wallet-image/index.js.map +1 -1
  43. package/lib/commonjs/layout/wui-flex/index.js +3 -0
  44. package/lib/commonjs/layout/wui-flex/index.js.map +1 -1
  45. package/lib/commonjs/utils/UiUtil.js +1 -1
  46. package/lib/commonjs/utils/UiUtil.js.map +1 -1
  47. package/lib/module/assets/svg/Reown.js +42 -0
  48. package/lib/module/assets/svg/Reown.js.map +1 -0
  49. package/lib/module/components/wui-icon/index.js +2 -0
  50. package/lib/module/components/wui-icon/index.js.map +1 -1
  51. package/lib/module/components/wui-modal/index.js +4 -4
  52. package/lib/module/components/wui-modal/index.js.map +1 -1
  53. package/lib/module/composites/wui-account-button/index.js +2 -2
  54. package/lib/module/composites/wui-account-button/index.js.map +1 -1
  55. package/lib/module/composites/wui-button/index.js +5 -5
  56. package/lib/module/composites/wui-button/index.js.map +1 -1
  57. package/lib/module/composites/wui-card-select/index.js +1 -1
  58. package/lib/module/composites/wui-card-select/index.js.map +1 -1
  59. package/lib/module/composites/wui-chip/index.js +5 -5
  60. package/lib/module/composites/wui-chip/index.js.map +1 -1
  61. package/lib/module/composites/wui-email-input/index.js +3 -3
  62. package/lib/module/composites/wui-email-input/index.js.map +1 -1
  63. package/lib/module/composites/wui-input-text/index.js +2 -2
  64. package/lib/module/composites/wui-input-text/index.js.map +1 -1
  65. package/lib/module/composites/wui-link/index.js +4 -4
  66. package/lib/module/composites/wui-link/index.js.map +1 -1
  67. package/lib/module/composites/wui-list-transaction/index.js +2 -2
  68. package/lib/module/composites/wui-list-transaction/index.js.map +1 -1
  69. package/lib/module/composites/wui-logo-select/index.js +1 -1
  70. package/lib/module/composites/wui-logo-select/index.js.map +1 -1
  71. package/lib/module/composites/wui-otp/index.js +1 -1
  72. package/lib/module/composites/wui-otp/index.js.map +1 -1
  73. package/lib/module/composites/wui-qr-code/index.js +6 -24
  74. package/lib/module/composites/wui-qr-code/index.js.map +1 -1
  75. package/lib/module/composites/wui-qr-code/styles.js +0 -3
  76. package/lib/module/composites/wui-qr-code/styles.js.map +1 -1
  77. package/lib/module/composites/wui-search-bar/index.js +2 -2
  78. package/lib/module/composites/wui-search-bar/index.js.map +1 -1
  79. package/lib/module/composites/wui-tabs/index.js +2 -2
  80. package/lib/module/composites/wui-tabs/index.js.map +1 -1
  81. package/lib/module/composites/wui-toggle/index.js +2 -2
  82. package/lib/module/composites/wui-toggle/index.js.map +1 -1
  83. package/lib/module/composites/wui-token-button/index.js +4 -4
  84. package/lib/module/composites/wui-token-button/index.js.map +1 -1
  85. package/lib/module/composites/wui-transaction-visual/index.js +3 -3
  86. package/lib/module/composites/wui-transaction-visual/index.js.map +1 -1
  87. package/lib/module/composites/wui-wallet-image/index.js +2 -2
  88. package/lib/module/composites/wui-wallet-image/index.js.map +1 -1
  89. package/lib/module/layout/wui-flex/index.js +3 -0
  90. package/lib/module/layout/wui-flex/index.js.map +1 -1
  91. package/lib/module/utils/UiUtil.js +1 -1
  92. package/lib/module/utils/UiUtil.js.map +1 -1
  93. package/lib/typescript/assets/svg/Reown.d.ts +4 -0
  94. package/lib/typescript/assets/svg/Reown.d.ts.map +1 -0
  95. package/lib/typescript/components/wui-icon/index.d.ts.map +1 -1
  96. package/lib/typescript/composites/wui-qr-code/index.d.ts.map +1 -1
  97. package/lib/typescript/composites/wui-qr-code/styles.d.ts +0 -3
  98. package/lib/typescript/composites/wui-qr-code/styles.d.ts.map +1 -1
  99. package/lib/typescript/composites/wui-token-button/index.d.ts.map +1 -1
  100. package/lib/typescript/layout/wui-flex/index.d.ts +3 -0
  101. package/lib/typescript/layout/wui-flex/index.d.ts.map +1 -1
  102. package/lib/typescript/utils/TypesUtil.d.ts +1 -1
  103. package/lib/typescript/utils/TypesUtil.d.ts.map +1 -1
  104. package/lib/typescript/utils/UiUtil.d.ts +1 -1
  105. package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
  106. package/package.json +2 -2
  107. package/src/assets/svg/Reown.tsx +40 -0
  108. package/src/components/wui-icon/index.tsx +2 -0
  109. package/src/components/wui-modal/index.tsx +4 -4
  110. package/src/composites/wui-account-button/index.tsx +2 -2
  111. package/src/composites/wui-button/index.tsx +5 -5
  112. package/src/composites/wui-card-select/index.tsx +1 -1
  113. package/src/composites/wui-chip/index.tsx +5 -5
  114. package/src/composites/wui-email-input/index.tsx +3 -3
  115. package/src/composites/wui-input-text/index.tsx +1 -1
  116. package/src/composites/wui-link/index.tsx +4 -4
  117. package/src/composites/wui-list-transaction/index.tsx +2 -2
  118. package/src/composites/wui-logo-select/index.tsx +1 -1
  119. package/src/composites/wui-otp/index.tsx +1 -1
  120. package/src/composites/wui-qr-code/index.tsx +5 -17
  121. package/src/composites/wui-qr-code/styles.ts +0 -3
  122. package/src/composites/wui-search-bar/index.tsx +2 -2
  123. package/src/composites/wui-tabs/index.tsx +2 -2
  124. package/src/composites/wui-toggle/index.tsx +2 -2
  125. package/src/composites/wui-token-button/index.tsx +4 -2
  126. package/src/composites/wui-transaction-visual/index.tsx +4 -4
  127. package/src/composites/wui-wallet-image/index.tsx +2 -2
  128. package/src/layout/wui-flex/index.tsx +6 -0
  129. package/src/utils/TypesUtil.ts +1 -0
  130. package/src/utils/UiUtil.ts +2 -2
@@ -4,8 +4,6 @@ import Svg from 'react-native-svg';
4
4
  import { Icon } from '../../components/wui-icon';
5
5
  import { Image } from '../../components/wui-image';
6
6
  import { Shimmer } from '../../components/wui-shimmer';
7
- import { Text } from '../../components/wui-text';
8
- import { FlexView } from '../../layout/wui-flex';
9
7
  import { QRCodeUtil } from '../../utils/QRCodeUtil';
10
8
  import { BorderRadius, LightTheme, Spacing } from '../../utils/ThemeUtil';
11
9
  import type { IconType } from '../../utils/TypesUtil';
@@ -21,8 +19,6 @@ export interface QrCodeProps {
21
19
  style?: StyleProp<ViewStyle>;
22
20
  }
23
21
 
24
- const LABEL_HEIGHT = 18;
25
-
26
22
  export function QrCode({ size, uri, imageSrc, testID, arenaClear, icon, style }: QrCodeProps) {
27
23
  const Theme = LightTheme;
28
24
  const containerPadding = Spacing.l;
@@ -71,20 +67,12 @@ export function QrCode({ size, uri, imageSrc, testID, arenaClear, icon, style }:
71
67
  ]}
72
68
  testID={testID}
73
69
  >
74
- <FlexView alignItems="center" justifyContent="center">
75
- <Svg height={qrSize} width={qrSize}>
76
- {dots}
77
- </Svg>
78
- {logoTemplate()}
79
- </FlexView>
80
- <Text variant="small-500" color="fg-150" style={[styles.label, { height: LABEL_HEIGHT }]}>
81
- UX by{' '}
82
- <Text variant="small-500" color="inverse-000">
83
- Reown
84
- </Text>
85
- </Text>
70
+ <Svg height={qrSize} width={qrSize}>
71
+ {dots}
72
+ </Svg>
73
+ {logoTemplate()}
86
74
  </View>
87
75
  ) : (
88
- <Shimmer width={size} height={size + LABEL_HEIGHT} borderRadius={BorderRadius.l} />
76
+ <Shimmer width={size} height={size} borderRadius={BorderRadius.l} />
89
77
  );
90
78
  }
@@ -11,8 +11,5 @@ export default StyleSheet.create({
11
11
  },
12
12
  icon: {
13
13
  position: 'absolute'
14
- },
15
- label: {
16
- marginTop: Spacing.s
17
14
  }
18
15
  });
@@ -41,7 +41,7 @@ export function SearchBar({
41
41
  returnKeyType="search"
42
42
  disableFullscreenUI
43
43
  >
44
- {showClear && (
44
+ {showClear ? (
45
45
  <InputElement
46
46
  icon="close"
47
47
  style={{ marginRight: Spacing['4xs'] }}
@@ -51,7 +51,7 @@ export function SearchBar({
51
51
  handleChangeText('');
52
52
  }}
53
53
  />
54
- )}
54
+ ) : null}
55
55
  </InputText>
56
56
  </FlexView>
57
57
  );
@@ -72,14 +72,14 @@ export function Tabs({ tabs, onTabChange, style }: TabsProps) {
72
72
  key={isString ? option : option.label}
73
73
  style={[styles.tabItem, { width: tabWidth }]}
74
74
  >
75
- {!isString && option.icon && (
75
+ {!isString && option.icon ? (
76
76
  <Icon
77
77
  name={option.icon}
78
78
  size="xs"
79
79
  color={isActive ? 'fg-100' : 'fg-200'}
80
80
  style={styles.tabIcon}
81
81
  />
82
- )}
82
+ ) : null}
83
83
  <Text variant="small-600" color={isActive ? 'fg-100' : 'fg-200'}>
84
84
  {isString ? option : option.label}
85
85
  </Text>
@@ -74,9 +74,9 @@ export function Toggle({
74
74
  ) : (
75
75
  title
76
76
  )}
77
- {canClose && (
77
+ {canClose ? (
78
78
  <IconBox icon={isOpen ? 'chevronTop' : 'chevronBottom'} size="sm" iconColor="fg-200" />
79
- )}
79
+ ) : null}
80
80
  </Pressable>
81
81
 
82
82
  <Animated.View style={[styles.contentWrapper, { height: animatedHeight }]}>
@@ -59,7 +59,7 @@ export function TokenButton({
59
59
  source={imageUrl}
60
60
  style={[styles.image, { backgroundColor: Theme['inverse-100'] }]}
61
61
  />
62
- {renderClip && <View style={styles.clipContainer}>{renderClip}</View>}
62
+ {renderClip ? <View style={styles.clipContainer}>{renderClip}</View> : null}
63
63
  </View>
64
64
  ),
65
65
  <Text key="text">{text}</Text>
@@ -75,7 +75,9 @@ export function TokenButton({
75
75
  testID={testID}
76
76
  >
77
77
  {inverse ? content.reverse() : content}
78
- {chevron && <Icon name="chevronBottom" size="xxs" color="fg-150" style={styles.chevron} />}
78
+ {chevron ? (
79
+ <Icon name="chevronBottom" size="xxs" color="fg-150" style={styles.chevron} />
80
+ ) : null}
79
81
  </Button>
80
82
  );
81
83
  }
@@ -32,13 +32,13 @@ export function TransactionVisual({ images, networkSrc, isAllNFT }: TransactionV
32
32
  <Icon name={isFirstNFT ? 'nftPlaceholder' : 'coinPlaceholder'} size="sm" color="fg-200" />
33
33
  </FlexView>
34
34
  )}
35
- {hasOneImage && firstImage?.url && (
35
+ {hasOneImage && firstImage?.url ? (
36
36
  <Image
37
37
  source={firstImage.url}
38
38
  style={[styles.image, firstImage?.type === 'NFT' && styles.imageNft, { backgroundColor }]}
39
39
  />
40
- )}
41
- {hasTwoImages && firstImage?.url && secondImage?.url && (
40
+ ) : null}
41
+ {hasTwoImages && firstImage?.url && secondImage?.url ? (
42
42
  <FlexView flexDirection="row" padding={['0', 's', '0', '0']}>
43
43
  <FlexView style={styles.halfContainer}>
44
44
  <Image
@@ -58,7 +58,7 @@ export function TransactionVisual({ images, networkSrc, isAllNFT }: TransactionV
58
58
  />
59
59
  </FlexView>
60
60
  </FlexView>
61
- )}
61
+ ) : null}
62
62
  <FlexView
63
63
  alignItems="center"
64
64
  justifyContent="center"
@@ -66,7 +66,7 @@ export function WalletImage({
66
66
  return (
67
67
  <Animated.View style={style}>
68
68
  {templateVisual()}
69
- {border && (
69
+ {border ? (
70
70
  <View
71
71
  style={[
72
72
  styles.border,
@@ -79,7 +79,7 @@ export function WalletImage({
79
79
  }
80
80
  ]}
81
81
  />
82
- )}
82
+ ) : null}
83
83
  </Animated.View>
84
84
  );
85
85
  }
@@ -20,6 +20,9 @@ export interface FlexViewProps {
20
20
  flexShrink?: FlexShrinkType;
21
21
  alignItems?: FlexAlignType;
22
22
  alignSelf?: FlexAlignType;
23
+ rowGap?: SpacingType;
24
+ gap?: SpacingType;
25
+ columnGap?: SpacingType;
23
26
  justifyContent?: FlexJustifyContentType;
24
27
  padding?: SpacingType | SpacingType[];
25
28
  margin?: SpacingType | SpacingType[];
@@ -36,6 +39,9 @@ export function FlexView(props: FlexViewProps) {
36
39
  alignItems: props.alignItems,
37
40
  alignSelf: props.alignSelf,
38
41
  justifyContent: props.justifyContent,
42
+ rowGap: props.rowGap && UiUtil.getSpacingStyles(props.rowGap),
43
+ gap: props.gap && UiUtil.getSpacingStyles(props.gap),
44
+ columnGap: props.columnGap && UiUtil.getSpacingStyles(props.columnGap),
39
45
  paddingTop: props.padding && UiUtil.getSpacingStyles(props.padding, 0),
40
46
  paddingRight: props.padding && UiUtil.getSpacingStyles(props.padding, 1),
41
47
  paddingBottom: props.padding && UiUtil.getSpacingStyles(props.padding, 2),
@@ -179,6 +179,7 @@ export type IconType =
179
179
  | 'qrCode'
180
180
  | 'recycleHorizontal'
181
181
  | 'refresh'
182
+ | 'reown'
182
183
  | 'search'
183
184
  | 'settings'
184
185
  | 'swapHorizontal'
@@ -4,8 +4,8 @@ import { Spacing } from './ThemeUtil';
4
4
  import type { SpacingType, TruncateOptions } from './TypesUtil';
5
5
 
6
6
  export const UiUtil = {
7
- getSpacingStyles(spacing: SpacingType | SpacingType[], index: number) {
8
- if (Array.isArray(spacing)) {
7
+ getSpacingStyles(spacing: SpacingType | SpacingType[], index?: number) {
8
+ if (Array.isArray(spacing) && index !== undefined) {
9
9
  return spacing[index] ? Spacing[spacing[index] as SpacingType] : undefined;
10
10
  } else if (typeof spacing === 'string') {
11
11
  return Spacing[spacing];