@financial-times/n-conversion-forms 41.3.1 → 42.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.
Files changed (113) hide show
  1. package/.storybook/preview-body.html +3 -0
  2. package/.storybook/preview.js +2 -2
  3. package/.toolkitstate/ci.json +3 -3
  4. package/.toolkitstate/install.json +1 -1
  5. package/components/__snapshots__/accept-terms.spec.js.snap +107 -150
  6. package/components/__snapshots__/b2c-partnership-confirmation.spec.js.snap +36 -72
  7. package/components/__snapshots__/confirmation.spec.js.snap +71 -127
  8. package/components/__snapshots__/continue-reading.spec.js.snap +3 -3
  9. package/components/__snapshots__/customer-care.spec.js.snap +16 -24
  10. package/components/__snapshots__/debug.spec.js.snap +13 -7
  11. package/components/__snapshots__/deferred-billing-terms.spec.js.snap +12 -18
  12. package/components/__snapshots__/error-page.spec.js.snap +12 -18
  13. package/components/__snapshots__/fieldset.spec.js.snap +1 -1
  14. package/components/__snapshots__/ft-edit-registration-confirmation.spec.js.snap +5 -5
  15. package/components/__snapshots__/graduation-date.spec.js.snap +4 -6
  16. package/components/__snapshots__/industry.spec.js.snap +8 -706
  17. package/components/__snapshots__/licence-confirmation.spec.js.snap +17 -28
  18. package/components/__snapshots__/licence-header.spec.js.snap +1 -1
  19. package/components/__snapshots__/licence-sign-in.spec.js.snap +1 -1
  20. package/components/__snapshots__/loader.spec.js.snap +1 -1
  21. package/components/__snapshots__/package-change.spec.js.snap +16 -11
  22. package/components/__snapshots__/payment-term.spec.js.snap +40 -60
  23. package/components/__snapshots__/position.spec.js.snap +8 -262
  24. package/components/__snapshots__/registration-confirmation.spec.js.snap +9 -7
  25. package/components/__snapshots__/responsibility.spec.js.snap +8 -442
  26. package/components/__snapshots__/submit.spec.js.snap +6 -6
  27. package/components/accept-terms-business.jsx +2 -3
  28. package/components/accept-terms-business.spec.jsx +3 -1
  29. package/components/accept-terms-privacy-policy.jsx +2 -5
  30. package/components/accept-terms-privacy-policy.spec.js +1 -1
  31. package/components/accept-terms-subscription.jsx +7 -12
  32. package/components/accept-terms-subscription.spec.js +1 -1
  33. package/components/accept-terms.jsx +12 -20
  34. package/components/b2c-partnership-confirmation.jsx +3 -5
  35. package/components/confirmation.jsx +5 -9
  36. package/components/confirmation.stories.js +4 -6
  37. package/components/continue-reading.jsx +1 -1
  38. package/components/customer-care.jsx +4 -4
  39. package/components/debug.jsx +12 -12
  40. package/components/deferred-billing-terms.jsx +3 -6
  41. package/components/error-page.jsx +4 -4
  42. package/components/fieldset.jsx +1 -1
  43. package/components/ft-edit-registration-confirmation.jsx +2 -2
  44. package/components/graduation-date.jsx +2 -4
  45. package/components/index.js +0 -1
  46. package/components/industry.jsx +1 -3
  47. package/components/industry.spec.js +7 -2
  48. package/components/licence-confirmation.jsx +2 -3
  49. package/components/licence-confirmation.stories.js +1 -1
  50. package/components/licence-sign-in.jsx +1 -1
  51. package/components/loader.jsx +4 -1
  52. package/components/package-change.jsx +4 -5
  53. package/components/payment-term.jsx +3 -5
  54. package/components/position.jsx +1 -2
  55. package/components/position.spec.js +7 -2
  56. package/components/proceed-with-payment-link.jsx +8 -2
  57. package/components/proceed-with-payment-link.stories.js +1 -1
  58. package/components/registration-confirmation.jsx +5 -3
  59. package/components/responsibility.jsx +1 -2
  60. package/components/responsibility.spec.js +7 -2
  61. package/components/submit.jsx +1 -1
  62. package/components/subscription-confirmation-with-payment-link.jsx +1 -1
  63. package/dist/accept-terms-business.jsx +2 -3
  64. package/dist/accept-terms-business.spec.jsx +1 -1
  65. package/dist/accept-terms-privacy-policy.jsx +2 -5
  66. package/dist/accept-terms-subscription.jsx +7 -12
  67. package/dist/accept-terms.jsx +10 -20
  68. package/dist/b2c-partnership-confirmation.jsx +5 -7
  69. package/dist/confirmation.jsx +4 -7
  70. package/dist/continue-reading.jsx +1 -1
  71. package/dist/customer-care.jsx +3 -4
  72. package/dist/debug.jsx +6 -6
  73. package/dist/deferred-billing-terms.jsx +3 -6
  74. package/dist/error-page.jsx +3 -4
  75. package/dist/fieldset.jsx +1 -1
  76. package/dist/ft-edit-registration-confirmation.jsx +2 -2
  77. package/dist/graduation-date.jsx +6 -4
  78. package/dist/index.js +0 -7
  79. package/dist/industry.jsx +1 -3
  80. package/dist/licence-confirmation.jsx +3 -4
  81. package/dist/licence-sign-in.jsx +1 -1
  82. package/dist/loader.jsx +1 -1
  83. package/dist/package-change.jsx +5 -4
  84. package/dist/payment-term.jsx +6 -4
  85. package/dist/position.jsx +1 -2
  86. package/dist/proceed-with-payment-link.jsx +2 -2
  87. package/dist/registration-confirmation.jsx +7 -5
  88. package/dist/responsibility.jsx +1 -2
  89. package/dist/submit.jsx +1 -1
  90. package/dist/subscription-confirmation-with-payment-link.jsx +1 -1
  91. package/main.scss +132 -167
  92. package/package.json +3 -6
  93. package/styles/_shared.scss +125 -100
  94. package/styles/accept-terms.scss +6 -5
  95. package/styles/banner.scss +66 -60
  96. package/styles/confirmation.scss +50 -55
  97. package/styles/continue-reading.scss +56 -39
  98. package/styles/error.scss +1 -1
  99. package/styles/forms-additional-field-information.scss +8 -4
  100. package/styles/ft-edit-registration-confirmation.scss +228 -224
  101. package/styles/loader.scss +40 -45
  102. package/styles/package-change.scss +1 -4
  103. package/styles/payment-term.scss +108 -89
  104. package/styles/payment-type.scss +117 -112
  105. package/styles/proceed-with-payment-link.scss +32 -18
  106. package/styles/subscription-confirmation-with-payment-link.scss +64 -24
  107. package/components/__snapshots__/google-sign-in.spec.js.snap +0 -13
  108. package/components/google-sign-in.jsx +0 -21
  109. package/components/google-sign-in.spec.js +0 -14
  110. package/components/google-sign-in.stories.js +0 -13
  111. package/dist/google-sign-in.jsx +0 -24
  112. package/helpers/demographics.js +0 -606
  113. package/styles/google-sign-in.scss +0 -26
@@ -2,16 +2,16 @@
2
2
  @import '@financial-times/o-buttons/main';
3
3
 
4
4
  .subscription-active-with-payment-link {
5
- background: oColorsByName('ft-grey');
6
- padding: oSpacingByName('s6') oSpacingByName('s6') oSpacingByName('s8');
7
- color: oColorsByName('white');
5
+ background: var(--o3-color-palette-ft-grey);
6
+ padding: var(--o3-spacing-s) var(--o3-spacing-s) var(--o3-spacing-m);
7
+ color: var(--o3-color-palette-white);
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  }
11
11
 
12
12
  .subscription-active-with-payment-link--responsive {
13
13
  @include oGridRespondTo($from: M) {
14
- padding: oSpacingByName('s6') 50px oSpacingByName('s8');
14
+ padding: var(--o3-spacing-s) 50px var(--o3-spacing-m);
15
15
  }
16
16
  }
17
17
 
@@ -26,61 +26,101 @@
26
26
  justify-content: center;
27
27
  width: 24px;
28
28
  height: 24px;
29
- background-color: oColorsByName('ft-pink');
29
+ background-color: var(--o3-color-palette-ft-pink);
30
30
  border-radius: 50%;
31
- margin-right: oSpacingByName('s4');
31
+ margin-right: var(--o3-spacing-2xs);
32
32
  }
33
33
 
34
34
  .subscription-active-with-payment-link__icon {
35
- @include oIconsContent($icon-name: 'tick', $color: oColorsByName('ft-grey'), $size: 34);
35
+ display: inline-block;
36
+ width: 24px;
37
+ height: 24px;
38
+ margin: 6px;
39
+ margin-top: 15px;
40
+ /* Set the icon colour, In this case match the
41
+ current foreground text colour. */
42
+ background-color: var(--o3-color-palette-ft-grey);
43
+ /* Mask the square with an Origami icon. */
44
+ mask-image: var(--o3-icon-tick);
45
+ mask-repeat: no-repeat;
46
+ mask-size: contain;
36
47
  }
37
48
 
38
49
  .subscription-active-with-payment-link__title {
39
50
  margin: 0;
40
- @include oTypographySans($scale: 4, $weight: 'regular');
51
+
52
+ font-family: var(--o3-type-title-md-font-family);
53
+ font-size: var(--o3-type-title-md-font-size);
54
+ font-weight: var(--o3-type-title-md-font-weight);
55
+ line-height: var(--o3-type-title-md-line-height);
41
56
  }
42
57
 
43
58
  .subscription-active-with-payment-link__description {
44
- @include oTypographySans($scale: 1);
45
- color: oColorsByName('white');
59
+ font-family: var(--o3-type-body-base-font-family);
60
+ font-size: var(--o3-type-body-base-font-size);
61
+ font-weight: var(--o3-type-body-base-font-weight);
62
+ line-height: var(--o3-type-body-base-line-height);
63
+
64
+ color: var(--o3-color-palette-white);
46
65
  }
47
66
 
48
67
  .subscription-active-with-payment-link__label {
49
- @include oTypographySans($scale: 1);
50
- color: oColorsByName('ft-pink');
51
- margin-bottom: oSpacingByName('s2');
68
+ font-family: var(--o3-type-body-base-font-family);
69
+ font-size: var(--o3-type-body-base-font-size);
70
+ font-weight: var(--o3-type-body-base-font-weight);
71
+ line-height: var(--o3-type-body-base-line-height);
72
+
73
+ color: var(--o3-color-palette-ft-pink);
74
+ margin-bottom: var(--o3-spacing-4xs);
52
75
  }
53
76
 
54
77
  .subscription-active-with-payment-link__payment-box {
55
78
  display: flex;
56
79
  align-items: center;
57
- background: oColorsByName('ft-grey');
80
+ background: var(--o3-color-palette-ft-grey);
58
81
  overflow: hidden;
59
- gap: oSpacingByName('s2');
82
+ gap: var(--o3-spacing-4xs);
60
83
  width: 100%;
61
84
  }
62
85
 
63
86
  .subscription-active-with-payment-link__input {
64
87
  flex-grow: 1;
65
- background: oColorsByName('white-60');
88
+ background: var(--o3-color-palette-white-60);
66
89
  border: none;
67
90
  box-sizing: border-box;
68
- color: oColorsByName('black-60');
69
- @include oTypographySans($scale: 1);
70
- padding: 10px oSpacingByName('s4');
91
+ color: var(--o3-color-palette-black-60);
92
+
93
+ font-family: var(--o3-type-body-base-font-family);
94
+ font-size: var(--o3-type-body-base-font-size);
95
+ font-weight: var(--o3-type-body-base-font-weight);
96
+ line-height: var(--o3-type-body-base-line-height);
97
+
98
+ padding: 10px var(--o3-spacing-2xs);
71
99
  text-overflow: ellipsis;
72
100
  height: 40px;
73
101
  }
74
102
 
75
103
  .subscription-active-with-payment-link__button {
76
- @include oTypographySans($scale: 1);
77
- @include oButtonsContent($opts: ('type': 'primary', 'theme': ('color': 'ft-pink')));
78
- color: oColorsByName('ft-grey');
104
+ font-family: var(--o3-type-body-base-font-family);
105
+ font-size: var(--o3-type-body-base-font-size);
106
+ font-weight: var(--o3-type-body-base-font-weight);
107
+ line-height: var(--o3-type-body-base-line-height);
79
108
  transition: background 0.2s ease-in-out;
80
109
  padding: 10px 20px;
81
110
  height: 40px;
82
111
  }
83
112
 
84
- .subscription-active-with-payment-link__button--copied {
85
- background-color: oColorsMix($color: 'ft-pink', $background: 'white', $percentage: 80%);
113
+ .subscription-active-with-payment-link__button.subscription-active-with-payment-link__button--copied {
114
+ background-color: #fdd9c1;; // Fallback for browsers that don’t support color-mix()
115
+ background-color: color-mix(in srgb, var(--o3-color-palette-ft-pink) 80%, var(--o3-color-palette-white) 20%);
116
+ }
117
+
118
+ .subscription-active-with-payment-link__button.subscription-active-with-payment-link__button--ft-pink{
119
+ background-color: var(--o3-color-palette-ft-pink);
120
+ color: var(--o3-color-palette-ft-grey);
121
+ }
122
+
123
+ .subscription-active-with-payment-link__button.subscription-active-with-payment-link__button--ft-pink:hover{
124
+ background-color:#caa68e;
125
+ color: var(--o3-color-palette-ft-grey);
86
126
  }
@@ -1,13 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`GoogleSignIn renders with default props 1`] = `
4
- <link href="https://fonts.googleapis.com/css?family=Roboto"
5
- rel="stylesheet"
6
- >
7
- <base target="_parent">
8
- <a class="google_button"
9
- href="https://www.ft.com"
10
- >
11
- Sign in with Google
12
- </a>
13
- `;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- export function GoogleSignIn({ signInRedirectUrl }) {
5
- return (
6
- <>
7
- <link
8
- href="https://fonts.googleapis.com/css?family=Roboto"
9
- rel="stylesheet"
10
- ></link>
11
- <base target="_parent" />
12
- <a className="google_button" href={signInRedirectUrl}>
13
- Sign in with Google
14
- </a>
15
- </>
16
- );
17
- }
18
-
19
- GoogleSignIn.propTypes = {
20
- signInRedirectUrl: PropTypes.string.isRequired,
21
- };
@@ -1,14 +0,0 @@
1
- import { GoogleSignIn } from './index';
2
- import { expectToRenderCorrectly } from '../test-jest/helpers/expect-to-render-correctly';
3
-
4
- expect.extend(expectToRenderCorrectly);
5
-
6
- describe('GoogleSignIn', () => {
7
- it('renders with default props', () => {
8
- const props = {
9
- signInRedirectUrl: 'https://www.ft.com',
10
- };
11
-
12
- expect(GoogleSignIn).toRenderCorrectly(props);
13
- });
14
- });
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { GoogleSignIn } from './google-sign-in';
3
-
4
- export default {
5
- title: 'Google Sign In',
6
- component: GoogleSignIn,
7
- };
8
-
9
- export const Basic = (args) => <GoogleSignIn {...args} />;
10
- Basic.args = {
11
- signInRedirectUrl:
12
- 'https://social-login-svc-eu-test.memb.ft.com/login/google',
13
- };
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.GoogleSignIn = GoogleSignIn;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- function GoogleSignIn(_ref) {
11
- var signInRedirectUrl = _ref.signInRedirectUrl;
12
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("link", {
13
- href: "https://fonts.googleapis.com/css?family=Roboto",
14
- rel: "stylesheet"
15
- }), /*#__PURE__*/_react["default"].createElement("base", {
16
- target: "_parent"
17
- }), /*#__PURE__*/_react["default"].createElement("a", {
18
- className: "google_button",
19
- href: signInRedirectUrl
20
- }, "Sign in with Google"));
21
- }
22
- GoogleSignIn.propTypes = {
23
- signInRedirectUrl: _propTypes["default"].string.isRequired
24
- };