@ndla/ui 56.0.34-alpha.0 → 56.0.36-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 (78) hide show
  1. package/dist/panda.buildinfo.json +8 -20
  2. package/dist/styles.css +20 -64
  3. package/es/CampaignBlock/CampaignBlock.js +36 -47
  4. package/es/Embed/CodeEmbed.js +6 -2
  5. package/es/Embed/ConceptEmbed.js +1 -0
  6. package/es/Embed/EmbedErrorPlaceholder.js +8 -9
  7. package/es/Layout/index.js +1 -3
  8. package/es/index.js +1 -2
  9. package/es/locale/messages-en.js +2 -1
  10. package/es/locale/messages-nb.js +2 -1
  11. package/es/locale/messages-nn.js +2 -1
  12. package/es/locale/messages-se.js +2 -1
  13. package/es/locale/messages-sma.js +2 -1
  14. package/lib/CampaignBlock/CampaignBlock.d.ts +4 -2
  15. package/lib/CampaignBlock/CampaignBlock.js +35 -46
  16. package/lib/Embed/CodeEmbed.js +7 -2
  17. package/lib/Embed/ConceptEmbed.js +1 -0
  18. package/lib/Embed/EmbedErrorPlaceholder.js +7 -8
  19. package/lib/Layout/index.d.ts +0 -2
  20. package/lib/Layout/index.js +1 -11
  21. package/lib/LicenseByline/EmbedByline.d.ts +1 -1
  22. package/lib/index.d.ts +1 -3
  23. package/lib/index.js +1 -14
  24. package/lib/locale/messages-en.d.ts +1 -0
  25. package/lib/locale/messages-en.js +2 -1
  26. package/lib/locale/messages-nb.d.ts +1 -0
  27. package/lib/locale/messages-nb.js +2 -1
  28. package/lib/locale/messages-nn.d.ts +1 -0
  29. package/lib/locale/messages-nn.js +2 -1
  30. package/lib/locale/messages-se.d.ts +1 -0
  31. package/lib/locale/messages-se.js +2 -1
  32. package/lib/locale/messages-sma.d.ts +1 -0
  33. package/lib/locale/messages-sma.js +2 -1
  34. package/package.json +6 -6
  35. package/src/CampaignBlock/CampaignBlock.tsx +43 -44
  36. package/src/ContentTypeHero/ContentTypeHero.stories.tsx +3 -4
  37. package/src/Embed/AudioEmbed.stories.tsx +3 -3
  38. package/src/Embed/BrightcoveEmbed.stories.tsx +3 -3
  39. package/src/Embed/CodeEmbed.tsx +5 -2
  40. package/src/Embed/ConceptEmbed.stories.tsx +3 -3
  41. package/src/Embed/ConceptEmbed.tsx +1 -0
  42. package/src/Embed/EmbedErrorPlaceholder.tsx +8 -9
  43. package/src/Embed/ExternalEmbed.stories.tsx +3 -3
  44. package/src/Embed/H5pEmbed.stories.tsx +3 -3
  45. package/src/Embed/IframeEmbed.stories.tsx +3 -3
  46. package/src/Embed/ImageEmbed.stories.tsx +3 -4
  47. package/src/Embed/RelatedContentEmbed.stories.tsx +3 -3
  48. package/src/Embed/UuDisclaimerEmbed.stories.tsx +3 -4
  49. package/src/Grid/Grid.stories.tsx +4 -3
  50. package/src/Layout/index.ts +0 -4
  51. package/src/LicenseByline/EmbedByline.tsx +1 -1
  52. package/src/index.ts +1 -4
  53. package/src/locale/messages-en.ts +1 -0
  54. package/src/locale/messages-nb.ts +1 -0
  55. package/src/locale/messages-nn.ts +1 -0
  56. package/src/locale/messages-se.ts +1 -0
  57. package/src/locale/messages-sma.ts +1 -0
  58. package/es/Layout/LayoutItem.js +0 -35
  59. package/es/TreeStructure/TreeStructure.js +0 -318
  60. package/es/TreeStructure/helperFunctions.js +0 -29
  61. package/es/TreeStructure/index.js +0 -9
  62. package/es/TreeStructure/types.js +0 -1
  63. package/lib/Layout/LayoutItem.d.ts +0 -11
  64. package/lib/Layout/LayoutItem.js +0 -40
  65. package/lib/TreeStructure/TreeStructure.d.ts +0 -22
  66. package/lib/TreeStructure/TreeStructure.js +0 -325
  67. package/lib/TreeStructure/helperFunctions.d.ts +0 -9
  68. package/lib/TreeStructure/helperFunctions.js +0 -36
  69. package/lib/TreeStructure/index.d.ts +0 -9
  70. package/lib/TreeStructure/index.js +0 -12
  71. package/lib/TreeStructure/types.d.ts +0 -15
  72. package/lib/TreeStructure/types.js +0 -5
  73. package/src/Layout/LayoutItem.tsx +0 -36
  74. package/src/TreeStructure/TreeStructure.stories.tsx +0 -282
  75. package/src/TreeStructure/TreeStructure.tsx +0 -354
  76. package/src/TreeStructure/helperFunctions.ts +0 -18
  77. package/src/TreeStructure/index.ts +0 -10
  78. package/src/TreeStructure/types.ts +0 -22
@@ -131,7 +131,8 @@
131
131
  "gridTemplateColumns]___[value:minmax(230px, 455px) auto]___[cond:@supports not (container-type: inline-size)<___>tabletWide",
132
132
  "gridTemplateColumns]___[value:auto minmax(230px, 455px)]___[cond:@/tablet",
133
133
  "gridTemplateColumns]___[value:auto minmax(230px, 455px)]___[cond:@supports not (container-type: inline-size)<___>tabletWide",
134
- "fontWeight]___[value:bold",
134
+ "backgroundColor]___[value:surface.brand.1",
135
+ "backgroundColor]___[value:surface.brand.3",
135
136
  "height]___[value:215px",
136
137
  "height]___[value:340px]___[cond:@/tablet",
137
138
  "height]___[value:265px]___[cond:@supports not (container-type: inline-size)<___>tablet",
@@ -241,15 +242,15 @@
241
242
  "marginInlineStart]___[value:xsmall",
242
243
  "height]___[value:auto",
243
244
  "textStyle]___[value:label.large",
245
+ "fontWeight]___[value:bold",
244
246
  "marginBlockStart]___[value:xsmall]___[cond:& > *:not(:where(:first-child))",
245
247
  "width]___[value:surface.xlarge",
246
248
  "maxHeight]___[value:50vh",
247
249
  "overflowY]___[value:auto",
248
- "backgroundColor]___[value:surface.disabled",
249
- "fill]___[value:text.subtle]___[cond:& svg",
250
- "height]___[value:90%]___[cond:& svg",
251
- "width]___[value:90%]___[cond:& svg",
252
- "height]___[value:surface.3xsmall]___[cond:&[data-embed-type='audio']",
250
+ "background]___[value:background.subtle",
251
+ "height]___[value:5xlarge]___[cond:& svg",
252
+ "width]___[value:5xlarge]___[cond:& svg",
253
+ "fill]___[value:stroke.default]___[cond:& svg",
253
254
  "marginBlockStart]___[value:3xsmall]___[cond:& > *:not(:first-child)",
254
255
  "height]___[value:auto]___[cond:& iframe",
255
256
  "width]___[value:100%]___[cond:& iframe",
@@ -376,14 +377,6 @@
376
377
  "width]___[value:surface.3xsmall",
377
378
  "textStyle]___[value:heading.large",
378
379
  "textStyle]___[value:title.medium",
379
- "position]___[value:relative!",
380
- "width]___[value:83.333%",
381
- "right]___[value:auto !important",
382
- "left]___[value:8.333%",
383
- "position]___[value:relative!]___[cond:tablet",
384
- "width]___[value:83.333%]___[cond:tablet",
385
- "right]___[value:auto!]___[cond:tablet",
386
- "left]___[value:8.333%]___[cond:tablet",
387
380
  "marginLeft]___[value:auto",
388
381
  "marginRight]___[value:auto",
389
382
  "paddingLeft]___[value:18px",
@@ -438,12 +431,7 @@
438
431
  "padding]___[value:xsmall]___[cond:tabletDown",
439
432
  "aspectRatio]___[value:1/1",
440
433
  "width]___[value:100%]___[cond:tabletDown",
441
- "borderRadius]___[value:0]___[cond:tabletDown",
442
- "overflow]___[value:hidden]___[cond:& span",
443
- "textOverflow]___[value:ellipsis]___[cond:& span",
444
- "maxHeight]___[value:inherit",
445
- "overflow]___[value:auto",
446
- "gap]___[value:10px"
434
+ "borderRadius]___[value:0]___[cond:tabletDown"
447
435
  ],
448
436
  "recipes": {}
449
437
  }
package/dist/styles.css CHANGED
@@ -498,6 +498,10 @@
498
498
  max-height: 50vh;
499
499
  }
500
500
 
501
+ .bg_background\.subtle {
502
+ background: var(--colors-background-subtle);
503
+ }
504
+
501
505
  .z_docked {
502
506
  z-index: var(--z-index-docked);
503
507
  }
@@ -590,14 +594,6 @@
590
594
  width: var(--sizes-surface-3xsmall);
591
595
  }
592
596
 
593
- .pos_relative\! {
594
- position: relative !important;
595
- }
596
-
597
- .w_83\.333\% {
598
- width: 83.333%;
599
- }
600
-
601
597
  .max-w_1150px {
602
598
  max-width: 1150px;
603
599
  }
@@ -646,18 +642,6 @@
646
642
  aspect-ratio: 1/1;
647
643
  }
648
644
 
649
- .max-h_inherit {
650
- max-height: inherit;
651
- }
652
-
653
- .ov_auto {
654
- overflow: auto;
655
- }
656
-
657
- .gap_10px {
658
- gap: 10px;
659
- }
660
-
661
645
  .flex-d_column {
662
646
  flex-direction: column;
663
647
  }
@@ -725,8 +709,12 @@
725
709
  grid-template-columns: 1fr;
726
710
  }
727
711
 
728
- .fw_bold {
729
- font-weight: var(--font-weights-bold);
712
+ .bg-c_surface\.brand\.1 {
713
+ background-color: var(--colors-surface-brand-1);
714
+ }
715
+
716
+ .bg-c_surface\.brand\.3 {
717
+ background-color: var(--colors-surface-brand-3);
730
718
  }
731
719
 
732
720
  .bd-l-c_stroke\.default {
@@ -765,12 +753,12 @@
765
753
  top: calc(var(--spacing-4xsmall) * -1);
766
754
  }
767
755
 
768
- .ov-y_auto {
769
- overflow-y: auto;
756
+ .fw_bold {
757
+ font-weight: var(--font-weights-bold);
770
758
  }
771
759
 
772
- .bg-c_surface\.disabled {
773
- background-color: var(--colors-surface-disabled);
760
+ .ov-y_auto {
761
+ overflow-y: auto;
774
762
  }
775
763
 
776
764
  .top_xsmall {
@@ -887,14 +875,6 @@
887
875
  border-color: var(--colors-surface-brand-2);
888
876
  }
889
877
 
890
- .right_auto\! {
891
- right: auto !important;
892
- }
893
-
894
- .left_8\.333\% {
895
- left: 8.333%;
896
- }
897
-
898
878
  .ml_auto {
899
879
  margin-left: auto;
900
880
  }
@@ -1087,20 +1067,16 @@
1087
1067
  margin-block-start: var(--spacing-xsmall);
1088
1068
  }
1089
1069
 
1090
- .\[\&_svg\]\:fill_text\.subtle svg {
1091
- fill: var(--colors-text-subtle);
1070
+ .\[\&_svg\]\:h_5xlarge svg {
1071
+ height: var(--sizes-5xlarge);
1092
1072
  }
1093
1073
 
1094
- .\[\&_svg\]\:h_90\% svg {
1095
- height: 90%;
1074
+ .\[\&_svg\]\:w_5xlarge svg {
1075
+ width: var(--sizes-5xlarge);
1096
1076
  }
1097
1077
 
1098
- .\[\&_svg\]\:w_90\% svg {
1099
- width: 90%;
1100
- }
1101
-
1102
- .\[\&\[data-embed-type\=\'audio\'\]\]\:h_surface\.3xsmall[data-embed-type='audio'] {
1103
- height: var(--sizes-surface-3xsmall);
1078
+ .\[\&_svg\]\:fill_stroke\.default svg {
1079
+ fill: var(--colors-stroke-default);
1104
1080
  }
1105
1081
 
1106
1082
  .\[\&_\>_\*\:not\(\:first-child\)\]\:mbs_3xsmall > *:not(:first-child) {
@@ -1211,14 +1187,6 @@
1211
1187
  text-decoration: underline;
1212
1188
  }
1213
1189
 
1214
- .\[\&_span\]\:ov_hidden span {
1215
- overflow: hidden;
1216
- }
1217
-
1218
- .\[\&_span\]\:tov_ellipsis span {
1219
- text-overflow: ellipsis;
1220
- }
1221
-
1222
1190
  .after\:content_0::after {
1223
1191
  content: 0;
1224
1192
  }
@@ -1551,12 +1519,6 @@
1551
1519
  }
1552
1520
  .tablet\:w_26px {
1553
1521
  width: 26px;
1554
- }
1555
- .tablet\:pos_relative\! {
1556
- position: relative !important;
1557
- }
1558
- .tablet\:w_83\.333\% {
1559
- width: 83.333%;
1560
1522
  }
1561
1523
  .tablet\:ai_unset {
1562
1524
  align-items: unset;
@@ -1569,12 +1531,6 @@
1569
1531
  }
1570
1532
  .tablet\:mb_xxlarge {
1571
1533
  margin-bottom: var(--spacing-xxlarge);
1572
- }
1573
- .tablet\:right_auto\! {
1574
- right: auto !important;
1575
- }
1576
- .tablet\:left_8\.333\% {
1577
- left: 8.333%;
1578
1534
  }
1579
1535
  .tablet\:bg-c_\#f8f8f8 {
1580
1536
  background-color: #f8f8f8;
@@ -9,7 +9,7 @@
9
9
  import parse from "html-react-parser";
10
10
  import { ArrowRightLine } from "@ndla/icons/common";
11
11
  import { Text } from "@ndla/primitives";
12
- import { SafeLink } from "@ndla/safelink";
12
+ import { SafeLinkButton } 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";
@@ -24,7 +24,6 @@ const Container = styled("div", {
24
24
  base: {
25
25
  display: "grid",
26
26
  gridTemplateColumns: "1fr",
27
- gap: "medium",
28
27
  border: "1px solid",
29
28
  borderColor: "stroke.default",
30
29
  backgroundColor: "background.default",
@@ -54,31 +53,20 @@ const Container = styled("div", {
54
53
  }
55
54
  }
56
55
  }
56
+ },
57
+ background: {
58
+ neutral: {},
59
+ brand1: {
60
+ backgroundColor: "surface.brand.1"
61
+ },
62
+ brand3: {
63
+ backgroundColor: "surface.brand.3"
64
+ }
57
65
  }
58
66
  },
59
67
  defaultVariants: {
60
- imageSide: "left"
61
- }
62
- });
63
- const LinkText = styled(Text, {
64
- base: {
65
- display: "flex",
66
- gap: "xxsmall",
67
- textDecoration: "underline",
68
- _hover: {
69
- textDecoration: "none"
70
- },
71
- paddingBlock: "xsmall",
72
- fontWeight: "bold"
73
- }
74
- });
75
- const LinkHeader = styled(Text, {
76
- base: {
77
- display: "flex",
78
- textDecoration: "underline",
79
- _hover: {
80
- textDecoration: "none"
81
- }
68
+ imageSide: "left",
69
+ background: "neutral"
82
70
  }
83
71
  });
84
72
  const StyledImg = styled("img", {
@@ -96,7 +84,8 @@ const StyledImg = styled("img", {
96
84
  tabletWide: {
97
85
  height: "340px"
98
86
  }
99
- }
87
+ },
88
+ backgroundColor: "background.default"
100
89
  }
101
90
  });
102
91
  const ContentWrapper = styled("div", {
@@ -108,7 +97,8 @@ const ContentWrapper = styled("div", {
108
97
  alignItems: "flex-start",
109
98
  justifyContent: "center",
110
99
  paddingBlock: "medium",
111
- paddingInline: "medium"
100
+ paddingInline: "medium",
101
+ position: "relative"
112
102
  }
113
103
  });
114
104
  const StyledText = styled(Text, {
@@ -122,19 +112,24 @@ const StyledText = styled(Text, {
122
112
  }
123
113
  }
124
114
  });
125
- const StyledSafeLink = styled(SafeLink, {
115
+ const StyledSafeLinkButton = styled(SafeLinkButton, {
126
116
  base: {
127
- color: "inherit"
117
+ boxShadow: "full",
118
+ border: "1px solid",
119
+ borderColor: "stroke.default"
128
120
  }
129
121
  });
130
- const MaybeLinkText = _ref => {
122
+ const LinkButton = _ref => {
131
123
  let {
132
124
  url,
133
125
  children,
134
126
  path
135
127
  } = _ref;
136
- if (url) return /*#__PURE__*/_jsx(StyledSafeLink, {
128
+ if (url) return /*#__PURE__*/_jsx(StyledSafeLinkButton, {
137
129
  to: getPossiblyRelativeUrl(url, path),
130
+ target: "_blank",
131
+ variant: "secondary",
132
+ rel: "noopener noreferrer",
138
133
  children: children
139
134
  });
140
135
  return children;
@@ -148,7 +143,8 @@ const CampaignBlock = _ref2 => {
148
143
  headingLevel: InternalHeading = "h2",
149
144
  url,
150
145
  path,
151
- className
146
+ className,
147
+ background
152
148
  } = _ref2;
153
149
  const imageComponent = image && /*#__PURE__*/_jsx(StyledImg, {
154
150
  src: `${image.src}?width=455`,
@@ -156,34 +152,27 @@ const CampaignBlock = _ref2 => {
156
152
  width: 455,
157
153
  alt: image.alt
158
154
  });
159
- const HeaderComponent = url?.url ? LinkHeader : Text;
160
155
  return /*#__PURE__*/_jsx(Wrapper, {
161
156
  children: /*#__PURE__*/_jsxs(Container, {
162
157
  className: className,
163
158
  "data-embed-type": "campaign-block",
164
159
  imageSide: imageSide,
160
+ background: background,
165
161
  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
- })
162
+ children: [/*#__PURE__*/_jsx(Text, {
163
+ asChild: true,
164
+ consumeCss: true,
165
+ textStyle: "heading.small",
166
+ children: /*#__PURE__*/_jsx(InternalHeading, {
167
+ children: parse(title)
176
168
  })
177
169
  }), /*#__PURE__*/_jsx(StyledText, {
178
170
  textStyle: "body.xlarge",
179
171
  children: parse(description)
180
- }), !!url?.url && /*#__PURE__*/_jsx(MaybeLinkText, {
172
+ }), !!url?.url && /*#__PURE__*/_jsxs(LinkButton, {
181
173
  url: url.url,
182
174
  path: path,
183
- children: /*#__PURE__*/_jsxs(LinkText, {
184
- textStyle: "body.medium",
185
- children: [parse(url.text ?? ""), /*#__PURE__*/_jsx(ArrowRightLine, {})]
186
- })
175
+ children: [parse(url.text ?? ""), /*#__PURE__*/_jsx(ArrowRightLine, {})]
187
176
  })]
188
177
  }), imageSide !== "left" && imageComponent]
189
178
  })
@@ -13,9 +13,8 @@ import { CheckLine } from "@ndla/icons/editor";
13
13
  import { Button, Figure } from "@ndla/primitives";
14
14
  import { styled } from "@ndla/styled-system/jsx";
15
15
  import { copyTextToClipboard } from "@ndla/util";
16
+ import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
16
17
  import { CodeBlock, codeLanguageOptions } from "../CodeBlock";
17
-
18
- // TODO: We need an error state for this
19
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  const StyledFigCaption = styled("figcaption", {
21
20
  base: {
@@ -55,6 +54,11 @@ const CodeEmbed = _ref => {
55
54
  };
56
55
  }
57
56
  }, [isCopied]);
57
+ if (embed.status === "error") {
58
+ return /*#__PURE__*/_jsx(EmbedErrorPlaceholder, {
59
+ type: "code"
60
+ });
61
+ }
58
62
  return /*#__PURE__*/_jsxs(StyledFigure, {
59
63
  "data-embed-type": "code-block",
60
64
  children: [/*#__PURE__*/_jsx(StyledFigCaption, {
@@ -40,6 +40,7 @@ export const ConceptEmbed = _ref => {
40
40
  });
41
41
  }
42
42
  if (embed.status === "error") {
43
+ // TODO: This could be either concept or gloss. We don't know if it errors out. :)
43
44
  return /*#__PURE__*/_jsx(EmbedErrorPlaceholder, {
44
45
  type: "gloss"
45
46
  });
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { AlertLine } from "@ndla/icons/common";
9
+ import { Report } from "@ndla/icons/common";
10
10
  import { Figure } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
12
  import { EmbedByline } from "../LicenseByline";
@@ -16,16 +16,15 @@ const ErrorPlaceholder = styled("div", {
16
16
  display: "flex",
17
17
  alignItems: "center",
18
18
  justifyContent: "center",
19
- backgroundColor: "surface.disabled",
19
+ background: "background.subtle",
20
20
  height: "surface.xsmall",
21
+ border: "1px solid",
22
+ borderColor: "stroke.default",
21
23
  borderRadius: "xsmall",
22
24
  "& svg": {
23
- fill: "text.subtle",
24
- height: "90%",
25
- width: "90%"
26
- },
27
- "&[data-embed-type='audio']": {
28
- height: "surface.3xsmall"
25
+ height: "5xlarge",
26
+ width: "5xlarge",
27
+ fill: "stroke.default"
29
28
  }
30
29
  }
31
30
  });
@@ -49,7 +48,7 @@ const EmbedErrorPlaceholder = _ref => {
49
48
  "data-embed-type": type,
50
49
  children: [children ?? /*#__PURE__*/_jsx(ErrorPlaceholder, {
51
50
  "data-embed-type": type,
52
- children: /*#__PURE__*/_jsx(AlertLine, {})
51
+ children: /*#__PURE__*/_jsx(Report, {})
53
52
  }), /*#__PURE__*/_jsx(EmbedByline, {
54
53
  error: true,
55
54
  type: type
@@ -6,7 +6,5 @@
6
6
  *
7
7
  */
8
8
 
9
- import LayoutItem from "./LayoutItem";
10
9
  export { default as OneColumn } from "./OneColumn";
11
- export { default as PageContainer } from "./PageContainer";
12
- export default LayoutItem;
10
+ export { default as PageContainer } from "./PageContainer";
package/es/index.js CHANGED
@@ -30,12 +30,11 @@ export { default as messagesSE } from "./locale/messages-se";
30
30
  export { default as messagesSMA } from "./locale/messages-sma";
31
31
  export { default as Breadcrumb, HomeBreadcrumb } from "./Breadcrumb";
32
32
  export { i18nInstance, formatNestedMessages, useTagsInputTranslations, useTagSelectorTranslations, useComboboxTranslations, usePaginationTranslations, useAudioSearchTranslations, useImageSearchTranslations, useVideoSearchTranslations } from "./i18n";
33
- export { default as LayoutItem, OneColumn, PageContainer } from "./Layout";
33
+ export { OneColumn, PageContainer } from "./Layout";
34
34
  export { default as ContentTypeBadge, SubjectMaterialBadge, TasksAndActivitiesBadge, AssessmentResourcesBadge, LearningPathBadge, SubjectBadge, SourceMaterialBadge, ConceptBadge } from "./ContentTypeBadge";
35
35
  export { ContentTypeBadge as ContentTypeBadgeNew, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadgeNew";
36
36
  export { default as CopyParagraphButton } from "./CopyParagraphButton";
37
37
  export { TagSelectorRoot, TagSelectorLabel, TagSelectorItemInput, TagSelectorTrigger, TagSelectorControl, TagSelectorClearTrigger, TagSelectorInputBase, TagSelectorInput } from "./TagSelector/TagSelector";
38
- export { TreeStructure } from "./TreeStructure";
39
38
  export { BlogPostV2 } from "./BlogPost";
40
39
  export { KeyFigure } from "./KeyFigure";
41
40
  export { ContactBlock, contactBlockBackgrounds } from "./ContactBlock";
@@ -1393,7 +1393,8 @@ const messages = {
1393
1393
  h5p: "H5P",
1394
1394
  external: "External resource",
1395
1395
  gloss: "Gloss",
1396
- copyright: "Text"
1396
+ copyright: "Text",
1397
+ code: "Code block"
1397
1398
  }
1398
1399
  },
1399
1400
  gloss: {
@@ -1393,7 +1393,8 @@ const messages = {
1393
1393
  h5p: "H5P",
1394
1394
  external: "Ekstern ressurs",
1395
1395
  gloss: "Glose",
1396
- copyright: "Tekst"
1396
+ copyright: "Tekst",
1397
+ code: "Kodeblokk"
1397
1398
  }
1398
1399
  },
1399
1400
  gloss: {
@@ -1393,7 +1393,8 @@ const messages = {
1393
1393
  h5p: "H5P",
1394
1394
  external: "Ekstern ressurs",
1395
1395
  gloss: "Glose",
1396
- copyright: "Tekst"
1396
+ copyright: "Tekst",
1397
+ code: "Kodeblokk"
1397
1398
  }
1398
1399
  },
1399
1400
  gloss: {
@@ -1393,7 +1393,8 @@ const messages = {
1393
1393
  h5p: "H5P",
1394
1394
  external: "Olgguldas resursa",
1395
1395
  gloss: "Glose",
1396
- copyright: "Tekst"
1396
+ copyright: "Tekst",
1397
+ code: "Kodeblokk"
1397
1398
  }
1398
1399
  },
1399
1400
  gloss: {
@@ -1393,7 +1393,8 @@ const messages = {
1393
1393
  h5p: "H5P",
1394
1394
  external: "Ekstern ressurs",
1395
1395
  gloss: "Glosa",
1396
- copyright: "Tekst"
1396
+ copyright: "Tekst",
1397
+ code: "Kodeblokk"
1397
1398
  }
1398
1399
  },
1399
1400
  gloss: {
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
+ import { CampaignBlockEmbedData } from "@ndla/types-embed";
8
9
  import { HeadingLevel } from "../types";
9
10
  interface Image {
10
11
  src: string;
@@ -19,9 +20,10 @@ interface Props {
19
20
  text?: string;
20
21
  };
21
22
  image?: Image;
22
- imageSide?: "left" | "right";
23
+ imageSide?: CampaignBlockEmbedData["imageSide"];
23
24
  className?: string;
24
25
  path?: string;
26
+ background?: CampaignBlockEmbedData["background"];
25
27
  }
26
- declare const CampaignBlock: ({ title, image, imageSide, description, headingLevel: InternalHeading, url, path, className, }: Props) => import("react/jsx-runtime").JSX.Element;
28
+ declare const CampaignBlock: ({ title, image, imageSide, description, headingLevel: InternalHeading, url, path, className, background, }: Props) => import("react/jsx-runtime").JSX.Element;
27
29
  export default CampaignBlock;