@ndla/ui 56.0.3-alpha.0 → 56.0.5-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 +35 -8
- package/dist/styles.css +148 -29
- package/es/Article/Article.js +1 -5
- package/es/Article/ArticleContent.js +27 -0
- package/es/Article/index.js +2 -1
- package/es/Breadcrumb/Breadcrumb.js +2 -3
- package/es/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/Breadcrumb/HomeBreadcrumb.js +2 -2
- package/es/Embed/ImageEmbed.js +2 -1
- package/es/ErrorMessage/ErrorMessage.js +2 -0
- package/es/FileList/File.js +78 -23
- package/es/FileList/FileList.js +32 -37
- package/es/FileList/PdfFile.js +17 -16
- package/es/FileList/index.js +3 -5
- package/es/Grid/Grid.js +69 -48
- package/es/Grid/GridParallaxItem.js +32 -0
- package/es/Grid/index.js +2 -1
- package/es/KeyFigure/KeyFigure.js +28 -33
- package/es/LinkBlock/LinkBlockSection.js +1 -0
- package/es/RelatedArticleList/RelatedArticleList.js +1 -1
- package/es/index.js +1 -4
- package/es/styles.css +148 -29
- package/lib/Article/Article.d.ts +0 -1
- package/lib/Article/Article.js +3 -7
- package/lib/Article/ArticleContent.d.ts +11 -0
- package/lib/Article/ArticleContent.js +33 -0
- package/lib/Article/index.d.ts +2 -1
- package/lib/Article/index.js +2 -1
- package/lib/Breadcrumb/Breadcrumb.js +2 -3
- package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.js +1 -1
- package/lib/Embed/ImageEmbed.js +2 -1
- package/lib/ErrorMessage/ErrorMessage.js +2 -0
- package/lib/FileList/File.d.ts +5 -3
- package/lib/FileList/File.js +78 -23
- package/lib/FileList/FileList.d.ts +6 -6
- package/lib/FileList/FileList.js +35 -38
- package/lib/FileList/PdfFile.d.ts +2 -2
- package/lib/FileList/PdfFile.js +17 -15
- package/lib/FileList/index.d.ts +3 -5
- package/lib/FileList/index.js +19 -18
- package/lib/Grid/Grid.d.ts +4 -7
- package/lib/Grid/Grid.js +71 -49
- package/lib/Grid/GridParallaxItem.d.ts +9 -0
- package/lib/Grid/GridParallaxItem.js +39 -0
- package/lib/Grid/index.d.ts +2 -1
- package/lib/Grid/index.js +4 -5
- package/lib/KeyFigure/KeyFigure.js +30 -33
- package/lib/LinkBlock/LinkBlockSection.js +1 -0
- package/lib/RelatedArticleList/RelatedArticleList.js +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.js +9 -24
- package/lib/styles.css +148 -29
- package/package.json +7 -7
- package/src/Article/Article.tsx +1 -6
- package/src/Article/ArticleContent.tsx +21 -0
- package/src/Article/index.ts +2 -1
- package/src/Breadcrumb/Breadcrumb.tsx +1 -2
- package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
- package/src/Breadcrumb/HomeBreadcrumb.tsx +2 -2
- package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +8 -7
- package/src/Embed/ImageEmbed.stories.tsx +1 -3
- package/src/Embed/ImageEmbed.tsx +3 -2
- package/src/ErrorMessage/ErrorMessage.tsx +2 -0
- package/src/FileList/File.tsx +63 -28
- package/src/FileList/FileList.stories.tsx +121 -12
- package/src/FileList/FileList.tsx +31 -37
- package/src/FileList/PdfFile.tsx +9 -9
- package/src/FileList/index.ts +3 -7
- package/src/Grid/Grid.stories.tsx +30 -31
- package/src/Grid/Grid.tsx +57 -85
- package/src/Grid/GridParallaxItem.tsx +26 -0
- package/src/Grid/index.ts +3 -1
- package/src/KeyFigure/KeyFigure.stories.tsx +18 -11
- package/src/KeyFigure/KeyFigure.tsx +33 -47
- package/src/LinkBlock/LinkBlockSection.tsx +1 -1
- package/src/RelatedArticleList/RelatedArticleList.tsx +1 -1
- package/src/index.ts +1 -7
- package/es/FileList/Format.js +0 -93
- package/es/Footer/FooterBlock.js +0 -17
- package/es/Footer/index.js +0 -9
- package/es/Messages/MessageBox.js +0 -79
- package/es/Messages/index.js +0 -10
- package/es/utils/resourceTypeColor.js +0 -46
- package/lib/FileList/Format.d.ts +0 -16
- package/lib/FileList/Format.js +0 -98
- package/lib/Footer/FooterBlock.d.ts +0 -13
- package/lib/Footer/FooterBlock.js +0 -24
- package/lib/Footer/index.d.ts +0 -8
- package/lib/Footer/index.js +0 -12
- package/lib/Messages/MessageBox.d.ts +0 -23
- package/lib/Messages/MessageBox.js +0 -87
- package/lib/Messages/index.d.ts +0 -9
- package/lib/Messages/index.js +0 -13
- package/lib/utils/resourceTypeColor.d.ts +0 -9
- package/lib/utils/resourceTypeColor.js +0 -54
- package/src/FileList/Format.tsx +0 -83
- package/src/Footer/Footer.stories.tsx +0 -35
- package/src/Footer/FooterBlock.tsx +0 -30
- package/src/Footer/index.ts +0 -9
- package/src/Messages/MessageBox.stories.tsx +0 -95
- package/src/Messages/MessageBox.tsx +0 -126
- package/src/Messages/index.ts +0 -11
- package/src/utils/resourceTypeColor.tsx +0 -46
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"schemaVersion": "0.44.0",
|
|
3
3
|
"styles": {
|
|
4
4
|
"atomic": [
|
|
5
|
-
"width]___[value:100%",
|
|
6
5
|
"display]___[value:flex",
|
|
7
6
|
"flexDirection]___[value:column",
|
|
8
7
|
"color]___[value:text.default",
|
|
@@ -11,6 +10,7 @@
|
|
|
11
10
|
"paddingBlock]___[value:xsmall",
|
|
12
11
|
"paddingInline]___[value:8%",
|
|
13
12
|
"alignItems]___[value:center",
|
|
13
|
+
"width]___[value:100%",
|
|
14
14
|
"overflowWrap]___[value:break-word",
|
|
15
15
|
"position]___[value:relative",
|
|
16
16
|
"paddingBlock]___[value:medium]___[cond:tablet",
|
|
@@ -119,12 +119,11 @@
|
|
|
119
119
|
"width]___[value:fit-content",
|
|
120
120
|
"maxWidth]___[value:8xl",
|
|
121
121
|
"flexWrap]___[value:wrap",
|
|
122
|
+
"gap]___[value:xxsmall",
|
|
122
123
|
"alignItems]___[value:flex-start]___[cond:mobileDown",
|
|
123
124
|
"justifyContent]___[value:center]___[cond:mobileDown",
|
|
124
125
|
"flexDirection]___[value:column]___[cond:mobileDown",
|
|
125
|
-
"gap]___[value:xxsmall]___[cond:mobileDown",
|
|
126
126
|
"color]___[value:inherit",
|
|
127
|
-
"gap]___[value:4xsmall",
|
|
128
127
|
"alignItems]___[value:flex-end",
|
|
129
128
|
"display]___[value:block]___[cond:tabletDown",
|
|
130
129
|
"textDecoration]___[value:underline",
|
|
@@ -134,7 +133,6 @@
|
|
|
134
133
|
"maxWidth]___[value:surface.xsmall",
|
|
135
134
|
"maxWidth]___[value:surface.medium]___[cond:mobileWide",
|
|
136
135
|
"maxWidth]___[value:1100px]___[cond:tabletWide",
|
|
137
|
-
"gap]___[value:xxsmall",
|
|
138
136
|
"alignSelf]___[value:center",
|
|
139
137
|
"height]___[value:215px",
|
|
140
138
|
"height]___[value:340px]___[cond:desktop",
|
|
@@ -331,14 +329,46 @@
|
|
|
331
329
|
"transitionDuration]___[value:fast]___[cond:& svg",
|
|
332
330
|
"transform]___[value:rotate(180deg)]___[cond:_open<___>& svg",
|
|
333
331
|
"display]___[value:none]___[cond:_print",
|
|
332
|
+
"textUnderlineOffset]___[value:2px",
|
|
333
|
+
"paddingBlock]___[value:small",
|
|
334
|
+
"paddingInlineEnd]___[value:medium",
|
|
335
|
+
"paddingInlineStart]___[value:small",
|
|
336
|
+
"flexDirection]___[value:row",
|
|
337
|
+
"inset]___[value:0]___[cond:_before",
|
|
338
|
+
"zIndex]___[value:0]___[cond:_before",
|
|
339
|
+
"background]___[value:surface.infoSubtle",
|
|
340
|
+
"borderBlockEnd]___[value:1px solid",
|
|
341
|
+
"backgroundColor]___[value:surface.infoSubtle.hover]___[cond:_hover",
|
|
334
342
|
"gap]___[value:small",
|
|
335
343
|
"paddingInline]___[value:0",
|
|
336
344
|
"marginBlockStart]___[value:3xsmall",
|
|
337
|
-
"paddingBlock]___[value:small",
|
|
338
345
|
"background]___[value:surface.brand.1.subtle]___[cond:_first",
|
|
339
346
|
"borderColor]___[value:stroke.default]___[cond:_first",
|
|
340
347
|
"fontWeight]___[value:bold]___[cond:_first<___>& p",
|
|
341
348
|
"fontStyle]___[value:italic",
|
|
349
|
+
"display]___[value:grid",
|
|
350
|
+
"gridRowGap]___[value:large",
|
|
351
|
+
"gridColumnGap]___[value:medium",
|
|
352
|
+
"backgroundColor]___[value:background.subtle",
|
|
353
|
+
"maxWidth]___[value:surface.4xlarge",
|
|
354
|
+
"gridTemplateColumns]___[value:repeat(2, minmax(0, 1fr))",
|
|
355
|
+
"gridTemplateColumns]___[value:repeat(1, minmax(0, 1fr))]___[cond:tabletDown",
|
|
356
|
+
"gridTemplateColumns]___[value:repeat(2, minmax(0, 1fr))]___[cond:tabletToDesktop",
|
|
357
|
+
"display]___[value:flex]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
|
358
|
+
"flexFlow]___[value:column]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
|
359
|
+
"justifyContent]___[value:center]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
|
360
|
+
"alignItems]___[value:center]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
|
361
|
+
"gridColumn]___[value:span 2]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
|
362
|
+
"gridTemplateColumns]___[value:repeat(3, minmax(0, 1fr))]___[cond:desktop",
|
|
363
|
+
"gridTemplateColumns]___[value:repeat(4, minmax(0, 1fr))]___[cond:desktop",
|
|
364
|
+
"backgroundColor]___[value:surface.default",
|
|
365
|
+
"backgroundColor]___[value:transparent",
|
|
366
|
+
"borderColor]___[value:surface.brand.2",
|
|
367
|
+
"top]___[value:var(--masthead-height, 0px)]___[cond:& > div",
|
|
368
|
+
"position]___[value:sticky]___[cond:& > div",
|
|
369
|
+
"width]___[value:surface.3xsmall",
|
|
370
|
+
"textStyle]___[value:heading.large",
|
|
371
|
+
"textStyle]___[value:title.medium",
|
|
342
372
|
"position]___[value:relative!",
|
|
343
373
|
"width]___[value:83.333%",
|
|
344
374
|
"right]___[value:auto !important",
|
|
@@ -388,9 +418,6 @@
|
|
|
388
418
|
"width]___[value:large]___[cond:_hover<___>& [data-forward]",
|
|
389
419
|
"height]___[value:large]___[cond:_hover<___>& [data-forward]",
|
|
390
420
|
"color]___[value:icon.strong",
|
|
391
|
-
"inset]___[value:0]___[cond:_before",
|
|
392
|
-
"zIndex]___[value:0]___[cond:_before",
|
|
393
|
-
"display]___[value:grid",
|
|
394
421
|
"gridTemplateColumns]___[value:repeat(2, 1fr)",
|
|
395
422
|
"gridTemplateColumns]___[value:1fr]___[cond:tabletDown",
|
|
396
423
|
"marginBlockStart]___[value:xsmall",
|
package/dist/styles.css
CHANGED
|
@@ -48,6 +48,30 @@
|
|
|
48
48
|
line-height: calc(var(--line-heights-medium) * 1.11);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.textStyle_heading\.large {
|
|
52
|
+
font-family: var(--fonts-sans);
|
|
53
|
+
font-weight: var(--font-weights-bold);
|
|
54
|
+
font-size: var(--font-sizes-4xlarge);
|
|
55
|
+
line-height: var(--line-heights-4xlarge);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.textStyle_heading\.large:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
|
|
59
|
+
font-size: calc(var(--font-sizes-4xlarge) * 1.11);
|
|
60
|
+
line-height: calc(var(--line-heights-4xlarge) * 1.11);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.textStyle_title\.medium {
|
|
64
|
+
font-family: var(--fonts-sans);
|
|
65
|
+
font-weight: var(--font-weights-bold);
|
|
66
|
+
font-size: var(--font-sizes-large);
|
|
67
|
+
line-height: var(--line-heights-large);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.textStyle_title\.medium:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
|
|
71
|
+
font-size: calc(var(--font-sizes-large) * 1.11);
|
|
72
|
+
line-height: calc(var(--line-heights-large) * 1.11);
|
|
73
|
+
}
|
|
74
|
+
|
|
51
75
|
.\[\&_a\]\:textStyle_label\.xsmall a {
|
|
52
76
|
font-family: var(--fonts-sans);
|
|
53
77
|
font-weight: var(--font-weights-normal);
|
|
@@ -61,10 +85,6 @@
|
|
|
61
85
|
}
|
|
62
86
|
}
|
|
63
87
|
|
|
64
|
-
.w_100\% {
|
|
65
|
-
width: 100%;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
88
|
.d_flex {
|
|
69
89
|
display: flex;
|
|
70
90
|
}
|
|
@@ -89,6 +109,10 @@
|
|
|
89
109
|
padding-inline: 8%;
|
|
90
110
|
}
|
|
91
111
|
|
|
112
|
+
.w_100\% {
|
|
113
|
+
width: 100%;
|
|
114
|
+
}
|
|
115
|
+
|
|
92
116
|
.ov-wrap_break-word {
|
|
93
117
|
overflow-wrap: break-word;
|
|
94
118
|
}
|
|
@@ -302,12 +326,12 @@
|
|
|
302
326
|
max-width: 8xl;
|
|
303
327
|
}
|
|
304
328
|
|
|
305
|
-
.
|
|
306
|
-
|
|
329
|
+
.gap_xxsmall {
|
|
330
|
+
gap: var(--spacing-xxsmall);
|
|
307
331
|
}
|
|
308
332
|
|
|
309
|
-
.
|
|
310
|
-
|
|
333
|
+
.c_inherit {
|
|
334
|
+
color: inherit;
|
|
311
335
|
}
|
|
312
336
|
|
|
313
337
|
.td_underline {
|
|
@@ -318,10 +342,6 @@
|
|
|
318
342
|
max-width: var(--sizes-surface-xsmall);
|
|
319
343
|
}
|
|
320
344
|
|
|
321
|
-
.gap_xxsmall {
|
|
322
|
-
gap: var(--spacing-xxsmall);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
345
|
.h_215px {
|
|
326
346
|
height: 215px;
|
|
327
347
|
}
|
|
@@ -491,6 +511,30 @@
|
|
|
491
511
|
clear: both;
|
|
492
512
|
}
|
|
493
513
|
|
|
514
|
+
.tu-o_2px {
|
|
515
|
+
text-underline-offset: 2px;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.py_small {
|
|
519
|
+
padding-block: var(--spacing-small);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.pe_medium {
|
|
523
|
+
padding-inline-end: var(--spacing-medium);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.ps_small {
|
|
527
|
+
padding-inline-start: var(--spacing-small);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.bg_surface\.infoSubtle {
|
|
531
|
+
background: var(--colors-surface-info-subtle);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.bd-be_1px_solid {
|
|
535
|
+
border-block-end: 1px solid;
|
|
536
|
+
}
|
|
537
|
+
|
|
494
538
|
.gap_small {
|
|
495
539
|
gap: var(--spacing-small);
|
|
496
540
|
}
|
|
@@ -503,8 +547,16 @@
|
|
|
503
547
|
margin-block-start: var(--spacing-3xsmall);
|
|
504
548
|
}
|
|
505
549
|
|
|
506
|
-
.
|
|
507
|
-
|
|
550
|
+
.d_grid {
|
|
551
|
+
display: grid;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.max-w_surface\.4xlarge {
|
|
555
|
+
max-width: var(--sizes-surface-4xlarge);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.w_surface\.3xsmall {
|
|
559
|
+
width: var(--sizes-surface-3xsmall);
|
|
508
560
|
}
|
|
509
561
|
|
|
510
562
|
.pos_relative\! {
|
|
@@ -547,10 +599,6 @@
|
|
|
547
599
|
color: var(--colors-icon-strong);
|
|
548
600
|
}
|
|
549
601
|
|
|
550
|
-
.d_grid {
|
|
551
|
-
display: grid;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
602
|
.mbs_xsmall {
|
|
555
603
|
margin-block-start: var(--spacing-xsmall);
|
|
556
604
|
}
|
|
@@ -760,10 +808,42 @@
|
|
|
760
808
|
bottom: calc(var(--spacing-medium) * -1);
|
|
761
809
|
}
|
|
762
810
|
|
|
811
|
+
.flex-d_row {
|
|
812
|
+
flex-direction: row;
|
|
813
|
+
}
|
|
814
|
+
|
|
763
815
|
.font-style_italic {
|
|
764
816
|
font-style: italic;
|
|
765
817
|
}
|
|
766
818
|
|
|
819
|
+
.grid-rg_large {
|
|
820
|
+
grid-row-gap: var(--spacing-large);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.grid-cg_medium {
|
|
824
|
+
grid-column-gap: var(--spacing-medium);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.bg-c_background\.subtle {
|
|
828
|
+
background-color: var(--colors-background-subtle);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.grid-tc_repeat\(2\,_minmax\(0\,_1fr\)\) {
|
|
832
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.bg-c_surface\.default {
|
|
836
|
+
background-color: var(--colors-surface-default);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.bg-c_transparent {
|
|
840
|
+
background-color: transparent;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.bd-c_surface\.brand\.2 {
|
|
844
|
+
border-color: var(--colors-surface-brand-2);
|
|
845
|
+
}
|
|
846
|
+
|
|
767
847
|
.right_auto\! {
|
|
768
848
|
right: auto !important;
|
|
769
849
|
}
|
|
@@ -1059,10 +1139,22 @@
|
|
|
1059
1139
|
padding-block-end: var(--spacing-xsmall);
|
|
1060
1140
|
}
|
|
1061
1141
|
|
|
1142
|
+
.before\:inset_0::before {
|
|
1143
|
+
inset: 0;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
.before\:z_0::before {
|
|
1147
|
+
z-index: 0;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1062
1150
|
.first\:bg_surface\.brand\.1\.subtle:first-child {
|
|
1063
1151
|
background: var(--colors-surface-brand-1-subtle);
|
|
1064
1152
|
}
|
|
1065
1153
|
|
|
1154
|
+
.\[\&_\>_div\]\:pos_sticky > div {
|
|
1155
|
+
position: sticky;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1066
1158
|
.after\:d_block\!::after {
|
|
1067
1159
|
display: block !important;
|
|
1068
1160
|
}
|
|
@@ -1075,14 +1167,6 @@
|
|
|
1075
1167
|
text-decoration: underline;
|
|
1076
1168
|
}
|
|
1077
1169
|
|
|
1078
|
-
.before\:inset_0::before {
|
|
1079
|
-
inset: 0;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
.before\:z_0::before {
|
|
1083
|
-
z-index: 0;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
1170
|
.after\:content_0::after {
|
|
1087
1171
|
content: 0;
|
|
1088
1172
|
}
|
|
@@ -1187,6 +1271,10 @@
|
|
|
1187
1271
|
border-color: var(--colors-stroke-default);
|
|
1188
1272
|
}
|
|
1189
1273
|
|
|
1274
|
+
.\[\&_\>_div\]\:top_var\(--masthead-height\,_0px\) > div {
|
|
1275
|
+
top: var(--masthead-height, 0px);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1190
1278
|
.after\:content_\"\"\!::after {
|
|
1191
1279
|
content: "" !important;
|
|
1192
1280
|
}
|
|
@@ -1243,6 +1331,10 @@
|
|
|
1243
1331
|
border-color: var(--colors-text-link);
|
|
1244
1332
|
}
|
|
1245
1333
|
|
|
1334
|
+
.hover\:bg-c_surface\.infoSubtle\.hover:is(:hover, [data-hover]) {
|
|
1335
|
+
background-color: var(--colors-surface-info-subtle-hover);
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1246
1338
|
.active\:bg_surface\.actionSubtle\.active:is(:active, [data-active]) {
|
|
1247
1339
|
background: var(--colors-surface-action-subtle-active);
|
|
1248
1340
|
}
|
|
@@ -1397,6 +1489,27 @@
|
|
|
1397
1489
|
.\[\&_svg\]\:tablet\:h_12px svg {
|
|
1398
1490
|
height: 12px;
|
|
1399
1491
|
}
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
@media screen and (min-width: 37.5625rem) and (max-width: 61.31rem) {
|
|
1495
|
+
.tabletToDesktop\:grid-tc_repeat\(2\,_minmax\(0\,_1fr\)\) {
|
|
1496
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1497
|
+
}
|
|
1498
|
+
.tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:d_flex > div:nth-child(3):last-child {
|
|
1499
|
+
display: flex;
|
|
1500
|
+
}
|
|
1501
|
+
.tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:flex-flow_column > div:nth-child(3):last-child {
|
|
1502
|
+
flex-flow: column;
|
|
1503
|
+
}
|
|
1504
|
+
.tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:grid-c_span_2 > div:nth-child(3):last-child {
|
|
1505
|
+
grid-column: span 2;
|
|
1506
|
+
}
|
|
1507
|
+
.tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:jc_center > div:nth-child(3):last-child {
|
|
1508
|
+
justify-content: center;
|
|
1509
|
+
}
|
|
1510
|
+
.tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:ai_center > div:nth-child(3):last-child {
|
|
1511
|
+
align-items: center;
|
|
1512
|
+
}
|
|
1400
1513
|
}
|
|
1401
1514
|
|
|
1402
1515
|
@media screen and (min-width: 48rem) {
|
|
@@ -1435,6 +1548,12 @@
|
|
|
1435
1548
|
}
|
|
1436
1549
|
.desktop\:top_xxlarge {
|
|
1437
1550
|
top: var(--spacing-xxlarge);
|
|
1551
|
+
}
|
|
1552
|
+
.desktop\:grid-tc_repeat\(3\,_minmax\(0\,_1fr\)\) {
|
|
1553
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1554
|
+
}
|
|
1555
|
+
.desktop\:grid-tc_repeat\(4\,_minmax\(0\,_1fr\)\) {
|
|
1556
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
1438
1557
|
}
|
|
1439
1558
|
}
|
|
1440
1559
|
|
|
@@ -1495,6 +1614,9 @@
|
|
|
1495
1614
|
}
|
|
1496
1615
|
.tabletDown\:bdr_0 {
|
|
1497
1616
|
border-radius: 0;
|
|
1617
|
+
}
|
|
1618
|
+
.tabletDown\:grid-tc_repeat\(1\,_minmax\(0\,_1fr\)\) {
|
|
1619
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
1498
1620
|
}
|
|
1499
1621
|
.tabletDown\:grid-tc_1fr {
|
|
1500
1622
|
grid-template-columns: 1fr;
|
|
@@ -1597,9 +1719,6 @@
|
|
|
1597
1719
|
@media screen and (max-width: 19.9975rem) {
|
|
1598
1720
|
.mobileDown\:px_xsmall {
|
|
1599
1721
|
padding-inline: var(--spacing-xsmall);
|
|
1600
|
-
}
|
|
1601
|
-
.mobileDown\:gap_xxsmall {
|
|
1602
|
-
gap: var(--spacing-xxsmall);
|
|
1603
1722
|
}
|
|
1604
1723
|
.mobileDown\:ai_flex-start {
|
|
1605
1724
|
align-items: flex-start;
|
package/es/Article/Article.js
CHANGED
|
@@ -9,13 +9,9 @@
|
|
|
9
9
|
import { Heading, Text } from "@ndla/primitives";
|
|
10
10
|
import { styled } from "@ndla/styled-system/jsx";
|
|
11
11
|
import ArticleByline from "./ArticleByline";
|
|
12
|
+
import { ArticleContent } from "./ArticleContent";
|
|
12
13
|
import { ContentTypeBadgeNew } from "..";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
export const ArticleContent = styled("section", {
|
|
15
|
-
base: {
|
|
16
|
-
width: "100%"
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
15
|
export const ArticleWrapper = styled("article", {
|
|
20
16
|
base: {
|
|
21
17
|
display: "flex",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { ark } from "@ark-ui/react";
|
|
11
|
+
import { cx } from "@ndla/styled-system/css";
|
|
12
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const StyledArticleContent = styled(ark.section, {}, {
|
|
15
|
+
baseComponent: true
|
|
16
|
+
});
|
|
17
|
+
export const ArticleContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
18
|
+
let {
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/_jsx(StyledArticleContent, {
|
|
23
|
+
className: cx("ndla-article", className),
|
|
24
|
+
...props,
|
|
25
|
+
ref: ref
|
|
26
|
+
});
|
|
27
|
+
});
|
package/es/Article/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import ArticleByline from "./ArticleByline";
|
|
10
10
|
import ArticleFootNotes from "./ArticleFootNotes";
|
|
11
|
-
export { Article,
|
|
11
|
+
export { Article, ArticleWrapper, ArticleHeader, ArticleFooter } from "./Article";
|
|
12
|
+
export { ArticleContent } from "./ArticleContent";
|
|
12
13
|
export { ArticleByline, ArticleFootNotes };
|
|
13
14
|
export { ArticleParagraph } from "./ArticleParagraph";
|
|
@@ -16,12 +16,11 @@ const StyledList = styled("ol", {
|
|
|
16
16
|
flexWrap: "wrap",
|
|
17
17
|
alignItems: "center",
|
|
18
18
|
listStyle: "none",
|
|
19
|
-
gap: "
|
|
19
|
+
gap: "xxsmall",
|
|
20
20
|
mobileDown: {
|
|
21
21
|
alignItems: "flex-start",
|
|
22
22
|
justifyContent: "center",
|
|
23
|
-
flexDirection: "column"
|
|
24
|
-
gap: "xxsmall"
|
|
23
|
+
flexDirection: "column"
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { ArrowRightShortLine,
|
|
9
|
+
import { ArrowRightShortLine, HomeLine } from "@ndla/icons/common";
|
|
10
10
|
import { SafeLink } from "@ndla/safelink";
|
|
11
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
12
12
|
import Breadcrumb from "./Breadcrumb";
|
|
@@ -49,7 +49,7 @@ const HomeBreadcrumb = _ref => {
|
|
|
49
49
|
return /*#__PURE__*/_jsx(IconSafeLink, {
|
|
50
50
|
"aria-label": item.name,
|
|
51
51
|
to: item.to,
|
|
52
|
-
children: /*#__PURE__*/_jsx(
|
|
52
|
+
children: /*#__PURE__*/_jsx(HomeLine, {
|
|
53
53
|
title: item.name
|
|
54
54
|
})
|
|
55
55
|
});
|
package/es/Embed/ImageEmbed.js
CHANGED
|
@@ -27,10 +27,11 @@ export const errorSvgSrc = `data:image/svg+xml;charset=UTF-8,%3Csvg fill='%238A8
|
|
|
27
27
|
const getFigureProps = (size, float) => {
|
|
28
28
|
const actualFloat = float === "left" ? "left" : float === "right" ? "right" : undefined;
|
|
29
29
|
const replacedSize = size?.replace("-hide-byline", "") ?? "full";
|
|
30
|
+
const actualSize = replacedSize === "fullwidth" ? "full" : replacedSize;
|
|
30
31
|
return {
|
|
31
32
|
float: actualFloat,
|
|
32
33
|
// Figure expects you to set a size when floating. If you don't, the figure will simply take up the available width. Fallback to medium in those cases.
|
|
33
|
-
size:
|
|
34
|
+
size: actualSize === "full" && float ? "medium" : actualSize
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
const getSizes = (size, align) => {
|
package/es/FileList/File.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2023-present, NDLA.
|
|
4
3
|
*
|
|
@@ -7,38 +6,94 @@ import _styled from "@emotion/styled/base";
|
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
import { DownloadLine } from "@ndla/icons/common";
|
|
12
|
+
import { Text } from "@ndla/primitives";
|
|
13
|
+
import { SafeLink } from "@ndla/safelink";
|
|
14
|
+
import { HStack, styled } from "@ndla/styled-system/jsx";
|
|
15
|
+
import { linkOverlay } from "@ndla/styled-system/patterns";
|
|
16
|
+
import { FileListItem } from ".";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
const StyledSafeLink = styled(SafeLink, {
|
|
19
|
+
base: {
|
|
20
|
+
textUnderlineOffset: "2px",
|
|
21
|
+
textDecoration: "underline",
|
|
22
|
+
_hover: {
|
|
23
|
+
textDecoration: "none"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const StyledHStack = styled(HStack, {
|
|
28
|
+
base: {
|
|
29
|
+
position: "relative",
|
|
30
|
+
paddingBlock: "small",
|
|
31
|
+
paddingInlineEnd: "medium",
|
|
32
|
+
paddingInlineStart: "small",
|
|
33
|
+
width: "100%"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export const File = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
21
37
|
let {
|
|
22
38
|
title,
|
|
23
39
|
url,
|
|
24
40
|
fileExists,
|
|
25
|
-
fileType
|
|
41
|
+
fileType,
|
|
42
|
+
fileSize,
|
|
43
|
+
...rest
|
|
26
44
|
} = _ref;
|
|
27
45
|
const {
|
|
28
46
|
t
|
|
29
47
|
} = useTranslation();
|
|
30
48
|
const tooltip = `${t("download")} ${url.split("/").pop()}`;
|
|
31
|
-
return /*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
49
|
+
return /*#__PURE__*/_jsxs(StyledHStack, {
|
|
50
|
+
justify: "space-between",
|
|
51
|
+
ref: ref,
|
|
52
|
+
...rest,
|
|
53
|
+
children: [/*#__PURE__*/_jsxs(HStack, {
|
|
54
|
+
gap: "xxsmall",
|
|
55
|
+
children: [/*#__PURE__*/_jsx(DownloadLine, {}), fileExists ? /*#__PURE__*/_jsx(StyledSafeLink, {
|
|
56
|
+
unstyled: true,
|
|
57
|
+
css: linkOverlay.raw(),
|
|
58
|
+
to: url,
|
|
59
|
+
title: tooltip,
|
|
60
|
+
children: title
|
|
61
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
62
|
+
textStyle: "label.medium",
|
|
63
|
+
children: title
|
|
64
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
65
|
+
textStyle: "label.large",
|
|
66
|
+
asChild: true,
|
|
67
|
+
consumeCss: true,
|
|
68
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
69
|
+
children: ["(", fileType?.toUpperCase(), ")"]
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
73
|
+
textStyle: "label.large",
|
|
74
|
+
asChild: true,
|
|
75
|
+
consumeCss: true,
|
|
76
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
77
|
+
children: fileSize
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
export const FileListElement = _ref2 => {
|
|
83
|
+
let {
|
|
84
|
+
title,
|
|
85
|
+
url,
|
|
86
|
+
fileExists,
|
|
87
|
+
fileType,
|
|
88
|
+
fileSize
|
|
89
|
+
} = _ref2;
|
|
90
|
+
return /*#__PURE__*/_jsx(FileListItem, {
|
|
91
|
+
children: /*#__PURE__*/_jsx(File, {
|
|
39
92
|
title: title,
|
|
40
|
-
|
|
93
|
+
url: url,
|
|
94
|
+
fileExists: fileExists,
|
|
95
|
+
fileType: fileType,
|
|
96
|
+
fileSize: fileSize
|
|
41
97
|
})
|
|
42
98
|
});
|
|
43
|
-
};
|
|
44
|
-
export default File;
|
|
99
|
+
};
|