@ndla/ui 56.0.26-alpha.0 → 56.0.28-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 +16 -11
- package/dist/styles.css +66 -35
- package/es/Article/Article.js +3 -1
- package/es/Article/ArticleByline.js +1 -1
- package/es/CampaignBlock/CampaignBlock.js +59 -36
- package/es/ContentTypeHero/ContentTypeHero.js +1 -1
- package/es/Embed/BrightcoveEmbed.js +3 -4
- package/es/Embed/ImageEmbed.js +10 -4
- package/es/LicenseByline/EmbedByline.js +7 -3
- package/es/LicenseByline/LicenseLink.js +1 -1
- package/es/styles.css +66 -35
- package/lib/Article/Article.js +3 -1
- package/lib/Article/ArticleByline.js +1 -1
- package/lib/CampaignBlock/CampaignBlock.js +59 -36
- package/lib/ContentTypeHero/ContentTypeHero.js +1 -1
- package/lib/Embed/BrightcoveEmbed.js +3 -4
- package/lib/Embed/ImageEmbed.js +10 -4
- package/lib/LicenseByline/EmbedByline.d.ts +3 -1
- package/lib/LicenseByline/EmbedByline.js +7 -3
- package/lib/LicenseByline/LicenseLink.js +1 -1
- package/lib/styles.css +66 -35
- package/package.json +8 -8
- package/src/Article/Article.tsx +2 -0
- package/src/Article/ArticleByline.tsx +18 -16
- package/src/CampaignBlock/CampaignBlock.tsx +51 -27
- package/src/ContentTypeHero/ContentTypeHero.tsx +1 -1
- package/src/Embed/BrightcoveEmbed.tsx +3 -4
- package/src/Embed/ImageEmbed.tsx +15 -10
- package/src/LicenseByline/EmbedByline.tsx +19 -4
- package/src/LicenseByline/LicenseLink.tsx +1 -1
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"overflowWrap]___[value:anywhere]___[cond:& h1",
|
|
19
19
|
"gap]___[value:medium",
|
|
20
20
|
"paddingBlockStart]___[value:xxlarge",
|
|
21
|
+
"hyphens]___[value:auto",
|
|
21
22
|
"gap]___[value:xxlarge",
|
|
22
23
|
"paddingBlockEnd]___[value:5xlarge]___[cond:& > :is(:last-child)",
|
|
23
24
|
"minHeight]___[value:xxlarge",
|
|
@@ -122,20 +123,23 @@
|
|
|
122
123
|
"textDecoration]___[value:none]___[cond:_hover",
|
|
123
124
|
"textDecoration]___[value:none]___[cond:_focusVisible",
|
|
124
125
|
"display]___[value:none]___[cond:tabletDown",
|
|
126
|
+
"containerType]___[value:inline-size",
|
|
125
127
|
"display]___[value:grid",
|
|
126
128
|
"gridTemplateColumns]___[value:1fr",
|
|
127
|
-
"gridTemplateColumns]___[value:minmax(230px, 455px) auto]___[cond
|
|
128
|
-
"gridTemplateColumns]___[value:
|
|
129
|
+
"gridTemplateColumns]___[value:minmax(230px, 455px) auto]___[cond:@/tablet",
|
|
130
|
+
"gridTemplateColumns]___[value:minmax(230px, 455px) auto]___[cond:@supports not (container-type: inline-size)<___>tabletWide",
|
|
131
|
+
"gridTemplateColumns]___[value:auto minmax(230px, 455px)]___[cond:@/tablet",
|
|
132
|
+
"gridTemplateColumns]___[value:auto minmax(230px, 455px)]___[cond:@supports not (container-type: inline-size)<___>tabletWide",
|
|
129
133
|
"fontWeight]___[value:bold",
|
|
130
134
|
"height]___[value:215px",
|
|
131
|
-
"height]___[value:
|
|
132
|
-
"height]___[value:
|
|
133
|
-
"
|
|
134
|
-
"display]___[value:block]___[cond:
|
|
135
|
-
"overflow]___[value:hidden]___[cond:
|
|
136
|
-
"position]___[value:relative]___[cond:
|
|
137
|
-
"lineClamp]___[value:4]___[cond:
|
|
138
|
-
"boxOrient]___[value:vertical]___[cond:
|
|
135
|
+
"height]___[value:340px]___[cond:@/tablet",
|
|
136
|
+
"height]___[value:265px]___[cond:@supports not (container-type: inline-size)<___>tablet",
|
|
137
|
+
"height]___[value:340px]___[cond:@supports not (container-type: inline-size)<___>tabletWide",
|
|
138
|
+
"display]___[value:block]___[cond:tablet",
|
|
139
|
+
"overflow]___[value:hidden]___[cond:tablet",
|
|
140
|
+
"position]___[value:relative]___[cond:tablet",
|
|
141
|
+
"lineClamp]___[value:4]___[cond:tablet",
|
|
142
|
+
"boxOrient]___[value:vertical]___[cond:tablet",
|
|
139
143
|
"borderLeft]___[value:4px solid",
|
|
140
144
|
"borderLeftColor]___[value:stroke.default",
|
|
141
145
|
"boxSizing]___[value:border-box",
|
|
@@ -390,6 +394,7 @@
|
|
|
390
394
|
"maxWidth]___[value:1024px",
|
|
391
395
|
"minHeight]___[value:100vh",
|
|
392
396
|
"backgroundColor]___[value:#f8f8f8]___[cond:tablet",
|
|
397
|
+
"color]___[value:text.subtle",
|
|
393
398
|
"borderColor]___[value:stroke.error",
|
|
394
399
|
"background]___[value:surface.dangerSubtle",
|
|
395
400
|
"whiteSpace]___[value:pre-wrap",
|
|
@@ -407,7 +412,7 @@
|
|
|
407
412
|
"whiteSpace]___[value:pre-wrap]___[cond:mobileWideDown<___>_open",
|
|
408
413
|
"maxHeight]___[value:none]___[cond:mobileWideDown<___>_open",
|
|
409
414
|
"display]___[value:none]___[cond:mobileWide",
|
|
410
|
-
"color]___[value:
|
|
415
|
+
"color]___[value:text.link",
|
|
411
416
|
"whiteSpace]___[value:nowrap",
|
|
412
417
|
"textDecoration]___[value:none]___[cond:_focusWithin",
|
|
413
418
|
"textDecoration]___[value:underline]___[cond:& h3",
|
package/dist/styles.css
CHANGED
|
@@ -117,6 +117,11 @@
|
|
|
117
117
|
padding-block-start: var(--spacing-xxlarge);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
.hy_auto {
|
|
121
|
+
hyphens: auto;
|
|
122
|
+
-webkit-hyphens: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
120
125
|
.gap_xxlarge {
|
|
121
126
|
gap: var(--spacing-xxlarge);
|
|
122
127
|
}
|
|
@@ -334,6 +339,10 @@
|
|
|
334
339
|
text-decoration: underline;
|
|
335
340
|
}
|
|
336
341
|
|
|
342
|
+
.cq-t_inline-size {
|
|
343
|
+
container-type: inline-size;
|
|
344
|
+
}
|
|
345
|
+
|
|
337
346
|
.d_grid {
|
|
338
347
|
display: grid;
|
|
339
348
|
}
|
|
@@ -342,10 +351,6 @@
|
|
|
342
351
|
height: 215px;
|
|
343
352
|
}
|
|
344
353
|
|
|
345
|
-
.min-w_270px {
|
|
346
|
-
min-width: 270px;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
354
|
.bd-l_4px_solid {
|
|
350
355
|
border-left: 4px solid;
|
|
351
356
|
}
|
|
@@ -574,6 +579,10 @@
|
|
|
574
579
|
min-height: 100vh;
|
|
575
580
|
}
|
|
576
581
|
|
|
582
|
+
.c_text\.subtle {
|
|
583
|
+
color: var(--colors-text-subtle);
|
|
584
|
+
}
|
|
585
|
+
|
|
577
586
|
.bg_surface\.dangerSubtle {
|
|
578
587
|
background: var(--colors-surface-danger-subtle);
|
|
579
588
|
}
|
|
@@ -582,8 +591,8 @@
|
|
|
582
591
|
white-space: pre-wrap;
|
|
583
592
|
}
|
|
584
593
|
|
|
585
|
-
.
|
|
586
|
-
color: var(--colors-
|
|
594
|
+
.c_text\.link {
|
|
595
|
+
color: var(--colors-text-link);
|
|
587
596
|
}
|
|
588
597
|
|
|
589
598
|
.white-space_nowrap {
|
|
@@ -1430,6 +1439,28 @@
|
|
|
1430
1439
|
height: var(--sizes-large);
|
|
1431
1440
|
}
|
|
1432
1441
|
|
|
1442
|
+
@supports not (container-type: inline-size) {
|
|
1443
|
+
@media screen and (min-width: 37.5625rem) {
|
|
1444
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tablet\:h_265px {
|
|
1445
|
+
height: 265px;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
@supports not (container-type: inline-size) {
|
|
1451
|
+
@media screen and (min-width: 48rem) {
|
|
1452
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:h_340px {
|
|
1453
|
+
height: 340px;
|
|
1454
|
+
}
|
|
1455
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1456
|
+
grid-template-columns: minmax(230px, 455px) auto;
|
|
1457
|
+
}
|
|
1458
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1459
|
+
grid-template-columns: auto minmax(230px, 455px);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1433
1464
|
@media screen and (min-width: 29.75rem) {
|
|
1434
1465
|
.mobileWide\:d_none {
|
|
1435
1466
|
display: none;
|
|
@@ -1440,14 +1471,41 @@
|
|
|
1440
1471
|
.mobileWide\:pr_medium {
|
|
1441
1472
|
padding-right: var(--spacing-medium);
|
|
1442
1473
|
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
@container (min-width: 37.5625rem) {
|
|
1477
|
+
.\@\/tablet\:h_340px {
|
|
1478
|
+
height: 340px;
|
|
1479
|
+
}
|
|
1480
|
+
.\@\/tablet\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1481
|
+
grid-template-columns: minmax(230px, 455px) auto;
|
|
1482
|
+
}
|
|
1483
|
+
.\@\/tablet\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1484
|
+
grid-template-columns: auto minmax(230px, 455px);
|
|
1485
|
+
}
|
|
1443
1486
|
}
|
|
1444
1487
|
|
|
1445
1488
|
@media screen and (min-width: 37.5625rem) {
|
|
1446
1489
|
.tablet\:px_medium {
|
|
1447
1490
|
padding-inline: var(--spacing-medium);
|
|
1448
1491
|
}
|
|
1449
|
-
.tablet\:
|
|
1450
|
-
|
|
1492
|
+
.tablet\:d_block {
|
|
1493
|
+
display: block;
|
|
1494
|
+
}
|
|
1495
|
+
.tablet\:ov_hidden {
|
|
1496
|
+
overflow: hidden;
|
|
1497
|
+
}
|
|
1498
|
+
.tablet\:pos_relative {
|
|
1499
|
+
position: relative;
|
|
1500
|
+
}
|
|
1501
|
+
.tablet\:lc_4 {
|
|
1502
|
+
overflow: hidden;
|
|
1503
|
+
display: -webkit-box;
|
|
1504
|
+
-webkit-line-clamp: 4;
|
|
1505
|
+
-webkit-box-orient: vertical;
|
|
1506
|
+
}
|
|
1507
|
+
.tablet\:box-orient_vertical {
|
|
1508
|
+
box-orient: vertical;
|
|
1451
1509
|
}
|
|
1452
1510
|
.tablet\:h_26px {
|
|
1453
1511
|
height: 26px;
|
|
@@ -1526,39 +1584,12 @@
|
|
|
1526
1584
|
}
|
|
1527
1585
|
.tabletWide\:max-w_532px {
|
|
1528
1586
|
max-width: 532px;
|
|
1529
|
-
}
|
|
1530
|
-
.tabletWide\:h_340px {
|
|
1531
|
-
height: 340px;
|
|
1532
|
-
}
|
|
1533
|
-
.tabletWide\:d_block {
|
|
1534
|
-
display: block;
|
|
1535
|
-
}
|
|
1536
|
-
.tabletWide\:ov_hidden {
|
|
1537
|
-
overflow: hidden;
|
|
1538
|
-
}
|
|
1539
|
-
.tabletWide\:pos_relative {
|
|
1540
|
-
position: relative;
|
|
1541
|
-
}
|
|
1542
|
-
.tabletWide\:lc_4 {
|
|
1543
|
-
overflow: hidden;
|
|
1544
|
-
display: -webkit-box;
|
|
1545
|
-
-webkit-line-clamp: 4;
|
|
1546
|
-
-webkit-box-orient: vertical;
|
|
1547
|
-
}
|
|
1548
|
-
.tabletWide\:box-orient_vertical {
|
|
1549
|
-
box-orient: vertical;
|
|
1550
1587
|
}
|
|
1551
1588
|
.tabletWide\:flex-d_row {
|
|
1552
1589
|
flex-direction: row;
|
|
1553
1590
|
}
|
|
1554
1591
|
.tabletWide\:jc_space-between {
|
|
1555
1592
|
justify-content: space-between;
|
|
1556
|
-
}
|
|
1557
|
-
.tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1558
|
-
grid-template-columns: minmax(230px, 455px) auto;
|
|
1559
|
-
}
|
|
1560
|
-
.tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1561
|
-
grid-template-columns: auto minmax(230px, 455px);
|
|
1562
1593
|
}
|
|
1563
1594
|
}
|
|
1564
1595
|
|
package/es/Article/Article.js
CHANGED
|
@@ -75,7 +75,9 @@ export const ArticleHeader = styled(ark.header, {
|
|
|
75
75
|
gap: "medium",
|
|
76
76
|
alignItems: "flex-start",
|
|
77
77
|
width: "100%",
|
|
78
|
-
paddingBlockStart: "xxlarge"
|
|
78
|
+
paddingBlockStart: "xxlarge",
|
|
79
|
+
overflowWrap: "break-word",
|
|
80
|
+
hyphens: "auto"
|
|
79
81
|
}
|
|
80
82
|
}, {
|
|
81
83
|
baseComponent: true
|
|
@@ -142,7 +142,7 @@ export const ArticleByline = _ref => {
|
|
|
142
142
|
}), /*#__PURE__*/_jsxs("div", {
|
|
143
143
|
children: [t(`${bylineType}.lastUpdated`), " ", published]
|
|
144
144
|
})]
|
|
145
|
-
}), /*#__PURE__*/_jsxs(StyledAccordionRoot, {
|
|
145
|
+
}), (!!licenseBox || !!footnotes?.length) && /*#__PURE__*/_jsxs(StyledAccordionRoot, {
|
|
146
146
|
multiple: true,
|
|
147
147
|
value: openAccordions,
|
|
148
148
|
onValueChange: details => setOpenAccordions(details.value),
|
|
@@ -13,6 +13,13 @@ import { SafeLink } from "@ndla/safelink";
|
|
|
13
13
|
import { styled } from "@ndla/styled-system/jsx";
|
|
14
14
|
import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const Wrapper = styled("div", {
|
|
17
|
+
base: {
|
|
18
|
+
width: "100%",
|
|
19
|
+
height: "100%",
|
|
20
|
+
containerType: "inline-size"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
16
23
|
const Container = styled("div", {
|
|
17
24
|
base: {
|
|
18
25
|
display: "grid",
|
|
@@ -28,13 +35,23 @@ const Container = styled("div", {
|
|
|
28
35
|
variants: {
|
|
29
36
|
imageSide: {
|
|
30
37
|
left: {
|
|
31
|
-
|
|
38
|
+
"@/tablet": {
|
|
32
39
|
gridTemplateColumns: "minmax(230px, 455px) auto" //required for campaign block in myNdla
|
|
40
|
+
},
|
|
41
|
+
"@supports not (container-type: inline-size)": {
|
|
42
|
+
tabletWide: {
|
|
43
|
+
gridTemplateColumns: "minmax(230px, 455px) auto"
|
|
44
|
+
}
|
|
33
45
|
}
|
|
34
46
|
},
|
|
35
47
|
right: {
|
|
36
|
-
|
|
48
|
+
"@/tablet": {
|
|
37
49
|
gridTemplateColumns: "auto minmax(230px, 455px)" //required for campaign block in myNdla
|
|
50
|
+
},
|
|
51
|
+
"@supports not (container-type: inline-size)": {
|
|
52
|
+
tabletWide: {
|
|
53
|
+
gridTemplateColumns: "auto minmax(230px, 455px)"
|
|
54
|
+
}
|
|
38
55
|
}
|
|
39
56
|
}
|
|
40
57
|
}
|
|
@@ -69,11 +86,16 @@ const StyledImg = styled("img", {
|
|
|
69
86
|
objectFit: "cover",
|
|
70
87
|
width: "100%",
|
|
71
88
|
height: "215px",
|
|
72
|
-
tablet: {
|
|
73
|
-
height: "265px"
|
|
74
|
-
},
|
|
75
|
-
tabletWide: {
|
|
89
|
+
"@/tablet": {
|
|
76
90
|
height: "340px"
|
|
91
|
+
},
|
|
92
|
+
"@supports not (container-type: inline-size)": {
|
|
93
|
+
tablet: {
|
|
94
|
+
height: "265px"
|
|
95
|
+
},
|
|
96
|
+
tabletWide: {
|
|
97
|
+
height: "340px"
|
|
98
|
+
}
|
|
77
99
|
}
|
|
78
100
|
}
|
|
79
101
|
});
|
|
@@ -86,13 +108,12 @@ const ContentWrapper = styled("div", {
|
|
|
86
108
|
alignItems: "flex-start",
|
|
87
109
|
justifyContent: "center",
|
|
88
110
|
paddingBlock: "medium",
|
|
89
|
-
paddingInline: "medium"
|
|
90
|
-
minWidth: "270px" //required for campaign block in myNdla
|
|
111
|
+
paddingInline: "medium"
|
|
91
112
|
}
|
|
92
113
|
});
|
|
93
114
|
const StyledText = styled(Text, {
|
|
94
115
|
base: {
|
|
95
|
-
|
|
116
|
+
tablet: {
|
|
96
117
|
display: "block",
|
|
97
118
|
overflow: "hidden",
|
|
98
119
|
position: "relative",
|
|
@@ -136,34 +157,36 @@ const CampaignBlock = _ref2 => {
|
|
|
136
157
|
alt: image.alt
|
|
137
158
|
});
|
|
138
159
|
const HeaderComponent = url?.url ? LinkHeader : Text;
|
|
139
|
-
return /*#__PURE__*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
children: [/*#__PURE__*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
children:
|
|
160
|
+
return /*#__PURE__*/_jsx(Wrapper, {
|
|
161
|
+
children: /*#__PURE__*/_jsxs(Container, {
|
|
162
|
+
className: className,
|
|
163
|
+
"data-embed-type": "campaign-block",
|
|
164
|
+
imageSide: imageSide,
|
|
165
|
+
children: [imageSide === "left" && imageComponent, /*#__PURE__*/_jsxs(ContentWrapper, {
|
|
166
|
+
children: [/*#__PURE__*/_jsx(MaybeLinkText, {
|
|
167
|
+
url: url?.url,
|
|
168
|
+
path: path,
|
|
169
|
+
children: /*#__PURE__*/_jsx(HeaderComponent, {
|
|
170
|
+
asChild: true,
|
|
171
|
+
consumeCss: true,
|
|
172
|
+
textStyle: "heading.small",
|
|
173
|
+
children: /*#__PURE__*/_jsx(InternalHeading, {
|
|
174
|
+
children: parse(title)
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
}), /*#__PURE__*/_jsx(StyledText, {
|
|
178
|
+
textStyle: "body.xlarge",
|
|
179
|
+
children: parse(description)
|
|
180
|
+
}), !!url?.url && /*#__PURE__*/_jsx(MaybeLinkText, {
|
|
181
|
+
url: url.url,
|
|
182
|
+
path: path,
|
|
183
|
+
children: /*#__PURE__*/_jsxs(LinkText, {
|
|
184
|
+
textStyle: "body.medium",
|
|
185
|
+
children: [parse(url.text ?? ""), /*#__PURE__*/_jsx(ArrowRightLine, {})]
|
|
153
186
|
})
|
|
154
|
-
})
|
|
155
|
-
}),
|
|
156
|
-
|
|
157
|
-
children: parse(description)
|
|
158
|
-
}), !!url?.url && /*#__PURE__*/_jsx(MaybeLinkText, {
|
|
159
|
-
url: url.url,
|
|
160
|
-
path: path,
|
|
161
|
-
children: /*#__PURE__*/_jsxs(LinkText, {
|
|
162
|
-
textStyle: "body.medium",
|
|
163
|
-
children: [parse(url.text ?? ""), /*#__PURE__*/_jsx(ArrowRightLine, {})]
|
|
164
|
-
})
|
|
165
|
-
})]
|
|
166
|
-
}), imageSide !== "left" && imageComponent]
|
|
187
|
+
})]
|
|
188
|
+
}), imageSide !== "left" && imageComponent]
|
|
189
|
+
})
|
|
167
190
|
});
|
|
168
191
|
};
|
|
169
192
|
export default CampaignBlock;
|
|
@@ -21,7 +21,7 @@ export const contentTypeToHeroMap = {
|
|
|
21
21
|
[contentTypes.LEARNING_PATH]: "primary",
|
|
22
22
|
[contentTypes.TOPIC]: "neutral",
|
|
23
23
|
[contentTypes.MULTIDISCIPLINARY]: "primary",
|
|
24
|
-
[contentTypes.CONCEPT]: "
|
|
24
|
+
[contentTypes.CONCEPT]: "brand1Moderate",
|
|
25
25
|
[contentTypes.EXTERNAL]: "primary",
|
|
26
26
|
[contentTypes.IMAGE]: "primary",
|
|
27
27
|
[contentTypes.AUDIO]: "primary",
|
|
@@ -22,6 +22,7 @@ const LinkedVideoButton = styled(Button, {
|
|
|
22
22
|
});
|
|
23
23
|
const BrightcoveIframe = styled("iframe", {
|
|
24
24
|
base: {
|
|
25
|
+
border: 0,
|
|
25
26
|
height: "auto",
|
|
26
27
|
width: "100%"
|
|
27
28
|
}
|
|
@@ -85,9 +86,8 @@ const BrightcoveEmbed = _ref => {
|
|
|
85
86
|
ref: iframeRef,
|
|
86
87
|
title: embedData.alt ?? fallbackTitle,
|
|
87
88
|
"aria-label": embedData.alt ?? fallbackTitle,
|
|
88
|
-
frameBorder: "0",
|
|
89
89
|
...getIframeProps(embedData, []),
|
|
90
|
-
|
|
90
|
+
allow: "fullscreen; encrypted-media"
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -111,9 +111,8 @@ const BrightcoveEmbed = _ref => {
|
|
|
111
111
|
className: "original",
|
|
112
112
|
title: embedData.alt ?? data.name ?? fallbackTitle,
|
|
113
113
|
"aria-label": embedData.alt ?? data.name ?? fallbackTitle,
|
|
114
|
-
frameBorder: "0",
|
|
115
114
|
...(alternativeVideoProps && !showOriginalVideo ? alternativeVideoProps : originalVideoProps),
|
|
116
|
-
|
|
115
|
+
allow: "fullscreen; encrypted-media"
|
|
117
116
|
})
|
|
118
117
|
}), /*#__PURE__*/_jsx(EmbedByline, {
|
|
119
118
|
type: "video",
|
package/es/Embed/ImageEmbed.js
CHANGED
|
@@ -150,6 +150,9 @@ const ExpandButton = styled("button", {
|
|
|
150
150
|
transitionProperty: "transform",
|
|
151
151
|
transitionDuration: "normal",
|
|
152
152
|
transitionTimingFunction: "ease-out"
|
|
153
|
+
},
|
|
154
|
+
tabletDown: {
|
|
155
|
+
display: "none"
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
}, {
|
|
@@ -197,11 +200,12 @@ const ImageEmbed = _ref => {
|
|
|
197
200
|
setImageSizes(sizes => !sizes ? expandedSizes : undefined);
|
|
198
201
|
};
|
|
199
202
|
const licenseProps = licenseAttributes(data.copyright.license.license, lang, embedData.url);
|
|
203
|
+
const figureSize = figureProps?.float ? figureProps?.size ?? "medium" : "full";
|
|
200
204
|
|
|
201
205
|
// TODO: Check how this works with `children`. Will only be important for ED
|
|
202
206
|
return /*#__PURE__*/_jsxs(StyledFigure, {
|
|
203
207
|
float: figureProps?.float,
|
|
204
|
-
size: imageSizes ? "full" :
|
|
208
|
+
size: imageSizes ? "full" : figureSize,
|
|
205
209
|
"data-embed-type": "image",
|
|
206
210
|
...licenseProps,
|
|
207
211
|
children: [children, /*#__PURE__*/_jsxs(ImageWrapper, {
|
|
@@ -217,16 +221,18 @@ const ImageEmbed = _ref => {
|
|
|
217
221
|
lang: lang,
|
|
218
222
|
onClick: figureProps?.float ? toggleImageSize : undefined,
|
|
219
223
|
variant: "rounded"
|
|
220
|
-
}),
|
|
224
|
+
}), (embedData.align === "right" || embedData.align === "left") && /*#__PURE__*/_jsx(ExpandButton, {
|
|
221
225
|
"aria-label": t(`license.images.itemImage.zoom${imageSizes ? "Out" : ""}ImageButtonLabel`),
|
|
222
226
|
onClick: toggleImageSize,
|
|
223
227
|
"data-expanded": !!imageSizes,
|
|
224
228
|
children: /*#__PURE__*/_jsx(AddLine, {})
|
|
225
229
|
})]
|
|
226
|
-
}),
|
|
230
|
+
}), /*#__PURE__*/_jsx(EmbedByline, {
|
|
227
231
|
type: "image",
|
|
228
232
|
copyright: data.copyright,
|
|
229
|
-
description:
|
|
233
|
+
description: parsedDescription,
|
|
234
|
+
hideDescription: embedData.hideCaption === "true",
|
|
235
|
+
hideCopyright: embedData.hideByline === "true",
|
|
230
236
|
visibleAlt: previewAlt ? embed.embedData.alt : ""
|
|
231
237
|
})]
|
|
232
238
|
});
|
|
@@ -20,7 +20,8 @@ const BylineWrapper = styled("figcaption", {
|
|
|
20
20
|
flexDirection: "column",
|
|
21
21
|
paddingBlock: "xsmall",
|
|
22
22
|
background: "surface.default",
|
|
23
|
-
textStyle: "label.medium"
|
|
23
|
+
textStyle: "label.medium",
|
|
24
|
+
color: "text.subtle"
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
const ErrorBylineWrapper = styled(BylineWrapper, {
|
|
@@ -58,6 +59,8 @@ export const EmbedByline = _ref => {
|
|
|
58
59
|
description,
|
|
59
60
|
children,
|
|
60
61
|
visibleAlt,
|
|
62
|
+
hideCopyright,
|
|
63
|
+
hideDescription,
|
|
61
64
|
...props
|
|
62
65
|
} = _ref;
|
|
63
66
|
const {
|
|
@@ -80,13 +83,14 @@ export const EmbedByline = _ref => {
|
|
|
80
83
|
const {
|
|
81
84
|
copyright
|
|
82
85
|
} = props;
|
|
86
|
+
const bylineDescription = hideDescription ? "" : description;
|
|
83
87
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
84
88
|
children: [/*#__PURE__*/_jsx(BylineWrapper, {
|
|
85
89
|
children: /*#__PURE__*/_jsxs("div", {
|
|
86
|
-
children: [/*#__PURE__*/_jsx(LicenseContainerContent, {
|
|
90
|
+
children: [hideCopyright && bylineDescription, !hideCopyright && /*#__PURE__*/_jsx(LicenseContainerContent, {
|
|
87
91
|
type: type,
|
|
88
92
|
copyright: copyright,
|
|
89
|
-
children:
|
|
93
|
+
children: bylineDescription
|
|
90
94
|
}), children]
|
|
91
95
|
})
|
|
92
96
|
}), visibleAlt ? /*#__PURE__*/_jsx(StyledText, {
|
|
@@ -11,7 +11,7 @@ import { styled } from "@ndla/styled-system/jsx";
|
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const StyledSafeLink = styled(SafeLink, {
|
|
13
13
|
base: {
|
|
14
|
-
color: "
|
|
14
|
+
color: "text.link",
|
|
15
15
|
textDecoration: "underline",
|
|
16
16
|
whiteSpace: "nowrap",
|
|
17
17
|
_hover: {
|
package/es/styles.css
CHANGED
|
@@ -117,6 +117,11 @@
|
|
|
117
117
|
padding-block-start: var(--spacing-xxlarge);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
.hy_auto {
|
|
121
|
+
hyphens: auto;
|
|
122
|
+
-webkit-hyphens: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
120
125
|
.gap_xxlarge {
|
|
121
126
|
gap: var(--spacing-xxlarge);
|
|
122
127
|
}
|
|
@@ -334,6 +339,10 @@
|
|
|
334
339
|
text-decoration: underline;
|
|
335
340
|
}
|
|
336
341
|
|
|
342
|
+
.cq-t_inline-size {
|
|
343
|
+
container-type: inline-size;
|
|
344
|
+
}
|
|
345
|
+
|
|
337
346
|
.d_grid {
|
|
338
347
|
display: grid;
|
|
339
348
|
}
|
|
@@ -342,10 +351,6 @@
|
|
|
342
351
|
height: 215px;
|
|
343
352
|
}
|
|
344
353
|
|
|
345
|
-
.min-w_270px {
|
|
346
|
-
min-width: 270px;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
354
|
.bd-l_4px_solid {
|
|
350
355
|
border-left: 4px solid;
|
|
351
356
|
}
|
|
@@ -574,6 +579,10 @@
|
|
|
574
579
|
min-height: 100vh;
|
|
575
580
|
}
|
|
576
581
|
|
|
582
|
+
.c_text\.subtle {
|
|
583
|
+
color: var(--colors-text-subtle);
|
|
584
|
+
}
|
|
585
|
+
|
|
577
586
|
.bg_surface\.dangerSubtle {
|
|
578
587
|
background: var(--colors-surface-danger-subtle);
|
|
579
588
|
}
|
|
@@ -582,8 +591,8 @@
|
|
|
582
591
|
white-space: pre-wrap;
|
|
583
592
|
}
|
|
584
593
|
|
|
585
|
-
.
|
|
586
|
-
color: var(--colors-
|
|
594
|
+
.c_text\.link {
|
|
595
|
+
color: var(--colors-text-link);
|
|
587
596
|
}
|
|
588
597
|
|
|
589
598
|
.white-space_nowrap {
|
|
@@ -1430,6 +1439,28 @@
|
|
|
1430
1439
|
height: var(--sizes-large);
|
|
1431
1440
|
}
|
|
1432
1441
|
|
|
1442
|
+
@supports not (container-type: inline-size) {
|
|
1443
|
+
@media screen and (min-width: 37.5625rem) {
|
|
1444
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tablet\:h_265px {
|
|
1445
|
+
height: 265px;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
@supports not (container-type: inline-size) {
|
|
1451
|
+
@media screen and (min-width: 48rem) {
|
|
1452
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:h_340px {
|
|
1453
|
+
height: 340px;
|
|
1454
|
+
}
|
|
1455
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1456
|
+
grid-template-columns: minmax(230px, 455px) auto;
|
|
1457
|
+
}
|
|
1458
|
+
.\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1459
|
+
grid-template-columns: auto minmax(230px, 455px);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1433
1464
|
@media screen and (min-width: 29.75rem) {
|
|
1434
1465
|
.mobileWide\:d_none {
|
|
1435
1466
|
display: none;
|
|
@@ -1440,14 +1471,41 @@
|
|
|
1440
1471
|
.mobileWide\:pr_medium {
|
|
1441
1472
|
padding-right: var(--spacing-medium);
|
|
1442
1473
|
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
@container (min-width: 37.5625rem) {
|
|
1477
|
+
.\@\/tablet\:h_340px {
|
|
1478
|
+
height: 340px;
|
|
1479
|
+
}
|
|
1480
|
+
.\@\/tablet\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1481
|
+
grid-template-columns: minmax(230px, 455px) auto;
|
|
1482
|
+
}
|
|
1483
|
+
.\@\/tablet\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1484
|
+
grid-template-columns: auto minmax(230px, 455px);
|
|
1485
|
+
}
|
|
1443
1486
|
}
|
|
1444
1487
|
|
|
1445
1488
|
@media screen and (min-width: 37.5625rem) {
|
|
1446
1489
|
.tablet\:px_medium {
|
|
1447
1490
|
padding-inline: var(--spacing-medium);
|
|
1448
1491
|
}
|
|
1449
|
-
.tablet\:
|
|
1450
|
-
|
|
1492
|
+
.tablet\:d_block {
|
|
1493
|
+
display: block;
|
|
1494
|
+
}
|
|
1495
|
+
.tablet\:ov_hidden {
|
|
1496
|
+
overflow: hidden;
|
|
1497
|
+
}
|
|
1498
|
+
.tablet\:pos_relative {
|
|
1499
|
+
position: relative;
|
|
1500
|
+
}
|
|
1501
|
+
.tablet\:lc_4 {
|
|
1502
|
+
overflow: hidden;
|
|
1503
|
+
display: -webkit-box;
|
|
1504
|
+
-webkit-line-clamp: 4;
|
|
1505
|
+
-webkit-box-orient: vertical;
|
|
1506
|
+
}
|
|
1507
|
+
.tablet\:box-orient_vertical {
|
|
1508
|
+
box-orient: vertical;
|
|
1451
1509
|
}
|
|
1452
1510
|
.tablet\:h_26px {
|
|
1453
1511
|
height: 26px;
|
|
@@ -1526,39 +1584,12 @@
|
|
|
1526
1584
|
}
|
|
1527
1585
|
.tabletWide\:max-w_532px {
|
|
1528
1586
|
max-width: 532px;
|
|
1529
|
-
}
|
|
1530
|
-
.tabletWide\:h_340px {
|
|
1531
|
-
height: 340px;
|
|
1532
|
-
}
|
|
1533
|
-
.tabletWide\:d_block {
|
|
1534
|
-
display: block;
|
|
1535
|
-
}
|
|
1536
|
-
.tabletWide\:ov_hidden {
|
|
1537
|
-
overflow: hidden;
|
|
1538
|
-
}
|
|
1539
|
-
.tabletWide\:pos_relative {
|
|
1540
|
-
position: relative;
|
|
1541
|
-
}
|
|
1542
|
-
.tabletWide\:lc_4 {
|
|
1543
|
-
overflow: hidden;
|
|
1544
|
-
display: -webkit-box;
|
|
1545
|
-
-webkit-line-clamp: 4;
|
|
1546
|
-
-webkit-box-orient: vertical;
|
|
1547
|
-
}
|
|
1548
|
-
.tabletWide\:box-orient_vertical {
|
|
1549
|
-
box-orient: vertical;
|
|
1550
1587
|
}
|
|
1551
1588
|
.tabletWide\:flex-d_row {
|
|
1552
1589
|
flex-direction: row;
|
|
1553
1590
|
}
|
|
1554
1591
|
.tabletWide\:jc_space-between {
|
|
1555
1592
|
justify-content: space-between;
|
|
1556
|
-
}
|
|
1557
|
-
.tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
|
|
1558
|
-
grid-template-columns: minmax(230px, 455px) auto;
|
|
1559
|
-
}
|
|
1560
|
-
.tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
|
|
1561
|
-
grid-template-columns: auto minmax(230px, 455px);
|
|
1562
1593
|
}
|
|
1563
1594
|
}
|
|
1564
1595
|
|