@comicrelief/component-library 8.48.2 → 8.49.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.
- package/dist/components/Atoms/Button/Button.js +15 -42
- package/dist/components/Atoms/Button/Button.md +91 -1
- package/dist/components/Atoms/Button/Button.style.js +47 -0
- package/dist/components/Atoms/Button/Button.test.js +40 -12
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/dist/components/Atoms/Link/Link.js +8 -5
- package/dist/components/Atoms/Link/Link.md +81 -78
- package/dist/components/Atoms/Link/Link.style.js +22 -18
- package/dist/components/Atoms/Link/Link.test.js +20 -19
- package/dist/components/Molecules/CardDs/CardDs.md +3 -3
- package/dist/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/dist/components/Molecules/Lookup/Lookup.js +9 -16
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -19
- package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +1 -1
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -17
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/dist/components/Organisms/Header2025/Header2025.style.js +1 -1
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/dist/theme/crTheme/buttonColors.js +84 -72
- package/dist/theme/crTheme/buttonTypes.js +12 -0
- package/dist/theme/crTheme/colors.js +13 -1
- package/dist/theme/crTheme/fontConfig.js +3 -4
- package/dist/theme/crTheme/theme.js +2 -0
- package/package.json +1 -1
- package/playwright/components/organisms/emailSignUpForm.spec.js +1 -1
- package/src/components/Atoms/Button/Button.js +18 -36
- package/src/components/Atoms/Button/Button.md +91 -1
- package/src/components/Atoms/Button/Button.style.js +37 -0
- package/src/components/Atoms/Button/Button.test.js +44 -16
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/src/components/Atoms/Link/Link.js +15 -5
- package/src/components/Atoms/Link/Link.md +81 -78
- package/src/components/Atoms/Link/Link.style.js +32 -27
- package/src/components/Atoms/Link/Link.test.js +20 -19
- package/src/components/Molecules/CardDs/CardDs.md +3 -3
- package/src/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/src/components/Molecules/Lookup/Lookup.js +4 -15
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -19
- package/src/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +1 -1
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -17
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/src/components/Organisms/Header2025/Header2025.style.js +2 -1
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/src/theme/crTheme/buttonColors.js +116 -76
- package/src/theme/crTheme/buttonTypes.js +7 -0
- package/src/theme/crTheme/colors.js +14 -1
- package/src/theme/crTheme/fontConfig.js +3 -4
- package/src/theme/crTheme/theme.js +3 -0
|
@@ -10,49 +10,53 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
10
10
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
11
11
|
var _hideVisually = _interopRequireDefault(require("../../../theme/shared/hideVisually"));
|
|
12
12
|
var _fontHelper = _interopRequireDefault(require("../../../theme/crTheme/fontHelper"));
|
|
13
|
-
const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;position:relative;
|
|
13
|
+
const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;position:relative;text-decoration:none;transition:all 0.2s;min-height:2.5em;width:100%;justify-content:center;align-items:center;border:none;cursor:pointer;padding:0.6rem 1rem;border-radius:0.5rem;", ";", " ", ";@media ", "{width:", ";}@media ", "{width:", ";", ";}"], _ref => {
|
|
14
14
|
let {
|
|
15
|
-
|
|
15
|
+
color,
|
|
16
|
+
theme,
|
|
17
|
+
buttonType
|
|
16
18
|
} = _ref;
|
|
17
|
-
return theme.
|
|
19
|
+
return theme.buttonColors(color, buttonType);
|
|
18
20
|
}, _ref2 => {
|
|
19
21
|
let {
|
|
20
22
|
theme
|
|
21
23
|
} = _ref2;
|
|
22
|
-
return (0, _styledComponents.css)(["", ""], (0, _fontHelper.default)(theme, 'button'));
|
|
24
|
+
return (0, _styledComponents.css)([" ", ""], (0, _fontHelper.default)(theme, 'button'));
|
|
23
25
|
}, _ref3 => {
|
|
24
26
|
let {
|
|
25
|
-
|
|
26
|
-
theme
|
|
27
|
+
mobileColour,
|
|
28
|
+
theme,
|
|
29
|
+
buttonType
|
|
27
30
|
} = _ref3;
|
|
28
|
-
return
|
|
31
|
+
return mobileColour ? theme.buttonColors(mobileColour, buttonType) : null;
|
|
29
32
|
}, _ref4 => {
|
|
30
33
|
let {
|
|
31
|
-
mobileColour,
|
|
32
34
|
theme
|
|
33
35
|
} = _ref4;
|
|
34
|
-
return
|
|
36
|
+
return theme.allBreakpoints('M');
|
|
35
37
|
}, _ref5 => {
|
|
36
38
|
let {
|
|
37
|
-
|
|
39
|
+
fullWidth
|
|
38
40
|
} = _ref5;
|
|
39
|
-
return
|
|
41
|
+
return fullWidth ? '100%' : 'auto';
|
|
40
42
|
}, _ref6 => {
|
|
41
43
|
let {
|
|
42
|
-
|
|
44
|
+
theme
|
|
43
45
|
} = _ref6;
|
|
44
|
-
return
|
|
46
|
+
return theme.allBreakpoints('L');
|
|
45
47
|
}, _ref7 => {
|
|
46
48
|
let {
|
|
47
|
-
|
|
49
|
+
fullWidth
|
|
48
50
|
} = _ref7;
|
|
49
|
-
return
|
|
51
|
+
return fullWidth ? '100%' : 'auto';
|
|
50
52
|
}, _ref8 => {
|
|
51
53
|
let {
|
|
52
|
-
|
|
53
|
-
theme
|
|
54
|
+
mobileColour,
|
|
55
|
+
theme,
|
|
56
|
+
buttonType,
|
|
57
|
+
color
|
|
54
58
|
} = _ref8;
|
|
55
|
-
return
|
|
59
|
+
return mobileColour && theme.buttonColors(color, buttonType);
|
|
56
60
|
});
|
|
57
61
|
const linkStyle = () => (0, _styledComponents.css)(["position:relative;display:inline;", ";"], _ref9 => {
|
|
58
62
|
let {
|
|
@@ -192,14 +192,11 @@ it('renders link styled as button correctly', () => {
|
|
|
192
192
|
display: -ms-inline-flexbox;
|
|
193
193
|
display: inline-flex;
|
|
194
194
|
position: relative;
|
|
195
|
-
padding: 0.5rem 1.25rem;
|
|
196
195
|
-webkit-text-decoration: none;
|
|
197
196
|
text-decoration: none;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
transition: all 0.3s;
|
|
202
|
-
height: 3.125rem;
|
|
197
|
+
-webkit-transition: all 0.2s;
|
|
198
|
+
transition: all 0.2s;
|
|
199
|
+
min-height: 2.5em;
|
|
203
200
|
width: 100%;
|
|
204
201
|
-webkit-box-pack: center;
|
|
205
202
|
-webkit-justify-content: center;
|
|
@@ -209,9 +206,14 @@ it('renders link styled as button correctly', () => {
|
|
|
209
206
|
-webkit-box-align: center;
|
|
210
207
|
-ms-flex-align: center;
|
|
211
208
|
align-items: center;
|
|
209
|
+
border: none;
|
|
212
210
|
cursor: pointer;
|
|
211
|
+
padding: 0.6rem 1rem;
|
|
212
|
+
border-radius: 0.5rem;
|
|
213
|
+
background-color: #FFE400;
|
|
214
|
+
color: #000000;
|
|
213
215
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
214
|
-
font-weight:
|
|
216
|
+
font-weight: 700;
|
|
215
217
|
text-transform: inherit;
|
|
216
218
|
-webkit-letter-spacing: 0;
|
|
217
219
|
-moz-letter-spacing: 0;
|
|
@@ -219,14 +221,19 @@ it('renders link styled as button correctly', () => {
|
|
|
219
221
|
letter-spacing: 0;
|
|
220
222
|
font-size: 1rem;
|
|
221
223
|
line-height: 1.25rem;
|
|
222
|
-
font-weight: 700;
|
|
223
|
-
background-color: #FFE400;
|
|
224
|
-
color: #000000;
|
|
225
224
|
}
|
|
226
225
|
|
|
227
|
-
.c0:hover
|
|
226
|
+
.c0:hover,
|
|
227
|
+
.c0:focus,
|
|
228
|
+
.c0:focus-within,
|
|
229
|
+
.c0:focus-visible {
|
|
228
230
|
background-color: #FEFD5A;
|
|
229
|
-
|
|
231
|
+
outline-offset: 3px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.c0:disabled {
|
|
235
|
+
cursor: not-allowed;
|
|
236
|
+
opacity: 0.5;
|
|
230
237
|
}
|
|
231
238
|
|
|
232
239
|
@media (min-width:740px) {
|
|
@@ -251,13 +258,7 @@ it('renders link styled as button correctly', () => {
|
|
|
251
258
|
|
|
252
259
|
@media (min-width:1024px) {
|
|
253
260
|
.c0 {
|
|
254
|
-
|
|
255
|
-
color: #000000;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.c0:hover {
|
|
259
|
-
background-color: #FEFD5A;
|
|
260
|
-
color: #000000;
|
|
261
|
+
width: auto;
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
264
|
|
|
@@ -18,7 +18,7 @@ import { Internal } from '../../Atoms/Icons/index';
|
|
|
18
18
|
<CardDs
|
|
19
19
|
target="_blank"
|
|
20
20
|
link="/home"
|
|
21
|
-
linkLabel="
|
|
21
|
+
linkLabel="Find out more"
|
|
22
22
|
imageLow={defaultData.image}
|
|
23
23
|
images={defaultData.images}
|
|
24
24
|
imageAltText="Happy man going to work"
|
|
@@ -66,7 +66,7 @@ import { Download } from '../../Atoms/Icons/index';
|
|
|
66
66
|
<CardDs
|
|
67
67
|
target="blank"
|
|
68
68
|
link="/home"
|
|
69
|
-
linkLabel="
|
|
69
|
+
linkLabel="Find out more"
|
|
70
70
|
backgroundColor="white"
|
|
71
71
|
height="auto"
|
|
72
72
|
icon={<Download colour="white" />}
|
|
@@ -149,7 +149,7 @@ import { Internal } from '../../Atoms/Icons/index';
|
|
|
149
149
|
<CardDs
|
|
150
150
|
target="_blank"
|
|
151
151
|
link="/home"
|
|
152
|
-
linkLabel="
|
|
152
|
+
linkLabel="Find out more"
|
|
153
153
|
imageLow={defaultData.image}
|
|
154
154
|
images={defaultData.images}
|
|
155
155
|
imageAltText="Happy man going to work"
|
|
@@ -26,7 +26,7 @@ it('renders Column view correctly', () => {
|
|
|
26
26
|
const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_CardDs.default, {
|
|
27
27
|
target: "_blank",
|
|
28
28
|
link: "/home",
|
|
29
|
-
linkLabel: "
|
|
29
|
+
linkLabel: "Find out more",
|
|
30
30
|
imageLow: _data.defaultData.image,
|
|
31
31
|
images: _data.defaultData.images,
|
|
32
32
|
imageAltText: "Happy man going to work",
|
|
@@ -33,14 +33,11 @@ exports[`renders Column view correctly 1`] = `
|
|
|
33
33
|
display: -ms-inline-flexbox;
|
|
34
34
|
display: inline-flex;
|
|
35
35
|
position: relative;
|
|
36
|
-
padding: 0.5rem 1.25rem;
|
|
37
36
|
-webkit-text-decoration: none;
|
|
38
37
|
text-decoration: none;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
transition: all 0.3s;
|
|
43
|
-
height: 3.125rem;
|
|
38
|
+
-webkit-transition: all 0.2s;
|
|
39
|
+
transition: all 0.2s;
|
|
40
|
+
min-height: 2.5em;
|
|
44
41
|
width: 100%;
|
|
45
42
|
-webkit-box-pack: center;
|
|
46
43
|
-webkit-justify-content: center;
|
|
@@ -50,9 +47,14 @@ exports[`renders Column view correctly 1`] = `
|
|
|
50
47
|
-webkit-box-align: center;
|
|
51
48
|
-ms-flex-align: center;
|
|
52
49
|
align-items: center;
|
|
50
|
+
border: none;
|
|
53
51
|
cursor: pointer;
|
|
52
|
+
padding: 0.6rem 1rem;
|
|
53
|
+
border-radius: 0.5rem;
|
|
54
|
+
background-color: #E52630;
|
|
55
|
+
color: #FFFFFF;
|
|
54
56
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
55
|
-
font-weight:
|
|
57
|
+
font-weight: 700;
|
|
56
58
|
text-transform: inherit;
|
|
57
59
|
-webkit-letter-spacing: 0;
|
|
58
60
|
-moz-letter-spacing: 0;
|
|
@@ -60,14 +62,19 @@ exports[`renders Column view correctly 1`] = `
|
|
|
60
62
|
letter-spacing: 0;
|
|
61
63
|
font-size: 1rem;
|
|
62
64
|
line-height: 1.25rem;
|
|
63
|
-
font-weight: 700;
|
|
64
|
-
background-color: #E52630;
|
|
65
|
-
color: #FFFFFF;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
.c7:hover
|
|
67
|
+
.c7:hover,
|
|
68
|
+
.c7:focus,
|
|
69
|
+
.c7:focus-within,
|
|
70
|
+
.c7:focus-visible {
|
|
69
71
|
background-color: #890B11;
|
|
70
|
-
|
|
72
|
+
outline-offset: 3px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.c7:disabled {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
opacity: 0.5;
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
.c9 {
|
|
@@ -158,13 +165,7 @@ exports[`renders Column view correctly 1`] = `
|
|
|
158
165
|
|
|
159
166
|
@media (min-width:1024px) {
|
|
160
167
|
.c7 {
|
|
161
|
-
|
|
162
|
-
color: #FFFFFF;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.c7:hover {
|
|
166
|
-
background-color: #890B11;
|
|
167
|
-
color: #FFFFFF;
|
|
168
|
+
width: auto;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
|
@@ -213,7 +214,7 @@ exports[`renders Column view correctly 1`] = `
|
|
|
213
214
|
<a
|
|
214
215
|
aria-hidden="true"
|
|
215
216
|
className="c1"
|
|
216
|
-
data-image-cta-copy="
|
|
217
|
+
data-image-cta-copy="Find out more"
|
|
217
218
|
href="/home"
|
|
218
219
|
tabIndex="-1"
|
|
219
220
|
target="_blank"
|
|
@@ -252,13 +253,13 @@ exports[`renders Column view correctly 1`] = `
|
|
|
252
253
|
<a
|
|
253
254
|
className="c7"
|
|
254
255
|
color="red"
|
|
255
|
-
data-button-cta-copy="
|
|
256
|
+
data-button-cta-copy="Find out more"
|
|
256
257
|
href="/home"
|
|
257
258
|
rel={null}
|
|
258
259
|
target="_self"
|
|
259
260
|
type="button"
|
|
260
261
|
>
|
|
261
|
-
|
|
262
|
+
Find out more
|
|
262
263
|
<span
|
|
263
264
|
className="c8"
|
|
264
265
|
type="button"
|
|
@@ -314,14 +315,11 @@ exports[`renders correctly 1`] = `
|
|
|
314
315
|
display: -ms-inline-flexbox;
|
|
315
316
|
display: inline-flex;
|
|
316
317
|
position: relative;
|
|
317
|
-
padding: 0.5rem 1.25rem;
|
|
318
318
|
-webkit-text-decoration: none;
|
|
319
319
|
text-decoration: none;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
-
|
|
323
|
-
transition: all 0.3s;
|
|
324
|
-
height: 3.125rem;
|
|
320
|
+
-webkit-transition: all 0.2s;
|
|
321
|
+
transition: all 0.2s;
|
|
322
|
+
min-height: 2.5em;
|
|
325
323
|
width: 100%;
|
|
326
324
|
-webkit-box-pack: center;
|
|
327
325
|
-webkit-justify-content: center;
|
|
@@ -331,9 +329,14 @@ exports[`renders correctly 1`] = `
|
|
|
331
329
|
-webkit-box-align: center;
|
|
332
330
|
-ms-flex-align: center;
|
|
333
331
|
align-items: center;
|
|
332
|
+
border: none;
|
|
334
333
|
cursor: pointer;
|
|
334
|
+
padding: 0.6rem 1rem;
|
|
335
|
+
border-radius: 0.5rem;
|
|
336
|
+
background-color: #E52630;
|
|
337
|
+
color: #FFFFFF;
|
|
335
338
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
336
|
-
font-weight:
|
|
339
|
+
font-weight: 700;
|
|
337
340
|
text-transform: inherit;
|
|
338
341
|
-webkit-letter-spacing: 0;
|
|
339
342
|
-moz-letter-spacing: 0;
|
|
@@ -341,14 +344,19 @@ exports[`renders correctly 1`] = `
|
|
|
341
344
|
letter-spacing: 0;
|
|
342
345
|
font-size: 1rem;
|
|
343
346
|
line-height: 1.25rem;
|
|
344
|
-
font-weight: 700;
|
|
345
|
-
background-color: #E52630;
|
|
346
|
-
color: #FFFFFF;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
.c7:hover
|
|
349
|
+
.c7:hover,
|
|
350
|
+
.c7:focus,
|
|
351
|
+
.c7:focus-within,
|
|
352
|
+
.c7:focus-visible {
|
|
350
353
|
background-color: #890B11;
|
|
351
|
-
|
|
354
|
+
outline-offset: 3px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.c7:disabled {
|
|
358
|
+
cursor: not-allowed;
|
|
359
|
+
opacity: 0.5;
|
|
352
360
|
}
|
|
353
361
|
|
|
354
362
|
.c9 {
|
|
@@ -439,13 +447,7 @@ exports[`renders correctly 1`] = `
|
|
|
439
447
|
|
|
440
448
|
@media (min-width:1024px) {
|
|
441
449
|
.c7 {
|
|
442
|
-
|
|
443
|
-
color: #FFFFFF;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.c7:hover {
|
|
447
|
-
background-color: #890B11;
|
|
448
|
-
color: #FFFFFF;
|
|
450
|
+
width: auto;
|
|
449
451
|
}
|
|
450
452
|
}
|
|
451
453
|
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _styledComponents =
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _TextInputWithDropdown = _interopRequireDefault(require("../../Atoms/TextInputWithDropdown/TextInputWithDropdown"));
|
|
12
12
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
13
13
|
var _ButtonWithStates = _interopRequireDefault(require("../../Atoms/ButtonWithStates/ButtonWithStates"));
|
|
14
|
-
const StyledButton = (0, _styledComponents.default)(_ButtonWithStates.default).withConfig({
|
|
15
|
-
displayName: "Lookup__StyledButton",
|
|
16
|
-
componentId: "sc-uu5bpv-0"
|
|
17
|
-
})(["", ""], _ref => {
|
|
18
|
-
let {
|
|
19
|
-
theme
|
|
20
|
-
} = _ref;
|
|
21
|
-
return (0, _styledComponents.css)(["color:", ";border:2px solid ", ";background-color:", ";padding-left:", ";padding-right:", ";&:hover{color:", ";background-color:", ";}"], theme.color('grey_dark'), theme.color('grey_dark'), theme.color('white'), (0, _spacing.default)('lg'), (0, _spacing.default)('lg'), theme.color('grey_dark'), theme.color('white'));
|
|
22
|
-
});
|
|
23
14
|
const KEY_CODE_ENTER = 13;
|
|
24
15
|
|
|
25
16
|
/**
|
|
@@ -50,7 +41,7 @@ const KEY_CODE_ENTER = 13;
|
|
|
50
41
|
* @returns {JSX.Element}
|
|
51
42
|
* @constructor
|
|
52
43
|
*/
|
|
53
|
-
const Lookup =
|
|
44
|
+
const Lookup = _ref => {
|
|
54
45
|
let {
|
|
55
46
|
name,
|
|
56
47
|
label,
|
|
@@ -62,7 +53,7 @@ const Lookup = _ref2 => {
|
|
|
62
53
|
noResultsMessage = 'Sorry, could not find any results for your search',
|
|
63
54
|
dropdownInstruction = '',
|
|
64
55
|
...rest
|
|
65
|
-
} =
|
|
56
|
+
} = _ref;
|
|
66
57
|
const [query, setQuery] = (0, _react.useState)('');
|
|
67
58
|
const [errorMessage, setErrorMessage] = (0, _react.useState)('');
|
|
68
59
|
const [options, setOptions] = (0, _react.useState)([]);
|
|
@@ -113,19 +104,21 @@ const Lookup = _ref2 => {
|
|
|
113
104
|
errorMsg: errorMessage,
|
|
114
105
|
dropdownInstruction: dropdownInstruction,
|
|
115
106
|
$_css: (0, _spacing.default)('md')
|
|
116
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
107
|
+
}), /*#__PURE__*/_react.default.createElement(_ButtonWithStates.default, {
|
|
117
108
|
type: "button",
|
|
118
109
|
onClick: () => handler(),
|
|
119
110
|
loading: isSearching,
|
|
120
111
|
disabled: isSearching,
|
|
121
112
|
loadingText: "Searching",
|
|
122
|
-
"data-test": "lookupButton"
|
|
113
|
+
"data-test": "lookupButton",
|
|
114
|
+
buttonType: "secondary",
|
|
115
|
+
color: "black"
|
|
123
116
|
}, buttonText));
|
|
124
117
|
};
|
|
125
118
|
var _default = exports.default = Lookup;
|
|
126
119
|
var _StyledTextInputWithDropdown = (0, _styledComponents.default)(_TextInputWithDropdown.default).withConfig({
|
|
127
120
|
displayName: "Lookup___StyledTextInputWithDropdown",
|
|
128
|
-
componentId: "sc-uu5bpv-
|
|
121
|
+
componentId: "sc-uu5bpv-0"
|
|
129
122
|
})(p => ({
|
|
130
123
|
marginBottom: p.$_css
|
|
131
124
|
}));
|
|
@@ -72,14 +72,11 @@ exports[`renders Promo correctly 1`] = `
|
|
|
72
72
|
display: -ms-inline-flexbox;
|
|
73
73
|
display: inline-flex;
|
|
74
74
|
position: relative;
|
|
75
|
-
padding: 0.5rem 1.25rem;
|
|
76
75
|
-webkit-text-decoration: none;
|
|
77
76
|
text-decoration: none;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
transition: all 0.3s;
|
|
82
|
-
height: 3.125rem;
|
|
77
|
+
-webkit-transition: all 0.2s;
|
|
78
|
+
transition: all 0.2s;
|
|
79
|
+
min-height: 2.5em;
|
|
83
80
|
width: 100%;
|
|
84
81
|
-webkit-box-pack: center;
|
|
85
82
|
-webkit-justify-content: center;
|
|
@@ -89,9 +86,14 @@ exports[`renders Promo correctly 1`] = `
|
|
|
89
86
|
-webkit-box-align: center;
|
|
90
87
|
-ms-flex-align: center;
|
|
91
88
|
align-items: center;
|
|
89
|
+
border: none;
|
|
92
90
|
cursor: pointer;
|
|
91
|
+
padding: 0.6rem 1rem;
|
|
92
|
+
border-radius: 0.5rem;
|
|
93
|
+
background-color: #FFFFFF;
|
|
94
|
+
color: #000000;
|
|
93
95
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
94
|
-
font-weight:
|
|
96
|
+
font-weight: 700;
|
|
95
97
|
text-transform: inherit;
|
|
96
98
|
-webkit-letter-spacing: 0;
|
|
97
99
|
-moz-letter-spacing: 0;
|
|
@@ -99,14 +101,19 @@ exports[`renders Promo correctly 1`] = `
|
|
|
99
101
|
letter-spacing: 0;
|
|
100
102
|
font-size: 1rem;
|
|
101
103
|
line-height: 1.25rem;
|
|
102
|
-
font-weight: 700;
|
|
103
|
-
background-color: #FFFFFF;
|
|
104
|
-
color: #000000;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
|
-
.c9:hover
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
.c9:hover,
|
|
107
|
+
.c9:focus,
|
|
108
|
+
.c9:focus-within,
|
|
109
|
+
.c9:focus-visible {
|
|
110
|
+
background-color: #E1E2E3;
|
|
111
|
+
outline-offset: 3px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.c9:disabled {
|
|
115
|
+
cursor: not-allowed;
|
|
116
|
+
opacity: 0.5;
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
.c0 {
|
|
@@ -239,13 +246,7 @@ exports[`renders Promo correctly 1`] = `
|
|
|
239
246
|
|
|
240
247
|
@media (min-width:1024px) {
|
|
241
248
|
.c9 {
|
|
242
|
-
|
|
243
|
-
color: #000000;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.c9:hover {
|
|
247
|
-
background-color: #969598;
|
|
248
|
-
color: #000000;
|
|
249
|
+
width: auto;
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
|
|
@@ -421,14 +422,11 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
421
422
|
display: -ms-inline-flexbox;
|
|
422
423
|
display: inline-flex;
|
|
423
424
|
position: relative;
|
|
424
|
-
padding: 0.5rem 1.25rem;
|
|
425
425
|
-webkit-text-decoration: none;
|
|
426
426
|
text-decoration: none;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
-
|
|
430
|
-
transition: all 0.3s;
|
|
431
|
-
height: 3.125rem;
|
|
427
|
+
-webkit-transition: all 0.2s;
|
|
428
|
+
transition: all 0.2s;
|
|
429
|
+
min-height: 2.5em;
|
|
432
430
|
width: 100%;
|
|
433
431
|
-webkit-box-pack: center;
|
|
434
432
|
-webkit-justify-content: center;
|
|
@@ -438,9 +436,14 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
438
436
|
-webkit-box-align: center;
|
|
439
437
|
-ms-flex-align: center;
|
|
440
438
|
align-items: center;
|
|
439
|
+
border: none;
|
|
441
440
|
cursor: pointer;
|
|
441
|
+
padding: 0.6rem 1rem;
|
|
442
|
+
border-radius: 0.5rem;
|
|
443
|
+
background-color: #FFFFFF;
|
|
444
|
+
color: #000000;
|
|
442
445
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
443
|
-
font-weight:
|
|
446
|
+
font-weight: 700;
|
|
444
447
|
text-transform: inherit;
|
|
445
448
|
-webkit-letter-spacing: 0;
|
|
446
449
|
-moz-letter-spacing: 0;
|
|
@@ -448,14 +451,19 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
448
451
|
letter-spacing: 0;
|
|
449
452
|
font-size: 1rem;
|
|
450
453
|
line-height: 1.25rem;
|
|
451
|
-
font-weight: 700;
|
|
452
|
-
background-color: #FFFFFF;
|
|
453
|
-
color: #000000;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
.c9:hover
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
.c9:hover,
|
|
457
|
+
.c9:focus,
|
|
458
|
+
.c9:focus-within,
|
|
459
|
+
.c9:focus-visible {
|
|
460
|
+
background-color: #E1E2E3;
|
|
461
|
+
outline-offset: 3px;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.c9:disabled {
|
|
465
|
+
cursor: not-allowed;
|
|
466
|
+
opacity: 0.5;
|
|
459
467
|
}
|
|
460
468
|
|
|
461
469
|
.c0 {
|
|
@@ -591,13 +599,7 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
591
599
|
|
|
592
600
|
@media (min-width:1024px) {
|
|
593
601
|
.c9 {
|
|
594
|
-
|
|
595
|
-
color: #000000;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.c9:hover {
|
|
599
|
-
background-color: #969598;
|
|
600
|
-
color: #000000;
|
|
602
|
+
width: auto;
|
|
601
603
|
}
|
|
602
604
|
}
|
|
603
605
|
|