@ndla/ui 28.0.0 → 30.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 (826) hide show
  1. package/es/Animation/DisplayOnPageYOffset.js +1 -1
  2. package/es/Animation/Fade.js +1 -1
  3. package/es/Article/Article.js +18 -14
  4. package/es/Article/ArticleAccessMessage.js +14 -10
  5. package/es/Article/ArticleByline.js +22 -14
  6. package/es/Article/ArticleContent.js +1 -1
  7. package/es/Article/ArticleFavoritesButton.js +1 -1
  8. package/es/Article/ArticleFootNotes.js +1 -1
  9. package/es/Article/ArticleHeaderWrapper.js +27 -19
  10. package/es/Article/ArticleNotions.js +22 -12
  11. package/es/Article/ArticleSideBar.js +26 -18
  12. package/es/Aside/Aside.js +1 -1
  13. package/es/AudioPlayer/AudioPlayer.js +67 -39
  14. package/es/AudioPlayer/Controls.js +137 -85
  15. package/es/AudioPlayer/SpeechControl.js +5 -3
  16. package/es/AudioPlayer/initAudioPlayers.js +1 -1
  17. package/es/AuthorInfo/AuthorInfo.js +14 -8
  18. package/es/BannerCard/BannerCard.js +29 -15
  19. package/es/BlogPosts/BlogPost.js +22 -14
  20. package/es/BlogPosts/BlogPostWrapper.js +7 -5
  21. package/es/Breadcrumb/ActionBreadcrumb.js +26 -10
  22. package/es/Breadcrumb/Breadcrumb.js +14 -10
  23. package/es/Breadcrumb/BreadcrumbItem.js +38 -26
  24. package/es/Breadcrumb/HeaderBreadcrumb.js +21 -7
  25. package/es/Breadcrumb/HomeBreadcrumb.js +37 -18
  26. package/es/Breadcrumblist/Breadcrumblist.js +37 -25
  27. package/es/CompetenceGoalTab/CompetenceGoalItem.js +42 -26
  28. package/es/CompetenceGoalTab/CompetenceGoalTab.js +26 -16
  29. package/es/CompetenceGoalTab/CompetenceItem.js +74 -54
  30. package/es/CompetenceGoalTab/SearchButton.js +10 -6
  31. package/es/CompetenceGoals/CompetenceGoalsDialog.js +17 -11
  32. package/es/ComponentCursor/ComponentCursor.js +54 -36
  33. package/es/ContentCard/ContentCard.js +35 -19
  34. package/es/ContentLoader/index.js +1 -1
  35. package/es/ContentPlaceholder/ContentPlaceholder.js +21 -15
  36. package/es/ContentTypeBadge/ContentTypeBadge.js +1 -1
  37. package/es/CopyParagraphButton/CopyParagraphButton.js +47 -35
  38. package/es/CopyParagraphButton/initCopyParagraphButtons.js +1 -1
  39. package/es/CreatedBy/CreatedBy.js +26 -18
  40. package/es/Dialog/Dialog.js +1 -1
  41. package/es/ErrorMessage/ErrorMessage.js +23 -15
  42. package/es/ErrorMessage/ErrorResourceAccessDenied.js +5 -3
  43. package/es/FactBox/FactBox.js +1 -1
  44. package/es/Figure/Figure.js +1 -1
  45. package/es/Figure/FigureBylineExpandButton.js +1 -1
  46. package/es/Figure/FigureExpandButton.js +1 -1
  47. package/es/Figure/FigureLicense.js +1 -1
  48. package/es/Figure/FigureLicenseDialog.js +1 -1
  49. package/es/Figure/FigureOpenDialogButton.js +1 -1
  50. package/es/FileList/File.js +17 -11
  51. package/es/FileList/FileList.js +17 -11
  52. package/es/Filter/FilterButtons.js +45 -27
  53. package/es/Filter/FilterCarousel.js +31 -25
  54. package/es/Filter/FilterList.js +1 -1
  55. package/es/Filter/FilterListPhone.js +1 -1
  56. package/es/Filter/ToggleItem.js +1 -1
  57. package/es/Footer/EditorName.js +1 -1
  58. package/es/Footer/Footer.js +37 -23
  59. package/es/Footer/FooterAuth.js +36 -15
  60. package/es/Footer/FooterLinks.js +31 -19
  61. package/es/Footer/FooterPrivacy.js +13 -9
  62. package/es/Footer/FooterText.js +8 -6
  63. package/es/Footer/privacy_en.js +1 -1
  64. package/es/Footer/privacy_nb.js +1 -1
  65. package/es/Footer/privacy_nn.js +1 -1
  66. package/es/Frontpage/FrontpageAllSubjects.js +46 -32
  67. package/es/Frontpage/FrontpageFilm.js +22 -12
  68. package/es/Frontpage/FrontpageHeader.js +18 -10
  69. package/es/Frontpage/FrontpageInfo.js +6 -4
  70. package/es/Frontpage/FrontpageMultidisciplinarySubject.js +38 -24
  71. package/es/Frontpage/FrontpageProgramMenu.js +55 -37
  72. package/es/Frontpage/FrontpageSearch.js +11 -7
  73. package/es/Frontpage/FrontpageToolbox.js +18 -10
  74. package/es/Frontpage/illustrations/Fellesfag.js +1 -1
  75. package/es/Frontpage/illustrations/FrontpageHeaderIllustration.js +1 -1
  76. package/es/Frontpage/illustrations/FrontpageIllustrations.js +13 -9
  77. package/es/Frontpage/illustrations/FrontpageSubjectIllustration.js +7 -7
  78. package/es/Frontpage/illustrations/MenuFellesfag.js +1 -1
  79. package/es/Frontpage/illustrations/MenuStudiespesialiserende.js +1 -1
  80. package/es/Frontpage/illustrations/MenuYrkesfag.js +1 -1
  81. package/es/Frontpage/illustrations/Studiespesialiserende.js +1 -1
  82. package/es/Frontpage/illustrations/Yrkesfag.js +1 -1
  83. package/es/Hero/Hero.js +1 -1
  84. package/es/Image/Image.js +9 -7
  85. package/es/Image/ImageLink.js +9 -7
  86. package/es/Image/LazyLoadImage.js +2 -2
  87. package/es/InfoBlock/InfoBlock.js +22 -12
  88. package/es/InfoBox/InfoBox.js +6 -4
  89. package/es/InfoWidget/InfoWidget.js +46 -28
  90. package/es/LanguageSelector/LanguageSelector.js +42 -21
  91. package/es/LanguageSelector/LanguageSelectorContent.js +18 -6
  92. package/es/Layout/Content.js +1 -1
  93. package/es/Layout/LayoutItem.js +1 -1
  94. package/es/Layout/OneColumn.js +1 -1
  95. package/es/Layout/PageContainer.js +1 -1
  96. package/es/LearningPaths/LearningPathContent.js +6 -4
  97. package/es/LearningPaths/LearningPathInformation.js +16 -10
  98. package/es/LearningPaths/LearningPathLastStepNavigation.js +26 -16
  99. package/es/LearningPaths/LearningPathMenu.js +19 -11
  100. package/es/LearningPaths/LearningPathMenuAside.js +35 -15
  101. package/es/LearningPaths/LearningPathMenuAsideCopyright.js +10 -6
  102. package/es/LearningPaths/LearningPathMenuContent.js +33 -21
  103. package/es/LearningPaths/LearningPathMenuIntro.js +39 -23
  104. package/es/LearningPaths/LearningPathMenuModalWrapper.js +8 -4
  105. package/es/LearningPaths/LearningPathMobileHeader.js +18 -6
  106. package/es/LearningPaths/LearningPathMobileStepInfo.js +5 -3
  107. package/es/LearningPaths/LearningPathSticky.js +21 -13
  108. package/es/LearningPaths/LearningPathWrapper.js +13 -7
  109. package/es/Logo/Logo.js +1 -1
  110. package/es/Logo/SvgLogo.js +1 -1
  111. package/es/Masthead/Masthead.js +32 -20
  112. package/es/Masthead/MastheadAuthModal.js +5 -3
  113. package/es/Masthead/MastheadSearchModal.js +20 -10
  114. package/es/Masthead/SkipToMainContent.js +5 -3
  115. package/es/MediaList/MediaList.js +1 -1
  116. package/es/Messages/MessageBanner.js +18 -12
  117. package/es/Messages/MessageBox.js +51 -29
  118. package/es/Messages/MessageBoxTag.js +9 -7
  119. package/es/MultidisciplinarySubject/Illustrations.js +28 -14
  120. package/es/MultidisciplinarySubject/List.js +19 -13
  121. package/es/MultidisciplinarySubject/ListItem.js +41 -27
  122. package/es/MultidisciplinarySubject/MultidisciplinarySubject.js +42 -28
  123. package/es/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +38 -26
  124. package/es/MyNdla/Resource/Folder.js +45 -19
  125. package/es/MyNdla/Resource/FolderInput.js +17 -6
  126. package/es/NDLAFilm/AboutNdlaFilm.js +7 -5
  127. package/es/NDLAFilm/AllMoviesAlphabetically.js +62 -42
  128. package/es/NDLAFilm/CategorySelect.js +17 -11
  129. package/es/NDLAFilm/FilmContentCard.js +15 -9
  130. package/es/NDLAFilm/FilmContentCardTags.js +10 -6
  131. package/es/NDLAFilm/FilmMovieList.js +5 -3
  132. package/es/NDLAFilm/FilmMovieSearch.js +10 -6
  133. package/es/NDLAFilm/FilmSlideshow.js +44 -32
  134. package/es/NDLAFilm/MovieGrid.js +11 -7
  135. package/es/NDLAFilm/NavigationArrow.js +25 -13
  136. package/es/NDLAFilm/SlideshowIndicator.js +12 -8
  137. package/es/NDLAFilm/VisualElement.js +9 -7
  138. package/es/NDLAFilm/filmStyles.js +7 -3
  139. package/es/Navigation/NavigationBox.js +120 -82
  140. package/es/Navigation/NavigationHeading.js +26 -20
  141. package/es/Navigation/NavigationTopicAbout.js +82 -64
  142. package/es/NoContentBox/NoContentBox.js +1 -1
  143. package/es/Notion/ConceptNotion.js +12 -6
  144. package/es/Notion/FigureNotion.js +11 -3
  145. package/es/Notion/Notion.js +26 -18
  146. package/es/Notion/NotionImage.js +10 -6
  147. package/es/Notion/NotionVisualElement.js +12 -10
  148. package/es/Portrait/Portrait.js +14 -4
  149. package/es/Programme/Programme.js +30 -20
  150. package/es/Programme/ProgrammeSubjects.js +6 -4
  151. package/es/RadioButtonGroup/RadioButtonGroup.js +20 -12
  152. package/es/RelatedArticleList/RelatedArticleList.js +1 -1
  153. package/es/Resource/BlockResource.js +32 -13
  154. package/es/Resource/ListResource.js +53 -32
  155. package/es/Resource/resourceComponents.js +61 -30
  156. package/es/ResourceBox/ResourceBox.js +27 -15
  157. package/es/ResourceGroup/ResourceGroup.js +13 -7
  158. package/es/ResourceGroup/ResourceItem.js +59 -29
  159. package/es/ResourceGroup/ResourceList.js +13 -7
  160. package/es/ResourcesWrapper/ResourcesTitle.js +1 -1
  161. package/es/ResourcesWrapper/ResourcesTopicTitle.js +31 -19
  162. package/es/ResourcesWrapper/ResourcesWrapper.js +1 -1
  163. package/es/Search/ActiveFilterContent.js +10 -6
  164. package/es/Search/ActiveFilters.js +36 -24
  165. package/es/Search/ContentTypeResult.js +2 -4
  166. package/es/Search/ContentTypeResultStyles.js +76 -32
  167. package/es/Search/LoadingWrapper.js +6 -4
  168. package/es/Search/SearchField.js +13 -7
  169. package/es/Search/SearchFieldForm.js +19 -9
  170. package/es/Search/SearchResult.js +46 -26
  171. package/es/Search/SearchResultSleeve.js +35 -19
  172. package/es/Search/ToggleSearchButton.js +10 -6
  173. package/es/SearchTypeResult/ActiveFilterContent.js +14 -10
  174. package/es/SearchTypeResult/ActiveFilters.js +36 -24
  175. package/es/SearchTypeResult/PopupFilter.js +41 -27
  176. package/es/SearchTypeResult/ResultNavigation.js +18 -10
  177. package/es/SearchTypeResult/SearchFieldHeader.js +22 -14
  178. package/es/SearchTypeResult/SearchFilterContent.js +14 -10
  179. package/es/SearchTypeResult/SearchHeader.js +34 -18
  180. package/es/SearchTypeResult/SearchItem.js +51 -37
  181. package/es/SearchTypeResult/SearchItemList.js +71 -44
  182. package/es/SearchTypeResult/SearchItems.js +16 -12
  183. package/es/SearchTypeResult/SearchNotionItem.js +63 -39
  184. package/es/SearchTypeResult/SearchNotionsResult.js +19 -11
  185. package/es/SearchTypeResult/SearchSubjectItem.js +14 -8
  186. package/es/SearchTypeResult/SearchSubjectResult.js +9 -7
  187. package/es/SearchTypeResult/SearchTypeHeader.js +41 -23
  188. package/es/SearchTypeResult/SearchTypeResult.js +11 -7
  189. package/es/SearchTypeResult/SearchViewType.js +22 -14
  190. package/es/SearchTypeResult/components/ItemContexts.js +33 -19
  191. package/es/SearchTypeResult/components/ItemResourceHeader.js +47 -25
  192. package/es/SearchTypeResult/components/ItemTopicHeader.js +33 -15
  193. package/es/SearchTypeResult/components/SubjectFilters.js +9 -7
  194. package/es/SectionHeading/SectionHeading.js +16 -8
  195. package/es/SnackBar/DefaultSnackbar.js +13 -7
  196. package/es/SnackBar/SnackbarProvider.js +17 -13
  197. package/es/Subject/Subject.js +64 -38
  198. package/es/Subject/SubjectAbout.js +46 -26
  199. package/es/Subject/SubjectArchive.js +54 -32
  200. package/es/Subject/SubjectBanner.js +7 -5
  201. package/es/Subject/SubjectCarousel.js +26 -14
  202. package/es/Subject/SubjectHeader.js +23 -13
  203. package/es/Subject/SubjectLinks.js +17 -11
  204. package/es/Subject/SubjectNewContent.js +39 -23
  205. package/es/Subject/SubjectShortcuts.js +22 -14
  206. package/es/Subject/SubjectSocial.js +10 -6
  207. package/es/Table/Table.js +1 -1
  208. package/es/TagSelector/Control.js +32 -0
  209. package/es/TagSelector/DropdownIndicator.js +68 -0
  210. package/es/TagSelector/Input.js +28 -0
  211. package/es/TagSelector/Menu.js +35 -0
  212. package/es/TagSelector/MenuList.js +31 -0
  213. package/es/TagSelector/Option.js +59 -0
  214. package/es/TagSelector/SelectContainer.js +28 -0
  215. package/es/TagSelector/TagSelector.js +167 -102
  216. package/es/TagSelector/ValueButton.js +48 -0
  217. package/es/TagSelector/ariaMessages.js +104 -0
  218. package/es/TagSelector/index.js +2 -1
  219. package/es/TagSelector/types.js +0 -0
  220. package/es/ToolboxPage/ToolboxInfo.js +10 -6
  221. package/es/Topic/Loader.js +1 -1
  222. package/es/Topic/Topic.js +117 -83
  223. package/es/TopicIntroductionList/TopicIntroduction.js +1 -1
  224. package/es/TopicIntroductionList/TopicIntroductionList.js +1 -1
  225. package/es/TopicIntroductionList/TopicIntroductionShortcuts.js +1 -1
  226. package/es/TopicIntroductionList/TopicShortcutItem.js +1 -1
  227. package/es/TopicMenu/SubtopicLinkList.js +33 -19
  228. package/es/TopicMenu/TopicMenu.js +5 -3
  229. package/es/TopicMenu/TopicMenuButton.js +8 -4
  230. package/es/Translation/Translation.js +1 -1
  231. package/es/Translation/TranslationBox.js +1 -1
  232. package/es/Translation/TranslationLine.js +1 -1
  233. package/es/TreeStructure/AddFolderButton.js +14 -10
  234. package/es/TreeStructure/ComboboxButton.js +29 -24
  235. package/es/TreeStructure/FolderItem.js +27 -15
  236. package/es/TreeStructure/FolderItems.js +11 -7
  237. package/es/TreeStructure/NavigationLink.js +21 -10
  238. package/es/TreeStructure/TreeStructure.js +46 -28
  239. package/es/User/AuthModal.js +33 -19
  240. package/es/User/UserInfo.js +20 -10
  241. package/es/internal-icons/Book.js +1 -1
  242. package/es/internal-icons/Download.js +1 -1
  243. package/es/internal-icons/Embed.js +1 -1
  244. package/es/internal-icons/InsertTemplate.js +1 -1
  245. package/es/internal-icons/OpenWindow.js +1 -1
  246. package/es/locale/LocaleProvider.js +1 -1
  247. package/es/locale/messages-en.js +41 -3
  248. package/es/locale/messages-nb.js +41 -3
  249. package/es/locale/messages-nn.js +41 -3
  250. package/es/locale/messages-se.js +41 -3
  251. package/es/locale/messages-sma.js +41 -3
  252. package/es/utils/createUniversalPortal.js +1 -1
  253. package/lib/Animation/DisplayOnPageYOffset.d.ts +1 -1
  254. package/lib/Animation/DisplayOnPageYOffset.js +2 -2
  255. package/lib/Animation/Fade.d.ts +1 -1
  256. package/lib/Animation/Fade.js +2 -2
  257. package/lib/Article/Article.d.ts +3 -3
  258. package/lib/Article/Article.js +39 -35
  259. package/lib/Article/ArticleAccessMessage.d.ts +1 -2
  260. package/lib/Article/ArticleAccessMessage.js +15 -11
  261. package/lib/Article/ArticleByline.d.ts +1 -1
  262. package/lib/Article/ArticleByline.js +33 -25
  263. package/lib/Article/ArticleContent.d.ts +1 -2
  264. package/lib/Article/ArticleContent.js +2 -2
  265. package/lib/Article/ArticleFavoritesButton.d.ts +1 -2
  266. package/lib/Article/ArticleFavoritesButton.js +5 -5
  267. package/lib/Article/ArticleFootNotes.d.ts +1 -2
  268. package/lib/Article/ArticleFootNotes.js +7 -7
  269. package/lib/Article/ArticleHeaderWrapper.d.ts +2 -2
  270. package/lib/Article/ArticleHeaderWrapper.js +36 -28
  271. package/lib/Article/ArticleNotions.d.ts +1 -2
  272. package/lib/Article/ArticleNotions.js +33 -23
  273. package/lib/Article/ArticleSideBar.d.ts +1 -1
  274. package/lib/Article/ArticleSideBar.js +34 -26
  275. package/lib/Aside/Aside.d.ts +1 -1
  276. package/lib/Aside/Aside.js +2 -2
  277. package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
  278. package/lib/AudioPlayer/AudioPlayer.js +83 -55
  279. package/lib/AudioPlayer/Controls.d.ts +1 -2
  280. package/lib/AudioPlayer/Controls.js +161 -109
  281. package/lib/AudioPlayer/SpeechControl.d.ts +1 -2
  282. package/lib/AudioPlayer/SpeechControl.js +8 -6
  283. package/lib/AudioPlayer/initAudioPlayers.js +3 -3
  284. package/lib/AuthorInfo/AuthorInfo.d.ts +1 -2
  285. package/lib/AuthorInfo/AuthorInfo.js +16 -10
  286. package/lib/BannerCard/BannerCard.d.ts +1 -2
  287. package/lib/BannerCard/BannerCard.js +31 -17
  288. package/lib/BlogPosts/BlogPost.d.ts +1 -2
  289. package/lib/BlogPosts/BlogPost.js +26 -18
  290. package/lib/BlogPosts/BlogPostWrapper.d.ts +1 -1
  291. package/lib/BlogPosts/BlogPostWrapper.js +8 -6
  292. package/lib/Breadcrumb/ActionBreadcrumb.d.ts +1 -2
  293. package/lib/Breadcrumb/ActionBreadcrumb.js +31 -16
  294. package/lib/Breadcrumb/Breadcrumb.d.ts +1 -1
  295. package/lib/Breadcrumb/Breadcrumb.js +17 -13
  296. package/lib/Breadcrumb/BreadcrumbItem.js +41 -29
  297. package/lib/Breadcrumb/HeaderBreadcrumb.d.ts +1 -2
  298. package/lib/Breadcrumb/HeaderBreadcrumb.js +24 -11
  299. package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -2
  300. package/lib/Breadcrumb/HomeBreadcrumb.js +37 -25
  301. package/lib/Breadcrumblist/Breadcrumblist.d.ts +1 -1
  302. package/lib/Breadcrumblist/Breadcrumblist.js +51 -39
  303. package/lib/CompetenceGoalTab/CompetenceGoalItem.d.ts +1 -2
  304. package/lib/CompetenceGoalTab/CompetenceGoalItem.js +45 -29
  305. package/lib/CompetenceGoalTab/CompetenceGoalTab.d.ts +1 -2
  306. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +32 -22
  307. package/lib/CompetenceGoalTab/CompetenceItem.d.ts +1 -2
  308. package/lib/CompetenceGoalTab/CompetenceItem.js +84 -64
  309. package/lib/CompetenceGoalTab/SearchButton.d.ts +1 -2
  310. package/lib/CompetenceGoalTab/SearchButton.js +13 -9
  311. package/lib/CompetenceGoals/CompetenceGoalsDialog.d.ts +1 -1
  312. package/lib/CompetenceGoals/CompetenceGoalsDialog.js +22 -16
  313. package/lib/ComponentCursor/ComponentCursor.d.ts +1 -2
  314. package/lib/ComponentCursor/ComponentCursor.js +59 -41
  315. package/lib/ContentCard/ContentCard.d.ts +1 -2
  316. package/lib/ContentCard/ContentCard.js +39 -23
  317. package/lib/ContentLoader/index.d.ts +1 -1
  318. package/lib/ContentLoader/index.js +11 -11
  319. package/lib/ContentPlaceholder/ContentPlaceholder.d.ts +1 -2
  320. package/lib/ContentPlaceholder/ContentPlaceholder.js +22 -16
  321. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +9 -10
  322. package/lib/ContentTypeBadge/ContentTypeBadge.js +19 -19
  323. package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -2
  324. package/lib/CopyParagraphButton/CopyParagraphButton.js +47 -35
  325. package/lib/CopyParagraphButton/initCopyParagraphButtons.js +2 -2
  326. package/lib/CreatedBy/CreatedBy.d.ts +1 -2
  327. package/lib/CreatedBy/CreatedBy.js +29 -21
  328. package/lib/Dialog/Dialog.d.ts +1 -1
  329. package/lib/Dialog/Dialog.js +4 -4
  330. package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
  331. package/lib/ErrorMessage/ErrorMessage.js +31 -25
  332. package/lib/ErrorMessage/ErrorResourceAccessDenied.d.ts +1 -2
  333. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +10 -8
  334. package/lib/FactBox/FactBox.d.ts +1 -1
  335. package/lib/FactBox/FactBox.js +4 -4
  336. package/lib/Figure/Figure.d.ts +2 -2
  337. package/lib/Figure/Figure.js +10 -10
  338. package/lib/Figure/FigureBylineExpandButton.d.ts +1 -2
  339. package/lib/Figure/FigureBylineExpandButton.js +4 -4
  340. package/lib/Figure/FigureExpandButton.d.ts +1 -2
  341. package/lib/Figure/FigureExpandButton.js +4 -4
  342. package/lib/Figure/FigureLicense.d.ts +2 -2
  343. package/lib/Figure/FigureLicense.js +7 -7
  344. package/lib/Figure/FigureLicenseDialog.d.ts +1 -1
  345. package/lib/Figure/FigureLicenseDialog.js +5 -5
  346. package/lib/Figure/FigureOpenDialogButton.d.ts +1 -2
  347. package/lib/Figure/FigureOpenDialogButton.js +7 -7
  348. package/lib/FileList/File.d.ts +1 -2
  349. package/lib/FileList/File.js +23 -17
  350. package/lib/FileList/FileList.d.ts +1 -2
  351. package/lib/FileList/FileList.js +19 -13
  352. package/lib/Filter/FilterButtons.d.ts +1 -2
  353. package/lib/Filter/FilterButtons.js +64 -46
  354. package/lib/Filter/FilterCarousel.d.ts +1 -1
  355. package/lib/Filter/FilterCarousel.js +37 -31
  356. package/lib/Filter/FilterList.d.ts +1 -1
  357. package/lib/Filter/FilterList.js +5 -5
  358. package/lib/Filter/FilterListPhone.d.ts +1 -2
  359. package/lib/Filter/FilterListPhone.js +19 -19
  360. package/lib/Filter/ToggleItem.d.ts +1 -1
  361. package/lib/Filter/ToggleItem.js +4 -4
  362. package/lib/Footer/EditorName.d.ts +1 -2
  363. package/lib/Footer/EditorName.js +2 -2
  364. package/lib/Footer/Footer.d.ts +1 -1
  365. package/lib/Footer/Footer.js +43 -29
  366. package/lib/Footer/FooterAuth.d.ts +1 -2
  367. package/lib/Footer/FooterAuth.js +38 -24
  368. package/lib/Footer/FooterLinks.d.ts +1 -1
  369. package/lib/Footer/FooterLinks.js +38 -26
  370. package/lib/Footer/FooterPrivacy.d.ts +1 -2
  371. package/lib/Footer/FooterPrivacy.js +21 -17
  372. package/lib/Footer/FooterText.d.ts +1 -1
  373. package/lib/Footer/FooterText.js +9 -7
  374. package/lib/Footer/privacy_en.d.ts +1 -2
  375. package/lib/Footer/privacy_en.js +2 -2
  376. package/lib/Footer/privacy_nb.d.ts +1 -2
  377. package/lib/Footer/privacy_nb.js +2 -2
  378. package/lib/Footer/privacy_nn.d.ts +1 -2
  379. package/lib/Footer/privacy_nn.js +2 -2
  380. package/lib/Frontpage/FrontpageAllSubjects.d.ts +1 -2
  381. package/lib/Frontpage/FrontpageAllSubjects.js +55 -41
  382. package/lib/Frontpage/FrontpageFilm.d.ts +1 -1
  383. package/lib/Frontpage/FrontpageFilm.js +39 -29
  384. package/lib/Frontpage/FrontpageHeader.d.ts +1 -1
  385. package/lib/Frontpage/FrontpageHeader.js +22 -14
  386. package/lib/Frontpage/FrontpageInfo.d.ts +1 -1
  387. package/lib/Frontpage/FrontpageInfo.js +7 -5
  388. package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +21 -6
  389. package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +46 -32
  390. package/lib/Frontpage/FrontpageProgramMenu.d.ts +1 -2
  391. package/lib/Frontpage/FrontpageProgramMenu.js +61 -43
  392. package/lib/Frontpage/FrontpageSearch.d.ts +1 -1
  393. package/lib/Frontpage/FrontpageSearch.js +16 -12
  394. package/lib/Frontpage/FrontpageToolbox.d.ts +1 -1
  395. package/lib/Frontpage/FrontpageToolbox.js +23 -15
  396. package/lib/Frontpage/illustrations/Fellesfag.d.ts +1 -2
  397. package/lib/Frontpage/illustrations/Fellesfag.js +15 -15
  398. package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.d.ts +1 -2
  399. package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.js +31 -31
  400. package/lib/Frontpage/illustrations/FrontpageIllustrations.d.ts +8 -2
  401. package/lib/Frontpage/illustrations/FrontpageIllustrations.js +13 -9
  402. package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.d.ts +1 -2
  403. package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.js +47 -47
  404. package/lib/Frontpage/illustrations/MenuFellesfag.d.ts +1 -2
  405. package/lib/Frontpage/illustrations/MenuFellesfag.js +16 -16
  406. package/lib/Frontpage/illustrations/MenuStudiespesialiserende.d.ts +1 -2
  407. package/lib/Frontpage/illustrations/MenuStudiespesialiserende.js +13 -13
  408. package/lib/Frontpage/illustrations/MenuYrkesfag.d.ts +1 -2
  409. package/lib/Frontpage/illustrations/MenuYrkesfag.js +20 -20
  410. package/lib/Frontpage/illustrations/Studiespesialiserende.d.ts +1 -2
  411. package/lib/Frontpage/illustrations/Studiespesialiserende.js +13 -13
  412. package/lib/Frontpage/illustrations/Yrkesfag.d.ts +1 -2
  413. package/lib/Frontpage/illustrations/Yrkesfag.js +19 -19
  414. package/lib/Frontpage/illustrations/index.d.ts +6 -7
  415. package/lib/Hero/Hero.d.ts +8 -8
  416. package/lib/Hero/Hero.js +9 -9
  417. package/lib/Image/Image.d.ts +1 -1
  418. package/lib/Image/Image.js +13 -11
  419. package/lib/Image/ImageLink.d.ts +1 -1
  420. package/lib/Image/ImageLink.js +10 -8
  421. package/lib/Image/LazyLoadImage.d.ts +1 -2
  422. package/lib/Image/LazyLoadImage.js +4 -4
  423. package/lib/InfoBlock/InfoBlock.d.ts +1 -1
  424. package/lib/InfoBlock/InfoBlock.js +23 -13
  425. package/lib/InfoBox/InfoBox.d.ts +1 -1
  426. package/lib/InfoBox/InfoBox.js +7 -5
  427. package/lib/InfoWidget/InfoWidget.d.ts +1 -1
  428. package/lib/InfoWidget/InfoWidget.js +56 -38
  429. package/lib/LanguageSelector/LanguageSelector.d.ts +1 -2
  430. package/lib/LanguageSelector/LanguageSelector.js +51 -30
  431. package/lib/LanguageSelector/LanguageSelectorContent.d.ts +1 -2
  432. package/lib/LanguageSelector/LanguageSelectorContent.js +21 -10
  433. package/lib/Layout/Content.d.ts +1 -1
  434. package/lib/Layout/Content.js +2 -2
  435. package/lib/Layout/LayoutItem.d.ts +1 -1
  436. package/lib/Layout/LayoutItem.js +5 -5
  437. package/lib/Layout/OneColumn.d.ts +1 -1
  438. package/lib/Layout/OneColumn.js +2 -2
  439. package/lib/Layout/PageContainer.d.ts +1 -1
  440. package/lib/Layout/PageContainer.js +2 -2
  441. package/lib/LearningPaths/LearningPathContent.d.ts +1 -1
  442. package/lib/LearningPaths/LearningPathContent.js +7 -5
  443. package/lib/LearningPaths/LearningPathInformation.d.ts +1 -2
  444. package/lib/LearningPaths/LearningPathInformation.js +21 -15
  445. package/lib/LearningPaths/LearningPathLastStepNavigation.d.ts +1 -1
  446. package/lib/LearningPaths/LearningPathLastStepNavigation.js +32 -22
  447. package/lib/LearningPaths/LearningPathMenu.d.ts +1 -2
  448. package/lib/LearningPaths/LearningPathMenu.js +38 -30
  449. package/lib/LearningPaths/LearningPathMenuAside.d.ts +1 -1
  450. package/lib/LearningPaths/LearningPathMenuAside.js +49 -29
  451. package/lib/LearningPaths/LearningPathMenuAsideCopyright.d.ts +1 -2
  452. package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +13 -9
  453. package/lib/LearningPaths/LearningPathMenuContent.d.ts +1 -2
  454. package/lib/LearningPaths/LearningPathMenuContent.js +53 -41
  455. package/lib/LearningPaths/LearningPathMenuIntro.d.ts +1 -2
  456. package/lib/LearningPaths/LearningPathMenuIntro.js +48 -32
  457. package/lib/LearningPaths/LearningPathMenuModalWrapper.d.ts +1 -1
  458. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +13 -9
  459. package/lib/LearningPaths/LearningPathMobileHeader.d.ts +1 -1
  460. package/lib/LearningPaths/LearningPathMobileHeader.js +19 -8
  461. package/lib/LearningPaths/LearningPathMobileStepInfo.d.ts +1 -1
  462. package/lib/LearningPaths/LearningPathMobileStepInfo.js +6 -4
  463. package/lib/LearningPaths/LearningPathSticky.d.ts +3 -3
  464. package/lib/LearningPaths/LearningPathSticky.js +37 -29
  465. package/lib/LearningPaths/LearningPathWrapper.d.ts +1 -1
  466. package/lib/LearningPaths/LearningPathWrapper.js +17 -11
  467. package/lib/Logo/Logo.d.ts +1 -2
  468. package/lib/Logo/Logo.js +5 -5
  469. package/lib/Logo/SvgLogo.d.ts +1 -2
  470. package/lib/Logo/SvgLogo.js +8 -8
  471. package/lib/Masthead/Masthead.d.ts +2 -2
  472. package/lib/Masthead/Masthead.js +48 -36
  473. package/lib/Masthead/MastheadAuthModal.d.ts +1 -2
  474. package/lib/Masthead/MastheadAuthModal.js +8 -6
  475. package/lib/Masthead/MastheadSearchModal.d.ts +1 -1
  476. package/lib/Masthead/MastheadSearchModal.js +40 -30
  477. package/lib/Masthead/SkipToMainContent.d.ts +1 -2
  478. package/lib/Masthead/SkipToMainContent.js +6 -4
  479. package/lib/MediaList/MediaList.d.ts +8 -8
  480. package/lib/MediaList/MediaList.js +15 -15
  481. package/lib/Messages/MessageBanner.d.ts +1 -2
  482. package/lib/Messages/MessageBanner.js +21 -15
  483. package/lib/Messages/MessageBox.d.ts +2 -2
  484. package/lib/Messages/MessageBox.js +60 -38
  485. package/lib/Messages/MessageBoxTag.d.ts +1 -2
  486. package/lib/Messages/MessageBoxTag.js +10 -8
  487. package/lib/MultidisciplinarySubject/Illustrations.d.ts +28 -7
  488. package/lib/MultidisciplinarySubject/Illustrations.js +28 -14
  489. package/lib/MultidisciplinarySubject/List.d.ts +1 -2
  490. package/lib/MultidisciplinarySubject/List.js +21 -15
  491. package/lib/MultidisciplinarySubject/ListItem.d.ts +1 -2
  492. package/lib/MultidisciplinarySubject/ListItem.js +45 -31
  493. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.d.ts +1 -1
  494. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +47 -33
  495. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.d.ts +1 -2
  496. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +47 -35
  497. package/lib/MyNdla/Resource/Folder.d.ts +1 -2
  498. package/lib/MyNdla/Resource/Folder.js +53 -28
  499. package/lib/MyNdla/Resource/FolderInput.d.ts +1 -1
  500. package/lib/MyNdla/Resource/FolderInput.js +15 -11
  501. package/lib/NDLAFilm/AboutNdlaFilm.d.ts +1 -1
  502. package/lib/NDLAFilm/AboutNdlaFilm.js +14 -12
  503. package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +1 -2
  504. package/lib/NDLAFilm/AllMoviesAlphabetically.js +80 -60
  505. package/lib/NDLAFilm/CategorySelect.js +31 -25
  506. package/lib/NDLAFilm/FilmContentCard.d.ts +1 -2
  507. package/lib/NDLAFilm/FilmContentCard.js +20 -14
  508. package/lib/NDLAFilm/FilmContentCardTags.d.ts +1 -2
  509. package/lib/NDLAFilm/FilmContentCardTags.js +12 -8
  510. package/lib/NDLAFilm/FilmMovieList.d.ts +1 -2
  511. package/lib/NDLAFilm/FilmMovieList.js +8 -6
  512. package/lib/NDLAFilm/FilmMovieSearch.d.ts +1 -2
  513. package/lib/NDLAFilm/FilmMovieSearch.js +17 -13
  514. package/lib/NDLAFilm/FilmSlideshow.d.ts +1 -2
  515. package/lib/NDLAFilm/FilmSlideshow.js +91 -79
  516. package/lib/NDLAFilm/MovieGrid.d.ts +1 -2
  517. package/lib/NDLAFilm/MovieGrid.js +15 -11
  518. package/lib/NDLAFilm/NavigationArrow.d.ts +5 -2
  519. package/lib/NDLAFilm/NavigationArrow.js +27 -15
  520. package/lib/NDLAFilm/SlideshowIndicator.d.ts +1 -2
  521. package/lib/NDLAFilm/SlideshowIndicator.js +15 -11
  522. package/lib/NDLAFilm/VisualElement.d.ts +1 -2
  523. package/lib/NDLAFilm/VisualElement.js +11 -9
  524. package/lib/NDLAFilm/filmStyles.d.ts +8 -2
  525. package/lib/NDLAFilm/filmStyles.js +7 -3
  526. package/lib/Navigation/NavigationBox.d.ts +1 -1
  527. package/lib/Navigation/NavigationBox.js +128 -90
  528. package/lib/Navigation/NavigationHeading.d.ts +1 -1
  529. package/lib/Navigation/NavigationHeading.js +35 -29
  530. package/lib/Navigation/NavigationTopicAbout.d.ts +1 -1
  531. package/lib/Navigation/NavigationTopicAbout.js +88 -70
  532. package/lib/NoContentBox/NoContentBox.d.ts +1 -2
  533. package/lib/NoContentBox/NoContentBox.js +2 -2
  534. package/lib/Notion/ConceptNotion.d.ts +1 -2
  535. package/lib/Notion/ConceptNotion.js +16 -16
  536. package/lib/Notion/FigureNotion.d.ts +1 -1
  537. package/lib/Notion/FigureNotion.js +10 -8
  538. package/lib/Notion/Notion.d.ts +1 -1
  539. package/lib/Notion/Notion.js +31 -23
  540. package/lib/Notion/NotionImage.d.ts +1 -2
  541. package/lib/Notion/NotionImage.js +13 -9
  542. package/lib/Notion/NotionVisualElement.d.ts +1 -1
  543. package/lib/Notion/NotionVisualElement.js +16 -14
  544. package/lib/Portrait/Portrait.d.ts +1 -2
  545. package/lib/Portrait/Portrait.js +15 -6
  546. package/lib/Programme/Programme.d.ts +1 -2
  547. package/lib/Programme/Programme.js +34 -24
  548. package/lib/Programme/ProgrammeSubjects.d.ts +1 -2
  549. package/lib/Programme/ProgrammeSubjects.js +10 -8
  550. package/lib/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  551. package/lib/RadioButtonGroup/RadioButtonGroup.js +25 -17
  552. package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
  553. package/lib/RelatedArticleList/RelatedArticleList.js +7 -7
  554. package/lib/Resource/BlockResource.d.ts +1 -2
  555. package/lib/Resource/BlockResource.js +41 -29
  556. package/lib/Resource/ListResource.d.ts +1 -2
  557. package/lib/Resource/ListResource.js +68 -54
  558. package/lib/Resource/resourceComponents.d.ts +18 -7
  559. package/lib/Resource/resourceComponents.js +65 -41
  560. package/lib/ResourceBox/ResourceBox.d.ts +1 -2
  561. package/lib/ResourceBox/ResourceBox.js +30 -18
  562. package/lib/ResourceGroup/ResourceGroup.d.ts +1 -2
  563. package/lib/ResourceGroup/ResourceGroup.js +15 -9
  564. package/lib/ResourceGroup/ResourceItem.d.ts +1 -2
  565. package/lib/ResourceGroup/ResourceItem.js +89 -59
  566. package/lib/ResourceGroup/ResourceList.d.ts +1 -2
  567. package/lib/ResourceGroup/ResourceList.js +15 -9
  568. package/lib/ResourcesWrapper/ResourcesTitle.d.ts +1 -1
  569. package/lib/ResourcesWrapper/ResourcesTitle.js +3 -3
  570. package/lib/ResourcesWrapper/ResourcesTopicTitle.d.ts +1 -2
  571. package/lib/ResourcesWrapper/ResourcesTopicTitle.js +43 -31
  572. package/lib/ResourcesWrapper/ResourcesWrapper.d.ts +1 -1
  573. package/lib/ResourcesWrapper/ResourcesWrapper.js +3 -3
  574. package/lib/Search/ActiveFilterContent.d.ts +5 -2
  575. package/lib/Search/ActiveFilterContent.js +12 -8
  576. package/lib/Search/ActiveFilters.d.ts +1 -2
  577. package/lib/Search/ActiveFilters.js +46 -34
  578. package/lib/Search/ContentTypeResult.d.ts +1 -2
  579. package/lib/Search/ContentTypeResult.js +15 -17
  580. package/lib/Search/ContentTypeResultStyles.d.ts +24 -6
  581. package/lib/Search/ContentTypeResultStyles.js +84 -40
  582. package/lib/Search/LoadingWrapper.d.ts +1 -2
  583. package/lib/Search/LoadingWrapper.js +7 -5
  584. package/lib/Search/SearchField.d.ts +1 -1
  585. package/lib/Search/SearchField.js +25 -19
  586. package/lib/Search/SearchFieldForm.d.ts +1 -1
  587. package/lib/Search/SearchFieldForm.js +21 -11
  588. package/lib/Search/SearchResult.d.ts +2 -2
  589. package/lib/Search/SearchResult.js +61 -41
  590. package/lib/Search/SearchResultSleeve.d.ts +1 -2
  591. package/lib/Search/SearchResultSleeve.js +46 -30
  592. package/lib/Search/ToggleSearchButton.d.ts +1 -2
  593. package/lib/Search/ToggleSearchButton.js +12 -8
  594. package/lib/SearchTypeResult/ActiveFilterContent.d.ts +5 -2
  595. package/lib/SearchTypeResult/ActiveFilterContent.js +16 -12
  596. package/lib/SearchTypeResult/ActiveFilters.d.ts +1 -1
  597. package/lib/SearchTypeResult/ActiveFilters.js +53 -41
  598. package/lib/SearchTypeResult/PopupFilter.d.ts +1 -2
  599. package/lib/SearchTypeResult/PopupFilter.js +50 -36
  600. package/lib/SearchTypeResult/ResultNavigation.d.ts +1 -2
  601. package/lib/SearchTypeResult/ResultNavigation.js +22 -14
  602. package/lib/SearchTypeResult/SearchFieldHeader.d.ts +1 -1
  603. package/lib/SearchTypeResult/SearchFieldHeader.js +29 -21
  604. package/lib/SearchTypeResult/SearchFilterContent.d.ts +1 -2
  605. package/lib/SearchTypeResult/SearchFilterContent.js +16 -12
  606. package/lib/SearchTypeResult/SearchHeader.d.ts +1 -1
  607. package/lib/SearchTypeResult/SearchHeader.js +40 -24
  608. package/lib/SearchTypeResult/SearchItem.d.ts +1 -1
  609. package/lib/SearchTypeResult/SearchItem.js +58 -44
  610. package/lib/SearchTypeResult/SearchItemList.d.ts +1 -2
  611. package/lib/SearchTypeResult/SearchItemList.js +79 -52
  612. package/lib/SearchTypeResult/SearchItems.d.ts +1 -1
  613. package/lib/SearchTypeResult/SearchItems.js +18 -14
  614. package/lib/SearchTypeResult/SearchNotionItem.d.ts +1 -1
  615. package/lib/SearchTypeResult/SearchNotionItem.js +75 -51
  616. package/lib/SearchTypeResult/SearchNotionsResult.d.ts +1 -1
  617. package/lib/SearchTypeResult/SearchNotionsResult.js +21 -13
  618. package/lib/SearchTypeResult/SearchSubjectItem.d.ts +1 -2
  619. package/lib/SearchTypeResult/SearchSubjectItem.js +16 -10
  620. package/lib/SearchTypeResult/SearchSubjectResult.d.ts +1 -2
  621. package/lib/SearchTypeResult/SearchSubjectResult.js +11 -9
  622. package/lib/SearchTypeResult/SearchTypeHeader.d.ts +1 -1
  623. package/lib/SearchTypeResult/SearchTypeHeader.js +47 -29
  624. package/lib/SearchTypeResult/SearchTypeResult.d.ts +1 -1
  625. package/lib/SearchTypeResult/SearchTypeResult.js +14 -10
  626. package/lib/SearchTypeResult/SearchViewType.d.ts +1 -2
  627. package/lib/SearchTypeResult/SearchViewType.js +28 -20
  628. package/lib/SearchTypeResult/components/ItemContexts.d.ts +1 -2
  629. package/lib/SearchTypeResult/components/ItemContexts.js +46 -32
  630. package/lib/SearchTypeResult/components/ItemResourceHeader.d.ts +1 -2
  631. package/lib/SearchTypeResult/components/ItemResourceHeader.js +50 -29
  632. package/lib/SearchTypeResult/components/ItemTopicHeader.d.ts +1 -1
  633. package/lib/SearchTypeResult/components/ItemTopicHeader.js +35 -24
  634. package/lib/SearchTypeResult/components/SubjectFilters.d.ts +1 -2
  635. package/lib/SearchTypeResult/components/SubjectFilters.js +14 -12
  636. package/lib/SectionHeading/SectionHeading.d.ts +1 -1
  637. package/lib/SectionHeading/SectionHeading.js +21 -13
  638. package/lib/SnackBar/DefaultSnackbar.d.ts +1 -2
  639. package/lib/SnackBar/DefaultSnackbar.js +15 -9
  640. package/lib/SnackBar/SnackbarProvider.d.ts +2 -2
  641. package/lib/SnackBar/SnackbarProvider.js +27 -23
  642. package/lib/Subject/Subject.d.ts +8 -8
  643. package/lib/Subject/Subject.js +97 -71
  644. package/lib/Subject/SubjectAbout.d.ts +1 -1
  645. package/lib/Subject/SubjectAbout.js +63 -43
  646. package/lib/Subject/SubjectArchive.d.ts +1 -1
  647. package/lib/Subject/SubjectArchive.js +65 -43
  648. package/lib/Subject/SubjectBanner.d.ts +1 -2
  649. package/lib/Subject/SubjectBanner.js +8 -6
  650. package/lib/Subject/SubjectCarousel.d.ts +1 -1
  651. package/lib/Subject/SubjectCarousel.js +43 -31
  652. package/lib/Subject/SubjectHeader.d.ts +1 -2
  653. package/lib/Subject/SubjectHeader.js +39 -29
  654. package/lib/Subject/SubjectLinks.d.ts +1 -2
  655. package/lib/Subject/SubjectLinks.js +20 -14
  656. package/lib/Subject/SubjectNewContent.d.ts +1 -2
  657. package/lib/Subject/SubjectNewContent.js +42 -26
  658. package/lib/Subject/SubjectShortcuts.d.ts +1 -1
  659. package/lib/Subject/SubjectShortcuts.js +28 -20
  660. package/lib/Subject/SubjectSocial.d.ts +2 -2
  661. package/lib/Subject/SubjectSocial.js +12 -8
  662. package/lib/Table/Table.d.ts +1 -1
  663. package/lib/Table/Table.js +5 -5
  664. package/lib/TagSelector/Control.d.ts +11 -0
  665. package/lib/TagSelector/Control.js +37 -0
  666. package/lib/TagSelector/DropdownIndicator.d.ts +11 -0
  667. package/lib/TagSelector/DropdownIndicator.js +82 -0
  668. package/lib/TagSelector/Input.d.ts +11 -0
  669. package/lib/TagSelector/Input.js +35 -0
  670. package/lib/TagSelector/Menu.d.ts +11 -0
  671. package/lib/TagSelector/Menu.js +42 -0
  672. package/lib/TagSelector/MenuList.d.ts +16 -0
  673. package/lib/TagSelector/MenuList.js +38 -0
  674. package/lib/TagSelector/Option.d.ts +11 -0
  675. package/lib/TagSelector/Option.js +65 -0
  676. package/lib/TagSelector/SelectContainer.d.ts +11 -0
  677. package/lib/TagSelector/SelectContainer.js +40 -0
  678. package/lib/TagSelector/TagSelector.d.ts +14 -12
  679. package/lib/TagSelector/TagSelector.js +171 -98
  680. package/lib/TagSelector/ValueButton.d.ts +19 -0
  681. package/lib/TagSelector/ValueButton.js +57 -0
  682. package/lib/TagSelector/ariaMessages.d.ts +16 -0
  683. package/lib/TagSelector/ariaMessages.js +113 -0
  684. package/lib/TagSelector/index.d.ts +2 -1
  685. package/lib/TagSelector/index.js +3 -5
  686. package/lib/TagSelector/types.d.ts +11 -0
  687. package/lib/TagSelector/types.js +1 -0
  688. package/lib/ToolboxPage/ToolboxInfo.d.ts +1 -1
  689. package/lib/ToolboxPage/ToolboxInfo.js +11 -7
  690. package/lib/Topic/Loader.d.ts +1 -2
  691. package/lib/Topic/Loader.js +15 -15
  692. package/lib/Topic/Topic.d.ts +1 -1
  693. package/lib/Topic/Topic.js +132 -98
  694. package/lib/TopicIntroductionList/TopicIntroduction.d.ts +1 -2
  695. package/lib/TopicIntroductionList/TopicIntroduction.js +15 -15
  696. package/lib/TopicIntroductionList/TopicIntroductionList.d.ts +1 -2
  697. package/lib/TopicIntroductionList/TopicIntroductionList.js +4 -4
  698. package/lib/TopicIntroductionList/TopicIntroductionShortcuts.d.ts +1 -2
  699. package/lib/TopicIntroductionList/TopicIntroductionShortcuts.js +7 -7
  700. package/lib/TopicIntroductionList/TopicShortcutItem.d.ts +1 -2
  701. package/lib/TopicIntroductionList/TopicShortcutItem.js +5 -5
  702. package/lib/TopicMenu/SubtopicLinkList.js +50 -36
  703. package/lib/TopicMenu/TopicMenu.js +32 -30
  704. package/lib/TopicMenu/TopicMenuButton.js +11 -7
  705. package/lib/Translation/Translation.d.ts +1 -1
  706. package/lib/Translation/Translation.js +2 -2
  707. package/lib/Translation/TranslationBox.d.ts +1 -1
  708. package/lib/Translation/TranslationBox.js +4 -4
  709. package/lib/Translation/TranslationLine.d.ts +1 -1
  710. package/lib/Translation/TranslationLine.js +5 -5
  711. package/lib/TreeStructure/AddFolderButton.d.ts +1 -2
  712. package/lib/TreeStructure/AddFolderButton.js +17 -13
  713. package/lib/TreeStructure/ComboboxButton.js +33 -28
  714. package/lib/TreeStructure/FolderItem.d.ts +1 -2
  715. package/lib/TreeStructure/FolderItem.js +32 -20
  716. package/lib/TreeStructure/FolderItems.d.ts +1 -1
  717. package/lib/TreeStructure/FolderItems.js +17 -13
  718. package/lib/TreeStructure/NavigationLink.d.ts +1 -2
  719. package/lib/TreeStructure/NavigationLink.js +16 -12
  720. package/lib/TreeStructure/TreeStructure.d.ts +1 -2
  721. package/lib/TreeStructure/TreeStructure.js +51 -33
  722. package/lib/User/AuthModal.d.ts +1 -1
  723. package/lib/User/AuthModal.js +42 -28
  724. package/lib/User/UserInfo.d.ts +1 -2
  725. package/lib/User/UserInfo.js +24 -20
  726. package/lib/internal-icons/Book.js +3 -3
  727. package/lib/internal-icons/Download.js +3 -3
  728. package/lib/internal-icons/Embed.js +3 -3
  729. package/lib/internal-icons/InsertTemplate.js +3 -3
  730. package/lib/internal-icons/OpenWindow.js +3 -3
  731. package/lib/locale/LocaleProvider.d.ts +1 -1
  732. package/lib/locale/LocaleProvider.js +4 -4
  733. package/lib/locale/messages-en.d.ts +40 -2
  734. package/lib/locale/messages-en.js +41 -3
  735. package/lib/locale/messages-nb.d.ts +40 -2
  736. package/lib/locale/messages-nb.js +41 -3
  737. package/lib/locale/messages-nn.d.ts +40 -2
  738. package/lib/locale/messages-nn.js +41 -3
  739. package/lib/locale/messages-se.d.ts +40 -2
  740. package/lib/locale/messages-se.js +41 -3
  741. package/lib/locale/messages-sma.d.ts +40 -2
  742. package/lib/locale/messages-sma.js +41 -3
  743. package/lib/utils/createUniversalPortal.d.ts +1 -1
  744. package/lib/utils/createUniversalPortal.js +2 -2
  745. package/package.json +19 -18
  746. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
  747. package/src/ComponentCursor/ComponentCursor.tsx +1 -1
  748. package/src/CopyParagraphButton/CopyParagraphButton.tsx +21 -19
  749. package/src/Filter/FilterCarousel.tsx +1 -1
  750. package/src/Frontpage/FrontpageFilm.tsx +1 -1
  751. package/src/Frontpage/illustrations/FrontpageSubjectIllustration.tsx +1 -1
  752. package/src/Image/LazyLoadImage.tsx +0 -1
  753. package/src/Image/__tests__/Image-test.jsx +8 -7
  754. package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +8 -20
  755. package/src/InfoWidget/InfoWidget.tsx +1 -1
  756. package/src/LanguageSelector/LanguageSelector.tsx +1 -1
  757. package/src/LearningPaths/LearningPathLastStepNavigation.tsx +1 -1
  758. package/src/LearningPaths/LearningPathMenu.tsx +1 -1
  759. package/src/LearningPaths/LearningPathMenuAside.tsx +1 -1
  760. package/src/LearningPaths/LearningPathMenuContent.tsx +1 -1
  761. package/src/LearningPaths/LearningPathMenuIntro.tsx +1 -1
  762. package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +1 -1
  763. package/src/LearningPaths/LearningPathSticky.tsx +1 -1
  764. package/src/LearningPaths/LearningPathWrapper.tsx +1 -1
  765. package/src/Masthead/Masthead.tsx +1 -1
  766. package/src/Masthead/MastheadSearchModal.tsx +1 -1
  767. package/src/Messages/MessageBox.tsx +1 -1
  768. package/src/MyNdla/Resource/Folder.tsx +1 -1
  769. package/src/NDLAFilm/AllMoviesAlphabetically.tsx +1 -1
  770. package/src/NDLAFilm/CategorySelect.tsx +1 -1
  771. package/src/NDLAFilm/FilmSlideshow.tsx +1 -1
  772. package/src/NDLAFilm/NavigationArrow.tsx +1 -1
  773. package/src/Navigation/NavigationBox.tsx +1 -1
  774. package/src/Navigation/NavigationHeading.tsx +1 -1
  775. package/src/Navigation/NavigationTopicAbout.tsx +1 -1
  776. package/src/Notion/ConceptNotion.tsx +0 -2
  777. package/src/Notion/NotionVisualElement.tsx +1 -1
  778. package/src/Resource/ListResource.tsx +1 -1
  779. package/src/ResourceGroup/ResourceItem.tsx +2 -2
  780. package/src/ResourceGroup/ResourceList.tsx +2 -2
  781. package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +1 -1
  782. package/src/Search/ActiveFilters.tsx +1 -1
  783. package/src/Search/ContentTypeResultStyles.tsx +1 -1
  784. package/src/Search/SearchField.tsx +1 -1
  785. package/src/Search/SearchFieldForm.tsx +1 -1
  786. package/src/SearchTypeResult/ActiveFilters.tsx +1 -1
  787. package/src/SearchTypeResult/SearchItem.tsx +6 -49
  788. package/src/SearchTypeResult/SearchItemList.tsx +12 -19
  789. package/src/SearchTypeResult/components/ItemResourceHeader.tsx +19 -23
  790. package/src/SearchTypeResult/components/ItemTopicHeader.tsx +3 -5
  791. package/src/SectionHeading/SectionHeading.tsx +1 -1
  792. package/src/SnackBar/SnackbarProvider.tsx +1 -1
  793. package/src/Subject/Subject.tsx +1 -1
  794. package/src/Subject/SubjectAbout.tsx +1 -1
  795. package/src/Subject/SubjectCarousel.tsx +1 -1
  796. package/src/Subject/SubjectHeader.tsx +1 -1
  797. package/src/TagSelector/Control.tsx +34 -0
  798. package/src/TagSelector/DropdownIndicator.tsx +47 -0
  799. package/src/TagSelector/Input.tsx +31 -0
  800. package/src/TagSelector/Menu.tsx +38 -0
  801. package/src/TagSelector/MenuList.tsx +30 -0
  802. package/src/TagSelector/Option.tsx +53 -0
  803. package/src/TagSelector/SelectContainer.tsx +32 -0
  804. package/src/TagSelector/TagSelector.tsx +105 -84
  805. package/src/TagSelector/ValueButton.tsx +46 -0
  806. package/src/TagSelector/ariaMessages.ts +87 -0
  807. package/src/TagSelector/index.ts +2 -1
  808. package/src/TagSelector/types.ts +12 -0
  809. package/src/Topic/Topic.tsx +1 -1
  810. package/src/TopicMenu/SubtopicLinkList.jsx +1 -1
  811. package/src/TopicMenu/TopicMenuButton.jsx +1 -1
  812. package/src/TreeStructure/ComboboxButton.tsx +15 -17
  813. package/src/TreeStructure/TreeStructure.tsx +3 -12
  814. package/src/locale/messages-en.ts +42 -3
  815. package/src/locale/messages-nb.ts +42 -3
  816. package/src/locale/messages-nn.ts +42 -3
  817. package/src/locale/messages-se.ts +42 -3
  818. package/src/locale/messages-sma.ts +42 -3
  819. package/es/TagSelector/SuggestionInput.js +0 -285
  820. package/es/TagSelector/Suggestions.js +0 -97
  821. package/lib/TagSelector/SuggestionInput.d.ts +0 -19
  822. package/lib/TagSelector/SuggestionInput.js +0 -299
  823. package/lib/TagSelector/Suggestions.d.ts +0 -12
  824. package/lib/TagSelector/Suggestions.js +0 -99
  825. package/src/TagSelector/SuggestionInput.tsx +0 -287
  826. package/src/TagSelector/Suggestions.tsx +0 -139
@@ -10,7 +10,7 @@ import React, { Fragment } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
12
 
13
- import { animations, fonts, spacing } from '@ndla/core';
13
+ import { fonts, spacing } from '@ndla/core';
14
14
 
15
15
  import { ContentType } from '../SearchTypeResult';
16
16
  import { SearchItemType } from '../SearchItem';
@@ -23,32 +23,30 @@ type ItemTypeProps = {
23
23
  };
24
24
 
25
25
  const ImageElement = styled.img`
26
- border-top-left-radius: 5px;
27
- border-top-right-radius: 5px;
28
26
  width: 100%;
29
27
  height: 100%;
30
28
  object-fit: cover;
29
+ `;
30
+
31
+ const ImageWrapper = styled.div`
31
32
  flex: 1;
32
- min-height: 40px;
33
+ border-top-left-radius: 5px;
34
+ border-top-right-radius: 5px;
35
+ overflow: hidden;
33
36
  `;
34
37
 
35
38
  const NoImageElement = styled.div<ItemTypeProps>`
36
39
  border-top-left-radius: 5px;
37
40
  border-top-right-radius: 5px;
38
41
  flex: 1;
39
- min-height: 40px;
40
42
  background: ${(props) => props.contentType && `${resourceTypeColor(props.contentType)}`};
41
43
  position: relative;
42
- transition: background-color ${animations.durations.normal} ease-in-out;
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
43
47
  .c-content-type-badge {
44
- transition: all ${animations.durations.normal} ease-in-out;
45
- position: absolute;
46
48
  width: 58px;
47
49
  height: 58px;
48
- left: 50%;
49
- margin-left: -29px;
50
- top: 50%;
51
- margin-top: -18px;
52
50
  opacity: 0.2;
53
51
  z-index: 3;
54
52
  svg {
@@ -68,7 +66,6 @@ const ContentTypeWrapper = styled.div<ItemTypeProps>`
68
66
  padding: 0 ${spacing.normal};
69
67
  ${fonts.sizes('12px', '16px')};
70
68
  font-weight: ${fonts.weight.semibold};
71
- transition: all ${animations.durations.fast} ease-in-out;
72
69
  `;
73
70
 
74
71
  const ContentTypeIcon = styled.span<ItemTypeProps>`
@@ -85,11 +82,8 @@ const ContentTypeIcon = styled.span<ItemTypeProps>`
85
82
  display: flex;
86
83
  justify-content: center;
87
84
  align-items: center;
88
- transition: all ${animations.durations.fast} ease-in-out;
89
85
  z-index: 2;
90
-
91
86
  svg {
92
- transition: all ${animations.durations.fast} ease-in-out;
93
87
  width: 20px;
94
88
  height: 20px;
95
89
  }
@@ -106,16 +100,18 @@ const ItemResourceHeader = ({ labels = [], img, type }: Props) => {
106
100
  return (
107
101
  <>
108
102
  {img ? (
109
- <ImageElement src={img.url} alt={img.alt} />
103
+ <ImageWrapper>
104
+ <ImageElement src={img.url} alt={img.alt} />
105
+ </ImageWrapper>
110
106
  ) : (
111
- <NoImageElement className="resource-no-image" contentType={type}>
112
- {type && <ContentTypeBadge type={type} border={false} />}
113
- </NoImageElement>
107
+ <NoImageElement contentType={type}>{type && <ContentTypeBadge type={type} border={false} />}</NoImageElement>
114
108
  )}
115
109
  <ContentTypeWrapper className="resource-type-wrapper" contentType={type}>
116
- <ContentTypeIcon className="resource-icon-wrapper" contentType={type}>
117
- {img && type && <ContentTypeBadge type={type} border={false} />}
118
- </ContentTypeIcon>
110
+ {img && type && (
111
+ <ContentTypeIcon className="resource-icon-wrapper" contentType={type}>
112
+ <ContentTypeBadge type={type} border={false} />
113
+ </ContentTypeIcon>
114
+ )}
119
115
  {type && t(`contentTypes.${type}`)}
120
116
  {labels.length > 0 && (
121
117
  <>
@@ -9,7 +9,7 @@
9
9
  import React, { ReactNode } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
- import { animations, colors, fonts, spacing } from '@ndla/core';
12
+ import { colors, fonts, spacing } from '@ndla/core';
13
13
 
14
14
  import { SearchItemType } from '../SearchItem';
15
15
  import ContentTypeBadge from '../../ContentTypeBadge';
@@ -29,7 +29,6 @@ const Label = styled.div`
29
29
  display: flex;
30
30
  align-items: center;
31
31
  margin-top: ${spacing.small};
32
- transition: all ${animations.durations.fast} ease-in-out;
33
32
 
34
33
  .c-content-type-badge {
35
34
  width: 26px;
@@ -38,7 +37,6 @@ const Label = styled.div`
38
37
  }
39
38
 
40
39
  svg {
41
- transition: all ${animations.durations.fast} ease-in-out;
42
40
  width: 22px;
43
41
  height: 22px;
44
42
  color: ${colors.text.primary} !important;
@@ -54,14 +52,14 @@ const TopicHeaderVisualElementWrapper = styled.div`
54
52
  display: flex;
55
53
  justify-content: center;
56
54
  align-items: center;
55
+ overflow: hidden;
56
+ border-radius: 50%;
57
57
  `;
58
58
 
59
59
  const TopicHeaderImage = styled.img`
60
- border-radius: 50%;
61
60
  width: 100%;
62
61
  height: 100%;
63
62
  object-fit: cover;
64
- transition: all ${animations.durations.fast} ease-in-out;
65
63
  max-width: unset;
66
64
  `;
67
65
 
@@ -1,5 +1,5 @@
1
1
  import React, { ElementType, ReactNode } from 'react';
2
- import { css } from '@emotion/core';
2
+ import { css } from '@emotion/react';
3
3
  import { breakpoints, fonts, mq, spacing } from '@ndla/core';
4
4
  import styled from '@emotion/styled';
5
5
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import React, { useCallback, useMemo, createContext, ReactNode, useState, useContext, useEffect } from 'react';
10
- import { keyframes } from '@emotion/core';
10
+ import { keyframes } from '@emotion/react';
11
11
  import styled from '@emotion/styled';
12
12
  import { spacing } from '@ndla/core';
13
13
  import DefaultSnack from './DefaultSnackbar';
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import styled from '@emotion/styled';
3
- import { css } from '@emotion/core';
3
+ import { css } from '@emotion/react';
4
4
  import { breakpoints, colors, mq, spacing, spacingUnit } from '@ndla/core';
5
5
  import SectionHeading from '../SectionHeading';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { css } from '@emotion/core';
2
+ import { css } from '@emotion/react';
3
3
  import styled from '@emotion/styled';
4
4
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
5
5
  import SectionHeading from '../SectionHeading';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from '@emotion/styled';
3
- import { css } from '@emotion/core';
3
+ import { css } from '@emotion/react';
4
4
  import { Carousel, CarouselAutosize } from '@ndla/carousel';
5
5
  import { withTranslation, WithTranslation } from 'react-i18next';
6
6
  import { breakpoints, mq, spacing, spacingUnit } from '@ndla/core';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from '@emotion/styled';
3
- import { css } from '@emotion/core';
3
+ import { css } from '@emotion/react';
4
4
  import { colors, fonts, mq, spacing, spacingUnit, breakpoints } from '@ndla/core';
5
5
  import OneColumn from '../Layout/OneColumn';
6
6
 
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) 2022-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 styled from '@emotion/styled';
10
+ import { spacing, utils } from '@ndla/core';
11
+ import React from 'react';
12
+ import { ControlProps } from 'react-select';
13
+ import { TagType } from './types';
14
+
15
+ const StyledTagSelectorControl = styled.div`
16
+ display: flex;
17
+ flex-wrap: wrap;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ margin: ${spacing.xxsmall};
21
+
22
+ overflow: overlay;
23
+ ${utils.scrollbar}
24
+ `;
25
+
26
+ const Control = ({ innerProps, children, innerRef }: ControlProps<TagType, true>) => {
27
+ return (
28
+ <StyledTagSelectorControl ref={innerRef} {...innerProps}>
29
+ {children}
30
+ </StyledTagSelectorControl>
31
+ );
32
+ };
33
+
34
+ export default Control;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright (c) 2022-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 { ChevronDown, ChevronUp } from '@ndla/icons/common';
10
+ import React, { useMemo } from 'react';
11
+ import styled from '@emotion/styled';
12
+ import { useTranslation } from 'react-i18next';
13
+ import { DropdownIndicatorProps, components } from 'react-select';
14
+ import { iconButtonStyle } from '@ndla/button';
15
+ import { TagType } from './types';
16
+
17
+ const StyledIconWrapper = styled.span`
18
+ svg {
19
+ pointer-events: none;
20
+ }
21
+ `;
22
+
23
+ const DropdownIndicator = ({ selectProps, children, ...props }: DropdownIndicatorProps<TagType, true>) => {
24
+ const { t } = useTranslation();
25
+
26
+ const { menuIsOpen } = selectProps;
27
+ const Icon = menuIsOpen ? ChevronUp : ChevronDown;
28
+
29
+ const css = useMemo(
30
+ () => iconButtonStyle({ colorTheme: 'greyLighter', variant: 'ghost', shape: 'pill', size: 'small' }),
31
+ [],
32
+ );
33
+
34
+ return (
35
+ <components.DropdownIndicator
36
+ css={css}
37
+ {...props}
38
+ selectProps={selectProps}
39
+ aria-label={menuIsOpen ? t('tagSelector.hideTags') : t('tagSelector.showTags')}>
40
+ <StyledIconWrapper aria-hidden>
41
+ <Icon />
42
+ </StyledIconWrapper>
43
+ </components.DropdownIndicator>
44
+ );
45
+ };
46
+
47
+ export default DropdownIndicator;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) 2022-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 { css } from '@emotion/react';
10
+ import { colors, spacing } from '@ndla/core';
11
+ import React from 'react';
12
+ import { components, InputProps } from 'react-select';
13
+ import { TagType } from './types';
14
+ import { StyledValueButton } from './ValueButton';
15
+
16
+ const inputStyle = css`
17
+ && {
18
+ padding: 0 ${spacing.small};
19
+ color: ${colors.brand.primary};
20
+ margin: 0;
21
+ ${StyledValueButton} + & {
22
+ padding-left: ${spacing.xxsmall};
23
+ }
24
+ }
25
+ `;
26
+
27
+ const Input = (props: InputProps<TagType, true>) => {
28
+ return <components.Input css={inputStyle} {...props} />;
29
+ };
30
+
31
+ export default Input;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright (c) 2022-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 { css } from '@emotion/react';
10
+ import { colors } from '@ndla/core';
11
+ import React from 'react';
12
+ import { MenuProps, components } from 'react-select';
13
+ import { StyledMenuList } from './MenuList';
14
+ import { TagType } from './types';
15
+
16
+ const menuStyle = css`
17
+ display: flex;
18
+ position: relative;
19
+ flex-direction: column;
20
+ margin: 0;
21
+ overflow: hidden;
22
+ border-top: 1px solid ${colors.brand.tertiary};
23
+ min-height: 70px;
24
+
25
+ :has(${StyledMenuList}>*:only-child) {
26
+ min-height: 40px;
27
+ }
28
+ `;
29
+
30
+ const Menu = ({ children, ...props }: MenuProps<TagType, true>) => {
31
+ return (
32
+ <components.Menu css={menuStyle} {...props}>
33
+ {children}
34
+ </components.Menu>
35
+ );
36
+ };
37
+
38
+ export default Menu;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) 2022-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 styled from '@emotion/styled';
10
+ import { utils } from '@ndla/core';
11
+ import React from 'react';
12
+ import { MenuListProps } from 'react-select';
13
+ import { TagType } from './types';
14
+
15
+ export const StyledMenuList = styled.div`
16
+ overflow: overlay;
17
+ ${utils.scrollbar}
18
+ display: flex;
19
+ flex-direction: column;
20
+ `;
21
+
22
+ const MenuList = ({ innerProps, innerRef, children }: MenuListProps<TagType, true>) => {
23
+ return (
24
+ <StyledMenuList ref={innerRef} {...innerProps}>
25
+ {children}
26
+ </StyledMenuList>
27
+ );
28
+ };
29
+
30
+ export default MenuList;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Copyright (c) 2022-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 from 'react';
10
+ import { OptionProps } from 'react-select';
11
+ import { buttonStyleV2 as buttonStyle } from '@ndla/button';
12
+ import styled from '@emotion/styled';
13
+ import { colors, fonts } from '@ndla/core';
14
+ import { Done } from '@ndla/icons/editor';
15
+ import { TagType } from './types';
16
+
17
+ interface StyledProps {
18
+ selected: boolean;
19
+ focused: boolean;
20
+ }
21
+
22
+ const StyledMenuOption = styled.div<StyledProps>`
23
+ && {
24
+ background: ${({ focused }) => focused && colors.brand.lighter};
25
+ color: ${({ focused }) => focused && colors.brand.primary};
26
+ justify-content: space-between;
27
+ ${fonts.sizes(16)};
28
+ font-weight: ${fonts.weight.normal};
29
+ color: ${({ selected }) => selected && colors.brand.grey};
30
+ }
31
+ `;
32
+
33
+ const StyledCheck = styled(Done)`
34
+ width: 24px;
35
+ height: 24px;
36
+ fill: ${colors.brand.tertiary};
37
+ `;
38
+
39
+ const Option = ({ innerProps, innerRef, children, isSelected, isFocused }: OptionProps<TagType, true>) => {
40
+ return (
41
+ <StyledMenuOption
42
+ focused={isFocused}
43
+ selected={isSelected}
44
+ css={buttonStyle({ colorTheme: 'lighter', variant: 'ghost', shape: 'sharp' })}
45
+ ref={innerRef}
46
+ {...innerProps}>
47
+ {children}
48
+ {isSelected && <StyledCheck />}
49
+ </StyledMenuOption>
50
+ );
51
+ };
52
+
53
+ export default Option;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) 2022-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 styled from '@emotion/styled';
10
+ import { colors, fonts, misc } from '@ndla/core';
11
+ import React from 'react';
12
+ import { ContainerProps } from 'react-select';
13
+ import { TagType } from './types';
14
+
15
+ const StyledContainer = styled.div`
16
+ display: grid;
17
+ grid-template-rows: auto 1fr;
18
+ overflow: hidden;
19
+
20
+ border: 1px solid ${colors.brand.neutral7};
21
+ border-radius: ${misc.borderRadius};
22
+ &:focus-within {
23
+ border-color: ${colors.brand.tertiary};
24
+ }
25
+ ${fonts.sizes(16)};
26
+ `;
27
+
28
+ const SelectContainer = ({ innerProps, selectProps, children }: ContainerProps<TagType, true>) => {
29
+ return <StyledContainer {...innerProps}>{children}</StyledContainer>;
30
+ };
31
+
32
+ export default SelectContainer;