@hlf-fe/pulmo-ui 1.4.0 → 1.5.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/components/buttons/button/button.js +1 -0
- package/dist/components/buttons/text-button/text-button.js +5 -0
- package/dist/components/modules/footer/footer.d.ts +21 -0
- package/dist/components/modules/footer/footer.js +75 -0
- package/dist/components/modules/footer/footer.stories.d.ts +6 -0
- package/dist/components/modules/footer/footer.stories.js +31 -0
- package/dist/components/typography/headings/headings.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
3
|
import { rem } from "../../../styles/units";
|
|
4
|
+
import { media } from "../../../styles/mixins";
|
|
4
5
|
import { Link } from "gatsby";
|
|
5
6
|
export const TextButton = ({ type = "button", onClick, onMouseEnter, onMouseLeave, className, disabled, dataTest, children, to, href, target, tabIndex, }) => {
|
|
6
7
|
const commonProps = {
|
|
@@ -58,4 +59,8 @@ const StyledTextButton = styled.button `
|
|
|
58
59
|
text-decoration: none;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
${media.M `
|
|
64
|
+
font-size: ${rem(18)}
|
|
65
|
+
`}
|
|
61
66
|
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SanityImage } from "../../../models/sanity-types";
|
|
2
|
+
type LinkItem = {
|
|
3
|
+
externalUrl: string;
|
|
4
|
+
internalLink: {
|
|
5
|
+
slug: {
|
|
6
|
+
current: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
openInNewWindow: boolean;
|
|
10
|
+
webUrlName: string;
|
|
11
|
+
};
|
|
12
|
+
type LinkColumn = {
|
|
13
|
+
heading?: string;
|
|
14
|
+
items: LinkItem[];
|
|
15
|
+
};
|
|
16
|
+
export type FooterProps = {
|
|
17
|
+
linkColumns: LinkColumn[];
|
|
18
|
+
footerLogo: SanityImage;
|
|
19
|
+
};
|
|
20
|
+
export declare const Footer: ({ linkColumns, footerLogo }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from "../../../components/typography/link/link";
|
|
3
|
+
import { Image } from "../../../components/layout/image/image";
|
|
4
|
+
import { media } from "../../../styles/mixins";
|
|
5
|
+
import { rem } from "../../../styles/units";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
export const Footer = ({ linkColumns, footerLogo }) => {
|
|
8
|
+
return (_jsxs(OuterContainer, { children: [_jsx(ColumnContainer, { children: linkColumns.map(({ heading, items }) => {
|
|
9
|
+
return (_jsxs(Column, { children: [heading && _jsx(Heading, { children: heading }), items?.map((item) => {
|
|
10
|
+
return (_jsx(StyledLink, { value: { reference: item }, children: item?.webUrlName }));
|
|
11
|
+
})] }));
|
|
12
|
+
}) }), _jsx(StyledImage, { image: footerLogo?.asset })] }));
|
|
13
|
+
};
|
|
14
|
+
const OuterContainer = styled.div `
|
|
15
|
+
width: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
min-height: ${rem(340)};
|
|
20
|
+
background: ${({ theme }) => theme?.redClear};
|
|
21
|
+
`;
|
|
22
|
+
const ColumnContainer = styled.div `
|
|
23
|
+
width: 100%;
|
|
24
|
+
max-width: ${rem(1024)};
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
padding: ${rem(40)};
|
|
29
|
+
margin: 0 auto;
|
|
30
|
+
border-bottom: ${rem(1)} solid #e35361;
|
|
31
|
+
|
|
32
|
+
${media.M `
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
`}
|
|
35
|
+
`;
|
|
36
|
+
const Heading = styled.span `
|
|
37
|
+
font-size: ${rem(14)};
|
|
38
|
+
font-family: ${({ theme }) => theme?.valueBold};
|
|
39
|
+
text-transform: uppercase;
|
|
40
|
+
color: ${({ theme }) => theme?.white};
|
|
41
|
+
padding: ${rem(10)} 0;
|
|
42
|
+
margin: 0;
|
|
43
|
+
`;
|
|
44
|
+
const StyledLink = styled(Link) ``;
|
|
45
|
+
const Column = styled.div `
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
width: 100%;
|
|
49
|
+
margin-bottom: ${rem(20)};
|
|
50
|
+
|
|
51
|
+
${StyledLink} {
|
|
52
|
+
color: ${({ theme }) => theme?.white};
|
|
53
|
+
padding: ${rem(10)} 0;
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
|
|
56
|
+
&[href^="mailto:"] {
|
|
57
|
+
text-decoration: underline;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
color: #f0f0f0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
${media.L `
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
`}
|
|
68
|
+
`;
|
|
69
|
+
const StyledImage = styled(Image) `
|
|
70
|
+
max-width: ${rem(142)};
|
|
71
|
+
margin: ${rem(20)} auto;
|
|
72
|
+
${media.M `
|
|
73
|
+
margin: ${rem(40)} auto;
|
|
74
|
+
`}
|
|
75
|
+
`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Footer } from "./footer";
|
|
3
|
+
import { Decorator } from "../../../components/decorator/decorator";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Layout/Footer",
|
|
6
|
+
component: Footer,
|
|
7
|
+
decorators: [
|
|
8
|
+
(Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
|
|
9
|
+
],
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
const generateLink = (index) => ({
|
|
13
|
+
externalUrl: `/`,
|
|
14
|
+
internalLink: {
|
|
15
|
+
slug: {
|
|
16
|
+
current: `internal-link-${index}`,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
openInNewWindow: false,
|
|
20
|
+
webUrlName: `Link ${index}`,
|
|
21
|
+
});
|
|
22
|
+
const mockColumns = Array.from({ length: 4 }, (_, colIndex) => ({
|
|
23
|
+
heading: `Column ${colIndex + 1}`,
|
|
24
|
+
items: Array.from({ length: 5 }, (_, i) => generateLink(i + 1)),
|
|
25
|
+
}));
|
|
26
|
+
export const Default = {
|
|
27
|
+
args: {
|
|
28
|
+
linkColumns: mockColumns,
|
|
29
|
+
footerLogo: null,
|
|
30
|
+
},
|
|
31
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { type CardBannerProps } from "./components/surfaces/cards/card-banner/ca
|
|
|
19
19
|
import { type PaperProps } from "./components/surfaces/paper/paper";
|
|
20
20
|
import { type LinkProps } from "./components/typography/link/link";
|
|
21
21
|
import { PortableTextComponentDefault } from "./components/typography/portable-text/portable-text-component-default";
|
|
22
|
+
import { type FooterProps } from "./components/modules/footer/footer";
|
|
22
23
|
export type { ButtonProps, LoadingButtonProps, TextButtonProps, EmailSignupFormProps, ImageProps, ContainerProps, AlertProps, EntryListHeadingProps, EntryListTextProps, PaginationProps, NavigationCellProps, NavigationItemProps, CardBannerProps, PaperProps, };
|
|
23
24
|
export { CloseIcon } from "./components/icons/close-icon/close-icon";
|
|
24
25
|
export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
|
|
@@ -64,4 +65,5 @@ export declare const BoldText: import("react").FC<import("styled-components").Fa
|
|
|
64
65
|
export declare const ItalicText: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>;
|
|
65
66
|
export declare const OrderedList: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, never>>;
|
|
66
67
|
export declare const UnorderedList: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>>;
|
|
68
|
+
export declare const Footer: import("react").FC<FooterProps>;
|
|
67
69
|
export { PortableTextComponentDefault };
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import { H1 as H1Component, H2 as H2Component, H3 as H3Component, H4 as H4Compon
|
|
|
25
25
|
import { NormalText as NormalTextComponent, LeadParagraph as LeadParagraphComponent, BoldText as BoldTextComponent, ItalicText as ItalicTextComponent, } from "./components/typography/text/text";
|
|
26
26
|
import { OrderedList as OrderedListComponent, UnorderedList as UnorderedListComponent, } from "./components/typography/list/list";
|
|
27
27
|
import { PortableTextComponentDefault } from "./components/typography/portable-text/portable-text-component-default";
|
|
28
|
+
import { Footer as FooterComponent, } from "./components/modules/footer/footer";
|
|
28
29
|
// Icons
|
|
29
30
|
export { CloseIcon } from "./components/icons/close-icon/close-icon";
|
|
30
31
|
export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
|
|
@@ -69,5 +70,5 @@ export const BoldText = withDefaultTheme(BoldTextComponent);
|
|
|
69
70
|
export const ItalicText = withDefaultTheme(ItalicTextComponent);
|
|
70
71
|
export const OrderedList = withDefaultTheme(OrderedListComponent);
|
|
71
72
|
export const UnorderedList = withDefaultTheme(UnorderedListComponent);
|
|
72
|
-
|
|
73
|
+
export const Footer = withDefaultTheme(FooterComponent);
|
|
73
74
|
export { PortableTextComponentDefault };
|