@ndla/ui 56.0.74-alpha.0 → 56.0.76-alpha.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/dist/panda.buildinfo.json +4 -21
- package/dist/styles.css +12 -76
- package/es/Article/Article.js +2 -2
- package/es/Article/ArticleByline.js +1 -1
- package/es/AudioPlayer/AudioPlayer.js +1 -0
- package/es/AudioPlayer/Controls.js +1 -3
- package/es/AudioPlayer/SpeechControl.js +1 -1
- package/es/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/Breadcrumb/HomeBreadcrumb.js +1 -1
- package/es/CampaignBlock/CampaignBlock.js +1 -1
- package/es/ContentTypeBadge/ContentTypeBadge.js +35 -213
- package/es/ContentTypeHero/ContentTypeHero.js +2 -1
- package/es/CopyParagraphButton/CopyParagraphButton.js +1 -1
- package/es/Embed/CodeEmbed.js +1 -2
- package/es/Embed/EmbedErrorPlaceholder.js +2 -2
- package/es/Embed/ImageEmbed.js +1 -1
- package/es/Embed/UuDisclaimerEmbed.js +1 -1
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +1 -1
- package/es/FactBox/FactBox.js +1 -1
- package/es/FileList/File.js +1 -1
- package/es/Gloss/Gloss.js +1 -1
- package/es/LicenseByline/EmbedByline.js +1 -1
- package/es/LinkBlock/LinkBlock.js +1 -2
- package/es/RelatedArticleList/RelatedArticleList.js +2 -2
- package/es/ResourceBox/ResourceBox.js +1 -1
- package/es/TagSelector/TagSelector.js +1 -1
- package/es/index.js +1 -3
- package/es/locale/messages-en.js +2 -1
- package/es/locale/messages-nb.js +2 -1
- package/es/locale/messages-nn.js +2 -1
- package/es/locale/messages-se.js +2 -1
- package/es/locale/messages-sma.js +2 -1
- package/es/model/ContentType.js +2 -0
- package/lib/Article/Article.d.ts +3 -3
- package/lib/Article/Article.js +1 -1
- package/lib/Article/ArticleByline.d.ts +3 -3
- package/lib/Article/ArticleByline.js +2 -2
- package/lib/Article/ArticleFootNotes.d.ts +1 -1
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/lib/AudioPlayer/AudioPlayer.js +1 -0
- package/lib/AudioPlayer/Controls.js +6 -8
- package/lib/AudioPlayer/SpeechControl.js +2 -2
- package/lib/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/lib/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.js +2 -2
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.js +4 -4
- package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
- package/lib/CampaignBlock/CampaignBlock.js +2 -2
- package/lib/CodeBlock/CodeBlock.d.ts +1 -1
- package/lib/Concept/Concept.d.ts +3 -3
- package/lib/ContactBlock/ContactBlock.d.ts +1 -1
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +9 -19
- package/lib/ContentTypeBadge/ContentTypeBadge.js +36 -223
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.d.ts +2 -2
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.d.ts +2 -2
- package/lib/ContentTypeHero/ContentTypeHero.d.ts +2 -2
- package/lib/ContentTypeHero/ContentTypeHero.js +2 -1
- package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -1
- package/lib/CopyParagraphButton/CopyParagraphButton.js +2 -2
- package/lib/Embed/AudioEmbed.d.ts +2 -2
- package/lib/Embed/BrightcoveEmbed.d.ts +2 -2
- package/lib/Embed/CodeEmbed.d.ts +1 -1
- package/lib/Embed/CodeEmbed.js +2 -3
- package/lib/Embed/ConceptEmbed.d.ts +3 -3
- package/lib/Embed/ContentLinkEmbed.d.ts +2 -2
- package/lib/Embed/CopyrightEmbed.d.ts +2 -2
- package/lib/Embed/EmbedErrorPlaceholder.d.ts +2 -2
- package/lib/Embed/EmbedErrorPlaceholder.js +2 -2
- package/lib/Embed/EmbedWrapper.d.ts +1 -1
- package/lib/Embed/ExternalEmbed.d.ts +1 -1
- package/lib/Embed/FootnoteEmbed.d.ts +1 -1
- package/lib/Embed/GlossEmbed.d.ts +1 -1
- package/lib/Embed/H5pEmbed.d.ts +1 -1
- package/lib/Embed/IframeEmbed.d.ts +1 -1
- package/lib/Embed/ImageEmbed.d.ts +3 -3
- package/lib/Embed/ImageEmbed.js +2 -2
- package/lib/Embed/RelatedContentEmbed.d.ts +1 -1
- package/lib/Embed/UnknownEmbed.d.ts +1 -1
- package/lib/Embed/UuDisclaimerEmbed.d.ts +2 -2
- package/lib/Embed/UuDisclaimerEmbed.js +2 -2
- package/lib/Embed/types.d.ts +3 -3
- package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
- package/lib/FactBox/FactBox.d.ts +1 -1
- package/lib/FactBox/FactBox.js +2 -2
- package/lib/FileList/File.d.ts +1 -1
- package/lib/FileList/File.js +2 -2
- package/lib/FileList/FileList.d.ts +1 -1
- package/lib/Gloss/Gloss.d.ts +1 -1
- package/lib/Gloss/Gloss.js +2 -2
- package/lib/Gloss/GlossExample.d.ts +1 -1
- package/lib/Grid/Grid.d.ts +1 -1
- package/lib/Grid/GridParallaxItem.d.ts +1 -1
- package/lib/LicenseByline/EmbedByline.d.ts +6 -6
- package/lib/LicenseByline/EmbedByline.js +2 -2
- package/lib/LicenseByline/LicenseLink.d.ts +2 -2
- package/lib/LinkBlock/LinkBlock.d.ts +1 -1
- package/lib/LinkBlock/LinkBlock.js +3 -4
- package/lib/LinkBlock/LinkBlockSection.d.ts +1 -1
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
- package/lib/RelatedArticleList/RelatedArticleList.js +4 -4
- package/lib/ResourceBox/ResourceBox.js +2 -2
- package/lib/TagSelector/TagSelector.d.ts +1 -1
- package/lib/TagSelector/TagSelector.js +2 -2
- package/lib/ZendeskButton/ZendeskButton.d.ts +1 -1
- package/lib/i18n/useComponentTranslations.d.ts +1 -1
- package/lib/index.d.ts +2 -4
- package/lib/index.js +5 -61
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +2 -1
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +2 -1
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +2 -1
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +2 -1
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +2 -1
- package/lib/model/ContentType.d.ts +1 -0
- package/lib/model/ContentType.js +3 -1
- package/lib/types.d.ts +1 -1
- package/package.json +12 -12
- package/src/Article/Article.tsx +6 -6
- package/src/Article/ArticleByline.stories.tsx +1 -1
- package/src/Article/ArticleByline.tsx +5 -5
- package/src/Article/ArticleFootNotes.tsx +1 -1
- package/src/AudioPlayer/AudiPlayer.stories.tsx +1 -1
- package/src/AudioPlayer/AudioPlayer.tsx +2 -1
- package/src/AudioPlayer/Controls.tsx +1 -3
- package/src/AudioPlayer/SpeechControl.tsx +1 -1
- package/src/Breadcrumb/Breadcrumb.stories.tsx +1 -1
- package/src/Breadcrumb/Breadcrumb.tsx +2 -2
- package/src/Breadcrumb/BreadcrumbItem.tsx +2 -2
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +1 -1
- package/src/Breadcrumb/HomeBreadcrumb.tsx +2 -2
- package/src/CampaignBlock/CampaignBlock.stories.tsx +1 -1
- package/src/CampaignBlock/CampaignBlock.tsx +4 -4
- package/src/CodeBlock/CodeBlock.stories.tsx +1 -1
- package/src/CodeBlock/CodeBlock.tsx +1 -1
- package/src/Concept/Concept.stories.tsx +2 -2
- package/src/Concept/Concept.tsx +3 -3
- package/src/ContactBlock/ContactBlock.stories.tsx +1 -1
- package/src/ContactBlock/ContactBlock.tsx +2 -2
- package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +46 -54
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +63 -211
- package/src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx +2 -2
- package/src/ContentTypeFramedContent/ContentTypeFramedContent.tsx +2 -2
- package/src/ContentTypeHero/ContentTypeHero.stories.tsx +1 -1
- package/src/ContentTypeHero/ContentTypeHero.tsx +3 -2
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -2
- package/src/Embed/AudioEmbed.stories.tsx +2 -2
- package/src/Embed/AudioEmbed.tsx +2 -2
- package/src/Embed/BrightcoveEmbed.stories.tsx +2 -2
- package/src/Embed/BrightcoveEmbed.tsx +2 -2
- package/src/Embed/CodeEmbed.stories.tsx +1 -1
- package/src/Embed/CodeEmbed.tsx +3 -4
- package/src/Embed/ConceptEmbed.stories.tsx +2 -2
- package/src/Embed/ConceptEmbed.tsx +3 -3
- package/src/Embed/ContentLinkEmbed.tsx +2 -2
- package/src/Embed/CopyrightEmbed.tsx +2 -2
- package/src/Embed/EmbedErrorPlaceholder.tsx +4 -4
- package/src/Embed/EmbedWrapper.tsx +1 -1
- package/src/Embed/ExternalEmbed.stories.tsx +2 -2
- package/src/Embed/ExternalEmbed.tsx +1 -1
- package/src/Embed/FootnoteEmbed.stories.tsx +2 -2
- package/src/Embed/FootnoteEmbed.tsx +1 -1
- package/src/Embed/GlossEmbed.stories.tsx +2 -2
- package/src/Embed/GlossEmbed.tsx +1 -1
- package/src/Embed/H5pEmbed.stories.tsx +2 -2
- package/src/Embed/H5pEmbed.tsx +1 -1
- package/src/Embed/IframeEmbed.stories.tsx +2 -2
- package/src/Embed/IframeEmbed.tsx +1 -1
- package/src/Embed/ImageEmbed.stories.tsx +4 -4
- package/src/Embed/ImageEmbed.tsx +5 -5
- package/src/Embed/InlineTriggerButton.tsx +1 -1
- package/src/Embed/RelatedContentEmbed.stories.tsx +2 -2
- package/src/Embed/RelatedContentEmbed.tsx +1 -1
- package/src/Embed/UnknownEmbed.tsx +1 -1
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +2 -2
- package/src/Embed/UuDisclaimerEmbed.tsx +3 -3
- package/src/Embed/types.ts +3 -3
- package/src/ErrorMessage/ErrorMessage.stories.tsx +1 -1
- package/src/ErrorMessage/ErrorMessage.tsx +1 -1
- package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +1 -1
- package/src/FactBox/FactBox.tsx +11 -2
- package/src/FactBox/Factbox.stories.tsx +1 -1
- package/src/FileList/File.tsx +2 -2
- package/src/FileList/FileList.stories.tsx +3 -4
- package/src/FileList/FileList.tsx +1 -1
- package/src/Gloss/Gloss.stories.tsx +1 -1
- package/src/Gloss/Gloss.tsx +2 -2
- package/src/Gloss/GlossExample.tsx +1 -1
- package/src/Grid/Grid.stories.tsx +1 -1
- package/src/Grid/Grid.tsx +1 -1
- package/src/Grid/GridParallaxItem.tsx +1 -1
- package/src/KeyFigure/KeyFigure.stories.tsx +1 -1
- package/src/LicenseByline/EmbedByline.stories.tsx +1 -1
- package/src/LicenseByline/EmbedByline.tsx +7 -7
- package/src/LicenseByline/LicenseLink.tsx +2 -2
- package/src/LinkBlock/LinkBlock.stories.tsx +1 -1
- package/src/LinkBlock/LinkBlock.tsx +2 -3
- package/src/LinkBlock/LinkBlockSection.tsx +1 -1
- package/src/Pitch/Pitch.stories.tsx +2 -2
- package/src/RelatedArticleList/RelatedArticleList.tsx +4 -4
- package/src/ResourceBox/ResourceBox.tsx +1 -1
- package/src/TagSelector/TagSelector.stories.tsx +2 -4
- package/src/TagSelector/TagSelector.tsx +7 -7
- package/src/ZendeskButton/ZendeskButton.tsx +1 -1
- package/src/i18n/useComponentTranslations.ts +1 -1
- package/src/index.ts +2 -18
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
- package/src/model/ContentType.ts +2 -0
- package/src/types.ts +1 -1
- package/es/ContentLoader/index.js +0 -82
- package/es/ContentTypeBadge/ContentTypeBadgeNew.js +0 -49
- package/es/ContentTypeBadge/index.js +0 -11
- package/lib/ContentLoader/index.d.ts +0 -16
- package/lib/ContentLoader/index.js +0 -88
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +0 -16
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +0 -57
- package/lib/ContentTypeBadge/index.d.ts +0 -10
- package/lib/ContentTypeBadge/index.js +0 -57
- package/src/ContentLoader/ContentLoader.stories.tsx +0 -62
- package/src/ContentLoader/index.tsx +0 -73
- package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +0 -70
- package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +0 -77
- package/src/ContentTypeBadge/index.ts +0 -21
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import parse from "html-react-parser";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
|
-
import { ArrowRightLine } from "@ndla/icons
|
|
12
|
-
import { CalendarLine } from "@ndla/icons/editor";
|
|
11
|
+
import { ArrowRightLine, CalendarLine } from "@ndla/icons";
|
|
13
12
|
import { Heading } from "@ndla/primitives";
|
|
14
13
|
import { SafeLink } from "@ndla/safelink";
|
|
15
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
import { Children, useMemo, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import { ExternalLinkLine } from "@ndla/icons
|
|
11
|
+
import { ExternalLinkLine } from "@ndla/icons";
|
|
12
12
|
import { CardContent, CardHeading, CardRoot, Text, Heading, Button } from "@ndla/primitives";
|
|
13
13
|
import { SafeLink } from "@ndla/safelink";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
15
15
|
import { linkOverlay } from "@ndla/styled-system/patterns";
|
|
16
|
-
import { ContentTypeBadge } from "../ContentTypeBadge/
|
|
16
|
+
import { ContentTypeBadge } from "../ContentTypeBadge/ContentTypeBadge";
|
|
17
17
|
import { contentTypes } from "../model/ContentType";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const StyledSpan = styled("span", {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { breakpoints } from "@ndla/core";
|
|
10
|
-
import { ShareBoxLine } from "@ndla/icons
|
|
10
|
+
import { ShareBoxLine } from "@ndla/icons";
|
|
11
11
|
import { Heading, Image, Text } from "@ndla/primitives";
|
|
12
12
|
import { SafeLinkButton } from "@ndla/safelink";
|
|
13
13
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { forwardRef, useEffect, useId, useRef } from "react";
|
|
10
10
|
import { useTagsInputContext, useComboboxContext } from "@ark-ui/react";
|
|
11
|
-
import { CloseLine } from "@ndla/icons
|
|
11
|
+
import { CloseLine } from "@ndla/icons";
|
|
12
12
|
import { ComboboxClearTrigger, ComboboxControl, ComboboxInput, ComboboxLabel, ComboboxRoot, ComboboxTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemPreview, TagsInputItemText, TagsInputRoot, TagsInputItemInput } from "@ndla/primitives";
|
|
13
13
|
import { contains } from "@ndla/util";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
package/es/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export { ImageEmbed, getCrop, getFocalPoint, AudioEmbed, H5pEmbed, ExternalEmbed
|
|
|
14
14
|
export { LicenseLink, EmbedByline } from "./LicenseByline";
|
|
15
15
|
export { ArticleByline, ArticleBylineAccordionItem, ArticleFootNotes, ArticleWrapper, Article, ArticleFooter, ArticleHeader, ArticleContent, ArticleHGroup, ArticleTitle } from "./Article";
|
|
16
16
|
export { getPossiblyRelativeUrl } from "./utils/relativeUrl";
|
|
17
|
-
export { default as ContentLoader } from "./ContentLoader";
|
|
18
17
|
export { default as RelatedArticleList, RelatedArticle } from "./RelatedArticleList";
|
|
19
18
|
export { ErrorResourceAccessDenied, default as ErrorMessage } from "./ErrorMessage";
|
|
20
19
|
export { FileListEmbed, File, PdfFile, FileListItem, FileListElement, FileListWrapper } from "./FileList";
|
|
@@ -30,8 +29,7 @@ export { default as messagesSE } from "./locale/messages-se";
|
|
|
30
29
|
export { default as messagesSMA } from "./locale/messages-sma";
|
|
31
30
|
export { default as Breadcrumb, HomeBreadcrumb } from "./Breadcrumb";
|
|
32
31
|
export { i18nInstance, formatNestedMessages, useTagsInputTranslations, useTagSelectorTranslations, useComboboxTranslations, usePaginationTranslations, useAudioSearchTranslations, useImageSearchTranslations, useVideoSearchTranslations } from "./i18n";
|
|
33
|
-
export {
|
|
34
|
-
export { ContentTypeBadge as ContentTypeBadgeNew, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadgeNew";
|
|
32
|
+
export { ContentTypeBadge, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadge";
|
|
35
33
|
export { ContentTypeBlockQuote } from "./ContentTypeBlockQuote/ContentTypeBlockQuote";
|
|
36
34
|
export { ContentTypeFramedContent } from "./ContentTypeFramedContent/ContentTypeFramedContent";
|
|
37
35
|
export { default as CopyParagraphButton } from "./CopyParagraphButton";
|
package/es/locale/messages-en.js
CHANGED
|
@@ -573,7 +573,8 @@ const messages = {
|
|
|
573
573
|
external: "External",
|
|
574
574
|
gloss: "Gloss",
|
|
575
575
|
programme: "Programme",
|
|
576
|
-
"podcast-series": "Podcast series"
|
|
576
|
+
"podcast-series": "Podcast series",
|
|
577
|
+
"frontpage-article": "About NDLA article"
|
|
577
578
|
},
|
|
578
579
|
modal: {
|
|
579
580
|
closeModal: "Close"
|
package/es/locale/messages-nb.js
CHANGED
|
@@ -573,7 +573,8 @@ const messages = {
|
|
|
573
573
|
external: "Ekstern",
|
|
574
574
|
gloss: "Glose",
|
|
575
575
|
programme: "Programfag",
|
|
576
|
-
"podcast-series": "Podkast-serie"
|
|
576
|
+
"podcast-series": "Podkast-serie",
|
|
577
|
+
"frontpage-article": "Om NDLA-artikkel"
|
|
577
578
|
},
|
|
578
579
|
modal: {
|
|
579
580
|
closeModal: "Lukk"
|
package/es/locale/messages-nn.js
CHANGED
|
@@ -573,7 +573,8 @@ const messages = {
|
|
|
573
573
|
external: "Ekstern",
|
|
574
574
|
gloss: "Glose",
|
|
575
575
|
programme: "Programfag",
|
|
576
|
-
"podcast-series": "Podkast-serie"
|
|
576
|
+
"podcast-series": "Podkast-serie",
|
|
577
|
+
"frontpage-article": "Om NDLA-artikkel"
|
|
577
578
|
},
|
|
578
579
|
modal: {
|
|
579
580
|
closeModal: "Lukk"
|
package/es/locale/messages-se.js
CHANGED
|
@@ -573,7 +573,8 @@ const messages = {
|
|
|
573
573
|
external: "Ekstern",
|
|
574
574
|
gloss: "Glose",
|
|
575
575
|
programme: "Programfag",
|
|
576
|
-
"podcast-series": "Podkast-serie"
|
|
576
|
+
"podcast-series": "Podkast-serie",
|
|
577
|
+
"frontpage-article": "Om NDLA-artikkel"
|
|
577
578
|
},
|
|
578
579
|
modal: {
|
|
579
580
|
closeModal: "Govčča"
|
|
@@ -573,7 +573,8 @@ const messages = {
|
|
|
573
573
|
external: "Ekstern",
|
|
574
574
|
gloss: "Glose",
|
|
575
575
|
programme: "Programfag",
|
|
576
|
-
"podcast-series": "Podkast-serie"
|
|
576
|
+
"podcast-series": "Podkast-serie",
|
|
577
|
+
"frontpage-article": "Om NDLA-artikkel"
|
|
577
578
|
},
|
|
578
579
|
modal: {
|
|
579
580
|
closeModal: "Dahph"
|
package/es/model/ContentType.js
CHANGED
|
@@ -24,6 +24,7 @@ export const PODCAST = "podcast";
|
|
|
24
24
|
export const GLOSS = "gloss";
|
|
25
25
|
export const PROGRAMME = "programme";
|
|
26
26
|
export const PODCAST_SERIES = "podcast-series";
|
|
27
|
+
export const FRONTPAGE_ARTICLE = "frontpage-article";
|
|
27
28
|
export const contentTypes = {
|
|
28
29
|
SUBJECT_MATERIAL,
|
|
29
30
|
TASKS_AND_ACTIVITIES,
|
|
@@ -54,6 +55,7 @@ export const contentTypeMapping = {
|
|
|
54
55
|
[RESOURCE_TYPE_CONCEPT]: CONCEPT,
|
|
55
56
|
[MULTIDISCIPLINARY]: MULTIDISCIPLINARY,
|
|
56
57
|
[TOPIC]: TOPIC,
|
|
58
|
+
[FRONTPAGE_ARTICLE]: FRONTPAGE_ARTICLE,
|
|
57
59
|
default: SUBJECT_MATERIAL
|
|
58
60
|
};
|
|
59
61
|
export const resourceEmbedTypeMapping = {
|
package/lib/Article/Article.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ReactNode } from "react";
|
|
9
|
-
import { ContentType } from "../ContentTypeBadge/
|
|
10
|
-
import { Article as ArticleType } from "../types";
|
|
8
|
+
import { type ReactNode } from "react";
|
|
9
|
+
import { type ContentType } from "../ContentTypeBadge/ContentTypeBadge";
|
|
10
|
+
import type { Article as ArticleType } from "../types";
|
|
11
11
|
export declare const ArticleContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
12
12
|
consumeCss?: boolean;
|
|
13
13
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLElement>>;
|
package/lib/Article/Article.js
CHANGED
|
@@ -124,7 +124,7 @@ const ArticleTitle = _ref2 => {
|
|
|
124
124
|
align: "center",
|
|
125
125
|
direction: "row",
|
|
126
126
|
gap: "small",
|
|
127
|
-
children: [!!contentType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.
|
|
127
|
+
children: [!!contentType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.ContentTypeBadge, {
|
|
128
128
|
contentType: contentType,
|
|
129
129
|
children: contentTypeLabel
|
|
130
130
|
}), heartButton]
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ReactNode } from "react";
|
|
9
|
-
import { AccordionItemProps } from "@ndla/primitives";
|
|
10
|
-
import { FootNote } from "../types";
|
|
8
|
+
import { type ReactNode } from "react";
|
|
9
|
+
import { type AccordionItemProps } from "@ndla/primitives";
|
|
10
|
+
import type { FootNote } from "../types";
|
|
11
11
|
type AuthorProps = {
|
|
12
12
|
name: string;
|
|
13
13
|
};
|
|
@@ -7,7 +7,7 @@ exports.ArticleBylineAccordionItem = exports.ArticleByline = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
|
-
var
|
|
10
|
+
var _icons = require("@ndla/icons");
|
|
11
11
|
var _primitives = require("@ndla/primitives");
|
|
12
12
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
13
13
|
var _ArticleFootNotes = require("./ArticleFootNotes");
|
|
@@ -178,7 +178,7 @@ const ArticleBylineAccordionItem = exports.ArticleBylineAccordionItem = /*#__PUR
|
|
|
178
178
|
})
|
|
179
179
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.AccordionItemIndicator, {
|
|
180
180
|
asChild: true,
|
|
181
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
181
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowDownShortLine, {})
|
|
182
182
|
})]
|
|
183
183
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.AccordionItemContent, {
|
|
184
184
|
children: children
|
|
@@ -7,9 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
9
|
var _react2 = require("@ark-ui/react");
|
|
10
|
-
var
|
|
11
|
-
var _common = require("@ndla/icons/common");
|
|
12
|
-
var _editor = require("@ndla/icons/editor");
|
|
10
|
+
var _icons = require("@ndla/icons");
|
|
13
11
|
var _primitives = require("@ndla/primitives");
|
|
14
12
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
15
13
|
var _patterns = require("@ndla/styled-system/patterns");
|
|
@@ -218,18 +216,18 @@ const Controls = _ref => {
|
|
|
218
216
|
title: t("audio.controls.rewind15sec"),
|
|
219
217
|
"aria-label": t("audio.controls.rewind15sec"),
|
|
220
218
|
onClick: () => onSeekSeconds(-15),
|
|
221
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
219
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Replay15Line, {})
|
|
222
220
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(PlayButton, {
|
|
223
221
|
"aria-label": t(playing ? t("audio.pause") : t("audio.play")),
|
|
224
222
|
variant: "primary",
|
|
225
223
|
onClick: togglePlay,
|
|
226
|
-
children: playing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
224
|
+
children: playing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.PauseLine, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.PlayFill, {})
|
|
227
225
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Forward15SecButton, {
|
|
228
226
|
variant: "tertiary",
|
|
229
227
|
title: t("audio.controls.forward15sec"),
|
|
230
228
|
"aria-label": t("audio.controls.forward15sec"),
|
|
231
229
|
onClick: () => onSeekSeconds(15),
|
|
232
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
230
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Forward15Line, {})
|
|
233
231
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ProgressWrapper, {
|
|
234
232
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
|
|
235
233
|
textStyle: "label.medium",
|
|
@@ -293,7 +291,7 @@ const Controls = _ref => {
|
|
|
293
291
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SelectItemText, {
|
|
294
292
|
children: [speed, "x"]
|
|
295
293
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectItemIndicator, {
|
|
296
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
294
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CheckLine, {})
|
|
297
295
|
})]
|
|
298
296
|
}, speed))
|
|
299
297
|
})]
|
|
@@ -307,7 +305,7 @@ const Controls = _ref => {
|
|
|
307
305
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(VolumeButton, {
|
|
308
306
|
variant: "tertiary",
|
|
309
307
|
"aria-label": t("audio.controls.adjustVolume"),
|
|
310
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
308
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.VolumeUpFill, {})
|
|
311
309
|
})
|
|
312
310
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledPopoverContent, {
|
|
313
311
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SliderRoot, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
var
|
|
9
|
+
var _icons = require("@ndla/icons");
|
|
10
10
|
var _primitives = require("@ndla/primitives");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
/**
|
|
@@ -51,7 +51,7 @@ const SpeechControl = _ref => {
|
|
|
51
51
|
variant: "tertiary",
|
|
52
52
|
"aria-label": t(`${type}.play`),
|
|
53
53
|
onClick: togglePlay,
|
|
54
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.VolumeUpFill, {})
|
|
55
55
|
})
|
|
56
56
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.TooltipContent, {
|
|
57
57
|
children: t(`${type}.play`)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ReactNode } from "react";
|
|
9
|
-
import { IndexedBreadcrumbItem, SimpleBreadcrumbItem } from "./BreadcrumbItem";
|
|
8
|
+
import { type ReactNode } from "react";
|
|
9
|
+
import { type IndexedBreadcrumbItem, type SimpleBreadcrumbItem } from "./BreadcrumbItem";
|
|
10
10
|
interface Props {
|
|
11
11
|
items: SimpleBreadcrumbItem[];
|
|
12
12
|
collapseFirst?: boolean;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _icons = require("@ndla/icons");
|
|
9
9
|
var _safelink = require("@ndla/safelink");
|
|
10
10
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -62,7 +62,7 @@ const BreadcrumbItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
62
62
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
63
63
|
children: name
|
|
64
64
|
})
|
|
65
|
-
}), renderSeparator ? renderSeparator(item, totalCount) : !isLast && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
65
|
+
}), renderSeparator ? renderSeparator(item, totalCount) : !isLast && /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowRightShortLine, {})]
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
var _default = exports.default = BreadcrumbItem;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _icons = require("@ndla/icons");
|
|
8
8
|
var _safelink = require("@ndla/safelink");
|
|
9
9
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
10
10
|
var _Breadcrumb = _interopRequireDefault(require("./Breadcrumb"));
|
|
@@ -30,7 +30,7 @@ const StyledSafeLink = (0, _jsx2.styled)(_safelink.SafeLink, {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const StyledArrowRight = (0, _jsx2.styled)(
|
|
33
|
+
const StyledArrowRight = (0, _jsx2.styled)(_icons.ArrowRightShortLine, {
|
|
34
34
|
base: {
|
|
35
35
|
tabletDown: {
|
|
36
36
|
display: "none"
|
|
@@ -56,7 +56,7 @@ const HomeBreadcrumb = _ref => {
|
|
|
56
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconSafeLink, {
|
|
57
57
|
"aria-label": item.name,
|
|
58
58
|
to: item.to,
|
|
59
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.HomeLine, {
|
|
60
60
|
title: item.name
|
|
61
61
|
})
|
|
62
62
|
});
|
|
@@ -73,7 +73,7 @@ const HomeBreadcrumb = _ref => {
|
|
|
73
73
|
if (item.index === 0) {
|
|
74
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledArrowRight, {});
|
|
75
75
|
}
|
|
76
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowRightShortLine, {});
|
|
77
77
|
};
|
|
78
78
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Breadcrumb.default, {
|
|
79
79
|
items: items,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { CampaignBlockEmbedData } from "@ndla/types-embed";
|
|
9
|
-
import { HeadingLevel } from "../types";
|
|
8
|
+
import type { CampaignBlockEmbedData } from "@ndla/types-embed";
|
|
9
|
+
import type { HeadingLevel } from "../types";
|
|
10
10
|
interface Image {
|
|
11
11
|
src: string;
|
|
12
12
|
alt: string;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _htmlReactParser = _interopRequireDefault(require("html-react-parser"));
|
|
8
|
-
var
|
|
8
|
+
var _icons = require("@ndla/icons");
|
|
9
9
|
var _primitives = require("@ndla/primitives");
|
|
10
10
|
var _safelink = require("@ndla/safelink");
|
|
11
11
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
@@ -179,7 +179,7 @@ const CampaignBlock = _ref2 => {
|
|
|
179
179
|
}), !!url?.url && /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinkButton, {
|
|
180
180
|
url: url.url,
|
|
181
181
|
path: path,
|
|
182
|
-
children: [(0, _htmlReactParser.default)(url.text ?? ""), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
182
|
+
children: [(0, _htmlReactParser.default)(url.text ?? ""), /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowRightLine, {})]
|
|
183
183
|
})]
|
|
184
184
|
}), imageSide !== "left" && imageComponent]
|
|
185
185
|
})
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { type ComponentPropsWithRef } from "react";
|
|
9
|
-
import {
|
|
9
|
+
import type { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
10
|
interface Props extends JsxStyleProps, ComponentPropsWithRef<"pre"> {
|
|
11
11
|
highlightedCode: string;
|
|
12
12
|
format: string;
|
package/lib/Concept/Concept.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
9
|
-
import { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
10
|
-
import { ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
8
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
9
|
+
import type { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
10
|
+
import type { ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
11
11
|
export interface ConceptProps extends ComponentPropsWithRef<"figure"> {
|
|
12
12
|
copyright?: ConceptCopyright;
|
|
13
13
|
visualElement?: ConceptVisualElementMeta;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
|
|
8
|
+
import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
|
|
9
9
|
export type ContactBlockBackground = "strong" | "moderate" | "subtle";
|
|
10
10
|
export declare const contactBlockBackgrounds: ContactBlockBackground[];
|
|
11
11
|
interface Props {
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the GPLv3 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
title?: string;
|
|
13
|
-
background?: boolean;
|
|
14
|
-
border?: boolean;
|
|
15
|
-
className?: string;
|
|
8
|
+
import { type BadgeProps, type BadgeVariant } from "@ndla/primitives";
|
|
9
|
+
import * as contentTypes from "../model/ContentType";
|
|
10
|
+
export interface ContentTypeBadgeProps extends Omit<BadgeProps, "colorTheme"> {
|
|
11
|
+
contentType: ContentType | undefined;
|
|
16
12
|
}
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const SubjectBadge: (props: Omit<Props, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const SourceMaterialBadge: (props: Omit<Props, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare const LearningPathBadge: (props: Omit<Props, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare const MultidisciplinaryTopicBadge: (props: Omit<Props, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare const ConceptBadge: (props: Omit<Props, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export {};
|
|
13
|
+
export type StrictContentType = typeof contentTypes.SUBJECT_MATERIAL | typeof contentTypes.TASKS_AND_ACTIVITIES | typeof contentTypes.ASSESSMENT_RESOURCES | typeof contentTypes.SUBJECT | typeof contentTypes.SOURCE_MATERIAL | typeof contentTypes.LEARNING_PATH | typeof contentTypes.TOPIC | typeof contentTypes.MULTIDISCIPLINARY | typeof contentTypes.CONCEPT | typeof contentTypes.EXTERNAL | typeof contentTypes.IMAGE | typeof contentTypes.AUDIO | typeof contentTypes.VIDEO | typeof contentTypes.MISSING | typeof contentTypes.PODCAST | typeof contentTypes.GLOSS | typeof contentTypes.PROGRAMME | typeof contentTypes.PODCAST_SERIES | typeof contentTypes.FRONTPAGE_ARTICLE;
|
|
14
|
+
export type ContentType = StrictContentType | (string & {});
|
|
15
|
+
export declare const contentTypeToBadgeVariantMap: Record<ContentType, BadgeVariant>;
|
|
16
|
+
export declare const ContentTypeBadge: import("react").ForwardRefExoticComponent<ContentTypeBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|