@ndla/ui 56.0.141-alpha.0 → 56.0.143-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 +2 -10
- package/dist/styles.css +5 -35
- package/es/Article/Article.mjs +10 -12
- package/es/Article/Article.mjs.map +1 -1
- package/es/Article/ArticleByline.mjs.map +1 -1
- package/es/Article/ArticleFootNotes.mjs.map +1 -1
- package/es/AudioPlayer/AudioPlayer.mjs +3 -3
- package/es/AudioPlayer/AudioPlayer.mjs.map +1 -1
- package/es/AudioPlayer/Controls.mjs +1 -1
- package/es/AudioPlayer/Controls.mjs.map +1 -1
- package/es/AudioPlayer/SpeechControl.mjs +9 -11
- package/es/AudioPlayer/SpeechControl.mjs.map +1 -1
- package/es/Breadcrumb/Breadcrumb.mjs +2 -2
- package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/es/Breadcrumb/BreadcrumbItem.mjs +1 -1
- package/es/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
- package/es/Breadcrumb/HomeBreadcrumb.mjs +2 -2
- package/es/Breadcrumb/HomeBreadcrumb.mjs.map +1 -1
- package/es/CampaignBlock/CampaignBlock.mjs +1 -1
- package/es/CampaignBlock/CampaignBlock.mjs.map +1 -1
- package/es/CodeBlock/CodeBlock.mjs +1 -1
- package/es/CodeBlock/CodeBlock.mjs.map +1 -1
- package/es/CodeBlock/codeLanguageOptions.mjs.map +1 -1
- package/es/Concept/Concept.mjs +5 -5
- package/es/Concept/Concept.mjs.map +1 -1
- package/es/ContactBlock/ContactBlock.mjs.map +1 -1
- package/es/ContentTypeBadge/ContentTypeBadge.mjs.map +1 -1
- package/es/CopyParagraphButton/CopyParagraphButton.mjs +1 -1
- package/es/CopyParagraphButton/CopyParagraphButton.mjs.map +1 -1
- package/es/Embed/AudioEmbed.mjs +3 -3
- package/es/Embed/AudioEmbed.mjs.map +1 -1
- package/es/Embed/BrightcoveEmbed.mjs +2 -2
- package/es/Embed/BrightcoveEmbed.mjs.map +1 -1
- package/es/Embed/CodeEmbed.mjs +3 -4
- package/es/Embed/CodeEmbed.mjs.map +1 -1
- package/es/Embed/ConceptEmbed.mjs +2 -2
- package/es/Embed/ConceptEmbed.mjs.map +1 -1
- package/es/Embed/ConceptInlineTriggerButton.mjs.map +1 -1
- package/es/Embed/ContentLinkEmbed.mjs +1 -1
- package/es/Embed/ContentLinkEmbed.mjs.map +1 -1
- package/es/Embed/CopyrightEmbed.mjs +1 -1
- package/es/Embed/CopyrightEmbed.mjs.map +1 -1
- package/es/Embed/EmbedErrorPlaceholder.mjs +1 -1
- package/es/Embed/EmbedErrorPlaceholder.mjs.map +1 -1
- package/es/Embed/EmbedWrapper.mjs.map +1 -1
- package/es/Embed/ExternalEmbed.mjs +3 -3
- package/es/Embed/ExternalEmbed.mjs.map +1 -1
- package/es/Embed/FootnoteEmbed.mjs +1 -1
- package/es/Embed/FootnoteEmbed.mjs.map +1 -1
- package/es/Embed/GlossEmbed.mjs +2 -2
- package/es/Embed/GlossEmbed.mjs.map +1 -1
- package/es/Embed/H5pEmbed.mjs +2 -2
- package/es/Embed/H5pEmbed.mjs.map +1 -1
- package/es/Embed/IframeEmbed.mjs +3 -3
- package/es/Embed/IframeEmbed.mjs.map +1 -1
- package/es/Embed/ImageEmbed.mjs +2 -4
- package/es/Embed/ImageEmbed.mjs.map +1 -1
- package/es/Embed/InlineTriggerButton.mjs.map +1 -1
- package/es/Embed/RelatedContentEmbed.mjs +2 -3
- package/es/Embed/RelatedContentEmbed.mjs.map +1 -1
- package/es/Embed/UnknownEmbed.mjs +1 -1
- package/es/Embed/UnknownEmbed.mjs.map +1 -1
- package/es/Embed/UuDisclaimerEmbed.mjs +1 -1
- package/es/Embed/UuDisclaimerEmbed.mjs.map +1 -1
- package/es/FactBox/FactBox.mjs +1 -1
- package/es/FactBox/FactBox.mjs.map +1 -1
- package/es/FileList/File.mjs +34 -30
- package/es/FileList/File.mjs.map +1 -1
- package/es/FileList/FileList.mjs.map +1 -1
- package/es/FileList/PdfFile.mjs.map +1 -1
- package/es/Gloss/Gloss.mjs +5 -7
- package/es/Gloss/Gloss.mjs.map +1 -1
- package/es/Gloss/GlossExample.mjs +1 -1
- package/es/Gloss/GlossExample.mjs.map +1 -1
- package/es/Grid/Grid.mjs.map +1 -1
- package/es/Grid/GridParallaxItem.mjs.map +1 -1
- package/es/KeyFigure/KeyFigure.mjs +1 -1
- package/es/KeyFigure/KeyFigure.mjs.map +1 -1
- package/es/LicenseByline/EmbedByline.mjs +1 -2
- package/es/LicenseByline/EmbedByline.mjs.map +1 -1
- package/es/LicenseByline/LicenseLink.mjs.map +1 -1
- package/es/LinkBlock/LinkBlock.mjs +1 -1
- package/es/LinkBlock/LinkBlock.mjs.map +1 -1
- package/es/LinkBlock/LinkBlockSection.mjs +1 -1
- package/es/LinkBlock/LinkBlockSection.mjs.map +1 -1
- package/es/Pitch/Pitch.mjs.map +1 -1
- package/es/RelatedArticleList/RelatedArticleList.mjs.map +1 -1
- package/es/ResourceBox/ResourceBox.mjs +1 -1
- package/es/ResourceBox/ResourceBox.mjs.map +1 -1
- package/es/TagSelector/TagSelector.mjs.map +1 -1
- package/es/ZendeskButton/ZendeskButton.mjs.map +1 -1
- package/es/_virtual/rolldown_runtime.mjs +3 -1
- package/es/i18n/formatNestedMessages.mjs.map +1 -1
- package/es/i18n/useComponentTranslations.mjs +1 -2
- package/es/i18n/useComponentTranslations.mjs.map +1 -1
- package/es/index.mjs +34 -39
- package/es/locale/messages-en.mjs +2 -2
- package/es/locale/messages-en.mjs.map +1 -1
- package/es/locale/messages-nb.mjs +2 -2
- package/es/locale/messages-nb.mjs.map +1 -1
- package/es/locale/messages-nn.mjs +2 -2
- package/es/locale/messages-nn.mjs.map +1 -1
- package/es/locale/messages-se.mjs +2 -2
- package/es/locale/messages-se.mjs.map +1 -1
- package/es/model/ContentType.mjs.map +1 -1
- package/es/model/SubjectCategories.mjs +1 -2
- package/es/model/SubjectCategories.mjs.map +1 -1
- package/es/model/SubjectTypes.mjs +1 -2
- package/es/model/SubjectTypes.mjs.map +1 -1
- package/es/model/WordClass.mjs +1 -2
- package/es/model/WordClass.mjs.map +1 -1
- package/es/model/index.mjs +1 -1
- package/es/model/index.mjs.map +1 -1
- package/es/utils/licenseAttributes.mjs +1 -2
- package/es/utils/licenseAttributes.mjs.map +1 -1
- package/es/utils/relativeUrl.mjs.map +1 -1
- package/lib/Article/Article.js +24 -20
- package/lib/Article/Article.js.map +1 -1
- package/lib/Article/ArticleByline.js +18 -10
- package/lib/Article/ArticleByline.js.map +1 -1
- package/lib/Article/ArticleFootNotes.js +6 -3
- package/lib/Article/ArticleFootNotes.js.map +1 -1
- package/lib/AudioPlayer/AudioPlayer.js +17 -11
- package/lib/AudioPlayer/AudioPlayer.js.map +1 -1
- package/lib/AudioPlayer/Controls.js +15 -8
- package/lib/AudioPlayer/Controls.js.map +1 -1
- package/lib/AudioPlayer/SpeechControl.js +18 -15
- package/lib/AudioPlayer/SpeechControl.js.map +1 -1
- package/lib/Breadcrumb/Breadcrumb.js +11 -7
- package/lib/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.js +11 -6
- package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.js +11 -7
- package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -1
- package/lib/CampaignBlock/CampaignBlock.js +17 -10
- package/lib/CampaignBlock/CampaignBlock.js.map +1 -1
- package/lib/CodeBlock/CodeBlock.js +9 -5
- package/lib/CodeBlock/CodeBlock.js.map +1 -1
- package/lib/CodeBlock/codeLanguageOptions.js.map +1 -1
- package/lib/Concept/Concept.js +19 -15
- package/lib/Concept/Concept.js.map +1 -1
- package/lib/ContactBlock/ContactBlock.js +10 -6
- package/lib/ContactBlock/ContactBlock.js.map +1 -1
- package/lib/ContentTypeBadge/ContentTypeBadge.js +28 -24
- package/lib/ContentTypeBadge/ContentTypeBadge.js.map +1 -1
- package/lib/CopyParagraphButton/CopyParagraphButton.js +13 -7
- package/lib/CopyParagraphButton/CopyParagraphButton.js.map +1 -1
- package/lib/Embed/AudioEmbed.js +16 -13
- package/lib/Embed/AudioEmbed.js.map +1 -1
- package/lib/Embed/BrightcoveEmbed.js +19 -13
- package/lib/Embed/BrightcoveEmbed.js.map +1 -1
- package/lib/Embed/CodeEmbed.js +19 -14
- package/lib/Embed/CodeEmbed.js.map +1 -1
- package/lib/Embed/ConceptEmbed.js +21 -15
- package/lib/Embed/ConceptEmbed.js.map +1 -1
- package/lib/Embed/ConceptInlineTriggerButton.js +4 -3
- package/lib/Embed/ConceptInlineTriggerButton.js.map +1 -1
- package/lib/Embed/ContentLinkEmbed.js +7 -4
- package/lib/Embed/ContentLinkEmbed.js.map +1 -1
- package/lib/Embed/CopyrightEmbed.js +7 -5
- package/lib/Embed/CopyrightEmbed.js.map +1 -1
- package/lib/Embed/EmbedErrorPlaceholder.js +13 -8
- package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -1
- package/lib/Embed/EmbedWrapper.js +10 -5
- package/lib/Embed/EmbedWrapper.js.map +1 -1
- package/lib/Embed/ExternalEmbed.js +15 -10
- package/lib/Embed/ExternalEmbed.js.map +1 -1
- package/lib/Embed/FootnoteEmbed.js +7 -4
- package/lib/Embed/FootnoteEmbed.js.map +1 -1
- package/lib/Embed/GlossEmbed.js +17 -12
- package/lib/Embed/GlossEmbed.js.map +1 -1
- package/lib/Embed/H5pEmbed.js +11 -7
- package/lib/Embed/H5pEmbed.js.map +1 -1
- package/lib/Embed/IframeEmbed.js +15 -10
- package/lib/Embed/IframeEmbed.js.map +1 -1
- package/lib/Embed/ImageEmbed.js +21 -16
- package/lib/Embed/ImageEmbed.js.map +1 -1
- package/lib/Embed/InlineTriggerButton.js +8 -4
- package/lib/Embed/InlineTriggerButton.js.map +1 -1
- package/lib/Embed/RelatedContentEmbed.js +12 -11
- package/lib/Embed/RelatedContentEmbed.js.map +1 -1
- package/lib/Embed/UnknownEmbed.js +7 -4
- package/lib/Embed/UnknownEmbed.js.map +1 -1
- package/lib/Embed/UuDisclaimerEmbed.js +15 -8
- package/lib/Embed/UuDisclaimerEmbed.js.map +1 -1
- package/lib/FactBox/FactBox.js +13 -7
- package/lib/FactBox/FactBox.js.map +1 -1
- package/lib/FileList/File.js +51 -39
- package/lib/FileList/File.js.map +1 -1
- package/lib/FileList/FileList.js +8 -4
- package/lib/FileList/FileList.js.map +1 -1
- package/lib/FileList/PdfFile.js +6 -3
- package/lib/FileList/PdfFile.js.map +1 -1
- package/lib/Gloss/Gloss.js +23 -17
- package/lib/Gloss/Gloss.js.map +1 -1
- package/lib/Gloss/GlossExample.js +9 -5
- package/lib/Gloss/GlossExample.js.map +1 -1
- package/lib/Grid/Grid.js +6 -3
- package/lib/Grid/Grid.js.map +1 -1
- package/lib/Grid/GridParallaxItem.js +6 -3
- package/lib/Grid/GridParallaxItem.js.map +1 -1
- package/lib/KeyFigure/KeyFigure.js +7 -4
- package/lib/KeyFigure/KeyFigure.js.map +1 -1
- package/lib/LicenseByline/EmbedByline.js +17 -11
- package/lib/LicenseByline/EmbedByline.js.map +1 -1
- package/lib/LicenseByline/LicenseLink.js +8 -4
- package/lib/LicenseByline/LicenseLink.js.map +1 -1
- package/lib/LinkBlock/LinkBlock.js +17 -10
- package/lib/LinkBlock/LinkBlock.js.map +1 -1
- package/lib/LinkBlock/LinkBlockSection.js +7 -4
- package/lib/LinkBlock/LinkBlockSection.js.map +1 -1
- package/lib/Pitch/Pitch.js +14 -8
- package/lib/Pitch/Pitch.js.map +1 -1
- package/lib/RelatedArticleList/RelatedArticleList.js +20 -12
- package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -1
- package/lib/ResourceBox/ResourceBox.js +14 -7
- package/lib/ResourceBox/ResourceBox.js.map +1 -1
- package/lib/TagSelector/TagSelector.js +12 -6
- package/lib/TagSelector/TagSelector.js.map +1 -1
- package/lib/ZendeskButton/ZendeskButton.js +6 -3
- package/lib/ZendeskButton/ZendeskButton.js.map +1 -1
- package/lib/_virtual/rolldown_runtime.js +5 -13
- package/lib/i18n/formatNestedMessages.js.map +1 -1
- package/lib/i18n/useComponentTranslations.js +5 -4
- package/lib/i18n/useComponentTranslations.js.map +1 -1
- package/lib/index.d.ts +51 -31
- package/lib/index.js +145 -154
- package/lib/locale/messages-en.js +5 -4
- package/lib/locale/messages-en.js.map +1 -1
- package/lib/locale/messages-nb.js +5 -4
- package/lib/locale/messages-nb.js.map +1 -1
- package/lib/locale/messages-nn.js +5 -4
- package/lib/locale/messages-nn.js.map +1 -1
- package/lib/locale/messages-se.js +5 -4
- package/lib/locale/messages-se.js.map +1 -1
- package/lib/model/ContentType.js.map +1 -1
- package/lib/model/SubjectCategories.js +1 -2
- package/lib/model/SubjectCategories.js.map +1 -1
- package/lib/model/SubjectTypes.js +1 -2
- package/lib/model/SubjectTypes.js.map +1 -1
- package/lib/model/WordClass.js +1 -2
- package/lib/model/WordClass.js.map +1 -1
- package/lib/model/index.js +11 -11
- package/lib/model/index.js.map +1 -1
- package/lib/utils/licenseAttributes.js +3 -3
- package/lib/utils/licenseAttributes.js.map +1 -1
- package/lib/utils/relativeUrl.js.map +1 -1
- package/package.json +8 -8
- package/src/Article/Article.tsx +8 -4
- package/src/AudioPlayer/SpeechControl.tsx +4 -9
- package/src/Concept/Concept.tsx +5 -1
- package/src/Embed/AudioEmbed.stories.tsx +1 -1
- package/src/Embed/AudioEmbed.tsx +2 -2
- package/src/Embed/BrightcoveEmbed.stories.tsx +1 -1
- package/src/Embed/BrightcoveEmbed.tsx +1 -1
- package/src/Embed/CodeEmbed.tsx +2 -2
- package/src/Embed/ConceptEmbed.stories.tsx +1 -1
- package/src/Embed/CopyrightEmbed.tsx +1 -1
- package/src/Embed/EmbedErrorPlaceholder.tsx +1 -2
- package/src/Embed/ExternalEmbed.stories.tsx +1 -1
- package/src/Embed/ExternalEmbed.tsx +1 -1
- package/src/Embed/FootnoteEmbed.stories.tsx +1 -1
- package/src/Embed/GlossEmbed.tsx +1 -1
- package/src/Embed/H5pEmbed.stories.tsx +1 -1
- package/src/Embed/IframeEmbed.stories.tsx +1 -1
- package/src/Embed/IframeEmbed.tsx +1 -1
- package/src/Embed/ImageEmbed.stories.tsx +2 -2
- package/src/Embed/ImageEmbed.tsx +1 -1
- package/src/Embed/RelatedContentEmbed.stories.tsx +2 -2
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +3 -3
- package/src/FileList/File.tsx +18 -7
- package/src/LinkBlock/LinkBlock.stories.tsx +1 -1
- package/src/Pitch/Pitch.stories.tsx +2 -2
- package/src/index.ts +53 -63
- package/es/AudioPlayer/index.mjs +0 -8
- package/es/AudioPlayer/index.mjs.map +0 -1
- package/es/Breadcrumb/index.mjs +0 -9
- package/es/Breadcrumb/index.mjs.map +0 -1
- package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.mjs +0 -25
- package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.mjs.map +0 -1
- package/es/ContentTypeFramedContent/ContentTypeFramedContent.mjs +0 -25
- package/es/ContentTypeFramedContent/ContentTypeFramedContent.mjs.map +0 -1
- package/es/ContentTypeHero/ContentTypeHero.mjs +0 -39
- package/es/ContentTypeHero/ContentTypeHero.mjs.map +0 -1
- package/es/CopyParagraphButton/index.mjs +0 -8
- package/es/CopyParagraphButton/index.mjs.map +0 -1
- package/es/ErrorMessage/ErrorMessage.mjs +0 -54
- package/es/ErrorMessage/ErrorMessage.mjs.map +0 -1
- package/es/ErrorMessage/index.mjs +0 -8
- package/es/ErrorMessage/index.mjs.map +0 -1
- package/es/FactBox/index.mjs +0 -8
- package/es/FactBox/index.mjs.map +0 -1
- package/es/RelatedArticleList/index.mjs +0 -8
- package/es/RelatedArticleList/index.mjs.map +0 -1
- package/lib/Article/index.d.ts +0 -10
- package/lib/AudioPlayer/index.d.ts +0 -9
- package/lib/AudioPlayer/index.js +0 -8
- package/lib/AudioPlayer/index.js.map +0 -1
- package/lib/Breadcrumb/index.d.ts +0 -11
- package/lib/Breadcrumb/index.js +0 -9
- package/lib/Breadcrumb/index.js.map +0 -1
- package/lib/CampaignBlock/index.d.ts +0 -8
- package/lib/CodeBlock/index.d.ts +0 -9
- package/lib/ContactBlock/index.d.ts +0 -9
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.d.ts +0 -16
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js +0 -26
- package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +0 -1
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.d.ts +0 -16
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js +0 -26
- package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js.map +0 -1
- package/lib/ContentTypeHero/ContentTypeHero.d.ts +0 -14
- package/lib/ContentTypeHero/ContentTypeHero.js +0 -40
- package/lib/ContentTypeHero/ContentTypeHero.js.map +0 -1
- package/lib/ContentTypeHero/index.d.ts +0 -9
- package/lib/CopyParagraphButton/index.d.ts +0 -10
- package/lib/CopyParagraphButton/index.js +0 -8
- package/lib/CopyParagraphButton/index.js.map +0 -1
- package/lib/Embed/index.d.ts +0 -27
- package/lib/ErrorMessage/ErrorMessage.d.ts +0 -27
- package/lib/ErrorMessage/ErrorMessage.js +0 -55
- package/lib/ErrorMessage/ErrorMessage.js.map +0 -1
- package/lib/ErrorMessage/index.d.ts +0 -9
- package/lib/ErrorMessage/index.js +0 -8
- package/lib/ErrorMessage/index.js.map +0 -1
- package/lib/FactBox/index.d.ts +0 -9
- package/lib/FactBox/index.js +0 -8
- package/lib/FactBox/index.js.map +0 -1
- package/lib/FileList/index.d.ts +0 -10
- package/lib/Gloss/index.d.ts +0 -9
- package/lib/Grid/index.d.ts +0 -10
- package/lib/KeyFigure/index.d.ts +0 -8
- package/lib/LicenseByline/index.d.ts +0 -9
- package/lib/LinkBlock/index.d.ts +0 -9
- package/lib/Pitch/index.d.ts +0 -8
- package/lib/RelatedArticleList/index.d.ts +0 -10
- package/lib/RelatedArticleList/index.js +0 -8
- package/lib/RelatedArticleList/index.js.map +0 -1
- package/lib/ResourceBox/index.d.ts +0 -9
- package/lib/i18n/index.d.ts +0 -9
- package/src/Article/index.ts +0 -20
- package/src/AudioPlayer/index.ts +0 -11
- package/src/Breadcrumb/index.ts +0 -15
- package/src/CampaignBlock/index.ts +0 -9
- package/src/CodeBlock/index.ts +0 -10
- package/src/ContactBlock/index.ts +0 -10
- package/src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx +0 -32
- package/src/ContentTypeFramedContent/ContentTypeFramedContent.tsx +0 -34
- package/src/ContentTypeHero/ContentTypeHero.stories.tsx +0 -75
- package/src/ContentTypeHero/ContentTypeHero.tsx +0 -56
- package/src/ContentTypeHero/index.ts +0 -10
- package/src/CopyParagraphButton/index.tsx +0 -12
- package/src/Embed/index.ts +0 -28
- package/src/ErrorMessage/ErrorMessage.stories.tsx +0 -57
- package/src/ErrorMessage/ErrorMessage.tsx +0 -108
- package/src/ErrorMessage/index.ts +0 -11
- package/src/FactBox/index.ts +0 -11
- package/src/FileList/index.ts +0 -11
- package/src/Gloss/index.tsx +0 -10
- package/src/Grid/index.ts +0 -12
- package/src/KeyFigure/index.ts +0 -9
- package/src/LicenseByline/index.tsx +0 -10
- package/src/LinkBlock/index.ts +0 -10
- package/src/Pitch/index.ts +0 -9
- package/src/RelatedArticleList/index.ts +0 -13
- package/src/ResourceBox/index.ts +0 -11
- package/src/i18n/index.ts +0 -19
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
import { BlockQuote } from "@ndla/primitives";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx
|
|
6
|
-
const contentTypeToVariantMapping = {
|
|
7
|
-
"subject-material": "brand1",
|
|
8
|
-
"source-material": "brand1",
|
|
9
|
-
concept: "brand1",
|
|
10
|
-
"tasks-and-activities": "brand2",
|
|
11
|
-
"assessment-resources": "brand2"
|
|
12
|
-
};
|
|
13
|
-
const ContentTypeBlockQuote = forwardRef(({ variant, contentType,...props }, ref) => {
|
|
14
|
-
const color = contentType ? contentTypeToVariantMapping[contentType] ?? "brand1" : "brand1";
|
|
15
|
-
const variantColor = variant === "colored" ? color : void 0;
|
|
16
|
-
return /* @__PURE__ */ jsx(BlockQuote, {
|
|
17
|
-
...props,
|
|
18
|
-
variant: variantColor,
|
|
19
|
-
ref
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
export { ContentTypeBlockQuote };
|
|
25
|
-
//# sourceMappingURL=ContentTypeBlockQuote.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeBlockQuote.mjs","names":[],"sources":["../../src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { BlockQuote, type BlockQuoteProps, type BlockQuoteVariantProps } from \"@ndla/primitives\";\nimport type { ContentType } from \"../ContentTypeBadge/ContentTypeBadge\";\n\nexport type ContentTypeBlockQuoteVariant = \"colored\" | \"neutral\";\n\nconst contentTypeToVariantMapping = {\n \"subject-material\": \"brand1\",\n \"source-material\": \"brand1\",\n concept: \"brand1\",\n \"tasks-and-activities\": \"brand2\",\n \"assessment-resources\": \"brand2\",\n} as Record<ContentType, NonNullable<BlockQuoteVariantProps>[\"variant\"]>;\n\ninterface Props extends Omit<BlockQuoteProps, \"variant\"> {\n variant?: ContentTypeBlockQuoteVariant;\n contentType?: ContentType;\n}\n\nexport const ContentTypeBlockQuote = forwardRef<HTMLQuoteElement, Props>(({ variant, contentType, ...props }, ref) => {\n const color = contentType ? (contentTypeToVariantMapping[contentType] ?? \"brand1\") : \"brand1\";\n const variantColor = variant === \"colored\" ? color : undefined;\n return <BlockQuote {...props} variant={variantColor} ref={ref} />;\n});\n"],"mappings":";;;;;AAcA,MAAM,8BAA8B;CAClC,oBAAoB;CACpB,mBAAmB;CACnB,SAAS;CACT,wBAAwB;CACxB,wBAAwB;AACzB;AAOD,MAAa,wBAAwB,WAAoC,CAAC,EAAE,SAAS,YAAa,GAAG,OAAO,EAAE,QAAQ;CACpH,MAAM,QAAQ,cAAe,4BAA4B,gBAAgB,WAAY;CACrF,MAAM,eAAe,YAAY,YAAY;AAC7C,wBAAO,IAAC;EAAW,GAAI;EAAO,SAAS;EAAmB;GAAO;AAClE,EAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
import { FramedContent } from "@ndla/primitives";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/ContentTypeFramedContent/ContentTypeFramedContent.tsx
|
|
6
|
-
const contentTypeToVariantMapping = {
|
|
7
|
-
"subject-material": "brand1",
|
|
8
|
-
"source-material": "brand1",
|
|
9
|
-
concept: "brand1",
|
|
10
|
-
"tasks-and-activities": "brand2",
|
|
11
|
-
"assessment-resources": "brand2"
|
|
12
|
-
};
|
|
13
|
-
const ContentTypeFramedContent = forwardRef(({ variant = "neutral", contentType,...props }, ref) => {
|
|
14
|
-
const color = contentType ? contentTypeToVariantMapping[contentType] ?? "brand1" : "brand1";
|
|
15
|
-
const variantColor = variant === "colored" ? color : void 0;
|
|
16
|
-
return /* @__PURE__ */ jsx(FramedContent, {
|
|
17
|
-
...props,
|
|
18
|
-
colorTheme: variantColor,
|
|
19
|
-
ref
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
export { ContentTypeFramedContent };
|
|
25
|
-
//# sourceMappingURL=ContentTypeFramedContent.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeFramedContent.mjs","names":[],"sources":["../../src/ContentTypeFramedContent/ContentTypeFramedContent.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { FramedContent, type FramedContentProps, type FramedContentVariantProps } from \"@ndla/primitives\";\nimport type { ContentType } from \"..\";\n\nconst contentTypeToVariantMapping = {\n \"subject-material\": \"brand1\",\n \"source-material\": \"brand1\",\n concept: \"brand1\",\n \"tasks-and-activities\": \"brand2\",\n \"assessment-resources\": \"brand2\",\n} as Record<ContentType, NonNullable<FramedContentVariantProps>[\"colorTheme\"]>;\n\nexport type ContentTypeFramedContentVariant = \"colored\" | \"neutral\";\n\ninterface Props extends FramedContentProps {\n variant?: ContentTypeFramedContentVariant;\n contentType?: ContentType;\n}\n\nexport const ContentTypeFramedContent = forwardRef<HTMLDivElement, Props>(\n ({ variant = \"neutral\", contentType, ...props }, ref) => {\n const color = contentType ? (contentTypeToVariantMapping[contentType] ?? \"brand1\") : \"brand1\";\n const variantColor = variant === \"colored\" ? color : undefined;\n return <FramedContent {...props} colorTheme={variantColor} ref={ref} />;\n },\n);\n"],"mappings":";;;;;AAYA,MAAM,8BAA8B;CAClC,oBAAoB;CACpB,mBAAmB;CACnB,SAAS;CACT,wBAAwB;CACxB,wBAAwB;AACzB;AASD,MAAa,2BAA2B,WACtC,CAAC,EAAE,UAAU,WAAW,YAAa,GAAG,OAAO,EAAE,QAAQ;CACvD,MAAM,QAAQ,cAAe,4BAA4B,gBAAgB,WAAY;CACrF,MAAM,eAAe,YAAY,YAAY;AAC7C,wBAAO,IAAC;EAAc,GAAI;EAAO,YAAY;EAAmB;GAAO;AACxE,EACF"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ASSESSMENT_RESOURCES, AUDIO, CONCEPT, EXTERNAL, FRONTPAGE_ARTICLE, GLOSS, IMAGE, LEARNING_PATH, MISSING, MULTIDISCIPLINARY, PODCAST, PODCAST_SERIES, PROGRAMME, SOURCE_MATERIAL, SUBJECT, SUBJECT_MATERIAL, TASKS_AND_ACTIVITIES, TOPIC, VIDEO } from "../model/ContentType.mjs";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { Hero } from "@ndla/primitives";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/ContentTypeHero/ContentTypeHero.tsx
|
|
7
|
-
const contentTypeToHeroMap = {
|
|
8
|
-
[SUBJECT_MATERIAL]: "primary",
|
|
9
|
-
[TASKS_AND_ACTIVITIES]: "brand2Bold",
|
|
10
|
-
[ASSESSMENT_RESOURCES]: "brand2",
|
|
11
|
-
[SUBJECT]: "primary",
|
|
12
|
-
[SOURCE_MATERIAL]: "brand1",
|
|
13
|
-
[LEARNING_PATH]: "primary",
|
|
14
|
-
[TOPIC]: "neutral",
|
|
15
|
-
[MULTIDISCIPLINARY]: "primary",
|
|
16
|
-
[CONCEPT]: "brand1Moderate",
|
|
17
|
-
[EXTERNAL]: "primary",
|
|
18
|
-
[IMAGE]: "primary",
|
|
19
|
-
[AUDIO]: "primary",
|
|
20
|
-
[PODCAST]: "primary",
|
|
21
|
-
[VIDEO]: "primary",
|
|
22
|
-
[MISSING]: "neutral",
|
|
23
|
-
[GLOSS]: "brand1Moderate",
|
|
24
|
-
[PROGRAMME]: "primary",
|
|
25
|
-
[PODCAST_SERIES]: "primary",
|
|
26
|
-
[FRONTPAGE_ARTICLE]: "primary"
|
|
27
|
-
};
|
|
28
|
-
const ContentTypeHero = forwardRef(({ contentType, children,...props }, ref) => {
|
|
29
|
-
return /* @__PURE__ */ jsx(Hero, {
|
|
30
|
-
variant: contentTypeToHeroMap[contentType ?? "missing"] ?? contentTypeToHeroMap["missing"],
|
|
31
|
-
...props,
|
|
32
|
-
ref,
|
|
33
|
-
children
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ContentTypeHero };
|
|
39
|
-
//# sourceMappingURL=ContentTypeHero.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeHero.mjs","names":["contentTypeToHeroMap: Record<ContentType, HeroVariant>"],"sources":["../../src/ContentTypeHero/ContentTypeHero.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { Hero, type HeroProps, type HeroVariant } from \"@ndla/primitives\";\nimport type { ContentType } from \"../ContentTypeBadge/ContentTypeBadge\";\nimport * as contentTypes from \"../model/ContentType\";\n\nexport const contentTypeToHeroMap: Record<ContentType, HeroVariant> = {\n [contentTypes.SUBJECT_MATERIAL]: \"primary\",\n [contentTypes.TASKS_AND_ACTIVITIES]: \"brand2Bold\",\n [contentTypes.ASSESSMENT_RESOURCES]: \"brand2\",\n // This will never happen\n [contentTypes.SUBJECT]: \"primary\",\n [contentTypes.SOURCE_MATERIAL]: \"brand1\",\n // This will never happen\n [contentTypes.LEARNING_PATH]: \"primary\",\n [contentTypes.TOPIC]: \"neutral\",\n [contentTypes.MULTIDISCIPLINARY]: \"primary\",\n [contentTypes.CONCEPT]: \"brand1Moderate\",\n [contentTypes.EXTERNAL]: \"primary\",\n [contentTypes.IMAGE]: \"primary\",\n [contentTypes.AUDIO]: \"primary\",\n [contentTypes.PODCAST]: \"primary\",\n [contentTypes.VIDEO]: \"primary\",\n [contentTypes.MISSING]: \"neutral\",\n [contentTypes.GLOSS]: \"brand1Moderate\",\n // this will never happen\n [contentTypes.PROGRAMME]: \"primary\",\n // this will never happen\n [contentTypes.PODCAST_SERIES]: \"primary\",\n [contentTypes.FRONTPAGE_ARTICLE]: \"primary\",\n};\n\nexport interface ContentTypeHeroProps extends HeroProps {\n contentType: ContentType | undefined;\n}\n\nexport const ContentTypeHero = forwardRef<HTMLDivElement, ContentTypeHeroProps>(\n ({ contentType, children, ...props }, ref) => {\n return (\n <Hero\n variant={contentTypeToHeroMap[contentType ?? \"missing\"] ?? contentTypeToHeroMap[\"missing\"]}\n {...props}\n ref={ref}\n >\n {children}\n </Hero>\n );\n },\n);\n"],"mappings":";;;;;;AAaA,MAAaA,uBAAyD;qBACnC;yBACI;yBACA;YAEb;oBACQ;kBAEF;UACR;sBACY;YACV;aACC;UACH;UACA;YACE;UACF;YACE;UACF;cAEI;mBAEK;sBACG;AACnC;AAMD,MAAa,kBAAkB,WAC7B,CAAC,EAAE,aAAa,SAAU,GAAG,OAAO,EAAE,QAAQ;AAC5C,wBACE,IAAC;EACC,SAAS,qBAAqB,eAAe,cAAc,qBAAqB;EAChF,GAAI;EACC;EAEJ;GACI;AAEV,EACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CopyParagraphButton_default$1 as CopyParagraphButton_default } from "./CopyParagraphButton.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/CopyParagraphButton/index.tsx
|
|
4
|
-
var CopyParagraphButton_default$1 = CopyParagraphButton_default;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
export { CopyParagraphButton_default$1 as CopyParagraphButton_default };
|
|
8
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["CopyParagraphButton"],"sources":["../../src/CopyParagraphButton/index.tsx"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport CopyParagraphButton from \"./CopyParagraphButton\";\n\nexport { CopyParagraphButton };\nexport default CopyParagraphButton;\n"],"mappings":";;;AAWA,oCAAeA"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { Text } from "@ndla/primitives";
|
|
3
|
-
import { styled } from "@ndla/styled-system/jsx";
|
|
4
|
-
import { SafeLink } from "@ndla/safelink";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/ErrorMessage/ErrorMessage.tsx
|
|
8
|
-
const StyledErrorMessage = styled("article", { base: {
|
|
9
|
-
textAlign: "center",
|
|
10
|
-
"& a": { color: "text.strong" },
|
|
11
|
-
"& h1": { marginTop: "0" }
|
|
12
|
-
} });
|
|
13
|
-
const IllustrationWrapper = styled("div", { base: {
|
|
14
|
-
display: "flex",
|
|
15
|
-
justifyContent: "center",
|
|
16
|
-
marginBottom: "medium",
|
|
17
|
-
tablet: { marginTop: "xxlarge" }
|
|
18
|
-
} });
|
|
19
|
-
const Description = styled(Text, { base: {
|
|
20
|
-
marginBottom: "medium",
|
|
21
|
-
tablet: { marginBottom: "xxlarge" }
|
|
22
|
-
} });
|
|
23
|
-
const CustomElementWrapper = styled("div", { base: { marginBlock: "xxlarge" } });
|
|
24
|
-
const MessageWrapper = styled("div", { base: { marginTop: "3xsmall" } });
|
|
25
|
-
const ErrorMessage = ({ children, messages, illustration, illustrationElement, customElement }) => /* @__PURE__ */ jsxs(StyledErrorMessage, { children: [
|
|
26
|
-
!!illustration && /* @__PURE__ */ jsx(IllustrationWrapper, { children: /* @__PURE__ */ jsx("img", {
|
|
27
|
-
src: illustration.url,
|
|
28
|
-
alt: illustration.altText
|
|
29
|
-
}) }),
|
|
30
|
-
!!illustrationElement && /* @__PURE__ */ jsx(IllustrationWrapper, { children: illustrationElement }),
|
|
31
|
-
/* @__PURE__ */ jsx("h1", { children: messages.title }),
|
|
32
|
-
!!messages.description && /* @__PURE__ */ jsx(Description, { children: messages.description }),
|
|
33
|
-
!!customElement && /* @__PURE__ */ jsx(CustomElementWrapper, { children: customElement }),
|
|
34
|
-
!!messages.linksTitle && /* @__PURE__ */ jsx("h2", { children: messages.linksTitle }),
|
|
35
|
-
!!messages.back && /* @__PURE__ */ jsx(SafeLink, {
|
|
36
|
-
to: `/#${encodeURI(messages.back)}`,
|
|
37
|
-
onClick: () => window.history.back(),
|
|
38
|
-
children: messages.back
|
|
39
|
-
}),
|
|
40
|
-
!!messages.goToFrontPage && /* @__PURE__ */ jsx(MessageWrapper, { children: /* @__PURE__ */ jsx(SafeLink, {
|
|
41
|
-
to: "/",
|
|
42
|
-
children: messages.goToFrontPage
|
|
43
|
-
}) }),
|
|
44
|
-
!!messages.logInFailed && /* @__PURE__ */ jsx(MessageWrapper, { children: /* @__PURE__ */ jsx(SafeLink, {
|
|
45
|
-
to: "/minndla",
|
|
46
|
-
children: messages.logInFailed
|
|
47
|
-
}) }),
|
|
48
|
-
children
|
|
49
|
-
] });
|
|
50
|
-
var ErrorMessage_default = ErrorMessage;
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
export { ErrorMessage_default as ErrorMessage_default$1 };
|
|
54
|
-
//# sourceMappingURL=ErrorMessage.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorMessage.mjs","names":[],"sources":["../../src/ErrorMessage/ErrorMessage.tsx"],"sourcesContent":["/**\n * Copyright (c) 2019-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ReactNode } from \"react\";\nimport { Text } from \"@ndla/primitives\";\nimport { SafeLink } from \"@ndla/safelink\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\n// TODO: This has not been redesignet yet. This is just a rewrite of the previous design in panda\n\nconst StyledErrorMessage = styled(\"article\", {\n base: {\n textAlign: \"center\",\n \"& a\": {\n color: \"text.strong\",\n },\n \"& h1\": {\n marginTop: \"0\",\n },\n },\n});\n\nconst IllustrationWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n justifyContent: \"center\",\n marginBottom: \"medium\",\n tablet: {\n marginTop: \"xxlarge\",\n },\n },\n});\n\nconst Description = styled(Text, {\n base: {\n marginBottom: \"medium\",\n tablet: {\n marginBottom: \"xxlarge\",\n },\n },\n});\n\nconst CustomElementWrapper = styled(\"div\", {\n base: {\n marginBlock: \"xxlarge\",\n },\n});\n\nconst MessageWrapper = styled(\"div\", {\n base: {\n marginTop: \"3xsmall\",\n },\n});\n\ninterface Props {\n messages: {\n title: string;\n description?: string;\n linksTitle?: string;\n back?: string;\n goToFrontPage?: string;\n logInFailed?: string;\n };\n illustration?: {\n url: string;\n altText: string;\n };\n illustrationElement?: ReactNode;\n customElement?: ReactNode;\n children?: ReactNode;\n}\nexport const ErrorMessage = ({ children, messages, illustration, illustrationElement, customElement }: Props) => (\n <StyledErrorMessage>\n {!!illustration && (\n <IllustrationWrapper>\n <img src={illustration.url} alt={illustration.altText} />\n </IllustrationWrapper>\n )}\n {!!illustrationElement && <IllustrationWrapper>{illustrationElement}</IllustrationWrapper>}\n <h1>{messages.title}</h1>\n {!!messages.description && <Description>{messages.description}</Description>}\n {!!customElement && <CustomElementWrapper>{customElement}</CustomElementWrapper>}\n {!!messages.linksTitle && <h2>{messages.linksTitle}</h2>}\n {!!messages.back && (\n <SafeLink to={`/#${encodeURI(messages.back)}`} onClick={() => window.history.back()}>\n {messages.back}\n </SafeLink>\n )}\n {!!messages.goToFrontPage && (\n <MessageWrapper>\n <SafeLink to=\"/\">{messages.goToFrontPage}</SafeLink>\n </MessageWrapper>\n )}\n {!!messages.logInFailed && (\n <MessageWrapper>\n <SafeLink to=\"/minndla\">{messages.logInFailed}</SafeLink>\n </MessageWrapper>\n )}\n {children}\n </StyledErrorMessage>\n);\n\nexport default ErrorMessage;\n"],"mappings":";;;;;;;AAeA,MAAM,qBAAqB,OAAO,WAAW,EAC3C,MAAM;CACJ,WAAW;CACX,OAAO,EACL,OAAO,cACR;CACD,QAAQ,EACN,WAAW,IACZ;AACF,EACF,EAAC;AAEF,MAAM,sBAAsB,OAAO,OAAO,EACxC,MAAM;CACJ,SAAS;CACT,gBAAgB;CAChB,cAAc;CACd,QAAQ,EACN,WAAW,UACZ;AACF,EACF,EAAC;AAEF,MAAM,cAAc,OAAO,MAAM,EAC/B,MAAM;CACJ,cAAc;CACd,QAAQ,EACN,cAAc,UACf;AACF,EACF,EAAC;AAEF,MAAM,uBAAuB,OAAO,OAAO,EACzC,MAAM,EACJ,aAAa,UACd,EACF,EAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM,EACJ,WAAW,UACZ,EACF,EAAC;AAmBF,MAAa,eAAe,CAAC,EAAE,UAAU,UAAU,cAAc,qBAAqB,eAAsB,qBAC1G,KAAC;GACI,gCACD,IAAC,iDACC,IAAC;EAAI,KAAK,aAAa;EAAK,KAAK,aAAa;GAAW,GACrC;GAErB,uCAAuB,IAAC,iCAAqB,sBAA0C;iBAC1F,IAAC,kBAAI,SAAS,QAAW;GACtB,SAAS,+BAAe,IAAC,yBAAa,SAAS,cAA0B;GACzE,iCAAiB,IAAC,kCAAsB,gBAAqC;GAC7E,SAAS,8BAAc,IAAC,kBAAI,SAAS,aAAgB;GACrD,SAAS,wBACV,IAAC;EAAS,KAAK,IAAI,UAAU,SAAS,KAAK,CAAC;EAAG,SAAS,MAAM,OAAO,QAAQ,MAAM;YAChF,SAAS;GACD;GAEV,SAAS,iCACV,IAAC,4CACC,IAAC;EAAS,IAAG;YAAK,SAAS;GAAyB,GACrC;GAEhB,SAAS,+BACV,IAAC,4CACC,IAAC;EAAS,IAAG;YAAY,SAAS;GAAuB,GAC1C;CAElB;IACkB;AAGvB,2BAAe"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ErrorMessage_default$1 as ErrorMessage_default } from "./ErrorMessage.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/ErrorMessage/index.ts
|
|
4
|
-
var ErrorMessage_default$1 = ErrorMessage_default;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
export { ErrorMessage_default$1 as ErrorMessage_default };
|
|
8
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["ErrorMessage"],"sources":["../../src/ErrorMessage/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2019-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport ErrorMessage from \"./ErrorMessage\";\n\nexport default ErrorMessage;\n"],"mappings":";;;AAUA,6BAAeA"}
|
package/es/FactBox/index.mjs
DELETED
package/es/FactBox/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["FactBox"],"sources":["../../src/FactBox/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2018-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport FactBox from \"./FactBox\";\n\nexport default FactBox;\n"],"mappings":";;;AAUA,wBAAeA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RelatedArticle, RelatedArticleList } from "./RelatedArticleList.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/RelatedArticleList/index.ts
|
|
4
|
-
var RelatedArticleList_default = RelatedArticleList;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
export { RelatedArticleList_default };
|
|
8
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/RelatedArticleList/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2017-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { RelatedArticle, RelatedArticleList } from \"./RelatedArticleList\";\n\nexport { RelatedArticle };\n\nexport default RelatedArticleList;\n"],"mappings":";;;AAYA,iCAAe"}
|
package/lib/Article/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export { Article, ArticleWrapper, ArticleHeader, ArticleFooter, ArticleTitle, ArticleHGroup, ArticleContent, } from "./Article";
|
|
9
|
-
export { ArticleByline, ArticleBylineAccordionItem } from "./ArticleByline";
|
|
10
|
-
export { ArticleFootNotes } from "./ArticleFootNotes";
|
package/lib/AudioPlayer/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_AudioPlayer_AudioPlayer = require('./AudioPlayer.js');
|
|
2
|
-
|
|
3
|
-
//#region src/AudioPlayer/index.ts
|
|
4
|
-
var AudioPlayer_default$1 = require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_AudioPlayer_AudioPlayer.AudioPlayer_default$1;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
exports.AudioPlayer_default = AudioPlayer_default$1;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["AudioPlayer"],"sources":["../../src/AudioPlayer/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport AudioPlayer from \"./AudioPlayer\";\n\nexport default AudioPlayer;\n"],"mappings":";;;AAUA,4BAAeA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2016-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import Breadcrumb from "./Breadcrumb";
|
|
9
|
-
export type { SimpleBreadcrumbItem, IndexedBreadcrumbItem } from "./BreadcrumbItem";
|
|
10
|
-
export { default as HomeBreadcrumb } from "./HomeBreadcrumb";
|
|
11
|
-
export default Breadcrumb;
|
package/lib/Breadcrumb/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_Breadcrumb_Breadcrumb = require('./Breadcrumb.js');
|
|
2
|
-
const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_Breadcrumb_HomeBreadcrumb = require('./HomeBreadcrumb.js');
|
|
3
|
-
|
|
4
|
-
//#region src/Breadcrumb/index.ts
|
|
5
|
-
var Breadcrumb_default$1 = require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_Breadcrumb_Breadcrumb.Breadcrumb_default$1;
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
exports.Breadcrumb_default = Breadcrumb_default$1;
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Breadcrumb"],"sources":["../../src/Breadcrumb/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2016-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport Breadcrumb from \"./Breadcrumb\";\n\nexport type { SimpleBreadcrumbItem, IndexedBreadcrumbItem } from \"./BreadcrumbItem\";\n\nexport { default as HomeBreadcrumb } from \"./HomeBreadcrumb\";\n\nexport default Breadcrumb;\n"],"mappings":";;;;AAcA,2BAAeA"}
|
package/lib/CodeBlock/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export { default as CodeBlock } from "./CodeBlock";
|
|
9
|
-
export { codeLanguageOptions } from "./codeLanguageOptions";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export { ContactBlock, contactBlockBackgrounds } from "./ContactBlock";
|
|
9
|
-
export type { ContactBlockBackground } from "./ContactBlock";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { type BlockQuoteProps } from "@ndla/primitives";
|
|
9
|
-
import type { ContentType } from "../ContentTypeBadge/ContentTypeBadge";
|
|
10
|
-
export type ContentTypeBlockQuoteVariant = "colored" | "neutral";
|
|
11
|
-
interface Props extends Omit<BlockQuoteProps, "variant"> {
|
|
12
|
-
variant?: ContentTypeBlockQuoteVariant;
|
|
13
|
-
contentType?: ContentType;
|
|
14
|
-
}
|
|
15
|
-
export declare const ContentTypeBlockQuote: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLQuoteElement>>;
|
|
16
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
3
|
-
const __ndla_primitives = require_rolldown_runtime.__toESM(require("@ndla/primitives"));
|
|
4
|
-
const react_jsx_runtime = require_rolldown_runtime.__toESM(require("react/jsx-runtime"));
|
|
5
|
-
|
|
6
|
-
//#region src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx
|
|
7
|
-
const contentTypeToVariantMapping = {
|
|
8
|
-
"subject-material": "brand1",
|
|
9
|
-
"source-material": "brand1",
|
|
10
|
-
concept: "brand1",
|
|
11
|
-
"tasks-and-activities": "brand2",
|
|
12
|
-
"assessment-resources": "brand2"
|
|
13
|
-
};
|
|
14
|
-
const ContentTypeBlockQuote = (0, react.forwardRef)(({ variant, contentType,...props }, ref) => {
|
|
15
|
-
const color = contentType ? contentTypeToVariantMapping[contentType] ?? "brand1" : "brand1";
|
|
16
|
-
const variantColor = variant === "colored" ? color : void 0;
|
|
17
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ndla_primitives.BlockQuote, {
|
|
18
|
-
...props,
|
|
19
|
-
variant: variantColor,
|
|
20
|
-
ref
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
exports.ContentTypeBlockQuote = ContentTypeBlockQuote;
|
|
26
|
-
//# sourceMappingURL=ContentTypeBlockQuote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeBlockQuote.js","names":["BlockQuote"],"sources":["../../src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { BlockQuote, type BlockQuoteProps, type BlockQuoteVariantProps } from \"@ndla/primitives\";\nimport type { ContentType } from \"../ContentTypeBadge/ContentTypeBadge\";\n\nexport type ContentTypeBlockQuoteVariant = \"colored\" | \"neutral\";\n\nconst contentTypeToVariantMapping = {\n \"subject-material\": \"brand1\",\n \"source-material\": \"brand1\",\n concept: \"brand1\",\n \"tasks-and-activities\": \"brand2\",\n \"assessment-resources\": \"brand2\",\n} as Record<ContentType, NonNullable<BlockQuoteVariantProps>[\"variant\"]>;\n\ninterface Props extends Omit<BlockQuoteProps, \"variant\"> {\n variant?: ContentTypeBlockQuoteVariant;\n contentType?: ContentType;\n}\n\nexport const ContentTypeBlockQuote = forwardRef<HTMLQuoteElement, Props>(({ variant, contentType, ...props }, ref) => {\n const color = contentType ? (contentTypeToVariantMapping[contentType] ?? \"brand1\") : \"brand1\";\n const variantColor = variant === \"colored\" ? color : undefined;\n return <BlockQuote {...props} variant={variantColor} ref={ref} />;\n});\n"],"mappings":";;;;;;AAcA,MAAM,8BAA8B;CAClC,oBAAoB;CACpB,mBAAmB;CACnB,SAAS;CACT,wBAAwB;CACxB,wBAAwB;AACzB;AAOD,MAAa,wBAAwB,sBAAoC,CAAC,EAAE,SAAS,YAAa,GAAG,OAAO,EAAE,QAAQ;CACpH,MAAM,QAAQ,cAAe,4BAA4B,gBAAgB,WAAY;CACrF,MAAM,eAAe,YAAY,YAAY;AAC7C,wBAAO,2BAACA;EAAW,GAAI;EAAO,SAAS;EAAmB;GAAO;AAClE,EAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { type FramedContentProps } from "@ndla/primitives";
|
|
9
|
-
import type { ContentType } from "..";
|
|
10
|
-
export type ContentTypeFramedContentVariant = "colored" | "neutral";
|
|
11
|
-
interface Props extends FramedContentProps {
|
|
12
|
-
variant?: ContentTypeFramedContentVariant;
|
|
13
|
-
contentType?: ContentType;
|
|
14
|
-
}
|
|
15
|
-
export declare const ContentTypeFramedContent: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
3
|
-
const __ndla_primitives = require_rolldown_runtime.__toESM(require("@ndla/primitives"));
|
|
4
|
-
const react_jsx_runtime = require_rolldown_runtime.__toESM(require("react/jsx-runtime"));
|
|
5
|
-
|
|
6
|
-
//#region src/ContentTypeFramedContent/ContentTypeFramedContent.tsx
|
|
7
|
-
const contentTypeToVariantMapping = {
|
|
8
|
-
"subject-material": "brand1",
|
|
9
|
-
"source-material": "brand1",
|
|
10
|
-
concept: "brand1",
|
|
11
|
-
"tasks-and-activities": "brand2",
|
|
12
|
-
"assessment-resources": "brand2"
|
|
13
|
-
};
|
|
14
|
-
const ContentTypeFramedContent = (0, react.forwardRef)(({ variant = "neutral", contentType,...props }, ref) => {
|
|
15
|
-
const color = contentType ? contentTypeToVariantMapping[contentType] ?? "brand1" : "brand1";
|
|
16
|
-
const variantColor = variant === "colored" ? color : void 0;
|
|
17
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ndla_primitives.FramedContent, {
|
|
18
|
-
...props,
|
|
19
|
-
colorTheme: variantColor,
|
|
20
|
-
ref
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
exports.ContentTypeFramedContent = ContentTypeFramedContent;
|
|
26
|
-
//# sourceMappingURL=ContentTypeFramedContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeFramedContent.js","names":["FramedContent"],"sources":["../../src/ContentTypeFramedContent/ContentTypeFramedContent.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { FramedContent, type FramedContentProps, type FramedContentVariantProps } from \"@ndla/primitives\";\nimport type { ContentType } from \"..\";\n\nconst contentTypeToVariantMapping = {\n \"subject-material\": \"brand1\",\n \"source-material\": \"brand1\",\n concept: \"brand1\",\n \"tasks-and-activities\": \"brand2\",\n \"assessment-resources\": \"brand2\",\n} as Record<ContentType, NonNullable<FramedContentVariantProps>[\"colorTheme\"]>;\n\nexport type ContentTypeFramedContentVariant = \"colored\" | \"neutral\";\n\ninterface Props extends FramedContentProps {\n variant?: ContentTypeFramedContentVariant;\n contentType?: ContentType;\n}\n\nexport const ContentTypeFramedContent = forwardRef<HTMLDivElement, Props>(\n ({ variant = \"neutral\", contentType, ...props }, ref) => {\n const color = contentType ? (contentTypeToVariantMapping[contentType] ?? \"brand1\") : \"brand1\";\n const variantColor = variant === \"colored\" ? color : undefined;\n return <FramedContent {...props} colorTheme={variantColor} ref={ref} />;\n },\n);\n"],"mappings":";;;;;;AAYA,MAAM,8BAA8B;CAClC,oBAAoB;CACpB,mBAAmB;CACnB,SAAS;CACT,wBAAwB;CACxB,wBAAwB;AACzB;AASD,MAAa,2BAA2B,sBACtC,CAAC,EAAE,UAAU,WAAW,YAAa,GAAG,OAAO,EAAE,QAAQ;CACvD,MAAM,QAAQ,cAAe,4BAA4B,gBAAgB,WAAY;CACrF,MAAM,eAAe,YAAY,YAAY;AAC7C,wBAAO,2BAACA;EAAc,GAAI;EAAO,YAAY;EAAmB;GAAO;AACxE,EACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { type HeroProps, type HeroVariant } from "@ndla/primitives";
|
|
9
|
-
import type { ContentType } from "../ContentTypeBadge/ContentTypeBadge";
|
|
10
|
-
export declare const contentTypeToHeroMap: Record<ContentType, HeroVariant>;
|
|
11
|
-
export interface ContentTypeHeroProps extends HeroProps {
|
|
12
|
-
contentType: ContentType | undefined;
|
|
13
|
-
}
|
|
14
|
-
export declare const ContentTypeHero: import("react").ForwardRefExoticComponent<ContentTypeHeroProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType = require('../model/ContentType.js');
|
|
3
|
-
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
4
|
-
const __ndla_primitives = require_rolldown_runtime.__toESM(require("@ndla/primitives"));
|
|
5
|
-
const react_jsx_runtime = require_rolldown_runtime.__toESM(require("react/jsx-runtime"));
|
|
6
|
-
|
|
7
|
-
//#region src/ContentTypeHero/ContentTypeHero.tsx
|
|
8
|
-
const contentTypeToHeroMap = {
|
|
9
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.SUBJECT_MATERIAL]: "primary",
|
|
10
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.TASKS_AND_ACTIVITIES]: "brand2Bold",
|
|
11
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.ASSESSMENT_RESOURCES]: "brand2",
|
|
12
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.SUBJECT]: "primary",
|
|
13
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.SOURCE_MATERIAL]: "brand1",
|
|
14
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.LEARNING_PATH]: "primary",
|
|
15
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.TOPIC]: "neutral",
|
|
16
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.MULTIDISCIPLINARY]: "primary",
|
|
17
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.CONCEPT]: "brand1Moderate",
|
|
18
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.EXTERNAL]: "primary",
|
|
19
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.IMAGE]: "primary",
|
|
20
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.AUDIO]: "primary",
|
|
21
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.PODCAST]: "primary",
|
|
22
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.VIDEO]: "primary",
|
|
23
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.MISSING]: "neutral",
|
|
24
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.GLOSS]: "brand1Moderate",
|
|
25
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.PROGRAMME]: "primary",
|
|
26
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.PODCAST_SERIES]: "primary",
|
|
27
|
-
[require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.FRONTPAGE_ARTICLE]: "primary"
|
|
28
|
-
};
|
|
29
|
-
const ContentTypeHero = (0, react.forwardRef)(({ contentType, children,...props }, ref) => {
|
|
30
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ndla_primitives.Hero, {
|
|
31
|
-
variant: contentTypeToHeroMap[contentType ?? "missing"] ?? contentTypeToHeroMap["missing"],
|
|
32
|
-
...props,
|
|
33
|
-
ref,
|
|
34
|
-
children
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
exports.ContentTypeHero = ContentTypeHero;
|
|
40
|
-
//# sourceMappingURL=ContentTypeHero.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeHero.js","names":["contentTypeToHeroMap: Record<ContentType, HeroVariant>","Hero"],"sources":["../../src/ContentTypeHero/ContentTypeHero.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { Hero, type HeroProps, type HeroVariant } from \"@ndla/primitives\";\nimport type { ContentType } from \"../ContentTypeBadge/ContentTypeBadge\";\nimport * as contentTypes from \"../model/ContentType\";\n\nexport const contentTypeToHeroMap: Record<ContentType, HeroVariant> = {\n [contentTypes.SUBJECT_MATERIAL]: \"primary\",\n [contentTypes.TASKS_AND_ACTIVITIES]: \"brand2Bold\",\n [contentTypes.ASSESSMENT_RESOURCES]: \"brand2\",\n // This will never happen\n [contentTypes.SUBJECT]: \"primary\",\n [contentTypes.SOURCE_MATERIAL]: \"brand1\",\n // This will never happen\n [contentTypes.LEARNING_PATH]: \"primary\",\n [contentTypes.TOPIC]: \"neutral\",\n [contentTypes.MULTIDISCIPLINARY]: \"primary\",\n [contentTypes.CONCEPT]: \"brand1Moderate\",\n [contentTypes.EXTERNAL]: \"primary\",\n [contentTypes.IMAGE]: \"primary\",\n [contentTypes.AUDIO]: \"primary\",\n [contentTypes.PODCAST]: \"primary\",\n [contentTypes.VIDEO]: \"primary\",\n [contentTypes.MISSING]: \"neutral\",\n [contentTypes.GLOSS]: \"brand1Moderate\",\n // this will never happen\n [contentTypes.PROGRAMME]: \"primary\",\n // this will never happen\n [contentTypes.PODCAST_SERIES]: \"primary\",\n [contentTypes.FRONTPAGE_ARTICLE]: \"primary\",\n};\n\nexport interface ContentTypeHeroProps extends HeroProps {\n contentType: ContentType | undefined;\n}\n\nexport const ContentTypeHero = forwardRef<HTMLDivElement, ContentTypeHeroProps>(\n ({ contentType, children, ...props }, ref) => {\n return (\n <Hero\n variant={contentTypeToHeroMap[contentType ?? \"missing\"] ?? contentTypeToHeroMap[\"missing\"]}\n {...props}\n ref={ref}\n >\n {children}\n </Hero>\n );\n },\n);\n"],"mappings":";;;;;;;AAaA,MAAaA,uBAAyD;2GACnC;+GACI;+GACA;kGAEb;0GACQ;wGAEF;gGACR;4GACY;kGACV;mGACC;gGACH;gGACA;kGACE;gGACF;kGACE;gGACF;oGAEI;yGAEK;4GACG;AACnC;AAMD,MAAa,kBAAkB,sBAC7B,CAAC,EAAE,aAAa,SAAU,GAAG,OAAO,EAAE,QAAQ;AAC5C,wBACE,2BAACC;EACC,SAAS,qBAAqB,eAAe,cAAc,qBAAqB;EAChF,GAAI;EACC;EAEJ;GACI;AAEV,EACF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export { ContentTypeHero } from "./ContentTypeHero";
|
|
9
|
-
export type { ContentTypeHeroProps } from "./ContentTypeHero";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2021-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import CopyParagraphButton from "./CopyParagraphButton";
|
|
9
|
-
export { CopyParagraphButton };
|
|
10
|
-
export default CopyParagraphButton;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_CopyParagraphButton_CopyParagraphButton = require('./CopyParagraphButton.js');
|
|
2
|
-
|
|
3
|
-
//#region src/CopyParagraphButton/index.tsx
|
|
4
|
-
var CopyParagraphButton_default$1 = require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_CopyParagraphButton_CopyParagraphButton.CopyParagraphButton_default$1;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
exports.CopyParagraphButton_default = CopyParagraphButton_default$1;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CopyParagraphButton"],"sources":["../../src/CopyParagraphButton/index.tsx"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport CopyParagraphButton from \"./CopyParagraphButton\";\n\nexport { CopyParagraphButton };\nexport default CopyParagraphButton;\n"],"mappings":";;;AAWA,oCAAeA"}
|
package/lib/Embed/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export { default as ImageEmbed, getCrop, getFocalPoint } from "./ImageEmbed";
|
|
9
|
-
export { InlineTriggerButton } from "./InlineTriggerButton";
|
|
10
|
-
export { default as AudioEmbed } from "./AudioEmbed";
|
|
11
|
-
export { default as H5pEmbed } from "./H5pEmbed";
|
|
12
|
-
export { default as ExternalEmbed } from "./ExternalEmbed";
|
|
13
|
-
export { default as IframeEmbed } from "./IframeEmbed";
|
|
14
|
-
export { default as FootnoteEmbed } from "./FootnoteEmbed";
|
|
15
|
-
export { default as BrightcoveEmbed } from "./BrightcoveEmbed";
|
|
16
|
-
export { default as ContentLinkEmbed } from "./ContentLinkEmbed";
|
|
17
|
-
export { default as RelatedContentEmbed } from "./RelatedContentEmbed";
|
|
18
|
-
export { ConceptEmbed, InlineConcept, BlockConcept } from "./ConceptEmbed";
|
|
19
|
-
export type { InlineConceptProps, BlockConceptProps } from "./ConceptEmbed";
|
|
20
|
-
export { default as UnknownEmbed } from "./UnknownEmbed";
|
|
21
|
-
export { default as UuDisclaimerEmbed } from "./UuDisclaimerEmbed";
|
|
22
|
-
export { default as CopyrightEmbed } from "./CopyrightEmbed";
|
|
23
|
-
export { default as CodeEmbed } from "./CodeEmbed";
|
|
24
|
-
export type { HeartButtonType, CanonicalUrlFuncs, RenderContext } from "./types";
|
|
25
|
-
export { EmbedWrapper } from "./EmbedWrapper";
|
|
26
|
-
export type { EmbedWrapperVariantProps, EmbedWrapperProps } from "./EmbedWrapper";
|
|
27
|
-
export { ConceptInlineTriggerButton } from "./ConceptInlineTriggerButton";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2019-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { type ReactNode } from "react";
|
|
9
|
-
interface Props {
|
|
10
|
-
messages: {
|
|
11
|
-
title: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
linksTitle?: string;
|
|
14
|
-
back?: string;
|
|
15
|
-
goToFrontPage?: string;
|
|
16
|
-
logInFailed?: string;
|
|
17
|
-
};
|
|
18
|
-
illustration?: {
|
|
19
|
-
url: string;
|
|
20
|
-
altText: string;
|
|
21
|
-
};
|
|
22
|
-
illustrationElement?: ReactNode;
|
|
23
|
-
customElement?: ReactNode;
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
}
|
|
26
|
-
export declare const ErrorMessage: ({ children, messages, illustration, illustrationElement, customElement }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export default ErrorMessage;
|