@comicrelief/component-library 8.19.0 → 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.
- package/dist/components/Atoms/Input/Input.js +32 -29
- package/dist/components/Atoms/Input/input.test.js +1 -1
- package/dist/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +148 -64
- package/dist/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +45 -17
- package/dist/components/Molecules/SearchInput/SearchInput.test.js +1 -1
- package/dist/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +45 -17
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +298 -171
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +92 -54
- package/dist/components/Organisms/Membership/Membership.test.js +1 -1
- package/package.json +1 -1
- package/src/components/Atoms/Input/Input.js +42 -32
- package/src/components/Atoms/Input/input.test.js +41 -13
- package/src/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +148 -64
- package/src/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +45 -17
- package/src/components/Molecules/SearchInput/SearchInput.test.js +46 -18
- package/src/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +45 -17
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +298 -171
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +92 -54
- package/src/components/Organisms/Membership/Membership.test.js +122 -79
|
@@ -16,51 +16,54 @@ var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
|
|
|
16
16
|
// This seems to get a decent approximation of the necessary width (without resorting to measuring
|
|
17
17
|
// the element with JS)
|
|
18
18
|
const getPrefixWidth = prefixLength => "calc(1.5rem + (".concat(prefixLength, " * 0.5rem))");
|
|
19
|
-
const
|
|
20
|
-
displayName: "
|
|
19
|
+
const InputWrapper = _styledComponents.default.div.withConfig({
|
|
20
|
+
displayName: "Input__InputWrapper",
|
|
21
21
|
componentId: "sc-bcqy1o-0"
|
|
22
|
-
})(["", ""], _ref => {
|
|
22
|
+
})(["position:relative;font-size:", ";"], _ref => {
|
|
23
23
|
let {
|
|
24
|
-
theme
|
|
25
|
-
error,
|
|
26
|
-
prefixLength
|
|
24
|
+
theme
|
|
27
25
|
} = _ref;
|
|
28
|
-
return
|
|
26
|
+
return theme.fontSize('m');
|
|
29
27
|
});
|
|
30
|
-
const
|
|
31
|
-
displayName: "
|
|
28
|
+
const InputFieldContainer = _styledComponents.default.div.withConfig({
|
|
29
|
+
displayName: "Input__InputFieldContainer",
|
|
32
30
|
componentId: "sc-bcqy1o-1"
|
|
33
|
-
})(["position:relative;
|
|
31
|
+
})(["position:relative;width:100%;display:flex;justify-content:flex-end;align-items:center;@media ", "{max-width:290px;}"], _ref2 => {
|
|
34
32
|
let {
|
|
35
33
|
theme
|
|
36
34
|
} = _ref2;
|
|
37
|
-
return theme.
|
|
38
|
-
}
|
|
35
|
+
return theme.allBreakpoints('M');
|
|
36
|
+
});
|
|
37
|
+
const InputField = _styledComponents.default.input.withConfig({
|
|
38
|
+
displayName: "Input__InputField",
|
|
39
|
+
componentId: "sc-bcqy1o-2"
|
|
40
|
+
})(["", ""], _ref3 => {
|
|
39
41
|
let {
|
|
40
|
-
|
|
42
|
+
theme,
|
|
43
|
+
error,
|
|
44
|
+
prefixLength
|
|
41
45
|
} = _ref3;
|
|
42
|
-
return
|
|
43
|
-
}, _ref4 => {
|
|
44
|
-
let {
|
|
45
|
-
theme
|
|
46
|
-
} = _ref4;
|
|
47
|
-
return theme.allBreakpoints('M');
|
|
46
|
+
return (0, _styledComponents.css)(["position:relative;box-sizing:border-box;width:100%;height:48px;padding:1rem 2.4rem 1rem 1.5rem;", " background-color:", ";border:1px solid;border-color:", ";box-shadow:none;appearance:none;color:", ";border-radius:0.5rem;font-size:inherit;z-index:2;font-family:", ";:focus{border:1px solid ", ";}@media ", "{max-width:290px;}"], prefixLength > 0 ? "padding-left: ".concat(getPrefixWidth(prefixLength), ";") : '', theme.color('grey_light'), error ? theme.color('red') : theme.color('grey_medium'), theme.color('black'), theme.fontFamilies(theme.font.regular), theme.color('grey_for_forms'), theme.allBreakpoints('M'));
|
|
48
47
|
});
|
|
48
|
+
const ErrorIconWrapper = _styledComponents.default.div.withConfig({
|
|
49
|
+
displayName: "Input__ErrorIconWrapper",
|
|
50
|
+
componentId: "sc-bcqy1o-3"
|
|
51
|
+
})(["position:absolute;right:0.6rem;background:url(", ") center/contain no-repeat;--iconSize:19px;width:var(--iconSize);height:var(--iconSize);z-index:3;"], _errorAlertIconRed.default);
|
|
49
52
|
const Prefix = _styledComponents.default.div.withConfig({
|
|
50
53
|
displayName: "Input__Prefix",
|
|
51
|
-
componentId: "sc-bcqy1o-
|
|
52
|
-
})(["position:absolute;left:0;top:0;", " display:flex;height:100%;width:", ";justify-content:center;align-items:center;color:", ";font-weight:700;font-size:inherit;margin-left:2px;"], (0, _zIndex.default)('high'),
|
|
54
|
+
componentId: "sc-bcqy1o-4"
|
|
55
|
+
})(["position:absolute;left:0;top:0;", " display:flex;height:100%;width:", ";justify-content:center;align-items:center;color:", ";font-weight:700;font-size:inherit;margin-left:2px;"], (0, _zIndex.default)('high'), _ref4 => {
|
|
53
56
|
let {
|
|
54
57
|
length
|
|
55
|
-
} =
|
|
58
|
+
} = _ref4;
|
|
56
59
|
return getPrefixWidth(length);
|
|
57
|
-
},
|
|
60
|
+
}, _ref5 => {
|
|
58
61
|
let {
|
|
59
62
|
theme
|
|
60
|
-
} =
|
|
63
|
+
} = _ref5;
|
|
61
64
|
return theme.color('grey_dark');
|
|
62
65
|
});
|
|
63
|
-
const Input = /*#__PURE__*/_react.default.forwardRef((
|
|
66
|
+
const Input = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
64
67
|
let {
|
|
65
68
|
errorMsg = '',
|
|
66
69
|
id,
|
|
@@ -74,7 +77,7 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref7, ref) => {
|
|
|
74
77
|
prefix = '',
|
|
75
78
|
optional = null,
|
|
76
79
|
...rest
|
|
77
|
-
} =
|
|
80
|
+
} = _ref6;
|
|
78
81
|
return /*#__PURE__*/_react.default.createElement(_Label.default, Object.assign({
|
|
79
82
|
className: className,
|
|
80
83
|
htmlFor: id,
|
|
@@ -86,16 +89,16 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref7, ref) => {
|
|
|
86
89
|
error: Boolean(errorMsg)
|
|
87
90
|
}, prefix && /*#__PURE__*/_react.default.createElement(Prefix, {
|
|
88
91
|
length: prefix.length
|
|
89
|
-
}, prefix), /*#__PURE__*/_react.default.createElement(InputField, Object.assign({
|
|
92
|
+
}, prefix), /*#__PURE__*/_react.default.createElement(InputFieldContainer, null, /*#__PURE__*/_react.default.createElement(InputField, Object.assign({
|
|
90
93
|
id: id,
|
|
91
94
|
type: type,
|
|
92
95
|
placeholder: placeholder,
|
|
93
|
-
error:
|
|
96
|
+
error: Boolean(errorMsg),
|
|
94
97
|
"aria-describedby": hasAria ? id : undefined,
|
|
95
98
|
ref: ref,
|
|
96
99
|
prefixLength: prefix.length,
|
|
97
100
|
required: optional === false
|
|
98
|
-
}, rest))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
101
|
+
}, rest)), errorMsg && /*#__PURE__*/_react.default.createElement(ErrorIconWrapper, null))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
99
102
|
size: "sm",
|
|
100
103
|
weight: "bold",
|
|
101
104
|
"data-test": "error-message"
|
|
@@ -14,5 +14,5 @@ it('renders correctly', () => {
|
|
|
14
14
|
errorMsg: "",
|
|
15
15
|
id: "Accessibility info go here"
|
|
16
16
|
})).toJSON();
|
|
17
|
-
expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c4 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .
|
|
17
|
+
expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c3 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c4 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c5 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c5:focus {\n border: 1px solid #666;\n }\n\n @media (min-width:740px) {\n .c4 {\n max-width: 290px;\n }\n }\n\n @media (min-width:740px) {\n .c5 {\n max-width: 290px;\n }\n }\n\n <label\n className=\"c0\"\n htmlFor=\"Accessibility info go here\"\n >\n <span\n className=\"c1 c2\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Label\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c3\"\n >\n \n <div\n className=\"c4\"\n >\n <input\n aria-describedby=\"Accessibility info go here\"\n className=\"c5\"\n id=\"Accessibility info go here\"\n name=\"fullname\"\n placeholder=\"This is the hint text\"\n required={false}\n type=\"text\"\n />\n \n </div>\n </div>\n \n </label>\n ");
|
|
18
18
|
});
|
package/dist/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap
CHANGED
|
@@ -27,7 +27,29 @@ exports[`renders correctly with no value and no options 1`] = `
|
|
|
27
27
|
font-weight: normal;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.c4 {
|
|
31
|
+
position: relative;
|
|
32
|
+
font-size: 1.25rem;
|
|
33
|
+
}
|
|
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%;
|
|
@@ -47,21 +69,22 @@ exports[`renders correctly with no value and no options 1`] = `
|
|
|
47
69
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
48
70
|
}
|
|
49
71
|
|
|
50
|
-
.
|
|
72
|
+
.c6:focus {
|
|
51
73
|
border: 1px solid #666;
|
|
52
74
|
}
|
|
53
75
|
|
|
54
|
-
.
|
|
76
|
+
.c0 {
|
|
55
77
|
position: relative;
|
|
56
|
-
font-size: 1.25rem;
|
|
57
78
|
}
|
|
58
79
|
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
@media (min-width:740px) {
|
|
81
|
+
.c5 {
|
|
82
|
+
max-width: 290px;
|
|
83
|
+
}
|
|
61
84
|
}
|
|
62
85
|
|
|
63
86
|
@media (min-width:740px) {
|
|
64
|
-
.
|
|
87
|
+
.c6 {
|
|
65
88
|
max-width: 290px;
|
|
66
89
|
}
|
|
67
90
|
}
|
|
@@ -88,18 +111,23 @@ exports[`renders correctly with no value and no options 1`] = `
|
|
|
88
111
|
className="c4"
|
|
89
112
|
>
|
|
90
113
|
|
|
91
|
-
<
|
|
92
|
-
aria-describedby="text-input-with-dropdown"
|
|
93
|
-
autoComplete="off"
|
|
114
|
+
<div
|
|
94
115
|
className="c5"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
>
|
|
117
|
+
<input
|
|
118
|
+
aria-describedby="text-input-with-dropdown"
|
|
119
|
+
autoComplete="off"
|
|
120
|
+
className="c6"
|
|
121
|
+
id="text-input-with-dropdown"
|
|
122
|
+
name="query"
|
|
123
|
+
onChange={[Function]}
|
|
124
|
+
placeholder=""
|
|
125
|
+
required={false}
|
|
126
|
+
type="text"
|
|
127
|
+
value=""
|
|
128
|
+
/>
|
|
129
|
+
|
|
130
|
+
</div>
|
|
103
131
|
</div>
|
|
104
132
|
|
|
105
133
|
</label>
|
|
@@ -133,7 +161,29 @@ exports[`renders correctly with value and no options 1`] = `
|
|
|
133
161
|
font-weight: normal;
|
|
134
162
|
}
|
|
135
163
|
|
|
164
|
+
.c4 {
|
|
165
|
+
position: relative;
|
|
166
|
+
font-size: 1.25rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
136
169
|
.c5 {
|
|
170
|
+
position: relative;
|
|
171
|
+
width: 100%;
|
|
172
|
+
display: -webkit-box;
|
|
173
|
+
display: -webkit-flex;
|
|
174
|
+
display: -ms-flexbox;
|
|
175
|
+
display: flex;
|
|
176
|
+
-webkit-box-pack: end;
|
|
177
|
+
-webkit-justify-content: flex-end;
|
|
178
|
+
-ms-flex-pack: end;
|
|
179
|
+
justify-content: flex-end;
|
|
180
|
+
-webkit-align-items: center;
|
|
181
|
+
-webkit-box-align: center;
|
|
182
|
+
-ms-flex-align: center;
|
|
183
|
+
align-items: center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.c6 {
|
|
137
187
|
position: relative;
|
|
138
188
|
box-sizing: border-box;
|
|
139
189
|
width: 100%;
|
|
@@ -153,21 +203,22 @@ exports[`renders correctly with value and no options 1`] = `
|
|
|
153
203
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
154
204
|
}
|
|
155
205
|
|
|
156
|
-
.
|
|
206
|
+
.c6:focus {
|
|
157
207
|
border: 1px solid #666;
|
|
158
208
|
}
|
|
159
209
|
|
|
160
|
-
.
|
|
210
|
+
.c0 {
|
|
161
211
|
position: relative;
|
|
162
|
-
font-size: 1.25rem;
|
|
163
212
|
}
|
|
164
213
|
|
|
165
|
-
|
|
166
|
-
|
|
214
|
+
@media (min-width:740px) {
|
|
215
|
+
.c5 {
|
|
216
|
+
max-width: 290px;
|
|
217
|
+
}
|
|
167
218
|
}
|
|
168
219
|
|
|
169
220
|
@media (min-width:740px) {
|
|
170
|
-
.
|
|
221
|
+
.c6 {
|
|
171
222
|
max-width: 290px;
|
|
172
223
|
}
|
|
173
224
|
}
|
|
@@ -194,18 +245,23 @@ exports[`renders correctly with value and no options 1`] = `
|
|
|
194
245
|
className="c4"
|
|
195
246
|
>
|
|
196
247
|
|
|
197
|
-
<
|
|
198
|
-
aria-describedby="text-input-with-dropdown"
|
|
199
|
-
autoComplete="off"
|
|
248
|
+
<div
|
|
200
249
|
className="c5"
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
250
|
+
>
|
|
251
|
+
<input
|
|
252
|
+
aria-describedby="text-input-with-dropdown"
|
|
253
|
+
autoComplete="off"
|
|
254
|
+
className="c6"
|
|
255
|
+
id="text-input-with-dropdown"
|
|
256
|
+
name="query"
|
|
257
|
+
onChange={[Function]}
|
|
258
|
+
placeholder=""
|
|
259
|
+
required={false}
|
|
260
|
+
type="text"
|
|
261
|
+
value="bikes"
|
|
262
|
+
/>
|
|
263
|
+
|
|
264
|
+
</div>
|
|
209
265
|
</div>
|
|
210
266
|
|
|
211
267
|
</label>
|
|
@@ -239,7 +295,29 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
239
295
|
font-weight: normal;
|
|
240
296
|
}
|
|
241
297
|
|
|
298
|
+
.c4 {
|
|
299
|
+
position: relative;
|
|
300
|
+
font-size: 1.25rem;
|
|
301
|
+
}
|
|
302
|
+
|
|
242
303
|
.c5 {
|
|
304
|
+
position: relative;
|
|
305
|
+
width: 100%;
|
|
306
|
+
display: -webkit-box;
|
|
307
|
+
display: -webkit-flex;
|
|
308
|
+
display: -ms-flexbox;
|
|
309
|
+
display: flex;
|
|
310
|
+
-webkit-box-pack: end;
|
|
311
|
+
-webkit-justify-content: flex-end;
|
|
312
|
+
-ms-flex-pack: end;
|
|
313
|
+
justify-content: flex-end;
|
|
314
|
+
-webkit-align-items: center;
|
|
315
|
+
-webkit-box-align: center;
|
|
316
|
+
-ms-flex-align: center;
|
|
317
|
+
align-items: center;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.c6 {
|
|
243
321
|
position: relative;
|
|
244
322
|
box-sizing: border-box;
|
|
245
323
|
width: 100%;
|
|
@@ -259,20 +337,15 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
259
337
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
260
338
|
}
|
|
261
339
|
|
|
262
|
-
.
|
|
340
|
+
.c6:focus {
|
|
263
341
|
border: 1px solid #666;
|
|
264
342
|
}
|
|
265
343
|
|
|
266
|
-
.c4 {
|
|
267
|
-
position: relative;
|
|
268
|
-
font-size: 1.25rem;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
344
|
.c0 {
|
|
272
345
|
position: relative;
|
|
273
346
|
}
|
|
274
347
|
|
|
275
|
-
.
|
|
348
|
+
.c7 {
|
|
276
349
|
z-index: 3;
|
|
277
350
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
278
351
|
position: absolute;
|
|
@@ -285,34 +358,40 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
285
358
|
width: 100%;
|
|
286
359
|
}
|
|
287
360
|
|
|
288
|
-
.
|
|
361
|
+
.c8 {
|
|
289
362
|
list-style: none;
|
|
290
363
|
padding: 0;
|
|
291
364
|
margin: 0;
|
|
292
365
|
}
|
|
293
366
|
|
|
294
|
-
.
|
|
367
|
+
.c9 {
|
|
295
368
|
padding: 0.5rem;
|
|
296
369
|
}
|
|
297
370
|
|
|
298
|
-
.
|
|
371
|
+
.c10 {
|
|
299
372
|
cursor: pointer;
|
|
300
373
|
border-top: 1px solid #F4F3F5;
|
|
301
374
|
}
|
|
302
375
|
|
|
303
|
-
.
|
|
304
|
-
.
|
|
376
|
+
.c10:hover,
|
|
377
|
+
.c10:focus {
|
|
305
378
|
background-color: #F4F3F5;
|
|
306
379
|
}
|
|
307
380
|
|
|
308
381
|
@media (min-width:740px) {
|
|
309
|
-
.
|
|
382
|
+
.c5 {
|
|
310
383
|
max-width: 290px;
|
|
311
384
|
}
|
|
312
385
|
}
|
|
313
386
|
|
|
314
387
|
@media (min-width:740px) {
|
|
315
388
|
.c6 {
|
|
389
|
+
max-width: 290px;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@media (min-width:740px) {
|
|
394
|
+
.c7 {
|
|
316
395
|
max-width: 500px;
|
|
317
396
|
}
|
|
318
397
|
}
|
|
@@ -339,32 +418,37 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
339
418
|
className="c4"
|
|
340
419
|
>
|
|
341
420
|
|
|
342
|
-
<
|
|
343
|
-
aria-describedby="text-input-with-dropdown"
|
|
344
|
-
autoComplete="off"
|
|
421
|
+
<div
|
|
345
422
|
className="c5"
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
423
|
+
>
|
|
424
|
+
<input
|
|
425
|
+
aria-describedby="text-input-with-dropdown"
|
|
426
|
+
autoComplete="off"
|
|
427
|
+
className="c6"
|
|
428
|
+
id="text-input-with-dropdown"
|
|
429
|
+
name="query"
|
|
430
|
+
onChange={[Function]}
|
|
431
|
+
placeholder=""
|
|
432
|
+
required={false}
|
|
433
|
+
type="text"
|
|
434
|
+
value="c"
|
|
435
|
+
/>
|
|
436
|
+
|
|
437
|
+
</div>
|
|
354
438
|
</div>
|
|
355
439
|
|
|
356
440
|
</label>
|
|
357
441
|
<div
|
|
358
|
-
className="
|
|
442
|
+
className="c7 TextInputWithDropdown__options"
|
|
359
443
|
>
|
|
360
444
|
<ul
|
|
361
|
-
className="
|
|
445
|
+
className="c8"
|
|
362
446
|
onBlur={[Function]}
|
|
363
447
|
role="listbox"
|
|
364
448
|
>
|
|
365
449
|
<li
|
|
366
450
|
aria-selected={false}
|
|
367
|
-
className="
|
|
451
|
+
className="c9 c10"
|
|
368
452
|
id="option-0"
|
|
369
453
|
onClick={[Function]}
|
|
370
454
|
onKeyPress={[Function]}
|
|
@@ -381,7 +465,7 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
381
465
|
</li>
|
|
382
466
|
<li
|
|
383
467
|
aria-selected={false}
|
|
384
|
-
className="
|
|
468
|
+
className="c9 c10"
|
|
385
469
|
id="option-1"
|
|
386
470
|
onClick={[Function]}
|
|
387
471
|
onKeyPress={[Function]}
|
|
@@ -398,7 +482,7 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
398
482
|
</li>
|
|
399
483
|
<li
|
|
400
484
|
aria-selected={false}
|
|
401
|
-
className="
|
|
485
|
+
className="c9 c10"
|
|
402
486
|
id="option-2"
|
|
403
487
|
onClick={[Function]}
|
|
404
488
|
onKeyPress={[Function]}
|
|
@@ -415,7 +499,7 @@ exports[`renders correctly with value and options 1`] = `
|
|
|
415
499
|
</li>
|
|
416
500
|
<li
|
|
417
501
|
aria-selected={false}
|
|
418
|
-
className="
|
|
502
|
+
className="c9 c10"
|
|
419
503
|
id="option-3"
|
|
420
504
|
onClick={[Function]}
|
|
421
505
|
onKeyPress={[Function]}
|
|
@@ -27,7 +27,29 @@ exports[`renders correctly 1`] = `
|
|
|
27
27
|
font-weight: normal;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.c4 {
|
|
31
|
+
position: relative;
|
|
32
|
+
font-size: 1.25rem;
|
|
33
|
+
}
|
|
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%;
|
|
@@ -47,21 +69,22 @@ exports[`renders correctly 1`] = `
|
|
|
47
69
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
48
70
|
}
|
|
49
71
|
|
|
50
|
-
.
|
|
72
|
+
.c6:focus {
|
|
51
73
|
border: 1px solid #666;
|
|
52
74
|
}
|
|
53
75
|
|
|
54
|
-
.
|
|
76
|
+
.c0 {
|
|
55
77
|
position: relative;
|
|
56
|
-
font-size: 1.25rem;
|
|
57
78
|
}
|
|
58
79
|
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
@media (min-width:740px) {
|
|
81
|
+
.c5 {
|
|
82
|
+
max-width: 290px;
|
|
83
|
+
}
|
|
61
84
|
}
|
|
62
85
|
|
|
63
86
|
@media (min-width:740px) {
|
|
64
|
-
.
|
|
87
|
+
.c6 {
|
|
65
88
|
max-width: 290px;
|
|
66
89
|
}
|
|
67
90
|
}
|
|
@@ -88,18 +111,23 @@ exports[`renders correctly 1`] = `
|
|
|
88
111
|
className="c4"
|
|
89
112
|
>
|
|
90
113
|
|
|
91
|
-
<
|
|
92
|
-
aria-describedby="school-lookup"
|
|
93
|
-
autoComplete="off"
|
|
114
|
+
<div
|
|
94
115
|
className="c5"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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>
|
|
@@ -13,5 +13,5 @@ it('renders correctly', () => {
|
|
|
13
13
|
},
|
|
14
14
|
value: ""
|
|
15
15
|
})).toJSON();
|
|
16
|
-
expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c4 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c7 {\n border: 0;\n -webkit-clip: rect(0 0 0 0);\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n .c9 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .
|
|
16
|
+
expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c4 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c7 {\n border: 0;\n -webkit-clip: rect(0 0 0 0);\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n .c8 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c9 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c10 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10:focus {\n border: 1px solid #666;\n }\n\n .c0 {\n width: 100%;\n max-width: 1440px;\n margin: auto;\n }\n\n .c1 {\n margin: 1rem auto;\n padding: 0 calc((4 * 0.25rem));\n }\n\n .c2 {\n margin: 4rem auto;\n width: 100%;\n border-bottom: 4px solid #E52630;\n overflow: hidden;\n }\n\n .c3 {\n width: 100%;\n padding: 0 0.5rem;\n }\n\n .c5 input {\n padding: 13px 0;\n margin: 0;\n max-width: 100%;\n border: 0;\n outline: #E52630;\n background: none;\n }\n\n .c5 input:focus {\n border: 0;\n }\n\n @media (min-width:740px) {\n .c9 {\n max-width: 290px;\n }\n }\n\n @media (min-width:740px) {\n .c10 {\n max-width: 290px;\n }\n }\n\n @media (min-width:740px) {\n .c5 input {\n height: 100px;\n font-size: 3rem;\n }\n }\n\n <div\n className=\"c0\"\n >\n <div\n className=\"c1\"\n >\n <div\n className=\"c2\"\n role=\"search\"\n >\n <div\n className=\"c3\"\n >\n <label\n className=\"c4 c5\"\n htmlFor=\"search\"\n >\n <span\n className=\"c6 c7\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Search\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c8\"\n >\n \n <div\n className=\"c9\"\n >\n <input\n aria-describedby=\"search\"\n className=\"c10\"\n id=\"search\"\n name=\"search\"\n onChange={[Function]}\n placeholder=\"\"\n required={false}\n role=\"searchbox\"\n type=\"text\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n </div>\n </div>\n </div>\n ");
|
|
17
17
|
});
|