@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,611 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Message Input test render a message text input component with placeholder 1`] = `
4
- <View
5
- style={
6
- {
7
- "alignItems": "flex-end",
8
- "backgroundColor": "#FFFFFF",
9
- "borderColor": "#E5E8EB",
10
- "borderRadius": 8,
11
- "borderStyle": "solid",
12
- "borderWidth": 1,
13
- "flexDirection": "row",
14
- "paddingRight": 4,
15
- "width": "100%",
16
- }
17
- }
18
- >
19
- <TextInput
20
- keyboardType="default"
21
- multiline={true}
22
- onChangeText={[Function]}
23
- placeholder="Placeholder"
24
- placeholderTextColor="#9AA5B1"
25
- style={
26
- {
27
- "color": "#1F2933",
28
- "flex": 1,
29
- "fontFamily": "SourceSansPro",
30
- "fontSize": 16,
31
- "height": "100%",
32
- "justifyContent": "center",
33
- "lineHeight": 20,
34
- "maxHeight": 100,
35
- "paddingBottom": 10,
36
- "paddingLeft": 16,
37
- "paddingRight": 8,
38
- "paddingTop": 10,
39
- }
40
- }
41
- value="text value"
42
- />
43
- <View
44
- accessibilityState={
45
- {
46
- "busy": undefined,
47
- "checked": undefined,
48
- "disabled": undefined,
49
- "expanded": undefined,
50
- "selected": undefined,
51
- }
52
- }
53
- accessibilityValue={
54
- {
55
- "max": undefined,
56
- "min": undefined,
57
- "now": undefined,
58
- "text": undefined,
59
- }
60
- }
61
- accessible={true}
62
- collapsable={false}
63
- focusable={true}
64
- onBlur={[Function]}
65
- onClick={[Function]}
66
- onFocus={[Function]}
67
- onResponderGrant={[Function]}
68
- onResponderMove={[Function]}
69
- onResponderRelease={[Function]}
70
- onResponderTerminate={[Function]}
71
- onResponderTerminationRequest={[Function]}
72
- onStartShouldSetResponder={[Function]}
73
- style={
74
- {
75
- "alignItems": "center",
76
- "justifyContent": "center",
77
- "minHeight": 42,
78
- "minWidth": 42,
79
- }
80
- }
81
- >
82
- <RNSVGSvgView
83
- align="xMidYMid"
84
- bbHeight="24"
85
- bbWidth="24"
86
- fill="none"
87
- focusable={false}
88
- height={24}
89
- meetOrSlice={0}
90
- minX={0}
91
- minY={0}
92
- style={
93
- [
94
- {
95
- "backgroundColor": "transparent",
96
- "borderWidth": 0,
97
- },
98
- {
99
- "transform": [
100
- {
101
- "rotate": "90deg",
102
- },
103
- ],
104
- },
105
- {
106
- "flex": 0,
107
- "height": 24,
108
- "width": 24,
109
- },
110
- ]
111
- }
112
- vbHeight={22}
113
- vbWidth={23}
114
- width={24}
115
- >
116
- <RNSVGGroup
117
- fill={null}
118
- propList={
119
- [
120
- "fill",
121
- ]
122
- }
123
- >
124
- <RNSVGPath
125
- d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
126
- fill={
127
- {
128
- "payload": 4278190080,
129
- "type": 0,
130
- }
131
- }
132
- propList={
133
- [
134
- "stroke",
135
- "strokeWidth",
136
- "strokeLinecap",
137
- "strokeLinejoin",
138
- ]
139
- }
140
- stroke={
141
- {
142
- "payload": 4280232243,
143
- "type": 0,
144
- }
145
- }
146
- strokeLinecap={1}
147
- strokeLinejoin={1}
148
- strokeWidth="2"
149
- />
150
- </RNSVGGroup>
151
- </RNSVGSvgView>
152
- </View>
153
- </View>
154
- `;
155
-
156
- exports[`Message Input test render a message text input component with placeholder and keyboard type 1`] = `
157
- <View
158
- style={
159
- {
160
- "alignItems": "flex-end",
161
- "backgroundColor": "#FFFFFF",
162
- "borderColor": "#E5E8EB",
163
- "borderRadius": 8,
164
- "borderStyle": "solid",
165
- "borderWidth": 1,
166
- "flexDirection": "row",
167
- "paddingRight": 4,
168
- "width": "100%",
169
- }
170
- }
171
- >
172
- <TextInput
173
- keyboardType="email-address"
174
- multiline={true}
175
- onChangeText={[Function]}
176
- placeholder="Placeholder"
177
- placeholderTextColor="#9AA5B1"
178
- style={
179
- {
180
- "color": "#1F2933",
181
- "flex": 1,
182
- "fontFamily": "SourceSansPro",
183
- "fontSize": 16,
184
- "height": "100%",
185
- "justifyContent": "center",
186
- "lineHeight": 20,
187
- "maxHeight": 100,
188
- "paddingBottom": 10,
189
- "paddingLeft": 16,
190
- "paddingRight": 8,
191
- "paddingTop": 10,
192
- }
193
- }
194
- value="text value"
195
- />
196
- <View
197
- accessibilityState={
198
- {
199
- "busy": undefined,
200
- "checked": undefined,
201
- "disabled": undefined,
202
- "expanded": undefined,
203
- "selected": undefined,
204
- }
205
- }
206
- accessibilityValue={
207
- {
208
- "max": undefined,
209
- "min": undefined,
210
- "now": undefined,
211
- "text": undefined,
212
- }
213
- }
214
- accessible={true}
215
- collapsable={false}
216
- focusable={true}
217
- onBlur={[Function]}
218
- onClick={[Function]}
219
- onFocus={[Function]}
220
- onResponderGrant={[Function]}
221
- onResponderMove={[Function]}
222
- onResponderRelease={[Function]}
223
- onResponderTerminate={[Function]}
224
- onResponderTerminationRequest={[Function]}
225
- onStartShouldSetResponder={[Function]}
226
- style={
227
- {
228
- "alignItems": "center",
229
- "justifyContent": "center",
230
- "minHeight": 42,
231
- "minWidth": 42,
232
- }
233
- }
234
- >
235
- <RNSVGSvgView
236
- align="xMidYMid"
237
- bbHeight="24"
238
- bbWidth="24"
239
- fill="none"
240
- focusable={false}
241
- height={24}
242
- meetOrSlice={0}
243
- minX={0}
244
- minY={0}
245
- style={
246
- [
247
- {
248
- "backgroundColor": "transparent",
249
- "borderWidth": 0,
250
- },
251
- {
252
- "transform": [
253
- {
254
- "rotate": "90deg",
255
- },
256
- ],
257
- },
258
- {
259
- "flex": 0,
260
- "height": 24,
261
- "width": 24,
262
- },
263
- ]
264
- }
265
- vbHeight={22}
266
- vbWidth={23}
267
- width={24}
268
- >
269
- <RNSVGGroup
270
- fill={null}
271
- propList={
272
- [
273
- "fill",
274
- ]
275
- }
276
- >
277
- <RNSVGPath
278
- d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
279
- fill={
280
- {
281
- "payload": 4278190080,
282
- "type": 0,
283
- }
284
- }
285
- propList={
286
- [
287
- "stroke",
288
- "strokeWidth",
289
- "strokeLinecap",
290
- "strokeLinejoin",
291
- ]
292
- }
293
- stroke={
294
- {
295
- "payload": 4280232243,
296
- "type": 0,
297
- }
298
- }
299
- strokeLinecap={1}
300
- strokeLinejoin={1}
301
- strokeWidth="2"
302
- />
303
- </RNSVGGroup>
304
- </RNSVGSvgView>
305
- </View>
306
- </View>
307
- `;
308
-
309
- exports[`Message Input test render a message text input component without placeholder 1`] = `
310
- <View
311
- style={
312
- {
313
- "alignItems": "flex-end",
314
- "backgroundColor": "#FFFFFF",
315
- "borderColor": "#E5E8EB",
316
- "borderRadius": 8,
317
- "borderStyle": "solid",
318
- "borderWidth": 1,
319
- "flexDirection": "row",
320
- "paddingRight": 4,
321
- "width": "100%",
322
- }
323
- }
324
- >
325
- <TextInput
326
- keyboardType="default"
327
- multiline={true}
328
- onChangeText={[Function]}
329
- placeholderTextColor="#9AA5B1"
330
- style={
331
- {
332
- "color": "#1F2933",
333
- "flex": 1,
334
- "fontFamily": "SourceSansPro",
335
- "fontSize": 16,
336
- "height": "100%",
337
- "justifyContent": "center",
338
- "lineHeight": 20,
339
- "maxHeight": 100,
340
- "paddingBottom": 10,
341
- "paddingLeft": 16,
342
- "paddingRight": 8,
343
- "paddingTop": 10,
344
- }
345
- }
346
- value="text value"
347
- />
348
- <View
349
- accessibilityState={
350
- {
351
- "busy": undefined,
352
- "checked": undefined,
353
- "disabled": undefined,
354
- "expanded": undefined,
355
- "selected": undefined,
356
- }
357
- }
358
- accessibilityValue={
359
- {
360
- "max": undefined,
361
- "min": undefined,
362
- "now": undefined,
363
- "text": undefined,
364
- }
365
- }
366
- accessible={true}
367
- collapsable={false}
368
- focusable={true}
369
- onBlur={[Function]}
370
- onClick={[Function]}
371
- onFocus={[Function]}
372
- onResponderGrant={[Function]}
373
- onResponderMove={[Function]}
374
- onResponderRelease={[Function]}
375
- onResponderTerminate={[Function]}
376
- onResponderTerminationRequest={[Function]}
377
- onStartShouldSetResponder={[Function]}
378
- style={
379
- {
380
- "alignItems": "center",
381
- "justifyContent": "center",
382
- "minHeight": 42,
383
- "minWidth": 42,
384
- }
385
- }
386
- >
387
- <RNSVGSvgView
388
- align="xMidYMid"
389
- bbHeight="24"
390
- bbWidth="24"
391
- fill="none"
392
- focusable={false}
393
- height={24}
394
- meetOrSlice={0}
395
- minX={0}
396
- minY={0}
397
- style={
398
- [
399
- {
400
- "backgroundColor": "transparent",
401
- "borderWidth": 0,
402
- },
403
- {
404
- "transform": [
405
- {
406
- "rotate": "90deg",
407
- },
408
- ],
409
- },
410
- {
411
- "flex": 0,
412
- "height": 24,
413
- "width": 24,
414
- },
415
- ]
416
- }
417
- vbHeight={22}
418
- vbWidth={23}
419
- width={24}
420
- >
421
- <RNSVGGroup
422
- fill={null}
423
- propList={
424
- [
425
- "fill",
426
- ]
427
- }
428
- >
429
- <RNSVGPath
430
- d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
431
- fill={
432
- {
433
- "payload": 4278190080,
434
- "type": 0,
435
- }
436
- }
437
- propList={
438
- [
439
- "stroke",
440
- "strokeWidth",
441
- "strokeLinecap",
442
- "strokeLinejoin",
443
- ]
444
- }
445
- stroke={
446
- {
447
- "payload": 4280232243,
448
- "type": 0,
449
- }
450
- }
451
- strokeLinecap={1}
452
- strokeLinejoin={1}
453
- strokeWidth="2"
454
- />
455
- </RNSVGGroup>
456
- </RNSVGSvgView>
457
- </View>
458
- </View>
459
- `;
460
-
461
- exports[`Message Input test render a message text input component without placeholder and with keyboard type 1`] = `
462
- <View
463
- style={
464
- {
465
- "alignItems": "flex-end",
466
- "backgroundColor": "#FFFFFF",
467
- "borderColor": "#E5E8EB",
468
- "borderRadius": 8,
469
- "borderStyle": "solid",
470
- "borderWidth": 1,
471
- "flexDirection": "row",
472
- "paddingRight": 4,
473
- "width": "100%",
474
- }
475
- }
476
- >
477
- <TextInput
478
- keyboardType="email-address"
479
- multiline={true}
480
- onChangeText={[Function]}
481
- placeholderTextColor="#9AA5B1"
482
- style={
483
- {
484
- "color": "#1F2933",
485
- "flex": 1,
486
- "fontFamily": "SourceSansPro",
487
- "fontSize": 16,
488
- "height": "100%",
489
- "justifyContent": "center",
490
- "lineHeight": 20,
491
- "maxHeight": 100,
492
- "paddingBottom": 10,
493
- "paddingLeft": 16,
494
- "paddingRight": 8,
495
- "paddingTop": 10,
496
- }
497
- }
498
- value="text value"
499
- />
500
- <View
501
- accessibilityState={
502
- {
503
- "busy": undefined,
504
- "checked": undefined,
505
- "disabled": undefined,
506
- "expanded": undefined,
507
- "selected": undefined,
508
- }
509
- }
510
- accessibilityValue={
511
- {
512
- "max": undefined,
513
- "min": undefined,
514
- "now": undefined,
515
- "text": undefined,
516
- }
517
- }
518
- accessible={true}
519
- collapsable={false}
520
- focusable={true}
521
- onBlur={[Function]}
522
- onClick={[Function]}
523
- onFocus={[Function]}
524
- onResponderGrant={[Function]}
525
- onResponderMove={[Function]}
526
- onResponderRelease={[Function]}
527
- onResponderTerminate={[Function]}
528
- onResponderTerminationRequest={[Function]}
529
- onStartShouldSetResponder={[Function]}
530
- style={
531
- {
532
- "alignItems": "center",
533
- "justifyContent": "center",
534
- "minHeight": 42,
535
- "minWidth": 42,
536
- }
537
- }
538
- >
539
- <RNSVGSvgView
540
- align="xMidYMid"
541
- bbHeight="24"
542
- bbWidth="24"
543
- fill="none"
544
- focusable={false}
545
- height={24}
546
- meetOrSlice={0}
547
- minX={0}
548
- minY={0}
549
- style={
550
- [
551
- {
552
- "backgroundColor": "transparent",
553
- "borderWidth": 0,
554
- },
555
- {
556
- "transform": [
557
- {
558
- "rotate": "90deg",
559
- },
560
- ],
561
- },
562
- {
563
- "flex": 0,
564
- "height": 24,
565
- "width": 24,
566
- },
567
- ]
568
- }
569
- vbHeight={22}
570
- vbWidth={23}
571
- width={24}
572
- >
573
- <RNSVGGroup
574
- fill={null}
575
- propList={
576
- [
577
- "fill",
578
- ]
579
- }
580
- >
581
- <RNSVGPath
582
- d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
583
- fill={
584
- {
585
- "payload": 4278190080,
586
- "type": 0,
587
- }
588
- }
589
- propList={
590
- [
591
- "stroke",
592
- "strokeWidth",
593
- "strokeLinecap",
594
- "strokeLinejoin",
595
- ]
596
- }
597
- stroke={
598
- {
599
- "payload": 4280232243,
600
- "type": 0,
601
- }
602
- }
603
- strokeLinecap={1}
604
- strokeLinejoin={1}
605
- strokeWidth="2"
606
- />
607
- </RNSVGGroup>
608
- </RNSVGSvgView>
609
- </View>
610
- </View>
611
- `;
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {MessageInput} from './message-input.component';
4
- import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
5
-
6
- describe('Message Input test', () => {
7
- it('render a message text input component without placeholder', () => {
8
- const tree = renderer
9
- .create(
10
- <MessageInput
11
- onChangeText={() => console.log('text changed')}
12
- value={'text value'}
13
- onPressSend={() => console.log('send text')}
14
- />
15
- )
16
- .toJSON();
17
-
18
- expect(tree).toMatchSnapshot();
19
- });
20
- it('render a message text input component with placeholder', () => {
21
- const tree = renderer
22
- .create(
23
- <MessageInput
24
- placeholder={'Placeholder'}
25
- onChangeText={() => console.log('text changed')}
26
- value={'text value'}
27
- onPressSend={() => console.log('send text')}
28
- />
29
- )
30
- .toJSON();
31
-
32
- expect(tree).toMatchSnapshot();
33
- });
34
- it('render a message text input component with placeholder and keyboard type', () => {
35
- const tree = renderer
36
- .create(
37
- <MessageInput
38
- placeholder={'Placeholder'}
39
- onChangeText={() => console.log('text changed')}
40
- value={'text value'}
41
- onPressSend={() => console.log('send text')}
42
- keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
43
- />
44
- )
45
- .toJSON();
46
-
47
- expect(tree).toMatchSnapshot();
48
- });
49
- it('render a message text input component without placeholder and with keyboard type', () => {
50
- const tree = renderer
51
- .create(
52
- <MessageInput
53
- onChangeText={() => console.log('text changed')}
54
- value={'text value'}
55
- onPressSend={() => console.log('send text')}
56
- keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
57
- />
58
- )
59
- .toJSON();
60
-
61
- expect(tree).toMatchSnapshot();
62
- });
63
- });