react-native-persona 2.1.3 → 2.2.2

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/CHANGELOG.md +31 -0
  2. package/README.md +156 -2
  3. package/{RNPersonaInquiry.podspec → RNPersonaInquiry2.podspec} +2 -2
  4. package/android/README.md +14 -0
  5. package/android/build.gradle +22 -99
  6. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  7. package/android/src/main/AndroidManifest.xml +1 -1
  8. package/android/src/main/java/com/withpersona/{sdk/reactnative/PersonaInquiryModule.java → sdk2/reactnative/PersonaInquiryModule2.java} +24 -14
  9. package/android/src/main/java/com/withpersona/{sdk/reactnative/PersonaInquiryPackage.java → sdk2/reactnative/PersonaInquiryPackage2.java} +3 -3
  10. package/android/src/main/java/com/withpersona/{sdk → sdk2}/reactnative/exceptions/InvalidConfiguration.java +1 -1
  11. package/android/src/main/res/values/theme.xml +2 -3
  12. package/ios/{PersonaInquiry.swift → PersonaInquiry2.swift} +17 -13
  13. package/ios/PersonaInquiryBridge.m +1 -1
  14. package/lib/commonjs/fields.js +141 -0
  15. package/lib/commonjs/fields.js.map +1 -0
  16. package/lib/commonjs/index.js +475 -0
  17. package/lib/commonjs/index.js.map +1 -0
  18. package/lib/commonjs/util.js +36 -0
  19. package/lib/commonjs/util.js.map +1 -0
  20. package/lib/commonjs/versions.js +25 -0
  21. package/lib/commonjs/versions.js.map +1 -0
  22. package/lib/module/fields.js +132 -0
  23. package/lib/module/fields.js.map +1 -0
  24. package/lib/module/index.js +435 -0
  25. package/lib/module/index.js.map +1 -0
  26. package/lib/module/util.js +29 -0
  27. package/lib/module/util.js.map +1 -0
  28. package/lib/module/versions.js +14 -0
  29. package/lib/module/versions.js.map +1 -0
  30. package/{generatedTypes/persona-tools/config.d.ts → lib/typescript/persona-tools/Config.d.ts} +0 -0
  31. package/{generatedTypes → lib/typescript}/persona-tools/Theme.d.ts +0 -0
  32. package/{generatedTypes → lib/typescript}/persona-tools/index.d.ts +0 -0
  33. package/{generatedTypes → lib/typescript}/persona-tools/lib/AndroidResourcePrinter.d.ts +2 -2
  34. package/{generatedTypes → lib/typescript}/persona-tools/lib/prompts.d.ts +0 -0
  35. package/{generatedTypes → lib/typescript}/persona-tools/tools/AndroidThemeGenerator.d.ts +0 -0
  36. package/{generatedTypes → lib/typescript}/persona-tools/tools/IosThemeInstructions.d.ts +0 -0
  37. package/{generatedTypes → lib/typescript}/src/fields.d.ts +0 -0
  38. package/{generatedTypes → lib/typescript}/src/index.d.ts +56 -5
  39. package/{generatedTypes → lib/typescript}/src/util.d.ts +0 -0
  40. package/lib/typescript/src/versions.d.ts +6 -0
  41. package/package.json +74 -18
  42. package/persona-tools/{config.ts → Config.ts} +7 -7
  43. package/persona-tools/Theme.ts +107 -107
  44. package/persona-tools/index.ts +9 -9
  45. package/persona-tools/lib/AndroidResourcePrinter.ts +4 -4
  46. package/persona-tools/tools/AndroidThemeGenerator.ts +18 -18
  47. package/persona-tools/tools/IosThemeInstructions.ts +8 -8
  48. package/src/fields.ts +7 -7
  49. package/src/index.ts +89 -26
  50. package/src/util.ts +2 -2
  51. package/src/versions.ts +12 -0
  52. package/generatedTypes/persona-tools/lib/AndroidResourcePrinter.spec.d.ts +0 -1
  53. package/generatedTypes/src/fields.spec.d.ts +0 -1
  54. package/generatedTypes/src/util.spec.d.ts +0 -1
  55. package/jest.config.js +0 -10
  56. package/persona-tools/Theme.js +0 -186
  57. package/persona-tools/config.js +0 -72
  58. package/persona-tools/index.js +0 -30
  59. package/persona-tools/lib/AndroidResourcePrinter.js +0 -573
  60. package/persona-tools/lib/AndroidResourcePrinter.spec.js +0 -914
  61. package/persona-tools/lib/AndroidResourcePrinter.spec.ts +0 -952
  62. package/persona-tools/lib/prompts.js +0 -39
  63. package/persona-tools/tools/AndroidThemeGenerator.js +0 -55
  64. package/persona-tools/tools/IosThemeInstructions.js +0 -34
  65. package/src/fields.js +0 -88
  66. package/src/fields.spec.js +0 -18
  67. package/src/fields.spec.ts +0 -17
  68. package/src/index.js +0 -271
  69. package/src/util.js +0 -29
  70. package/src/util.spec.js +0 -17
  71. package/src/util.spec.ts +0 -22
  72. package/tsconfig.json +0 -29
@@ -1,952 +0,0 @@
1
- import AndroidResourcePrinter from "./AndroidResourcePrinter";
2
- import { AndroidThemeObject } from "../Theme";
3
-
4
- const EMPTY_THEME: AndroidThemeObject = {
5
- backgroundColor: null,
6
- primaryColor: null,
7
- darkPrimaryColor: null,
8
- accentColor: null,
9
- titleTextColor: null,
10
- titleTextFont: null,
11
- bodyTextColor: null,
12
- bodyTextFont: null,
13
- footnoteTextColor: null,
14
- footnoteTextFont: null,
15
- // formLabelTextColor: null,
16
- // formLabelTextFont: null,
17
- textFieldTextColor: null,
18
- textFieldTextFont: null,
19
- pickerTextColor: null,
20
- pickerTextFont: null,
21
- buttonBackgroundColor: null,
22
- buttonDisabledBackgroundColor: null,
23
- buttonTouchedBackgroundColor: null,
24
- buttonTextColor: null,
25
- buttonDisabledTextColor: null,
26
- // buttonTextAlignment: null,
27
- buttonCornerRadius: null,
28
- buttonFont: null,
29
- progressColor: null,
30
- successAsset: null,
31
- failAsset: null,
32
- loadingAnimationAsset: null,
33
- loadingAnimationWidthPercent: null,
34
- selfieAnimationAsset: null,
35
- selfieAnimationWidthPercent: null,
36
- };
37
-
38
- function printTheme(theme: AndroidThemeObject) {
39
- const { style, buttonDrawable, buttonColor } = new AndroidResourcePrinter(
40
- theme
41
- ).process();
42
-
43
- return [
44
- "res/values/styles_persona.xml",
45
- "-----------------------------",
46
- style.end({ prettyPrint: true }),
47
- "\n",
48
- "res/drawable/rn_persona_button.xml",
49
- "----------------------------------",
50
- buttonDrawable.end({
51
- prettyPrint: true,
52
- }),
53
- "\n",
54
- "res/color/rn_persona_button.xml",
55
- "-------------------------------",
56
- buttonColor.end({ prettyPrint: true }),
57
- ].join("\n");
58
- }
59
-
60
- it("works when empty", () => {
61
- const theme = EMPTY_THEME;
62
-
63
- expect(printTheme(theme)).toMatchInlineSnapshot(`
64
- "res/values/styles_persona.xml
65
- -----------------------------
66
- <?xml version=\\"1.0\\"?>
67
- <resources/>
68
-
69
-
70
- res/drawable/rn_persona_button.xml
71
- ----------------------------------
72
- <?xml version=\\"1.0\\"?>
73
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
74
-
75
-
76
- res/color/rn_persona_button.xml
77
- -------------------------------
78
- <?xml version=\\"1.0\\"?>
79
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
80
- `);
81
- });
82
-
83
- it("primaryColor", () => {
84
- const theme = { ...EMPTY_THEME, primaryColor: "#FFFFFF" };
85
- expect(printTheme(theme)).toMatchInlineSnapshot(`
86
- "res/values/styles_persona.xml
87
- -----------------------------
88
- <?xml version=\\"1.0\\"?>
89
- <resources>
90
- <style name=\\"RN\\"/>
91
- <style name=\\"RN.Persona\\"/>
92
- <style name=\\"RN.Persona.Text\\"/>
93
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
94
- <item name=\\"colorPrimary\\">#FFFFFF</item>
95
-
96
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
97
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
98
- </style>
99
- </resources>
100
-
101
-
102
- res/drawable/rn_persona_button.xml
103
- ----------------------------------
104
- <?xml version=\\"1.0\\"?>
105
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
106
-
107
-
108
- res/color/rn_persona_button.xml
109
- -------------------------------
110
- <?xml version=\\"1.0\\"?>
111
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
112
- `);
113
- });
114
-
115
- it("accentColor", () => {
116
- const theme = { ...EMPTY_THEME, accentColor: "#FFFFFF" };
117
- expect(printTheme(theme)).toMatchInlineSnapshot(`
118
- "res/values/styles_persona.xml
119
- -----------------------------
120
- <?xml version=\\"1.0\\"?>
121
- <resources>
122
- <style name=\\"RN\\"/>
123
- <style name=\\"RN.Persona\\"/>
124
- <style name=\\"RN.Persona.Text\\"/>
125
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
126
- <item name=\\"colorAccent\\">#FFFFFF</item>
127
-
128
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
129
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
130
- </style>
131
- </resources>
132
-
133
-
134
- res/drawable/rn_persona_button.xml
135
- ----------------------------------
136
- <?xml version=\\"1.0\\"?>
137
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
138
-
139
-
140
- res/color/rn_persona_button.xml
141
- -------------------------------
142
- <?xml version=\\"1.0\\"?>
143
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
144
- `);
145
- });
146
-
147
- it("darkPrimaryColor", () => {
148
- const theme = { ...EMPTY_THEME, darkPrimaryColor: "#FFFFFF" };
149
- expect(printTheme(theme)).toMatchInlineSnapshot(`
150
- "res/values/styles_persona.xml
151
- -----------------------------
152
- <?xml version=\\"1.0\\"?>
153
- <resources>
154
- <style name=\\"RN\\"/>
155
- <style name=\\"RN.Persona\\"/>
156
- <style name=\\"RN.Persona.Text\\"/>
157
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
158
- <item name=\\"colorPrimaryDark\\">#FFFFFF</item>
159
-
160
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
161
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
162
- </style>
163
- </resources>
164
-
165
-
166
- res/drawable/rn_persona_button.xml
167
- ----------------------------------
168
- <?xml version=\\"1.0\\"?>
169
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
170
-
171
-
172
- res/color/rn_persona_button.xml
173
- -------------------------------
174
- <?xml version=\\"1.0\\"?>
175
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
176
- `);
177
- });
178
-
179
- it("backgroundColor", () => {
180
- const theme = { ...EMPTY_THEME, backgroundColor: "#FFFFFF" };
181
-
182
- expect(printTheme(theme)).toMatchInlineSnapshot(`
183
- "res/values/styles_persona.xml
184
- -----------------------------
185
- <?xml version=\\"1.0\\"?>
186
- <resources>
187
- <color name=\\"customPersonaBackgroundColor\\">#FFFFFF</color>
188
-
189
- <style name=\\"RN\\"/>
190
- <style name=\\"RN.Persona\\"/>
191
- <style name=\\"RN.Persona.Text\\"/>
192
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
193
- <item name=\\"android:colorBackground\\">@color/customPersonaBackgroundColor</item>
194
-
195
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
196
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
197
- </style>
198
- </resources>
199
-
200
-
201
- res/drawable/rn_persona_button.xml
202
- ----------------------------------
203
- <?xml version=\\"1.0\\"?>
204
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
205
-
206
-
207
- res/color/rn_persona_button.xml
208
- -------------------------------
209
- <?xml version=\\"1.0\\"?>
210
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
211
- `);
212
- });
213
-
214
- it("titleTextColor", () => {
215
- const theme = { ...EMPTY_THEME, titleTextColor: "#FFFFFF" };
216
-
217
- expect(printTheme(theme)).toMatchInlineSnapshot(`
218
- "res/values/styles_persona.xml
219
- -----------------------------
220
- <?xml version=\\"1.0\\"?>
221
- <resources>
222
- <style name=\\"RN\\"/>
223
- <style name=\\"RN.Persona\\"/>
224
- <style name=\\"RN.Persona.Text\\"/>
225
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
226
- <item name=\\"personaTitleTextAppearance\\">@style/RN.Persona.Text.Title</item>
227
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
228
- </style>
229
- <style name=\\"RN.Persona.Text.Title\\" parent=\\"Persona.Text.Body\\">
230
- <item name=\\"android:textColor\\">#FFFFFF</item>
231
- <item name=\\"android:textSize\\">26sp</item>
232
- <item name=\\"android:textStyle\\">bold</item>
233
- </style>
234
- </resources>
235
-
236
-
237
- res/drawable/rn_persona_button.xml
238
- ----------------------------------
239
- <?xml version=\\"1.0\\"?>
240
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
241
-
242
-
243
- res/color/rn_persona_button.xml
244
- -------------------------------
245
- <?xml version=\\"1.0\\"?>
246
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
247
- `);
248
- });
249
-
250
- it("titleTextFont", () => {
251
- const theme = { ...EMPTY_THEME, titleTextFont: "Arial" };
252
-
253
- expect(printTheme(theme)).toMatchInlineSnapshot(`
254
- "res/values/styles_persona.xml
255
- -----------------------------
256
- <?xml version=\\"1.0\\"?>
257
- <resources>
258
- <style name=\\"RN\\"/>
259
- <style name=\\"RN.Persona\\"/>
260
- <style name=\\"RN.Persona.Text\\"/>
261
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
262
- <item name=\\"personaTitleTextAppearance\\">@style/RN.Persona.Text.Title</item>
263
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
264
- </style>
265
- <style name=\\"RN.Persona.Text.Title\\" parent=\\"Persona.Text.Body\\">
266
- <item name=\\"android:fontFamily\\">Arial</item>
267
- <item name=\\"android:textSize\\">26sp</item>
268
- <item name=\\"android:textStyle\\">bold</item>
269
- </style>
270
- </resources>
271
-
272
-
273
- res/drawable/rn_persona_button.xml
274
- ----------------------------------
275
- <?xml version=\\"1.0\\"?>
276
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
277
-
278
-
279
- res/color/rn_persona_button.xml
280
- -------------------------------
281
- <?xml version=\\"1.0\\"?>
282
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
283
- `);
284
- });
285
-
286
- it("titleTextFont and titleTextColor", () => {
287
- const theme = {
288
- ...EMPTY_THEME,
289
- titleTextColor: "#000000",
290
- titleTextFont: "Arial",
291
- };
292
-
293
- expect(printTheme(theme)).toMatchInlineSnapshot(`
294
- "res/values/styles_persona.xml
295
- -----------------------------
296
- <?xml version=\\"1.0\\"?>
297
- <resources>
298
- <style name=\\"RN\\"/>
299
- <style name=\\"RN.Persona\\"/>
300
- <style name=\\"RN.Persona.Text\\"/>
301
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
302
- <item name=\\"personaTitleTextAppearance\\">@style/RN.Persona.Text.Title</item>
303
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
304
- </style>
305
- <style name=\\"RN.Persona.Text.Title\\" parent=\\"Persona.Text.Body\\">
306
- <item name=\\"android:textColor\\">#000000</item>
307
- <item name=\\"android:fontFamily\\">Arial</item>
308
- <item name=\\"android:textSize\\">26sp</item>
309
- <item name=\\"android:textStyle\\">bold</item>
310
- </style>
311
- </resources>
312
-
313
-
314
- res/drawable/rn_persona_button.xml
315
- ----------------------------------
316
- <?xml version=\\"1.0\\"?>
317
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
318
-
319
-
320
- res/color/rn_persona_button.xml
321
- -------------------------------
322
- <?xml version=\\"1.0\\"?>
323
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
324
- `);
325
- });
326
-
327
- it("bodyTextColor", () => {
328
- const theme = { ...EMPTY_THEME, bodyTextColor: "#FFFFFF" };
329
-
330
- expect(printTheme(theme)).toMatchInlineSnapshot(`
331
- "res/values/styles_persona.xml
332
- -----------------------------
333
- <?xml version=\\"1.0\\"?>
334
- <resources>
335
- <style name=\\"RN\\"/>
336
- <style name=\\"RN.Persona\\"/>
337
- <style name=\\"RN.Persona.Text\\"/>
338
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
339
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
340
- <item name=\\"personaBodyTextAppearance\\">@style/RN.Persona.Text.Body</item>
341
- </style>
342
- <style name=\\"RN.Persona.Text.Body\\" parent=\\"Persona.Text.Body\\">
343
- <item name=\\"android:textColor\\">#FFFFFF</item>
344
- <item name=\\"android:textSize\\">18sp</item>
345
- </style>
346
- </resources>
347
-
348
-
349
- res/drawable/rn_persona_button.xml
350
- ----------------------------------
351
- <?xml version=\\"1.0\\"?>
352
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
353
-
354
-
355
- res/color/rn_persona_button.xml
356
- -------------------------------
357
- <?xml version=\\"1.0\\"?>
358
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
359
- `);
360
- });
361
-
362
- it("bodyTextFont", () => {
363
- const theme = { ...EMPTY_THEME, bodyTextFont: "Arial" };
364
-
365
- expect(printTheme(theme)).toMatchInlineSnapshot(`
366
- "res/values/styles_persona.xml
367
- -----------------------------
368
- <?xml version=\\"1.0\\"?>
369
- <resources>
370
- <style name=\\"RN\\"/>
371
- <style name=\\"RN.Persona\\"/>
372
- <style name=\\"RN.Persona.Text\\"/>
373
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
374
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
375
- <item name=\\"personaBodyTextAppearance\\">@style/RN.Persona.Text.Body</item>
376
- </style>
377
- <style name=\\"RN.Persona.Text.Body\\" parent=\\"Persona.Text.Body\\">
378
- <item name=\\"android:fontFamily\\">Arial</item>
379
- <item name=\\"android:textSize\\">18sp</item>
380
- </style>
381
- </resources>
382
-
383
-
384
- res/drawable/rn_persona_button.xml
385
- ----------------------------------
386
- <?xml version=\\"1.0\\"?>
387
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
388
-
389
-
390
- res/color/rn_persona_button.xml
391
- -------------------------------
392
- <?xml version=\\"1.0\\"?>
393
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
394
- `);
395
- });
396
-
397
- it("bodyTextFont and bodyTextColor", () => {
398
- const theme = {
399
- ...EMPTY_THEME,
400
- bodyTextFont: "Arial",
401
- bodyTextColor: "#000000",
402
- };
403
-
404
- expect(printTheme(theme)).toMatchInlineSnapshot(`
405
- "res/values/styles_persona.xml
406
- -----------------------------
407
- <?xml version=\\"1.0\\"?>
408
- <resources>
409
- <style name=\\"RN\\"/>
410
- <style name=\\"RN.Persona\\"/>
411
- <style name=\\"RN.Persona.Text\\"/>
412
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
413
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
414
- <item name=\\"personaBodyTextAppearance\\">@style/RN.Persona.Text.Body</item>
415
- </style>
416
- <style name=\\"RN.Persona.Text.Body\\" parent=\\"Persona.Text.Body\\">
417
- <item name=\\"android:textColor\\">#000000</item>
418
- <item name=\\"android:fontFamily\\">Arial</item>
419
- <item name=\\"android:textSize\\">18sp</item>
420
- </style>
421
- </resources>
422
-
423
-
424
- res/drawable/rn_persona_button.xml
425
- ----------------------------------
426
- <?xml version=\\"1.0\\"?>
427
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
428
-
429
-
430
- res/color/rn_persona_button.xml
431
- -------------------------------
432
- <?xml version=\\"1.0\\"?>
433
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
434
- `);
435
- });
436
-
437
- it("footnoteTextColor", () => {
438
- const theme = { ...EMPTY_THEME, footnoteTextColor: "#FFFFFF" };
439
-
440
- expect(printTheme(theme)).toMatchInlineSnapshot(`
441
- "res/values/styles_persona.xml
442
- -----------------------------
443
- <?xml version=\\"1.0\\"?>
444
- <resources>
445
- <style name=\\"RN\\"/>
446
- <style name=\\"RN.Persona\\"/>
447
- <style name=\\"RN.Persona.Text\\"/>
448
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
449
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
450
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
451
- </style>
452
- <style name=\\"TextAppearance.AppCompat.Small\\">
453
- <item name=\\"android:textSize\\">@dimen/abc_text_size_small_material</item>
454
- <item name=\\"android:textColor\\">#FFFFFF</item>
455
- </style>
456
- </resources>
457
-
458
-
459
- res/drawable/rn_persona_button.xml
460
- ----------------------------------
461
- <?xml version=\\"1.0\\"?>
462
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
463
-
464
-
465
- res/color/rn_persona_button.xml
466
- -------------------------------
467
- <?xml version=\\"1.0\\"?>
468
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
469
- `);
470
- });
471
-
472
- it("footnoteTextFont", () => {
473
- const theme = { ...EMPTY_THEME, footnoteTextFont: "Arial" };
474
-
475
- expect(printTheme(theme)).toMatchInlineSnapshot(`
476
- "res/values/styles_persona.xml
477
- -----------------------------
478
- <?xml version=\\"1.0\\"?>
479
- <resources>
480
- <style name=\\"RN\\"/>
481
- <style name=\\"RN.Persona\\"/>
482
- <style name=\\"RN.Persona.Text\\"/>
483
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
484
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
485
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
486
- </style>
487
- <style name=\\"TextAppearance.AppCompat.Small\\">
488
- <item name=\\"android:textSize\\">@dimen/abc_text_size_small_material</item>
489
- <item name=\\"android:textColor\\">?android:attr/textColorTertiary</item>
490
- <item name=\\"android:fontFamily\\">Arial</item>
491
- </style>
492
- </resources>
493
-
494
-
495
- res/drawable/rn_persona_button.xml
496
- ----------------------------------
497
- <?xml version=\\"1.0\\"?>
498
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
499
-
500
-
501
- res/color/rn_persona_button.xml
502
- -------------------------------
503
- <?xml version=\\"1.0\\"?>
504
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
505
- `);
506
- });
507
-
508
- it("footnoteTextFont and footnoteTextColor", () => {
509
- const theme = {
510
- ...EMPTY_THEME,
511
- footnoteTextFont: "Arial",
512
- footnoteTextColor: "#000000",
513
- };
514
-
515
- expect(printTheme(theme)).toMatchInlineSnapshot(`
516
- "res/values/styles_persona.xml
517
- -----------------------------
518
- <?xml version=\\"1.0\\"?>
519
- <resources>
520
- <style name=\\"RN\\"/>
521
- <style name=\\"RN.Persona\\"/>
522
- <style name=\\"RN.Persona.Text\\"/>
523
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
524
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
525
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
526
- </style>
527
- <style name=\\"TextAppearance.AppCompat.Small\\">
528
- <item name=\\"android:textSize\\">@dimen/abc_text_size_small_material</item>
529
- <item name=\\"android:textColor\\">#000000</item>
530
- <item name=\\"android:fontFamily\\">Arial</item>
531
- </style>
532
- </resources>
533
-
534
-
535
- res/drawable/rn_persona_button.xml
536
- ----------------------------------
537
- <?xml version=\\"1.0\\"?>
538
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
539
-
540
-
541
- res/color/rn_persona_button.xml
542
- -------------------------------
543
- <?xml version=\\"1.0\\"?>
544
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
545
- `);
546
- });
547
-
548
- it("pickerTextColor", () => {
549
- const theme = { ...EMPTY_THEME, pickerTextColor: "#FFFFFF" };
550
-
551
- expect(printTheme(theme)).toMatchInlineSnapshot(`
552
- "res/values/styles_persona.xml
553
- -----------------------------
554
- <?xml version=\\"1.0\\"?>
555
- <resources>
556
- <style name=\\"RN\\"/>
557
- <style name=\\"RN.Persona\\"/>
558
- <style name=\\"RN.Persona.Text\\"/>
559
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
560
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
561
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
562
- <item name=\\"spinnerStyle\\">@style/RN.Persona.Spinner</item>
563
- <item name=\\"spinnerDropDownItemStyle\\">@style/RN.Persona.DropDownItem.Spinner</item>
564
- </style>
565
- <style name=\\"RN.Persona.Spinner\\" parent=\\"Widget.AppCompat.Spinner\\">
566
- <item name=\\"android:textColor\\">#FFFFFF</item>
567
- <item name=\\"android:textAppearance\\">@style/Persona.Text.Body</item>
568
- </style>
569
- <style name=\\"RN.Persona.DropDownItem.Spinner\\" parent=\\"Widget.AppCompat.DropDownItem.Spinner\\">
570
- <item name=\\"android:textColor\\">#FFFFFF</item>
571
- <item name=\\"android:textAppearance\\">@style/Persona.Text.Body</item>
572
- </style>
573
- <style name=\\"RN.Persona.Text.Spinner\\">
574
- <item name=\\"android:textColor\\">#FFFFFF</item>
575
- </style>
576
- </resources>
577
-
578
-
579
- res/drawable/rn_persona_button.xml
580
- ----------------------------------
581
- <?xml version=\\"1.0\\"?>
582
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
583
-
584
-
585
- res/color/rn_persona_button.xml
586
- -------------------------------
587
- <?xml version=\\"1.0\\"?>
588
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
589
- `);
590
- });
591
-
592
- it("pickerTextFont", () => {
593
- const theme = { ...EMPTY_THEME, pickerTextFont: "Arial" };
594
-
595
- expect(printTheme(theme)).toMatchInlineSnapshot(`
596
- "res/values/styles_persona.xml
597
- -----------------------------
598
- <?xml version=\\"1.0\\"?>
599
- <resources>
600
- <style name=\\"RN\\"/>
601
- <style name=\\"RN.Persona\\"/>
602
- <style name=\\"RN.Persona.Text\\"/>
603
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
604
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
605
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
606
- <item name=\\"spinnerStyle\\">@style/RN.Persona.Spinner</item>
607
- <item name=\\"spinnerDropDownItemStyle\\">@style/RN.Persona.DropDownItem.Spinner</item>
608
- </style>
609
- <style name=\\"RN.Persona.Spinner\\" parent=\\"Widget.AppCompat.Spinner\\">
610
- <item name=\\"android:textColor\\">?android:attr/textColorPrimary</item>
611
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
612
- </style>
613
- <style name=\\"RN.Persona.DropDownItem.Spinner\\" parent=\\"Widget.AppCompat.DropDownItem.Spinner\\">
614
- <item name=\\"android:textColor\\">?android:attr/textColorPrimary</item>
615
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
616
- </style>
617
- <style name=\\"RN.Persona.Text.Spinner\\">
618
- <item name=\\"android:fontFamily\\">Arial</item>
619
- </style>
620
- </resources>
621
-
622
-
623
- res/drawable/rn_persona_button.xml
624
- ----------------------------------
625
- <?xml version=\\"1.0\\"?>
626
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
627
-
628
-
629
- res/color/rn_persona_button.xml
630
- -------------------------------
631
- <?xml version=\\"1.0\\"?>
632
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
633
- `);
634
- });
635
-
636
- it("pickerTextFont and pickerTextColor", () => {
637
- const theme = {
638
- ...EMPTY_THEME,
639
- pickerTextFont: "Arial",
640
- pickerTextColor: "#000000",
641
- };
642
-
643
- expect(printTheme(theme)).toMatchInlineSnapshot(`
644
- "res/values/styles_persona.xml
645
- -----------------------------
646
- <?xml version=\\"1.0\\"?>
647
- <resources>
648
- <style name=\\"RN\\"/>
649
- <style name=\\"RN.Persona\\"/>
650
- <style name=\\"RN.Persona.Text\\"/>
651
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
652
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
653
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
654
- <item name=\\"spinnerStyle\\">@style/RN.Persona.Spinner</item>
655
- <item name=\\"spinnerDropDownItemStyle\\">@style/RN.Persona.DropDownItem.Spinner</item>
656
- </style>
657
- <style name=\\"RN.Persona.Spinner\\" parent=\\"Widget.AppCompat.Spinner\\">
658
- <item name=\\"android:textColor\\">#000000</item>
659
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
660
- </style>
661
- <style name=\\"RN.Persona.DropDownItem.Spinner\\" parent=\\"Widget.AppCompat.DropDownItem.Spinner\\">
662
- <item name=\\"android:textColor\\">#000000</item>
663
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
664
- </style>
665
- <style name=\\"RN.Persona.Text.Spinner\\">
666
- <item name=\\"android:textColor\\">#000000</item>
667
- <item name=\\"android:fontFamily\\">Arial</item>
668
- </style>
669
- </resources>
670
-
671
-
672
- res/drawable/rn_persona_button.xml
673
- ----------------------------------
674
- <?xml version=\\"1.0\\"?>
675
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
676
-
677
-
678
- res/color/rn_persona_button.xml
679
- -------------------------------
680
- <?xml version=\\"1.0\\"?>
681
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
682
- `);
683
- });
684
-
685
- it("button", () => {
686
- const theme = {
687
- ...EMPTY_THEME,
688
- buttonBackgroundColor: "#FF0000",
689
- buttonDisabledBackgroundColor: null,
690
- buttonTouchedBackgroundColor: null,
691
- buttonTextColor: null,
692
- buttonDisabledTextColor: null,
693
- buttonTextAlignment: null,
694
- buttonCornerRadius: null,
695
- buttonFont: null,
696
- };
697
-
698
- expect(printTheme(theme)).toMatchInlineSnapshot(`
699
- "res/values/styles_persona.xml
700
- -----------------------------
701
- <?xml version=\\"1.0\\"?>
702
- <resources>
703
- <style name=\\"RN\\"/>
704
- <style name=\\"RN.Persona\\"/>
705
- <style name=\\"RN.Persona.Text\\"/>
706
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
707
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
708
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
709
- <item name=\\"buttonStyle\\">@style/RN.Persona.Button</item>
710
- </style>
711
- <style name=\\"RN.Persona.Button\\" parent=\\"android:style/Widget.Button\\">
712
- <item name=\\"android:minHeight\\">48dip</item>
713
- <item name=\\"android:minWidth\\">88dip</item>
714
- <item name=\\"android:textSize\\">18sp</item>
715
- <item name=\\"android:background\\">@drawable/rn_persona_button</item>
716
- <item name=\\"android:textColor\\">@color/rn_persona_button</item>
717
- </style>
718
- </resources>
719
-
720
-
721
- res/drawable/rn_persona_button.xml
722
- ----------------------------------
723
- <?xml version=\\"1.0\\"?>
724
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\">
725
- <item android:state_enabled=\\"false\\">
726
- <shape android:shape=\\"rectangle\\">
727
- <corners android:radius=\\"@dimen/abc_control_corner_material\\"/>
728
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
729
- <solid android:color=\\"?attr/colorPrimaryDark\\"/>
730
- </shape>
731
- </item>
732
- <item android:state_pressed=\\"true\\">
733
- <shape android:shape=\\"rectangle\\">
734
- <corners android:radius=\\"@dimen/abc_control_corner_material\\"/>
735
- <solid android:color=\\"?attr/colorPrimaryDark\\"/>
736
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
737
- </shape>
738
- </item>
739
- <item>
740
- <shape android:shape=\\"rectangle\\">
741
- <corners android:radius=\\"@dimen/abc_control_corner_material\\"/>
742
- <solid android:color=\\"#FF0000\\"/>
743
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
744
- </shape>
745
- </item>
746
- </selector>
747
-
748
-
749
- res/color/rn_persona_button.xml
750
- -------------------------------
751
- <?xml version=\\"1.0\\"?>
752
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\">
753
- <item android:state_enabled=\\"false\\" android:color=\\"@android:color/darker_gray\\"/>
754
- <item android:state_pressed=\\"true\\" android:color=\\"@android:color/white\\"/>
755
- <item android:color=\\"@android:color/white\\"/>
756
- </selector>"
757
- `);
758
- });
759
-
760
- it("progressColor", () => {
761
- const theme = {
762
- ...EMPTY_THEME,
763
- progressColor: "#FF0000",
764
- };
765
-
766
- expect(printTheme(theme)).toMatchInlineSnapshot(`
767
- "res/values/styles_persona.xml
768
- -----------------------------
769
- <?xml version=\\"1.0\\"?>
770
- <resources>
771
- <style name=\\"RN\\"/>
772
- <style name=\\"RN.Persona\\"/>
773
- <style name=\\"RN.Persona.Text\\"/>
774
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
775
- <item name=\\"personaTitleTextAppearance\\">@style/Persona.Text.Title</item>
776
- <item name=\\"personaBodyTextAppearance\\">@style/Persona.Text.Body</item>
777
- <item name=\\"colorControlActivated\\">#FF0000</item>
778
- </style>
779
- </resources>
780
-
781
-
782
- res/drawable/rn_persona_button.xml
783
- ----------------------------------
784
- <?xml version=\\"1.0\\"?>
785
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>
786
-
787
-
788
- res/color/rn_persona_button.xml
789
- -------------------------------
790
- <?xml version=\\"1.0\\"?>
791
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\"/>"
792
- `);
793
- });
794
-
795
- it("fullTheme", () => {
796
- const theme = {
797
- backgroundColor: "#FF0000",
798
- primaryColor: "#FF0000",
799
- darkPrimaryColor: "#FF0000",
800
- accentColor: "#FF0000",
801
- titleTextColor: "#FF0000",
802
- titleTextFont: "Arial",
803
- bodyTextColor: "#FF0000",
804
- bodyTextFont: "Arial",
805
- footnoteTextColor: "#FF0000",
806
- footnoteTextFont: "Arial",
807
- // formLabelTextColor: "#FF0000",
808
- // formLabelTextFont: "Arial",
809
- textFieldTextColor: "#FF0000",
810
- textFieldTextFont: "Arial",
811
- pickerTextColor: "#FF0000",
812
- pickerTextFont: "Arial",
813
- buttonBackgroundColor: "#FF0000",
814
- buttonDisabledBackgroundColor: "#FF0000",
815
- buttonTouchedBackgroundColor: "#FF0000",
816
- buttonTextColor: "#FF0000",
817
- buttonDisabledTextColor: "#FF0000",
818
- buttonTextAlignment: "left",
819
- buttonCornerRadius: "4",
820
- buttonFont: "Arial",
821
- progressColor: "#FF0000",
822
- successAsset: "@drawable/success",
823
- failAsset: "@drawable/fail",
824
- loadingAnimationAsset: "@raw/loading",
825
- loadingAnimationWidthPercent: "0.2",
826
- selfieAnimationAsset: "@raw/selfie",
827
- selfieAnimationWidthPercent: "0.6",
828
- };
829
-
830
- expect(printTheme(theme)).toMatchInlineSnapshot(`
831
- "res/values/styles_persona.xml
832
- -----------------------------
833
- <?xml version=\\"1.0\\"?>
834
- <resources>
835
- <color name=\\"customPersonaBackgroundColor\\">#FF0000</color>
836
-
837
- <style name=\\"RN\\"/>
838
- <style name=\\"RN.Persona\\"/>
839
- <style name=\\"RN.Persona.Text\\"/>
840
- <style name=\\"Persona.Inquiry.Theme\\" parent=\\"Base.Persona.Inquiry.Theme.Light\\">
841
- <item name=\\"colorPrimary\\">#FF0000</item>
842
-
843
- <item name=\\"colorAccent\\">#FF0000</item>
844
-
845
- <item name=\\"colorPrimaryDark\\">#FF0000</item>
846
-
847
- <item name=\\"android:colorBackground\\">@color/customPersonaBackgroundColor</item>
848
-
849
- <item name=\\"personaTitleTextAppearance\\">@style/RN.Persona.Text.Title</item>
850
- <item name=\\"personaBodyTextAppearance\\">@style/RN.Persona.Text.Body</item>
851
- <item name=\\"editTextStyle\\">@style/RN.Persona.EditText</item>
852
- <item name=\\"spinnerStyle\\">@style/RN.Persona.Spinner</item>
853
- <item name=\\"spinnerDropDownItemStyle\\">@style/RN.Persona.DropDownItem.Spinner</item>
854
- <item name=\\"buttonStyle\\">@style/RN.Persona.Button</item>
855
- <item name=\\"colorControlActivated\\">#FF0000</item>
856
- <item name=\\"personaInquiryCompleteImage\\">@drawable/success</item>
857
-
858
- <item name=\\"personaInquiryFailImage\\">@drawable/fail</item>
859
-
860
- <item name=\\"personaInquiryLoadingLottieRaw\\">@raw/loading</item>
861
-
862
- <item name=\\"personaInquiryLoadingLottieWidthPercent\\">0.2</item>
863
-
864
- <item name=\\"personaInquirySelfieLottieRaw\\">@raw/selfie</item>
865
-
866
- <item name=\\"personaInquirySelfieLottieWidthPercent\\">0.6</item>
867
-
868
- </style>
869
- <style name=\\"RN.Persona.Text.Title\\" parent=\\"Persona.Text.Body\\">
870
- <item name=\\"android:textColor\\">#FF0000</item>
871
- <item name=\\"android:fontFamily\\">Arial</item>
872
- <item name=\\"android:textSize\\">26sp</item>
873
- <item name=\\"android:textStyle\\">bold</item>
874
- </style>
875
- <style name=\\"RN.Persona.Text.Body\\" parent=\\"Persona.Text.Body\\">
876
- <item name=\\"android:textColor\\">#FF0000</item>
877
- <item name=\\"android:fontFamily\\">Arial</item>
878
- <item name=\\"android:textSize\\">18sp</item>
879
- </style>
880
- <style name=\\"TextAppearance.AppCompat.Small\\">
881
- <item name=\\"android:textSize\\">@dimen/abc_text_size_small_material</item>
882
- <item name=\\"android:textColor\\">#FF0000</item>
883
- <item name=\\"android:fontFamily\\">Arial</item>
884
- </style>
885
- <style name=\\"RN.Persona.EditText\\" parent=\\"Widget.AppCompat.EditText\\">
886
- <item name=\\"android:textAppearance\\">@style/RN.Persona.EditText.TextAppearance</item>
887
- <item name=\\"android:textColor\\">#FF0000</item>
888
- </style>
889
- <style name=\\"RN.Persona.EditText.TextAppearance\\" parent=\\"Base.TextAppearance.AppCompat.Medium\\">
890
- <item name=\\"android:textSize\\">18sp</item>
891
- <item name=\\"android:fontFamily\\">Arial</item>
892
- </style>
893
- <style name=\\"RN.Persona.Spinner\\" parent=\\"Widget.AppCompat.Spinner\\">
894
- <item name=\\"android:textColor\\">#FF0000</item>
895
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
896
- </style>
897
- <style name=\\"RN.Persona.DropDownItem.Spinner\\" parent=\\"Widget.AppCompat.DropDownItem.Spinner\\">
898
- <item name=\\"android:textColor\\">#FF0000</item>
899
- <item name=\\"android:textAppearance\\">@style/RN.Persona.Text.Spinner</item>
900
- </style>
901
- <style name=\\"RN.Persona.Text.Spinner\\">
902
- <item name=\\"android:textColor\\">#FF0000</item>
903
- <item name=\\"android:fontFamily\\">Arial</item>
904
- </style>
905
- <style name=\\"RN.Persona.Button\\" parent=\\"android:style/Widget.Button\\">
906
- <item name=\\"android:minHeight\\">48dip</item>
907
- <item name=\\"android:minWidth\\">88dip</item>
908
- <item name=\\"android:textSize\\">18sp</item>
909
- <item name=\\"android:background\\">@drawable/rn_persona_button</item>
910
- <item name=\\"android:textColor\\">@color/rn_persona_button</item>
911
- </style>
912
- </resources>
913
-
914
-
915
- res/drawable/rn_persona_button.xml
916
- ----------------------------------
917
- <?xml version=\\"1.0\\"?>
918
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\">
919
- <item android:state_enabled=\\"false\\">
920
- <shape android:shape=\\"rectangle\\">
921
- <corners android:radius=\\"4dp\\"/>
922
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
923
- <solid android:color=\\"#FF0000\\"/>
924
- </shape>
925
- </item>
926
- <item android:state_pressed=\\"true\\">
927
- <shape android:shape=\\"rectangle\\">
928
- <corners android:radius=\\"4dp\\"/>
929
- <solid android:color=\\"#FF0000\\"/>
930
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
931
- </shape>
932
- </item>
933
- <item>
934
- <shape android:shape=\\"rectangle\\">
935
- <corners android:radius=\\"4dp\\"/>
936
- <solid android:color=\\"#FF0000\\"/>
937
- <padding android:left=\\"@dimen/abc_button_padding_horizontal_material\\" android:top=\\"@dimen/abc_button_padding_vertical_material\\" android:right=\\"@dimen/abc_button_padding_horizontal_material\\" android:bottom=\\"@dimen/abc_button_padding_vertical_material\\"/>
938
- </shape>
939
- </item>
940
- </selector>
941
-
942
-
943
- res/color/rn_persona_button.xml
944
- -------------------------------
945
- <?xml version=\\"1.0\\"?>
946
- <selector xmlns:android=\\"http://schemas.android.com/apk/res/android\\">
947
- <item android:state_enabled=\\"false\\" android:color=\\"#FF0000\\"/>
948
- <item android:state_pressed=\\"true\\" android:color=\\"#FF0000\\"/>
949
- <item android:color=\\"#FF0000\\"/>
950
- </selector>"
951
- `);
952
- });