@financial-times/dotcom-ui-header 7.3.1 → 7.3.2
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/package.json +6 -2
- package/src/__stories__/demos.scss +28 -0
- package/src/__stories__/story-data/actionsUK.ts +5 -0
- package/src/__stories__/story-data/anon.ts +24 -0
- package/src/__stories__/story-data/drawerUK.ts +968 -0
- package/src/__stories__/story-data/editionsInternational.ts +8 -0
- package/src/__stories__/story-data/editionsUK.ts +8 -0
- package/src/__stories__/story-data/index.ts +41 -0
- package/src/__stories__/story-data/navbarRight.ts +19 -0
- package/src/__stories__/story-data/navbarRightAnon.ts +19 -0
- package/src/__stories__/story-data/navbarSimple.ts +24 -0
- package/src/__stories__/story-data/navbarUK.ts +996 -0
- package/src/__stories__/story-data/profile.ts +44 -0
- package/src/__stories__/story-data/subNavigationProfile.ts +27 -0
- package/src/__stories__/story-data/subNavigationUK.ts +37 -0
- package/src/__stories__/story-data/user.ts +13 -0
- package/src/__stories__/story.tsx +163 -0
- package/src/__test__/components/Drawer.spec.tsx +19 -0
- package/src/__test__/components/MainHeader.spec.tsx +26 -0
- package/src/__test__/components/NoOutboundLinks.spec.tsx +19 -0
- package/src/__test__/components/StickyHeader.spec.tsx +19 -0
- package/src/__test__/components/__snapshots__/Drawer.spec.tsx.snap +2718 -0
- package/src/__test__/components/__snapshots__/MainHeader.spec.tsx.snap +5547 -0
- package/src/__test__/components/__snapshots__/NoOutboundLinks.spec.tsx.snap +337 -0
- package/src/__test__/components/__snapshots__/StickyHeader.spec.tsx.snap +588 -0
- package/src/__test__/enzyme/component.spec.tsx +107 -0
- package/src/__test__/enzyme/drawer.spec.tsx +114 -0
- package/src/components/drawer/additionalPartials.tsx +105 -0
- package/src/components/drawer/topLevelPartials.tsx +172 -0
- package/src/components/navigation/partials.tsx +192 -0
- package/src/components/search/partials.tsx +52 -0
- package/src/components/sticky/partials.tsx +164 -0
- package/src/components/sub-navigation/partials.tsx +106 -0
- package/src/components/svg-components/BrandFtMasthead.tsx +16 -0
- package/src/components/top/partials.tsx +189 -0
- package/src/header.scss +29 -0
- package/src/index.tsx +123 -0
- package/src/interfaces.d.ts +19 -0
- package/src/utils.ts +5 -0
- package/styles.scss +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/dotcom-ui-header",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "component.js",
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
"npm": "7.x || 8.x"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
|
-
"dist/"
|
|
47
|
+
"dist/",
|
|
48
|
+
"src/",
|
|
49
|
+
"browser.js",
|
|
50
|
+
"component.js",
|
|
51
|
+
"styles.scss"
|
|
48
52
|
],
|
|
49
53
|
"repository": {
|
|
50
54
|
"type": "git",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* Additional Origami styles */
|
|
2
|
+
/* Demo styles are not included in o-header by default */
|
|
3
|
+
|
|
4
|
+
.demo-sticky {
|
|
5
|
+
height: 240px;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.demo-sticky-message {
|
|
10
|
+
margin: 50px 0;
|
|
11
|
+
text-align: center;
|
|
12
|
+
font-size: 24px;
|
|
13
|
+
|
|
14
|
+
&:before,
|
|
15
|
+
&:after {
|
|
16
|
+
padding: 0 1em;
|
|
17
|
+
font-size: 75%;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.demo-sticky-message--scroll {
|
|
22
|
+
margin-bottom: 1999px;
|
|
23
|
+
|
|
24
|
+
&:before,
|
|
25
|
+
&:after {
|
|
26
|
+
content: '▼';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TNavMenu } from '@financial-times/dotcom-types-navigation'
|
|
2
|
+
|
|
3
|
+
const data: TNavMenu = {
|
|
4
|
+
label: 'User',
|
|
5
|
+
items: [
|
|
6
|
+
{
|
|
7
|
+
label: 'Help Centre',
|
|
8
|
+
url: 'http://help.ft.com',
|
|
9
|
+
submenu: null
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: 'Subscribe',
|
|
13
|
+
url: '/products?segmentId=#',
|
|
14
|
+
submenu: null
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Sign In',
|
|
18
|
+
url: '/login?location=#',
|
|
19
|
+
submenu: null
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default data
|