@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.
Files changed (40) hide show
  1. package/package.json +6 -2
  2. package/src/__stories__/demos.scss +28 -0
  3. package/src/__stories__/story-data/actionsUK.ts +5 -0
  4. package/src/__stories__/story-data/anon.ts +24 -0
  5. package/src/__stories__/story-data/drawerUK.ts +968 -0
  6. package/src/__stories__/story-data/editionsInternational.ts +8 -0
  7. package/src/__stories__/story-data/editionsUK.ts +8 -0
  8. package/src/__stories__/story-data/index.ts +41 -0
  9. package/src/__stories__/story-data/navbarRight.ts +19 -0
  10. package/src/__stories__/story-data/navbarRightAnon.ts +19 -0
  11. package/src/__stories__/story-data/navbarSimple.ts +24 -0
  12. package/src/__stories__/story-data/navbarUK.ts +996 -0
  13. package/src/__stories__/story-data/profile.ts +44 -0
  14. package/src/__stories__/story-data/subNavigationProfile.ts +27 -0
  15. package/src/__stories__/story-data/subNavigationUK.ts +37 -0
  16. package/src/__stories__/story-data/user.ts +13 -0
  17. package/src/__stories__/story.tsx +163 -0
  18. package/src/__test__/components/Drawer.spec.tsx +19 -0
  19. package/src/__test__/components/MainHeader.spec.tsx +26 -0
  20. package/src/__test__/components/NoOutboundLinks.spec.tsx +19 -0
  21. package/src/__test__/components/StickyHeader.spec.tsx +19 -0
  22. package/src/__test__/components/__snapshots__/Drawer.spec.tsx.snap +2718 -0
  23. package/src/__test__/components/__snapshots__/MainHeader.spec.tsx.snap +5547 -0
  24. package/src/__test__/components/__snapshots__/NoOutboundLinks.spec.tsx.snap +337 -0
  25. package/src/__test__/components/__snapshots__/StickyHeader.spec.tsx.snap +588 -0
  26. package/src/__test__/enzyme/component.spec.tsx +107 -0
  27. package/src/__test__/enzyme/drawer.spec.tsx +114 -0
  28. package/src/components/drawer/additionalPartials.tsx +105 -0
  29. package/src/components/drawer/topLevelPartials.tsx +172 -0
  30. package/src/components/navigation/partials.tsx +192 -0
  31. package/src/components/search/partials.tsx +52 -0
  32. package/src/components/sticky/partials.tsx +164 -0
  33. package/src/components/sub-navigation/partials.tsx +106 -0
  34. package/src/components/svg-components/BrandFtMasthead.tsx +16 -0
  35. package/src/components/top/partials.tsx +189 -0
  36. package/src/header.scss +29 -0
  37. package/src/index.tsx +123 -0
  38. package/src/interfaces.d.ts +19 -0
  39. package/src/utils.ts +5 -0
  40. 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.1",
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,5 @@
1
+ import { TNavAction } from '@financial-times/dotcom-types-navigation'
2
+
3
+ const data: TNavAction = { id: 'subscribe', name: 'Subscribe for full access', url: '#' }
4
+
5
+ export default data
@@ -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