@ndla/ui 55.0.12-alpha.0 → 55.0.13-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/all-aout.js +0 -0
- package/dist/all.css +1 -0
- package/dist/panda.buildinfo.json +170 -0
- package/dist/styles.css +686 -0
- package/es/Article/Article.js +3 -4
- package/es/Article/ArticleByline.js +9 -9
- package/es/Article/ArticleFootNotes.js +4 -4
- package/es/AudioPlayer/AudioPlayer.js +142 -163
- package/es/AudioPlayer/Controls.js +187 -203
- package/es/AudioPlayer/SpeechControl.js +13 -11
- package/es/BlogPost/BlogPost.js +85 -23
- package/es/CampaignBlock/CampaignBlock.js +3 -4
- package/es/CodeBlock/CodeBlock.js +88 -96
- package/es/ContactBlock/ContactBlock.js +54 -40
- package/es/ContentLoader/index.js +7 -7
- package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/es/Embed/AudioEmbed.js +5 -9
- package/es/Embed/BrightcoveEmbed.js +12 -15
- package/es/Embed/CodeEmbed.js +58 -10
- package/es/Embed/ConceptEmbed.js +15 -20
- package/es/Embed/ContentLinkEmbed.js +1 -1
- package/es/Embed/EmbedErrorPlaceholder.js +32 -17
- package/es/Embed/ExternalEmbed.js +7 -10
- package/es/Embed/FootnoteEmbed.js +3 -3
- package/es/Embed/H5pEmbed.js +1 -2
- package/es/Embed/IframeEmbed.js +8 -9
- package/es/Embed/ImageEmbed.js +167 -122
- package/es/Embed/RelatedContentEmbed.js +8 -10
- package/es/Embed/UuDisclaimerEmbed.js +2 -2
- package/es/Embed/conceptComponents.js +9 -9
- package/es/ErrorMessage/ErrorMessage.js +1 -1
- package/es/FactBox/FactBox.js +2 -2
- package/es/FileList/File.js +1 -1
- package/es/FileList/Format.js +3 -3
- package/es/FrontpageArticle/FrontpageArticle.js +1 -1
- package/es/Gloss/Gloss.js +9 -11
- package/es/Gloss/GlossExample.js +3 -4
- package/es/Grid/Grid.js +1 -1
- package/es/Image/Image.js +7 -8
- package/es/Image/ImageLink.js +1 -1
- package/es/KeyFigure/KeyFigure.js +2 -2
- package/es/LanguageSelector/LanguageSelector.js +2 -2
- package/es/LetterFilter/LetterFilter.js +1 -1
- package/es/LicenseByline/EmbedByline.js +5 -6
- package/es/LicenseByline/LicenseDescription.js +1 -1
- package/es/LicenseByline/LicenseLink.js +1 -2
- package/es/Messages/MessageBox.js +1 -1
- package/es/Notion/Notion.js +2 -2
- package/es/Notion/NotionImage.js +12 -57
- package/es/RelatedArticleList/RelatedArticleList.js +3 -3
- package/es/ResourceBox/ResourceBox.js +12 -17
- package/es/Search/ActiveFilters.js +1 -1
- package/es/Search/ContentTypeResult.js +9 -6
- package/es/Search/ContentTypeResultStyles.js +1 -1
- package/es/Search/IsPathToHighlight.js +1 -1
- package/es/Search/SearchField.js +6 -8
- package/es/Search/SearchResult.js +14 -19
- package/es/Search/SearchResultSleeve.js +14 -16
- package/es/SnackBar/SnackbarProvider.js +8 -11
- package/es/TagSelector/TagSelector.js +1 -1
- package/es/TagSelector/ariaMessages.js +6 -6
- package/es/TreeStructure/AddFolderButton.js +4 -6
- package/es/TreeStructure/ComboboxButton.js +4 -7
- package/es/TreeStructure/FolderItem.js +12 -15
- package/es/TreeStructure/FolderItems.js +3 -3
- package/es/TreeStructure/TreeStructure.js +9 -12
- package/es/TreeStructure/helperFunctions.js +1 -1
- package/es/ZendeskButton/ZendeskButton.js +55 -0
- package/es/i18n/formatNestedMessages.js +1 -1
- package/es/index.js +2 -1
- package/es/locale/messages-en.js +9 -8
- package/es/locale/messages-nb.js +9 -8
- package/es/locale/messages-nn.js +9 -8
- package/es/locale/messages-se.js +9 -8
- package/es/locale/messages-sma.js +9 -8
- package/es/styles.css +686 -0
- package/es/utils/relativeUrl.js +3 -3
- package/lib/Article/Article.js +3 -4
- package/lib/Article/ArticleByline.js +9 -9
- package/lib/Article/ArticleFootNotes.js +4 -4
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -2
- package/lib/AudioPlayer/AudioPlayer.js +142 -162
- package/lib/AudioPlayer/Controls.js +190 -205
- package/lib/AudioPlayer/SpeechControl.js +13 -11
- package/lib/BlogPost/BlogPost.d.ts +2 -2
- package/lib/BlogPost/BlogPost.js +85 -24
- package/lib/CampaignBlock/CampaignBlock.js +3 -4
- package/lib/CodeBlock/CodeBlock.d.ts +5 -8
- package/lib/CodeBlock/CodeBlock.js +88 -96
- package/lib/ContactBlock/ContactBlock.js +55 -43
- package/lib/ContentLoader/index.js +7 -7
- package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/lib/Embed/AudioEmbed.js +5 -9
- package/lib/Embed/BrightcoveEmbed.js +12 -15
- package/lib/Embed/CodeEmbed.js +56 -8
- package/lib/Embed/ConceptEmbed.js +15 -20
- package/lib/Embed/ContentLinkEmbed.js +1 -1
- package/lib/Embed/EmbedErrorPlaceholder.d.ts +4 -3
- package/lib/Embed/EmbedErrorPlaceholder.js +32 -18
- package/lib/Embed/ExternalEmbed.js +7 -10
- package/lib/Embed/FootnoteEmbed.js +3 -3
- package/lib/Embed/H5pEmbed.js +1 -2
- package/lib/Embed/IframeEmbed.js +8 -9
- package/lib/Embed/ImageEmbed.d.ts +1 -2
- package/lib/Embed/ImageEmbed.js +167 -123
- package/lib/Embed/RelatedContentEmbed.js +8 -10
- package/lib/Embed/UuDisclaimerEmbed.js +2 -2
- package/lib/Embed/conceptComponents.js +9 -9
- package/lib/ErrorMessage/ErrorMessage.js +1 -1
- package/lib/FactBox/FactBox.js +2 -2
- package/lib/FileList/File.js +1 -1
- package/lib/FileList/Format.js +3 -3
- package/lib/FrontpageArticle/FrontpageArticle.js +1 -1
- package/lib/Gloss/Gloss.js +9 -11
- package/lib/Gloss/GlossExample.js +3 -4
- package/lib/Grid/Grid.js +1 -1
- package/lib/Image/Image.js +7 -8
- package/lib/Image/ImageLink.js +1 -1
- package/lib/KeyFigure/KeyFigure.js +2 -2
- package/lib/LanguageSelector/LanguageSelector.js +2 -2
- package/lib/LetterFilter/LetterFilter.js +1 -1
- package/lib/LicenseByline/EmbedByline.js +5 -6
- package/lib/LicenseByline/LicenseDescription.js +1 -1
- package/lib/LicenseByline/LicenseLink.js +1 -2
- package/lib/Messages/MessageBox.js +1 -1
- package/lib/Notion/Notion.js +2 -2
- package/lib/Notion/NotionImage.d.ts +1 -11
- package/lib/Notion/NotionImage.js +12 -59
- package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
- package/lib/ResourceBox/ResourceBox.js +13 -18
- package/lib/Search/ActiveFilters.js +1 -1
- package/lib/Search/ContentTypeResult.js +9 -6
- package/lib/Search/ContentTypeResultStyles.js +1 -1
- package/lib/Search/IsPathToHighlight.js +1 -1
- package/lib/Search/SearchField.js +6 -8
- package/lib/Search/SearchResult.js +14 -19
- package/lib/Search/SearchResultSleeve.js +14 -16
- package/lib/SnackBar/SnackbarProvider.js +8 -11
- package/lib/TagSelector/TagSelector.js +1 -1
- package/lib/TagSelector/ariaMessages.js +6 -6
- package/lib/TreeStructure/AddFolderButton.js +4 -6
- package/lib/TreeStructure/ComboboxButton.js +4 -7
- package/lib/TreeStructure/FolderItem.js +12 -15
- package/lib/TreeStructure/FolderItems.js +3 -3
- package/lib/TreeStructure/TreeStructure.js +9 -12
- package/lib/TreeStructure/helperFunctions.js +1 -1
- package/lib/ZendeskButton/ZendeskButton.d.ts +19 -0
- package/lib/ZendeskButton/ZendeskButton.js +61 -0
- package/lib/i18n/formatNestedMessages.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +9 -8
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +9 -8
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +9 -8
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +9 -8
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +9 -8
- package/lib/styles.css +686 -0
- package/lib/types.d.ts +1 -0
- package/lib/utils/relativeUrl.js +3 -3
- package/package.json +17 -12
- package/src/AudioPlayer/AudioPlayer.tsx +139 -176
- package/src/AudioPlayer/Controls.tsx +210 -250
- package/src/AudioPlayer/SpeechControl.tsx +9 -7
- package/src/BlogPost/BlogPost.tsx +82 -58
- package/src/CodeBlock/CodeBlock.stories.tsx +0 -43
- package/src/CodeBlock/CodeBlock.tsx +91 -202
- package/src/ContactBlock/ContactBlock.tsx +10 -2
- package/src/Embed/CodeEmbed.stories.tsx +95 -0
- package/src/Embed/CodeEmbed.tsx +62 -7
- package/src/Embed/ConceptEmbed.tsx +1 -9
- package/src/Embed/EmbedErrorPlaceholder.tsx +31 -28
- package/src/Embed/ImageEmbed.stories.tsx +53 -11
- package/src/Embed/ImageEmbed.tsx +162 -166
- package/src/Notion/NotionImage.tsx +4 -54
- package/src/ResourceBox/ResourceBox.tsx +3 -15
- package/src/Search/ContentTypeResult.tsx +9 -3
- package/src/Search/SearchResultSleeve.tsx +5 -2
- package/src/ZendeskButton/ZendeskButton.tsx +58 -0
- package/src/index.ts +4 -0
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
- package/src/types.ts +2 -0
- package/src/Image/__tests__/Image-test.tsx +0 -66
- package/src/Image/__tests__/__snapshots__/Image-test.tsx.snap +0 -194
|
@@ -824,6 +824,7 @@ const messages = {
|
|
|
824
824
|
url: "Boasttuvuohta jietnafiilla viežžamis.",
|
|
825
825
|
caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis.",
|
|
826
826
|
},
|
|
827
|
+
valueText: "{{start}} av {{end}}",
|
|
827
828
|
controls: {
|
|
828
829
|
forward15sec: "Sirdde 15 sekundda ovddas",
|
|
829
830
|
rewind15sec: "Sirdde 15 sekundda maŋos",
|
|
@@ -826,6 +826,7 @@ const messages = {
|
|
|
826
826
|
url: "Fiejlie tjoeje-veedtjemisnie.",
|
|
827
827
|
caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie.",
|
|
828
828
|
},
|
|
829
|
+
valueText: "{{start}} av {{end}}",
|
|
829
830
|
controls: {
|
|
830
831
|
forward15sec: "Juhtieh 15 sekundh åvtese",
|
|
831
832
|
rewind15sec: "Juhtieh 15 sekundh bååstede",
|
package/src/types.ts
CHANGED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, NDLA.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/* eslint-env jest */
|
|
10
|
-
|
|
11
|
-
import { render } from "@testing-library/react";
|
|
12
|
-
import "@testing-library/jest-dom";
|
|
13
|
-
import Image, { makeSrcQueryString } from "../Image";
|
|
14
|
-
|
|
15
|
-
test("Image renderers correctly", () => {
|
|
16
|
-
const { container } = render(<Image alt="example" src="https://example.com/image.png" />, { container: undefined });
|
|
17
|
-
|
|
18
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test("Lazyloaded image renderers correctly", () => {
|
|
22
|
-
const { container } = render(
|
|
23
|
-
<Image lazyLoad lazyLoadSrc="https://example.com/blurry.png" alt="example" src="https://example.com/image.png" />,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
test("Image with crop and focalpoint props renderers correctly", () => {
|
|
30
|
-
const { container } = render(
|
|
31
|
-
<Image
|
|
32
|
-
crop={{
|
|
33
|
-
startX: 14.59,
|
|
34
|
-
endX: 79.63,
|
|
35
|
-
startY: 20,
|
|
36
|
-
endY: 100,
|
|
37
|
-
}}
|
|
38
|
-
focalPoint={{
|
|
39
|
-
x: 65.08,
|
|
40
|
-
y: 45.28,
|
|
41
|
-
}}
|
|
42
|
-
alt="example"
|
|
43
|
-
src="https://example.com/image.png"
|
|
44
|
-
/>,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
test("makeSrcQueryString renders correctly", () => {
|
|
51
|
-
const crop = {
|
|
52
|
-
startX: 14.59,
|
|
53
|
-
endX: 79.63,
|
|
54
|
-
startY: 20,
|
|
55
|
-
endY: 100,
|
|
56
|
-
};
|
|
57
|
-
const focalPoint = {
|
|
58
|
-
x: 65.08,
|
|
59
|
-
y: 45.28,
|
|
60
|
-
};
|
|
61
|
-
expect(makeSrcQueryString(undefined, undefined, undefined)).toMatch("");
|
|
62
|
-
expect(makeSrcQueryString(1024, undefined, undefined)).toMatch("width=1024");
|
|
63
|
-
expect(makeSrcQueryString(undefined, crop, undefined)).toMatchSnapshot();
|
|
64
|
-
expect(makeSrcQueryString(undefined, undefined, focalPoint)).toMatchSnapshot();
|
|
65
|
-
expect(makeSrcQueryString(1024, crop, focalPoint)).toMatchSnapshot();
|
|
66
|
-
});
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Image renderers correctly 1`] = `
|
|
4
|
-
.emotion-0 {
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.emotion-0[data-expanded="true"] {
|
|
10
|
-
width: 100%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.emotion-0 picture {
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.emotion-0[data-svg="true"] {
|
|
18
|
-
display: -webkit-box;
|
|
19
|
-
display: -webkit-flex;
|
|
20
|
-
display: -ms-flexbox;
|
|
21
|
-
display: flex;
|
|
22
|
-
-webkit-box-pack: center;
|
|
23
|
-
-ms-flex-pack: center;
|
|
24
|
-
-webkit-justify-content: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.emotion-0[data-border="true"] {
|
|
29
|
-
border: 1px solid #a5bcd3;
|
|
30
|
-
border-bottom: 0;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
border-bottom-left-radius: 0;
|
|
33
|
-
border-bottom-right-radius: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.emotion-0[data-expandable="true"] {
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.emotion-1[data-border="true"] {
|
|
41
|
-
border-radius: 3px;
|
|
42
|
-
border-bottom-left-radius: 0;
|
|
43
|
-
border-bottom-right-radius: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
<div
|
|
47
|
-
class="emotion-0"
|
|
48
|
-
data-expandable="false"
|
|
49
|
-
data-svg="false"
|
|
50
|
-
>
|
|
51
|
-
<picture>
|
|
52
|
-
<source
|
|
53
|
-
sizes="(min-width: 1024px) 1024px, 100vw"
|
|
54
|
-
srcset="https://example.com/image.png?width=2720 2720w, https://example.com/image.png?width=2080 2080w, https://example.com/image.png?width=1760 1760w, https://example.com/image.png?width=1440 1440w, https://example.com/image.png?width=1120 1120w, https://example.com/image.png?width=1000 1000w, https://example.com/image.png?width=960 960w, https://example.com/image.png?width=800 800w, https://example.com/image.png?width=640 640w, https://example.com/image.png?width=480 480w, https://example.com/image.png?width=320 320w, https://example.com/image.png?width=240 240w, https://example.com/image.png?width=180 180w"
|
|
55
|
-
/>
|
|
56
|
-
<img
|
|
57
|
-
alt="example"
|
|
58
|
-
class="emotion-1"
|
|
59
|
-
src="https://example.com/image.png?width=1024"
|
|
60
|
-
/>
|
|
61
|
-
</picture>
|
|
62
|
-
</div>
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
exports[`Image with crop and focalpoint props renderers correctly 1`] = `
|
|
66
|
-
.emotion-0 {
|
|
67
|
-
overflow: hidden;
|
|
68
|
-
position: relative;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.emotion-0[data-expanded="true"] {
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.emotion-0 picture {
|
|
76
|
-
width: 100%;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.emotion-0[data-svg="true"] {
|
|
80
|
-
display: -webkit-box;
|
|
81
|
-
display: -webkit-flex;
|
|
82
|
-
display: -ms-flexbox;
|
|
83
|
-
display: flex;
|
|
84
|
-
-webkit-box-pack: center;
|
|
85
|
-
-ms-flex-pack: center;
|
|
86
|
-
-webkit-justify-content: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.emotion-0[data-border="true"] {
|
|
91
|
-
border: 1px solid #a5bcd3;
|
|
92
|
-
border-bottom: 0;
|
|
93
|
-
border-radius: 4px;
|
|
94
|
-
border-bottom-left-radius: 0;
|
|
95
|
-
border-bottom-right-radius: 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.emotion-0[data-expandable="true"] {
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.emotion-1[data-border="true"] {
|
|
103
|
-
border-radius: 3px;
|
|
104
|
-
border-bottom-left-radius: 0;
|
|
105
|
-
border-bottom-right-radius: 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
<div
|
|
109
|
-
class="emotion-0"
|
|
110
|
-
data-expandable="false"
|
|
111
|
-
data-svg="false"
|
|
112
|
-
>
|
|
113
|
-
<picture>
|
|
114
|
-
<source
|
|
115
|
-
sizes="(min-width: 1024px) 1024px, 100vw"
|
|
116
|
-
srcset="https://example.com/image.png?width=2720&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 2720w, https://example.com/image.png?width=2080&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 2080w, https://example.com/image.png?width=1760&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 1760w, https://example.com/image.png?width=1440&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 1440w, https://example.com/image.png?width=1120&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 1120w, https://example.com/image.png?width=1000&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 1000w, https://example.com/image.png?width=960&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 960w, https://example.com/image.png?width=800&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 800w, https://example.com/image.png?width=640&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 640w, https://example.com/image.png?width=480&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 480w, https://example.com/image.png?width=320&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 320w, https://example.com/image.png?width=240&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 240w, https://example.com/image.png?width=180&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28 180w"
|
|
117
|
-
/>
|
|
118
|
-
<img
|
|
119
|
-
alt="example"
|
|
120
|
-
class="emotion-1"
|
|
121
|
-
src="https://example.com/image.png?width=1024&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28"
|
|
122
|
-
/>
|
|
123
|
-
</picture>
|
|
124
|
-
</div>
|
|
125
|
-
`;
|
|
126
|
-
|
|
127
|
-
exports[`Lazyloaded image renderers correctly 1`] = `
|
|
128
|
-
.emotion-0 {
|
|
129
|
-
overflow: hidden;
|
|
130
|
-
position: relative;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.emotion-0[data-expanded="true"] {
|
|
134
|
-
width: 100%;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.emotion-0 picture {
|
|
138
|
-
width: 100%;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.emotion-0[data-svg="true"] {
|
|
142
|
-
display: -webkit-box;
|
|
143
|
-
display: -webkit-flex;
|
|
144
|
-
display: -ms-flexbox;
|
|
145
|
-
display: flex;
|
|
146
|
-
-webkit-box-pack: center;
|
|
147
|
-
-ms-flex-pack: center;
|
|
148
|
-
-webkit-justify-content: center;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.emotion-0[data-border="true"] {
|
|
153
|
-
border: 1px solid #a5bcd3;
|
|
154
|
-
border-bottom: 0;
|
|
155
|
-
border-radius: 4px;
|
|
156
|
-
border-bottom-left-radius: 0;
|
|
157
|
-
border-bottom-right-radius: 0;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.emotion-0[data-expandable="true"] {
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.emotion-1[data-border="true"] {
|
|
165
|
-
border-radius: 3px;
|
|
166
|
-
border-bottom-left-radius: 0;
|
|
167
|
-
border-bottom-right-radius: 0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
<div
|
|
171
|
-
class="emotion-0"
|
|
172
|
-
data-expandable="false"
|
|
173
|
-
data-svg="false"
|
|
174
|
-
>
|
|
175
|
-
<picture>
|
|
176
|
-
<source
|
|
177
|
-
sizes="(min-width: 1024px) 1024px, 100vw"
|
|
178
|
-
srcset="https://example.com/image.png?width=2720 2720w, https://example.com/image.png?width=2080 2080w, https://example.com/image.png?width=1760 1760w, https://example.com/image.png?width=1440 1440w, https://example.com/image.png?width=1120 1120w, https://example.com/image.png?width=1000 1000w, https://example.com/image.png?width=960 960w, https://example.com/image.png?width=800 800w, https://example.com/image.png?width=640 640w, https://example.com/image.png?width=480 480w, https://example.com/image.png?width=320 320w, https://example.com/image.png?width=240 240w, https://example.com/image.png?width=180 180w"
|
|
179
|
-
/>
|
|
180
|
-
<img
|
|
181
|
-
alt="example"
|
|
182
|
-
class="emotion-1"
|
|
183
|
-
loading="lazy"
|
|
184
|
-
src="https://example.com/image.png?width=1024"
|
|
185
|
-
/>
|
|
186
|
-
</picture>
|
|
187
|
-
</div>
|
|
188
|
-
`;
|
|
189
|
-
|
|
190
|
-
exports[`makeSrcQueryString renders correctly 1`] = `"cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100"`;
|
|
191
|
-
|
|
192
|
-
exports[`makeSrcQueryString renders correctly 2`] = `"focalX=65.08&focalY=45.28"`;
|
|
193
|
-
|
|
194
|
-
exports[`makeSrcQueryString renders correctly 3`] = `"width=1024&cropStartX=14.59&cropEndX=79.63&cropStartY=20&cropEndY=100&focalX=65.08&focalY=45.28"`;
|