@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,76 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {TinyText} from './tiny-text.component';
4
-
5
- describe('Tests for the tiny text component', () => {
6
- it('should render a tiny text component, regular font, not bold, no textAlignment, no specified color', function () {
7
- const tree = renderer
8
- .create(
9
- <TinyText>
10
- The sun was setting over the mountains, casting a warm golden glow
11
- over the landscape. The sky was painted with shades of pink, orange,
12
- and purple, creating a beautiful backdrop for the rolling hills and
13
- green fields below.
14
- </TinyText>
15
- )
16
- .toJSON();
17
-
18
- expect(tree).toMatchSnapshot();
19
- });
20
- it('should render a tiny text component, regular font, not bold, with a self defined text color', function () {
21
- const tree = renderer
22
- .create(
23
- <TinyText textColor={'#c2c2c2'}>
24
- The sun was setting over the mountains, casting a warm golden glow
25
- over the landscape. The sky was painted with shades of pink, orange,
26
- and purple, creating a beautiful backdrop for the rolling hills and
27
- green fields below.
28
- </TinyText>
29
- )
30
- .toJSON();
31
-
32
- expect(tree).toMatchSnapshot();
33
- });
34
- it('should render a tiny text component, regular font, bold, no specific color and no alignment', function () {
35
- const tree = renderer
36
- .create(
37
- <TinyText bold={true}>
38
- The sun was setting over the mountains, casting a warm golden glow
39
- over the landscape. The sky was painted with shades of pink, orange,
40
- and purple, creating a beautiful backdrop for the rolling hills and
41
- green fields below.
42
- </TinyText>
43
- )
44
- .toJSON();
45
-
46
- expect(tree).toMatchSnapshot();
47
- });
48
- it('should render a tiny text component, regular font, bold, a custom color and no specific alignment', function () {
49
- const tree = renderer
50
- .create(
51
- <TinyText bold={true} textColor={'#888888'}>
52
- The sun was setting over the mountains, casting a warm golden glow
53
- over the landscape. The sky was painted with shades of pink, orange,
54
- and purple, creating a beautiful backdrop for the rolling hills and
55
- green fields below.
56
- </TinyText>
57
- )
58
- .toJSON();
59
-
60
- expect(tree).toMatchSnapshot();
61
- });
62
- it('should render a tiny text component, regular font, bold, a custom color and aligned to the right', function () {
63
- const tree = renderer
64
- .create(
65
- <TinyText bold={true} textColor={'#888888'} textAlign={'right'}>
66
- The sun was setting over the mountains, casting a warm golden glow
67
- over the landscape. The sky was painted with shades of pink, orange,
68
- and purple, creating a beautiful backdrop for the rolling hills and
69
- green fields below.
70
- </TinyText>
71
- )
72
- .toJSON();
73
-
74
- expect(tree).toMatchSnapshot();
75
- });
76
- });
@@ -1,143 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`QuickMessage should render a quick message that is not selected 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
- "backgroundColor": "#515F6C",
37
- "borderBottomLeftRadius": 8,
38
- "borderBottomRightRadius": 24,
39
- "borderTopLeftRadius": 24,
40
- "borderTopRightRadius": 24,
41
- "paddingBottom": 24,
42
- "paddingLeft": 24,
43
- "paddingRight": 24,
44
- "paddingTop": 24,
45
- "width": "100%",
46
- }
47
- }
48
- testID="quick-message-test"
49
- >
50
- <Text
51
- style={
52
- [
53
- [
54
- {
55
- "fontFamily": "Montserrat",
56
- "fontSize": 14,
57
- "lineHeight": 22.4,
58
- },
59
- ],
60
- {
61
- "color": "#FFFFFF",
62
- "textAlign": "center",
63
- "width": "100%",
64
- },
65
- undefined,
66
- ]
67
- }
68
- >
69
- Test message
70
- </Text>
71
- </View>
72
- `;
73
-
74
- exports[`QuickMessage should render a quick message that is selected 1`] = `
75
- <View
76
- accessibilityState={
77
- {
78
- "busy": undefined,
79
- "checked": undefined,
80
- "disabled": undefined,
81
- "expanded": undefined,
82
- "selected": undefined,
83
- }
84
- }
85
- accessibilityValue={
86
- {
87
- "max": undefined,
88
- "min": undefined,
89
- "now": undefined,
90
- "text": undefined,
91
- }
92
- }
93
- accessible={true}
94
- collapsable={false}
95
- focusable={true}
96
- onBlur={[Function]}
97
- onClick={[Function]}
98
- onFocus={[Function]}
99
- onResponderGrant={[Function]}
100
- onResponderMove={[Function]}
101
- onResponderRelease={[Function]}
102
- onResponderTerminate={[Function]}
103
- onResponderTerminationRequest={[Function]}
104
- onStartShouldSetResponder={[Function]}
105
- style={
106
- {
107
- "backgroundColor": "#647ACB",
108
- "borderBottomLeftRadius": 8,
109
- "borderBottomRightRadius": 24,
110
- "borderTopLeftRadius": 24,
111
- "borderTopRightRadius": 24,
112
- "paddingBottom": 24,
113
- "paddingLeft": 24,
114
- "paddingRight": 24,
115
- "paddingTop": 24,
116
- "width": "100%",
117
- }
118
- }
119
- testID="quick-message-test"
120
- >
121
- <Text
122
- style={
123
- [
124
- [
125
- {
126
- "fontFamily": "Montserrat",
127
- "fontSize": 14,
128
- "lineHeight": 22.4,
129
- },
130
- ],
131
- {
132
- "color": "#FFFFFF",
133
- "textAlign": "center",
134
- "width": "100%",
135
- },
136
- undefined,
137
- ]
138
- }
139
- >
140
- Test message
141
- </Text>
142
- </View>
143
- `;
@@ -1,58 +0,0 @@
1
- import React from 'react';
2
- import {render, fireEvent} from '@testing-library/react-native';
3
- import {QuickMessage} from './quick-message.component';
4
-
5
- describe('QuickMessage', () => {
6
- it('should render a quick message that is not selected', () => {
7
- const {toJSON} = render(
8
- <QuickMessage
9
- message="Test message"
10
- setMessage={() => {}}
11
- selectedMessage={false}
12
- />
13
- );
14
- expect(toJSON()).toMatchSnapshot();
15
- });
16
- it('should render a quick message that is selected', () => {
17
- const {toJSON} = render(
18
- <QuickMessage
19
- message="Test message"
20
- setMessage={() => {}}
21
- selectedMessage={true}
22
- />
23
- );
24
- expect(toJSON()).toMatchSnapshot();
25
- });
26
-
27
- it('calls setMessage when pressed (selected)', () => {
28
- const setMessageMock = jest.fn();
29
- const {getByTestId} = render(
30
- <QuickMessage
31
- message="Test message"
32
- setMessage={setMessageMock}
33
- selectedMessage={true} // Mocking selectedMessage as true
34
- />
35
- );
36
-
37
- const pressable = getByTestId('quick-message-test');
38
- fireEvent.press(pressable);
39
-
40
- expect(setMessageMock).toHaveBeenCalledWith('Test message');
41
- });
42
-
43
- it('calls setMessage when pressed (not selected)', () => {
44
- const setMessageMock = jest.fn();
45
- const {getByTestId} = render(
46
- <QuickMessage
47
- message="Test message"
48
- setMessage={setMessageMock}
49
- selectedMessage={false} // Mocking selectedMessage as false
50
- />
51
- );
52
-
53
- const pressable = getByTestId('quick-message-test');
54
- fireEvent.press(pressable);
55
-
56
- expect(setMessageMock).toHaveBeenCalledWith('Test message');
57
- });
58
- });
@@ -1,333 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`test split-container renders correctly when A COLORED ICON is provided 1`] = `
4
- <View
5
- style={
6
- {
7
- "paddingLeft": 8,
8
- "paddingRight": 8,
9
- "width": "100%",
10
- }
11
- }
12
- >
13
- <View
14
- style={
15
- [
16
- {
17
- "flexDirection": "row",
18
- "justifyContent": "center",
19
- },
20
- {},
21
- ]
22
- }
23
- >
24
- <RNSVGSvgView
25
- align="xMidYMid"
26
- bbHeight="24"
27
- bbWidth="24"
28
- fill="none"
29
- focusable={false}
30
- height={24}
31
- meetOrSlice={0}
32
- minX={0}
33
- minY={0}
34
- style={
35
- [
36
- {
37
- "backgroundColor": "transparent",
38
- "borderWidth": 0,
39
- },
40
- {
41
- "flex": 0,
42
- "height": 24,
43
- "width": 24,
44
- },
45
- ]
46
- }
47
- vbHeight={21}
48
- vbWidth={20}
49
- width={24}
50
- >
51
- <RNSVGGroup
52
- fill={null}
53
- propList={
54
- [
55
- "fill",
56
- ]
57
- }
58
- >
59
- <RNSVGPath
60
- d="M11 1.5C11 0.947715 10.5523 0.5 9.99998 0.5C9.44769 0.5 8.99998 0.947715 8.99998 1.5H11ZM8.99998 2.625C8.99998 3.17728 9.44769 3.625 9.99998 3.625C10.5523 3.625 11 3.17728 11 2.625H8.99998ZM16.5 14C15.9477 14 15.5 14.4477 15.5 15C15.5 15.5523 15.9477 16 16.5 16V14ZM18.6666 16C19.2189 16 19.6666 15.5523 19.6666 15C19.6666 14.4477 19.2189 14 18.6666 14V16ZM9.99998 15V14C9.44769 14 8.99998 14.4477 8.99998 15H9.99998ZM12.1666 16C12.7189 16 13.1666 15.5523 13.1666 15C13.1666 14.4477 12.7189 14 12.1666 14V16ZM8.99998 19.5C8.99998 20.0523 9.44769 20.5 9.99998 20.5C10.5523 20.5 11 20.0523 11 19.5H8.99998ZM11 7.125C11 6.57272 10.5523 6.125 9.99998 6.125C9.44769 6.125 8.99998 6.57272 8.99998 7.125H11ZM9.99998 10.5H8.99998C8.99998 11.0523 9.44769 11.5 9.99998 11.5V10.5ZM14.3333 18.5C13.781 18.5 13.3333 18.9477 13.3333 19.5C13.3333 20.0523 13.781 20.5 14.3333 20.5V18.5ZM18.6666 20.5C19.2189 20.5 19.6666 20.0523 19.6666 19.5C19.6666 18.9477 19.2189 18.5 18.6666 18.5V20.5ZM1.33331 9.5C0.781028 9.5 0.333313 9.94771 0.333313 10.5C0.333313 11.0523 0.781028 11.5 1.33331 11.5V9.5ZM5.66665 11.5C6.21893 11.5 6.66665 11.0523 6.66665 10.5C6.66665 9.94771 6.21893 9.5 5.66665 9.5V11.5ZM10.0108 11.5C10.5631 11.5 11.0108 11.0523 11.0108 10.5C11.0108 9.94771 10.5631 9.5 10.0108 9.5V11.5ZM14.3441 11.5C14.8964 11.5 15.3441 11.0523 15.3441 10.5C15.3441 9.94771 14.8964 9.5 14.3441 9.5V11.5ZM18.6666 9.5C18.1144 9.5 17.6666 9.94771 17.6666 10.5C17.6666 11.0523 18.1144 11.5 18.6666 11.5V9.5ZM18.6775 11.5C19.2298 11.5 19.6775 11.0523 19.6775 10.5C19.6775 9.94771 19.2298 9.5 18.6775 9.5V11.5ZM2.41665 2.5H4.58331V0.5H2.41665V2.5ZM4.66665 2.625V4.875H6.66665V2.625H4.66665ZM4.58331 5H2.41665V7H4.58331V5ZM2.33331 4.875V2.625H0.333313V4.875H2.33331ZM2.41665 5C2.40602 5 2.39043 4.9971 2.37093 4.97685C2.3508 4.95595 2.33331 4.92194 2.33331 4.875H0.333313C0.333313 6.0127 1.23082 7 2.41665 7V5ZM4.66665 4.875C4.66665 4.92194 4.64916 4.95595 4.62902 4.97685C4.60953 4.9971 4.59394 5 4.58331 5V7C5.76914 7 6.66665 6.0127 6.66665 4.875H4.66665ZM4.58331 2.5C4.59394 2.5 4.60953 2.5029 4.62902 2.52315C4.64916 2.54405 4.66665 2.57806 4.66665 2.625H6.66665C6.66665 1.4873 5.76914 0.5 4.58331 0.5V2.5ZM2.41665 0.5C1.23082 0.5 0.333313 1.4873 0.333313 2.625H2.33331C2.33331 2.57806 2.3508 2.54405 2.37093 2.52315C2.39043 2.5029 2.40602 2.5 2.41665 2.5V0.5ZM15.4166 2.5H17.5833V0.5H15.4166V2.5ZM17.6666 2.625V4.875H19.6666V2.625H17.6666ZM17.5833 5H15.4166V7H17.5833V5ZM15.3333 4.875V2.625H13.3333V4.875H15.3333ZM15.4166 5C15.406 5 15.3904 4.9971 15.3709 4.97685C15.3508 4.95595 15.3333 4.92194 15.3333 4.875H13.3333C13.3333 6.0127 14.2308 7 15.4166 7V5ZM17.6666 4.875C17.6666 4.92194 17.6492 4.95595 17.629 4.97685C17.6095 4.9971 17.5939 5 17.5833 5V7C18.7691 7 19.6666 6.0127 19.6666 4.875H17.6666ZM17.5833 2.5C17.5939 2.5 17.6095 2.5029 17.629 2.52315C17.6492 2.54405 17.6666 2.57806 17.6666 2.625H19.6666C19.6666 1.4873 18.7691 0.5 17.5833 0.5V2.5ZM15.4166 0.5C14.2308 0.5 13.3333 1.4873 13.3333 2.625H15.3333C15.3333 2.57806 15.3508 2.54405 15.3709 2.52315C15.3904 2.5029 15.406 2.5 15.4166 2.5V0.5ZM2.41665 16H4.58331V14H2.41665V16ZM4.66665 16.125V18.375H6.66665V16.125H4.66665ZM4.58331 18.5H2.41665V20.5H4.58331V18.5ZM2.33331 18.375V16.125H0.333313V18.375H2.33331ZM2.41665 18.5C2.40602 18.5 2.39043 18.4971 2.37093 18.4769C2.3508 18.4559 2.33331 18.4219 2.33331 18.375H0.333313C0.333313 19.5127 1.23082 20.5 2.41665 20.5V18.5ZM4.66665 18.375C4.66665 18.4219 4.64916 18.4559 4.62902 18.4769C4.60953 18.4971 4.59394 18.5 4.58331 18.5V20.5C5.76914 20.5 6.66665 19.5127 6.66665 18.375H4.66665ZM4.58331 16C4.59394 16 4.60953 16.0029 4.62902 16.0231C4.64916 16.0441 4.66665 16.0781 4.66665 16.125H6.66665C6.66665 14.9873 5.76914 14 4.58331 14V16ZM2.41665 14C1.23082 14 0.333313 14.9873 0.333313 16.125H2.33331C2.33331 16.0781 2.3508 16.0441 2.37093 16.0231C2.39043 16.0029 2.40602 16 2.41665 16V14ZM8.99998 1.5V2.625H11V1.5H8.99998ZM16.5 16H18.6666V14H16.5V16ZM9.99998 16H12.1666V14H9.99998V16ZM8.99998 15V19.5H11V15H8.99998ZM8.99998 7.125V10.5H11V7.125H8.99998ZM14.3333 20.5H18.6666V18.5H14.3333V20.5ZM1.33331 11.5H5.66665V9.5H1.33331V11.5ZM9.99998 11.5H10.0108V9.5H9.99998V11.5ZM18.6666 11.5H18.6775V9.5H18.6666V11.5ZM9.99998 11.5H14.3441V9.5H9.99998V11.5Z"
61
- fill={
62
- {
63
- "payload": 4283522924,
64
- "type": 0,
65
- }
66
- }
67
- propList={
68
- [
69
- "fill",
70
- ]
71
- }
72
- />
73
- </RNSVGGroup>
74
- </RNSVGSvgView>
75
- </View>
76
- </View>
77
- `;
78
-
79
- exports[`test split-container renders correctly when ONE ELEMENT is provided 1`] = `
80
- <View
81
- style={
82
- {
83
- "paddingLeft": 8,
84
- "paddingRight": 8,
85
- "width": "100%",
86
- }
87
- }
88
- >
89
- <View
90
- style={
91
- [
92
- {
93
- "flexDirection": "row",
94
- "justifyContent": "center",
95
- },
96
- {},
97
- ]
98
- }
99
- >
100
- <View
101
- accessibilityState={
102
- {
103
- "busy": undefined,
104
- "checked": undefined,
105
- "disabled": undefined,
106
- "expanded": undefined,
107
- "selected": undefined,
108
- }
109
- }
110
- accessibilityValue={
111
- {
112
- "max": undefined,
113
- "min": undefined,
114
- "now": undefined,
115
- "text": undefined,
116
- }
117
- }
118
- accessible={true}
119
- collapsable={false}
120
- focusable={true}
121
- onBlur={[Function]}
122
- onClick={[Function]}
123
- onFocus={[Function]}
124
- onResponderGrant={[Function]}
125
- onResponderMove={[Function]}
126
- onResponderRelease={[Function]}
127
- onResponderTerminate={[Function]}
128
- onResponderTerminationRequest={[Function]}
129
- onStartShouldSetResponder={[Function]}
130
- >
131
- <View
132
- style={
133
- {
134
- "alignItems": "center",
135
- "backgroundColor": "#19216C",
136
- "borderRadius": 50,
137
- "flexDirection": "row",
138
- "justifyContent": "center",
139
- "paddingHorizontal": 24,
140
- "paddingVertical": 12,
141
- }
142
- }
143
- >
144
- <View>
145
- <Text
146
- style={
147
- [
148
- [
149
- {
150
- "fontFamily": "SourceSansPro",
151
- "fontSize": 16,
152
- "lineHeight": 22.4,
153
- },
154
- ],
155
- {
156
- "color": "#E0E8F9",
157
- "textAlign": "center",
158
- "width": "100%",
159
- },
160
- undefined,
161
- ]
162
- }
163
- >
164
- Toepassen
165
- </Text>
166
- </View>
167
- </View>
168
- </View>
169
- </View>
170
- </View>
171
- `;
172
-
173
- exports[`test split-container renders correctly when TWO ELEMENTS are provided 1`] = `
174
- <View
175
- style={
176
- {
177
- "paddingLeft": 8,
178
- "paddingRight": 8,
179
- "width": "100%",
180
- }
181
- }
182
- >
183
- <View
184
- style={
185
- [
186
- {
187
- "flexDirection": "row",
188
- "justifyContent": "center",
189
- },
190
- {
191
- "justifyContent": "space-between",
192
- },
193
- ]
194
- }
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
- "backgroundColor": "transparent",
230
- "borderRadius": 50,
231
- "flexDirection": "row",
232
- "justifyContent": "center",
233
- "paddingHorizontal": 24,
234
- "paddingVertical": 12,
235
- }
236
- }
237
- >
238
- <View>
239
- <Text
240
- style={
241
- [
242
- [
243
- {
244
- "fontFamily": "Montserrat",
245
- "fontSize": 13,
246
- "lineHeight": 20.4,
247
- },
248
- ],
249
- {
250
- "color": "#515F6C",
251
- "textAlign": "center",
252
- "width": "100%",
253
- },
254
- undefined,
255
- ]
256
- }
257
- >
258
- Selecteer alle
259
- </Text>
260
- </View>
261
- </View>
262
- <View
263
- accessibilityState={
264
- {
265
- "busy": undefined,
266
- "checked": undefined,
267
- "disabled": undefined,
268
- "expanded": undefined,
269
- "selected": undefined,
270
- }
271
- }
272
- accessibilityValue={
273
- {
274
- "max": undefined,
275
- "min": undefined,
276
- "now": undefined,
277
- "text": undefined,
278
- }
279
- }
280
- accessible={true}
281
- collapsable={false}
282
- focusable={true}
283
- onBlur={[Function]}
284
- onClick={[Function]}
285
- onFocus={[Function]}
286
- onResponderGrant={[Function]}
287
- onResponderMove={[Function]}
288
- onResponderRelease={[Function]}
289
- onResponderTerminate={[Function]}
290
- onResponderTerminationRequest={[Function]}
291
- onStartShouldSetResponder={[Function]}
292
- >
293
- <View
294
- style={
295
- {
296
- "alignItems": "center",
297
- "backgroundColor": "#19216C",
298
- "borderRadius": 50,
299
- "flexDirection": "row",
300
- "justifyContent": "center",
301
- "paddingHorizontal": 24,
302
- "paddingVertical": 12,
303
- }
304
- }
305
- >
306
- <View>
307
- <Text
308
- style={
309
- [
310
- [
311
- {
312
- "fontFamily": "SourceSansPro",
313
- "fontSize": 16,
314
- "lineHeight": 22.4,
315
- },
316
- ],
317
- {
318
- "color": "#E0E8F9",
319
- "textAlign": "center",
320
- "width": "100%",
321
- },
322
- undefined,
323
- ]
324
- }
325
- >
326
- Kies actie
327
- </Text>
328
- </View>
329
- </View>
330
- </View>
331
- </View>
332
- </View>
333
- `;
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {SplitContainer} from './split-container.component';
4
- import {Button} from '../../molecules/button/button.component';
5
- import {QrcodeIcon} from '../../../icons/outline/qrcode/qrcode.icon';
6
- import {SelectLink} from '../../molecules/select-link/select-link.component';
7
-
8
- describe('test split-container', () => {
9
- it('renders correctly when TWO ELEMENTS are provided', () => {
10
- const tree = renderer
11
- .create(
12
- <SplitContainer
13
- element1={
14
- <SelectLink
15
- label={'Selecteer alle'}
16
- onPress={() => console.log('selecteer alle')}
17
- />
18
- }
19
- element2={
20
- <Button
21
- label={'Kies actie'}
22
- onPress={() => console.log('Kies actie')}
23
- />
24
- }
25
- />
26
- )
27
- .toJSON();
28
-
29
- expect(tree).toMatchSnapshot();
30
- });
31
- it('renders correctly when ONE ELEMENT is provided ', () => {
32
- const tree = renderer
33
- .create(<SplitContainer element1={<Button label={'Toepassen'} />} />)
34
- .toJSON();
35
-
36
- expect(tree).toMatchSnapshot();
37
- });
38
- it('renders correctly when A COLORED ICON is provided ', () => {
39
- const tree = renderer
40
- .create(<SplitContainer element1={<QrcodeIcon color={'#515F6C'} />} />)
41
- .toJSON();
42
-
43
- expect(tree).toMatchSnapshot();
44
- });
45
- });