@comicrelief/component-library 8.18.4 → 8.19.1

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 (39) hide show
  1. package/dist/components/Atoms/ErrorText/ErrorText.js +3 -15
  2. package/dist/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +1 -17
  3. package/dist/components/Atoms/Input/Input.js +39 -24
  4. package/dist/components/Atoms/Input/Input.md +1 -2
  5. package/dist/components/Atoms/Input/assets/error-alert-icon-red.svg +10 -0
  6. package/dist/components/Atoms/Input/input.test.js +1 -1
  7. package/dist/components/Atoms/Label/Label.js +16 -10
  8. package/dist/components/Atoms/Select/__snapshots__/Select.test.js.snap +2 -2
  9. package/dist/components/Atoms/TextArea/TextArea.test.js +1 -1
  10. package/dist/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +160 -84
  11. package/dist/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +48 -20
  12. package/dist/components/Molecules/SearchInput/SearchInput.test.js +1 -1
  13. package/dist/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +48 -20
  14. package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +306 -179
  15. package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +89 -59
  16. package/dist/components/Organisms/Membership/Membership.test.js +2 -2
  17. package/package.json +1 -1
  18. package/src/components/Atoms/ErrorText/ErrorText.js +1 -19
  19. package/src/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +1 -17
  20. package/src/components/Atoms/Input/Input.js +54 -20
  21. package/src/components/Atoms/Input/Input.md +1 -2
  22. package/src/components/Atoms/Input/assets/error-alert-icon-red.svg +10 -0
  23. package/src/components/Atoms/Input/input.test.js +44 -16
  24. package/src/components/Atoms/Label/Label.js +25 -9
  25. package/src/components/Atoms/Select/__snapshots__/Select.test.js.snap +2 -2
  26. package/src/components/Atoms/TextArea/TextArea.test.js +2 -2
  27. package/src/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +160 -84
  28. package/src/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +48 -20
  29. package/src/components/Molecules/SearchInput/SearchInput.test.js +47 -19
  30. package/src/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +48 -20
  31. package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +306 -179
  32. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +89 -59
  33. package/src/components/Organisms/Membership/Membership.test.js +121 -86
  34. package/dist/components/Atoms/Input/assets/CR_Error--red.svg +0 -1
  35. package/dist/components/Atoms/Input/assets/CR_Error.svg +0 -1
  36. package/dist/components/Atoms/Input/assets/error-alert-icon.png +0 -0
  37. package/src/components/Atoms/Input/assets/CR_Error--red.svg +0 -1
  38. package/src/components/Atoms/Input/assets/CR_Error.svg +0 -1
  39. package/src/components/Atoms/Input/assets/error-alert-icon.png +0 -0
@@ -5,12 +5,12 @@ exports[`renders correctly 1`] = `
5
5
  font-size: 1rem;
6
6
  line-height: 1rem;
7
7
  text-transform: inherit;
8
- font-weight: bold;
9
8
  line-height: normal;
10
9
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
11
10
  }
12
11
 
13
12
  .c1 {
13
+ width: 100%;
14
14
  position: relative;
15
15
  display: -webkit-box;
16
16
  display: -webkit-flex;
@@ -20,19 +20,41 @@ exports[`renders correctly 1`] = `
20
20
  -ms-flex-direction: column;
21
21
  flex-direction: column;
22
22
  color: #5C5C5E;
23
- width: 100%;
24
23
  }
25
24
 
26
25
  .c3 {
27
26
  margin-bottom: 0.5rem;
27
+ font-weight: normal;
28
+ }
29
+
30
+ .c4 {
31
+ position: relative;
32
+ font-size: 1.25rem;
28
33
  }
29
34
 
30
35
  .c5 {
36
+ position: relative;
37
+ width: 100%;
38
+ display: -webkit-box;
39
+ display: -webkit-flex;
40
+ display: -ms-flexbox;
41
+ display: flex;
42
+ -webkit-box-pack: end;
43
+ -webkit-justify-content: flex-end;
44
+ -ms-flex-pack: end;
45
+ justify-content: flex-end;
46
+ -webkit-align-items: center;
47
+ -webkit-box-align: center;
48
+ -ms-flex-align: center;
49
+ align-items: center;
50
+ }
51
+
52
+ .c6 {
31
53
  position: relative;
32
54
  box-sizing: border-box;
33
55
  width: 100%;
34
56
  height: 48px;
35
- padding: 1rem 1.5rem;
57
+ padding: 1rem 2.4rem 1rem 1.5rem;
36
58
  background-color: #F4F3F5;
37
59
  border: 1px solid;
38
60
  border-color: #E1E2E3;
@@ -47,15 +69,10 @@ exports[`renders correctly 1`] = `
47
69
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
48
70
  }
49
71
 
50
- .c5:focus {
72
+ .c6:focus {
51
73
  border: 1px solid #666;
52
74
  }
53
75
 
54
- .c4 {
55
- position: relative;
56
- font-size: 1.25rem;
57
- }
58
-
59
76
  .c0 {
60
77
  position: relative;
61
78
  }
@@ -66,6 +83,12 @@ exports[`renders correctly 1`] = `
66
83
  }
67
84
  }
68
85
 
86
+ @media (min-width:740px) {
87
+ .c6 {
88
+ max-width: 290px;
89
+ }
90
+ }
91
+
69
92
  <div
70
93
  className="c0 TextInputWithDropdown"
71
94
  onKeyDown={[Function]}
@@ -88,18 +111,23 @@ exports[`renders correctly 1`] = `
88
111
  className="c4"
89
112
  >
90
113
 
91
- <input
92
- aria-describedby="school-lookup"
93
- autoComplete="off"
114
+ <div
94
115
  className="c5"
95
- defaultValue=""
96
- id="school-lookup"
97
- name="school-lookup"
98
- onChange={[Function]}
99
- placeholder="Type to start search"
100
- required={false}
101
- type="text"
102
- />
116
+ >
117
+ <input
118
+ aria-describedby="school-lookup"
119
+ autoComplete="off"
120
+ className="c6"
121
+ defaultValue=""
122
+ id="school-lookup"
123
+ name="school-lookup"
124
+ onChange={[Function]}
125
+ placeholder="Type to start search"
126
+ required={false}
127
+ type="text"
128
+ />
129
+
130
+ </div>
103
131
  </div>
104
132
 
105
133
  </label>
@@ -24,6 +24,7 @@ it('renders correctly', () => {
24
24
  }
25
25
 
26
26
  .c4 {
27
+ width: 100%;
27
28
  position: relative;
28
29
  display: -webkit-box;
29
30
  display: -webkit-flex;
@@ -33,7 +34,6 @@ it('renders correctly', () => {
33
34
  -ms-flex-direction: column;
34
35
  flex-direction: column;
35
36
  color: #5C5C5E;
36
- width: 100%;
37
37
  }
38
38
 
39
39
  .c7 {
@@ -51,12 +51,34 @@ it('renders correctly', () => {
51
51
  width: 1px;
52
52
  }
53
53
 
54
+ .c8 {
55
+ position: relative;
56
+ font-size: 1.25rem;
57
+ }
58
+
54
59
  .c9 {
60
+ position: relative;
61
+ width: 100%;
62
+ display: -webkit-box;
63
+ display: -webkit-flex;
64
+ display: -ms-flexbox;
65
+ display: flex;
66
+ -webkit-box-pack: end;
67
+ -webkit-justify-content: flex-end;
68
+ -ms-flex-pack: end;
69
+ justify-content: flex-end;
70
+ -webkit-align-items: center;
71
+ -webkit-box-align: center;
72
+ -ms-flex-align: center;
73
+ align-items: center;
74
+ }
75
+
76
+ .c10 {
55
77
  position: relative;
56
78
  box-sizing: border-box;
57
79
  width: 100%;
58
80
  height: 48px;
59
- padding: 1rem 1.5rem;
81
+ padding: 1rem 2.4rem 1rem 1.5rem;
60
82
  background-color: #F4F3F5;
61
83
  border: 1px solid;
62
84
  border-color: #E1E2E3;
@@ -71,15 +93,10 @@ it('renders correctly', () => {
71
93
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
72
94
  }
73
95
 
74
- .c9:focus {
96
+ .c10:focus {
75
97
  border: 1px solid #666;
76
98
  }
77
99
 
78
- .c8 {
79
- position: relative;
80
- font-size: 1.25rem;
81
- }
82
-
83
100
  .c0 {
84
101
  width: 100%;
85
102
  max-width: 1440px;
@@ -122,6 +139,12 @@ it('renders correctly', () => {
122
139
  }
123
140
  }
124
141
 
142
+ @media (min-width:740px) {
143
+ .c10 {
144
+ max-width: 290px;
145
+ }
146
+ }
147
+
125
148
  @media (min-width:740px) {
126
149
  .c5 input {
127
150
  height: 100px;
@@ -160,18 +183,23 @@ it('renders correctly', () => {
160
183
  className="c8"
161
184
  >
162
185
 
163
- <input
164
- aria-describedby="search"
186
+ <div
165
187
  className="c9"
166
- id="search"
167
- name="search"
168
- onChange={[Function]}
169
- placeholder=""
170
- required={false}
171
- role="searchbox"
172
- type="text"
173
- value=""
174
- />
188
+ >
189
+ <input
190
+ aria-describedby="search"
191
+ className="c10"
192
+ id="search"
193
+ name="search"
194
+ onChange={[Function]}
195
+ placeholder=""
196
+ required={false}
197
+ role="searchbox"
198
+ type="text"
199
+ value=""
200
+ />
201
+
202
+ </div>
175
203
  </div>
176
204
 
177
205
  </label>
@@ -5,12 +5,12 @@ exports[`renders correctly 1`] = `
5
5
  font-size: 1rem;
6
6
  line-height: 1rem;
7
7
  text-transform: inherit;
8
- font-weight: bold;
9
8
  line-height: normal;
10
9
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
11
10
  }
12
11
 
13
12
  .c1 {
13
+ width: 100%;
14
14
  position: relative;
15
15
  display: -webkit-box;
16
16
  display: -webkit-flex;
@@ -20,19 +20,41 @@ exports[`renders correctly 1`] = `
20
20
  -ms-flex-direction: column;
21
21
  flex-direction: column;
22
22
  color: #5C5C5E;
23
- width: 100%;
24
23
  }
25
24
 
26
25
  .c3 {
27
26
  margin-bottom: 0.5rem;
27
+ font-weight: normal;
28
+ }
29
+
30
+ .c4 {
31
+ position: relative;
32
+ font-size: 1.25rem;
28
33
  }
29
34
 
30
35
  .c5 {
36
+ position: relative;
37
+ width: 100%;
38
+ display: -webkit-box;
39
+ display: -webkit-flex;
40
+ display: -ms-flexbox;
41
+ display: flex;
42
+ -webkit-box-pack: end;
43
+ -webkit-justify-content: flex-end;
44
+ -ms-flex-pack: end;
45
+ justify-content: flex-end;
46
+ -webkit-align-items: center;
47
+ -webkit-box-align: center;
48
+ -ms-flex-align: center;
49
+ align-items: center;
50
+ }
51
+
52
+ .c6 {
31
53
  position: relative;
32
54
  box-sizing: border-box;
33
55
  width: 100%;
34
56
  height: 48px;
35
- padding: 1rem 1.5rem;
57
+ padding: 1rem 2.4rem 1rem 1.5rem;
36
58
  background-color: #F4F3F5;
37
59
  border: 1px solid;
38
60
  border-color: #E1E2E3;
@@ -47,15 +69,10 @@ exports[`renders correctly 1`] = `
47
69
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
48
70
  }
49
71
 
50
- .c5:focus {
72
+ .c6:focus {
51
73
  border: 1px solid #666;
52
74
  }
53
75
 
54
- .c4 {
55
- position: relative;
56
- font-size: 1.25rem;
57
- }
58
-
59
76
  .c0 {
60
77
  position: relative;
61
78
  }
@@ -66,6 +83,12 @@ exports[`renders correctly 1`] = `
66
83
  }
67
84
  }
68
85
 
86
+ @media (min-width:740px) {
87
+ .c6 {
88
+ max-width: 290px;
89
+ }
90
+ }
91
+
69
92
  <div
70
93
  className="c0 TextInputWithDropdown"
71
94
  onKeyDown={[Function]}
@@ -88,18 +111,23 @@ exports[`renders correctly 1`] = `
88
111
  className="c4"
89
112
  >
90
113
 
91
- <input
92
- aria-describedby="typeahead-test"
93
- autoComplete="off"
114
+ <div
94
115
  className="c5"
95
- defaultValue=""
96
- id="typeahead-test"
97
- name="q"
98
- onChange={[Function]}
99
- placeholder="Type to start searching..."
100
- required={false}
101
- type="text"
102
- />
116
+ >
117
+ <input
118
+ aria-describedby="typeahead-test"
119
+ autoComplete="off"
120
+ className="c6"
121
+ defaultValue=""
122
+ id="typeahead-test"
123
+ name="q"
124
+ onChange={[Function]}
125
+ placeholder="Type to start searching..."
126
+ required={false}
127
+ type="text"
128
+ />
129
+
130
+ </div>
103
131
  </div>
104
132
 
105
133
  </label>