@tactics/toddle-styleguide 5.3.1 → 5.3.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 (178) hide show
  1. package/App.tsx +0 -19
  2. package/app.json +8 -4
  3. package/index.tsx +0 -4
  4. package/package.json +55 -27
  5. package/src/components/atoms/calendar/calendar.component.tsx +10 -6
  6. package/src/components/atoms/calendar/calendar.preview.tsx +4 -3
  7. package/src/components/molecules/amount/amount.component.tsx +5 -4
  8. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +4 -4
  9. package/src/components/molecules/calendar-select/calendar-select.component.tsx +17 -16
  10. package/src/components/molecules/calendar-select/calendar-select.preview.tsx +16 -5
  11. package/src/components/molecules/date-input/date-input.component.d.ts +2 -2
  12. package/src/components/molecules/date-input/date-input.component.tsx +3 -3
  13. package/src/components/molecules/date-input/date-input.preview.tsx +5 -5
  14. package/src/components/molecules/day/day.component.d.ts +3 -3
  15. package/src/components/molecules/day/day.component.tsx +22 -17
  16. package/src/components/molecules/selectable-list-item/selectable-list-item.component.tsx +12 -7
  17. package/src/components/molecules/timestamp/timestamp.component.d.ts +2 -2
  18. package/src/components/molecules/timestamp/timestamp.component.tsx +12 -5
  19. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +2 -2
  20. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +5 -5
  21. package/src/components/organisms/journal-entry/journal-entry.component.d.ts +3 -3
  22. package/src/components/organisms/journal-entry/journal-entry.component.tsx +7 -3
  23. package/src/components/organisms/journal-entry/journal-entry.preview.tsx +7 -3
  24. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +2 -2
  25. package/src/components/organisms/text-bubble/text-bubble.component.tsx +6 -3
  26. package/src/components/organisms/text-bubble/text-bubble.preview.tsx +19 -7
  27. package/src/components/templates/popover-action/popover-action.component.tsx +9 -8
  28. package/src/icons/solid/cloud-download/cloud-download.icon.tsx +1 -1
  29. package/src/icons/solid/refresh/refresh-solid.icon.tsx +2 -2
  30. package/src/utilities/datetime/clock.class.tsx +14 -0
  31. package/src/utilities/datetime/dateonly.class.tsx +287 -0
  32. package/src/utilities/datetime/datetime.class.tsx +288 -0
  33. package/src/utilities/datetime/day.class.tsx +48 -0
  34. package/src/utilities/datetime/dayjs-config.ts +96 -0
  35. package/src/utilities/datetime/dayoftheweek.class.tsx +242 -0
  36. package/src/utilities/datetime/hour.class.tsx +60 -0
  37. package/src/utilities/datetime/locale.tsx +6 -0
  38. package/src/utilities/datetime/millisecond.class.tsx +48 -0
  39. package/src/utilities/datetime/minute.class.tsx +55 -0
  40. package/src/utilities/datetime/month.class.tsx +74 -0
  41. package/src/utilities/datetime/second.class.tsx +52 -0
  42. package/src/utilities/datetime/time.class.tsx +190 -0
  43. package/src/utilities/datetime/timezone.class.tsx +36 -0
  44. package/src/utilities/datetime/year.class.tsx +78 -0
  45. package/src/utilities/datetime/yearandmonth.class.tsx +80 -0
  46. package/src/components/atoms/background-gradient/__snapshots__/background-gradient.test.js.snap +0 -40
  47. package/src/components/atoms/background-gradient/background-gradient.test.js +0 -10
  48. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +0 -6817
  49. package/src/components/atoms/calendar/calendar.test.js +0 -35
  50. package/src/components/atoms/check-switch/__snapshots__/check-switch.test.js.snap +0 -84
  51. package/src/components/atoms/check-switch/check-switch.test.js +0 -13
  52. package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +0 -113
  53. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.test.js +0 -44
  54. package/src/components/atoms/heading-components/heading1/__snapshots__/heading1.test.js.snap +0 -121
  55. package/src/components/atoms/heading-components/heading1/heading1.test.js +0 -51
  56. package/src/components/atoms/heading-components/heading2/__snapshots__/heading2.test.js.snap +0 -121
  57. package/src/components/atoms/heading-components/heading2/heading2.test.js +0 -51
  58. package/src/components/atoms/heading-components/heading3/__snapshots__/heading3.test.js.snap +0 -121
  59. package/src/components/atoms/heading-components/heading3/heading3.test.js +0 -51
  60. package/src/components/atoms/heading-components/heading4/__snapshots__/heading4.test.js.snap +0 -121
  61. package/src/components/atoms/heading-components/heading4/heading4.test.js +0 -51
  62. package/src/components/atoms/image-bubble/__snapshots__/image-bubble.test.js.snap +0 -67
  63. package/src/components/atoms/image-bubble/image-bubble.test.js +0 -20
  64. package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -269
  65. package/src/components/atoms/increment-input/increment-input.test.js +0 -14
  66. package/src/components/atoms/logo/__snapshots__/logo.test.js.snap +0 -113
  67. package/src/components/atoms/logo/logo.test.js +0 -16
  68. package/src/components/atoms/paragraph-components/paragraph/__snapshots__/paragraph.test.js.snap +0 -121
  69. package/src/components/atoms/paragraph-components/paragraph/paragraph.test.js +0 -76
  70. package/src/components/atoms/paragraph-components/small-text/__snapshots__/small-text.test.js.snap +0 -121
  71. package/src/components/atoms/paragraph-components/small-text/small-text.test.js +0 -76
  72. package/src/components/atoms/paragraph-components/tiny-text/__snapshots__/tiny-text.test.js.snap +0 -121
  73. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.test.js +0 -76
  74. package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +0 -143
  75. package/src/components/atoms/quick-message/quick-message.test.js +0 -58
  76. package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +0 -333
  77. package/src/components/atoms/split-container/split-container.test.js +0 -45
  78. package/src/components/atoms/text-input/__snapshots__/text-input.test.js.snap +0 -123
  79. package/src/components/atoms/text-input/text-input.test.js +0 -59
  80. package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +0 -97
  81. package/src/components/molecules/avatar/avatar.test.js +0 -22
  82. package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +0 -107
  83. package/src/components/molecules/blocked-message/blocked-message.test.js +0 -12
  84. package/src/components/molecules/button/__snapshots__/button.test.js.snap +0 -652
  85. package/src/components/molecules/button/button.test.js +0 -56
  86. package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +0 -343
  87. package/src/components/molecules/calendar-select/calendar-select.test.js +0 -20
  88. package/src/components/molecules/cancel-link/__snapshots__/cancel-link.test.js.snap +0 -139
  89. package/src/components/molecules/cancel-link/cancel-link.test.js +0 -28
  90. package/src/components/molecules/checkbox/__snapshots__/checkbox.test.js.snap +0 -176
  91. package/src/components/molecules/checkbox/checkbox.test.js +0 -30
  92. package/src/components/molecules/contact-address/__snapshots__/contact-address.test.js.snap +0 -113
  93. package/src/components/molecules/contact-address/contact-address.test.js +0 -18
  94. package/src/components/molecules/contact-role/__snapshots__/contact-role.test.js.snap +0 -113
  95. package/src/components/molecules/contact-role/contact-role.test.js +0 -18
  96. package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +0 -140
  97. package/src/components/molecules/date-input/date-input.test.js +0 -23
  98. package/src/components/molecules/day/__snapshots__/day.test.js.snap +0 -263
  99. package/src/components/molecules/day/day.test.js +0 -37
  100. package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +0 -140
  101. package/src/components/molecules/default-select/default-select.test.js +0 -17
  102. package/src/components/molecules/department_logo/__snapshots__/department-logo.test.js.snap +0 -27
  103. package/src/components/molecules/department_logo/department-logo.test.js +0 -12
  104. package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +0 -386
  105. package/src/components/molecules/failed-to-send/failed-bubble.test.js +0 -75
  106. package/src/components/molecules/filter-range/__snapshots__/filter-range.test.js.snap +0 -208
  107. package/src/components/molecules/filter-range/filter-range.test.js +0 -20
  108. package/src/components/molecules/filter-tab/__snapshots__/filter-tab.test.js.snap +0 -536
  109. package/src/components/molecules/filter-tab/filter-tab.test.js +0 -42
  110. package/src/components/molecules/info/__snapshots__/info.test.js.snap +0 -64
  111. package/src/components/molecules/info/info.test.js +0 -18
  112. package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +0 -129
  113. package/src/components/molecules/language-button/language-button.test.js +0 -29
  114. package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +0 -611
  115. package/src/components/molecules/message-input/message-input.test.js +0 -63
  116. package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +0 -133
  117. package/src/components/molecules/more-info-button/more-info-button.test.js +0 -29
  118. package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +0 -504
  119. package/src/components/molecules/password-input/password-input.test.js +0 -46
  120. package/src/components/molecules/pill/__snapshots__/pill.test.js.snap +0 -226
  121. package/src/components/molecules/pill/pill.test.js +0 -42
  122. package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +0 -460
  123. package/src/components/molecules/pressable-icon/pressable-icon.test.js +0 -51
  124. package/src/components/molecules/quick-filter/__snapshots__/quick-filter.test.js.snap +0 -557
  125. package/src/components/molecules/quick-filter/quick-filter.test.js +0 -134
  126. package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +0 -145
  127. package/src/components/molecules/search-input/search.test.js +0 -22
  128. package/src/components/molecules/select-link/__snapshots__/select-link.test.js.snap +0 -70
  129. package/src/components/molecules/select-link/select-link.test.js +0 -17
  130. package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +0 -762
  131. package/src/components/molecules/select-list-item/select-list-item.test.js +0 -38
  132. package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +0 -407
  133. package/src/components/molecules/select-picker/select-picker.test.js +0 -31
  134. package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +0 -1979
  135. package/src/components/molecules/send-bubble/send-text-bubble.test.js +0 -156
  136. package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +0 -557
  137. package/src/components/molecules/snackbar/snackbar.test.js +0 -35
  138. package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +0 -340
  139. package/src/components/molecules/swipe/swipe.test.js +0 -46
  140. package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +0 -139
  141. package/src/components/molecules/tag/tag.test.js +0 -34
  142. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +0 -2221
  143. package/src/components/molecules/time-picker/time-picker.test.js +0 -18
  144. package/src/components/molecules/time-tracker/__snapshots__/time-tracker.test.js.snap +0 -266
  145. package/src/components/molecules/time-tracker/time-tracker.test.js +0 -36
  146. package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +0 -257
  147. package/src/components/molecules/timeline/timeline.test.js +0 -18
  148. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +0 -28
  149. package/src/components/molecules/timestamp/timestamp.test.js +0 -16
  150. package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +0 -173
  151. package/src/components/molecules/wave-background/wave.test.js +0 -25
  152. package/src/components/molecules/wide-button/__snapshots__/wide-button.test.js.snap +0 -269
  153. package/src/components/molecules/wide-button/wide-button.test.js +0 -30
  154. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +0 -1040
  155. package/src/components/organisms/child-list-item/child-list-item.test.js +0 -75
  156. package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +0 -404
  157. package/src/components/organisms/contact-item/contact-item.test.js +0 -22
  158. package/src/components/organisms/loading-indicator/__snapshots__/loading-indicator.test.js.snap +0 -474
  159. package/src/components/organisms/loading-indicator/loading-indicator.test.js +0 -41
  160. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +0 -293
  161. package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +0 -23
  162. package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +0 -709
  163. package/src/components/organisms/person-info-card/person-info-card.test.js +0 -85
  164. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +0 -3046
  165. package/src/components/organisms/text-bubble/text-bubble.test.js +0 -144
  166. package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +0 -22
  167. package/src/utilities/toddle-datetime/interfaces/duration.interface.tsx +0 -23
  168. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +0 -22
  169. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +0 -25
  170. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +0 -50
  171. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +0 -206
  172. package/src/utilities/toddle-datetime/toddle-datetime.preview.d.ts +0 -2
  173. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +0 -160
  174. package/src/utilities/toddle-datetime/toddle-datetime.test.js +0 -127
  175. package/src/utilities/toddle-datetime/types/duration.type.d.ts +0 -4
  176. package/src/utilities/toddle-datetime/types/duration.type.tsx +0 -6
  177. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +0 -5
  178. package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +0 -23
@@ -1,386 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Failed text bubble test shows a failed to send text bubble that is swipeable with refresh and trash icon, which if we press them we can resend or delete the message 1`] = `
4
- <View
5
- style={
6
- {
7
- "flexDirection": "row",
8
- "gap": 12,
9
- }
10
- }
11
- >
12
- <View
13
- style={
14
- {
15
- "justifyContent": "center",
16
- "padding": 2,
17
- }
18
- }
19
- >
20
- <RNSVGSvgView
21
- align="xMidYMid"
22
- bbHeight="26"
23
- bbWidth="26"
24
- fill="none"
25
- focusable={false}
26
- height={26}
27
- meetOrSlice={0}
28
- minX={0}
29
- minY={0}
30
- style={
31
- [
32
- {
33
- "backgroundColor": "transparent",
34
- "borderWidth": 0,
35
- },
36
- {
37
- "flex": 0,
38
- "height": 26,
39
- "width": 26,
40
- },
41
- ]
42
- }
43
- vbHeight={23}
44
- vbWidth={22}
45
- width={26}
46
- >
47
- <RNSVGGroup
48
- fill={null}
49
- propList={
50
- [
51
- "fill",
52
- ]
53
- }
54
- >
55
- <RNSVGPath
56
- d="M11 7V11.5M11 16H11.0108M20.75 11.5C20.75 17.0919 16.3848 21.625 11 21.625C5.61522 21.625 1.25 17.0919 1.25 11.5C1.25 5.90812 5.61522 1.375 11 1.375C16.3848 1.375 20.75 5.90812 20.75 11.5Z"
57
- fill={
58
- {
59
- "payload": 4278190080,
60
- "type": 0,
61
- }
62
- }
63
- propList={
64
- [
65
- "stroke",
66
- "strokeWidth",
67
- "strokeLinecap",
68
- "strokeLinejoin",
69
- ]
70
- }
71
- stroke={
72
- {
73
- "payload": 4294010984,
74
- "type": 0,
75
- }
76
- }
77
- strokeLinecap={1}
78
- strokeLinejoin={1}
79
- strokeWidth="2"
80
- />
81
- </RNSVGGroup>
82
- </RNSVGSvgView>
83
- </View>
84
- <View
85
- style={
86
- {
87
- "backgroundColor": "#F16868",
88
- "borderBottomLeftRadius": 8,
89
- "borderBottomRightRadius": 32,
90
- "borderTopLeftRadius": 24,
91
- "borderTopRightRadius": 24,
92
- "flex": 1,
93
- "justifyContent": "center",
94
- "paddingBottom": 16,
95
- "paddingLeft": 24,
96
- "paddingRight": 24,
97
- "paddingTop": 16,
98
- }
99
- }
100
- >
101
- <View
102
- collapsable={false}
103
- handlerTag={1}
104
- handlerType="PanGestureHandler"
105
- onGestureHandlerEvent={[Function]}
106
- onGestureHandlerStateChange={[Function]}
107
- onLayout={[Function]}
108
- style={
109
- {
110
- "overflow": "hidden",
111
- }
112
- }
113
- >
114
- <View
115
- collapsable={false}
116
- style={
117
- {
118
- "bottom": 0,
119
- "flexDirection": "row-reverse",
120
- "left": 0,
121
- "position": "absolute",
122
- "right": 0,
123
- "top": 0,
124
- "transform": [
125
- {
126
- "translateX": -10000,
127
- },
128
- ],
129
- }
130
- }
131
- >
132
- <View
133
- style={
134
- {
135
- "alignItems": "center",
136
- "flex": 1,
137
- "flexDirection": "row",
138
- "justifyContent": "space-evenly",
139
- }
140
- }
141
- >
142
- <View
143
- collapsable={false}
144
- style={
145
- {
146
- "alignItems": "center",
147
- "justifyContent": "center",
148
- "opacity": 0,
149
- }
150
- }
151
- >
152
- <View
153
- accessibilityState={
154
- {
155
- "busy": undefined,
156
- "checked": undefined,
157
- "disabled": undefined,
158
- "expanded": undefined,
159
- "selected": undefined,
160
- }
161
- }
162
- accessibilityValue={
163
- {
164
- "max": undefined,
165
- "min": undefined,
166
- "now": undefined,
167
- "text": undefined,
168
- }
169
- }
170
- accessible={true}
171
- collapsable={false}
172
- focusable={true}
173
- onBlur={[Function]}
174
- onClick={[Function]}
175
- onFocus={[Function]}
176
- onResponderGrant={[Function]}
177
- onResponderMove={[Function]}
178
- onResponderRelease={[Function]}
179
- onResponderTerminate={[Function]}
180
- onResponderTerminationRequest={[Function]}
181
- onStartShouldSetResponder={[Function]}
182
- testID="refresh-button"
183
- >
184
- <RNSVGSvgView
185
- align="xMidYMid"
186
- bbHeight="24"
187
- bbWidth="24"
188
- fill="none"
189
- focusable={false}
190
- height={24}
191
- meetOrSlice={0}
192
- minX={0}
193
- minY={0}
194
- style={
195
- [
196
- {
197
- "backgroundColor": "transparent",
198
- "borderWidth": 0,
199
- },
200
- {
201
- "flex": 0,
202
- "height": 24,
203
- "width": 24,
204
- },
205
- ]
206
- }
207
- vbHeight={18}
208
- vbWidth={16}
209
- width={24}
210
- >
211
- <RNSVGGroup
212
- fill={null}
213
- propList={
214
- [
215
- "fill",
216
- ]
217
- }
218
- >
219
- <RNSVGPath
220
- d="M1.40005 0.200012C2.00756 0.200012 2.50005 0.692499 2.50005 1.30001V3.61139C3.89715 2.18539 5.84462 1.30001 8.00005 1.30001C11.3544 1.30001 14.2051 3.44426 15.2616 6.43344C15.4641 7.00623 15.1639 7.63468 14.5911 7.83714C14.0183 8.03959 13.3898 7.73937 13.1874 7.16658C12.4318 5.02891 10.3931 3.50001 8.00005 3.50001C6.20162 3.50001 4.60329 4.36353 3.59934 5.70001H6.90005C7.50756 5.70001 8.00005 6.1925 8.00005 6.80001C8.00005 7.40752 7.50756 7.90001 6.90005 7.90001H1.40005C0.792536 7.90001 0.300049 7.40752 0.300049 6.80001V1.30001C0.300049 0.692499 0.792536 0.200012 1.40005 0.200012ZM1.40903 10.1629C1.98182 9.96044 2.61027 10.2607 2.81273 10.8334C3.56828 12.9711 5.60703 14.5 8.00005 14.5C9.79847 14.5 11.3968 13.6365 12.4008 12.3L9.10005 12.3C8.49254 12.3 8.00005 11.8075 8.00005 11.2C8.00005 10.5925 8.49254 10.1 9.10005 10.1H14.6C14.8918 10.1 15.1716 10.2159 15.3779 10.4222C15.5842 10.6285 15.7 10.9083 15.7 11.2V16.7C15.7 17.3075 15.2076 17.8 14.6 17.8C13.9925 17.8 13.5 17.3075 13.5 16.7V14.3886C12.1029 15.8146 10.1555 16.7 8.00005 16.7C4.6457 16.7 1.795 14.5558 0.738478 11.5666C0.536026 10.9938 0.836243 10.3653 1.40903 10.1629Z"
221
- fill={
222
- {
223
- "payload": 4294695385,
224
- "type": 0,
225
- }
226
- }
227
- propList={
228
- [
229
- "fill",
230
- ]
231
- }
232
- />
233
- </RNSVGGroup>
234
- </RNSVGSvgView>
235
- </View>
236
- </View>
237
- <View
238
- collapsable={false}
239
- style={
240
- {
241
- "alignItems": "center",
242
- "justifyContent": "center",
243
- "opacity": 0,
244
- }
245
- }
246
- >
247
- <View
248
- accessibilityState={
249
- {
250
- "busy": undefined,
251
- "checked": undefined,
252
- "disabled": undefined,
253
- "expanded": undefined,
254
- "selected": undefined,
255
- }
256
- }
257
- accessibilityValue={
258
- {
259
- "max": undefined,
260
- "min": undefined,
261
- "now": undefined,
262
- "text": undefined,
263
- }
264
- }
265
- accessible={true}
266
- collapsable={false}
267
- focusable={true}
268
- onBlur={[Function]}
269
- onClick={[Function]}
270
- onFocus={[Function]}
271
- onResponderGrant={[Function]}
272
- onResponderMove={[Function]}
273
- onResponderRelease={[Function]}
274
- onResponderTerminate={[Function]}
275
- onResponderTerminationRequest={[Function]}
276
- onStartShouldSetResponder={[Function]}
277
- testID="delete-button"
278
- >
279
- <RNSVGSvgView
280
- align="xMidYMid"
281
- bbHeight="24"
282
- bbWidth="24"
283
- fill="none"
284
- focusable={false}
285
- height={24}
286
- meetOrSlice={0}
287
- minX={0}
288
- minY={0}
289
- style={
290
- [
291
- {
292
- "backgroundColor": "transparent",
293
- "borderWidth": 0,
294
- },
295
- {
296
- "flex": 0,
297
- "height": 24,
298
- "width": 24,
299
- },
300
- ]
301
- }
302
- vbHeight={18}
303
- vbWidth={17}
304
- width={24}
305
- >
306
- <RNSVGGroup
307
- fill={null}
308
- propList={
309
- [
310
- "fill",
311
- ]
312
- }
313
- >
314
- <RNSVGPath
315
- clipRule={0}
316
- d="M7.34995 0.200012C6.91436 0.200012 6.51616 0.435415 6.32136 0.808077L5.48921 2.40001H1.59995C0.964824 2.40001 0.449951 2.8925 0.449951 3.50001C0.449951 4.10753 0.964824 4.60001 1.59995 4.60001L1.59995 15.6C1.59995 16.815 2.6297 17.8 3.89995 17.8H13.1C14.3702 17.8 15.4 16.815 15.4 15.6V4.60001C16.0351 4.60001 16.55 4.10753 16.55 3.50001C16.55 2.8925 16.0351 2.40001 15.4 2.40001H11.5107L10.6785 0.808077C10.4837 0.435415 10.0855 0.200012 9.64995 0.200012H7.34995ZM5.04995 6.80001C5.04995 6.1925 5.56482 5.70001 6.19995 5.70001C6.83508 5.70001 7.34995 6.1925 7.34995 6.80001V13.4C7.34995 14.0075 6.83508 14.5 6.19995 14.5C5.56482 14.5 5.04995 14.0075 5.04995 13.4V6.80001ZM10.8 5.70001C10.1648 5.70001 9.64995 6.1925 9.64995 6.80001V13.4C9.64995 14.0075 10.1648 14.5 10.8 14.5C11.4351 14.5 11.95 14.0075 11.95 13.4V6.80001C11.95 6.1925 11.4351 5.70001 10.8 5.70001Z"
317
- fill={
318
- {
319
- "payload": 4294695385,
320
- "type": 0,
321
- }
322
- }
323
- fillRule={0}
324
- propList={
325
- [
326
- "fill",
327
- "fillRule",
328
- ]
329
- }
330
- />
331
- </RNSVGGroup>
332
- </RNSVGSvgView>
333
- </View>
334
- </View>
335
- </View>
336
- <View
337
- onLayout={[Function]}
338
- />
339
- </View>
340
- <View
341
- collapsable={false}
342
- handlerTag={2}
343
- handlerType="TapGestureHandler"
344
- onGestureHandlerEvent={[Function]}
345
- onGestureHandlerStateChange={[Function]}
346
- pointerEvents="auto"
347
- style={
348
- {
349
- "transform": [
350
- {
351
- "translateX": -0,
352
- },
353
- ],
354
- }
355
- }
356
- >
357
- <Text
358
- style={
359
- [
360
- [
361
- {
362
- "fontFamily": "Montserrat",
363
- "fontSize": 13,
364
- "lineHeight": 20.4,
365
- },
366
- ],
367
- {
368
- "color": "#FFFFFF",
369
- "textAlign": undefined,
370
- "width": "100%",
371
- },
372
- {
373
- "backgroundColor": "#F16868",
374
- "minHeight": 30,
375
- "textAlignVertical": "center",
376
- },
377
- ]
378
- }
379
- >
380
- Testing our failed bubble
381
- </Text>
382
- </View>
383
- </View>
384
- </View>
385
- </View>
386
- `;
@@ -1,75 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {FailedTextBubble} from './failed-bubble.component';
4
- import {render, fireEvent} from '@testing-library/react-native';
5
-
6
- describe('Failed text bubble test', () => {
7
- it('shows a failed to send text bubble that is swipeable with refresh and trash icon, which if we press them we can resend or delete the message', () => {
8
- const tree = renderer
9
- .create(
10
- <FailedTextBubble
11
- id={'1'}
12
- text={'Testing our failed bubble'}
13
- onPressRefresh={() => alert('pressed resend')}
14
- onPressDelete={() => alert('delete the message')}
15
- />
16
- )
17
- .toJSON();
18
-
19
- expect(tree).toMatchSnapshot();
20
- });
21
- });
22
-
23
- describe('FailedTextBubble', () => {
24
- const mockId = '123';
25
- const mockText = 'Failed message';
26
- const mockOnPressRefresh = jest.fn();
27
- const mockOnPressDelete = jest.fn();
28
-
29
- afterEach(() => {
30
- jest.clearAllMocks();
31
- });
32
-
33
- it('should render the component correctly', () => {
34
- const {getByText} = render(
35
- <FailedTextBubble
36
- id={mockId}
37
- text={mockText}
38
- onPressRefresh={mockOnPressRefresh}
39
- onPressDelete={mockOnPressDelete}
40
- />
41
- );
42
-
43
- expect(getByText(mockText)).toBeDefined();
44
- });
45
-
46
- it('should call onPressRefresh when the refresh button is pressed', () => {
47
- const {getByTestId} = render(
48
- <FailedTextBubble
49
- id={mockId}
50
- text={mockText}
51
- onPressRefresh={mockOnPressRefresh}
52
- onPressDelete={mockOnPressDelete}
53
- />
54
- );
55
-
56
- fireEvent.press(getByTestId('refresh-button'));
57
-
58
- expect(mockOnPressRefresh).toHaveBeenCalledWith(mockId);
59
- });
60
-
61
- it('should call onPressDelete when the delete button is pressed', () => {
62
- const {getByTestId} = render(
63
- <FailedTextBubble
64
- id={mockId}
65
- text={mockText}
66
- onPressRefresh={mockOnPressRefresh}
67
- onPressDelete={mockOnPressDelete}
68
- />
69
- );
70
-
71
- fireEvent.press(getByTestId('delete-button'));
72
-
73
- expect(mockOnPressDelete).toHaveBeenCalledWith(mockId);
74
- });
75
- });
@@ -1,208 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Filter range test renders a filter range slider 1`] = `
4
- <View
5
- style={
6
- {
7
- "width": "100%",
8
- }
9
- }
10
- >
11
- <View
12
- animateTransitions={true}
13
- animationType="timing"
14
- onLayout={[Function]}
15
- onValueChange={[Function]}
16
- style={
17
- [
18
- {
19
- "height": 40,
20
- "justifyContent": "center",
21
- },
22
- {},
23
- {
24
- "marginLeft": 4,
25
- "marginRight": 4,
26
- },
27
- ]
28
- }
29
- trackClickable={true}
30
- trackMarks={[]}
31
- value={
32
- [
33
- 0,
34
- 100,
35
- ]
36
- }
37
- >
38
- <View
39
- onLayout={[Function]}
40
- renderToHardwareTextureAndroid={true}
41
- style={
42
- [
43
- {
44
- "borderRadius": 2,
45
- "height": 4,
46
- },
47
- {
48
- "backgroundColor": "#E5E8EB",
49
- },
50
- {
51
- "borderRadius": 50,
52
- "height": 8,
53
- },
54
- undefined,
55
- ]
56
- }
57
- />
58
- <View
59
- collapsable={false}
60
- renderToHardwareTextureAndroid={true}
61
- style={
62
- {
63
- "backgroundColor": "#647ACB",
64
- "borderRadius": 50,
65
- "height": 8,
66
- "left": 0,
67
- "opacity": 0,
68
- "position": "absolute",
69
- "width": 0,
70
- }
71
- }
72
- />
73
- <View
74
- collapsable={false}
75
- onLayout={[Function]}
76
- style={
77
- {
78
- "backgroundColor": "#7B93DB",
79
- "borderRadius": 10,
80
- "height": 16,
81
- "opacity": 0,
82
- "position": "absolute",
83
- "transform": [
84
- {
85
- "translateX": 0,
86
- },
87
- {
88
- "translateY": 0,
89
- },
90
- ],
91
- "width": 16,
92
- }
93
- }
94
- />
95
- <View
96
- collapsable={false}
97
- onLayout={[Function]}
98
- style={
99
- {
100
- "backgroundColor": "#7B93DB",
101
- "borderRadius": 10,
102
- "height": 16,
103
- "opacity": 0,
104
- "position": "absolute",
105
- "transform": [
106
- {
107
- "translateX": 0,
108
- },
109
- {
110
- "translateY": 0,
111
- },
112
- ],
113
- "width": 16,
114
- }
115
- }
116
- />
117
- <View
118
- onMoveShouldSetResponder={[Function]}
119
- onMoveShouldSetResponderCapture={[Function]}
120
- onResponderEnd={[Function]}
121
- onResponderGrant={[Function]}
122
- onResponderMove={[Function]}
123
- onResponderReject={[Function]}
124
- onResponderRelease={[Function]}
125
- onResponderStart={[Function]}
126
- onResponderTerminate={[Function]}
127
- onResponderTerminationRequest={[Function]}
128
- onStartShouldSetResponder={[Function]}
129
- onStartShouldSetResponderCapture={[Function]}
130
- style={
131
- [
132
- {
133
- "backgroundColor": "transparent",
134
- "bottom": 0,
135
- "left": 0,
136
- "position": "absolute",
137
- "right": 0,
138
- "top": 0,
139
- },
140
- {
141
- "marginBottom": -20,
142
- "marginLeft": -20,
143
- "marginRight": -20,
144
- "marginTop": -20,
145
- },
146
- ]
147
- }
148
- />
149
- </View>
150
- <View
151
- style={
152
- {
153
- "flexDirection": "row",
154
- "justifyContent": "space-between",
155
- }
156
- }
157
- >
158
- <View>
159
- <Text
160
- style={
161
- [
162
- [
163
- {
164
- "fontFamily": "Montserrat",
165
- "fontSize": 13,
166
- "lineHeight": 20.4,
167
- },
168
- ],
169
- {
170
- "color": "#1F2933",
171
- "textAlign": "center",
172
- "width": "100%",
173
- },
174
- undefined,
175
- ]
176
- }
177
- >
178
-
179
- 0
180
- </Text>
181
- </View>
182
- <View>
183
- <Text
184
- style={
185
- [
186
- [
187
- {
188
- "fontFamily": "Montserrat",
189
- "fontSize": 13,
190
- "lineHeight": 20.4,
191
- },
192
- ],
193
- {
194
- "color": "#1F2933",
195
- "textAlign": "center",
196
- "width": "100%",
197
- },
198
- undefined,
199
- ]
200
- }
201
- >
202
-
203
- 100
204
- </Text>
205
- </View>
206
- </View>
207
- </View>
208
- `;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import render from 'react-test-renderer';
3
- import {FilterRange} from './filter-range.component';
4
-
5
- describe('Filter range test', () => {
6
- it('renders a filter range slider', function () {
7
- const tree = render
8
- .create(
9
- <FilterRange
10
- value={[0, 100]}
11
- minValue={0}
12
- maxValue={100}
13
- prefix={'€'}
14
- onChange={() => console.log('value change')}
15
- />
16
- )
17
- .toJSON();
18
- expect(tree).toMatchSnapshot();
19
- });
20
- });