@hlf-fe/pulmo-ui 1.5.1 → 1.5.3

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 (94) hide show
  1. package/dist/components/buttons/button/button.d.ts +4 -4
  2. package/dist/components/buttons/button/button.js +11 -20
  3. package/dist/components/buttons/link-button/link-button.d.ts +25 -0
  4. package/dist/components/buttons/link-button/link-button.js +80 -0
  5. package/dist/components/buttons/link-button/link-button.stories.d.ts +6 -0
  6. package/dist/components/buttons/link-button/link-button.stories.js +17 -0
  7. package/dist/components/data-display/list/text-list/text-list.stories.d.ts +0 -0
  8. package/dist/components/data-display/list/text-list/text-list.stories.js +0 -0
  9. package/dist/components/icons/external-icon/external-icon.js +1 -1
  10. package/dist/components/icons/toggable-chevron/toggable-chevron.js +5 -5
  11. package/dist/components/icons/toggable-plus-minus-icon/toggable-plus-minus-icon.js +2 -2
  12. package/dist/components/inputs/dropdown/dropdown.js +5 -5
  13. package/dist/components/inputs/text-field/text-field.d.ts +1 -1
  14. package/dist/components/inputs/text-field/text-field.js +2 -2
  15. package/dist/components/layout/accordion/accordion.js +3 -3
  16. package/dist/components/layout/container/container.js +2 -2
  17. package/dist/components/layout/image-list/image-list.d.ts +6 -0
  18. package/dist/components/layout/image-list/image-list.js +55 -0
  19. package/dist/components/layout/image-list/image-list.stories.d.ts +6 -0
  20. package/dist/components/layout/image-list/image-list.stories.js +19 -0
  21. package/dist/components/modules/entry-list/entry-list.js +6 -6
  22. package/dist/components/modules/footer/footer.d.ts +1 -0
  23. package/dist/components/modules/footer/footer.js +4 -4
  24. package/dist/components/modules/logo-list/logo-list.d.ts +5 -0
  25. package/dist/components/modules/logo-list/logo-list.js +34 -0
  26. package/dist/components/modules/logo-list/logo-list.stories.d.ts +6 -0
  27. package/dist/components/modules/logo-list/logo-list.stories.js +18 -0
  28. package/dist/components/modules/navigation/navigation-desktop/nav-cell/nav-cell.d.ts +6 -0
  29. package/dist/components/modules/navigation/navigation-desktop/nav-cell/nav-cell.js +69 -0
  30. package/dist/components/modules/navigation/navigation-desktop/nav-cell.d.ts +6 -0
  31. package/dist/components/modules/navigation/navigation-desktop/nav-cell.js +69 -0
  32. package/dist/components/modules/navigation/navigation-desktop/nav-section/nav-section.d.ts +8 -0
  33. package/dist/components/modules/navigation/navigation-desktop/nav-section/nav-section.js +80 -0
  34. package/dist/components/modules/navigation/navigation-desktop/nav-section.d.ts +8 -0
  35. package/dist/components/modules/navigation/navigation-desktop/nav-section.js +80 -0
  36. package/dist/components/modules/navigation/navigation-desktop/navigation-desktop.d.ts +3 -0
  37. package/dist/components/modules/navigation/navigation-desktop/navigation-desktop.js +136 -0
  38. package/dist/components/modules/navigation/navigation-desktop/navigation-desktop.stories.d.ts +6 -0
  39. package/dist/components/modules/navigation/navigation-desktop/navigation-desktop.stories.js +12 -0
  40. package/dist/components/modules/navigation/navigation-mobile/nav-panel.d.ts +11 -0
  41. package/dist/components/modules/navigation/navigation-mobile/nav-panel.js +158 -0
  42. package/dist/components/modules/navigation/navigation-mobile/navigation-mobile.d.ts +3 -0
  43. package/dist/components/modules/navigation/navigation-mobile/navigation-mobile.js +97 -0
  44. package/dist/components/modules/navigation/navigation-mobile/navigation-mobile.stories.d.ts +6 -0
  45. package/dist/components/modules/navigation/navigation-mobile/navigation-mobile.stories.js +12 -0
  46. package/dist/components/modules/navigation/shared/nav-item/nav-item.d.ts +18 -0
  47. package/dist/components/modules/navigation/shared/nav-item/nav-item.js +106 -0
  48. package/dist/components/modules/navigation/shared/types/types.d.ts +43 -0
  49. package/dist/components/modules/navigation/shared/types/types.js +1 -0
  50. package/dist/components/modules/navigation/types.d.ts +39 -0
  51. package/dist/components/modules/navigation/types.js +1 -0
  52. package/dist/components/navigation/dropdown-menu/dropdown-menu.d.ts +0 -0
  53. package/dist/components/navigation/dropdown-menu/dropdown-menu.js +0 -0
  54. package/dist/components/navigation/nav-cell/nav-cell.d.ts +1 -1
  55. package/dist/components/navigation/nav-cell/nav-cell.js +12 -10
  56. package/dist/components/navigation/nav-cell/navbar.d.ts +0 -0
  57. package/dist/components/navigation/nav-cell/navbar.js +0 -0
  58. package/dist/components/navigation/nav-section/dropdown-menu.d.ts +0 -0
  59. package/dist/components/navigation/nav-section/dropdown-menu.js +0 -0
  60. package/dist/components/navigation/nav-section/nav-section.d.ts +0 -0
  61. package/dist/components/navigation/nav-section/nav-section.js +0 -0
  62. package/dist/components/navigation/navbar/navbar.d.ts +0 -0
  63. package/dist/components/navigation/navbar/navbar.js +0 -0
  64. package/dist/components/navigation/pagination/pagination.js +3 -3
  65. package/dist/components/surfaces/paper/paper.js +4 -4
  66. package/dist/hoc/withDefaultTheme.d.ts +3 -1
  67. package/dist/hoc/withDefaultTheme.js +16 -6
  68. package/dist/index.d.ts +13 -6
  69. package/dist/index.js +8 -6
  70. package/dist/mocks/image-mocks.d.ts +7 -0
  71. package/dist/mocks/image-mocks.js +7 -0
  72. package/dist/mocks/navigation-mock.d.ts +5 -0
  73. package/dist/mocks/navigation-mock.js +153 -0
  74. package/dist/models/sanity.types.d.ts +9 -0
  75. package/dist/models/sanity.types.js +1 -0
  76. package/dist/models/web-page.url.d.ts +10 -0
  77. package/dist/models/web-page.url.js +1 -0
  78. package/package.json +1 -1
  79. package/dist/components/typography/heading/heading.d.ts +0 -4
  80. package/dist/components/typography/heading/heading.js +0 -47
  81. package/dist/components/typography/heading/heading.stories.d.ts +0 -7
  82. package/dist/components/typography/heading/heading.stories.js +0 -26
  83. package/dist/components/typography/heading/headings.d.ts +0 -4
  84. package/dist/components/typography/heading/headings.js +0 -47
  85. package/dist/components/typography/heading/headings.stories.d.ts +0 -7
  86. package/dist/components/typography/heading/headings.stories.js +0 -26
  87. package/dist/components/typography/portable-text/portable-text-default.d.ts +0 -39
  88. package/dist/components/typography/portable-text/portable-text-default.js +0 -23
  89. package/dist/styles/mixins/theme-mixins/theme-mixins.d.ts +0 -5
  90. package/dist/styles/mixins/theme-mixins/theme-mixins.js +0 -37
  91. /package/dist/components/{typography/portable-text/portable-text-component.d.ts → data-display/list/text-list/text-list.d.ts} +0 -0
  92. /package/dist/components/{typography/portable-text/portable-text-component.js → data-display/list/text-list/text-list.js} +0 -0
  93. /package/dist/components/layout/image/{image.stories.d.ts → Image.stories.d.ts} +0 -0
  94. /package/dist/components/layout/image/{image.stories.js → Image.stories.js} +0 -0
@@ -17,9 +17,9 @@ export type ButtonProps = {
17
17
  children: ReactNode;
18
18
  };
19
19
  export type StyledButtonProps = {
20
- inverted?: boolean;
21
- btnSize?: "s" | "m" | "l";
22
- fullWidthMobile?: boolean;
23
- fullWidth?: boolean;
20
+ $inverted?: boolean;
21
+ $btnSize?: "s" | "m" | "l";
22
+ $fullWidthMobile?: boolean;
23
+ $fullWidth?: boolean;
24
24
  };
25
25
  export declare const Button: ({ type, onClick, className, inverted, disabled, btnSize, fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,18 +4,8 @@ import { media, buttonSize } from "../../../styles/mixins";
4
4
  import { rem } from "../../../styles/units";
5
5
  import { Link } from "gatsby";
6
6
  export const Button = ({ type = "submit", onClick, className = "", inverted = false, disabled = false, btnSize = "m", fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }) => {
7
- const commonProps = {
8
- className,
9
- onClick,
10
- inverted,
11
- btnSize,
12
- fullWidth,
13
- fullWidthMobile,
14
- "data-test": dataTest,
15
- tabIndex,
16
- };
17
7
  const asElement = to ? Link : href ? "a" : "button";
18
- return (_jsx(StyledButton, { as: asElement, ...commonProps, ...(to ? { to } : {}), ...(href
8
+ return (_jsx(StyledButton, { "$inverted": inverted, "$btnSize": btnSize, "$fullWidthMobile": fullWidthMobile, "$fullWidth": fullWidth, as: asElement, className: className, onClick: onClick, "data-test": dataTest, tabIndex: tabIndex, ...(to ? { to } : {}), ...(href
19
9
  ? {
20
10
  href,
21
11
  target,
@@ -31,22 +21,23 @@ const StyledButton = styled.button `
31
21
  font-family: ${({ theme }) => theme.valueBold};
32
22
  font-weight: 400;
33
23
  text-decoration: none;
34
- color: ${({ theme, inverted }) => (inverted ? theme.red : theme.white)};
35
- width: ${({ fullWidthMobile }) => (fullWidthMobile ? "100%" : "fit-content")};
36
- background-color: ${({ theme, inverted }) => inverted ? theme.white : theme.red};
24
+ color: ${({ theme, $inverted }) => ($inverted ? theme.red : theme.white)};
25
+ width: ${({ $fullWidthMobile }) => $fullWidthMobile ? "100%" : "fit-content"};
26
+ background-color: ${({ theme, $inverted }) => $inverted ? theme.white : theme.red};
37
27
  line-height: 2.5;
38
28
  border-radius: ${rem(5)};
39
- border-color: ${({ theme, inverted }) => inverted ? theme.red : "transparent"};
29
+ border-color: ${({ theme, $inverted }) => $inverted ? theme.red : "transparent"};
40
30
  transition: background-color 0.3s ease-out;
41
31
  border-style: solid;
32
+ cursor: pointer;
42
33
 
43
34
  &:disabled {
44
35
  cursor: default;
45
36
  opacity: 0.6;
46
37
  }
47
38
 
48
- ${({ btnSize }) => {
49
- switch (btnSize) {
39
+ ${({ $btnSize }) => {
40
+ switch ($btnSize) {
50
41
  case "s":
51
42
  return buttonSize.S;
52
43
  case "m":
@@ -58,16 +49,16 @@ const StyledButton = styled.button `
58
49
  }
59
50
  }}
60
51
 
61
- ${({ theme, inverted, fullWidth }) => css `
52
+ ${({ theme, $inverted, $fullWidth }) => css `
62
53
  ${media.M `
63
- width: ${fullWidth ? "100%" : "fit-content"};
54
+ width: ${$fullWidth ? "100%" : "fit-content"};
64
55
  font-size: ${rem(18)};
65
56
  `}
66
57
 
67
58
  &:not(:disabled) {
68
59
  ${media.L `
69
60
  &:hover, :active, :focus-visible {
70
- background-color: ${inverted ? theme.red : theme.redHover};
61
+ background-color: ${$inverted ? theme.red : theme.redHover};
71
62
  color: ${theme.white};
72
63
  }
73
64
 
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from "react";
2
+ export type LinkButtonProps = {
3
+ type?: "button" | "reset" | "submit";
4
+ icon?: ReactNode;
5
+ className?: string;
6
+ inverted?: boolean;
7
+ disabled?: boolean;
8
+ onClick?: () => void;
9
+ btnSize?: "s" | "m" | "l";
10
+ fullWidth?: boolean;
11
+ fullWidthMobile?: boolean;
12
+ dataTest?: string;
13
+ tabIndex?: number;
14
+ to?: string;
15
+ href?: string;
16
+ target?: "_blank" | "_self" | "_parent" | "_top";
17
+ children: ReactNode;
18
+ };
19
+ export type StyledLinkButtonProps = {
20
+ inverted?: boolean;
21
+ btnSize?: "s" | "m" | "l";
22
+ fullWidthMobile?: boolean;
23
+ fullWidth?: boolean;
24
+ };
25
+ export declare const LinkButton: ({ type, onClick, className, inverted, disabled, btnSize, fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }: LinkButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled, { css } from "styled-components";
3
+ import { media, buttonSize } from "../../../styles/mixins";
4
+ import { rem } from "../../../styles/units";
5
+ import { Link } from "gatsby";
6
+ export const LinkButton = ({ type = "submit", onClick, className = "", inverted = false, disabled = false, btnSize = "m", fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }) => {
7
+ const commonProps = {
8
+ className,
9
+ onClick,
10
+ inverted,
11
+ btnSize,
12
+ fullWidth,
13
+ fullWidthMobile,
14
+ "data-test": dataTest,
15
+ tabIndex,
16
+ };
17
+ const asElement = to ? Link : href ? "a" : "button";
18
+ return (_jsx(StyledLinkButton, { as: asElement, ...commonProps, ...(to ? { to } : {}), ...(href
19
+ ? {
20
+ href,
21
+ target,
22
+ rel: target === "_blank" ? "noopener noreferrer" : undefined,
23
+ }
24
+ : {}), ...(!to && !href ? { type, disabled } : {}), children: children }));
25
+ };
26
+ const StyledLinkButton = styled.button `
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ gap: ${rem(10)};
31
+ font-family: ${({ theme }) => theme.valueBold};
32
+ font-weight: 400;
33
+ text-decoration: none;
34
+ color: ${({ theme, inverted }) => (inverted ? theme.red : theme.white)};
35
+ width: ${({ fullWidthMobile }) => (fullWidthMobile ? "100%" : "fit-content")};
36
+ background-color: ${({ theme, inverted }) => inverted ? theme.white : theme.red};
37
+ line-height: 2.5;
38
+ border-radius: ${rem(5)};
39
+ border-color: ${({ theme, inverted }) => inverted ? theme.red : "transparent"};
40
+ transition: background-color 0.3s ease-out;
41
+ border-style: solid;
42
+
43
+ &:disabled {
44
+ cursor: default;
45
+ opacity: 0.6;
46
+ }
47
+
48
+ ${({ btnSize }) => {
49
+ switch (btnSize) {
50
+ case "s":
51
+ return buttonSize.S;
52
+ case "m":
53
+ return buttonSize.M;
54
+ case "l":
55
+ return buttonSize.L;
56
+ default:
57
+ return buttonSize.M;
58
+ }
59
+ }}
60
+
61
+ ${({ theme, inverted, fullWidth }) => css `
62
+ ${media.M `
63
+ width: ${fullWidth ? "100%" : "fit-content"};
64
+ `}
65
+
66
+ &:not(:disabled) {
67
+ ${media.L `
68
+ &:hover, :active, :focus-visible {
69
+ background-color: ${inverted ? theme.red : theme.redHover};
70
+ color: ${theme.white};
71
+ }
72
+
73
+ &:focus-visible {
74
+ outline: ${rem(2)} solid ${theme.blackLight};
75
+ outline-offset: ${rem(2)};
76
+ }
77
+ `};
78
+ }
79
+ `};
80
+ `;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { LinkButton } from "./link-button";
3
+ declare const meta: Meta<typeof LinkButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LinkButton>;
6
+ export declare const Default: Story;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LinkButton } from "./link-button";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ const meta = {
5
+ title: "Buttons/LinkButton",
6
+ component: LinkButton,
7
+ decorators: [
8
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
9
+ ],
10
+ };
11
+ export default meta;
12
+ export const Default = {
13
+ args: {
14
+ inverted: false,
15
+ children: "Button Text",
16
+ },
17
+ };
@@ -1,2 +1,2 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const ExternalIcon = ({ className = "" }) => (_jsx("svg", { className: className, width: "16px", height: "16px", viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("g", { stroke: "none", "stroke-width": "1", fill: "none", fillRule: "evenodd", children: _jsx("g", { transform: "translate(-428.000000, -10860.000000)", fill: "currentColor", fillRule: "nonzero", children: _jsx("path", { d: "M433,10861 C433.552285,10861 434,10861.4477 434,10862 C434,10862.5523 433.552285,10863 433,10863 L431,10863 C430.447715,10863 430,10863.4477 430,10864 L430,10873 C430,10873.5523 430.447715,10874 431,10874 L440,10874 C440.552285,10874 441,10873.5523 441,10873 L441,10871 C441,10870.4477 441.447715,10870 442,10870 C442.552285,10870 443,10870.4477 443,10871 L443,10873 C443,10874.6569 441.656854,10876 440,10876 L431,10876 C429.343146,10876 428,10874.6569 428,10873 L428,10864 C428,10862.3431 429.343146,10861 431,10861 L433,10861 Z M443,10860 L443.019354,10860.0002 C443.042681,10860.0006 443.065995,10860.0019 443.08925,10860.004 L443,10860 C443.05062,10860 443.100362,10860.0038 443.148961,10860.011 C443.165949,10860.0136 443.183375,10860.0167 443.200726,10860.0202 C443.222746,10860.0246 443.244436,10860.0298 443.26584,10860.0357 C443.281463,10860.0401 443.296851,10860.0447 443.312143,10860.0497 C443.331798,10860.0561 443.351579,10860.0633 443.371059,10860.0711 C443.388796,10860.0782 443.406098,10860.0857 443.423222,10860.0937 C443.443891,10860.1034 443.464294,10860.1138 443.484277,10860.1249 C443.496394,10860.1315 443.508613,10860.1386 443.520709,10860.146 C443.546275,10860.1617 443.571131,10860.1785 443.595159,10860.1963 C443.602603,10860.2018 443.609842,10860.2073 443.617022,10860.2129 C443.680182,10860.2626 443.737448,10860.3198 443.787214,10860.3832 L443.707107,10860.2929 C443.742501,10860.3283 443.774687,10860.3657 443.803665,10860.4047 C443.82151,10860.4289 443.838281,10860.4537 443.853933,10860.4793 C443.861393,10860.4914 443.868501,10860.5036 443.875329,10860.5159 C443.886206,10860.5357 443.896623,10860.5561 443.906346,10860.5769 C443.914321,10860.5939 443.921804,10860.6112 443.928775,10860.6287 C443.936684,10860.6484 443.943878,10860.6682 443.950453,10860.6883 C443.955271,10860.7031 443.959902,10860.7185 443.964155,10860.734 C443.970166,10860.7556 443.97536,10860.7773 443.979835,10860.7992 C443.983298,10860.8166 443.986372,10860.8341 443.988982,10860.8515 C443.992033,10860.8715 443.994467,10860.8921 443.996262,10860.9129 C443.997844,10860.9317 443.998905,10860.9497 443.999483,10860.9677 C443.999818,10860.9778 444,10860.9889 444,10861 L444,10867 C444,10867.5523 443.552285,10868 443,10868 C442.447715,10868 442,10867.5523 442,10867 L442,10863.414 L433.707107,10871.7071 C433.316582,10872.0976 432.683418,10872.0976 432.292893,10871.7071 C431.902369,10871.3166 431.902369,10870.6834 432.292893,10870.2929 L440.584,10862 L437,10862 C436.487164,10862 436.064493,10861.614 436.006728,10861.1166 L436,10861 C436,10860.4477 436.447715,10860 437,10860 L443,10860 Z" }) }) }) }));
2
+ export const ExternalIcon = ({ className = "" }) => (_jsx("svg", { className: className, width: "16px", height: "16px", viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: _jsx("g", { transform: "translate(-428.000000, -10860.000000)", fill: "currentColor", fillRule: "nonzero", children: _jsx("path", { d: "M433,10861 C433.552285,10861 434,10861.4477 434,10862 C434,10862.5523 433.552285,10863 433,10863 L431,10863 C430.447715,10863 430,10863.4477 430,10864 L430,10873 C430,10873.5523 430.447715,10874 431,10874 L440,10874 C440.552285,10874 441,10873.5523 441,10873 L441,10871 C441,10870.4477 441.447715,10870 442,10870 C442.552285,10870 443,10870.4477 443,10871 L443,10873 C443,10874.6569 441.656854,10876 440,10876 L431,10876 C429.343146,10876 428,10874.6569 428,10873 L428,10864 C428,10862.3431 429.343146,10861 431,10861 L433,10861 Z M443,10860 L443.019354,10860.0002 C443.042681,10860.0006 443.065995,10860.0019 443.08925,10860.004 L443,10860 C443.05062,10860 443.100362,10860.0038 443.148961,10860.011 C443.165949,10860.0136 443.183375,10860.0167 443.200726,10860.0202 C443.222746,10860.0246 443.244436,10860.0298 443.26584,10860.0357 C443.281463,10860.0401 443.296851,10860.0447 443.312143,10860.0497 C443.331798,10860.0561 443.351579,10860.0633 443.371059,10860.0711 C443.388796,10860.0782 443.406098,10860.0857 443.423222,10860.0937 C443.443891,10860.1034 443.464294,10860.1138 443.484277,10860.1249 C443.496394,10860.1315 443.508613,10860.1386 443.520709,10860.146 C443.546275,10860.1617 443.571131,10860.1785 443.595159,10860.1963 C443.602603,10860.2018 443.609842,10860.2073 443.617022,10860.2129 C443.680182,10860.2626 443.737448,10860.3198 443.787214,10860.3832 L443.707107,10860.2929 C443.742501,10860.3283 443.774687,10860.3657 443.803665,10860.4047 C443.82151,10860.4289 443.838281,10860.4537 443.853933,10860.4793 C443.861393,10860.4914 443.868501,10860.5036 443.875329,10860.5159 C443.886206,10860.5357 443.896623,10860.5561 443.906346,10860.5769 C443.914321,10860.5939 443.921804,10860.6112 443.928775,10860.6287 C443.936684,10860.6484 443.943878,10860.6682 443.950453,10860.6883 C443.955271,10860.7031 443.959902,10860.7185 443.964155,10860.734 C443.970166,10860.7556 443.97536,10860.7773 443.979835,10860.7992 C443.983298,10860.8166 443.986372,10860.8341 443.988982,10860.8515 C443.992033,10860.8715 443.994467,10860.8921 443.996262,10860.9129 C443.997844,10860.9317 443.998905,10860.9497 443.999483,10860.9677 C443.999818,10860.9778 444,10860.9889 444,10861 L444,10867 C444,10867.5523 443.552285,10868 443,10868 C442.447715,10868 442,10867.5523 442,10867 L442,10863.414 L433.707107,10871.7071 C433.316582,10872.0976 432.683418,10872.0976 432.292893,10871.7071 C431.902369,10871.3166 431.902369,10870.6834 432.292893,10870.2929 L440.584,10862 L437,10862 C436.487164,10862 436.064493,10861.614 436.006728,10861.1166 L436,10861 C436,10860.4477 436.447715,10860 437,10860 L443,10860 Z" }) }) }) }));
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import styled, { css } from "styled-components";
3
3
  export const ChevronDownIcon = ({ className }) => (_jsx("svg", { width: "16px", height: "16px", viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg", fill: "#333333", className: className, children: _jsx("path", { d: "M2.29289322,5.29289322 C2.65337718,4.93240926 3.22060824,4.90467972 3.61289944,5.20970461 L3.70710678,5.29289322 L8,9.585 L12.2928932,5.29289322 C12.6533772,4.93240926 13.2206082,4.90467972 13.6128994,5.20970461 L13.7071068,5.29289322 C14.0675907,5.65337718 14.0953203,6.22060824 13.7902954,6.61289944 L13.7071068,6.70710678 L8.70710678,11.7071068 C8.34662282,12.0675907 7.77939176,12.0953203 7.38710056,11.7902954 L7.29289322,11.7071068 L2.29289322,6.70710678 C1.90236893,6.31658249 1.90236893,5.68341751 2.29289322,5.29289322 Z" }) }));
4
- export const ToggableChevron = ({ toggled, disableCircle = true, rotation, className, }) => (_jsx(Chevron, { toggled: toggled, disableCircle: disableCircle, rotation: rotation, className: className, children: _jsx(ChevronDownIcon, {}) }));
4
+ export const ToggableChevron = ({ toggled, disableCircle = true, rotation, className, }) => (_jsx(Chevron, { "$isToggled": toggled, "$disableCircle": disableCircle, "$rotation": rotation, className: className, children: _jsx(ChevronDownIcon, {}) }));
5
5
  const Chevron = styled.div `
6
6
  width: 22px;
7
7
  height: 22px;
@@ -12,9 +12,9 @@ const Chevron = styled.div `
12
12
  justify-content: center;
13
13
  align-items: center;
14
14
 
15
- ${({ toggled, disableCircle, rotation }) => css `
16
- transform: scaleY(${toggled ? -1 : 1})
17
- ${rotation && `rotate(${rotation}deg)`};
18
- border-width: ${toggled || disableCircle ? 0 : 1};
15
+ ${({ $isToggled, $disableCircle, $rotation }) => css `
16
+ transform: scaleY(${$isToggled ? -1 : 1})
17
+ ${$rotation && `rotate(${$rotation}deg)`};
18
+ border-width: ${$isToggled || $disableCircle ? 0 : 1};
19
19
  `};
20
20
  `;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
3
  export const ToggablePlusMinusIcon = ({ isOpen = false, width = 14, height = 14, className = "", }) => {
4
- return (_jsxs(Svg, { className: className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 160", width: width, height: height, isOpen: isOpen, children: [_jsx(Rect, { isOpen: isOpen, x: "70", width: "20", height: "160" }), _jsx(Rect, { y: "70", width: "160", height: "20" })] }));
4
+ return (_jsxs(Svg, { className: className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 160", width: width, height: height, "$isOpen": isOpen, children: [_jsx(Rect, { "$isOpen": isOpen, x: "70", width: "20", height: "160" }), _jsx(Rect, { y: "70", width: "160", height: "20" })] }));
5
5
  };
6
6
  const Svg = styled.svg `
7
7
  cursor: pointer;
@@ -9,5 +9,5 @@ const Svg = styled.svg `
9
9
  const Rect = styled.rect `
10
10
  transition: transform 250ms ease-in-out;
11
11
  transform-origin: 50% 50%;
12
- transform: ${({ isOpen }) => (!isOpen ? "scaleY(1)" : "scaleY(0)")};
12
+ transform: ${({ $isOpen }) => (!$isOpen ? "scaleY(1)" : "scaleY(0)")};
13
13
  `;
@@ -29,7 +29,7 @@ export const Dropdown = ({ prefix, items, id, className, onItemSelected, initial
29
29
  });
30
30
  }
31
31
  }, [isOpen]);
32
- return (_jsxs(Container, { className: className, ref: ref, children: [_jsxs(DropdownButton, { id: id, onClick: () => setIsOpen(!isOpen), "aria-haspopup": "menu", "aria-controls": "dropdown-menu", isOpen: isOpen, children: [_jsxs(TextContainer, { children: [prefix && _jsx(Prefix, { children: `${prefix}:` }), _jsx(Label, { children: selectedItem?.label })] }), _jsx(StyledToggle, { toggled: isOpen })] }), _jsx(Content, { id: "dropdown-menu", "aria-expanded": isOpen, "aria-hidden": !isOpen, role: "menu", children: items.map((item, i) => (_jsx(DropdownListItem, { label: item.label, onClick: () => {
32
+ return (_jsxs(Container, { className: className, ref: ref, children: [_jsxs(DropdownButton, { id: id, onClick: () => setIsOpen(!isOpen), "aria-haspopup": "menu", "aria-controls": "dropdown-menu", "$isOpen": isOpen, children: [_jsxs(TextContainer, { children: [prefix && _jsx(Prefix, { children: `${prefix}:` }), _jsx(Label, { children: selectedItem?.label })] }), _jsx(StyledToggle, { toggled: isOpen })] }), _jsx(Content, { id: "dropdown-menu", "aria-expanded": isOpen, "aria-hidden": !isOpen, role: "menu", children: items.map((item, i) => (_jsx(DropdownListItem, { label: item.label, onClick: () => {
33
33
  setIsOpen(false);
34
34
  setItem(item);
35
35
  onItemSelected(item);
@@ -48,17 +48,17 @@ const DropdownButton = styled.button `
48
48
  font-size: ${rem(16)};
49
49
  background-color: ${({ theme }) => theme.white};
50
50
  border: ${rem(1)} solid ${({ theme }) => theme.grayTransparent};
51
- border-radius: ${({ isOpen }) => isOpen ? `${rem(5)} ${rem(5)} 0 0` : rem(5)};
52
- border-bottom: ${({ isOpen, theme }) => isOpen ? "none" : `$(${rem(1)}) solid ${theme.grayTransparent}`};
51
+ border-radius: ${({ $isOpen }) => $isOpen ? `${rem(5)} ${rem(5)} 0 0` : rem(5)};
52
+ border-bottom: ${({ $isOpen, theme }) => $isOpen ? "none" : `$(${rem(1)}) solid ${theme.grayTransparent}`};
53
53
  padding: 0 ${rem(14)};
54
54
  cursor: pointer;
55
55
 
56
- ${({ isOpen, theme }) => {
56
+ ${({ $isOpen, theme }) => {
57
57
  return css `
58
58
  ${media.M `
59
59
  &:hover, :focus-visible {
60
60
  border: ${rem(1)} solid ${theme.gray};
61
- border-bottom: ${isOpen ? "none" : `${rem(1)} solid ${theme.gray}`};
61
+ border-bottom: ${$isOpen ? "none" : `${rem(1)} solid ${theme.gray}`};
62
62
  }
63
63
  `}
64
64
  `;
@@ -27,6 +27,6 @@ export type TextFieldProps = {
27
27
  export type StyledTextFieldProps = {
28
28
  icon?: string;
29
29
  variant?: "default" | "rounded";
30
- startAdornment?: ReactNode;
30
+ $startAdornment?: ReactNode;
31
31
  };
32
32
  export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -20,7 +20,7 @@ const variantInputStyles = {
20
20
  `,
21
21
  };
22
22
  export const TextField = forwardRef(({ dataTest, value, name, type = "text", variant = "default", placeholder, onChange, onBlur, onFocus, onKeyDown, className, ariaLabel, ariaDescribedBy, register, errors, pattern, inputMode = "text", startAdornment, endAdornment, }, ref) => {
23
- return (_jsxs(InputContainer, { children: [_jsxs(InputWrapper, { className: className, variant: variant, startAdornment: startAdornment, children: [startAdornment && _jsx(StartAdornment, { children: startAdornment }), _jsx(StyledInput, { "data-test": dataTest, variant: variant, value: value, ref: ref, type: type, id: name, name: name, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, onKeyDown: onKeyDown, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, inputMode: inputMode, pattern: pattern, startAdornment: startAdornment, ...register }), endAdornment && _jsx(EndAdornment, { children: endAdornment })] }), errors && name && _jsx(FormError, { errors: errors, name: name })] }));
23
+ return (_jsxs(InputContainer, { children: [_jsxs(InputWrapper, { className: className, variant: variant, "$startAdornment": startAdornment, children: [startAdornment && _jsx(StartAdornment, { children: startAdornment }), _jsx(StyledInput, { "data-test": dataTest, variant: variant, value: value, ref: ref, type: type, id: name, name: name, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, onKeyDown: onKeyDown, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, inputMode: inputMode, pattern: pattern, "$startAdornment": startAdornment, ...register }), endAdornment && _jsx(EndAdornment, { children: endAdornment })] }), errors && name && _jsx(FormError, { errors: errors, name: name })] }));
24
24
  });
25
25
  TextField.displayName = "TextField";
26
26
  const InputContainer = styled.div `
@@ -45,7 +45,7 @@ const StyledInput = styled.input `
45
45
  }
46
46
 
47
47
  ${({ variant }) => variantInputStyles[variant]};
48
- padding-left: ${({ startAdornment }) => (startAdornment ? rem(40) : rem(20))};
48
+ padding-left: ${({ $startAdornment }) => $startAdornment ? rem(40) : rem(20)};
49
49
  `;
50
50
  const StartAdornment = styled.div `
51
51
  position: absolute;
@@ -39,13 +39,13 @@ export const AccordionItem = ({ heading, headingLevel, panelId, regionId, initia
39
39
  setPanelState(isClosed ? PanelState.OPENING : PanelState.CLOSING);
40
40
  };
41
41
  const isExpanded = panelState !== PanelState.CLOSED;
42
- return (_jsxs(AccordionPanel, { children: [_jsx(StyledHeading, { as: headingLevel, children: _jsxs(StyledButton, { "data-test": `accordion-header${isExpanded ? "-expanded" : ""}`, id: panelId, "aria-expanded": isExpanded, "aria-controls": regionId, onClick: togglePanel, children: [_jsx(Text, { children: heading }), _jsx(StyledToggablePlusMinusIcon, { isOpen: isExpanded })] }) }), _jsx(AccodrionContent, { "data-test": "accordion-content", ref: ref, id: regionId, role: "region", "aria-labelledby": panelId, contentHeight: height, useAutoHeight: panelState === PanelState.OPENED, onTransitionEnd: onAnimationComplete, children: _jsx(Content, { hidden: !isExpanded, children: children }) })] }));
42
+ return (_jsxs(AccordionPanel, { children: [_jsx(StyledHeading, { as: headingLevel, children: _jsxs(StyledButton, { "data-test": `accordion-header${isExpanded ? "-expanded" : ""}`, id: panelId, "aria-expanded": isExpanded, "aria-controls": regionId, onClick: togglePanel, children: [_jsx(Text, { children: heading }), _jsx(StyledToggablePlusMinusIcon, { isOpen: isExpanded })] }) }), _jsx(AccodrionContent, { "data-test": "accordion-content", ref: ref, id: regionId, role: "region", "aria-labelledby": panelId, "$contentHeight": height, "$useAutoHeight": panelState === PanelState.OPENED, onTransitionEnd: onAnimationComplete, children: _jsx(Content, { hidden: !isExpanded, children: children }) })] }));
43
43
  };
44
44
  const AccodrionContent = styled.div `
45
45
  overflow: hidden;
46
46
  transition: height 0.3s ease-in-out;
47
- height: ${({ contentHeight }) => `${contentHeight}px`};
48
- height: ${({ useAutoHeight }) => useAutoHeight && "auto"};
47
+ height: ${({ $contentHeight }) => `${$contentHeight}px`};
48
+ height: ${({ $useAutoHeight }) => $useAutoHeight && "auto"};
49
49
  `;
50
50
  const Content = styled.div `
51
51
  padding: ${rem(15)} 0;
@@ -11,10 +11,10 @@ const getMaxWidth = (size) => {
11
11
  return MAX_WIDTH?.[size];
12
12
  };
13
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 }));
14
+ return (_jsx(Div, { ref: ref, className: className, "$maxWidth": getMaxWidth(maxWidth), display: display, position: position, children: children }));
15
15
  });
16
16
  const Div = styled.div `
17
- ${({ maxWidth }) => maxWidth};
17
+ ${({ $maxWidth }) => $maxWidth};
18
18
  display: ${({ display }) => display};
19
19
  position: ${({ position }) => position};
20
20
  `;
@@ -0,0 +1,6 @@
1
+ import { SanityImage } from '../../../models/sanity-types';
2
+ export type ImageListProps = {
3
+ heading?: string;
4
+ images: SanityImage[];
5
+ };
6
+ export declare const ImageList: ({ heading, images }: ImageListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Image } from "../../../components/layout/image/image";
3
+ import { Container } from "../../../components/layout/container/container";
4
+ import styled from 'styled-components';
5
+ import { media } from '../../../styles/mixins';
6
+ import { rem } from '../../../styles/units';
7
+ export const ImageList = ({ heading, images }) => {
8
+ return (_jsx(OuterContainer, { children: _jsxs(StyledContainer, { children: [heading && _jsx(Heading, { children: heading }), _jsx(LogoContainer, { children: images?.map((image, i) => {
9
+ return _jsx(Image, { image: image?.asset }, `${image?.asset?.url}-${i}`);
10
+ }) })] }) }));
11
+ };
12
+ const OuterContainer = styled.div `
13
+ background-color: ${({ theme }) => theme.white};
14
+ `;
15
+ const StyledContainer = styled(Container) `
16
+ margin-bottom: 0;
17
+ `;
18
+ const LogoContainer = styled.div `
19
+ display: grid;
20
+ grid-template-columns: repeat(2, 1fr);
21
+ grid-auto-rows: ${rem(110)};
22
+ grid-gap: ${rem(20)};
23
+ padding: ${rem(32)} 0 ${rem(40)};
24
+
25
+ ${media.L `
26
+ grid-template-columns: repeat(5, 1fr);
27
+ grid-auto-rows: ${rem(135)};
28
+ padding: ${rem(32)} 0 ${rem(48)};
29
+ `}
30
+
31
+ img {
32
+ width: 100%;
33
+ height: ${rem(110)};
34
+ border-radius: ${rem(4)};
35
+ box-shadow: 0 ${rem(4)} ${rem(16)} 0 rgba(0, 0, 0, 0.08);
36
+ padding: ${rem(10)};
37
+
38
+ ${media.L `
39
+ height: ${rem(135)};
40
+ `}
41
+ }
42
+ `;
43
+ const Heading = styled.h2 `
44
+ font-family: ${({ theme }) => theme.valueRegular};
45
+ font-size: ${rem(16)};
46
+ font-weight: normal;
47
+ color: ${({ theme }) => theme.blackLight};
48
+ margin: 0;
49
+ padding-top: ${rem(32)};
50
+
51
+ ${media.M `
52
+ font-size: ${rem(18)};
53
+ text-align: center;
54
+ `}
55
+ `;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ImageList } from "./image-list";
3
+ declare const meta: Meta<typeof ImageList>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ImageList>;
6
+ export declare const Default: Story;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ImageList } from "./image-list";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ import { svgMock } from '../../../mocks/image-mocks';
5
+ const meta = {
6
+ title: "Layout/ImageList",
7
+ component: ImageList,
8
+ decorators: [
9
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
10
+ ],
11
+ };
12
+ export default meta;
13
+ const images = Array(10).fill(svgMock);
14
+ export const Default = {
15
+ args: {
16
+ heading: 'Lorem ipsum dolor sit amet',
17
+ images,
18
+ },
19
+ };
@@ -9,10 +9,10 @@ export const EntryListItem = ({ children, as = "li" }) => {
9
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
- return (_jsx(Text, { as: as, fontSizeMobile: fontSizeMobile, fontSizeDesktop: fontSizeDesktop, breakpoint: breakpoint, bold: bold, color: color, children: children }));
12
+ return (_jsx(Text, { as: as, "$fontSizeMobile": fontSizeMobile, "$fontSizeDesktop": fontSizeDesktop, "$breakpoint": breakpoint, "$bold": bold, color: color, children: children }));
13
13
  };
14
14
  export const EntryListHeading = ({ children, fontSizeMobile = 18, fontSizeDesktop = 20, as = "h2", breakpoint = "M", }) => {
15
- return (_jsx(Heading, { as: as, fontSizeMobile: fontSizeMobile, fontSizeDesktop: fontSizeDesktop, breakpoint: breakpoint, children: children }));
15
+ return (_jsx(Heading, { as: as, "$fontSizeMobile": fontSizeMobile, "$fontSizeDesktop": fontSizeDesktop, "$breakpoint": breakpoint, children: children }));
16
16
  };
17
17
  const List = styled.ul `
18
18
  list-style: none;
@@ -27,10 +27,10 @@ const ListItem = styled.li `
27
27
  }
28
28
  `;
29
29
  const responsiveFont = css `
30
- font-size: ${({ fontSizeMobile }) => rem(fontSizeMobile)};
30
+ font-size: ${({ $fontSizeMobile }) => rem($fontSizeMobile)};
31
31
 
32
- ${({ fontSizeDesktop, breakpoint }) => media[breakpoint] `
33
- font-size: ${rem(fontSizeDesktop)};
32
+ ${({ $fontSizeDesktop, $breakpoint }) => media[$breakpoint] `
33
+ font-size: ${rem($fontSizeDesktop)};
34
34
  `}
35
35
  `;
36
36
  const Heading = styled.h2 `
@@ -41,7 +41,7 @@ const Heading = styled.h2 `
41
41
  `;
42
42
  const Text = styled.p `
43
43
  color: ${({ theme, color }) => (color ? color : theme.blackLight)};
44
- font-family: ${({ theme, bold }) => bold ? theme.valueBold : theme.valueRegular};
44
+ font-family: ${({ theme, $bold }) => $bold ? theme.valueBold : theme.valueRegular};
45
45
 
46
46
  ${responsiveFont}
47
47
  &:last-child {
@@ -1,5 +1,6 @@
1
1
  import { SanityImage } from "../../../models/sanity-types";
2
2
  type LinkItem = {
3
+ id?: string;
3
4
  externalUrl: string;
4
5
  internalLink: {
5
6
  slug: {
@@ -5,10 +5,10 @@ import { media } from "../../../styles/mixins";
5
5
  import { rem } from "../../../styles/units";
6
6
  import styled from "styled-components";
7
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
- })] }));
8
+ return (_jsxs(OuterContainer, { children: [_jsx(ColumnContainer, { children: linkColumns.map(({ heading, items }, i) => {
9
+ return (_jsxs(Column, { children: [heading && _jsx(Heading, { children: heading }), items?.map((item, i) => {
10
+ return (_jsx(StyledLink, { value: { reference: item }, children: item?.webUrlName }, `${item?.id}${i}`));
11
+ })] }, `${heading}-${i}`));
12
12
  }) }), _jsx(StyledImage, { image: footerLogo?.asset })] }));
13
13
  };
14
14
  const OuterContainer = styled.div `
@@ -0,0 +1,5 @@
1
+ import { SanityImage } from '../../../models/sanity-types';
2
+ export type LogoListProps = {
3
+ images: SanityImage[];
4
+ };
5
+ export declare const LogoList: ({ images }: LogoListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Image } from "../../../components/layout/image/image";
3
+ import { Container } from "../../../components/layout/container/container";
4
+ import styled from 'styled-components';
5
+ import { media } from '../../../styles/mixins';
6
+ import { rem } from '../../../styles/units';
7
+ export const LogoList = ({ images }) => {
8
+ return (_jsx(Container, { children: _jsx(LogoContainer, { children: images?.map((image, i) => {
9
+ return _jsx(Image, { image: image?.asset }, `${image?.asset?.url}-${i}`);
10
+ }) }) }));
11
+ };
12
+ const LogoContainer = styled.div `
13
+ display: grid;
14
+ grid-template-columns: repeat(2, 1fr);
15
+ grid-auto-rows: ${rem(110)};
16
+ grid-gap: ${rem(20)};
17
+
18
+ ${media.L `
19
+ grid-template-columns: repeat(5, 1fr);
20
+ grid-auto-rows: ${rem(135)};
21
+ `}
22
+
23
+ img {
24
+ width: 100%;
25
+ height: ${rem(110)};
26
+ border-radius: ${rem(4)};
27
+ box-shadow: 0 ${rem(4)} ${rem(16)} 0 rgba(0, 0, 0, 0.08);
28
+ padding: ${rem(10)};
29
+
30
+ ${media.L `
31
+ height: ${rem(135)};
32
+ `}
33
+ }
34
+ `;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { LogoList } from "./logo-list";
3
+ declare const meta: Meta<typeof LogoList>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LogoList>;
6
+ export declare const Default: Story;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LogoList } from "./logo-list";
3
+ import { Decorator } from "../../../components/decorator/decorator";
4
+ import { svgMock } from '../../../mocks/image-mocks';
5
+ const meta = {
6
+ title: "Modules/LogoList",
7
+ component: LogoList,
8
+ decorators: [
9
+ (Story) => (_jsx(Decorator, { children: _jsx(Story, {}) })),
10
+ ],
11
+ };
12
+ export default meta;
13
+ const images = Array(10).fill(svgMock);
14
+ export const Default = {
15
+ args: {
16
+ images,
17
+ },
18
+ };
@@ -0,0 +1,6 @@
1
+ export type NavigationCellProps = {
2
+ title: string;
3
+ active?: boolean;
4
+ onToggleCell: () => void;
5
+ };
6
+ export declare const NavigationCell: ({ title, active, onToggleCell, }: NavigationCellProps) => import("react/jsx-runtime").JSX.Element;