@ndla/ui 56.0.172-alpha.0 → 56.0.174-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 (267) hide show
  1. package/es/AnchorHeading/AnchorHeading.mjs +1 -1
  2. package/es/AnchorHeading/AnchorHeading.mjs.map +1 -1
  3. package/es/Article/Article.mjs +1 -8
  4. package/es/Article/Article.mjs.map +1 -1
  5. package/es/Article/ArticleByline.mjs +1 -1
  6. package/es/Article/ArticleByline.mjs.map +1 -1
  7. package/es/AudioPlayer/AudioPlayer.mjs +1 -1
  8. package/es/AudioPlayer/AudioPlayer.mjs.map +1 -1
  9. package/es/AudioPlayer/Controls.mjs +1 -1
  10. package/es/AudioPlayer/Controls.mjs.map +1 -1
  11. package/es/AudioPlayer/SpeechControl.mjs +1 -1
  12. package/es/AudioPlayer/SpeechControl.mjs.map +1 -1
  13. package/es/Breadcrumb/Breadcrumb.mjs +8 -1
  14. package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
  15. package/es/Breadcrumb/BreadcrumbItem.mjs +8 -1
  16. package/es/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  17. package/es/Breadcrumb/HomeBreadcrumb.mjs.map +1 -1
  18. package/es/CampaignBlock/CampaignBlock.mjs +1 -8
  19. package/es/CampaignBlock/CampaignBlock.mjs.map +1 -1
  20. package/es/CodeBlock/CodeBlock.mjs +1 -8
  21. package/es/CodeBlock/CodeBlock.mjs.map +1 -1
  22. package/es/Concept/Concept.mjs +1 -8
  23. package/es/Concept/Concept.mjs.map +1 -1
  24. package/es/ContactBlock/ContactBlock.mjs +0 -7
  25. package/es/ContactBlock/ContactBlock.mjs.map +1 -1
  26. package/es/Embed/AudioEmbed.mjs +1 -8
  27. package/es/Embed/AudioEmbed.mjs.map +1 -1
  28. package/es/Embed/BrightcoveEmbed.mjs +2 -9
  29. package/es/Embed/BrightcoveEmbed.mjs.map +1 -1
  30. package/es/Embed/CodeEmbed.mjs +1 -8
  31. package/es/Embed/CodeEmbed.mjs.map +1 -1
  32. package/es/Embed/ConceptEmbed.mjs +1 -8
  33. package/es/Embed/ConceptEmbed.mjs.map +1 -1
  34. package/es/Embed/ContentLinkEmbed.mjs.map +1 -1
  35. package/es/Embed/CopyrightEmbed.mjs.map +1 -1
  36. package/es/Embed/EmbedErrorPlaceholder.mjs +8 -1
  37. package/es/Embed/EmbedErrorPlaceholder.mjs.map +1 -1
  38. package/es/Embed/EmbedWrapper.mjs +1 -8
  39. package/es/Embed/EmbedWrapper.mjs.map +1 -1
  40. package/es/Embed/ExternalEmbed.mjs +1 -8
  41. package/es/Embed/ExternalEmbed.mjs.map +1 -1
  42. package/es/Embed/FootnoteEmbed.mjs +0 -7
  43. package/es/Embed/FootnoteEmbed.mjs.map +1 -1
  44. package/es/Embed/GlossEmbed.mjs +1 -8
  45. package/es/Embed/GlossEmbed.mjs.map +1 -1
  46. package/es/Embed/H5pEmbed.mjs +0 -7
  47. package/es/Embed/H5pEmbed.mjs.map +1 -1
  48. package/es/Embed/IframeEmbed.mjs +2 -9
  49. package/es/Embed/IframeEmbed.mjs.map +1 -1
  50. package/es/Embed/ImageEmbed.mjs +2 -9
  51. package/es/Embed/ImageEmbed.mjs.map +1 -1
  52. package/es/Embed/InlineTriggerButton.mjs +1 -1
  53. package/es/Embed/InlineTriggerButton.mjs.map +1 -1
  54. package/es/Embed/RelatedContentEmbed.mjs +0 -7
  55. package/es/Embed/RelatedContentEmbed.mjs.map +1 -1
  56. package/es/Embed/UnknownEmbed.mjs +0 -7
  57. package/es/Embed/UnknownEmbed.mjs.map +1 -1
  58. package/es/Embed/UuDisclaimerEmbed.mjs +1 -1
  59. package/es/Embed/UuDisclaimerEmbed.mjs.map +1 -1
  60. package/es/FactBox/FactBox.mjs +1 -1
  61. package/es/FactBox/FactBox.mjs.map +1 -1
  62. package/es/FileList/File.mjs +1 -1
  63. package/es/FileList/File.mjs.map +1 -1
  64. package/es/FileList/FileList.mjs +8 -1
  65. package/es/FileList/FileList.mjs.map +1 -1
  66. package/es/Gloss/Gloss.mjs +1 -8
  67. package/es/Gloss/Gloss.mjs.map +1 -1
  68. package/es/Gloss/GlossExample.mjs +1 -8
  69. package/es/Gloss/GlossExample.mjs.map +1 -1
  70. package/es/Grid/Grid.mjs +1 -1
  71. package/es/Grid/Grid.mjs.map +1 -1
  72. package/es/KeyFigure/KeyFigure.mjs.map +1 -1
  73. package/es/LicenseByline/EmbedByline.mjs +1 -8
  74. package/es/LicenseByline/EmbedByline.mjs.map +1 -1
  75. package/es/LicenseByline/LicenseLink.mjs +1 -8
  76. package/es/LicenseByline/LicenseLink.mjs.map +1 -1
  77. package/es/LinkBlock/LinkBlock.mjs +1 -8
  78. package/es/LinkBlock/LinkBlock.mjs.map +1 -1
  79. package/es/LinkBlock/LinkBlockSection.mjs +1 -1
  80. package/es/LinkBlock/LinkBlockSection.mjs.map +1 -1
  81. package/es/Pitch/Pitch.mjs.map +1 -1
  82. package/es/RelatedArticleList/RelatedArticleList.mjs +1 -1
  83. package/es/RelatedArticleList/RelatedArticleList.mjs.map +1 -1
  84. package/es/TagSelector/TagSelector.mjs +1 -1
  85. package/es/TagSelector/TagSelector.mjs.map +1 -1
  86. package/es/ZendeskButton/ZendeskButton.mjs +1 -1
  87. package/es/ZendeskButton/ZendeskButton.mjs.map +1 -1
  88. package/es/i18n/useComponentTranslations.mjs +0 -7
  89. package/es/i18n/useComponentTranslations.mjs.map +1 -1
  90. package/es/model/ContentType.mjs +8 -1
  91. package/es/model/ContentType.mjs.map +1 -1
  92. package/lib/AnchorHeading/AnchorHeading.js +1 -1
  93. package/lib/AnchorHeading/AnchorHeading.js.map +1 -1
  94. package/lib/Article/Article.d.ts +1 -1
  95. package/lib/Article/Article.js +1 -8
  96. package/lib/Article/Article.js.map +1 -1
  97. package/lib/Article/ArticleByline.d.ts +1 -1
  98. package/lib/Article/ArticleByline.js +1 -1
  99. package/lib/Article/ArticleByline.js.map +1 -1
  100. package/lib/AudioPlayer/AudioPlayer.js +1 -1
  101. package/lib/AudioPlayer/AudioPlayer.js.map +1 -1
  102. package/lib/AudioPlayer/Controls.js +1 -1
  103. package/lib/AudioPlayer/Controls.js.map +1 -1
  104. package/lib/AudioPlayer/SpeechControl.js +1 -1
  105. package/lib/AudioPlayer/SpeechControl.js.map +1 -1
  106. package/lib/Breadcrumb/Breadcrumb.js +1 -1
  107. package/lib/Breadcrumb/Breadcrumb.js.map +1 -1
  108. package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
  109. package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -1
  110. package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -1
  111. package/lib/CampaignBlock/CampaignBlock.js +1 -8
  112. package/lib/CampaignBlock/CampaignBlock.js.map +1 -1
  113. package/lib/CodeBlock/CodeBlock.d.ts +1 -1
  114. package/lib/CodeBlock/CodeBlock.js +1 -8
  115. package/lib/CodeBlock/CodeBlock.js.map +1 -1
  116. package/lib/Concept/Concept.d.ts +1 -1
  117. package/lib/Concept/Concept.js +1 -8
  118. package/lib/Concept/Concept.js.map +1 -1
  119. package/lib/ContactBlock/ContactBlock.js +0 -7
  120. package/lib/ContactBlock/ContactBlock.js.map +1 -1
  121. package/lib/Embed/AudioEmbed.js +1 -8
  122. package/lib/Embed/AudioEmbed.js.map +1 -1
  123. package/lib/Embed/BrightcoveEmbed.js +2 -9
  124. package/lib/Embed/BrightcoveEmbed.js.map +1 -1
  125. package/lib/Embed/CodeEmbed.js +1 -8
  126. package/lib/Embed/CodeEmbed.js.map +1 -1
  127. package/lib/Embed/ConceptEmbed.d.ts +1 -1
  128. package/lib/Embed/ConceptEmbed.js +1 -8
  129. package/lib/Embed/ConceptEmbed.js.map +1 -1
  130. package/lib/Embed/ContentLinkEmbed.d.ts +1 -1
  131. package/lib/Embed/ContentLinkEmbed.js.map +1 -1
  132. package/lib/Embed/CopyrightEmbed.d.ts +1 -1
  133. package/lib/Embed/CopyrightEmbed.js.map +1 -1
  134. package/lib/Embed/EmbedErrorPlaceholder.d.ts +1 -1
  135. package/lib/Embed/EmbedErrorPlaceholder.js +1 -1
  136. package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -1
  137. package/lib/Embed/EmbedWrapper.d.ts +1 -1
  138. package/lib/Embed/EmbedWrapper.js +1 -8
  139. package/lib/Embed/EmbedWrapper.js.map +1 -1
  140. package/lib/Embed/ExternalEmbed.js +1 -8
  141. package/lib/Embed/ExternalEmbed.js.map +1 -1
  142. package/lib/Embed/FootnoteEmbed.js +0 -7
  143. package/lib/Embed/FootnoteEmbed.js.map +1 -1
  144. package/lib/Embed/GlossEmbed.d.ts +1 -1
  145. package/lib/Embed/GlossEmbed.js +1 -8
  146. package/lib/Embed/GlossEmbed.js.map +1 -1
  147. package/lib/Embed/H5pEmbed.js +0 -7
  148. package/lib/Embed/H5pEmbed.js.map +1 -1
  149. package/lib/Embed/IframeEmbed.js +2 -9
  150. package/lib/Embed/IframeEmbed.js.map +1 -1
  151. package/lib/Embed/ImageEmbed.d.ts +1 -1
  152. package/lib/Embed/ImageEmbed.js +2 -9
  153. package/lib/Embed/ImageEmbed.js.map +1 -1
  154. package/lib/Embed/InlineTriggerButton.js +1 -1
  155. package/lib/Embed/InlineTriggerButton.js.map +1 -1
  156. package/lib/Embed/RelatedContentEmbed.js +0 -7
  157. package/lib/Embed/RelatedContentEmbed.js.map +1 -1
  158. package/lib/Embed/UnknownEmbed.js +0 -7
  159. package/lib/Embed/UnknownEmbed.js.map +1 -1
  160. package/lib/Embed/UuDisclaimerEmbed.d.ts +1 -1
  161. package/lib/Embed/UuDisclaimerEmbed.js +1 -8
  162. package/lib/Embed/UuDisclaimerEmbed.js.map +1 -1
  163. package/lib/Embed/types.d.ts +1 -1
  164. package/lib/FactBox/FactBox.js +2 -2
  165. package/lib/FactBox/FactBox.js.map +1 -1
  166. package/lib/FileList/File.js +1 -1
  167. package/lib/FileList/File.js.map +1 -1
  168. package/lib/FileList/FileList.js +1 -1
  169. package/lib/FileList/FileList.js.map +1 -1
  170. package/lib/Gloss/Gloss.js +1 -8
  171. package/lib/Gloss/Gloss.js.map +1 -1
  172. package/lib/Gloss/GlossExample.js +1 -8
  173. package/lib/Gloss/GlossExample.js.map +1 -1
  174. package/lib/Grid/Grid.d.ts +1 -1
  175. package/lib/Grid/Grid.js +1 -8
  176. package/lib/Grid/Grid.js.map +1 -1
  177. package/lib/KeyFigure/KeyFigure.js.map +1 -1
  178. package/lib/LicenseByline/EmbedByline.d.ts +1 -1
  179. package/lib/LicenseByline/EmbedByline.js +1 -8
  180. package/lib/LicenseByline/EmbedByline.js.map +1 -1
  181. package/lib/LicenseByline/LicenseLink.js +1 -8
  182. package/lib/LicenseByline/LicenseLink.js.map +1 -1
  183. package/lib/LinkBlock/LinkBlock.js +1 -8
  184. package/lib/LinkBlock/LinkBlock.js.map +1 -1
  185. package/lib/LinkBlock/LinkBlockSection.js +1 -1
  186. package/lib/LinkBlock/LinkBlockSection.js.map +1 -1
  187. package/lib/Pitch/Pitch.js.map +1 -1
  188. package/lib/RelatedArticleList/RelatedArticleList.js +1 -1
  189. package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -1
  190. package/lib/TagSelector/TagSelector.js +1 -1
  191. package/lib/TagSelector/TagSelector.js.map +1 -1
  192. package/lib/ZendeskButton/ZendeskButton.js +1 -1
  193. package/lib/ZendeskButton/ZendeskButton.js.map +1 -1
  194. package/lib/i18n/useComponentTranslations.js +0 -7
  195. package/lib/i18n/useComponentTranslations.js.map +1 -1
  196. package/lib/model/ContentType.d.ts +5 -0
  197. package/lib/model/ContentType.js +8 -1
  198. package/lib/model/ContentType.js.map +1 -1
  199. package/lib/model/index.d.ts +2 -0
  200. package/package.json +9 -9
  201. package/src/AnchorHeading/AnchorHeading.tsx +1 -1
  202. package/src/Article/Article.tsx +2 -2
  203. package/src/Article/ArticleByline.stories.tsx +0 -1
  204. package/src/Article/ArticleByline.tsx +3 -3
  205. package/src/AudioPlayer/AudioPlayer.tsx +2 -2
  206. package/src/AudioPlayer/Controls.tsx +2 -2
  207. package/src/AudioPlayer/SpeechControl.tsx +2 -2
  208. package/src/Breadcrumb/Breadcrumb.tsx +1 -1
  209. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
  210. package/src/Breadcrumb/HomeBreadcrumb.tsx +1 -1
  211. package/src/CampaignBlock/CampaignBlock.tsx +3 -3
  212. package/src/CodeBlock/CodeBlock.tsx +2 -2
  213. package/src/Concept/Concept.stories.tsx +1 -1
  214. package/src/Concept/Concept.tsx +3 -3
  215. package/src/ContactBlock/ContactBlock.tsx +3 -3
  216. package/src/Embed/AudioEmbed.stories.tsx +2 -2
  217. package/src/Embed/AudioEmbed.tsx +2 -2
  218. package/src/Embed/BrightcoveEmbed.stories.tsx +2 -2
  219. package/src/Embed/BrightcoveEmbed.tsx +4 -4
  220. package/src/Embed/CodeEmbed.stories.tsx +1 -1
  221. package/src/Embed/CodeEmbed.tsx +4 -4
  222. package/src/Embed/ConceptEmbed.stories.tsx +2 -2
  223. package/src/Embed/ConceptEmbed.tsx +5 -5
  224. package/src/Embed/ContentLinkEmbed.tsx +2 -2
  225. package/src/Embed/CopyrightEmbed.tsx +1 -1
  226. package/src/Embed/EmbedErrorPlaceholder.tsx +1 -1
  227. package/src/Embed/EmbedWrapper.tsx +2 -2
  228. package/src/Embed/ExternalEmbed.stories.tsx +2 -2
  229. package/src/Embed/ExternalEmbed.tsx +4 -4
  230. package/src/Embed/FootnoteEmbed.stories.tsx +2 -2
  231. package/src/Embed/FootnoteEmbed.tsx +2 -2
  232. package/src/Embed/GlossEmbed.stories.tsx +2 -2
  233. package/src/Embed/GlossEmbed.tsx +3 -3
  234. package/src/Embed/H5pEmbed.stories.tsx +2 -2
  235. package/src/Embed/H5pEmbed.tsx +2 -2
  236. package/src/Embed/IframeEmbed.stories.tsx +2 -2
  237. package/src/Embed/IframeEmbed.tsx +5 -5
  238. package/src/Embed/ImageEmbed.stories.tsx +4 -4
  239. package/src/Embed/ImageEmbed.tsx +5 -5
  240. package/src/Embed/InlineTriggerButton.tsx +1 -1
  241. package/src/Embed/RelatedContentEmbed.stories.tsx +2 -2
  242. package/src/Embed/RelatedContentEmbed.tsx +1 -1
  243. package/src/Embed/UnknownEmbed.tsx +2 -2
  244. package/src/Embed/UuDisclaimerEmbed.stories.tsx +4 -4
  245. package/src/Embed/UuDisclaimerEmbed.tsx +3 -3
  246. package/src/Embed/types.ts +1 -1
  247. package/src/FactBox/FactBox.tsx +3 -3
  248. package/src/FileList/File.tsx +2 -2
  249. package/src/FileList/FileList.tsx +1 -1
  250. package/src/Gloss/Gloss.stories.tsx +1 -1
  251. package/src/Gloss/Gloss.tsx +6 -6
  252. package/src/Gloss/GlossExample.tsx +2 -2
  253. package/src/Grid/Grid.stories.tsx +1 -1
  254. package/src/Grid/Grid.tsx +2 -2
  255. package/src/KeyFigure/KeyFigure.tsx +1 -1
  256. package/src/LicenseByline/EmbedByline.tsx +6 -6
  257. package/src/LicenseByline/LicenseLink.tsx +1 -1
  258. package/src/LinkBlock/LinkBlock.tsx +3 -3
  259. package/src/LinkBlock/LinkBlockSection.tsx +1 -1
  260. package/src/Pitch/Pitch.stories.tsx +1 -1
  261. package/src/Pitch/Pitch.tsx +1 -1
  262. package/src/RelatedArticleList/RelatedArticleList.tsx +2 -2
  263. package/src/TagSelector/TagSelector.stories.tsx +3 -4
  264. package/src/TagSelector/TagSelector.tsx +1 -1
  265. package/src/ZendeskButton/ZendeskButton.tsx +1 -1
  266. package/src/i18n/useComponentTranslations.ts +2 -2
  267. package/src/model/ContentType.ts +7 -0
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useEffect, useRef } from "react";
10
- import { useTranslation } from "react-i18next";
9
+ import type { OembedMetaData } from "@ndla/types-embed";
11
10
  import { Figure } from "@ndla/primitives";
12
11
  import { styled } from "@ndla/styled-system/jsx";
13
- import type { OembedMetaData } from "@ndla/types-embed";
14
- import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
12
+ import { useEffect, useRef } from "react";
13
+ import { useTranslation } from "react-i18next";
15
14
  import { ResourceBox } from "../ResourceBox/ResourceBox";
15
+ import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
16
16
 
17
17
  interface Props {
18
18
  embed: OembedMetaData;
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
9
  import type { FootnoteData, FootnoteEmbedData } from "@ndla/types-embed";
11
- import { FootnoteEmbed } from "./FootnoteEmbed";
10
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
12
11
  import { ArticleByline } from "../Article/ArticleByline";
12
+ import { FootnoteEmbed } from "./FootnoteEmbed";
13
13
 
14
14
  /**
15
15
  * Kildehenvisninger benytter [APA-stilen](https://sokogskriv.no/kildebruk-og-referanser/referansestiler/apa-6th/) for utlistning nederst på siden.
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useTranslation } from "react-i18next";
10
- import { styled } from "@ndla/styled-system/jsx";
11
9
  import type { FootnoteMetaData } from "@ndla/types-embed";
10
+ import { styled } from "@ndla/styled-system/jsx";
11
+ import { useTranslation } from "react-i18next";
12
12
 
13
13
  interface Props {
14
14
  embed: FootnoteMetaData;
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { Meta, StoryObj } from "@storybook/react";
10
9
  import type { ConceptData, ConceptEmbedData } from "@ndla/types-embed";
11
- import { GlossEmbed } from "./GlossEmbed";
10
+ import type { Meta, StoryObj } from "@storybook/react";
12
11
  import { wordClass } from "../model/WordClass";
12
+ import { GlossEmbed } from "./GlossEmbed";
13
13
 
14
14
  const glossBlockEmbedData: ConceptEmbedData = {
15
15
  contentId: "4942",
@@ -6,14 +6,14 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useRef, type ReactNode } from "react";
9
+ import type { ConceptMetaData } from "@ndla/types-embed";
10
10
  import { Portal } from "@ark-ui/react";
11
11
  import { Figure, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
- import type { ConceptMetaData } from "@ndla/types-embed";
13
+ import { useRef, type ReactNode } from "react";
14
+ import { Gloss } from "../Gloss/Gloss";
14
15
  import { ConceptInlineTriggerButton } from "./ConceptInlineTriggerButton";
15
16
  import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
16
- import { Gloss } from "../Gloss/Gloss";
17
17
 
18
18
  interface Props {
19
19
  embed: ConceptMetaData;
@@ -6,11 +6,11 @@
6
6
  *
7
7
  */
8
8
 
9
+ import type { H5pEmbedData, H5pData } from "@ndla/types-embed";
9
10
  import type { Meta, StoryObj } from "@storybook/react";
10
11
  import { PageContent } from "@ndla/primitives";
11
- import type { H5pEmbedData, H5pData } from "@ndla/types-embed";
12
- import { H5pEmbed } from "./H5pEmbed";
13
12
  import { ArticleWrapper, ArticleContent } from "../Article/Article";
13
+ import { H5pEmbed } from "./H5pEmbed";
14
14
 
15
15
  const embedData: H5pEmbedData = {
16
16
  resource: "h5p",
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useTranslation } from "react-i18next";
9
+ import type { H5pMetaData } from "@ndla/types-embed";
10
10
  import { Figure } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
- import type { H5pMetaData } from "@ndla/types-embed";
12
+ import { useTranslation } from "react-i18next";
13
13
  import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
14
14
 
15
15
  interface Props {
@@ -6,11 +6,11 @@
6
6
  *
7
7
  */
8
8
 
9
+ import type { IframeData, IframeEmbedData } from "@ndla/types-embed";
9
10
  import type { Meta, StoryObj } from "@storybook/react";
10
11
  import { PageContent } from "@ndla/primitives";
11
- import type { IframeData, IframeEmbedData } from "@ndla/types-embed";
12
- import { IframeEmbed } from "./IframeEmbed";
13
12
  import { ArticleWrapper, ArticleContent } from "../Article/Article";
13
+ import { IframeEmbed } from "./IframeEmbed";
14
14
 
15
15
  const embedData: IframeEmbedData = {
16
16
  width: "708px",
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useEffect, useRef } from "react";
10
- import { useTranslation } from "react-i18next";
9
+ import type { IframeMetaData } from "@ndla/types-embed";
11
10
  import { Figure } from "@ndla/primitives";
12
11
  import { styled } from "@ndla/styled-system/jsx";
13
- import type { IframeMetaData } from "@ndla/types-embed";
14
- import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
12
+ import { useEffect, useRef } from "react";
13
+ import { useTranslation } from "react-i18next";
15
14
  import { ResourceBox } from "../ResourceBox/ResourceBox";
15
+ import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
16
16
 
17
17
  interface Props {
18
18
  embed: IframeMetaData;
@@ -83,7 +83,7 @@ export const IframeEmbed = ({ embed }: Props) => {
83
83
  src={url}
84
84
  width={strippedWidth}
85
85
  height={strippedHeight}
86
- allow="fullscreen; encrypted-media"
86
+ allow="autoplay; encrypted-media; fullscreen"
87
87
  loading="lazy"
88
88
  />
89
89
  </StyledFigure>
@@ -6,15 +6,15 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { ReactNode } from "react";
9
+ import type { ImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
10
+ import type { ImageEmbedData } from "@ndla/types-embed";
10
11
  import type { Meta, StoryFn, StoryObj } from "@storybook/react";
12
+ import type { ReactNode } from "react";
11
13
  import { PageContent, Text } from "@ndla/primitives";
12
14
  import { styled } from "@ndla/styled-system/jsx";
13
- import type { ImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
14
- import type { ImageEmbedData } from "@ndla/types-embed";
15
- import { ImageEmbed } from "./ImageEmbed";
16
15
  import { ArticleWrapper, ArticleContent } from "../Article/Article";
17
16
  import { Grid } from "../Grid/Grid";
17
+ import { ImageEmbed } from "./ImageEmbed";
18
18
 
19
19
  const embedData: ImageEmbedData = {
20
20
  resource: "image",
@@ -6,17 +6,17 @@
6
6
  *
7
7
  */
8
8
 
9
- import parse from "html-react-parser";
10
- import { type ReactNode, useMemo, useState } from "react";
11
- import { useTranslation } from "react-i18next";
9
+ import type { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
12
10
  import { AddLine } from "@ndla/icons";
13
11
  import { Figure, type FigureSize, type FigureVariantProps, Image } from "@ndla/primitives";
14
12
  import { styled } from "@ndla/styled-system/jsx";
15
- import type { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
16
- import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
13
+ import parse from "html-react-parser";
14
+ import { type ReactNode, useMemo, useState } from "react";
15
+ import { useTranslation } from "react-i18next";
17
16
  import type { RenderContext } from "./types";
18
17
  import { EmbedByline } from "../LicenseByline/EmbedByline";
19
18
  import { licenseAttributes } from "../utils/licenseAttributes";
19
+ import { EmbedErrorPlaceholder } from "./EmbedErrorPlaceholder";
20
20
 
21
21
  interface Props {
22
22
  embed: ImageMetaData;
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ComponentPropsWithRef, type KeyboardEvent, forwardRef, useCallback, useRef } from "react";
10
9
  import { styled } from "@ndla/styled-system/jsx";
11
10
  import { composeRefs } from "@ndla/util";
11
+ import { type ComponentPropsWithRef, type KeyboardEvent, forwardRef, useCallback, useRef } from "react";
12
12
 
13
13
  const StyledSpan = styled("span", { base: {} });
14
14
 
@@ -6,12 +6,12 @@
6
6
  *
7
7
  */
8
8
 
9
+ import type { RelatedContentMetaData } from "@ndla/types-embed";
9
10
  import type { Meta, StoryObj } from "@storybook/react";
10
11
  import { PageContent } from "@ndla/primitives";
11
- import type { RelatedContentMetaData } from "@ndla/types-embed";
12
- import { RelatedContentEmbed } from "./RelatedContentEmbed";
13
12
  import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
13
  import { RelatedArticleList } from "../RelatedArticleList/RelatedArticleList";
14
+ import { RelatedContentEmbed } from "./RelatedContentEmbed";
15
15
 
16
16
  const filmResourceMeta: RelatedContentMetaData = {
17
17
  resource: "related-content",
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useTranslation } from "react-i18next";
10
9
  import type { RelatedContentMetaData } from "@ndla/types-embed";
10
+ import { useTranslation } from "react-i18next";
11
11
  import { RelatedArticle } from "../RelatedArticleList/RelatedArticleList";
12
12
 
13
13
  interface Props {
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useTranslation } from "react-i18next";
10
- import { Text } from "@ndla/primitives";
11
9
  import type { MetaData } from "@ndla/types-embed";
10
+ import { Text } from "@ndla/primitives";
11
+ import { useTranslation } from "react-i18next";
12
12
 
13
13
  interface Props {
14
14
  embed: MetaData<any, any>;
@@ -6,15 +6,15 @@
6
6
  *
7
7
  */
8
8
 
9
+ import type { UUDisclaimerData, UuDisclaimerEmbedData } from "@ndla/types-embed";
9
10
  import type { Meta, StoryObj } from "@storybook/react";
10
11
  import { ExpandableBox, ExpandableBoxSummary, FramedContent, PageContent } from "@ndla/primitives";
11
- import type { UUDisclaimerData, UuDisclaimerEmbedData } from "@ndla/types-embed";
12
+ import { AnchorHeading } from "../AnchorHeading/AnchorHeading";
13
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
+ import { FactBox } from "../FactBox/FactBox";
12
15
  import { H5pEmbed } from "./H5pEmbed";
13
16
  import { IframeEmbed } from "./IframeEmbed";
14
17
  import { UuDisclaimerEmbed } from "./UuDisclaimerEmbed";
15
- import { ArticleWrapper, ArticleContent } from "../Article/Article";
16
- import { AnchorHeading } from "../AnchorHeading/AnchorHeading";
17
- import { FactBox } from "../FactBox/FactBox";
18
18
 
19
19
  const embedData: UuDisclaimerEmbedData = {
20
20
  resource: "uu-disclaimer",
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ReactNode } from "react";
10
- import { useTranslation } from "react-i18next";
9
+ import type { UuDisclaimerMetaData } from "@ndla/types-embed";
11
10
  import { Portal } from "@ark-ui/react";
12
11
  import { AccessibilityFill, ErrorWarningFill } from "@ndla/icons";
13
12
  import { IconButton, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
14
13
  import { styled } from "@ndla/styled-system/jsx";
15
- import type { UuDisclaimerMetaData } from "@ndla/types-embed";
14
+ import { type ReactNode } from "react";
15
+ import { useTranslation } from "react-i18next";
16
16
 
17
17
  interface Props {
18
18
  embed: UuDisclaimerMetaData;
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import type { ElementType } from "react";
10
9
  import type { ImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
11
10
  import type { EmbedMetaData } from "@ndla/types-embed";
11
+ import type { ElementType } from "react";
12
12
 
13
13
  export type HeartButtonType = ElementType<{
14
14
  embed: Extract<EmbedMetaData, { status: "success" }>;
@@ -6,6 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
+ import { ArrowDownShortLine } from "@ndla/icons";
10
+ import { IconButton } from "@ndla/primitives";
11
+ import { styled } from "@ndla/styled-system/jsx";
9
12
  import React, {
10
13
  type ComponentProps,
11
14
  type ReactNode,
@@ -17,9 +20,6 @@ import React, {
17
20
  useState,
18
21
  } from "react";
19
22
  import { useTranslation } from "react-i18next";
20
- import { ArrowDownShortLine } from "@ndla/icons";
21
- import { IconButton } from "@ndla/primitives";
22
- import { styled } from "@ndla/styled-system/jsx";
23
23
 
24
24
  interface Props extends ComponentProps<"aside"> {
25
25
  children?: ReactNode;
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ComponentPropsWithRef, forwardRef } from "react";
10
- import { useTranslation } from "react-i18next";
11
9
  import { DownloadLine } from "@ndla/icons";
12
10
  import { Text } from "@ndla/primitives";
13
11
  import { SafeLink } from "@ndla/safelink";
14
12
  import { styled } from "@ndla/styled-system/jsx";
15
13
  import { linkOverlay } from "@ndla/styled-system/patterns";
14
+ import { type ComponentPropsWithRef, forwardRef } from "react";
15
+ import { useTranslation } from "react-i18next";
16
16
  import { FileListItem } from "./FileList";
17
17
 
18
18
  export interface FileProps extends ComponentPropsWithRef<"div"> {
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ComponentPropsWithoutRef } from "react";
10
9
  import { ark } from "@ark-ui/react";
11
10
  import { styled } from "@ndla/styled-system/jsx";
11
+ import { type ComponentPropsWithoutRef } from "react";
12
12
 
13
13
  interface Props extends ComponentPropsWithoutRef<"ul"> {}
14
14
 
@@ -7,9 +7,9 @@
7
7
  */
8
8
 
9
9
  import type { Meta, StoryObj, StoryFn } from "@storybook/react";
10
+ import { wordClass } from "../model/WordClass";
10
11
  import { Gloss } from "./Gloss";
11
12
  import { GlossExample } from "./GlossExample";
12
- import { wordClass } from "../model/WordClass";
13
13
 
14
14
  const meta: Meta<typeof Gloss> = {
15
15
  title: "Components/Gloss",
@@ -6,9 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import parse from "html-react-parser";
10
- import { useMemo } from "react";
11
- import { useTranslation } from "react-i18next";
9
+ import type { StyledVariantProps } from "@ndla/styled-system/types";
10
+ import type { ConceptTitleDTO, GlossDataDTO, GlossExampleDTO } from "@ndla/types-backend/concept-api";
12
11
  import { AccordionItemTrigger } from "@ark-ui/react";
13
12
  import { ArrowDownShortLine } from "@ndla/icons";
14
13
  import {
@@ -20,10 +19,11 @@ import {
20
19
  Text,
21
20
  } from "@ndla/primitives";
22
21
  import { styled } from "@ndla/styled-system/jsx";
23
- import type { StyledVariantProps } from "@ndla/styled-system/types";
24
- import type { ConceptTitleDTO, GlossDataDTO, GlossExampleDTO } from "@ndla/types-backend/concept-api";
25
- import { GlossExample } from "./GlossExample";
22
+ import parse from "html-react-parser";
23
+ import { useMemo } from "react";
24
+ import { useTranslation } from "react-i18next";
26
25
  import { SpeechControl } from "../AudioPlayer/SpeechControl";
26
+ import { GlossExample } from "./GlossExample";
27
27
 
28
28
  // TODO: Figure out padding between bordered and simple variant.
29
29
  // The design says that the content above the accordion content should have enough padding to align with the accordion content.
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Fragment } from "react";
9
+ import type { GlossExampleDTO } from "@ndla/types-backend/concept-api";
10
10
  import { Text } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
- import type { GlossExampleDTO } from "@ndla/types-backend/concept-api";
12
+ import { Fragment } from "react";
13
13
 
14
14
  interface Props {
15
15
  examples: GlossExampleDTO[];
@@ -9,9 +9,9 @@
9
9
  import type { Meta, StoryFn } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import { ArticleContent, ArticleWrapper } from "@ndla/ui";
12
- import { Grid, GridItem } from "./Grid";
13
12
  import { Plain } from "../KeyFigure/KeyFigure.stories";
14
13
  import { Default as PitchStory } from "../Pitch/Pitch.stories";
14
+ import { Grid, GridItem } from "./Grid";
15
15
 
16
16
  export default {
17
17
  title: "Components/Grid",
package/src/Grid/Grid.tsx CHANGED
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ComponentProps, type ReactNode } from "react";
10
- import { styled } from "@ndla/styled-system/jsx";
11
9
  import type { StyledVariantProps } from "@ndla/styled-system/types";
10
+ import { styled } from "@ndla/styled-system/jsx";
11
+ import { type ComponentProps, type ReactNode } from "react";
12
12
 
13
13
  const GridContainer = styled("div", {
14
14
  base: {
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import parse from "html-react-parser";
10
9
  import { styled } from "@ndla/styled-system/jsx";
10
+ import parse from "html-react-parser";
11
11
 
12
12
  const ContentWrapper = styled("div", {
13
13
  base: {
@@ -6,17 +6,17 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type Dispatch, type ReactNode, type SetStateAction, useState } from "react";
10
- import { useTranslation } from "react-i18next";
11
- import { AlertLine } from "@ndla/icons";
12
- import { getLicenseByAbbreviation } from "@ndla/licenses";
13
- import { Button, Text } from "@ndla/primitives";
14
- import { styled } from "@ndla/styled-system/jsx";
15
9
  import type { CopyrightDTO as ArticleCopyright } from "@ndla/types-backend/article-api";
16
10
  import type { CopyrightDTO as AudioCopyright } from "@ndla/types-backend/audio-api";
17
11
  import type { DraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
18
12
  import type { CopyrightDTO as ImageCopyright } from "@ndla/types-backend/image-api";
19
13
  import type { BrightcoveCopyright } from "@ndla/types-embed";
14
+ import { AlertLine } from "@ndla/icons";
15
+ import { getLicenseByAbbreviation } from "@ndla/licenses";
16
+ import { Button, Text } from "@ndla/primitives";
17
+ import { styled } from "@ndla/styled-system/jsx";
18
+ import { type Dispatch, type ReactNode, type SetStateAction, useState } from "react";
19
+ import { useTranslation } from "react-i18next";
20
20
  import { LicenseLink } from "./LicenseLink";
21
21
 
22
22
  interface BaseProps {
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import { forwardRef } from "react";
10
9
  import type { LicenseLocaleType } from "@ndla/licenses";
11
10
  import { SafeLink, type SafeLinkProps } from "@ndla/safelink";
12
11
  import { styled } from "@ndla/styled-system/jsx";
12
+ import { forwardRef } from "react";
13
13
 
14
14
  interface Props extends Omit<SafeLinkProps, "to"> {
15
15
  license: LicenseLocaleType;
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import parse from "html-react-parser";
10
- import { useMemo } from "react";
9
+ import type { LinkBlockEmbedData } from "@ndla/types-embed";
11
10
  import { ArrowRightLine, CalendarLine } from "@ndla/icons";
12
11
  import { Heading } from "@ndla/primitives";
13
12
  import { SafeLink } from "@ndla/safelink";
14
13
  import { styled } from "@ndla/styled-system/jsx";
15
- import type { LinkBlockEmbedData } from "@ndla/types-embed";
14
+ import parse from "html-react-parser";
15
+ import { useMemo } from "react";
16
16
  import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
17
17
 
18
18
  const InfoWrapper = styled("div", {
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Children, type HTMLAttributes, type ReactNode } from "react";
10
9
  import { styled } from "@ndla/styled-system/jsx";
10
+ import { Children, type HTMLAttributes, type ReactNode } from "react";
11
11
 
12
12
  interface Props extends HTMLAttributes<HTMLElement> {
13
13
  children: ReactNode;
@@ -8,9 +8,9 @@
8
8
 
9
9
  import type { Meta } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
- import { Pitch, type Props } from "./Pitch";
12
11
  import { ArticleContent, ArticleWrapper } from "../Article/Article";
13
12
  import { Grid } from "../Grid/Grid";
13
+ import { Pitch, type Props } from "./Pitch";
14
14
 
15
15
  const args: Props = {
16
16
  title: "Min pitch",
@@ -6,11 +6,11 @@
6
6
  *
7
7
  */
8
8
 
9
- import parse from "html-react-parser";
10
9
  import { CardHeading, CardImage, CardRoot, Text } from "@ndla/primitives";
11
10
  import { SafeLink } from "@ndla/safelink";
12
11
  import { styled } from "@ndla/styled-system/jsx";
13
12
  import { linkOverlay } from "@ndla/styled-system/patterns";
13
+ import parse from "html-react-parser";
14
14
  import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
15
15
 
16
16
  export interface Props {
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Children, type ComponentPropsWithoutRef, type ReactElement, type ReactNode, useMemo, useState } from "react";
10
- import { useTranslation } from "react-i18next";
11
9
  import { ExternalLinkLine } from "@ndla/icons";
12
10
  import { CardContent, CardHeading, CardRoot, Text, Heading, Button } from "@ndla/primitives";
13
11
  import { SafeLink } from "@ndla/safelink";
14
12
  import { styled } from "@ndla/styled-system/jsx";
15
13
  import { linkOverlay } from "@ndla/styled-system/patterns";
14
+ import { Children, type ComponentPropsWithoutRef, type ReactElement, type ReactNode, useMemo, useState } from "react";
15
+ import { useTranslation } from "react-i18next";
16
16
  import type { HeadingLevel } from "../types";
17
17
 
18
18
  interface RelatedArticleProps {
@@ -6,10 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useState } from "react";
10
- import { type ComboboxInputValueChangeDetails, createListCollection } from "@ark-ui/react";
11
-
12
9
  import type { Meta, StoryFn } from "@storybook/react";
10
+ import { type ComboboxInputValueChangeDetails, createListCollection } from "@ark-ui/react";
13
11
  import { CloseLine, ArrowDownShortLine, CheckLine } from "@ndla/icons";
14
12
  import {
15
13
  ComboboxContent,
@@ -21,6 +19,8 @@ import {
21
19
  InputContainer,
22
20
  } from "@ndla/primitives";
23
21
  import { HStack } from "@ndla/styled-system/jsx";
22
+ import { useState } from "react";
23
+ import { useTagSelectorTranslations } from "../i18n/useComponentTranslations";
24
24
  import {
25
25
  TagSelectorClearTrigger,
26
26
  TagSelectorControl,
@@ -29,7 +29,6 @@ import {
29
29
  TagSelectorRoot,
30
30
  TagSelectorTrigger,
31
31
  } from "./TagSelector";
32
- import { useTagSelectorTranslations } from "../i18n/useComponentTranslations";
33
32
 
34
33
  export default {
35
34
  title: "Components/TagSelector",
@@ -6,7 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import { forwardRef, useEffect, useId, useRef } from "react";
10
9
  import { type CollectionItem, useTagsInputContext, useComboboxContext } from "@ark-ui/react";
11
10
  import { CloseLine } from "@ndla/icons";
12
11
  import {
@@ -32,6 +31,7 @@ import {
32
31
  TagsInputItemInput,
33
32
  } from "@ndla/primitives";
34
33
  import { contains } from "@ndla/util";
34
+ import { forwardRef, useEffect, useId, useRef } from "react";
35
35
 
36
36
  export type TagSelectorRootProps<T extends CollectionItem> = ComboboxRootProps<T> & TagsInputRootProps;
37
37
 
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { forwardRef, useState } from "react";
10
9
  import { Button, type ButtonProps } from "@ndla/primitives";
10
+ import { forwardRef, useState } from "react";
11
11
 
12
12
  // TODO: Let's consider abandoning `disabled` on the button here. It should instead just open/close the widget based on its current state.
13
13
 
@@ -6,11 +6,11 @@
6
6
  *
7
7
  */
8
8
 
9
- import { useTranslation } from "react-i18next";
10
9
  import type { CollectionItem } from "@ark-ui/react";
11
10
  import type { ComboboxRootProps, PaginationRootProps, TagsInputRootProps, DatePickerRootProps } from "@ndla/primitives";
12
- import { type TagSelectorRootProps } from "../TagSelector/TagSelector";
13
11
  import { useMemo } from "react";
12
+ import { useTranslation } from "react-i18next";
13
+ import { type TagSelectorRootProps } from "../TagSelector/TagSelector";
14
14
 
15
15
  type DeepPartial<T> = {
16
16
  [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];