@financial-times/n-conversion-forms 26.0.0 → 27.0.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/.circleci/config.yml +4 -4
- package/.eslintignore +1 -0
- package/.github/workflows/gh-pages-deploy.yml +1 -0
- package/.storybook/main.js +0 -1
- package/__mocks__/@financial-times/o-expander.js +9 -0
- package/__mocks__/@financial-times/o-forms-input.js +11 -0
- package/__mocks__/@financial-times/o-forms.js +40 -0
- package/build-state/npm-shrinkwrap.json +294 -6334
- package/components/__snapshots__/b2c-partnership-confirmation.spec.js.snap +1 -1
- package/components/__snapshots__/confirmation.spec.js.snap +0 -3
- package/components/__snapshots__/debug.spec.js.snap +25 -13
- package/components/__snapshots__/delivery-postcode.spec.js.snap +1 -1
- package/components/__snapshots__/payment-term.spec.js.snap +1 -1
- package/components/__snapshots__/payment-type.spec.js.snap +19 -0
- package/components/__snapshots__/registration-confirmation.spec.js.snap +230 -74
- package/components/accept-terms.jsx +57 -36
- package/components/accept-terms.stories.js +28 -1
- package/components/b2c-partnership-confirmation.jsx +1 -1
- package/components/confirmation.jsx +15 -8
- package/components/confirmation.spec.js +1 -1
- package/components/debug.jsx +19 -12
- package/components/debug.stories.js +13 -0
- package/components/delivery-address.jsx +21 -58
- package/components/delivery-address.stories.js +7 -0
- package/components/delivery-city.jsx +4 -2
- package/components/delivery-city.stories.js +9 -0
- package/components/delivery-option.jsx +5 -3
- package/components/delivery-option.stories.js +7 -1
- package/components/delivery-postcode.jsx +32 -13
- package/components/delivery-postcode.stories.js +2 -1
- package/components/delivery-security-instructions.spec.js +3 -3
- package/components/graduation-date.spec.js +8 -8
- package/components/index.jsx +1 -1
- package/components/message.jsx +1 -1
- package/components/payment-term.jsx +152 -25
- package/components/payment-term.spec.js +46 -4
- package/components/payment-term.stories.js +69 -14
- package/components/payment-type.jsx +3 -1
- package/components/position.jsx +6 -3
- package/components/position.spec.js +15 -5
- package/components/registration-confirmation.jsx +111 -32
- package/components/responsibility.jsx +6 -3
- package/components/responsibility.spec.js +15 -5
- package/components/text-input.jsx +73 -0
- package/components/text-input.spec.js +118 -0
- package/components/text-input.stories.js +31 -0
- package/dist/accept-terms.js +15 -7
- package/dist/b2c-partnership-confirmation.js +1 -1
- package/dist/confirmation.js +11 -2
- package/dist/debug.js +6 -6
- package/dist/delivery-address.js +19 -32
- package/dist/delivery-city.js +4 -2
- package/dist/delivery-option.js +5 -2
- package/dist/delivery-postcode.js +31 -12
- package/dist/index.js +9 -9
- package/dist/message.js +1 -1
- package/dist/payment-term.js +117 -11
- package/dist/payment-type.js +5 -2
- package/dist/position.js +6 -2
- package/dist/registration-confirmation.js +87 -29
- package/dist/responsibility.js +6 -2
- package/dist/text-input.js +84 -0
- package/helpers/constants.js +7 -0
- package/helpers/deliveryAddressMap.js +167 -0
- package/helpers/index.js +7 -0
- package/helpers/index.spec.js +11 -0
- package/helpers/ncf-common-data.spec.js +34 -0
- package/helpers/ncf-countries.spec.js +136 -0
- package/helpers/supportedCountries.js +76 -0
- package/helpers/supportedPostcodeExamples.js +57 -0
- package/helpers/supportedPostcodeValidators.js +53 -0
- package/helpers/utilities.js +14 -0
- package/jest.config.js +8 -1
- package/main.scss +461 -0
- package/package.json +6 -3
- package/styles/confirmation.scss +122 -0
- package/styles/payment-term.scss +3 -0
- package/utils/app-banner.spec.js +68 -0
- package/utils/apple-pay.spec.js +177 -0
- package/utils/billing-country.spec.js +87 -0
- package/utils/billing-postcode.spec.js +138 -0
- package/utils/company-name.spec.js +3 -7
- package/utils/country.spec.js +87 -0
- package/utils/delivery-address-type.spec.js +24 -11
- package/utils/delivery-option-messages.js +15 -0
- package/utils/delivery-option-messages.spec.js +3 -3
- package/utils/delivery-option.spec.js +100 -15
- package/utils/delivery-postcode.spec.js +138 -0
- package/utils/delivery-start-date.spec.js +177 -0
- package/utils/email.spec.js +210 -0
- package/utils/event-notifier.spec.js +116 -0
- package/utils/form-element.spec.js +71 -0
- package/utils/loader.spec.js +161 -0
- package/utils/password.spec.js +65 -0
- package/utils/payment-term.js +25 -1
- package/utils/payment-term.spec.js +198 -0
- package/utils/payment-type.js +1 -1
- package/utils/payment-type.spec.js +136 -0
- package/utils/postcode.spec.js +122 -0
- package/utils/salesforce.spec.js +30 -0
- package/utils/submit.spec.js +81 -0
- package/utils/tracking.spec.js +174 -0
- package/utils/validation.js +2 -2
- package/utils/validation.spec.js +234 -0
- package/utils/zuora.spec.js +249 -0
- package/components/__snapshots__/b2c-partnership-payment-term.spec.js.snap +0 -193
- package/components/b2c-partnership-payment-term.jsx +0 -126
- package/components/b2c-partnership-payment-term.spec.js +0 -52
- package/components/b2c-partnership-payment-term.stories.js +0 -44
- package/dist/b2c-partnership-payment-term.js +0 -91
- package/styles/b2c-partnership-payment-term.scss +0 -20
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const { flattenObj } = require('./utilities');
|
|
2
|
+
const { printRegions } = require('./constants');
|
|
3
|
+
|
|
4
|
+
const supportedCountriesMasterList = {
|
|
5
|
+
cemeaV1: {
|
|
6
|
+
AUT: 'Austria',
|
|
7
|
+
ARE: 'United Arab Emirates',
|
|
8
|
+
BEL: 'Belgium',
|
|
9
|
+
BGR: 'Bulgaria',
|
|
10
|
+
HRV: 'Croatia',
|
|
11
|
+
CZE: 'Czechia',
|
|
12
|
+
DNK: 'Denmark',
|
|
13
|
+
FIN: 'Finland',
|
|
14
|
+
DEU: 'Germany',
|
|
15
|
+
GRC: 'Greece',
|
|
16
|
+
HUN: 'Hungary',
|
|
17
|
+
ISL: 'Iceland',
|
|
18
|
+
ITA: 'Italy',
|
|
19
|
+
LIE: 'Liechtenstein',
|
|
20
|
+
LTU: 'Lithuania',
|
|
21
|
+
NLD: 'Netherlands',
|
|
22
|
+
NOR: 'Norway',
|
|
23
|
+
POL: 'Poland',
|
|
24
|
+
PRT: 'Portugal',
|
|
25
|
+
QAT: 'Qatar',
|
|
26
|
+
ROU: 'Romania',
|
|
27
|
+
RUS: 'Russian Federation',
|
|
28
|
+
SVK: 'Slovakia',
|
|
29
|
+
SVN: 'Slovenia',
|
|
30
|
+
ZAF: 'South Africa',
|
|
31
|
+
ESP: 'Spain',
|
|
32
|
+
SWE: 'Sweden',
|
|
33
|
+
CHE: 'Switzerland'
|
|
34
|
+
},
|
|
35
|
+
cemeaV2: { FRA: 'France', LUX: 'Luxembourg', MCO: 'Monaco' },
|
|
36
|
+
apac: {
|
|
37
|
+
CHN: 'China',
|
|
38
|
+
HKG: 'Hong Kong',
|
|
39
|
+
IND: 'India',
|
|
40
|
+
IDN: 'Indonesia',
|
|
41
|
+
JPN: 'Japan',
|
|
42
|
+
KOR: 'Korea, Republic of',
|
|
43
|
+
MYS: 'Malaysia',
|
|
44
|
+
PHL: 'Philippines',
|
|
45
|
+
SGP: 'Singapore',
|
|
46
|
+
TWN: 'Taiwan, Province of China',
|
|
47
|
+
THA: 'Thailand'
|
|
48
|
+
},
|
|
49
|
+
other: {
|
|
50
|
+
GBR: 'United Kingdom',
|
|
51
|
+
USA: 'United States',
|
|
52
|
+
CAN: 'Canada'
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const cemeaV1ISO = Object.keys(supportedCountriesMasterList.cemeaV1);
|
|
57
|
+
const cemeaV2ISO = Object.keys(supportedCountriesMasterList.cemeaV2);
|
|
58
|
+
const apacISO = Object.keys(supportedCountriesMasterList.apac);
|
|
59
|
+
|
|
60
|
+
const countriesSupported = flattenObj(supportedCountriesMasterList);
|
|
61
|
+
const countriesSupportedISO = Object.keys(countriesSupported);
|
|
62
|
+
|
|
63
|
+
const identifyFTShippingZone = (country) => {
|
|
64
|
+
if (cemeaV1ISO.includes(country)) {
|
|
65
|
+
return printRegions.cemeaV1;
|
|
66
|
+
}
|
|
67
|
+
if (cemeaV2ISO.includes(country)) {
|
|
68
|
+
return printRegions.cemeaV2;
|
|
69
|
+
}
|
|
70
|
+
if (apacISO.includes(country)) {
|
|
71
|
+
return printRegions.apac;
|
|
72
|
+
}
|
|
73
|
+
return country;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
module.exports = { cemeaV1ISO, cemeaV2ISO, apacISO, countriesSupported, countriesSupportedISO, identifyFTShippingZone };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const { flattenObj } = require('./utilities');
|
|
2
|
+
|
|
3
|
+
const supportedPostcodeExamples = {
|
|
4
|
+
cemeaV1: {
|
|
5
|
+
AUT: '17087',
|
|
6
|
+
ARE: '', //match anything
|
|
7
|
+
BEL: '6596',
|
|
8
|
+
BGR: '4000',
|
|
9
|
+
HRV: '10000',
|
|
10
|
+
CZE: '00 100',
|
|
11
|
+
DNK: '1819',
|
|
12
|
+
FIN: '39500',
|
|
13
|
+
DEU: '17087',
|
|
14
|
+
GRC: '241 00',
|
|
15
|
+
HUN: '3821',
|
|
16
|
+
ISL: '60411',
|
|
17
|
+
ITA: '23844',
|
|
18
|
+
LIE: '9480',
|
|
19
|
+
LTU: 'LT-12345',
|
|
20
|
+
NLD: '6971 HJ',
|
|
21
|
+
NOR: '1608',
|
|
22
|
+
POL: '43-190',
|
|
23
|
+
PRT: '2525-517',
|
|
24
|
+
QAT: '',//match anything
|
|
25
|
+
ROU: '71234',
|
|
26
|
+
RUS: '191028',
|
|
27
|
+
SVK: '98401',
|
|
28
|
+
SVN: '8263',
|
|
29
|
+
ZAF: '5189',
|
|
30
|
+
ESP: '37752',
|
|
31
|
+
SWE: '260 38',
|
|
32
|
+
CHE: '9424'
|
|
33
|
+
},
|
|
34
|
+
cemeaV2: { FRA: '95000', LUX: '1009', MCO: '98000' },
|
|
35
|
+
apac: {
|
|
36
|
+
CHN: '610000',
|
|
37
|
+
HKG: '', //match anything
|
|
38
|
+
IND: '401107',
|
|
39
|
+
IDN: '55165',
|
|
40
|
+
JPN: '100-0001',
|
|
41
|
+
KOR: '46500',
|
|
42
|
+
MYS: '59100',
|
|
43
|
+
PHL: '2799',
|
|
44
|
+
SGP: '58416',
|
|
45
|
+
TWN: '100',
|
|
46
|
+
THA: '10330'
|
|
47
|
+
},
|
|
48
|
+
other: {
|
|
49
|
+
GBR: 'EC4M 9BT',
|
|
50
|
+
USA: '60411',
|
|
51
|
+
CAN: 'M5H 3E5'
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const allSupportedPostcodeExamples = flattenObj(supportedPostcodeExamples);
|
|
56
|
+
|
|
57
|
+
module.exports = { allSupportedPostcodeExamples };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const supportedPostcodeValidators = {
|
|
2
|
+
cemeaV1: {
|
|
3
|
+
AUT: /^\\d{4}$/,
|
|
4
|
+
ARE: /.*$/, //match anything
|
|
5
|
+
BEL: /^\\d{4}$/,
|
|
6
|
+
BGR: /^\\d{4}$/,
|
|
7
|
+
HRV: /^\\d{5}$/,
|
|
8
|
+
CZE: /^\\d{5}\\s\\(\\d{3}\\s\\d{2}\\)$/,
|
|
9
|
+
DNK: /^\\d{4}$/,
|
|
10
|
+
FIN: /^\\d{5}$/,
|
|
11
|
+
DEU: /^\\d{5}$/,
|
|
12
|
+
GRC: /^\\d{3}\\s{0,1}\\d{2}$/,
|
|
13
|
+
HUN: /^\\d{4}$/,
|
|
14
|
+
ISL: /^\\d{3}$/,
|
|
15
|
+
ITA: /^\\d{5}$/,
|
|
16
|
+
LIE: /^\\d{4}$/,
|
|
17
|
+
LTU: /^[Ll][Tt][- ]{0,1}\\d{5}$/,
|
|
18
|
+
NLD: /^\\d{4}\\s{0,1}[A-Za-z]{2}$/,
|
|
19
|
+
NOR: /^\\d{4}$/,
|
|
20
|
+
POL: /^\\d{2}[- ]{0,1}\\d{3}$/,
|
|
21
|
+
PRT: /^\\d{4}$/,
|
|
22
|
+
QAT: /.*$/,//match anything
|
|
23
|
+
ROU: /^\\d{6}$/,
|
|
24
|
+
RUS: /^\\d{6}$/,
|
|
25
|
+
SVK: /^\\d{5}\\s\\(\\d{3}\\s\\d{2}\\)$/,
|
|
26
|
+
SVN: /^([Ss][Ii][- ]{0,1}){0,1}\\d{4}$/,
|
|
27
|
+
ZAF: /^\\d{4}$/,
|
|
28
|
+
ESP: /^\\d{5}$/,
|
|
29
|
+
SWE: /^\\d{3}\\s*\\d{2}$/,
|
|
30
|
+
CHE: /^\\d{4}$/
|
|
31
|
+
},
|
|
32
|
+
cemeaV2: { FRA: /^[0-9]{5}$/, LUX: /^\\d{4}$/, MCO: /^980\\d{2}$/ },
|
|
33
|
+
apac: {
|
|
34
|
+
CHN: /^\\d{6}$/,
|
|
35
|
+
HKG: /.*$/, //match anything
|
|
36
|
+
IND: /^\\d{6}$/,
|
|
37
|
+
IDN: /^\\d{5}$/,
|
|
38
|
+
JPN: /^\\d{7}\\s\\(\\d{3}-\\d{4}\\)$/,
|
|
39
|
+
KOR: /^\\d{6}\\s\\(\\d{3}-\\d{3}\\)$/,
|
|
40
|
+
MYS: /^\\d{5}$/,
|
|
41
|
+
PHL: /^\\d{4}$/,
|
|
42
|
+
SGP: /^\\d{2}$/,
|
|
43
|
+
TWN: /^\\d{5}$/,
|
|
44
|
+
THA: /^\\d{5}$/
|
|
45
|
+
},
|
|
46
|
+
other: {
|
|
47
|
+
GBR: /^[A-Za-z]{1,2}[0-9][0-9A-Za-z]?[\s-]?[0-9][A-Za-z]{2}$/,
|
|
48
|
+
USA: /^[0-9]{5}$/,
|
|
49
|
+
CAN: /^[A-Za-z]\d[A-Za-z][\s-]?\d[A-Za-z]\d$/
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
module.exports = { supportedPostcodeValidators };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//Recursively flattens a nested object.
|
|
2
|
+
//For example: input: {a:{b:1}} -> output: {b:1}
|
|
3
|
+
const flattenObj = (obj, out={}) => {
|
|
4
|
+
Object.keys(obj).forEach(key => {
|
|
5
|
+
if (typeof obj[key] === 'object') {
|
|
6
|
+
out = flattenObj(obj[key], out); //recursively call for nesteds
|
|
7
|
+
} else {
|
|
8
|
+
out[key] = obj[key]; //direct assign for values
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return out;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
module.exports = { flattenObj };
|
package/jest.config.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
testPathIgnorePatterns: [
|
|
2
|
+
testPathIgnorePatterns: [
|
|
3
|
+
'/node_modules/',
|
|
4
|
+
'/cypress/',
|
|
5
|
+
'/test/',
|
|
6
|
+
],
|
|
3
7
|
transform: {
|
|
4
8
|
'.(js|jsx)': '@sucrase/jest-plugin',
|
|
5
9
|
},
|
|
6
10
|
testMatch: [
|
|
7
11
|
'**/components/**/?(*.)+(spec|test).[tj]s?(x)',
|
|
12
|
+
'**/helpers/**/?(*.)+(spec|test).[tj]s?(x)',
|
|
8
13
|
'**/utils/**/?(*.)+(spec|test).[tj]s?(x)',
|
|
9
14
|
],
|
|
10
15
|
snapshotSerializers: ['jest-serializer-html'],
|
|
11
16
|
setupFilesAfterEnv: ['<rootDir>/test-jest/helpers/setup.js'],
|
|
17
|
+
resolver: '@financial-times/jest-browser-resolver',
|
|
18
|
+
transformIgnorePatterns: ['/node_modules//(?!(@financial-times)/)'],
|
|
12
19
|
};
|
package/main.scss
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
@import '@financial-times/o-icons/main';
|
|
2
|
+
@import '@financial-times/o-colors/main';
|
|
3
|
+
@import '@financial-times/o-normalise/main';
|
|
4
|
+
@import '@financial-times/o-typography/main';
|
|
5
|
+
@import '@financial-times/o-forms/main';
|
|
6
|
+
@import '@financial-times/o-buttons/main';
|
|
7
|
+
@import '@financial-times/o-message/main';
|
|
8
|
+
@import '@financial-times/o-icons/main';
|
|
9
|
+
@import '@financial-times/o-stepped-progress/main';
|
|
10
|
+
@import '@financial-times/o-fonts/main';
|
|
11
|
+
@import './styles/package-change';
|
|
12
|
+
@import './styles/payment-term';
|
|
13
|
+
@import './styles/payment-type';
|
|
14
|
+
@import './styles/loader';
|
|
15
|
+
@import './styles/accept-terms';
|
|
16
|
+
@import './styles/message';
|
|
17
|
+
@import './styles/continue-reading';
|
|
18
|
+
@import './styles/banner';
|
|
19
|
+
@import './styles/customer-care';
|
|
20
|
+
@import './styles/forms-additional-field-information';
|
|
21
|
+
@import './styles/error';
|
|
22
|
+
@import './styles/graduation-date';
|
|
23
|
+
@import './styles/lite-subs-confirmation';
|
|
24
|
+
@import './styles/google-sign-in';
|
|
25
|
+
@import './styles/confirmation';
|
|
26
|
+
|
|
27
|
+
@include oTypography();
|
|
28
|
+
@include oFonts();
|
|
29
|
+
@include oForms(
|
|
30
|
+
$opts: (
|
|
31
|
+
'elements': (
|
|
32
|
+
'text',
|
|
33
|
+
'password',
|
|
34
|
+
'checkbox',
|
|
35
|
+
'select',
|
|
36
|
+
'radio-box',
|
|
37
|
+
'radio-round',
|
|
38
|
+
'textarea',
|
|
39
|
+
),
|
|
40
|
+
'features': (
|
|
41
|
+
'disabled',
|
|
42
|
+
'inline',
|
|
43
|
+
'right',
|
|
44
|
+
'suffix',
|
|
45
|
+
'error-summary',
|
|
46
|
+
),
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
@include oMessage();
|
|
50
|
+
@include oSteppedProgress();
|
|
51
|
+
|
|
52
|
+
// Custom styles
|
|
53
|
+
.ncf {
|
|
54
|
+
@include oTypographySans($scale: 0);
|
|
55
|
+
|
|
56
|
+
&__divider-horizontal {
|
|
57
|
+
margin: 0 0 16px;
|
|
58
|
+
height: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
top: 0;
|
|
61
|
+
border-top: thin solid rgba(0, 0, 0, 0.15);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__wrapper {
|
|
65
|
+
background: oColorsByName('white');
|
|
66
|
+
padding: 20px;
|
|
67
|
+
|
|
68
|
+
@include oGridRespondTo($from: S) {
|
|
69
|
+
padding: 50px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__margin {
|
|
74
|
+
margin: 20px 0;
|
|
75
|
+
|
|
76
|
+
@include oGridRespondTo($from: S) {
|
|
77
|
+
margin: 50px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__stepped-progress {
|
|
82
|
+
margin: 0 20px;
|
|
83
|
+
|
|
84
|
+
@include oGridRespondTo($from: S) {
|
|
85
|
+
margin: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__message {
|
|
90
|
+
margin: 0 0 oSpacingByName('s6');
|
|
91
|
+
|
|
92
|
+
@include oGridRespondTo($from: S) {
|
|
93
|
+
margin: 0 0 oSpacingByName('s3');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__light-licence-text {
|
|
98
|
+
font-weight: lighter;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__bold-licence-text {
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__paragraph {
|
|
106
|
+
padding: oSpacingByName('s4') 0;
|
|
107
|
+
margin: 0;
|
|
108
|
+
|
|
109
|
+
&--reduced-padding {
|
|
110
|
+
padding: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--subscription-confirmation {
|
|
114
|
+
margin: oSpacingByName('s4') 0 oSpacingByName('s2');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&__fieldset {
|
|
119
|
+
border: 0;
|
|
120
|
+
margin: 0 0 10px;
|
|
121
|
+
min-inline-size: auto;
|
|
122
|
+
padding: 0;
|
|
123
|
+
|
|
124
|
+
.ncf__header {
|
|
125
|
+
margin: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&__legend {
|
|
130
|
+
@include oTypographySans($weight: 'semibold', $include-font-family: false);
|
|
131
|
+
padding: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__fieldset-descriptor {
|
|
135
|
+
margin: 0;
|
|
136
|
+
@include oTypographySans($scale: -1, $include-font-family: false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__fields:not(:first-child) {
|
|
140
|
+
margin-top: oSpacingByName('s3');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__field {
|
|
144
|
+
&--center {
|
|
145
|
+
text-align: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--flex {
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: space-between;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&--min-content {
|
|
154
|
+
grid-template-columns: 1fr min-content min-content;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&--full-width-buttons {
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
padding-left: 0;
|
|
161
|
+
padding-right: 0;
|
|
162
|
+
|
|
163
|
+
.ncf__button {
|
|
164
|
+
flex: 1;
|
|
165
|
+
|
|
166
|
+
+ .ncf__button {
|
|
167
|
+
margin-left: 20px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&__terms {
|
|
174
|
+
@include oTypographySans($scale: 0);
|
|
175
|
+
color: oColorsByName('black-80');
|
|
176
|
+
|
|
177
|
+
&--small {
|
|
178
|
+
@include oTypographySans($scale: -1);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&__header {
|
|
183
|
+
@include oTypographyHeading($level: 3);
|
|
184
|
+
|
|
185
|
+
&--confirmation {
|
|
186
|
+
@include oTypographySerif($scale: 3);
|
|
187
|
+
margin: oSpacingByName('s6') 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__headed-paragraph {
|
|
192
|
+
.ncf__header {
|
|
193
|
+
@include oTypographySans($scale: 2, $include-font-family: false);
|
|
194
|
+
padding: 0;
|
|
195
|
+
margin: 0 0 oSpacingByName('s1');
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ncf__paragraph {
|
|
199
|
+
padding: 0;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&__header2 {
|
|
204
|
+
&--afterline {
|
|
205
|
+
@include oTypographySans(
|
|
206
|
+
$scale: 1,
|
|
207
|
+
$include-font-family: false,
|
|
208
|
+
$weight: 'semibold'
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
&:after {
|
|
212
|
+
padding-top: oSpacingByName('s3');
|
|
213
|
+
padding-bottom: 0;
|
|
214
|
+
content: '';
|
|
215
|
+
display: block;
|
|
216
|
+
width: 90px;
|
|
217
|
+
border-bottom: oSpacingByName('s1') solid oColorsByName('black');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&__link {
|
|
223
|
+
@include oTypographyLink;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&__link--external {
|
|
227
|
+
@include oTypographyLink($external: true);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&__button {
|
|
231
|
+
&--submit {
|
|
232
|
+
@include oButtonsContent(
|
|
233
|
+
$opts: (
|
|
234
|
+
'size': 'big',
|
|
235
|
+
'type': 'primary',
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&--mono {
|
|
241
|
+
@include oButtonsContent(
|
|
242
|
+
$opts: (
|
|
243
|
+
'type': 'secondary',
|
|
244
|
+
'theme': 'mono',
|
|
245
|
+
)
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&--inverse {
|
|
250
|
+
@include oButtonsContent(
|
|
251
|
+
$opts: (
|
|
252
|
+
'size': 'big',
|
|
253
|
+
'theme': 'inverse',
|
|
254
|
+
'type': 'secondary',
|
|
255
|
+
)
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&--secondary {
|
|
260
|
+
@include oButtonsContent(
|
|
261
|
+
$opts: (
|
|
262
|
+
'size': 'big',
|
|
263
|
+
'type': 'secondary',
|
|
264
|
+
)
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&--google {
|
|
269
|
+
@include oButtonsContent(
|
|
270
|
+
$opts: (
|
|
271
|
+
'size': 'big',
|
|
272
|
+
'type': 'secondary',
|
|
273
|
+
)
|
|
274
|
+
);
|
|
275
|
+
background-color: oColorsByName('white');
|
|
276
|
+
padding-left: 40px;
|
|
277
|
+
|
|
278
|
+
&::before {
|
|
279
|
+
content: '';
|
|
280
|
+
background: transparent
|
|
281
|
+
url('https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fwww.ft.com%2F__assets%2Fcreatives%2FG_active_focused_pressed.svg?source=m-login&width=20&height=20&format=svg')
|
|
282
|
+
no-repeat;
|
|
283
|
+
position: absolute;
|
|
284
|
+
left: 10px;
|
|
285
|
+
width: 18px;
|
|
286
|
+
height: 18px;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&--baseline {
|
|
291
|
+
vertical-align: baseline;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&--mid-width {
|
|
295
|
+
width: 30%;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
&--margin {
|
|
299
|
+
margin: 20px 0;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&__center {
|
|
304
|
+
text-align: center;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&__strong {
|
|
308
|
+
font-weight: oFontsWeight('semibold');
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&__regular {
|
|
312
|
+
font-weight: oFontsWeight('regular');
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&__icon {
|
|
316
|
+
background: oColorsByName('paper');
|
|
317
|
+
border: 2px solid oColorsByName('black-40');
|
|
318
|
+
border-radius: 9999px;
|
|
319
|
+
display: block;
|
|
320
|
+
height: 20px;
|
|
321
|
+
margin: 0 auto;
|
|
322
|
+
width: 20px;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&__icon--tick {
|
|
326
|
+
background: oColorsByName('teal');
|
|
327
|
+
border-color: oColorsByName('teal');
|
|
328
|
+
&::before {
|
|
329
|
+
@include oIconsContent(
|
|
330
|
+
$icon-name: 'tick',
|
|
331
|
+
$color: oColorsByName('white'),
|
|
332
|
+
$size: 20
|
|
333
|
+
);
|
|
334
|
+
content: '';
|
|
335
|
+
color: oColorsByName('white');
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&__icon--phone {
|
|
340
|
+
background: oColorsByName('teal');
|
|
341
|
+
border-color: oColorsByName('teal');
|
|
342
|
+
&::before {
|
|
343
|
+
@include oIconsContent(
|
|
344
|
+
$icon-name: 'phone',
|
|
345
|
+
$color: oColorsByName('white'),
|
|
346
|
+
$size: 20
|
|
347
|
+
);
|
|
348
|
+
content: '';
|
|
349
|
+
color: oColorsByName('white');
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
&__icon--error {
|
|
354
|
+
background: oColorsByName('crimson');
|
|
355
|
+
border-color: oColorsByName('crimson');
|
|
356
|
+
&::before {
|
|
357
|
+
@include oIconsContent(
|
|
358
|
+
$icon-name: 'warning',
|
|
359
|
+
$color: oColorsByName('white'),
|
|
360
|
+
$size: 20
|
|
361
|
+
);
|
|
362
|
+
content: '';
|
|
363
|
+
color: oColorsByName('white');
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&__icon--inline-edit {
|
|
368
|
+
@include oIconsContent(
|
|
369
|
+
$icon-name: 'edit',
|
|
370
|
+
$color: oColorsByName('black'),
|
|
371
|
+
$size: 20
|
|
372
|
+
);
|
|
373
|
+
border: 0;
|
|
374
|
+
vertical-align: middle;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
&__icon--large {
|
|
378
|
+
width: 40px;
|
|
379
|
+
height: 40px;
|
|
380
|
+
&::before {
|
|
381
|
+
width: 40px;
|
|
382
|
+
height: 40px;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&__icon-download {
|
|
387
|
+
@include oIconsContent(
|
|
388
|
+
$icon-name: 'download',
|
|
389
|
+
$color: oColorsByName('black-70'),
|
|
390
|
+
$size: 32
|
|
391
|
+
);
|
|
392
|
+
border: 0;
|
|
393
|
+
vertical-align: middle;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
&__list {
|
|
397
|
+
&-title,
|
|
398
|
+
&-data {
|
|
399
|
+
width: calc(50% - 10px);
|
|
400
|
+
margin: 8px 0;
|
|
401
|
+
display: inline-block;
|
|
402
|
+
vertical-align: middle;
|
|
403
|
+
}
|
|
404
|
+
&-description {
|
|
405
|
+
margin: -10px 0 10px;
|
|
406
|
+
@include oTypographySans($scale: -1, $include-font-family: false);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
&-title {
|
|
410
|
+
font-weight: oFontsWeight('semibold');
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
&__delivery-option {
|
|
415
|
+
@include bigRadioButton($className: '.ncf__delivery-option');
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
&__delivery-option--single {
|
|
419
|
+
.ncf__delivery-option__label {
|
|
420
|
+
// We need to hide the radio button if this the sole delivery option
|
|
421
|
+
&::after,
|
|
422
|
+
&::before {
|
|
423
|
+
display: none;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
&__unordered-list {
|
|
429
|
+
padding-inline-start: 25px;
|
|
430
|
+
> li {
|
|
431
|
+
margin-bottom: oSpacingByName('s3');
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@include ncfMessage();
|
|
436
|
+
@include ncfPackageChange();
|
|
437
|
+
@include ncfPaymentTerm();
|
|
438
|
+
@include ncfPaymentType();
|
|
439
|
+
@include ncfLoader();
|
|
440
|
+
@include ncfContinueReading();
|
|
441
|
+
@include ncfBanner();
|
|
442
|
+
@include ncfCustomerCarePanel();
|
|
443
|
+
@include ncfAcceptTermsList();
|
|
444
|
+
@include ncfGraduationDate();
|
|
445
|
+
@include ncfLiteSubsConfirmation();
|
|
446
|
+
@include ncfConfirmation();
|
|
447
|
+
|
|
448
|
+
&__hidden {
|
|
449
|
+
display: none !important;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.o-normalise-visually-hidden {
|
|
453
|
+
@include oNormaliseVisuallyHidden;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@include ncfGoogleSignIn();
|
|
458
|
+
|
|
459
|
+
.ncf__password-field .ncf__password-field--show-password {
|
|
460
|
+
margin-top: 7px;
|
|
461
|
+
}
|