@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,133 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`more info button should render a more info button in a black text color, underlined 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
- style={
35
- {
36
- "alignItems": "center",
37
- "justifyContent": "center",
38
- "minHeight": 42,
39
- "minWidth": 42,
40
- }
41
- }
42
- >
43
- <Text
44
- style={
45
- [
46
- [
47
- {
48
- "fontFamily": "Montserrat",
49
- "fontSize": 14,
50
- "lineHeight": 22.4,
51
- },
52
- ],
53
- {
54
- "color": "#000000",
55
- "textAlign": "center",
56
- "width": "100%",
57
- },
58
- {
59
- "textDecorationLine": "underline",
60
- },
61
- ]
62
- }
63
- >
64
- Meer info
65
- </Text>
66
- </View>
67
- `;
68
-
69
- exports[`more info button should render a more info button in a white text color, underlined 1`] = `
70
- <View
71
- accessibilityState={
72
- {
73
- "busy": undefined,
74
- "checked": undefined,
75
- "disabled": undefined,
76
- "expanded": undefined,
77
- "selected": undefined,
78
- }
79
- }
80
- accessibilityValue={
81
- {
82
- "max": undefined,
83
- "min": undefined,
84
- "now": undefined,
85
- "text": undefined,
86
- }
87
- }
88
- accessible={true}
89
- collapsable={false}
90
- focusable={true}
91
- onBlur={[Function]}
92
- onClick={[Function]}
93
- onFocus={[Function]}
94
- onResponderGrant={[Function]}
95
- onResponderMove={[Function]}
96
- onResponderRelease={[Function]}
97
- onResponderTerminate={[Function]}
98
- onResponderTerminationRequest={[Function]}
99
- onStartShouldSetResponder={[Function]}
100
- style={
101
- {
102
- "alignItems": "center",
103
- "justifyContent": "center",
104
- "minHeight": 42,
105
- "minWidth": 42,
106
- }
107
- }
108
- >
109
- <Text
110
- style={
111
- [
112
- [
113
- {
114
- "fontFamily": "Montserrat",
115
- "fontSize": 14,
116
- "lineHeight": 22.4,
117
- },
118
- ],
119
- {
120
- "color": "#FFFFFF",
121
- "textAlign": "center",
122
- "width": "100%",
123
- },
124
- {
125
- "textDecorationLine": "underline",
126
- },
127
- ]
128
- }
129
- >
130
- More info
131
- </Text>
132
- </View>
133
- `;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import render from 'react-test-renderer';
3
- import {MoreInfoButton} from './more-info-button.component';
4
-
5
- describe('more info button', () => {
6
- it('should render a more info button in a white text color, underlined', function () {
7
- const tree = render
8
- .create(
9
- <MoreInfoButton
10
- label="More info"
11
- onPress={() => console.log('do something')}
12
- />
13
- )
14
- .toJSON();
15
- expect(tree).toMatchSnapshot();
16
- });
17
- it('should render a more info button in a black text color, underlined', () => {
18
- const tree = render
19
- .create(
20
- <MoreInfoButton
21
- label="Meer info"
22
- onPress={() => console.log('do something')}
23
- textColor={'#000000'}
24
- />
25
- )
26
- .toJSON();
27
- expect(tree).toMatchSnapshot();
28
- });
29
- });
@@ -1,504 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Visual test for the password input field shows a password input field with no placeholder text 1`] = `
4
- <View
5
- style={
6
- {
7
- "alignItems": "center",
8
- "backgroundColor": "#FFFFFF",
9
- "borderRadius": 8,
10
- "flexDirection": "row",
11
- "height": 44,
12
- "width": "100%",
13
- }
14
- }
15
- >
16
- <TextInput
17
- keyboardType="default"
18
- onChangeText={[Function]}
19
- placeholderTextColor="#9AA5B1"
20
- secureTextEntry={true}
21
- style={
22
- {
23
- "color": "#1F2933",
24
- "flex": 1,
25
- "fontFamily": "SourceSansPro",
26
- "fontSize": 16,
27
- "height": "100%",
28
- "justifyContent": "center",
29
- "lineHeight": 20,
30
- "paddingLeft": 16,
31
- }
32
- }
33
- value="text"
34
- />
35
- <View
36
- accessibilityState={
37
- {
38
- "busy": undefined,
39
- "checked": undefined,
40
- "disabled": undefined,
41
- "expanded": undefined,
42
- "selected": undefined,
43
- }
44
- }
45
- accessibilityValue={
46
- {
47
- "max": undefined,
48
- "min": undefined,
49
- "now": undefined,
50
- "text": undefined,
51
- }
52
- }
53
- accessible={true}
54
- collapsable={false}
55
- focusable={true}
56
- onBlur={[Function]}
57
- onClick={[Function]}
58
- onFocus={[Function]}
59
- onResponderGrant={[Function]}
60
- onResponderMove={[Function]}
61
- onResponderRelease={[Function]}
62
- onResponderTerminate={[Function]}
63
- onResponderTerminationRequest={[Function]}
64
- onStartShouldSetResponder={[Function]}
65
- style={
66
- {
67
- "alignItems": "center",
68
- "height": "100%",
69
- "justifyContent": "center",
70
- "paddingBottom": 8,
71
- "paddingLeft": 16,
72
- "paddingRight": 16,
73
- "paddingTop": 8,
74
- }
75
- }
76
- >
77
- <RNSVGSvgView
78
- align="xMidYMid"
79
- bbHeight="24"
80
- bbWidth="24"
81
- fill="none"
82
- focusable={false}
83
- height={24}
84
- meetOrSlice={0}
85
- minX={0}
86
- minY={0}
87
- style={
88
- [
89
- {
90
- "backgroundColor": "transparent",
91
- "borderWidth": 0,
92
- },
93
- {
94
- "flex": 0,
95
- "height": 24,
96
- "width": 24,
97
- },
98
- ]
99
- }
100
- vbHeight={19}
101
- vbWidth={25}
102
- width={24}
103
- >
104
- <RNSVGGroup
105
- fill={null}
106
- propList={
107
- [
108
- "fill",
109
- ]
110
- }
111
- >
112
- <RNSVGPath
113
- d="M15.875 9.5C15.875 11.364 14.3639 12.875 12.5 12.875C10.636 12.875 9.12497 11.364 9.12497 9.5C9.12497 7.63604 10.636 6.125 12.5 6.125C14.3639 6.125 15.875 7.63604 15.875 9.5Z"
114
- fill={
115
- {
116
- "payload": 4278190080,
117
- "type": 0,
118
- }
119
- }
120
- propList={
121
- [
122
- "stroke",
123
- "strokeWidth",
124
- "strokeLinecap",
125
- "strokeLinejoin",
126
- ]
127
- }
128
- stroke={
129
- {
130
- "payload": 4282406312,
131
- "type": 0,
132
- }
133
- }
134
- strokeLinecap={1}
135
- strokeLinejoin={1}
136
- strokeWidth="2"
137
- />
138
- <RNSVGPath
139
- d="M1.7655 9.49996C3.19906 4.93574 7.46313 1.625 12.5005 1.625C17.5378 1.625 21.8019 4.93578 23.2354 9.50004C21.8019 14.0643 17.5378 17.375 12.5005 17.375C7.46313 17.375 3.19904 14.0642 1.7655 9.49996Z"
140
- fill={
141
- {
142
- "payload": 4278190080,
143
- "type": 0,
144
- }
145
- }
146
- propList={
147
- [
148
- "stroke",
149
- "strokeWidth",
150
- "strokeLinecap",
151
- "strokeLinejoin",
152
- ]
153
- }
154
- stroke={
155
- {
156
- "payload": 4282406312,
157
- "type": 0,
158
- }
159
- }
160
- strokeLinecap={1}
161
- strokeLinejoin={1}
162
- strokeWidth="2"
163
- />
164
- </RNSVGGroup>
165
- </RNSVGSvgView>
166
- </View>
167
- </View>
168
- `;
169
-
170
- exports[`Visual test for the password input field shows a password input field with placeholder text 1`] = `
171
- <View
172
- style={
173
- {
174
- "alignItems": "center",
175
- "backgroundColor": "#FFFFFF",
176
- "borderRadius": 8,
177
- "flexDirection": "row",
178
- "height": 44,
179
- "width": "100%",
180
- }
181
- }
182
- >
183
- <TextInput
184
- keyboardType="default"
185
- onChangeText={[Function]}
186
- placeholder="password"
187
- placeholderTextColor="#9AA5B1"
188
- secureTextEntry={true}
189
- style={
190
- {
191
- "color": "#1F2933",
192
- "flex": 1,
193
- "fontFamily": "SourceSansPro",
194
- "fontSize": 16,
195
- "height": "100%",
196
- "justifyContent": "center",
197
- "lineHeight": 20,
198
- "paddingLeft": 16,
199
- }
200
- }
201
- value="text"
202
- />
203
- <View
204
- accessibilityState={
205
- {
206
- "busy": undefined,
207
- "checked": undefined,
208
- "disabled": undefined,
209
- "expanded": undefined,
210
- "selected": undefined,
211
- }
212
- }
213
- accessibilityValue={
214
- {
215
- "max": undefined,
216
- "min": undefined,
217
- "now": undefined,
218
- "text": undefined,
219
- }
220
- }
221
- accessible={true}
222
- collapsable={false}
223
- focusable={true}
224
- onBlur={[Function]}
225
- onClick={[Function]}
226
- onFocus={[Function]}
227
- onResponderGrant={[Function]}
228
- onResponderMove={[Function]}
229
- onResponderRelease={[Function]}
230
- onResponderTerminate={[Function]}
231
- onResponderTerminationRequest={[Function]}
232
- onStartShouldSetResponder={[Function]}
233
- style={
234
- {
235
- "alignItems": "center",
236
- "height": "100%",
237
- "justifyContent": "center",
238
- "paddingBottom": 8,
239
- "paddingLeft": 16,
240
- "paddingRight": 16,
241
- "paddingTop": 8,
242
- }
243
- }
244
- >
245
- <RNSVGSvgView
246
- align="xMidYMid"
247
- bbHeight="24"
248
- bbWidth="24"
249
- fill="none"
250
- focusable={false}
251
- height={24}
252
- meetOrSlice={0}
253
- minX={0}
254
- minY={0}
255
- style={
256
- [
257
- {
258
- "backgroundColor": "transparent",
259
- "borderWidth": 0,
260
- },
261
- {
262
- "flex": 0,
263
- "height": 24,
264
- "width": 24,
265
- },
266
- ]
267
- }
268
- vbHeight={19}
269
- vbWidth={25}
270
- width={24}
271
- >
272
- <RNSVGGroup
273
- fill={null}
274
- propList={
275
- [
276
- "fill",
277
- ]
278
- }
279
- >
280
- <RNSVGPath
281
- d="M15.875 9.5C15.875 11.364 14.3639 12.875 12.5 12.875C10.636 12.875 9.12497 11.364 9.12497 9.5C9.12497 7.63604 10.636 6.125 12.5 6.125C14.3639 6.125 15.875 7.63604 15.875 9.5Z"
282
- fill={
283
- {
284
- "payload": 4278190080,
285
- "type": 0,
286
- }
287
- }
288
- propList={
289
- [
290
- "stroke",
291
- "strokeWidth",
292
- "strokeLinecap",
293
- "strokeLinejoin",
294
- ]
295
- }
296
- stroke={
297
- {
298
- "payload": 4282406312,
299
- "type": 0,
300
- }
301
- }
302
- strokeLinecap={1}
303
- strokeLinejoin={1}
304
- strokeWidth="2"
305
- />
306
- <RNSVGPath
307
- d="M1.7655 9.49996C3.19906 4.93574 7.46313 1.625 12.5005 1.625C17.5378 1.625 21.8019 4.93578 23.2354 9.50004C21.8019 14.0643 17.5378 17.375 12.5005 17.375C7.46313 17.375 3.19904 14.0642 1.7655 9.49996Z"
308
- fill={
309
- {
310
- "payload": 4278190080,
311
- "type": 0,
312
- }
313
- }
314
- propList={
315
- [
316
- "stroke",
317
- "strokeWidth",
318
- "strokeLinecap",
319
- "strokeLinejoin",
320
- ]
321
- }
322
- stroke={
323
- {
324
- "payload": 4282406312,
325
- "type": 0,
326
- }
327
- }
328
- strokeLinecap={1}
329
- strokeLinejoin={1}
330
- strokeWidth="2"
331
- />
332
- </RNSVGGroup>
333
- </RNSVGSvgView>
334
- </View>
335
- </View>
336
- `;
337
-
338
- exports[`Visual test for the password input field shows a password input field with placeholder text and a number keyboard 1`] = `
339
- <View
340
- style={
341
- {
342
- "alignItems": "center",
343
- "backgroundColor": "#FFFFFF",
344
- "borderRadius": 8,
345
- "flexDirection": "row",
346
- "height": 44,
347
- "width": "100%",
348
- }
349
- }
350
- >
351
- <TextInput
352
- keyboardType="number-pad"
353
- onChangeText={[Function]}
354
- placeholder="number password"
355
- placeholderTextColor="#9AA5B1"
356
- secureTextEntry={true}
357
- style={
358
- {
359
- "color": "#1F2933",
360
- "flex": 1,
361
- "fontFamily": "SourceSansPro",
362
- "fontSize": 16,
363
- "height": "100%",
364
- "justifyContent": "center",
365
- "lineHeight": 20,
366
- "paddingLeft": 16,
367
- }
368
- }
369
- value="text"
370
- />
371
- <View
372
- accessibilityState={
373
- {
374
- "busy": undefined,
375
- "checked": undefined,
376
- "disabled": undefined,
377
- "expanded": undefined,
378
- "selected": undefined,
379
- }
380
- }
381
- accessibilityValue={
382
- {
383
- "max": undefined,
384
- "min": undefined,
385
- "now": undefined,
386
- "text": undefined,
387
- }
388
- }
389
- accessible={true}
390
- collapsable={false}
391
- focusable={true}
392
- onBlur={[Function]}
393
- onClick={[Function]}
394
- onFocus={[Function]}
395
- onResponderGrant={[Function]}
396
- onResponderMove={[Function]}
397
- onResponderRelease={[Function]}
398
- onResponderTerminate={[Function]}
399
- onResponderTerminationRequest={[Function]}
400
- onStartShouldSetResponder={[Function]}
401
- style={
402
- {
403
- "alignItems": "center",
404
- "height": "100%",
405
- "justifyContent": "center",
406
- "paddingBottom": 8,
407
- "paddingLeft": 16,
408
- "paddingRight": 16,
409
- "paddingTop": 8,
410
- }
411
- }
412
- >
413
- <RNSVGSvgView
414
- align="xMidYMid"
415
- bbHeight="24"
416
- bbWidth="24"
417
- fill="none"
418
- focusable={false}
419
- height={24}
420
- meetOrSlice={0}
421
- minX={0}
422
- minY={0}
423
- style={
424
- [
425
- {
426
- "backgroundColor": "transparent",
427
- "borderWidth": 0,
428
- },
429
- {
430
- "flex": 0,
431
- "height": 24,
432
- "width": 24,
433
- },
434
- ]
435
- }
436
- vbHeight={19}
437
- vbWidth={25}
438
- width={24}
439
- >
440
- <RNSVGGroup
441
- fill={null}
442
- propList={
443
- [
444
- "fill",
445
- ]
446
- }
447
- >
448
- <RNSVGPath
449
- d="M15.875 9.5C15.875 11.364 14.3639 12.875 12.5 12.875C10.636 12.875 9.12497 11.364 9.12497 9.5C9.12497 7.63604 10.636 6.125 12.5 6.125C14.3639 6.125 15.875 7.63604 15.875 9.5Z"
450
- fill={
451
- {
452
- "payload": 4278190080,
453
- "type": 0,
454
- }
455
- }
456
- propList={
457
- [
458
- "stroke",
459
- "strokeWidth",
460
- "strokeLinecap",
461
- "strokeLinejoin",
462
- ]
463
- }
464
- stroke={
465
- {
466
- "payload": 4282406312,
467
- "type": 0,
468
- }
469
- }
470
- strokeLinecap={1}
471
- strokeLinejoin={1}
472
- strokeWidth="2"
473
- />
474
- <RNSVGPath
475
- d="M1.7655 9.49996C3.19906 4.93574 7.46313 1.625 12.5005 1.625C17.5378 1.625 21.8019 4.93578 23.2354 9.50004C21.8019 14.0643 17.5378 17.375 12.5005 17.375C7.46313 17.375 3.19904 14.0642 1.7655 9.49996Z"
476
- fill={
477
- {
478
- "payload": 4278190080,
479
- "type": 0,
480
- }
481
- }
482
- propList={
483
- [
484
- "stroke",
485
- "strokeWidth",
486
- "strokeLinecap",
487
- "strokeLinejoin",
488
- ]
489
- }
490
- stroke={
491
- {
492
- "payload": 4282406312,
493
- "type": 0,
494
- }
495
- }
496
- strokeLinecap={1}
497
- strokeLinejoin={1}
498
- strokeWidth="2"
499
- />
500
- </RNSVGGroup>
501
- </RNSVGSvgView>
502
- </View>
503
- </View>
504
- `;
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
- import render from 'react-test-renderer';
3
- import {PasswordInput} from './password-input.component';
4
- import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
5
-
6
- describe('Visual test for the password input field', () => {
7
- it('shows a password input field with placeholder text', () => {
8
- const tree = render
9
- .create(
10
- <PasswordInput
11
- placeholder={'password'}
12
- value={'text'}
13
- onChangeText={() => console.log('changed text')}
14
- />
15
- )
16
- .toJSON();
17
-
18
- expect(tree).toMatchSnapshot();
19
- });
20
- it('shows a password input field with no placeholder text', () => {
21
- const tree = render
22
- .create(
23
- <PasswordInput
24
- onChangeText={() => console.log('changed text')}
25
- value={'text'}
26
- />
27
- )
28
- .toJSON();
29
-
30
- expect(tree).toMatchSnapshot();
31
- });
32
- it('shows a password input field with placeholder text and a number keyboard', () => {
33
- const tree = render
34
- .create(
35
- <PasswordInput
36
- placeholder={'number password'}
37
- value={'text'}
38
- onChangeText={() => console.log('changed text')}
39
- keyboardType={KeyBoardTypes.NUMBER_PAD}
40
- />
41
- )
42
- .toJSON();
43
-
44
- expect(tree).toMatchSnapshot();
45
- });
46
- });