@ndla/ui 56.0.3-alpha.0 → 56.0.4-alpha.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 (94) hide show
  1. package/dist/panda.buildinfo.json +34 -5
  2. package/dist/styles.css +144 -18
  3. package/es/Article/Article.js +1 -5
  4. package/es/Article/ArticleContent.js +27 -0
  5. package/es/Article/index.js +2 -1
  6. package/es/Embed/ImageEmbed.js +2 -1
  7. package/es/ErrorMessage/ErrorMessage.js +2 -0
  8. package/es/FileList/File.js +78 -23
  9. package/es/FileList/FileList.js +32 -37
  10. package/es/FileList/PdfFile.js +17 -16
  11. package/es/FileList/index.js +3 -5
  12. package/es/Grid/Grid.js +69 -48
  13. package/es/Grid/GridParallaxItem.js +32 -0
  14. package/es/Grid/index.js +2 -1
  15. package/es/KeyFigure/KeyFigure.js +28 -33
  16. package/es/LinkBlock/LinkBlockSection.js +1 -0
  17. package/es/RelatedArticleList/RelatedArticleList.js +1 -1
  18. package/es/index.js +1 -4
  19. package/es/styles.css +144 -18
  20. package/lib/Article/Article.d.ts +0 -1
  21. package/lib/Article/Article.js +3 -7
  22. package/lib/Article/ArticleContent.d.ts +11 -0
  23. package/lib/Article/ArticleContent.js +33 -0
  24. package/lib/Article/index.d.ts +2 -1
  25. package/lib/Article/index.js +2 -1
  26. package/lib/Embed/ImageEmbed.js +2 -1
  27. package/lib/ErrorMessage/ErrorMessage.js +2 -0
  28. package/lib/FileList/File.d.ts +5 -3
  29. package/lib/FileList/File.js +78 -23
  30. package/lib/FileList/FileList.d.ts +6 -6
  31. package/lib/FileList/FileList.js +35 -38
  32. package/lib/FileList/PdfFile.d.ts +2 -2
  33. package/lib/FileList/PdfFile.js +17 -15
  34. package/lib/FileList/index.d.ts +3 -5
  35. package/lib/FileList/index.js +19 -18
  36. package/lib/Grid/Grid.d.ts +4 -7
  37. package/lib/Grid/Grid.js +71 -49
  38. package/lib/Grid/GridParallaxItem.d.ts +9 -0
  39. package/lib/Grid/GridParallaxItem.js +39 -0
  40. package/lib/Grid/index.d.ts +2 -1
  41. package/lib/Grid/index.js +4 -5
  42. package/lib/KeyFigure/KeyFigure.js +30 -33
  43. package/lib/LinkBlock/LinkBlockSection.js +1 -0
  44. package/lib/RelatedArticleList/RelatedArticleList.js +1 -1
  45. package/lib/index.d.ts +1 -4
  46. package/lib/index.js +9 -24
  47. package/lib/styles.css +144 -18
  48. package/package.json +7 -7
  49. package/src/Article/Article.tsx +1 -6
  50. package/src/Article/ArticleContent.tsx +21 -0
  51. package/src/Article/index.ts +2 -1
  52. package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +8 -7
  53. package/src/Embed/ImageEmbed.tsx +3 -2
  54. package/src/ErrorMessage/ErrorMessage.tsx +2 -0
  55. package/src/FileList/File.tsx +63 -28
  56. package/src/FileList/FileList.stories.tsx +121 -12
  57. package/src/FileList/FileList.tsx +31 -37
  58. package/src/FileList/PdfFile.tsx +9 -9
  59. package/src/FileList/index.ts +3 -7
  60. package/src/Grid/Grid.stories.tsx +30 -31
  61. package/src/Grid/Grid.tsx +57 -85
  62. package/src/Grid/GridParallaxItem.tsx +26 -0
  63. package/src/Grid/index.ts +3 -1
  64. package/src/KeyFigure/KeyFigure.stories.tsx +18 -11
  65. package/src/KeyFigure/KeyFigure.tsx +33 -47
  66. package/src/LinkBlock/LinkBlockSection.tsx +1 -1
  67. package/src/RelatedArticleList/RelatedArticleList.tsx +1 -1
  68. package/src/index.ts +1 -7
  69. package/es/FileList/Format.js +0 -93
  70. package/es/Footer/FooterBlock.js +0 -17
  71. package/es/Footer/index.js +0 -9
  72. package/es/Messages/MessageBox.js +0 -79
  73. package/es/Messages/index.js +0 -10
  74. package/es/utils/resourceTypeColor.js +0 -46
  75. package/lib/FileList/Format.d.ts +0 -16
  76. package/lib/FileList/Format.js +0 -98
  77. package/lib/Footer/FooterBlock.d.ts +0 -13
  78. package/lib/Footer/FooterBlock.js +0 -24
  79. package/lib/Footer/index.d.ts +0 -8
  80. package/lib/Footer/index.js +0 -12
  81. package/lib/Messages/MessageBox.d.ts +0 -23
  82. package/lib/Messages/MessageBox.js +0 -87
  83. package/lib/Messages/index.d.ts +0 -9
  84. package/lib/Messages/index.js +0 -13
  85. package/lib/utils/resourceTypeColor.d.ts +0 -9
  86. package/lib/utils/resourceTypeColor.js +0 -54
  87. package/src/FileList/Format.tsx +0 -83
  88. package/src/Footer/Footer.stories.tsx +0 -35
  89. package/src/Footer/FooterBlock.tsx +0 -30
  90. package/src/Footer/index.ts +0 -9
  91. package/src/Messages/MessageBox.stories.tsx +0 -95
  92. package/src/Messages/MessageBox.tsx +0 -126
  93. package/src/Messages/index.ts +0 -11
  94. package/src/utils/resourceTypeColor.tsx +0 -46
@@ -6,49 +6,43 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ComponentProps, ReactNode } from "react";
9
+ import { ComponentPropsWithoutRef } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
- import styled from "@emotion/styled";
12
- import { colors, fonts, spacing } from "@ndla/core";
13
- import { Heading } from "@ndla/typography";
14
- interface Props extends ComponentProps<"section"> {
15
- children: ReactNode;
16
- headingButtons?: ReactNode;
17
- }
11
+ import { Heading } from "@ndla/primitives";
12
+ import { styled } from "@ndla/styled-system/jsx";
18
13
 
19
- const FileListSection = styled.section`
20
- margin: ${spacing.large} 0;
21
- padding: 0 0 ${spacing.normal} ${spacing.normal};
22
- border-left: 2px solid ${colors.brand.greyLightest};
23
- font-family: ${fonts.sans};
24
- `;
14
+ interface Props extends ComponentPropsWithoutRef<"div"> {}
25
15
 
26
- const FileListHeaderWrapper = styled.div`
27
- display: flex;
28
- justify-content: space-between;
29
- align-items: center;
30
- margin: 0 0 ${spacing.xsmall} 0;
31
- padding-bottom: ${spacing.xsmall};
32
- border-bottom: 2px solid ${colors.brand.greyLight};
33
- `;
16
+ export const FileListWrapper = styled("div", {
17
+ base: {
18
+ display: "flex",
19
+ flexDirection: "column",
20
+ gap: "xsmall",
21
+ },
22
+ });
34
23
 
35
- const FilesList = styled.ul`
36
- padding: 0;
37
- `;
24
+ export const FileListItem = styled("li", {
25
+ base: {
26
+ background: "surface.infoSubtle",
27
+ borderBlockEnd: "1px solid",
28
+ borderColor: "stroke.default",
29
+ display: "flex",
30
+ justifyContent: "space-between",
38
31
 
39
- const FileList = ({ children, headingButtons, ...rest }: Props) => {
32
+ _hover: {
33
+ backgroundColor: "surface.infoSubtle.hover",
34
+ },
35
+ },
36
+ });
37
+
38
+ export const FileListEmbed = ({ children, ...rest }: Props) => {
40
39
  const { t } = useTranslation();
41
40
  return (
42
- <FileListSection {...rest}>
43
- <FileListHeaderWrapper>
44
- <Heading element="h3" headingStyle="list-title" margin="none">
45
- {t("files")}
46
- </Heading>
47
- <div>{headingButtons}</div>
48
- </FileListHeaderWrapper>
49
- <FilesList>{children}</FilesList>
50
- </FileListSection>
41
+ <FileListWrapper {...rest} data-embed-type="file-list">
42
+ <Heading fontWeight="bold" textStyle="heading.small" asChild consumeCss>
43
+ <h3>{t("files")}</h3>
44
+ </Heading>
45
+ <ul>{children}</ul>
46
+ </FileListWrapper>
51
47
  );
52
48
  };
53
-
54
- export default FileList;
@@ -28,15 +28,15 @@ const StyledFigure = styled(Figure, {
28
28
  },
29
29
  });
30
30
 
31
- const PdfFile = ({ title, url }: Props) => {
31
+ export const PdfFile = ({ title, url }: Props) => {
32
32
  return (
33
- <StyledFigure>
34
- <Heading asChild consumeCss textStyle="title.medium">
35
- <h4>{title}</h4>
36
- </Heading>
37
- <StyledIframe title={title} height="1050" src={url} />
38
- </StyledFigure>
33
+ <li>
34
+ <StyledFigure>
35
+ <Heading asChild consumeCss textStyle="title.medium">
36
+ <h4>{title}</h4>
37
+ </Heading>
38
+ <StyledIframe title={title} height="1050" src={url} />
39
+ </StyledFigure>
40
+ </li>
39
41
  );
40
42
  };
41
-
42
- export default PdfFile;
@@ -6,10 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import FileList from "./FileList";
10
-
11
- export { default as File } from "./File";
12
- export { default as PdfFile } from "./PdfFile";
13
- export { default as Format } from "./Format";
14
-
15
- export default FileList;
9
+ export { FileListEmbed, FileListItem } from "./FileList";
10
+ export { File, FileListElement } from "./File";
11
+ export { PdfFile } from "./PdfFile";
@@ -6,52 +6,51 @@
6
6
  *
7
7
  */
8
8
 
9
- import styled from "@emotion/styled";
10
- import { DocsContainer, DocsContainerProps } from "@storybook/addon-docs";
11
9
  import { Meta, StoryFn } from "@storybook/react";
12
- import { colors } from "@ndla/core";
13
- import Grid from "./Grid";
10
+ import { ArticleContent, ArticleWrapper, OneColumn } from "@ndla/ui";
11
+ import { Grid } from "./Grid";
14
12
  import { BlogPostStory } from "../BlogPost/BlogPost.stories";
15
- import { KeyFigureStory } from "../KeyFigure/KeyFigure.stories";
16
-
17
- const GridWrapper = styled.div`
18
- .docs-story {
19
- background-color: ${colors.background.lightBlue};
20
- }
21
- `;
22
-
23
- const GridDocsContainer = ({ ...props }: DocsContainerProps) => (
24
- <GridWrapper>
25
- <DocsContainer {...props} />
26
- </GridWrapper>
27
- );
13
+ import { Plain } from "../KeyFigure/KeyFigure.stories";
28
14
 
29
15
  export default {
30
16
  title: "Components/Grid",
31
17
  component: Grid,
32
18
  tags: ["autodocs"],
33
19
  parameters: {
34
- layout: "centered",
35
- docs: {
36
- container: GridDocsContainer,
37
- },
20
+ inlineStories: true,
21
+ layout: "fullscreen",
38
22
  },
39
23
  args: {
40
- columns: "2",
24
+ columns: "3",
41
25
  border: "none",
42
- background: "white",
26
+ background: "gray",
43
27
  },
28
+ decorators: [
29
+ (Story) => (
30
+ <OneColumn wide>
31
+ <ArticleWrapper>
32
+ <ArticleContent>
33
+ <Story />
34
+ </ArticleContent>
35
+ </ArticleWrapper>
36
+ </OneColumn>
37
+ ),
38
+ ],
44
39
  } as Meta<typeof Grid>;
45
40
 
41
+ const keyFigureArgs = [
42
+ { title: "22 000+", subtitle: "Tilgjengelige ressurser" },
43
+ { title: "149", subtitle: "Eksamensfag" },
44
+ { title: "500", subtitle: "Tverrfaglige ressurser" },
45
+ { title: "0", subtitle: "Dårlige ideer" },
46
+ ];
47
+
46
48
  export const GridKeyPerformanceStory: StoryFn<typeof Grid> = ({ ...args }) => {
47
49
  const columns = args.columns === "2x2" ? 4 : parseInt(args.columns);
48
- const items = new Array(columns).fill(
49
- <KeyFigureStory
50
- title={KeyFigureStory.args?.title!}
51
- subtitle={KeyFigureStory.args?.subtitle!}
52
- image={KeyFigureStory.args?.image!}
53
- />,
54
- );
50
+ const items = new Array(columns).fill(0).map((_, idx) => {
51
+ const args = keyFigureArgs[idx % keyFigureArgs.length];
52
+ return <Plain key={idx} {...args} />;
53
+ });
55
54
  return <Grid {...args}>{items}</Grid>;
56
55
  };
57
56
 
@@ -61,7 +60,7 @@ export const GridBlogPostStory: StoryFn<typeof Grid> = ({ ...args }) => {
61
60
  <BlogPostStory
62
61
  metaImage={BlogPostStory.args?.metaImage!}
63
62
  title={BlogPostStory.args?.title!}
64
- size={BlogPostStory.args?.size}
63
+ size={"normal"}
65
64
  headingLevel={BlogPostStory.args?.headingLevel}
66
65
  url={BlogPostStory.args?.url!}
67
66
  author={BlogPostStory.args?.author}
package/src/Grid/Grid.tsx CHANGED
@@ -6,103 +6,75 @@
6
6
  *
7
7
  */
8
8
 
9
- import { HTMLAttributes, ReactNode } from "react";
10
- import styled from "@emotion/styled";
11
- import { breakpoints, colors, misc, mq, spacing } from "@ndla/core";
9
+ import { ReactNode } from "react";
10
+ import { styled } from "@ndla/styled-system/jsx";
11
+
12
+ const GridContainer = styled("div", {
13
+ base: {
14
+ display: "grid",
15
+ justifyContent: "center",
16
+ borderRadius: "xsmall",
17
+ padding: "xsmall",
18
+ gridRowGap: "large",
19
+ gridColumnGap: "medium",
20
+ width: "100%",
21
+ backgroundColor: "background.subtle",
22
+ maxWidth: "surface.4xlarge",
23
+ minWidth: "surface.xxsmall",
24
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
25
+ tabletDown: {
26
+ gridTemplateColumns: "repeat(1, minmax(0, 1fr))",
27
+ },
28
+ tabletToDesktop: {
29
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
30
+ "& > div:nth-child(3):last-child": {
31
+ display: "flex",
32
+ flexFlow: "column",
33
+ justifyContent: "center",
34
+ alignItems: "center",
35
+ gridColumn: "span 2",
36
+ },
37
+ },
38
+ },
39
+ variants: {
40
+ columns: {
41
+ "2": {},
42
+ "2x2": {},
43
+ "3": { desktop: { gridTemplateColumns: "repeat(3, minmax(0, 1fr))" } },
44
+ "4": { desktop: { gridTemplateColumns: "repeat(4, minmax(0, 1fr))" } },
45
+ },
46
+ background: {
47
+ white: { backgroundColor: "surface.default" },
48
+ transparent: { backgroundColor: "transparent" },
49
+ gray: { backgroundColor: "background.subtle" },
50
+ },
51
+ border: {
52
+ lightBlue: {
53
+ border: "1px solid",
54
+ borderColor: "surface.brand.2",
55
+ },
56
+ },
57
+ },
58
+ });
12
59
 
13
60
  export interface GridProps {
14
- columns: "2" | "4" | "2x2";
61
+ columns: "2" | "3" | "4" | "2x2";
15
62
  border?: "none" | "lightBlue";
16
- background?: "transparent" | "white";
17
- size?: boolean;
63
+ background?: "transparent" | "white" | "gray";
18
64
  children?: ReactNode[];
19
65
  }
20
66
 
21
- const GridContainer = styled.div`
22
- display: grid;
23
- justify-content: center;
24
- border-radius: ${misc.borderRadius};
25
- grid-template-columns: 1fr;
26
- grid-gap: ${spacing.normal};
27
- padding: ${spacing.normal};
28
- margin-bottom: ${spacing.normal};
29
- clear: both;
30
-
31
- ${mq.range({ until: breakpoints.tabletWide })} {
32
- &[data-columns="2x2"],
33
- &[data-columns="3"],
34
- &[data-columns="4"] {
35
- grid-template-columns: repeat(2, minmax(0, 1fr));
36
- }
37
- }
38
-
39
- ${mq.range({ until: breakpoints.desktop })} {
40
- > div:nth-child(3):last-child {
41
- display: flex;
42
- flex-flow: column;
43
- justify-content: center;
44
- align-items: center;
45
- grid-column: span 2;
46
- }
47
- }
48
-
49
- ${mq.range({ from: breakpoints.tabletWide })} {
50
- grid-template-columns: repeat(2, minmax(0, 1fr));
51
-
52
- &[data-columns="3"] {
53
- grid-template-columns: repeat(3, minmax(0, 1fr));
54
- }
55
-
56
- &[data-columns="4"] {
57
- grid-template-columns: repeat(4, minmax(0, 1fr));
58
- }
59
- }
60
-
61
- &[data-frontpage="true"] {
62
- grid-gap: ${spacing.large};
63
- }
64
-
65
- &[data-border="lightBlue"] {
66
- border: 1px solid ${colors.brand.lighter};
67
- }
68
- &[data-background="white"] {
69
- background-color: ${colors.white};
70
- }
71
-
72
- p {
73
- word-break: break-word;
74
- margin-top: 0px;
75
- }
76
- `;
77
-
78
- const Grid = ({ columns, border, children, background, size, ...rest }: GridProps) => {
67
+ export const Grid = ({ columns, border, children, background = "gray" }: GridProps) => {
79
68
  const amountOfColumns = children?.length === 3 ? "3" : columns;
80
69
 
81
70
  return (
82
71
  <GridContainer
83
- data-frontpage={size}
84
- data-border={border}
85
- data-columns={amountOfColumns}
86
- data-background={background}
87
- {...rest}
72
+ data-embed-type="grid"
73
+ border={border === "none" ? undefined : border}
74
+ columns={amountOfColumns}
75
+ background={background}
88
76
  >
89
77
  {children}
90
78
  </GridContainer>
91
79
  );
92
80
  };
93
-
94
- const StyledGridParallaxItem = styled.div`
95
- position: relative;
96
- > div {
97
- top: var(--masthead-height, 0px);
98
- position: sticky;
99
- }
100
- `;
101
-
102
- export const GridParallaxItem = ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => (
103
- <StyledGridParallaxItem {...rest}>
104
- <div>{children}</div>
105
- </StyledGridParallaxItem>
106
- );
107
-
108
- export default Grid;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { HTMLAttributes } from "react";
10
+ import { styled } from "@ndla/styled-system/jsx";
11
+
12
+ const StyledGridParallaxItem = styled("div", {
13
+ base: {
14
+ position: "relative",
15
+ "& > div": {
16
+ top: "var(--masthead-height, 0px)",
17
+ position: "sticky",
18
+ },
19
+ },
20
+ });
21
+
22
+ export const GridParallaxItem = ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => (
23
+ <StyledGridParallaxItem {...rest} data-embed-type="grid-parallax">
24
+ <div>{children}</div>
25
+ </StyledGridParallaxItem>
26
+ );
package/src/Grid/index.ts CHANGED
@@ -6,5 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- export { default as Grid, GridParallaxItem } from "./Grid";
9
+ export { Grid } from "./Grid";
10
+ export { GridParallaxItem } from "./GridParallaxItem";
11
+
10
12
  export type { GridProps as GridType } from "./Grid";
@@ -6,15 +6,12 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from "@storybook/react";
9
+ import { Meta, StoryFn, StoryObj } from "@storybook/react";
10
10
  import KeyFigure from "./KeyFigure";
11
+
11
12
  const args = {
12
- title: "<i>500</i>",
13
- subtitle: `<span lang="nn">TVERRFAGLEGE</span> RESSURSER`,
14
- image: {
15
- alt: "Nøkkeltall tverrfaglig",
16
- src: "https://api.test.ndla.no/image-api/raw/wMowCjRg.svg",
17
- },
13
+ title: "22 000+",
14
+ subtitle: "Tilgjengelige ressurser",
18
15
  };
19
16
 
20
17
  export default {
@@ -24,12 +21,22 @@ export default {
24
21
  parameters: {
25
22
  layout: "centered",
26
23
  },
27
- args: args,
24
+ args,
28
25
  } as Meta<typeof KeyFigure>;
29
26
 
30
- export const KeyFigureStory: StoryFn<typeof KeyFigure> = ({ ...args }) => {
27
+ export const Plain: StoryFn<typeof KeyFigure> = ({ ...args }) => {
31
28
  return <KeyFigure {...args} />;
32
29
  };
33
30
 
34
- KeyFigureStory.args = args;
35
- KeyFigureStory.storyName = "Key figures";
31
+ export const WithImageAndHTML: StoryObj<typeof KeyFigure> = {
32
+ args: {
33
+ title: "<i>500</i>",
34
+ subtitle: `<span lang="nn">TVERRFAGLEGE</span> RESSURSER`,
35
+ image: {
36
+ alt: "Nøkkeltall tverrfaglig",
37
+ src: "https://api.test.ndla.no/image-api/raw/wMowCjRg.svg",
38
+ },
39
+ },
40
+ };
41
+
42
+ Plain.args = args;
@@ -7,51 +7,37 @@
7
7
  */
8
8
 
9
9
  import parse from "html-react-parser";
10
- import styled from "@emotion/styled";
11
- import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
12
-
13
- const ContentWrapper = styled.div`
14
- display: flex;
15
- flex-direction: column;
16
- justify-content: center;
17
- align-items: center;
18
- padding: ${spacing.small};
19
- align-items: center;
20
- ${mq.range({ from: breakpoints.tabletWide })} {
21
- padding: ${spacing.xsmall} ${spacing.nsmall};
22
- }
23
- `;
24
-
25
- const StyledImage = styled.img`
26
- height: 150px;
27
- width: 150px;
28
- `;
29
-
30
- const TitleWrapper = styled.div`
31
- color: ${colors.text.primary};
32
- font-family: ${fonts.sans};
33
- font-weight: ${fonts.weight.bold};
34
- overflow-wrap: break-word;
35
- ${fonts.sizes("38px", "48px")};
36
- text-align: center;
37
-
38
- ${mq.range({ until: breakpoints.tabletWide })} {
39
- ${fonts.sizes("30px", "36px")};
40
- }
41
- `;
42
-
43
- const SubTitleWrapper = styled.div`
44
- overflow-wrap: "break-word";
45
- text-align: center;
46
- ${fonts.sizes("18px", "29px")};
47
- color: ${colors.text.primary};
48
- font-weight: ${fonts.weight.normal};
49
- font-family: ${fonts.sans};
50
-
51
- ${mq.range({ until: breakpoints.tabletWide })} {
52
- padding-top: ${spacing.xxsmall};
53
- }
54
- `;
10
+ import { styled } from "@ndla/styled-system/jsx";
11
+
12
+ const ContentWrapper = styled("div", {
13
+ base: {
14
+ display: "flex",
15
+ flexDirection: "column",
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ },
19
+ });
20
+
21
+ const StyledImage = styled("img", {
22
+ base: {
23
+ height: "surface.3xsmall",
24
+ width: "surface.3xsmall",
25
+ },
26
+ });
27
+
28
+ const TitleWrapper = styled("div", {
29
+ base: {
30
+ textStyle: "heading.large",
31
+ textAlign: "center",
32
+ },
33
+ });
34
+
35
+ const SubTitleWrapper = styled("div", {
36
+ base: {
37
+ textStyle: "title.medium",
38
+ textAlign: "center",
39
+ },
40
+ });
55
41
 
56
42
  interface Props {
57
43
  image?: {
@@ -64,8 +50,8 @@ interface Props {
64
50
 
65
51
  const KeyFigure = ({ image, title, subtitle }: Props) => {
66
52
  return (
67
- <ContentWrapper>
68
- <StyledImage src={`${image?.src}?width=150`} width={150} height={150} alt={image?.alt} />
53
+ <ContentWrapper data-embed-type="key-figure">
54
+ {image && <StyledImage src={`${image?.src}?width=150`} width={150} height={150} alt={image?.alt} />}
69
55
  <TitleWrapper>{parse(title)}</TitleWrapper>
70
56
  <SubTitleWrapper>{parse(subtitle)}</SubTitleWrapper>
71
57
  </ContentWrapper>
@@ -24,7 +24,7 @@ const StyledList = styled("ul", {
24
24
 
25
25
  const LinkBlockSection = ({ children, ...rest }: Props) => {
26
26
  return (
27
- <nav {...rest}>
27
+ <nav {...rest} data-embed-type="link-block-list">
28
28
  <StyledList>
29
29
  {Children.map(children, (child) => (
30
30
  <li>{child}</li>
@@ -86,7 +86,7 @@ const StyledSection = styled("section", {
86
86
  display: "flex",
87
87
  flexDirection: "column",
88
88
  alignItems: "center",
89
- gap: "xsmall",
89
+ gap: "medium",
90
90
  },
91
91
  });
92
92
 
package/src/index.ts CHANGED
@@ -52,19 +52,13 @@ export { default as RelatedArticleList, RelatedArticle } from "./RelatedArticleL
52
52
 
53
53
  export { ErrorResourceAccessDenied, default as ErrorMessage } from "./ErrorMessage";
54
54
 
55
- export { default as FileList, File, PdfFile, Format } from "./FileList";
55
+ export { FileListEmbed, File, PdfFile, FileListItem, FileListElement } from "./FileList";
56
56
 
57
57
  export { default as FactBox } from "./FactBox";
58
58
 
59
59
  export type { ContentTypeHeroProps } from "./ContentTypeHero";
60
60
  export { ContentTypeHero } from "./ContentTypeHero";
61
61
 
62
- export { FooterBlock } from "./Footer";
63
-
64
- export { default as resourceTypeColor } from "./utils/resourceTypeColor";
65
-
66
- export { MessageBox } from "./Messages";
67
-
68
62
  export { ResourceBox } from "./ResourceBox";
69
63
 
70
64
  export { default as AudioPlayer } from "./AudioPlayer";