@ndla/ui 3.3.14 → 4.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.
- package/README.md +0 -3
- package/es/Article/Article.js +4 -4
- 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/CloseButton/CloseButton.js +17 -33
- package/es/CloseButton/index.js +2 -1
- 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/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/MessageBox/MessageBox.js +26 -12
- package/es/NDLAFilm/AllMoviesAlphabetically.js +14 -15
- package/es/NDLAFilm/FilmContentCard.js +3 -4
- package/es/NDLAFilm/FilmSlideshow.js +3 -3
- 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/Translation/TranslationBox.js +1 -2
- package/es/User/AuthModal.js +9 -10
- package/es/index.js +1 -1
- package/lib/Article/Article.d.ts +2 -2
- package/lib/Article/Article.js +3 -5
- 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/CloseButton/CloseButton.d.ts +9 -5
- package/lib/CloseButton/CloseButton.js +19 -34
- package/lib/CloseButton/index.d.ts +1 -0
- package/lib/CloseButton/index.js +12 -1
- 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/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 -4
- 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 -8
- package/lib/LearningPaths/LearningPathMenu.js +3 -3
- package/lib/LearningPaths/LearningPathMenuAside.d.ts +1 -3
- package/lib/LearningPaths/LearningPathMenuAside.js +6 -7
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.d.ts +1 -4
- 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/MessageBox/MessageBox.d.ts +3 -3
- package/lib/MessageBox/MessageBox.js +25 -12
- package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +1 -2
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +12 -13
- package/lib/NDLAFilm/FilmContentCard.js +3 -4
- package/lib/NDLAFilm/FilmSlideshow.js +2 -1
- package/lib/NDLAFilm/types.d.ts +2 -2
- 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/Translation/TranslationBox.js +0 -1
- package/lib/User/AuthModal.js +8 -8
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/LocaleProvider.d.ts +2 -2
- package/lib/types.d.ts +2 -1
- package/package.json +14 -14
- package/src/Article/Article.tsx +4 -4
- 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/CloseButton/CloseButton.tsx +13 -17
- package/src/CloseButton/index.ts +2 -0
- 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/FigureLicenseDialog.tsx +0 -1
- 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 -8
- package/src/LearningPaths/LearningPathLastStepNavigation.tsx +3 -9
- package/src/LearningPaths/LearningPathMenu.tsx +2 -10
- package/src/LearningPaths/LearningPathMenuAside.tsx +2 -5
- package/src/LearningPaths/LearningPathMenuAsideCopyright.tsx +1 -4
- 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/MessageBox/MessageBox.tsx +12 -3
- package/src/NDLAFilm/AllMoviesAlphabetically.tsx +3 -4
- package/src/NDLAFilm/FilmContentCard.tsx +0 -1
- package/src/NDLAFilm/FilmSlideshow.tsx +3 -4
- package/src/NDLAFilm/types.ts +2 -2
- 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/Translation/TranslationBox.tsx +0 -1
- package/src/User/AuthModal.tsx +0 -1
- package/src/index.ts +1 -1
- package/src/locale/LocaleProvider.tsx +2 -2
- package/src/types.ts +3 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
const Illustration
|
|
11
|
+
const Illustration = () => (
|
|
12
12
|
<svg width="940px" height="175px" viewBox="0 0 940 175" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<g id="MenuOpen3" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
14
|
<g id="Group" transform="translate(-0.655172, 9.000000)" stroke="#000000">
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
const Illustration
|
|
11
|
+
const Illustration = () => (
|
|
12
12
|
<svg width="940px" height="175px" viewBox="0 0 940 175" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<g id="MenuOpen1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
14
|
<path
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
const Illustration
|
|
11
|
+
const Illustration = () => (
|
|
12
12
|
<svg width="940px" height="175px" viewBox="0 0 940 175" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<g id="MenuOpen2" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
14
|
<path
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
const Illustration
|
|
11
|
+
const Illustration = () => (
|
|
12
12
|
<svg width="90px" height="90px" viewBox="0 0 90 90" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<g id="Artboard" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
14
|
<path
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
const Illustration
|
|
11
|
+
const Illustration = () => (
|
|
12
12
|
<svg width="90px" height="90px" viewBox="0 0 90 90" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<g id="Artboard" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
14
|
<path
|
|
@@ -13,7 +13,6 @@ import FocusTrapReact from 'focus-trap-react';
|
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
import Button, { appearances } from '@ndla/button';
|
|
15
15
|
import { spacing, misc, colors, mq, breakpoints, animations, fonts, spacingUnit } from '@ndla/core';
|
|
16
|
-
// @ts-ignore
|
|
17
16
|
import { ChevronDown } from '@ndla/icons/common';
|
|
18
17
|
import { useTranslation } from 'react-i18next';
|
|
19
18
|
import LanguageSelectorContent from './LanguageSelectorContent';
|
|
@@ -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 { mq, breakpoints, colors, spacing, spacingUnit } from '@ndla/core';
|
|
12
12
|
|
|
@@ -27,9 +27,7 @@ const StyledContent = styled.div`
|
|
|
27
27
|
`;
|
|
28
28
|
|
|
29
29
|
interface Props {
|
|
30
|
-
children:
|
|
30
|
+
children: ReactNode;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export const LearningPathContent
|
|
34
|
-
<StyledContent>{children}</StyledContent>
|
|
35
|
-
);
|
|
33
|
+
export const LearningPathContent = ({ children }: Props) => <StyledContent>{children}</StyledContent>;
|
|
@@ -56,17 +56,10 @@ interface Props {
|
|
|
56
56
|
invertedStyle?: boolean;
|
|
57
57
|
license?: {
|
|
58
58
|
license: string;
|
|
59
|
-
description: string;
|
|
60
|
-
url: string;
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
export const LearningPathInformation:
|
|
65
|
-
description,
|
|
66
|
-
title,
|
|
67
|
-
license,
|
|
68
|
-
invertedStyle,
|
|
69
|
-
}) => (
|
|
62
|
+
export const LearningPathInformation = ({ description, title, license, invertedStyle }: Props) => (
|
|
70
63
|
<section className="o-wrapper">
|
|
71
64
|
<StyledWrapper invertedStyle={invertedStyle} className="c-article">
|
|
72
65
|
<div>
|
|
@@ -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 { css } from '@emotion/core';
|
|
12
12
|
import SafeLink from '@ndla/safelink';
|
|
@@ -39,7 +39,7 @@ const OneColumnCss = css`
|
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
41
|
interface Props {
|
|
42
|
-
children:
|
|
42
|
+
children: ReactNode;
|
|
43
43
|
subject?: {
|
|
44
44
|
name: string;
|
|
45
45
|
url: string;
|
|
@@ -51,13 +51,7 @@ interface Props {
|
|
|
51
51
|
learningPathName: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const LearningPathLastStepNavigation:
|
|
55
|
-
subject,
|
|
56
|
-
topic,
|
|
57
|
-
learningPathName,
|
|
58
|
-
children,
|
|
59
|
-
t,
|
|
60
|
-
}) => (
|
|
54
|
+
const LearningPathLastStepNavigation = ({ subject, topic, learningPathName, children, t }: Props & WithTranslation) => (
|
|
61
55
|
<OneColumn css={OneColumnCss}>
|
|
62
56
|
<LayoutItem layout="center">
|
|
63
57
|
<StyledHeader className="c-article__title">
|
|
@@ -10,11 +10,9 @@ import React, { useState } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { css } from '@emotion/core';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
// @ts-ignore
|
|
14
13
|
import Tooltip from '@ndla/tooltip';
|
|
15
14
|
import { useWindowSize } from '@ndla/hooks';
|
|
16
15
|
import { colors, spacing, misc, mq, breakpoints } from '@ndla/core';
|
|
17
|
-
// @ts-ignore
|
|
18
16
|
import { ArrowExpandRight, ArrowExpandLeft } from '@ndla/icons/action';
|
|
19
17
|
import LearningPathMenuModalWrapper from './LearningPathMenuModalWrapper';
|
|
20
18
|
import LearningPathMenuAside from './LearningPathMenuAside';
|
|
@@ -73,17 +71,14 @@ const StyledToggleMenubutton = styled.button`
|
|
|
73
71
|
|
|
74
72
|
export type StepProps = {
|
|
75
73
|
title: string;
|
|
76
|
-
metaUrl: string;
|
|
77
74
|
type: string;
|
|
78
75
|
id: number;
|
|
79
|
-
current?: boolean;
|
|
80
76
|
};
|
|
81
77
|
|
|
82
78
|
interface Props {
|
|
83
79
|
learningsteps: StepProps[];
|
|
84
80
|
name: string;
|
|
85
81
|
lastUpdated: string;
|
|
86
|
-
language: string;
|
|
87
82
|
copyright: {
|
|
88
83
|
contributors: {
|
|
89
84
|
type: string;
|
|
@@ -91,8 +86,6 @@ interface Props {
|
|
|
91
86
|
}[];
|
|
92
87
|
license: {
|
|
93
88
|
license: string;
|
|
94
|
-
description: string;
|
|
95
|
-
url: string;
|
|
96
89
|
};
|
|
97
90
|
};
|
|
98
91
|
learningPathURL: string;
|
|
@@ -103,10 +96,9 @@ interface Props {
|
|
|
103
96
|
};
|
|
104
97
|
learningPathId: number;
|
|
105
98
|
toLearningPathUrl(pathId: number, stepId: number): string;
|
|
106
|
-
showLearningPathButton: Object;
|
|
107
99
|
}
|
|
108
100
|
|
|
109
|
-
const LearningPathMenu
|
|
101
|
+
const LearningPathMenu = ({
|
|
110
102
|
learningsteps,
|
|
111
103
|
currentIndex,
|
|
112
104
|
name,
|
|
@@ -117,7 +109,7 @@ const LearningPathMenu: React.FunctionComponent<Props> = ({
|
|
|
117
109
|
learningPathURL,
|
|
118
110
|
invertedStyle,
|
|
119
111
|
cookies,
|
|
120
|
-
}) => {
|
|
112
|
+
}: Props) => {
|
|
121
113
|
const { t } = useTranslation();
|
|
122
114
|
const [isOpen, toggleOpenState] = useState(false);
|
|
123
115
|
const { innerWidth } = useWindowSize(100);
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { css } from '@emotion/core';
|
|
12
|
-
// @ts-ignore
|
|
13
12
|
import { Time } from '@ndla/icons/common';
|
|
14
13
|
import { SafeLinkButton } from '@ndla/safelink';
|
|
15
14
|
import { WithTranslation, withTranslation } from 'react-i18next';
|
|
@@ -104,20 +103,18 @@ type Props = {
|
|
|
104
103
|
}[];
|
|
105
104
|
license: {
|
|
106
105
|
license: string;
|
|
107
|
-
description: string;
|
|
108
|
-
url: string;
|
|
109
106
|
};
|
|
110
107
|
};
|
|
111
108
|
};
|
|
112
109
|
|
|
113
|
-
const LearningPathMenuAside
|
|
110
|
+
const LearningPathMenuAside = ({
|
|
114
111
|
lastUpdated,
|
|
115
112
|
learningPathURL,
|
|
116
113
|
copyright,
|
|
117
114
|
isOpen,
|
|
118
115
|
invertedStyle,
|
|
119
116
|
t,
|
|
120
|
-
}) => (
|
|
117
|
+
}: Props & WithTranslation) => (
|
|
121
118
|
<StyledAside isOpen={isOpen} invertedStyle={invertedStyle}>
|
|
122
119
|
<div css={learningPathDetailsCSS}>
|
|
123
120
|
<Time />
|
|
@@ -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 { User } from '@ndla/icons/common';
|
|
13
12
|
import { spacing, fonts } from '@ndla/core';
|
|
14
13
|
|
|
@@ -37,13 +36,11 @@ type Props = {
|
|
|
37
36
|
}[];
|
|
38
37
|
license: {
|
|
39
38
|
license: string;
|
|
40
|
-
description: string;
|
|
41
|
-
url: string;
|
|
42
39
|
};
|
|
43
40
|
};
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
const LearningPathMenuAsideCopyright
|
|
43
|
+
const LearningPathMenuAsideCopyright = ({ copyright }: Props) => (
|
|
47
44
|
<StyledLearningPathDetails>
|
|
48
45
|
<User />
|
|
49
46
|
<p>
|
|
@@ -11,10 +11,8 @@ import styled from '@emotion/styled';
|
|
|
11
11
|
import { css } from '@emotion/core';
|
|
12
12
|
import { colors, spacing, spacingUnit, fonts, mq, breakpoints, animations } from '@ndla/core';
|
|
13
13
|
import SafeLink from '@ndla/safelink';
|
|
14
|
-
// @ts-ignore
|
|
15
14
|
import { LearningPathRead } from '@ndla/icons/contentType';
|
|
16
15
|
import { StepProps } from './LearningPathMenu';
|
|
17
|
-
// @ts-ignore
|
|
18
16
|
import ContentTypeBadge from '../ContentTypeBadge';
|
|
19
17
|
import constants from '../model';
|
|
20
18
|
|
|
@@ -227,7 +225,7 @@ const hasRead = (
|
|
|
227
225
|
},
|
|
228
226
|
) => !!cookies[id];
|
|
229
227
|
|
|
230
|
-
const LearningPathMenuContent
|
|
228
|
+
const LearningPathMenuContent = ({
|
|
231
229
|
isOpen,
|
|
232
230
|
currentIndex,
|
|
233
231
|
cookies,
|
|
@@ -236,7 +234,7 @@ const LearningPathMenuContent: React.FunctionComponent<Props> = ({
|
|
|
236
234
|
toLearningPathUrl,
|
|
237
235
|
invertedStyle,
|
|
238
236
|
onStepNavigate,
|
|
239
|
-
}) => {
|
|
237
|
+
}: Props) => {
|
|
240
238
|
const getContentTypeBadge = (type?: string) => {
|
|
241
239
|
if (!type) {
|
|
242
240
|
return <ContentTypeBadge type={constants.contentTypes.LEARNING_PATH} background size="small" />;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { css } from '@emotion/core';
|
|
12
|
-
// @ts-ignore
|
|
13
12
|
import { useTranslation } from 'react-i18next';
|
|
14
13
|
import { colors, spacing, spacingUnit, fonts, typography, mq, breakpoints, animations } from '@ndla/core';
|
|
15
14
|
|
|
@@ -101,7 +100,7 @@ interface Props {
|
|
|
101
100
|
name: string;
|
|
102
101
|
}
|
|
103
102
|
|
|
104
|
-
const LearningPathMenuIntro
|
|
103
|
+
const LearningPathMenuIntro = ({ isOpen, name, invertedStyle }: Props) => {
|
|
105
104
|
const { t } = useTranslation();
|
|
106
105
|
return (
|
|
107
106
|
<StyledMenuIntro isOpen={isOpen} invertedStyle={invertedStyle}>
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { ReactChild, ReactChildren } from 'react';
|
|
9
|
+
import React, { ReactChild, ReactChildren, ReactNode } from 'react';
|
|
10
10
|
import { spacing, mq, breakpoints } from '@ndla/core';
|
|
11
|
-
// @ts-ignore
|
|
12
11
|
import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
|
|
13
12
|
import { css } from '@emotion/core';
|
|
14
13
|
// @ts-ignore
|
|
15
14
|
import Button from '@ndla/button';
|
|
16
|
-
// @ts-ignore
|
|
17
15
|
import { LearningPath } from '@ndla/icons/contentType';
|
|
18
16
|
import { useTranslation } from 'react-i18next';
|
|
19
17
|
|
|
@@ -34,10 +32,10 @@ const buttonToggleCss = css`
|
|
|
34
32
|
|
|
35
33
|
type ModalWrapperProps = {
|
|
36
34
|
innerWidth: number;
|
|
37
|
-
children: (arg: VoidFunction) => ReactChild | ReactChildren |
|
|
35
|
+
children: (arg: VoidFunction) => ReactChild | ReactChildren | ReactNode;
|
|
38
36
|
};
|
|
39
37
|
|
|
40
|
-
const ModalWrapperComponent
|
|
38
|
+
const ModalWrapperComponent = ({ innerWidth, children }: ModalWrapperProps) => {
|
|
41
39
|
const { t } = useTranslation();
|
|
42
40
|
if (innerWidth < 601) {
|
|
43
41
|
return (
|
|
@@ -10,8 +10,7 @@ import styled from '@emotion/styled';
|
|
|
10
10
|
import { colors, fonts, spacing } from '@ndla/core';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { WithTranslation, withTranslation } from 'react-i18next';
|
|
13
|
-
|
|
14
|
-
import { LearningPathBadge } from '../index-javascript';
|
|
13
|
+
import { LearningPathBadge } from '../';
|
|
15
14
|
|
|
16
15
|
const StyledWrapper = styled.div`
|
|
17
16
|
display: flex;
|
|
@@ -26,7 +25,7 @@ const StyledMiniHeader = styled.span`
|
|
|
26
25
|
${fonts.sizes(16, 1.1)};
|
|
27
26
|
`;
|
|
28
27
|
|
|
29
|
-
const LearningPathMobileHeader
|
|
28
|
+
const LearningPathMobileHeader = ({ t }: WithTranslation) => (
|
|
30
29
|
<StyledWrapper>
|
|
31
30
|
<LearningPathBadge size="xx-small" background />
|
|
32
31
|
<StyledMiniHeader>{t('learningPath.youAreInALearningPath')}</StyledMiniHeader>
|
|
@@ -24,7 +24,7 @@ type Props = {
|
|
|
24
24
|
current: number;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const LearningPathMobileStepInfo
|
|
27
|
+
const LearningPathMobileStepInfo = ({ total, current, t }: Props & WithTranslation) => (
|
|
28
28
|
<StyledInfo>
|
|
29
29
|
{t('learningPath.mobileStepInfo', {
|
|
30
30
|
totalPages: total,
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { ReactNode } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import styled from '@emotion/styled';
|
|
12
12
|
import { css } from '@emotion/core';
|
|
13
13
|
import { colors, spacing, animations, mq, breakpoints } from '@ndla/core';
|
|
14
|
-
// @ts-ignore
|
|
15
14
|
import { Back, Forward } from '@ndla/icons/common';
|
|
16
15
|
import SafeLink from '@ndla/safelink';
|
|
17
16
|
|
|
@@ -42,12 +41,10 @@ const StyledFooter = styled.nav`
|
|
|
42
41
|
`;
|
|
43
42
|
|
|
44
43
|
interface Props {
|
|
45
|
-
children:
|
|
44
|
+
children: ReactNode;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
export const LearningPathSticky
|
|
49
|
-
<StyledFooter>{children}</StyledFooter>
|
|
50
|
-
);
|
|
47
|
+
export const LearningPathSticky = ({ children }: Props) => <StyledFooter>{children}</StyledFooter>;
|
|
51
48
|
|
|
52
49
|
LearningPathSticky.propTypes = {
|
|
53
50
|
children: PropTypes.node,
|
|
@@ -122,13 +119,7 @@ type PropsSiblings = {
|
|
|
122
119
|
stepId: number;
|
|
123
120
|
};
|
|
124
121
|
|
|
125
|
-
export const LearningPathStickySibling:
|
|
126
|
-
title,
|
|
127
|
-
toLearningPathUrl,
|
|
128
|
-
pathId,
|
|
129
|
-
stepId,
|
|
130
|
-
arrow,
|
|
131
|
-
}) => (
|
|
122
|
+
export const LearningPathStickySibling = ({ title, toLearningPathUrl, pathId, stepId, arrow }: PropsSiblings) => (
|
|
132
123
|
<SafeLink to={toLearningPathUrl(pathId, stepId)} css={SafeLinkCSS}>
|
|
133
124
|
{arrow === 'left' && <Back className="c-icon--medium" />}
|
|
134
125
|
<div>
|
|
@@ -138,4 +129,4 @@ export const LearningPathStickySibling: React.FunctionComponent<PropsSiblings> =
|
|
|
138
129
|
</SafeLink>
|
|
139
130
|
);
|
|
140
131
|
|
|
141
|
-
export const LearningPathStickyPlaceholder
|
|
132
|
+
export const LearningPathStickyPlaceholder = () => <div css={SafeLinkCSS} />;
|
|
@@ -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 { css } from '@emotion/core';
|
|
12
12
|
import { spacing, spacingUnit, breakpoints, mq } from '@ndla/core';
|
|
@@ -41,10 +41,10 @@ const StyledWrapper = styled.section<PropStyledWrapper>`
|
|
|
41
41
|
`;
|
|
42
42
|
|
|
43
43
|
interface Props {
|
|
44
|
-
children:
|
|
44
|
+
children: ReactNode;
|
|
45
45
|
invertedStyle?: boolean;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export const LearningPathWrapper
|
|
48
|
+
export const LearningPathWrapper = ({ children, invertedStyle }: Props) => (
|
|
49
49
|
<StyledWrapper invertedStyle={invertedStyle}>{children}</StyledWrapper>
|
|
50
50
|
);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React, { ReactChild, ReactChildren } from 'react';
|
|
2
|
-
// @ts-ignore
|
|
1
|
+
import React, { ReactChild, ReactChildren, ReactNode } from 'react';
|
|
3
2
|
import Modal from '@ndla/modal';
|
|
4
3
|
// @ts-ignore
|
|
5
4
|
import Button from '@ndla/button';
|
|
6
|
-
// @ts-ignore
|
|
7
5
|
import { Cross } from '@ndla/icons/action';
|
|
8
6
|
import { isFunction } from '@ndla/util';
|
|
9
7
|
import styled from '@emotion/styled';
|
|
@@ -15,7 +13,7 @@ import ToggleSearchButton from '../Search/ToggleSearchButton';
|
|
|
15
13
|
|
|
16
14
|
interface Props {
|
|
17
15
|
onClose: VoidFunction;
|
|
18
|
-
children: (arg: Function) => ReactChild | ReactChildren |
|
|
16
|
+
children: (arg: Function) => ReactChild | ReactChildren | ReactNode;
|
|
19
17
|
hideOnNarrowScreen?: boolean;
|
|
20
18
|
ndlaFilm?: boolean;
|
|
21
19
|
}
|
|
@@ -112,13 +110,13 @@ const extraBackdrop = css`
|
|
|
112
110
|
box-shadow: ${shadows.searchHeader};
|
|
113
111
|
`;
|
|
114
112
|
|
|
115
|
-
const MastheadSearchModal
|
|
113
|
+
const MastheadSearchModal = ({
|
|
116
114
|
onClose: onSearchClose,
|
|
117
115
|
children,
|
|
118
116
|
hideOnNarrowScreen,
|
|
119
117
|
ndlaFilm,
|
|
120
118
|
t,
|
|
121
|
-
}) => (
|
|
119
|
+
}: Props & WithTranslation) => (
|
|
122
120
|
<Modal
|
|
123
121
|
backgroundColor="grey"
|
|
124
122
|
animation="slide-down"
|
|
@@ -128,6 +128,11 @@ const Link = styled.a`
|
|
|
128
128
|
box-shadow: none;
|
|
129
129
|
}
|
|
130
130
|
`;
|
|
131
|
+
const CloseButtonWrapper = styled.div`
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 10px;
|
|
134
|
+
right: 1px;
|
|
135
|
+
`;
|
|
131
136
|
|
|
132
137
|
type LinkProps = {
|
|
133
138
|
href?: string;
|
|
@@ -136,12 +141,12 @@ type LinkProps = {
|
|
|
136
141
|
type Props = {
|
|
137
142
|
type?: WrapperProps['boxType'];
|
|
138
143
|
sticky?: boolean;
|
|
139
|
-
onClose?: boolean;
|
|
140
144
|
children?: string;
|
|
141
145
|
links?: LinkProps[];
|
|
146
|
+
showCloseButton?: boolean;
|
|
142
147
|
};
|
|
143
148
|
|
|
144
|
-
export const MessageBox = ({ type, sticky = false,
|
|
149
|
+
export const MessageBox = ({ type, sticky = false, children, links, t, showCloseButton }: Props & WithTranslation) => {
|
|
145
150
|
const [hideMessageBox, setHideMessageBox] = useState(false);
|
|
146
151
|
const onCloseMessageBox = () => {
|
|
147
152
|
setHideMessageBox(true);
|
|
@@ -157,7 +162,11 @@ export const MessageBox = ({ type, sticky = false, onClose, children, links, t }
|
|
|
157
162
|
</IconWrapper>
|
|
158
163
|
<TextWrapper>{children}</TextWrapper>
|
|
159
164
|
</InfoWrapper>
|
|
160
|
-
{
|
|
165
|
+
{showCloseButton && (
|
|
166
|
+
<CloseButtonWrapper>
|
|
167
|
+
<CloseButton onClick={onCloseMessageBox} />
|
|
168
|
+
</CloseButtonWrapper>
|
|
169
|
+
)}
|
|
161
170
|
</Wrapper>
|
|
162
171
|
|
|
163
172
|
{links && (
|
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { Fragment, useEffect, useState } from 'react';
|
|
9
|
+
import React, { Fragment, RefObject, useEffect, useRef, useState } from 'react';
|
|
10
10
|
import { isIE, browserVersion } from 'react-device-detect';
|
|
11
11
|
import styled from '@emotion/styled';
|
|
12
12
|
import { css } from '@emotion/core';
|
|
13
13
|
import throttle from 'lodash/throttle';
|
|
14
14
|
import { breakpoints, mq, spacing, spacingUnit, colors, fonts, animations } from '@ndla/core';
|
|
15
15
|
import SafeLink from '@ndla/safelink';
|
|
16
|
-
// @ts-ignore
|
|
17
16
|
import { makeSrcQueryString } from '../Image';
|
|
18
17
|
import { MovieType } from './types';
|
|
19
18
|
import { isLetter } from './isLetter';
|
|
@@ -178,11 +177,11 @@ const hasForEachPolyfill = () => {
|
|
|
178
177
|
}
|
|
179
178
|
};
|
|
180
179
|
|
|
181
|
-
const AllMoviesAlphabetically
|
|
180
|
+
const AllMoviesAlphabetically = ({ movies, locale }: Props) => {
|
|
182
181
|
const isIE11 = isIE && parseInt(browserVersion) < 12;
|
|
183
182
|
// Split into Letters.
|
|
184
183
|
let previousLetter = '';
|
|
185
|
-
const wrapperRef:
|
|
184
|
+
const wrapperRef: RefObject<HTMLElement> = useRef(null);
|
|
186
185
|
const [visibleImages, setVisibleImages] = useState<visibleImagesProps>({});
|
|
187
186
|
|
|
188
187
|
const scrollEvent = () => {
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { spacing, colors, fonts, breakpoints } from '@ndla/core';
|
|
3
3
|
import SafeLink from '@ndla/safelink';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
// @ts-ignore
|
|
6
5
|
import { makeSrcQueryString } from '../Image';
|
|
7
6
|
import FilmContentCardTags from './FilmContentCardTags';
|
|
8
7
|
import { MovieResourceType, MovieType } from './types';
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
10
|
-
// @ts-ignore
|
|
11
10
|
import { SwipeEventData, useSwipeable } from 'react-swipeable';
|
|
12
11
|
import BEMHelper from 'react-bem-helper';
|
|
13
12
|
import SafeLink from '@ndla/safelink';
|
|
@@ -206,6 +205,8 @@ const FilmSlideshow = ({ autoSlide = false, slideshow = [], slideInterval = 5000
|
|
|
206
205
|
activeSlide = 0;
|
|
207
206
|
}
|
|
208
207
|
|
|
208
|
+
const backgroundImage = slideshow[activeSlide].metaImage;
|
|
209
|
+
|
|
209
210
|
return (
|
|
210
211
|
<section {...classes('')} {...handlers}>
|
|
211
212
|
<>
|
|
@@ -238,9 +239,7 @@ const FilmSlideshow = ({ autoSlide = false, slideshow = [], slideInterval = 5000
|
|
|
238
239
|
role="img"
|
|
239
240
|
onAnimationEnd={onChangedSlide}
|
|
240
241
|
style={{
|
|
241
|
-
backgroundImage: `url(${
|
|
242
|
-
(slideshow[activeSlide].metaImage && slideshow[activeSlide].metaImage.url) || ''
|
|
243
|
-
})`,
|
|
242
|
+
backgroundImage: `url(${(backgroundImage && backgroundImage.url) || ''})`,
|
|
244
243
|
}}
|
|
245
244
|
/>
|
|
246
245
|
)}
|
package/src/NDLAFilm/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { MouseEvent, ChangeEventHandler } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { SafeLinkButton } from '@ndla/safelink';
|
|
4
4
|
// @ts-ignore
|
|
@@ -186,12 +186,12 @@ type Props = {
|
|
|
186
186
|
colorMode?: 'dark' | 'light' | 'greyLightest' | 'greyLighter';
|
|
187
187
|
isButtonElements?: boolean;
|
|
188
188
|
items: ItemProps[];
|
|
189
|
-
onClick?: (event:
|
|
189
|
+
onClick?: (event: MouseEvent<HTMLElement>, id?: string) => void;
|
|
190
190
|
hasAdditionalResources?: boolean;
|
|
191
191
|
showAdditionalResources?: boolean;
|
|
192
192
|
listDirection?: listProps['direction'];
|
|
193
193
|
invertedStyle?: boolean;
|
|
194
|
-
onToggleAdditionalResources?:
|
|
194
|
+
onToggleAdditionalResources?: ChangeEventHandler<HTMLInputElement>;
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
export const NavigationBox = ({
|
|
@@ -240,7 +240,7 @@ export const NavigationBox = ({
|
|
|
240
240
|
borderShape="sharpened"
|
|
241
241
|
width="full"
|
|
242
242
|
textAlign="left"
|
|
243
|
-
onClick={(e:
|
|
243
|
+
onClick={(e: MouseEvent<HTMLElement>) => {
|
|
244
244
|
if (onClick) {
|
|
245
245
|
onClick(e, item.id);
|
|
246
246
|
}
|
|
@@ -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 { css } from '@emotion/core';
|
|
4
4
|
import { breakpoints, fonts, mq } from '@ndla/core';
|
|
@@ -43,7 +43,7 @@ const StyledSubText = styled.span`
|
|
|
43
43
|
|
|
44
44
|
type Props = {
|
|
45
45
|
subHeading?: string;
|
|
46
|
-
children:
|
|
46
|
+
children: ReactNode;
|
|
47
47
|
invertedStyle?: boolean;
|
|
48
48
|
};
|
|
49
49
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import parse from 'html-react-parser';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
|
|
5
5
|
import { css } from '@emotion/core';
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
import Button from '@ndla/button';
|
|
8
|
-
// @ts-ignore
|
|
9
8
|
import { ChevronDown, ChevronUp } from '@ndla/icons/common';
|
|
10
9
|
import { useTranslation } from 'react-i18next';
|
|
11
10
|
|
|
@@ -114,7 +113,7 @@ type Props = {
|
|
|
114
113
|
isAdditionalTopic?: boolean;
|
|
115
114
|
invertedStyle?: boolean;
|
|
116
115
|
renderMarkdown: (text: string) => string;
|
|
117
|
-
children:
|
|
116
|
+
children: ReactNode;
|
|
118
117
|
};
|
|
119
118
|
|
|
120
119
|
export const NavigationTopicAbout = ({
|