@financial-times/dotcom-ui-header 9.4.1 → 9.5.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.
|
@@ -14,7 +14,7 @@ const DrawerIcon = () => (react_1.default.createElement("a", { href: "#o-header-
|
|
|
14
14
|
const SearchIcon = () => (react_1.default.createElement("a", { href: `#o-header-search-primary`, className: "o-header__top-icon-link o-header__top-icon-link--search", "aria-controls": `o-header-search-primary`, title: "Open search bar", "data-trackable": "search-toggle" },
|
|
15
15
|
react_1.default.createElement("span", { className: "o-header__top-link-label" }, "Open search bar")));
|
|
16
16
|
const MyAccountLink = ({ item, signedIn }) => {
|
|
17
|
-
const classNames = 'o-header__top-
|
|
17
|
+
const classNames = 'o-header__top-myaccount';
|
|
18
18
|
const id = signedIn ? 'o-header-top-link-myaccount' : 'o-header-top-link-signin';
|
|
19
19
|
return (react_1.default.createElement("a", { className: classNames, id: id, href: item.url || undefined, "data-trackable": item.label },
|
|
20
20
|
react_1.default.createElement("span", null, item.label)));
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"affectsGlobalScope": false
|
|
188
188
|
},
|
|
189
189
|
"../src/components/top/partials.tsx": {
|
|
190
|
-
"version": "
|
|
190
|
+
"version": "6e068efc8dd9cf189851596ea98000f6299a910dfd4c4da49ac9f7d5f4fb3001",
|
|
191
191
|
"signature": "52e9ca0196757edb87416ec63a0da3f2f6963cb4ca1fab821e487cf42fd0b4cf",
|
|
192
192
|
"affectsGlobalScope": false
|
|
193
193
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/dotcom-ui-header",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "component.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@financial-times/dotcom-types-navigation": "^9.
|
|
25
|
+
"@financial-times/dotcom-types-navigation": "^9.5.1",
|
|
26
26
|
"n-topic-search": "^4.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@svgr/core": "^5.0.0",
|
|
31
31
|
"camelcase": "^6.0.0",
|
|
32
32
|
"check-engine": "^1.10.1",
|
|
33
|
-
"@financial-times/o-header": "^
|
|
33
|
+
"@financial-times/o-header": "^12.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@financial-times/o-header": "^
|
|
36
|
+
"@financial-times/o-header": "^12.0.0",
|
|
37
37
|
"@financial-times/logo-images": "^1.10.1",
|
|
38
38
|
"react": "17.x || 18.x",
|
|
39
39
|
"react-dom": "17.x || 18.x",
|
|
@@ -101,7 +101,7 @@ exports[`dotcom-ui-header/src/components/MainHeader renders ASK FT button 1`] =
|
|
|
101
101
|
Subscribe
|
|
102
102
|
</a>
|
|
103
103
|
<a
|
|
104
|
-
className="o-header__top-
|
|
104
|
+
className="o-header__top-myaccount"
|
|
105
105
|
data-trackable="My Account"
|
|
106
106
|
href="/myaccount"
|
|
107
107
|
id="o-header-top-link-myaccount"
|
|
@@ -1945,7 +1945,7 @@ exports[`dotcom-ui-header/src/components/MainHeader renders a right aligned subn
|
|
|
1945
1945
|
Subscribe
|
|
1946
1946
|
</a>
|
|
1947
1947
|
<a
|
|
1948
|
-
className="o-header__top-
|
|
1948
|
+
className="o-header__top-myaccount"
|
|
1949
1949
|
data-trackable="My Account"
|
|
1950
1950
|
href="/myaccount"
|
|
1951
1951
|
id="o-header-top-link-myaccount"
|
|
@@ -3784,7 +3784,7 @@ exports[`dotcom-ui-header/src/components/MainHeader renders as a logged in user
|
|
|
3784
3784
|
Subscribe
|
|
3785
3785
|
</a>
|
|
3786
3786
|
<a
|
|
3787
|
-
className="o-header__top-
|
|
3787
|
+
className="o-header__top-myaccount"
|
|
3788
3788
|
data-trackable="My Account"
|
|
3789
3789
|
href="/myaccount"
|
|
3790
3790
|
id="o-header-top-link-myaccount"
|
|
@@ -5628,7 +5628,7 @@ exports[`dotcom-ui-header/src/components/MainHeader renders as an anonymous user
|
|
|
5628
5628
|
Subscribe
|
|
5629
5629
|
</a>
|
|
5630
5630
|
<a
|
|
5631
|
-
className="o-header__top-
|
|
5631
|
+
className="o-header__top-myaccount"
|
|
5632
5632
|
data-trackable="Sign In"
|
|
5633
5633
|
href="/login?location=#"
|
|
5634
5634
|
id="o-header-top-link-signin"
|
|
@@ -41,7 +41,7 @@ const SearchIcon = () => (
|
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
const MyAccountLink = ({ item, signedIn }: { item: TNavMenuItem; signedIn: boolean }) => {
|
|
44
|
-
const classNames = 'o-header__top-
|
|
44
|
+
const classNames = 'o-header__top-myaccount'
|
|
45
45
|
const id = signedIn ? 'o-header-top-link-myaccount' : 'o-header-top-link-signin'
|
|
46
46
|
|
|
47
47
|
return (
|
package/src/header.scss
CHANGED
|
@@ -28,42 +28,6 @@
|
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// The styles below are part of an AB test
|
|
32
|
-
// If the test is successful these should be incorporated into o-header
|
|
33
|
-
.ft-header__top-link--myaccount {
|
|
34
|
-
@include oTypographySans(0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.ft-header__top-link--myaccount span {
|
|
39
|
-
vertical-align: middle;
|
|
40
|
-
// Hide the myaccount/sign in text on smaller screens leaving the icon only
|
|
41
|
-
@include oGridRespondTo($until: 'M') {
|
|
42
|
-
@include oNormaliseVisuallyHidden;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Override the hover styles so the underline
|
|
47
|
-
// Is only under the text and not the icon
|
|
48
|
-
// And is closer to the text
|
|
49
|
-
.ft-header__top-link--myaccount::after {
|
|
50
|
-
width: calc(100% - 32px);
|
|
51
|
-
left: unset;
|
|
52
|
-
right: 0;
|
|
53
|
-
bottom: 8px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ft-header__top-link--myaccount::before {
|
|
57
|
-
content: '';
|
|
58
|
-
display: block;
|
|
59
|
-
@include oIconsContent(
|
|
60
|
-
$icon-name: 'user',
|
|
61
|
-
$color: oColorsByName('black'),
|
|
62
|
-
$size: 32
|
|
63
|
-
);
|
|
64
|
-
vertical-align: middle;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
31
|
.o-header__drawer-search-term {
|
|
68
32
|
width: 100%;
|
|
69
33
|
}
|