@ndla/ui 50.2.1 → 50.4.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 (634) hide show
  1. package/es/Article/Article.js +6 -6
  2. package/es/Article/ArticleByline.js +8 -8
  3. package/es/Article/ArticleFootNotes.js +3 -3
  4. package/es/Article/ArticleNotions.js +5 -5
  5. package/es/Aside/index.js +8 -0
  6. package/es/AudioPlayer/AudioPlayer.js +16 -16
  7. package/es/AudioPlayer/Controls.js +26 -26
  8. package/es/AudioPlayer/SpeechControl.js +1 -1
  9. package/es/AudioPlayer/index.js +8 -0
  10. package/es/BannerCard/BannerCard.js +7 -7
  11. package/es/BlogPost/BlogPost.js +6 -6
  12. package/es/Breadcrumb/Breadcrumb.js +3 -3
  13. package/es/Breadcrumb/BreadcrumbItem.js +8 -8
  14. package/es/CampaignBlock/CampaignBlock.js +8 -8
  15. package/es/CompetenceGoalTab/CompetenceGoalTab.js +4 -4
  16. package/es/CompetenceGoalTab/CompetenceItem.js +7 -7
  17. package/es/CompetenceGoalTab/index.js +8 -0
  18. package/es/ContactBlock/ContactBlock.js +14 -14
  19. package/es/ContentTypeBadge/ContentTypeBadge.js +9 -1
  20. package/es/ContentTypeBadge/index.js +8 -0
  21. package/es/CopyParagraphButton/CopyParagraphButton.js +3 -3
  22. package/es/DefinitionList/DefinitionDescription.js +2 -2
  23. package/es/DefinitionList/DefinitionTerm.js +2 -2
  24. package/es/Embed/AudioEmbed.js +1 -1
  25. package/es/Embed/BrightcoveEmbed.js +6 -6
  26. package/es/Embed/ConceptEmbed.js +15 -15
  27. package/es/Embed/ConceptListEmbed.js +3 -3
  28. package/es/Embed/EmbedErrorPlaceholder.js +3 -3
  29. package/es/Embed/ExternalEmbed.js +2 -2
  30. package/es/Embed/FootnoteEmbed.js +1 -1
  31. package/es/Embed/ImageEmbed.js +6 -6
  32. package/es/Embed/conceptComponents.js +12 -12
  33. package/es/ErrorMessage/ErrorResourceAccessDenied.js +2 -2
  34. package/es/FactBox/FactBox.js +55 -37
  35. package/es/FactBox/index.js +8 -0
  36. package/es/Figure/FigureOpenDialogButton.js +1 -1
  37. package/es/FileList/File.js +4 -4
  38. package/es/FileList/FileList.js +4 -4
  39. package/es/FileList/index.js +8 -0
  40. package/es/Filter/FilterButtons.js +11 -11
  41. package/es/Filter/FilterCarousel.js +5 -5
  42. package/es/Filter/FilterList.js +2 -2
  43. package/es/Filter/FilterListPhone.js +4 -4
  44. package/es/Filter/ToggleItem.js +1 -1
  45. package/es/Filter/filterClasses.js +1 -1
  46. package/es/Footer/Footer.js +9 -9
  47. package/es/Footer/FooterLinks.js +16 -8
  48. package/es/Footer/index.js +1 -1
  49. package/es/Frontpage/FrontpageAllSubjects.js +18 -10
  50. package/es/FrontpageArticle/FrontpageArticle.js +1 -1
  51. package/es/Gloss/Gloss.js +9 -9
  52. package/es/Grid/Grid.js +2 -2
  53. package/es/Image/Image.js +2 -2
  54. package/es/Image/ImageLink.js +1 -1
  55. package/es/KeyFigure/KeyFigure.js +5 -5
  56. package/es/KeyFigure/index.js +1 -1
  57. package/es/LanguageSelector/LanguageSelector.js +8 -8
  58. package/es/LanguageSelector/index.js +8 -0
  59. package/es/LearningPaths/LearningPathLastStepNavigation.js +6 -6
  60. package/es/LearningPaths/LearningPathMenu.js +8 -8
  61. package/es/LearningPaths/LearningPathMenuAside.js +6 -6
  62. package/es/LearningPaths/LearningPathMenuAsideCopyright.js +3 -3
  63. package/es/LearningPaths/LearningPathMenuContent.js +6 -6
  64. package/es/LearningPaths/LearningPathMenuIntro.js +7 -7
  65. package/es/LearningPaths/LearningPathMenuModalWrapper.js +5 -5
  66. package/es/LearningPaths/LearningPathMobileHeader.js +3 -3
  67. package/es/LearningPaths/LearningPathMobileStepInfo.js +2 -2
  68. package/es/LearningPaths/LearningPathSticky.js +4 -4
  69. package/es/LearningPaths/index.js +2 -2
  70. package/es/LetterFilter/LetterFilter.js +3 -3
  71. package/es/LicenseByline/EmbedByline.js +7 -7
  72. package/es/LicenseByline/LicenseDescription.js +1 -1
  73. package/es/LicenseByline/LicenseLink.js +3 -3
  74. package/es/LicenseByline/index.js +8 -0
  75. package/es/LinkBlock/LinkBlock.js +8 -8
  76. package/es/LinkBlock/LinkBlockSection.js +2 -2
  77. package/es/List/OrderedList.js +2 -2
  78. package/es/List/UnOrderedList.js +2 -2
  79. package/es/Masthead/Masthead.js +4 -4
  80. package/es/Masthead/SkipToMainContent.js +9 -1
  81. package/es/Masthead/index.js +1 -1
  82. package/es/MediaList/MediaList.js +6 -8
  83. package/es/Messages/MessageBanner.js +4 -4
  84. package/es/Messages/MessageBox.js +7 -7
  85. package/es/Messages/index.js +1 -1
  86. package/es/MyNdla/Resource/Folder.js +10 -10
  87. package/es/MyNdla/Resource/FolderInput.js +6 -6
  88. package/es/MyNdla/index.js +8 -0
  89. package/es/NDLAFilm/AllMoviesAlphabetically.js +12 -12
  90. package/es/NDLAFilm/FilmContentCard.js +5 -5
  91. package/es/NDLAFilm/FilmContentCardTags.js +10 -2
  92. package/es/NDLAFilm/FilmMovieList.js +5 -4
  93. package/es/NDLAFilm/FilmMovieSearch.js +5 -5
  94. package/es/NDLAFilm/FilmSlideshow.js +9 -9
  95. package/es/NDLAFilm/MovieGrid.js +11 -3
  96. package/es/NDLAFilm/filmStyles.js +11 -3
  97. package/es/NDLAFilm/index.js +4 -5
  98. package/es/Navigation/NavigationBox.js +29 -21
  99. package/es/Notion/Notion.js +4 -4
  100. package/es/Notion/NotionImage.js +6 -5
  101. package/es/Notion/index.js +8 -0
  102. package/es/Programme/Programme.js +15 -7
  103. package/es/Programme/ProgrammeSubjects.js +2 -2
  104. package/es/ProgrammeCard/ProgrammeCard.js +4 -4
  105. package/es/RelatedArticleList/RelatedArticleList.js +64 -30
  106. package/es/Resource/BlockResource.js +8 -8
  107. package/es/Resource/ListResource.js +7 -7
  108. package/es/Resource/resourceComponents.js +16 -16
  109. package/es/Resource/storyComponents.js +2 -2
  110. package/es/ResourceBox/ResourceBox.js +6 -7
  111. package/es/ResourceGroup/ResourceGroup.js +4 -4
  112. package/es/ResourceGroup/ResourceItem.js +11 -11
  113. package/es/ResourceGroup/ResourceList.js +2 -2
  114. package/es/ResourcesWrapper/ResourcesTopicTitle.js +22 -14
  115. package/es/Search/ActiveFilterContent.js +11 -3
  116. package/es/Search/ActiveFilters.js +15 -7
  117. package/es/Search/ContentTypeResult.js +12 -4
  118. package/es/Search/ContentTypeResultStyles.js +19 -11
  119. package/es/Search/IsPathToHighlight.js +8 -0
  120. package/es/Search/LoadingWrapper.js +9 -1
  121. package/es/Search/SearchField.js +4 -4
  122. package/es/Search/SearchFieldForm.js +10 -2
  123. package/es/Search/SearchResult.js +23 -15
  124. package/es/Search/SearchResultSleeve.js +10 -10
  125. package/es/Search/index.js +1 -1
  126. package/es/SearchTypeResult/ActiveFilterContent.js +5 -5
  127. package/es/SearchTypeResult/ActiveFilters.js +7 -7
  128. package/es/SearchTypeResult/PopupFilter.js +9 -9
  129. package/es/SearchTypeResult/ResultNavigation.js +5 -5
  130. package/es/SearchTypeResult/SearchFieldHeader.js +6 -6
  131. package/es/SearchTypeResult/SearchHeader.js +10 -10
  132. package/es/SearchTypeResult/SearchItem.js +11 -11
  133. package/es/SearchTypeResult/SearchItemList.js +13 -13
  134. package/es/SearchTypeResult/SearchItems.js +2 -2
  135. package/es/SearchTypeResult/SearchNotionsResult.js +5 -5
  136. package/es/SearchTypeResult/SearchSubjectItem.js +5 -5
  137. package/es/SearchTypeResult/SearchTypeHeader.js +10 -10
  138. package/es/SearchTypeResult/SearchTypeResult.js +4 -4
  139. package/es/SearchTypeResult/SearchViewType.js +6 -6
  140. package/es/SearchTypeResult/components/ItemContexts.js +9 -9
  141. package/es/SearchTypeResult/components/ItemResourceHeader.js +7 -7
  142. package/es/SearchTypeResult/components/ItemTopicHeader.js +4 -4
  143. package/es/SearchTypeResult/components/SubjectFilters.js +2 -2
  144. package/es/SearchTypeResult/index.js +3 -3
  145. package/es/SectionHeading/SectionHeading.js +10 -2
  146. package/es/SectionHeading/index.js +8 -0
  147. package/es/Subject/SubjectBanner.js +9 -1
  148. package/es/Subject/SubjectHeader.js +11 -3
  149. package/es/Subject/index.js +8 -0
  150. package/es/Table/Table.js +9 -9
  151. package/es/TagSelector/Control.js +1 -1
  152. package/es/TagSelector/DropdownIndicator.js +2 -2
  153. package/es/TagSelector/Input.js +2 -2
  154. package/es/TagSelector/Menu.js +2 -2
  155. package/es/TagSelector/MenuList.js +1 -1
  156. package/es/TagSelector/Option.js +2 -2
  157. package/es/TagSelector/SelectContainer.js +1 -1
  158. package/es/TagSelector/TagSelector.js +9 -9
  159. package/es/TagSelector/ValueButton.js +1 -1
  160. package/es/Topic/Loader.js +8 -0
  161. package/es/Topic/Topic.js +23 -23
  162. package/es/TreeStructure/AddFolderButton.js +3 -3
  163. package/es/TreeStructure/ComboboxButton.js +5 -5
  164. package/es/TreeStructure/FolderItem.js +9 -9
  165. package/es/TreeStructure/FolderItems.js +2 -2
  166. package/es/TreeStructure/TreeStructure.js +8 -8
  167. package/es/TreeStructure/helperFunctions.js +8 -0
  168. package/es/all.css +1 -1
  169. package/es/i18n/i18n.js +3 -3
  170. package/es/index.js +1 -1
  171. package/es/locale/messages-en.js +12 -259
  172. package/es/locale/messages-nb.js +12 -259
  173. package/es/locale/messages-nn.js +12 -259
  174. package/es/locale/messages-se.js +12 -259
  175. package/es/locale/messages-sma.js +12 -259
  176. package/lib/Article/Article.js +6 -6
  177. package/lib/Article/ArticleByline.js +8 -8
  178. package/lib/Article/ArticleFootNotes.d.ts +7 -0
  179. package/lib/Article/ArticleFootNotes.js +3 -3
  180. package/lib/Article/ArticleNotions.js +5 -5
  181. package/lib/Aside/index.d.ts +7 -0
  182. package/lib/Aside/index.js +7 -0
  183. package/lib/AudioPlayer/AudioPlayer.js +16 -16
  184. package/lib/AudioPlayer/Controls.js +26 -26
  185. package/lib/AudioPlayer/SpeechControl.js +1 -1
  186. package/lib/AudioPlayer/index.d.ts +7 -0
  187. package/lib/AudioPlayer/index.js +7 -0
  188. package/lib/BannerCard/BannerCard.js +7 -7
  189. package/lib/BlogPost/BlogPost.js +6 -6
  190. package/lib/Breadcrumb/Breadcrumb.js +3 -3
  191. package/lib/Breadcrumb/BreadcrumbItem.js +8 -8
  192. package/lib/CampaignBlock/CampaignBlock.js +8 -8
  193. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +4 -4
  194. package/lib/CompetenceGoalTab/CompetenceItem.js +7 -7
  195. package/lib/CompetenceGoalTab/index.d.ts +7 -0
  196. package/lib/CompetenceGoalTab/index.js +7 -0
  197. package/lib/ContactBlock/ContactBlock.js +14 -14
  198. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +7 -0
  199. package/lib/ContentTypeBadge/ContentTypeBadge.js +9 -1
  200. package/lib/ContentTypeBadge/index.d.ts +7 -0
  201. package/lib/ContentTypeBadge/index.js +7 -0
  202. package/lib/CopyParagraphButton/CopyParagraphButton.js +3 -3
  203. package/lib/DefinitionList/DefinitionDescription.js +2 -2
  204. package/lib/DefinitionList/DefinitionTerm.js +2 -2
  205. package/lib/Embed/AudioEmbed.js +1 -1
  206. package/lib/Embed/BrightcoveEmbed.js +6 -6
  207. package/lib/Embed/ConceptEmbed.js +15 -15
  208. package/lib/Embed/ConceptListEmbed.js +3 -3
  209. package/lib/Embed/EmbedErrorPlaceholder.js +3 -3
  210. package/lib/Embed/ExternalEmbed.js +2 -2
  211. package/lib/Embed/FootnoteEmbed.js +1 -1
  212. package/lib/Embed/ImageEmbed.js +6 -6
  213. package/lib/Embed/conceptComponents.d.ts +1 -1
  214. package/lib/Embed/conceptComponents.js +12 -12
  215. package/lib/Embed/types.d.ts +1 -1
  216. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +2 -2
  217. package/lib/FactBox/FactBox.d.ts +6 -3
  218. package/lib/FactBox/FactBox.js +54 -36
  219. package/lib/FactBox/index.d.ts +7 -0
  220. package/lib/FactBox/index.js +7 -0
  221. package/lib/Figure/FigureOpenDialogButton.js +1 -1
  222. package/lib/FileList/File.js +4 -4
  223. package/lib/FileList/FileList.js +4 -4
  224. package/lib/FileList/index.d.ts +7 -0
  225. package/lib/FileList/index.js +7 -0
  226. package/lib/Filter/FilterButtons.js +11 -11
  227. package/lib/Filter/FilterCarousel.js +5 -5
  228. package/lib/Filter/FilterList.d.ts +7 -0
  229. package/lib/Filter/FilterList.js +2 -2
  230. package/lib/Filter/FilterListPhone.d.ts +7 -0
  231. package/lib/Filter/FilterListPhone.js +4 -4
  232. package/lib/Filter/ToggleItem.d.ts +7 -0
  233. package/lib/Filter/ToggleItem.js +1 -1
  234. package/lib/Filter/filterClasses.d.ts +7 -0
  235. package/lib/Filter/filterClasses.js +1 -1
  236. package/lib/Footer/Footer.js +9 -9
  237. package/lib/Footer/FooterLinks.d.ts +7 -0
  238. package/lib/Footer/FooterLinks.js +15 -9
  239. package/lib/Footer/index.d.ts +1 -1
  240. package/lib/Footer/index.js +1 -1
  241. package/lib/Frontpage/FrontpageAllSubjects.d.ts +7 -0
  242. package/lib/Frontpage/FrontpageAllSubjects.js +17 -11
  243. package/lib/FrontpageArticle/FrontpageArticle.js +1 -1
  244. package/lib/Gloss/Gloss.js +9 -9
  245. package/lib/Grid/Grid.js +2 -2
  246. package/lib/Image/Image.js +2 -2
  247. package/lib/Image/ImageLink.js +1 -1
  248. package/lib/KeyFigure/KeyFigure.d.ts +7 -0
  249. package/lib/KeyFigure/KeyFigure.js +5 -5
  250. package/lib/KeyFigure/index.d.ts +7 -0
  251. package/lib/LanguageSelector/LanguageSelector.js +8 -8
  252. package/lib/LanguageSelector/index.d.ts +7 -0
  253. package/lib/LearningPaths/LearningPathLastStepNavigation.js +6 -6
  254. package/lib/LearningPaths/LearningPathMenu.js +8 -8
  255. package/lib/LearningPaths/LearningPathMenuAside.js +6 -6
  256. package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +3 -3
  257. package/lib/LearningPaths/LearningPathMenuContent.js +6 -6
  258. package/lib/LearningPaths/LearningPathMenuIntro.js +7 -7
  259. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +5 -5
  260. package/lib/LearningPaths/LearningPathMobileHeader.js +3 -3
  261. package/lib/LearningPaths/LearningPathMobileStepInfo.js +2 -2
  262. package/lib/LearningPaths/LearningPathSticky.js +4 -4
  263. package/lib/LearningPaths/index.d.ts +2 -2
  264. package/lib/LearningPaths/index.js +2 -2
  265. package/lib/LetterFilter/LetterFilter.js +3 -3
  266. package/lib/LicenseByline/EmbedByline.d.ts +1 -1
  267. package/lib/LicenseByline/EmbedByline.js +7 -7
  268. package/lib/LicenseByline/LicenseDescription.js +1 -1
  269. package/lib/LicenseByline/LicenseLink.js +3 -3
  270. package/lib/LicenseByline/index.d.ts +7 -0
  271. package/lib/LinkBlock/LinkBlock.js +8 -8
  272. package/lib/LinkBlock/LinkBlockSection.js +2 -2
  273. package/lib/List/OrderedList.js +2 -2
  274. package/lib/List/UnOrderedList.js +2 -2
  275. package/lib/Masthead/Masthead.js +4 -4
  276. package/lib/Masthead/SkipToMainContent.d.ts +7 -0
  277. package/lib/Masthead/SkipToMainContent.js +9 -1
  278. package/lib/Masthead/index.d.ts +1 -1
  279. package/lib/Masthead/index.js +1 -1
  280. package/lib/MediaList/MediaList.d.ts +7 -0
  281. package/lib/MediaList/MediaList.js +6 -8
  282. package/lib/Messages/MessageBanner.js +4 -4
  283. package/lib/Messages/MessageBox.js +7 -7
  284. package/lib/Messages/index.d.ts +1 -1
  285. package/lib/Messages/index.js +1 -1
  286. package/lib/MyNdla/Resource/Folder.js +10 -10
  287. package/lib/MyNdla/Resource/FolderInput.js +6 -6
  288. package/lib/MyNdla/index.d.ts +7 -0
  289. package/lib/NDLAFilm/AllMoviesAlphabetically.js +12 -12
  290. package/lib/NDLAFilm/FilmContentCard.js +5 -5
  291. package/lib/NDLAFilm/FilmContentCardTags.d.ts +7 -0
  292. package/lib/NDLAFilm/FilmContentCardTags.js +10 -2
  293. package/lib/NDLAFilm/FilmMovieList.d.ts +2 -1
  294. package/lib/NDLAFilm/FilmMovieList.js +5 -4
  295. package/lib/NDLAFilm/FilmMovieSearch.js +5 -5
  296. package/lib/NDLAFilm/FilmSlideshow.js +9 -9
  297. package/lib/NDLAFilm/MovieGrid.d.ts +7 -0
  298. package/lib/NDLAFilm/MovieGrid.js +11 -3
  299. package/lib/NDLAFilm/filmStyles.d.ts +7 -0
  300. package/lib/NDLAFilm/filmStyles.js +11 -3
  301. package/lib/NDLAFilm/index.d.ts +4 -5
  302. package/lib/NDLAFilm/index.js +3 -10
  303. package/lib/NDLAFilm/types.d.ts +7 -0
  304. package/lib/Navigation/NavigationBox.d.ts +7 -0
  305. package/lib/Navigation/NavigationBox.js +28 -22
  306. package/lib/Notion/Notion.js +4 -4
  307. package/lib/Notion/NotionImage.d.ts +2 -1
  308. package/lib/Notion/NotionImage.js +6 -5
  309. package/lib/Notion/index.d.ts +7 -0
  310. package/lib/Programme/Programme.d.ts +7 -0
  311. package/lib/Programme/Programme.js +14 -8
  312. package/lib/Programme/ProgrammeSubjects.js +2 -2
  313. package/lib/ProgrammeCard/ProgrammeCard.js +4 -4
  314. package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
  315. package/lib/RelatedArticleList/RelatedArticleList.js +64 -30
  316. package/lib/Resource/BlockResource.js +8 -8
  317. package/lib/Resource/ListResource.js +7 -7
  318. package/lib/Resource/resourceComponents.js +16 -16
  319. package/lib/Resource/storyComponents.js +2 -2
  320. package/lib/ResourceBox/ResourceBox.d.ts +0 -1
  321. package/lib/ResourceBox/ResourceBox.js +6 -7
  322. package/lib/ResourceGroup/ResourceGroup.js +4 -4
  323. package/lib/ResourceGroup/ResourceItem.js +11 -11
  324. package/lib/ResourceGroup/ResourceList.js +2 -2
  325. package/lib/ResourcesWrapper/ResourcesTopicTitle.d.ts +7 -0
  326. package/lib/ResourcesWrapper/ResourcesTopicTitle.js +21 -15
  327. package/lib/Search/ActiveFilterContent.d.ts +7 -0
  328. package/lib/Search/ActiveFilterContent.js +11 -3
  329. package/lib/Search/ActiveFilters.d.ts +7 -0
  330. package/lib/Search/ActiveFilters.js +14 -8
  331. package/lib/Search/ContentTypeResult.d.ts +7 -0
  332. package/lib/Search/ContentTypeResult.js +12 -4
  333. package/lib/Search/ContentTypeResultStyles.d.ts +7 -0
  334. package/lib/Search/ContentTypeResultStyles.js +19 -11
  335. package/lib/Search/IsPathToHighlight.d.ts +7 -0
  336. package/lib/Search/IsPathToHighlight.js +8 -0
  337. package/lib/Search/LoadingWrapper.d.ts +7 -0
  338. package/lib/Search/LoadingWrapper.js +9 -1
  339. package/lib/Search/SearchField.d.ts +7 -0
  340. package/lib/Search/SearchField.js +4 -4
  341. package/lib/Search/SearchFieldForm.d.ts +7 -0
  342. package/lib/Search/SearchFieldForm.js +10 -2
  343. package/lib/Search/SearchResult.d.ts +7 -0
  344. package/lib/Search/SearchResult.js +23 -15
  345. package/lib/Search/SearchResultSleeve.d.ts +7 -0
  346. package/lib/Search/SearchResultSleeve.js +10 -10
  347. package/lib/Search/index.d.ts +1 -1
  348. package/lib/Search/index.js +1 -1
  349. package/lib/SearchTypeResult/ActiveFilterContent.js +5 -5
  350. package/lib/SearchTypeResult/ActiveFilters.js +7 -7
  351. package/lib/SearchTypeResult/PopupFilter.js +9 -9
  352. package/lib/SearchTypeResult/ResultNavigation.js +5 -5
  353. package/lib/SearchTypeResult/SearchFieldHeader.js +6 -6
  354. package/lib/SearchTypeResult/SearchHeader.d.ts +1 -1
  355. package/lib/SearchTypeResult/SearchHeader.js +10 -10
  356. package/lib/SearchTypeResult/SearchItem.d.ts +1 -1
  357. package/lib/SearchTypeResult/SearchItem.js +11 -11
  358. package/lib/SearchTypeResult/SearchItemList.js +13 -13
  359. package/lib/SearchTypeResult/SearchItems.js +2 -2
  360. package/lib/SearchTypeResult/SearchNotionsResult.js +5 -5
  361. package/lib/SearchTypeResult/SearchSubjectItem.js +5 -5
  362. package/lib/SearchTypeResult/SearchTypeHeader.js +10 -10
  363. package/lib/SearchTypeResult/SearchTypeResult.d.ts +3 -3
  364. package/lib/SearchTypeResult/SearchTypeResult.js +4 -4
  365. package/lib/SearchTypeResult/SearchViewType.js +6 -6
  366. package/lib/SearchTypeResult/components/ItemContexts.js +9 -9
  367. package/lib/SearchTypeResult/components/ItemResourceHeader.d.ts +1 -1
  368. package/lib/SearchTypeResult/components/ItemResourceHeader.js +7 -7
  369. package/lib/SearchTypeResult/components/ItemTopicHeader.js +4 -4
  370. package/lib/SearchTypeResult/components/SubjectFilters.d.ts +1 -1
  371. package/lib/SearchTypeResult/components/SubjectFilters.js +2 -2
  372. package/lib/SearchTypeResult/index.d.ts +3 -3
  373. package/lib/SearchTypeResult/index.js +3 -3
  374. package/lib/SectionHeading/SectionHeading.d.ts +7 -0
  375. package/lib/SectionHeading/SectionHeading.js +10 -2
  376. package/lib/SectionHeading/index.d.ts +7 -0
  377. package/lib/SectionHeading/index.js +7 -0
  378. package/lib/Subject/SubjectBanner.d.ts +7 -0
  379. package/lib/Subject/SubjectBanner.js +9 -1
  380. package/lib/Subject/SubjectHeader.d.ts +7 -0
  381. package/lib/Subject/SubjectHeader.js +11 -3
  382. package/lib/Subject/index.d.ts +7 -0
  383. package/lib/Table/Table.d.ts +7 -0
  384. package/lib/Table/Table.js +16 -16
  385. package/lib/TagSelector/Control.js +1 -1
  386. package/lib/TagSelector/DropdownIndicator.js +2 -2
  387. package/lib/TagSelector/Input.js +2 -2
  388. package/lib/TagSelector/Menu.js +2 -2
  389. package/lib/TagSelector/MenuList.js +1 -1
  390. package/lib/TagSelector/Option.js +2 -2
  391. package/lib/TagSelector/SelectContainer.js +1 -1
  392. package/lib/TagSelector/TagSelector.js +9 -9
  393. package/lib/TagSelector/ValueButton.js +1 -1
  394. package/lib/TagSelector/ariaMessages.d.ts +1 -1
  395. package/lib/Topic/Loader.d.ts +7 -0
  396. package/lib/Topic/Loader.js +8 -0
  397. package/lib/Topic/Topic.js +23 -23
  398. package/lib/TreeStructure/AddFolderButton.js +3 -3
  399. package/lib/TreeStructure/ComboboxButton.js +5 -5
  400. package/lib/TreeStructure/FolderItem.js +9 -9
  401. package/lib/TreeStructure/FolderItems.js +2 -2
  402. package/lib/TreeStructure/TreeStructure.js +8 -8
  403. package/lib/TreeStructure/arrowNavigation.d.ts +1 -1
  404. package/lib/TreeStructure/helperFunctions.d.ts +7 -0
  405. package/lib/TreeStructure/helperFunctions.js +8 -0
  406. package/lib/all.css +1 -1
  407. package/lib/i18n/i18n.d.ts +7 -0
  408. package/lib/i18n/i18n.js +3 -3
  409. package/lib/index.d.ts +1 -1
  410. package/lib/index.js +0 -6
  411. package/lib/locale/messages-en.d.ts +552 -793
  412. package/lib/locale/messages-en.js +13 -261
  413. package/lib/locale/messages-nb.d.ts +552 -793
  414. package/lib/locale/messages-nb.js +13 -261
  415. package/lib/locale/messages-nn.d.ts +552 -793
  416. package/lib/locale/messages-nn.js +13 -261
  417. package/lib/locale/messages-se.d.ts +552 -793
  418. package/lib/locale/messages-se.js +13 -261
  419. package/lib/locale/messages-sma.d.ts +552 -793
  420. package/lib/locale/messages-sma.js +13 -261
  421. package/package.json +21 -21
  422. package/src/Article/Article.tsx +5 -5
  423. package/src/Article/ArticleByline.stories.tsx +1 -1
  424. package/src/Article/ArticleByline.tsx +4 -4
  425. package/src/Article/ArticleFootNotes.tsx +1 -1
  426. package/src/Article/ArticleNotions.tsx +2 -2
  427. package/src/Aside/index.ts +8 -0
  428. package/src/AudioPlayer/AudioPlayer.tsx +2 -2
  429. package/src/AudioPlayer/Controls.tsx +5 -5
  430. package/src/AudioPlayer/SpeechControl.tsx +1 -1
  431. package/src/AudioPlayer/index.ts +8 -0
  432. package/src/BannerCard/BannerCard.tsx +1 -1
  433. package/src/BlogPost/BlogPost.tsx +3 -3
  434. package/src/Breadcrumb/Breadcrumb.tsx +2 -2
  435. package/src/Breadcrumb/BreadcrumbItem.tsx +3 -3
  436. package/src/CampaignBlock/CampaignBlock.tsx +3 -3
  437. package/src/CompetenceGoalTab/CompetenceGoalItem.tsx +1 -1
  438. package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +3 -3
  439. package/src/CompetenceGoalTab/CompetenceItem.tsx +3 -3
  440. package/src/CompetenceGoalTab/CoreElementItem.tsx +1 -1
  441. package/src/CompetenceGoalTab/index.ts +8 -0
  442. package/src/ContactBlock/ContactBlock.tsx +3 -3
  443. package/src/ContentTypeBadge/ContentTypeBadge.tsx +9 -1
  444. package/src/ContentTypeBadge/index.ts +8 -0
  445. package/src/CopyParagraphButton/CopyParagraphButton.tsx +1 -1
  446. package/src/DefinitionList/DefinitionDescription.tsx +1 -1
  447. package/src/DefinitionList/DefinitionTerm.tsx +1 -1
  448. package/src/Embed/AudioEmbed.tsx +4 -4
  449. package/src/Embed/BrightcoveEmbed.tsx +6 -6
  450. package/src/Embed/ConceptEmbed.tsx +9 -9
  451. package/src/Embed/ConceptListEmbed.tsx +1 -1
  452. package/src/Embed/EmbedErrorPlaceholder.tsx +1 -1
  453. package/src/Embed/ExternalEmbed.tsx +3 -3
  454. package/src/Embed/FootnoteEmbed.tsx +1 -1
  455. package/src/Embed/IframeEmbed.tsx +1 -1
  456. package/src/Embed/ImageEmbed.stories.tsx +2 -2
  457. package/src/Embed/ImageEmbed.tsx +8 -8
  458. package/src/Embed/RelatedContentEmbed.stories.tsx +1 -1
  459. package/src/Embed/RelatedContentEmbed.tsx +1 -1
  460. package/src/Embed/conceptComponents.tsx +6 -6
  461. package/src/Embed/types.ts +1 -1
  462. package/src/ErrorMessage/ErrorMessage.stories.tsx +1 -1
  463. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +1 -1
  464. package/src/FactBox/FactBox.tsx +119 -23
  465. package/src/FactBox/index.ts +8 -0
  466. package/src/Figure/FigureOpenDialogButton.tsx +1 -1
  467. package/src/FileList/File.tsx +2 -2
  468. package/src/FileList/FileList.stories.tsx +1 -1
  469. package/src/FileList/FileList.tsx +2 -2
  470. package/src/FileList/index.ts +8 -0
  471. package/src/Filter/FilterButtons.tsx +2 -2
  472. package/src/Filter/FilterCarousel.tsx +2 -2
  473. package/src/Filter/FilterList.tsx +2 -2
  474. package/src/Filter/FilterListPhone.tsx +4 -4
  475. package/src/Filter/ToggleItem.tsx +1 -1
  476. package/src/Filter/filterClasses.ts +1 -1
  477. package/src/Footer/Footer.stories.tsx +2 -2
  478. package/src/Footer/Footer.tsx +2 -2
  479. package/src/Footer/FooterLinks.tsx +10 -2
  480. package/src/Footer/index.ts +1 -1
  481. package/src/FramedContent/FramedContent.stories.tsx +1 -1
  482. package/src/Frontpage/FrontpageAllSubjects.tsx +12 -4
  483. package/src/FrontpageArticle/FrontpageArticle.tsx +2 -2
  484. package/src/Gloss/Gloss.tsx +4 -4
  485. package/src/Grid/Grid.stories.tsx +1 -1
  486. package/src/Grid/Grid.tsx +1 -1
  487. package/src/Hero/Hero.stories.tsx +1 -1
  488. package/src/Image/Image.tsx +1 -1
  489. package/src/Image/ImageLink.tsx +1 -1
  490. package/src/KeyFigure/KeyFigure.stories.tsx +1 -1
  491. package/src/KeyFigure/KeyFigure.tsx +1 -1
  492. package/src/KeyFigure/index.ts +1 -1
  493. package/src/LanguageSelector/LanguageSelector.stories.tsx +2 -2
  494. package/src/LanguageSelector/LanguageSelector.tsx +3 -3
  495. package/src/LanguageSelector/index.ts +8 -0
  496. package/src/LearningPaths/LearningPathLastStepNavigation.tsx +3 -3
  497. package/src/LearningPaths/LearningPathMenu.stories.tsx +1 -1
  498. package/src/LearningPaths/LearningPathMenu.tsx +6 -6
  499. package/src/LearningPaths/LearningPathMenuAside.tsx +3 -3
  500. package/src/LearningPaths/LearningPathMenuAsideCopyright.tsx +1 -1
  501. package/src/LearningPaths/LearningPathMenuContent.tsx +2 -2
  502. package/src/LearningPaths/LearningPathMenuIntro.tsx +2 -2
  503. package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +4 -4
  504. package/src/LearningPaths/LearningPathMobileHeader.tsx +1 -1
  505. package/src/LearningPaths/LearningPathMobileStepInfo.tsx +1 -1
  506. package/src/LearningPaths/LearningPathSticky.tsx +2 -2
  507. package/src/LearningPaths/index.ts +2 -2
  508. package/src/LetterFilter/LetterFilter.stories.tsx +2 -2
  509. package/src/LetterFilter/LetterFilter.tsx +2 -2
  510. package/src/LicenseByline/EmbedByline.stories.tsx +3 -3
  511. package/src/LicenseByline/EmbedByline.tsx +4 -4
  512. package/src/LicenseByline/LicenseDescription.tsx +1 -1
  513. package/src/LicenseByline/LicenseLink.tsx +1 -1
  514. package/src/LicenseByline/index.tsx +8 -0
  515. package/src/LinkBlock/LinkBlock.stories.tsx +1 -1
  516. package/src/LinkBlock/LinkBlock.tsx +3 -3
  517. package/src/LinkBlock/LinkBlockSection.tsx +1 -1
  518. package/src/List/OrderedList.tsx +1 -1
  519. package/src/List/UnOrderedList.tsx +1 -1
  520. package/src/Masthead/Masthead.tsx +2 -2
  521. package/src/Masthead/SkipToMainContent.tsx +8 -0
  522. package/src/Masthead/index.ts +1 -1
  523. package/src/MediaList/MediaList.tsx +6 -6
  524. package/src/Messages/MessageBanner.tsx +2 -2
  525. package/src/Messages/MessageBox.tsx +3 -3
  526. package/src/Messages/index.ts +1 -1
  527. package/src/MyNdla/Resource/Folder.stories.tsx +4 -5
  528. package/src/MyNdla/Resource/Folder.tsx +4 -4
  529. package/src/MyNdla/Resource/FolderInput.tsx +4 -4
  530. package/src/MyNdla/index.ts +8 -0
  531. package/src/NDLAFilm/AllMoviesAlphabetically.tsx +4 -4
  532. package/src/NDLAFilm/FilmContentCard.tsx +2 -2
  533. package/src/NDLAFilm/FilmContentCardTags.tsx +9 -1
  534. package/src/NDLAFilm/FilmMovieList.tsx +5 -4
  535. package/src/NDLAFilm/FilmMovieSearch.tsx +2 -2
  536. package/src/NDLAFilm/FilmSlideshow.tsx +2 -2
  537. package/src/NDLAFilm/MovieGrid.tsx +10 -2
  538. package/src/NDLAFilm/filmStyles.ts +8 -0
  539. package/src/NDLAFilm/index.ts +4 -5
  540. package/src/NDLAFilm/types.ts +8 -0
  541. package/src/Navigation/NavigationBox.tsx +13 -5
  542. package/src/Notion/Notion.tsx +1 -1
  543. package/src/Notion/NotionImage.tsx +4 -3
  544. package/src/Notion/index.ts +8 -0
  545. package/src/Programme/Programme.tsx +10 -2
  546. package/src/Programme/ProgrammeSubjects.tsx +1 -1
  547. package/src/ProgrammeCard/ProgrammeCard.tsx +1 -1
  548. package/src/RelatedArticleList/RelatedArticleList.tsx +79 -24
  549. package/src/Resource/BlockResource.stories.tsx +2 -2
  550. package/src/Resource/BlockResource.tsx +3 -3
  551. package/src/Resource/ListResource.stories.tsx +1 -1
  552. package/src/Resource/ListResource.tsx +2 -2
  553. package/src/Resource/resourceComponents.tsx +6 -6
  554. package/src/Resource/storyComponents.tsx +2 -2
  555. package/src/ResourceBox/ResourceBox.tsx +1 -2
  556. package/src/ResourceGroup/ResourceGroup.tsx +1 -1
  557. package/src/ResourceGroup/ResourceItem.tsx +4 -4
  558. package/src/ResourceGroup/ResourceList.tsx +2 -2
  559. package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +10 -2
  560. package/src/Search/ActiveFilterContent.tsx +9 -1
  561. package/src/Search/ActiveFilters.tsx +10 -2
  562. package/src/Search/ContentTypeResult.tsx +12 -4
  563. package/src/Search/ContentTypeResultStyles.tsx +9 -1
  564. package/src/Search/IsPathToHighlight.ts +8 -0
  565. package/src/Search/LoadingWrapper.tsx +8 -0
  566. package/src/Search/SearchField.tsx +3 -3
  567. package/src/Search/SearchFieldForm.tsx +9 -1
  568. package/src/Search/SearchResult.tsx +13 -5
  569. package/src/Search/SearchResultSleeve.tsx +2 -2
  570. package/src/Search/index.ts +1 -2
  571. package/src/SearchTypeResult/ActiveFilterContent.tsx +3 -3
  572. package/src/SearchTypeResult/ActiveFilters.tsx +2 -2
  573. package/src/SearchTypeResult/PopupFilter.tsx +3 -3
  574. package/src/SearchTypeResult/ResultNavigation.tsx +1 -1
  575. package/src/SearchTypeResult/SearchFieldHeader.tsx +2 -2
  576. package/src/SearchTypeResult/SearchHeader.tsx +3 -3
  577. package/src/SearchTypeResult/SearchItem.tsx +5 -5
  578. package/src/SearchTypeResult/SearchItemList.tsx +2 -2
  579. package/src/SearchTypeResult/SearchItems.tsx +2 -2
  580. package/src/SearchTypeResult/SearchNotionsResult.tsx +1 -1
  581. package/src/SearchTypeResult/SearchSubjectItem.tsx +2 -2
  582. package/src/SearchTypeResult/SearchTypeHeader.tsx +2 -2
  583. package/src/SearchTypeResult/SearchTypeResult.tsx +4 -4
  584. package/src/SearchTypeResult/SearchViewType.tsx +2 -2
  585. package/src/SearchTypeResult/components/ItemContexts.tsx +4 -4
  586. package/src/SearchTypeResult/components/ItemResourceHeader.tsx +3 -4
  587. package/src/SearchTypeResult/components/ItemTopicHeader.tsx +1 -1
  588. package/src/SearchTypeResult/components/SubjectFilters.tsx +2 -2
  589. package/src/SearchTypeResult/index.ts +3 -3
  590. package/src/SectionHeading/SectionHeading.tsx +8 -0
  591. package/src/SectionHeading/index.ts +8 -0
  592. package/src/Subject/SubjectBanner.tsx +8 -0
  593. package/src/Subject/SubjectHeader.tsx +9 -1
  594. package/src/Subject/index.ts +8 -0
  595. package/src/Table/Table.stories.tsx +1 -1
  596. package/src/Table/Table.tsx +3 -3
  597. package/src/TagSelector/Control.tsx +1 -1
  598. package/src/TagSelector/DropdownIndicator.tsx +2 -2
  599. package/src/TagSelector/Input.tsx +1 -1
  600. package/src/TagSelector/Menu.tsx +1 -1
  601. package/src/TagSelector/MenuList.tsx +1 -1
  602. package/src/TagSelector/Option.tsx +1 -1
  603. package/src/TagSelector/SelectContainer.tsx +1 -1
  604. package/src/TagSelector/TagSelector.stories.tsx +1 -1
  605. package/src/TagSelector/TagSelector.tsx +9 -9
  606. package/src/TagSelector/ValueButton.tsx +1 -1
  607. package/src/TagSelector/ariaMessages.ts +1 -1
  608. package/src/ToolboxPage/ToolboxInfo.tsx +1 -1
  609. package/src/Topic/Loader.tsx +8 -0
  610. package/src/Topic/Topic.tsx +9 -9
  611. package/src/TreeStructure/AddFolderButton.tsx +1 -1
  612. package/src/TreeStructure/ComboboxButton.tsx +3 -3
  613. package/src/TreeStructure/FolderItem.tsx +3 -3
  614. package/src/TreeStructure/FolderItems.tsx +1 -1
  615. package/src/TreeStructure/TreeStructure.stories.tsx +2 -2
  616. package/src/TreeStructure/TreeStructure.tsx +3 -3
  617. package/src/TreeStructure/arrowNavigation.ts +1 -1
  618. package/src/TreeStructure/helperFunctions.ts +8 -0
  619. package/src/i18n/i18n.ts +3 -3
  620. package/src/index.ts +1 -8
  621. package/src/locale/__tests__/translations-test.ts +1 -1
  622. package/src/locale/messages-en.ts +2 -256
  623. package/src/locale/messages-nb.ts +2 -255
  624. package/src/locale/messages-nn.ts +2 -255
  625. package/src/locale/messages-se.ts +2 -255
  626. package/src/locale/messages-sma.ts +2 -255
  627. package/src/main.scss +0 -3
  628. package/es/NDLAFilm/AboutNdlaFilm.js +0 -57
  629. package/lib/NDLAFilm/AboutNdlaFilm.d.ts +0 -15
  630. package/lib/NDLAFilm/AboutNdlaFilm.js +0 -63
  631. package/src/FactBox/component.factbox.scss +0 -167
  632. package/src/Figure/component.figure-license.scss +0 -129
  633. package/src/NDLAFilm/AboutNdlaFilm.tsx +0 -84
  634. package/src/RelatedArticleList/component.related-articles.scss +0 -115
@@ -6,51 +6,147 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode, useState } from 'react';
10
- import BEMHelper from 'react-bem-helper';
9
+ import { ComponentProps, ReactNode, forwardRef, useCallback, useEffect, useState } from 'react';
11
10
  import { useTranslation } from 'react-i18next';
11
+ import { css } from '@emotion/react';
12
12
  import styled from '@emotion/styled';
13
13
  import { IconButtonV2 } from '@ndla/button';
14
+ import { breakpoints, colors, mq, spacing } from '@ndla/core';
14
15
  import { ChevronDown, ChevronUp } from '@ndla/icons/common';
15
16
 
16
- const classes = new BEMHelper({
17
- name: 'factbox',
18
- prefix: 'c-',
19
- });
20
-
21
- interface Props {
17
+ interface Props extends ComponentProps<'aside'> {
22
18
  children?: ReactNode;
19
+ defaultOpen?: boolean;
20
+ open?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
23
22
  }
24
23
 
25
24
  const StyledAside = styled.aside`
26
25
  display: flex;
27
26
  flex-direction: column;
28
27
  align-items: center;
28
+ position: relative;
29
+ z-index: 1;
30
+ margin: ${spacing.large} 0 calc(${spacing.large} - ${spacing.nsmall}) 0;
31
+ overflow: hidden;
32
+ padding-bottom: ${spacing.nsmall};
33
+
34
+ @media print {
35
+ overflow: visible;
36
+ }
37
+
38
+ h2:first-of-type {
39
+ border-bottom: 2px solid ${colors.brand.primary};
40
+ margin-top: 0;
41
+ margin-bottom: ${spacing.normal};
42
+ }
43
+
44
+ h2,
45
+ h3,
46
+ h4,
47
+ h5 {
48
+ display: block;
49
+ margin-top: ${spacing.normal};
50
+ margin-bottom: ${spacing.small};
51
+ border-bottom: 1px solid ${colors.brand.light};
52
+ }
29
53
  `;
30
54
 
31
55
  const StyledDiv = styled.div`
32
56
  width: 100%;
57
+ position: relative;
58
+ color: ${colors.brand.greyDark};
59
+ padding: ${spacing.normal} ${spacing.normal} ${spacing.large};
60
+ border: 1px solid ${colors.brand.greyLight};
61
+ max-height: 190px;
62
+ transition: max-height 0.6s ease-in-out;
63
+ overflow: hidden;
64
+
65
+ &:after {
66
+ content: '';
67
+ text-align: center;
68
+ position: absolute;
69
+ top: 0;
70
+ bottom: 0;
71
+ right: 0;
72
+ width: 99%;
73
+ margin: 0.5% 0.5% 0 0.5%;
74
+ transition: opacity 0.5s cubic-bezier(0.74, -0.04, 0.96, 0.97);
75
+ /* The 00 after our color is to set its opacity to 0 */
76
+ background: linear-gradient(${colors.brand.light}00, ${colors.white});
77
+ opacity: 1;
78
+ z-index: 0;
79
+ }
80
+
81
+ @media print {
82
+ max-height: revert;
83
+ &:after {
84
+ display: none;
85
+ }
86
+ }
87
+
88
+ & > ul:not([class]),
89
+ :not(li) > ul:not([class]) {
90
+ ${mq.range({ from: breakpoints.desktop })} {
91
+ margin-left: ${spacing.normal};
92
+ }
93
+ }
94
+
95
+ & > ol:not([class]),
96
+ :not(li) > ol:not([class]) {
97
+ ${mq.range({ from: breakpoints.desktop })} {
98
+ margin-left: ${spacing.large};
99
+ }
100
+ }
33
101
  `;
34
102
 
35
103
  const StyledIconButton = styled(IconButtonV2)`
36
104
  margin-top: -20px;
37
105
  z-index: 1;
106
+
107
+ @media print {
108
+ display: none;
109
+ }
110
+ `;
111
+
112
+ const expandedStyle = css`
113
+ max-height: 500vh;
114
+ `;
115
+
116
+ const expandedContentStyle = css`
117
+ max-height: 500vh;
118
+ &:after {
119
+ opacity: 0;
120
+ z-index: -1;
121
+ }
38
122
  `;
39
123
 
40
- const FactBox = ({ children }: Props) => {
41
- const { t } = useTranslation();
42
- const [isOpen, setIsOpen] = useState(false);
43
-
44
- const additional = isOpen ? 'expanded' : '';
45
-
46
- return (
47
- <StyledAside {...classes(undefined, undefined, additional)}>
48
- <StyledDiv {...classes('content')}>{children}</StyledDiv>
49
- <StyledIconButton onClick={() => setIsOpen((p) => !p)} aria-label={t(`factbox.${isOpen ? 'close' : 'open'}`)}>
50
- {isOpen ? <ChevronUp /> : <ChevronDown />}
51
- </StyledIconButton>
52
- </StyledAside>
53
- );
54
- };
124
+ const FactBox = forwardRef<HTMLElement, Props>(
125
+ ({ children, open, onOpenChange, defaultOpen = false, ...rest }, ref) => {
126
+ const { t } = useTranslation();
127
+ const [isOpen, setIsOpen] = useState(defaultOpen);
128
+
129
+ useEffect(() => {
130
+ if (open !== undefined) {
131
+ setIsOpen(open);
132
+ }
133
+ }, [open]);
134
+
135
+ const onClick = useCallback(() => {
136
+ const newOpen = !isOpen;
137
+ setIsOpen(newOpen);
138
+ onOpenChange?.(newOpen);
139
+ }, [isOpen, onOpenChange]);
140
+
141
+ return (
142
+ <StyledAside {...rest} css={[isOpen ? expandedStyle : undefined]} ref={ref}>
143
+ <StyledDiv css={isOpen ? expandedContentStyle : undefined}>{children}</StyledDiv>
144
+ <StyledIconButton onClick={onClick} aria-label={t(`factbox.${isOpen ? 'close' : 'open'}`)}>
145
+ {isOpen ? <ChevronUp /> : <ChevronDown />}
146
+ </StyledIconButton>
147
+ </StyledAside>
148
+ );
149
+ },
150
+ );
55
151
 
56
152
  export default FactBox;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2018-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
+
1
9
  import FactBox from './FactBox';
2
10
 
3
11
  export default FactBox;
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Play } from '@ndla/icons/common';
10
9
  import { ExpandTwoArrows, CursorClick } from '@ndla/icons/action';
10
+ import { Play } from '@ndla/icons/common';
11
11
 
12
12
  interface Props {
13
13
  type?: 'image' | 'video' | 'h5p' | 'iframe' | 'external' | 'audio';
@@ -6,11 +6,11 @@
6
6
  *
7
7
  */
8
8
 
9
- import styled from '@emotion/styled';
10
9
  import { useTranslation } from 'react-i18next';
11
- import SafeLink from '@ndla/safelink';
10
+ import styled from '@emotion/styled';
12
11
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
13
12
  import { Download } from '@ndla/icons/common';
13
+ import SafeLink from '@ndla/safelink';
14
14
 
15
15
  interface Props {
16
16
  title: string;
@@ -8,8 +8,8 @@
8
8
 
9
9
  import { Meta, StoryObj } from '@storybook/react';
10
10
  import File from './File';
11
- import { defaultParameters } from '../../../../stories/defaults';
12
11
  import FileList from './FileList';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
13
 
14
14
  export default {
15
15
  title: 'Components/FileList',
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import styled from '@emotion/styled';
10
- import { colors, fonts, spacing } from '@ndla/core';
11
9
  import { ReactNode } from 'react';
12
10
  import { useTranslation } from 'react-i18next';
11
+ import styled from '@emotion/styled';
12
+ import { colors, fonts, spacing } from '@ndla/core';
13
13
 
14
14
  interface Props {
15
15
  children: ReactNode;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2018-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
+
1
9
  import FileList from './FileList';
2
10
 
3
11
  export { default as File } from './File';
@@ -6,14 +6,14 @@
6
6
  *
7
7
  */
8
8
  import { useEffect, useState } from 'react';
9
+ import { useTranslation } from 'react-i18next';
9
10
  import styled from '@emotion/styled';
10
11
  import { ButtonV2 } from '@ndla/button';
11
12
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
12
- import { useTranslation } from 'react-i18next';
13
13
  import { Cross as CrossIcon, Plus as PlusIcon } from '@ndla/icons/action';
14
14
  import { ModalHeader, ModalBody, ModalCloseButton, Modal, ModalTrigger, ModalContent } from '@ndla/modal';
15
- import ToggleItem from './ToggleItem';
16
15
  import FilterCarousel from './FilterCarousel';
16
+ import ToggleItem from './ToggleItem';
17
17
 
18
18
  const StyledHeading = styled.h3`
19
19
  ${fonts.sizes('16px', '32px')};
@@ -8,10 +8,10 @@
8
8
 
9
9
  import { ReactChild, useEffect, useLayoutEffect, useRef, useState } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
- import styled from '@emotion/styled';
11
+ import { useSwipeable } from 'react-swipeable';
12
12
  import { css } from '@emotion/react';
13
+ import styled from '@emotion/styled';
13
14
  import { ChevronLeft, ChevronRight } from '@ndla/icons/common';
14
- import { useSwipeable } from 'react-swipeable';
15
15
 
16
16
  interface Props {
17
17
  children: ReactChild[];
@@ -1,9 +1,9 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2016-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
- * FRI OG BEGRENSET
6
+ *
7
7
  */
8
8
 
9
9
  import { ReactNode, useState } from 'react';
@@ -1,16 +1,16 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2016-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
- * FRI OG BEGRENSET
6
+ *
7
7
  */
8
8
 
9
+ import debounce from 'lodash/debounce';
9
10
  import { ChangeEvent, useCallback, useEffect, useState } from 'react';
11
+ import { ButtonV2 } from '@ndla/button';
10
12
  import { ChevronDown, ChevronUp } from '@ndla/icons/common';
11
13
  import { ModalHeader, ModalBody, ModalCloseButton, Modal, ModalTrigger, ModalContent } from '@ndla/modal';
12
- import { ButtonV2 } from '@ndla/button';
13
- import debounce from 'lodash/debounce';
14
14
  import { classes } from './filterClasses';
15
15
  import ToggleItem from './ToggleItem';
16
16
  import ActiveFilters from '../Search/ActiveFilters';
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2017-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2018-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
@@ -8,10 +8,10 @@
8
8
 
9
9
  import { Meta, StoryObj } from '@storybook/react';
10
10
  import { EmailOutline, Facebook, Instagram, LinkedIn, Share, Youtube } from '@ndla/icons/common';
11
+ import { EditorName } from './EditorName';
11
12
  import Footer from './Footer';
12
- import { defaultParameters } from '../../../../stories/defaults';
13
13
  import { FooterText } from './FooterText';
14
- import { EditorName } from './EditorName';
14
+ import { defaultParameters } from '../../../../stories/defaults';
15
15
  import { LanguageSelector } from '../LanguageSelector';
16
16
 
17
17
  const mockCommonLinks = [
@@ -7,13 +7,13 @@
7
7
  */
8
8
 
9
9
  import { ReactNode } from 'react';
10
- import styled from '@emotion/styled';
11
10
  import { useTranslation } from 'react-i18next';
11
+ import styled from '@emotion/styled';
12
12
  import { colors, spacing, fonts, mq, breakpoints, spacingUnit } from '@ndla/core';
13
13
  import { FooterHeaderIcon } from '@ndla/icons/common';
14
- import { OneColumn } from '../Layout';
15
14
  import FooterLinks from './FooterLinks';
16
15
  import FooterPrivacy from './FooterPrivacy';
16
+ import { OneColumn } from '../Layout';
17
17
  import { Locale } from '../types';
18
18
 
19
19
  const StyledBackground = styled.div`
@@ -1,9 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2019-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
+
1
9
  import { ReactNode } from 'react';
10
+ import { useTranslation } from 'react-i18next';
2
11
  import styled from '@emotion/styled';
3
12
  import { spacing, fonts, colors, mq, breakpoints, spacingUnit } from '@ndla/core';
4
- import SafeLink from '@ndla/safelink';
5
13
  import { Forward, Launch } from '@ndla/icons/common';
6
- import { useTranslation } from 'react-i18next';
14
+ import SafeLink from '@ndla/safelink';
7
15
 
8
16
  const StyledLinksWrapper = styled.div`
9
17
  display: flex;
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
+ import { EditorName } from './EditorName';
9
10
  import Footer from './Footer';
10
11
  import { FooterText } from './FooterText';
11
- import { EditorName } from './EditorName';
12
12
 
13
13
  export { Footer, FooterText, EditorName };
@@ -7,9 +7,9 @@
7
7
  */
8
8
 
9
9
  import { Meta, StoryObj } from '@storybook/react';
10
- import { defaultParameters } from '../../../../stories/defaults';
11
10
  import FramedContent from './FramedContent';
12
11
  import FigureImage from '../../../../stories/article/FigureImage';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
13
 
14
14
  export default {
15
15
  title: 'Components/FramedContent',
@@ -1,12 +1,20 @@
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
+
1
9
  import { Fragment } from 'react';
2
- import styled from '@emotion/styled';
3
10
  import { useTranslation } from 'react-i18next';
4
- import Tabs from '@ndla/tabs';
5
- import SafeLink from '@ndla/safelink';
11
+ import styled from '@emotion/styled';
6
12
  import { colors, fonts, mq, breakpoints } from '@ndla/core';
13
+ import SafeLink from '@ndla/safelink';
14
+ import Tabs from '@ndla/tabs';
7
15
  import ContentLoader from '../ContentLoader';
8
- import { MessageBox } from '../Messages';
9
16
  import { ToggleItem } from '../Filter';
17
+ import { MessageBox } from '../Messages';
10
18
 
11
19
  const StyledWrapper = styled.nav`
12
20
  margin: 32px 0 0;
@@ -7,12 +7,12 @@
7
7
  */
8
8
 
9
9
  import { CSSProperties, ReactNode, useMemo } from 'react';
10
- import { spacing, spacingUnit } from '@ndla/core';
11
10
  import styled from '@emotion/styled';
11
+ import { spacing, spacingUnit } from '@ndla/core';
12
12
  import { Heading, Text } from '@ndla/typography';
13
- import { Article } from '../types';
14
13
  import { ArticleByline } from '../Article';
15
14
  import { useMastheadHeight } from '../Masthead';
15
+ import { Article } from '../types';
16
16
 
17
17
  interface Props {
18
18
  article: Omit<Article, 'footNotes'>;
@@ -6,14 +6,14 @@
6
6
  *
7
7
  */
8
8
 
9
- import styled from '@emotion/styled';
9
+ import { useMemo } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
- import { colors, spacing, misc, fonts } from '@ndla/core';
11
+ import styled from '@emotion/styled';
12
12
  import { AccordionRoot, AccordionItem, AccordionHeader, AccordionContent } from '@ndla/accordion';
13
+ import { colors, spacing, misc, fonts } from '@ndla/core';
13
14
  import { IGlossData, IGlossExample } from '@ndla/types-backend/concept-api';
14
- import { useMemo } from 'react';
15
- import SpeechControl from '../AudioPlayer/SpeechControl';
16
15
  import GlossExample from './GlossExample';
16
+ import SpeechControl from '../AudioPlayer/SpeechControl';
17
17
 
18
18
  export interface Props {
19
19
  title: {
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from '@storybook/react';
10
9
  import styled from '@emotion/styled';
11
10
  import { DocsContainer, DocsContainerProps } from '@storybook/addon-docs';
11
+ import { Meta, StoryFn } from '@storybook/react';
12
12
  import { colors } from '@ndla/core';
13
13
  import Grid from './Grid';
14
14
  import { defaultParameters } from '../../../../stories/defaults';
package/src/Grid/Grid.tsx CHANGED
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
+ import { HTMLAttributes, ReactNode } from 'react';
9
10
  import styled from '@emotion/styled';
10
11
  import { breakpoints, colors, misc, mq, spacing } from '@ndla/core';
11
- import { HTMLAttributes, ReactNode } from 'react';
12
12
 
13
13
  export interface GridProps {
14
14
  columns: '2' | '4' | '2x2';
@@ -8,8 +8,8 @@
8
8
 
9
9
  import styled from '@emotion/styled';
10
10
  import { Meta, StoryFn } from '@storybook/react';
11
- import { defaultParameters } from '../../../../stories/defaults';
12
11
  import { Hero } from './Hero';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
13
 
14
14
  const StyledDiv = styled.div`
15
15
  width: 1000px;
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import { ReactNode } from 'react';
10
- import { colors } from '@ndla/core';
11
10
  import styled from '@emotion/styled';
11
+ import { colors } from '@ndla/core';
12
12
 
13
13
  export interface ImageCrop {
14
14
  startX: number;
@@ -8,8 +8,8 @@
8
8
 
9
9
  import { ReactNode } from 'react';
10
10
  import styled from '@emotion/styled';
11
- import { makeSrcQueryString } from './Image';
12
11
  import { ImageCrop, ImageFocalPoint } from '.';
12
+ import { makeSrcQueryString } from './Image';
13
13
 
14
14
  const StyledLink = styled.a`
15
15
  box-shadow: inset 0 0;
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import { Meta, StoryFn } from '@storybook/react';
10
- import { defaultParameters } from '../../../../stories/defaults';
11
10
  import KeyFigure from './KeyFigure';
11
+ import { defaultParameters } from '../../../../stories/defaults';
12
12
  const args = {
13
13
  title: '500',
14
14
  subtitle: 'TVERRFAGLIGE RESSURSER',
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2023-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * Copyright (c) 2023-present, NDLA.
3
3
  *
4
4
  * This source code is licensed under the GPLv3 license found in the
@@ -6,10 +6,10 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from '@storybook/react';
10
- import { LanguageSelector } from '@ndla/ui';
11
9
  import styled from '@emotion/styled';
10
+ import { Meta, StoryFn } from '@storybook/react';
12
11
  import { colors, spacing } from '@ndla/core';
12
+ import { LanguageSelector } from '@ndla/ui';
13
13
  import { defaultParameters } from '../../../../stories/defaults';
14
14
  export default {
15
15
  title: 'Components/LanguageSelector',
@@ -6,12 +6,12 @@
6
6
  *
7
7
  */
8
8
 
9
- import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from '@ndla/dropdown-menu';
10
- import { ButtonV2 } from '@ndla/button';
11
9
  import { useTranslation } from 'react-i18next';
12
- import { ChevronDown } from '@ndla/icons/common';
13
10
  import styled from '@emotion/styled';
11
+ import { ButtonV2 } from '@ndla/button';
14
12
  import { colors, fonts, spacing } from '@ndla/core';
13
+ import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from '@ndla/dropdown-menu';
14
+ import { ChevronDown } from '@ndla/icons/common';
15
15
 
16
16
  interface Props<T extends string> {
17
17
  locales: T[];
@@ -1,3 +1,11 @@
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
+
1
9
  import LanguageSelector from './LanguageSelector';
2
10
 
3
11
  export { LanguageSelector };
@@ -7,11 +7,11 @@
7
7
  */
8
8
 
9
9
  import { ReactNode } from 'react';
10
- import styled from '@emotion/styled';
11
- import { css } from '@emotion/react';
12
- import SafeLink from '@ndla/safelink';
13
10
  import { useTranslation } from 'react-i18next';
11
+ import { css } from '@emotion/react';
12
+ import styled from '@emotion/styled';
14
13
  import { fonts, spacing, spacingUnit } from '@ndla/core';
14
+ import SafeLink from '@ndla/safelink';
15
15
  import { OneColumn, LayoutItem } from '../index';
16
16
 
17
17
  const TextWrapper = styled.div`
@@ -7,9 +7,9 @@
7
7
  */
8
8
 
9
9
  import { Meta, StoryFn } from '@storybook/react';
10
+ import LearningPathMenu from './LearningPathMenu';
10
11
  import { defaultParameters } from '../../../../stories/defaults';
11
12
  import { contentTypes } from '../model/ContentType';
12
- import LearningPathMenu from './LearningPathMenu';
13
13
  const args = {
14
14
  name: 'Læringssti',
15
15
  LearningPathId: 1,
@@ -7,17 +7,17 @@
7
7
  */
8
8
 
9
9
  import { ReactNode, useState } from 'react';
10
- import styled from '@emotion/styled';
11
- import { css } from '@emotion/react';
12
10
  import { useTranslation } from 'react-i18next';
13
- import Tooltip from '@ndla/tooltip';
14
- import { useWindowSize } from '@ndla/hooks';
11
+ import { css } from '@emotion/react';
12
+ import styled from '@emotion/styled';
15
13
  import { colors, spacing, misc, mq, breakpoints } from '@ndla/core';
14
+ import { useWindowSize } from '@ndla/hooks';
16
15
  import { ArrowExpandRight, ArrowExpandLeft } from '@ndla/icons/action';
17
- import LearningPathMenuModalWrapper from './LearningPathMenuModalWrapper';
16
+ import Tooltip from '@ndla/tooltip';
18
17
  import LearningPathMenuAside from './LearningPathMenuAside';
19
- import LearningPathMenuIntro from './LearningPathMenuIntro';
20
18
  import LearningPathMenuContent from './LearningPathMenuContent';
19
+ import LearningPathMenuIntro from './LearningPathMenuIntro';
20
+ import LearningPathMenuModalWrapper from './LearningPathMenuModalWrapper';
21
21
 
22
22
  const SIDE_NAV_WIDTH = '372px';
23
23