@ndla/ui 56.0.14-alpha.0 → 56.0.16-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.
Files changed (73) hide show
  1. package/dist/panda.buildinfo.json +24 -21
  2. package/dist/styles.css +82 -67
  3. package/es/Article/Article.js +22 -94
  4. package/es/Article/index.js +1 -1
  5. package/es/CampaignBlock/CampaignBlock.js +33 -5
  6. package/es/ContentTypeBadge/ContentTypeBadge.js +2 -0
  7. package/es/TreeStructure/TreeStructure.js +292 -181
  8. package/es/TreeStructure/helperFunctions.js +0 -3
  9. package/es/TreeStructure/index.js +1 -2
  10. package/es/index.js +1 -1
  11. package/es/locale/messages-en.js +3 -3
  12. package/es/locale/messages-nb.js +3 -3
  13. package/es/locale/messages-nn.js +3 -3
  14. package/es/locale/messages-se.js +3 -3
  15. package/es/locale/messages-sma.js +3 -3
  16. package/es/styles.css +82 -67
  17. package/lib/Article/Article.d.ts +3 -18
  18. package/lib/Article/Article.js +22 -94
  19. package/lib/Article/index.d.ts +1 -1
  20. package/lib/Article/index.js +0 -12
  21. package/lib/CampaignBlock/CampaignBlock.js +33 -5
  22. package/lib/ContentTypeBadge/ContentTypeBadge.js +2 -0
  23. package/lib/TreeStructure/TreeStructure.d.ts +7 -6
  24. package/lib/TreeStructure/TreeStructure.js +293 -180
  25. package/lib/TreeStructure/helperFunctions.d.ts +0 -2
  26. package/lib/TreeStructure/helperFunctions.js +2 -6
  27. package/lib/TreeStructure/index.d.ts +1 -2
  28. package/lib/TreeStructure/index.js +2 -3
  29. package/lib/TreeStructure/types.d.ts +4 -22
  30. package/lib/index.d.ts +1 -1
  31. package/lib/index.js +0 -12
  32. package/lib/locale/messages-en.js +3 -3
  33. package/lib/locale/messages-nb.js +3 -3
  34. package/lib/locale/messages-nn.js +3 -3
  35. package/lib/locale/messages-se.js +3 -3
  36. package/lib/locale/messages-sma.js +3 -3
  37. package/lib/styles.css +82 -67
  38. package/package.json +7 -8
  39. package/src/Article/Article.tsx +22 -107
  40. package/src/Article/index.ts +0 -2
  41. package/src/CampaignBlock/CampaignBlock.tsx +35 -4
  42. package/src/ContentTypeBadge/ContentTypeBadge.tsx +2 -0
  43. package/src/TreeStructure/TreeStructure.stories.tsx +38 -68
  44. package/src/TreeStructure/TreeStructure.tsx +307 -194
  45. package/src/TreeStructure/helperFunctions.ts +0 -5
  46. package/src/TreeStructure/index.ts +1 -2
  47. package/src/TreeStructure/types.ts +4 -25
  48. package/src/index.ts +0 -2
  49. package/src/locale/messages-en.ts +3 -3
  50. package/src/locale/messages-nb.ts +3 -3
  51. package/src/locale/messages-nn.ts +3 -3
  52. package/src/locale/messages-se.ts +3 -3
  53. package/src/locale/messages-sma.ts +3 -3
  54. package/es/TreeStructure/AddFolderButton.js +0 -80
  55. package/es/TreeStructure/ComboboxButton.js +0 -127
  56. package/es/TreeStructure/FolderItem.js +0 -225
  57. package/es/TreeStructure/FolderItems.js +0 -95
  58. package/es/TreeStructure/arrowNavigation.js +0 -35
  59. package/lib/TreeStructure/AddFolderButton.d.ts +0 -17
  60. package/lib/TreeStructure/AddFolderButton.js +0 -85
  61. package/lib/TreeStructure/ComboboxButton.d.ts +0 -27
  62. package/lib/TreeStructure/ComboboxButton.js +0 -134
  63. package/lib/TreeStructure/FolderItem.d.ts +0 -17
  64. package/lib/TreeStructure/FolderItem.js +0 -230
  65. package/lib/TreeStructure/FolderItems.d.ts +0 -22
  66. package/lib/TreeStructure/FolderItems.js +0 -100
  67. package/lib/TreeStructure/arrowNavigation.d.ts +0 -10
  68. package/lib/TreeStructure/arrowNavigation.js +0 -42
  69. package/src/TreeStructure/AddFolderButton.tsx +0 -79
  70. package/src/TreeStructure/ComboboxButton.tsx +0 -172
  71. package/src/TreeStructure/FolderItem.tsx +0 -307
  72. package/src/TreeStructure/FolderItems.tsx +0 -121
  73. package/src/TreeStructure/arrowNavigation.ts +0 -54
@@ -2,19 +2,13 @@
2
2
  "schemaVersion": "0.44.0",
3
3
  "styles": {
4
4
  "atomic": [
5
- "paddingInline]___[value:8%",
6
- "width]___[value:100%",
7
- "paddingBlockStart]___[value:xsmall",
8
- "paddingBlockStart]___[value:medium]___[cond:tablet",
9
- "paddingBlockStart]___[value:xxlarge]___[cond:desktop",
10
- "paddingBlockEnd]___[value:xsmall",
11
- "paddingBlockEnd]___[value:medium]___[cond:tablet",
12
- "paddingBlockEnd]___[value:xxlarge]___[cond:desktop",
13
- "background]___[value:surface.default",
5
+ "background]___[value:background.default",
14
6
  "display]___[value:flex",
15
7
  "flexDirection]___[value:column",
8
+ "gap]___[value:xxlarge",
16
9
  "color]___[value:text.default",
17
10
  "alignItems]___[value:center",
11
+ "width]___[value:100%",
18
12
  "overflowWrap]___[value:break-word",
19
13
  "position]___[value:relative",
20
14
  "transform]___[value:scaleY(100) translateY(0.075em)]___[cond:& mjx-stretchy-v > mjx-ext > mjx-c",
@@ -22,16 +16,12 @@
22
16
  "display]___[value:table]___[cond:_after",
23
17
  "clear]___[value:both]___[cond:_after",
24
18
  "alignItems]___[value:flex-start",
25
- "gap]___[value:xsmall",
26
19
  "overflowWrap]___[value:anywhere]___[cond:& h1",
27
- "position]___[value:absolute",
28
- "right]___[value:8%",
29
- "top]___[value:xsmall",
30
- "top]___[value:medium]___[cond:tablet",
31
- "top]___[value:xxlarge]___[cond:desktop",
32
20
  "gap]___[value:medium",
33
- "gap]___[value:xxlarge",
21
+ "paddingBlockStart]___[value:xxlarge",
22
+ "paddingBlockEnd]___[value:5xlarge]___[cond:& > :is(:last-child)",
34
23
  "marginBlockStart]___[value:medium",
24
+ "paddingBlockStart]___[value:xsmall",
35
25
  "borderTop]___[value:1px solid",
36
26
  "borderColor]___[value:stroke.subtle",
37
27
  "flexDirection]___[value:column-reverse",
@@ -40,7 +30,7 @@
40
30
  "paddingBlock]___[value:xsmall",
41
31
  "textStyle]___[value:body.medium",
42
32
  "flexDirection]___[value:row]___[cond:tabletWide",
43
- "paddingBlockStart]___[value:xxlarge",
33
+ "gap]___[value:xsmall",
44
34
  "listStyle]___[value:none",
45
35
  "textAlign]___[value:center]___[cond:&[data-align=\"center\"]",
46
36
  "direction]___[value:rtl]___[cond:&:has(span[dir=\"rtl\"])",
@@ -77,7 +67,6 @@
77
67
  "alignSelf]___[value:flex-start",
78
68
  "borderBottomRadius]___[value:xsmall",
79
69
  "justifyContent]___[value:center",
80
- "background]___[value:background.default",
81
70
  "paddingInline]___[value:medium",
82
71
  "display]___[value:grid]___[cond:tabletWideDown",
83
72
  "paddingBlock]___[value:xsmall]___[cond:tabletWideDown",
@@ -133,9 +122,16 @@
133
122
  "textDecoration]___[value:none]___[cond:_hover",
134
123
  "textDecoration]___[value:none]___[cond:_focusVisible",
135
124
  "display]___[value:none]___[cond:tabletDown",
125
+ "fontWeight]___[value:bold",
136
126
  "alignSelf]___[value:center",
137
127
  "height]___[value:215px",
138
- "height]___[value:340px]___[cond:desktop",
128
+ "height]___[value:340px]___[cond:mobileWide",
129
+ "width]___[value:auto]___[cond:tabletWide",
130
+ "display]___[value:block]___[cond:tabletWide",
131
+ "overflow]___[value:hidden]___[cond:tabletWide",
132
+ "position]___[value:relative]___[cond:tabletWide",
133
+ "lineClamp]___[value:4]___[cond:tabletWide",
134
+ "boxOrient]___[value:vertical]___[cond:tabletWide",
139
135
  "borderLeft]___[value:4px solid",
140
136
  "borderLeftColor]___[value:stroke.default",
141
137
  "boxSizing]___[value:border-box",
@@ -173,6 +169,7 @@
173
169
  "display]___[value:inline]___[cond:& p",
174
170
  "minWidth]___[value:surface.xxsmall",
175
171
  "padding]___[value:medium",
172
+ "background]___[value:surface.default",
176
173
  "alignItems]___[value:unset]___[cond:tablet",
177
174
  "flexDirection]___[value:row]___[cond:tablet",
178
175
  "zIndex]___[value:base",
@@ -226,6 +223,7 @@
226
223
  "backgroundColor]___[value:var(--background-color)",
227
224
  "opacity]___[value:1]___[cond:_hover<___>& [data-copy-button]",
228
225
  "cursor]___[value:pointer]___[cond:_hover<___>& [data-copy-button]",
226
+ "position]___[value:absolute",
229
227
  "left]___[value:-xxlarge",
230
228
  "top]___[value:-4xsmall",
231
229
  "opacity]___[value:0",
@@ -234,7 +232,6 @@
234
232
  "marginInlineStart]___[value:xsmall",
235
233
  "height]___[value:auto",
236
234
  "textStyle]___[value:label.large",
237
- "fontWeight]___[value:bold",
238
235
  "marginBlockStart]___[value:xsmall]___[cond:& > *:not(:where(:first-child))",
239
236
  "width]___[value:surface.xlarge",
240
237
  "display]___[value:block]___[cond:& li",
@@ -266,6 +263,7 @@
266
263
  "transitionTimingFunction]___[value:ease-out]___[cond:& svg",
267
264
  "fill]___[value:primary]___[cond:& svg",
268
265
  "padding]___[value:0",
266
+ "top]___[value:xsmall",
269
267
  "right]___[value:xsmall",
270
268
  "width]___[value:medium",
271
269
  "height]___[value:medium",
@@ -433,7 +431,12 @@
433
431
  "padding]___[value:xsmall]___[cond:tabletDown",
434
432
  "aspectRatio]___[value:1/1",
435
433
  "width]___[value:100%]___[cond:tabletDown",
436
- "borderRadius]___[value:0]___[cond:tabletDown"
434
+ "borderRadius]___[value:0]___[cond:tabletDown",
435
+ "overflow]___[value:hidden]___[cond:& span",
436
+ "textOverflow]___[value:ellipsis]___[cond:& span",
437
+ "maxHeight]___[value:inherit",
438
+ "overflow]___[value:auto",
439
+ "gap]___[value:10px"
437
440
  ],
438
441
  "recipes": {}
439
442
  }
package/dist/styles.css CHANGED
@@ -85,34 +85,26 @@
85
85
  }
86
86
  }
87
87
 
88
- .px_8\% {
89
- padding-inline: 8%;
90
- }
91
-
92
- .w_100\% {
93
- width: 100%;
94
- }
95
-
96
- .pbs_xsmall {
97
- padding-block-start: var(--spacing-xsmall);
98
- }
99
-
100
- .pbe_xsmall {
101
- padding-block-end: var(--spacing-xsmall);
102
- }
103
-
104
- .bg_surface\.default {
105
- background: var(--colors-surface-default);
88
+ .bg_background\.default {
89
+ background: var(--colors-background-default);
106
90
  }
107
91
 
108
92
  .d_flex {
109
93
  display: flex;
110
94
  }
111
95
 
96
+ .gap_xxlarge {
97
+ gap: var(--spacing-xxlarge);
98
+ }
99
+
112
100
  .c_text\.default {
113
101
  color: var(--colors-text-default);
114
102
  }
115
103
 
104
+ .w_100\% {
105
+ width: 100%;
106
+ }
107
+
116
108
  .ov-wrap_break-word {
117
109
  overflow-wrap: break-word;
118
110
  }
@@ -121,26 +113,22 @@
121
113
  position: relative;
122
114
  }
123
115
 
124
- .gap_xsmall {
125
- gap: var(--spacing-xsmall);
126
- }
127
-
128
- .pos_absolute {
129
- position: absolute;
130
- }
131
-
132
116
  .gap_medium {
133
117
  gap: var(--spacing-medium);
134
118
  }
135
119
 
136
- .gap_xxlarge {
137
- gap: var(--spacing-xxlarge);
120
+ .pbs_xxlarge {
121
+ padding-block-start: var(--spacing-xxlarge);
138
122
  }
139
123
 
140
124
  .mbs_medium {
141
125
  margin-block-start: var(--spacing-medium);
142
126
  }
143
127
 
128
+ .pbs_xsmall {
129
+ padding-block-start: var(--spacing-xsmall);
130
+ }
131
+
144
132
  .bd-t_1px_solid {
145
133
  border-top: 1px solid;
146
134
  }
@@ -153,8 +141,8 @@
153
141
  padding-block: var(--spacing-xsmall);
154
142
  }
155
143
 
156
- .pbs_xxlarge {
157
- padding-block-start: var(--spacing-xxlarge);
144
+ .gap_xsmall {
145
+ gap: var(--spacing-xsmall);
158
146
  }
159
147
 
160
148
  .li-s_none {
@@ -218,10 +206,6 @@
218
206
  border-bottom-right-radius: var(--radii-xsmall);
219
207
  }
220
208
 
221
- .bg_background\.default {
222
- background: var(--colors-background-default);
223
- }
224
-
225
209
  .px_medium {
226
210
  padding-inline: var(--spacing-medium);
227
211
  }
@@ -374,6 +358,10 @@
374
358
  padding: var(--spacing-medium);
375
359
  }
376
360
 
361
+ .bg_surface\.default {
362
+ background: var(--colors-surface-default);
363
+ }
364
+
377
365
  .z_base {
378
366
  z-index: var(--z-index-base);
379
367
  }
@@ -426,6 +414,10 @@
426
414
  border: 2px solid;
427
415
  }
428
416
 
417
+ .pos_absolute {
418
+ position: absolute;
419
+ }
420
+
429
421
  .op_0 {
430
422
  opacity: 0;
431
423
  }
@@ -611,6 +603,18 @@
611
603
  aspect-ratio: 1/1;
612
604
  }
613
605
 
606
+ .max-h_inherit {
607
+ max-height: inherit;
608
+ }
609
+
610
+ .ov_auto {
611
+ overflow: auto;
612
+ }
613
+
614
+ .gap_10px {
615
+ gap: 10px;
616
+ }
617
+
614
618
  .flex-d_column {
615
619
  flex-direction: column;
616
620
  }
@@ -623,14 +627,6 @@
623
627
  align-items: flex-start;
624
628
  }
625
629
 
626
- .right_8\% {
627
- right: 8%;
628
- }
629
-
630
- .top_xsmall {
631
- top: var(--spacing-xsmall);
632
- }
633
-
634
630
  .bd-c_stroke\.subtle {
635
631
  border-color: var(--colors-stroke-subtle);
636
632
  }
@@ -682,6 +678,10 @@
682
678
  align-items: flex-end;
683
679
  }
684
680
 
681
+ .fw_bold {
682
+ font-weight: var(--font-weights-bold);
683
+ }
684
+
685
685
  .as_center {
686
686
  align-self: center;
687
687
  }
@@ -722,10 +722,6 @@
722
722
  top: calc(var(--spacing-4xsmall) * -1);
723
723
  }
724
724
 
725
- .fw_bold {
726
- font-weight: var(--font-weights-bold);
727
- }
728
-
729
725
  .bg-c_surface\.disabled {
730
726
  background-color: var(--colors-surface-disabled);
731
727
  }
@@ -761,6 +757,10 @@
761
757
  transition-timing-function: ease-out;
762
758
  }
763
759
 
760
+ .top_xsmall {
761
+ top: var(--spacing-xsmall);
762
+ }
763
+
764
764
  .right_xsmall {
765
765
  right: var(--spacing-xsmall);
766
766
  }
@@ -896,6 +896,10 @@
896
896
  overflow-wrap: anywhere;
897
897
  }
898
898
 
899
+ .\[\&_\>_\:is\(\:last-child\)\]\:pbe_5xlarge > :is(:last-child) {
900
+ padding-block-end: var(--spacing-5xlarge);
901
+ }
902
+
899
903
  .\[\&\[data-align\=\"center\"\]\]\:ta_center[data-align="center"] {
900
904
  text-align: center;
901
905
  }
@@ -1171,6 +1175,14 @@
1171
1175
  text-decoration: underline;
1172
1176
  }
1173
1177
 
1178
+ .\[\&_span\]\:ov_hidden span {
1179
+ overflow: hidden;
1180
+ }
1181
+
1182
+ .\[\&_span\]\:tov_ellipsis span {
1183
+ text-overflow: ellipsis;
1184
+ }
1185
+
1174
1186
  .after\:content_0::after {
1175
1187
  content: 0;
1176
1188
  }
@@ -1436,6 +1448,9 @@
1436
1448
  }
1437
1449
 
1438
1450
  @media screen and (min-width: 29.75rem) {
1451
+ .mobileWide\:h_340px {
1452
+ height: 340px;
1453
+ }
1439
1454
  .mobileWide\:d_none {
1440
1455
  display: none;
1441
1456
  }
@@ -1448,12 +1463,6 @@
1448
1463
  }
1449
1464
 
1450
1465
  @media screen and (min-width: 37.5625rem) {
1451
- .tablet\:pbs_medium {
1452
- padding-block-start: var(--spacing-medium);
1453
- }
1454
- .tablet\:pbe_medium {
1455
- padding-block-end: var(--spacing-medium);
1456
- }
1457
1466
  .tablet\:px_medium {
1458
1467
  padding-inline: var(--spacing-medium);
1459
1468
  }
@@ -1468,9 +1477,6 @@
1468
1477
  }
1469
1478
  .tablet\:w_83\.333\% {
1470
1479
  width: 83.333%;
1471
- }
1472
- .tablet\:top_medium {
1473
- top: var(--spacing-medium);
1474
1480
  }
1475
1481
  .tablet\:ai_unset {
1476
1482
  align-items: unset;
@@ -1537,6 +1543,27 @@
1537
1543
  }
1538
1544
  .tabletWide\:max-w_532px {
1539
1545
  max-width: 532px;
1546
+ }
1547
+ .tabletWide\:w_auto {
1548
+ width: auto;
1549
+ }
1550
+ .tabletWide\:d_block {
1551
+ display: block;
1552
+ }
1553
+ .tabletWide\:ov_hidden {
1554
+ overflow: hidden;
1555
+ }
1556
+ .tabletWide\:pos_relative {
1557
+ position: relative;
1558
+ }
1559
+ .tabletWide\:lc_4 {
1560
+ overflow: hidden;
1561
+ display: -webkit-box;
1562
+ -webkit-line-clamp: 4;
1563
+ -webkit-box-orient: vertical;
1564
+ }
1565
+ .tabletWide\:box-orient_vertical {
1566
+ box-orient: vertical;
1540
1567
  }
1541
1568
  .tabletWide\:flex-d_row {
1542
1569
  flex-direction: row;
@@ -1547,23 +1574,11 @@
1547
1574
  }
1548
1575
 
1549
1576
  @media screen and (min-width: 61.3125rem) {
1550
- .desktop\:pbs_xxlarge {
1551
- padding-block-start: var(--spacing-xxlarge);
1552
- }
1553
- .desktop\:pbe_xxlarge {
1554
- padding-block-end: var(--spacing-xxlarge);
1555
- }
1556
1577
  .desktop\:w_260px {
1557
1578
  width: 260px;
1558
1579
  }
1559
1580
  .desktop\:h_260px {
1560
1581
  height: 260px;
1561
- }
1562
- .desktop\:h_340px {
1563
- height: 340px;
1564
- }
1565
- .desktop\:top_xxlarge {
1566
- top: var(--spacing-xxlarge);
1567
1582
  }
1568
1583
  .desktop\:grid-tc_repeat\(3\,_minmax\(0\,_1fr\)\) {
1569
1584
  grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -10,61 +10,11 @@ import { forwardRef } from "react";
10
10
  import { ark } from "@ark-ui/react";
11
11
  import { Heading, Text } from "@ndla/primitives";
12
12
  import { cx } from "@ndla/styled-system/css";
13
- import { styled } from "@ndla/styled-system/jsx";
13
+ import { Stack, styled } from "@ndla/styled-system/jsx";
14
14
  import { ArticleByline } from "./ArticleByline";
15
15
  import { ContentTypeBadgeNew } from "..";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- const articlePadding = {
18
- paddingInline: "8%"
19
- };
20
- const paddingBlockEnd = {
21
- paddingBlockEnd: "xsmall",
22
- tablet: {
23
- paddingBlockEnd: "medium"
24
- },
25
- desktop: {
26
- paddingBlockEnd: "xxlarge"
27
- }
28
- };
29
- const paddingBlockStart = {
30
- paddingBlockStart: "xsmall",
31
- tablet: {
32
- paddingBlockStart: "medium"
33
- },
34
- desktop: {
35
- paddingBlockStart: "xxlarge"
36
- }
37
- };
38
- export const ArticlePadding = styled(ark.div, {
39
- base: {
40
- ...articlePadding,
41
- width: "100%"
42
- },
43
- variants: {
44
- padStart: {
45
- true: paddingBlockStart
46
- },
47
- padEnd: {
48
- true: paddingBlockEnd
49
- }
50
- }
51
- }, {
52
- baseComponent: true
53
- });
54
- const StyledArticleContent = styled(ark.section, {
55
- base: {
56
- background: "surface.default"
57
- },
58
- variants: {
59
- padded: {
60
- true: {
61
- ...articlePadding,
62
- ...paddingBlockStart,
63
- ...paddingBlockEnd
64
- }
65
- }
66
- }
67
- }, {
17
+ const StyledArticleContent = styled(ark.section, {}, {
68
18
  baseComponent: true
69
19
  });
70
20
  export const ArticleContent = /*#__PURE__*/forwardRef((_ref, ref) => {
@@ -80,8 +30,10 @@ export const ArticleContent = /*#__PURE__*/forwardRef((_ref, ref) => {
80
30
  });
81
31
  const StyledArticleWrapper = styled(ark.article, {
82
32
  base: {
33
+ background: "background.default",
83
34
  display: "flex",
84
35
  flexDirection: "column",
36
+ gap: "xxlarge",
85
37
  color: "text.default",
86
38
  alignItems: "center",
87
39
  width: "100%",
@@ -110,7 +62,6 @@ export const ArticleHGroup = styled(ark.hgroup, {
110
62
  width: "100%",
111
63
  flexDirection: "column",
112
64
  alignItems: "flex-start",
113
- gap: "xsmall",
114
65
  "& h1": {
115
66
  overflowWrap: "anywhere"
116
67
  }
@@ -118,37 +69,14 @@ export const ArticleHGroup = styled(ark.hgroup, {
118
69
  }, {
119
70
  baseComponent: true
120
71
  });
121
- export const ArticleActionWrapper = styled(ark.div, {
122
- base: {
123
- position: "absolute",
124
- right: "8%",
125
- top: "xsmall",
126
- tablet: {
127
- top: "medium"
128
- },
129
- desktop: {
130
- top: "xxlarge"
131
- }
132
- }
133
- }, {
134
- baseComponent: true
135
- });
136
72
  export const ArticleHeader = styled(ark.header, {
137
73
  base: {
138
74
  display: "flex",
139
75
  flexDirection: "column",
140
- background: "surface.default",
141
76
  gap: "medium",
142
77
  alignItems: "flex-start",
143
- width: "100%"
144
- },
145
- variants: {
146
- padded: {
147
- true: {
148
- ...articlePadding,
149
- ...paddingBlockStart
150
- }
151
- }
78
+ width: "100%",
79
+ paddingBlockStart: "xxlarge"
152
80
  }
153
81
  }, {
154
82
  baseComponent: true
@@ -157,21 +85,20 @@ export const ArticleFooter = styled(ark.footer, {
157
85
  base: {
158
86
  display: "flex",
159
87
  flexDirection: "column",
160
- background: "surface.default",
161
88
  gap: "xxlarge",
162
- width: "100%"
163
- },
164
- variants: {
165
- padded: {
166
- true: {
167
- ...articlePadding,
168
- ...paddingBlockEnd
169
- }
89
+ width: "100%",
90
+ "& > :is(:last-child)": {
91
+ paddingBlockEnd: "5xlarge"
170
92
  }
171
93
  }
172
94
  }, {
173
95
  baseComponent: true
174
96
  });
97
+ const StyledStack = styled(Stack, {
98
+ base: {
99
+ width: "100%"
100
+ }
101
+ });
175
102
  export const ArticleTitle = _ref2 => {
176
103
  let {
177
104
  contentType,
@@ -183,12 +110,15 @@ export const ArticleTitle = _ref2 => {
183
110
  competenceGoals
184
111
  } = _ref2;
185
112
  return /*#__PURE__*/_jsxs(ArticleHeader, {
186
- padded: true,
187
113
  children: [/*#__PURE__*/_jsxs(ArticleHGroup, {
188
- children: [!!contentType && /*#__PURE__*/_jsx(ContentTypeBadgeNew, {
189
- contentType: contentType
190
- }), !!heartButton && /*#__PURE__*/_jsx(ArticleActionWrapper, {
191
- children: heartButton
114
+ children: [/*#__PURE__*/_jsxs(StyledStack, {
115
+ justify: "space-between",
116
+ align: "center",
117
+ direction: "row",
118
+ gap: "small",
119
+ children: [!!contentType && /*#__PURE__*/_jsx(ContentTypeBadgeNew, {
120
+ contentType: contentType
121
+ }), heartButton]
192
122
  }), /*#__PURE__*/_jsx(Heading, {
193
123
  textStyle: "heading.large",
194
124
  id: id,
@@ -236,10 +166,8 @@ export const Article = _ref3 => {
236
166
  competenceGoals: competenceGoals,
237
167
  lang: lang
238
168
  }), /*#__PURE__*/_jsx(ArticleContent, {
239
- padded: true,
240
169
  children: content
241
170
  }), /*#__PURE__*/_jsxs(ArticleFooter, {
242
- padded: true,
243
171
  children: [/*#__PURE__*/_jsx(ArticleByline, {
244
172
  footnotes: footNotes,
245
173
  authors: authors,
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- export { Article, ArticleWrapper, ArticleHeader, ArticleFooter, ArticleTitle, ArticleActionWrapper, ArticleHGroup, ArticleContent, ArticlePadding } from "./Article";
9
+ export { Article, ArticleWrapper, ArticleHeader, ArticleFooter, ArticleTitle, ArticleHGroup, ArticleContent } from "./Article";
10
10
  export { ArticleByline, ArticleBylineAccordionItem } from "./ArticleByline";
11
11
  export { ArticleFootNotes } from "./ArticleFootNotes";
12
12
  export { ArticleParagraph } from "./ArticleParagraph";
@@ -15,7 +15,9 @@ import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
15
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  const Container = styled("div", {
17
17
  base: {
18
+ width: "100%",
18
19
  display: "flex",
20
+ gap: "medium",
19
21
  flexDirection: "column",
20
22
  border: "1px solid",
21
23
  borderColor: "stroke.default",
@@ -34,6 +36,17 @@ const LinkText = styled(Text, {
34
36
  display: "flex",
35
37
  gap: "xxsmall",
36
38
  textDecoration: "underline",
39
+ _hover: {
40
+ textDecoration: "none"
41
+ },
42
+ paddingBlock: "xsmall",
43
+ fontWeight: "bold"
44
+ }
45
+ });
46
+ const LinkHeader = styled(Text, {
47
+ base: {
48
+ display: "flex",
49
+ textDecoration: "underline",
37
50
  _hover: {
38
51
  textDecoration: "none"
39
52
  }
@@ -45,8 +58,11 @@ const StyledImg = styled("img", {
45
58
  objectFit: "cover",
46
59
  width: "100%",
47
60
  height: "215px",
48
- desktop: {
61
+ mobileWide: {
49
62
  height: "340px"
63
+ },
64
+ tabletWide: {
65
+ width: "auto"
50
66
  }
51
67
  }
52
68
  });
@@ -56,12 +72,24 @@ const ContentWrapper = styled("div", {
56
72
  position: "relative",
57
73
  display: "flex",
58
74
  flexDirection: "column",
59
- gap: "xsmall",
75
+ gap: "medium",
60
76
  alignItems: "flex-start",
77
+ justifyContent: "center",
61
78
  paddingBlock: "medium",
62
79
  paddingInline: "medium"
63
80
  }
64
81
  });
82
+ const StyledText = styled(Text, {
83
+ base: {
84
+ tabletWide: {
85
+ display: "block",
86
+ overflow: "hidden",
87
+ position: "relative",
88
+ lineClamp: 4,
89
+ boxOrient: "vertical"
90
+ }
91
+ }
92
+ });
65
93
  const StyledSafeLink = styled(SafeLink, {
66
94
  base: {
67
95
  color: "inherit"
@@ -96,7 +124,7 @@ const CampaignBlock = _ref2 => {
96
124
  width: 455,
97
125
  alt: image.alt
98
126
  });
99
- const HeaderComponent = url?.url ? LinkText : Text;
127
+ const HeaderComponent = url?.url ? LinkHeader : Text;
100
128
  return /*#__PURE__*/_jsxs(Container, {
101
129
  className: className,
102
130
  "data-embed-type": "campaign-block",
@@ -112,8 +140,8 @@ const CampaignBlock = _ref2 => {
112
140
  children: parse(title)
113
141
  })
114
142
  })
115
- }), /*#__PURE__*/_jsx(Text, {
116
- textStyle: "body.large",
143
+ }), /*#__PURE__*/_jsx(StyledText, {
144
+ textStyle: "body.xlarge",
117
145
  children: parse(description)
118
146
  }), !!url?.url && /*#__PURE__*/_jsx(MaybeLinkText, {
119
147
  url: url.url,
@@ -14,6 +14,8 @@ import { MenuSearchLine, LearningPath, SharedResource, TasksAndActivities } from
14
14
  import { ChatLine, FileListLine, LinkMedium, ImageLine, MovieLine } from "@ndla/icons/editor";
15
15
  import { styled } from "@ndla/styled-system/jsx";
16
16
  import * as contentTypes from "../model/ContentType";
17
+
18
+ // TODO: Remove this component
17
19
  import { jsx as _jsx } from "react/jsx-runtime";
18
20
  const StyledContentTypeBadge = styled("div", {
19
21
  base: {