@ndla/ui 41.2.3 → 41.2.5

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 (457) hide show
  1. package/es/Animation/index.js +0 -1
  2. package/es/Article/Article.js +1 -1
  3. package/es/Article/ArticleByline.js +1 -1
  4. package/es/AudioPlayer/AudioPlayer.js +1 -1
  5. package/es/AudioPlayer/Controls.js +1 -1
  6. package/es/BlogPost/BlogPost.js +4 -4
  7. package/es/Breadcrumb/Breadcrumb.js +2 -2
  8. package/es/CompetenceGoalTab/CompetenceGoalTab.js +1 -1
  9. package/es/CopyParagraphButton/CopyParagraphButton.js +1 -1
  10. package/es/CopyParagraphButton/CopyParagraphButtonV2.js +1 -1
  11. package/es/Embed/BrightcoveEmbed.js +1 -1
  12. package/es/Embed/ConceptEmbed.js +1 -1
  13. package/es/Embed/ImageEmbed.js +1 -1
  14. package/es/FactBox/FactBoxV2.js +1 -1
  15. package/es/Filter/FilterButtons.js +1 -1
  16. package/es/Filter/FilterCarousel.js +1 -1
  17. package/es/Filter/FilterList.js +1 -1
  18. package/es/Filter/FilterListPhone.js +1 -1
  19. package/es/Frontpage/FrontpageProgramMenu.js +1 -1
  20. package/es/Grid/Grid.js +16 -11
  21. package/es/KeyFigure/KeyFigure.js +10 -10
  22. package/es/LearningPaths/LearningPathMenu.js +1 -1
  23. package/es/LicenseByline/EmbedByline.js +4 -12
  24. package/es/LicenseByline/LicenseLink.js +2 -2
  25. package/es/Masthead/MastheadSearchModal.js +1 -1
  26. package/es/Masthead/utils.js +1 -1
  27. package/es/MultidisciplinarySubject/index.js +0 -2
  28. package/es/NDLAFilm/AllMoviesAlphabetically.js +1 -1
  29. package/es/NDLAFilm/CategorySelect.js +1 -1
  30. package/es/NDLAFilm/FilmSlideshow.js +1 -1
  31. package/es/Navigation/NavigationBox.js +1 -1
  32. package/es/ProgrammeCard/ProgrammeCard.js +1 -1
  33. package/es/RadioButtonGroup/RadioButtonGroup.js +2 -4
  34. package/es/RelatedArticleList/RelatedArticleV2.js +1 -1
  35. package/es/Search/ContentTypeResult.js +1 -1
  36. package/es/Search/SearchResultSleeve.js +1 -1
  37. package/es/SearchTypeResult/PopupFilter.js +1 -1
  38. package/es/SearchTypeResult/SearchFieldHeader.js +1 -1
  39. package/es/SearchTypeResult/SearchHeader.js +1 -1
  40. package/es/SearchTypeResult/components/SubjectFilters.js +1 -1
  41. package/es/SnackBar/SnackbarProvider.js +1 -1
  42. package/es/Table/Table.js +1 -1
  43. package/es/TagSelector/TagSelector.js +1 -1
  44. package/es/TreeStructure/FolderItem.js +1 -1
  45. package/es/TreeStructure/TreeStructure.js +2 -2
  46. package/es/User/UserInfo.js +1 -1
  47. package/es/User/parseUserObject.js +1 -1
  48. package/es/all.css +1 -1
  49. package/es/index.js +1 -6
  50. package/es/locale/messages-en.js +5 -5
  51. package/es/locale/messages-nb.js +5 -5
  52. package/es/locale/messages-nn.js +5 -5
  53. package/es/locale/messages-se.js +5 -5
  54. package/es/locale/messages-sma.js +5 -5
  55. package/lib/Animation/Fade.js +4 -4
  56. package/lib/Animation/index.d.ts +0 -1
  57. package/lib/Animation/index.js +2 -9
  58. package/lib/Article/Article.js +19 -19
  59. package/lib/Article/ArticleAccessMessage.js +6 -6
  60. package/lib/Article/ArticleByline.js +12 -12
  61. package/lib/Article/ArticleContent.js +3 -3
  62. package/lib/Article/ArticleFootNotes.js +5 -5
  63. package/lib/Article/ArticleHeaderWrapper.js +5 -5
  64. package/lib/Article/ArticleNotions.js +8 -8
  65. package/lib/Article/ArticleSideBar.js +5 -5
  66. package/lib/Article/index.js +10 -10
  67. package/lib/Aside/Aside.js +4 -4
  68. package/lib/Aside/index.js +4 -4
  69. package/lib/AudioPlayer/AudioPlayer.js +22 -22
  70. package/lib/AudioPlayer/Controls.js +26 -26
  71. package/lib/AudioPlayer/SpeechControl.js +5 -5
  72. package/lib/AudioPlayer/index.js +5 -5
  73. package/lib/AudioPlayer/initAudioPlayers.js +6 -6
  74. package/lib/BannerCard/BannerCard.js +10 -10
  75. package/lib/BannerCard/index.js +2 -2
  76. package/lib/BlogPost/BlogPost.js +10 -10
  77. package/lib/BlogPost/index.js +2 -2
  78. package/lib/BlogPosts/BlogPost.js +7 -7
  79. package/lib/BlogPosts/BlogPostWrapper.js +4 -4
  80. package/lib/BlogPosts/index.js +3 -3
  81. package/lib/Breadcrumb/ActionBreadcrumb.js +8 -8
  82. package/lib/Breadcrumb/Breadcrumb.js +9 -9
  83. package/lib/Breadcrumb/BreadcrumbItem.js +8 -8
  84. package/lib/Breadcrumb/HeaderBreadcrumb.js +7 -7
  85. package/lib/Breadcrumb/HomeBreadcrumb.js +10 -10
  86. package/lib/Breadcrumb/index.js +7 -7
  87. package/lib/CampaignBlock/CampaignBlock.js +7 -7
  88. package/lib/CampaignBlock/index.js +2 -2
  89. package/lib/CompetenceGoalTab/CompetenceGoalItem.js +10 -10
  90. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +11 -11
  91. package/lib/CompetenceGoalTab/CompetenceItem.js +10 -10
  92. package/lib/CompetenceGoalTab/index.js +4 -4
  93. package/lib/ContactBlock/ContactBlock.js +15 -15
  94. package/lib/ContactBlock/index.js +4 -4
  95. package/lib/ContentLoader/index.js +3 -3
  96. package/lib/ContentPlaceholder/ContentPlaceholder.js +6 -6
  97. package/lib/ContentPlaceholder/index.js +4 -4
  98. package/lib/ContentTypeBadge/ContentTypeBadge.js +3 -3
  99. package/lib/ContentTypeBadge/index.js +2 -2
  100. package/lib/CopyParagraphButton/CopyParagraphButton.js +8 -8
  101. package/lib/CopyParagraphButton/CopyParagraphButtonV2.js +7 -7
  102. package/lib/CopyParagraphButton/index.js +7 -7
  103. package/lib/CopyParagraphButton/initCopyParagraphButtons.js +4 -4
  104. package/lib/CreatedBy/CreatedBy.js +8 -8
  105. package/lib/CreatedBy/index.js +4 -4
  106. package/lib/DefinitionList/DefinitionDescription.js +4 -4
  107. package/lib/DefinitionList/DefinitionTerm.js +4 -4
  108. package/lib/DefinitionList/index.js +3 -3
  109. package/lib/Dialog/Dialog.js +2 -2
  110. package/lib/Dialog/index.js +2 -2
  111. package/lib/Embed/AudioEmbed.js +6 -6
  112. package/lib/Embed/BrightcoveEmbed.js +8 -8
  113. package/lib/Embed/ConceptEmbed.js +14 -14
  114. package/lib/Embed/ConceptListEmbed.js +5 -5
  115. package/lib/Embed/ContentLinkEmbed.js +4 -4
  116. package/lib/Embed/EmbedErrorPlaceholder.js +5 -5
  117. package/lib/Embed/ExternalEmbed.js +5 -5
  118. package/lib/Embed/FootnoteEmbed.js +2 -2
  119. package/lib/Embed/H5pEmbed.js +5 -5
  120. package/lib/Embed/IframeEmbed.js +2 -2
  121. package/lib/Embed/ImageEmbed.js +7 -7
  122. package/lib/Embed/RelatedContentEmbed.js +2 -2
  123. package/lib/Embed/UnknownEmbed.js +4 -4
  124. package/lib/Embed/conceptComponents.js +9 -9
  125. package/lib/Embed/index.js +13 -13
  126. package/lib/ErrorMessage/ErrorMessage.js +10 -10
  127. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +5 -5
  128. package/lib/ErrorMessage/index.js +5 -5
  129. package/lib/FactBox/FactBox.js +4 -4
  130. package/lib/FactBox/FactBoxV2.js +9 -9
  131. package/lib/FactBox/index.js +5 -5
  132. package/lib/Figure/Figure.js +5 -5
  133. package/lib/Figure/FigureBylineExpandButton.js +1 -1
  134. package/lib/Figure/FigureExpandButton.js +1 -1
  135. package/lib/Figure/FigureLicense.js +2 -2
  136. package/lib/Figure/FigureLicenseDialog.js +2 -2
  137. package/lib/Figure/FigureOpenDialogButton.js +1 -1
  138. package/lib/Figure/index.js +2 -2
  139. package/lib/FileList/File.js +7 -7
  140. package/lib/FileList/FileList.js +7 -7
  141. package/lib/FileList/FileListV2.js +6 -6
  142. package/lib/FileList/FileV2.js +4 -4
  143. package/lib/FileList/PdfFile.js +2 -2
  144. package/lib/FileList/index.js +8 -8
  145. package/lib/Filter/FilterButtons.js +16 -16
  146. package/lib/Filter/FilterCarousel.js +8 -8
  147. package/lib/Filter/FilterList.js +6 -6
  148. package/lib/Filter/FilterListPhone.js +9 -9
  149. package/lib/Filter/ToggleItem.js +3 -3
  150. package/lib/Filter/filterClasses.js +2 -2
  151. package/lib/Filter/index.js +5 -5
  152. package/lib/Footer/EditorName.js +1 -1
  153. package/lib/Footer/Footer.js +13 -13
  154. package/lib/Footer/FooterLinks.js +9 -9
  155. package/lib/Footer/FooterPrivacy.js +6 -6
  156. package/lib/Footer/FooterText.js +2 -2
  157. package/lib/Footer/index.js +2 -2
  158. package/lib/Frontpage/FrontpageAllSubjects.js +14 -14
  159. package/lib/Frontpage/FrontpageFilm.js +8 -8
  160. package/lib/Frontpage/FrontpageHeader.js +9 -9
  161. package/lib/Frontpage/FrontpageInfo.js +4 -4
  162. package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +13 -13
  163. package/lib/Frontpage/FrontpageProgramMenu.js +10 -10
  164. package/lib/Frontpage/FrontpageSearch.js +7 -7
  165. package/lib/Frontpage/FrontpageToolbox.js +8 -8
  166. package/lib/Frontpage/illustrations/Fellesfag.js +3 -3
  167. package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.js +3 -3
  168. package/lib/Frontpage/illustrations/FrontpageIllustrations.js +3 -3
  169. package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.js +3 -3
  170. package/lib/Frontpage/illustrations/MenuFellesfag.js +3 -3
  171. package/lib/Frontpage/illustrations/MenuStudiespesialiserende.js +3 -3
  172. package/lib/Frontpage/illustrations/MenuYrkesfag.js +3 -3
  173. package/lib/Frontpage/illustrations/Studiespesialiserende.js +3 -3
  174. package/lib/Frontpage/illustrations/Yrkesfag.js +3 -3
  175. package/lib/Frontpage/illustrations/index.js +14 -14
  176. package/lib/Frontpage/index.js +9 -9
  177. package/lib/Grid/Grid.d.ts +3 -2
  178. package/lib/Grid/Grid.js +21 -16
  179. package/lib/Grid/index.js +2 -2
  180. package/lib/Hero/Hero.js +3 -3
  181. package/lib/Image/Image.js +5 -5
  182. package/lib/Image/ImageLink.js +2 -2
  183. package/lib/Image/LazyLoadImage.js +3 -3
  184. package/lib/Image/index.js +4 -4
  185. package/lib/InfoBlock/InfoBlock.js +8 -8
  186. package/lib/InfoBox/InfoBox.js +4 -4
  187. package/lib/InfoBox/index.js +2 -2
  188. package/lib/InfoWidget/InfoWidget.js +12 -12
  189. package/lib/InfoWidget/index.js +4 -4
  190. package/lib/KeyFigure/KeyFigure.js +17 -17
  191. package/lib/KeyFigure/index.js +2 -2
  192. package/lib/LanguageSelector/LanguageSelector.js +8 -8
  193. package/lib/LanguageSelector/index.js +2 -2
  194. package/lib/Layout/Content.js +3 -3
  195. package/lib/Layout/LayoutItem.js +3 -3
  196. package/lib/Layout/OneColumn.js +4 -4
  197. package/lib/Layout/PageContainer.js +4 -4
  198. package/lib/Layout/index.js +7 -7
  199. package/lib/LearningPaths/LearningPathContent.js +2 -2
  200. package/lib/LearningPaths/LearningPathInformation.js +4 -4
  201. package/lib/LearningPaths/LearningPathLastStepNavigation.js +8 -8
  202. package/lib/LearningPaths/LearningPathMenu.js +12 -12
  203. package/lib/LearningPaths/LearningPathMenuAside.js +5 -5
  204. package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +5 -5
  205. package/lib/LearningPaths/LearningPathMenuContent.js +11 -11
  206. package/lib/LearningPaths/LearningPathMenuIntro.js +7 -7
  207. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +4 -4
  208. package/lib/LearningPaths/LearningPathMobileHeader.js +5 -5
  209. package/lib/LearningPaths/LearningPathMobileStepInfo.js +4 -4
  210. package/lib/LearningPaths/LearningPathSticky.js +4 -4
  211. package/lib/LearningPaths/LearningPathWrapper.js +2 -2
  212. package/lib/LearningPaths/index.js +5 -5
  213. package/lib/LetterFilter/LetterFilter.js +6 -6
  214. package/lib/LetterFilter/index.js +4 -4
  215. package/lib/LicenseByline/EmbedByline.js +14 -22
  216. package/lib/LicenseByline/LicenseDescription.js +5 -5
  217. package/lib/LicenseByline/LicenseLink.js +7 -7
  218. package/lib/LicenseByline/index.js +2 -2
  219. package/lib/List/OrderedList.js +4 -4
  220. package/lib/List/UnOrderedList.js +4 -4
  221. package/lib/List/index.js +3 -3
  222. package/lib/Logo/Logo.js +7 -7
  223. package/lib/Logo/SvgLogo.js +3 -3
  224. package/lib/Logo/index.js +4 -4
  225. package/lib/Masthead/Masthead.js +8 -8
  226. package/lib/Masthead/MastheadSearchModal.js +8 -8
  227. package/lib/Masthead/SkipToMainContent.js +4 -4
  228. package/lib/Masthead/index.js +6 -6
  229. package/lib/Masthead/utils.js +1 -1
  230. package/lib/MediaList/MediaList.js +3 -3
  231. package/lib/Messages/MessageBanner.js +6 -6
  232. package/lib/Messages/MessageBox.js +10 -10
  233. package/lib/Messages/MessageBoxTag.js +4 -4
  234. package/lib/Messages/index.js +4 -4
  235. package/lib/MultidisciplinarySubject/List.js +7 -7
  236. package/lib/MultidisciplinarySubject/ListItem.js +11 -11
  237. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +13 -13
  238. package/lib/MultidisciplinarySubject/index.d.ts +0 -2
  239. package/lib/MultidisciplinarySubject/index.js +4 -11
  240. package/lib/MyNdla/Resource/Folder.js +11 -11
  241. package/lib/MyNdla/Resource/FolderInput.js +6 -6
  242. package/lib/MyNdla/Resource/FolderMenu.js +9 -9
  243. package/lib/MyNdla/Resource/index.js +3 -3
  244. package/lib/MyNdla/SettingsMenu.js +7 -7
  245. package/lib/MyNdla/index.js +5 -5
  246. package/lib/NDLAFilm/AboutNdlaFilm.js +5 -5
  247. package/lib/NDLAFilm/AllMoviesAlphabetically.js +16 -16
  248. package/lib/NDLAFilm/CategorySelect.js +9 -9
  249. package/lib/NDLAFilm/FilmContentCard.js +7 -7
  250. package/lib/NDLAFilm/FilmContentCardTags.js +5 -5
  251. package/lib/NDLAFilm/FilmMovieList.js +5 -5
  252. package/lib/NDLAFilm/FilmMovieSearch.js +8 -8
  253. package/lib/NDLAFilm/FilmSlideshow.js +12 -12
  254. package/lib/NDLAFilm/MovieGrid.js +6 -6
  255. package/lib/NDLAFilm/NavigationArrow.js +5 -5
  256. package/lib/NDLAFilm/SlideshowIndicator.js +5 -5
  257. package/lib/NDLAFilm/VisualElement.js +5 -5
  258. package/lib/NDLAFilm/filmStyles.js +2 -2
  259. package/lib/NDLAFilm/index.js +7 -7
  260. package/lib/Navigation/NavigationBox.js +17 -17
  261. package/lib/Navigation/NavigationTopicAbout.js +13 -13
  262. package/lib/Navigation/index.js +3 -3
  263. package/lib/NoContentBox/NoContentBox.js +3 -3
  264. package/lib/NoContentBox/index.js +4 -4
  265. package/lib/Notion/ConceptNotion.js +10 -10
  266. package/lib/Notion/FigureNotion.js +4 -4
  267. package/lib/Notion/Notion.js +8 -8
  268. package/lib/Notion/NotionImage.js +3 -3
  269. package/lib/Notion/NotionVisualElement.js +5 -5
  270. package/lib/Notion/index.js +4 -4
  271. package/lib/Programme/Programme.js +12 -12
  272. package/lib/Programme/ProgrammeSubjects.js +5 -5
  273. package/lib/Programme/index.js +5 -5
  274. package/lib/ProgrammeCard/ProgrammeCard.js +7 -7
  275. package/lib/ProgrammeCard/index.js +2 -2
  276. package/lib/RadioButtonGroup/RadioButtonGroup.js +17 -19
  277. package/lib/RadioButtonGroup/index.js +4 -4
  278. package/lib/RelatedArticleList/RelatedArticleList.js +7 -7
  279. package/lib/RelatedArticleList/RelatedArticleV2.js +7 -7
  280. package/lib/RelatedArticleList/index.js +4 -4
  281. package/lib/Resource/BlockResource.js +13 -13
  282. package/lib/Resource/ListResource.js +13 -13
  283. package/lib/Resource/index.js +3 -3
  284. package/lib/Resource/resourceComponents.js +12 -12
  285. package/lib/ResourceBox/ResourceBox.js +9 -9
  286. package/lib/ResourceBox/index.js +2 -2
  287. package/lib/ResourceGroup/ResourceGroup.js +5 -5
  288. package/lib/ResourceGroup/ResourceItem.js +17 -17
  289. package/lib/ResourceGroup/ResourceList.js +6 -6
  290. package/lib/ResourceGroup/index.js +4 -4
  291. package/lib/ResourcesWrapper/ResourcesTopicTitle.js +11 -11
  292. package/lib/ResourcesWrapper/ResourcesWrapper.js +4 -4
  293. package/lib/ResourcesWrapper/index.js +5 -5
  294. package/lib/Search/ActiveFilterContent.js +6 -6
  295. package/lib/Search/ActiveFilters.js +9 -9
  296. package/lib/Search/ContentTypeResult.js +9 -9
  297. package/lib/Search/ContentTypeResultStyles.js +7 -7
  298. package/lib/Search/LoadingWrapper.js +4 -4
  299. package/lib/Search/SearchField.js +7 -7
  300. package/lib/Search/SearchFieldForm.js +2 -2
  301. package/lib/Search/SearchResult.js +15 -15
  302. package/lib/Search/SearchResultSleeve.js +14 -14
  303. package/lib/Search/ToggleSearchButton.js +5 -5
  304. package/lib/Search/index.js +4 -4
  305. package/lib/SearchTypeResult/ActiveFilterContent.js +6 -6
  306. package/lib/SearchTypeResult/ActiveFilters.js +10 -10
  307. package/lib/SearchTypeResult/PopupFilter.js +12 -12
  308. package/lib/SearchTypeResult/ResultNavigation.js +7 -7
  309. package/lib/SearchTypeResult/SearchFieldHeader.js +10 -10
  310. package/lib/SearchTypeResult/SearchFilterContent.js +6 -6
  311. package/lib/SearchTypeResult/SearchHeader.js +16 -16
  312. package/lib/SearchTypeResult/SearchItem.js +16 -16
  313. package/lib/SearchTypeResult/SearchItemList.js +19 -19
  314. package/lib/SearchTypeResult/SearchItems.js +7 -7
  315. package/lib/SearchTypeResult/SearchNotionsResult.js +7 -7
  316. package/lib/SearchTypeResult/SearchSubjectItem.js +7 -7
  317. package/lib/SearchTypeResult/SearchSubjectResult.js +5 -5
  318. package/lib/SearchTypeResult/SearchTypeHeader.js +14 -14
  319. package/lib/SearchTypeResult/SearchTypeResult.js +9 -9
  320. package/lib/SearchTypeResult/SearchViewType.js +7 -7
  321. package/lib/SearchTypeResult/components/ItemContexts.js +10 -10
  322. package/lib/SearchTypeResult/components/ItemResourceHeader.js +14 -14
  323. package/lib/SearchTypeResult/components/ItemTopicHeader.js +8 -8
  324. package/lib/SearchTypeResult/components/SubjectFilters.js +8 -8
  325. package/lib/SearchTypeResult/index.js +7 -7
  326. package/lib/SectionHeading/SectionHeading.js +3 -3
  327. package/lib/SectionHeading/index.js +4 -4
  328. package/lib/SnackBar/DefaultSnackbar.js +5 -5
  329. package/lib/SnackBar/SnackbarProvider.js +8 -8
  330. package/lib/SnackBar/index.js +2 -2
  331. package/lib/Subject/Subject.js +10 -10
  332. package/lib/Subject/SubjectBanner.js +4 -4
  333. package/lib/Subject/SubjectHeader.js +7 -7
  334. package/lib/Subject/SubjectNewContent.js +12 -12
  335. package/lib/Subject/SubjectSocial.js +3 -3
  336. package/lib/Subject/index.js +4 -4
  337. package/lib/Table/Table.js +10 -10
  338. package/lib/Table/index.js +4 -4
  339. package/lib/TagSelector/Control.js +4 -4
  340. package/lib/TagSelector/DropdownIndicator.js +5 -5
  341. package/lib/TagSelector/Input.js +3 -3
  342. package/lib/TagSelector/Menu.js +3 -3
  343. package/lib/TagSelector/MenuList.js +4 -4
  344. package/lib/TagSelector/Option.js +5 -5
  345. package/lib/TagSelector/SelectContainer.js +4 -4
  346. package/lib/TagSelector/TagSelector.js +16 -16
  347. package/lib/TagSelector/ValueButton.js +4 -4
  348. package/lib/TagSelector/index.js +2 -2
  349. package/lib/ToolboxPage/ToolboxInfo.js +4 -4
  350. package/lib/ToolboxPage/index.js +2 -2
  351. package/lib/Topic/Loader.js +4 -4
  352. package/lib/Topic/Topic.js +19 -19
  353. package/lib/Topic/index.js +4 -4
  354. package/lib/Translation/Translation.js +4 -4
  355. package/lib/Translation/TranslationLine.js +4 -4
  356. package/lib/Translation/index.js +3 -3
  357. package/lib/TreeStructure/AddFolderButton.js +7 -7
  358. package/lib/TreeStructure/ComboboxButton.js +7 -7
  359. package/lib/TreeStructure/FolderItem.js +12 -12
  360. package/lib/TreeStructure/FolderItems.js +6 -6
  361. package/lib/TreeStructure/TreeStructure.js +17 -17
  362. package/lib/TreeStructure/index.js +2 -2
  363. package/lib/Typography/Heading.js +2 -2
  364. package/lib/Typography/index.js +2 -2
  365. package/lib/User/UserInfo.js +4 -4
  366. package/lib/User/parseUserObject.js +3 -3
  367. package/lib/all.css +1 -1
  368. package/lib/i18n/i18n.js +7 -7
  369. package/lib/index.d.ts +1 -7
  370. package/lib/index.js +43 -84
  371. package/lib/locale/LocaleProvider.js +3 -3
  372. package/lib/locale/messages-en.js +11 -11
  373. package/lib/locale/messages-nb.js +11 -11
  374. package/lib/locale/messages-nn.js +11 -11
  375. package/lib/locale/messages-se.js +11 -11
  376. package/lib/locale/messages-sma.js +11 -11
  377. package/lib/model/index.js +3 -3
  378. package/lib/utils/createUniversalPortal.js +2 -2
  379. package/lib/utils/resourceTypeColor.js +4 -4
  380. package/package.json +14 -15
  381. package/src/Animation/index.ts +0 -2
  382. package/src/BlogPost/BlogPost.stories.tsx +1 -1
  383. package/src/BlogPost/BlogPost.tsx +1 -2
  384. package/src/CampaignBlock/CampaignBlock.stories.tsx +1 -1
  385. package/src/ContactBlock/Contactblock.stories.tsx +1 -1
  386. package/src/Embed/AudioEmbed.stories.tsx +1 -1
  387. package/src/Embed/BrightcoveEmbed.stories.tsx +1 -1
  388. package/src/Embed/ConceptEmbed.stories.tsx +1 -1
  389. package/src/Embed/ExternalEmbed.stories.tsx +1 -1
  390. package/src/Embed/H5pEmbed.stories.tsx +1 -1
  391. package/src/Embed/IframeEmbed.stories.tsx +1 -1
  392. package/src/Embed/ImageEmbed.stories.tsx +1 -1
  393. package/src/Grid/Grid.stories.tsx +6 -4
  394. package/src/Grid/Grid.tsx +52 -17
  395. package/src/KeyFigure/KeyFigure.stories.tsx +1 -1
  396. package/src/KeyFigure/KeyFigure.tsx +2 -3
  397. package/src/LanguageSelector/LanguageSelector.stories.tsx +1 -1
  398. package/src/LearningPaths/LearningPathMenu.stories.tsx +1 -1
  399. package/src/LetterFilter/LetterFilter.stories.tsx +1 -1
  400. package/src/LicenseByline/EmbedByline.stories.tsx +1 -1
  401. package/src/LicenseByline/EmbedByline.tsx +1 -0
  402. package/src/LicenseByline/LicenseLink.tsx +1 -0
  403. package/src/MultidisciplinarySubject/index.ts +0 -2
  404. package/src/MyNdla/Resource/Folder.stories.tsx +1 -1
  405. package/src/ProgrammeCard/ProgrammeCard.stories.tsx +1 -1
  406. package/src/Resource/BlockResource.stories.tsx +1 -1
  407. package/src/Resource/Resource.stories.tsx +1 -1
  408. package/src/Search/component.search-field.scss +0 -14
  409. package/src/index.ts +1 -11
  410. package/src/locale/messages-en.ts +1 -2
  411. package/src/locale/messages-nb.ts +1 -2
  412. package/src/locale/messages-nn.ts +1 -2
  413. package/src/locale/messages-sma.ts +1 -2
  414. package/es/Animation/DisplayOnPageYOffset.js +0 -86
  415. package/es/AuthorInfo/AuthorInfo.js +0 -63
  416. package/es/AuthorInfo/index.js +0 -2
  417. package/es/Breadcrumblist/Breadcrumblist.js +0 -225
  418. package/es/Breadcrumblist/index.js +0 -2
  419. package/es/ContentCard/ContentCard.js +0 -95
  420. package/es/ContentCard/index.js +0 -2
  421. package/es/MultidisciplinarySubject/Illustrations.js +0 -76
  422. package/es/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +0 -112
  423. package/es/Portrait/Portrait.js +0 -42
  424. package/es/Portrait/index.js +0 -10
  425. package/lib/Animation/DisplayOnPageYOffset.d.ts +0 -27
  426. package/lib/Animation/DisplayOnPageYOffset.js +0 -93
  427. package/lib/AuthorInfo/AuthorInfo.d.ts +0 -16
  428. package/lib/AuthorInfo/AuthorInfo.js +0 -70
  429. package/lib/AuthorInfo/index.d.ts +0 -2
  430. package/lib/AuthorInfo/index.js +0 -10
  431. package/lib/Breadcrumblist/Breadcrumblist.d.ts +0 -29
  432. package/lib/Breadcrumblist/Breadcrumblist.js +0 -232
  433. package/lib/Breadcrumblist/index.d.ts +0 -3
  434. package/lib/Breadcrumblist/index.js +0 -10
  435. package/lib/ContentCard/ContentCard.d.ts +0 -12
  436. package/lib/ContentCard/ContentCard.js +0 -102
  437. package/lib/ContentCard/index.d.ts +0 -2
  438. package/lib/ContentCard/index.js +0 -10
  439. package/lib/MultidisciplinarySubject/Illustrations.d.ts +0 -29
  440. package/lib/MultidisciplinarySubject/Illustrations.js +0 -90
  441. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.d.ts +0 -13
  442. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +0 -118
  443. package/lib/Portrait/Portrait.d.ts +0 -15
  444. package/lib/Portrait/Portrait.js +0 -50
  445. package/lib/Portrait/index.d.ts +0 -9
  446. package/lib/Portrait/index.js +0 -17
  447. package/src/Animation/DisplayOnPageYOffset.tsx +0 -66
  448. package/src/AuthorInfo/AuthorInfo.tsx +0 -82
  449. package/src/AuthorInfo/index.ts +0 -3
  450. package/src/Breadcrumblist/Breadcrumblist.tsx +0 -320
  451. package/src/Breadcrumblist/index.ts +0 -4
  452. package/src/ContentCard/ContentCard.tsx +0 -152
  453. package/src/ContentCard/index.ts +0 -3
  454. package/src/MultidisciplinarySubject/Illustrations.tsx +0 -148
  455. package/src/MultidisciplinarySubject/MultidisciplinarySubjectHeader.tsx +0 -125
  456. package/src/Portrait/Portrait.tsx +0 -45
  457. package/src/Portrait/index.ts +0 -11
@@ -1,320 +0,0 @@
1
- /**
2
- * Copyright (c) 2020-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, { ReactNode, useEffect, useState, MouseEvent } from 'react';
10
- import styled from '@emotion/styled';
11
- import { mq, breakpoints, colors } from '@ndla/core';
12
- import {
13
- School as SchoolIcon,
14
- MenuBook as MenuBookIcon,
15
- Bookmark as BookmarkIcon,
16
- Class as ClassIcon,
17
- Home as HomeIcon,
18
- } from '@ndla/icons/action';
19
- import SafeLink from '@ndla/safelink';
20
- import { useTranslation } from 'react-i18next';
21
- import MessageBoxTag from '../Messages/MessageBoxTag';
22
- import { useMastheadHeight } from '../Masthead';
23
-
24
- type WrapperProps = {
25
- startOffset?: number;
26
- isVisible?: boolean;
27
- leftAlign?: boolean;
28
- hideOnNarrow?: boolean;
29
- mastheadHeight?: number;
30
- };
31
-
32
- type InvertItProps = {
33
- invertedStyle?: boolean;
34
- };
35
-
36
- const Wrapper = styled.div<WrapperProps>`
37
- display: flex;
38
- align-items: flex-start;
39
- justify-content: flex-start;
40
- flex-direction: column;
41
- margin: 32px 0 16px;
42
- width: auto;
43
- z-index: 1;
44
- ${(props) => props.hideOnNarrow && `display:none;`}
45
- ${mq.range({ from: breakpoints.wide })} {
46
- display: flex;
47
- margin: 32px 0;
48
- width: 240px;
49
- position: fixed;
50
- left: 22px;
51
- top: ${(props) => props.mastheadHeight || 85}px;
52
- ${(props) =>
53
- props.startOffset &&
54
- `
55
- top: calc(${props.startOffset}px + ${props.mastheadHeight || 85}px);
56
- `}
57
- }
58
- ${mq.range({ from: breakpoints.wide })} {
59
- ${(props) =>
60
- !props.isVisible &&
61
- `
62
- opacity: 0;
63
- transition: opacity 125ms ease-in-out;
64
- `}
65
- }
66
- ${mq.range({ from: breakpoints.ultraWide })} {
67
- margin: 32px 0;
68
- left: 52px;
69
- ${(props) =>
70
- props.leftAlign &&
71
- `
72
- left: 0;
73
- `}
74
- }
75
- ${mq.range({ from: '1440px' })} {
76
- margin-left: 52px;
77
- left: calc((100vw - 1480px) / 2);
78
- ${(props) =>
79
- props.leftAlign &&
80
- `
81
- left: 0;
82
- `}
83
- }
84
- `;
85
- const Heading = styled.div<InvertItProps>`
86
- font-weight: bold;
87
- font-size: 12px;
88
- line-height: 15px;
89
- text-transform: uppercase;
90
- padding: 0 0 10px 10px;
91
- ${(props) =>
92
- props.invertedStyle &&
93
- `
94
- color: #fff;
95
- `}
96
- `;
97
-
98
- const List = styled.ul`
99
- margin: 0 0 20px;
100
- padding: 0;
101
- list-style: none;
102
- width: 100%;
103
- `;
104
-
105
- const ListItem = styled.li<InvertItProps>`
106
- font-size: 16px;
107
- position: relative;
108
- display: flex;
109
- flex-direction: row;
110
- align-items: center;
111
- margin-bottom: 8px;
112
- a {
113
- color: ${colors.brand.primary};
114
- text-decoration: none;
115
- box-shadow: none;
116
- display: inline-block;
117
- width: 99%;
118
- white-space: nowrap;
119
- overflow: hidden;
120
- text-overflow: ellipsis;
121
- ${(props) =>
122
- props.invertedStyle &&
123
- `
124
- color: white;
125
- `}
126
- &:hover {
127
- text-decoration: underline;
128
- color: ${colors.brand.primary};
129
- ${(props) =>
130
- props.invertedStyle &&
131
- `
132
- color: #fff;
133
- `}
134
- }
135
- }
136
- `;
137
-
138
- type IconProps = {
139
- isCurrent: boolean;
140
- invertedStyle?: boolean;
141
- };
142
-
143
- const IconWrapper = styled.span<IconProps>`
144
- margin: 0 8px;
145
- color: ${colors.brand.tertiary};
146
- display: inline-block;
147
- min-width: 24px;
148
- text-align: center;
149
- ${(props) =>
150
- props.isCurrent &&
151
- `
152
- color: ${colors.brand.primary};
153
- `}
154
- ${(props) =>
155
- props.invertedStyle &&
156
- `
157
- color: #fff;
158
- `}
159
- .crumbicon {
160
- width: 24px;
161
- height: 24px;
162
- margin-top: -4px;
163
- }
164
- `;
165
-
166
- const Dot = styled.span<InvertItProps>`
167
- height: 10px;
168
- width: 10px;
169
- background-color: #20588f;
170
- border-radius: 50%;
171
- display: inline-block;
172
- margin-left: -15px;
173
- margin-right: 5px;
174
- ${(props) =>
175
- props.invertedStyle &&
176
- `
177
- background-color: #fff;
178
- `}
179
- `;
180
-
181
- const TypeIcon = (type: string) => {
182
- switch (type) {
183
- case 'Subjecttype':
184
- return <SchoolIcon className="crumbicon" />;
185
- case 'Subject':
186
- return <MenuBookIcon className="crumbicon" />;
187
- case 'Topic':
188
- return <BookmarkIcon className="crumbicon" />;
189
- case 'Subtopic':
190
- case 'SubSubtopic':
191
- return <ClassIcon className="crumbicon" />;
192
- case 'Home':
193
- return <HomeIcon className="crumbicon" />;
194
- default:
195
- return null;
196
- }
197
- };
198
-
199
- export type BreadcrumbItemProps = {
200
- id: string | number;
201
- label: string;
202
- url: string;
203
- typename?: 'Subjecttype' | 'Subject' | 'Topic' | 'Subtopic' | 'SubSubtopic' | 'Home';
204
- isCurrent?: boolean | false;
205
- icon?: ReactNode;
206
- };
207
-
208
- type BreadCrumbProps = {
209
- children?: ReactNode;
210
- items: BreadcrumbItemProps[];
211
- startOffset?: number;
212
- isVisible?: boolean;
213
- invertedStyle?: boolean;
214
- leftAlign?: boolean;
215
- hideOnNarrow?: boolean;
216
- onNav?: (e: MouseEvent<HTMLElement>, item: BreadcrumbItemProps) => void;
217
- messageBoxTagMessage?: string;
218
- };
219
-
220
- const Breadcrumblist = ({
221
- children,
222
- items,
223
- startOffset = 0,
224
- isVisible = true,
225
- invertedStyle,
226
- leftAlign,
227
- hideOnNarrow,
228
- onNav,
229
- messageBoxTagMessage,
230
- }: BreadCrumbProps) => {
231
- const { t } = useTranslation();
232
- const [wrapperOffset, setWrapperOffset] = useState(startOffset);
233
- const [useScrollEvent, setUseScrollEvent] = useState(false);
234
-
235
- const { height: mastheadHeight } = useMastheadHeight();
236
-
237
- useEffect(() => {
238
- const handleScroll = () => {
239
- let position = 0;
240
- if (window.pageYOffset < startOffset) {
241
- position = startOffset;
242
- }
243
- setWrapperOffset(position);
244
- };
245
-
246
- if (useScrollEvent) {
247
- window.addEventListener('scroll', handleScroll, { passive: true });
248
- } else {
249
- window.removeEventListener('scroll', handleScroll);
250
- }
251
-
252
- return () => {
253
- window.removeEventListener('scroll', handleScroll);
254
- };
255
- }, [useScrollEvent, startOffset]);
256
-
257
- const checkScreenSize = () => {
258
- if (window.innerWidth >= 1301) {
259
- // Wide. If larger, and there is a startOffset, the breadcrumb is positioned absolute at start
260
- setUseScrollEvent(true);
261
- } else {
262
- setUseScrollEvent(false);
263
- }
264
- };
265
-
266
- useEffect(() => {
267
- checkScreenSize();
268
- window.addEventListener('resize', checkScreenSize);
269
-
270
- return () => {
271
- window.removeEventListener('resize', checkScreenSize);
272
- };
273
- }, []);
274
-
275
- return (
276
- <>
277
- <Wrapper
278
- leftAlign={leftAlign}
279
- startOffset={wrapperOffset}
280
- hideOnNarrow={hideOnNarrow}
281
- isVisible={isVisible}
282
- mastheadHeight={mastheadHeight}
283
- >
284
- {items.length > 0 && (
285
- <>
286
- <Heading invertedStyle={invertedStyle}>{t('breadcrumb.youAreHere')}</Heading>
287
- {messageBoxTagMessage && <MessageBoxTag tagMessage={messageBoxTagMessage} />}
288
- <List data-testid="breadcrumb-list">
289
- {items.map((item: BreadcrumbItemProps) => {
290
- const { id, label, url, typename, icon, isCurrent = false } = item;
291
- return (
292
- <ListItem invertedStyle={invertedStyle} key={`${id}-${typename}`}>
293
- {isCurrent && <Dot invertedStyle={invertedStyle} />}
294
- <SafeLink
295
- className="linkitem"
296
- to={url}
297
- onClick={(e: MouseEvent<HTMLElement>) => {
298
- onNav && onNav(e, item);
299
- }}
300
- aria-label={label}
301
- >
302
- <IconWrapper invertedStyle={invertedStyle} isCurrent={isCurrent}>
303
- {icon && icon}
304
- {typename && TypeIcon(typename)}
305
- </IconWrapper>
306
- <span>{label}</span>
307
- </SafeLink>
308
- </ListItem>
309
- );
310
- })}
311
- </List>
312
- </>
313
- )}
314
- {children}
315
- </Wrapper>
316
- </>
317
- );
318
- };
319
-
320
- export default Breadcrumblist;
@@ -1,4 +0,0 @@
1
- import Breadcrumblist from './Breadcrumblist';
2
-
3
- export type { BreadcrumbItemProps } from './Breadcrumblist';
4
- export default Breadcrumblist;
@@ -1,152 +0,0 @@
1
- import React from 'react';
2
- import styled from '@emotion/styled';
3
- import { Play } from '@ndla/icons/common';
4
- import SafeLink from '@ndla/safelink';
5
- import type { SafeLinkProps } from '@ndla/safelink';
6
- import { breakpoints, colors, fonts, mq, spacing, spacingUnit } from '@ndla/core';
7
-
8
- interface ContentCardContainerProps {
9
- columnWidth: number;
10
- }
11
- const ContentCardContainer = styled.article<ContentCardContainerProps>`
12
- position: relative;
13
- display: block;
14
- width: ${(p) => `${p.columnWidth}px`};
15
- `;
16
-
17
- const StyledHeading = styled.h1`
18
- font-weight: ${fonts.weight.semibold};
19
- ${fonts.sizes('14px', '16px')};
20
- margin: ${spacing.xsmall} 0;
21
- color: ${colors.brand.primary};
22
-
23
- ${mq.range({ from: breakpoints.tablet })} {
24
- margin: ${spacing.small} 0 ${spacing.xsmall};
25
- ${fonts.sizes('20px', '22px')};
26
- }
27
- `;
28
-
29
- const ContentCardLink = styled(SafeLink)`
30
- color: ${colors.text.primary};
31
- &:hover,
32
- &:focus {
33
- ${StyledHeading} {
34
- text-decoration: underline;
35
- }
36
- }
37
- `;
38
-
39
- const ImageWrapper = styled.div`
40
- width: 100%;
41
- height: 72px;
42
- border-radius: 5px;
43
- position: relative;
44
- overflow: hidden;
45
- background: ${colors.background.grayDark};
46
- ${mq.range({ from: breakpoints.tablet })} {
47
- height: ${spacingUnit * 4.5}px;
48
- }
49
- `;
50
-
51
- interface BackgroundImageProps {
52
- image: string;
53
- }
54
- const BackgroundImage = styled.div<BackgroundImageProps>`
55
- display: flex;
56
- height: 100%;
57
- width: 100%;
58
- background-position: center center;
59
- background-size: cover;
60
- background-image: url(${(p) => p.image});
61
- `;
62
-
63
- const PlayBackground = styled.div`
64
- position: absolute;
65
- left: 50%;
66
- top: 50%;
67
- transform: translate3d(-50%, -50%, 0);
68
- height: 35px;
69
- width: 35px;
70
- background-color: rgba(0, 0, 0, 0.48);
71
- border-radius: 100%;
72
- display: flex;
73
- align-items: center;
74
- justify-content: center;
75
- ${mq.range({ from: breakpoints.tablet })} {
76
- height: 42px;
77
- width: 42px;
78
- }
79
-
80
- .c-icon {
81
- color: ${colors.white};
82
- height: 20px;
83
- width: 20px;
84
- margin-right: -1px;
85
-
86
- ${mq.range({ from: breakpoints.tablet })} {
87
- height: 25px;
88
- width: 25px;
89
- }
90
- }
91
- `;
92
-
93
- const StyledContentType = styled.p`
94
- ${fonts.sizes('12px', '20px')};
95
- position: absolute;
96
- left: ${spacing.small};
97
- bottom: ${spacing.small};
98
- display: inline-block;
99
- background: ${colors.brand.greyLightest};
100
- border-radius: 2px;
101
- font-weight: 600;
102
- margin: 0;
103
- padding: 0 ${spacing.xxsmall};
104
-
105
- display: none;
106
- ${mq.range({ from: breakpoints.tablet })} {
107
- display: inline-block;
108
- }
109
- `;
110
-
111
- const StyledDescription = styled.p`
112
- ${fonts.sizes('16px')};
113
- line-height: 1.25rem;
114
- margin: 0;
115
- display: none;
116
-
117
- ${mq.range({ from: breakpoints.tablet })} {
118
- display: block;
119
- }
120
- `;
121
-
122
- interface Props {
123
- title: string;
124
- text: string;
125
- type: string;
126
- image: string;
127
- isFilm?: boolean;
128
- toLinkProps: () => SafeLinkProps;
129
- columnWidth: number;
130
- }
131
-
132
- const ContentCard = ({ title, text, image, type, isFilm = false, toLinkProps, columnWidth }: Props) => (
133
- <ContentCardContainer columnWidth={columnWidth}>
134
- <ContentCardLink {...toLinkProps()} title={title}>
135
- <header>
136
- <ImageWrapper>
137
- <BackgroundImage image={image} role="img" aria-label={title} />
138
- {isFilm && (
139
- <PlayBackground>
140
- <Play />
141
- </PlayBackground>
142
- )}
143
- <StyledContentType>{type}</StyledContentType>
144
- </ImageWrapper>
145
- <StyledHeading>{title}</StyledHeading>
146
- </header>
147
- <StyledDescription>{text}</StyledDescription>
148
- </ContentCardLink>
149
- </ContentCardContainer>
150
- );
151
-
152
- export default ContentCard;
@@ -1,3 +0,0 @@
1
- import ContentCard from './ContentCard';
2
-
3
- export default ContentCard;