@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,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -7,26 +6,55 @@ import _styled from "@emotion/styled/base";
|
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
8
|
|
|
9
|
+
import { useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import { colors, fonts, misc, spacing } from "@ndla/core";
|
|
12
11
|
import { WarningOutline } from "@ndla/icons/common";
|
|
13
12
|
import { getLicenseByAbbreviation, getLicenseCredits } from "@ndla/licenses";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import { Button, Text } from "@ndla/primitives";
|
|
14
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
15
|
+
import { LicenseLink } from "./LicenseLink";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
17
|
-
const BylineWrapper =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
17
|
+
const BylineWrapper = styled("figcaption", {
|
|
18
|
+
base: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
flexDirection: "column",
|
|
21
|
+
paddingBlock: "xsmall",
|
|
22
|
+
background: "surface.default",
|
|
23
|
+
textStyle: "label.medium"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const ErrorBylineWrapper = styled(BylineWrapper, {
|
|
27
|
+
base: {
|
|
28
|
+
border: "1px solid",
|
|
29
|
+
borderColor: "stroke.error",
|
|
30
|
+
borderRadius: "xsmall",
|
|
31
|
+
background: "surface.dangerSubtle",
|
|
32
|
+
paddingInline: "medium",
|
|
33
|
+
paddingBlock: "medium"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const StyledText = styled(Text, {
|
|
37
|
+
base: {
|
|
38
|
+
fontStyle: "italic"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const ContentWrapper = styled("div", {
|
|
42
|
+
base: {
|
|
43
|
+
display: "flex",
|
|
44
|
+
gap: "xsmall",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
textStyle: "label.medium"
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const BaseDescription = styled("div", {
|
|
50
|
+
base: {
|
|
51
|
+
display: "inline-flex",
|
|
52
|
+
whiteSpace: "pre-wrap"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export const EmbedByline = _ref => {
|
|
26
56
|
let {
|
|
27
57
|
type,
|
|
28
|
-
topRounded,
|
|
29
|
-
bottomRounded,
|
|
30
58
|
description,
|
|
31
59
|
children,
|
|
32
60
|
visibleAlt,
|
|
@@ -37,16 +65,15 @@ const EmbedByline = _ref => {
|
|
|
37
65
|
} = useTranslation();
|
|
38
66
|
if (props.error) {
|
|
39
67
|
const typeString = type === "h5p" ? "H5P" : t(`embed.type.${type}`).toLowerCase();
|
|
40
|
-
return _jsx(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
})
|
|
68
|
+
return _jsx(ErrorBylineWrapper, {
|
|
69
|
+
children: _jsxs(ContentWrapper, {
|
|
70
|
+
children: [_jsx(WarningOutline, {}), _jsx(BaseDescription, {
|
|
71
|
+
children: _jsx("span", {
|
|
72
|
+
children: t("embed.embedError", {
|
|
73
|
+
type: typeString
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})]
|
|
50
77
|
})
|
|
51
78
|
});
|
|
52
79
|
}
|
|
@@ -62,17 +89,89 @@ const EmbedByline = _ref => {
|
|
|
62
89
|
children: description
|
|
63
90
|
}), children]
|
|
64
91
|
})
|
|
65
|
-
}), visibleAlt ? _jsx(
|
|
66
|
-
|
|
92
|
+
}), visibleAlt ? _jsx(StyledText, {
|
|
93
|
+
color: "text.subtle",
|
|
94
|
+
textStyle: "label.medium",
|
|
95
|
+
asChild: true,
|
|
96
|
+
consumeCss: true,
|
|
97
|
+
children: _jsx("span", {
|
|
98
|
+
children: `Alt: ${visibleAlt}`
|
|
99
|
+
})
|
|
67
100
|
}) : null]
|
|
68
101
|
});
|
|
69
102
|
};
|
|
70
|
-
|
|
103
|
+
const StyledDescription = styled(BaseDescription, {
|
|
104
|
+
base: {
|
|
105
|
+
mobileWideDown: {
|
|
106
|
+
display: "grid",
|
|
107
|
+
gridTemplateColumns: "1fr auto",
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
overflow: "hidden",
|
|
110
|
+
_open: {
|
|
111
|
+
display: "inline"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const TextContent = styled("span", {
|
|
117
|
+
base: {
|
|
118
|
+
mobileWideDown: {
|
|
119
|
+
whiteSpace: "nowrap",
|
|
120
|
+
maxHeight: "large",
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
textOverflow: "ellipsis",
|
|
123
|
+
transitionProperty: "max-height",
|
|
124
|
+
transitionDuration: "slow",
|
|
125
|
+
transitionTimingFunction: "ease-in",
|
|
126
|
+
_open: {
|
|
127
|
+
whiteSpace: "pre-wrap",
|
|
128
|
+
maxHeight: "none"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
const StyledButton = styled(Button, {
|
|
134
|
+
base: {
|
|
135
|
+
mobileWide: {
|
|
136
|
+
display: "none"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const LicenseDescription = _ref2 => {
|
|
141
|
+
let {
|
|
142
|
+
children
|
|
143
|
+
} = _ref2;
|
|
144
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
145
|
+
const open = isOpen ? {
|
|
146
|
+
"data-open": ""
|
|
147
|
+
} : {};
|
|
148
|
+
const {
|
|
149
|
+
t
|
|
150
|
+
} = useTranslation();
|
|
151
|
+
const handleToggle = () => {
|
|
152
|
+
setIsOpen(!isOpen);
|
|
153
|
+
};
|
|
154
|
+
return _jsx(ContentWrapper, {
|
|
155
|
+
children: _jsxs(StyledDescription, {
|
|
156
|
+
...open,
|
|
157
|
+
children: [_jsx(TextContent, {
|
|
158
|
+
...open,
|
|
159
|
+
children: children
|
|
160
|
+
}), _jsx(StyledButton, {
|
|
161
|
+
variant: "link",
|
|
162
|
+
size: "small",
|
|
163
|
+
onClick: handleToggle,
|
|
164
|
+
children: isOpen ? `${t("audio.readLessDescriptionLabel")}` : `${t("audio.readMoreDescriptionLabel")}`
|
|
165
|
+
})]
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
export const LicenseContainerContent = _ref3 => {
|
|
71
170
|
let {
|
|
72
171
|
children,
|
|
73
172
|
copyright,
|
|
74
173
|
type
|
|
75
|
-
} =
|
|
174
|
+
} = _ref3;
|
|
76
175
|
const {
|
|
77
176
|
t,
|
|
78
177
|
i18n
|
|
@@ -80,13 +179,24 @@ export const LicenseContainerContent = _ref2 => {
|
|
|
80
179
|
const license = copyright ? getLicenseByAbbreviation(copyright.license?.license ?? "", i18n.language) : undefined;
|
|
81
180
|
const authors = getLicenseCredits(copyright);
|
|
82
181
|
const captionAuthors = Object.values(authors).find(i => i.length > 0) ?? [];
|
|
83
|
-
const
|
|
84
|
-
return _jsxs(Component, {
|
|
182
|
+
const content = _jsxs(_Fragment, {
|
|
85
183
|
children: [children, ` ${t(`embed.type.${type}`)}${captionAuthors.length ? ": " : ""}`, captionAuthors.map(author => author.name).join(", "), license ? _jsxs(_Fragment, {
|
|
86
184
|
children: [" / ", _jsx(LicenseLink, {
|
|
87
185
|
license: license
|
|
88
186
|
})]
|
|
89
187
|
}) : null]
|
|
90
188
|
});
|
|
91
|
-
|
|
92
|
-
|
|
189
|
+
if (children) {
|
|
190
|
+
return _jsx(LicenseDescription, {
|
|
191
|
+
children: content
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return _jsx(Text, {
|
|
195
|
+
textStyle: "label.medium",
|
|
196
|
+
asChild: true,
|
|
197
|
+
consumeCss: true,
|
|
198
|
+
children: _jsx("span", {
|
|
199
|
+
children: content
|
|
200
|
+
})
|
|
201
|
+
});
|
|
202
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -7,14 +6,23 @@ import _styled from "@emotion/styled/base";
|
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import { colors } from "@ndla/core";
|
|
11
9
|
import { SafeLink } from "@ndla/safelink";
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
12
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const StyledSafeLink =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const StyledSafeLink = styled(SafeLink, {
|
|
13
|
+
base: {
|
|
14
|
+
color: "primary",
|
|
15
|
+
textDecoration: "underline",
|
|
16
|
+
whiteSpace: "nowrap",
|
|
17
|
+
_hover: {
|
|
18
|
+
textDecoration: "none"
|
|
19
|
+
},
|
|
20
|
+
_focusWithin: {
|
|
21
|
+
textDecoration: "none"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export const LicenseLink = _ref => {
|
|
18
26
|
let {
|
|
19
27
|
license
|
|
20
28
|
} = _ref;
|
|
@@ -31,5 +39,4 @@ const LicenseLink = _ref => {
|
|
|
31
39
|
return _jsx("span", {
|
|
32
40
|
children: license.abbreviation
|
|
33
41
|
});
|
|
34
|
-
};
|
|
35
|
-
export default LicenseLink;
|
|
42
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -11,36 +10,60 @@ import { format } from "date-fns";
|
|
|
11
10
|
import { enGB, nb, nn } from "date-fns/locale";
|
|
12
11
|
import parse from "html-react-parser";
|
|
13
12
|
import { useMemo } from "react";
|
|
14
|
-
import { breakpoints, colors, spacing, mq } from "@ndla/core";
|
|
15
13
|
import { Forward, CalendarEd } from "@ndla/icons/common";
|
|
14
|
+
import { Heading } from "@ndla/primitives";
|
|
16
15
|
import { SafeLink } from "@ndla/safelink";
|
|
17
|
-
import {
|
|
16
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
18
17
|
import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
|
|
19
18
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
19
|
+
const InfoWrapper = styled("div", {
|
|
20
|
+
base: {
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
gap: "xsmall"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const StyledSafeLink = styled(SafeLink, {
|
|
27
|
+
base: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
justifyContent: "space-between",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
background: "surface.default",
|
|
32
|
+
padding: "medium",
|
|
33
|
+
border: "1px solid",
|
|
34
|
+
// TODO: Check if this is correct. Not part of design. Also check if this should have border-radius.
|
|
35
|
+
borderColor: "stroke.default",
|
|
36
|
+
"& h3": {
|
|
37
|
+
textDecoration: "underline"
|
|
38
|
+
},
|
|
39
|
+
"& [data-forward]": {
|
|
40
|
+
transitionProperty: "width, height",
|
|
41
|
+
transitionTimingFunction: "ease-in-out",
|
|
42
|
+
transitionDuration: "fast"
|
|
43
|
+
},
|
|
44
|
+
_hover: {
|
|
45
|
+
"& h3": {
|
|
46
|
+
textDecoration: "none"
|
|
47
|
+
},
|
|
48
|
+
"& [data-forward]": {
|
|
49
|
+
width: "large",
|
|
50
|
+
height: "large"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const StyledDateContainer = styled("div", {
|
|
56
|
+
base: {
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
gap: "xxsmall"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const StyledCalendarEd = styled(CalendarEd, {
|
|
63
|
+
base: {
|
|
64
|
+
color: "icon.strong"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
44
67
|
const LinkBlock = _ref => {
|
|
45
68
|
let {
|
|
46
69
|
title,
|
|
@@ -61,14 +84,19 @@ const LinkBlock = _ref => {
|
|
|
61
84
|
to: href,
|
|
62
85
|
children: [_jsxs(InfoWrapper, {
|
|
63
86
|
children: [_jsx(Heading, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
children:
|
|
87
|
+
asChild: true,
|
|
88
|
+
consumeCss: true,
|
|
89
|
+
textStyle: "title.medium",
|
|
90
|
+
children: _jsx("h3", {
|
|
91
|
+
"data-heading": true,
|
|
92
|
+
children: parse(title)
|
|
93
|
+
})
|
|
68
94
|
}), date && _jsxs(StyledDateContainer, {
|
|
69
|
-
children: [_jsx(
|
|
95
|
+
children: [_jsx(StyledCalendarEd, {}), formattedDate]
|
|
70
96
|
})]
|
|
71
|
-
}), _jsx(
|
|
97
|
+
}), _jsx(Forward, {
|
|
98
|
+
"data-forward": true
|
|
99
|
+
})]
|
|
72
100
|
});
|
|
73
101
|
};
|
|
74
102
|
export default LinkBlock;
|
|
@@ -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 { Children } from "react";
|
|
11
|
-
import {
|
|
10
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
12
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
|
-
const StyledList =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const StyledList = styled("ul", {
|
|
13
|
+
base: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
gap: "xsmall",
|
|
17
|
+
listStyle: "none"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
17
20
|
const LinkBlockSection = _ref => {
|
|
18
21
|
let {
|
|
19
22
|
children,
|
package/es/Logo/Logo.js
CHANGED
|
@@ -8,10 +8,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
/** @jsxImportSource @emotion/react */
|
|
12
|
-
import { useMemo } from "react";
|
|
13
|
-
import { css } from "@emotion/react";
|
|
14
|
-
import { colors } from "@ndla/core";
|
|
15
11
|
import { SafeLink } from "@ndla/safelink";
|
|
16
12
|
import SvgLogo from "./SvgLogo";
|
|
17
13
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
@@ -24,41 +20,17 @@ const StyledLogoWrapper = /*#__PURE__*/_styled("div", {
|
|
|
24
20
|
} : {
|
|
25
21
|
name: "b5wghc",
|
|
26
22
|
styles: "a{box-shadow:none;}width:120px;margin:0;position:relative",
|
|
27
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
23
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxvZ28udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBCb0MiLCJmaWxlIjoiTG9nby50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxNi1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgU2FmZUxpbmsgfSBmcm9tIFwiQG5kbGEvc2FmZWxpbmtcIjtcbmltcG9ydCBTdmdMb2dvIGZyb20gXCIuL1N2Z0xvZ29cIjtcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgdG8/OlxuICAgIHwgc3RyaW5nXG4gICAgfCB7XG4gICAgICAgIHBhdGhuYW1lOiBzdHJpbmc7XG4gICAgICAgIHNlYXJjaD86IHN0cmluZztcbiAgICAgICAgaGFzaD86IHN0cmluZztcbiAgICAgIH07XG4gIGxhYmVsOiBzdHJpbmc7XG4gIGxvY2FsZT86IHN0cmluZztcbiAgbmFtZT86IGJvb2xlYW47XG4gIGNvbG9yPzogc3RyaW5nO1xufVxuXG5jb25zdCBTdHlsZWRMb2dvV3JhcHBlciA9IHN0eWxlZC5kaXZgXG4gIGEge1xuICAgIGJveC1zaGFkb3c6IG5vbmU7XG4gIH1cbiAgd2lkdGg6IDEyMHB4O1xuICBtYXJnaW46IDA7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBMb2dvID0gKHsgbmFtZSA9IHRydWUsIHRvLCBjb2xvciwgbG9jYWxlLCBsYWJlbCB9OiBQcm9wcykgPT4ge1xuICBjb25zdCBsb2dvID0gdG8gPyAoXG4gICAgPFNhZmVMaW5rIHRvPXt0b30gYXJpYS1sYWJlbD17bGFiZWx9IHRpdGxlPXtsYWJlbH0+XG4gICAgICA8U3ZnTG9nbyBuYW1lPXtuYW1lfSBjb2xvcj17Y29sb3J9IGxvY2FsZT17bG9jYWxlfSAvPlxuICAgIDwvU2FmZUxpbms+XG4gICkgOiAoXG4gICAgPFN2Z0xvZ28gbmFtZT17bmFtZX0gY29sb3I9e2NvbG9yfSBsb2NhbGU9e2xvY2FsZX0gLz5cbiAgKTtcbiAgcmV0dXJuIDxTdHlsZWRMb2dvV3JhcHBlcj57bG9nb308L1N0eWxlZExvZ29XcmFwcGVyPjtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IExvZ287XG4iXX0= */",
|
|
28
24
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
25
|
});
|
|
30
|
-
const modifierStyles = {
|
|
31
|
-
large: process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "1df1r91-large",
|
|
33
|
-
styles: "width:287px;label:large;"
|
|
34
|
-
} : {
|
|
35
|
-
name: "1df1r91-large",
|
|
36
|
-
styles: "width:287px;label:large;",
|
|
37
|
-
map: "/*# sourceMappingURL=data:application/json;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lhLWxhYmVsPXtsYWJlbH0gdGl0bGU9e2xhYmVsfT5cbiAgICAgIDxTdmdMb2dvIG5hbWU9e25hbWV9IGNvbG9yPXtjb2xvcn0gbG9jYWxlPXtsb2NhbGV9IC8+XG4gICAgPC9TYWZlTGluaz5cbiAgKSA6IChcbiAgICA8U3ZnTG9nbyBuYW1lPXtuYW1lfSBjb2xvcj17Y29sb3J9IGxvY2FsZT17bG9jYWxlfSAvPlxuICApO1xuICByZXR1cm4gPFN0eWxlZExvZ29XcmFwcGVyIGNzcz17bW9kaWZpZXJzfT57bG9nb308L1N0eWxlZExvZ29XcmFwcGVyPjtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IExvZ287XG4iXX0= */",
|
|
38
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
-
},
|
|
40
|
-
white: /*#__PURE__*/css("svg{fill:", colors.white, ";};label:white;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxvZ28udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZDWSIsImZpbGUiOiJMb2dvLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDE2LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuLyoqIEBqc3hJbXBvcnRTb3VyY2UgQGVtb3Rpb24vcmVhY3QgKi9cbmltcG9ydCB7IHVzZU1lbW8gfSBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IFNlcmlhbGl6ZWRTdHlsZXMs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0cnVlLCB0bywgY3NzTW9kaWZpZXIsIGNvbG9yLCBsYXJnZSA9IGZhbHNlLCBsb2NhbGUsIGxhYmVsIH06IFByb3BzKSA9PiB7XG4gIGNvbnN0IG1vZGlmaWVycyA9IHVzZU1lbW8oKCkgPT4ge1xuICAgIGNvbnN0IG1vZHMgPSBbXTtcbiAgICBpZiAobGFyZ2UpIHtcbiAgICAgIG1vZHMucHVzaChtb2RpZmllclN0eWxlcy5sYXJnZSk7XG4gICAgfVxuICAgIGlmIChjc3NNb2RpZmllciAmJiBtb2RpZmllclN0eWxlc1tjc3NNb2RpZmllcl0pIHtcbiAgICAgIG1vZHMucHVzaChtb2RpZmllclN0eWxlc1tjc3NNb2RpZmllcl0pO1xuICAgIH1cbiAgICByZXR1cm4gbW9kcztcbiAgfSwgW2xhcmdlLCBjc3NNb2RpZmllcl0pO1xuXG4gIGNvbnN0IGxvZ28gPSB0byA/IChcbiAgICA8U2FmZUxpbmsgdG89e3RvfSBhcmlhLWxhYmVsPXtsYWJlbH0gdGl0bGU9e2xhYmVsfT5cbiAgICAgIDxTdmdMb2dvIG5hbWU9e25hbWV9IGNvbG9yPXtjb2xvcn0gbG9jYWxlPXtsb2NhbGV9IC8+XG4gICAgPC9TYWZlTGluaz5cbiAgKSA6IChcbiAgICA8U3ZnTG9nbyBuYW1lPXtuYW1lfSBjb2xvcj17Y29sb3J9IGxvY2FsZT17bG9jYWxlfSAvPlxuICApO1xuICByZXR1cm4gPFN0eWxlZExvZ29XcmFwcGVyIGNzcz17bW9kaWZpZXJzfT57bG9nb308L1N0eWxlZExvZ29XcmFwcGVyPjtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IExvZ287XG4iXX0= */"))
|
|
41
|
-
};
|
|
42
26
|
export const Logo = _ref => {
|
|
43
27
|
let {
|
|
44
28
|
name = true,
|
|
45
29
|
to,
|
|
46
|
-
cssModifier,
|
|
47
30
|
color,
|
|
48
|
-
large = false,
|
|
49
31
|
locale,
|
|
50
32
|
label
|
|
51
33
|
} = _ref;
|
|
52
|
-
const modifiers = useMemo(() => {
|
|
53
|
-
const mods = [];
|
|
54
|
-
if (large) {
|
|
55
|
-
mods.push(modifierStyles.large);
|
|
56
|
-
}
|
|
57
|
-
if (cssModifier && modifierStyles[cssModifier]) {
|
|
58
|
-
mods.push(modifierStyles[cssModifier]);
|
|
59
|
-
}
|
|
60
|
-
return mods;
|
|
61
|
-
}, [large, cssModifier]);
|
|
62
34
|
const logo = to ? _jsx(SafeLink, {
|
|
63
35
|
to: to,
|
|
64
36
|
"aria-label": label,
|
|
@@ -74,7 +46,6 @@ export const Logo = _ref => {
|
|
|
74
46
|
locale: locale
|
|
75
47
|
});
|
|
76
48
|
return _jsx(StyledLogoWrapper, {
|
|
77
|
-
css: modifiers,
|
|
78
49
|
children: logo
|
|
79
50
|
});
|
|
80
51
|
};
|