@sumup/react-native-checkout 0.0.0-alpha.1 → 0.0.0-alpha.3

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 (207) hide show
  1. package/android/build.gradle +21 -14
  2. package/android/gradle.properties +4 -4
  3. package/android/src/main/java/com/sumupreactnative/SumupReactNativeModule.java +15 -0
  4. package/ios/SumupReactNative.swift +73 -34
  5. package/lib/commonjs/components/AnimatedContainer/styles.js +1 -1
  6. package/lib/commonjs/components/AnimatedContainer/styles.js.map +1 -1
  7. package/lib/commonjs/components/ApplePayButton/styles.js +3 -2
  8. package/lib/commonjs/components/ApplePayButton/styles.js.map +1 -1
  9. package/lib/commonjs/components/Button/styles.js +9 -7
  10. package/lib/commonjs/components/Button/styles.js.map +1 -1
  11. package/lib/commonjs/components/CardInformation/styles.js +3 -3
  12. package/lib/commonjs/components/CardInformation/styles.js.map +1 -1
  13. package/lib/commonjs/components/CardSheet/styles.js +3 -3
  14. package/lib/commonjs/components/CardSheet/styles.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox/styles.js +5 -3
  16. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  17. package/lib/commonjs/components/GooglePayButton/styles.js +4 -3
  18. package/lib/commonjs/components/GooglePayButton/styles.js.map +1 -1
  19. package/lib/commonjs/components/Header/styles.js +1 -1
  20. package/lib/commonjs/components/Header/styles.js.map +1 -1
  21. package/lib/commonjs/components/InputFields/BaseInputField/index.js +1 -1
  22. package/lib/commonjs/components/InputFields/BaseInputField/index.js.map +1 -1
  23. package/lib/commonjs/components/InputFields/BaseInputField/styles.js +12 -9
  24. package/lib/commonjs/components/InputFields/BaseInputField/styles.js.map +1 -1
  25. package/lib/commonjs/components/LoadingSpinner/styles.js +6 -5
  26. package/lib/commonjs/components/LoadingSpinner/styles.js.map +1 -1
  27. package/lib/commonjs/components/Modal/styles.js +1 -1
  28. package/lib/commonjs/components/Modal/styles.js.map +1 -1
  29. package/lib/commonjs/components/NoInternetConnection/styles.js +1 -1
  30. package/lib/commonjs/components/NoInternetConnection/styles.js.map +1 -1
  31. package/lib/commonjs/components/OptionMenuModal/index.js +1 -1
  32. package/lib/commonjs/components/OptionMenuModal/index.js.map +1 -1
  33. package/lib/commonjs/components/OptionMenuModal/styles.js +7 -6
  34. package/lib/commonjs/components/OptionMenuModal/styles.js.map +1 -1
  35. package/lib/commonjs/components/PayButton/styles.js +1 -1
  36. package/lib/commonjs/components/PayButton/styles.js.map +1 -1
  37. package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js +10 -7
  38. package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js.map +1 -1
  39. package/lib/commonjs/components/PaymentMethodsForm/styles.js +10 -7
  40. package/lib/commonjs/components/PaymentMethodsForm/styles.js.map +1 -1
  41. package/lib/commonjs/components/ProcessButton/styles.js +6 -5
  42. package/lib/commonjs/components/ProcessButton/styles.js.map +1 -1
  43. package/lib/commonjs/components/SaveCardButton/styles.js +1 -1
  44. package/lib/commonjs/components/SaveCardButton/styles.js.map +1 -1
  45. package/lib/commonjs/components/SavedCard/styles.js +2 -2
  46. package/lib/commonjs/components/SavedCard/styles.js.map +1 -1
  47. package/lib/commonjs/components/Switch/styles.js +7 -6
  48. package/lib/commonjs/components/Switch/styles.js.map +1 -1
  49. package/lib/commonjs/components/WebViewSheet/index.js +1 -1
  50. package/lib/commonjs/components/WebViewSheet/index.js.map +1 -1
  51. package/lib/commonjs/components/WebViewSheet/styles.js +1 -1
  52. package/lib/commonjs/components/WebViewSheet/styles.js.map +1 -1
  53. package/lib/commonjs/contexts/ThemeContext.js +5 -1
  54. package/lib/commonjs/contexts/ThemeContext.js.map +1 -1
  55. package/lib/commonjs/styles/borderWidths.js +10 -0
  56. package/lib/commonjs/styles/borderWidths.js.map +1 -0
  57. package/lib/commonjs/styles/colors.js +18 -20
  58. package/lib/commonjs/styles/colors.js.map +1 -1
  59. package/lib/commonjs/styles/designTokens.js +57 -0
  60. package/lib/commonjs/styles/designTokens.js.map +1 -0
  61. package/lib/commonjs/styles/index.js +9 -1
  62. package/lib/commonjs/styles/index.js.map +1 -1
  63. package/lib/commonjs/styles/radii.js +10 -0
  64. package/lib/commonjs/styles/radii.js.map +1 -0
  65. package/lib/commonjs/styles/spacings.js +10 -0
  66. package/lib/commonjs/styles/spacings.js.map +1 -0
  67. package/lib/module/components/AnimatedContainer/styles.js +1 -1
  68. package/lib/module/components/AnimatedContainer/styles.js.map +1 -1
  69. package/lib/module/components/ApplePayButton/styles.js +3 -2
  70. package/lib/module/components/ApplePayButton/styles.js.map +1 -1
  71. package/lib/module/components/Button/styles.js +9 -7
  72. package/lib/module/components/Button/styles.js.map +1 -1
  73. package/lib/module/components/CardInformation/styles.js +3 -3
  74. package/lib/module/components/CardInformation/styles.js.map +1 -1
  75. package/lib/module/components/CardSheet/styles.js +3 -3
  76. package/lib/module/components/CardSheet/styles.js.map +1 -1
  77. package/lib/module/components/Checkbox/styles.js +5 -3
  78. package/lib/module/components/Checkbox/styles.js.map +1 -1
  79. package/lib/module/components/GooglePayButton/styles.js +4 -3
  80. package/lib/module/components/GooglePayButton/styles.js.map +1 -1
  81. package/lib/module/components/Header/styles.js +1 -1
  82. package/lib/module/components/Header/styles.js.map +1 -1
  83. package/lib/module/components/InputFields/BaseInputField/index.js +1 -1
  84. package/lib/module/components/InputFields/BaseInputField/index.js.map +1 -1
  85. package/lib/module/components/InputFields/BaseInputField/styles.js +12 -9
  86. package/lib/module/components/InputFields/BaseInputField/styles.js.map +1 -1
  87. package/lib/module/components/LoadingSpinner/styles.js +6 -5
  88. package/lib/module/components/LoadingSpinner/styles.js.map +1 -1
  89. package/lib/module/components/Modal/styles.js +1 -1
  90. package/lib/module/components/Modal/styles.js.map +1 -1
  91. package/lib/module/components/NoInternetConnection/styles.js +1 -1
  92. package/lib/module/components/NoInternetConnection/styles.js.map +1 -1
  93. package/lib/module/components/OptionMenuModal/index.js +1 -1
  94. package/lib/module/components/OptionMenuModal/index.js.map +1 -1
  95. package/lib/module/components/OptionMenuModal/styles.js +7 -6
  96. package/lib/module/components/OptionMenuModal/styles.js.map +1 -1
  97. package/lib/module/components/PayButton/styles.js +1 -1
  98. package/lib/module/components/PayButton/styles.js.map +1 -1
  99. package/lib/module/components/PaymentMethodFormHeaderOption/styles.js +10 -7
  100. package/lib/module/components/PaymentMethodFormHeaderOption/styles.js.map +1 -1
  101. package/lib/module/components/PaymentMethodsForm/styles.js +10 -7
  102. package/lib/module/components/PaymentMethodsForm/styles.js.map +1 -1
  103. package/lib/module/components/ProcessButton/styles.js +6 -5
  104. package/lib/module/components/ProcessButton/styles.js.map +1 -1
  105. package/lib/module/components/SaveCardButton/styles.js +1 -1
  106. package/lib/module/components/SaveCardButton/styles.js.map +1 -1
  107. package/lib/module/components/SavedCard/styles.js +2 -2
  108. package/lib/module/components/SavedCard/styles.js.map +1 -1
  109. package/lib/module/components/Switch/styles.js +7 -6
  110. package/lib/module/components/Switch/styles.js.map +1 -1
  111. package/lib/module/components/WebViewSheet/index.js +1 -1
  112. package/lib/module/components/WebViewSheet/index.js.map +1 -1
  113. package/lib/module/components/WebViewSheet/styles.js +1 -1
  114. package/lib/module/components/WebViewSheet/styles.js.map +1 -1
  115. package/lib/module/contexts/ThemeContext.js +6 -2
  116. package/lib/module/contexts/ThemeContext.js.map +1 -1
  117. package/lib/module/styles/borderWidths.js +3 -0
  118. package/lib/module/styles/borderWidths.js.map +1 -0
  119. package/lib/module/styles/colors.js +18 -20
  120. package/lib/module/styles/colors.js.map +1 -1
  121. package/lib/module/styles/designTokens.js +48 -0
  122. package/lib/module/styles/designTokens.js.map +1 -0
  123. package/lib/module/styles/index.js +5 -1
  124. package/lib/module/styles/index.js.map +1 -1
  125. package/lib/module/styles/radii.js +3 -0
  126. package/lib/module/styles/radii.js.map +1 -0
  127. package/lib/module/styles/spacings.js +3 -0
  128. package/lib/module/styles/spacings.js.map +1 -0
  129. package/lib/typescript/components/AnimatedContainer/styles.d.ts +1 -1
  130. package/lib/typescript/components/ApplePayButton/styles.d.ts +2 -2
  131. package/lib/typescript/components/ApplePayButton/styles.d.ts.map +1 -1
  132. package/lib/typescript/components/Button/styles.d.ts +4 -4
  133. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  134. package/lib/typescript/components/CardInformation/styles.d.ts +3 -3
  135. package/lib/typescript/components/CardSheet/styles.d.ts +3 -3
  136. package/lib/typescript/components/Checkbox/styles.d.ts +3 -3
  137. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
  138. package/lib/typescript/components/GooglePayButton/styles.d.ts +3 -3
  139. package/lib/typescript/components/GooglePayButton/styles.d.ts.map +1 -1
  140. package/lib/typescript/components/Header/styles.d.ts +1 -1
  141. package/lib/typescript/components/InputFields/BaseInputField/styles.d.ts +7 -7
  142. package/lib/typescript/components/LoadingSpinner/styles.d.ts +5 -5
  143. package/lib/typescript/components/LoadingSpinner/styles.d.ts.map +1 -1
  144. package/lib/typescript/components/Modal/styles.d.ts +1 -1
  145. package/lib/typescript/components/NoInternetConnection/styles.d.ts +1 -1
  146. package/lib/typescript/components/OptionMenuModal/index.d.ts.map +1 -1
  147. package/lib/typescript/components/OptionMenuModal/styles.d.ts +5 -6
  148. package/lib/typescript/components/OptionMenuModal/styles.d.ts.map +1 -1
  149. package/lib/typescript/components/PayButton/styles.d.ts +1 -1
  150. package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts +7 -7
  151. package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts.map +1 -1
  152. package/lib/typescript/components/PaymentMethodsForm/styles.d.ts +6 -6
  153. package/lib/typescript/components/PaymentMethodsForm/styles.d.ts.map +1 -1
  154. package/lib/typescript/components/ProcessButton/styles.d.ts +2 -2
  155. package/lib/typescript/components/ProcessButton/styles.d.ts.map +1 -1
  156. package/lib/typescript/components/SaveCardButton/styles.d.ts +1 -1
  157. package/lib/typescript/components/SavedCard/styles.d.ts +2 -2
  158. package/lib/typescript/components/Switch/styles.d.ts +5 -5
  159. package/lib/typescript/components/WebViewSheet/index.d.ts.map +1 -1
  160. package/lib/typescript/components/WebViewSheet/styles.d.ts +1 -1
  161. package/lib/typescript/contexts/ThemeContext.d.ts +82 -20
  162. package/lib/typescript/contexts/ThemeContext.d.ts.map +1 -1
  163. package/lib/typescript/styles/borderWidths.d.ts +5 -0
  164. package/lib/typescript/styles/borderWidths.d.ts.map +1 -0
  165. package/lib/typescript/styles/colors.d.ts +17 -20
  166. package/lib/typescript/styles/colors.d.ts.map +1 -1
  167. package/lib/typescript/styles/designTokens.d.ts +87 -0
  168. package/lib/typescript/styles/designTokens.d.ts.map +1 -0
  169. package/lib/typescript/styles/index.d.ts +5 -1
  170. package/lib/typescript/styles/index.d.ts.map +1 -1
  171. package/lib/typescript/styles/radii.d.ts +8 -0
  172. package/lib/typescript/styles/radii.d.ts.map +1 -0
  173. package/lib/typescript/styles/spacings.d.ts +12 -0
  174. package/lib/typescript/styles/spacings.d.ts.map +1 -0
  175. package/package.json +4 -4
  176. package/src/components/AnimatedContainer/styles.tsx +1 -1
  177. package/src/components/ApplePayButton/styles.tsx +3 -2
  178. package/src/components/Button/styles.tsx +9 -7
  179. package/src/components/CardInformation/styles.tsx +3 -3
  180. package/src/components/CardSheet/styles.tsx +3 -3
  181. package/src/components/Checkbox/styles.tsx +5 -3
  182. package/src/components/GooglePayButton/styles.tsx +4 -3
  183. package/src/components/Header/styles.tsx +1 -1
  184. package/src/components/InputFields/BaseInputField/index.tsx +1 -1
  185. package/src/components/InputFields/BaseInputField/styles.tsx +9 -9
  186. package/src/components/LoadingSpinner/styles.tsx +6 -5
  187. package/src/components/Modal/styles.tsx +1 -1
  188. package/src/components/NoInternetConnection/styles.tsx +1 -1
  189. package/src/components/OptionMenuModal/index.tsx +3 -1
  190. package/src/components/OptionMenuModal/styles.tsx +7 -6
  191. package/src/components/PayButton/styles.tsx +1 -1
  192. package/src/components/PaymentMethodFormHeaderOption/styles.tsx +10 -7
  193. package/src/components/PaymentMethodsForm/styles.tsx +10 -7
  194. package/src/components/ProcessButton/styles.tsx +6 -5
  195. package/src/components/SaveCardButton/styles.tsx +1 -1
  196. package/src/components/SavedCard/styles.tsx +2 -2
  197. package/src/components/Switch/styles.tsx +6 -6
  198. package/src/components/WebViewSheet/index.tsx +3 -1
  199. package/src/components/WebViewSheet/styles.tsx +1 -1
  200. package/src/contexts/ThemeContext.tsx +13 -1
  201. package/src/styles/borderWidths.ts +3 -0
  202. package/src/styles/colors.ts +19 -20
  203. package/src/styles/designTokens.ts +49 -0
  204. package/src/styles/index.ts +5 -1
  205. package/src/styles/radii.ts +3 -0
  206. package/src/styles/spacings.ts +3 -0
  207. package/{sumup-react-native.podspec → sumup-react-native-checkout.podspec} +6 -4
@@ -5,7 +5,7 @@ buildscript {
5
5
  }
6
6
 
7
7
  dependencies {
8
- classpath "com.android.tools.build:gradle:7.2.1"
8
+ classpath "com.android.tools.build:gradle:8.6.1"
9
9
  }
10
10
  }
11
11
 
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
15
15
 
16
16
  apply plugin: "com.android.library"
17
17
 
18
-
19
- def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
20
-
21
18
  if (isNewArchitectureEnabled()) {
22
19
  apply plugin: "com.facebook.react"
23
20
  }
@@ -30,12 +27,25 @@ def getExtOrIntegerDefault(name) {
30
27
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SumupReactNative_" + name]).toInteger()
31
28
  }
32
29
 
30
+ def getReactNativeAndroidDependency() {
31
+ if (rootProject.ext.has("reactNativeVersion")) {
32
+ return "com.facebook.react:react-android:${rootProject.ext.get("reactNativeVersion")}"
33
+ }
34
+ if (project.hasProperty("reactNativeVersion")) {
35
+ return "com.facebook.react:react-android:${project.property("reactNativeVersion")}"
36
+ }
37
+ // Fallback for older hosts still exposing only react-native:+ from local maven.
38
+ return "com.facebook.react:react-native:+"
39
+ }
40
+
33
41
  android {
34
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
42
+ namespace "com.sumupreactnative"
43
+ compileSdk getExtOrIntegerDefault("compileSdkVersion")
44
+ ndkVersion getExtOrDefault("ndkversion")
35
45
 
36
46
  defaultConfig {
37
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
38
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
47
+ minSdk getExtOrIntegerDefault("minSdkVersion")
48
+ targetSdk getExtOrIntegerDefault("targetSdkVersion")
39
49
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
40
50
  }
41
51
  buildTypes {
@@ -44,13 +54,13 @@ android {
44
54
  }
45
55
  }
46
56
 
47
- lintOptions {
57
+ lint {
48
58
  disable "GradleCompatible"
49
59
  }
50
60
 
51
61
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_1_8
53
- targetCompatibility JavaVersion.VERSION_1_8
62
+ sourceCompatibility JavaVersion.VERSION_17
63
+ targetCompatibility JavaVersion.VERSION_17
54
64
  }
55
65
 
56
66
  }
@@ -62,10 +72,7 @@ repositories {
62
72
 
63
73
 
64
74
  dependencies {
65
- // For < 0.71, this will be from the local maven repo
66
- // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
67
- //noinspection GradleDynamicVersion
68
- implementation "com.facebook.react:react-native:+"
75
+ implementation getReactNativeAndroidDependency()
69
76
  implementation 'com.google.android.gms:play-services-wallet:19.1.0'
70
77
  }
71
78
 
@@ -1,5 +1,5 @@
1
1
  SumupReactNative_kotlinVersion=1.7.0
2
- SumupReactNative_minSdkVersion=21
3
- SumupReactNative_targetSdkVersion=31
4
- SumupReactNative_compileSdkVersion=31
5
- SumupReactNative_ndkversion=21.4.7075529
2
+ SumupReactNative_minSdkVersion=23
3
+ SumupReactNative_targetSdkVersion=35
4
+ SumupReactNative_compileSdkVersion=35
5
+ SumupReactNative_ndkversion=26.1.10909125
@@ -60,6 +60,10 @@ public class SumupReactNativeModule extends ReactContextBaseJavaModule {
60
60
  private final ActivityEventListener activityEventListener = new BaseActivityEventListener() {
61
61
  @Override
62
62
  public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
63
+ if (requestPaymentPromise == null) {
64
+ return;
65
+ }
66
+
63
67
  switch (requestCode) {
64
68
  // value passed in AutoResolveHelper
65
69
  case LOAD_PAYMENT_DATA_REQUEST_CODE:
@@ -81,6 +85,7 @@ public class SumupReactNativeModule extends ReactContextBaseJavaModule {
81
85
  default:
82
86
  // Do nothing.
83
87
  }
88
+ requestPaymentPromise = null;
84
89
  break;
85
90
  }
86
91
  }
@@ -114,6 +119,11 @@ public class SumupReactNativeModule extends ReactContextBaseJavaModule {
114
119
  promise.resolve(false);
115
120
  return;
116
121
  }
122
+ if (mPaymentsClient == null) {
123
+ Log.w(NAME, "[GooglePay] payments client is not initialized");
124
+ promise.resolve(false);
125
+ return;
126
+ }
117
127
 
118
128
  final JSONObject isReadyToPayJson = PaymentUtil.getIsReadyToPayRequest(allowedCardNetworks.toArrayList(), allowedCardAuthMethods.toArrayList());
119
129
  if (isReadyToPayJson == null) {
@@ -158,6 +168,11 @@ public class SumupReactNativeModule extends ReactContextBaseJavaModule {
158
168
  promise.reject("NO_ACTIVITY", "activity is null");
159
169
  return;
160
170
  }
171
+ if (mPaymentsClient == null) {
172
+ Log.w(NAME, "[GooglePay] payments client is not initialized");
173
+ promise.reject("NO_PAYMENTS_CLIENT", "payments client is not initialized");
174
+ return;
175
+ }
161
176
 
162
177
  JSONObject paymentDataRequestJson = PaymentUtil.getPaymentDataRequest(requestData);
163
178
  if (paymentDataRequestJson == null) {
@@ -1,31 +1,34 @@
1
1
  import PassKit
2
+ import UIKit
2
3
 
3
4
  @objc(SumupReactNative)
4
- class SumupReactNative: UIViewController {
5
+ class SumupReactNative: NSObject {
5
6
 
6
7
  private var request: PKPaymentRequest = PKPaymentRequest()
7
8
  private var resolve: RCTPromiseResolveBlock?
9
+ private var reject: RCTPromiseRejectBlock?
8
10
  private var paymentNetworks: [PKPaymentNetwork]?
11
+ private var didResolvePayment = false
9
12
 
10
13
  @objc(configure:details:)
11
- private func configure(withMethod method: NSDictionary, details: NSDictionary) -> Void {
12
-
13
- self.paymentNetworks = method["supportedNetworks"] as? [PKPaymentNetwork]
14
+ func configure(withMethod method: NSDictionary, details: NSDictionary) -> Void {
15
+ self.paymentNetworks = parseSupportedNetworks(from: method)
16
+ self.request = PKPaymentRequest()
14
17
 
15
18
  guard let paymentNetworks = paymentNetworks,
16
19
  PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: paymentNetworks),
17
20
  let total = details["total"] as? NSDictionary,
18
21
  let label = total["label"] as? String,
19
- let amount = total["amount"] as? Double,
22
+ let amountNumber = total["amount"] as? NSNumber,
20
23
  let currencyCode = method["currencyCode"] as? String,
21
24
  let countryCode = method["countryCode"] as? String,
22
25
  let merchantIdentifier = method["merchantIdentifier"] as? String else {
23
- print("SumupReactNative: params are not valid")
26
+ NSLog("SumupReactNative: invalid Apple Pay configuration")
24
27
  return
25
28
  }
26
29
 
27
30
  let paymentItem = PKPaymentSummaryItem.init(label: label,
28
- amount: NSDecimalNumber(value: amount))
31
+ amount: NSDecimalNumber(decimal: amountNumber.decimalValue))
29
32
  request.currencyCode = currencyCode
30
33
  request.countryCode = countryCode
31
34
  request.merchantIdentifier = merchantIdentifier
@@ -35,31 +38,30 @@ class SumupReactNative: UIViewController {
35
38
  }
36
39
 
37
40
  @objc(presentApplePay:withRejecter:)
38
- func presentApplePay(resolve: @escaping RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
41
+ func presentApplePay(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void {
42
+ self.resolve = resolve
43
+ self.reject = reject
44
+ self.didResolvePayment = false
45
+
39
46
  guard let paymentNetworks = paymentNetworks,
40
47
  PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: paymentNetworks) else {
41
- print("SumupReactNative: Can not make payment")
48
+ reject("PAYMENT_NOT_AVAILABLE", "Apple Pay is not available for the configured networks", nil)
42
49
  return
43
50
  }
44
-
45
- self.resolve = resolve
46
-
47
- if let controller = PKPaymentAuthorizationViewController(paymentRequest: request) {
48
- controller.delegate = self
49
51
 
50
- DispatchQueue.main.async {
51
- var rootViewController = UIApplication.shared.keyWindow?.rootViewController
52
- if let presentedViewController = rootViewController?.presentedViewController {
53
- rootViewController = presentedViewController
54
- }
55
-
56
- guard let rootViewController = rootViewController else {
57
- print("SumupReactNative: unable to find rootViewController")
58
- return
59
- }
52
+ guard let controller = PKPaymentAuthorizationViewController(paymentRequest: request) else {
53
+ reject("PRESENTATION_ERROR", "Unable to create Apple Pay authorization controller", nil)
54
+ return
55
+ }
56
+ controller.delegate = self
60
57
 
61
- rootViewController.present(controller, animated: true, completion: nil)
58
+ DispatchQueue.main.async {
59
+ guard let rootViewController = self.topViewController() else {
60
+ self.reject?("NO_ROOT_VIEW_CONTROLLER", "Unable to find active root view controller", nil)
61
+ return
62
62
  }
63
+
64
+ rootViewController.present(controller, animated: true, completion: nil)
63
65
  }
64
66
  }
65
67
 
@@ -72,15 +74,44 @@ class SumupReactNative: UIViewController {
72
74
  resolve(false)
73
75
  }
74
76
  }
77
+
78
+ private func parseSupportedNetworks(from method: NSDictionary) -> [PKPaymentNetwork]? {
79
+ guard let networks = method["supportedNetworks"] as? [String] else {
80
+ return nil
81
+ }
82
+ let parsedNetworks = networks.compactMap { PKPaymentNetwork(rawValue: $0) }
83
+ return parsedNetworks.isEmpty ? nil : parsedNetworks
84
+ }
85
+
86
+ private func topViewController() -> UIViewController? {
87
+ let foregroundScene = UIApplication.shared.connectedScenes
88
+ .compactMap { $0 as? UIWindowScene }
89
+ .first { $0.activationState == .foregroundActive }
90
+
91
+ let keyWindow = foregroundScene?.windows.first(where: { $0.isKeyWindow })
92
+ var root = keyWindow?.rootViewController
93
+
94
+ while let presented = root?.presentedViewController {
95
+ root = presented
96
+ }
97
+
98
+ return root
99
+ }
75
100
  }
76
101
 
77
102
  extension SumupReactNative: PKPaymentAuthorizationViewControllerDelegate {
78
103
  func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController) {
79
104
  controller.dismiss(animated: true, completion: nil)
105
+ if !didResolvePayment {
106
+ reject?("PAYMENT_RESULT_CANCELED", "Payment has been canceled", nil)
107
+ }
108
+ resolve = nil
109
+ reject = nil
80
110
  }
81
111
 
82
112
  func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -> Void) {
83
113
 
114
+ didResolvePayment = true
84
115
  self.resolve?(payment.toDictionary())
85
116
  completion(.success)
86
117
  }
@@ -132,8 +163,15 @@ extension PKPaymentMethod {
132
163
  extension PKPaymentMethodType {
133
164
 
134
165
  func toString() -> String {
135
- let arr = ["unknown", "debit", "credit", "prepaid", "store", "eMoney"]
136
- return arr[Int(self.rawValue)]
166
+ let namesByRawValue: [Int: String] = [
167
+ 0: "unknown",
168
+ 1: "debit",
169
+ 2: "credit",
170
+ 3: "prepaid",
171
+ 4: "store",
172
+ 5: "eMoney",
173
+ ]
174
+ return namesByRawValue[Int(self.rawValue)] ?? "unknown"
137
175
  }
138
176
  }
139
177
 
@@ -153,12 +191,13 @@ extension PKPaymentPass {
153
191
  extension PKPaymentPassActivationState {
154
192
 
155
193
  func toString() -> String {
156
- let arr = ["PKPaymentPassActivationStateActivated",
157
- "PKPaymentPassActivationStateRequiresActivation",
158
- "PKPaymentPassActivationStateActivating",
159
- "PKPaymentPassActivationStateSuspended",
160
- "PKPaymentPassActivationStateDeactivated"]
161
-
162
- return arr[Int(self.rawValue)]
194
+ let namesByRawValue: [Int: String] = [
195
+ 0: "PKPaymentPassActivationStateActivated",
196
+ 1: "PKPaymentPassActivationStateRequiresActivation",
197
+ 2: "PKPaymentPassActivationStateActivating",
198
+ 3: "PKPaymentPassActivationStateSuspended",
199
+ 4: "PKPaymentPassActivationStateDeactivated",
200
+ ]
201
+ return namesByRawValue[Int(self.rawValue)] ?? "PKPaymentPassActivationStateActivated"
163
202
  }
164
203
  }
@@ -22,7 +22,7 @@ const useStyles = height => {
22
22
  right: 0
23
23
  },
24
24
  content: {
25
- backgroundColor: colors.white,
25
+ backgroundColor: colors.bgNormal,
26
26
  width: width,
27
27
  height,
28
28
  borderTopLeftRadius: 8,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","height","colors","useTheme","width","useWindowDimensions","styles","StyleSheet","create","container","position","bottom","top","left","right","content","backgroundColor","white","borderTopLeftRadius","borderTopRightRadius","paddingHorizontal","keyboardAvoidingView","flex","justifyContent","exports"],"sourceRoot":"../../../../src","sources":["components/AnimatedContainer/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAIC,MAAe,IAAK;EAC5C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAEvC,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE;IACT,CAAC;IACDC,OAAO,EAAE;MACPC,eAAe,EAAEd,MAAM,CAACe,KAAK;MAC7Bb,KAAK,EAAEA,KAAK;MACZH,MAAM;MACNiB,mBAAmB,EAAE,CAAC;MACtBC,oBAAoB,EAAE,CAAC;MACvBC,iBAAiB,EAAE;IACrB,CAAC;IACDC,oBAAoB,EAAE;MACpBC,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;EAEF,OAAOjB,MAAM;AACf,CAAC;AAACkB,OAAA,CAAAxB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","height","colors","useTheme","width","useWindowDimensions","styles","StyleSheet","create","container","position","bottom","top","left","right","content","backgroundColor","bgNormal","borderTopLeftRadius","borderTopRightRadius","paddingHorizontal","keyboardAvoidingView","flex","justifyContent","exports"],"sourceRoot":"../../../../src","sources":["components/AnimatedContainer/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAIC,MAAe,IAAK;EAC5C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAEvC,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE;IACT,CAAC;IACDC,OAAO,EAAE;MACPC,eAAe,EAAEd,MAAM,CAACe,QAAQ;MAChCb,KAAK,EAAEA,KAAK;MACZH,MAAM;MACNiB,mBAAmB,EAAE,CAAC;MACtBC,oBAAoB,EAAE,CAAC;MACvBC,iBAAiB,EAAE;IACrB,CAAC;IACDC,oBAAoB,EAAE;MACpBC,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;EAEF,OAAOjB,MAAM;AACf,CAAC;AAACkB,OAAA,CAAAxB,SAAA,GAAAA,SAAA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useStyles = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _ThemeContext = require("../../contexts/ThemeContext");
9
+ var _radii = require("../../styles/radii");
9
10
  const useStyles = disabled => {
10
11
  const {
11
12
  colors
@@ -15,8 +16,8 @@ const useStyles = disabled => {
15
16
  opacity: disabled ? 0.6 : 1,
16
17
  height: 48,
17
18
  width: '100%',
18
- backgroundColor: colors.black,
19
- borderRadius: 8,
19
+ backgroundColor: colors.bgStrong,
20
+ borderRadius: _radii.radii.byte,
20
21
  justifyContent: 'center',
21
22
  alignItems: 'center'
22
23
  },
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","disabled","colors","useTheme","styles","StyleSheet","create","container","opacity","height","width","backgroundColor","black","borderRadius","justifyContent","alignItems","image","exports"],"sourceRoot":"../../../../src","sources":["components/ApplePayButton/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAIC,QAAkB,IAAK;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,OAAO,EAAEP,QAAQ,GAAG,GAAG,GAAG,CAAC;MAC3BQ,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE,MAAM;MACbC,eAAe,EAAET,MAAM,CAACU,KAAK;MAC7BC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,KAAK,EAAE;MACLN,KAAK,EAAE,EAAE;MACTD,MAAM,EAAE;IACV;EACF,CAAC,CAAC;EAEF,OAAOL,MAAM;AACf,CAAC;AAACa,OAAA,CAAAjB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","_radii","useStyles","disabled","colors","useTheme","styles","StyleSheet","create","container","opacity","height","width","backgroundColor","bgStrong","borderRadius","radii","byte","justifyContent","alignItems","image","exports"],"sourceRoot":"../../../../src","sources":["components/ApplePayButton/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAIC,QAAkB,IAAK;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,OAAO,EAAEP,QAAQ,GAAG,GAAG,GAAG,CAAC;MAC3BQ,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE,MAAM;MACbC,eAAe,EAAET,MAAM,CAACU,QAAQ;MAChCC,YAAY,EAAEC,YAAK,CAACC,IAAI;MACxBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,KAAK,EAAE;MACLR,KAAK,EAAE,EAAE;MACTD,MAAM,EAAE;IACV;EACF,CAAC,CAAC;EAEF,OAAOL,MAAM;AACf,CAAC;AAACe,OAAA,CAAAnB,SAAA,GAAAA,SAAA"}
@@ -6,35 +6,37 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useStyles = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _ThemeContext = require("../../contexts/ThemeContext");
9
+ var _borderWidths = require("../../styles/borderWidths");
10
+ var _radii = require("../../styles/radii");
9
11
  const useStyles = type => {
10
12
  const {
11
13
  colors,
12
14
  fonts
13
15
  } = (0, _ThemeContext.useTheme)();
14
16
  const textColor = {
15
- primary: colors.white,
16
- secondary: colors.codGray,
17
- tertiary: colors.alizarinCrimson
17
+ primary: colors.fgOnStrong,
18
+ secondary: colors.fgNormal,
19
+ tertiary: colors.fgDanger
18
20
  };
19
21
  const backgroundColor = {
20
- primary: colors.royalBlue,
22
+ primary: colors.bgAccentStrong,
21
23
  secondary: colors.transparent,
22
24
  tertiary: colors.transparent
23
25
  };
24
26
  const borderColor = {
25
27
  primary: colors.transparent,
26
- secondary: colors.silver,
28
+ secondary: colors.borderNormal,
27
29
  tertiary: colors.transparent
28
30
  };
29
31
  const borderWidth = {
30
32
  primary: 0,
31
- secondary: 1,
33
+ secondary: _borderWidths.borderWidths.kilo,
32
34
  tertiary: 0
33
35
  };
34
36
  const styles = _reactNative.StyleSheet.create({
35
37
  container: {
36
38
  height: 48,
37
- borderRadius: 100,
39
+ borderRadius: _radii.radii.byte,
38
40
  width: '100%',
39
41
  justifyContent: 'center',
40
42
  alignItems: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","type","colors","fonts","useTheme","textColor","primary","white","secondary","codGray","tertiary","alizarinCrimson","backgroundColor","royalBlue","transparent","borderColor","silver","borderWidth","styles","StyleSheet","create","container","height","borderRadius","width","justifyContent","alignItems","text","fontSize","lineHeight","color","fontFamily","sfProTextBold","exports"],"sourceRoot":"../../../../src","sources":["components/Button/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAGO,MAAME,SAAS,GAAIC,IAAgB,IAAK;EAC7C,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAEpC,MAAMC,SAAS,GAAG;IAChBC,OAAO,EAAEJ,MAAM,CAACK,KAAK;IACrBC,SAAS,EAAEN,MAAM,CAACO,OAAO;IACzBC,QAAQ,EAAER,MAAM,CAACS;EACnB,CAAC;EAED,MAAMC,eAAe,GAAG;IACtBN,OAAO,EAAEJ,MAAM,CAACW,SAAS;IACzBL,SAAS,EAAEN,MAAM,CAACY,WAAW;IAC7BJ,QAAQ,EAAER,MAAM,CAACY;EACnB,CAAC;EAED,MAAMC,WAAW,GAAG;IAClBT,OAAO,EAAEJ,MAAM,CAACY,WAAW;IAC3BN,SAAS,EAAEN,MAAM,CAACc,MAAM;IACxBN,QAAQ,EAAER,MAAM,CAACY;EACnB,CAAC;EAED,MAAMG,WAAW,GAAG;IAClBX,OAAO,EAAE,CAAC;IACVE,SAAS,EAAE,CAAC;IACZE,QAAQ,EAAE;EACZ,CAAC;EAED,MAAMQ,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,YAAY,EAAE,GAAG;MACjBC,KAAK,EAAE,MAAM;MACbC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBd,eAAe,EAAEA,eAAe,CAACX,IAAI,CAAC;MACtCgB,WAAW,EAAEA,WAAW,CAAChB,IAAI,CAAC;MAC9Bc,WAAW,EAAEA,WAAW,CAACd,IAAI;IAC/B,CAAC;IACD0B,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE,EAAE;MACdC,KAAK,EAAEzB,SAAS,CAACJ,IAAI,CAAC;MACtB8B,UAAU,EAAE5B,KAAK,CAAC6B;IACpB;EACF,CAAC,CAAC;EAEF,OAAOd,MAAM;AACf,CAAC;AAACe,OAAA,CAAAjC,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","_borderWidths","_radii","useStyles","type","colors","fonts","useTheme","textColor","primary","fgOnStrong","secondary","fgNormal","tertiary","fgDanger","backgroundColor","bgAccentStrong","transparent","borderColor","borderNormal","borderWidth","borderWidths","kilo","styles","StyleSheet","create","container","height","borderRadius","radii","byte","width","justifyContent","alignItems","text","fontSize","lineHeight","color","fontFamily","sfProTextBold","exports"],"sourceRoot":"../../../../src","sources":["components/Button/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGO,MAAMI,SAAS,GAAIC,IAAgB,IAAK;EAC7C,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAEpC,MAAMC,SAAS,GAAG;IAChBC,OAAO,EAAEJ,MAAM,CAACK,UAAU;IAC1BC,SAAS,EAAEN,MAAM,CAACO,QAAQ;IAC1BC,QAAQ,EAAER,MAAM,CAACS;EACnB,CAAC;EAED,MAAMC,eAAe,GAAG;IACtBN,OAAO,EAAEJ,MAAM,CAACW,cAAc;IAC9BL,SAAS,EAAEN,MAAM,CAACY,WAAW;IAC7BJ,QAAQ,EAAER,MAAM,CAACY;EACnB,CAAC;EAED,MAAMC,WAAW,GAAG;IAClBT,OAAO,EAAEJ,MAAM,CAACY,WAAW;IAC3BN,SAAS,EAAEN,MAAM,CAACc,YAAY;IAC9BN,QAAQ,EAAER,MAAM,CAACY;EACnB,CAAC;EAED,MAAMG,WAAW,GAAG;IAClBX,OAAO,EAAE,CAAC;IACVE,SAAS,EAAEU,0BAAY,CAACC,IAAI;IAC5BT,QAAQ,EAAE;EACZ,CAAC;EAED,MAAMU,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,YAAY,EAAEC,YAAK,CAACC,IAAI;MACxBC,KAAK,EAAE,MAAM;MACbC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBlB,eAAe,EAAEA,eAAe,CAACX,IAAI,CAAC;MACtCgB,WAAW,EAAEA,WAAW,CAAChB,IAAI,CAAC;MAC9Bc,WAAW,EAAEA,WAAW,CAACd,IAAI;IAC/B,CAAC;IACD8B,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE,EAAE;MACdC,KAAK,EAAE7B,SAAS,CAACJ,IAAI,CAAC;MACtBkC,UAAU,EAAEhC,KAAK,CAACiC;IACpB;EACF,CAAC,CAAC;EAEF,OAAOhB,MAAM;AACf,CAAC;AAACiB,OAAA,CAAArC,SAAA,GAAAA,SAAA"}
@@ -26,14 +26,14 @@ const useStyles = () => {
26
26
  title: {
27
27
  fontWeight: '600',
28
28
  fontSize: 14,
29
- color: colors.paleSky,
29
+ color: colors.fgSubtle,
30
30
  marginBottom: 8
31
31
  },
32
32
  privacyPolicyText: {
33
- color: colors.doveGray
33
+ color: colors.fgSubtle
34
34
  },
35
35
  privacyPolicyLink: {
36
- color: colors.royalBlue
36
+ color: colors.bgAccentStrong
37
37
  }
38
38
  });
39
39
  return styles;
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","colors","useTheme","styles","StyleSheet","create","rowContainer","flexDirection","marginTop","expirationDateInput","flex","cvcInput","marginLeft","justifyContent","title","fontWeight","fontSize","color","paleSky","marginBottom","privacyPolicyText","doveGray","privacyPolicyLink","royalBlue","exports"],"sourceRoot":"../../../../src","sources":["components/CardInformation/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,YAAY,EAAE;MACZC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,CAAC;IACd,CAAC;IACDC,mBAAmB,EAAE;MACnBC,IAAI,EAAE;IACR,CAAC;IACDC,QAAQ,EAAE;MACRD,IAAI,EAAE,CAAC;MACPE,UAAU,EAAE,CAAC,CAAC;MACdC,cAAc,EAAE;IAClB,CAAC;IACDC,KAAK,EAAE;MACLC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEhB,MAAM,CAACiB,OAAO;MACrBC,YAAY,EAAE;IAChB,CAAC;IACDC,iBAAiB,EAAE;MACjBH,KAAK,EAAEhB,MAAM,CAACoB;IAChB,CAAC;IACDC,iBAAiB,EAAE;MACjBL,KAAK,EAAEhB,MAAM,CAACsB;IAChB;EACF,CAAC,CAAC;EAEF,OAAOpB,MAAM;AACf,CAAC;AAACqB,OAAA,CAAAxB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","colors","useTheme","styles","StyleSheet","create","rowContainer","flexDirection","marginTop","expirationDateInput","flex","cvcInput","marginLeft","justifyContent","title","fontWeight","fontSize","color","fgSubtle","marginBottom","privacyPolicyText","privacyPolicyLink","bgAccentStrong","exports"],"sourceRoot":"../../../../src","sources":["components/CardInformation/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,YAAY,EAAE;MACZC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,CAAC;IACd,CAAC;IACDC,mBAAmB,EAAE;MACnBC,IAAI,EAAE;IACR,CAAC;IACDC,QAAQ,EAAE;MACRD,IAAI,EAAE,CAAC;MACPE,UAAU,EAAE,CAAC,CAAC;MACdC,cAAc,EAAE;IAClB,CAAC;IACDC,KAAK,EAAE;MACLC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEhB,MAAM,CAACiB,QAAQ;MACtBC,YAAY,EAAE;IAChB,CAAC;IACDC,iBAAiB,EAAE;MACjBH,KAAK,EAAEhB,MAAM,CAACiB;IAChB,CAAC;IACDG,iBAAiB,EAAE;MACjBJ,KAAK,EAAEhB,MAAM,CAACqB;IAChB;EACF,CAAC,CAAC;EAEF,OAAOnB,MAAM;AACf,CAAC;AAACoB,OAAA,CAAAvB,SAAA,GAAAA,SAAA"}
@@ -17,7 +17,7 @@ const useStyles = () => {
17
17
  const insets = (0, _useSafeArea.useSafeArea)();
18
18
  const styles = _reactNative.StyleSheet.create({
19
19
  container: {
20
- backgroundColor: colors.white,
20
+ backgroundColor: colors.bgNormal,
21
21
  maxHeight: height - insets.top,
22
22
  paddingBottom: insets.bottom + 16
23
23
  },
@@ -25,12 +25,12 @@ const useStyles = () => {
25
25
  fontWeight: 'bold',
26
26
  fontSize: 20,
27
27
  marginBottom: 30,
28
- color: colors.black
28
+ color: colors.fgAccent
29
29
  },
30
30
  separatorText: {
31
31
  fontSize: 14,
32
32
  lineHeight: 16,
33
- color: colors.black,
33
+ color: colors.fgAccent,
34
34
  width: '100%',
35
35
  textAlign: 'center'
36
36
  },
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","_useSafeArea","useStyles","colors","useTheme","height","useWindowDimensions","insets","useSafeArea","styles","StyleSheet","create","container","backgroundColor","white","maxHeight","top","paddingBottom","bottom","title","fontWeight","fontSize","marginBottom","color","black","separatorText","lineHeight","width","textAlign","image","savedCardContainer","marginTop","marginLeft","keyboardView","exports"],"sourceRoot":"../../../../src","sources":["components/CardSheet/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAExC,MAAMC,MAAM,GAAG,IAAAC,wBAAW,EAAC,CAAC;EAE5B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,eAAe,EAAEV,MAAM,CAACW,KAAK;MAC7BC,SAAS,EAAEV,MAAM,GAAGE,MAAM,CAACS,GAAG;MAC9BC,aAAa,EAAEV,MAAM,CAACW,MAAM,GAAG;IACjC,CAAC;IACDC,KAAK,EAAE;MACLC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAEpB,MAAM,CAACqB;IAChB,CAAC;IACDC,aAAa,EAAE;MACbJ,QAAQ,EAAE,EAAE;MACZK,UAAU,EAAE,EAAE;MACdH,KAAK,EAAEpB,MAAM,CAACqB,KAAK;MACnBG,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACLF,KAAK,EAAE,EAAE;MACTtB,MAAM,EAAE;IACV,CAAC;IACDyB,kBAAkB,EAAE;MAClBC,SAAS,EAAE,EAAE;MACbT,YAAY,EAAE,EAAE;MAChBU,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZ;IAAA;EAEJ,CAAC,CAAC;EAEF,OAAOxB,MAAM;AACf,CAAC;AAACyB,OAAA,CAAAhC,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","_useSafeArea","useStyles","colors","useTheme","height","useWindowDimensions","insets","useSafeArea","styles","StyleSheet","create","container","backgroundColor","bgNormal","maxHeight","top","paddingBottom","bottom","title","fontWeight","fontSize","marginBottom","color","fgAccent","separatorText","lineHeight","width","textAlign","image","savedCardContainer","marginTop","marginLeft","keyboardView","exports"],"sourceRoot":"../../../../src","sources":["components/CardSheet/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAExC,MAAMC,MAAM,GAAG,IAAAC,wBAAW,EAAC,CAAC;EAE5B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,eAAe,EAAEV,MAAM,CAACW,QAAQ;MAChCC,SAAS,EAAEV,MAAM,GAAGE,MAAM,CAACS,GAAG;MAC9BC,aAAa,EAAEV,MAAM,CAACW,MAAM,GAAG;IACjC,CAAC;IACDC,KAAK,EAAE;MACLC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAEpB,MAAM,CAACqB;IAChB,CAAC;IACDC,aAAa,EAAE;MACbJ,QAAQ,EAAE,EAAE;MACZK,UAAU,EAAE,EAAE;MACdH,KAAK,EAAEpB,MAAM,CAACqB,QAAQ;MACtBG,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACLF,KAAK,EAAE,EAAE;MACTtB,MAAM,EAAE;IACV,CAAC;IACDyB,kBAAkB,EAAE;MAClBC,SAAS,EAAE,EAAE;MACbT,YAAY,EAAE,EAAE;MAChBU,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZ;IAAA;EAEJ,CAAC,CAAC;EAEF,OAAOxB,MAAM;AACf,CAAC;AAACyB,OAAA,CAAAhC,SAAA,GAAAA,SAAA"}
@@ -6,17 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useStyles = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _ThemeContext = require("../../contexts/ThemeContext");
9
+ var _borderWidths = require("../../styles/borderWidths");
10
+ var _radii = require("../../styles/radii");
9
11
  const useStyles = selected => {
10
12
  const {
11
13
  colors
12
14
  } = (0, _ThemeContext.useTheme)();
13
15
  const styles = _reactNative.StyleSheet.create({
14
16
  container: {
15
- borderRadius: 12,
17
+ borderRadius: _radii.radii.kilo,
16
18
  width: 24,
17
19
  height: 24,
18
- borderWidth: 2,
19
- borderColor: selected ? colors.royalBlue : colors.doveGray
20
+ borderWidth: _borderWidths.borderWidths.mega,
21
+ borderColor: selected ? colors.bgAccentStrong : colors.fgSubtle
20
22
  },
21
23
  image: {
22
24
  width: 24,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","selected","colors","useTheme","styles","StyleSheet","create","container","borderRadius","width","height","borderWidth","borderColor","royalBlue","doveGray","image","marginLeft","marginTop","exports"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAIC,QAAiB,IAAK;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,YAAY,EAAE,EAAE;MAChBC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAEX,QAAQ,GAAGC,MAAM,CAACW,SAAS,GAAGX,MAAM,CAACY;IACpD,CAAC;IACDC,KAAK,EAAE;MACLN,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVM,UAAU,EAAE,CAAC,CAAC;MACdC,SAAS,EAAE,CAAC;IACd;EACF,CAAC,CAAC;EAEF,OAAOb,MAAM;AACf,CAAC;AAACc,OAAA,CAAAlB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","_borderWidths","_radii","useStyles","selected","colors","useTheme","styles","StyleSheet","create","container","borderRadius","radii","kilo","width","height","borderWidth","borderWidths","mega","borderColor","bgAccentStrong","fgSubtle","image","marginLeft","marginTop","exports"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEO,MAAMI,SAAS,GAAIC,QAAiB,IAAK;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,YAAY,EAAEC,YAAK,CAACC,IAAI;MACxBC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAEC,0BAAY,CAACC,IAAI;MAC9BC,WAAW,EAAEf,QAAQ,GAAGC,MAAM,CAACe,cAAc,GAAGf,MAAM,CAACgB;IACzD,CAAC;IACDC,KAAK,EAAE;MACLR,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVQ,UAAU,EAAE,CAAC,CAAC;MACdC,SAAS,EAAE,CAAC;IACd;EACF,CAAC,CAAC;EAEF,OAAOjB,MAAM;AACf,CAAC;AAACkB,OAAA,CAAAtB,SAAA,GAAAA,SAAA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useStyles = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _ThemeContext = require("../../contexts/ThemeContext");
9
+ var _radii = require("../../styles/radii");
9
10
  const useStyles = disabled => {
10
11
  const {
11
12
  colors
@@ -16,14 +17,14 @@ const useStyles = disabled => {
16
17
  opacity: disabled ? 0.6 : 1,
17
18
  height: 48,
18
19
  width: '100%',
19
- backgroundColor: colors.black,
20
- borderRadius: 8,
20
+ backgroundColor: colors.bgStrong,
21
+ borderRadius: _radii.radii.byte,
21
22
  justifyContent: 'center',
22
23
  alignItems: 'center'
23
24
  },
24
25
  text: {
25
26
  fontSize: 14,
26
- color: colors.white
27
+ color: colors.fgOnStrong
27
28
  },
28
29
  image: {
29
30
  width: 44,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","disabled","colors","useTheme","styles","StyleSheet","create","container","flexDirection","opacity","height","width","backgroundColor","black","borderRadius","justifyContent","alignItems","text","fontSize","color","white","image","exports"],"sourceRoot":"../../../../src","sources":["components/GooglePayButton/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAIC,QAAkB,IAAK;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,OAAO,EAAER,QAAQ,GAAG,GAAG,GAAG,CAAC;MAC3BS,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE,MAAM;MACbC,eAAe,EAAEV,MAAM,CAACW,KAAK;MAC7BC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEjB,MAAM,CAACkB;IAChB,CAAC;IACDC,KAAK,EAAE;MACLV,KAAK,EAAE,EAAE;MACTD,MAAM,EAAE;IACV;EACF,CAAC,CAAC;EAEF,OAAON,MAAM;AACf,CAAC;AAACkB,OAAA,CAAAtB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","_radii","useStyles","disabled","colors","useTheme","styles","StyleSheet","create","container","flexDirection","opacity","height","width","backgroundColor","bgStrong","borderRadius","radii","byte","justifyContent","alignItems","text","fontSize","color","fgOnStrong","image","exports"],"sourceRoot":"../../../../src","sources":["components/GooglePayButton/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAIC,QAAkB,IAAK;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAE7B,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,OAAO,EAAER,QAAQ,GAAG,GAAG,GAAG,CAAC;MAC3BS,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE,MAAM;MACbC,eAAe,EAAEV,MAAM,CAACW,QAAQ;MAChCC,YAAY,EAAEC,YAAK,CAACC,IAAI;MACxBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEnB,MAAM,CAACoB;IAChB,CAAC;IACDC,KAAK,EAAE;MACLZ,KAAK,EAAE,EAAE;MACTD,MAAM,EAAE;IACV;EACF,CAAC,CAAC;EAEF,OAAON,MAAM;AACf,CAAC;AAACoB,OAAA,CAAAxB,SAAA,GAAAA,SAAA"}
@@ -20,7 +20,7 @@ const useStyles = () => {
20
20
  marginBottom: 16
21
21
  },
22
22
  title: {
23
- color: colors.codGray,
23
+ color: colors.fgNormal,
24
24
  fontWeight: '700',
25
25
  fontSize: 18,
26
26
  textAlign: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","colors","fonts","useTheme","styles","StyleSheet","create","container","flexDirection","height","alignItems","justifyContent","marginBottom","title","color","codGray","fontWeight","fontSize","textAlign","flex","fontFamily","sfProTextBold","image","width","imageContainer","exports"],"sourceRoot":"../../../../src","sources":["components/Header/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAEpC,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,MAAM,EAAE,EAAE;MACVC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,YAAY,EAAE;IAChB,CAAC;IACDC,KAAK,EAAE;MACLC,KAAK,EAAEb,MAAM,CAACc,OAAO;MACrBC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE,QAAQ;MACnBC,IAAI,EAAE,CAAC;MACPC,UAAU,EAAElB,KAAK,CAACmB;IACpB,CAAC;IACDC,KAAK,EAAE;MACLb,MAAM,EAAE,EAAE;MACVc,KAAK,EAAE;IACT,CAAC;IACDC,cAAc,EAAE;MACdf,MAAM,EAAE,EAAE;MACVc,KAAK,EAAE;IACT;EACF,CAAC,CAAC;EAEF,OAAOnB,MAAM;AACf,CAAC;AAACqB,OAAA,CAAAzB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_ThemeContext","useStyles","colors","fonts","useTheme","styles","StyleSheet","create","container","flexDirection","height","alignItems","justifyContent","marginBottom","title","color","fgNormal","fontWeight","fontSize","textAlign","flex","fontFamily","sfProTextBold","image","width","imageContainer","exports"],"sourceRoot":"../../../../src","sources":["components/Header/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAEpC,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,MAAM,EAAE,EAAE;MACVC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,YAAY,EAAE;IAChB,CAAC;IACDC,KAAK,EAAE;MACLC,KAAK,EAAEb,MAAM,CAACc,QAAQ;MACtBC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE,QAAQ;MACnBC,IAAI,EAAE,CAAC;MACPC,UAAU,EAAElB,KAAK,CAACmB;IACpB,CAAC;IACDC,KAAK,EAAE;MACLb,MAAM,EAAE,EAAE;MACVc,KAAK,EAAE;IACT,CAAC;IACDC,cAAc,EAAE;MACdf,MAAM,EAAE,EAAE;MACVc,KAAK,EAAE;IACT;EACF,CAAC,CAAC;EAEF,OAAOnB,MAAM;AACf,CAAC;AAACqB,OAAA,CAAAzB,SAAA,GAAAA,SAAA"}
@@ -30,7 +30,7 @@ const BaseInputField = props => {
30
30
  style: [styles.container]
31
31
  }, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
32
32
  placeholder: props.placeholder,
33
- placeholderTextColor: theme.colors.dustyGray,
33
+ placeholderTextColor: theme.colors.fgPlaceholder,
34
34
  autoCorrect: false,
35
35
  spellCheck: false,
36
36
  keyboardType: props.keyboardType,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_styles","_ThemeContext","_reactNativeSpacingSystem","_Text","obj","__esModule","default","BaseInputField","props","styles","useStyles","theme","useTheme","onFocus","inputModel","onBlur","createElement","View","style","containerStyle","Text","title","Stack","size","container","TextInput","placeholder","placeholderTextColor","colors","dustyGray","autoCorrect","spellCheck","keyboardType","maxLength","value","onChangeText","setValue","input","errorText","exports"],"sourceRoot":"../../../../../src","sources":["components/InputFields/BaseInputField/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,yBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAAgD,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAYzC,MAAMG,cAAc,GAAIC,KAA0B,IAAK;EAC5D,MAAMC,MAAM,GAAG,IAAAC,iBAAS,EAAC,CAAC;EAE1B,MAAMC,KAAK,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAExB,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpBL,KAAK,CAACM,UAAU,CAACD,OAAO,CAAC,CAAC;EAC5B,CAAC;EAED,MAAME,MAAM,GAAGA,CAAA,KAAM;IACnBP,KAAK,CAACM,UAAU,CAACC,MAAM,CAAC,CAAC;EAC3B,CAAC;EAED,oBACEnB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAEV,KAAK,CAACW;EAAe,gBAChCvB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACb,KAAA,CAAAiB,IAAI;IAACF,KAAK,EAAET,MAAM,CAACY;EAAM,GAAEb,KAAK,CAACa,KAAY,CAAC,eAC/CzB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACd,yBAAA,CAAAoB,KAAK;IAACC,IAAI,EAAE;EAAE,CAAE,CAAC,eAClB3B,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAE,CAACT,MAAM,CAACe,SAAS;EAAE,gBAC9B5B,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAA0B,SAAS;IACRC,WAAW,EAAElB,KAAK,CAACkB,WAAY;IAC/BC,oBAAoB,EAAEhB,KAAK,CAACiB,MAAM,CAACC,SAAU;IAC7CC,WAAW,EAAE,KAAM;IACnBC,UAAU,EAAE,KAAM;IAClBC,YAAY,EAAExB,KAAK,CAACwB,YAAa;IACjCC,SAAS,EAAEzB,KAAK,CAACyB,SAAU;IAC3BC,KAAK,EAAE1B,KAAK,CAACM,UAAU,CAACoB,KAAM;IAC9BC,YAAY,EAAE3B,KAAK,CAACM,UAAU,CAACsB,QAAS;IACxClB,KAAK,EAAET,MAAM,CAAC4B,KAAM;IACpBxB,OAAO,EAAEA,OAAQ;IACjBE,MAAM,EAAEA;EAAO,CAChB,CACG,CAAC,EACN,CAAC,CAACP,KAAK,CAACM,UAAU,CAACwB,SAAS,iBAC3B1C,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACb,KAAA,CAAAiB,IAAI;IAACF,KAAK,EAAET,MAAM,CAAC6B;EAAU,GAAE9B,KAAK,CAACM,UAAU,CAACwB,SAAgB,CAE/D,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAhC,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_styles","_ThemeContext","_reactNativeSpacingSystem","_Text","obj","__esModule","default","BaseInputField","props","styles","useStyles","theme","useTheme","onFocus","inputModel","onBlur","createElement","View","style","containerStyle","Text","title","Stack","size","container","TextInput","placeholder","placeholderTextColor","colors","fgPlaceholder","autoCorrect","spellCheck","keyboardType","maxLength","value","onChangeText","setValue","input","errorText","exports"],"sourceRoot":"../../../../../src","sources":["components/InputFields/BaseInputField/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,yBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAAgD,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAYzC,MAAMG,cAAc,GAAIC,KAA0B,IAAK;EAC5D,MAAMC,MAAM,GAAG,IAAAC,iBAAS,EAAC,CAAC;EAE1B,MAAMC,KAAK,GAAG,IAAAC,sBAAQ,EAAC,CAAC;EAExB,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpBL,KAAK,CAACM,UAAU,CAACD,OAAO,CAAC,CAAC;EAC5B,CAAC;EAED,MAAME,MAAM,GAAGA,CAAA,KAAM;IACnBP,KAAK,CAACM,UAAU,CAACC,MAAM,CAAC,CAAC;EAC3B,CAAC;EAED,oBACEnB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAEV,KAAK,CAACW;EAAe,gBAChCvB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACb,KAAA,CAAAiB,IAAI;IAACF,KAAK,EAAET,MAAM,CAACY;EAAM,GAAEb,KAAK,CAACa,KAAY,CAAC,eAC/CzB,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACd,yBAAA,CAAAoB,KAAK;IAACC,IAAI,EAAE;EAAE,CAAE,CAAC,eAClB3B,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAE,CAACT,MAAM,CAACe,SAAS;EAAE,gBAC9B5B,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACjB,YAAA,CAAA0B,SAAS;IACRC,WAAW,EAAElB,KAAK,CAACkB,WAAY;IAC/BC,oBAAoB,EAAEhB,KAAK,CAACiB,MAAM,CAACC,aAAc;IACjDC,WAAW,EAAE,KAAM;IACnBC,UAAU,EAAE,KAAM;IAClBC,YAAY,EAAExB,KAAK,CAACwB,YAAa;IACjCC,SAAS,EAAEzB,KAAK,CAACyB,SAAU;IAC3BC,KAAK,EAAE1B,KAAK,CAACM,UAAU,CAACoB,KAAM;IAC9BC,YAAY,EAAE3B,KAAK,CAACM,UAAU,CAACsB,QAAS;IACxClB,KAAK,EAAET,MAAM,CAAC4B,KAAM;IACpBxB,OAAO,EAAEA,OAAQ;IACjBE,MAAM,EAAEA;EAAO,CAChB,CACG,CAAC,EACN,CAAC,CAACP,KAAK,CAACM,UAAU,CAACwB,SAAS,iBAC3B1C,MAAA,CAAAU,OAAA,CAAAU,aAAA,CAACb,KAAA,CAAAiB,IAAI;IAACF,KAAK,EAAET,MAAM,CAAC6B;EAAU,GAAE9B,KAAK,CAACM,UAAU,CAACwB,SAAgB,CAE/D,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAhC,cAAA,GAAAA,cAAA"}
@@ -9,31 +9,34 @@ var _ThemeContext = require("../../../contexts/ThemeContext");
9
9
  const useStyles = () => {
10
10
  const {
11
11
  colors,
12
- fonts
12
+ fonts,
13
+ borderWidths,
14
+ radii,
15
+ spacings
13
16
  } = (0, _ThemeContext.useTheme)();
14
17
  const styles = _reactNative.StyleSheet.create({
15
18
  input: {
16
19
  fontSize: 16,
17
- paddingHorizontal: 16,
20
+ paddingHorizontal: spacings.mega,
18
21
  width: '100%',
19
- color: colors.codGray,
22
+ color: colors.fgNormal,
20
23
  fontFamily: fonts.sfProTextRegular
21
24
  },
22
25
  title: {
23
26
  fontSize: 14,
24
27
  lineHeight: 20,
25
- color: colors.codGray,
28
+ color: colors.fgNormal,
26
29
  fontFamily: fonts.sfProTextRegular
27
30
  },
28
31
  container: {
29
- borderColor: colors.silver,
30
- borderWidth: 1,
31
- height: 56,
32
+ borderColor: colors.borderNormal,
33
+ borderWidth: borderWidths.kilo,
34
+ height: 48,
32
35
  justifyContent: 'center',
33
- borderRadius: 8
36
+ borderRadius: radii.byte
34
37
  },
35
38
  errorText: {
36
- color: colors.guardsmanRed,
39
+ color: colors.fgDanger,
37
40
  fontSize: 12,
38
41
  marginVertical: 6,
39
42
  fontFamily: fonts.sfProTextRegular