@ndla/ui 56.0.78-alpha.0 → 56.0.80-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 (62) hide show
  1. package/dist/panda.buildinfo.json +0 -1
  2. package/dist/styles.css +0 -12
  3. package/es/Article/ArticleByline.js +12 -12
  4. package/es/AudioPlayer/Controls.js +8 -6
  5. package/es/Breadcrumb/BreadcrumbItem.js +1 -1
  6. package/es/Embed/AudioEmbed.js +1 -1
  7. package/es/locale/messages-en.js +5 -2
  8. package/es/locale/messages-nb.js +5 -2
  9. package/es/locale/messages-nn.js +5 -2
  10. package/es/locale/messages-se.js +5 -2
  11. package/es/locale/messages-sma.js +5 -2
  12. package/lib/Article/Article.d.ts +4 -12
  13. package/lib/Article/ArticleByline.js +12 -12
  14. package/lib/AudioPlayer/Controls.js +8 -6
  15. package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
  16. package/lib/Concept/Concept.d.ts +1 -1
  17. package/lib/ContactBlock/ContactBlock.d.ts +2 -2
  18. package/lib/Embed/AudioEmbed.js +1 -1
  19. package/lib/Embed/ConceptInlineTriggerButton.d.ts +1 -3
  20. package/lib/Embed/InlineTriggerButton.d.ts +1 -3
  21. package/lib/Embed/types.d.ts +2 -2
  22. package/lib/FileList/FileList.d.ts +1 -3
  23. package/lib/Gloss/Gloss.d.ts +2 -2
  24. package/lib/Gloss/GlossExample.d.ts +2 -2
  25. package/lib/KeyFigure/KeyFigure.d.ts +1 -1
  26. package/lib/LicenseByline/EmbedByline.d.ts +4 -4
  27. package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
  28. package/lib/locale/messages-en.d.ts +4 -1
  29. package/lib/locale/messages-en.js +5 -2
  30. package/lib/locale/messages-nb.d.ts +4 -1
  31. package/lib/locale/messages-nb.js +5 -2
  32. package/lib/locale/messages-nn.d.ts +4 -1
  33. package/lib/locale/messages-nn.js +5 -2
  34. package/lib/locale/messages-se.d.ts +4 -1
  35. package/lib/locale/messages-se.js +5 -2
  36. package/lib/locale/messages-sma.d.ts +4 -1
  37. package/lib/locale/messages-sma.js +5 -2
  38. package/package.json +8 -8
  39. package/src/Article/ArticleByline.tsx +10 -8
  40. package/src/AudioPlayer/Controls.tsx +3 -3
  41. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
  42. package/src/Concept/Concept.tsx +1 -1
  43. package/src/ContactBlock/ContactBlock.tsx +2 -2
  44. package/src/Embed/AudioEmbed.tsx +1 -1
  45. package/src/Embed/ExternalEmbed.tsx +1 -1
  46. package/src/Embed/ImageEmbed.stories.tsx +2 -2
  47. package/src/Embed/ImageEmbed.tsx +1 -1
  48. package/src/Embed/types.ts +2 -2
  49. package/src/FactBox/FactBox.tsx +1 -1
  50. package/src/Gloss/Gloss.tsx +4 -4
  51. package/src/Gloss/GlossExample.tsx +2 -2
  52. package/src/KeyFigure/KeyFigure.stories.tsx +3 -3
  53. package/src/KeyFigure/KeyFigure.tsx +1 -1
  54. package/src/LicenseByline/EmbedByline.tsx +4 -4
  55. package/src/Pitch/Pitch.stories.tsx +2 -2
  56. package/src/RelatedArticleList/RelatedArticleList.tsx +2 -2
  57. package/src/i18n/__tests__/formatNestedMessages-test.ts +0 -1
  58. package/src/locale/messages-en.ts +4 -1
  59. package/src/locale/messages-nb.ts +4 -1
  60. package/src/locale/messages-nn.ts +4 -1
  61. package/src/locale/messages-se.ts +4 -1
  62. package/src/locale/messages-sma.ts +4 -1
@@ -259,8 +259,10 @@ declare const messages: {
259
259
  dialogText2: string;
260
260
  youAreHere: string;
261
261
  trait: {
262
- video: string;
262
+ audio: string;
263
263
  h5p: string;
264
+ podcast: string;
265
+ video: string;
264
266
  };
265
267
  };
266
268
  messageBoxInfo: {
@@ -807,6 +809,7 @@ declare const messages: {
807
809
  pause: string;
808
810
  download: string;
809
811
  reuse: string;
812
+ progressBar: string;
810
813
  error: {
811
814
  url: string;
812
815
  caption: string;
@@ -276,8 +276,10 @@ const messages = {
276
276
  dialogText2: "Tilleggsstoff er innhald du kan velje i tillegg til kjernestoffet. Gjennom dette kan du fordjupe deg i eit emne eller nærme deg emnet på ein annan måte.",
277
277
  youAreHere: "Du er her",
278
278
  trait: {
279
- video: "Video",
280
- h5p: "Interaktiv"
279
+ audio: "Lyd",
280
+ h5p: "Interaktiv",
281
+ podcast: "Podkast",
282
+ video: "Video"
281
283
  }
282
284
  },
283
285
  messageBoxInfo: {
@@ -824,6 +826,7 @@ const messages = {
824
826
  pause: "Pause",
825
827
  download: "Last ned lydfil",
826
828
  reuse: "Bruk lydfil",
829
+ progressBar: "Framdriftsindikator",
827
830
  error: {
828
831
  url: "Feil ved lasting av lydfil.",
829
832
  caption: "Orsak, ein feil oppstod ved lasting av lydfil."
@@ -259,8 +259,10 @@ declare const messages: {
259
259
  dialogText2: string;
260
260
  youAreHere: string;
261
261
  trait: {
262
- video: string;
262
+ audio: string;
263
263
  h5p: string;
264
+ podcast: string;
265
+ video: string;
264
266
  };
265
267
  };
266
268
  messageBoxInfo: {
@@ -807,6 +809,7 @@ declare const messages: {
807
809
  pause: string;
808
810
  download: string;
809
811
  reuse: string;
812
+ progressBar: string;
810
813
  error: {
811
814
  url: string;
812
815
  caption: string;
@@ -276,8 +276,10 @@ const messages = {
276
276
  dialogText2: "Lassiávnnas lea sisdoallu fágas maid sáhtát lassin válljet guovddášávdnasii. Lassiávdnasa bokte sáhtát čiekŋudit iežat muhtin fáddái dahje lahkonaddat fáddái eará vugiin.",
277
277
  youAreHere: "Don leat dás",
278
278
  trait: {
279
- video: "Video",
280
- h5p: "Interaktiiva"
279
+ audio: "Jietna",
280
+ h5p: "Interaktiiva",
281
+ podcast: "Podkásta",
282
+ video: "Video"
281
283
  }
282
284
  },
283
285
  messageBoxInfo: {
@@ -824,6 +826,7 @@ const messages = {
824
826
  pause: "Boatkke",
825
827
  download: "Viečča jietnafiilla",
826
828
  reuse: "Geavat jietnafiilla",
829
+ progressBar: "Fremdriftsindikator",
827
830
  error: {
828
831
  url: "Boasttuvuohta jietnafiilla viežžamis.",
829
832
  caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis."
@@ -259,8 +259,10 @@ declare const messages: {
259
259
  dialogText2: string;
260
260
  youAreHere: string;
261
261
  trait: {
262
- video: string;
262
+ audio: string;
263
263
  h5p: string;
264
+ podcast: string;
265
+ video: string;
264
266
  };
265
267
  };
266
268
  messageBoxInfo: {
@@ -807,6 +809,7 @@ declare const messages: {
807
809
  pause: string;
808
810
  download: string;
809
811
  reuse: string;
812
+ progressBar: string;
810
813
  error: {
811
814
  url: string;
812
815
  caption: string;
@@ -276,8 +276,10 @@ const messages = {
276
276
  dialogText2: "Lissie-aamhtese lea faagesisvege maam maahtah lissine veeljedh jarnge-aamhtesasse. Maahtah veelebelaakan teemam goerehtidh jallh teemam jeatjahlaakan geatskanidh.",
277
277
  youAreHere: "Datne daesnie",
278
278
  trait: {
279
- video: "Videjove",
280
- h5p: "Interaktijve"
279
+ audio: "Tjoeje",
280
+ h5p: "Interaktijve",
281
+ podcast: "Podkast",
282
+ video: "Videjove"
281
283
  }
282
284
  },
283
285
  messageBoxInfo: {
@@ -824,6 +826,7 @@ const messages = {
824
826
  pause: "Pause",
825
827
  download: "Veedtjh tjoeje-fijlem",
826
828
  reuse: "Nuhtjh tjoeje-fijlem",
829
+ progressBar: "Fremdriftsindikator",
827
830
  error: {
828
831
  url: "Fiejlie tjoeje-veedtjemisnie.",
829
832
  caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.78-alpha.0",
3
+ "version": "56.0.80-alpha.0",
4
4
  "description": "UI component library for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -34,11 +34,11 @@
34
34
  "dependencies": {
35
35
  "@ndla/core": "^5.0.3",
36
36
  "@ndla/icons": "^8.0.48-alpha.0",
37
- "@ndla/licenses": "^8.0.5-alpha.0",
38
- "@ndla/primitives": "^1.0.62-alpha.0",
39
- "@ndla/safelink": "^7.0.63-alpha.0",
37
+ "@ndla/licenses": "^8.0.6-alpha.0",
38
+ "@ndla/primitives": "^1.0.64-alpha.0",
39
+ "@ndla/safelink": "^7.0.65-alpha.0",
40
40
  "@ndla/styled-system": "^0.0.29",
41
- "@ndla/util": "^5.0.3-alpha.0",
41
+ "@ndla/util": "^5.0.5-alpha.0",
42
42
  "html-react-parser": "^5.1.19",
43
43
  "i18next-browser-languagedetector": "^7.1.0"
44
44
  },
@@ -51,12 +51,12 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@ndla/preset-panda": "^0.0.48",
54
- "@ndla/types-backend": "^0.2.86",
55
- "@ndla/types-embed": "^5.0.5-alpha.0",
54
+ "@ndla/types-backend": "^1.0.1",
55
+ "@ndla/types-embed": "^5.0.6-alpha.0",
56
56
  "@pandacss/dev": "^0.48.0"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "fae121b0e1c9b7e12e46b4e9a90e2334389f30fa"
61
+ "gitHead": "a00bd799b55932a421bed0cf2ce8f364fbc7aefa"
62
62
  }
@@ -198,14 +198,16 @@ export const ArticleBylineAccordionItem = forwardRef<HTMLDivElement, ArticleByli
198
198
  ({ value, accordionTitle, children, ...props }, ref) => {
199
199
  return (
200
200
  <AccordionItem value={value} ref={ref} {...props}>
201
- <AccordionItemTrigger>
202
- <Heading asChild consumeCss textStyle="label.medium" fontWeight="bold">
203
- <h2>{accordionTitle}</h2>
204
- </Heading>
205
- <AccordionItemIndicator asChild>
206
- <ArrowDownShortLine />
207
- </AccordionItemIndicator>
208
- </AccordionItemTrigger>
201
+ <Heading asChild consumeCss textStyle="label.medium" fontWeight="bold">
202
+ <h2>
203
+ <AccordionItemTrigger>
204
+ {accordionTitle}
205
+ <AccordionItemIndicator asChild>
206
+ <ArrowDownShortLine />
207
+ </AccordionItemIndicator>
208
+ </AccordionItemTrigger>
209
+ </h2>
210
+ </Heading>
209
211
  <AccordionItemContent>{children}</AccordionItemContent>
210
212
  </AccordionItem>
211
213
  );
@@ -35,7 +35,6 @@ import {
35
35
  Text,
36
36
  } from "@ndla/primitives";
37
37
  import { styled } from "@ndla/styled-system/jsx";
38
- import { visuallyHidden } from "@ndla/styled-system/patterns";
39
38
 
40
39
  const ControlsWrapper = styled("div", {
41
40
  base: {
@@ -278,6 +277,7 @@ const Controls = ({ src, title }: Props) => {
278
277
  })
279
278
  }
280
279
  >
280
+ <SliderLabel srOnly>{t("audio.progressBar")}</SliderLabel>
281
281
  <SliderControl>
282
282
  <SliderTrack>
283
283
  <SliderRange />
@@ -298,7 +298,7 @@ const Controls = ({ src, title }: Props) => {
298
298
  onValueChange={(details) => setSpeedValue(parseFloat(details.value[0]))}
299
299
  positioning={{ placement: "top" }}
300
300
  >
301
- <SelectLabel css={visuallyHidden.raw()}>{t("audio.controls.selectSpeed")}</SelectLabel>
301
+ <SelectLabel srOnly>{t("audio.controls.selectSpeed")}</SelectLabel>
302
302
  <SelectControl>
303
303
  <SelectTrigger asChild>
304
304
  <SpeedButton
@@ -338,7 +338,7 @@ const Controls = ({ src, title }: Props) => {
338
338
  step={1}
339
339
  onValueChange={handleVolumeSliderChange}
340
340
  >
341
- <SliderLabel css={visuallyHidden.raw()}>{t("audio.controls.adjustVolume")}</SliderLabel>
341
+ <SliderLabel srOnly>{t("audio.controls.adjustVolume")}</SliderLabel>
342
342
  <StyledSliderControl>
343
343
  <SliderTrack>
344
344
  <SliderRange />
@@ -51,7 +51,7 @@ interface Props {
51
51
  }
52
52
 
53
53
  const BreadcrumbItem = forwardRef<any, Props>(({ renderItem, renderSeparator, item, totalCount }, ref) => {
54
- const liRef = useRef<any>();
54
+ const liRef = useRef<any>(null);
55
55
 
56
56
  useImperativeHandle(ref, () => ({
57
57
  setMaxWidth: (maxWidth: number) => {
@@ -9,7 +9,7 @@
9
9
  import { type ComponentPropsWithRef, type ReactNode, forwardRef } from "react";
10
10
  import { Figure } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
- import type { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
12
+ import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
13
13
  import type { ConceptVisualElementMeta } from "@ndla/types-embed";
14
14
  import { BrightcoveEmbed, ExternalEmbed, H5pEmbed, IframeEmbed, ImageEmbed } from "../Embed";
15
15
  import { EmbedByline } from "../LicenseByline/EmbedByline";
@@ -10,7 +10,7 @@ import { useTranslation } from "react-i18next";
10
10
  import { Text } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
12
  import type { SystemStyleObject } from "@ndla/styled-system/types";
13
- import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
13
+ import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
14
14
  import { LicenseContainerContent } from "../LicenseByline/EmbedByline";
15
15
 
16
16
  export type ContactBlockBackground = "strong" | "moderate" | "subtle";
@@ -143,7 +143,7 @@ const StyledDescription = styled(Text, {
143
143
  });
144
144
 
145
145
  interface Props {
146
- image?: IImageMetaInformationV3;
146
+ image?: IImageMetaInformationV3DTO;
147
147
  jobTitle: string;
148
148
  description: string;
149
149
  backgroundColor?: ContactBlockBackground;
@@ -53,7 +53,7 @@ const AudioEmbed = ({ embed, lang }: Props) => {
53
53
  src={data.audioFile.url}
54
54
  textVersion={
55
55
  data.manuscript?.manuscript.length ? (
56
- <span dangerouslySetInnerHTML={{ __html: data.manuscript.manuscript }} />
56
+ <div dangerouslySetInnerHTML={{ __html: data.manuscript.manuscript }} />
57
57
  ) : undefined
58
58
  }
59
59
  title={data.title.title}
@@ -50,7 +50,7 @@ const ExternalEmbed = ({ embed }: Props) => {
50
50
  if (embedData.type === "fullscreen") {
51
51
  const image = {
52
52
  src: data.iframeImage?.image.imageUrl ?? "",
53
- alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? "",
53
+ alt: embedData.alt !== undefined ? embedData.alt : (data.iframeImage?.alttext?.alttext ?? ""),
54
54
  };
55
55
  return (
56
56
  <Figure data-embed-type="external">
@@ -10,7 +10,7 @@ import type { ReactNode } from "react";
10
10
  import type { Meta, StoryFn, StoryObj } from "@storybook/react";
11
11
  import { PageContent, Text } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
- import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
13
+ import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
14
14
  import type { ImageEmbedData } from "@ndla/types-embed";
15
15
  import ImageEmbed from "./ImageEmbed";
16
16
  import { ArticleWrapper, ArticleContent } from "../Article";
@@ -27,7 +27,7 @@ const embedData: ImageEmbedData = {
27
27
  url: "https://api.test.ndla.no/image-api/v2/images/61181",
28
28
  };
29
29
 
30
- const metaData: IImageMetaInformationV3 = {
30
+ const metaData: IImageMetaInformationV3DTO = {
31
31
  id: "61181",
32
32
  metaUrl: "https://api.test.ndla.no/image-api/v3/images/61181",
33
33
  title: {
@@ -223,7 +223,7 @@ const ImageEmbed = ({ embed, previewAlt, lang, renderContext = "article", childr
223
223
 
224
224
  const licenseProps = licenseAttributes(data.copyright.license.license, lang, embedData.url);
225
225
 
226
- const figureSize = figureProps?.float ? figureProps?.size ?? "medium" : "full";
226
+ const figureSize = figureProps?.float ? (figureProps?.size ?? "medium") : "full";
227
227
 
228
228
  return (
229
229
  <StyledFigure
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import type { ElementType } from "react";
10
- import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
10
+ import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
11
11
  import type { EmbedMetaData } from "@ndla/types-embed";
12
12
 
13
13
  export type HeartButtonType = ElementType<{
@@ -19,7 +19,7 @@ export type EmbedParameter<T extends EmbedMetaData["resource"]> = Partial<
19
19
  >;
20
20
 
21
21
  export type CanonicalUrlFuncs = {
22
- image?: (image: IImageMetaInformationV3) => string;
22
+ image?: (image: IImageMetaInformationV3DTO) => string;
23
23
  };
24
24
 
25
25
  export type RenderContext = "article" | "embed";
@@ -129,7 +129,7 @@ const FactBox = forwardRef<HTMLElement, Props>(
129
129
  // TODO: Remove this hack when we upgrade to React 19.
130
130
  const inertAttribute = useMemo(() => {
131
131
  return state === "closed" ? { inert: "" } : {};
132
- }, [state]);
132
+ }, [state]) as { inert?: boolean };
133
133
 
134
134
  useEffect(() => {
135
135
  if (open !== undefined) {
@@ -20,7 +20,7 @@ import {
20
20
  } from "@ndla/primitives";
21
21
  import { styled } from "@ndla/styled-system/jsx";
22
22
  import type { StyledVariantProps } from "@ndla/styled-system/types";
23
- import type { IGlossData, IGlossExample } from "@ndla/types-backend/concept-api";
23
+ import type { IGlossDataDTO, IGlossExampleDTO } from "@ndla/types-backend/concept-api";
24
24
  import GlossExample from "./GlossExample";
25
25
  import SpeechControl from "../AudioPlayer/SpeechControl";
26
26
 
@@ -29,10 +29,10 @@ import SpeechControl from "../AudioPlayer/SpeechControl";
29
29
  // When a gloss is bordered there's way too much padding.
30
30
 
31
31
  const getFilteredExamples = (
32
- glossData: IGlossData | undefined,
32
+ glossData: IGlossDataDTO | undefined,
33
33
  exampleIds: string | undefined,
34
34
  exampleLangs: string | undefined,
35
- ): IGlossExample[][] => {
35
+ ): IGlossExampleDTO[][] => {
36
36
  if (exampleIds !== undefined || exampleLangs !== undefined) {
37
37
  const exampleIdsList = exampleIds?.toString()?.split(",") ?? [];
38
38
  const exampleLangsList = exampleLangs?.split(",") ?? [];
@@ -104,7 +104,7 @@ export interface Props {
104
104
  title: string;
105
105
  language: string;
106
106
  };
107
- glossData?: IGlossData;
107
+ glossData?: IGlossDataDTO;
108
108
  audio?: {
109
109
  title: string;
110
110
  src?: string;
@@ -9,10 +9,10 @@
9
9
  import { Fragment } from "react";
10
10
  import { Text } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
- import type { IGlossExample } from "@ndla/types-backend/concept-api";
12
+ import type { IGlossExampleDTO } from "@ndla/types-backend/concept-api";
13
13
 
14
14
  interface Props {
15
- examples: IGlossExample[];
15
+ examples: IGlossExampleDTO[];
16
16
  originalLanguage: string | undefined;
17
17
  }
18
18
 
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
- import KeyFigure from "./KeyFigure";
9
+ import type { Meta, StoryObj } from "@storybook/react";
10
+ import KeyFigure, { type Props } from "./KeyFigure";
11
11
 
12
12
  const args = {
13
13
  title: "22 000+",
@@ -24,7 +24,7 @@ export default {
24
24
  args,
25
25
  } as Meta<typeof KeyFigure>;
26
26
 
27
- export const Plain: StoryFn<typeof KeyFigure> = ({ ...args }) => {
27
+ export const Plain = ({ ...args }: Props) => {
28
28
  return <KeyFigure {...args} />;
29
29
  };
30
30
 
@@ -45,7 +45,7 @@ const SubTitleWrapper = styled("div", {
45
45
  },
46
46
  });
47
47
 
48
- interface Props {
48
+ export interface Props {
49
49
  image?: {
50
50
  src?: string;
51
51
  alt?: string;
@@ -12,10 +12,10 @@ import { AlertLine } from "@ndla/icons";
12
12
  import { getLicenseByAbbreviation, getLicenseCredits } from "@ndla/licenses";
13
13
  import { Button, Text } from "@ndla/primitives";
14
14
  import { styled } from "@ndla/styled-system/jsx";
15
- import type { ICopyright as ArticleCopyright } from "@ndla/types-backend/article-api";
16
- import type { ICopyright as AudioCopyright } from "@ndla/types-backend/audio-api";
17
- import type { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
18
- import type { ICopyright as ImageCopyright } from "@ndla/types-backend/image-api";
15
+ import type { ICopyrightDTO as ArticleCopyright } from "@ndla/types-backend/article-api";
16
+ import type { ICopyrightDTO as AudioCopyright } from "@ndla/types-backend/audio-api";
17
+ import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
18
+ import type { ICopyrightDTO as ImageCopyright } from "@ndla/types-backend/image-api";
19
19
  import type { BrightcoveCopyright } from "@ndla/types-embed";
20
20
  import { LicenseLink } from "./LicenseLink";
21
21
 
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { Meta, StoryFn } from "@storybook/react";
9
+ import type { Meta } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import { Pitch, type Props } from "./Pitch";
12
12
  import { ArticleContent, ArticleWrapper } from "../Article";
@@ -41,7 +41,7 @@ export default {
41
41
  ],
42
42
  } as Meta<typeof Pitch>;
43
43
 
44
- export const Default: StoryFn<typeof Pitch> = ({ ...args }) => {
44
+ export const Default = ({ ...args }: Props) => {
45
45
  return (
46
46
  <Grid columns="2" background="transparent">
47
47
  <div data-type="grid-cell" data-parallax-cell="false">
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Children, type ComponentPropsWithoutRef, type ReactNode, useMemo, useState } from "react";
9
+ import { Children, type ComponentPropsWithoutRef, type ReactElement, type ReactNode, useMemo, useState } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
11
  import { ExternalLinkLine } from "@ndla/icons";
12
12
  import { CardContent, CardHeading, CardRoot, Text, Heading, Button } from "@ndla/primitives";
@@ -108,7 +108,7 @@ const StyledButton = styled(Button, {
108
108
  });
109
109
 
110
110
  interface Props extends ComponentPropsWithoutRef<"section"> {
111
- children?: JSX.Element[];
111
+ children?: ReactElement[];
112
112
  articleCount?: number;
113
113
  headingLevel?: HeadingLevel;
114
114
  headingButtons?: ReactNode;
@@ -6,7 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- /* eslint-env jest */
10
9
  import { formatNestedMessages } from "../formatNestedMessages";
11
10
 
12
11
  test("i18n formatNestedMessages()", () => {
@@ -274,8 +274,10 @@ const messages = {
274
274
  "Additional content is content in the subject that you can choose in addition to the core material. Through the additional subject, you can immerse yourself in a topic or approach yourself in a different way.",
275
275
  youAreHere: "You are here",
276
276
  trait: {
277
- video: "Video",
277
+ audio: "Audio",
278
278
  h5p: "Interactive",
279
+ podcast: "Podcast",
280
+ video: "Video",
279
281
  },
280
282
  },
281
283
  messageBoxInfo: {
@@ -827,6 +829,7 @@ const messages = {
827
829
  pause: "Pause",
828
830
  download: "Download audio",
829
831
  reuse: "Use audio",
832
+ progressBar: "Progress bar",
830
833
  error: {
831
834
  url: "Error loading the audio.",
832
835
  caption: "Sorry, an error occurred while loading the audio.",
@@ -275,8 +275,10 @@ const messages = {
275
275
  "Tilleggsstoff er innhold i faget som du kan velge i tillegg til kjernestoffet. Gjennom tilleggsstoffet kan du fordype deg i et emne eller tilnærme deg emnet på en annen måte.",
276
276
  youAreHere: "Du er her",
277
277
  trait: {
278
- video: "Video",
278
+ audio: "Lyd",
279
279
  h5p: "Interaktiv",
280
+ podcast: "Podkast",
281
+ video: "Video",
280
282
  },
281
283
  },
282
284
  messageBoxInfo: {
@@ -828,6 +830,7 @@ const messages = {
828
830
  pause: "Pause",
829
831
  download: "Last ned lydfil",
830
832
  reuse: "Bruk lydfil",
833
+ progressBar: "Fremdriftsindikator",
831
834
  error: {
832
835
  url: "Feil ved lasting av lydfil.",
833
836
  caption: "Beklager, en feil oppstod ved lasting av lydfil.",
@@ -275,8 +275,10 @@ const messages = {
275
275
  "Tilleggsstoff er innhald du kan velje i tillegg til kjernestoffet. Gjennom dette kan du fordjupe deg i eit emne eller nærme deg emnet på ein annan måte.",
276
276
  youAreHere: "Du er her",
277
277
  trait: {
278
- video: "Video",
278
+ audio: "Lyd",
279
279
  h5p: "Interaktiv",
280
+ podcast: "Podkast",
281
+ video: "Video",
280
282
  },
281
283
  },
282
284
  messageBoxInfo: {
@@ -828,6 +830,7 @@ const messages = {
828
830
  pause: "Pause",
829
831
  download: "Last ned lydfil",
830
832
  reuse: "Bruk lydfil",
833
+ progressBar: "Framdriftsindikator",
831
834
  error: {
832
835
  url: "Feil ved lasting av lydfil.",
833
836
  caption: "Orsak, ein feil oppstod ved lasting av lydfil.",
@@ -275,8 +275,10 @@ const messages = {
275
275
  "Lassiávnnas lea sisdoallu fágas maid sáhtát lassin válljet guovddášávdnasii. Lassiávdnasa bokte sáhtát čiekŋudit iežat muhtin fáddái dahje lahkonaddat fáddái eará vugiin.",
276
276
  youAreHere: "Don leat dás",
277
277
  trait: {
278
- video: "Video",
278
+ audio: "Jietna",
279
279
  h5p: "Interaktiiva",
280
+ podcast: "Podkásta",
281
+ video: "Video",
280
282
  },
281
283
  },
282
284
  messageBoxInfo: {
@@ -829,6 +831,7 @@ const messages = {
829
831
  pause: "Boatkke",
830
832
  download: "Viečča jietnafiilla",
831
833
  reuse: "Geavat jietnafiilla",
834
+ progressBar: "Fremdriftsindikator",
832
835
  error: {
833
836
  url: "Boasttuvuohta jietnafiilla viežžamis.",
834
837
  caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis.",
@@ -274,8 +274,10 @@ const messages = {
274
274
  "Lissie-aamhtese lea faagesisvege maam maahtah lissine veeljedh jarnge-aamhtesasse. Maahtah veelebelaakan teemam goerehtidh jallh teemam jeatjahlaakan geatskanidh.",
275
275
  youAreHere: "Datne daesnie",
276
276
  trait: {
277
- video: "Videjove",
277
+ audio: "Tjoeje",
278
278
  h5p: "Interaktijve",
279
+ podcast: "Podkast",
280
+ video: "Videjove",
279
281
  },
280
282
  },
281
283
  messageBoxInfo: {
@@ -831,6 +833,7 @@ const messages = {
831
833
  pause: "Pause",
832
834
  download: "Veedtjh tjoeje-fijlem",
833
835
  reuse: "Nuhtjh tjoeje-fijlem",
836
+ progressBar: "Fremdriftsindikator",
834
837
  error: {
835
838
  url: "Fiejlie tjoeje-veedtjemisnie.",
836
839
  caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie.",