@financial-times/dotcom-ui-footer 11.3.0 → 12.0.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.
- package/dist/node/components/partials.d.ts +4 -4
- package/dist/node/components/partials.js +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -2834
- package/package.json +2 -5
- package/src/__test__/component.spec.tsx +10 -10
- package/src/{__stories__/story-data.ts → __test__/fixtures/data.ts} +1 -1
- package/src/{__stories__ → __test__/fixtures}/footer.ts +1 -1
- package/styles.scss +1 -1
- package/src/__stories__/story.tsx +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/dotcom-ui-footer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "component.js",
|
|
6
6
|
"styles": "styles.scss",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@financial-times/dotcom-types-navigation": "^
|
|
23
|
+
"@financial-times/dotcom-types-navigation": "^12.0.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@financial-times/o-footer": "^9.2.0",
|
|
@@ -45,8 +45,5 @@
|
|
|
45
45
|
"homepage": "https://github.com/Financial-Times/dotcom-page-kit/tree/HEAD/packages/dotcom-ui-footer",
|
|
46
46
|
"volta": {
|
|
47
47
|
"extends": "../../package.json"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@financial-times/o-footer": "^9.2.0"
|
|
51
48
|
}
|
|
52
49
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import { render } from '@testing-library/react'
|
|
6
6
|
|
|
7
|
-
import dataFixture from '
|
|
7
|
+
import dataFixture from './fixtures/data'
|
|
8
8
|
import { Footer, LegalFooter } from '../index'
|
|
9
9
|
|
|
10
|
-
describe('dotcom-ui-footer', () => {
|
|
10
|
+
describe('dotcom-ui-footer', () => {
|
|
11
11
|
it('renders the available footer variants', () => {
|
|
12
12
|
const footer = render(<Footer {...dataFixture} />)
|
|
13
13
|
const legalFooter = render(<LegalFooter {...dataFixture} />)
|
|
@@ -16,7 +16,7 @@ describe('dotcom-ui-footer', () => {
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
it('renders the copyright section', () => {
|
|
19
|
-
const { container: footerContainer } = render(<Footer {...dataFixture} />
|
|
19
|
+
const { container: footerContainer } = render(<Footer {...dataFixture} />)
|
|
20
20
|
const { container: legalFooterContainer } = render(<LegalFooter {...dataFixture} />)
|
|
21
21
|
|
|
22
22
|
expect(footerContainer.querySelector('.o-footer__copyright')).not.toBeNull()
|
|
@@ -24,7 +24,7 @@ describe('dotcom-ui-footer', () => {
|
|
|
24
24
|
})
|
|
25
25
|
|
|
26
26
|
it('renders the Nikkei banner', () => {
|
|
27
|
-
const { container: footerContainer } = render(<Footer {...dataFixture} />
|
|
27
|
+
const { container: footerContainer } = render(<Footer {...dataFixture} />)
|
|
28
28
|
const { container: legalFooterContainer } = render(<LegalFooter {...dataFixture} />)
|
|
29
29
|
|
|
30
30
|
expect(legalFooterContainer.querySelector('.o-footer__copyright')).not.toBeNull()
|
|
@@ -33,7 +33,7 @@ describe('dotcom-ui-footer', () => {
|
|
|
33
33
|
|
|
34
34
|
describe('standard footer', () => {
|
|
35
35
|
it('renders the navigation sections', () => {
|
|
36
|
-
const { container } = render(<Footer {...dataFixture} />
|
|
36
|
+
const { container } = render(<Footer {...dataFixture} />)
|
|
37
37
|
|
|
38
38
|
const matrix = container.querySelector('.o-footer__matrix')
|
|
39
39
|
|
|
@@ -46,7 +46,7 @@ describe('dotcom-ui-footer', () => {
|
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
it('does not render the legal links section', () => {
|
|
49
|
-
const { container } = render(<Footer {...dataFixture} />
|
|
49
|
+
const { container } = render(<Footer {...dataFixture} />)
|
|
50
50
|
|
|
51
51
|
const legalLinks = container.querySelector('.o-footer__legal-links')
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ describe('dotcom-ui-footer', () => {
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
it('renders the More from FT section', () => {
|
|
57
|
-
const { container } = render(<Footer {...dataFixture} />
|
|
57
|
+
const { container } = render(<Footer {...dataFixture} />)
|
|
58
58
|
|
|
59
59
|
const moreFromFt = container.querySelector('.o-footer__matrix-link__copy')
|
|
60
60
|
expect(moreFromFt).not.toBeNull()
|
|
@@ -63,19 +63,19 @@ describe('dotcom-ui-footer', () => {
|
|
|
63
63
|
|
|
64
64
|
describe('legal footer', () => {
|
|
65
65
|
it('does not render the navigation sections', () => {
|
|
66
|
-
const { container } = render(<LegalFooter {...dataFixture} />
|
|
66
|
+
const { container } = render(<LegalFooter {...dataFixture} />)
|
|
67
67
|
|
|
68
68
|
expect(container.querySelector('.o-footer__matrix')).toBeNull()
|
|
69
69
|
})
|
|
70
70
|
|
|
71
71
|
it('renders the legal links section', () => {
|
|
72
|
-
const { container } = render(<LegalFooter {...dataFixture} />
|
|
72
|
+
const { container } = render(<LegalFooter {...dataFixture} />)
|
|
73
73
|
|
|
74
74
|
expect(container.querySelector('.o-footer__legal-links')).not.toBeNull()
|
|
75
75
|
})
|
|
76
76
|
|
|
77
77
|
it('does not render the More from FT section', () => {
|
|
78
|
-
const { container } = render(<LegalFooter {...dataFixture} />
|
|
78
|
+
const { container } = render(<LegalFooter {...dataFixture} />)
|
|
79
79
|
|
|
80
80
|
expect(container.querySelector('.o-footer__more-from-ft')).toBeNull()
|
|
81
81
|
})
|
package/styles.scss
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { OnReady } from '../../../../.storybook/components/OnReady'
|
|
3
|
-
|
|
4
|
-
import storyData from './story-data'
|
|
5
|
-
|
|
6
|
-
import * as footer from '../../browser.js'
|
|
7
|
-
import { Footer, LegalFooter } from '../../src'
|
|
8
|
-
import '../../styles.scss'
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: 'FT / Footer',
|
|
12
|
-
args: { theme: 'dark' },
|
|
13
|
-
argTypes: {
|
|
14
|
-
theme: {
|
|
15
|
-
control: {
|
|
16
|
-
type: 'radio',
|
|
17
|
-
options: ['dark', 'light']
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const _Footer = (args) => {
|
|
24
|
-
return (
|
|
25
|
-
<OnReady callback={() => footer.init()}>
|
|
26
|
-
<Footer {...storyData} {...args} />
|
|
27
|
-
</OnReady>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
_Footer.story = {
|
|
32
|
-
name: 'footer'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const _LegalFooter = (args) => {
|
|
36
|
-
return (
|
|
37
|
-
<OnReady callback={() => footer.init()}>
|
|
38
|
-
<LegalFooter {...storyData} {...args} />
|
|
39
|
-
</OnReady>
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
_LegalFooter.story = {
|
|
44
|
-
name: 'legal footer'
|
|
45
|
-
}
|