@ndla/ui 50.8.0 → 50.8.1
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 +3 -3
- package/es/Article/Article.js +21 -21
- package/es/Article/ArticleAccessMessage.js +5 -5
- package/es/Article/ArticleByline.js +27 -27
- package/es/Article/ArticleFootNotes.js +6 -6
- package/es/Article/ArticleHeaderWrapper.js +7 -7
- package/es/Article/ArticleNotions.js +12 -12
- package/es/Article/index.js +4 -4
- package/es/Aside/Aside.js +8 -8
- package/es/Aside/index.js +1 -1
- package/es/AudioPlayer/AudioPlayer.js +31 -31
- package/es/AudioPlayer/Controls.js +44 -44
- package/es/AudioPlayer/SpeechControl.js +7 -7
- package/es/AudioPlayer/index.js +1 -1
- package/es/BannerCard/BannerCard.js +10 -10
- package/es/BannerCard/index.js +1 -1
- package/es/BlogPost/BlogPost.js +13 -13
- package/es/BlogPost/index.js +1 -1
- package/es/Breadcrumb/Breadcrumb.js +11 -11
- package/es/Breadcrumb/BreadcrumbItem.js +12 -12
- package/es/Breadcrumb/HeaderBreadcrumb.js +7 -7
- package/es/Breadcrumb/HomeBreadcrumb.js +12 -12
- package/es/Breadcrumb/index.js +3 -3
- package/es/CampaignBlock/CampaignBlock.js +16 -16
- package/es/CampaignBlock/index.js +1 -1
- package/es/CompetenceGoalTab/CompetenceGoalItem.js +4 -4
- package/es/CompetenceGoalTab/CompetenceGoalTab.js +15 -15
- package/es/CompetenceGoalTab/CompetenceItem.js +13 -13
- package/es/CompetenceGoalTab/CoreElementItem.js +4 -4
- package/es/CompetenceGoalTab/SearchButton.js +6 -6
- package/es/CompetenceGoalTab/index.js +1 -1
- package/es/CompetenceGoalTab/styles.js +7 -7
- package/es/ContactBlock/ContactBlock.js +30 -30
- package/es/ContactBlock/index.js +1 -1
- package/es/ContentLoader/index.js +7 -7
- package/es/ContentPlaceholder/ContentPlaceholder.js +4 -4
- package/es/ContentPlaceholder/index.js +1 -1
- package/es/ContentTypeBadge/ContentTypeBadge.js +24 -23
- package/es/ContentTypeBadge/index.js +2 -2
- package/es/CopyParagraphButton/CopyParagraphButton.js +11 -11
- package/es/CopyParagraphButton/index.js +1 -1
- package/es/CreatedBy/CreatedBy.js +8 -8
- package/es/CreatedBy/index.js +1 -1
- package/es/DefinitionList/DefinitionDescription.js +3 -3
- package/es/DefinitionList/DefinitionTerm.js +3 -3
- package/es/DefinitionList/index.js +2 -2
- package/es/Embed/AudioEmbed.js +15 -15
- package/es/Embed/BrightcoveEmbed.js +27 -27
- package/es/Embed/ConceptEmbed.js +46 -46
- package/es/Embed/ConceptListEmbed.js +8 -8
- package/es/Embed/ContentLinkEmbed.js +6 -6
- package/es/Embed/EmbedErrorPlaceholder.js +6 -6
- package/es/Embed/ExternalEmbed.js +17 -17
- package/es/Embed/FootnoteEmbed.js +5 -5
- package/es/Embed/H5pEmbed.js +5 -5
- package/es/Embed/IframeEmbed.js +18 -18
- package/es/Embed/ImageEmbed.js +41 -41
- package/es/Embed/RelatedContentEmbed.js +13 -13
- package/es/Embed/UnknownEmbed.js +4 -4
- package/es/Embed/conceptComponents.js +29 -29
- package/es/Embed/index.js +14 -14
- package/es/ErrorMessage/ErrorMessage.js +10 -10
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +10 -10
- package/es/ErrorMessage/index.js +2 -2
- package/es/ExpandableBox/index.js +1 -1
- package/es/FactBox/FactBox.js +14 -14
- package/es/FactBox/index.js +1 -1
- package/es/Figure/Figure.js +9 -9
- package/es/Figure/FigureOpenDialogButton.js +15 -15
- package/es/Figure/index.js +2 -2
- package/es/FileList/File.js +5 -5
- package/es/FileList/FileList.js +7 -7
- package/es/FileList/Format.js +9 -9
- package/es/FileList/PdfFile.js +1 -1
- package/es/FileList/index.js +4 -4
- package/es/Filter/FilterButtons.js +22 -22
- package/es/Filter/FilterCarousel.js +23 -23
- package/es/Filter/FilterList.js +17 -17
- package/es/Filter/FilterListPhone.js +35 -35
- package/es/Filter/ToggleItem.js +6 -6
- package/es/Filter/filterClasses.js +3 -3
- package/es/Filter/index.js +5 -5
- package/es/Footer/Footer.js +15 -15
- package/es/Footer/FooterLinks.js +13 -13
- package/es/Footer/FooterPrivacy.js +5 -5
- package/es/Footer/FooterText.js +2 -2
- package/es/Footer/index.js +3 -3
- package/es/FramedContent/FramedContent.js +3 -3
- package/es/FramedContent/index.js +1 -1
- package/es/Frontpage/FrontpageAllSubjects.js +21 -21
- package/es/FrontpageArticle/FrontpageArticle.js +10 -10
- package/es/FrontpageArticle/index.js +1 -1
- package/es/Gloss/Gloss.js +20 -20
- package/es/Gloss/GlossExample.js +5 -5
- package/es/Gloss/index.js +2 -2
- package/es/Grid/Grid.js +5 -5
- package/es/Grid/index.js +1 -1
- package/es/Hero/Hero.js +6 -6
- package/es/Hero/HeroContent.js +2 -2
- package/es/Hero/index.js +2 -2
- package/es/Image/Image.js +13 -13
- package/es/Image/ImageLink.js +2 -2
- package/es/Image/index.js +3 -3
- package/es/KeyFigure/KeyFigure.js +7 -7
- package/es/KeyFigure/index.js +1 -1
- package/es/LanguageSelector/LanguageSelector.js +11 -11
- package/es/LanguageSelector/index.js +1 -1
- package/es/Layout/LayoutItem.js +3 -3
- package/es/Layout/OneColumn.js +7 -7
- package/es/Layout/PageContainer.js +4 -4
- package/es/Layout/index.js +4 -4
- package/es/LearningPaths/LearningPathContent.js +2 -2
- package/es/LearningPaths/LearningPathInformation.js +8 -8
- package/es/LearningPaths/LearningPathLastStepNavigation.js +13 -13
- package/es/LearningPaths/LearningPathMenu.js +16 -16
- package/es/LearningPaths/LearningPathMenuAside.js +13 -13
- package/es/LearningPaths/LearningPathMenuAsideCopyright.js +7 -7
- package/es/LearningPaths/LearningPathMenuContent.js +14 -14
- package/es/LearningPaths/LearningPathMenuIntro.js +10 -10
- package/es/LearningPaths/LearningPathMenuModalWrapper.js +10 -10
- package/es/LearningPaths/LearningPathMobileHeader.js +6 -6
- package/es/LearningPaths/LearningPathMobileStepInfo.js +4 -4
- package/es/LearningPaths/LearningPathSticky.js +12 -12
- package/es/LearningPaths/LearningPathWrapper.js +3 -3
- package/es/LearningPaths/index.js +8 -8
- package/es/LetterFilter/LetterFilter.js +10 -10
- package/es/LetterFilter/alphabet.js +1 -1
- package/es/LetterFilter/index.js +1 -1
- package/es/LicenseByline/EmbedByline.js +18 -18
- package/es/LicenseByline/LicenseDescription.js +2 -2
- package/es/LicenseByline/LicenseLink.js +5 -5
- package/es/LicenseByline/index.js +1 -1
- package/es/LinkBlock/LinkBlock.js +16 -16
- package/es/LinkBlock/LinkBlockSection.js +3 -3
- package/es/LinkBlock/index.js +2 -2
- package/es/List/OrderedList.js +7 -7
- package/es/List/UnOrderedList.js +3 -3
- package/es/List/index.js +2 -2
- package/es/Logo/Logo.js +6 -6
- package/es/Logo/SvgLogo.js +4 -4
- package/es/Logo/index.js +1 -1
- package/es/Masthead/Masthead.js +7 -7
- package/es/Masthead/SkipToMainContent.js +4 -4
- package/es/Masthead/index.js +3 -3
- package/es/Masthead/utils.js +5 -5
- package/es/MediaList/MediaList.js +25 -24
- package/es/MediaList/index.js +1 -1
- package/es/Messages/MessageBanner.js +6 -6
- package/es/Messages/MessageBox.js +10 -10
- package/es/Messages/index.js +2 -2
- package/es/MyNdla/Resource/Folder.js +18 -18
- package/es/MyNdla/Resource/FolderInput.js +20 -20
- package/es/MyNdla/Resource/index.js +2 -2
- package/es/MyNdla/index.js +2 -2
- package/es/NDLAFilm/AllMoviesAlphabetically.js +18 -18
- package/es/NDLAFilm/FilmContentCard.js +14 -14
- package/es/NDLAFilm/FilmContentCardTags.js +3 -3
- package/es/NDLAFilm/FilmMovieList.js +7 -7
- package/es/NDLAFilm/FilmMovieSearch.js +18 -18
- package/es/NDLAFilm/FilmSlideshow.js +18 -18
- package/es/NDLAFilm/MovieGrid.js +7 -7
- package/es/NDLAFilm/VisualElement.js +5 -5
- package/es/NDLAFilm/filmStyles.js +7 -7
- package/es/NDLAFilm/index.js +5 -5
- package/es/Navigation/NavigationBox.js +31 -31
- package/es/Navigation/index.js +1 -1
- package/es/NoContentBox/NoContentBox.js +1 -1
- package/es/NoContentBox/index.js +1 -1
- package/es/Notion/Notion.js +11 -11
- package/es/Notion/NotionImage.js +9 -9
- package/es/Notion/index.js +1 -1
- package/es/Programme/Programme.js +11 -11
- package/es/Programme/ProgrammeSubjects.js +12 -12
- package/es/Programme/index.js +2 -2
- package/es/ProgrammeCard/ProgrammeCard.js +6 -6
- package/es/ProgrammeCard/index.js +1 -1
- package/es/RelatedArticleList/RelatedArticleList.js +22 -22
- package/es/RelatedArticleList/index.js +1 -1
- package/es/Resource/BlockResource.js +21 -21
- package/es/Resource/ListResource.js +35 -35
- package/es/Resource/index.js +2 -2
- package/es/Resource/resourceComponents.js +27 -27
- package/es/Resource/storyComponents.js +17 -17
- package/es/ResourceBox/ResourceBox.js +10 -10
- package/es/ResourceBox/index.js +1 -1
- package/es/ResourceGroup/ResourceGroup.js +8 -8
- package/es/ResourceGroup/ResourceItem.js +38 -36
- package/es/ResourceGroup/ResourceList.js +9 -9
- package/es/ResourceGroup/index.js +1 -1
- package/es/ResourcesWrapper/ResourcesTopicTitle.js +26 -26
- package/es/ResourcesWrapper/ResourcesWrapper.js +2 -2
- package/es/ResourcesWrapper/index.js +2 -2
- package/es/Search/ActiveFilterContent.js +8 -8
- package/es/Search/ActiveFilters.js +17 -17
- package/es/Search/ContentTypeResult.js +16 -16
- package/es/Search/ContentTypeResultStyles.js +15 -15
- package/es/Search/IsPathToHighlight.js +1 -1
- package/es/Search/LoadingWrapper.js +3 -3
- package/es/Search/SearchField.js +18 -18
- package/es/Search/SearchFieldForm.js +4 -4
- package/es/Search/SearchResult.js +36 -36
- package/es/Search/SearchResultSleeve.js +38 -38
- package/es/Search/index.js +3 -3
- package/es/SearchTypeResult/ActiveFilterContent.js +8 -8
- package/es/SearchTypeResult/ActiveFilters.js +16 -16
- package/es/SearchTypeResult/PopupFilter.js +20 -20
- package/es/SearchTypeResult/ResultNavigation.js +13 -13
- package/es/SearchTypeResult/SearchFieldHeader.js +19 -19
- package/es/SearchTypeResult/SearchFilterContent.js +7 -7
- package/es/SearchTypeResult/SearchHeader.js +25 -25
- package/es/SearchTypeResult/SearchItem.js +16 -16
- package/es/SearchTypeResult/SearchItemList.js +20 -20
- package/es/SearchTypeResult/SearchItems.js +10 -10
- package/es/SearchTypeResult/SearchNotionsResult.js +8 -8
- package/es/SearchTypeResult/SearchSubjectItem.js +9 -9
- package/es/SearchTypeResult/SearchSubjectResult.js +3 -3
- package/es/SearchTypeResult/SearchTypeHeader.js +16 -16
- package/es/SearchTypeResult/SearchTypeResult.js +8 -8
- package/es/SearchTypeResult/SearchViewType.js +15 -15
- package/es/SearchTypeResult/components/ItemContexts.js +22 -22
- package/es/SearchTypeResult/components/ItemResourceHeader.js +12 -12
- package/es/SearchTypeResult/components/ItemTopicHeader.js +7 -7
- package/es/SearchTypeResult/components/SubjectFilters.js +9 -9
- package/es/SearchTypeResult/index.js +6 -6
- package/es/SnackBar/DefaultSnackbar.js +8 -8
- package/es/SnackBar/SnackbarProvider.js +11 -11
- package/es/SnackBar/index.js +2 -2
- package/es/Subject/SubjectBanner.js +2 -2
- package/es/Subject/SubjectHeader.js +8 -8
- package/es/Subject/index.js +2 -2
- package/es/Table/Table.js +19 -19
- package/es/Table/index.js +2 -2
- package/es/TagSelector/Control.js +2 -2
- package/es/TagSelector/DropdownIndicator.js +11 -11
- package/es/TagSelector/Input.js +5 -5
- package/es/TagSelector/Menu.js +5 -5
- package/es/TagSelector/MenuList.js +2 -2
- package/es/TagSelector/Option.js +8 -8
- package/es/TagSelector/SelectContainer.js +2 -2
- package/es/TagSelector/TagSelector.js +26 -26
- package/es/TagSelector/ValueButton.js +7 -7
- package/es/TagSelector/ariaMessages.js +31 -31
- package/es/TagSelector/index.js +1 -1
- package/es/ToolboxPage/ToolboxInfo.js +4 -4
- package/es/ToolboxPage/index.js +1 -1
- package/es/Topic/Loader.js +1 -1
- package/es/Topic/Topic.js +40 -40
- package/es/Topic/index.js +1 -1
- package/es/TreeStructure/AddFolderButton.js +10 -10
- package/es/TreeStructure/ComboboxButton.js +16 -16
- package/es/TreeStructure/FolderItem.js +31 -31
- package/es/TreeStructure/FolderItems.js +12 -12
- package/es/TreeStructure/TreeStructure.js +18 -18
- package/es/TreeStructure/arrowNavigation.js +5 -5
- package/es/TreeStructure/index.js +1 -1
- package/es/all.css +1 -1
- package/es/i18n/formatNestedMessages.js +2 -2
- package/es/i18n/i18n.js +14 -14
- package/es/i18n/index.js +2 -2
- package/es/index.js +73 -73
- package/es/locale/LocaleProvider.js +2 -2
- package/es/locale/messages-en.js +887 -887
- package/es/locale/messages-nb.js +890 -890
- package/es/locale/messages-nn.js +890 -890
- package/es/locale/messages-se.js +892 -892
- package/es/locale/messages-sma.js +891 -891
- package/es/model/ContentType.js +20 -20
- package/es/model/SubjectCategories.js +4 -4
- package/es/model/SubjectTypes.js +3 -3
- package/es/model/WordClass.js +35 -35
- package/es/model/index.js +4 -4
- package/es/types.js +1 -1
- package/es/utils/relativeUrl.js +8 -6
- package/es/utils/resourceTypeColor.js +4 -4
- package/lib/Article/Article.d.ts +2 -2
- package/lib/Article/Article.js +9 -9
- package/lib/Article/ArticleAccessMessage.js +2 -2
- package/lib/Article/ArticleByline.d.ts +3 -3
- package/lib/Article/ArticleByline.js +20 -20
- package/lib/Article/ArticleFootNotes.d.ts +1 -1
- package/lib/Article/ArticleFootNotes.js +5 -5
- package/lib/Article/ArticleHeaderWrapper.d.ts +1 -1
- package/lib/Article/ArticleHeaderWrapper.js +4 -4
- package/lib/Article/ArticleNotions.d.ts +1 -1
- package/lib/Article/ArticleNotions.js +8 -8
- package/lib/Article/index.d.ts +4 -4
- package/lib/Aside/Aside.d.ts +2 -2
- package/lib/Aside/Aside.js +5 -5
- package/lib/Aside/index.d.ts +1 -1
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/lib/AudioPlayer/AudioPlayer.js +23 -23
- package/lib/AudioPlayer/Controls.js +35 -35
- package/lib/AudioPlayer/SpeechControl.js +2 -2
- package/lib/AudioPlayer/index.d.ts +1 -1
- package/lib/BannerCard/BannerCard.js +7 -7
- package/lib/BannerCard/index.d.ts +1 -1
- package/lib/BlogPost/BlogPost.d.ts +2 -2
- package/lib/BlogPost/BlogPost.js +8 -8
- package/lib/BlogPost/index.d.ts +1 -1
- package/lib/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/lib/Breadcrumb/Breadcrumb.js +7 -7
- package/lib/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.js +7 -7
- package/lib/Breadcrumb/HeaderBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/HeaderBreadcrumb.js +3 -3
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.js +8 -8
- package/lib/Breadcrumb/index.d.ts +4 -4
- package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
- package/lib/CampaignBlock/CampaignBlock.js +11 -11
- package/lib/CampaignBlock/index.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalItem.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalItem.js +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalTab.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalTab.js +6 -6
- package/lib/CompetenceGoalTab/CompetenceItem.d.ts +2 -2
- package/lib/CompetenceGoalTab/CompetenceItem.js +8 -8
- package/lib/CompetenceGoalTab/CoreElementItem.d.ts +1 -1
- package/lib/CompetenceGoalTab/CoreElementItem.js +1 -1
- package/lib/CompetenceGoalTab/SearchButton.js +3 -3
- package/lib/CompetenceGoalTab/index.d.ts +1 -1
- package/lib/CompetenceGoalTab/styles.js +6 -6
- package/lib/ContactBlock/ContactBlock.d.ts +5 -5
- package/lib/ContactBlock/ContactBlock.js +21 -21
- package/lib/ContactBlock/index.d.ts +1 -1
- package/lib/ContentLoader/index.d.ts +2 -2
- package/lib/ContentLoader/index.js +6 -6
- package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/lib/ContentPlaceholder/index.d.ts +1 -1
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +11 -11
- package/lib/ContentTypeBadge/ContentTypeBadge.js +17 -16
- package/lib/ContentTypeBadge/index.d.ts +2 -2
- package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -1
- package/lib/CopyParagraphButton/CopyParagraphButton.js +5 -5
- package/lib/CopyParagraphButton/index.d.ts +1 -1
- package/lib/CreatedBy/CreatedBy.js +5 -5
- package/lib/CreatedBy/index.d.ts +1 -1
- package/lib/DefinitionList/DefinitionDescription.d.ts +1 -1
- package/lib/DefinitionList/DefinitionDescription.js +1 -1
- package/lib/DefinitionList/DefinitionTerm.d.ts +1 -1
- package/lib/DefinitionList/DefinitionTerm.js +1 -1
- package/lib/DefinitionList/index.d.ts +2 -2
- package/lib/Embed/AudioEmbed.d.ts +3 -3
- package/lib/Embed/AudioEmbed.js +10 -10
- package/lib/Embed/BrightcoveEmbed.d.ts +2 -2
- package/lib/Embed/BrightcoveEmbed.js +17 -17
- package/lib/Embed/ConceptEmbed.d.ts +4 -4
- package/lib/Embed/ConceptEmbed.js +29 -29
- package/lib/Embed/ConceptListEmbed.d.ts +1 -1
- package/lib/Embed/ConceptListEmbed.js +4 -4
- package/lib/Embed/ContentLinkEmbed.d.ts +1 -1
- package/lib/Embed/ContentLinkEmbed.js +4 -4
- package/lib/Embed/EmbedErrorPlaceholder.d.ts +4 -4
- package/lib/Embed/EmbedErrorPlaceholder.js +2 -2
- package/lib/Embed/ExternalEmbed.d.ts +1 -1
- package/lib/Embed/ExternalEmbed.js +12 -12
- package/lib/Embed/FootnoteEmbed.d.ts +1 -1
- package/lib/Embed/FootnoteEmbed.js +3 -3
- package/lib/Embed/H5pEmbed.d.ts +1 -1
- package/lib/Embed/H5pEmbed.js +4 -4
- package/lib/Embed/IframeEmbed.d.ts +1 -1
- package/lib/Embed/IframeEmbed.js +14 -14
- package/lib/Embed/ImageEmbed.d.ts +3 -3
- package/lib/Embed/ImageEmbed.js +30 -30
- package/lib/Embed/RelatedContentEmbed.d.ts +1 -1
- package/lib/Embed/RelatedContentEmbed.js +10 -10
- package/lib/Embed/UnknownEmbed.d.ts +1 -1
- package/lib/Embed/UnknownEmbed.js +2 -2
- package/lib/Embed/conceptComponents.d.ts +8 -8
- package/lib/Embed/conceptComponents.js +18 -18
- package/lib/Embed/index.d.ts +15 -15
- package/lib/Embed/types.d.ts +7 -7
- package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
- package/lib/ErrorMessage/ErrorMessage.js +8 -8
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +5 -5
- package/lib/ErrorMessage/index.d.ts +2 -2
- package/lib/ExpandableBox/ExpandableBox.d.ts +1 -1
- package/lib/ExpandableBox/index.d.ts +1 -1
- package/lib/FactBox/FactBox.d.ts +2 -2
- package/lib/FactBox/FactBox.js +8 -8
- package/lib/FactBox/index.d.ts +1 -1
- package/lib/Figure/Figure.d.ts +2 -2
- package/lib/Figure/Figure.js +7 -7
- package/lib/Figure/FigureOpenDialogButton.d.ts +1 -1
- package/lib/Figure/FigureOpenDialogButton.js +13 -13
- package/lib/Figure/index.d.ts +3 -3
- package/lib/FileList/File.js +2 -2
- package/lib/FileList/FileList.d.ts +2 -2
- package/lib/FileList/FileList.js +4 -4
- package/lib/FileList/Format.d.ts +1 -1
- package/lib/FileList/Format.js +5 -5
- package/lib/FileList/index.d.ts +4 -4
- package/lib/Filter/FilterButtons.js +14 -14
- package/lib/Filter/FilterCarousel.d.ts +1 -1
- package/lib/Filter/FilterCarousel.js +18 -18
- package/lib/Filter/FilterList.d.ts +1 -1
- package/lib/Filter/FilterList.js +13 -13
- package/lib/Filter/FilterListPhone.d.ts +1 -1
- package/lib/Filter/FilterListPhone.js +27 -27
- package/lib/Filter/ToggleItem.d.ts +1 -1
- package/lib/Filter/ToggleItem.js +5 -5
- package/lib/Filter/filterClasses.d.ts +1 -1
- package/lib/Filter/filterClasses.js +2 -2
- package/lib/Filter/index.d.ts +5 -5
- package/lib/Footer/Footer.d.ts +2 -2
- package/lib/Footer/Footer.js +9 -9
- package/lib/Footer/FooterLinks.d.ts +1 -1
- package/lib/Footer/FooterLinks.js +9 -9
- package/lib/Footer/FooterPrivacy.js +4 -4
- package/lib/Footer/FooterText.d.ts +1 -1
- package/lib/Footer/FooterText.js +1 -1
- package/lib/Footer/index.d.ts +3 -3
- package/lib/FramedContent/FramedContent.js +1 -1
- package/lib/FramedContent/index.d.ts +1 -1
- package/lib/Frontpage/FrontpageAllSubjects.d.ts +1 -1
- package/lib/Frontpage/FrontpageAllSubjects.js +13 -13
- package/lib/FrontpageArticle/FrontpageArticle.d.ts +3 -3
- package/lib/FrontpageArticle/FrontpageArticle.js +5 -5
- package/lib/FrontpageArticle/index.d.ts +1 -1
- package/lib/Gloss/Gloss.d.ts +1 -1
- package/lib/Gloss/Gloss.js +14 -14
- package/lib/Gloss/GlossExample.d.ts +1 -1
- package/lib/Gloss/GlossExample.js +3 -3
- package/lib/Gloss/index.d.ts +2 -2
- package/lib/Grid/Grid.d.ts +4 -4
- package/lib/Grid/Grid.js +4 -4
- package/lib/Grid/index.d.ts +2 -2
- package/lib/Hero/Hero.d.ts +2 -2
- package/lib/Hero/Hero.js +4 -4
- package/lib/Hero/HeroContent.js +1 -1
- package/lib/Hero/index.d.ts +3 -3
- package/lib/Image/Image.d.ts +1 -1
- package/lib/Image/Image.js +12 -12
- package/lib/Image/ImageLink.d.ts +2 -2
- package/lib/Image/ImageLink.js +1 -1
- package/lib/Image/index.d.ts +4 -4
- package/lib/KeyFigure/KeyFigure.js +6 -6
- package/lib/KeyFigure/index.d.ts +1 -1
- package/lib/LanguageSelector/LanguageSelector.js +6 -6
- package/lib/LanguageSelector/index.d.ts +1 -1
- package/lib/Layout/Content.d.ts +1 -1
- package/lib/Layout/LayoutItem.d.ts +1 -1
- package/lib/Layout/LayoutItem.js +3 -3
- package/lib/Layout/OneColumn.d.ts +1 -1
- package/lib/Layout/OneColumn.js +6 -6
- package/lib/Layout/PageContainer.d.ts +1 -1
- package/lib/Layout/PageContainer.js +3 -3
- package/lib/Layout/index.d.ts +4 -4
- package/lib/LearningPaths/LearningPathContent.d.ts +1 -1
- package/lib/LearningPaths/LearningPathContent.js +1 -1
- package/lib/LearningPaths/LearningPathInformation.js +4 -4
- package/lib/LearningPaths/LearningPathLastStepNavigation.d.ts +1 -1
- package/lib/LearningPaths/LearningPathLastStepNavigation.js +8 -8
- package/lib/LearningPaths/LearningPathMenu.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenu.js +5 -5
- package/lib/LearningPaths/LearningPathMenuAside.js +7 -7
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.js +3 -3
- package/lib/LearningPaths/LearningPathMenuContent.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuContent.js +8 -8
- package/lib/LearningPaths/LearningPathMenuIntro.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuIntro.js +7 -7
- package/lib/LearningPaths/LearningPathMenuModalWrapper.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuModalWrapper.js +3 -3
- package/lib/LearningPaths/LearningPathMobileHeader.js +3 -3
- package/lib/LearningPaths/LearningPathMobileStepInfo.js +2 -2
- package/lib/LearningPaths/LearningPathSticky.d.ts +2 -2
- package/lib/LearningPaths/LearningPathSticky.js +7 -7
- package/lib/LearningPaths/LearningPathWrapper.d.ts +1 -1
- package/lib/LearningPaths/LearningPathWrapper.js +2 -2
- package/lib/LearningPaths/index.d.ts +8 -8
- package/lib/LetterFilter/LetterFilter.js +5 -5
- package/lib/LetterFilter/alphabet.js +1 -1
- package/lib/LetterFilter/index.d.ts +1 -1
- package/lib/LicenseByline/EmbedByline.d.ts +12 -12
- package/lib/LicenseByline/EmbedByline.js +11 -11
- package/lib/LicenseByline/LicenseDescription.d.ts +1 -1
- package/lib/LicenseByline/LicenseDescription.js +1 -1
- package/lib/LicenseByline/LicenseLink.d.ts +1 -1
- package/lib/LicenseByline/LicenseLink.js +3 -3
- package/lib/LicenseByline/index.d.ts +1 -1
- package/lib/LinkBlock/LinkBlock.d.ts +2 -2
- package/lib/LinkBlock/LinkBlock.js +8 -8
- package/lib/LinkBlock/LinkBlockSection.d.ts +1 -1
- package/lib/LinkBlock/LinkBlockSection.js +1 -1
- package/lib/LinkBlock/index.d.ts +2 -2
- package/lib/List/OrderedList.d.ts +2 -2
- package/lib/List/OrderedList.js +4 -4
- package/lib/List/UnOrderedList.d.ts +1 -1
- package/lib/List/UnOrderedList.js +1 -1
- package/lib/List/index.d.ts +2 -2
- package/lib/Logo/Logo.d.ts +1 -1
- package/lib/Logo/Logo.js +3 -3
- package/lib/Logo/SvgLogo.js +3 -3
- package/lib/Logo/index.d.ts +1 -1
- package/lib/Masthead/Masthead.d.ts +1 -1
- package/lib/Masthead/Masthead.js +3 -3
- package/lib/Masthead/SkipToMainContent.js +2 -2
- package/lib/Masthead/index.d.ts +3 -3
- package/lib/Masthead/utils.js +3 -3
- package/lib/MediaList/MediaList.d.ts +8 -8
- package/lib/MediaList/MediaList.js +18 -17
- package/lib/MediaList/index.d.ts +2 -2
- package/lib/Messages/MessageBanner.d.ts +1 -1
- package/lib/Messages/MessageBanner.js +4 -4
- package/lib/Messages/MessageBox.d.ts +2 -2
- package/lib/Messages/MessageBox.js +7 -7
- package/lib/Messages/index.d.ts +2 -2
- package/lib/MyNdla/Resource/Folder.d.ts +2 -2
- package/lib/MyNdla/Resource/Folder.js +13 -13
- package/lib/MyNdla/Resource/FolderInput.js +10 -10
- package/lib/MyNdla/Resource/index.d.ts +2 -2
- package/lib/MyNdla/index.d.ts +2 -2
- package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +1 -1
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +11 -11
- package/lib/NDLAFilm/FilmContentCard.d.ts +3 -3
- package/lib/NDLAFilm/FilmContentCard.js +10 -10
- package/lib/NDLAFilm/FilmContentCardTags.d.ts +1 -1
- package/lib/NDLAFilm/FilmContentCardTags.js +2 -2
- package/lib/NDLAFilm/FilmMovieList.d.ts +1 -1
- package/lib/NDLAFilm/FilmMovieList.js +1 -1
- package/lib/NDLAFilm/FilmMovieSearch.d.ts +1 -1
- package/lib/NDLAFilm/FilmMovieSearch.js +11 -11
- package/lib/NDLAFilm/FilmSlideshow.d.ts +1 -1
- package/lib/NDLAFilm/FilmSlideshow.js +10 -10
- package/lib/NDLAFilm/MovieGrid.d.ts +1 -1
- package/lib/NDLAFilm/MovieGrid.js +3 -3
- package/lib/NDLAFilm/VisualElement.js +4 -4
- package/lib/NDLAFilm/filmStyles.js +5 -5
- package/lib/NDLAFilm/index.d.ts +5 -5
- package/lib/Navigation/NavigationBox.d.ts +3 -3
- package/lib/Navigation/NavigationBox.js +22 -22
- package/lib/Navigation/index.d.ts +1 -1
- package/lib/NoContentBox/index.d.ts +1 -1
- package/lib/Notion/Notion.d.ts +1 -1
- package/lib/Notion/Notion.js +8 -8
- package/lib/Notion/NotionImage.d.ts +1 -1
- package/lib/Notion/NotionImage.js +5 -5
- package/lib/Notion/index.d.ts +1 -1
- package/lib/Programme/Programme.d.ts +1 -1
- package/lib/Programme/Programme.js +5 -5
- package/lib/Programme/ProgrammeSubjects.js +6 -6
- package/lib/Programme/index.d.ts +2 -2
- package/lib/ProgrammeCard/ProgrammeCard.js +4 -4
- package/lib/ProgrammeCard/index.d.ts +2 -2
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +3 -3
- package/lib/RelatedArticleList/RelatedArticleList.js +14 -14
- package/lib/RelatedArticleList/index.d.ts +1 -1
- package/lib/Resource/BlockResource.d.ts +2 -2
- package/lib/Resource/BlockResource.js +14 -14
- package/lib/Resource/ListResource.d.ts +2 -2
- package/lib/Resource/ListResource.js +28 -28
- package/lib/Resource/index.d.ts +3 -3
- package/lib/Resource/resourceComponents.d.ts +1 -1
- package/lib/Resource/resourceComponents.js +17 -17
- package/lib/Resource/storyComponents.js +12 -12
- package/lib/ResourceBox/ResourceBox.js +6 -6
- package/lib/ResourceBox/index.d.ts +1 -1
- package/lib/ResourceGroup/ResourceGroup.d.ts +3 -3
- package/lib/ResourceGroup/ResourceGroup.js +5 -5
- package/lib/ResourceGroup/ResourceItem.d.ts +3 -3
- package/lib/ResourceGroup/ResourceItem.js +30 -28
- package/lib/ResourceGroup/ResourceList.d.ts +2 -2
- package/lib/ResourceGroup/ResourceList.js +5 -5
- package/lib/ResourceGroup/index.d.ts +1 -1
- package/lib/ResourcesWrapper/ResourcesTopicTitle.js +19 -19
- package/lib/ResourcesWrapper/ResourcesWrapper.d.ts +1 -1
- package/lib/ResourcesWrapper/ResourcesWrapper.js +1 -1
- package/lib/ResourcesWrapper/index.d.ts +2 -2
- package/lib/Search/ActiveFilterContent.js +5 -5
- package/lib/Search/ActiveFilters.js +12 -12
- package/lib/Search/ContentTypeResult.d.ts +1 -1
- package/lib/Search/ContentTypeResult.js +7 -7
- package/lib/Search/ContentTypeResultStyles.js +13 -13
- package/lib/Search/IsPathToHighlight.js +1 -1
- package/lib/Search/LoadingWrapper.js +1 -1
- package/lib/Search/SearchField.d.ts +1 -1
- package/lib/Search/SearchField.js +11 -11
- package/lib/Search/SearchFieldForm.d.ts +1 -1
- package/lib/Search/SearchFieldForm.js +2 -2
- package/lib/Search/SearchResult.d.ts +1 -1
- package/lib/Search/SearchResult.js +28 -28
- package/lib/Search/SearchResultSleeve.d.ts +1 -1
- package/lib/Search/SearchResultSleeve.js +31 -31
- package/lib/Search/index.d.ts +3 -3
- package/lib/SearchTypeResult/ActiveFilterContent.js +3 -3
- package/lib/SearchTypeResult/ActiveFilters.d.ts +2 -2
- package/lib/SearchTypeResult/ActiveFilters.js +10 -10
- package/lib/SearchTypeResult/PopupFilter.d.ts +2 -2
- package/lib/SearchTypeResult/PopupFilter.js +13 -13
- package/lib/SearchTypeResult/ResultNavigation.js +10 -10
- package/lib/SearchTypeResult/SearchFieldHeader.d.ts +2 -2
- package/lib/SearchTypeResult/SearchFieldHeader.js +13 -13
- package/lib/SearchTypeResult/SearchFilterContent.d.ts +5 -5
- package/lib/SearchTypeResult/SearchFilterContent.js +3 -3
- package/lib/SearchTypeResult/SearchHeader.d.ts +5 -5
- package/lib/SearchTypeResult/SearchHeader.js +17 -17
- package/lib/SearchTypeResult/SearchItem.d.ts +4 -4
- package/lib/SearchTypeResult/SearchItem.js +8 -8
- package/lib/SearchTypeResult/SearchItemList.d.ts +1 -1
- package/lib/SearchTypeResult/SearchItemList.js +12 -12
- package/lib/SearchTypeResult/SearchItems.d.ts +3 -3
- package/lib/SearchTypeResult/SearchItems.js +5 -5
- package/lib/SearchTypeResult/SearchNotionsResult.d.ts +1 -1
- package/lib/SearchTypeResult/SearchNotionsResult.js +4 -4
- package/lib/SearchTypeResult/SearchSubjectItem.js +6 -6
- package/lib/SearchTypeResult/SearchSubjectResult.d.ts +1 -1
- package/lib/SearchTypeResult/SearchSubjectResult.js +1 -1
- package/lib/SearchTypeResult/SearchTypeHeader.d.ts +1 -1
- package/lib/SearchTypeResult/SearchTypeHeader.js +10 -10
- package/lib/SearchTypeResult/SearchTypeResult.d.ts +6 -6
- package/lib/SearchTypeResult/SearchTypeResult.js +2 -2
- package/lib/SearchTypeResult/SearchViewType.d.ts +2 -2
- package/lib/SearchTypeResult/SearchViewType.js +10 -10
- package/lib/SearchTypeResult/components/ItemContexts.js +15 -15
- package/lib/SearchTypeResult/components/ItemResourceHeader.d.ts +4 -4
- package/lib/SearchTypeResult/components/ItemResourceHeader.js +7 -7
- package/lib/SearchTypeResult/components/ItemTopicHeader.d.ts +4 -4
- package/lib/SearchTypeResult/components/ItemTopicHeader.js +4 -4
- package/lib/SearchTypeResult/components/SubjectFilters.d.ts +4 -4
- package/lib/SearchTypeResult/components/SubjectFilters.js +2 -2
- package/lib/SearchTypeResult/index.d.ts +7 -7
- package/lib/SnackBar/DefaultSnackbar.d.ts +1 -1
- package/lib/SnackBar/DefaultSnackbar.js +3 -3
- package/lib/SnackBar/SnackbarProvider.d.ts +1 -1
- package/lib/SnackBar/SnackbarProvider.js +7 -7
- package/lib/SnackBar/index.d.ts +3 -3
- package/lib/Subject/SubjectBanner.js +1 -1
- package/lib/Subject/SubjectHeader.d.ts +1 -1
- package/lib/Subject/SubjectHeader.js +5 -5
- package/lib/Subject/index.d.ts +2 -2
- package/lib/Table/Table.d.ts +1 -1
- package/lib/Table/Table.js +15 -15
- package/lib/Table/index.d.ts +2 -2
- package/lib/TagSelector/Control.d.ts +2 -2
- package/lib/TagSelector/Control.js +1 -1
- package/lib/TagSelector/DropdownIndicator.d.ts +2 -2
- package/lib/TagSelector/DropdownIndicator.js +6 -6
- package/lib/TagSelector/Input.d.ts +2 -2
- package/lib/TagSelector/Input.js +1 -1
- package/lib/TagSelector/Menu.d.ts +2 -2
- package/lib/TagSelector/Menu.js +1 -1
- package/lib/TagSelector/MenuList.d.ts +2 -2
- package/lib/TagSelector/MenuList.js +1 -1
- package/lib/TagSelector/Option.d.ts +2 -2
- package/lib/TagSelector/Option.js +5 -5
- package/lib/TagSelector/SelectContainer.d.ts +2 -2
- package/lib/TagSelector/SelectContainer.js +1 -1
- package/lib/TagSelector/TagSelector.js +13 -13
- package/lib/TagSelector/ValueButton.d.ts +2 -2
- package/lib/TagSelector/ValueButton.js +4 -4
- package/lib/TagSelector/ariaMessages.d.ts +3 -3
- package/lib/TagSelector/ariaMessages.js +31 -31
- package/lib/TagSelector/index.d.ts +2 -2
- package/lib/ToolboxPage/ToolboxInfo.d.ts +2 -2
- package/lib/ToolboxPage/ToolboxInfo.js +1 -1
- package/lib/ToolboxPage/index.d.ts +1 -1
- package/lib/Topic/Topic.d.ts +3 -3
- package/lib/Topic/Topic.js +26 -26
- package/lib/Topic/index.d.ts +1 -1
- package/lib/TreeStructure/AddFolderButton.d.ts +1 -1
- package/lib/TreeStructure/AddFolderButton.js +5 -5
- package/lib/TreeStructure/ComboboxButton.d.ts +2 -2
- package/lib/TreeStructure/ComboboxButton.js +8 -8
- package/lib/TreeStructure/FolderItem.d.ts +2 -2
- package/lib/TreeStructure/FolderItem.js +21 -21
- package/lib/TreeStructure/FolderItems.d.ts +3 -3
- package/lib/TreeStructure/FolderItems.js +9 -9
- package/lib/TreeStructure/TreeStructure.d.ts +2 -2
- package/lib/TreeStructure/TreeStructure.js +11 -11
- package/lib/TreeStructure/arrowNavigation.d.ts +2 -2
- package/lib/TreeStructure/arrowNavigation.js +5 -5
- package/lib/TreeStructure/helperFunctions.d.ts +2 -2
- package/lib/TreeStructure/index.d.ts +2 -2
- package/lib/TreeStructure/types.d.ts +3 -3
- package/lib/all.css +1 -1
- package/lib/i18n/formatNestedMessages.js +2 -2
- package/lib/i18n/i18n.js +6 -6
- package/lib/i18n/index.d.ts +2 -2
- package/lib/index.d.ts +86 -86
- package/lib/locale/LocaleProvider.d.ts +2 -2
- package/lib/locale/messages-en.d.ts +10 -10
- package/lib/locale/messages-en.js +885 -885
- package/lib/locale/messages-nb.d.ts +10 -10
- package/lib/locale/messages-nb.js +888 -888
- package/lib/locale/messages-nn.d.ts +10 -10
- package/lib/locale/messages-nn.js +888 -888
- package/lib/locale/messages-se.d.ts +11 -11
- package/lib/locale/messages-se.js +890 -890
- package/lib/locale/messages-sma.d.ts +11 -11
- package/lib/locale/messages-sma.js +889 -889
- package/lib/model/ContentType.js +20 -20
- package/lib/model/SubjectCategories.js +4 -4
- package/lib/model/SubjectTypes.js +3 -3
- package/lib/model/WordClass.d.ts +1 -1
- package/lib/model/WordClass.js +35 -35
- package/lib/model/index.d.ts +3 -3
- package/lib/types.d.ts +2 -2
- package/lib/types.js +1 -1
- package/lib/utils/relativeUrl.js +7 -5
- package/lib/utils/resourceTypeColor.js +1 -1
- package/package.json +21 -21
- package/src/Article/Article.tsx +22 -22
- package/src/Article/ArticleAccessMessage.tsx +5 -5
- package/src/Article/ArticleByline.stories.tsx +14 -14
- package/src/Article/ArticleByline.tsx +32 -29
- package/src/Article/ArticleFootNotes.tsx +6 -6
- package/src/Article/ArticleHeaderWrapper.tsx +7 -7
- package/src/Article/ArticleNotions.tsx +10 -10
- package/src/Article/component.article.scss +2 -2
- package/src/Article/index.ts +4 -4
- package/src/Aside/Aside.tsx +5 -5
- package/src/Aside/index.ts +1 -1
- package/src/AudioPlayer/AudiPlayer.stories.tsx +20 -20
- package/src/AudioPlayer/AudioPlayer.tsx +22 -22
- package/src/AudioPlayer/Controls.tsx +27 -27
- package/src/AudioPlayer/SpeechControl.tsx +7 -7
- package/src/AudioPlayer/index.ts +1 -1
- package/src/BannerCard/BannerCard.tsx +4 -4
- package/src/BannerCard/index.ts +1 -1
- package/src/BlogPost/BlogPost.stories.tsx +13 -13
- package/src/BlogPost/BlogPost.tsx +13 -13
- package/src/BlogPost/index.ts +1 -1
- package/src/Breadcrumb/Breadcrumb.stories.tsx +14 -14
- package/src/Breadcrumb/Breadcrumb.tsx +10 -10
- package/src/Breadcrumb/BreadcrumbItem.tsx +7 -7
- package/src/Breadcrumb/HeaderBreadcrumb.tsx +6 -6
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +14 -14
- package/src/Breadcrumb/HomeBreadcrumb.tsx +8 -8
- package/src/Breadcrumb/index.ts +4 -4
- package/src/CampaignBlock/CampaignBlock.stories.tsx +21 -21
- package/src/CampaignBlock/CampaignBlock.tsx +14 -14
- package/src/CampaignBlock/index.ts +1 -1
- package/src/CompetenceGoalTab/CompetenceGoalItem.tsx +5 -5
- package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +16 -16
- package/src/CompetenceGoalTab/CompetenceItem.tsx +11 -11
- package/src/CompetenceGoalTab/CoreElementItem.tsx +7 -5
- package/src/CompetenceGoalTab/SearchButton.tsx +5 -5
- package/src/CompetenceGoalTab/index.ts +1 -1
- package/src/CompetenceGoalTab/styles.ts +3 -3
- package/src/ContactBlock/ContactBlock.tsx +26 -26
- package/src/ContactBlock/Contactblock.stories.tsx +38 -38
- package/src/ContactBlock/index.ts +1 -1
- package/src/ContentLoader/ContentLoader.stories.tsx +5 -5
- package/src/ContentLoader/index.tsx +9 -9
- package/src/ContentPlaceholder/ContentPlaceholder.tsx +2 -2
- package/src/ContentPlaceholder/index.ts +1 -1
- package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +10 -10
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +31 -27
- package/src/ContentTypeBadge/index.ts +2 -2
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +10 -10
- package/src/CopyParagraphButton/index.tsx +1 -1
- package/src/CreatedBy/CreatedBy.stories.tsx +8 -8
- package/src/CreatedBy/CreatedBy.tsx +6 -6
- package/src/CreatedBy/index.ts +1 -1
- package/src/DefinitionList/DefinitionDescription.tsx +4 -4
- package/src/DefinitionList/DefinitionTerm.tsx +4 -4
- package/src/DefinitionList/index.tsx +2 -2
- package/src/Embed/AudioEmbed.stories.tsx +96 -93
- package/src/Embed/AudioEmbed.tsx +20 -20
- package/src/Embed/BrightcoveEmbed.stories.tsx +67 -67
- package/src/Embed/BrightcoveEmbed.tsx +28 -28
- package/src/Embed/ConceptEmbed.stories.tsx +119 -114
- package/src/Embed/ConceptEmbed.tsx +52 -44
- package/src/Embed/ConceptListEmbed.tsx +8 -8
- package/src/Embed/ContentLinkEmbed.tsx +7 -7
- package/src/Embed/EmbedErrorPlaceholder.tsx +9 -9
- package/src/Embed/ExternalEmbed.stories.tsx +21 -21
- package/src/Embed/ExternalEmbed.tsx +20 -17
- package/src/Embed/FootnoteEmbed.stories.tsx +35 -30
- package/src/Embed/FootnoteEmbed.tsx +6 -6
- package/src/Embed/H5pEmbed.stories.tsx +23 -23
- package/src/Embed/H5pEmbed.tsx +6 -6
- package/src/Embed/IframeEmbed.stories.tsx +50 -50
- package/src/Embed/IframeEmbed.tsx +18 -18
- package/src/Embed/ImageEmbed.stories.tsx +77 -77
- package/src/Embed/ImageEmbed.tsx +44 -44
- package/src/Embed/RelatedContentEmbed.stories.tsx +187 -187
- package/src/Embed/RelatedContentEmbed.tsx +14 -14
- package/src/Embed/UnknownEmbed.tsx +5 -5
- package/src/Embed/conceptComponents.tsx +38 -35
- package/src/Embed/index.ts +15 -15
- package/src/Embed/types.ts +9 -7
- package/src/ErrorMessage/ErrorMessage.stories.tsx +17 -17
- package/src/ErrorMessage/ErrorMessage.tsx +6 -6
- package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +10 -10
- package/src/ErrorMessage/index.ts +2 -2
- package/src/ExpandableBox/ExpandableBox.stories.tsx +5 -5
- package/src/ExpandableBox/ExpandableBox.tsx +1 -1
- package/src/ExpandableBox/index.ts +1 -1
- package/src/FactBox/FactBox.tsx +11 -11
- package/src/FactBox/Factbox.stories.tsx +8 -8
- package/src/FactBox/index.ts +1 -1
- package/src/Figure/Figure.tsx +17 -17
- package/src/Figure/FigureOpenDialogButton.tsx +8 -8
- package/src/Figure/index.ts +3 -3
- package/src/FileList/File.tsx +5 -5
- package/src/FileList/FileList.stories.tsx +9 -9
- package/src/FileList/FileList.tsx +7 -7
- package/src/FileList/Format.tsx +6 -6
- package/src/FileList/PdfFile.tsx +1 -1
- package/src/FileList/index.ts +4 -4
- package/src/Filter/FilterButtons.tsx +16 -16
- package/src/Filter/FilterCarousel.tsx +16 -16
- package/src/Filter/FilterList.tsx +17 -17
- package/src/Filter/FilterListPhone.tsx +36 -36
- package/src/Filter/ToggleItem.tsx +7 -7
- package/src/Filter/filterClasses.ts +3 -3
- package/src/Filter/index.ts +5 -5
- package/src/Footer/Footer.stories.tsx +37 -31
- package/src/Footer/Footer.tsx +11 -11
- package/src/Footer/FooterLinks.tsx +9 -9
- package/src/Footer/FooterPrivacy.tsx +2 -2
- package/src/Footer/FooterText.tsx +3 -3
- package/src/Footer/index.ts +3 -3
- package/src/FramedContent/FramedContent.stories.tsx +7 -7
- package/src/FramedContent/FramedContent.tsx +4 -4
- package/src/FramedContent/index.ts +1 -1
- package/src/Frontpage/FrontpageAllSubjects.tsx +20 -20
- package/src/FrontpageArticle/FrontpageArticle.tsx +17 -17
- package/src/FrontpageArticle/index.ts +1 -1
- package/src/Gloss/Gloss.stories.tsx +33 -33
- package/src/Gloss/Gloss.tsx +18 -18
- package/src/Gloss/GlossExample.tsx +7 -7
- package/src/Gloss/index.tsx +2 -2
- package/src/Grid/Grid.stories.tsx +16 -16
- package/src/Grid/Grid.tsx +15 -15
- package/src/Grid/index.ts +2 -2
- package/src/Hero/Hero.stories.tsx +9 -9
- package/src/Hero/Hero.tsx +28 -28
- package/src/Hero/HeroContent.tsx +4 -4
- package/src/Hero/index.ts +3 -3
- package/src/Image/Image.stories.tsx +10 -10
- package/src/Image/Image.tsx +12 -12
- package/src/Image/ImageLink.tsx +4 -4
- package/src/Image/__tests__/Image-test.jsx +9 -9
- package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +9 -9
- package/src/Image/index.ts +4 -4
- package/src/KeyFigure/KeyFigure.stories.tsx +11 -11
- package/src/KeyFigure/KeyFigure.tsx +6 -6
- package/src/KeyFigure/index.ts +1 -1
- package/src/LanguageSelector/LanguageSelector.stories.tsx +11 -11
- package/src/LanguageSelector/LanguageSelector.tsx +8 -8
- package/src/LanguageSelector/index.ts +1 -1
- package/src/Layout/Content.tsx +1 -1
- package/src/Layout/LayoutItem.tsx +4 -4
- package/src/Layout/OneColumn.tsx +8 -8
- package/src/Layout/PageContainer.tsx +5 -5
- package/src/Layout/index.ts +4 -4
- package/src/LearningPaths/LearningPathContent.tsx +3 -3
- package/src/LearningPaths/LearningPathInformation.tsx +6 -6
- package/src/LearningPaths/LearningPathLastStepNavigation.tsx +11 -11
- package/src/LearningPaths/LearningPathMenu.stories.tsx +18 -18
- package/src/LearningPaths/LearningPathMenu.tsx +14 -14
- package/src/LearningPaths/LearningPathMenuAside.tsx +10 -10
- package/src/LearningPaths/LearningPathMenuAsideCopyright.tsx +6 -6
- package/src/LearningPaths/LearningPathMenuContent.tsx +11 -11
- package/src/LearningPaths/LearningPathMenuIntro.tsx +7 -7
- package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +9 -9
- package/src/LearningPaths/LearningPathMobileHeader.tsx +5 -5
- package/src/LearningPaths/LearningPathMobileStepInfo.tsx +4 -4
- package/src/LearningPaths/LearningPathSticky.tsx +12 -12
- package/src/LearningPaths/LearningPathWrapper.tsx +4 -4
- package/src/LearningPaths/index.ts +8 -8
- package/src/LetterFilter/LetterFilter.stories.tsx +8 -8
- package/src/LetterFilter/LetterFilter.tsx +11 -9
- package/src/LetterFilter/alphabet.ts +29 -29
- package/src/LetterFilter/index.ts +1 -1
- package/src/LicenseByline/EmbedByline.stories.tsx +20 -20
- package/src/LicenseByline/EmbedByline.tsx +30 -30
- package/src/LicenseByline/LicenseDescription.tsx +3 -3
- package/src/LicenseByline/LicenseLink.tsx +5 -5
- package/src/LicenseByline/index.tsx +1 -1
- package/src/LinkBlock/LinkBlock.stories.tsx +10 -10
- package/src/LinkBlock/LinkBlock.tsx +14 -14
- package/src/LinkBlock/LinkBlockSection.tsx +3 -3
- package/src/LinkBlock/index.ts +2 -2
- package/src/List/OrderedList.stories.tsx +6 -6
- package/src/List/OrderedList.tsx +28 -28
- package/src/List/UnOrderedList.tsx +4 -4
- package/src/List/UnorderedList.stories.tsx +4 -4
- package/src/List/index.ts +2 -2
- package/src/Logo/Logo.stories.tsx +10 -10
- package/src/Logo/Logo.tsx +6 -6
- package/src/Logo/SvgLogo.tsx +4 -4
- package/src/Logo/index.ts +1 -1
- package/src/Masthead/Masthead.tsx +6 -6
- package/src/Masthead/SkipToMainContent.tsx +4 -4
- package/src/Masthead/index.ts +3 -3
- package/src/Masthead/utils.ts +5 -5
- package/src/MediaList/MediaList.tsx +25 -22
- package/src/MediaList/index.ts +2 -2
- package/src/Messages/MessageBanner.stories.tsx +7 -7
- package/src/Messages/MessageBanner.tsx +5 -5
- package/src/Messages/MessageBox.stories.tsx +17 -17
- package/src/Messages/MessageBox.tsx +11 -11
- package/src/Messages/index.ts +2 -2
- package/src/MyNdla/Resource/Folder.stories.tsx +17 -17
- package/src/MyNdla/Resource/Folder.tsx +20 -20
- package/src/MyNdla/Resource/FolderInput.stories.tsx +7 -7
- package/src/MyNdla/Resource/FolderInput.tsx +19 -19
- package/src/MyNdla/Resource/index.ts +2 -2
- package/src/MyNdla/index.ts +2 -2
- package/src/NDLAFilm/AllMoviesAlphabetically.tsx +16 -13
- package/src/NDLAFilm/FilmContentCard.tsx +20 -18
- package/src/NDLAFilm/FilmContentCardTags.tsx +4 -4
- package/src/NDLAFilm/FilmMovieList.tsx +8 -8
- package/src/NDLAFilm/FilmMovieSearch.tsx +22 -16
- package/src/NDLAFilm/FilmSlideshow.tsx +17 -15
- package/src/NDLAFilm/MovieGrid.tsx +8 -8
- package/src/NDLAFilm/VisualElement.tsx +5 -5
- package/src/NDLAFilm/__tests__/isLetter-test.jsx +8 -8
- package/src/NDLAFilm/filmStyles.ts +5 -5
- package/src/NDLAFilm/index.ts +5 -5
- package/src/Navigation/NavigationBox.tsx +28 -28
- package/src/Navigation/index.ts +1 -1
- package/src/NoContentBox/NoContentBox.tsx +1 -1
- package/src/NoContentBox/index.ts +1 -1
- package/src/Notion/Notion.tsx +9 -9
- package/src/Notion/NotionImage.tsx +9 -9
- package/src/Notion/index.ts +1 -1
- package/src/Programme/Programme.tsx +7 -7
- package/src/Programme/ProgrammeSubjects.tsx +12 -12
- package/src/Programme/index.ts +2 -2
- package/src/ProgrammeCard/ProgrammeCard.stories.tsx +13 -13
- package/src/ProgrammeCard/ProgrammeCard.tsx +5 -5
- package/src/ProgrammeCard/index.tsx +2 -2
- package/src/RelatedArticleList/RelatedArticleList.tsx +17 -17
- package/src/RelatedArticleList/index.ts +1 -1
- package/src/Resource/BlockResource.stories.tsx +19 -19
- package/src/Resource/BlockResource.tsx +15 -15
- package/src/Resource/ListResource.stories.tsx +18 -18
- package/src/Resource/ListResource.tsx +31 -31
- package/src/Resource/index.ts +3 -3
- package/src/Resource/resourceComponents.tsx +22 -19
- package/src/Resource/storyComponents.tsx +14 -11
- package/src/ResourceBox/ResourceBox.tsx +5 -5
- package/src/ResourceBox/index.ts +1 -1
- package/src/ResourceGroup/ResourceGroup.tsx +8 -8
- package/src/ResourceGroup/ResourceItem.stories.tsx +22 -22
- package/src/ResourceGroup/ResourceItem.tsx +35 -37
- package/src/ResourceGroup/ResourceList.tsx +11 -11
- package/src/ResourceGroup/index.ts +1 -1
- package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +17 -17
- package/src/ResourcesWrapper/ResourcesWrapper.tsx +3 -3
- package/src/ResourcesWrapper/index.ts +2 -2
- package/src/Search/ActiveFilterContent.tsx +8 -8
- package/src/Search/ActiveFilters.tsx +12 -12
- package/src/Search/ContentTypeResult.tsx +16 -16
- package/src/Search/ContentTypeResultStyles.tsx +5 -5
- package/src/Search/IsPathToHighlight.ts +1 -1
- package/src/Search/LoadingWrapper.tsx +4 -4
- package/src/Search/SearchField.tsx +19 -19
- package/src/Search/SearchFieldForm.tsx +4 -4
- package/src/Search/SearchResult.tsx +34 -34
- package/src/Search/SearchResultSleeve.tsx +32 -32
- package/src/Search/__tests__/Highlight-test.js +20 -20
- package/src/Search/index.ts +3 -3
- package/src/SearchTypeResult/ActiveFilterContent.tsx +7 -7
- package/src/SearchTypeResult/ActiveFilters.tsx +12 -12
- package/src/SearchTypeResult/PopupFilter.tsx +16 -16
- package/src/SearchTypeResult/ResultNavigation.tsx +11 -11
- package/src/SearchTypeResult/SearchFieldHeader.tsx +16 -16
- package/src/SearchTypeResult/SearchFilterContent.tsx +10 -10
- package/src/SearchTypeResult/SearchHeader.tsx +22 -22
- package/src/SearchTypeResult/SearchItem.tsx +17 -17
- package/src/SearchTypeResult/SearchItemList.tsx +14 -14
- package/src/SearchTypeResult/SearchItems.tsx +12 -12
- package/src/SearchTypeResult/SearchNotionsResult.tsx +7 -7
- package/src/SearchTypeResult/SearchSubjectItem.tsx +7 -7
- package/src/SearchTypeResult/SearchSubjectResult.tsx +3 -3
- package/src/SearchTypeResult/SearchTypeHeader.tsx +11 -11
- package/src/SearchTypeResult/SearchTypeResult.tsx +10 -10
- package/src/SearchTypeResult/SearchViewType.tsx +15 -15
- package/src/SearchTypeResult/components/ItemContexts.tsx +25 -17
- package/src/SearchTypeResult/components/ItemResourceHeader.tsx +13 -13
- package/src/SearchTypeResult/components/ItemTopicHeader.tsx +9 -9
- package/src/SearchTypeResult/components/SubjectFilters.tsx +12 -12
- package/src/SearchTypeResult/index.ts +7 -7
- package/src/SnackBar/DefaultSnackbar.tsx +7 -7
- package/src/SnackBar/Snack.stories.tsx +31 -15
- package/src/SnackBar/SnackbarProvider.tsx +10 -10
- package/src/SnackBar/index.ts +3 -3
- package/src/Subject/SubjectBanner.tsx +2 -2
- package/src/Subject/SubjectHeader.tsx +8 -8
- package/src/Subject/index.ts +2 -2
- package/src/Table/Table.stories.tsx +34 -34
- package/src/Table/Table.tsx +22 -22
- package/src/Table/index.ts +2 -2
- package/src/TagSelector/Control.tsx +4 -4
- package/src/TagSelector/DropdownIndicator.tsx +15 -9
- package/src/TagSelector/Input.tsx +5 -5
- package/src/TagSelector/Menu.tsx +5 -5
- package/src/TagSelector/MenuList.tsx +4 -4
- package/src/TagSelector/Option.tsx +11 -7
- package/src/TagSelector/SelectContainer.tsx +4 -4
- package/src/TagSelector/TagSelector.stories.tsx +27 -27
- package/src/TagSelector/TagSelector.tsx +27 -27
- package/src/TagSelector/ValueButton.tsx +7 -7
- package/src/TagSelector/ariaMessages.ts +50 -41
- package/src/TagSelector/index.ts +2 -2
- package/src/ToolboxPage/ToolboxInfo.tsx +6 -6
- package/src/ToolboxPage/index.ts +1 -1
- package/src/Topic/Loader.tsx +1 -1
- package/src/Topic/Topic.tsx +30 -30
- package/src/Topic/index.ts +1 -1
- package/src/TreeStructure/AddFolderButton.tsx +11 -11
- package/src/TreeStructure/ComboboxButton.tsx +18 -18
- package/src/TreeStructure/FolderItem.tsx +35 -35
- package/src/TreeStructure/FolderItems.tsx +19 -13
- package/src/TreeStructure/TreeStructure.stories.tsx +75 -75
- package/src/TreeStructure/TreeStructure.tsx +18 -18
- package/src/TreeStructure/arrowNavigation.ts +7 -7
- package/src/TreeStructure/helperFunctions.ts +2 -2
- package/src/TreeStructure/index.ts +2 -2
- package/src/TreeStructure/types.ts +3 -3
- package/src/i18n/__tests__/formatNestedMessages-test.ts +8 -8
- package/src/i18n/formatNestedMessages.ts +2 -2
- package/src/i18n/i18n.ts +14 -14
- package/src/i18n/index.ts +2 -2
- package/src/index.ts +86 -86
- package/src/locale/LocaleProvider.tsx +4 -4
- package/src/locale/__tests__/translations-test.ts +13 -13
- package/src/locale/messages-en.ts +891 -888
- package/src/locale/messages-nb.ts +892 -892
- package/src/locale/messages-nn.ts +892 -892
- package/src/locale/messages-se.ts +897 -893
- package/src/locale/messages-sma.ts +895 -893
- package/src/model/ContentType.ts +28 -28
- package/src/model/SubjectCategories.ts +4 -4
- package/src/model/SubjectTypes.ts +3 -3
- package/src/model/WordClass.ts +35 -35
- package/src/model/index.ts +4 -4
- package/src/types.ts +3 -3
- package/src/utils/__tests__/relativeUrl-test.tsx +48 -42
- package/src/utils/relativeUrl.ts +8 -6
- package/src/utils/resourceTypeColor.tsx +4 -4
package/src/Table/Table.tsx
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import throttle from
|
|
10
|
-
import { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from
|
|
11
|
-
import { css } from
|
|
12
|
-
import styled from
|
|
13
|
-
import { breakpoints, colors, fonts, mq, spacing } from
|
|
9
|
+
import throttle from "lodash/throttle";
|
|
10
|
+
import { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { css } from "@emotion/react";
|
|
12
|
+
import styled from "@emotion/styled";
|
|
13
|
+
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
14
14
|
|
|
15
|
-
type ScrollPosition =
|
|
15
|
+
type ScrollPosition = "start" | "end" | "center";
|
|
16
16
|
|
|
17
17
|
const MARGIN = 5;
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ const ScrollBorder = styled.div`
|
|
|
33
33
|
background: ${colors.background.dark};
|
|
34
34
|
display: none;
|
|
35
35
|
|
|
36
|
-
&[data-block=
|
|
36
|
+
&[data-block="true"] {
|
|
37
37
|
display: block;
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
@@ -76,7 +76,7 @@ export const TableStyling = css`
|
|
|
76
76
|
// scrolling shadows on left/right
|
|
77
77
|
&:after,
|
|
78
78
|
&:before {
|
|
79
|
-
content:
|
|
79
|
+
content: "";
|
|
80
80
|
display: table;
|
|
81
81
|
clear: both;
|
|
82
82
|
}
|
|
@@ -85,7 +85,7 @@ export const TableStyling = css`
|
|
|
85
85
|
background-color: transparent;
|
|
86
86
|
font-weight: ${fonts.weight.bold};
|
|
87
87
|
font-family: ${fonts.sans};
|
|
88
|
-
${fonts.sizes(
|
|
88
|
+
${fonts.sizes("16px", "20px")}
|
|
89
89
|
text-align: left;
|
|
90
90
|
text-transform: uppercase;
|
|
91
91
|
margin-bottom: ${spacing.small};
|
|
@@ -102,9 +102,9 @@ export const TableStyling = css`
|
|
|
102
102
|
font-family: ${fonts.sans};
|
|
103
103
|
vertical-align: text-top;
|
|
104
104
|
|
|
105
|
-
${fonts.sizes(
|
|
105
|
+
${fonts.sizes("16px", "22px")};
|
|
106
106
|
${mq.range({ from: breakpoints.tablet })} {
|
|
107
|
-
${fonts.sizes(
|
|
107
|
+
${fonts.sizes("16px", "30px")};
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -118,9 +118,9 @@ export const TableStyling = css`
|
|
|
118
118
|
border: 1px solid ${colors.brand.lighter};
|
|
119
119
|
text-transform: none;
|
|
120
120
|
|
|
121
|
-
${fonts.sizes(
|
|
121
|
+
${fonts.sizes("14px", "18px")};
|
|
122
122
|
${mq.range({ from: breakpoints.tablet })} {
|
|
123
|
-
${fonts.sizes(
|
|
123
|
+
${fonts.sizes("15px", "26px")};
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
font-weight: ${fonts.weight.semibold};
|
|
@@ -137,18 +137,18 @@ export const TableStyling = css`
|
|
|
137
137
|
border: 1px solid ${colors.brand.lighter};
|
|
138
138
|
vertical-align: top;
|
|
139
139
|
|
|
140
|
-
${fonts.sizes(
|
|
140
|
+
${fonts.sizes("14px", "22px")};
|
|
141
141
|
${mq.range({ from: breakpoints.tablet })} {
|
|
142
|
-
${fonts.sizes(
|
|
142
|
+
${fonts.sizes("15px", "30px")};
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
ol,
|
|
146
146
|
ul {
|
|
147
147
|
li,
|
|
148
148
|
li p {
|
|
149
|
-
${fonts.sizes(
|
|
149
|
+
${fonts.sizes("14px", "22px")};
|
|
150
150
|
${mq.range({ from: breakpoints.tablet })} {
|
|
151
|
-
${fonts.sizes(
|
|
151
|
+
${fonts.sizes("15px", "30px")};
|
|
152
152
|
}
|
|
153
153
|
margin: ${spacing.xsmall} 0 !important;
|
|
154
154
|
}
|
|
@@ -226,11 +226,11 @@ const Table = ({ children, id, ...rest }: Props) => {
|
|
|
226
226
|
const isEnd = offsetWidth + scrollLeft >= scrollWidth - MARGIN;
|
|
227
227
|
|
|
228
228
|
if (isStart) {
|
|
229
|
-
setScrollPosition(
|
|
229
|
+
setScrollPosition("start");
|
|
230
230
|
} else if (isEnd) {
|
|
231
|
-
setScrollPosition(
|
|
231
|
+
setScrollPosition("end");
|
|
232
232
|
} else {
|
|
233
|
-
setScrollPosition(
|
|
233
|
+
setScrollPosition("center");
|
|
234
234
|
}
|
|
235
235
|
}, []);
|
|
236
236
|
|
|
@@ -255,11 +255,11 @@ const Table = ({ children, id, ...rest }: Props) => {
|
|
|
255
255
|
return (
|
|
256
256
|
<TableWrapper>
|
|
257
257
|
<OverflowWrapper>
|
|
258
|
-
<LeftScrollBorder data-block={scrollPosition ===
|
|
258
|
+
<LeftScrollBorder data-block={scrollPosition === "end" || scrollPosition === "center"} />
|
|
259
259
|
<table ref={tableRef} id={id} onScroll={onScroll} css={TableStyling} {...rest}>
|
|
260
260
|
{children}
|
|
261
261
|
</table>
|
|
262
|
-
<RightScrollBorder data-block={scrollPosition ===
|
|
262
|
+
<RightScrollBorder data-block={scrollPosition === "start" || scrollPosition === "center"} />
|
|
263
263
|
</OverflowWrapper>
|
|
264
264
|
</TableWrapper>
|
|
265
265
|
);
|
package/src/Table/index.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { ControlProps } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { spacing, utils } from
|
|
12
|
-
import { TagType } from
|
|
9
|
+
import { ControlProps } from "react-select";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { spacing, utils } from "@ndla/core";
|
|
12
|
+
import { TagType } from "./types";
|
|
13
13
|
|
|
14
14
|
const StyledTagSelectorControl = styled.div`
|
|
15
15
|
display: flex;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useMemo } from
|
|
10
|
-
import { useTranslation } from
|
|
11
|
-
import { DropdownIndicatorProps, components } from
|
|
12
|
-
import styled from
|
|
13
|
-
import { iconButtonStyle } from
|
|
14
|
-
import { ChevronDown, ChevronUp } from
|
|
15
|
-
import { TagType } from
|
|
9
|
+
import { useMemo } from "react";
|
|
10
|
+
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { DropdownIndicatorProps, components } from "react-select";
|
|
12
|
+
import styled from "@emotion/styled";
|
|
13
|
+
import { iconButtonStyle } from "@ndla/button";
|
|
14
|
+
import { ChevronDown, ChevronUp } from "@ndla/icons/common";
|
|
15
|
+
import { TagType } from "./types";
|
|
16
16
|
|
|
17
17
|
const StyledIconWrapper = styled.span`
|
|
18
18
|
svg {
|
|
@@ -27,7 +27,13 @@ const DropdownIndicator = ({ selectProps, children, ...props }: DropdownIndicato
|
|
|
27
27
|
const Icon = menuIsOpen ? ChevronUp : ChevronDown;
|
|
28
28
|
|
|
29
29
|
const css = useMemo(
|
|
30
|
-
() =>
|
|
30
|
+
() =>
|
|
31
|
+
iconButtonStyle({
|
|
32
|
+
colorTheme: "greyLighter",
|
|
33
|
+
variant: "ghost",
|
|
34
|
+
shape: "pill",
|
|
35
|
+
size: "small",
|
|
36
|
+
}),
|
|
31
37
|
[],
|
|
32
38
|
);
|
|
33
39
|
|
|
@@ -36,7 +42,7 @@ const DropdownIndicator = ({ selectProps, children, ...props }: DropdownIndicato
|
|
|
36
42
|
css={css}
|
|
37
43
|
{...props}
|
|
38
44
|
selectProps={selectProps}
|
|
39
|
-
aria-label={menuIsOpen ? t(
|
|
45
|
+
aria-label={menuIsOpen ? t("tagSelector.hideTags") : t("tagSelector.showTags")}
|
|
40
46
|
>
|
|
41
47
|
<StyledIconWrapper aria-hidden>
|
|
42
48
|
<Icon />
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { components, InputProps } from
|
|
10
|
-
import { css } from
|
|
11
|
-
import { colors, spacing } from
|
|
12
|
-
import { TagType } from
|
|
13
|
-
import { StyledValueButton } from
|
|
9
|
+
import { components, InputProps } from "react-select";
|
|
10
|
+
import { css } from "@emotion/react";
|
|
11
|
+
import { colors, spacing } from "@ndla/core";
|
|
12
|
+
import { TagType } from "./types";
|
|
13
|
+
import { StyledValueButton } from "./ValueButton";
|
|
14
14
|
|
|
15
15
|
const inputStyle = css`
|
|
16
16
|
&& {
|
package/src/TagSelector/Menu.tsx
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { MenuProps, components } from
|
|
10
|
-
import { css } from
|
|
11
|
-
import { colors } from
|
|
12
|
-
import { StyledMenuList } from
|
|
13
|
-
import { TagType } from
|
|
9
|
+
import { MenuProps, components } from "react-select";
|
|
10
|
+
import { css } from "@emotion/react";
|
|
11
|
+
import { colors } from "@ndla/core";
|
|
12
|
+
import { StyledMenuList } from "./MenuList";
|
|
13
|
+
import { TagType } from "./types";
|
|
14
14
|
|
|
15
15
|
const menuStyle = css`
|
|
16
16
|
display: flex;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { MenuListProps } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { utils } from
|
|
12
|
-
import { TagType } from
|
|
9
|
+
import { MenuListProps } from "react-select";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { utils } from "@ndla/core";
|
|
12
|
+
import { TagType } from "./types";
|
|
13
13
|
|
|
14
14
|
export const StyledMenuList = styled.div`
|
|
15
15
|
overflow: auto;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { OptionProps } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { buttonStyleV2 as buttonStyle } from
|
|
12
|
-
import { colors, fonts } from
|
|
13
|
-
import { Done } from
|
|
14
|
-
import { TagType } from
|
|
9
|
+
import { OptionProps } from "react-select";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { buttonStyleV2 as buttonStyle } from "@ndla/button";
|
|
12
|
+
import { colors, fonts } from "@ndla/core";
|
|
13
|
+
import { Done } from "@ndla/icons/editor";
|
|
14
|
+
import { TagType } from "./types";
|
|
15
15
|
|
|
16
16
|
interface StyledProps {
|
|
17
17
|
selected: boolean;
|
|
@@ -40,7 +40,11 @@ const Option = ({ innerProps, innerRef, children, isSelected, isFocused }: Optio
|
|
|
40
40
|
<StyledMenuOption
|
|
41
41
|
focused={isFocused}
|
|
42
42
|
selected={isSelected}
|
|
43
|
-
css={buttonStyle({
|
|
43
|
+
css={buttonStyle({
|
|
44
|
+
colorTheme: "lighter",
|
|
45
|
+
variant: "ghost",
|
|
46
|
+
shape: "sharp",
|
|
47
|
+
})}
|
|
44
48
|
ref={innerRef}
|
|
45
49
|
{...innerProps}
|
|
46
50
|
>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { ContainerProps } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { colors, fonts, misc } from
|
|
12
|
-
import { TagType } from
|
|
9
|
+
import { ContainerProps } from "react-select";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { colors, fonts, misc } from "@ndla/core";
|
|
12
|
+
import { TagType } from "./types";
|
|
13
13
|
|
|
14
14
|
const StyledContainer = styled.div`
|
|
15
15
|
display: grid;
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useState } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { Meta, StoryFn } from
|
|
12
|
-
import TagSelector from
|
|
13
|
-
import { defaultParameters } from
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
12
|
+
import TagSelector from "./TagSelector";
|
|
13
|
+
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Komponent for å tagge noe, primært tiltenkt Min NDLA
|
|
17
17
|
*/
|
|
18
18
|
export default {
|
|
19
|
-
title:
|
|
19
|
+
title: "Patterns/TagSelector",
|
|
20
20
|
component: TagSelector,
|
|
21
|
-
tags: [
|
|
21
|
+
tags: ["autodocs"],
|
|
22
22
|
parameters: {
|
|
23
23
|
inlineStories: true,
|
|
24
24
|
...defaultParameters,
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
selected: { control: false },
|
|
31
31
|
},
|
|
32
32
|
args: {
|
|
33
|
-
label:
|
|
33
|
+
label: "Select tags",
|
|
34
34
|
labelHidden: false,
|
|
35
35
|
},
|
|
36
36
|
} as Meta<typeof TagSelector>;
|
|
@@ -45,24 +45,24 @@ const Container = styled.div`
|
|
|
45
45
|
|
|
46
46
|
export const TagSelectorStory: StoryFn<typeof TagSelector> = (args) => {
|
|
47
47
|
const dummyData = [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
"Cat",
|
|
49
|
+
"Dog",
|
|
50
|
+
"Fish",
|
|
51
|
+
"Dinosaur",
|
|
52
|
+
"Frog",
|
|
53
|
+
"Dragon",
|
|
54
|
+
"Lion",
|
|
55
|
+
"Snake",
|
|
56
|
+
"Alligator",
|
|
57
|
+
"Antelope",
|
|
58
|
+
"Bear",
|
|
59
|
+
"Baboon",
|
|
60
|
+
"Kangaroo",
|
|
61
|
+
"Scorpion",
|
|
62
|
+
"Goose",
|
|
63
|
+
"Fox",
|
|
64
|
+
"Donkey",
|
|
65
|
+
"Chicken",
|
|
66
66
|
];
|
|
67
67
|
const [exampleTags, setExampleTags] = useState<string[]>(dummyData);
|
|
68
68
|
const [exampleTagsSelected, setExampleTagsSelected] = useState<string[]>(dummyData.slice(0, 0));
|
|
@@ -85,4 +85,4 @@ export const TagSelectorStory: StoryFn<typeof TagSelector> = (args) => {
|
|
|
85
85
|
);
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
TagSelectorStory.storyName =
|
|
88
|
+
TagSelectorStory.storyName = "TagSelect";
|
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { KeyboardEvent, useMemo, useState } from
|
|
10
|
-
import { useTranslation } from
|
|
11
|
-
import { MultiValue, StylesConfig } from
|
|
12
|
-
import CreatableSelect from
|
|
13
|
-
import styled from
|
|
14
|
-
import { colors, fonts, spacing, utils } from
|
|
15
|
-
import { createAriaMessages } from
|
|
16
|
-
import Control from
|
|
17
|
-
import DropdownIndicator from
|
|
18
|
-
import Input from
|
|
19
|
-
import Menu from
|
|
20
|
-
import MenuList from
|
|
21
|
-
import Option from
|
|
22
|
-
import SelectContainer from
|
|
23
|
-
import { TagType } from
|
|
24
|
-
import ValueButton from
|
|
9
|
+
import { KeyboardEvent, useMemo, useState } from "react";
|
|
10
|
+
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { MultiValue, StylesConfig } from "react-select";
|
|
12
|
+
import CreatableSelect from "react-select/creatable";
|
|
13
|
+
import styled from "@emotion/styled";
|
|
14
|
+
import { colors, fonts, spacing, utils } from "@ndla/core";
|
|
15
|
+
import { createAriaMessages } from "./ariaMessages";
|
|
16
|
+
import Control from "./Control";
|
|
17
|
+
import DropdownIndicator from "./DropdownIndicator";
|
|
18
|
+
import Input from "./Input";
|
|
19
|
+
import Menu from "./Menu";
|
|
20
|
+
import MenuList from "./MenuList";
|
|
21
|
+
import Option from "./Option";
|
|
22
|
+
import SelectContainer from "./SelectContainer";
|
|
23
|
+
import { TagType } from "./types";
|
|
24
|
+
import ValueButton from "./ValueButton";
|
|
25
25
|
|
|
26
26
|
const styles: StylesConfig<TagType, true> = {
|
|
27
27
|
menu: () => ({}),
|
|
@@ -34,11 +34,11 @@ const styles: StylesConfig<TagType, true> = {
|
|
|
34
34
|
}),
|
|
35
35
|
valueContainer: (provided) => ({ ...provided, padding: 0 }),
|
|
36
36
|
indicatorSeparator: () => ({
|
|
37
|
-
display:
|
|
37
|
+
display: "none",
|
|
38
38
|
}),
|
|
39
39
|
indicatorsContainer: (provided) => ({
|
|
40
40
|
...provided,
|
|
41
|
-
alignSelf:
|
|
41
|
+
alignSelf: "flex-end",
|
|
42
42
|
}),
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -78,17 +78,17 @@ const TagSelector = ({
|
|
|
78
78
|
labelHidden,
|
|
79
79
|
}: Props) => {
|
|
80
80
|
const { t } = useTranslation();
|
|
81
|
-
const [input, setInput] = useState(
|
|
81
|
+
const [input, setInput] = useState("");
|
|
82
82
|
const tags = useMemo(() => _tags.map((tag) => ({ value: tag, label: tag })), [_tags]);
|
|
83
83
|
const selected = useMemo(() => _selected.map((tag) => ({ value: tag, label: tag })), [_selected]);
|
|
84
84
|
|
|
85
85
|
const handleSpaceClick = (e: KeyboardEvent<HTMLDivElement>) => {
|
|
86
|
-
if (e.key ===
|
|
86
|
+
if (e.key === " ") {
|
|
87
87
|
e.preventDefault();
|
|
88
|
-
if (!_selected.find((tag) => tag === input) && input !==
|
|
88
|
+
if (!_selected.find((tag) => tag === input) && input !== "") {
|
|
89
89
|
onChange(_selected.concat(input));
|
|
90
90
|
}
|
|
91
|
-
setInput(
|
|
91
|
+
setInput("");
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ const TagSelector = ({
|
|
|
96
96
|
onChange(tags.map((tag) => tag.value));
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
const createLabel = (tag: string) => t(
|
|
99
|
+
const createLabel = (tag: string) => t("tagSelector.createLabel", { tag });
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
102
|
<StyledTagSelector className={className}>
|
|
@@ -107,7 +107,7 @@ const TagSelector = ({
|
|
|
107
107
|
)}
|
|
108
108
|
<CreatableSelect
|
|
109
109
|
id="tagselector-creatable"
|
|
110
|
-
aria-labelledby={label ?
|
|
110
|
+
aria-labelledby={label ? "tagselector-label" : undefined}
|
|
111
111
|
ariaLiveMessages={createAriaMessages(t)}
|
|
112
112
|
components={{
|
|
113
113
|
DropdownIndicator,
|
|
@@ -123,14 +123,14 @@ const TagSelector = ({
|
|
|
123
123
|
inputValue={input}
|
|
124
124
|
isClearable={false}
|
|
125
125
|
isMulti
|
|
126
|
-
noOptionsMessage={() => t(
|
|
126
|
+
noOptionsMessage={() => t("tagSelector.noOptions")}
|
|
127
127
|
onChange={handleChange}
|
|
128
128
|
onCreateOption={onCreateTag}
|
|
129
129
|
onInputChange={setInput}
|
|
130
130
|
onKeyDown={handleSpaceClick}
|
|
131
131
|
options={tags}
|
|
132
|
-
placeholder={t(
|
|
133
|
-
screenReaderStatus={({ count }) => t(
|
|
132
|
+
placeholder={t("tagSelector.placeholder")}
|
|
133
|
+
screenReaderStatus={({ count }) => t("tagSelector.aria.screenReaderStatus", { count })}
|
|
134
134
|
styles={styles}
|
|
135
135
|
tabSelectsValue={false}
|
|
136
136
|
value={selected}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { MultiValueProps } from
|
|
10
|
-
import styled from
|
|
11
|
-
import { buttonStyleV2 as buttonStyle } from
|
|
12
|
-
import { colors, spacing } from
|
|
13
|
-
import { Cross } from
|
|
14
|
-
import { TagType } from
|
|
9
|
+
import { MultiValueProps } from "react-select";
|
|
10
|
+
import styled from "@emotion/styled";
|
|
11
|
+
import { buttonStyleV2 as buttonStyle } from "@ndla/button";
|
|
12
|
+
import { colors, spacing } from "@ndla/core";
|
|
13
|
+
import { Cross } from "@ndla/icons/action";
|
|
14
|
+
import { TagType } from "./types";
|
|
15
15
|
|
|
16
16
|
interface StyledProps {
|
|
17
17
|
selected: boolean;
|
|
@@ -32,7 +32,7 @@ const ValueButton = ({ innerProps, children, removeProps, isFocused }: MultiValu
|
|
|
32
32
|
<StyledValueButton
|
|
33
33
|
selected={isFocused}
|
|
34
34
|
role="button"
|
|
35
|
-
css={buttonStyle({ colorTheme:
|
|
35
|
+
css={buttonStyle({ colorTheme: "lighter", shape: "pill", size: "small" })}
|
|
36
36
|
{...innerProps}
|
|
37
37
|
{...removeProps}
|
|
38
38
|
>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { TFunction } from
|
|
9
|
+
import { TFunction } from "i18next";
|
|
10
10
|
import {
|
|
11
11
|
AriaGuidanceProps,
|
|
12
12
|
AriaOnChangeProps,
|
|
@@ -14,74 +14,83 @@ import {
|
|
|
14
14
|
AriaOnFocusProps,
|
|
15
15
|
GroupBase,
|
|
16
16
|
OptionsOrGroups,
|
|
17
|
-
} from
|
|
18
|
-
import { TagType } from
|
|
17
|
+
} from "react-select";
|
|
18
|
+
import { TagType } from "./types";
|
|
19
19
|
|
|
20
20
|
export const createAriaMessages = (t: TFunction) => ({
|
|
21
21
|
guidance: (props: AriaGuidanceProps) => {
|
|
22
22
|
const { isSearchable, isMulti, isDisabled, tabSelectsValue, context } = props;
|
|
23
23
|
switch (context) {
|
|
24
|
-
case
|
|
25
|
-
return `${t(
|
|
26
|
-
isDisabled ?
|
|
27
|
-
}, ${t(
|
|
28
|
-
tabSelectsValue ? `, ${t(
|
|
24
|
+
case "menu":
|
|
25
|
+
return `${t("tagSelector.aria.guidance.menu.updown")}${
|
|
26
|
+
isDisabled ? "" : `, ${t("tagSelector.aria.guidance.menu.enter")}`
|
|
27
|
+
}, ${t("tagSelector.aria.guidance.menu.escape")}${
|
|
28
|
+
tabSelectsValue ? `, ${t("tagSelector.aria.guidance.menu.tab")}` : ""
|
|
29
29
|
}.`;
|
|
30
|
-
case
|
|
31
|
-
return `${props[
|
|
32
|
-
|
|
33
|
-
)} ${isSearchable ? `, ${t(
|
|
34
|
-
|
|
35
|
-
)}, ${isMulti ? ` ${t(
|
|
36
|
-
|
|
30
|
+
case "input":
|
|
31
|
+
return `${props["aria-label"] || t("tagSelector.aria.guidance.input.select")} ${t(
|
|
32
|
+
"tagSelector.aria.guidance.input.focused",
|
|
33
|
+
)} ${isSearchable ? `, ${t("tagSelector.aria.guidance.input.refine")}` : ""}, ${t(
|
|
34
|
+
"tagSelector.aria.guidance.input.down",
|
|
35
|
+
)}, ${isMulti ? ` ${t("tagSelector.aria.guidance.input.left")}` : ""}, ${t(
|
|
36
|
+
"tagSelector.aria.guidance.input.space",
|
|
37
37
|
)}`;
|
|
38
|
-
case
|
|
39
|
-
return t(
|
|
38
|
+
case "value":
|
|
39
|
+
return t("tagSelector.aria.guidance.value");
|
|
40
40
|
default:
|
|
41
|
-
return
|
|
41
|
+
return "";
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
onChange: (props: AriaOnChangeProps<TagType, true>) => {
|
|
46
|
-
const { action, label =
|
|
46
|
+
const { action, label = "", labels, isDisabled } = props;
|
|
47
47
|
switch (action) {
|
|
48
|
-
case
|
|
49
|
-
case
|
|
50
|
-
case
|
|
51
|
-
return t(
|
|
52
|
-
case
|
|
53
|
-
return t(
|
|
54
|
-
case
|
|
55
|
-
return t(
|
|
56
|
-
|
|
48
|
+
case "deselect-option":
|
|
49
|
+
case "pop-value":
|
|
50
|
+
case "remove-value":
|
|
51
|
+
return t("tagSelector.aria.onChange.deselect", { label });
|
|
52
|
+
case "clear":
|
|
53
|
+
return t("tagSelector.aria.onChange.clear");
|
|
54
|
+
case "initial-input-focus":
|
|
55
|
+
return t("tagSelector.aria.onChange.initialFocus", {
|
|
56
|
+
labels: labels.join(","),
|
|
57
|
+
});
|
|
58
|
+
case "select-option":
|
|
57
59
|
return isDisabled
|
|
58
|
-
? t(
|
|
59
|
-
: t(
|
|
60
|
+
? t("tagSelector.aria.onChange.selectedDisabled", { label })
|
|
61
|
+
: t("tagSelector.aria.onChange.selected", { label });
|
|
60
62
|
default:
|
|
61
|
-
return
|
|
63
|
+
return "";
|
|
62
64
|
}
|
|
63
65
|
},
|
|
64
66
|
|
|
65
67
|
onFocus: (props: AriaOnFocusProps<TagType, GroupBase<TagType>>) => {
|
|
66
|
-
const { context, focused, options, label =
|
|
68
|
+
const { context, focused, options, label = "", selectValue, isDisabled, isSelected } = props;
|
|
67
69
|
|
|
68
70
|
const getArrayIndex = (arr: OptionsOrGroups<TagType, GroupBase<TagType>>, item: TagType) =>
|
|
69
|
-
arr && arr.length ? `${arr.indexOf(item) + 1} ${t(
|
|
71
|
+
arr && arr.length ? `${arr.indexOf(item) + 1} ${t("tagSelector.aria.onFocus.of")} ${arr.length}` : "";
|
|
70
72
|
|
|
71
|
-
if (context ===
|
|
72
|
-
return t(
|
|
73
|
+
if (context === "value" && selectValue) {
|
|
74
|
+
return t("tagSelector.aria.onFocus.value", {
|
|
75
|
+
label,
|
|
76
|
+
position: getArrayIndex(selectValue, focused),
|
|
77
|
+
});
|
|
73
78
|
}
|
|
74
79
|
|
|
75
|
-
if (context ===
|
|
76
|
-
const disabled = isDisabled ? ` ${t(
|
|
77
|
-
const status = `${isSelected ? t(
|
|
78
|
-
return t(
|
|
80
|
+
if (context === "menu") {
|
|
81
|
+
const disabled = isDisabled ? ` ${t("tagSelector.aria.disabled")}` : "";
|
|
82
|
+
const status = `${isSelected ? t("tagSelector.aria.selected") : t("tagSelector.aria.focused")}${disabled}`;
|
|
83
|
+
return t("tagSelector.aria.onFocus.menu", {
|
|
84
|
+
label,
|
|
85
|
+
status,
|
|
86
|
+
position: getArrayIndex(options, focused),
|
|
87
|
+
});
|
|
79
88
|
}
|
|
80
|
-
return
|
|
89
|
+
return "";
|
|
81
90
|
},
|
|
82
91
|
|
|
83
92
|
onFilter: (props: AriaOnFilterProps) => {
|
|
84
93
|
const { inputValue, resultsMessage } = props;
|
|
85
|
-
return `${resultsMessage}${inputValue ? ` ${t(
|
|
94
|
+
return `${resultsMessage}${inputValue ? ` ${t("tagSelector.aria.onFilter")} ` + inputValue : ""}.`;
|
|
86
95
|
},
|
|
87
96
|
});
|