@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
|
@@ -4,36 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
7
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
var
|
|
8
|
+
var _primitives = require("@ndla/primitives");
|
|
9
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
10
10
|
var _ConceptEmbed = require("./ConceptEmbed");
|
|
11
|
-
var _Figure = require("../Figure");
|
|
12
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
-
|
|
14
|
-
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)."; } /**
|
|
12
|
+
/**
|
|
15
13
|
* Copyright (c) 2023-present, NDLA.
|
|
16
14
|
*
|
|
17
15
|
* This source code is licensed under the GPLv3 license found in the
|
|
18
16
|
* LICENSE file in the root directory of this source tree.
|
|
19
17
|
*
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
|
|
20
|
+
// TODO: Find out if we're actually still going to use this.
|
|
21
|
+
// 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.
|
|
22
|
+
|
|
23
|
+
const ConceptList = (0, _jsx2.styled)("div", {
|
|
24
|
+
base: {
|
|
25
|
+
"& li": {
|
|
26
|
+
display: "block"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const StyledSpan = (0, _jsx2.styled)("span", {
|
|
31
|
+
base: {
|
|
32
|
+
color: "text.error"
|
|
33
|
+
}
|
|
32
34
|
});
|
|
33
|
-
const StyledSpan = /*#__PURE__*/(0, _base.default)("span", {
|
|
34
|
-
target: "e1g5p4xu0",
|
|
35
|
-
label: "StyledSpan"
|
|
36
|
-
})("color:", _core.colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZCOEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSBcInJlYWN0LWkxOG5leHRcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgY29sb3JzIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcbmltcG9ydCB7IENvbmNlcHRMaXN0TWV0YURhdGEgfSBmcm9t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gICAgICAgICAgIHtkYXRhLmNvbmNlcHRzLm1hcCgoeyBjb25jZXB0LCB2aXN1YWxFbGVtZW50IH0pID0+IChcbiAgICAgICAgICAgICAgPGxpIGtleT17Y29uY2VwdC5pZH0+XG4gICAgICAgICAgICAgICAgPEJsb2NrQ29uY2VwdFxuICAgICAgICAgICAgICAgICAgdGl0bGU9e2NvbmNlcHQudGl0bGV9XG4gICAgICAgICAgICAgICAgICBjb250ZW50PXtjb25jZXB0LmNvbnRlbnQuY29udGVudH1cbiAgICAgICAgICAgICAgICAgIG1ldGFJbWFnZT17Y29uY2VwdC5tZXRhSW1hZ2V9XG4gICAgICAgICAgICAgICAgICBjb3B5cmlnaHQ9e2NvbmNlcHQuY29weXJpZ2h0fVxuICAgICAgICAgICAgICAgICAgc291cmNlPXtjb25jZXB0LnNvdXJjZX1cbiAgICAgICAgICAgICAgICAgIHZpc3VhbEVsZW1lbnQ9e3Zpc3VhbEVsZW1lbnR9XG4gICAgICAgICAgICAgICAgICBjb25jZXB0VHlwZT17Y29uY2VwdC5jb25jZXB0VHlwZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgPC91bD5cbiAgICAgICAgPC9Db25jZXB0TGlzdD5cbiAgICAgIDwvRmlndXJlPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uY2VwdExpc3RFbWJlZDtcbiJdfQ== */"));
|
|
37
35
|
const ConceptListEmbed = _ref => {
|
|
38
36
|
let {
|
|
39
37
|
embed,
|
|
@@ -52,8 +50,7 @@ const ConceptListEmbed = _ref => {
|
|
|
52
50
|
data
|
|
53
51
|
} = embed;
|
|
54
52
|
return (0, _jsxRuntime.jsx)("div", {
|
|
55
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
56
|
-
type: "full",
|
|
53
|
+
children: (0, _jsxRuntime.jsxs)(_primitives.Figure, {
|
|
57
54
|
children: [embedData.title && (0, _jsxRuntime.jsx)("h2", {
|
|
58
55
|
lang: lang,
|
|
59
56
|
children: embedData.title
|
|
@@ -67,13 +64,11 @@ const ConceptListEmbed = _ref => {
|
|
|
67
64
|
} = _ref2;
|
|
68
65
|
return (0, _jsxRuntime.jsx)("li", {
|
|
69
66
|
children: (0, _jsxRuntime.jsx)(_ConceptEmbed.BlockConcept, {
|
|
70
|
-
title: concept.title,
|
|
67
|
+
title: concept.title.title,
|
|
71
68
|
content: concept.content.content,
|
|
72
|
-
metaImage: concept.metaImage,
|
|
73
69
|
copyright: concept.copyright,
|
|
74
|
-
source: concept.source,
|
|
75
70
|
visualElement: visualElement,
|
|
76
|
-
|
|
71
|
+
lang: lang
|
|
77
72
|
})
|
|
78
73
|
}, concept.id);
|
|
79
74
|
})
|
|
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
7
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
var
|
|
8
|
+
var _primitives = require("@ndla/primitives");
|
|
10
9
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
10
|
/**
|
|
13
11
|
* Copyright (c) 2023-present, NDLA.
|
|
14
12
|
*
|
|
@@ -17,10 +15,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
15
|
*
|
|
18
16
|
*/
|
|
19
17
|
|
|
20
|
-
const StyledSpan = /*#__PURE__*/(0, _base.default)("span", {
|
|
21
|
-
target: "e1s10cki0",
|
|
22
|
-
label: "StyledSpan"
|
|
23
|
-
})("color:", _core.colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2V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oKTtcbiAgaWYgKGVtYmVkLnN0YXR1cyA9PT0gXCJlcnJvclwiKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxTdHlsZWRTcGFuPlxuICAgICAgICA8c3Bhbj57YCR7dChcImVtYmVkLmxpbmtFcnJvclwiKX06IGB9PC9zcGFuPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L1N0eWxlZFNwYW4+XG4gICAgKTtcbiAgfVxuXG4gIGNvbnN0IHsgZW1iZWREYXRhLCBkYXRhIH0gPSBlbWJlZDtcblxuICBpZiAoZW1iZWREYXRhLm9wZW5JbiA9PT0gXCJuZXctY29udGV4dFwiIHx8IGlzT2VtYmVkKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxhIGhyZWY9e2RhdGEucGF0aH0gdGFyZ2V0PVwiX2JsYW5rXCIgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2E+XG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiA8YSBocmVmPXtkYXRhLnBhdGh9PntjaGlsZHJlbn08L2E+O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29udGVudExpbmtFbWJlZDtcbiJdfQ== */"));
|
|
24
18
|
const ContentLinkEmbed = _ref => {
|
|
25
19
|
let {
|
|
26
20
|
embed,
|
|
@@ -31,10 +25,15 @@ const ContentLinkEmbed = _ref => {
|
|
|
31
25
|
t
|
|
32
26
|
} = (0, _reactI18next.useTranslation)();
|
|
33
27
|
if (embed.status === "error") {
|
|
34
|
-
return (0, _jsxRuntime.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
return (0, _jsxRuntime.jsx)(_primitives.Text, {
|
|
29
|
+
color: "text.error",
|
|
30
|
+
asChild: true,
|
|
31
|
+
consumeCss: true,
|
|
32
|
+
children: (0, _jsxRuntime.jsxs)("span", {
|
|
33
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
children: `${t("embed.linkError")}: `
|
|
35
|
+
}), children]
|
|
36
|
+
})
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
39
|
const {
|
|
@@ -4,42 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
7
|
var _LicenseByline = require("../LicenseByline");
|
|
9
8
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
10
|
-
|
|
11
|
-
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)."; } /**
|
|
9
|
+
/**
|
|
12
10
|
* Copyright (c) 2024-present, NDLA.
|
|
13
11
|
*
|
|
14
12
|
* This source code is licensed under the GPLv3 license found in the
|
|
15
13
|
* LICENSE file in the root directory of this source tree.
|
|
16
14
|
*
|
|
17
15
|
*/
|
|
18
|
-
|
|
19
|
-
target: "eds2zp40",
|
|
20
|
-
label: "StyledFigCaption"
|
|
21
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
22
|
-
name: "1oo694u",
|
|
23
|
-
styles: "background:unset;font-size:unset;padding:unset;color:unset"
|
|
24
|
-
} : {
|
|
25
|
-
name: "1oo694u",
|
|
26
|
-
styles: "background:unset;font-size:unset;padding:unset;color:unset",
|
|
27
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvcHlyaWdodEVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQjBDIiwiZmlsZSI6IkNvcHlyaWdodEVtYmVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDI0LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGh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IDwvU3R5bGVkRmlnQ2FwdGlvbj5cbiAgICA8L2ZpZ3VyZT5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvcHlyaWdodEVtYmVkO1xuIl19 */",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
});
|
|
16
|
+
|
|
30
17
|
const CopyrightEmbed = _ref => {
|
|
31
18
|
let {
|
|
32
19
|
embed,
|
|
33
20
|
children
|
|
34
21
|
} = _ref;
|
|
35
22
|
return (0, _jsxRuntime.jsxs)("figure", {
|
|
36
|
-
children: [children, (0, _jsxRuntime.jsx)(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type: "copyright",
|
|
40
|
-
copyright: embed.embedData.copyright,
|
|
41
|
-
bottomRounded: true
|
|
42
|
-
})
|
|
23
|
+
children: [children, (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
|
|
24
|
+
type: "copyright",
|
|
25
|
+
copyright: embed.embedData.copyright
|
|
43
26
|
})]
|
|
44
27
|
});
|
|
45
28
|
};
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { OembedMetaData } from "@ndla/types-embed";
|
|
9
9
|
interface Props {
|
|
10
10
|
embed: OembedMetaData;
|
|
11
|
-
isConcept?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare const ExternalEmbed: ({ embed
|
|
12
|
+
declare const ExternalEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default ExternalEmbed;
|
|
@@ -4,37 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
7
|
var _react = require("react");
|
|
9
8
|
var _reactI18next = require("react-i18next");
|
|
9
|
+
var _primitives = require("@ndla/primitives");
|
|
10
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
10
11
|
var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
|
|
11
|
-
var _Figure = require("../Figure");
|
|
12
12
|
var _ResourceBox = require("../ResourceBox");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
16
|
* Copyright (c) 2023-present, NDLA.
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the GPLv3 license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
styles: "iframe{height:auto;}",
|
|
31
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkV4dGVybmFsRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCbUMiLCJmaWxlIjoiRXh0ZXJuYWxFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlUmVmIH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgeyB1c2VUcmFuc2xhdGlvbiB9IGZyb20gXCJyZWFjdC1pMThuZXh0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20g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VmfVxuICAgICAgdHlwZT17aXNDb25jZXB0ID8gXCJmdWxsLWNvbHVtblwiIDogdW5kZWZpbmVkfVxuICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3sgX19odG1sOiBkYXRhLm9lbWJlZC5odG1sID8/IFwiXCIgfX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRXh0ZXJuYWxFbWJlZDtcbiJdfQ== */",
|
|
32
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
22
|
+
|
|
23
|
+
const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
|
|
24
|
+
base: {
|
|
25
|
+
"& iframe": {
|
|
26
|
+
height: "auto",
|
|
27
|
+
width: "100%"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
33
30
|
});
|
|
34
31
|
const ExternalEmbed = _ref => {
|
|
35
32
|
let {
|
|
36
|
-
embed
|
|
37
|
-
isConcept
|
|
33
|
+
embed
|
|
38
34
|
} = _ref;
|
|
39
35
|
const {
|
|
40
36
|
t
|
|
@@ -63,8 +59,7 @@ const ExternalEmbed = _ref => {
|
|
|
63
59
|
src: data.iframeImage?.image.imageUrl ?? "",
|
|
64
60
|
alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
|
|
65
61
|
};
|
|
66
|
-
return (0, _jsxRuntime.jsx)(
|
|
67
|
-
type: "full",
|
|
62
|
+
return (0, _jsxRuntime.jsx)(_primitives.Figure, {
|
|
68
63
|
children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
|
|
69
64
|
image: image,
|
|
70
65
|
title: embedData.title ?? "",
|
|
@@ -76,7 +71,6 @@ const ExternalEmbed = _ref => {
|
|
|
76
71
|
}
|
|
77
72
|
return (0, _jsxRuntime.jsx)(StyledFigure, {
|
|
78
73
|
ref: figRef,
|
|
79
|
-
type: isConcept ? "full-column" : undefined,
|
|
80
74
|
dangerouslySetInnerHTML: {
|
|
81
75
|
__html: data.oembed.html ?? ""
|
|
82
76
|
}
|
|
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
7
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
var
|
|
8
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
10
9
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
10
|
/**
|
|
13
11
|
* Copyright (c) 2023-present, NDLA.
|
|
14
12
|
*
|
|
@@ -17,10 +15,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
15
|
*
|
|
18
16
|
*/
|
|
19
17
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const StyledSup = (0, _jsx2.styled)("sup", {
|
|
19
|
+
base: {
|
|
20
|
+
"& a": {
|
|
21
|
+
textStyle: "label.xsmall",
|
|
22
|
+
marginInlineStart: "1"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
24
26
|
const FootnoteEmbed = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
embed
|
|
@@ -33,9 +35,9 @@ const FootnoteEmbed = _ref => {
|
|
|
33
35
|
children: t("error")
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
|
-
return (0, _jsxRuntime.jsx)(
|
|
38
|
+
return (0, _jsxRuntime.jsx)("span", {
|
|
37
39
|
id: `ref${embed.data.entryNum}`,
|
|
38
|
-
children: (0, _jsxRuntime.jsx)(
|
|
40
|
+
children: (0, _jsxRuntime.jsx)(StyledSup, {
|
|
39
41
|
children: (0, _jsxRuntime.jsx)("a", {
|
|
40
42
|
href: `#note${embed.data.entryNum}`,
|
|
41
43
|
target: "_self",
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { ConceptMetaData } from "@ndla/types-embed";
|
|
9
|
+
interface Props {
|
|
10
|
+
embed: ConceptMetaData;
|
|
11
|
+
}
|
|
12
|
+
export declare const GlossEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GlossEmbed = void 0;
|
|
7
|
+
var _primitives = require("@ndla/primitives");
|
|
8
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
|
+
var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
|
|
10
|
+
var _InlineTriggerButton = require("./InlineTriggerButton");
|
|
11
|
+
var _Gloss = require("../Gloss");
|
|
12
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/**
|
|
15
|
+
* Copyright (c) 2024-present, NDLA.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const StyledPopoverContent = (0, _jsx2.styled)(_primitives.PopoverContent, {
|
|
23
|
+
base: {
|
|
24
|
+
width: "surface.xlarge"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const GlossEmbed = _ref => {
|
|
28
|
+
let {
|
|
29
|
+
embed
|
|
30
|
+
} = _ref;
|
|
31
|
+
if (embed.status === "error" && embed.embedData.type === "inline") {
|
|
32
|
+
return (0, _jsxRuntime.jsx)("span", {
|
|
33
|
+
children: embed.embedData.linkText
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (embed.status === "error" || !embed.data.concept.glossData) {
|
|
37
|
+
return (0, _jsxRuntime.jsx)(_EmbedErrorPlaceholder.default, {
|
|
38
|
+
type: "gloss"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const {
|
|
42
|
+
concept,
|
|
43
|
+
visualElement
|
|
44
|
+
} = embed.data;
|
|
45
|
+
const audio = visualElement?.status === "success" && visualElement.resource === "audio" ? {
|
|
46
|
+
src: visualElement.data.audioFile.url,
|
|
47
|
+
title: visualElement.data.title.title
|
|
48
|
+
} : undefined;
|
|
49
|
+
if (embed.embedData.type === "inline") {
|
|
50
|
+
return (0, _jsxRuntime.jsxs)(_primitives.PopoverRoot, {
|
|
51
|
+
children: [(0, _jsxRuntime.jsx)(_primitives.PopoverTrigger, {
|
|
52
|
+
asChild: true,
|
|
53
|
+
children: (0, _jsxRuntime.jsx)(_InlineTriggerButton.InlineTriggerButton, {
|
|
54
|
+
children: embed.embedData.linkText
|
|
55
|
+
})
|
|
56
|
+
}), (0, _jsxRuntime.jsx)(StyledPopoverContent, {
|
|
57
|
+
children: (0, _jsxRuntime.jsx)(_primitives.Figure, {
|
|
58
|
+
children: (0, _jsxRuntime.jsx)(_Gloss.Gloss, {
|
|
59
|
+
glossData: concept.glossData,
|
|
60
|
+
title: concept.title,
|
|
61
|
+
audio: audio
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return (0, _jsxRuntime.jsx)(_primitives.Figure, {
|
|
68
|
+
children: (0, _jsxRuntime.jsx)(_Gloss.Gloss, {
|
|
69
|
+
glossData: concept.glossData,
|
|
70
|
+
title: concept.title,
|
|
71
|
+
audio: audio,
|
|
72
|
+
variant: "bordered"
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
exports.GlossEmbed = GlossEmbed;
|
package/lib/Embed/H5pEmbed.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { H5pMetaData } from "@ndla/types-embed";
|
|
9
9
|
interface Props {
|
|
10
10
|
embed: H5pMetaData;
|
|
11
|
-
isConcept?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare const H5pEmbed: ({ embed
|
|
12
|
+
declare const H5pEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default H5pEmbed;
|
package/lib/Embed/H5pEmbed.js
CHANGED
|
@@ -4,34 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _primitives = require("@ndla/primitives");
|
|
8
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
8
9
|
var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
|
|
9
|
-
var _Figure = require("../Figure");
|
|
10
10
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
13
|
* Copyright (c) 2023-present, NDLA.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the GPLv3 license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
|
|
20
|
+
const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
|
|
21
|
+
base: {
|
|
22
|
+
"& iframe": {
|
|
23
|
+
height: "auto",
|
|
24
|
+
width: "100%"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const FigureOembed = (0, _jsx2.styled)(_primitives.Figure, {
|
|
29
|
+
base: {
|
|
30
|
+
width: "100%",
|
|
31
|
+
"& iframe": {
|
|
32
|
+
width: "100%"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
30
35
|
});
|
|
31
36
|
const H5pEmbed = _ref => {
|
|
32
37
|
let {
|
|
33
|
-
embed
|
|
34
|
-
isConcept
|
|
38
|
+
embed
|
|
35
39
|
} = _ref;
|
|
36
40
|
if (embed.status === "error") {
|
|
37
41
|
return (0, _jsxRuntime.jsx)(_EmbedErrorPlaceholder.default, {
|
|
@@ -39,15 +43,13 @@ const H5pEmbed = _ref => {
|
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
if (embed.data.oembed) {
|
|
42
|
-
return (0, _jsxRuntime.jsx)(
|
|
43
|
-
type: isConcept ? "full-column" : undefined,
|
|
46
|
+
return (0, _jsxRuntime.jsx)(FigureOembed, {
|
|
44
47
|
dangerouslySetInnerHTML: {
|
|
45
48
|
__html: embed.data.oembed.html ?? ""
|
|
46
49
|
}
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
return (0, _jsxRuntime.jsx)(StyledFigure, {
|
|
50
|
-
type: isConcept ? "full-column" : undefined,
|
|
51
53
|
children: (0, _jsxRuntime.jsx)("iframe", {
|
|
52
54
|
title: embed.embedData.url,
|
|
53
55
|
"aria-label": embed.embedData.url,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { IframeMetaData } from "@ndla/types-embed";
|
|
9
9
|
interface Props {
|
|
10
10
|
embed: IframeMetaData;
|
|
11
|
-
isConcept?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare const IframeEmbed: ({ embed
|
|
12
|
+
declare const IframeEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default IframeEmbed;
|
package/lib/Embed/IframeEmbed.js
CHANGED
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
|
+
var _primitives = require("@ndla/primitives");
|
|
10
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
11
|
var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
|
|
10
|
-
var _Figure = require("../Figure");
|
|
11
12
|
var _ResourceBox = require("../ResourceBox");
|
|
12
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -19,10 +20,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
20
|
*
|
|
20
21
|
*/
|
|
21
22
|
|
|
23
|
+
const StyledIframe = (0, _jsx2.styled)("iframe", {
|
|
24
|
+
base: {
|
|
25
|
+
width: "100%"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
22
28
|
const IframeEmbed = _ref => {
|
|
23
29
|
let {
|
|
24
|
-
embed
|
|
25
|
-
isConcept
|
|
30
|
+
embed
|
|
26
31
|
} = _ref;
|
|
27
32
|
const {
|
|
28
33
|
t
|
|
@@ -53,8 +58,7 @@ const IframeEmbed = _ref => {
|
|
|
53
58
|
src: iframeImage?.image.imageUrl ?? "",
|
|
54
59
|
alt: alt ?? ""
|
|
55
60
|
};
|
|
56
|
-
return (0, _jsxRuntime.jsx)(
|
|
57
|
-
type: "full",
|
|
61
|
+
return (0, _jsxRuntime.jsx)(_primitives.Figure, {
|
|
58
62
|
children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
|
|
59
63
|
image: image,
|
|
60
64
|
title: embedData.title ?? "",
|
|
@@ -73,9 +77,8 @@ const IframeEmbed = _ref => {
|
|
|
73
77
|
const strippedWidth = typeof width === "number" ? width : width?.replace(/\s*px/, "");
|
|
74
78
|
const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
|
|
75
79
|
const urlOrTitle = title || url;
|
|
76
|
-
return (0, _jsxRuntime.jsx)(
|
|
77
|
-
|
|
78
|
-
children: (0, _jsxRuntime.jsx)("iframe", {
|
|
80
|
+
return (0, _jsxRuntime.jsx)(_primitives.Figure, {
|
|
81
|
+
children: (0, _jsxRuntime.jsx)(StyledIframe, {
|
|
79
82
|
ref: iframeRef,
|
|
80
83
|
title: urlOrTitle,
|
|
81
84
|
"aria-label": urlOrTitle,
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
9
|
+
export declare const InlineTriggerButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InlineTriggerButton = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
|
+
var _util = require("@ndla/util");
|
|
10
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) 2024-present, NDLA.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const StyledSpan = (0, _jsx2.styled)("span", {
|
|
20
|
+
base: {
|
|
21
|
+
position: "relative",
|
|
22
|
+
overflow: "visible",
|
|
23
|
+
borderBottom: "1px solid",
|
|
24
|
+
borderStyle: "dashed",
|
|
25
|
+
borderColor: "stroke.hover",
|
|
26
|
+
paddingBlock: "4xsmall",
|
|
27
|
+
paddingInline: "4xsmall",
|
|
28
|
+
width: "fit-content",
|
|
29
|
+
cursor: "pointer",
|
|
30
|
+
_hover: {
|
|
31
|
+
borderColor: "text.link",
|
|
32
|
+
background: "surface.actionSubtle.hover"
|
|
33
|
+
},
|
|
34
|
+
_active: {
|
|
35
|
+
borderColor: "text.link",
|
|
36
|
+
background: "surface.actionSubtle.active"
|
|
37
|
+
},
|
|
38
|
+
// The global focus ring forces the border-radius to be xsmall, causing the dashed border to be cut off. This is a workaround.
|
|
39
|
+
_focusVisible: {
|
|
40
|
+
outline: "none",
|
|
41
|
+
borderRadius: "0",
|
|
42
|
+
_after: {
|
|
43
|
+
content: '""',
|
|
44
|
+
position: "absolute",
|
|
45
|
+
inset: "0",
|
|
46
|
+
outline: "3px",
|
|
47
|
+
borderRadius: "xsmall",
|
|
48
|
+
outlineColor: "stroke.default",
|
|
49
|
+
outlineOffset: "3px",
|
|
50
|
+
outlineStyle: "solid"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const InlineTriggerButton = exports.InlineTriggerButton = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
56
|
+
let {
|
|
57
|
+
onClick,
|
|
58
|
+
...props
|
|
59
|
+
} = _ref;
|
|
60
|
+
const spanRef = (0, _react.useRef)(null);
|
|
61
|
+
|
|
62
|
+
// Emulate a button click when pressing Enter or Space
|
|
63
|
+
const onKeyboardEvent = (0, _react.useCallback)(event => {
|
|
64
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
65
|
+
spanRef.current?.click();
|
|
66
|
+
}
|
|
67
|
+
}, []);
|
|
68
|
+
return (0, _jsxRuntime.jsx)(StyledSpan, {
|
|
69
|
+
ref: (0, _util.composeRefs)(spanRef, ref),
|
|
70
|
+
onKeyUp: onKeyboardEvent,
|
|
71
|
+
onClick: onClick,
|
|
72
|
+
role: "button",
|
|
73
|
+
tabIndex: 0,
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
});
|