@ndla/ui 56.0.2-alpha.0 → 56.0.4-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 (160) hide show
  1. package/dist/panda.buildinfo.json +34 -5
  2. package/dist/styles.css +144 -18
  3. package/es/Article/Article.js +1 -5
  4. package/es/Article/ArticleByline.js +3 -3
  5. package/es/Article/ArticleContent.js +27 -0
  6. package/es/Article/index.js +2 -1
  7. package/es/AudioPlayer/Controls.js +8 -8
  8. package/es/AudioPlayer/SpeechControl.js +2 -2
  9. package/es/Breadcrumb/BreadcrumbItem.js +2 -2
  10. package/es/Breadcrumb/HomeBreadcrumb.js +5 -5
  11. package/es/CampaignBlock/CampaignBlock.js +2 -2
  12. package/es/ContentTypeBadge/ContentTypeBadge.js +15 -15
  13. package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
  14. package/es/Embed/CodeEmbed.js +3 -3
  15. package/es/Embed/EmbedErrorPlaceholder.js +2 -2
  16. package/es/Embed/ImageEmbed.js +6 -5
  17. package/es/Embed/UuDisclaimerEmbed.js +2 -2
  18. package/es/ErrorMessage/ErrorMessage.js +2 -0
  19. package/es/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
  20. package/es/FactBox/FactBox.js +2 -2
  21. package/es/FileList/File.js +78 -23
  22. package/es/FileList/FileList.js +32 -37
  23. package/es/FileList/PdfFile.js +17 -16
  24. package/es/FileList/index.js +3 -5
  25. package/es/Gloss/Gloss.js +2 -2
  26. package/es/Grid/Grid.js +69 -48
  27. package/es/Grid/GridParallaxItem.js +32 -0
  28. package/es/Grid/index.js +2 -1
  29. package/es/KeyFigure/KeyFigure.js +28 -33
  30. package/es/LicenseByline/EmbedByline.js +2 -2
  31. package/es/LinkBlock/LinkBlock.js +4 -3
  32. package/es/LinkBlock/LinkBlockSection.js +1 -0
  33. package/es/RelatedArticleList/RelatedArticleList.js +1 -1
  34. package/es/ResourceBox/ResourceBox.js +2 -2
  35. package/es/TagSelector/TagSelector.js +2 -2
  36. package/es/TreeStructure/AddFolderButton.js +4 -4
  37. package/es/TreeStructure/ComboboxButton.js +4 -4
  38. package/es/TreeStructure/FolderItem.js +16 -16
  39. package/es/index.js +1 -4
  40. package/es/styles.css +144 -18
  41. package/lib/Article/Article.d.ts +0 -1
  42. package/lib/Article/Article.js +3 -7
  43. package/lib/Article/ArticleByline.js +2 -2
  44. package/lib/Article/ArticleContent.d.ts +11 -0
  45. package/lib/Article/ArticleContent.js +33 -0
  46. package/lib/Article/index.d.ts +2 -1
  47. package/lib/Article/index.js +2 -1
  48. package/lib/AudioPlayer/Controls.js +5 -5
  49. package/lib/AudioPlayer/SpeechControl.js +1 -1
  50. package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
  51. package/lib/Breadcrumb/HomeBreadcrumb.js +4 -4
  52. package/lib/CampaignBlock/CampaignBlock.js +1 -1
  53. package/lib/ContentTypeBadge/ContentTypeBadge.js +11 -11
  54. package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
  55. package/lib/Embed/CodeEmbed.js +1 -1
  56. package/lib/Embed/EmbedErrorPlaceholder.js +1 -1
  57. package/lib/Embed/ImageEmbed.js +4 -3
  58. package/lib/Embed/UuDisclaimerEmbed.js +1 -1
  59. package/lib/ErrorMessage/ErrorMessage.js +2 -0
  60. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +2 -2
  61. package/lib/FactBox/FactBox.js +1 -1
  62. package/lib/FileList/File.d.ts +5 -3
  63. package/lib/FileList/File.js +78 -23
  64. package/lib/FileList/FileList.d.ts +6 -6
  65. package/lib/FileList/FileList.js +35 -38
  66. package/lib/FileList/PdfFile.d.ts +2 -2
  67. package/lib/FileList/PdfFile.js +17 -15
  68. package/lib/FileList/index.d.ts +3 -5
  69. package/lib/FileList/index.js +19 -18
  70. package/lib/Gloss/Gloss.js +1 -1
  71. package/lib/Grid/Grid.d.ts +4 -7
  72. package/lib/Grid/Grid.js +71 -49
  73. package/lib/Grid/GridParallaxItem.d.ts +9 -0
  74. package/lib/Grid/GridParallaxItem.js +39 -0
  75. package/lib/Grid/index.d.ts +2 -1
  76. package/lib/Grid/index.js +4 -5
  77. package/lib/KeyFigure/KeyFigure.js +30 -33
  78. package/lib/LicenseByline/EmbedByline.js +1 -1
  79. package/lib/LinkBlock/LinkBlock.js +3 -2
  80. package/lib/LinkBlock/LinkBlockSection.js +1 -0
  81. package/lib/RelatedArticleList/RelatedArticleList.js +1 -1
  82. package/lib/ResourceBox/ResourceBox.js +1 -1
  83. package/lib/TagSelector/TagSelector.js +1 -1
  84. package/lib/TreeStructure/AddFolderButton.js +3 -3
  85. package/lib/TreeStructure/ComboboxButton.js +3 -3
  86. package/lib/TreeStructure/FolderItem.js +13 -13
  87. package/lib/index.d.ts +1 -4
  88. package/lib/index.js +9 -24
  89. package/lib/styles.css +144 -18
  90. package/package.json +7 -7
  91. package/src/Article/Article.tsx +1 -6
  92. package/src/Article/ArticleByline.tsx +3 -3
  93. package/src/Article/ArticleContent.tsx +21 -0
  94. package/src/Article/index.ts +2 -1
  95. package/src/AudioPlayer/Controls.tsx +8 -8
  96. package/src/AudioPlayer/SpeechControl.tsx +2 -2
  97. package/src/Breadcrumb/BreadcrumbItem.tsx +2 -2
  98. package/src/Breadcrumb/HomeBreadcrumb.tsx +5 -5
  99. package/src/CampaignBlock/CampaignBlock.tsx +2 -2
  100. package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +8 -7
  101. package/src/ContentTypeBadge/ContentTypeBadge.tsx +15 -24
  102. package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +2 -2
  103. package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -2
  104. package/src/Embed/CodeEmbed.tsx +3 -3
  105. package/src/Embed/EmbedErrorPlaceholder.tsx +2 -2
  106. package/src/Embed/ImageEmbed.tsx +7 -6
  107. package/src/Embed/UuDisclaimerEmbed.tsx +2 -2
  108. package/src/ErrorMessage/ErrorMessage.tsx +2 -0
  109. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +3 -3
  110. package/src/FactBox/FactBox.tsx +2 -2
  111. package/src/FileList/File.tsx +63 -28
  112. package/src/FileList/FileList.stories.tsx +121 -12
  113. package/src/FileList/FileList.tsx +31 -37
  114. package/src/FileList/PdfFile.tsx +9 -9
  115. package/src/FileList/index.ts +3 -7
  116. package/src/Gloss/Gloss.tsx +2 -2
  117. package/src/Grid/Grid.stories.tsx +30 -31
  118. package/src/Grid/Grid.tsx +57 -85
  119. package/src/Grid/GridParallaxItem.tsx +26 -0
  120. package/src/Grid/index.ts +3 -1
  121. package/src/KeyFigure/KeyFigure.stories.tsx +18 -11
  122. package/src/KeyFigure/KeyFigure.tsx +33 -47
  123. package/src/LicenseByline/EmbedByline.tsx +2 -2
  124. package/src/LinkBlock/LinkBlock.tsx +4 -3
  125. package/src/LinkBlock/LinkBlockSection.tsx +1 -1
  126. package/src/RelatedArticleList/RelatedArticleList.tsx +1 -1
  127. package/src/ResourceBox/ResourceBox.tsx +2 -2
  128. package/src/TagSelector/TagSelector.stories.tsx +6 -6
  129. package/src/TagSelector/TagSelector.tsx +2 -2
  130. package/src/TreeStructure/AddFolderButton.tsx +2 -2
  131. package/src/TreeStructure/ComboboxButton.tsx +2 -2
  132. package/src/TreeStructure/FolderItem.tsx +8 -8
  133. package/src/TreeStructure/TreeStructure.stories.tsx +4 -4
  134. package/src/index.ts +1 -7
  135. package/es/FileList/Format.js +0 -93
  136. package/es/Footer/FooterBlock.js +0 -17
  137. package/es/Footer/index.js +0 -9
  138. package/es/Messages/MessageBox.js +0 -79
  139. package/es/Messages/index.js +0 -10
  140. package/es/utils/resourceTypeColor.js +0 -46
  141. package/lib/FileList/Format.d.ts +0 -16
  142. package/lib/FileList/Format.js +0 -98
  143. package/lib/Footer/FooterBlock.d.ts +0 -13
  144. package/lib/Footer/FooterBlock.js +0 -24
  145. package/lib/Footer/index.d.ts +0 -8
  146. package/lib/Footer/index.js +0 -12
  147. package/lib/Messages/MessageBox.d.ts +0 -23
  148. package/lib/Messages/MessageBox.js +0 -87
  149. package/lib/Messages/index.d.ts +0 -9
  150. package/lib/Messages/index.js +0 -13
  151. package/lib/utils/resourceTypeColor.d.ts +0 -9
  152. package/lib/utils/resourceTypeColor.js +0 -54
  153. package/src/FileList/Format.tsx +0 -83
  154. package/src/Footer/Footer.stories.tsx +0 -35
  155. package/src/Footer/FooterBlock.tsx +0 -30
  156. package/src/Footer/index.ts +0 -9
  157. package/src/Messages/MessageBox.stories.tsx +0 -95
  158. package/src/Messages/MessageBox.tsx +0 -126
  159. package/src/Messages/index.ts +0 -11
  160. package/src/utils/resourceTypeColor.tsx +0 -46
package/lib/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
  }
@@ -491,6 +515,30 @@
491
515
  clear: both;
492
516
  }
493
517
 
518
+ .tu-o_2px {
519
+ text-underline-offset: 2px;
520
+ }
521
+
522
+ .py_small {
523
+ padding-block: var(--spacing-small);
524
+ }
525
+
526
+ .pe_medium {
527
+ padding-inline-end: var(--spacing-medium);
528
+ }
529
+
530
+ .ps_small {
531
+ padding-inline-start: var(--spacing-small);
532
+ }
533
+
534
+ .bg_surface\.infoSubtle {
535
+ background: var(--colors-surface-info-subtle);
536
+ }
537
+
538
+ .bd-be_1px_solid {
539
+ border-block-end: 1px solid;
540
+ }
541
+
494
542
  .gap_small {
495
543
  gap: var(--spacing-small);
496
544
  }
@@ -503,8 +551,16 @@
503
551
  margin-block-start: var(--spacing-3xsmall);
504
552
  }
505
553
 
506
- .py_small {
507
- padding-block: var(--spacing-small);
554
+ .d_grid {
555
+ display: grid;
556
+ }
557
+
558
+ .max-w_surface\.4xlarge {
559
+ max-width: var(--sizes-surface-4xlarge);
560
+ }
561
+
562
+ .w_surface\.3xsmall {
563
+ width: var(--sizes-surface-3xsmall);
508
564
  }
509
565
 
510
566
  .pos_relative\! {
@@ -547,10 +603,6 @@
547
603
  color: var(--colors-icon-strong);
548
604
  }
549
605
 
550
- .d_grid {
551
- display: grid;
552
- }
553
-
554
606
  .mbs_xsmall {
555
607
  margin-block-start: var(--spacing-xsmall);
556
608
  }
@@ -760,10 +812,42 @@
760
812
  bottom: calc(var(--spacing-medium) * -1);
761
813
  }
762
814
 
815
+ .flex-d_row {
816
+ flex-direction: row;
817
+ }
818
+
763
819
  .font-style_italic {
764
820
  font-style: italic;
765
821
  }
766
822
 
823
+ .grid-rg_large {
824
+ grid-row-gap: var(--spacing-large);
825
+ }
826
+
827
+ .grid-cg_medium {
828
+ grid-column-gap: var(--spacing-medium);
829
+ }
830
+
831
+ .bg-c_background\.subtle {
832
+ background-color: var(--colors-background-subtle);
833
+ }
834
+
835
+ .grid-tc_repeat\(2\,_minmax\(0\,_1fr\)\) {
836
+ grid-template-columns: repeat(2, minmax(0, 1fr));
837
+ }
838
+
839
+ .bg-c_surface\.default {
840
+ background-color: var(--colors-surface-default);
841
+ }
842
+
843
+ .bg-c_transparent {
844
+ background-color: transparent;
845
+ }
846
+
847
+ .bd-c_surface\.brand\.2 {
848
+ border-color: var(--colors-surface-brand-2);
849
+ }
850
+
767
851
  .right_auto\! {
768
852
  right: auto !important;
769
853
  }
@@ -1059,10 +1143,22 @@
1059
1143
  padding-block-end: var(--spacing-xsmall);
1060
1144
  }
1061
1145
 
1146
+ .before\:inset_0::before {
1147
+ inset: 0;
1148
+ }
1149
+
1150
+ .before\:z_0::before {
1151
+ z-index: 0;
1152
+ }
1153
+
1062
1154
  .first\:bg_surface\.brand\.1\.subtle:first-child {
1063
1155
  background: var(--colors-surface-brand-1-subtle);
1064
1156
  }
1065
1157
 
1158
+ .\[\&_\>_div\]\:pos_sticky > div {
1159
+ position: sticky;
1160
+ }
1161
+
1066
1162
  .after\:d_block\!::after {
1067
1163
  display: block !important;
1068
1164
  }
@@ -1075,14 +1171,6 @@
1075
1171
  text-decoration: underline;
1076
1172
  }
1077
1173
 
1078
- .before\:inset_0::before {
1079
- inset: 0;
1080
- }
1081
-
1082
- .before\:z_0::before {
1083
- z-index: 0;
1084
- }
1085
-
1086
1174
  .after\:content_0::after {
1087
1175
  content: 0;
1088
1176
  }
@@ -1187,6 +1275,10 @@
1187
1275
  border-color: var(--colors-stroke-default);
1188
1276
  }
1189
1277
 
1278
+ .\[\&_\>_div\]\:top_var\(--masthead-height\,_0px\) > div {
1279
+ top: var(--masthead-height, 0px);
1280
+ }
1281
+
1190
1282
  .after\:content_\"\"\!::after {
1191
1283
  content: "" !important;
1192
1284
  }
@@ -1243,6 +1335,10 @@
1243
1335
  border-color: var(--colors-text-link);
1244
1336
  }
1245
1337
 
1338
+ .hover\:bg-c_surface\.infoSubtle\.hover:is(:hover, [data-hover]) {
1339
+ background-color: var(--colors-surface-info-subtle-hover);
1340
+ }
1341
+
1246
1342
  .active\:bg_surface\.actionSubtle\.active:is(:active, [data-active]) {
1247
1343
  background: var(--colors-surface-action-subtle-active);
1248
1344
  }
@@ -1397,6 +1493,27 @@
1397
1493
  .\[\&_svg\]\:tablet\:h_12px svg {
1398
1494
  height: 12px;
1399
1495
  }
1496
+ }
1497
+
1498
+ @media screen and (min-width: 37.5625rem) and (max-width: 61.31rem) {
1499
+ .tabletToDesktop\:grid-tc_repeat\(2\,_minmax\(0\,_1fr\)\) {
1500
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1501
+ }
1502
+ .tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:d_flex > div:nth-child(3):last-child {
1503
+ display: flex;
1504
+ }
1505
+ .tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:flex-flow_column > div:nth-child(3):last-child {
1506
+ flex-flow: column;
1507
+ }
1508
+ .tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:grid-c_span_2 > div:nth-child(3):last-child {
1509
+ grid-column: span 2;
1510
+ }
1511
+ .tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:jc_center > div:nth-child(3):last-child {
1512
+ justify-content: center;
1513
+ }
1514
+ .tabletToDesktop\:\[\&_\>_div\:nth-child\(3\)\:last-child\]\:ai_center > div:nth-child(3):last-child {
1515
+ align-items: center;
1516
+ }
1400
1517
  }
1401
1518
 
1402
1519
  @media screen and (min-width: 48rem) {
@@ -1435,6 +1552,12 @@
1435
1552
  }
1436
1553
  .desktop\:top_xxlarge {
1437
1554
  top: var(--spacing-xxlarge);
1555
+ }
1556
+ .desktop\:grid-tc_repeat\(3\,_minmax\(0\,_1fr\)\) {
1557
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1558
+ }
1559
+ .desktop\:grid-tc_repeat\(4\,_minmax\(0\,_1fr\)\) {
1560
+ grid-template-columns: repeat(4, minmax(0, 1fr));
1438
1561
  }
1439
1562
  }
1440
1563
 
@@ -1495,6 +1618,9 @@
1495
1618
  }
1496
1619
  .tabletDown\:bdr_0 {
1497
1620
  border-radius: 0;
1621
+ }
1622
+ .tabletDown\:grid-tc_repeat\(1\,_minmax\(0\,_1fr\)\) {
1623
+ grid-template-columns: repeat(1, minmax(0, 1fr));
1498
1624
  }
1499
1625
  .tabletDown\:grid-tc_1fr {
1500
1626
  grid-template-columns: 1fr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.2-alpha.0",
3
+ "version": "56.0.4-alpha.0",
4
4
  "description": "UI component library for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -33,13 +33,13 @@
33
33
  "types"
34
34
  ],
35
35
  "dependencies": {
36
- "@ndla/button": "^15.0.2-alpha.0",
36
+ "@ndla/button": "^15.0.4-alpha.0",
37
37
  "@ndla/core": "^5.0.1",
38
38
  "@ndla/hooks": "^2.1.8",
39
- "@ndla/icons": "^8.0.2-alpha.0",
39
+ "@ndla/icons": "^8.0.4-alpha.0",
40
40
  "@ndla/licenses": "^8.0.0-alpha.0",
41
- "@ndla/primitives": "^1.0.2-alpha.0",
42
- "@ndla/safelink": "^7.0.2-alpha.0",
41
+ "@ndla/primitives": "^1.0.4-alpha.0",
42
+ "@ndla/safelink": "^7.0.4-alpha.0",
43
43
  "@ndla/styled-system": "^0.0.10",
44
44
  "@ndla/typography": "^0.4.23",
45
45
  "@ndla/util": "^4.1.0",
@@ -60,7 +60,7 @@
60
60
  "react-router-dom": "> 6.0.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@ndla/preset-panda": "^0.0.14",
63
+ "@ndla/preset-panda": "^0.0.15",
64
64
  "@ndla/types-backend": "^0.2.86",
65
65
  "@ndla/types-embed": "^5.0.0-alpha.0",
66
66
  "@pandacss/dev": "^0.44.0",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "45fb10125bc642d020ed37c03b9492976ef7f0d6"
76
+ "gitHead": "0fdd094fea36baa5ee2bdfe5b2bc6c423d304f22"
77
77
  }
@@ -10,16 +10,11 @@ import { ReactNode } from "react";
10
10
  import { Heading, Text } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
12
  import ArticleByline from "./ArticleByline";
13
+ import { ArticleContent } from "./ArticleContent";
13
14
  import { ContentTypeBadgeNew } from "..";
14
15
  import { ContentType } from "../ContentTypeBadge/ContentTypeBadgeNew";
15
16
  import { Article as ArticleType } from "../types";
16
17
 
17
- export const ArticleContent = styled("section", {
18
- base: {
19
- width: "100%",
20
- },
21
- });
22
-
23
18
  export const ArticleWrapper = styled("article", {
24
19
  base: {
25
20
  display: "flex",
@@ -10,7 +10,7 @@ import { TFunction } from "i18next";
10
10
  import { ReactNode, useCallback, useEffect, useState } from "react";
11
11
  import { useTranslation } from "react-i18next";
12
12
  import { useLocation } from "react-router-dom";
13
- import { ChevronDown } from "@ndla/icons/common";
13
+ import { ArrowDownShortLine } from "@ndla/icons/common";
14
14
  import { getLicenseByAbbreviation } from "@ndla/licenses";
15
15
  import {
16
16
  AccordionItem,
@@ -195,7 +195,7 @@ const ArticleByline = ({
195
195
  <h2>{t("article.useContent")}</h2>
196
196
  </Heading>
197
197
  <AccordionItemIndicator asChild>
198
- <ChevronDown />
198
+ <ArrowDownShortLine />
199
199
  </AccordionItemIndicator>
200
200
  </AccordionItemTrigger>
201
201
  <AccordionItemContent>{licenseBox}</AccordionItemContent>
@@ -209,7 +209,7 @@ const ArticleByline = ({
209
209
  <h2>{t("article.footnotes")}</h2>
210
210
  </Heading>
211
211
  <AccordionItemIndicator asChild>
212
- <ChevronDown />
212
+ <ArrowDownShortLine />
213
213
  </AccordionItemIndicator>
214
214
  </AccordionItemTrigger>
215
215
  <AccordionItemContent>
@@ -0,0 +1,21 @@
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, type HTMLArkProps } from "@ark-ui/react";
11
+ import { cx } from "@ndla/styled-system/css";
12
+ import { styled } from "@ndla/styled-system/jsx";
13
+ import { JsxStyleProps } from "@ndla/styled-system/types";
14
+
15
+ const StyledArticleContent = styled(ark.section, {}, { baseComponent: true });
16
+
17
+ export const ArticleContent = forwardRef<HTMLElement, HTMLArkProps<"div"> & JsxStyleProps>(
18
+ ({ className, ...props }, ref) => (
19
+ <StyledArticleContent className={cx("ndla-article", className)} {...props} ref={ref} />
20
+ ),
21
+ );
@@ -9,7 +9,8 @@
9
9
  import ArticleByline from "./ArticleByline";
10
10
  import ArticleFootNotes from "./ArticleFootNotes";
11
11
 
12
- export { Article, ArticleContent, ArticleWrapper, ArticleHeader, ArticleFooter } from "./Article";
12
+ export { Article, ArticleWrapper, ArticleHeader, ArticleFooter } from "./Article";
13
+ export { ArticleContent } from "./ArticleContent";
13
14
 
14
15
  export { ArticleByline, ArticleFootNotes };
15
16
  export { ArticleParagraph } from "./ArticleParagraph";
@@ -9,9 +9,9 @@
9
9
  import { useEffect, useRef, useState } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
11
  import type { SliderValueChangeDetails } from "@ark-ui/react";
12
- import { Back15, Forward15 } from "@ndla/icons/action";
13
- import { Play, Pause, VolumeUp } from "@ndla/icons/common";
14
- import { Done } from "@ndla/icons/editor";
12
+ import { Replay15Line, Forward15Line } from "@ndla/icons/action";
13
+ import { PlayFill, PauseLine, VolumeUpFill } from "@ndla/icons/common";
14
+ import { CheckLine } from "@ndla/icons/editor";
15
15
  import {
16
16
  Button,
17
17
  IconButton,
@@ -234,10 +234,10 @@ const Controls = ({ src, title }: Props) => {
234
234
  aria-label={t("audio.controls.rewind15sec")}
235
235
  onClick={() => onSeekSeconds(-15)}
236
236
  >
237
- <Back15 />
237
+ <Replay15Line />
238
238
  </Back15SecButton>
239
239
  <PlayButton aria-label={t(playing ? t("audio.pause") : t("audio.play"))} variant="primary" onClick={togglePlay}>
240
- {playing ? <Pause /> : <Play />}
240
+ {playing ? <PauseLine /> : <PlayFill />}
241
241
  </PlayButton>
242
242
  <Forward15SecButton
243
243
  variant="tertiary"
@@ -245,7 +245,7 @@ const Controls = ({ src, title }: Props) => {
245
245
  aria-label={t("audio.controls.forward15sec")}
246
246
  onClick={() => onSeekSeconds(15)}
247
247
  >
248
- <Forward15 />
248
+ <Forward15Line />
249
249
  </Forward15SecButton>
250
250
  <ProgressWrapper>
251
251
  <Text textStyle="label.medium" asChild consumeCss>
@@ -301,7 +301,7 @@ const Controls = ({ src, title }: Props) => {
301
301
  <SelectItem key={speed} item={speed}>
302
302
  <SelectItemText>{speed}x</SelectItemText>
303
303
  <SelectItemIndicator>
304
- <Done />
304
+ <CheckLine />
305
305
  </SelectItemIndicator>
306
306
  </SelectItem>
307
307
  ))}
@@ -311,7 +311,7 @@ const Controls = ({ src, title }: Props) => {
311
311
  <PopoverRoot positioning={{ placement: "top" }}>
312
312
  <PopoverTrigger asChild>
313
313
  <VolumeButton variant="tertiary" aria-label={t("audio.controls.adjustVolume")}>
314
- <VolumeUp />
314
+ <VolumeUpFill />
315
315
  </VolumeButton>
316
316
  </PopoverTrigger>
317
317
  <PopoverContent>
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { useRef } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
- import { VolumeUp } from "@ndla/icons/common";
11
+ import { VolumeUpFill } from "@ndla/icons/common";
12
12
  import { TooltipRoot, TooltipTrigger, TooltipContent, IconButton } from "@ndla/primitives";
13
13
 
14
14
  type Props = {
@@ -38,7 +38,7 @@ const SpeechControl = ({ src, title, type = "audio" }: Props) => {
38
38
  <TooltipRoot>
39
39
  <TooltipTrigger asChild>
40
40
  <IconButton variant="tertiary" aria-label={t(`${type}.play`)} onClick={togglePlay}>
41
- <VolumeUp />
41
+ <VolumeUpFill />
42
42
  </IconButton>
43
43
  </TooltipTrigger>
44
44
  <TooltipContent>{t(`${type}.play`)}</TooltipContent>
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { useRef, useImperativeHandle, ReactNode, forwardRef } from "react";
10
- import { ChevronRight } from "@ndla/icons/common";
10
+ import { ArrowRightShortLine } from "@ndla/icons/common";
11
11
  import { SafeLink } from "@ndla/safelink";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
13
 
@@ -67,7 +67,7 @@ const BreadcrumbItem = forwardRef<any, Props>(({ renderItem, renderSeparator, it
67
67
  <span>{name}</span>
68
68
  </SafeLink>
69
69
  )}
70
- {renderSeparator ? renderSeparator(item, totalCount) : !isLast && <ChevronRight />}
70
+ {renderSeparator ? renderSeparator(item, totalCount) : !isLast && <ArrowRightShortLine />}
71
71
  </StyledListItem>
72
72
  );
73
73
  });
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ChevronRight, Home } from "@ndla/icons/common";
9
+ import { ArrowRightShortLine, HomeFill } 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";
@@ -25,7 +25,7 @@ const StyledSafeLink = styled(SafeLink, {
25
25
  },
26
26
  });
27
27
 
28
- const StyledChevronRight = styled(ChevronRight, {
28
+ const StyledArrowRight = styled(ArrowRightShortLine, {
29
29
  base: {
30
30
  tabletDown: {
31
31
  display: "none",
@@ -51,7 +51,7 @@ const HomeBreadcrumb = ({ items }: Props) => {
51
51
  if (item.index === 0 && typeof item.name === "string") {
52
52
  return (
53
53
  <IconSafeLink aria-label={item.name} to={item.to}>
54
- <Home title={item.name} />
54
+ <HomeFill title={item.name} />
55
55
  </IconSafeLink>
56
56
  );
57
57
  }
@@ -63,9 +63,9 @@ const HomeBreadcrumb = ({ items }: Props) => {
63
63
  return null;
64
64
  }
65
65
  if (item.index === 0) {
66
- return <StyledChevronRight />;
66
+ return <StyledArrowRight />;
67
67
  }
68
- return <ChevronRight />;
68
+ return <ArrowRightShortLine />;
69
69
  };
70
70
 
71
71
  return <Breadcrumb items={items} renderItem={renderItem} renderSeparator={renderSeparator} />;
@@ -8,7 +8,7 @@
8
8
 
9
9
  import parse from "html-react-parser";
10
10
  import { ReactNode } from "react";
11
- import { Forward } from "@ndla/icons/common";
11
+ import { ArrowRightLine } from "@ndla/icons/common";
12
12
  import { Text } from "@ndla/primitives";
13
13
  import { SafeLink } from "@ndla/safelink";
14
14
  import { styled } from "@ndla/styled-system/jsx";
@@ -136,7 +136,7 @@ const CampaignBlock = ({
136
136
  <MaybeLinkText url={url.url} path={path}>
137
137
  <LinkText textStyle="body.medium">
138
138
  {parse(url.text ?? "")}
139
- <Forward />
139
+ <ArrowRightLine />
140
140
  </LinkText>
141
141
  </MaybeLinkText>
142
142
  )}
@@ -6,9 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import styled from "@emotion/styled";
10
9
  import { Meta, StoryFn, StoryObj } from "@storybook/react";
11
- import { spacing } from "@ndla/core";
10
+ import { styled } from "@ndla/styled-system/jsx";
12
11
  import { ContentTypeBadge } from "./ContentTypeBadge";
13
12
  import * as contentTypes from "../model/ContentType";
14
13
 
@@ -54,11 +53,13 @@ export const NoBackground: StoryObj<typeof ContentTypeBadge> = {
54
53
  },
55
54
  };
56
55
 
57
- const BadgesWrapper = styled.div`
58
- display: flex;
59
- align-items: center;
60
- gap: ${spacing.small};
61
- `;
56
+ const BadgesWrapper = styled("div", {
57
+ base: {
58
+ display: "flex",
59
+ alignItems: "center",
60
+ gap: "xsmall",
61
+ },
62
+ });
62
63
 
63
64
  export const AllBadges: StoryFn<typeof ContentTypeBadge> = ({ ...args }) => (
64
65
  <BadgesWrapper>
@@ -9,19 +9,10 @@
9
9
  import { CSSProperties, ComponentPropsWithoutRef, useMemo } from "react";
10
10
 
11
11
  import { colors } from "@ndla/core";
12
- import { Minus, MenuBook } from "@ndla/icons/action";
13
- import { Audio } from "@ndla/icons/common";
14
- import {
15
- AssessmentResource,
16
- ExternalLearningResource,
17
- LearningPath,
18
- MultidisciplinaryTopic,
19
- SharedResource,
20
- Subject,
21
- SubjectMaterial,
22
- TasksAndActivities,
23
- } from "@ndla/icons/contentType";
24
- import { Concept, Media, Video } from "@ndla/icons/editor";
12
+ import { BookmarkLine, SubtractLine } from "@ndla/icons/action";
13
+ import { BookReadFill, ShareFill, VoicePrintLine } from "@ndla/icons/common";
14
+ import { MenuSearchLine, LearningPath, SharedResource, TasksAndActivities } from "@ndla/icons/contentType";
15
+ import { ChatLine, FileListLine, LinkMedium, ImageLine, MovieLine } from "@ndla/icons/editor";
25
16
  import { styled } from "@ndla/styled-system/jsx";
26
17
 
27
18
  import * as contentTypes from "../model/ContentType";
@@ -106,7 +97,7 @@ const StyledContentTypeBadge = styled("div", {
106
97
 
107
98
  const iconMap = {
108
99
  [contentTypes.SUBJECT_MATERIAL]: {
109
- icon: SubjectMaterial,
100
+ icon: FileListLine,
110
101
  iconColor: colors.subjectMaterial.dark,
111
102
  backgroundColor: colors.subjectMaterial.light,
112
103
  },
@@ -116,12 +107,12 @@ const iconMap = {
116
107
  backgroundColor: colors.tasksAndActivities.light,
117
108
  },
118
109
  [contentTypes.ASSESSMENT_RESOURCES]: {
119
- icon: AssessmentResource,
110
+ icon: MenuSearchLine,
120
111
  iconColor: colors.assessmentResource.dark,
121
112
  backgroundColor: colors.assessmentResource.light,
122
113
  },
123
114
  [contentTypes.SUBJECT]: {
124
- icon: MenuBook,
115
+ icon: BookReadFill,
125
116
  iconColor: colors.subject.dark,
126
117
  backgroundColor: colors.subject.light,
127
118
  },
@@ -136,41 +127,41 @@ const iconMap = {
136
127
  backgroundColor: colors.learningPath.light,
137
128
  },
138
129
  [contentTypes.TOPIC]: {
139
- icon: Subject,
130
+ icon: BookmarkLine,
140
131
  iconColor: colors.subject.dark,
141
132
  backgroundColor: colors.subject.light,
142
133
  },
143
134
  [contentTypes.MULTIDISCIPLINARY_TOPIC]: {
144
- icon: MultidisciplinaryTopic,
135
+ icon: ShareFill,
145
136
  backgroundColor: "#b9b37b",
146
137
  },
147
138
  [contentTypes.CONCEPT]: {
148
- icon: Concept,
139
+ icon: ChatLine,
149
140
  iconColor: colors.concept.text,
150
141
  backgroundColor: colors.concept.light,
151
142
  },
152
143
  [contentTypes.EXTERNAL]: {
153
- icon: ExternalLearningResource,
144
+ icon: LinkMedium,
154
145
  iconColor: colors.external.dark,
155
146
  backgroundColor: colors.external.light,
156
147
  },
157
148
  [contentTypes.resourceEmbedTypeMapping.image]: {
158
- icon: Media,
149
+ icon: ImageLine,
159
150
  iconColor: colors.brand.grey,
160
151
  backgroundColor: colors.brand.greyLight,
161
152
  },
162
153
  [contentTypes.resourceEmbedTypeMapping.audio]: {
163
- icon: Audio,
154
+ icon: VoicePrintLine,
164
155
  iconColor: colors.brand.grey,
165
156
  backgroundColor: colors.brand.greyLight,
166
157
  },
167
158
  [contentTypes.resourceEmbedTypeMapping.video]: {
168
- icon: Video,
159
+ icon: MovieLine,
169
160
  iconColor: colors.brand.grey,
170
161
  backgroundColor: colors.brand.greyLight,
171
162
  },
172
163
  [contentTypes.MISSING]: {
173
- icon: Minus,
164
+ icon: SubtractLine,
174
165
  iconColor: colors.brand.grey,
175
166
  backgroundColor: colors.brand.greyLight,
176
167
  },
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { useTranslation } from "react-i18next";
10
10
  import { Meta, StoryFn, StoryObj } from "@storybook/react";
11
- import { Video } from "@ndla/icons/editor";
11
+ import { MovieLine } from "@ndla/icons/editor";
12
12
  import { HStack, styled } from "@ndla/styled-system/jsx";
13
13
  import { ContentTypeBadge } from "./ContentTypeBadgeNew";
14
14
 
@@ -63,7 +63,7 @@ export const ContentOverride: StoryFn<typeof ContentTypeBadge> = () => {
63
63
  const { t } = useTranslation();
64
64
  return (
65
65
  <StyledContentTypeBadge contentType="video">
66
- <Video size="small" />
66
+ <MovieLine size="small" />
67
67
  {t("contentTypes.video")}
68
68
  </StyledContentTypeBadge>
69
69
  );