@financial-times/dotcom-ui-footer 11.3.0 → 12.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.
- 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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TNavMenuItem } from '@financial-times/dotcom-types-navigation';
|
|
3
|
-
|
|
3
|
+
type TSectionLinksProps = {
|
|
4
4
|
index: number;
|
|
5
5
|
submenu: TNavMenuItem[][];
|
|
6
6
|
};
|
|
7
7
|
declare const SectionLinks: ({ submenu, index }: TSectionLinksProps) => React.JSX.Element;
|
|
8
|
-
|
|
8
|
+
type TSectionTitleProps = {
|
|
9
9
|
index: number;
|
|
10
10
|
label: string;
|
|
11
11
|
};
|
|
12
12
|
declare const SectionTitle: ({ label, index }: TSectionTitleProps) => React.JSX.Element;
|
|
13
|
-
|
|
13
|
+
type TFooterContentsProps = {
|
|
14
14
|
footerData: TNavMenuItem[];
|
|
15
15
|
};
|
|
16
16
|
declare const FooterContents: ({ footerData }: TFooterContentsProps) => React.JSX.Element;
|
|
17
17
|
declare const CopyrightNotice: ({ withoutMarketsData }: {
|
|
18
18
|
withoutMarketsData?: boolean;
|
|
19
19
|
}) => React.JSX.Element;
|
|
20
|
-
|
|
20
|
+
type TCompressedLegalProps = {
|
|
21
21
|
footerData: TNavMenuItem[];
|
|
22
22
|
};
|
|
23
23
|
declare const CompressedLegal: ({ footerData }: TCompressedLegalProps) => React.JSX.Element;
|
|
@@ -7,7 +7,7 @@ exports.NikkeiBrandLogo = exports.CopyrightNotice = exports.CompressedLegal = ex
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const Link = ({ item, ...props }) => {
|
|
9
9
|
const disableTracking = { 'data-o-tracking-do-not-track': item.disableTracking ? true : null };
|
|
10
|
-
return (react_1.default.createElement("a",
|
|
10
|
+
return (react_1.default.createElement("a", { ...props, href: item.url, "data-trackable": item.label, ...disableTracking },
|
|
11
11
|
react_1.default.createElement("span", { className: "o-footer__matrix-link__copy" }, item.label)));
|
|
12
12
|
};
|
|
13
13
|
const SectionLinks = ({ submenu, index }) => {
|
|
@@ -17,7 +17,7 @@ exports.SectionLinks = SectionLinks;
|
|
|
17
17
|
const SectionTitle = ({ label, index }) => {
|
|
18
18
|
// On smaller viewports, submenu which span one column is collapsed behind toggles
|
|
19
19
|
const ariaControls = { 'aria-controls': `o-footer-section-${index}` };
|
|
20
|
-
return (react_1.default.createElement("h3",
|
|
20
|
+
return (react_1.default.createElement("h3", { className: "o-footer__matrix-title", ...ariaControls }, label));
|
|
21
21
|
};
|
|
22
22
|
exports.SectionTitle = SectionTitle;
|
|
23
23
|
const FooterContents = ({ footerData }) => (react_1.default.createElement("div", { className: "o-footer__row" },
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TNavigationData } from '@financial-times/dotcom-types-navigation';
|
|
3
|
-
export
|
|
3
|
+
export type TFooterOptions = {
|
|
4
4
|
theme?: 'dark' | 'light' | string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type TFooterProps = TFooterOptions & {
|
|
7
7
|
data: TNavigationData;
|
|
8
8
|
};
|
|
9
9
|
export declare function Footer(props: TFooterProps): React.JSX.Element;
|
package/dist/node/index.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.Footer = Footer;
|
|
7
|
+
exports.LegalFooter = LegalFooter;
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const partials_1 = require("./components/partials");
|
|
9
10
|
function Footer(props) {
|
|
@@ -15,7 +16,6 @@ function Footer(props) {
|
|
|
15
16
|
react_1.default.createElement(partials_1.CopyrightNotice, null)),
|
|
16
17
|
react_1.default.createElement(partials_1.NikkeiBrandLogo, null)));
|
|
17
18
|
}
|
|
18
|
-
exports.Footer = Footer;
|
|
19
19
|
function LegalFooter(props) {
|
|
20
20
|
const footerData = props.data.footer.items;
|
|
21
21
|
const theme = props.theme ? props.theme : 'dark';
|
|
@@ -25,4 +25,3 @@ function LegalFooter(props) {
|
|
|
25
25
|
react_1.default.createElement(partials_1.CopyrightNotice, { withoutMarketsData: true })),
|
|
26
26
|
react_1.default.createElement(partials_1.NikkeiBrandLogo, null)));
|
|
27
27
|
}
|
|
28
|
-
exports.LegalFooter = LegalFooter;
|