@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,156 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {SendTextBubble} from './send-text-bubble.component';
4
- import {fireEvent, render} from '@testing-library/react-native';
5
- import {VisualState} from '../../../types/visual-state.enum';
6
-
7
- describe('Failed text bubble test', () => {
8
- it('shows a DEFAULT text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
9
- const tree = renderer
10
- .create(
11
- <SendTextBubble
12
- id={'1'}
13
- text={'This is a test'}
14
- visualState="DEFAULT"
15
- onPressEdit={() => alert('edit the message')}
16
- onPressDelete={() => alert('delete the message')}
17
- />
18
- )
19
- .toJSON();
20
-
21
- expect(tree).toMatchSnapshot();
22
- });
23
- it('shows a DEFAULT text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
24
- const tree = renderer
25
- .create(
26
- <SendTextBubble
27
- id={'2'}
28
- text={'This is a test'}
29
- visualState="DEFAULT"
30
- onPressEdit={() => alert('edit the message')}
31
- onPressDelete={() => alert('delete the message')}
32
- />
33
- )
34
- .toJSON();
35
-
36
- expect(tree).toMatchSnapshot();
37
- });
38
- it('shows a WARNING text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
39
- const tree = renderer
40
- .create(
41
- <SendTextBubble
42
- id={'3'}
43
- text={'This is a test'}
44
- visualState="WARNING"
45
- onPressEdit={() => alert('edit the message')}
46
- onPressDelete={() => alert('delete the message')}
47
- />
48
- )
49
- .toJSON();
50
-
51
- expect(tree).toMatchSnapshot();
52
- });
53
- it('shows a WARNING text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
54
- const tree = renderer
55
- .create(
56
- <SendTextBubble
57
- id={'4'}
58
- text={'This is a test'}
59
- visualState="WARNING"
60
- onPressEdit={() => alert('edit the message')}
61
- onPressDelete={() => alert('delete the message')}
62
- />
63
- )
64
- .toJSON();
65
-
66
- expect(tree).toMatchSnapshot();
67
- });
68
- it('shows an ERROR text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
69
- const tree = renderer
70
- .create(
71
- <SendTextBubble
72
- id={'4'}
73
- text={'This is a test'}
74
- visualState="ERROR"
75
- onPressEdit={() => alert('edit the message')}
76
- onPressDelete={() => alert('delete the message')}
77
- />
78
- )
79
- .toJSON();
80
-
81
- expect(tree).toMatchSnapshot();
82
- });
83
- it('shows an ERROR text bubble that is swipeable with edit and trash icon, which if we press them we can edit or delete the message', () => {
84
- const tree = renderer
85
- .create(
86
- <SendTextBubble
87
- id={'5'}
88
- text={'This is a test'}
89
- visualState="ERROR"
90
- onPressEdit={() => alert('edit the message')}
91
- onPressDelete={() => alert('delete the message')}
92
- />
93
- )
94
- .toJSON();
95
-
96
- expect(tree).toMatchSnapshot();
97
- });
98
- });
99
-
100
- describe('SendTextBubble', () => {
101
- const mockId = '123';
102
- const mockText = 'Hello, world!';
103
- const mockVisualState = VisualState.DEFAULT;
104
- const mockOnPressEdit = jest.fn();
105
- const mockOnPressDelete = jest.fn();
106
-
107
- afterEach(() => {
108
- jest.clearAllMocks();
109
- });
110
-
111
- it('should render the component correctly', () => {
112
- const {getByText} = render(
113
- <SendTextBubble
114
- id={mockId}
115
- text={mockText}
116
- visualState={mockVisualState}
117
- onPressEdit={mockOnPressEdit}
118
- onPressDelete={mockOnPressDelete}
119
- />
120
- );
121
-
122
- expect(getByText(mockText)).toBeDefined();
123
- });
124
-
125
- it('should call onPressEdit when the edit button is pressed', () => {
126
- const {getByTestId} = render(
127
- <SendTextBubble
128
- id={mockId}
129
- text={mockText}
130
- visualState={mockVisualState}
131
- onPressEdit={mockOnPressEdit}
132
- onPressDelete={mockOnPressDelete}
133
- />
134
- );
135
-
136
- fireEvent.press(getByTestId('edit-button'));
137
-
138
- expect(mockOnPressEdit).toHaveBeenCalledWith(mockId);
139
- });
140
-
141
- it('should call onPressDelete when the delete button is pressed', () => {
142
- const {getByTestId} = render(
143
- <SendTextBubble
144
- id={mockId}
145
- text={mockText}
146
- visualState={mockVisualState}
147
- onPressEdit={mockOnPressEdit}
148
- onPressDelete={mockOnPressDelete}
149
- />
150
- );
151
-
152
- fireEvent.press(getByTestId('delete-button'));
153
-
154
- expect(mockOnPressDelete).toHaveBeenCalledWith(mockId);
155
- });
156
- });
@@ -1,557 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`test snackbar given the visual state is DEFAULT return a light blue background and black text 1`] = `
4
- <View
5
- style={
6
- [
7
- {
8
- "alignItems": "center",
9
- "borderRadius": 16,
10
- "elevation": 4,
11
- "flexDirection": "row",
12
- "overflow": "hidden",
13
- "paddingBottom": 8,
14
- "paddingLeft": 32,
15
- "paddingRight": 32,
16
- "paddingTop": 8,
17
- "shadowOffset": {
18
- "height": 2,
19
- "width": 0,
20
- },
21
- "shadowOpacity": 0.23,
22
- "shadowRadius": 2.62,
23
- },
24
- false,
25
- false,
26
- false,
27
- false,
28
- ]
29
- }
30
- >
31
- <View
32
- style={
33
- {
34
- "alignItems": "center",
35
- "height": 32,
36
- "justifyContent": "center",
37
- "marginRight": 8,
38
- "width": 32,
39
- }
40
- }
41
- >
42
- <RNSVGSvgView
43
- align="xMidYMid"
44
- bbHeight="24"
45
- bbWidth="24"
46
- fill="none"
47
- focusable={false}
48
- height={24}
49
- meetOrSlice={0}
50
- minX={0}
51
- minY={0}
52
- style={
53
- [
54
- {
55
- "backgroundColor": "transparent",
56
- "borderWidth": 0,
57
- },
58
- {
59
- "flex": 0,
60
- "height": 24,
61
- "width": 24,
62
- },
63
- ]
64
- }
65
- vbHeight={21}
66
- vbWidth={23}
67
- width={24}
68
- >
69
- <RNSVGGroup
70
- fill={null}
71
- propList={
72
- [
73
- "fill",
74
- ]
75
- }
76
- >
77
- <RNSVGPath
78
- d="M11.5 8.125V10.375M11.5 14.875H11.5113M3.70581 19.375H19.2943C21.0263 19.375 22.1088 17.5 21.2428 16L13.4486 2.5C12.5826 1 10.4175 1 9.55148 2.5L1.75725 16C0.891228 17.5 1.97376 19.375 3.70581 19.375Z"
79
- fill={
80
- {
81
- "payload": 4278190080,
82
- "type": 0,
83
- }
84
- }
85
- propList={
86
- [
87
- "stroke",
88
- "strokeWidth",
89
- "strokeLinecap",
90
- "strokeLinejoin",
91
- ]
92
- }
93
- stroke={
94
- {
95
- "payload": 4280232243,
96
- "type": 0,
97
- }
98
- }
99
- strokeLinecap={1}
100
- strokeLinejoin={1}
101
- strokeWidth="2"
102
- />
103
- </RNSVGGroup>
104
- </RNSVGSvgView>
105
- </View>
106
- <View
107
- style={
108
- {
109
- "alignContent": "center",
110
- "flex": 1,
111
- "justifyContent": "center",
112
- "paddingLeft": 32,
113
- "paddingRight": 32,
114
- }
115
- }
116
- >
117
- <Text
118
- style={
119
- [
120
- [
121
- {
122
- "fontFamily": "Montserrat",
123
- "fontSize": 14,
124
- "lineHeight": 22.4,
125
- },
126
- ],
127
- {
128
- "color": "#1F2933",
129
- "textAlign": undefined,
130
- "width": "100%",
131
- },
132
- undefined,
133
- ]
134
- }
135
- >
136
- test
137
- </Text>
138
- </View>
139
- </View>
140
- `;
141
-
142
- exports[`test snackbar given the visual state is ERROR return a red background and white text 1`] = `
143
- <View
144
- style={
145
- [
146
- {
147
- "alignItems": "center",
148
- "borderRadius": 16,
149
- "elevation": 4,
150
- "flexDirection": "row",
151
- "overflow": "hidden",
152
- "paddingBottom": 8,
153
- "paddingLeft": 32,
154
- "paddingRight": 32,
155
- "paddingTop": 8,
156
- "shadowOffset": {
157
- "height": 2,
158
- "width": 0,
159
- },
160
- "shadowOpacity": 0.23,
161
- "shadowRadius": 2.62,
162
- },
163
- false,
164
- false,
165
- false,
166
- false,
167
- ]
168
- }
169
- >
170
- <View
171
- style={
172
- {
173
- "alignItems": "center",
174
- "height": 32,
175
- "justifyContent": "center",
176
- "marginRight": 8,
177
- "width": 32,
178
- }
179
- }
180
- >
181
- <RNSVGSvgView
182
- align="xMidYMid"
183
- bbHeight="24"
184
- bbWidth="24"
185
- fill="none"
186
- focusable={false}
187
- height={24}
188
- meetOrSlice={0}
189
- minX={0}
190
- minY={0}
191
- style={
192
- [
193
- {
194
- "backgroundColor": "transparent",
195
- "borderWidth": 0,
196
- },
197
- {
198
- "flex": 0,
199
- "height": 24,
200
- "width": 24,
201
- },
202
- ]
203
- }
204
- vbHeight={21}
205
- vbWidth={23}
206
- width={24}
207
- >
208
- <RNSVGGroup
209
- fill={null}
210
- propList={
211
- [
212
- "fill",
213
- ]
214
- }
215
- >
216
- <RNSVGPath
217
- d="M11.5 8.125V10.375M11.5 14.875H11.5113M3.70581 19.375H19.2943C21.0263 19.375 22.1088 17.5 21.2428 16L13.4486 2.5C12.5826 1 10.4175 1 9.55148 2.5L1.75725 16C0.891228 17.5 1.97376 19.375 3.70581 19.375Z"
218
- fill={
219
- {
220
- "payload": 4278190080,
221
- "type": 0,
222
- }
223
- }
224
- propList={
225
- [
226
- "stroke",
227
- "strokeWidth",
228
- "strokeLinecap",
229
- "strokeLinejoin",
230
- ]
231
- }
232
- stroke={
233
- {
234
- "payload": 4280232243,
235
- "type": 0,
236
- }
237
- }
238
- strokeLinecap={1}
239
- strokeLinejoin={1}
240
- strokeWidth="2"
241
- />
242
- </RNSVGGroup>
243
- </RNSVGSvgView>
244
- </View>
245
- <View
246
- style={
247
- {
248
- "alignContent": "center",
249
- "flex": 1,
250
- "justifyContent": "center",
251
- "paddingLeft": 32,
252
- "paddingRight": 32,
253
- }
254
- }
255
- >
256
- <Text
257
- style={
258
- [
259
- [
260
- {
261
- "fontFamily": "Montserrat",
262
- "fontSize": 14,
263
- "lineHeight": 22.4,
264
- },
265
- ],
266
- {
267
- "color": "#1F2933",
268
- "textAlign": undefined,
269
- "width": "100%",
270
- },
271
- undefined,
272
- ]
273
- }
274
- >
275
- test
276
- </Text>
277
- </View>
278
- </View>
279
- `;
280
-
281
- exports[`test snackbar given the visual state is SUCCESS return a light green background and black text 1`] = `
282
- <View
283
- style={
284
- [
285
- {
286
- "alignItems": "center",
287
- "borderRadius": 16,
288
- "elevation": 4,
289
- "flexDirection": "row",
290
- "overflow": "hidden",
291
- "paddingBottom": 8,
292
- "paddingLeft": 32,
293
- "paddingRight": 32,
294
- "paddingTop": 8,
295
- "shadowOffset": {
296
- "height": 2,
297
- "width": 0,
298
- },
299
- "shadowOpacity": 0.23,
300
- "shadowRadius": 2.62,
301
- },
302
- false,
303
- false,
304
- false,
305
- false,
306
- ]
307
- }
308
- >
309
- <View
310
- style={
311
- {
312
- "alignItems": "center",
313
- "height": 32,
314
- "justifyContent": "center",
315
- "marginRight": 8,
316
- "width": 32,
317
- }
318
- }
319
- >
320
- <RNSVGSvgView
321
- align="xMidYMid"
322
- bbHeight="24"
323
- bbWidth="24"
324
- fill="none"
325
- focusable={false}
326
- height={24}
327
- meetOrSlice={0}
328
- minX={0}
329
- minY={0}
330
- style={
331
- [
332
- {
333
- "backgroundColor": "transparent",
334
- "borderWidth": 0,
335
- },
336
- {
337
- "flex": 0,
338
- "height": 24,
339
- "width": 24,
340
- },
341
- ]
342
- }
343
- vbHeight={21}
344
- vbWidth={23}
345
- width={24}
346
- >
347
- <RNSVGGroup
348
- fill={null}
349
- propList={
350
- [
351
- "fill",
352
- ]
353
- }
354
- >
355
- <RNSVGPath
356
- d="M11.5 8.125V10.375M11.5 14.875H11.5113M3.70581 19.375H19.2943C21.0263 19.375 22.1088 17.5 21.2428 16L13.4486 2.5C12.5826 1 10.4175 1 9.55148 2.5L1.75725 16C0.891228 17.5 1.97376 19.375 3.70581 19.375Z"
357
- fill={
358
- {
359
- "payload": 4278190080,
360
- "type": 0,
361
- }
362
- }
363
- propList={
364
- [
365
- "stroke",
366
- "strokeWidth",
367
- "strokeLinecap",
368
- "strokeLinejoin",
369
- ]
370
- }
371
- stroke={
372
- {
373
- "payload": 4280232243,
374
- "type": 0,
375
- }
376
- }
377
- strokeLinecap={1}
378
- strokeLinejoin={1}
379
- strokeWidth="2"
380
- />
381
- </RNSVGGroup>
382
- </RNSVGSvgView>
383
- </View>
384
- <View
385
- style={
386
- {
387
- "alignContent": "center",
388
- "flex": 1,
389
- "justifyContent": "center",
390
- "paddingLeft": 32,
391
- "paddingRight": 32,
392
- }
393
- }
394
- >
395
- <Text
396
- style={
397
- [
398
- [
399
- {
400
- "fontFamily": "Montserrat",
401
- "fontSize": 14,
402
- "lineHeight": 22.4,
403
- },
404
- ],
405
- {
406
- "color": "#1F2933",
407
- "textAlign": undefined,
408
- "width": "100%",
409
- },
410
- undefined,
411
- ]
412
- }
413
- >
414
- test
415
- </Text>
416
- </View>
417
- </View>
418
- `;
419
-
420
- exports[`test snackbar given the visual state is WARNING return a light orange background and black text 1`] = `
421
- <View
422
- style={
423
- [
424
- {
425
- "alignItems": "center",
426
- "borderRadius": 16,
427
- "elevation": 4,
428
- "flexDirection": "row",
429
- "overflow": "hidden",
430
- "paddingBottom": 8,
431
- "paddingLeft": 32,
432
- "paddingRight": 32,
433
- "paddingTop": 8,
434
- "shadowOffset": {
435
- "height": 2,
436
- "width": 0,
437
- },
438
- "shadowOpacity": 0.23,
439
- "shadowRadius": 2.62,
440
- },
441
- false,
442
- false,
443
- false,
444
- false,
445
- ]
446
- }
447
- >
448
- <View
449
- style={
450
- {
451
- "alignItems": "center",
452
- "height": 32,
453
- "justifyContent": "center",
454
- "marginRight": 8,
455
- "width": 32,
456
- }
457
- }
458
- >
459
- <RNSVGSvgView
460
- align="xMidYMid"
461
- bbHeight="24"
462
- bbWidth="24"
463
- fill="none"
464
- focusable={false}
465
- height={24}
466
- meetOrSlice={0}
467
- minX={0}
468
- minY={0}
469
- style={
470
- [
471
- {
472
- "backgroundColor": "transparent",
473
- "borderWidth": 0,
474
- },
475
- {
476
- "flex": 0,
477
- "height": 24,
478
- "width": 24,
479
- },
480
- ]
481
- }
482
- vbHeight={21}
483
- vbWidth={23}
484
- width={24}
485
- >
486
- <RNSVGGroup
487
- fill={null}
488
- propList={
489
- [
490
- "fill",
491
- ]
492
- }
493
- >
494
- <RNSVGPath
495
- d="M11.5 8.125V10.375M11.5 14.875H11.5113M3.70581 19.375H19.2943C21.0263 19.375 22.1088 17.5 21.2428 16L13.4486 2.5C12.5826 1 10.4175 1 9.55148 2.5L1.75725 16C0.891228 17.5 1.97376 19.375 3.70581 19.375Z"
496
- fill={
497
- {
498
- "payload": 4278190080,
499
- "type": 0,
500
- }
501
- }
502
- propList={
503
- [
504
- "stroke",
505
- "strokeWidth",
506
- "strokeLinecap",
507
- "strokeLinejoin",
508
- ]
509
- }
510
- stroke={
511
- {
512
- "payload": 4280232243,
513
- "type": 0,
514
- }
515
- }
516
- strokeLinecap={1}
517
- strokeLinejoin={1}
518
- strokeWidth="2"
519
- />
520
- </RNSVGGroup>
521
- </RNSVGSvgView>
522
- </View>
523
- <View
524
- style={
525
- {
526
- "alignContent": "center",
527
- "flex": 1,
528
- "justifyContent": "center",
529
- "paddingLeft": 32,
530
- "paddingRight": 32,
531
- }
532
- }
533
- >
534
- <Text
535
- style={
536
- [
537
- [
538
- {
539
- "fontFamily": "Montserrat",
540
- "fontSize": 14,
541
- "lineHeight": 22.4,
542
- },
543
- ],
544
- {
545
- "color": "#1F2933",
546
- "textAlign": undefined,
547
- "width": "100%",
548
- },
549
- undefined,
550
- ]
551
- }
552
- >
553
- test
554
- </Text>
555
- </View>
556
- </View>
557
- `;