@ndla/ui 55.0.16-alpha.0 → 55.0.17-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 +114 -23
- package/dist/styles.css +411 -81
- package/es/Article/Article.js +101 -162
- package/es/Article/ArticleByline.js +23 -23
- package/es/Article/ArticleFootNotes.js +8 -8
- package/es/Article/ArticleParagraph.js +2 -2
- package/es/Article/index.js +3 -5
- package/es/AudioPlayer/AudioPlayer.js +20 -20
- package/es/AudioPlayer/Controls.js +45 -45
- package/es/AudioPlayer/SpeechControl.js +8 -8
- package/es/BlogPost/BlogPost.js +6 -6
- package/es/Breadcrumb/Breadcrumb.js +19 -29
- package/es/Breadcrumb/BreadcrumbItem.js +20 -49
- package/es/Breadcrumb/HomeBreadcrumb.js +36 -82
- package/es/CampaignBlock/CampaignBlock.js +12 -12
- package/es/CodeBlock/CodeBlock.js +2 -2
- package/es/Concept/Concept.js +11 -11
- package/es/ContactBlock/ContactBlock.js +170 -185
- package/es/ContactBlock/index.js +3 -3
- package/es/ContentLoader/index.js +12 -12
- package/es/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/es/ContentTypeBadge/ContentTypeBadge.js +81 -80
- package/es/ContentTypeBadge/ContentTypeBadgeNew.js +2 -2
- package/es/ContentTypeHero/ContentTypeHero.js +50 -0
- package/es/{Logo → ContentTypeHero}/index.js +2 -3
- package/es/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/es/Embed/AudioEmbed.js +7 -7
- package/es/Embed/BrightcoveEmbed.js +8 -8
- package/es/Embed/CodeEmbed.js +6 -6
- package/es/Embed/ConceptEmbed.js +13 -13
- package/es/Embed/ConceptListEmbed.js +9 -9
- package/es/Embed/ContentLinkEmbed.js +6 -6
- package/es/Embed/CopyrightEmbed.js +3 -3
- package/es/Embed/EmbedErrorPlaceholder.js +5 -5
- package/es/Embed/ExternalEmbed.js +5 -5
- package/es/Embed/FootnoteEmbed.js +5 -5
- package/es/Embed/GlossEmbed.js +11 -11
- package/es/Embed/H5pEmbed.js +5 -5
- package/es/Embed/IframeEmbed.js +6 -6
- package/es/Embed/ImageEmbed.js +10 -10
- package/es/Embed/InlineTriggerButton.js +2 -2
- package/es/Embed/RelatedContentEmbed.js +5 -5
- package/es/Embed/UnknownEmbed.js +3 -3
- package/es/Embed/UuDisclaimerEmbed.js +6 -6
- package/es/ErrorMessage/ErrorMessage.js +14 -14
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/es/FactBox/FactBox.js +5 -5
- package/es/FileList/File.js +3 -3
- package/es/FileList/FileList.js +6 -6
- package/es/FileList/Format.js +6 -6
- package/es/FileList/PdfFile.js +5 -5
- package/es/FrontpageArticle/FrontpageArticle.js +6 -6
- package/es/Gloss/Gloss.js +23 -23
- package/es/Gloss/GlossExample.js +9 -9
- package/es/Grid/Grid.js +4 -4
- package/es/KeyFigure/KeyFigure.js +5 -5
- package/es/Layout/LayoutItem.js +25 -37
- package/es/Layout/OneColumn.js +33 -31
- package/es/Layout/PageContainer.js +21 -30
- package/es/LicenseByline/EmbedByline.js +21 -21
- package/es/LicenseByline/LicenseLink.js +3 -3
- package/es/LinkBlock/LinkBlock.js +8 -8
- package/es/LinkBlock/LinkBlockSection.js +4 -4
- package/es/Messages/MessageBox.js +11 -11
- package/es/Messages/index.js +1 -2
- package/es/ProgrammeCard/ProgrammeCard.js +5 -5
- package/es/RelatedArticleList/RelatedArticleList.js +15 -15
- package/es/ResourceBox/ResourceBox.js +9 -9
- package/es/SnackBar/DefaultSnackbar.js +5 -5
- package/es/SnackBar/SnackbarProvider.js +7 -7
- package/es/TagSelector/TagSelector.js +17 -17
- package/es/TreeStructure/AddFolderButton.js +4 -4
- package/es/TreeStructure/ComboboxButton.js +7 -7
- package/es/TreeStructure/FolderItem.js +13 -13
- package/es/TreeStructure/FolderItems.js +6 -6
- package/es/TreeStructure/TreeStructure.js +9 -9
- package/es/ZendeskButton/ZendeskButton.js +2 -2
- package/es/i18n/index.js +1 -1
- package/es/index.js +5 -11
- package/es/locale/messages-en.js +1 -1
- package/es/locale/messages-nb.js +1 -1
- package/es/locale/messages-nn.js +1 -1
- package/es/locale/messages-se.js +1 -1
- package/es/locale/messages-sma.js +1 -1
- package/es/styles.css +411 -81
- package/lib/Article/Article.d.ts +9 -30
- package/lib/Article/Article.js +104 -164
- package/lib/Article/ArticleByline.js +23 -23
- package/lib/Article/ArticleFootNotes.js +8 -8
- package/lib/Article/ArticleParagraph.js +2 -2
- package/lib/Article/index.d.ts +2 -5
- package/lib/Article/index.js +18 -24
- package/lib/AudioPlayer/AudioPlayer.js +20 -20
- package/lib/AudioPlayer/Controls.js +45 -45
- package/lib/AudioPlayer/SpeechControl.js +8 -8
- package/lib/BlogPost/BlogPost.js +6 -6
- package/lib/Breadcrumb/Breadcrumb.js +21 -29
- package/lib/Breadcrumb/BreadcrumbItem.js +22 -50
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -2
- package/lib/Breadcrumb/HomeBreadcrumb.js +38 -82
- package/lib/CampaignBlock/CampaignBlock.js +12 -12
- package/lib/CodeBlock/CodeBlock.js +2 -2
- package/lib/Concept/Concept.js +11 -11
- package/lib/ContactBlock/ContactBlock.d.ts +6 -7
- package/lib/ContactBlock/ContactBlock.js +173 -184
- package/lib/ContactBlock/index.d.ts +3 -3
- package/lib/ContactBlock/index.js +13 -11
- package/lib/ContentLoader/index.js +12 -12
- package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +11 -12
- package/lib/ContentTypeBadge/ContentTypeBadge.js +83 -80
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +2 -2
- package/lib/ContentTypeHero/ContentTypeHero.d.ts +15 -0
- package/lib/ContentTypeHero/ContentTypeHero.js +57 -0
- package/lib/ContentTypeHero/index.d.ts +9 -0
- package/lib/ContentTypeHero/index.js +12 -0
- package/lib/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/lib/Embed/AudioEmbed.js +7 -7
- package/lib/Embed/BrightcoveEmbed.js +8 -8
- package/lib/Embed/CodeEmbed.js +6 -6
- package/lib/Embed/ConceptEmbed.js +13 -13
- package/lib/Embed/ConceptListEmbed.js +9 -9
- package/lib/Embed/ContentLinkEmbed.js +6 -6
- package/lib/Embed/CopyrightEmbed.js +3 -3
- package/lib/Embed/EmbedErrorPlaceholder.js +5 -5
- package/lib/Embed/ExternalEmbed.js +5 -5
- package/lib/Embed/FootnoteEmbed.js +5 -5
- package/lib/Embed/GlossEmbed.js +11 -11
- package/lib/Embed/H5pEmbed.js +5 -5
- package/lib/Embed/IframeEmbed.js +6 -6
- package/lib/Embed/ImageEmbed.js +10 -10
- package/lib/Embed/InlineTriggerButton.js +2 -2
- package/lib/Embed/RelatedContentEmbed.js +5 -5
- package/lib/Embed/UnknownEmbed.js +3 -3
- package/lib/Embed/UuDisclaimerEmbed.js +6 -6
- package/lib/ErrorMessage/ErrorMessage.js +14 -14
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/lib/FactBox/FactBox.js +5 -5
- package/lib/FileList/File.js +3 -3
- package/lib/FileList/FileList.js +6 -6
- package/lib/FileList/Format.js +6 -6
- package/lib/FileList/PdfFile.js +5 -5
- package/lib/FrontpageArticle/FrontpageArticle.js +6 -6
- package/lib/Gloss/Gloss.js +23 -23
- package/lib/Gloss/GlossExample.js +9 -9
- package/lib/Grid/Grid.js +4 -4
- package/lib/KeyFigure/KeyFigure.js +5 -5
- package/lib/Layout/LayoutItem.d.ts +3 -7
- package/lib/Layout/LayoutItem.js +27 -38
- package/lib/Layout/OneColumn.d.ts +3 -6
- package/lib/Layout/OneColumn.js +36 -33
- package/lib/Layout/PageContainer.d.ts +3 -6
- package/lib/Layout/PageContainer.js +24 -32
- package/lib/LicenseByline/EmbedByline.js +21 -21
- package/lib/LicenseByline/LicenseLink.js +3 -3
- package/lib/LinkBlock/LinkBlock.js +8 -8
- package/lib/LinkBlock/LinkBlockSection.js +4 -4
- package/lib/Messages/MessageBox.js +11 -11
- package/lib/Messages/index.d.ts +1 -2
- package/lib/Messages/index.js +0 -7
- package/lib/ProgrammeCard/ProgrammeCard.js +5 -5
- package/lib/RelatedArticleList/RelatedArticleList.js +15 -15
- package/lib/ResourceBox/ResourceBox.js +9 -9
- package/lib/SnackBar/DefaultSnackbar.js +5 -5
- package/lib/SnackBar/SnackbarProvider.js +7 -7
- package/lib/TagSelector/TagSelector.js +17 -17
- package/lib/TreeStructure/AddFolderButton.js +4 -4
- package/lib/TreeStructure/ComboboxButton.js +7 -7
- package/lib/TreeStructure/FolderItem.js +13 -13
- package/lib/TreeStructure/FolderItems.js +6 -6
- package/lib/TreeStructure/TreeStructure.js +9 -9
- package/lib/ZendeskButton/ZendeskButton.js +2 -2
- package/lib/i18n/index.d.ts +1 -1
- package/lib/i18n/index.js +6 -0
- package/lib/index.d.ts +8 -14
- package/lib/index.js +30 -132
- package/lib/locale/messages-en.js +1 -1
- package/lib/locale/messages-nb.js +1 -1
- package/lib/locale/messages-nn.js +1 -1
- package/lib/locale/messages-se.js +1 -1
- package/lib/locale/messages-sma.js +1 -1
- package/lib/styles.css +411 -81
- package/package.json +10 -10
- package/src/Article/Article.tsx +101 -229
- package/src/Article/index.ts +3 -7
- package/src/Breadcrumb/Breadcrumb.tsx +20 -18
- package/src/Breadcrumb/BreadcrumbItem.tsx +36 -59
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +0 -12
- package/src/Breadcrumb/HomeBreadcrumb.tsx +33 -46
- package/src/ContactBlock/{Contactblock.stories.tsx → ContactBlock.stories.tsx} +3 -4
- package/src/ContactBlock/ContactBlock.tsx +165 -199
- package/src/ContactBlock/index.ts +3 -3
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +77 -77
- package/src/ContentTypeHero/ContentTypeHero.stories.tsx +76 -0
- package/src/ContentTypeHero/ContentTypeHero.tsx +55 -0
- package/src/ContentTypeHero/index.ts +10 -0
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +10 -3
- package/src/Embed/AudioEmbed.stories.tsx +6 -8
- package/src/Embed/BrightcoveEmbed.stories.tsx +6 -8
- package/src/Embed/ConceptEmbed.stories.tsx +6 -8
- package/src/Embed/ExternalEmbed.stories.tsx +5 -5
- package/src/Embed/H5pEmbed.stories.tsx +6 -8
- package/src/Embed/IframeEmbed.stories.tsx +6 -8
- package/src/Embed/ImageEmbed.stories.tsx +6 -8
- package/src/Embed/RelatedContentEmbed.stories.tsx +6 -8
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +6 -8
- package/src/Layout/LayoutItem.tsx +25 -41
- package/src/Layout/OneColumn.tsx +33 -33
- package/src/Layout/PageContainer.tsx +22 -24
- package/src/Messages/index.ts +1 -2
- package/src/i18n/index.ts +1 -0
- package/src/index.ts +11 -33
- package/src/locale/messages-en.ts +1 -1
- package/src/locale/messages-nb.ts +1 -1
- package/src/locale/messages-nn.ts +1 -1
- package/src/locale/messages-se.ts +1 -1
- package/src/locale/messages-sma.ts +1 -1
- package/es/Article/ArticleHeaderWrapper.js +0 -33
- package/es/Hero/Hero.js +0 -68
- package/es/Hero/HeroContent.js +0 -16
- package/es/Hero/index.js +0 -10
- package/es/LanguageSelector/LanguageSelector.js +0 -87
- package/es/LanguageSelector/index.js +0 -10
- package/es/Logo/Logo.js +0 -52
- package/es/Logo/SvgLogo.js +0 -54
- package/es/Messages/MessageBanner.js +0 -72
- package/es/Search/ActiveFilterContent.js +0 -40
- package/es/Search/ActiveFilters.js +0 -112
- package/es/Search/ContentTypeResult.js +0 -151
- package/es/Search/ContentTypeResultStyles.js +0 -51
- package/es/Search/IsPathToHighlight.js +0 -12
- package/es/Search/LoadingWrapper.js +0 -31
- package/es/Search/SearchField.js +0 -110
- package/es/Search/SearchFieldForm.js +0 -33
- package/es/Search/SearchResult.js +0 -185
- package/es/Search/SearchResultSleeve.js +0 -229
- package/es/Search/index.js +0 -12
- package/lib/Article/ArticleHeaderWrapper.d.ts +0 -14
- package/lib/Article/ArticleHeaderWrapper.js +0 -40
- package/lib/Hero/Hero.d.ts +0 -25
- package/lib/Hero/Hero.js +0 -83
- package/lib/Hero/HeroContent.d.ts +0 -12
- package/lib/Hero/HeroContent.js +0 -23
- package/lib/Hero/index.d.ts +0 -10
- package/lib/Hero/index.js +0 -61
- package/lib/LanguageSelector/LanguageSelector.d.ts +0 -15
- package/lib/LanguageSelector/LanguageSelector.js +0 -92
- package/lib/LanguageSelector/index.d.ts +0 -9
- package/lib/LanguageSelector/index.js +0 -13
- package/lib/Logo/Logo.d.ts +0 -20
- package/lib/Logo/Logo.js +0 -58
- package/lib/Logo/SvgLogo.d.ts +0 -14
- package/lib/Logo/SvgLogo.js +0 -62
- package/lib/Logo/index.d.ts +0 -9
- package/lib/Logo/index.js +0 -16
- package/lib/Messages/MessageBanner.d.ts +0 -16
- package/lib/Messages/MessageBanner.js +0 -77
- package/lib/Search/ActiveFilterContent.d.ts +0 -23
- package/lib/Search/ActiveFilterContent.js +0 -47
- package/lib/Search/ActiveFilters.d.ts +0 -19
- package/lib/Search/ActiveFilters.js +0 -119
- package/lib/Search/ContentTypeResult.d.ts +0 -29
- package/lib/Search/ContentTypeResult.js +0 -159
- package/lib/Search/ContentTypeResultStyles.d.ts +0 -45
- package/lib/Search/ContentTypeResultStyles.js +0 -58
- package/lib/Search/IsPathToHighlight.d.ts +0 -8
- package/lib/Search/IsPathToHighlight.js +0 -19
- package/lib/Search/LoadingWrapper.d.ts +0 -12
- package/lib/Search/LoadingWrapper.js +0 -38
- package/lib/Search/SearchField.d.ts +0 -25
- package/lib/Search/SearchField.js +0 -117
- package/lib/Search/SearchFieldForm.d.ts +0 -15
- package/lib/Search/SearchFieldForm.js +0 -41
- package/lib/Search/SearchResult.d.ts +0 -43
- package/lib/Search/SearchResult.js +0 -194
- package/lib/Search/SearchResultSleeve.d.ts +0 -25
- package/lib/Search/SearchResultSleeve.js +0 -237
- package/lib/Search/index.d.ts +0 -11
- package/lib/Search/index.js +0 -33
- package/src/Article/ArticleHeaderWrapper.tsx +0 -38
- package/src/Hero/Hero.stories.tsx +0 -35
- package/src/Hero/Hero.tsx +0 -129
- package/src/Hero/HeroContent.tsx +0 -43
- package/src/Hero/index.ts +0 -21
- package/src/LanguageSelector/LanguageSelector.stories.tsx +0 -44
- package/src/LanguageSelector/LanguageSelector.tsx +0 -101
- package/src/LanguageSelector/index.ts +0 -11
- package/src/Logo/Logo.stories.tsx +0 -47
- package/src/Logo/Logo.tsx +0 -47
- package/src/Logo/SvgLogo.tsx +0 -48
- package/src/Logo/index.ts +0 -11
- package/src/Messages/MessageBanner.stories.tsx +0 -31
- package/src/Messages/MessageBanner.tsx +0 -67
- package/src/Search/ActiveFilterContent.tsx +0 -64
- package/src/Search/ActiveFilters.tsx +0 -145
- package/src/Search/ContentTypeResult.tsx +0 -190
- package/src/Search/ContentTypeResultStyles.tsx +0 -172
- package/src/Search/IsPathToHighlight.ts +0 -12
- package/src/Search/LoadingWrapper.tsx +0 -44
- package/src/Search/SearchField.tsx +0 -175
- package/src/Search/SearchFieldForm.tsx +0 -64
- package/src/Search/SearchResult.tsx +0 -368
- package/src/Search/SearchResultSleeve.tsx +0 -367
- package/src/Search/__tests__/Highlight-test.ts +0 -66
- package/src/Search/index.ts +0 -14
package/lib/Grid/Grid.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.GridParallaxItem = void 0;
|
|
7
7
|
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
8
|
var _core = require("@ndla/core");
|
|
9
|
-
var _jsxRuntime = require("
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
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)."; } /**
|
|
12
12
|
* Copyright (c) 2023-present, NDLA.
|
|
@@ -35,7 +35,7 @@ const Grid = _ref => {
|
|
|
35
35
|
...rest
|
|
36
36
|
} = _ref;
|
|
37
37
|
const amountOfColumns = children?.length === 3 ? "3" : columns;
|
|
38
|
-
return (0, _jsxRuntime.jsx)(GridContainer, {
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridContainer, {
|
|
39
39
|
"data-frontpage": size,
|
|
40
40
|
"data-border": border,
|
|
41
41
|
"data-columns": amountOfColumns,
|
|
@@ -61,9 +61,9 @@ const GridParallaxItem = _ref2 => {
|
|
|
61
61
|
children,
|
|
62
62
|
...rest
|
|
63
63
|
} = _ref2;
|
|
64
|
-
return (0, _jsxRuntime.jsx)(StyledGridParallaxItem, {
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledGridParallaxItem, {
|
|
65
65
|
...rest,
|
|
66
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
66
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
67
67
|
children: children
|
|
68
68
|
})
|
|
69
69
|
});
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
8
|
var _htmlReactParser = _interopRequireDefault(require("html-react-parser"));
|
|
9
9
|
var _core = require("@ndla/core");
|
|
10
|
-
var _jsxRuntime = require("
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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)."; } /**
|
|
13
13
|
* Copyright (c) 2023-present, NDLA.
|
|
@@ -52,15 +52,15 @@ const KeyFigure = _ref => {
|
|
|
52
52
|
title,
|
|
53
53
|
subtitle
|
|
54
54
|
} = _ref;
|
|
55
|
-
return (0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
56
|
-
children: [(0, _jsxRuntime.jsx)(StyledImage, {
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
56
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledImage, {
|
|
57
57
|
src: `${image?.src}?width=150`,
|
|
58
58
|
width: 150,
|
|
59
59
|
height: 150,
|
|
60
60
|
alt: image?.alt
|
|
61
|
-
}), (0, _jsxRuntime.jsx)(TitleWrapper, {
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TitleWrapper, {
|
|
62
62
|
children: (0, _htmlReactParser.default)(title)
|
|
63
|
-
}), (0, _jsxRuntime.jsx)(SubTitleWrapper, {
|
|
63
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SubTitleWrapper, {
|
|
64
64
|
children: (0, _htmlReactParser.default)(subtitle)
|
|
65
65
|
})]
|
|
66
66
|
});
|
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
layout?: "extend" | "center";
|
|
13
|
-
}
|
|
14
|
-
export declare const LayoutItem: ({ children, layout, ...rest }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const LayoutItem: import("@ndla/styled-system/types").StyledComponent<"section", {
|
|
9
|
+
layout?: "center" | "extend" | undefined;
|
|
10
|
+
}>;
|
|
15
11
|
export default LayoutItem;
|
package/lib/Layout/LayoutItem.js
CHANGED
|
@@ -4,48 +4,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.LayoutItem = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _core = require("@ndla/core");
|
|
10
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
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)."; } /**
|
|
7
|
+
var _jsx = require("@ndla/styled-system/jsx");
|
|
8
|
+
/**
|
|
12
9
|
* Copyright (c) 2016-present, NDLA.
|
|
13
10
|
*
|
|
14
11
|
* This source code is licensed under the GPLv3 license found in the
|
|
15
12
|
* LICENSE file in the root directory of this source tree.
|
|
16
13
|
*
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return centerCss;
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// TODO: Refactor this. This is a copy of our old layout.
|
|
17
|
+
const LayoutItem = exports.LayoutItem = (0, _jsx.styled)("section", {
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
layout: "center"
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
layout: {
|
|
23
|
+
center: {
|
|
24
|
+
position: "relative!",
|
|
25
|
+
width: "83.333%",
|
|
26
|
+
right: "auto !important",
|
|
27
|
+
left: "8.333%"
|
|
28
|
+
},
|
|
29
|
+
extend: {
|
|
30
|
+
tablet: {
|
|
31
|
+
position: "relative!",
|
|
32
|
+
width: "83.333%",
|
|
33
|
+
right: "auto!",
|
|
34
|
+
left: "8.333%"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return (0, _jsxRuntime.jsx)("section", {
|
|
45
|
-
css: style,
|
|
46
|
-
...rest,
|
|
47
|
-
children: children
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
exports.LayoutItem = LayoutItem;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
51
40
|
var _default = exports.default = LayoutItem;
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
wide?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const OneColumn: ({ wide, ...rest }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const OneColumn: import("@ndla/styled-system/types").StyledComponent<"div", {
|
|
9
|
+
wide?: boolean | undefined;
|
|
10
|
+
}>;
|
|
14
11
|
export default OneColumn;
|
package/lib/Layout/OneColumn.js
CHANGED
|
@@ -4,42 +4,45 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.OneColumn = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _core = require("@ndla/core");
|
|
10
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
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)."; } /**
|
|
7
|
+
var _jsx = require("@ndla/styled-system/jsx");
|
|
8
|
+
/**
|
|
13
9
|
* Copyright (c) 2016-present, NDLA.
|
|
14
10
|
*
|
|
15
11
|
* This source code is licensed under the GPLv3 license found in the
|
|
16
12
|
* LICENSE file in the root directory of this source tree.
|
|
17
13
|
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// TODO: This is a rewrite of our old layout. Refactor this.
|
|
17
|
+
const OneColumn = exports.OneColumn = (0, _jsx.styled)("div", {
|
|
18
|
+
base: {
|
|
19
|
+
marginLeft: "auto",
|
|
20
|
+
marginRight: "auto",
|
|
21
|
+
width: "100%",
|
|
22
|
+
paddingLeft: "18px",
|
|
23
|
+
paddingRight: "18px",
|
|
24
|
+
mobileWide: {
|
|
25
|
+
paddingLeft: "medium",
|
|
26
|
+
paddingRight: "medium"
|
|
27
|
+
},
|
|
28
|
+
_after: {
|
|
29
|
+
content: '""!',
|
|
30
|
+
display: "block!",
|
|
31
|
+
clear: "both!"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
wide: false
|
|
36
|
+
},
|
|
37
|
+
variants: {
|
|
38
|
+
wide: {
|
|
39
|
+
true: {
|
|
40
|
+
maxWidth: "1150px"
|
|
41
|
+
},
|
|
42
|
+
false: {
|
|
43
|
+
maxWidth: "1024px"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
45
48
|
var _default = exports.default = OneColumn;
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
backgroundWide?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const PageContainer: ({ backgroundWide, ...rest }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const PageContainer: import("@ndla/styled-system/types").StyledComponent<"div", {
|
|
9
|
+
backgroundWide?: boolean | undefined;
|
|
10
|
+
}>;
|
|
14
11
|
export default PageContainer;
|
|
@@ -4,42 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.PageContainer = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _core = require("@ndla/core");
|
|
10
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
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)."; } /**
|
|
7
|
+
var _jsx = require("@ndla/styled-system/jsx");
|
|
8
|
+
/**
|
|
13
9
|
* Copyright (c) 2016-present, NDLA.
|
|
14
10
|
*
|
|
15
11
|
* This source code is licensed under the GPLv3 license found in the
|
|
16
12
|
* LICENSE file in the root directory of this source tree.
|
|
17
13
|
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// TODO: Refactor this. It's a rewrite of our old layout.
|
|
17
|
+
const PageContainer = exports.PageContainer = (0, _jsx.styled)("div", {
|
|
18
|
+
base: {
|
|
19
|
+
minHeight: "100vh",
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column"
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
backgroundWide: false
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
backgroundWide: {
|
|
28
|
+
true: {
|
|
29
|
+
tablet: {
|
|
30
|
+
backgroundColor: "#f8f8f8"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
false: {}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
30
36
|
});
|
|
31
|
-
const backgroundWideStyle = /*#__PURE__*/(0, _react.css)(_core.mq.range({
|
|
32
|
-
from: _core.breakpoints.tablet
|
|
33
|
-
}), "{background-color:", _core.colors.brand.greyLightest, ";};label:backgroundWideStyle;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBhZ2VDb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdCK0IiLCJmaWxlIjoiUGFnZUNvbnRhaW5lci50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxNi1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbi8qKiBAanN4SW1wb3J0U291cmNlIEBlbW90aW9uL3JlYWN0ICovXG5pbXBvcnQgeyBDb21wb25lbnRQcm9wc1dpdGhvdXRSZWYgfSBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBjb2xvcnMsIG1xLCBicmVha3BvaW50cyB9IGZyb20gXCJAbmRsYS9jb3JlXCI7XG5cbmludGVyZmFjZSBQcm9wcyBleHRlbmRzIENvbXBvbmVudFByb3BzV2l0aG91dFJlZjxcImRpdlwiPiB7XG4gIGJhY2tncm91bmRXaWRlPzogYm9vbGVhbjtcbn1cblxuY29uc3QgU3R5bGVkUGFnZUNvbnRhaW5lciA9IHN0eWxlZC5kaXZgXG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuYDtcblxuY29uc3QgYmFja2dyb3VuZFdpZGVTdHlsZSA9IGNzc2BcbiAgJHttcS5yYW5nZSh7IGZyb206IGJyZWFrcG9pbnRzLnRhYmxldCB9KX0ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICR7Y29sb3JzLmJyYW5kLmdyZXlMaWdodGVzdH07XG4gIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWdlQ29udGFpbmVyID0gKHsgYmFja2dyb3VuZFdpZGUgPSBmYWxzZSwgLi4ucmVzdCB9OiBQcm9wcykgPT4gKFxuICA8U3R5bGVkUGFnZUNvbnRhaW5lciBjc3M9e2JhY2tncm91bmRXaWRlID8gYmFja2dyb3VuZFdpZGVTdHlsZSA6IHVuZGVmaW5lZH0gey4uLnJlc3R9IC8+XG4pO1xuXG5leHBvcnQgZGVmYXVsdCBQYWdlQ29udGFpbmVyO1xuIl19 */"));
|
|
34
|
-
const PageContainer = _ref => {
|
|
35
|
-
let {
|
|
36
|
-
backgroundWide = false,
|
|
37
|
-
...rest
|
|
38
|
-
} = _ref;
|
|
39
|
-
return (0, _jsxRuntime.jsx)(StyledPageContainer, {
|
|
40
|
-
css: backgroundWide ? backgroundWideStyle : undefined,
|
|
41
|
-
...rest
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
exports.PageContainer = PageContainer;
|
|
45
37
|
var _default = exports.default = PageContainer;
|
|
@@ -11,7 +11,7 @@ var _licenses = require("@ndla/licenses");
|
|
|
11
11
|
var _primitives = require("@ndla/primitives");
|
|
12
12
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
13
13
|
var _LicenseLink = require("./LicenseLink");
|
|
14
|
-
var _jsxRuntime = require("
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
/**
|
|
16
16
|
* Copyright (c) 2023-present, NDLA.
|
|
17
17
|
*
|
|
@@ -71,10 +71,10 @@ const EmbedByline = _ref => {
|
|
|
71
71
|
} = (0, _reactI18next.useTranslation)();
|
|
72
72
|
if (props.error) {
|
|
73
73
|
const typeString = type === "h5p" ? "H5P" : t(`embed.type.${type}`).toLowerCase();
|
|
74
|
-
return (0, _jsxRuntime.jsx)(ErrorBylineWrapper, {
|
|
75
|
-
children: (0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
76
|
-
children: [(0, _jsxRuntime.jsx)(_common.WarningOutline, {}), (0, _jsxRuntime.jsx)(BaseDescription, {
|
|
77
|
-
children: (0, _jsxRuntime.jsx)("span", {
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ErrorBylineWrapper, {
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
76
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_common.WarningOutline, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseDescription, {
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
78
78
|
children: t("embed.embedError", {
|
|
79
79
|
type: typeString
|
|
80
80
|
})
|
|
@@ -86,21 +86,21 @@ const EmbedByline = _ref => {
|
|
|
86
86
|
const {
|
|
87
87
|
copyright
|
|
88
88
|
} = props;
|
|
89
|
-
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
90
|
-
children: [(0, _jsxRuntime.jsx)(BylineWrapper, {
|
|
91
|
-
children: (0, _jsxRuntime.jsxs)("div", {
|
|
92
|
-
children: [(0, _jsxRuntime.jsx)(LicenseContainerContent, {
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
90
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BylineWrapper, {
|
|
91
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(LicenseContainerContent, {
|
|
93
93
|
type: type,
|
|
94
94
|
copyright: copyright,
|
|
95
95
|
children: description
|
|
96
96
|
}), children]
|
|
97
97
|
})
|
|
98
|
-
}), visibleAlt ? (0, _jsxRuntime.jsx)(StyledText, {
|
|
98
|
+
}), visibleAlt ? /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
|
|
99
99
|
color: "text.subtle",
|
|
100
100
|
textStyle: "label.medium",
|
|
101
101
|
asChild: true,
|
|
102
102
|
consumeCss: true,
|
|
103
|
-
children: (0, _jsxRuntime.jsx)("span", {
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
104
104
|
children: `Alt: ${visibleAlt}`
|
|
105
105
|
})
|
|
106
106
|
}) : null]
|
|
@@ -158,13 +158,13 @@ const LicenseDescription = _ref2 => {
|
|
|
158
158
|
const handleToggle = () => {
|
|
159
159
|
setIsOpen(!isOpen);
|
|
160
160
|
};
|
|
161
|
-
return (0, _jsxRuntime.jsx)(ContentWrapper, {
|
|
162
|
-
children: (0, _jsxRuntime.jsxs)(StyledDescription, {
|
|
161
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ContentWrapper, {
|
|
162
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledDescription, {
|
|
163
163
|
...open,
|
|
164
|
-
children: [(0, _jsxRuntime.jsx)(TextContent, {
|
|
164
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TextContent, {
|
|
165
165
|
...open,
|
|
166
166
|
children: children
|
|
167
|
-
}), (0, _jsxRuntime.jsx)(StyledButton, {
|
|
167
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledButton, {
|
|
168
168
|
variant: "link",
|
|
169
169
|
size: "small",
|
|
170
170
|
onClick: handleToggle,
|
|
@@ -186,23 +186,23 @@ const LicenseContainerContent = _ref3 => {
|
|
|
186
186
|
const license = copyright ? (0, _licenses.getLicenseByAbbreviation)(copyright.license?.license ?? "", i18n.language) : undefined;
|
|
187
187
|
const authors = (0, _licenses.getLicenseCredits)(copyright);
|
|
188
188
|
const captionAuthors = Object.values(authors).find(i => i.length > 0) ?? [];
|
|
189
|
-
const content = (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
190
|
-
children: [children, ` ${t(`embed.type.${type}`)}${captionAuthors.length ? ": " : ""}`, captionAuthors.map(author => author.name).join(", "), license ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
191
|
-
children: [" / ", (0, _jsxRuntime.jsx)(_LicenseLink.LicenseLink, {
|
|
189
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
190
|
+
children: [children, ` ${t(`embed.type.${type}`)}${captionAuthors.length ? ": " : ""}`, captionAuthors.map(author => author.name).join(", "), license ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
191
|
+
children: [" / ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseLink.LicenseLink, {
|
|
192
192
|
license: license
|
|
193
193
|
})]
|
|
194
194
|
}) : null]
|
|
195
195
|
});
|
|
196
196
|
if (children) {
|
|
197
|
-
return (0, _jsxRuntime.jsx)(LicenseDescription, {
|
|
197
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LicenseDescription, {
|
|
198
198
|
children: content
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
return (0, _jsxRuntime.jsx)(_primitives.Text, {
|
|
201
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Text, {
|
|
202
202
|
textStyle: "label.medium",
|
|
203
203
|
asChild: true,
|
|
204
204
|
consumeCss: true,
|
|
205
|
-
children: (0, _jsxRuntime.jsx)("span", {
|
|
205
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
206
206
|
children: content
|
|
207
207
|
})
|
|
208
208
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.LicenseLink = void 0;
|
|
7
7
|
var _safelink = require("@ndla/safelink");
|
|
8
8
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
|
-
var _jsxRuntime = require("
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
/**
|
|
11
11
|
* Copyright (c) 2023-present, NDLA.
|
|
12
12
|
*
|
|
@@ -36,13 +36,13 @@ const LicenseLink = _ref => {
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
if (license.url?.length) {
|
|
39
|
-
return (0, _jsxRuntime.jsx)(StyledSafeLink, {
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledSafeLink, {
|
|
40
40
|
to: license.url,
|
|
41
41
|
rel: "license",
|
|
42
42
|
children: license.abbreviation
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
return (0, _jsxRuntime.jsx)("span", {
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
46
46
|
children: license.abbreviation
|
|
47
47
|
});
|
|
48
48
|
};
|
|
@@ -13,7 +13,7 @@ var _primitives = require("@ndla/primitives");
|
|
|
13
13
|
var _safelink = require("@ndla/safelink");
|
|
14
14
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
15
15
|
var _relativeUrl = require("../utils/relativeUrl");
|
|
16
|
-
var _jsxRuntime = require("
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
18
|
/**
|
|
19
19
|
* Copyright (c) 2023-present, NDLA.
|
|
@@ -87,21 +87,21 @@ const LinkBlock = _ref => {
|
|
|
87
87
|
locale
|
|
88
88
|
});
|
|
89
89
|
}, [date, articleLanguage]);
|
|
90
|
-
return (0, _jsxRuntime.jsxs)(StyledSafeLink, {
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledSafeLink, {
|
|
91
91
|
to: href,
|
|
92
|
-
children: [(0, _jsxRuntime.jsxs)(InfoWrapper, {
|
|
93
|
-
children: [(0, _jsxRuntime.jsx)(_primitives.Heading, {
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(InfoWrapper, {
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Heading, {
|
|
94
94
|
asChild: true,
|
|
95
95
|
consumeCss: true,
|
|
96
96
|
textStyle: "title.medium",
|
|
97
|
-
children: (0, _jsxRuntime.jsx)("h3", {
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
98
98
|
"data-heading": true,
|
|
99
99
|
children: (0, _htmlReactParser.default)(title)
|
|
100
100
|
})
|
|
101
|
-
}), date && (0, _jsxRuntime.jsxs)(StyledDateContainer, {
|
|
102
|
-
children: [(0, _jsxRuntime.jsx)(StyledCalendarEd, {}), formattedDate]
|
|
101
|
+
}), date && /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledDateContainer, {
|
|
102
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledCalendarEd, {}), formattedDate]
|
|
103
103
|
})]
|
|
104
|
-
}), (0, _jsxRuntime.jsx)(_common.Forward, {
|
|
104
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.Forward, {
|
|
105
105
|
"data-forward": true
|
|
106
106
|
})]
|
|
107
107
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
|
-
var _jsxRuntime = require("
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
/**
|
|
11
11
|
* Copyright (c) 2023-present, NDLA.
|
|
12
12
|
*
|
|
@@ -28,10 +28,10 @@ const LinkBlockSection = _ref => {
|
|
|
28
28
|
children,
|
|
29
29
|
...rest
|
|
30
30
|
} = _ref;
|
|
31
|
-
return (0, _jsxRuntime.jsx)("nav", {
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", {
|
|
32
32
|
...rest,
|
|
33
|
-
children: (0, _jsxRuntime.jsx)(StyledList, {
|
|
34
|
-
children: _react.Children.map(children, child => (0, _jsxRuntime.jsx)("li", {
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledList, {
|
|
34
|
+
children: _react.Children.map(children, child => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
35
35
|
children: child
|
|
36
36
|
}))
|
|
37
37
|
})
|
|
@@ -10,7 +10,7 @@ var _button = require("@ndla/button");
|
|
|
10
10
|
var _core = require("@ndla/core");
|
|
11
11
|
var _action = require("@ndla/icons/action");
|
|
12
12
|
var _common = require("@ndla/icons/common");
|
|
13
|
-
var _jsxRuntime = require("
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
/**
|
|
16
16
|
* Copyright (c) 2022-present, NDLA.
|
|
@@ -58,28 +58,28 @@ const MessageBox = _ref => {
|
|
|
58
58
|
const {
|
|
59
59
|
t
|
|
60
60
|
} = (0, _reactI18next.useTranslation)();
|
|
61
|
-
return (0, _jsxRuntime.jsxs)(MessageBoxWrapper, {
|
|
61
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(MessageBoxWrapper, {
|
|
62
62
|
"data-type": type,
|
|
63
63
|
contentEditable: contentEditable ?? undefined,
|
|
64
|
-
children: [(0, _jsxRuntime.jsx)(InfoWrapper, {
|
|
65
|
-
children: (0, _jsxRuntime.jsxs)("div", {
|
|
66
|
-
children: [(0, _jsxRuntime.jsx)(ChildrenWrapper, {
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InfoWrapper, {
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ChildrenWrapper, {
|
|
67
67
|
children: children
|
|
68
|
-
}), links && (0, _jsxRuntime.jsx)(LinkWrapper, {
|
|
69
|
-
children: links.map(x => (0, _jsxRuntime.jsxs)(Link, {
|
|
68
|
+
}), links && /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkWrapper, {
|
|
69
|
+
children: links.map(x => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Link, {
|
|
70
70
|
href: x.href,
|
|
71
|
-
children: [(0, _jsxRuntime.jsx)("span", {
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
72
|
children: x.text
|
|
73
|
-
}), (0, _jsxRuntime.jsx)(_common.Forward, {})]
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.Forward, {})]
|
|
74
74
|
}, x.href))
|
|
75
75
|
})]
|
|
76
76
|
})
|
|
77
|
-
}), showCloseButton && (0, _jsxRuntime.jsx)(StyledCloseButton, {
|
|
77
|
+
}), showCloseButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledCloseButton, {
|
|
78
78
|
variant: "ghost",
|
|
79
79
|
"aria-label": t("close"),
|
|
80
80
|
title: t("close"),
|
|
81
81
|
onClick: onClose,
|
|
82
|
-
children: (0, _jsxRuntime.jsx)(_action.Cross, {})
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.Cross, {})
|
|
83
83
|
})]
|
|
84
84
|
});
|
|
85
85
|
};
|
package/lib/Messages/index.d.ts
CHANGED
package/lib/Messages/index.js
CHANGED
|
@@ -3,18 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "MessageBanner", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _MessageBanner.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "MessageBox", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function () {
|
|
15
9
|
return _MessageBox.default;
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
|
-
var _MessageBanner = _interopRequireDefault(require("./MessageBanner"));
|
|
19
12
|
var _MessageBox = _interopRequireDefault(require("./MessageBox"));
|
|
20
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|