@tactics/toddle-styleguide 5.3.1 → 5.4.0

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 +61 -28
  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,652 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`test button component should render a button component 1`] = `
4
- <View
5
- accessibilityState={
6
- {
7
- "busy": undefined,
8
- "checked": undefined,
9
- "disabled": undefined,
10
- "expanded": undefined,
11
- "selected": undefined,
12
- }
13
- }
14
- accessibilityValue={
15
- {
16
- "max": undefined,
17
- "min": undefined,
18
- "now": undefined,
19
- "text": undefined,
20
- }
21
- }
22
- accessible={true}
23
- collapsable={false}
24
- focusable={true}
25
- onBlur={[Function]}
26
- onClick={[Function]}
27
- onFocus={[Function]}
28
- onResponderGrant={[Function]}
29
- onResponderMove={[Function]}
30
- onResponderRelease={[Function]}
31
- onResponderTerminate={[Function]}
32
- onResponderTerminationRequest={[Function]}
33
- onStartShouldSetResponder={[Function]}
34
- >
35
- <View
36
- style={
37
- {
38
- "alignItems": "center",
39
- "backgroundColor": "#19216C",
40
- "borderRadius": 50,
41
- "flexDirection": "row",
42
- "justifyContent": "center",
43
- "paddingHorizontal": 24,
44
- "paddingVertical": 12,
45
- }
46
- }
47
- >
48
- <View>
49
- <Text
50
- style={
51
- [
52
- [
53
- {
54
- "fontFamily": "SourceSansPro",
55
- "fontSize": 16,
56
- "lineHeight": 22.4,
57
- },
58
- ],
59
- {
60
- "color": "#E0E8F9",
61
- "textAlign": "center",
62
- "width": "100%",
63
- },
64
- undefined,
65
- ]
66
- }
67
- >
68
- Test button
69
- </Text>
70
- </View>
71
- </View>
72
- </View>
73
- `;
74
-
75
- exports[`test button component should render a button component that is disabled 1`] = `
76
- <View
77
- accessibilityState={
78
- {
79
- "busy": undefined,
80
- "checked": undefined,
81
- "disabled": true,
82
- "expanded": undefined,
83
- "selected": undefined,
84
- }
85
- }
86
- accessibilityValue={
87
- {
88
- "max": undefined,
89
- "min": undefined,
90
- "now": undefined,
91
- "text": undefined,
92
- }
93
- }
94
- accessible={true}
95
- collapsable={false}
96
- focusable={true}
97
- onBlur={[Function]}
98
- onClick={[Function]}
99
- onFocus={[Function]}
100
- onResponderGrant={[Function]}
101
- onResponderMove={[Function]}
102
- onResponderRelease={[Function]}
103
- onResponderTerminate={[Function]}
104
- onResponderTerminationRequest={[Function]}
105
- onStartShouldSetResponder={[Function]}
106
- >
107
- <View
108
- style={
109
- {
110
- "alignItems": "center",
111
- "backgroundColor": "#E5E8EB",
112
- "borderRadius": 50,
113
- "flexDirection": "row",
114
- "justifyContent": "center",
115
- "paddingHorizontal": 24,
116
- "paddingVertical": 12,
117
- }
118
- }
119
- >
120
- <View>
121
- <Text
122
- style={
123
- [
124
- [
125
- {
126
- "fontFamily": "SourceSansPro",
127
- "fontSize": 16,
128
- "lineHeight": 22.4,
129
- },
130
- ],
131
- {
132
- "color": "#515F6C",
133
- "textAlign": "center",
134
- "width": "100%",
135
- },
136
- undefined,
137
- ]
138
- }
139
- >
140
- Button without icon
141
- </Text>
142
- </View>
143
- </View>
144
- </View>
145
- `;
146
-
147
- exports[`test button component should render a button component with a clock icon, since regular is the default the icon will be outlined 1`] = `
148
- <View
149
- accessibilityState={
150
- {
151
- "busy": undefined,
152
- "checked": undefined,
153
- "disabled": undefined,
154
- "expanded": undefined,
155
- "selected": undefined,
156
- }
157
- }
158
- accessibilityValue={
159
- {
160
- "max": undefined,
161
- "min": undefined,
162
- "now": undefined,
163
- "text": undefined,
164
- }
165
- }
166
- accessible={true}
167
- collapsable={false}
168
- focusable={true}
169
- onBlur={[Function]}
170
- onClick={[Function]}
171
- onFocus={[Function]}
172
- onResponderGrant={[Function]}
173
- onResponderMove={[Function]}
174
- onResponderRelease={[Function]}
175
- onResponderTerminate={[Function]}
176
- onResponderTerminationRequest={[Function]}
177
- onStartShouldSetResponder={[Function]}
178
- >
179
- <View
180
- style={
181
- {
182
- "alignItems": "center",
183
- "backgroundColor": "#19216C",
184
- "borderRadius": 50,
185
- "flexDirection": "row",
186
- "justifyContent": "center",
187
- "paddingHorizontal": 24,
188
- "paddingVertical": 12,
189
- }
190
- }
191
- >
192
- <View
193
- style={
194
- {
195
- "marginRight": 12,
196
- }
197
- }
198
- >
199
- <RNSVGSvgView
200
- align="xMidYMid"
201
- bbHeight="24"
202
- bbWidth="24"
203
- fill="none"
204
- focusable={false}
205
- height={24}
206
- meetOrSlice={0}
207
- minX={0}
208
- minY={0}
209
- style={
210
- [
211
- {
212
- "backgroundColor": "transparent",
213
- "borderWidth": 0,
214
- },
215
- {
216
- "flex": 0,
217
- "height": 24,
218
- "width": 24,
219
- },
220
- ]
221
- }
222
- vbHeight={22}
223
- vbWidth={23}
224
- width={24}
225
- >
226
- <RNSVGGroup
227
- fill={null}
228
- propList={
229
- [
230
- "fill",
231
- ]
232
- }
233
- >
234
- <RNSVGPath
235
- d="M11.5 6.66667V11L14.875 14.25M21.625 11C21.625 16.3848 17.0919 20.75 11.5 20.75C5.90812 20.75 1.375 16.3848 1.375 11C1.375 5.61522 5.90812 1.25 11.5 1.25C17.0919 1.25 21.625 5.61522 21.625 11Z"
236
- fill={
237
- {
238
- "payload": 4278190080,
239
- "type": 0,
240
- }
241
- }
242
- propList={
243
- [
244
- "stroke",
245
- "strokeWidth",
246
- "strokeLinecap",
247
- "strokeLinejoin",
248
- ]
249
- }
250
- stroke={
251
- {
252
- "payload": 4292929785,
253
- "type": 0,
254
- }
255
- }
256
- strokeLinecap={1}
257
- strokeLinejoin={1}
258
- strokeWidth="2"
259
- />
260
- </RNSVGGroup>
261
- </RNSVGSvgView>
262
- </View>
263
- <View>
264
- <Text
265
- style={
266
- [
267
- [
268
- {
269
- "fontFamily": "SourceSansPro",
270
- "fontSize": 16,
271
- "lineHeight": 22.4,
272
- },
273
- ],
274
- {
275
- "color": "#E0E8F9",
276
- "textAlign": "center",
277
- "width": "100%",
278
- },
279
- undefined,
280
- ]
281
- }
282
- >
283
- Button with icon
284
- </Text>
285
- </View>
286
- </View>
287
- </View>
288
- `;
289
-
290
- exports[`test button component should render a button component with a solid icon named eye-off but is also disabled 1`] = `
291
- <View
292
- accessibilityState={
293
- {
294
- "busy": undefined,
295
- "checked": undefined,
296
- "disabled": true,
297
- "expanded": undefined,
298
- "selected": undefined,
299
- }
300
- }
301
- accessibilityValue={
302
- {
303
- "max": undefined,
304
- "min": undefined,
305
- "now": undefined,
306
- "text": undefined,
307
- }
308
- }
309
- accessible={true}
310
- collapsable={false}
311
- focusable={true}
312
- onBlur={[Function]}
313
- onClick={[Function]}
314
- onFocus={[Function]}
315
- onResponderGrant={[Function]}
316
- onResponderMove={[Function]}
317
- onResponderRelease={[Function]}
318
- onResponderTerminate={[Function]}
319
- onResponderTerminationRequest={[Function]}
320
- onStartShouldSetResponder={[Function]}
321
- >
322
- <View
323
- style={
324
- {
325
- "alignItems": "center",
326
- "backgroundColor": "#E5E8EB",
327
- "borderRadius": 50,
328
- "flexDirection": "row",
329
- "justifyContent": "center",
330
- "paddingHorizontal": 24,
331
- "paddingVertical": 12,
332
- }
333
- }
334
- >
335
- <View
336
- style={
337
- {
338
- "marginRight": 12,
339
- }
340
- }
341
- >
342
- <RNSVGSvgView
343
- align="xMidYMid"
344
- bbHeight="24"
345
- bbWidth="24"
346
- fill="none"
347
- focusable={false}
348
- height={24}
349
- meetOrSlice={0}
350
- minX={0}
351
- minY={0}
352
- style={
353
- [
354
- {
355
- "backgroundColor": "transparent",
356
- "borderWidth": 0,
357
- },
358
- {
359
- "flex": 0,
360
- "height": 24,
361
- "width": 24,
362
- },
363
- ]
364
- }
365
- vbHeight={18}
366
- vbWidth={22}
367
- width={24}
368
- >
369
- <RNSVGGroup
370
- fill={null}
371
- propList={
372
- [
373
- "fill",
374
- ]
375
- }
376
- >
377
- <RNSVGPath
378
- clipRule={0}
379
- d="M4.07779 0.522134C3.64822 0.092557 2.95174 0.092557 2.52216 0.522134C2.09258 0.95171 2.09258 1.64819 2.52216 2.07777L17.9222 17.4778C18.3517 17.9073 19.0482 17.9073 19.4778 17.4778C19.9074 17.0482 19.9074 16.3517 19.4778 15.9221L17.8573 14.3016C19.5486 12.9516 20.8329 11.1132 21.4966 8.99991C20.0949 4.53712 15.9256 1.29995 11.0002 1.29995C9.21429 1.29995 7.52776 1.72556 6.03654 2.48088L4.07779 0.522134ZM8.76492 5.20926L10.4302 6.87453C10.612 6.82588 10.8031 6.79995 11.0003 6.79995C12.2153 6.79995 13.2003 7.78492 13.2003 8.99995C13.2003 9.19711 13.1743 9.3882 13.1257 9.57002L14.791 11.2353C15.1781 10.5802 15.4003 9.81601 15.4003 8.99995C15.4003 6.5699 13.4303 4.59995 11.0003 4.59995C10.1842 4.59995 9.42002 4.82211 8.76492 5.20926Z"
380
- fill={
381
- {
382
- "payload": 4283522924,
383
- "type": 0,
384
- }
385
- }
386
- fillRule={0}
387
- propList={
388
- [
389
- "fill",
390
- "fillRule",
391
- ]
392
- }
393
- />
394
- <RNSVGPath
395
- d="M13.6995 16.3663L10.7246 13.3915C8.51412 13.2548 6.74539 11.4861 6.60875 9.27561L2.56839 5.23525C1.65067 6.3294 0.941981 7.60481 0.503784 8.99999C1.90549 13.4628 6.0748 16.6999 11.0002 16.6999C11.9315 16.6999 12.8358 16.5842 13.6995 16.3663Z"
396
- fill={
397
- {
398
- "payload": 4283522924,
399
- "type": 0,
400
- }
401
- }
402
- propList={
403
- [
404
- "fill",
405
- ]
406
- }
407
- />
408
- </RNSVGGroup>
409
- </RNSVGSvgView>
410
- </View>
411
- <View>
412
- <Text
413
- style={
414
- [
415
- [
416
- {
417
- "fontFamily": "SourceSansPro",
418
- "fontSize": 16,
419
- "lineHeight": 22.4,
420
- },
421
- ],
422
- {
423
- "color": "#515F6C",
424
- "textAlign": "center",
425
- "width": "100%",
426
- },
427
- undefined,
428
- ]
429
- }
430
- >
431
- Button with icon
432
- </Text>
433
- </View>
434
- </View>
435
- </View>
436
- `;
437
-
438
- exports[`test button component should render a light button component 1`] = `
439
- <View
440
- accessibilityState={
441
- {
442
- "busy": undefined,
443
- "checked": undefined,
444
- "disabled": undefined,
445
- "expanded": undefined,
446
- "selected": undefined,
447
- }
448
- }
449
- accessibilityValue={
450
- {
451
- "max": undefined,
452
- "min": undefined,
453
- "now": undefined,
454
- "text": undefined,
455
- }
456
- }
457
- accessible={true}
458
- collapsable={false}
459
- focusable={true}
460
- onBlur={[Function]}
461
- onClick={[Function]}
462
- onFocus={[Function]}
463
- onResponderGrant={[Function]}
464
- onResponderMove={[Function]}
465
- onResponderRelease={[Function]}
466
- onResponderTerminate={[Function]}
467
- onResponderTerminationRequest={[Function]}
468
- onStartShouldSetResponder={[Function]}
469
- >
470
- <View
471
- style={
472
- {
473
- "alignItems": "center",
474
- "backgroundColor": "#FFFFFF",
475
- "borderRadius": 50,
476
- "flexDirection": "row",
477
- "justifyContent": "center",
478
- "paddingHorizontal": 24,
479
- "paddingVertical": 12,
480
- }
481
- }
482
- >
483
- <View>
484
- <Text
485
- style={
486
- [
487
- [
488
- {
489
- "fontFamily": "SourceSansPro",
490
- "fontSize": 16,
491
- "lineHeight": 22.4,
492
- },
493
- ],
494
- {
495
- "color": "#515F6C",
496
- "textAlign": "center",
497
- "width": "100%",
498
- },
499
- undefined,
500
- ]
501
- }
502
- >
503
- Light button
504
- </Text>
505
- </View>
506
- </View>
507
- </View>
508
- `;
509
-
510
- exports[`test button component should render a success button component 1`] = `
511
- <View
512
- accessibilityState={
513
- {
514
- "busy": undefined,
515
- "checked": undefined,
516
- "disabled": undefined,
517
- "expanded": undefined,
518
- "selected": undefined,
519
- }
520
- }
521
- accessibilityValue={
522
- {
523
- "max": undefined,
524
- "min": undefined,
525
- "now": undefined,
526
- "text": undefined,
527
- }
528
- }
529
- accessible={true}
530
- collapsable={false}
531
- focusable={true}
532
- onBlur={[Function]}
533
- onClick={[Function]}
534
- onFocus={[Function]}
535
- onResponderGrant={[Function]}
536
- onResponderMove={[Function]}
537
- onResponderRelease={[Function]}
538
- onResponderTerminate={[Function]}
539
- onResponderTerminationRequest={[Function]}
540
- onStartShouldSetResponder={[Function]}
541
- >
542
- <View
543
- style={
544
- {
545
- "alignItems": "center",
546
- "backgroundColor": "#67C14E",
547
- "borderRadius": 50,
548
- "flexDirection": "row",
549
- "justifyContent": "center",
550
- "paddingHorizontal": 24,
551
- "paddingVertical": 12,
552
- }
553
- }
554
- >
555
- <View>
556
- <Text
557
- style={
558
- [
559
- [
560
- {
561
- "fontFamily": "SourceSansPro",
562
- "fontSize": 16,
563
- "lineHeight": 22.4,
564
- },
565
- ],
566
- {
567
- "color": "#FFFFFF",
568
- "textAlign": "center",
569
- "width": "100%",
570
- },
571
- undefined,
572
- ]
573
- }
574
- >
575
- Success button
576
- </Text>
577
- </View>
578
- </View>
579
- </View>
580
- `;
581
-
582
- exports[`test button component should render an error button component 1`] = `
583
- <View
584
- accessibilityState={
585
- {
586
- "busy": undefined,
587
- "checked": undefined,
588
- "disabled": undefined,
589
- "expanded": undefined,
590
- "selected": undefined,
591
- }
592
- }
593
- accessibilityValue={
594
- {
595
- "max": undefined,
596
- "min": undefined,
597
- "now": undefined,
598
- "text": undefined,
599
- }
600
- }
601
- accessible={true}
602
- collapsable={false}
603
- focusable={true}
604
- onBlur={[Function]}
605
- onClick={[Function]}
606
- onFocus={[Function]}
607
- onResponderGrant={[Function]}
608
- onResponderMove={[Function]}
609
- onResponderRelease={[Function]}
610
- onResponderTerminate={[Function]}
611
- onResponderTerminationRequest={[Function]}
612
- onStartShouldSetResponder={[Function]}
613
- >
614
- <View
615
- style={
616
- {
617
- "alignItems": "center",
618
- "backgroundColor": "#D25E5E",
619
- "borderRadius": 50,
620
- "flexDirection": "row",
621
- "justifyContent": "center",
622
- "paddingHorizontal": 24,
623
- "paddingVertical": 12,
624
- }
625
- }
626
- >
627
- <View>
628
- <Text
629
- style={
630
- [
631
- [
632
- {
633
- "fontFamily": "SourceSansPro",
634
- "fontSize": 16,
635
- "lineHeight": 22.4,
636
- },
637
- ],
638
- {
639
- "color": "#FFFFFF",
640
- "textAlign": "center",
641
- "width": "100%",
642
- },
643
- undefined,
644
- ]
645
- }
646
- >
647
- Error button
648
- </Text>
649
- </View>
650
- </View>
651
- </View>
652
- `;
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import render from 'react-test-renderer';
3
- import {Button} from './button.component';
4
-
5
- describe('test button component', () => {
6
- it('should render a button component', function () {
7
- const tree = render.create(<Button label="Test button" />).toJSON();
8
- expect(tree).toMatchSnapshot();
9
- });
10
- it('should render a success button component', function () {
11
- const tree = render
12
- .create(<Button type={'success'} label="Success button" />)
13
- .toJSON();
14
- expect(tree).toMatchSnapshot();
15
- });
16
- it('should render an error button component', function () {
17
- const tree = render
18
- .create(<Button type={'error'} label="Error button" />)
19
- .toJSON();
20
- expect(tree).toMatchSnapshot();
21
- });
22
- it('should render a light button component', function () {
23
- const tree = render
24
- .create(<Button type={'light'} label="Light button" />)
25
- .toJSON();
26
- expect(tree).toMatchSnapshot();
27
- });
28
- it('should render a button component that is disabled', () => {
29
- const tree = render
30
- .create(<Button label="Button without icon" disabled={true} />)
31
- .toJSON();
32
- expect(tree).toMatchSnapshot();
33
- });
34
- it('should render a button component with a clock icon, since regular is the default the icon will be outlined', () => {
35
- const tree = render
36
- .create(
37
- <Button label="Button with icon" icon={true} iconName={'clock'} />
38
- )
39
- .toJSON();
40
- expect(tree).toMatchSnapshot();
41
- });
42
- it('should render a button component with a solid icon named eye-off but is also disabled', () => {
43
- const tree = render
44
- .create(
45
- <Button
46
- label="Button with icon"
47
- icon={true}
48
- iconStyle={'solid'}
49
- iconName={'eye-off'}
50
- disabled={true}
51
- />
52
- )
53
- .toJSON();
54
- expect(tree).toMatchSnapshot();
55
- });
56
- });