@ndla/ui 3.3.13 → 3.3.17
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.
- package/README.md +0 -3
- package/es/Article/Article.js +3 -3
- package/es/Article/ArticleByline.js +4 -5
- package/es/Article/ArticleNotions.js +5 -6
- package/es/Article/ArticleSideBar.js +11 -12
- package/es/AudioPlayer/AudioPlayer.js +15 -16
- package/es/AudioPlayer/SpeechControl.js +2 -3
- package/es/BlogPosts/BlogPost.js +6 -8
- package/es/BlogPosts/BlogPostWrapper.js +1 -1
- package/es/Breadcrumb/Breadcrumb.js +1 -2
- package/es/Breadcrumb/BreadcrumbItem.js +2 -3
- package/es/Breadcrumblist/Breadcrumblist.js +7 -8
- package/es/CompetenceGoalTab/CompetenceGoalTab.js +6 -7
- package/es/CompetenceGoalTab/CompetenceItem.js +11 -13
- package/es/ComponentCursor/ComponentCursor.js +8 -8
- package/es/CopyParagraphButton/CopyParagraphButton.js +3 -4
- package/es/CreatedBy/CreatedBy.js +5 -6
- package/es/Dialog/Dialog.js +1 -2
- package/es/Embedded/Twitter.js +5 -5
- package/es/ErrorMessage/ErrorMessage.js +5 -5
- package/es/Figure/Figure.js +3 -1
- package/es/Figure/FigureLicenseDialog.js +1 -2
- package/es/Filter/FilterButtons.js +11 -13
- package/es/Footer/Footer.js +8 -9
- package/es/Footer/FooterLinks.js +7 -8
- package/es/Footer/FooterPrivacy.js +2 -3
- package/es/Footer/FooterText.js +1 -1
- package/es/Frontpage/FrontpageAllSubjects.js +10 -11
- package/es/Frontpage/FrontpageFilm.js +6 -8
- package/es/Frontpage/FrontpageHeader.js +5 -6
- package/es/Frontpage/FrontpageInfo.js +1 -1
- package/es/Frontpage/FrontpageMultidisciplinarySubject.js +8 -9
- package/es/Frontpage/FrontpageSearch.js +4 -6
- package/es/Frontpage/FrontpageToolbox.js +5 -6
- package/es/Frontpage/illustrations/FrontpageSubjectIllustration.js +1 -1
- package/es/LanguageSelector/LanguageSelector.js +8 -9
- package/es/LearningPaths/LearningPathContent.js +1 -1
- package/es/LearningPaths/LearningPathInformation.js +1 -1
- package/es/LearningPaths/LearningPathLastStepNavigation.js +4 -4
- package/es/LearningPaths/LearningPathMenu.js +5 -7
- package/es/LearningPaths/LearningPathMenuAside.js +7 -8
- package/es/LearningPaths/LearningPathMenuAsideCopyright.js +1 -2
- package/es/LearningPaths/LearningPathMenuContent.js +6 -8
- package/es/LearningPaths/LearningPathMenuIntro.js +7 -8
- package/es/LearningPaths/LearningPathMenuModalWrapper.js +3 -5
- package/es/LearningPaths/LearningPathMobileHeader.js +4 -5
- package/es/LearningPaths/LearningPathMobileStepInfo.js +1 -1
- package/es/LearningPaths/LearningPathSticky.js +4 -5
- package/es/LearningPaths/LearningPathWrapper.js +2 -2
- package/es/Masthead/MastheadSearchModal.js +5 -7
- package/es/NDLAFilm/AboutNdlaFilm.js +6 -17
- package/es/NDLAFilm/AllMoviesAlphabetically.js +14 -15
- package/es/NDLAFilm/CategorySelect.js +17 -18
- package/es/NDLAFilm/FilmContentCard.js +8 -23
- package/es/NDLAFilm/FilmContentCardTags.js +4 -8
- package/es/NDLAFilm/FilmMovieList.js +6 -21
- package/es/NDLAFilm/FilmMovieSearch.js +18 -26
- package/es/NDLAFilm/FilmSlideshow.js +3 -3
- package/es/NDLAFilm/MovieGrid.js +10 -19
- package/es/NDLAFilm/VisualElement.js +22 -29
- package/es/Navigation/NavigationBox.js +19 -19
- package/es/Navigation/NavigationHeading.js +4 -4
- package/es/Navigation/NavigationTopicAbout.js +15 -16
- package/es/Notion/Notion.js +4 -4
- package/es/RelatedArticleList/RelatedArticleList.js +4 -4
- package/es/ResourceGroup/ResourceItem.js +12 -14
- package/es/ResourceGroup/ResourceList.js +3 -4
- package/es/ResourcesWrapper/ResourcesTopicTitle.js +5 -6
- package/es/Search/ContentTypeResult.js +4 -7
- package/es/Search/LoadingWrapper.js +2 -3
- package/es/Search/SearchFieldForm.js +3 -3
- package/es/Search/SearchPage.js +2 -2
- package/es/Search/SearchResultSleeve.js +8 -8
- package/es/SearchTypeResult/ActiveFilterContent.js +1 -2
- package/es/SearchTypeResult/ActiveFilters.js +6 -7
- package/es/SearchTypeResult/PopupFilter.js +9 -11
- package/es/SearchTypeResult/ResultNavigation.js +2 -3
- package/es/SearchTypeResult/SearchFieldHeader.js +7 -9
- package/es/SearchTypeResult/SearchItem.js +20 -24
- package/es/SearchTypeResult/SearchItems.js +4 -4
- package/es/SearchTypeResult/SearchNotionItem.js +16 -20
- package/es/SearchTypeResult/SearchNotionsResult.js +6 -8
- package/es/SearchTypeResult/SearchSubjectItem.js +3 -4
- package/es/SearchTypeResult/SearchTypeHeader.js +9 -10
- package/es/SearchTypeResult/SearchTypeResult.js +5 -6
- package/es/ToolboxPage/ToolboxInfo.js +2 -2
- package/es/Topic/Loader.js +1 -2
- package/es/Topic/Topic.js +21 -22
- package/es/TopicIntroductionList/TopicIntroduction.js +14 -33
- package/es/TopicIntroductionList/TopicIntroductionList.js +6 -23
- package/es/TopicIntroductionList/TopicIntroductionShortcuts.js +71 -110
- package/es/TopicIntroductionList/TopicShortcutItem.js +0 -9
- package/es/Translation/TranslationBox.js +1 -2
- package/es/User/AuthModal.js +9 -10
- package/es/all.css +1 -4
- package/es/index-javascript.js +1 -5
- package/es/index.js +4 -0
- package/es/shapes.js +0 -6
- package/lib/Article/Article.d.ts +2 -2
- package/lib/Article/Article.js +2 -4
- package/lib/Article/ArticleByline.d.ts +2 -2
- package/lib/Article/ArticleByline.js +4 -4
- package/lib/Article/ArticleNotions.d.ts +2 -2
- package/lib/Article/ArticleNotions.js +4 -4
- package/lib/Article/ArticleSideBar.d.ts +4 -4
- package/lib/Article/ArticleSideBar.js +10 -11
- package/lib/Aside/Aside.d.ts +2 -2
- package/lib/AudioPlayer/AudioPlayer.js +14 -14
- package/lib/AudioPlayer/SpeechControl.js +1 -2
- package/lib/BlogPosts/BlogPost.d.ts +1 -2
- package/lib/BlogPosts/BlogPost.js +4 -6
- package/lib/BlogPosts/BlogPostWrapper.d.ts +3 -3
- package/lib/BlogPosts/BlogPostWrapper.js +1 -1
- package/lib/Breadcrumb/Breadcrumb.d.ts +4 -4
- package/lib/Breadcrumb/Breadcrumb.js +0 -1
- package/lib/Breadcrumb/BreadcrumbBlock.d.ts +3 -3
- package/lib/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/lib/Breadcrumb/BreadcrumbItem.js +1 -2
- package/lib/Breadcrumblist/Breadcrumblist.d.ts +4 -4
- package/lib/Breadcrumblist/Breadcrumblist.js +6 -6
- package/lib/CompetenceGoalTab/CompetenceGoalTab.js +5 -5
- package/lib/CompetenceGoalTab/CompetenceItem.js +10 -10
- package/lib/ComponentCursor/ComponentCursor.js +8 -8
- package/lib/CopyParagraphButton/CopyParagraphButton.js +2 -2
- package/lib/CreatedBy/CreatedBy.js +4 -4
- package/lib/Embedded/Twitter.js +5 -5
- package/lib/ErrorMessage/ErrorMessage.d.ts +2 -2
- package/lib/ErrorMessage/ErrorMessage.js +5 -5
- package/lib/Figure/Figure.js +3 -1
- package/lib/Filter/FilterButtons.js +9 -9
- package/lib/Footer/EditorName.d.ts +1 -2
- package/lib/Footer/Footer.d.ts +5 -5
- package/lib/Footer/Footer.js +7 -7
- package/lib/Footer/FooterLinks.d.ts +3 -3
- package/lib/Footer/FooterLinks.js +6 -6
- package/lib/Footer/FooterPrivacy.d.ts +1 -2
- package/lib/Footer/FooterPrivacy.js +2 -3
- package/lib/Footer/FooterText.d.ts +3 -3
- package/lib/Footer/FooterText.js +1 -1
- package/lib/Footer/privacy_en.d.ts +1 -2
- package/lib/Footer/privacy_nb.d.ts +1 -2
- package/lib/Footer/privacy_nn.d.ts +1 -2
- package/lib/Frontpage/FrontpageAllSubjects.js +15 -9
- package/lib/Frontpage/FrontpageFilm.d.ts +1 -1
- package/lib/Frontpage/FrontpageFilm.js +4 -6
- package/lib/Frontpage/FrontpageHeader.d.ts +3 -2
- package/lib/Frontpage/FrontpageHeader.js +4 -5
- package/lib/Frontpage/FrontpageInfo.d.ts +3 -3
- package/lib/Frontpage/FrontpageInfo.js +1 -1
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +1 -1
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +7 -7
- package/lib/Frontpage/FrontpageSearch.d.ts +3 -3
- package/lib/Frontpage/FrontpageSearch.js +2 -4
- package/lib/Frontpage/FrontpageToolbox.d.ts +1 -1
- package/lib/Frontpage/FrontpageToolbox.js +4 -5
- package/lib/Frontpage/illustrations/Fellesfag.d.ts +1 -2
- package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.d.ts +1 -2
- package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.d.ts +1 -2
- package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.js +1 -1
- package/lib/Frontpage/illustrations/MenuFellesfag.d.ts +1 -2
- package/lib/Frontpage/illustrations/MenuStudiespesialiserende.d.ts +1 -2
- package/lib/Frontpage/illustrations/MenuYrkesfag.d.ts +1 -2
- package/lib/Frontpage/illustrations/Studiespesialiserende.d.ts +1 -2
- package/lib/Frontpage/illustrations/Yrkesfag.d.ts +1 -2
- package/lib/Frontpage/illustrations/index.d.ts +6 -6
- package/lib/LanguageSelector/LanguageSelector.js +7 -7
- package/lib/LearningPaths/LearningPathContent.d.ts +3 -3
- package/lib/LearningPaths/LearningPathContent.js +1 -1
- package/lib/LearningPaths/LearningPathInformation.d.ts +1 -2
- package/lib/LearningPaths/LearningPathInformation.js +1 -1
- package/lib/LearningPaths/LearningPathLastStepNavigation.d.ts +3 -3
- package/lib/LearningPaths/LearningPathLastStepNavigation.js +4 -4
- package/lib/LearningPaths/LearningPathMenu.d.ts +1 -2
- package/lib/LearningPaths/LearningPathMenu.js +3 -3
- package/lib/LearningPaths/LearningPathMenuAside.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuAside.js +6 -7
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.d.ts +1 -2
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +1 -2
- package/lib/LearningPaths/LearningPathMenuContent.d.ts +1 -2
- package/lib/LearningPaths/LearningPathMenuContent.js +5 -7
- package/lib/LearningPaths/LearningPathMenuIntro.d.ts +1 -2
- package/lib/LearningPaths/LearningPathMenuIntro.js +6 -6
- package/lib/LearningPaths/LearningPathMenuModalWrapper.d.ts +3 -3
- package/lib/LearningPaths/LearningPathMenuModalWrapper.js +1 -3
- package/lib/LearningPaths/LearningPathMobileHeader.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMobileHeader.js +4 -5
- package/lib/LearningPaths/LearningPathMobileStepInfo.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMobileStepInfo.js +1 -1
- package/lib/LearningPaths/LearningPathSticky.d.ts +11 -5
- package/lib/LearningPaths/LearningPathSticky.js +3 -4
- package/lib/LearningPaths/LearningPathWrapper.d.ts +3 -3
- package/lib/LearningPaths/LearningPathWrapper.js +2 -2
- package/lib/Masthead/MastheadSearchModal.d.ts +3 -3
- package/lib/Masthead/MastheadSearchModal.js +3 -5
- package/lib/NDLAFilm/AboutNdlaFilm.d.ts +15 -0
- package/lib/NDLAFilm/AboutNdlaFilm.js +6 -18
- package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +3 -4
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +12 -13
- package/lib/NDLAFilm/CategorySelect.d.ts +11 -0
- package/lib/NDLAFilm/CategorySelect.js +20 -19
- package/lib/NDLAFilm/FilmContentCard.d.ts +11 -0
- package/lib/NDLAFilm/FilmContentCard.js +8 -24
- package/lib/NDLAFilm/FilmContentCardTags.d.ts +7 -0
- package/lib/NDLAFilm/FilmContentCardTags.js +4 -9
- package/lib/NDLAFilm/FilmMovieList.d.ts +19 -0
- package/lib/NDLAFilm/FilmMovieList.js +5 -21
- package/lib/NDLAFilm/FilmMovieSearch.d.ts +21 -0
- package/lib/NDLAFilm/FilmMovieSearch.js +25 -30
- package/lib/NDLAFilm/FilmSlideshow.d.ts +5 -5
- package/lib/NDLAFilm/FilmSlideshow.js +2 -1
- package/lib/NDLAFilm/MovieGrid.d.ts +13 -0
- package/lib/NDLAFilm/MovieGrid.js +9 -21
- package/lib/NDLAFilm/SlideshowIndicator.d.ts +2 -2
- package/lib/NDLAFilm/VisualElement.d.ts +16 -0
- package/lib/NDLAFilm/VisualElement.js +22 -30
- package/lib/NDLAFilm/index.d.ts +14 -0
- package/lib/NDLAFilm/types.d.ts +8 -6
- package/lib/Navigation/NavigationBox.d.ts +3 -3
- package/lib/Navigation/NavigationBox.js +19 -19
- package/lib/Navigation/NavigationHeading.d.ts +2 -2
- package/lib/Navigation/NavigationHeading.js +4 -4
- package/lib/Navigation/NavigationTopicAbout.d.ts +2 -2
- package/lib/Navigation/NavigationTopicAbout.js +14 -14
- package/lib/Notion/Notion.d.ts +4 -4
- package/lib/Notion/Notion.js +4 -4
- package/lib/RadioButtonGroup/RadioButtonGroup.d.ts +2 -2
- package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
- package/lib/ResourceGroup/ResourceItem.js +11 -11
- package/lib/ResourceGroup/ResourceList.js +2 -2
- package/lib/ResourcesWrapper/ResourcesTopicTitle.js +4 -4
- package/lib/Search/ContentTypeResult.d.ts +1 -2
- package/lib/Search/ContentTypeResult.js +1 -1
- package/lib/Search/LoadingWrapper.d.ts +1 -2
- package/lib/Search/LoadingWrapper.js +1 -2
- package/lib/Search/SearchFieldForm.d.ts +4 -4
- package/lib/Search/SearchFieldForm.js +3 -3
- package/lib/Search/SearchPage.js +1 -1
- package/lib/Search/SearchResultSleeve.d.ts +1 -2
- package/lib/Search/SearchResultSleeve.js +8 -8
- package/lib/SearchTypeResult/ActiveFilterContent.js +1 -2
- package/lib/SearchTypeResult/ActiveFilters.d.ts +2 -2
- package/lib/SearchTypeResult/ActiveFilters.js +5 -5
- package/lib/SearchTypeResult/PopupFilter.js +8 -8
- package/lib/SearchTypeResult/ResultNavigation.js +2 -3
- package/lib/SearchTypeResult/SearchFieldHeader.d.ts +2 -2
- package/lib/SearchTypeResult/SearchFieldHeader.js +5 -5
- package/lib/SearchTypeResult/SearchItem.d.ts +2 -2
- package/lib/SearchTypeResult/SearchItem.js +17 -17
- package/lib/SearchTypeResult/SearchItems.js +10 -4
- package/lib/SearchTypeResult/SearchNotionItem.d.ts +4 -4
- package/lib/SearchTypeResult/SearchNotionItem.js +12 -12
- package/lib/SearchTypeResult/SearchNotionsResult.d.ts +2 -2
- package/lib/SearchTypeResult/SearchNotionsResult.js +4 -4
- package/lib/SearchTypeResult/SearchSubjectItem.js +3 -3
- package/lib/SearchTypeResult/SearchTypeHeader.js +14 -8
- package/lib/SearchTypeResult/SearchTypeResult.d.ts +2 -2
- package/lib/SearchTypeResult/SearchTypeResult.js +10 -5
- package/lib/ToolboxPage/ToolboxInfo.d.ts +2 -2
- package/lib/ToolboxPage/ToolboxInfo.js +2 -2
- package/lib/Topic/Loader.js +0 -1
- package/lib/Topic/Topic.d.ts +5 -5
- package/lib/Topic/Topic.js +20 -20
- package/lib/TopicIntroductionList/TopicIntroduction.d.ts +21 -0
- package/lib/TopicIntroductionList/TopicIntroduction.js +16 -36
- package/lib/TopicIntroductionList/TopicIntroductionList.d.ts +35 -0
- package/lib/TopicIntroductionList/TopicIntroductionList.js +6 -25
- package/lib/TopicIntroductionList/TopicIntroductionShortcuts.d.ts +8 -0
- package/lib/TopicIntroductionList/TopicIntroductionShortcuts.js +72 -110
- package/lib/TopicIntroductionList/TopicShortcutItem.d.ts +6 -0
- package/lib/TopicIntroductionList/TopicShortcutItem.js +0 -11
- package/lib/TopicIntroductionList/index.d.ts +9 -0
- package/lib/Translation/TranslationBox.js +0 -1
- package/lib/User/AuthModal.js +8 -8
- package/lib/all.css +1 -4
- package/lib/index-javascript.js +3 -137
- package/lib/index.d.ts +4 -0
- package/lib/index.js +155 -0
- package/lib/locale/LocaleProvider.d.ts +2 -2
- package/lib/shapes.js +1 -10
- package/lib/types.d.ts +2 -1
- package/package.json +15 -15
- package/src/Article/Article.tsx +3 -3
- package/src/Article/ArticleByline.tsx +2 -3
- package/src/Article/ArticleNotions.tsx +2 -4
- package/src/Article/ArticleSideBar.tsx +7 -8
- package/src/Aside/Aside.tsx +2 -2
- package/src/AudioPlayer/AudioPlayer.tsx +0 -1
- package/src/AudioPlayer/SpeechControl.tsx +0 -1
- package/src/BlogPosts/BlogPost.tsx +2 -4
- package/src/BlogPosts/BlogPostWrapper.tsx +3 -3
- package/src/Breadcrumb/Breadcrumb.tsx +4 -5
- package/src/Breadcrumb/BreadcrumbBlock.tsx +3 -3
- package/src/Breadcrumb/BreadcrumbItem.tsx +3 -4
- package/src/Breadcrumblist/Breadcrumblist.tsx +5 -6
- package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +0 -1
- package/src/CompetenceGoalTab/CompetenceItem.tsx +1 -5
- package/src/ComponentCursor/ComponentCursor.tsx +2 -2
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -3
- package/src/CreatedBy/CreatedBy.tsx +0 -1
- package/src/Dialog/Dialog.tsx +0 -1
- package/src/Embedded/Twitter.jsx +3 -3
- package/src/ErrorMessage/ErrorMessage.tsx +2 -7
- package/src/Figure/Figure.tsx +2 -1
- package/src/Figure/FigureLicenseDialog.tsx +0 -1
- package/src/Figure/component.figure.scss +37 -3
- package/src/Filter/FilterButtons.tsx +0 -3
- package/src/Footer/EditorName.tsx +1 -1
- package/src/Footer/Footer.tsx +4 -5
- package/src/Footer/FooterLinks.tsx +4 -8
- package/src/Footer/FooterPrivacy.tsx +1 -2
- package/src/Footer/FooterText.tsx +3 -5
- package/src/Footer/privacy_en.tsx +1 -1
- package/src/Footer/privacy_nb.tsx +1 -1
- package/src/Footer/privacy_nn.tsx +1 -1
- package/src/Frontpage/FrontpageAllSubjects.tsx +5 -6
- package/src/Frontpage/FrontpageFilm.tsx +1 -3
- package/src/Frontpage/FrontpageHeader.tsx +3 -8
- package/src/Frontpage/FrontpageInfo.tsx +3 -3
- package/src/Frontpage/FrontpageMultidisciplinarySubject.tsx +1 -2
- package/src/Frontpage/FrontpageSearch.tsx +4 -6
- package/src/Frontpage/FrontpageToolbox.tsx +1 -2
- package/src/Frontpage/illustrations/Fellesfag.tsx +1 -1
- package/src/Frontpage/illustrations/FrontpageHeaderIllustration.tsx +1 -1
- package/src/Frontpage/illustrations/FrontpageSubjectIllustration.tsx +1 -1
- package/src/Frontpage/illustrations/MenuFellesfag.tsx +1 -1
- package/src/Frontpage/illustrations/MenuStudiespesialiserende.tsx +1 -1
- package/src/Frontpage/illustrations/MenuYrkesfag.tsx +1 -1
- package/src/Frontpage/illustrations/Studiespesialiserende.tsx +1 -1
- package/src/Frontpage/illustrations/Yrkesfag.tsx +1 -1
- package/src/LanguageSelector/LanguageSelector.tsx +0 -1
- package/src/LearningPaths/LearningPathContent.tsx +3 -5
- package/src/LearningPaths/LearningPathInformation.tsx +1 -6
- package/src/LearningPaths/LearningPathLastStepNavigation.tsx +3 -9
- package/src/LearningPaths/LearningPathMenu.tsx +2 -4
- package/src/LearningPaths/LearningPathMenuAside.tsx +2 -3
- package/src/LearningPaths/LearningPathMenuAsideCopyright.tsx +1 -2
- package/src/LearningPaths/LearningPathMenuContent.tsx +2 -4
- package/src/LearningPaths/LearningPathMenuIntro.tsx +1 -2
- package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +3 -5
- package/src/LearningPaths/LearningPathMobileHeader.tsx +2 -3
- package/src/LearningPaths/LearningPathMobileStepInfo.tsx +1 -1
- package/src/LearningPaths/LearningPathSticky.tsx +5 -14
- package/src/LearningPaths/LearningPathWrapper.tsx +3 -3
- package/src/Masthead/MastheadSearchModal.tsx +4 -6
- package/src/NDLAFilm/{AboutNdlaFilm.jsx → AboutNdlaFilm.tsx} +19 -18
- package/src/NDLAFilm/AllMoviesAlphabetically.tsx +6 -7
- package/src/NDLAFilm/{CategorySelect.jsx → CategorySelect.tsx} +23 -20
- package/src/NDLAFilm/{FilmContentCard.jsx → FilmContentCard.tsx} +21 -22
- package/src/NDLAFilm/{FilmContentCardTags.jsx → FilmContentCardTags.tsx} +7 -7
- package/src/NDLAFilm/{FilmMovieList.jsx → FilmMovieList.tsx} +17 -27
- package/src/NDLAFilm/FilmMovieSearch.tsx +71 -0
- package/src/NDLAFilm/FilmSlideshow.tsx +9 -10
- package/src/NDLAFilm/MovieGrid.tsx +76 -0
- package/src/NDLAFilm/SlideshowIndicator.tsx +2 -2
- package/src/NDLAFilm/VisualElement.tsx +40 -0
- package/src/NDLAFilm/{index.js → index.ts} +0 -0
- package/src/NDLAFilm/types.ts +9 -6
- package/src/Navigation/NavigationBox.tsx +4 -4
- package/src/Navigation/NavigationHeading.tsx +2 -2
- package/src/Navigation/NavigationTopicAbout.tsx +2 -3
- package/src/Notion/Notion.tsx +4 -4
- package/src/RadioButtonGroup/RadioButtonGroup.tsx +2 -2
- package/src/RelatedArticleList/RelatedArticleList.tsx +4 -4
- package/src/ResourceGroup/ResourceItem.tsx +0 -3
- package/src/ResourceGroup/ResourceList.tsx +0 -1
- package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +0 -1
- package/src/Search/ContentTypeResult.tsx +4 -7
- package/src/Search/LoadingWrapper.tsx +1 -2
- package/src/Search/SearchFieldForm.tsx +4 -4
- package/src/Search/SearchPage.jsx +2 -2
- package/src/Search/SearchResultSleeve.tsx +2 -2
- package/src/SearchTypeResult/ActiveFilterContent.tsx +0 -1
- package/src/SearchTypeResult/ActiveFilters.tsx +2 -3
- package/src/SearchTypeResult/PopupFilter.tsx +0 -2
- package/src/SearchTypeResult/ResultNavigation.tsx +0 -1
- package/src/SearchTypeResult/SearchFieldHeader.tsx +1 -3
- package/src/SearchTypeResult/SearchItem.tsx +3 -8
- package/src/SearchTypeResult/SearchItems.tsx +2 -2
- package/src/SearchTypeResult/SearchNotionItem.tsx +4 -8
- package/src/SearchTypeResult/SearchNotionsResult.tsx +2 -4
- package/src/SearchTypeResult/SearchSubjectItem.tsx +0 -1
- package/src/SearchTypeResult/SearchTypeHeader.tsx +3 -4
- package/src/SearchTypeResult/SearchTypeResult.tsx +3 -4
- package/src/ToolboxPage/ToolboxInfo.tsx +2 -2
- package/src/Topic/Loader.tsx +0 -1
- package/src/Topic/Topic.tsx +5 -6
- package/src/TopicIntroductionList/{TopicIntroduction.jsx → TopicIntroduction.tsx} +22 -35
- package/src/TopicIntroductionList/{TopicIntroductionList.jsx → TopicIntroductionList.tsx} +32 -26
- package/src/TopicIntroductionList/TopicIntroductionShortcuts.tsx +71 -0
- package/src/TopicIntroductionList/{TopicShortcutItem.jsx → TopicShortcutItem.tsx} +5 -13
- package/src/TopicIntroductionList/{index.js → index.ts} +0 -0
- package/src/Translation/TranslationBox.tsx +0 -1
- package/src/User/AuthModal.tsx +0 -1
- package/src/index-javascript.js +0 -30
- package/src/index.ts +31 -0
- package/src/locale/LocaleProvider.tsx +2 -2
- package/src/shapes.js +0 -7
- package/src/types.ts +3 -1
- package/es/NDLAFilm/interfaces.js +0 -0
- package/es/NDLAFilm/shapes.js +0 -15
- package/lib/NDLAFilm/interfaces.d.ts +0 -10
- package/lib/NDLAFilm/interfaces.js +0 -1
- package/lib/NDLAFilm/shapes.d.ts +0 -15
- package/lib/NDLAFilm/shapes.js +0 -30
- package/src/NDLAFilm/FilmMovieSearch.jsx +0 -66
- package/src/NDLAFilm/MovieGrid.jsx +0 -75
- package/src/NDLAFilm/VisualElement.jsx +0 -48
- package/src/NDLAFilm/interfaces.ts +0 -10
- package/src/NDLAFilm/shapes.ts +0 -17
- package/src/TopicIntroductionList/TopicIntroductionShortcuts.jsx +0 -92
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { ReactNode } from 'react';
|
|
10
10
|
import BEMHelper, { ReturnObject } from 'react-bem-helper';
|
|
11
11
|
import { uuid } from '@ndla/util';
|
|
12
12
|
import { withTranslation, WithTranslation } from 'react-i18next';
|
|
13
|
-
// @ts-ignore
|
|
14
13
|
import { Home } from '@ndla/icons/common';
|
|
15
14
|
import BreadcrumbItem from './BreadcrumbItem';
|
|
16
15
|
|
|
@@ -24,13 +23,13 @@ export interface BreadcrumbItemI {
|
|
|
24
23
|
name: string;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
interface Props {
|
|
28
|
-
children
|
|
26
|
+
interface Props extends WithTranslation {
|
|
27
|
+
children?: ReactNode;
|
|
29
28
|
items: BreadcrumbItemI[];
|
|
30
29
|
invertedStyle: boolean;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
const Breadcrumb
|
|
32
|
+
const Breadcrumb = ({ children, items, invertedStyle, t }: Props) => (
|
|
34
33
|
<nav aria-label={t('breadcrumb.breadcrumb')}>
|
|
35
34
|
{children}
|
|
36
35
|
<ol {...classes('list')}>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { useRef } from 'react';
|
|
9
|
+
import React, { ReactNode, useRef } from 'react';
|
|
10
10
|
import BEMHelper, { ReturnObject } from 'react-bem-helper';
|
|
11
11
|
import { useComponentSize, useIsomorphicLayoutEffect } from '@ndla/hooks';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
@@ -19,11 +19,11 @@ const classes: BEMHelper<ReturnObject> = BEMHelper({
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
|
-
children
|
|
22
|
+
children?: ReactNode;
|
|
23
23
|
items: BreadcrumbItemI[];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const BreadcrumbBlock
|
|
26
|
+
const BreadcrumbBlock = ({ children, items }: Props) => {
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const olRef = useRef<any>();
|
|
29
29
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { useRef, useImperativeHandle } from 'react';
|
|
10
|
-
// @ts-ignore
|
|
9
|
+
import React, { useRef, useImperativeHandle, ReactNode, forwardRef } from 'react';
|
|
11
10
|
import { ChevronRight } from '@ndla/icons/common';
|
|
12
11
|
import SafeLink from '@ndla/safelink';
|
|
13
12
|
import BEMHelper, { ReturnObject } from 'react-bem-helper';
|
|
@@ -16,14 +15,14 @@ import * as H from 'history';
|
|
|
16
15
|
interface Props {
|
|
17
16
|
classes: BEMHelper<ReturnObject>;
|
|
18
17
|
isCurrent: boolean;
|
|
19
|
-
children:
|
|
18
|
+
children: ReactNode;
|
|
20
19
|
to: H.LocationDescriptor;
|
|
21
20
|
home: boolean;
|
|
22
21
|
name: string;
|
|
23
22
|
invertedStyle: boolean;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
const BreadcrumbItem =
|
|
25
|
+
const BreadcrumbItem = forwardRef<any, Props>(
|
|
27
26
|
({ to, children, classes, isCurrent, home, invertedStyle, name }, ref) => {
|
|
28
27
|
const liRef = useRef<any>();
|
|
29
28
|
useImperativeHandle(ref, () => ({
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { useEffect, useState } from 'react';
|
|
9
|
+
import React, { ReactNode, useEffect, useState, MouseEvent } from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { mq, breakpoints, colors } from '@ndla/core';
|
|
12
12
|
import {
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
Bookmark as BookmarkIcon,
|
|
16
16
|
Class as ClassIcon,
|
|
17
17
|
Home as HomeIcon,
|
|
18
|
-
// @ts-ignore
|
|
19
18
|
} from '@ndla/icons/action';
|
|
20
19
|
import SafeLink from '@ndla/safelink';
|
|
21
20
|
import { useTranslation } from 'react-i18next';
|
|
@@ -201,18 +200,18 @@ export type BreadcrumbItemProps = {
|
|
|
201
200
|
url: string;
|
|
202
201
|
typename?: 'Subjecttype' | 'Subject' | 'Topic' | 'Subtopic' | 'SubSubtopic' | 'Home';
|
|
203
202
|
isCurrent?: boolean | false;
|
|
204
|
-
icon?:
|
|
203
|
+
icon?: ReactNode;
|
|
205
204
|
};
|
|
206
205
|
|
|
207
206
|
type BreadCrumbProps = {
|
|
208
|
-
children?:
|
|
207
|
+
children?: ReactNode;
|
|
209
208
|
items: BreadcrumbItemProps[];
|
|
210
209
|
startOffset?: number;
|
|
211
210
|
isVisible?: boolean;
|
|
212
211
|
invertedStyle?: boolean;
|
|
213
212
|
leftAlign?: boolean;
|
|
214
213
|
hideOnNarrow?: boolean;
|
|
215
|
-
onNav?: (e:
|
|
214
|
+
onNav?: (e: MouseEvent<HTMLElement>, item: BreadcrumbItemProps) => void;
|
|
216
215
|
messageBoxTagMessage?: string;
|
|
217
216
|
};
|
|
218
217
|
|
|
@@ -285,7 +284,7 @@ const Breadcrumblist = ({
|
|
|
285
284
|
<SafeLink
|
|
286
285
|
className="linkitem"
|
|
287
286
|
to={url}
|
|
288
|
-
onClick={(e:
|
|
287
|
+
onClick={(e: MouseEvent<HTMLElement>) => {
|
|
289
288
|
onNav && onNav(e, item);
|
|
290
289
|
}}
|
|
291
290
|
aria-label={label}>
|
|
@@ -10,7 +10,6 @@ import React, { useState } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { colors, spacing, mq, breakpoints } from '@ndla/core';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
// @ts-ignore
|
|
14
13
|
import { ArrowFeatureTips } from '@ndla/icons/common';
|
|
15
14
|
// @ts-ignore
|
|
16
15
|
import Button from '@ndla/button';
|
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
MenuBook,
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
} from '@ndla/icons/action';
|
|
11
|
+
import { MenuBook } from '@ndla/icons/action';
|
|
16
12
|
import { fonts } from '@ndla/core';
|
|
17
13
|
import { useTranslation } from 'react-i18next';
|
|
18
14
|
import CompetenceGoalItem from './CompetenceGoalItem';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
import React, { MutableRefObject, useRef, useState } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { css } from '@emotion/core';
|
|
4
4
|
import { useComponentSize } from '@ndla/hooks';
|
|
@@ -82,7 +82,7 @@ type Props = {
|
|
|
82
82
|
|
|
83
83
|
const ComponentCursor = ({ variant = 'left', text = '' }: Props) => {
|
|
84
84
|
const [componentSize, setComponentSize] = useState(null);
|
|
85
|
-
const textRef = useRef(null) as unknown as
|
|
85
|
+
const textRef = useRef(null) as unknown as MutableRefObject<HTMLSpanElement>;
|
|
86
86
|
const size: any = useComponentSize(textRef);
|
|
87
87
|
if (!componentSize && textRef && textRef.current) {
|
|
88
88
|
setComponentSize(size.width + 5);
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { ReactNode, useEffect, useState } from 'react';
|
|
9
|
+
import React, { ReactNode, useEffect, useState, MouseEvent } from 'react';
|
|
10
10
|
|
|
11
11
|
import styled from '@emotion/styled';
|
|
12
12
|
import { Link } from '@ndla/icons/common';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
|
-
// @ts-ignore
|
|
15
14
|
import Tooltip from '@ndla/tooltip';
|
|
16
15
|
import { copyTextToClipboard } from '@ndla/util';
|
|
17
16
|
|
|
@@ -73,7 +72,7 @@ const CopyParagraphButton = ({ title, content, hydrate }: Props) => {
|
|
|
73
72
|
|
|
74
73
|
if (!title) return null;
|
|
75
74
|
|
|
76
|
-
const onCopyClick = (event:
|
|
75
|
+
const onCopyClick = (event: MouseEvent<HTMLButtonElement>): void => {
|
|
77
76
|
setHasCopied(true);
|
|
78
77
|
const copyId = event.currentTarget.getAttribute('data-title');
|
|
79
78
|
const { location } = window;
|
package/src/Dialog/Dialog.tsx
CHANGED
package/src/Embedded/Twitter.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component, createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
-
class EmbeddedTwitter extends
|
|
4
|
+
class EmbeddedTwitter extends Component {
|
|
5
5
|
static removeChildren(node) {
|
|
6
6
|
if (node) {
|
|
7
7
|
while (node.firstChild) {
|
|
@@ -51,7 +51,7 @@ class EmbeddedTwitter extends React.Component {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
render() {
|
|
54
|
-
return
|
|
54
|
+
return createElement('div', {
|
|
55
55
|
ref: (c) => {
|
|
56
56
|
this.widgetWrapper = c;
|
|
57
57
|
},
|
|
@@ -54,14 +54,9 @@ interface Props {
|
|
|
54
54
|
};
|
|
55
55
|
illustrationElement?: ReactNode;
|
|
56
56
|
customElement?: ReactNode;
|
|
57
|
+
children?: ReactNode;
|
|
57
58
|
}
|
|
58
|
-
export const ErrorMessage:
|
|
59
|
-
children,
|
|
60
|
-
messages,
|
|
61
|
-
illustration,
|
|
62
|
-
illustrationElement,
|
|
63
|
-
customElement,
|
|
64
|
-
}) => (
|
|
59
|
+
export const ErrorMessage = ({ children, messages, illustration, illustrationElement, customElement }: Props) => (
|
|
65
60
|
<StyledErrorMessage>
|
|
66
61
|
{illustration && (
|
|
67
62
|
<IllustrationWrapper>
|
package/src/Figure/Figure.tsx
CHANGED
|
@@ -121,8 +121,9 @@ interface FigureCaptionProps {
|
|
|
121
121
|
|
|
122
122
|
const Figure = ({ children, type = 'full', resizeIframe, ...rest }: Props) => {
|
|
123
123
|
const typeClass = type === 'full-column' ? 'c-figure--full-column' : `u-float-${type}`;
|
|
124
|
+
const right = ['small-right', 'xsmall-right'].includes(type);
|
|
124
125
|
return (
|
|
125
|
-
<figure data-sizetype={type} {...classes('', { resize: !!resizeIframe }, typeClass)} {...rest}>
|
|
126
|
+
<figure data-sizetype={type} {...classes('', { resize: !!resizeIframe, right }, typeClass)} {...rest}>
|
|
126
127
|
{isFunction(children) ? children({ typeClass }) : children}
|
|
127
128
|
</figure>
|
|
128
129
|
);
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
// Any interactivty is added by scripts located in the ndla-article-scripts package
|
|
11
11
|
|
|
12
12
|
import React, { ReactNode } from 'react';
|
|
13
|
-
//@ts-ignore
|
|
14
13
|
import Dialog from '../Dialog';
|
|
15
14
|
import { classLicenses, FigureLicenseByline, FigureLicenseCta } from './FigureLicense';
|
|
16
15
|
import { FigureLicense } from './Figure';
|
|
@@ -17,6 +17,25 @@
|
|
|
17
17
|
**/
|
|
18
18
|
|
|
19
19
|
/* 1. */
|
|
20
|
+
|
|
21
|
+
@keyframes rightFloatTransition {
|
|
22
|
+
0% {
|
|
23
|
+
left: 75%;
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
left: -16.6%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes smallRightFloatTransition {
|
|
31
|
+
0% {
|
|
32
|
+
left: 78.5%;
|
|
33
|
+
}
|
|
34
|
+
100% {
|
|
35
|
+
left: -16.6%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
20
39
|
.c-figure {
|
|
21
40
|
img {
|
|
22
41
|
width: 100%;
|
|
@@ -51,6 +70,21 @@
|
|
|
51
70
|
padding-bottom: $spacing--large;
|
|
52
71
|
margin-bottom: 0;
|
|
53
72
|
}
|
|
73
|
+
&--right {
|
|
74
|
+
&.expanded {
|
|
75
|
+
@include mq($from: desktop) {
|
|
76
|
+
animation-name: rightFloatTransition;
|
|
77
|
+
animation-duration: 0.4s;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[data-sizetype='xsmall-right'] {
|
|
81
|
+
@include mq($from: desktop) {
|
|
82
|
+
animation-name: smallRightFloatTransition;
|
|
83
|
+
animation-duration: 0.4s;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
54
88
|
&.expanded {
|
|
55
89
|
.c-figure__caption--hidden-caption {
|
|
56
90
|
display: block;
|
|
@@ -74,7 +108,7 @@
|
|
|
74
108
|
background-color: $white;
|
|
75
109
|
padding: $spacing--small 0;
|
|
76
110
|
display: block;
|
|
77
|
-
border-bottom: 1px solid #
|
|
111
|
+
border-bottom: 1px solid #d1d6db;
|
|
78
112
|
}
|
|
79
113
|
|
|
80
114
|
.c-figure__caption--hidden-caption {
|
|
@@ -119,7 +153,7 @@
|
|
|
119
153
|
margin-bottom: $spacing--small;
|
|
120
154
|
}
|
|
121
155
|
p {
|
|
122
|
-
margin:0;
|
|
156
|
+
margin: 0;
|
|
123
157
|
}
|
|
124
158
|
}
|
|
125
159
|
|
|
@@ -179,7 +213,7 @@
|
|
|
179
213
|
padding: $spacing--small;
|
|
180
214
|
transition: all 0.3s ease-out;
|
|
181
215
|
background: rgba($white, 0.2);
|
|
182
|
-
border:0;
|
|
216
|
+
border: 0;
|
|
183
217
|
|
|
184
218
|
.expanded-icon {
|
|
185
219
|
display: none;
|
|
@@ -12,11 +12,8 @@ import styled from '@emotion/styled';
|
|
|
12
12
|
import Button from '@ndla/button';
|
|
13
13
|
import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
-
// @ts-ignore
|
|
16
15
|
import { Cross as CrossIcon, Plus as PlusIcon } from '@ndla/icons/action';
|
|
17
|
-
// @ts-ignore
|
|
18
16
|
import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
|
|
19
|
-
|
|
20
17
|
// @ts-ignore
|
|
21
18
|
import ToggleItem from './ToggleItem';
|
|
22
19
|
|
|
@@ -13,7 +13,7 @@ type EditorNameProps = {
|
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const EditorName
|
|
16
|
+
export const EditorName = ({ title, name }: EditorNameProps) => (
|
|
17
17
|
<span>
|
|
18
18
|
<strong>{title}</strong> {name}
|
|
19
19
|
</span>
|
package/src/Footer/Footer.tsx
CHANGED
|
@@ -10,7 +10,6 @@ import React, { ReactNode } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import { colors, spacing, fonts, mq, breakpoints, spacingUnit } from '@ndla/core';
|
|
13
|
-
// @ts-ignore
|
|
14
13
|
import { FooterHeaderIcon } from '@ndla/icons/common';
|
|
15
14
|
import { OneColumn } from '../Layout';
|
|
16
15
|
import FooterLinks from './FooterLinks';
|
|
@@ -110,22 +109,22 @@ const StyledLanguageWrapper = styled.div`
|
|
|
110
109
|
`;
|
|
111
110
|
|
|
112
111
|
type Props = {
|
|
113
|
-
children:
|
|
112
|
+
children: ReactNode;
|
|
114
113
|
lang: Locale;
|
|
115
114
|
links?: [
|
|
116
115
|
{
|
|
117
116
|
to: string;
|
|
118
117
|
text: string;
|
|
119
|
-
icon:
|
|
118
|
+
icon: ReactNode;
|
|
120
119
|
facebook: string;
|
|
121
120
|
twitter: string;
|
|
122
121
|
},
|
|
123
122
|
];
|
|
124
|
-
languageSelector?:
|
|
123
|
+
languageSelector?: ReactNode;
|
|
125
124
|
auth?: ReactNode;
|
|
126
125
|
};
|
|
127
126
|
|
|
128
|
-
const Footer
|
|
127
|
+
const Footer = ({ lang, children, links, languageSelector, auth }: Props) => {
|
|
129
128
|
const { t } = useTranslation();
|
|
130
129
|
const mainContent = (
|
|
131
130
|
<>
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { LinkProps } from 'react-router-dom';
|
|
4
4
|
import { spacing, fonts, colors, mq, breakpoints, spacingUnit } from '@ndla/core';
|
|
5
5
|
import SafeLink from '@ndla/safelink';
|
|
6
|
-
import {
|
|
7
|
-
Forward,
|
|
8
|
-
Launch,
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
} from '@ndla/icons/common';
|
|
6
|
+
import { Forward, Launch } from '@ndla/icons/common';
|
|
11
7
|
import { WithTranslation, withTranslation } from 'react-i18next';
|
|
12
8
|
|
|
13
9
|
const StyledLinksWrapper = styled.div`
|
|
@@ -34,7 +30,7 @@ type FooterLinksProps = {
|
|
|
34
30
|
{
|
|
35
31
|
to: string;
|
|
36
32
|
text: string;
|
|
37
|
-
icon:
|
|
33
|
+
icon: ReactNode;
|
|
38
34
|
facebook: string;
|
|
39
35
|
twitter: string;
|
|
40
36
|
},
|
|
@@ -97,7 +93,7 @@ const StyledHeaderLinks = styled.h1`
|
|
|
97
93
|
margin: ${spacing.xsmall} 0;
|
|
98
94
|
`;
|
|
99
95
|
|
|
100
|
-
const FooterLinks
|
|
96
|
+
const FooterLinks = ({ t, links }: FooterLinksProps & WithTranslation) => (
|
|
101
97
|
<>
|
|
102
98
|
<StyledLinksWrapper>
|
|
103
99
|
<section>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
|
-
// @ts-ignore
|
|
12
11
|
import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
|
|
13
12
|
import { spacing, fonts, misc, mq, breakpoints } from '@ndla/core';
|
|
14
13
|
import { OneColumn } from '../Layout';
|
|
@@ -68,7 +67,7 @@ const StyledFooterText = styled.div`
|
|
|
68
67
|
}
|
|
69
68
|
`;
|
|
70
69
|
|
|
71
|
-
const FooterPrivacy
|
|
70
|
+
const FooterPrivacy = ({ lang, label }: FooterPrivacyProps) => (
|
|
72
71
|
<StyledFooterText>
|
|
73
72
|
<Modal activateButton={<StyledPrivacyButton type="button">{label}</StyledPrivacyButton>} size="fullscreen">
|
|
74
73
|
{(onClose: () => void) => (
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { ReactNode } from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { spacing, fonts, mq, breakpoints } from '@ndla/core';
|
|
12
12
|
|
|
@@ -33,9 +33,7 @@ const StyledFooterText = styled.p`
|
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
35
|
type FooterTextProps = {
|
|
36
|
-
children:
|
|
36
|
+
children: ReactNode;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export const FooterText
|
|
40
|
-
<StyledFooterText>{children}</StyledFooterText>
|
|
41
|
-
);
|
|
39
|
+
export const FooterText = ({ children }: FooterTextProps) => <StyledFooterText>{children}</StyledFooterText>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
// @ts-ignore
|
|
5
4
|
import Tabs from '@ndla/tabs';
|
|
6
5
|
import SafeLink from '@ndla/safelink';
|
|
7
6
|
import { colors, fonts, mq, breakpoints } from '@ndla/core';
|
|
@@ -134,9 +133,9 @@ const renderList = (
|
|
|
134
133
|
<StyledList>
|
|
135
134
|
{sortAlphabetically(subjects).map((letter: any) => {
|
|
136
135
|
return (
|
|
137
|
-
<
|
|
136
|
+
<Fragment key={letter.letter}>
|
|
138
137
|
{letter.items.map((subject: subjectProps, index: number) => (
|
|
139
|
-
<
|
|
138
|
+
<Fragment key={subject.name}>
|
|
140
139
|
<StyledListItem>
|
|
141
140
|
{index === 0 && <StyledLetterItem subjectViewType={subjectViewType}>{letter.letter}</StyledLetterItem>}
|
|
142
141
|
{subjectViewType === 'checkbox' && subject.id ? (
|
|
@@ -168,9 +167,9 @@ const renderList = (
|
|
|
168
167
|
)}
|
|
169
168
|
{letter.items.length - 1 === index && <StyledLetterSpacing />}
|
|
170
169
|
</StyledListItem>
|
|
171
|
-
</
|
|
170
|
+
</Fragment>
|
|
172
171
|
))}
|
|
173
|
-
</
|
|
172
|
+
</Fragment>
|
|
174
173
|
);
|
|
175
174
|
})}
|
|
176
175
|
</StyledList>
|
|
@@ -2,11 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { css } from '@emotion/core';
|
|
4
4
|
import SafeLink from '@ndla/safelink';
|
|
5
|
-
// @ts-ignore
|
|
6
5
|
import { Forward } from '@ndla/icons/common';
|
|
7
6
|
import { withTranslation, WithTranslation } from 'react-i18next';
|
|
8
7
|
import { spacing, spacingUnit, colors, breakpoints, fonts, mq } from '@ndla/core';
|
|
9
|
-
// @ts-ignore
|
|
10
8
|
import SectionHeading from '../SectionHeading';
|
|
11
9
|
|
|
12
10
|
const StyledSection = styled.section`
|
|
@@ -76,7 +74,7 @@ type Props = {
|
|
|
76
74
|
imageUrl: string;
|
|
77
75
|
};
|
|
78
76
|
|
|
79
|
-
const FrontpageFilm
|
|
77
|
+
const FrontpageFilm = ({ url, imageUrl, t }: Props & WithTranslation) => (
|
|
80
78
|
<StyledSection>
|
|
81
79
|
<SectionHeading large>{t('welcomePage.film.header')}</SectionHeading>
|
|
82
80
|
<StyledImage imageUrl={imageUrl}>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { colors, spacing, spacingUnit, mq, breakpoints } from '@ndla/core';
|
|
4
4
|
import SafeLink from '@ndla/safelink';
|
|
5
5
|
import { WithTranslation, withTranslation } from 'react-i18next';
|
|
6
6
|
import FrontpageHeaderIllustration from './illustrations/FrontpageHeaderIllustration';
|
|
7
|
-
// @ts-ignore
|
|
8
7
|
import SvgLogo from '../Logo/SvgLogo';
|
|
9
8
|
|
|
10
9
|
const StyledHeader = styled.div`
|
|
@@ -52,14 +51,10 @@ const HeaderIllustrationWrapper = styled.div`
|
|
|
52
51
|
export type FrontPageHeaderProps = {
|
|
53
52
|
locale: string;
|
|
54
53
|
showHeader: boolean;
|
|
54
|
+
children?: ReactNode;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
const FrontpageHeader:
|
|
58
|
-
locale,
|
|
59
|
-
showHeader = true,
|
|
60
|
-
children,
|
|
61
|
-
t,
|
|
62
|
-
}) => (
|
|
57
|
+
const FrontpageHeader = ({ locale, showHeader = true, children, t }: FrontPageHeaderProps & WithTranslation) => (
|
|
63
58
|
<StyledHeaderWrapper>
|
|
64
59
|
<StyledHeader>
|
|
65
60
|
<StyledLogo to="/" aria-label={t('logo.altText')}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { spacing, spacingUnit, mq, breakpoints } from '@ndla/core';
|
|
4
4
|
|
|
@@ -37,9 +37,9 @@ const StyledWrapper = styled.div`
|
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
39
|
type Props = {
|
|
40
|
-
children:
|
|
40
|
+
children: ReactNode;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
const FrontpageInfo
|
|
43
|
+
const FrontpageInfo = ({ children }: Props) => <StyledWrapper>{children}</StyledWrapper>;
|
|
44
44
|
|
|
45
45
|
export default FrontpageInfo;
|
|
@@ -3,7 +3,6 @@ import SafeLink, { SafeLinkButton } from '@ndla/safelink';
|
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
5
5
|
import { withTranslation, WithTranslation } from 'react-i18next';
|
|
6
|
-
// @ts-ignore
|
|
7
6
|
import SectionHeading from '../SectionHeading';
|
|
8
7
|
import ComponentCursor from '../ComponentCursor';
|
|
9
8
|
import { MultidisciplinarySubjectIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
@@ -75,7 +74,7 @@ type Props = {
|
|
|
75
74
|
topics?: { url: string; title: string; id: string }[];
|
|
76
75
|
};
|
|
77
76
|
|
|
78
|
-
const FrontpageMultidisciplinarySubject
|
|
77
|
+
const FrontpageMultidisciplinarySubject = ({ url, t, topics }: Props & WithTranslation) => (
|
|
79
78
|
<StyledSection>
|
|
80
79
|
<ComponentCursor variant="left" text={t('frontpageMultidisciplinarySubject.cursorText')} />
|
|
81
80
|
<Wrapper>
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
1
|
+
import React, { FormEvent, useEffect, useRef } from 'react';
|
|
2
2
|
import { isIE, browserVersion, isMobileSafari } from 'react-device-detect';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { colors, spacing, mq, breakpoints, animations } from '@ndla/core';
|
|
5
|
-
// @ts-ignore
|
|
6
5
|
import { noScroll } from '@ndla/util';
|
|
7
6
|
import { useTranslation } from 'react-i18next';
|
|
8
7
|
// @ts-ignore
|
|
9
8
|
import { SearchField } from '../Search';
|
|
10
9
|
import { SearchFieldForm } from '../Search/SearchFieldForm';
|
|
11
|
-
// @ts-ignore
|
|
12
10
|
import SearchResultSleeve from '../Search/SearchResultSleeve';
|
|
13
11
|
import { ContentTypeResultType, Resource } from '../types';
|
|
14
12
|
|
|
@@ -51,7 +49,7 @@ type Props = {
|
|
|
51
49
|
resourceToLinkProps: (resource: Resource) => {
|
|
52
50
|
to: string;
|
|
53
51
|
};
|
|
54
|
-
onSearch: (event:
|
|
52
|
+
onSearch: (event: FormEvent) => void;
|
|
55
53
|
allResultUrl: string;
|
|
56
54
|
searchResult?: Array<ContentTypeResultType>;
|
|
57
55
|
loading: boolean;
|
|
@@ -59,7 +57,7 @@ type Props = {
|
|
|
59
57
|
suggestionUrl?: string;
|
|
60
58
|
};
|
|
61
59
|
|
|
62
|
-
const FrontpageSearch
|
|
60
|
+
const FrontpageSearch = ({
|
|
63
61
|
resourceToLinkProps,
|
|
64
62
|
inputHasFocus,
|
|
65
63
|
searchFieldValue,
|
|
@@ -73,7 +71,7 @@ const FrontpageSearch: React.FunctionComponent<Props> = ({
|
|
|
73
71
|
loading,
|
|
74
72
|
suggestion,
|
|
75
73
|
suggestionUrl,
|
|
76
|
-
}) => {
|
|
74
|
+
}: Props) => {
|
|
77
75
|
const { t } = useTranslation();
|
|
78
76
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
79
77
|
const searchFieldRef = useRef<HTMLDivElement>(null);
|