@ndla/ui 43.0.2 → 44.0.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 (689) hide show
  1. package/es/Article/Article.js +7 -15
  2. package/es/Article/ArticleByline.js +6 -6
  3. package/es/Article/ArticleFootNotes.js +2 -3
  4. package/es/Article/ArticleHeaderWrapper.js +1 -1
  5. package/es/Article/ArticleNotions.js +24 -49
  6. package/es/Article/index.js +1 -2
  7. package/es/Aside/Aside.js +0 -1
  8. package/es/AudioPlayer/AudioPlayer.js +15 -15
  9. package/es/AudioPlayer/Controls.js +22 -22
  10. package/es/AudioPlayer/SpeechControl.js +1 -1
  11. package/es/AudioPlayer/initAudioPlayers.js +3 -1
  12. package/es/BannerCard/BannerCard.js +8 -8
  13. package/es/BlogPosts/BlogPost.js +4 -5
  14. package/es/BlogPosts/BlogPostWrapper.js +1 -2
  15. package/es/Breadcrumb/Breadcrumb.js +3 -3
  16. package/es/Breadcrumb/BreadcrumbItem.js +7 -7
  17. package/es/Breadcrumb/HeaderBreadcrumb.js +3 -4
  18. package/es/Breadcrumb/HomeBreadcrumb.js +6 -7
  19. package/es/CampaignBlock/CampaignBlock.js +7 -8
  20. package/es/CompetenceGoalTab/CompetenceGoalItem.js +0 -1
  21. package/es/CompetenceGoalTab/CompetenceGoalTab.js +3 -3
  22. package/es/CompetenceGoalTab/CompetenceItem.js +5 -6
  23. package/es/CompetenceGoalTab/CoreElementItem.js +0 -1
  24. package/es/CompetenceGoalTab/SearchButton.js +2 -3
  25. package/es/ContentLoader/index.js +0 -1
  26. package/es/ContentPlaceholder/ContentPlaceholder.js +3 -4
  27. package/es/ContentTypeBadge/ContentTypeBadge.js +0 -1
  28. package/es/CopyParagraphButton/CopyParagraphButton.js +3 -3
  29. package/es/CopyParagraphButton/initCopyParagraphButtons.js +2 -1
  30. package/es/CreatedBy/CreatedBy.js +4 -5
  31. package/es/Dialog/Dialog.js +0 -1
  32. package/es/Embed/H5pEmbed.js +1 -2
  33. package/es/Embed/ImageEmbed.js +3 -3
  34. package/es/ErrorMessage/ErrorMessage.js +6 -7
  35. package/es/ErrorMessage/ErrorResourceAccessDenied.js +1 -2
  36. package/es/FactBox/FactBox.js +0 -1
  37. package/es/FactBox/FactBoxV2.js +4 -4
  38. package/es/Figure/Figure.js +0 -1
  39. package/es/Figure/FigureBylineExpandButton.js +0 -1
  40. package/es/Figure/FigureExpandButton.js +0 -1
  41. package/es/Figure/FigureLicense.js +0 -1
  42. package/es/Figure/FigureLicenseDialog.js +0 -1
  43. package/es/Figure/FigureOpenDialogButton.js +0 -1
  44. package/es/FileList/File.js +3 -4
  45. package/es/FileList/FileList.js +3 -4
  46. package/es/Filter/FilterButtons.js +10 -10
  47. package/es/Filter/FilterCarousel.js +5 -5
  48. package/es/Filter/FilterList.js +1 -1
  49. package/es/Filter/FilterListPhone.js +1 -1
  50. package/es/Filter/ToggleItem.js +0 -1
  51. package/es/Footer/EditorName.js +2 -3
  52. package/es/Footer/Footer.js +8 -9
  53. package/es/Footer/FooterLinks.js +6 -7
  54. package/es/Footer/FooterPrivacy.js +3 -4
  55. package/es/Footer/FooterText.js +1 -2
  56. package/es/Frontpage/FrontpageAllSubjects.js +8 -8
  57. package/es/Frontpage/FrontpageFilm.js +4 -5
  58. package/es/Frontpage/FrontpageHeader.js +4 -5
  59. package/es/Frontpage/FrontpageInfo.js +1 -2
  60. package/es/Frontpage/FrontpageMultidisciplinarySubject.js +7 -8
  61. package/es/Frontpage/FrontpageProgramMenu.js +4 -4
  62. package/es/Frontpage/FrontpageSearch.js +3 -3
  63. package/es/Frontpage/FrontpageToolbox.js +4 -5
  64. package/es/Frontpage/illustrations/Fellesfag.js +2 -3
  65. package/es/Frontpage/illustrations/FrontpageHeaderIllustration.js +2 -3
  66. package/es/Frontpage/illustrations/FrontpageSubjectIllustration.js +1 -2
  67. package/es/Frontpage/illustrations/MenuFellesfag.js +2 -3
  68. package/es/Frontpage/illustrations/MenuStudiespesialiserende.js +2 -3
  69. package/es/Frontpage/illustrations/MenuYrkesfag.js +2 -3
  70. package/es/Frontpage/illustrations/Studiespesialiserende.js +2 -3
  71. package/es/Frontpage/illustrations/Yrkesfag.js +2 -3
  72. package/es/Grid/Grid.js +22 -24
  73. package/es/Grid/index.js +1 -1
  74. package/es/Hero/Hero.js +1 -2
  75. package/es/Image/Image.js +12 -13
  76. package/es/Image/ImageLink.js +1 -2
  77. package/es/Image/LazyLoadImage.js +3 -4
  78. package/es/InfoBlock/InfoBlock.js +5 -6
  79. package/es/InfoBox/InfoBox.js +1 -2
  80. package/es/InfoWidget/InfoWidget.js +8 -9
  81. package/es/KeyFigure/KeyFigure.js +4 -4
  82. package/es/LanguageSelector/LanguageSelector.js +5 -6
  83. package/es/Layout/Content.js +1 -2
  84. package/es/Layout/LayoutItem.js +1 -2
  85. package/es/Layout/OneColumn.js +0 -1
  86. package/es/Layout/PageContainer.js +0 -1
  87. package/es/LearningPaths/LearningPathContent.js +1 -2
  88. package/es/LearningPaths/LearningPathInformation.js +3 -4
  89. package/es/LearningPaths/LearningPathLastStepNavigation.js +4 -5
  90. package/es/LearningPaths/LearningPathMenu.js +4 -4
  91. package/es/LearningPaths/LearningPathMenuAside.js +4 -5
  92. package/es/LearningPaths/LearningPathMenuAsideCopyright.js +2 -3
  93. package/es/LearningPaths/LearningPathMenuContent.js +6 -7
  94. package/es/LearningPaths/LearningPathMenuIntro.js +7 -8
  95. package/es/LearningPaths/LearningPathMenuModalWrapper.js +3 -3
  96. package/es/LearningPaths/LearningPathMobileHeader.js +2 -3
  97. package/es/LearningPaths/LearningPathMobileStepInfo.js +1 -2
  98. package/es/LearningPaths/LearningPathSticky.js +3 -4
  99. package/es/LearningPaths/LearningPathWrapper.js +1 -2
  100. package/es/LetterFilter/LetterFilter.js +3 -3
  101. package/es/LinkBlock/LinkBlock.js +5 -5
  102. package/es/{Article/ArticleContent.js → LinkBlock/LinkBlockSection.js} +22 -30
  103. package/es/LinkBlock/index.js +2 -1
  104. package/es/Logo/Logo.js +0 -1
  105. package/es/Logo/SvgLogo.js +0 -1
  106. package/es/Masthead/Masthead.js +6 -7
  107. package/es/Masthead/MastheadSearchModal.js +3 -3
  108. package/es/Masthead/SkipToMainContent.js +1 -2
  109. package/es/MediaList/MediaList.js +2 -3
  110. package/es/Messages/MessageBanner.js +3 -4
  111. package/es/Messages/MessageBox.js +9 -10
  112. package/es/Messages/MessageBoxTag.js +1 -2
  113. package/es/MultidisciplinarySubject/List.js +3 -4
  114. package/es/MultidisciplinarySubject/ListItem.js +7 -8
  115. package/es/MultidisciplinarySubject/MultidisciplinarySubject.js +6 -7
  116. package/es/MyNdla/Resource/Folder.js +7 -8
  117. package/es/MyNdla/Resource/FolderInput.js +4 -4
  118. package/es/NDLAFilm/AboutNdlaFilm.js +1 -2
  119. package/es/NDLAFilm/AllMoviesAlphabetically.js +10 -10
  120. package/es/NDLAFilm/FilmContentCard.js +3 -4
  121. package/es/NDLAFilm/FilmContentCardTags.js +2 -3
  122. package/es/NDLAFilm/FilmMovieList.js +1 -2
  123. package/es/NDLAFilm/FilmMovieSearch.js +4 -4
  124. package/es/NDLAFilm/FilmSlideshow.js +8 -8
  125. package/es/NDLAFilm/MovieGrid.js +2 -3
  126. package/es/NDLAFilm/NavigationArrow.js +4 -5
  127. package/es/NDLAFilm/SlideshowIndicator.js +2 -3
  128. package/es/NDLAFilm/VisualElement.js +1 -2
  129. package/es/Navigation/NavigationBox.js +19 -20
  130. package/es/Navigation/NavigationTopicAbout.js +14 -15
  131. package/es/NoContentBox/NoContentBox.js +0 -1
  132. package/es/Notion/ConceptNotion.js +2 -2
  133. package/es/Notion/FigureNotion.js +1 -2
  134. package/es/Notion/Notion.js +5 -5
  135. package/es/Notion/NotionImage.js +2 -3
  136. package/es/Notion/NotionVisualElement.js +2 -3
  137. package/es/Programme/Programme.js +5 -6
  138. package/es/Programme/ProgrammeSubjects.js +2 -2
  139. package/es/RadioButtonGroup/RadioButtonGroup.js +5 -5
  140. package/es/RelatedArticleList/RelatedArticleList.js +1 -1
  141. package/es/Resource/BlockResource.js +6 -7
  142. package/es/Resource/ListResource.js +6 -7
  143. package/es/Resource/resourceComponents.js +12 -12
  144. package/es/ResourceBox/ResourceBox.js +7 -7
  145. package/es/ResourceGroup/ResourceGroup.js +4 -5
  146. package/es/ResourceGroup/ResourceItem.js +11 -12
  147. package/es/ResourceGroup/ResourceList.js +2 -3
  148. package/es/ResourcesWrapper/ResourcesTopicTitle.js +12 -13
  149. package/es/ResourcesWrapper/ResourcesWrapper.js +1 -2
  150. package/es/Search/ActiveFilterContent.js +3 -3
  151. package/es/Search/ActiveFilters.js +6 -7
  152. package/es/Search/ContentTypeResult.js +2 -2
  153. package/es/Search/LoadingWrapper.js +1 -2
  154. package/es/Search/SearchField.js +2 -3
  155. package/es/Search/SearchFieldForm.js +3 -4
  156. package/es/Search/SearchResult.js +11 -11
  157. package/es/Search/SearchResultSleeve.js +9 -9
  158. package/es/Search/ToggleSearchButton.js +3 -3
  159. package/es/SearchTypeResult/ActiveFilterContent.js +3 -3
  160. package/es/SearchTypeResult/ActiveFilters.js +6 -7
  161. package/es/SearchTypeResult/PopupFilter.js +7 -7
  162. package/es/SearchTypeResult/ResultNavigation.js +4 -5
  163. package/es/SearchTypeResult/SearchFieldHeader.js +5 -5
  164. package/es/SearchTypeResult/SearchFilterContent.js +2 -3
  165. package/es/SearchTypeResult/SearchHeader.js +9 -9
  166. package/es/SearchTypeResult/SearchItem.js +8 -8
  167. package/es/SearchTypeResult/SearchItemList.js +12 -12
  168. package/es/SearchTypeResult/SearchItems.js +4 -4
  169. package/es/SearchTypeResult/SearchNotionsResult.js +4 -5
  170. package/es/SearchTypeResult/SearchSubjectItem.js +3 -4
  171. package/es/SearchTypeResult/SearchSubjectResult.js +1 -2
  172. package/es/SearchTypeResult/SearchTypeHeader.js +10 -10
  173. package/es/SearchTypeResult/SearchTypeResult.js +3 -3
  174. package/es/SearchTypeResult/SearchViewType.js +4 -5
  175. package/es/SearchTypeResult/components/ItemContexts.js +6 -6
  176. package/es/SearchTypeResult/components/ItemResourceHeader.js +7 -7
  177. package/es/SearchTypeResult/components/ItemTopicHeader.js +4 -5
  178. package/es/SearchTypeResult/components/SubjectFilters.js +2 -2
  179. package/es/SectionHeading/SectionHeading.js +2 -3
  180. package/es/SnackBar/DefaultSnackbar.js +2 -3
  181. package/es/SnackBar/SnackbarProvider.js +3 -3
  182. package/es/Subject/Subject.js +11 -12
  183. package/es/Subject/SubjectBanner.js +1 -2
  184. package/es/Subject/SubjectHeader.js +4 -5
  185. package/es/Subject/SubjectNewContent.js +8 -9
  186. package/es/Subject/SubjectSocial.js +2 -3
  187. package/es/Table/Table.js +4 -4
  188. package/es/TagSelector/Control.js +1 -2
  189. package/es/TagSelector/DropdownIndicator.js +2 -2
  190. package/es/TagSelector/Input.js +1 -2
  191. package/es/TagSelector/Menu.js +1 -2
  192. package/es/TagSelector/MenuList.js +1 -2
  193. package/es/TagSelector/Option.js +2 -3
  194. package/es/TagSelector/SelectContainer.js +1 -2
  195. package/es/TagSelector/TagSelector.js +3 -3
  196. package/es/TagSelector/ValueButton.js +1 -2
  197. package/es/ToolboxPage/ToolboxInfo.js +1 -2
  198. package/es/Topic/Loader.js +0 -1
  199. package/es/Topic/Topic.js +60 -43
  200. package/es/Translation/Translation.js +0 -1
  201. package/es/Translation/TranslationLine.js +0 -1
  202. package/es/TreeStructure/AddFolderButton.js +3 -3
  203. package/es/TreeStructure/ComboboxButton.js +3 -3
  204. package/es/TreeStructure/FolderItem.js +8 -8
  205. package/es/TreeStructure/FolderItems.js +2 -3
  206. package/es/TreeStructure/TreeStructure.js +6 -6
  207. package/es/User/UserInfo.js +2 -3
  208. package/es/index.js +4 -3
  209. package/es/locale/LocaleProvider.js +0 -1
  210. package/es/utils/createUniversalPortal.js +0 -1
  211. package/lib/Article/Article.d.ts +5 -11
  212. package/lib/Article/Article.js +7 -17
  213. package/lib/Article/ArticleByline.js +6 -9
  214. package/lib/Article/ArticleFootNotes.js +2 -3
  215. package/lib/Article/ArticleHeaderWrapper.js +1 -3
  216. package/lib/Article/ArticleNotions.d.ts +3 -9
  217. package/lib/Article/ArticleNotions.js +30 -57
  218. package/lib/Article/index.d.ts +1 -2
  219. package/lib/Article/index.js +0 -7
  220. package/lib/Aside/Aside.js +0 -1
  221. package/lib/AudioPlayer/AudioPlayer.js +15 -18
  222. package/lib/AudioPlayer/Controls.js +22 -25
  223. package/lib/AudioPlayer/SpeechControl.js +1 -4
  224. package/lib/AudioPlayer/initAudioPlayers.d.ts +7 -0
  225. package/lib/AudioPlayer/initAudioPlayers.js +2 -1
  226. package/lib/BannerCard/BannerCard.d.ts +7 -0
  227. package/lib/BannerCard/BannerCard.js +7 -8
  228. package/lib/BlogPosts/BlogPost.js +4 -5
  229. package/lib/BlogPosts/BlogPostWrapper.js +1 -2
  230. package/lib/Breadcrumb/Breadcrumb.js +3 -5
  231. package/lib/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  232. package/lib/Breadcrumb/BreadcrumbItem.js +7 -10
  233. package/lib/Breadcrumb/HeaderBreadcrumb.js +3 -4
  234. package/lib/Breadcrumb/HomeBreadcrumb.js +6 -7
  235. package/lib/CampaignBlock/CampaignBlock.js +8 -9
  236. package/lib/CompetenceGoalTab/CompetenceGoalItem.js +0 -1
  237. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +3 -6
  238. package/lib/CompetenceGoalTab/CompetenceItem.js +5 -6
  239. package/lib/CompetenceGoalTab/CoreElementItem.js +0 -1
  240. package/lib/CompetenceGoalTab/SearchButton.js +2 -3
  241. package/lib/ContentLoader/index.js +0 -2
  242. package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -4
  243. package/lib/ContentTypeBadge/ContentTypeBadge.js +0 -1
  244. package/lib/CopyParagraphButton/CopyParagraphButton.js +3 -6
  245. package/lib/CopyParagraphButton/initCopyParagraphButtons.js +2 -1
  246. package/lib/CreatedBy/CreatedBy.js +4 -5
  247. package/lib/Dialog/Dialog.js +0 -1
  248. package/lib/Embed/H5pEmbed.js +1 -2
  249. package/lib/Embed/ImageEmbed.d.ts +11 -1
  250. package/lib/Embed/ImageEmbed.js +4 -2
  251. package/lib/ErrorMessage/ErrorMessage.js +6 -7
  252. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +1 -2
  253. package/lib/FactBox/FactBox.js +0 -1
  254. package/lib/FactBox/FactBoxV2.js +4 -6
  255. package/lib/Figure/Figure.js +0 -1
  256. package/lib/Figure/FigureBylineExpandButton.js +0 -2
  257. package/lib/Figure/FigureExpandButton.js +0 -2
  258. package/lib/Figure/FigureLicense.js +0 -1
  259. package/lib/Figure/FigureLicenseDialog.js +0 -1
  260. package/lib/Figure/FigureOpenDialogButton.js +0 -2
  261. package/lib/FileList/File.js +3 -4
  262. package/lib/FileList/FileList.js +3 -4
  263. package/lib/Filter/FilterButtons.js +10 -13
  264. package/lib/Filter/FilterCarousel.js +5 -7
  265. package/lib/Filter/FilterList.js +1 -3
  266. package/lib/Filter/FilterListPhone.js +1 -3
  267. package/lib/Filter/ToggleItem.js +0 -2
  268. package/lib/Footer/EditorName.js +0 -2
  269. package/lib/Footer/Footer.js +8 -9
  270. package/lib/Footer/FooterLinks.js +6 -7
  271. package/lib/Footer/FooterPrivacy.js +3 -4
  272. package/lib/Footer/FooterText.js +1 -2
  273. package/lib/Frontpage/FrontpageAllSubjects.js +8 -11
  274. package/lib/Frontpage/FrontpageFilm.js +5 -6
  275. package/lib/Frontpage/FrontpageHeader.js +4 -5
  276. package/lib/Frontpage/FrontpageInfo.js +1 -2
  277. package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +11 -11
  278. package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +7 -8
  279. package/lib/Frontpage/FrontpageProgramMenu.js +4 -7
  280. package/lib/Frontpage/FrontpageSearch.js +3 -6
  281. package/lib/Frontpage/FrontpageToolbox.js +4 -5
  282. package/lib/Frontpage/illustrations/Fellesfag.js +0 -2
  283. package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.js +0 -2
  284. package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.js +2 -4
  285. package/lib/Frontpage/illustrations/MenuFellesfag.js +0 -2
  286. package/lib/Frontpage/illustrations/MenuStudiespesialiserende.js +0 -2
  287. package/lib/Frontpage/illustrations/MenuYrkesfag.js +0 -2
  288. package/lib/Frontpage/illustrations/Studiespesialiserende.js +0 -2
  289. package/lib/Frontpage/illustrations/Yrkesfag.js +0 -2
  290. package/lib/Grid/Grid.d.ts +4 -0
  291. package/lib/Grid/Grid.js +24 -25
  292. package/lib/Grid/index.d.ts +1 -1
  293. package/lib/Grid/index.js +10 -2
  294. package/lib/Hero/Hero.js +1 -2
  295. package/lib/Image/Image.d.ts +2 -2
  296. package/lib/Image/Image.js +12 -13
  297. package/lib/Image/ImageLink.js +1 -2
  298. package/lib/Image/LazyLoadImage.js +8 -9
  299. package/lib/InfoBlock/InfoBlock.js +5 -6
  300. package/lib/InfoBox/InfoBox.js +1 -2
  301. package/lib/InfoWidget/InfoWidget.js +8 -9
  302. package/lib/KeyFigure/KeyFigure.js +4 -4
  303. package/lib/LanguageSelector/LanguageSelector.js +5 -6
  304. package/lib/Layout/Content.js +0 -2
  305. package/lib/Layout/LayoutItem.js +8 -9
  306. package/lib/Layout/OneColumn.js +0 -1
  307. package/lib/Layout/PageContainer.js +0 -1
  308. package/lib/LearningPaths/LearningPathContent.js +1 -2
  309. package/lib/LearningPaths/LearningPathInformation.js +3 -4
  310. package/lib/LearningPaths/LearningPathLastStepNavigation.js +5 -6
  311. package/lib/LearningPaths/LearningPathMenu.js +4 -7
  312. package/lib/LearningPaths/LearningPathMenuAside.js +5 -6
  313. package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +2 -3
  314. package/lib/LearningPaths/LearningPathMenuContent.js +8 -9
  315. package/lib/LearningPaths/LearningPathMenuIntro.js +8 -9
  316. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +3 -6
  317. package/lib/LearningPaths/LearningPathMobileHeader.js +2 -3
  318. package/lib/LearningPaths/LearningPathMobileStepInfo.js +1 -2
  319. package/lib/LearningPaths/LearningPathSticky.js +5 -6
  320. package/lib/LearningPaths/LearningPathWrapper.js +1 -2
  321. package/lib/LetterFilter/LetterFilter.js +3 -6
  322. package/lib/LinkBlock/LinkBlock.d.ts +2 -7
  323. package/lib/LinkBlock/LinkBlock.js +5 -5
  324. package/lib/LinkBlock/LinkBlockSection.d.ts +13 -0
  325. package/lib/{Article/ArticleContent.js → LinkBlock/LinkBlockSection.js} +23 -30
  326. package/lib/LinkBlock/index.d.ts +1 -0
  327. package/lib/LinkBlock/index.js +7 -0
  328. package/lib/Logo/Logo.js +0 -1
  329. package/lib/Logo/SvgLogo.js +0 -2
  330. package/lib/Masthead/Masthead.js +6 -7
  331. package/lib/Masthead/MastheadSearchModal.js +3 -6
  332. package/lib/Masthead/SkipToMainContent.js +1 -2
  333. package/lib/MediaList/MediaList.js +2 -3
  334. package/lib/Messages/MessageBanner.js +3 -4
  335. package/lib/Messages/MessageBox.js +10 -11
  336. package/lib/Messages/MessageBoxTag.js +1 -2
  337. package/lib/MultidisciplinarySubject/List.js +3 -4
  338. package/lib/MultidisciplinarySubject/ListItem.js +7 -8
  339. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +6 -7
  340. package/lib/MyNdla/Resource/Folder.js +7 -8
  341. package/lib/MyNdla/Resource/FolderInput.d.ts +2 -2
  342. package/lib/MyNdla/Resource/FolderInput.js +4 -6
  343. package/lib/NDLAFilm/AboutNdlaFilm.js +1 -2
  344. package/lib/NDLAFilm/AllMoviesAlphabetically.js +10 -13
  345. package/lib/NDLAFilm/FilmContentCard.js +3 -4
  346. package/lib/NDLAFilm/FilmContentCardTags.js +2 -3
  347. package/lib/NDLAFilm/FilmMovieList.js +1 -2
  348. package/lib/NDLAFilm/FilmMovieSearch.js +4 -7
  349. package/lib/NDLAFilm/FilmSlideshow.js +8 -10
  350. package/lib/NDLAFilm/MovieGrid.js +2 -3
  351. package/lib/NDLAFilm/NavigationArrow.d.ts +3 -3
  352. package/lib/NDLAFilm/NavigationArrow.js +6 -7
  353. package/lib/NDLAFilm/SlideshowIndicator.js +2 -3
  354. package/lib/NDLAFilm/VisualElement.js +1 -2
  355. package/lib/Navigation/NavigationBox.js +22 -23
  356. package/lib/Navigation/NavigationTopicAbout.js +15 -16
  357. package/lib/NoContentBox/NoContentBox.js +0 -2
  358. package/lib/Notion/ConceptNotion.js +2 -2
  359. package/lib/Notion/FigureNotion.js +1 -2
  360. package/lib/Notion/Notion.js +5 -8
  361. package/lib/Notion/NotionImage.js +2 -3
  362. package/lib/Notion/NotionVisualElement.js +2 -3
  363. package/lib/Programme/Programme.js +5 -6
  364. package/lib/Programme/ProgrammeSubjects.js +2 -5
  365. package/lib/RadioButtonGroup/RadioButtonGroup.js +5 -7
  366. package/lib/RelatedArticleList/RelatedArticleList.js +1 -3
  367. package/lib/Resource/BlockResource.js +6 -7
  368. package/lib/Resource/ListResource.js +6 -7
  369. package/lib/Resource/resourceComponents.d.ts +2 -2
  370. package/lib/Resource/resourceComponents.js +12 -12
  371. package/lib/ResourceBox/ResourceBox.d.ts +8 -0
  372. package/lib/ResourceBox/ResourceBox.js +6 -7
  373. package/lib/ResourceGroup/ResourceGroup.js +5 -6
  374. package/lib/ResourceGroup/ResourceItem.js +14 -15
  375. package/lib/ResourceGroup/ResourceList.js +4 -5
  376. package/lib/ResourcesWrapper/ResourcesTopicTitle.js +13 -14
  377. package/lib/ResourcesWrapper/ResourcesWrapper.js +1 -2
  378. package/lib/Search/ActiveFilterContent.d.ts +4 -4
  379. package/lib/Search/ActiveFilterContent.js +3 -6
  380. package/lib/Search/ActiveFilters.js +8 -9
  381. package/lib/Search/ContentTypeResult.js +2 -4
  382. package/lib/Search/LoadingWrapper.js +1 -2
  383. package/lib/Search/SearchField.js +4 -5
  384. package/lib/Search/SearchFieldForm.js +5 -6
  385. package/lib/Search/SearchResult.js +11 -13
  386. package/lib/Search/SearchResultSleeve.js +9 -12
  387. package/lib/Search/ToggleSearchButton.d.ts +2 -2
  388. package/lib/Search/ToggleSearchButton.js +3 -5
  389. package/lib/SearchTypeResult/ActiveFilterContent.d.ts +4 -4
  390. package/lib/SearchTypeResult/ActiveFilterContent.js +3 -6
  391. package/lib/SearchTypeResult/ActiveFilters.js +8 -9
  392. package/lib/SearchTypeResult/PopupFilter.js +7 -10
  393. package/lib/SearchTypeResult/ResultNavigation.js +4 -5
  394. package/lib/SearchTypeResult/SearchFieldHeader.js +5 -8
  395. package/lib/SearchTypeResult/SearchFilterContent.js +2 -3
  396. package/lib/SearchTypeResult/SearchHeader.js +9 -12
  397. package/lib/SearchTypeResult/SearchItem.js +8 -11
  398. package/lib/SearchTypeResult/SearchItemList.js +12 -15
  399. package/lib/SearchTypeResult/SearchItems.d.ts +2 -2
  400. package/lib/SearchTypeResult/SearchItems.js +4 -7
  401. package/lib/SearchTypeResult/SearchNotionsResult.js +4 -5
  402. package/lib/SearchTypeResult/SearchSubjectItem.js +3 -4
  403. package/lib/SearchTypeResult/SearchSubjectResult.js +1 -2
  404. package/lib/SearchTypeResult/SearchTypeHeader.d.ts +2 -2
  405. package/lib/SearchTypeResult/SearchTypeHeader.js +10 -13
  406. package/lib/SearchTypeResult/SearchTypeResult.d.ts +2 -2
  407. package/lib/SearchTypeResult/SearchTypeResult.js +3 -5
  408. package/lib/SearchTypeResult/SearchViewType.js +4 -5
  409. package/lib/SearchTypeResult/components/ItemContexts.js +6 -9
  410. package/lib/SearchTypeResult/components/ItemResourceHeader.js +7 -10
  411. package/lib/SearchTypeResult/components/ItemTopicHeader.js +4 -5
  412. package/lib/SearchTypeResult/components/SubjectFilters.js +2 -4
  413. package/lib/SectionHeading/SectionHeading.js +5 -7
  414. package/lib/SnackBar/DefaultSnackbar.js +2 -3
  415. package/lib/SnackBar/SnackbarProvider.js +3 -5
  416. package/lib/Subject/Subject.js +14 -15
  417. package/lib/Subject/SubjectBanner.js +1 -2
  418. package/lib/Subject/SubjectHeader.js +5 -6
  419. package/lib/Subject/SubjectNewContent.js +8 -9
  420. package/lib/Subject/SubjectSocial.js +2 -3
  421. package/lib/Table/Table.js +4 -6
  422. package/lib/TagSelector/Control.js +1 -2
  423. package/lib/TagSelector/DropdownIndicator.js +2 -4
  424. package/lib/TagSelector/Input.js +1 -3
  425. package/lib/TagSelector/Menu.js +1 -3
  426. package/lib/TagSelector/MenuList.d.ts +3 -3
  427. package/lib/TagSelector/MenuList.js +1 -2
  428. package/lib/TagSelector/Option.js +2 -3
  429. package/lib/TagSelector/SelectContainer.js +1 -2
  430. package/lib/TagSelector/TagSelector.js +3 -5
  431. package/lib/TagSelector/ValueButton.d.ts +3 -3
  432. package/lib/TagSelector/ValueButton.js +1 -2
  433. package/lib/ToolboxPage/ToolboxInfo.js +1 -2
  434. package/lib/Topic/Loader.js +0 -1
  435. package/lib/Topic/Topic.d.ts +10 -17
  436. package/lib/Topic/Topic.js +60 -43
  437. package/lib/Translation/Translation.js +0 -1
  438. package/lib/Translation/TranslationLine.js +0 -1
  439. package/lib/TreeStructure/AddFolderButton.js +3 -6
  440. package/lib/TreeStructure/ComboboxButton.d.ts +2 -2
  441. package/lib/TreeStructure/ComboboxButton.js +3 -6
  442. package/lib/TreeStructure/FolderItem.js +8 -11
  443. package/lib/TreeStructure/FolderItems.js +2 -3
  444. package/lib/TreeStructure/TreeStructure.js +6 -9
  445. package/lib/User/UserInfo.js +2 -3
  446. package/lib/index.d.ts +3 -2
  447. package/lib/index.js +19 -6
  448. package/lib/locale/LocaleProvider.js +0 -2
  449. package/lib/types.d.ts +1 -1
  450. package/lib/utils/createUniversalPortal.js +0 -1
  451. package/package.json +20 -20
  452. package/src/Article/Article.tsx +7 -17
  453. package/src/Article/ArticleByline.tsx +1 -1
  454. package/src/Article/ArticleFootNotes.tsx +0 -1
  455. package/src/Article/ArticleHeaderWrapper.tsx +1 -1
  456. package/src/Article/ArticleNotions.tsx +9 -79
  457. package/src/Article/index.ts +1 -10
  458. package/src/Aside/Aside.tsx +1 -1
  459. package/src/AudioPlayer/AudioPlayer.tsx +1 -1
  460. package/src/AudioPlayer/Controls.tsx +1 -1
  461. package/src/AudioPlayer/SpeechControl.tsx +1 -1
  462. package/src/AudioPlayer/initAudioPlayers.tsx +3 -1
  463. package/src/BannerCard/BannerCard.tsx +1 -1
  464. package/src/BlogPost/BlogPost.stories.tsx +0 -1
  465. package/src/BlogPosts/BlogPost.tsx +0 -1
  466. package/src/BlogPosts/BlogPostWrapper.tsx +1 -1
  467. package/src/Breadcrumb/Breadcrumb.tsx +1 -1
  468. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
  469. package/src/Breadcrumb/HeaderBreadcrumb.tsx +0 -1
  470. package/src/Breadcrumb/HomeBreadcrumb.tsx +0 -1
  471. package/src/CampaignBlock/CampaignBlock.stories.tsx +0 -1
  472. package/src/CampaignBlock/CampaignBlock.tsx +1 -1
  473. package/src/CompetenceGoalTab/CompetenceGoalItem.tsx +0 -1
  474. package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +1 -1
  475. package/src/CompetenceGoalTab/CompetenceItem.tsx +0 -1
  476. package/src/CompetenceGoalTab/CoreElementItem.tsx +0 -1
  477. package/src/CompetenceGoalTab/SearchButton.tsx +0 -1
  478. package/src/ContactBlock/Contactblock.stories.tsx +0 -1
  479. package/src/ContentLoader/index.tsx +1 -1
  480. package/src/ContentPlaceholder/ContentPlaceholder.tsx +0 -1
  481. package/src/ContentTypeBadge/ContentTypeBadge.tsx +0 -1
  482. package/src/CopyParagraphButton/CopyParagraphButton.tsx +1 -1
  483. package/src/CopyParagraphButton/initCopyParagraphButtons.tsx +1 -1
  484. package/src/CreatedBy/CreatedBy.tsx +0 -1
  485. package/src/Dialog/Dialog.tsx +1 -1
  486. package/src/Embed/AudioEmbed.stories.tsx +32 -10
  487. package/src/Embed/BrightcoveEmbed.stories.tsx +0 -1
  488. package/src/Embed/ConceptEmbed.stories.tsx +30 -10
  489. package/src/Embed/ExternalEmbed.stories.tsx +0 -1
  490. package/src/Embed/H5pEmbed.stories.tsx +0 -1
  491. package/src/Embed/H5pEmbed.tsx +0 -1
  492. package/src/Embed/IframeEmbed.stories.tsx +32 -11
  493. package/src/Embed/ImageEmbed.stories.tsx +38 -13
  494. package/src/Embed/ImageEmbed.tsx +3 -3
  495. package/src/ErrorMessage/ErrorMessage.tsx +1 -1
  496. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +0 -1
  497. package/src/FactBox/FactBox.tsx +1 -1
  498. package/src/FactBox/FactBoxV2.tsx +1 -1
  499. package/src/Figure/Figure.tsx +1 -1
  500. package/src/Figure/FigureBylineExpandButton.tsx +0 -1
  501. package/src/Figure/FigureExpandButton.tsx +0 -1
  502. package/src/Figure/FigureLicense.tsx +1 -1
  503. package/src/Figure/FigureLicenseDialog.tsx +1 -1
  504. package/src/Figure/FigureOpenDialogButton.tsx +0 -1
  505. package/src/FileList/File.tsx +0 -1
  506. package/src/FileList/FileList.tsx +0 -1
  507. package/src/Filter/FilterButtons.tsx +1 -1
  508. package/src/Filter/FilterCarousel.tsx +1 -1
  509. package/src/Filter/FilterList.tsx +1 -1
  510. package/src/Filter/FilterListPhone.tsx +1 -1
  511. package/src/Filter/ToggleItem.tsx +1 -1
  512. package/src/Footer/EditorName.tsx +0 -2
  513. package/src/Footer/Footer.tsx +1 -1
  514. package/src/Footer/FooterLinks.tsx +1 -1
  515. package/src/Footer/FooterPrivacy.tsx +0 -1
  516. package/src/Footer/FooterText.tsx +1 -1
  517. package/src/Frontpage/FrontpageAllSubjects.tsx +1 -1
  518. package/src/Frontpage/FrontpageFilm.tsx +0 -1
  519. package/src/Frontpage/FrontpageHeader.tsx +1 -1
  520. package/src/Frontpage/FrontpageInfo.tsx +1 -1
  521. package/src/Frontpage/FrontpageMultidisciplinarySubject.tsx +0 -1
  522. package/src/Frontpage/FrontpageProgramMenu.tsx +1 -1
  523. package/src/Frontpage/FrontpageSearch.tsx +1 -1
  524. package/src/Frontpage/FrontpageToolbox.tsx +0 -1
  525. package/src/Frontpage/illustrations/Fellesfag.tsx +0 -2
  526. package/src/Frontpage/illustrations/FrontpageHeaderIllustration.tsx +0 -2
  527. package/src/Frontpage/illustrations/FrontpageSubjectIllustration.tsx +0 -1
  528. package/src/Frontpage/illustrations/MenuFellesfag.tsx +0 -2
  529. package/src/Frontpage/illustrations/MenuStudiespesialiserende.tsx +0 -2
  530. package/src/Frontpage/illustrations/MenuYrkesfag.tsx +0 -2
  531. package/src/Frontpage/illustrations/Studiespesialiserende.tsx +0 -2
  532. package/src/Frontpage/illustrations/Yrkesfag.tsx +0 -2
  533. package/src/Gloss/Gloss.stories.tsx +0 -1
  534. package/src/Grid/Grid.stories.tsx +0 -1
  535. package/src/Grid/Grid.tsx +18 -32
  536. package/src/Grid/index.ts +1 -1
  537. package/src/Hero/Hero.stories.tsx +0 -1
  538. package/src/Hero/Hero.tsx +1 -1
  539. package/src/Image/Image.tsx +9 -9
  540. package/src/Image/ImageLink.tsx +1 -1
  541. package/src/Image/LazyLoadImage.tsx +0 -2
  542. package/src/Image/__tests__/Image-test.jsx +0 -1
  543. package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +5 -5
  544. package/src/InfoBlock/InfoBlock.tsx +1 -1
  545. package/src/InfoBox/InfoBox.tsx +1 -1
  546. package/src/InfoWidget/InfoWidget.tsx +1 -1
  547. package/src/KeyFigure/KeyFigure.stories.tsx +0 -1
  548. package/src/KeyFigure/KeyFigure.tsx +0 -1
  549. package/src/LanguageSelector/LanguageSelector.stories.tsx +0 -1
  550. package/src/LanguageSelector/LanguageSelector.tsx +0 -1
  551. package/src/Layout/Content.tsx +1 -1
  552. package/src/Layout/LayoutItem.tsx +1 -1
  553. package/src/Layout/OneColumn.tsx +1 -1
  554. package/src/Layout/PageContainer.tsx +1 -1
  555. package/src/LearningPaths/LearningPathContent.tsx +1 -1
  556. package/src/LearningPaths/LearningPathInformation.tsx +0 -1
  557. package/src/LearningPaths/LearningPathLastStepNavigation.tsx +1 -1
  558. package/src/LearningPaths/LearningPathMenu.stories.tsx +0 -1
  559. package/src/LearningPaths/LearningPathMenu.tsx +1 -1
  560. package/src/LearningPaths/LearningPathMenuAside.tsx +0 -1
  561. package/src/LearningPaths/LearningPathMenuAsideCopyright.tsx +0 -1
  562. package/src/LearningPaths/LearningPathMenuContent.tsx +0 -1
  563. package/src/LearningPaths/LearningPathMenuIntro.tsx +1 -1
  564. package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +1 -1
  565. package/src/LearningPaths/LearningPathMobileHeader.tsx +0 -1
  566. package/src/LearningPaths/LearningPathMobileStepInfo.tsx +0 -1
  567. package/src/LearningPaths/LearningPathSticky.tsx +1 -1
  568. package/src/LearningPaths/LearningPathWrapper.tsx +1 -1
  569. package/src/LetterFilter/LetterFilter.stories.tsx +0 -1
  570. package/src/LetterFilter/LetterFilter.tsx +1 -1
  571. package/src/LicenseByline/EmbedByline.stories.tsx +0 -1
  572. package/src/LinkBlock/LinkBlock.stories.tsx +18 -8
  573. package/src/LinkBlock/LinkBlock.tsx +2 -8
  574. package/src/LinkBlock/LinkBlockSection.tsx +42 -0
  575. package/src/LinkBlock/index.ts +1 -0
  576. package/src/Logo/Logo.tsx +0 -1
  577. package/src/Logo/SvgLogo.tsx +0 -1
  578. package/src/Masthead/Masthead.tsx +1 -1
  579. package/src/Masthead/MastheadSearchModal.tsx +1 -1
  580. package/src/Masthead/SkipToMainContent.tsx +0 -1
  581. package/src/MediaList/MediaList.tsx +1 -1
  582. package/src/Messages/MessageBanner.tsx +0 -1
  583. package/src/Messages/MessageBox.tsx +0 -1
  584. package/src/Messages/MessageBoxTag.tsx +0 -1
  585. package/src/MultidisciplinarySubject/List.tsx +0 -1
  586. package/src/MultidisciplinarySubject/ListItem.tsx +0 -1
  587. package/src/MultidisciplinarySubject/MultidisciplinarySubject.tsx +1 -1
  588. package/src/MyNdla/Resource/Folder.stories.tsx +0 -1
  589. package/src/MyNdla/Resource/Folder.tsx +1 -1
  590. package/src/MyNdla/Resource/FolderInput.tsx +1 -1
  591. package/src/NDLAFilm/AboutNdlaFilm.tsx +1 -1
  592. package/src/NDLAFilm/AllMoviesAlphabetically.tsx +1 -1
  593. package/src/NDLAFilm/FilmContentCard.tsx +1 -1
  594. package/src/NDLAFilm/FilmContentCardTags.tsx +0 -1
  595. package/src/NDLAFilm/FilmMovieList.tsx +0 -1
  596. package/src/NDLAFilm/FilmMovieSearch.tsx +1 -1
  597. package/src/NDLAFilm/FilmSlideshow.tsx +1 -1
  598. package/src/NDLAFilm/MovieGrid.tsx +0 -1
  599. package/src/NDLAFilm/NavigationArrow.tsx +0 -1
  600. package/src/NDLAFilm/SlideshowIndicator.tsx +0 -1
  601. package/src/NDLAFilm/VisualElement.tsx +0 -1
  602. package/src/Navigation/NavigationBox.tsx +2 -2
  603. package/src/Navigation/NavigationTopicAbout.tsx +1 -1
  604. package/src/NoContentBox/NoContentBox.tsx +0 -1
  605. package/src/Notion/ConceptNotion.tsx +1 -1
  606. package/src/Notion/FigureNotion.tsx +1 -1
  607. package/src/Notion/Notion.tsx +1 -1
  608. package/src/Notion/NotionImage.tsx +0 -1
  609. package/src/Notion/NotionVisualElement.tsx +1 -1
  610. package/src/Programme/Programme.tsx +0 -1
  611. package/src/Programme/ProgrammeSubjects.tsx +1 -1
  612. package/src/ProgrammeCard/ProgrammeCard.stories.tsx +0 -1
  613. package/src/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
  614. package/src/RelatedArticleList/RelatedArticleList.tsx +1 -1
  615. package/src/Resource/BlockResource.stories.tsx +0 -1
  616. package/src/Resource/BlockResource.tsx +1 -1
  617. package/src/Resource/ListResource.tsx +1 -1
  618. package/src/Resource/Resource.stories.tsx +0 -1
  619. package/src/Resource/resourceComponents.tsx +1 -1
  620. package/src/ResourceBox/ResourceBox.tsx +1 -1
  621. package/src/ResourceGroup/ResourceGroup.tsx +1 -1
  622. package/src/ResourceGroup/ResourceItem.tsx +1 -1
  623. package/src/ResourceGroup/ResourceList.tsx +1 -1
  624. package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +0 -1
  625. package/src/ResourcesWrapper/ResourcesWrapper.tsx +1 -1
  626. package/src/Search/ActiveFilterContent.tsx +1 -1
  627. package/src/Search/ActiveFilters.tsx +0 -1
  628. package/src/Search/ContentTypeResult.tsx +1 -1
  629. package/src/Search/LoadingWrapper.tsx +0 -1
  630. package/src/Search/SearchField.tsx +1 -1
  631. package/src/Search/SearchFieldForm.tsx +1 -1
  632. package/src/Search/SearchResult.tsx +1 -1
  633. package/src/Search/SearchResultSleeve.tsx +1 -1
  634. package/src/Search/ToggleSearchButton.tsx +1 -1
  635. package/src/SearchTypeResult/ActiveFilterContent.tsx +1 -1
  636. package/src/SearchTypeResult/ActiveFilters.tsx +1 -1
  637. package/src/SearchTypeResult/PopupFilter.tsx +1 -1
  638. package/src/SearchTypeResult/ResultNavigation.tsx +0 -1
  639. package/src/SearchTypeResult/SearchFieldHeader.tsx +1 -1
  640. package/src/SearchTypeResult/SearchFilterContent.tsx +0 -1
  641. package/src/SearchTypeResult/SearchHeader.tsx +1 -2
  642. package/src/SearchTypeResult/SearchItem.tsx +1 -1
  643. package/src/SearchTypeResult/SearchItemList.tsx +1 -1
  644. package/src/SearchTypeResult/SearchItems.tsx +1 -1
  645. package/src/SearchTypeResult/SearchNotionsResult.tsx +1 -1
  646. package/src/SearchTypeResult/SearchSubjectItem.tsx +0 -1
  647. package/src/SearchTypeResult/SearchSubjectResult.tsx +0 -1
  648. package/src/SearchTypeResult/SearchTypeHeader.tsx +1 -1
  649. package/src/SearchTypeResult/SearchTypeResult.tsx +1 -1
  650. package/src/SearchTypeResult/SearchViewType.tsx +0 -1
  651. package/src/SearchTypeResult/components/ItemContexts.tsx +1 -1
  652. package/src/SearchTypeResult/components/ItemResourceHeader.tsx +1 -1
  653. package/src/SearchTypeResult/components/ItemTopicHeader.tsx +1 -1
  654. package/src/SearchTypeResult/components/SubjectFilters.tsx +1 -1
  655. package/src/SectionHeading/SectionHeading.tsx +1 -1
  656. package/src/SnackBar/DefaultSnackbar.tsx +0 -1
  657. package/src/SnackBar/SnackbarProvider.tsx +1 -1
  658. package/src/Subject/Subject.tsx +1 -1
  659. package/src/Subject/SubjectBanner.tsx +0 -1
  660. package/src/Subject/SubjectHeader.tsx +0 -1
  661. package/src/Subject/SubjectNewContent.tsx +0 -1
  662. package/src/Subject/SubjectSocial.tsx +1 -1
  663. package/src/Table/Table.tsx +1 -1
  664. package/src/TagSelector/Control.tsx +0 -1
  665. package/src/TagSelector/DropdownIndicator.tsx +1 -1
  666. package/src/TagSelector/Input.tsx +0 -1
  667. package/src/TagSelector/Menu.tsx +0 -1
  668. package/src/TagSelector/MenuList.tsx +0 -1
  669. package/src/TagSelector/Option.tsx +0 -1
  670. package/src/TagSelector/SelectContainer.tsx +0 -1
  671. package/src/TagSelector/TagSelector.tsx +1 -1
  672. package/src/TagSelector/ValueButton.tsx +0 -1
  673. package/src/ToolboxPage/ToolboxInfo.tsx +1 -1
  674. package/src/Topic/Loader.tsx +0 -1
  675. package/src/Topic/Topic.tsx +58 -39
  676. package/src/Translation/Translation.tsx +1 -1
  677. package/src/Translation/TranslationLine.tsx +1 -1
  678. package/src/TreeStructure/AddFolderButton.tsx +1 -1
  679. package/src/TreeStructure/ComboboxButton.tsx +1 -1
  680. package/src/TreeStructure/FolderItem.tsx +1 -1
  681. package/src/TreeStructure/FolderItems.tsx +1 -1
  682. package/src/TreeStructure/TreeStructure.tsx +1 -1
  683. package/src/User/UserInfo.tsx +0 -1
  684. package/src/index.ts +3 -2
  685. package/src/locale/LocaleProvider.tsx +1 -1
  686. package/src/types.ts +1 -1
  687. package/src/utils/createUniversalPortal.tsx +1 -1
  688. package/lib/Article/ArticleContent.d.ts +0 -7
  689. package/src/Article/ArticleContent.tsx +0 -40
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { useCallback, useMemo, createContext, ReactNode, useState, useContext, useEffect } from 'react';
9
+ import { useCallback, useMemo, createContext, ReactNode, useState, useContext, useEffect } from 'react';
10
10
  import { keyframes } from '@emotion/react';
11
11
  import styled from '@emotion/styled';
12
12
  import { spacing } from '@ndla/core';
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import styled from '@emotion/styled';
3
3
  import { css } from '@emotion/react';
4
4
  import { breakpoints, colors, mq, spacing, spacingUnit } from '@ndla/core';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import styled from '@emotion/styled';
3
2
  import { breakpoints, mq } from '@ndla/core';
4
3
 
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import styled from '@emotion/styled';
3
2
  import { css } from '@emotion/react';
4
3
  import { colors, fonts, mq, spacing, spacingUnit, breakpoints } from '@ndla/core';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import styled from '@emotion/styled';
3
2
  import SafeLink from '@ndla/safelink';
4
3
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
@@ -1,6 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { breakpoints, mq, spacing } from '@ndla/core';
3
- import React, { ReactNode } from 'react';
3
+ import { ReactNode } from 'react';
4
4
  import { HeadingLevel } from '../types';
5
5
  import { SubjectSectionTitle } from './Subject';
6
6
 
@@ -9,7 +9,7 @@
9
9
  import styled from '@emotion/styled';
10
10
  import { colors, spacing } from '@ndla/core';
11
11
  import throttle from 'lodash/throttle';
12
- import React, { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
12
+ import { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
13
13
  import BEMHelper from 'react-bem-helper';
14
14
 
15
15
  type ScrollPosition = 'start' | 'end' | 'center';
@@ -8,7 +8,6 @@
8
8
 
9
9
  import styled from '@emotion/styled';
10
10
  import { spacing, utils } from '@ndla/core';
11
- import React from 'react';
12
11
  import { ControlProps } from 'react-select';
13
12
  import { TagType } from './types';
14
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { ChevronDown, ChevronUp } from '@ndla/icons/common';
10
- import React, { useMemo } from 'react';
10
+ import { useMemo } from 'react';
11
11
  import styled from '@emotion/styled';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { DropdownIndicatorProps, components } from 'react-select';
@@ -8,7 +8,6 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { colors, spacing } from '@ndla/core';
11
- import React from 'react';
12
11
  import { components, InputProps } from 'react-select';
13
12
  import { TagType } from './types';
14
13
  import { StyledValueButton } from './ValueButton';
@@ -8,7 +8,6 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { colors } from '@ndla/core';
11
- import React from 'react';
12
11
  import { MenuProps, components } from 'react-select';
13
12
  import { StyledMenuList } from './MenuList';
14
13
  import { TagType } from './types';
@@ -8,7 +8,6 @@
8
8
 
9
9
  import styled from '@emotion/styled';
10
10
  import { utils } from '@ndla/core';
11
- import React from 'react';
12
11
  import { MenuListProps } from 'react-select';
13
12
  import { TagType } from './types';
14
13
 
@@ -6,7 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import React from 'react';
10
9
  import { OptionProps } from 'react-select';
11
10
  import { buttonStyleV2 as buttonStyle } from '@ndla/button';
12
11
  import styled from '@emotion/styled';
@@ -8,7 +8,6 @@
8
8
 
9
9
  import styled from '@emotion/styled';
10
10
  import { colors, fonts, misc } from '@ndla/core';
11
- import React from 'react';
12
11
  import { ContainerProps } from 'react-select';
13
12
  import { TagType } from './types';
14
13
 
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { KeyboardEvent, useMemo, useState } from 'react';
9
+ import { KeyboardEvent, useMemo, useState } from 'react';
10
10
  import CreatableSelect from 'react-select/creatable';
11
11
  import { MultiValue, StylesConfig } from 'react-select';
12
12
  import styled from '@emotion/styled';
@@ -6,7 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import React from 'react';
10
9
  import { MultiValueProps } from 'react-select';
11
10
  import { buttonStyleV2 as buttonStyle } from '@ndla/button';
12
11
  import styled from '@emotion/styled';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { MouseEvent } from 'react';
9
+ import { MouseEvent } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { breakpoints, fonts, mq } from '@ndla/core';
12
12
  import { useTranslation } from 'react-i18next';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import ContentLoader from '../ContentLoader';
3
2
 
4
3
  const Loader = () => (
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { ReactNode, MouseEvent, ComponentType } from 'react';
9
+ import { ReactNode, MouseEvent, useMemo } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { animations, breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
12
12
 
@@ -17,12 +17,14 @@ import { ButtonV2 } from '@ndla/button';
17
17
  import { CursorClick, ExpandTwoArrows } from '@ndla/icons/action';
18
18
  import { css } from '@emotion/react';
19
19
  import { useTranslation } from 'react-i18next';
20
+ import { EmbedMetaData } from '@ndla/types-embed';
20
21
  import Loader from './Loader';
21
22
  import { ItemProps } from '../Navigation/NavigationBox';
22
23
  import { NavigationBox } from '../Navigation';
23
24
  import { makeSrcQueryString, ImageCrop, ImageFocalPoint } from '../Image';
24
25
  import { MessageBox } from '../Messages';
25
26
  import { Heading } from '../Typography';
27
+ import { getCrop, getFocalPoint } from '../Embed/ImageEmbed';
26
28
 
27
29
  type InvertItProps = {
28
30
  invertedStyle?: boolean;
@@ -71,6 +73,7 @@ const ShowVisualElementWrapper = styled.div`
71
73
  height: 100%;
72
74
  overflow: hidden;
73
75
  aspect-ratio: 1;
76
+ mask-image: radial-gradient(white, black);
74
77
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari fix */
75
78
  `;
76
79
 
@@ -187,31 +190,16 @@ const StyledModalHeader = styled(ModalHeader)`
187
190
  padding: ${spacing.small} ${spacing.nsmall};
188
191
  `;
189
192
 
190
- const icons: Record<VisualElementProps['type'], ComponentType> = {
191
- image: ExpandTwoArrows,
192
- video: PlayCircleFilled,
193
- other: CursorClick,
194
- };
195
-
196
- type VisualElementProps = {
197
- type: 'image' | 'video' | 'other';
198
- element: ReactNode;
199
- };
200
-
201
193
  export type TopicProps = {
202
194
  id?: string;
203
- topic?: {
204
- title: string;
205
- introduction: string;
206
- image?: {
207
- url: string;
208
- alt: string;
209
- crop?: ImageCrop;
210
- focalPoint?: ImageFocalPoint;
211
- };
212
- visualElement?: VisualElementProps;
213
- resources?: ReactNode;
195
+ metaImage?: {
196
+ url: string;
197
+ alt: string;
214
198
  };
199
+ title: string;
200
+ introduction: string;
201
+ resources?: ReactNode;
202
+ visualElementEmbedMeta?: EmbedMetaData;
215
203
  subTopics?: ItemProps[] | null | undefined;
216
204
  onSubTopicSelected?: (event: MouseEvent<HTMLElement>, id?: string) => void;
217
205
  isLoading?: boolean;
@@ -223,11 +211,21 @@ export type TopicProps = {
223
211
  frame?: boolean;
224
212
  messageBox?: string;
225
213
  children?: ReactNode;
214
+ visualElement?: ReactNode;
226
215
  };
227
216
 
217
+ interface MetaImageType {
218
+ url: string;
219
+ alt: string;
220
+ crop?: ImageCrop;
221
+ focalPoint?: ImageFocalPoint;
222
+ }
223
+
228
224
  const Topic = ({
229
225
  id,
230
- topic,
226
+ title,
227
+ introduction,
228
+ resources,
231
229
  subTopics,
232
230
  onSubTopicSelected,
233
231
  isLoading,
@@ -235,17 +233,40 @@ const Topic = ({
235
233
  invertedStyle,
236
234
  onToggleShowContent,
237
235
  showContent,
236
+ metaImage: articleMetaImage,
238
237
  isAdditionalTopic,
239
238
  frame,
240
239
  messageBox,
240
+ visualElementEmbedMeta,
241
241
  children,
242
+ visualElement,
242
243
  }: TopicProps) => {
243
244
  const { t } = useTranslation();
244
245
  const contentId = `expanded-description-${id}`;
245
246
  const testId = 'nav-topic-about';
246
- const VisualElementIcon = topic?.visualElement?.type ? icons[topic.visualElement.type] : null;
247
+
248
+ const VisualElementIcon = useMemo(() => {
249
+ if (!visualElementEmbedMeta || visualElementEmbedMeta.status === 'error') return null;
250
+ else if (visualElementEmbedMeta.resource === 'brightcove') {
251
+ return PlayCircleFilled;
252
+ } else if (visualElementEmbedMeta.resource === 'image') {
253
+ return ExpandTwoArrows;
254
+ } else return CursorClick;
255
+ }, [visualElementEmbedMeta]);
256
+
257
+ const metaImage: MetaImageType | undefined = useMemo(() => {
258
+ if (visualElementEmbedMeta?.resource === 'image' && visualElementEmbedMeta.status === 'success') {
259
+ return {
260
+ url: visualElementEmbedMeta.data.image?.imageUrl,
261
+ alt: visualElementEmbedMeta.data.alttext?.alttext,
262
+ crop: getCrop(visualElementEmbedMeta.embedData),
263
+ focalPoint: getFocalPoint(visualElementEmbedMeta.embedData),
264
+ };
265
+ } else return articleMetaImage;
266
+ }, [articleMetaImage, visualElementEmbedMeta]);
267
+
247
268
  const wrapperStyle = [frame ? frameStyle : undefined, invertedStyle ? _invertedStyle : undefined];
248
- if (isLoading || !topic) {
269
+ if (isLoading) {
249
270
  return (
250
271
  <Wrapper css={wrapperStyle} data-testid={testId}>
251
272
  {isLoading ? <Loader /> : null}
@@ -259,7 +280,7 @@ const Topic = ({
259
280
  <div>
260
281
  <HeadingWrapper>
261
282
  <Heading element="h1" headingStyle="h2" id={id} tabIndex={-1}>
262
- {topic.title}
283
+ {title}
263
284
  </Heading>
264
285
  {isAdditionalTopic && (
265
286
  <>
@@ -268,23 +289,21 @@ const Topic = ({
268
289
  </>
269
290
  )}
270
291
  </HeadingWrapper>
271
- <TopicIntroduction>
272
- {renderMarkdown ? parse(renderMarkdown(topic.introduction)) : topic.introduction}
273
- </TopicIntroduction>
292
+ <TopicIntroduction>{renderMarkdown ? parse(renderMarkdown(introduction)) : introduction}</TopicIntroduction>
274
293
  </div>
275
- {topic.image && (
294
+ {metaImage && (
276
295
  <TopicHeaderVisualElementWrapper>
277
- {topic.visualElement ? (
296
+ {visualElementEmbedMeta?.status === 'success' ? (
278
297
  <Modal>
279
298
  <ModalTrigger>
280
299
  <VisualElementButton
281
300
  variant="stripped"
282
- title={topic.visualElement.type === 'image' ? t('image.largeSize') : t('visualElement.show')}
301
+ title={visualElementEmbedMeta.resource === 'image' ? t('image.largeSize') : t('visualElement.show')}
283
302
  >
284
303
  <ShowVisualElementWrapper>
285
304
  <TopicHeaderImage
286
- src={`${topic.image.url}?${makeSrcQueryString(800, topic.image.crop, topic.image.focalPoint)}`}
287
- alt={topic.image.alt}
305
+ src={`${metaImage.url}?${makeSrcQueryString(800, metaImage.crop, metaImage.focalPoint)}`}
306
+ alt={metaImage.alt}
288
307
  />
289
308
  <TopicHeaderOverlay />
290
309
  </ShowVisualElementWrapper>
@@ -300,13 +319,13 @@ const Topic = ({
300
319
  <StyledModalHeader>
301
320
  <ModalCloseButton />
302
321
  </StyledModalHeader>
303
- {topic.visualElement && topic.visualElement.element}
322
+ {visualElement}
304
323
  </ModalContent>
305
324
  </Modal>
306
325
  ) : (
307
326
  <TopicHeaderImage
308
- src={`${topic.image.url}?${makeSrcQueryString(400, topic.image.crop, topic.image.focalPoint)}`}
309
- alt={topic.image.alt}
327
+ src={`${metaImage.url}?${makeSrcQueryString(400, metaImage.crop, metaImage.focalPoint)}`}
328
+ alt={metaImage.alt}
310
329
  />
311
330
  )}
312
331
  </TopicHeaderVisualElementWrapper>
@@ -349,7 +368,7 @@ const Topic = ({
349
368
  invertedStyle={invertedStyle}
350
369
  />
351
370
  )}
352
- {topic.resources}
371
+ {resources}
353
372
  </Wrapper>
354
373
  );
355
374
  };
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { ReactNode } from 'react';
9
+ import { ReactNode } from 'react';
10
10
  import BEMHelper from 'react-bem-helper';
11
11
 
12
12
  const classes = new BEMHelper({
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { ReactNode } from 'react';
9
+ import { ReactNode } from 'react';
10
10
  import BEMHelper from 'react-bem-helper';
11
11
 
12
12
  const classes = new BEMHelper({
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { useRef } from 'react';
9
+ import { useRef } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import Tooltip from '@ndla/tooltip';
12
12
  import styled from '@emotion/styled';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { KeyboardEvent, forwardRef } from 'react';
9
+ import { KeyboardEvent, forwardRef } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { useForwardedRef } from '@ndla/util';
12
12
  import { breakpoints, colors, mq, spacing } from '@ndla/core';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { CSSProperties, KeyboardEvent, useEffect, useMemo, useRef } from 'react';
9
+ import { CSSProperties, KeyboardEvent, useEffect, useMemo, useRef } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
12
  import { ArrowDropDownRounded } from '@ndla/icons/common';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { ReactNode } from 'react';
9
+ import { ReactNode } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { animations } from '@ndla/core';
12
12
  import { IFolder } from '@ndla/types-backend/learningpath-api';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { useEffect, useState, useMemo, useRef } from 'react';
9
+ import { useEffect, useState, useMemo, useRef } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { colors, fonts, misc, utils } from '@ndla/core';
12
12
  import uniq from 'lodash/uniq';
@@ -7,7 +7,6 @@
7
7
 
8
8
  import styled from '@emotion/styled';
9
9
  import { spacing } from '@ndla/core';
10
- import React from 'react';
11
10
  import { useTranslation } from 'react-i18next';
12
11
  import { FeideUserApiType } from './apiTypes';
13
12
  import { parseUserObject } from './parseUserObject';
package/src/index.ts CHANGED
@@ -28,7 +28,6 @@ export {
28
28
 
29
29
  export {
30
30
  ArticleByline,
31
- ArticleContent,
32
31
  ArticleFootNotes,
33
32
  ArticleIntroduction,
34
33
  ArticleTitle,
@@ -264,7 +263,7 @@ export { KeyFigure } from './KeyFigure';
264
263
  export { default as ContactBlock } from './ContactBlock';
265
264
  export type { HeartButtonType } from './Embed';
266
265
  export { CampaignBlock } from './CampaignBlock';
267
- export { Grid } from './Grid';
266
+ export { Grid, GridParallaxItem } from './Grid';
268
267
  export type { GridType } from './Grid';
269
268
  export { Heading } from './Typography';
270
269
  export type { HeadingLevel } from './types';
@@ -274,3 +273,5 @@ export { DefinitionTerm, DefinitionDescription } from './DefinitionList';
274
273
  export type { ProgrammeV2 } from './ProgrammeCard';
275
274
 
276
275
  export { Gloss } from './Gloss';
276
+
277
+ export { LinkBlock, LinkBlockSection } from './LinkBlock';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import React, { ReactNode } from 'react';
9
+ import { ReactNode } from 'react';
10
10
  import { I18nextProvider, useTranslation } from 'react-i18next';
11
11
  import { i18nInstance } from '../i18n';
12
12
  import { Locale } from '../types';
package/src/types.ts CHANGED
@@ -68,7 +68,7 @@ export interface FootNote {
68
68
  export interface Article {
69
69
  title: string;
70
70
  introduction: string;
71
- content: string | ReactNode;
71
+ content: ReactNode;
72
72
  footNotes: Array<FootNote>;
73
73
  copyright: Copyright;
74
74
  published: string;
@@ -8,7 +8,7 @@
8
8
 
9
9
  // N.B This helper is intended to be used in https://github.com/ndlano/article-converter. It is not a general soultion for using portals in SSR applications.
10
10
 
11
- import React, { ReactNode } from 'react';
11
+ import { ReactNode } from 'react';
12
12
  import ReactDOM from 'react-dom';
13
13
 
14
14
  function canUseDOM() {
@@ -1,7 +0,0 @@
1
- import { Locale } from '../types';
2
- type Props = {
3
- content: string;
4
- locale: Locale;
5
- };
6
- declare const ArticleContent: ({ content, locale, ...rest }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
7
- export default ArticleContent;
@@ -1,40 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-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 React, { useEffect } from 'react';
10
- import {
11
- initArticleScripts,
12
- removeEventListenerForResize,
13
- // @ts-ignore
14
- } from '@ndla/article-scripts';
15
- import { initPopovers, initTooltips } from '@ndla/tooltip';
16
- import { initAudioPlayers } from '../AudioPlayer';
17
- import { initCopyParagraphButtons } from '../CopyParagraphButton';
18
- import { Locale } from '../types';
19
-
20
- type Props = {
21
- content: string;
22
- locale: Locale;
23
- };
24
- const ArticleContent = ({ content, locale, ...rest }: Props) => {
25
- useEffect(() => {
26
- removeEventListenerForResize();
27
- initArticleScripts();
28
- initAudioPlayers(locale);
29
- initTooltips();
30
- initPopovers();
31
- initCopyParagraphButtons();
32
- return () => {
33
- removeEventListenerForResize();
34
- };
35
- }, [content, locale]);
36
-
37
- return <div dangerouslySetInnerHTML={{ __html: content }} {...rest} />;
38
- };
39
-
40
- export default ArticleContent;