@ndla/ui 55.0.13-alpha.0 → 55.0.15-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 +142 -1
- package/dist/styles.css +597 -0
- package/es/Article/ArticleByline.js +7 -7
- package/es/Article/ArticleParagraph.js +11 -13
- package/es/AudioPlayer/AudioPlayer.js +1 -0
- package/es/CampaignBlock/CampaignBlock.js +103 -68
- package/es/Concept/Concept.js +69 -0
- package/es/ContactBlock/ContactBlock.js +17 -17
- package/es/ContentTypeBadge/ContentTypeBadgeNew.js +48 -0
- package/es/Embed/AudioEmbed.js +1 -2
- package/es/Embed/BrightcoveEmbed.js +13 -25
- package/es/Embed/ConceptEmbed.js +57 -301
- package/es/Embed/ConceptListEmbed.js +18 -24
- package/es/Embed/ContentLinkEmbed.js +10 -10
- package/es/Embed/CopyrightEmbed.js +3 -21
- package/es/Embed/ExternalEmbed.js +10 -18
- package/es/Embed/FootnoteEmbed.js +11 -8
- package/es/Embed/GlossEmbed.js +68 -0
- package/es/Embed/H5pEmbed.js +19 -19
- package/es/Embed/IframeEmbed.js +9 -6
- package/es/Embed/InlineTriggerButton.js +70 -0
- package/es/Embed/UnknownEmbed.js +9 -9
- package/es/Embed/UuDisclaimerEmbed.js +14 -25
- package/es/Embed/index.js +1 -3
- package/es/ErrorMessage/ErrorMessage.js +41 -22
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +8 -6
- package/es/FactBox/FactBox.js +118 -47
- package/es/FileList/PdfFile.js +23 -5
- package/es/Gloss/Gloss.js +116 -86
- package/es/Gloss/GlossExample.js +49 -51
- package/es/LicenseByline/EmbedByline.js +143 -33
- package/es/LicenseByline/LicenseLink.js +16 -9
- package/es/LicenseByline/index.js +2 -2
- package/es/LinkBlock/LinkBlock.js +61 -33
- package/es/LinkBlock/LinkBlockSection.js +9 -6
- package/es/Logo/Logo.js +1 -30
- package/es/RelatedArticleList/RelatedArticleList.js +70 -87
- package/es/ResourceBox/ResourceBox.js +65 -37
- package/es/TagSelector/TagSelector.js +124 -131
- package/es/i18n/index.js +2 -1
- package/es/i18n/useComponentTranslations.js +83 -0
- package/es/index.js +4 -12
- package/es/locale/messages-en.js +30 -4
- package/es/locale/messages-nb.js +30 -4
- package/es/locale/messages-nn.js +30 -4
- package/es/locale/messages-se.js +30 -4
- package/es/locale/messages-sma.js +30 -4
- package/es/model/ContentType.js +3 -0
- package/es/styles.css +597 -0
- package/lib/Article/ArticleByline.js +8 -8
- package/lib/Article/ArticleParagraph.js +12 -14
- package/lib/AudioPlayer/AudioPlayer.js +1 -0
- package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
- package/lib/CampaignBlock/CampaignBlock.js +106 -68
- package/lib/Concept/Concept.d.ts +18 -0
- package/lib/Concept/Concept.js +75 -0
- package/lib/ContactBlock/ContactBlock.js +18 -18
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +17 -0
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +56 -0
- package/lib/Embed/AudioEmbed.js +2 -3
- package/lib/Embed/BrightcoveEmbed.d.ts +1 -2
- package/lib/Embed/BrightcoveEmbed.js +16 -26
- package/lib/Embed/ConceptEmbed.d.ts +15 -21
- package/lib/Embed/ConceptEmbed.js +58 -301
- package/lib/Embed/ConceptListEmbed.js +21 -26
- package/lib/Embed/ContentLinkEmbed.js +10 -11
- package/lib/Embed/CopyrightEmbed.js +5 -22
- package/lib/Embed/ExternalEmbed.d.ts +1 -2
- package/lib/Embed/ExternalEmbed.js +13 -19
- package/lib/Embed/FootnoteEmbed.js +11 -9
- package/lib/Embed/GlossEmbed.d.ts +13 -0
- package/lib/Embed/GlossEmbed.js +76 -0
- package/lib/Embed/H5pEmbed.d.ts +1 -2
- package/lib/Embed/H5pEmbed.js +21 -19
- package/lib/Embed/IframeEmbed.d.ts +1 -2
- package/lib/Embed/IframeEmbed.js +11 -8
- package/lib/Embed/InlineTriggerButton.d.ts +11 -0
- package/lib/Embed/InlineTriggerButton.js +76 -0
- package/lib/Embed/UnknownEmbed.js +9 -10
- package/lib/Embed/UuDisclaimerEmbed.js +16 -26
- package/lib/Embed/index.d.ts +2 -3
- package/lib/Embed/index.js +2 -9
- package/lib/ErrorMessage/ErrorMessage.js +40 -23
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +7 -6
- package/lib/FactBox/FactBox.d.ts +0 -1
- package/lib/FactBox/FactBox.js +119 -46
- package/lib/FileList/PdfFile.js +23 -5
- package/lib/Gloss/Gloss.d.ts +10 -2
- package/lib/Gloss/Gloss.js +116 -85
- package/lib/Gloss/GlossExample.d.ts +3 -5
- package/lib/Gloss/GlossExample.js +49 -52
- package/lib/LicenseByline/EmbedByline.d.ts +2 -4
- package/lib/LicenseByline/EmbedByline.js +145 -35
- package/lib/LicenseByline/LicenseLink.d.ts +2 -2
- package/lib/LicenseByline/LicenseLink.js +16 -9
- package/lib/LicenseByline/index.d.ts +2 -2
- package/lib/LicenseByline/index.js +4 -5
- package/lib/LinkBlock/LinkBlock.js +62 -34
- package/lib/LinkBlock/LinkBlockSection.js +9 -7
- package/lib/Logo/Logo.d.ts +1 -3
- package/lib/Logo/Logo.js +2 -30
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +4 -4
- package/lib/RelatedArticleList/RelatedArticleList.js +74 -90
- package/lib/ResourceBox/ResourceBox.js +64 -37
- package/lib/TagSelector/TagSelector.d.ts +27 -12
- package/lib/TagSelector/TagSelector.js +126 -131
- package/lib/i18n/index.d.ts +1 -0
- package/lib/i18n/index.js +20 -1
- package/lib/i18n/useComponentTranslations.d.ts +14 -0
- package/lib/i18n/useComponentTranslations.js +93 -0
- package/lib/index.d.ts +5 -15
- package/lib/index.js +70 -102
- package/lib/locale/messages-en.d.ts +26 -0
- package/lib/locale/messages-en.js +30 -4
- package/lib/locale/messages-nb.d.ts +26 -0
- package/lib/locale/messages-nb.js +30 -4
- package/lib/locale/messages-nn.d.ts +26 -0
- package/lib/locale/messages-nn.js +30 -4
- package/lib/locale/messages-se.d.ts +26 -0
- package/lib/locale/messages-se.js +30 -4
- package/lib/locale/messages-sma.d.ts +26 -0
- package/lib/locale/messages-sma.js +30 -4
- package/lib/model/ContentType.d.ts +3 -0
- package/lib/model/ContentType.js +4 -1
- package/lib/styles.css +597 -0
- package/package.json +11 -13
- package/src/Article/ArticleByline.tsx +1 -1
- package/src/Article/ArticleParagraph.tsx +11 -9
- package/src/AudioPlayer/AudioPlayer.tsx +1 -0
- package/src/CampaignBlock/CampaignBlock.tsx +92 -55
- package/src/Concept/Concept.stories.tsx +142 -0
- package/src/Concept/Concept.tsx +73 -0
- package/src/ContactBlock/ContactBlock.tsx +1 -1
- package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +70 -0
- package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +69 -0
- package/src/Embed/AudioEmbed.tsx +2 -2
- package/src/Embed/BrightcoveEmbed.stories.tsx +0 -3
- package/src/Embed/BrightcoveEmbed.tsx +18 -20
- package/src/Embed/ConceptEmbed.stories.tsx +1 -105
- package/src/Embed/ConceptEmbed.tsx +60 -385
- package/src/Embed/ConceptListEmbed.tsx +20 -19
- package/src/Embed/ContentLinkEmbed.tsx +8 -10
- package/src/Embed/CopyrightEmbed.tsx +1 -11
- package/src/Embed/ExternalEmbed.tsx +14 -17
- package/src/Embed/FootnoteEmbed.stories.tsx +2 -5
- package/src/Embed/FootnoteEmbed.tsx +13 -16
- package/src/Embed/GlossEmbed.stories.tsx +140 -0
- package/src/Embed/GlossEmbed.tsx +64 -0
- package/src/Embed/H5pEmbed.tsx +22 -16
- package/src/Embed/IframeEmbed.tsx +12 -6
- package/src/Embed/InlineTriggerButton.tsx +72 -0
- package/src/Embed/UnknownEmbed.tsx +6 -7
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +4 -4
- package/src/Embed/UuDisclaimerEmbed.tsx +17 -25
- package/src/Embed/index.ts +2 -3
- package/src/ErrorMessage/ErrorMessage.tsx +40 -29
- package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +8 -6
- package/src/FactBox/FactBox.tsx +115 -115
- package/src/FactBox/Factbox.stories.tsx +43 -27
- package/src/FileList/FileList.stories.tsx +6 -1
- package/src/FileList/PdfFile.tsx +22 -5
- package/src/Gloss/Gloss.stories.tsx +107 -1
- package/src/Gloss/Gloss.tsx +143 -156
- package/src/Gloss/GlossExample.tsx +51 -77
- package/src/LicenseByline/EmbedByline.stories.tsx +9 -4
- package/src/LicenseByline/EmbedByline.tsx +139 -53
- package/src/LicenseByline/LicenseLink.tsx +15 -15
- package/src/LicenseByline/index.tsx +2 -2
- package/src/LinkBlock/LinkBlock.stories.tsx +8 -10
- package/src/LinkBlock/LinkBlock.tsx +54 -59
- package/src/LinkBlock/LinkBlockSection.tsx +9 -12
- package/src/Logo/Logo.stories.tsx +0 -1
- package/src/Logo/Logo.tsx +2 -30
- package/src/RelatedArticleList/RelatedArticleList.tsx +69 -88
- package/src/ResourceBox/ResourceBox.tsx +63 -59
- package/src/TagSelector/TagSelector.stories.tsx +92 -68
- package/src/TagSelector/TagSelector.tsx +161 -126
- package/src/i18n/index.ts +5 -0
- package/src/i18n/useComponentTranslations.ts +72 -0
- package/src/index.ts +23 -19
- package/src/locale/messages-en.ts +28 -2
- package/src/locale/messages-nb.ts +28 -2
- package/src/locale/messages-nn.ts +28 -2
- package/src/locale/messages-se.ts +28 -2
- package/src/locale/messages-sma.ts +28 -2
- package/src/model/ContentType.ts +3 -0
- package/es/DefinitionList/DefinitionDescription.js +0 -28
- package/es/DefinitionList/DefinitionTerm.js +0 -28
- package/es/DefinitionList/index.js +0 -10
- package/es/Embed/conceptComponents.js +0 -155
- package/es/ExpandableBox/ExpandableBox.js +0 -29
- package/es/ExpandableBox/index.js +0 -9
- package/es/Figure/Figure.js +0 -73
- package/es/Figure/index.js +0 -9
- package/es/FramedContent/FramedContent.js +0 -28
- package/es/FramedContent/index.js +0 -10
- package/es/Image/Image.js +0 -99
- package/es/Image/ImageLink.js +0 -39
- package/es/Image/index.js +0 -12
- package/es/LetterFilter/LetterFilter.js +0 -54
- package/es/LetterFilter/alphabet.js +0 -9
- package/es/LetterFilter/index.js +0 -10
- package/es/LicenseByline/LicenseDescription.js +0 -63
- package/es/List/OrderedList.js +0 -41
- package/es/List/UnOrderedList.js +0 -28
- package/es/List/index.js +0 -10
- package/es/Notion/Notion.js +0 -76
- package/es/Notion/NotionImage.js +0 -46
- package/es/Notion/index.js +0 -9
- package/es/Table/Table.js +0 -141
- package/es/Table/index.js +0 -11
- package/es/TagSelector/Control.js +0 -28
- package/es/TagSelector/DropdownIndicator.js +0 -60
- package/es/TagSelector/Input.js +0 -22
- package/es/TagSelector/Menu.js +0 -27
- package/es/TagSelector/MenuList.js +0 -28
- package/es/TagSelector/Option.js +0 -60
- package/es/TagSelector/SelectContainer.js +0 -27
- package/es/TagSelector/ValueButton.js +0 -53
- package/es/TagSelector/ariaMessages.js +0 -94
- package/es/TagSelector/index.js +0 -10
- package/es/TagSelector/types.js +0 -1
- package/lib/DefinitionList/DefinitionDescription.d.ts +0 -10
- package/lib/DefinitionList/DefinitionDescription.js +0 -35
- package/lib/DefinitionList/DefinitionTerm.d.ts +0 -10
- package/lib/DefinitionList/DefinitionTerm.js +0 -35
- package/lib/DefinitionList/index.d.ts +0 -9
- package/lib/DefinitionList/index.js +0 -20
- package/lib/Embed/conceptComponents.d.ts +0 -40
- package/lib/Embed/conceptComponents.js +0 -163
- package/lib/ExpandableBox/ExpandableBox.d.ts +0 -15
- package/lib/ExpandableBox/ExpandableBox.js +0 -37
- package/lib/ExpandableBox/index.d.ts +0 -8
- package/lib/ExpandableBox/index.js +0 -18
- package/lib/Figure/Figure.d.ts +0 -16
- package/lib/Figure/Figure.js +0 -81
- package/lib/Figure/index.d.ts +0 -9
- package/lib/Figure/index.js +0 -13
- package/lib/FramedContent/FramedContent.d.ts +0 -12
- package/lib/FramedContent/FramedContent.js +0 -35
- package/lib/FramedContent/index.d.ts +0 -9
- package/lib/FramedContent/index.js +0 -16
- package/lib/Image/Image.d.ts +0 -38
- package/lib/Image/Image.js +0 -105
- package/lib/Image/ImageLink.d.ts +0 -18
- package/lib/Image/ImageLink.js +0 -44
- package/lib/Image/index.d.ts +0 -12
- package/lib/Image/index.js +0 -30
- package/lib/LetterFilter/LetterFilter.d.ts +0 -14
- package/lib/LetterFilter/LetterFilter.js +0 -61
- package/lib/LetterFilter/alphabet.d.ts +0 -8
- package/lib/LetterFilter/alphabet.js +0 -15
- package/lib/LetterFilter/index.d.ts +0 -9
- package/lib/LetterFilter/index.js +0 -16
- package/lib/LicenseByline/LicenseDescription.d.ts +0 -15
- package/lib/LicenseByline/LicenseDescription.js +0 -70
- package/lib/List/OrderedList.d.ts +0 -16
- package/lib/List/OrderedList.js +0 -48
- package/lib/List/UnOrderedList.d.ts +0 -10
- package/lib/List/UnOrderedList.js +0 -35
- package/lib/List/index.d.ts +0 -9
- package/lib/List/index.js +0 -20
- package/lib/Notion/Notion.d.ts +0 -20
- package/lib/Notion/Notion.js +0 -82
- package/lib/Notion/NotionImage.d.ts +0 -13
- package/lib/Notion/NotionImage.js +0 -54
- package/lib/Notion/index.d.ts +0 -8
- package/lib/Notion/index.js +0 -13
- package/lib/Table/Table.d.ts +0 -19
- package/lib/Table/Table.js +0 -145
- package/lib/Table/index.d.ts +0 -10
- package/lib/Table/index.js +0 -23
- package/lib/TagSelector/Control.d.ts +0 -11
- package/lib/TagSelector/Control.js +0 -35
- package/lib/TagSelector/DropdownIndicator.d.ts +0 -11
- package/lib/TagSelector/DropdownIndicator.js +0 -64
- package/lib/TagSelector/Input.d.ts +0 -12
- package/lib/TagSelector/Input.js +0 -29
- package/lib/TagSelector/Menu.d.ts +0 -12
- package/lib/TagSelector/Menu.js +0 -34
- package/lib/TagSelector/MenuList.d.ts +0 -16
- package/lib/TagSelector/MenuList.js +0 -35
- package/lib/TagSelector/Option.d.ts +0 -12
- package/lib/TagSelector/Option.js +0 -67
- package/lib/TagSelector/SelectContainer.d.ts +0 -11
- package/lib/TagSelector/SelectContainer.js +0 -34
- package/lib/TagSelector/ValueButton.d.ts +0 -20
- package/lib/TagSelector/ValueButton.js +0 -60
- package/lib/TagSelector/ariaMessages.d.ts +0 -16
- package/lib/TagSelector/ariaMessages.js +0 -101
- package/lib/TagSelector/index.d.ts +0 -11
- package/lib/TagSelector/index.js +0 -13
- package/lib/TagSelector/types.d.ts +0 -11
- package/lib/TagSelector/types.js +0 -5
- package/src/DefinitionList/DefinitionDescription.tsx +0 -26
- package/src/DefinitionList/DefinitionTerm.tsx +0 -26
- package/src/DefinitionList/index.tsx +0 -10
- package/src/Embed/conceptComponents.tsx +0 -293
- package/src/ExpandableBox/ExpandableBox.stories.tsx +0 -41
- package/src/ExpandableBox/ExpandableBox.tsx +0 -23
- package/src/ExpandableBox/index.ts +0 -9
- package/src/Figure/Figure.tsx +0 -167
- package/src/Figure/index.ts +0 -11
- package/src/FramedContent/FramedContent.stories.tsx +0 -152
- package/src/FramedContent/FramedContent.tsx +0 -26
- package/src/FramedContent/index.ts +0 -10
- package/src/Image/Image.stories.tsx +0 -61
- package/src/Image/Image.tsx +0 -147
- package/src/Image/ImageLink.tsx +0 -37
- package/src/Image/index.ts +0 -14
- package/src/LetterFilter/LetterFilter.stories.tsx +0 -29
- package/src/LetterFilter/LetterFilter.tsx +0 -78
- package/src/LetterFilter/alphabet.ts +0 -39
- package/src/LetterFilter/index.ts +0 -11
- package/src/LicenseByline/LicenseDescription.tsx +0 -100
- package/src/List/OrderedList.stories.tsx +0 -135
- package/src/List/OrderedList.tsx +0 -158
- package/src/List/UnOrderedList.tsx +0 -43
- package/src/List/UnorderedList.stories.tsx +0 -72
- package/src/List/index.ts +0 -10
- package/src/Notion/Notion.tsx +0 -96
- package/src/Notion/NotionImage.tsx +0 -64
- package/src/Notion/index.ts +0 -9
- package/src/Table/Table.stories.tsx +0 -738
- package/src/Table/Table.tsx +0 -284
- package/src/Table/index.ts +0 -12
- package/src/TagSelector/Control.tsx +0 -34
- package/src/TagSelector/DropdownIndicator.tsx +0 -55
- package/src/TagSelector/Input.tsx +0 -31
- package/src/TagSelector/Menu.tsx +0 -38
- package/src/TagSelector/MenuList.tsx +0 -30
- package/src/TagSelector/Option.tsx +0 -58
- package/src/TagSelector/SelectContainer.tsx +0 -31
- package/src/TagSelector/ValueButton.tsx +0 -47
- package/src/TagSelector/ariaMessages.ts +0 -96
- package/src/TagSelector/index.ts +0 -14
- package/src/TagSelector/types.ts +0 -12
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2023-present, NDLA.
|
|
5
3
|
*
|
|
@@ -9,26 +7,25 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
9
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
import {
|
|
10
|
+
import { Figure } from "@ndla/primitives";
|
|
11
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
13
12
|
import { BlockConcept } from "./ConceptEmbed";
|
|
14
|
-
import { Figure } from "../Figure";
|
|
15
13
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
// TODO: Find out if we're actually still going to use this.
|
|
15
|
+
// If we are, we need to re-add some margin between the list items. We should also probably parse the concept content to HTML, like we do in ConceptEmbed.
|
|
16
|
+
|
|
17
|
+
const ConceptList = styled("div", {
|
|
18
|
+
base: {
|
|
19
|
+
"& li": {
|
|
20
|
+
display: "block"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const StyledSpan = styled("span", {
|
|
25
|
+
base: {
|
|
26
|
+
color: "text.error"
|
|
27
|
+
}
|
|
27
28
|
});
|
|
28
|
-
const StyledSpan = /*#__PURE__*/_styled("span", {
|
|
29
|
-
target: "e1g5p4xu0",
|
|
30
|
-
label: "StyledSpan"
|
|
31
|
-
})("color:", colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZCOEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSBcInJlYWN0LWkxOG5leHRcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgY29sb3JzIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcbmltcG9ydCB7IENvbmNlcHRMaXN0TWV0YURhdGEgfSBmcm9tIFwiQG5kbGEvdHlwZXMtZW1iZWRcIjtcbmltcG9ydCB7IEJsb2NrQ29uY2VwdCB9IGZyb20gXCIuL0NvbmNlcHRFbWJlZFwiO1xuaW1wb3J0IHsgRmlndXJlIH0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XG4gICAgICAgICAgICAgICAgPEJsb2NrQ29uY2VwdFxuICAgICAgICAgICAgICAgICAgdGl0bGU9e2NvbmNlcHQudGl0bGV9XG4gICAgICAgICAgICAgICAgICBjb250ZW50PXtjb25jZXB0LmNvbnRlbnQuY29udGVudH1cbiAgICAgICAgICAgICAgICAgIG1ldGFJbWFnZT17Y29uY2VwdC5tZXRhSW1hZ2V9XG4gICAgICAgICAgICAgICAgICBjb3B5cmlnaHQ9e2NvbmNlcHQuY29weXJpZ2h0fVxuICAgICAgICAgICAgICAgICAgc291cmNlPXtjb25jZXB0LnNvdXJjZX1cbiAgICAgICAgICAgICAgICAgIHZpc3VhbEVsZW1lbnQ9e3Zpc3VhbEVsZW1lbnR9XG4gICAgICAgICAgICAgICAgICBjb25jZXB0VHlwZT17Y29uY2VwdC5jb25jZXB0VHlwZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgPC91bD5cbiAgICAgICAgPC9Db25jZXB0TGlzdD5cbiAgICAgIDwvRmlndXJlPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uY2VwdExpc3RFbWJlZDtcbiJdfQ== */"));
|
|
32
29
|
const ConceptListEmbed = _ref => {
|
|
33
30
|
let {
|
|
34
31
|
embed,
|
|
@@ -48,7 +45,6 @@ const ConceptListEmbed = _ref => {
|
|
|
48
45
|
} = embed;
|
|
49
46
|
return _jsx("div", {
|
|
50
47
|
children: _jsxs(Figure, {
|
|
51
|
-
type: "full",
|
|
52
48
|
children: [embedData.title && _jsx("h2", {
|
|
53
49
|
lang: lang,
|
|
54
50
|
children: embedData.title
|
|
@@ -62,13 +58,11 @@ const ConceptListEmbed = _ref => {
|
|
|
62
58
|
} = _ref2;
|
|
63
59
|
return _jsx("li", {
|
|
64
60
|
children: _jsx(BlockConcept, {
|
|
65
|
-
title: concept.title,
|
|
61
|
+
title: concept.title.title,
|
|
66
62
|
content: concept.content.content,
|
|
67
|
-
metaImage: concept.metaImage,
|
|
68
63
|
copyright: concept.copyright,
|
|
69
|
-
source: concept.source,
|
|
70
64
|
visualElement: visualElement,
|
|
71
|
-
|
|
65
|
+
lang: lang
|
|
72
66
|
})
|
|
73
67
|
}, concept.id);
|
|
74
68
|
})
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -8,12 +7,8 @@ import _styled from "@emotion/styled/base";
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
10
|
+
import { Text } from "@ndla/primitives";
|
|
12
11
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const StyledSpan = /*#__PURE__*/_styled("span", {
|
|
14
|
-
target: "e1s10cki0",
|
|
15
|
-
label: "StyledSpan"
|
|
16
|
-
})("color:", colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbnRlbnRMaW5rRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1COEIiLCJmaWxlIjoiQ29udGVudExpbmtFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IFJl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GhyZWY9e2RhdGEucGF0aH0gdGFyZ2V0PVwiX2JsYW5rXCIgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2E+XG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiA8YSBocmVmPXtkYXRhLnBhdGh9PntjaGlsZHJlbn08L2E+O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29udGVudExpbmtFbWJlZDtcbiJdfQ== */"));
|
|
17
12
|
const ContentLinkEmbed = _ref => {
|
|
18
13
|
let {
|
|
19
14
|
embed,
|
|
@@ -24,10 +19,15 @@ const ContentLinkEmbed = _ref => {
|
|
|
24
19
|
t
|
|
25
20
|
} = useTranslation();
|
|
26
21
|
if (embed.status === "error") {
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
return _jsx(Text, {
|
|
23
|
+
color: "text.error",
|
|
24
|
+
asChild: true,
|
|
25
|
+
consumeCss: true,
|
|
26
|
+
children: _jsxs("span", {
|
|
27
|
+
children: [_jsx("span", {
|
|
28
|
+
children: `${t("embed.linkError")}: `
|
|
29
|
+
}), children]
|
|
30
|
+
})
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
const {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2024-present, NDLA.
|
|
5
3
|
*
|
|
@@ -10,31 +8,15 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
8
|
|
|
11
9
|
import { EmbedByline } from "../LicenseByline";
|
|
12
10
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const StyledFigCaption = /*#__PURE__*/_styled("figcaption", {
|
|
14
|
-
target: "eds2zp40",
|
|
15
|
-
label: "StyledFigCaption"
|
|
16
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "1oo694u",
|
|
18
|
-
styles: "background:unset;font-size:unset;padding:unset;color:unset"
|
|
19
|
-
} : {
|
|
20
|
-
name: "1oo694u",
|
|
21
|
-
styles: "background:unset;font-size:unset;padding:unset;color:unset",
|
|
22
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvcHlyaWdodEVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQjBDIiwiZmlsZSI6IkNvcHlyaWdodEVtYmVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDI0LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IENvcHlyaWdodE1ldGFEYXRhIH0gZnJvbSBcIkBuZGxhL3R5cGVzLWVtYmVkXCI7XG5pbXBvcnQgeyBFbWJlZEJ5bGluZSB9IGZyb20gXCIuLi9MaWNlbnNlQnlsaW5lXCI7XG5cbmludGVyZmFjZSBQcm9wcyB7XG4gIGVtYmVkOiBDb3B5cmlnaHRNZXRhRGF0YTtcbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG59XG5cbmNvbnN0IFN0eWxlZEZpZ0NhcHRpb24gPSBzdHlsZWQuZmlnY2FwdGlvbmBcbiAgYmFja2dyb3VuZDogdW5zZXQ7XG4gIGZvbnQtc2l6ZTogdW5zZXQ7XG4gIHBhZGRpbmc6IHVuc2V0O1xuICBjb2xvcjogdW5zZXQ7XG5gO1xuXG5jb25zdCBDb3B5cmlnaHRFbWJlZCA9ICh7IGVtYmVkLCBjaGlsZHJlbiB9OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxmaWd1cmU+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgICA8U3R5bGVkRmlnQ2FwdGlvbiBjb250ZW50RWRpdGFibGU9e2ZhbHNlfT5cbiAgICAgICAgPEVtYmVkQnlsaW5lIHR5cGU9XCJjb3B5cmlnaHRcIiBjb3B5cmlnaHQ9e2VtYmVkLmVtYmVkRGF0YS5jb3B5cmlnaHR9IGJvdHRvbVJvdW5kZWQgLz5cbiAgICAgIDwvU3R5bGVkRmlnQ2FwdGlvbj5cbiAgICA8L2ZpZ3VyZT5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvcHlyaWdodEVtYmVkO1xuIl19 */",
|
|
23
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
-
});
|
|
25
11
|
const CopyrightEmbed = _ref => {
|
|
26
12
|
let {
|
|
27
13
|
embed,
|
|
28
14
|
children
|
|
29
15
|
} = _ref;
|
|
30
16
|
return _jsxs("figure", {
|
|
31
|
-
children: [children, _jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: "copyright",
|
|
35
|
-
copyright: embed.embedData.copyright,
|
|
36
|
-
bottomRounded: true
|
|
37
|
-
})
|
|
17
|
+
children: [children, _jsx(EmbedByline, {
|
|
18
|
+
type: "copyright",
|
|
19
|
+
copyright: embed.embedData.copyright
|
|
38
20
|
})]
|
|
39
21
|
});
|
|
40
22
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2023-present, NDLA.
|
|
5
3
|
*
|
|
@@ -10,26 +8,22 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
8
|
|
|
11
9
|
import { useEffect, useRef } from "react";
|
|
12
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { Figure } from "@ndla/primitives";
|
|
12
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
|
|
14
|
-
import { Figure } from "../Figure";
|
|
15
14
|
import { ResourceBox } from "../ResourceBox";
|
|
16
15
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
17
|
-
const StyledFigure =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
name: "9y4sui",
|
|
25
|
-
styles: "iframe{height:auto;}",
|
|
26
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkV4dGVybmFsRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCbUMiLCJmaWxlIjoiRXh0ZXJuYWxFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4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S5jYXB0aW9uID8/IFwiXCJ9XG4gICAgICAgICAgYnV0dG9uVGV4dD17dChcImxpY2Vuc2Uub3RoZXIuaXRlbUltYWdlLmFyaWFMYWJlbFwiKX1cbiAgICAgICAgLz5cbiAgICAgIDwvRmlndXJlPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxTdHlsZWRGaWd1cmVcbiAgICAgIHJlZj17ZmlnUmVmfVxuICAgICAgdHlwZT17aXNDb25jZXB0ID8gXCJmdWxsLWNvbHVtblwiIDogdW5kZWZpbmVkfVxuICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3sgX19odG1sOiBkYXRhLm9lbWJlZC5odG1sID8/IFwiXCIgfX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRXh0ZXJuYWxFbWJlZDtcbiJdfQ== */",
|
|
27
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
+
const StyledFigure = styled(Figure, {
|
|
17
|
+
base: {
|
|
18
|
+
"& iframe": {
|
|
19
|
+
height: "auto",
|
|
20
|
+
width: "100%"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
28
23
|
});
|
|
29
24
|
const ExternalEmbed = _ref => {
|
|
30
25
|
let {
|
|
31
|
-
embed
|
|
32
|
-
isConcept
|
|
26
|
+
embed
|
|
33
27
|
} = _ref;
|
|
34
28
|
const {
|
|
35
29
|
t
|
|
@@ -59,7 +53,6 @@ const ExternalEmbed = _ref => {
|
|
|
59
53
|
alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
|
|
60
54
|
};
|
|
61
55
|
return _jsx(Figure, {
|
|
62
|
-
type: "full",
|
|
63
56
|
children: _jsx(ResourceBox, {
|
|
64
57
|
image: image,
|
|
65
58
|
title: embedData.title ?? "",
|
|
@@ -71,7 +64,6 @@ const ExternalEmbed = _ref => {
|
|
|
71
64
|
}
|
|
72
65
|
return _jsx(StyledFigure, {
|
|
73
66
|
ref: figRef,
|
|
74
|
-
type: isConcept ? "full-column" : undefined,
|
|
75
67
|
dangerouslySetInnerHTML: {
|
|
76
68
|
__html: data.oembed.html ?? ""
|
|
77
69
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -8,12 +7,16 @@ import _styled from "@emotion/styled/base";
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
12
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const StyledSup = styled("sup", {
|
|
13
|
+
base: {
|
|
14
|
+
"& a": {
|
|
15
|
+
textStyle: "label.xsmall",
|
|
16
|
+
marginInlineStart: "1"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
17
20
|
const FootnoteEmbed = _ref => {
|
|
18
21
|
let {
|
|
19
22
|
embed
|
|
@@ -26,9 +29,9 @@ const FootnoteEmbed = _ref => {
|
|
|
26
29
|
children: t("error")
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
|
-
return _jsx(
|
|
32
|
+
return _jsx("span", {
|
|
30
33
|
id: `ref${embed.data.entryNum}`,
|
|
31
|
-
children: _jsx(
|
|
34
|
+
children: _jsx(StyledSup, {
|
|
32
35
|
children: _jsx("a", {
|
|
33
36
|
href: `#note${embed.data.entryNum}`,
|
|
34
37
|
target: "_self",
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
|
|
9
|
+
import { Figure, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
11
|
+
import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
|
|
12
|
+
import { InlineTriggerButton } from "./InlineTriggerButton";
|
|
13
|
+
import { Gloss } from "../Gloss";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
15
|
+
const StyledPopoverContent = styled(PopoverContent, {
|
|
16
|
+
base: {
|
|
17
|
+
width: "surface.xlarge"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export const GlossEmbed = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
embed
|
|
23
|
+
} = _ref;
|
|
24
|
+
if (embed.status === "error" && embed.embedData.type === "inline") {
|
|
25
|
+
return _jsx("span", {
|
|
26
|
+
children: embed.embedData.linkText
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (embed.status === "error" || !embed.data.concept.glossData) {
|
|
30
|
+
return _jsx(EmbedErrorPlaceholder, {
|
|
31
|
+
type: "gloss"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const {
|
|
35
|
+
concept,
|
|
36
|
+
visualElement
|
|
37
|
+
} = embed.data;
|
|
38
|
+
const audio = visualElement?.status === "success" && visualElement.resource === "audio" ? {
|
|
39
|
+
src: visualElement.data.audioFile.url,
|
|
40
|
+
title: visualElement.data.title.title
|
|
41
|
+
} : undefined;
|
|
42
|
+
if (embed.embedData.type === "inline") {
|
|
43
|
+
return _jsxs(PopoverRoot, {
|
|
44
|
+
children: [_jsx(PopoverTrigger, {
|
|
45
|
+
asChild: true,
|
|
46
|
+
children: _jsx(InlineTriggerButton, {
|
|
47
|
+
children: embed.embedData.linkText
|
|
48
|
+
})
|
|
49
|
+
}), _jsx(StyledPopoverContent, {
|
|
50
|
+
children: _jsx(Figure, {
|
|
51
|
+
children: _jsx(Gloss, {
|
|
52
|
+
glossData: concept.glossData,
|
|
53
|
+
title: concept.title,
|
|
54
|
+
audio: audio
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return _jsx(Figure, {
|
|
61
|
+
children: _jsx(Gloss, {
|
|
62
|
+
glossData: concept.glossData,
|
|
63
|
+
title: concept.title,
|
|
64
|
+
audio: audio,
|
|
65
|
+
variant: "bordered"
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
};
|
package/es/Embed/H5pEmbed.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2023-present, NDLA.
|
|
5
3
|
*
|
|
@@ -8,25 +6,29 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
9
|
+
import { Figure } from "@ndla/primitives";
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
11
11
|
import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
|
|
12
|
-
import { Figure } from "../Figure";
|
|
13
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
14
|
-
const StyledFigure =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
const StyledFigure = styled(Figure, {
|
|
14
|
+
base: {
|
|
15
|
+
"& iframe": {
|
|
16
|
+
height: "auto",
|
|
17
|
+
width: "100%"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const FigureOembed = styled(Figure, {
|
|
22
|
+
base: {
|
|
23
|
+
width: "100%",
|
|
24
|
+
"& iframe": {
|
|
25
|
+
width: "100%"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
25
28
|
});
|
|
26
29
|
const H5pEmbed = _ref => {
|
|
27
30
|
let {
|
|
28
|
-
embed
|
|
29
|
-
isConcept
|
|
31
|
+
embed
|
|
30
32
|
} = _ref;
|
|
31
33
|
if (embed.status === "error") {
|
|
32
34
|
return _jsx(EmbedErrorPlaceholder, {
|
|
@@ -34,15 +36,13 @@ const H5pEmbed = _ref => {
|
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
if (embed.data.oembed) {
|
|
37
|
-
return _jsx(
|
|
38
|
-
type: isConcept ? "full-column" : undefined,
|
|
39
|
+
return _jsx(FigureOembed, {
|
|
39
40
|
dangerouslySetInnerHTML: {
|
|
40
41
|
__html: embed.data.oembed.html ?? ""
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
return _jsx(StyledFigure, {
|
|
45
|
-
type: isConcept ? "full-column" : undefined,
|
|
46
46
|
children: _jsx("iframe", {
|
|
47
47
|
title: embed.embedData.url,
|
|
48
48
|
"aria-label": embed.embedData.url,
|
package/es/Embed/IframeEmbed.js
CHANGED
|
@@ -8,14 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
import { useEffect, useRef } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { Figure } from "@ndla/primitives";
|
|
12
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
11
13
|
import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
|
|
12
|
-
import { Figure } from "../Figure";
|
|
13
14
|
import { ResourceBox } from "../ResourceBox";
|
|
14
15
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
16
|
+
const StyledIframe = styled("iframe", {
|
|
17
|
+
base: {
|
|
18
|
+
width: "100%"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
15
21
|
const IframeEmbed = _ref => {
|
|
16
22
|
let {
|
|
17
|
-
embed
|
|
18
|
-
isConcept
|
|
23
|
+
embed
|
|
19
24
|
} = _ref;
|
|
20
25
|
const {
|
|
21
26
|
t
|
|
@@ -47,7 +52,6 @@ const IframeEmbed = _ref => {
|
|
|
47
52
|
alt: alt ?? ""
|
|
48
53
|
};
|
|
49
54
|
return _jsx(Figure, {
|
|
50
|
-
type: "full",
|
|
51
55
|
children: _jsx(ResourceBox, {
|
|
52
56
|
image: image,
|
|
53
57
|
title: embedData.title ?? "",
|
|
@@ -67,8 +71,7 @@ const IframeEmbed = _ref => {
|
|
|
67
71
|
const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
|
|
68
72
|
const urlOrTitle = title || url;
|
|
69
73
|
return _jsx(Figure, {
|
|
70
|
-
|
|
71
|
-
children: _jsx("iframe", {
|
|
74
|
+
children: _jsx(StyledIframe, {
|
|
72
75
|
ref: iframeRef,
|
|
73
76
|
title: urlOrTitle,
|
|
74
77
|
"aria-label": urlOrTitle,
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
|
|
9
|
+
import { forwardRef, useCallback, useRef } from "react";
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
11
|
+
import { composeRefs } from "@ndla/util";
|
|
12
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
|
+
const StyledSpan = styled("span", {
|
|
14
|
+
base: {
|
|
15
|
+
position: "relative",
|
|
16
|
+
overflow: "visible",
|
|
17
|
+
borderBottom: "1px solid",
|
|
18
|
+
borderStyle: "dashed",
|
|
19
|
+
borderColor: "stroke.hover",
|
|
20
|
+
paddingBlock: "4xsmall",
|
|
21
|
+
paddingInline: "4xsmall",
|
|
22
|
+
width: "fit-content",
|
|
23
|
+
cursor: "pointer",
|
|
24
|
+
_hover: {
|
|
25
|
+
borderColor: "text.link",
|
|
26
|
+
background: "surface.actionSubtle.hover"
|
|
27
|
+
},
|
|
28
|
+
_active: {
|
|
29
|
+
borderColor: "text.link",
|
|
30
|
+
background: "surface.actionSubtle.active"
|
|
31
|
+
},
|
|
32
|
+
// The global focus ring forces the border-radius to be xsmall, causing the dashed border to be cut off. This is a workaround.
|
|
33
|
+
_focusVisible: {
|
|
34
|
+
outline: "none",
|
|
35
|
+
borderRadius: "0",
|
|
36
|
+
_after: {
|
|
37
|
+
content: '""',
|
|
38
|
+
position: "absolute",
|
|
39
|
+
inset: "0",
|
|
40
|
+
outline: "3px",
|
|
41
|
+
borderRadius: "xsmall",
|
|
42
|
+
outlineColor: "stroke.default",
|
|
43
|
+
outlineOffset: "3px",
|
|
44
|
+
outlineStyle: "solid"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export const InlineTriggerButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
50
|
+
let {
|
|
51
|
+
onClick,
|
|
52
|
+
...props
|
|
53
|
+
} = _ref;
|
|
54
|
+
const spanRef = useRef(null);
|
|
55
|
+
|
|
56
|
+
// Emulate a button click when pressing Enter or Space
|
|
57
|
+
const onKeyboardEvent = useCallback(event => {
|
|
58
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
59
|
+
spanRef.current?.click();
|
|
60
|
+
}
|
|
61
|
+
}, []);
|
|
62
|
+
return _jsx(StyledSpan, {
|
|
63
|
+
ref: composeRefs(spanRef, ref),
|
|
64
|
+
onKeyUp: onKeyboardEvent,
|
|
65
|
+
onClick: onClick,
|
|
66
|
+
role: "button",
|
|
67
|
+
tabIndex: 0,
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
});
|
package/es/Embed/UnknownEmbed.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -8,12 +7,8 @@ import _styled from "@emotion/styled/base";
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
10
|
+
import { Text } from "@ndla/primitives";
|
|
12
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const StyledSpan = /*#__PURE__*/_styled("span", {
|
|
14
|
-
target: "e1rt6jrv0",
|
|
15
|
-
label: "StyledSpan"
|
|
16
|
-
})("color:", colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlVua25vd25FbWJlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUI4QiIsImZpbGUiOiJVbmtub3duRW1iZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjMtcHJlc2VudCwgTkRMQS5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBHUEx2MyBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICpcbiAqL1xuXG5pbXBvcnQgeyB1c2VUcmFuc2xhdGlvbiB9IGZyb20gXCJyZWFjdC1pMThuZXh0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IGNvbG9ycyB9IGZyb20gXCJAbmRsYS9jb3JlXCI7XG5pbXBvcnQgeyBNZXRhRGF0YSB9IGZyb20gXCJAbmRsYS90eXBlcy1lbWJlZFwiO1xuXG5pbnRlcmZhY2UgUHJvcHMge1xuICBlbWJlZDogTWV0YURhdGE8YW55LCBhbnk+O1xufVxuXG5jb25zdCBTdHlsZWRTcGFuID0gc3R5bGVkLnNwYW5gXG4gIGNvbG9yOiAke2NvbG9ycy5zdXBwb3J0LnJlZH07XG5gO1xuXG5jb25zdCBVbmtub3duRW1iZWQgPSAoeyBlbWJlZCB9OiBQcm9wcykgPT4ge1xuICBjb25zdCB7IHQgfSA9IHVzZVRyYW5zbGF0aW9uKCk7XG4gIHJldHVybiA8U3R5bGVkU3Bhbj57dChcImVtYmVkLnVuc3VwcG9ydGVkXCIsIHsgdHlwZTogZW1iZWQucmVzb3VyY2UgfSl9PC9TdHlsZWRTcGFuPjtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFVua25vd25FbWJlZDtcbiJdfQ== */"));
|
|
17
12
|
const UnknownEmbed = _ref => {
|
|
18
13
|
let {
|
|
19
14
|
embed
|
|
@@ -21,9 +16,14 @@ const UnknownEmbed = _ref => {
|
|
|
21
16
|
const {
|
|
22
17
|
t
|
|
23
18
|
} = useTranslation();
|
|
24
|
-
return _jsx(
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
return _jsx(Text, {
|
|
20
|
+
color: "text.error",
|
|
21
|
+
asChild: true,
|
|
22
|
+
consumeCss: true,
|
|
23
|
+
children: _jsx("span", {
|
|
24
|
+
children: t("embed.unsupported", {
|
|
25
|
+
type: embed.resource
|
|
26
|
+
})
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2024-present, NDLA.
|
|
5
3
|
*
|
|
@@ -9,31 +7,22 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
9
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
import { fonts, spacing } from "@ndla/core";
|
|
13
10
|
import { InformationOutline } from "@ndla/icons/common";
|
|
11
|
+
import { MessageBox } from "@ndla/primitives";
|
|
14
12
|
import { SafeLink } from "@ndla/safelink";
|
|
15
|
-
import {
|
|
13
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
16
14
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
17
|
-
const StyledMessageBox =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
15
|
+
const StyledMessageBox = styled(MessageBox, {
|
|
16
|
+
base: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "center"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const Disclaimer = styled("div", {
|
|
22
|
+
base: {
|
|
23
|
+
textStyle: "body.medium"
|
|
24
|
+
}
|
|
28
25
|
});
|
|
29
|
-
const Disclaimer = /*#__PURE__*/_styled("div", {
|
|
30
|
-
target: "e1pgbrp21",
|
|
31
|
-
label: "Disclaimer"
|
|
32
|
-
})("display:flow;", fonts.sizes("18px", "24px"), ";user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlV1RGlzY2xhaW1lckVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoi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aW1lcldyYXBwZXIgcm9sZT1cInJlZ2lvblwiPlxuICAgICAgPFN0eWxlZE1lc3NhZ2VCb3ggdHlwZT1cImluZm9cIiBjb250ZW50RWRpdGFibGU9e2ZhbHNlfT5cbiAgICAgICAgPEluZm9ybWF0aW9uT3V0bGluZSAvPlxuICAgICAgICA8RGlzY2xhaW1lcj5cbiAgICAgICAgICB7ZW1iZWREYXRhLmRpc2NsYWltZXJ9XG4gICAgICAgICAge2Rpc2NsYWltZXJMaW5rfVxuICAgICAgICA8L0Rpc2NsYWltZXI+XG4gICAgICA8L1N0eWxlZE1lc3NhZ2VCb3g+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9EaXNjbGFpbWVyV3JhcHBlcj5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFV1RGlzY2xhaW1lckVtYmVkO1xuIl19 */"));
|
|
33
|
-
const DisclaimerWrapper = /*#__PURE__*/_styled("div", {
|
|
34
|
-
target: "e1pgbrp20",
|
|
35
|
-
label: "DisclaimerWrapper"
|
|
36
|
-
})(">:nth-child(2){margin-top:", spacing.xsmall, ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlV1RGlzY2xhaW1lckVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQ29DIiwiZmlsZSI6IlV1RGlzY2xhaW1lckVtYmVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDI0LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiA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E1lc3NhZ2VCb3g+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9EaXNjbGFpbWVyV3JhcHBlcj5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFV1RGlzY2xhaW1lckVtYmVkO1xuIl19 */"));
|
|
37
26
|
const UuDisclaimerEmbed = _ref => {
|
|
38
27
|
let {
|
|
39
28
|
embed,
|
|
@@ -57,10 +46,10 @@ const UuDisclaimerEmbed = _ref => {
|
|
|
57
46
|
children: data.disclaimerLink.text
|
|
58
47
|
})]
|
|
59
48
|
}) : null;
|
|
60
|
-
return _jsxs(
|
|
49
|
+
return _jsxs("div", {
|
|
61
50
|
role: "region",
|
|
62
51
|
children: [_jsxs(StyledMessageBox, {
|
|
63
|
-
|
|
52
|
+
variant: "warning",
|
|
64
53
|
contentEditable: false,
|
|
65
54
|
children: [_jsx(InformationOutline, {}), _jsxs(Disclaimer, {
|
|
66
55
|
children: [embedData.disclaimer, disclaimerLink]
|
package/es/Embed/index.js
CHANGED
|
@@ -15,11 +15,9 @@ export { default as FootnoteEmbed } from "./FootnoteEmbed";
|
|
|
15
15
|
export { default as BrightcoveEmbed } from "./BrightcoveEmbed";
|
|
16
16
|
export { default as ContentLinkEmbed } from "./ContentLinkEmbed";
|
|
17
17
|
export { default as RelatedContentEmbed } from "./RelatedContentEmbed";
|
|
18
|
-
export {
|
|
19
|
-
export { ConceptNotionV2 } from "./conceptComponents";
|
|
18
|
+
export { ConceptEmbed, InlineConcept, BlockConcept } from "./ConceptEmbed";
|
|
20
19
|
export { default as ConceptListEmbed } from "./ConceptListEmbed";
|
|
21
20
|
export { default as UnknownEmbed } from "./UnknownEmbed";
|
|
22
|
-
export { InlineConcept, BlockConcept } from "./ConceptEmbed";
|
|
23
21
|
export { default as UuDisclaimerEmbed } from "./UuDisclaimerEmbed";
|
|
24
22
|
export { default as CopyrightEmbed } from "./CopyrightEmbed";
|
|
25
23
|
export { default as CodeEmbed } from "./CodeEmbed";
|