@hlf-fe/pulmo-ui 1.2.0 → 1.4.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.
Files changed (49) hide show
  1. package/dist/components/layout/container/container.d.ts +5 -1
  2. package/dist/components/layout/container/container.js +4 -3
  3. package/dist/components/modules/entry-list/entry-list.d.ts +2 -1
  4. package/dist/components/modules/entry-list/entry-list.js +2 -2
  5. package/dist/components/surfaces/paper/paper.d.ts +10 -0
  6. package/dist/components/surfaces/paper/paper.js +11 -0
  7. package/dist/components/surfaces/paper/paper.stories.d.ts +12 -0
  8. package/dist/components/surfaces/paper/paper.stories.js +69 -0
  9. package/dist/components/typography/heading/heading.d.ts +4 -0
  10. package/dist/components/typography/heading/heading.js +47 -0
  11. package/dist/components/typography/heading/heading.stories.d.ts +7 -0
  12. package/dist/components/typography/heading/heading.stories.js +26 -0
  13. package/dist/components/typography/heading/headings.d.ts +4 -0
  14. package/dist/components/typography/heading/headings.js +47 -0
  15. package/dist/components/typography/heading/headings.stories.d.ts +7 -0
  16. package/dist/components/typography/heading/headings.stories.js +26 -0
  17. package/dist/components/typography/headings/headings.d.ts +4 -0
  18. package/dist/components/typography/headings/headings.js +47 -0
  19. package/dist/components/typography/headings/headings.stories.d.ts +7 -0
  20. package/dist/components/typography/headings/headings.stories.js +26 -0
  21. package/dist/components/typography/link/link.d.ts +17 -0
  22. package/dist/components/typography/link/link.js +23 -0
  23. package/dist/components/typography/link/link.stories.d.ts +7 -0
  24. package/dist/components/typography/link/link.stories.js +30 -0
  25. package/dist/components/typography/list/list.d.ts +2 -0
  26. package/dist/components/typography/list/list.js +32 -0
  27. package/dist/components/typography/list/list.stories.d.ts +5 -0
  28. package/dist/components/typography/list/list.stories.js +18 -0
  29. package/dist/components/typography/portable-text/portable-text-component-default.d.ts +9 -0
  30. package/dist/components/typography/portable-text/portable-text-component-default.js +36 -0
  31. package/dist/components/typography/portable-text/portable-text-component.d.ts +0 -0
  32. package/dist/components/typography/portable-text/portable-text-component.js +0 -0
  33. package/dist/components/typography/portable-text/portable-text-default.d.ts +39 -0
  34. package/dist/components/typography/portable-text/portable-text-default.js +23 -0
  35. package/dist/components/typography/text/text.d.ts +4 -0
  36. package/dist/components/typography/text/text.js +45 -0
  37. package/dist/components/typography/text/text.stories.d.ts +7 -0
  38. package/dist/components/typography/text/text.stories.js +26 -0
  39. package/dist/index.d.ts +17 -1
  40. package/dist/index.js +20 -0
  41. package/dist/models/theme.d.ts +23 -0
  42. package/dist/models/theme.js +1 -0
  43. package/dist/styles/mixins/theme-mixins/theme-mixins.d.ts +5 -0
  44. package/dist/styles/mixins/theme-mixins/theme-mixins.js +37 -0
  45. package/dist/styles/mixins/theme-mixins.d.ts +5 -0
  46. package/dist/styles/mixins/theme-mixins.js +38 -0
  47. package/dist/styles/mixins.d.ts +2 -1
  48. package/dist/styles/mixins.js +6 -2
  49. package/package.json +1 -1
@@ -6,5 +6,9 @@ export type ContainerProps = {
6
6
  maxWidth?: Sizes;
7
7
  className?: string;
8
8
  } & CSSTypes;
9
- export declare const Container: ({ children, className, maxWidth, position, display, }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Container: import("react").ForwardRefExoticComponent<{
10
+ children: ReactNode;
11
+ maxWidth?: Sizes;
12
+ className?: string;
13
+ } & CSSTypes & import("react").RefAttributes<HTMLDivElement>>;
10
14
  export {};
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
2
3
  import { siteWidthRow, siteWidthRowXL, siteWidthRowS } from "../../../styles/mixins";
3
4
  import styled from "styled-components";
4
5
  const MAX_WIDTH = {
@@ -9,9 +10,9 @@ const MAX_WIDTH = {
9
10
  const getMaxWidth = (size) => {
10
11
  return MAX_WIDTH?.[size];
11
12
  };
12
- export const Container = ({ children, className, maxWidth = "lg", position = "static", display = "block", }) => {
13
- return (_jsx(Div, { className: className, maxWidth: getMaxWidth(maxWidth), display: display, position: position, children: children }));
14
- };
13
+ export const Container = forwardRef(({ children, className, maxWidth = "lg", position = "static", display = "block", }, ref) => {
14
+ return (_jsx(Div, { ref: ref, className: className, maxWidth: getMaxWidth(maxWidth), display: display, position: position, children: children }));
15
+ });
15
16
  const Div = styled.div `
16
17
  ${({ maxWidth }) => maxWidth};
17
18
  display: ${({ display }) => display};
@@ -4,6 +4,7 @@ export type EntryListProps = {
4
4
  };
5
5
  export type EntryListItemProps = {
6
6
  children: React.ReactNode;
7
+ as?: "div" | "li";
7
8
  };
8
9
  export type EntryListHeadingProps = {
9
10
  children: React.ReactNode;
@@ -22,6 +23,6 @@ export type EntryListTextProps = {
22
23
  color?: string;
23
24
  };
24
25
  export declare const EntryList: ({ children }: EntryListProps) => import("react/jsx-runtime").JSX.Element;
25
- export declare const EntryListItem: ({ children }: EntryListItemProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const EntryListItem: ({ children, as }: EntryListItemProps) => import("react/jsx-runtime").JSX.Element;
26
27
  export declare const EntryListText: ({ children, fontSizeMobile, fontSizeDesktop, breakpoint, bold, as, color, }: EntryListTextProps) => import("react/jsx-runtime").JSX.Element;
27
28
  export declare const EntryListHeading: ({ children, fontSizeMobile, fontSizeDesktop, as, breakpoint, }: EntryListHeadingProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,8 @@ import { media } from "../../../styles/mixins";
5
5
  export const EntryList = ({ children }) => {
6
6
  return _jsx(List, { children: children });
7
7
  };
8
- export const EntryListItem = ({ children }) => {
9
- return _jsx(ListItem, { children: children });
8
+ export const EntryListItem = ({ children, as = "li" }) => {
9
+ return _jsx(ListItem, { as: as, children: children });
10
10
  };
11
11
  export const EntryListText = ({ children, fontSizeMobile = 14, fontSizeDesktop = 16, breakpoint = "M", bold = false, as = "p", color, }) => {
12
12
  return (_jsx(Text, { as: as, fontSizeMobile: fontSizeMobile, fontSizeDesktop: fontSizeDesktop, breakpoint: breakpoint, bold: bold, color: color, children: children }));
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ import { THEME_COLORS_BY_HEX, THEME_COLORS_BY_NAME, THEME_ELEVATION, SIZE_SM, SIZE_MD, SIZE_LG } from "../../../models/theme";
3
+ export type PaperProps = {
4
+ children: ReactNode;
5
+ className?: string;
6
+ backgroundColor?: THEME_COLORS_BY_NAME | THEME_COLORS_BY_HEX;
7
+ borderRadius?: SIZE_SM | SIZE_MD | SIZE_LG;
8
+ elevation?: THEME_ELEVATION;
9
+ };
10
+ export declare const Paper: ({ className, children, backgroundColor, borderRadius, elevation, }: PaperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled from "styled-components";
3
+ import { themeColors, themeBorderRadius, themeElevation, } from "../../../styles/mixins/theme-mixins";
4
+ export const Paper = ({ className, children, backgroundColor = "white", borderRadius = "md", elevation = backgroundColor === "#ffffff" ? 1 : 0, }) => {
5
+ return (_jsx(Container, { className: className, backgroundColor: backgroundColor, borderRadius: borderRadius, elevation: elevation, children: children }));
6
+ };
7
+ const Container = styled.div `
8
+ background-color: ${({ backgroundColor }) => themeColors(backgroundColor)};
9
+ border-radius: ${({ borderRadius }) => themeBorderRadius(borderRadius)};
10
+ box-shadow: ${({ elevation }) => themeElevation(elevation)};
11
+ `;
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Paper } from "./paper";
3
+ declare const meta: Meta<typeof Paper>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Paper>;
6
+ export declare const Default: Story;
7
+ export declare const Purple: Story;
8
+ export declare const Green: Story;
9
+ export declare const Blue: Story;
10
+ export declare const Pink: Story;
11
+ export declare const Yellow: Story;
12
+ export declare const WhiteWithElevation: Story;
@@ -0,0 +1,69 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Paper } from "./paper";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ import { EntryListHeading, EntryListText, } from "../../../components/modules/entry-list/entry-list";
5
+ const meta = {
6
+ title: "Surfaces/Paper",
7
+ component: Paper,
8
+ decorators: [
9
+ (Story) => (_jsx(Decorator, { maxWidth: "400px", children: _jsx(Story, {}) })),
10
+ ],
11
+ };
12
+ export default meta;
13
+ const DummyContent = () => (_jsxs("div", { style: { padding: "20px" }, children: [_jsx(EntryListText, { fontSizeDesktop: 14, color: "#545454", children: "2025-05-11" }), _jsx(EntryListHeading, { children: "In volutpat est eu dolor efficitur" }), _jsxs(EntryListText, { children: [_jsxs(EntryListText, { as: "span", fontSizeMobile: 12, fontSizeDesktop: 14, children: ["Nulla facilisi:", " "] }), _jsx(EntryListText, { as: "span", fontSizeMobile: 12, fontSizeDesktop: 14, bold: true, children: "volutpat, XiO, MD, Condimentum Ultricies" })] }), _jsx(EntryListText, { children: "Aliquam erat volutpat. Nulla facilisi. Vestibulum eget ullamcorper elit. Praesent mattis arcu ante, in gravida eros pharetra sit amet." }), _jsx(EntryListText, { children: "Praesent mattis arcu ante, in gravida eros pharetra sit amet. Etiam ac enim lorem. Proin euismod vulputate faucibus." })] }));
14
+ export const Default = {
15
+ args: {
16
+ backgroundColor: "white",
17
+ elevation: 0,
18
+ borderRadius: "md",
19
+ },
20
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
21
+ };
22
+ export const Purple = {
23
+ args: {
24
+ backgroundColor: "purple",
25
+ elevation: 0,
26
+ borderRadius: "md",
27
+ },
28
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
29
+ };
30
+ export const Green = {
31
+ args: {
32
+ backgroundColor: "green",
33
+ elevation: 0,
34
+ borderRadius: "md",
35
+ },
36
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
37
+ };
38
+ export const Blue = {
39
+ args: {
40
+ backgroundColor: "blue",
41
+ elevation: 0,
42
+ borderRadius: "md",
43
+ },
44
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
45
+ };
46
+ export const Pink = {
47
+ args: {
48
+ backgroundColor: "pink",
49
+ elevation: 0,
50
+ borderRadius: "md",
51
+ },
52
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
53
+ };
54
+ export const Yellow = {
55
+ args: {
56
+ backgroundColor: "yellow",
57
+ elevation: 0,
58
+ borderRadius: "md",
59
+ },
60
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
61
+ };
62
+ export const WhiteWithElevation = {
63
+ args: {
64
+ backgroundColor: "white",
65
+ elevation: 1,
66
+ borderRadius: "md",
67
+ },
68
+ render: (args) => (_jsx(Paper, { ...args, children: _jsx(DummyContent, {}) })),
69
+ };
@@ -0,0 +1,4 @@
1
+ export declare const H1: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
2
+ export declare const H2: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
3
+ export declare const H3: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
4
+ export declare const H4: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
@@ -0,0 +1,47 @@
1
+ import styled from "styled-components";
2
+ import { media } from "../../../styles/mixins";
3
+ import { rem } from "../../../styles/units";
4
+ export const H1 = styled.h1 `
5
+ font-family: ${({ theme }) => theme.valueBold};
6
+ color: ${({ theme }) => theme.blackLight};
7
+ font-size: ${rem(40)};
8
+ line-height: 1.15;
9
+
10
+ ${media.L `
11
+ font-size: ${rem(64)};
12
+ line-height: 1.09;
13
+ `}
14
+ `;
15
+ export const H2 = styled.h2 `
16
+ font-family: ${({ theme }) => theme.valueBold};
17
+ color: ${({ theme }) => theme.blackLight};
18
+ font-size: ${rem(28)};
19
+ line-height: 1.14;
20
+
21
+ ${media.L `
22
+ font-size: ${rem(32)};
23
+ line-height: 1.5;
24
+ `}
25
+ `;
26
+ export const H3 = styled.h3 `
27
+ font-family: ${({ theme }) => theme.valueBold};
28
+ color: ${({ theme }) => theme.blackLight};
29
+ font-size: ${rem(22)};
30
+ line-height: 1.45;
31
+
32
+ ${media.L `
33
+ font-size: ${rem(28)};
34
+ line-height: 1.43;
35
+ `}
36
+ `;
37
+ export const H4 = styled.h4 `
38
+ font-family: ${({ theme }) => theme.valueBold};
39
+ color: ${({ theme }) => theme.blackLight};
40
+ font-size: ${rem(22)};
41
+ line-height: 1.45;
42
+
43
+ ${media.L `
44
+ font-size: ${rem(28)};
45
+ line-height: 1.43;
46
+ `}
47
+ `;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Heading1: StoryObj;
5
+ export declare const Heading2: StoryObj;
6
+ export declare const Heading3: StoryObj;
7
+ export declare const Heading4: StoryObj;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { H1, H2, H3, H4 } from "./heading";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Headings",
6
+ decorators: [
7
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
8
+ ],
9
+ };
10
+ export default meta;
11
+ export const Heading1 = {
12
+ name: "H1",
13
+ render: () => (_jsx(_Fragment, { children: _jsx(H1, { children: "This is an H1" }) })),
14
+ };
15
+ export const Heading2 = {
16
+ name: "H2",
17
+ render: () => (_jsx(_Fragment, { children: _jsx(H2, { children: "This is an H2" }) })),
18
+ };
19
+ export const Heading3 = {
20
+ name: "H3",
21
+ render: () => (_jsx(_Fragment, { children: _jsx(H3, { children: "This is an H2" }) })),
22
+ };
23
+ export const Heading4 = {
24
+ name: "H4",
25
+ render: () => (_jsx(_Fragment, { children: _jsx(H4, { children: "This is an H2" }) })),
26
+ };
@@ -0,0 +1,4 @@
1
+ export declare const H1: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
2
+ export declare const H2: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
3
+ export declare const H3: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
4
+ export declare const H4: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
@@ -0,0 +1,47 @@
1
+ import styled from "styled-components";
2
+ import { media } from "../../../styles/mixins";
3
+ import { rem } from "../../../styles/units";
4
+ export const H1 = styled.h1 `
5
+ font-family: ${({ theme }) => theme.valueBold};
6
+ color: ${({ theme }) => theme.blackLight};
7
+ font-size: ${rem(40)};
8
+ line-height: 1.15;
9
+
10
+ ${media.L `
11
+ font-size: ${rem(64)};
12
+ line-height: 1.09;
13
+ `}
14
+ `;
15
+ export const H2 = styled.h2 `
16
+ font-family: ${({ theme }) => theme.valueBold};
17
+ color: ${({ theme }) => theme.blackLight};
18
+ font-size: ${rem(28)};
19
+ line-height: 1.14;
20
+
21
+ ${media.L `
22
+ font-size: ${rem(32)};
23
+ line-height: 1.5;
24
+ `}
25
+ `;
26
+ export const H3 = styled.h3 `
27
+ font-family: ${({ theme }) => theme.valueBold};
28
+ color: ${({ theme }) => theme.blackLight};
29
+ font-size: ${rem(22)};
30
+ line-height: 1.45;
31
+
32
+ ${media.L `
33
+ font-size: ${rem(28)};
34
+ line-height: 1.43;
35
+ `}
36
+ `;
37
+ export const H4 = styled.h4 `
38
+ font-family: ${({ theme }) => theme.valueBold};
39
+ color: ${({ theme }) => theme.blackLight};
40
+ font-size: ${rem(22)};
41
+ line-height: 1.45;
42
+
43
+ ${media.L `
44
+ font-size: ${rem(28)};
45
+ line-height: 1.43;
46
+ `}
47
+ `;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Heading1: StoryObj;
5
+ export declare const Heading2: StoryObj;
6
+ export declare const Heading3: StoryObj;
7
+ export declare const Heading4: StoryObj;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { H1, H2, H3, H4 } from "./headings";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Headings",
6
+ decorators: [
7
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
8
+ ],
9
+ };
10
+ export default meta;
11
+ export const Heading1 = {
12
+ name: "H1",
13
+ render: () => (_jsx(_Fragment, { children: _jsx(H1, { children: "This is an H1" }) })),
14
+ };
15
+ export const Heading2 = {
16
+ name: "H2",
17
+ render: () => (_jsx(_Fragment, { children: _jsx(H2, { children: "This is an H2" }) })),
18
+ };
19
+ export const Heading3 = {
20
+ name: "H3",
21
+ render: () => (_jsx(_Fragment, { children: _jsx(H3, { children: "This is an H2" }) })),
22
+ };
23
+ export const Heading4 = {
24
+ name: "H4",
25
+ render: () => (_jsx(_Fragment, { children: _jsx(H4, { children: "This is an H2" }) })),
26
+ };
@@ -0,0 +1,4 @@
1
+ export declare const H1: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
2
+ export declare const H2: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
3
+ export declare const H3: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
4
+ export declare const H4: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
@@ -0,0 +1,47 @@
1
+ import styled from "styled-components";
2
+ import { media } from "../../../styles/mixins";
3
+ import { rem } from "../../../styles/units";
4
+ export const H1 = styled.h1 `
5
+ font-family: ${({ theme }) => theme.valueBold};
6
+ color: ${({ theme }) => theme.blackLight};
7
+ font-size: ${rem(40)};
8
+ line-height: 1.15;
9
+
10
+ ${media.L `
11
+ font-size: ${rem(64)};
12
+ line-height: 1.09;
13
+ `}
14
+ `;
15
+ export const H2 = styled.h2 `
16
+ font-family: ${({ theme }) => theme.valueBold};
17
+ color: ${({ theme }) => theme.blackLight};
18
+ font-size: ${rem(28)};
19
+ line-height: 1.14;
20
+
21
+ ${media.L `
22
+ font-size: ${rem(32)};
23
+ line-height: 1.5;
24
+ `}
25
+ `;
26
+ export const H3 = styled.h3 `
27
+ font-family: ${({ theme }) => theme.valueBold};
28
+ color: ${({ theme }) => theme.blackLight};
29
+ font-size: ${rem(22)};
30
+ line-height: 1.45;
31
+
32
+ ${media.L `
33
+ font-size: ${rem(28)};
34
+ line-height: 1.43;
35
+ `}
36
+ `;
37
+ export const H4 = styled.h4 `
38
+ font-family: ${({ theme }) => theme.valueBold};
39
+ color: ${({ theme }) => theme.blackLight};
40
+ font-size: ${rem(22)};
41
+ line-height: 1.45;
42
+
43
+ ${media.L `
44
+ font-size: ${rem(28)};
45
+ line-height: 1.43;
46
+ `}
47
+ `;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Heading1: StoryObj;
5
+ export declare const Heading2: StoryObj;
6
+ export declare const Heading3: StoryObj;
7
+ export declare const Heading4: StoryObj;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { H1, H2, H3, H4 } from "./headings";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Headings",
6
+ decorators: [
7
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
8
+ ],
9
+ };
10
+ export default meta;
11
+ export const Heading1 = {
12
+ name: "H1",
13
+ render: () => (_jsx(_Fragment, { children: _jsx(H1, { children: "This is an H1" }) })),
14
+ };
15
+ export const Heading2 = {
16
+ name: "H2",
17
+ render: () => (_jsx(_Fragment, { children: _jsx(H2, { children: "This is an H2" }) })),
18
+ };
19
+ export const Heading3 = {
20
+ name: "H3",
21
+ render: () => (_jsx(_Fragment, { children: _jsx(H3, { children: "This is an H2" }) })),
22
+ };
23
+ export const Heading4 = {
24
+ name: "H4",
25
+ render: () => (_jsx(_Fragment, { children: _jsx(H4, { children: "This is an H2" }) })),
26
+ };
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from "react";
2
+ export type LinkProps = {
3
+ className?: string;
4
+ value: {
5
+ reference: {
6
+ internalLink?: {
7
+ slug?: {
8
+ current: string;
9
+ };
10
+ };
11
+ externalUrl?: string;
12
+ openInNewWindow?: boolean;
13
+ };
14
+ };
15
+ children: ReactNode;
16
+ };
17
+ export declare const Link: ({ value, children, className }: LinkProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link as GatsbyLink } from "gatsby";
3
+ import styled from "styled-components";
4
+ import { linkStyling } from "../../../styles/mixins";
5
+ export const Link = ({ value, children, className }) => {
6
+ const link = value?.reference;
7
+ const slug = link?.internalLink?.slug?.current;
8
+ const externalUrl = link?.externalUrl;
9
+ const openInNewWindow = link?.openInNewWindow;
10
+ if (externalUrl) {
11
+ return (_jsx(ExternalLink, { href: externalUrl, target: openInNewWindow ? "_blank" : "_self", rel: "noreferrer", className: className, children: children }));
12
+ }
13
+ if (slug) {
14
+ return (_jsx(StyledLink, { to: slug, className: className, children: children }));
15
+ }
16
+ return null;
17
+ };
18
+ const ExternalLink = styled.a `
19
+ ${linkStyling({ fontSizeDesktop: 18 })}
20
+ `;
21
+ const StyledLink = styled(GatsbyLink) `
22
+ ${linkStyling({ fontSizeDesktop: 18 })}
23
+ `;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Link } from "./link";
3
+ declare const meta: Meta<typeof Link>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Link>;
6
+ export declare const ExternalLink: Story;
7
+ export declare const InternalLink: Story;
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link } from "./link";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Link",
6
+ component: Link,
7
+ decorators: [
8
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
9
+ ],
10
+ };
11
+ export default meta;
12
+ export const ExternalLink = {
13
+ name: "External Link",
14
+ render: () => (_jsx(Link, { value: {
15
+ reference: {
16
+ externalUrl: "https://example.com",
17
+ openInNewWindow: true,
18
+ },
19
+ }, children: "External Link" })),
20
+ };
21
+ export const InternalLink = {
22
+ name: "Internal Link",
23
+ render: () => (_jsx(Link, { value: {
24
+ reference: {
25
+ internalLink: {
26
+ slug: { current: "/about" },
27
+ },
28
+ },
29
+ }, children: "Internal Link" })),
30
+ };
@@ -0,0 +1,2 @@
1
+ export declare const UnorderedList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
2
+ export declare const OrderedList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, never>> & string;
@@ -0,0 +1,32 @@
1
+ import { media } from "../../../styles/mixins";
2
+ import { rem } from "../../../styles/units";
3
+ import styled from "styled-components";
4
+ export const UnorderedList = styled.ul `
5
+ font-size: ${rem(16)};
6
+ line-height: 1.5;
7
+ color: ${({ theme }) => theme.blackLight};
8
+ padding-left: ${rem(20)};
9
+
10
+ ${media.L `
11
+ font-size: ${rem(18)};
12
+ line-height: 1.44;
13
+ `}
14
+ li {
15
+ margin-bottom: ${rem(8)};
16
+ }
17
+ `;
18
+ export const OrderedList = styled.ol `
19
+ font-size: ${rem(16)};
20
+ line-height: 1.5;
21
+ color: ${({ theme }) => theme.blackLight};
22
+ padding-left: ${rem(20)};
23
+
24
+ ${media.L `
25
+ font-size: ${rem(18)};
26
+ line-height: 1.44;
27
+ `}
28
+
29
+ li {
30
+ margin-bottom: ${rem(8)};
31
+ }
32
+ `;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Unordered: StoryObj;
5
+ export declare const Ordered: StoryObj;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { UnorderedList, OrderedList } from "./list";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Lists",
6
+ decorators: [
7
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
8
+ ],
9
+ };
10
+ export default meta;
11
+ export const Unordered = {
12
+ name: "Unordered List",
13
+ render: () => (_jsxs(UnorderedList, { children: [_jsx("li", { children: "First item" }), _jsx("li", { children: "Second item" }), _jsx("li", { children: "Third item" })] })),
14
+ };
15
+ export const Ordered = {
16
+ name: "Ordered List",
17
+ render: () => (_jsxs(OrderedList, { children: [_jsx("li", { children: "First item" }), _jsx("li", { children: "Second item" }), _jsx("li", { children: "Third item" })] })),
18
+ };
@@ -0,0 +1,9 @@
1
+ export type PortableTextComponent = {
2
+ [key: string]: (props: any) => JSX.Element;
3
+ };
4
+ export type PortableTextComponents = {
5
+ marks?: PortableTextComponent;
6
+ list?: PortableTextComponent;
7
+ block?: PortableTextComponent;
8
+ };
9
+ export declare const PortableTextComponentDefault: PortableTextComponents;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { withDefaultTheme } from "../../../hoc/withDefaultTheme";
3
+ import { Link as LinkComponent, } from "../../../components/typography/link/link";
4
+ import { H1 as H1Component, H2 as H2Component, H3 as H3Component, H4 as H4Component, } from "../../../components/typography/headings/headings";
5
+ import { NormalText as NormalTextComponent, LeadParagraph as LeadParagraphComponent, BoldText as BoldTextComponent, ItalicText as ItalicTextComponent, } from "../../../components/typography/text/text";
6
+ import { OrderedList as OrderedListComponent, UnorderedList as UnorderedListComponent, } from "../../../components/typography/list/list";
7
+ const Link = withDefaultTheme(LinkComponent);
8
+ const H1 = withDefaultTheme(H1Component);
9
+ const H2 = withDefaultTheme(H2Component);
10
+ const H3 = withDefaultTheme(H3Component);
11
+ const H4 = withDefaultTheme(H4Component);
12
+ const NormalText = withDefaultTheme(NormalTextComponent);
13
+ const LeadParagraph = withDefaultTheme(LeadParagraphComponent);
14
+ const BoldText = withDefaultTheme(BoldTextComponent);
15
+ const ItalicText = withDefaultTheme(ItalicTextComponent);
16
+ const OrderedList = withDefaultTheme(OrderedListComponent);
17
+ const UnorderedList = withDefaultTheme(UnorderedListComponent);
18
+ export const PortableTextComponentDefault = {
19
+ marks: {
20
+ link: ({ value, children }) => _jsx(Link, { value: value, children: children }),
21
+ strong: ({ children }) => _jsx(BoldText, { children: children }),
22
+ italic: ({ children }) => _jsx(ItalicText, { children: children }),
23
+ },
24
+ list: {
25
+ bullet: ({ children }) => _jsx(UnorderedList, { children: children }),
26
+ number: ({ children }) => _jsx(OrderedList, { children: children }),
27
+ },
28
+ block: {
29
+ h1: ({ children }) => _jsx(H1, { children: children }),
30
+ h2: ({ children }) => _jsx(H2, { children: children }),
31
+ h3: ({ children }) => _jsx(H3, { children: children }),
32
+ h4: ({ children }) => _jsx(H4, { children: children }),
33
+ normal: ({ children }) => _jsx(NormalText, { children: children }),
34
+ leadParagraph: ({ children }) => _jsx(LeadParagraph, { children: children }),
35
+ },
36
+ };
@@ -0,0 +1,39 @@
1
+ export declare const PortableTextDefault: {
2
+ marks: {
3
+ link: any;
4
+ strong: ({ children }: {
5
+ children: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ italic: ({ children }: {
8
+ children: any;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ };
11
+ list: {
12
+ bullet: ({ children }: {
13
+ children: any;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ number: ({ children }: {
16
+ children: any;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ };
19
+ block: {
20
+ h1: ({ children }: {
21
+ children: any;
22
+ }) => import("react/jsx-runtime").JSX.Element;
23
+ h2: ({ children }: {
24
+ children: any;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
+ h3: ({ children }: {
27
+ children: any;
28
+ }) => import("react/jsx-runtime").JSX.Element;
29
+ h4: ({ children }: {
30
+ children: any;
31
+ }) => import("react/jsx-runtime").JSX.Element;
32
+ normal: ({ children }: {
33
+ children: any;
34
+ }) => import("react/jsx-runtime").JSX.Element;
35
+ leadParagraph: ({ children }: {
36
+ children: any;
37
+ }) => import("react/jsx-runtime").JSX.Element;
38
+ };
39
+ };
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BoldText, ItalicText, NormalText, LeadParagraph, } from "../../../components/typography/text/text";
3
+ import { UnorderedList, OrderedList } from "../../../components/typography/list/list";
4
+ import { H1, H2, H3, H4 } from "../../../components/typography/heading/headings";
5
+ export const PortableTextDefault = {
6
+ marks: {
7
+ link: LinkElement,
8
+ strong: ({ children }) => _jsx(BoldText, { children: children }),
9
+ italic: ({ children }) => _jsx(ItalicText, { children: children }),
10
+ },
11
+ list: {
12
+ bullet: ({ children }) => _jsx(UnorderedList, { children: children }),
13
+ number: ({ children }) => _jsx(OrderedList, { children: children }),
14
+ },
15
+ block: {
16
+ h1: ({ children }) => _jsx(H1, { children: children }),
17
+ h2: ({ children }) => _jsx(H2, { children: children }),
18
+ h3: ({ children }) => _jsx(H3, { children: children }),
19
+ h4: ({ children }) => _jsx(H4, { children: children }),
20
+ normal: ({ children }) => _jsx(NormalText, { children: children }),
21
+ leadParagraph: ({ children }) => _jsx(LeadParagraph, { children: children }),
22
+ },
23
+ };
@@ -0,0 +1,4 @@
1
+ export declare const NormalText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
2
+ export declare const LeadParagraph: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
3
+ export declare const BoldText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
4
+ export declare const ItalicText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -0,0 +1,45 @@
1
+ import styled from "styled-components";
2
+ import { media } from "../../../styles/mixins";
3
+ import { rem } from "../../../styles/units";
4
+ export const NormalText = styled.p `
5
+ font-size: ${rem(16)};
6
+ line-height: 1.5;
7
+ color: ${({ theme }) => theme.blackLight};
8
+
9
+ ${media.L `
10
+ font-size: ${rem(18)};
11
+ line-height: 1.44;
12
+ `}
13
+ `;
14
+ export const LeadParagraph = styled.p `
15
+ font-size: ${rem(20)};
16
+ line-height: 1.4;
17
+ color: ${({ theme }) => theme.blackLight};
18
+
19
+ ${media.L `
20
+ font-size: ${rem(28)};
21
+ line-height: 1.43;
22
+ `}
23
+ `;
24
+ export const BoldText = styled.strong `
25
+ font-family: ${({ theme }) => theme.valueBold};
26
+ font-size: ${rem(16)};
27
+ line-height: 1.5;
28
+ color: ${({ theme }) => theme.blackLight};
29
+
30
+ ${media.L `
31
+ font-size: ${rem(18)};
32
+ line-height: 1.44;
33
+ `}
34
+ `;
35
+ export const ItalicText = styled.i `
36
+ font-size: ${rem(16)};
37
+ line-height: 1.5;
38
+ font-style: italic;
39
+ color: ${({ theme }) => theme.blackLight};
40
+
41
+ ${media.L `
42
+ font-size: ${rem(18)};
43
+ line-height: 1.44;
44
+ `}
45
+ `;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Normal: StoryObj;
5
+ export declare const Lead: StoryObj;
6
+ export declare const Bold: StoryObj;
7
+ export declare const Italic: StoryObj;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { NormalText, LeadParagraph, BoldText, ItalicText } from "./text";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Typography/Text",
6
+ decorators: [
7
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
8
+ ],
9
+ };
10
+ export default meta;
11
+ export const Normal = {
12
+ name: "Normal Text",
13
+ render: () => (_jsx(NormalText, { children: "This is a normal paragraph of body text." })),
14
+ };
15
+ export const Lead = {
16
+ name: "Lead Paragraph",
17
+ render: () => (_jsx(LeadParagraph, { children: "This is a lead paragraph to emphasize an introduction or key message." })),
18
+ };
19
+ export const Bold = {
20
+ name: "Bold Text",
21
+ render: () => (_jsxs(NormalText, { children: ["Some text with ", _jsx(BoldText, { children: "bold emphasis" }), " inside."] })),
22
+ };
23
+ export const Italic = {
24
+ name: "Italic Text",
25
+ render: () => (_jsxs(NormalText, { children: ["Some text with ", _jsx(ItalicText, { children: "italic styling" }), " for nuance."] })),
26
+ };
package/dist/index.d.ts CHANGED
@@ -16,7 +16,10 @@ import { type AccordionItemProps } from "./components/layout/accordion/accordion
16
16
  import { type NavigationCellProps } from "./components/navigation/nav-cell/nav-cell";
17
17
  import { type NavigationItemProps } from "./components/navigation/nav-item/nav-item";
18
18
  import { type CardBannerProps } from "./components/surfaces/cards/card-banner/card-banner";
19
- export type { ButtonProps, LoadingButtonProps, TextButtonProps, EmailSignupFormProps, ImageProps, ContainerProps, AlertProps, EntryListHeadingProps, EntryListTextProps, PaginationProps, NavigationCellProps, NavigationItemProps, CardBannerProps };
19
+ import { type PaperProps } from "./components/surfaces/paper/paper";
20
+ import { type LinkProps } from "./components/typography/link/link";
21
+ import { PortableTextComponentDefault } from "./components/typography/portable-text/portable-text-component-default";
22
+ export type { ButtonProps, LoadingButtonProps, TextButtonProps, EmailSignupFormProps, ImageProps, ContainerProps, AlertProps, EntryListHeadingProps, EntryListTextProps, PaginationProps, NavigationCellProps, NavigationItemProps, CardBannerProps, PaperProps, };
20
23
  export { CloseIcon } from "./components/icons/close-icon/close-icon";
21
24
  export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
22
25
  export { WarningIcon } from "./components/icons/warning-icon/warning-icon";
@@ -49,3 +52,16 @@ export declare const AccordionItem: import("react").FC<AccordionItemProps>;
49
52
  export declare const NavigationCell: import("react").FC<NavigationCellProps>;
50
53
  export declare const NavigationItem: import("react").FC<NavigationItemProps>;
51
54
  export declare const CardBanner: import("react").FC<CardBannerProps>;
55
+ export declare const Paper: import("react").FC<PaperProps>;
56
+ export declare const Link: import("react").FC<LinkProps>;
57
+ export declare const H1: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>;
58
+ export declare const H2: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>;
59
+ export declare const H3: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>;
60
+ export declare const H4: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>;
61
+ export declare const NormalText: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
62
+ export declare const LeadParagraph: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
63
+ export declare const BoldText: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>;
64
+ export declare const ItalicText: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>;
65
+ export declare const OrderedList: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, never>>;
66
+ export declare const UnorderedList: import("react").FC<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>>;
67
+ export { PortableTextComponentDefault };
package/dist/index.js CHANGED
@@ -19,6 +19,12 @@ import { Accordion as AccordionComponent, AccordionItem as AccordionItemComponen
19
19
  import { NavigationCell as NavigationCellComponent, } from "./components/navigation/nav-cell/nav-cell";
20
20
  import { NavigationItem as NavigationItemComponent, } from "./components/navigation/nav-item/nav-item";
21
21
  import { CardBanner as CardBannerComponent, } from "./components/surfaces/cards/card-banner/card-banner";
22
+ import { Paper as PaperComponent, } from "./components/surfaces/paper/paper";
23
+ import { Link as LinkComponent, } from "./components/typography/link/link";
24
+ import { H1 as H1Component, H2 as H2Component, H3 as H3Component, H4 as H4Component, } from "./components/typography/headings/headings";
25
+ import { NormalText as NormalTextComponent, LeadParagraph as LeadParagraphComponent, BoldText as BoldTextComponent, ItalicText as ItalicTextComponent, } from "./components/typography/text/text";
26
+ import { OrderedList as OrderedListComponent, UnorderedList as UnorderedListComponent, } from "./components/typography/list/list";
27
+ import { PortableTextComponentDefault } from "./components/typography/portable-text/portable-text-component-default";
22
28
  // Icons
23
29
  export { CloseIcon } from "./components/icons/close-icon/close-icon";
24
30
  export { ExclamationMarkIcon } from "./components/icons/exclamation-mark-icon/exclamation-mark-icon";
@@ -51,3 +57,17 @@ export const AccordionItem = withDefaultTheme(AccordionItemComponent);
51
57
  export const NavigationCell = withDefaultTheme(NavigationCellComponent);
52
58
  export const NavigationItem = withDefaultTheme(NavigationItemComponent);
53
59
  export const CardBanner = withDefaultTheme(CardBannerComponent);
60
+ export const Paper = withDefaultTheme(PaperComponent);
61
+ export const Link = withDefaultTheme(LinkComponent);
62
+ export const H1 = withDefaultTheme(H1Component);
63
+ export const H2 = withDefaultTheme(H2Component);
64
+ export const H3 = withDefaultTheme(H3Component);
65
+ export const H4 = withDefaultTheme(H4Component);
66
+ export const NormalText = withDefaultTheme(NormalTextComponent);
67
+ export const LeadParagraph = withDefaultTheme(LeadParagraphComponent);
68
+ export const BoldText = withDefaultTheme(BoldTextComponent);
69
+ export const ItalicText = withDefaultTheme(ItalicTextComponent);
70
+ export const OrderedList = withDefaultTheme(OrderedListComponent);
71
+ export const UnorderedList = withDefaultTheme(UnorderedListComponent);
72
+ // Configs
73
+ export { PortableTextComponentDefault };
@@ -0,0 +1,23 @@
1
+ export type THEME_COLOR_HEX_PURPLE = "#e6d1e5";
2
+ export type THEME_COLOR_HEX_GREEN = "#d6ebe3";
3
+ export type THEME_COLOR_HEX_BLUE = "#d1e4ed";
4
+ export type THEME_COLOR_HEX_PINK = "#fbdfd9";
5
+ export type THEME_COLOR_HEX_WHITE = "#ffffff";
6
+ export type THEME_COLORS_YELLOW = "#ffecc4";
7
+ export type THEME_COLORS_TRANSPARENT = "transparent";
8
+ export type THEME_COLOR_PURPLE = "purple";
9
+ export type THEME_COLOR_GREEN = "green";
10
+ export type THEME_COLOR_BLUE = "blue";
11
+ export type THEME_COLOR_PINK = "pink";
12
+ export type THEME_COLOR_WHITE = "white";
13
+ export type THEME_COLOR_YELLOW = "yellow";
14
+ export type THEME_COLOR_TRANSPARENT = "transparent";
15
+ export type SIZE_NONE = "none";
16
+ export type SIZE_SM = "sm";
17
+ export type SIZE_MD = "md";
18
+ export type SIZE_LG = "lg";
19
+ export type SIZE_XL = "xl";
20
+ export type SIZES = SIZE_NONE | SIZE_SM | SIZE_MD | SIZE_LG | SIZE_XL;
21
+ export type THEME_ELEVATION = 0 | 1;
22
+ export type THEME_COLORS_BY_HEX = THEME_COLOR_HEX_PURPLE | THEME_COLOR_HEX_GREEN | THEME_COLOR_HEX_BLUE | THEME_COLOR_HEX_PINK | THEME_COLOR_HEX_WHITE | THEME_COLORS_YELLOW | THEME_COLORS_TRANSPARENT;
23
+ export type THEME_COLORS_BY_NAME = THEME_COLOR_PURPLE | THEME_COLOR_GREEN | THEME_COLOR_BLUE | THEME_COLOR_PINK | THEME_COLOR_WHITE | THEME_COLOR_YELLOW | THEME_COLOR_TRANSPARENT;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { THEME_COLORS_BY_HEX, THEME_COLORS_BY_NAME, SIZES } from "../../../models/theme";
2
+ export declare const themeColors: (color: THEME_COLORS_BY_HEX | THEME_COLORS_BY_NAME) => string;
3
+ export declare const themeSpacing: (size: SIZES) => string;
4
+ export declare const themeBorderRadius: (size: "sm" | "md" | "lg") => string;
5
+ export declare const themeElevation: (elevation: 0 | 1) => string;
@@ -0,0 +1,37 @@
1
+ import { COLORS, THEME_SPACING } from "../../../styles/theme";
2
+ import { rem } from "../../../styles/units";
3
+ export const themeColors = (color) => {
4
+ const THEME_COLORS = {
5
+ green: COLORS.mint,
6
+ blue: COLORS.skyBlue,
7
+ purple: COLORS.lavender,
8
+ pink: COLORS.pink,
9
+ white: COLORS.white,
10
+ };
11
+ return THEME_COLORS[color] || color;
12
+ };
13
+ export const themeSpacing = (size) => {
14
+ const THEME_SPACING_SIZES = {
15
+ sm: THEME_SPACING.sm,
16
+ md: THEME_SPACING.md,
17
+ lg: THEME_SPACING.lg,
18
+ xl: THEME_SPACING.xl,
19
+ none: "0",
20
+ };
21
+ return THEME_SPACING_SIZES[size] || THEME_SPACING.md;
22
+ };
23
+ export const themeBorderRadius = (size) => {
24
+ const BORDER_RADIUS = {
25
+ sm: rem(6),
26
+ md: rem(8),
27
+ lg: rem(12),
28
+ };
29
+ return BORDER_RADIUS[size] || BORDER_RADIUS.sm;
30
+ };
31
+ export const themeElevation = (elevation) => {
32
+ const ELEVETION = {
33
+ 0: "none",
34
+ 1: `0 ${rem(4)} ${rem(16)} 0 rgba(0, 0, 0, 0.08)`,
35
+ };
36
+ return ELEVETION[elevation] || ELEVETION[0];
37
+ };
@@ -0,0 +1,5 @@
1
+ import { THEME_COLORS_BY_HEX, THEME_COLORS_BY_NAME, SIZES } from "../../models/theme";
2
+ export declare const themeColors: (color: THEME_COLORS_BY_HEX | THEME_COLORS_BY_NAME) => any;
3
+ export declare const themeSpacing: (size: SIZES) => string;
4
+ export declare const themeBorderRadius: (size: "sm" | "md" | "lg") => string;
5
+ export declare const themeElevation: (elevation: 0 | 1) => string;
@@ -0,0 +1,38 @@
1
+ import { COLORS, THEME_SPACING } from "../../styles/theme";
2
+ import { rem } from "../../styles/units";
3
+ export const themeColors = (color) => {
4
+ const THEME_COLORS = {
5
+ green: COLORS.mint,
6
+ blue: COLORS.skyBlue,
7
+ purple: COLORS.lavender,
8
+ pink: COLORS.pink,
9
+ white: COLORS.white,
10
+ yellow: COLORS.yellowLight,
11
+ };
12
+ return THEME_COLORS[color] || color;
13
+ };
14
+ export const themeSpacing = (size) => {
15
+ const THEME_SPACING_SIZES = {
16
+ sm: THEME_SPACING.sm,
17
+ md: THEME_SPACING.md,
18
+ lg: THEME_SPACING.lg,
19
+ xl: THEME_SPACING.xl,
20
+ none: "0",
21
+ };
22
+ return THEME_SPACING_SIZES[size] || THEME_SPACING.md;
23
+ };
24
+ export const themeBorderRadius = (size) => {
25
+ const BORDER_RADIUS = {
26
+ sm: rem(6),
27
+ md: rem(8),
28
+ lg: rem(12),
29
+ };
30
+ return BORDER_RADIUS[size] || BORDER_RADIUS.sm;
31
+ };
32
+ export const themeElevation = (elevation) => {
33
+ const ELEVETION = {
34
+ 0: "none",
35
+ 1: `0 ${rem(4)} ${rem(16)} 0 rgba(0, 0, 0, 0.08)`,
36
+ };
37
+ return ELEVETION[elevation] || ELEVETION[0];
38
+ };
@@ -45,6 +45,7 @@ export declare const buttonLinkStyling: {
45
45
  inverted: () => import("styled-components").RuleSet<object>;
46
46
  text: () => import("styled-components").RuleSet<object>;
47
47
  };
48
- export declare const linkStyling: ({ fontSize }: {
48
+ export declare const linkStyling: ({ fontSize, fontSizeDesktop }: {
49
49
  fontSize?: number;
50
+ fontSizeDesktop?: number;
50
51
  }) => import("styled-components").RuleSet<object>;
@@ -339,11 +339,11 @@ export const buttonLinkStyling = {
339
339
  }
340
340
  `,
341
341
  };
342
- export const linkStyling = ({ fontSize = 16 }) => css `
342
+ export const linkStyling = ({ fontSize = 16, fontSizeDesktop = 18 }) => css `
343
343
  font-family: ${({ theme }) => theme.valueBold};
344
344
  color: ${({ theme }) => theme.redClear};
345
345
  font-size: ${rem(fontSize)};
346
- line-height: ${rem(22)};
346
+ line-height: normal;
347
347
  font-weight: 400;
348
348
  text-decoration: underline;
349
349
  outline-offset: ${rem(2)};
@@ -354,4 +354,8 @@ export const linkStyling = ({ fontSize = 16 }) => css `
354
354
  color: ${({ theme }) => theme.redHover};
355
355
  text-decoration: none;
356
356
  }
357
+
358
+ ${media.L `
359
+ font-size: ${rem(fontSizeDesktop)};
360
+ `}
357
361
  `;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hlf-fe/pulmo-ui",
3
3
  "private": false,
4
- "version": "1.2.0",
4
+ "version": "1.4.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",