@hero-design/rn 7.13.0 → 7.14.1

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 (155) hide show
  1. package/.eslintrc.json +3 -1
  2. package/.turbo/turbo-build.log +9 -8
  3. package/assets/fonts/hero-icons.ttf +0 -0
  4. package/babel.config.js +16 -0
  5. package/es/index.js +26977 -7611
  6. package/lib/assets/fonts/hero-icons.ttf +0 -0
  7. package/lib/index.js +26983 -7613
  8. package/package.json +9 -4
  9. package/rollup.config.js +1 -0
  10. package/src/components/Accordion/AccordionItem.tsx +50 -0
  11. package/src/components/Accordion/StyledAccordion.tsx +29 -0
  12. package/src/components/Accordion/__tests__/AccordionItem.spec.tsx +56 -0
  13. package/src/components/Accordion/__tests__/StyledAccordion.spec.tsx +17 -0
  14. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +529 -0
  15. package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +33 -0
  16. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +822 -0
  17. package/src/components/Accordion/__tests__/index.spec.tsx +54 -0
  18. package/src/components/Accordion/index.tsx +82 -0
  19. package/src/components/Accordion/utils.tsx +11 -0
  20. package/src/components/Button/IconButton.tsx +1 -1
  21. package/src/components/Calendar/CalendarRowItem.tsx +54 -0
  22. package/src/components/Calendar/StyledCalendar.tsx +76 -0
  23. package/src/components/Calendar/__tests__/CalendarRowItem.spec.tsx +76 -0
  24. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +411 -0
  25. package/src/components/Calendar/__tests__/helper.spec.ts +50 -0
  26. package/src/components/Calendar/__tests__/index.spec.tsx +99 -0
  27. package/src/components/Calendar/helpers.ts +29 -0
  28. package/src/components/Calendar/index.tsx +217 -0
  29. package/src/components/Collapse/index.tsx +13 -15
  30. package/src/components/ContentNavigator/index.tsx +6 -0
  31. package/src/components/Empty/StyledEmpty.tsx +47 -0
  32. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +66 -0
  33. package/src/components/Empty/__tests__/index.spec.tsx +17 -0
  34. package/src/components/Empty/index.tsx +53 -0
  35. package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -2
  36. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -0
  37. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +7 -1
  38. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +84 -22
  39. package/src/components/FAB/ActionGroup/index.tsx +8 -1
  40. package/src/components/Icon/HeroIcon/selection.json +1 -1
  41. package/src/components/Icon/IconList.ts +14 -0
  42. package/src/components/List/BasicListItem.tsx +44 -34
  43. package/src/components/List/ListItem.tsx +67 -58
  44. package/src/components/List/StyledBasicListItem.tsx +2 -3
  45. package/src/components/List/StyledListItem.tsx +2 -2
  46. package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +5 -2
  47. package/src/components/List/__tests__/StyledListItem.spec.tsx +4 -1
  48. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +15 -10
  49. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +52 -32
  50. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +128 -48
  51. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +132 -52
  52. package/src/components/RichTextEditor/EditorEvent.ts +7 -0
  53. package/src/components/RichTextEditor/EditorToolbar.tsx +220 -0
  54. package/src/components/RichTextEditor/MentionList.tsx +69 -0
  55. package/src/components/RichTextEditor/RichTextEditor.tsx +396 -0
  56. package/src/components/RichTextEditor/StyledRichTextEditor.ts +20 -0
  57. package/src/components/RichTextEditor/StyledToolbar.ts +32 -0
  58. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +130 -0
  59. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +109 -0
  60. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +245 -0
  61. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +324 -0
  62. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +45 -0
  63. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +526 -0
  64. package/src/components/RichTextEditor/constants.ts +20 -0
  65. package/src/components/RichTextEditor/hero-editor.d.ts +8 -0
  66. package/src/components/RichTextEditor/index.tsx +8 -0
  67. package/src/components/RichTextEditor/utils/events.ts +31 -0
  68. package/src/components/RichTextEditor/utils/rnWebView.ts +19 -0
  69. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +77 -0
  70. package/src/components/SectionHeading/__tests__/index.spec.tsx +14 -0
  71. package/src/components/SectionHeading/index.tsx +16 -9
  72. package/src/components/Tag/StyledTag.tsx +12 -2
  73. package/src/components/Tag/__tests__/Tag.spec.tsx +35 -8
  74. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +118 -4
  75. package/src/components/Tag/index.tsx +9 -2
  76. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1 -0
  77. package/src/components/Typography/Text/StyledText.tsx +2 -1
  78. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  79. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
  80. package/src/components/Typography/Text/index.tsx +2 -1
  81. package/src/index.ts +8 -0
  82. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +101 -4
  83. package/src/theme/components/accordion.ts +19 -0
  84. package/src/theme/components/calendar.ts +34 -0
  85. package/src/theme/components/card.ts +1 -1
  86. package/src/theme/components/empty.ts +38 -0
  87. package/src/theme/components/fab.ts +4 -3
  88. package/src/theme/components/list.ts +1 -0
  89. package/src/theme/components/pinInput.ts +1 -1
  90. package/src/theme/components/richTextEditor.ts +34 -0
  91. package/src/theme/components/tag.ts +8 -2
  92. package/src/theme/components/typography.ts +1 -0
  93. package/src/theme/global/borders.ts +6 -6
  94. package/src/theme/global/colors.ts +4 -1
  95. package/src/theme/index.ts +12 -0
  96. package/testUtils/setup.tsx +17 -0
  97. package/types/components/Accordion/AccordionItem.d.ts +14 -0
  98. package/types/components/Accordion/StyledAccordion.d.ts +32 -0
  99. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +1 -0
  100. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +1 -0
  101. package/types/components/Accordion/__tests__/index.spec.d.ts +1 -0
  102. package/types/components/Accordion/index.d.ts +38 -0
  103. package/types/components/Accordion/utils.d.ts +1 -0
  104. package/types/components/Button/IconButton.d.ts +1 -1
  105. package/types/components/Calendar/CalendarRowItem.d.ts +10 -0
  106. package/types/components/Calendar/StyledCalendar.d.ts +54 -0
  107. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +1 -0
  108. package/types/components/Calendar/__tests__/helper.spec.d.ts +1 -0
  109. package/types/components/Calendar/__tests__/index.spec.d.ts +1 -0
  110. package/types/components/Calendar/helpers.d.ts +3 -0
  111. package/types/components/Calendar/index.d.ts +40 -0
  112. package/types/components/Collapse/index.d.ts +1 -1
  113. package/types/components/ContentNavigator/index.d.ts +5 -1
  114. package/types/components/Empty/StyledEmpty.d.ts +31 -0
  115. package/types/components/Empty/__tests__/index.spec.d.ts +1 -0
  116. package/types/components/Empty/index.d.ts +26 -0
  117. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +6 -1
  118. package/types/components/FAB/ActionGroup/index.d.ts +6 -1
  119. package/types/components/FAB/index.d.ts +1 -1
  120. package/types/components/Icon/IconList.d.ts +1 -1
  121. package/types/components/Icon/utils.d.ts +1 -1
  122. package/types/components/List/StyledBasicListItem.d.ts +3 -3
  123. package/types/components/List/StyledListItem.d.ts +3 -3
  124. package/types/components/RichTextEditor/EditorEvent.d.ts +3 -0
  125. package/types/components/RichTextEditor/EditorToolbar.d.ts +17 -0
  126. package/types/components/RichTextEditor/MentionList.d.ts +12 -0
  127. package/types/components/RichTextEditor/RichTextEditor.d.ts +65 -0
  128. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +16 -0
  129. package/types/components/RichTextEditor/StyledToolbar.d.ts +21 -0
  130. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +1 -0
  131. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +1 -0
  132. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +1 -0
  133. package/types/components/RichTextEditor/constants.d.ts +19 -0
  134. package/types/components/RichTextEditor/index.d.ts +5 -0
  135. package/types/components/RichTextEditor/utils/events.d.ts +8 -0
  136. package/types/components/RichTextEditor/utils/rnWebView.d.ts +7 -0
  137. package/types/components/SectionHeading/index.d.ts +2 -2
  138. package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
  139. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  140. package/types/components/Tag/StyledTag.d.ts +1 -1
  141. package/types/components/Tag/index.d.ts +1 -1
  142. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  143. package/types/components/Typography/Text/index.d.ts +1 -1
  144. package/types/index.d.ts +5 -1
  145. package/types/theme/components/accordion.d.ts +13 -0
  146. package/types/theme/components/calendar.d.ts +26 -0
  147. package/types/theme/components/empty.d.ts +28 -0
  148. package/types/theme/components/fab.d.ts +1 -0
  149. package/types/theme/components/list.d.ts +1 -0
  150. package/types/theme/components/richTextEditor.d.ts +26 -0
  151. package/types/theme/components/tag.d.ts +8 -2
  152. package/types/theme/components/typography.d.ts +1 -0
  153. package/types/theme/global/colors.d.ts +4 -1
  154. package/types/theme/global/index.d.ts +4 -1
  155. package/types/theme/index.d.ts +8 -0
@@ -0,0 +1,822 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Accordion allows fully controlled 1`] = `
4
+ <View
5
+ style={
6
+ Array [
7
+ Object {},
8
+ undefined,
9
+ ]
10
+ }
11
+ >
12
+ <View
13
+ style={
14
+ Array [
15
+ Object {
16
+ "backgroundColor": "#ffffff",
17
+ "borderRadius": 0,
18
+ "padding": 16,
19
+ },
20
+ undefined,
21
+ ]
22
+ }
23
+ themeVariant="default"
24
+ >
25
+ <View
26
+ accessible={true}
27
+ collapsable={false}
28
+ focusable={true}
29
+ nativeID="animatedComponent"
30
+ onClick={[Function]}
31
+ onResponderGrant={[Function]}
32
+ onResponderMove={[Function]}
33
+ onResponderRelease={[Function]}
34
+ onResponderTerminate={[Function]}
35
+ onResponderTerminationRequest={[Function]}
36
+ onStartShouldSetResponder={[Function]}
37
+ style={
38
+ Object {
39
+ "flexDirection": "row",
40
+ "justifyContent": "space-between",
41
+ "opacity": 1,
42
+ }
43
+ }
44
+ >
45
+ <Text
46
+ style={
47
+ Array [
48
+ Object {
49
+ "color": "#292a2b",
50
+ "fontFamily": "BeVietnamPro-SemiBold",
51
+ "fontSize": 16,
52
+ "letterSpacing": 0.48,
53
+ "lineHeight": 24,
54
+ },
55
+ undefined,
56
+ ]
57
+ }
58
+ themeFontSize="large"
59
+ themeFontWeight="semi-bold"
60
+ themeIntent="body"
61
+ >
62
+ Accordion header 1
63
+ </Text>
64
+ <HeroIcon
65
+ name="arrow-down"
66
+ style={
67
+ Array [
68
+ Object {
69
+ "color": "#7622d7",
70
+ "fontSize": 20,
71
+ },
72
+ undefined,
73
+ ]
74
+ }
75
+ themeIntent="primary"
76
+ themeSize="small"
77
+ />
78
+ </View>
79
+ <View
80
+ collapsable={false}
81
+ nativeID="animatedComponent"
82
+ style={
83
+ Object {
84
+ "height": 0,
85
+ "margin": 0,
86
+ "overflow": "hidden",
87
+ "padding": 0,
88
+ }
89
+ }
90
+ >
91
+ <View
92
+ style={
93
+ Array [
94
+ Object {
95
+ "height": 1334,
96
+ },
97
+ undefined,
98
+ ]
99
+ }
100
+ >
101
+ <View
102
+ onLayout={[Function]}
103
+ style={
104
+ Array [
105
+ Object {
106
+ "margin": 0,
107
+ "padding": 0,
108
+ },
109
+ Array [
110
+ Object {
111
+ "paddingTop": 16,
112
+ },
113
+ undefined,
114
+ ],
115
+ ]
116
+ }
117
+ >
118
+ <Text
119
+ style={
120
+ Array [
121
+ Object {
122
+ "color": "#292a2b",
123
+ "fontFamily": "BeVietnamPro-Regular",
124
+ "fontSize": 14,
125
+ "letterSpacing": 0.42,
126
+ "lineHeight": 22,
127
+ },
128
+ undefined,
129
+ ]
130
+ }
131
+ themeFontSize="medium"
132
+ themeFontWeight="regular"
133
+ themeIntent="body"
134
+ >
135
+ Accordion content 1
136
+ </Text>
137
+ </View>
138
+ </View>
139
+ </View>
140
+ </View>
141
+ <View
142
+ style={
143
+ Array [
144
+ Object {
145
+ "backgroundColor": "#ffffff",
146
+ "borderRadius": 0,
147
+ "padding": 16,
148
+ },
149
+ undefined,
150
+ ]
151
+ }
152
+ themeVariant="default"
153
+ >
154
+ <View
155
+ accessible={true}
156
+ collapsable={false}
157
+ focusable={true}
158
+ nativeID="animatedComponent"
159
+ onClick={[Function]}
160
+ onResponderGrant={[Function]}
161
+ onResponderMove={[Function]}
162
+ onResponderRelease={[Function]}
163
+ onResponderTerminate={[Function]}
164
+ onResponderTerminationRequest={[Function]}
165
+ onStartShouldSetResponder={[Function]}
166
+ style={
167
+ Object {
168
+ "flexDirection": "row",
169
+ "justifyContent": "space-between",
170
+ "opacity": 1,
171
+ }
172
+ }
173
+ >
174
+ <Text
175
+ style={
176
+ Array [
177
+ Object {
178
+ "color": "#292a2b",
179
+ "fontFamily": "BeVietnamPro-SemiBold",
180
+ "fontSize": 16,
181
+ "letterSpacing": 0.48,
182
+ "lineHeight": 24,
183
+ },
184
+ undefined,
185
+ ]
186
+ }
187
+ themeFontSize="large"
188
+ themeFontWeight="semi-bold"
189
+ themeIntent="body"
190
+ >
191
+ Accordion header 2
192
+ </Text>
193
+ <HeroIcon
194
+ name="arrow-up"
195
+ style={
196
+ Array [
197
+ Object {
198
+ "color": "#7622d7",
199
+ "fontSize": 20,
200
+ },
201
+ undefined,
202
+ ]
203
+ }
204
+ themeIntent="primary"
205
+ themeSize="small"
206
+ />
207
+ </View>
208
+ <View
209
+ collapsable={false}
210
+ nativeID="animatedComponent"
211
+ style={
212
+ Object {
213
+ "height": 0,
214
+ "margin": 0,
215
+ "overflow": "hidden",
216
+ "padding": 0,
217
+ }
218
+ }
219
+ >
220
+ <View
221
+ style={
222
+ Array [
223
+ Object {
224
+ "height": 1334,
225
+ },
226
+ undefined,
227
+ ]
228
+ }
229
+ >
230
+ <View
231
+ onLayout={[Function]}
232
+ style={
233
+ Array [
234
+ Object {
235
+ "margin": 0,
236
+ "padding": 0,
237
+ },
238
+ Array [
239
+ Object {
240
+ "paddingTop": 16,
241
+ },
242
+ undefined,
243
+ ],
244
+ ]
245
+ }
246
+ >
247
+ <Text
248
+ style={
249
+ Array [
250
+ Object {
251
+ "color": "#292a2b",
252
+ "fontFamily": "BeVietnamPro-Regular",
253
+ "fontSize": 14,
254
+ "letterSpacing": 0.42,
255
+ "lineHeight": 22,
256
+ },
257
+ undefined,
258
+ ]
259
+ }
260
+ themeFontSize="medium"
261
+ themeFontWeight="regular"
262
+ themeIntent="body"
263
+ >
264
+ Accordion content 2
265
+ </Text>
266
+ </View>
267
+ </View>
268
+ </View>
269
+ </View>
270
+ </View>
271
+ `;
272
+
273
+ exports[`Accordion renders correctly 1`] = `
274
+ <View
275
+ style={
276
+ Array [
277
+ Object {},
278
+ undefined,
279
+ ]
280
+ }
281
+ >
282
+ <View
283
+ style={
284
+ Array [
285
+ Object {
286
+ "backgroundColor": "#ffffff",
287
+ "borderRadius": 0,
288
+ "padding": 16,
289
+ },
290
+ undefined,
291
+ ]
292
+ }
293
+ themeVariant="default"
294
+ >
295
+ <View
296
+ accessible={true}
297
+ collapsable={false}
298
+ focusable={true}
299
+ nativeID="animatedComponent"
300
+ onClick={[Function]}
301
+ onResponderGrant={[Function]}
302
+ onResponderMove={[Function]}
303
+ onResponderRelease={[Function]}
304
+ onResponderTerminate={[Function]}
305
+ onResponderTerminationRequest={[Function]}
306
+ onStartShouldSetResponder={[Function]}
307
+ style={
308
+ Object {
309
+ "flexDirection": "row",
310
+ "justifyContent": "space-between",
311
+ "opacity": 1,
312
+ }
313
+ }
314
+ >
315
+ <Text
316
+ style={
317
+ Array [
318
+ Object {
319
+ "color": "#292a2b",
320
+ "fontFamily": "BeVietnamPro-SemiBold",
321
+ "fontSize": 16,
322
+ "letterSpacing": 0.48,
323
+ "lineHeight": 24,
324
+ },
325
+ undefined,
326
+ ]
327
+ }
328
+ themeFontSize="large"
329
+ themeFontWeight="semi-bold"
330
+ themeIntent="body"
331
+ >
332
+ Accordion header 1
333
+ </Text>
334
+ <HeroIcon
335
+ name="arrow-down"
336
+ style={
337
+ Array [
338
+ Object {
339
+ "color": "#7622d7",
340
+ "fontSize": 20,
341
+ },
342
+ undefined,
343
+ ]
344
+ }
345
+ themeIntent="primary"
346
+ themeSize="small"
347
+ />
348
+ </View>
349
+ <View
350
+ collapsable={false}
351
+ nativeID="animatedComponent"
352
+ style={
353
+ Object {
354
+ "height": 0,
355
+ "margin": 0,
356
+ "overflow": "hidden",
357
+ "padding": 0,
358
+ }
359
+ }
360
+ >
361
+ <View
362
+ style={
363
+ Array [
364
+ Object {
365
+ "height": 1334,
366
+ },
367
+ undefined,
368
+ ]
369
+ }
370
+ >
371
+ <View
372
+ onLayout={[Function]}
373
+ style={
374
+ Array [
375
+ Object {
376
+ "margin": 0,
377
+ "padding": 0,
378
+ },
379
+ Array [
380
+ Object {
381
+ "paddingTop": 16,
382
+ },
383
+ undefined,
384
+ ],
385
+ ]
386
+ }
387
+ >
388
+ <Text
389
+ style={
390
+ Array [
391
+ Object {
392
+ "color": "#292a2b",
393
+ "fontFamily": "BeVietnamPro-Regular",
394
+ "fontSize": 14,
395
+ "letterSpacing": 0.42,
396
+ "lineHeight": 22,
397
+ },
398
+ undefined,
399
+ ]
400
+ }
401
+ themeFontSize="medium"
402
+ themeFontWeight="regular"
403
+ themeIntent="body"
404
+ >
405
+ Accordion content 1
406
+ </Text>
407
+ </View>
408
+ </View>
409
+ </View>
410
+ </View>
411
+ <View
412
+ style={
413
+ Array [
414
+ Object {
415
+ "backgroundColor": "#ffffff",
416
+ "borderRadius": 0,
417
+ "padding": 16,
418
+ },
419
+ undefined,
420
+ ]
421
+ }
422
+ themeVariant="default"
423
+ >
424
+ <View
425
+ accessible={true}
426
+ collapsable={false}
427
+ focusable={true}
428
+ nativeID="animatedComponent"
429
+ onClick={[Function]}
430
+ onResponderGrant={[Function]}
431
+ onResponderMove={[Function]}
432
+ onResponderRelease={[Function]}
433
+ onResponderTerminate={[Function]}
434
+ onResponderTerminationRequest={[Function]}
435
+ onStartShouldSetResponder={[Function]}
436
+ style={
437
+ Object {
438
+ "flexDirection": "row",
439
+ "justifyContent": "space-between",
440
+ "opacity": 1,
441
+ }
442
+ }
443
+ >
444
+ <Text
445
+ style={
446
+ Array [
447
+ Object {
448
+ "color": "#292a2b",
449
+ "fontFamily": "BeVietnamPro-SemiBold",
450
+ "fontSize": 16,
451
+ "letterSpacing": 0.48,
452
+ "lineHeight": 24,
453
+ },
454
+ undefined,
455
+ ]
456
+ }
457
+ themeFontSize="large"
458
+ themeFontWeight="semi-bold"
459
+ themeIntent="body"
460
+ >
461
+ Accordion header 2
462
+ </Text>
463
+ <HeroIcon
464
+ name="arrow-down"
465
+ style={
466
+ Array [
467
+ Object {
468
+ "color": "#7622d7",
469
+ "fontSize": 20,
470
+ },
471
+ undefined,
472
+ ]
473
+ }
474
+ themeIntent="primary"
475
+ themeSize="small"
476
+ />
477
+ </View>
478
+ <View
479
+ collapsable={false}
480
+ nativeID="animatedComponent"
481
+ style={
482
+ Object {
483
+ "height": 0,
484
+ "margin": 0,
485
+ "overflow": "hidden",
486
+ "padding": 0,
487
+ }
488
+ }
489
+ >
490
+ <View
491
+ style={
492
+ Array [
493
+ Object {
494
+ "height": 1334,
495
+ },
496
+ undefined,
497
+ ]
498
+ }
499
+ >
500
+ <View
501
+ onLayout={[Function]}
502
+ style={
503
+ Array [
504
+ Object {
505
+ "margin": 0,
506
+ "padding": 0,
507
+ },
508
+ Array [
509
+ Object {
510
+ "paddingTop": 16,
511
+ },
512
+ undefined,
513
+ ],
514
+ ]
515
+ }
516
+ >
517
+ <Text
518
+ style={
519
+ Array [
520
+ Object {
521
+ "color": "#292a2b",
522
+ "fontFamily": "BeVietnamPro-Regular",
523
+ "fontSize": 14,
524
+ "letterSpacing": 0.42,
525
+ "lineHeight": 22,
526
+ },
527
+ undefined,
528
+ ]
529
+ }
530
+ themeFontSize="medium"
531
+ themeFontWeight="regular"
532
+ themeIntent="body"
533
+ >
534
+ Accordion content 2
535
+ </Text>
536
+ </View>
537
+ </View>
538
+ </View>
539
+ </View>
540
+ </View>
541
+ `;
542
+
543
+ exports[`Accordion renders correctly when variant is card 1`] = `
544
+ <View
545
+ style={
546
+ Array [
547
+ Object {},
548
+ undefined,
549
+ ]
550
+ }
551
+ >
552
+ <View
553
+ style={
554
+ Array [
555
+ Object {
556
+ "backgroundColor": "#ffffff",
557
+ "borderRadius": 8,
558
+ "padding": 16,
559
+ },
560
+ undefined,
561
+ ]
562
+ }
563
+ themeVariant="card"
564
+ >
565
+ <View
566
+ accessible={true}
567
+ collapsable={false}
568
+ focusable={true}
569
+ nativeID="animatedComponent"
570
+ onClick={[Function]}
571
+ onResponderGrant={[Function]}
572
+ onResponderMove={[Function]}
573
+ onResponderRelease={[Function]}
574
+ onResponderTerminate={[Function]}
575
+ onResponderTerminationRequest={[Function]}
576
+ onStartShouldSetResponder={[Function]}
577
+ style={
578
+ Object {
579
+ "flexDirection": "row",
580
+ "justifyContent": "space-between",
581
+ "opacity": 1,
582
+ }
583
+ }
584
+ >
585
+ <Text
586
+ style={
587
+ Array [
588
+ Object {
589
+ "color": "#292a2b",
590
+ "fontFamily": "BeVietnamPro-SemiBold",
591
+ "fontSize": 16,
592
+ "letterSpacing": 0.48,
593
+ "lineHeight": 24,
594
+ },
595
+ undefined,
596
+ ]
597
+ }
598
+ themeFontSize="large"
599
+ themeFontWeight="semi-bold"
600
+ themeIntent="body"
601
+ >
602
+ Accordion header 1
603
+ </Text>
604
+ <HeroIcon
605
+ name="arrow-down"
606
+ style={
607
+ Array [
608
+ Object {
609
+ "color": "#7622d7",
610
+ "fontSize": 20,
611
+ },
612
+ undefined,
613
+ ]
614
+ }
615
+ themeIntent="primary"
616
+ themeSize="small"
617
+ />
618
+ </View>
619
+ <View
620
+ collapsable={false}
621
+ nativeID="animatedComponent"
622
+ style={
623
+ Object {
624
+ "height": 0,
625
+ "margin": 0,
626
+ "overflow": "hidden",
627
+ "padding": 0,
628
+ }
629
+ }
630
+ >
631
+ <View
632
+ style={
633
+ Array [
634
+ Object {
635
+ "height": 1334,
636
+ },
637
+ undefined,
638
+ ]
639
+ }
640
+ >
641
+ <View
642
+ onLayout={[Function]}
643
+ style={
644
+ Array [
645
+ Object {
646
+ "margin": 0,
647
+ "padding": 0,
648
+ },
649
+ Array [
650
+ Object {
651
+ "paddingTop": 16,
652
+ },
653
+ undefined,
654
+ ],
655
+ ]
656
+ }
657
+ >
658
+ <Text
659
+ style={
660
+ Array [
661
+ Object {
662
+ "color": "#292a2b",
663
+ "fontFamily": "BeVietnamPro-Regular",
664
+ "fontSize": 14,
665
+ "letterSpacing": 0.42,
666
+ "lineHeight": 22,
667
+ },
668
+ undefined,
669
+ ]
670
+ }
671
+ themeFontSize="medium"
672
+ themeFontWeight="regular"
673
+ themeIntent="body"
674
+ >
675
+ Accordion content 1
676
+ </Text>
677
+ </View>
678
+ </View>
679
+ </View>
680
+ </View>
681
+ <View
682
+ style={
683
+ Array [
684
+ Object {
685
+ "paddingTop": 16,
686
+ },
687
+ undefined,
688
+ ]
689
+ }
690
+ testID="accordion-spacer"
691
+ />
692
+ <View
693
+ style={
694
+ Array [
695
+ Object {
696
+ "backgroundColor": "#ffffff",
697
+ "borderRadius": 8,
698
+ "padding": 16,
699
+ },
700
+ undefined,
701
+ ]
702
+ }
703
+ themeVariant="card"
704
+ >
705
+ <View
706
+ accessible={true}
707
+ collapsable={false}
708
+ focusable={true}
709
+ nativeID="animatedComponent"
710
+ onClick={[Function]}
711
+ onResponderGrant={[Function]}
712
+ onResponderMove={[Function]}
713
+ onResponderRelease={[Function]}
714
+ onResponderTerminate={[Function]}
715
+ onResponderTerminationRequest={[Function]}
716
+ onStartShouldSetResponder={[Function]}
717
+ style={
718
+ Object {
719
+ "flexDirection": "row",
720
+ "justifyContent": "space-between",
721
+ "opacity": 1,
722
+ }
723
+ }
724
+ >
725
+ <Text
726
+ style={
727
+ Array [
728
+ Object {
729
+ "color": "#292a2b",
730
+ "fontFamily": "BeVietnamPro-SemiBold",
731
+ "fontSize": 16,
732
+ "letterSpacing": 0.48,
733
+ "lineHeight": 24,
734
+ },
735
+ undefined,
736
+ ]
737
+ }
738
+ themeFontSize="large"
739
+ themeFontWeight="semi-bold"
740
+ themeIntent="body"
741
+ >
742
+ Accordion header 2
743
+ </Text>
744
+ <HeroIcon
745
+ name="arrow-down"
746
+ style={
747
+ Array [
748
+ Object {
749
+ "color": "#7622d7",
750
+ "fontSize": 20,
751
+ },
752
+ undefined,
753
+ ]
754
+ }
755
+ themeIntent="primary"
756
+ themeSize="small"
757
+ />
758
+ </View>
759
+ <View
760
+ collapsable={false}
761
+ nativeID="animatedComponent"
762
+ style={
763
+ Object {
764
+ "height": 0,
765
+ "margin": 0,
766
+ "overflow": "hidden",
767
+ "padding": 0,
768
+ }
769
+ }
770
+ >
771
+ <View
772
+ style={
773
+ Array [
774
+ Object {
775
+ "height": 1334,
776
+ },
777
+ undefined,
778
+ ]
779
+ }
780
+ >
781
+ <View
782
+ onLayout={[Function]}
783
+ style={
784
+ Array [
785
+ Object {
786
+ "margin": 0,
787
+ "padding": 0,
788
+ },
789
+ Array [
790
+ Object {
791
+ "paddingTop": 16,
792
+ },
793
+ undefined,
794
+ ],
795
+ ]
796
+ }
797
+ >
798
+ <Text
799
+ style={
800
+ Array [
801
+ Object {
802
+ "color": "#292a2b",
803
+ "fontFamily": "BeVietnamPro-Regular",
804
+ "fontSize": 14,
805
+ "letterSpacing": 0.42,
806
+ "lineHeight": 22,
807
+ },
808
+ undefined,
809
+ ]
810
+ }
811
+ themeFontSize="medium"
812
+ themeFontWeight="regular"
813
+ themeIntent="body"
814
+ >
815
+ Accordion content 2
816
+ </Text>
817
+ </View>
818
+ </View>
819
+ </View>
820
+ </View>
821
+ </View>
822
+ `;