@ndla/ui 56.0.166-alpha.0 → 56.0.168-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 (161) hide show
  1. package/README.md +1 -11
  2. package/dist/panda.buildinfo.json +9 -9
  3. package/dist/styles.css +38 -36
  4. package/es/AnchorHeading/AnchorHeading.mjs +43 -0
  5. package/es/AnchorHeading/AnchorHeading.mjs.map +1 -0
  6. package/es/CodeBlock/codeLanguageOptions.mjs.map +1 -1
  7. package/es/ContactBlock/ContactBlock.mjs.map +1 -1
  8. package/es/ContentTypeBadge/ContentTypeBadge.mjs.map +1 -1
  9. package/es/Embed/ImageEmbed.mjs.map +1 -1
  10. package/es/Grid/Grid.mjs +2 -2
  11. package/es/Grid/Grid.mjs.map +1 -1
  12. package/es/_virtual/rolldown_runtime.mjs +2 -2
  13. package/es/index.mjs +2 -2
  14. package/es/locale/messages-en.mjs +1 -0
  15. package/es/locale/messages-en.mjs.map +1 -1
  16. package/es/locale/messages-nb.mjs +1 -0
  17. package/es/locale/messages-nb.mjs.map +1 -1
  18. package/es/locale/messages-nn.mjs +1 -0
  19. package/es/locale/messages-nn.mjs.map +1 -1
  20. package/es/locale/messages-se.mjs +1 -0
  21. package/es/locale/messages-se.mjs.map +1 -1
  22. package/es/model/ContentType.mjs.map +1 -1
  23. package/es/model/SubjectCategories.mjs +2 -2
  24. package/es/model/SubjectTypes.mjs +2 -2
  25. package/es/model/WordClass.mjs +2 -2
  26. package/lib/{CopyParagraphButton/CopyParagraphButton.d.ts → AnchorHeading/AnchorHeading.d.ts} +1 -1
  27. package/lib/AnchorHeading/AnchorHeading.js +44 -0
  28. package/lib/AnchorHeading/AnchorHeading.js.map +1 -0
  29. package/lib/Article/Article.js +14 -14
  30. package/lib/Article/Article.js.map +1 -1
  31. package/lib/Article/ArticleByline.js +13 -13
  32. package/lib/Article/ArticleByline.js.map +1 -1
  33. package/lib/Article/ArticleFootNotes.js +5 -5
  34. package/lib/Article/ArticleFootNotes.js.map +1 -1
  35. package/lib/Article/BadgesContainer.js +2 -2
  36. package/lib/Article/BadgesContainer.js.map +1 -1
  37. package/lib/AudioPlayer/AudioPlayer.js +16 -16
  38. package/lib/AudioPlayer/AudioPlayer.js.map +1 -1
  39. package/lib/AudioPlayer/Controls.js +35 -35
  40. package/lib/AudioPlayer/Controls.js.map +1 -1
  41. package/lib/AudioPlayer/SpeechControl.js +4 -4
  42. package/lib/AudioPlayer/SpeechControl.js.map +1 -1
  43. package/lib/Breadcrumb/Breadcrumb.js +2 -2
  44. package/lib/Breadcrumb/Breadcrumb.js.map +1 -1
  45. package/lib/Breadcrumb/BreadcrumbItem.js +2 -2
  46. package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -1
  47. package/lib/Breadcrumb/HomeBreadcrumb.js +8 -8
  48. package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -1
  49. package/lib/CampaignBlock/CampaignBlock.js +12 -12
  50. package/lib/CampaignBlock/CampaignBlock.js.map +1 -1
  51. package/lib/CodeBlock/CodeBlock.js +4 -4
  52. package/lib/CodeBlock/CodeBlock.js.map +1 -1
  53. package/lib/CodeBlock/codeLanguageOptions.js.map +1 -1
  54. package/lib/Concept/Concept.js +4 -4
  55. package/lib/Concept/Concept.js.map +1 -1
  56. package/lib/ContactBlock/ContactBlock.js +12 -12
  57. package/lib/ContactBlock/ContactBlock.js.map +1 -1
  58. package/lib/ContentTypeBadge/ContentTypeBadge.js +2 -2
  59. package/lib/ContentTypeBadge/ContentTypeBadge.js.map +1 -1
  60. package/lib/Embed/AudioEmbed.js +3 -3
  61. package/lib/Embed/AudioEmbed.js.map +1 -1
  62. package/lib/Embed/BrightcoveEmbed.js +5 -5
  63. package/lib/Embed/BrightcoveEmbed.js.map +1 -1
  64. package/lib/Embed/CodeEmbed.js +7 -7
  65. package/lib/Embed/CodeEmbed.js.map +1 -1
  66. package/lib/Embed/ConceptEmbed.js +7 -7
  67. package/lib/Embed/ConceptEmbed.js.map +1 -1
  68. package/lib/Embed/ConceptInlineTriggerButton.js +2 -2
  69. package/lib/Embed/ConceptInlineTriggerButton.js.map +1 -1
  70. package/lib/Embed/ContentLinkEmbed.js +2 -2
  71. package/lib/Embed/CopyrightEmbed.js +2 -2
  72. package/lib/Embed/CopyrightEmbed.js.map +1 -1
  73. package/lib/Embed/EmbedErrorPlaceholder.js +6 -6
  74. package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -1
  75. package/lib/Embed/EmbedWrapper.js +6 -6
  76. package/lib/Embed/EmbedWrapper.js.map +1 -1
  77. package/lib/Embed/ExternalEmbed.js +4 -4
  78. package/lib/Embed/ExternalEmbed.js.map +1 -1
  79. package/lib/Embed/FootnoteEmbed.js +2 -2
  80. package/lib/Embed/FootnoteEmbed.js.map +1 -1
  81. package/lib/Embed/GlossEmbed.js +9 -9
  82. package/lib/Embed/GlossEmbed.js.map +1 -1
  83. package/lib/Embed/H5pEmbed.js +4 -4
  84. package/lib/Embed/H5pEmbed.js.map +1 -1
  85. package/lib/Embed/IframeEmbed.js +4 -4
  86. package/lib/Embed/IframeEmbed.js.map +1 -1
  87. package/lib/Embed/ImageEmbed.js +8 -8
  88. package/lib/Embed/ImageEmbed.js.map +1 -1
  89. package/lib/Embed/InlineTriggerButton.js +4 -4
  90. package/lib/Embed/InlineTriggerButton.js.map +1 -1
  91. package/lib/Embed/UnknownEmbed.js +2 -2
  92. package/lib/Embed/UuDisclaimerEmbed.js +11 -11
  93. package/lib/Embed/UuDisclaimerEmbed.js.map +1 -1
  94. package/lib/FactBox/FactBox.js +7 -7
  95. package/lib/FactBox/FactBox.js.map +1 -1
  96. package/lib/FileList/File.js +13 -13
  97. package/lib/FileList/File.js.map +1 -1
  98. package/lib/FileList/FileList.js +4 -4
  99. package/lib/FileList/FileList.js.map +1 -1
  100. package/lib/FileList/PdfFile.js +6 -6
  101. package/lib/FileList/PdfFile.js.map +1 -1
  102. package/lib/Gloss/Gloss.js +19 -19
  103. package/lib/Gloss/Gloss.js.map +1 -1
  104. package/lib/Gloss/GlossExample.js +6 -6
  105. package/lib/Gloss/GlossExample.js.map +1 -1
  106. package/lib/Grid/Grid.js +5 -5
  107. package/lib/Grid/Grid.js.map +1 -1
  108. package/lib/KeyFigure/KeyFigure.js +5 -5
  109. package/lib/KeyFigure/KeyFigure.js.map +1 -1
  110. package/lib/LicenseByline/EmbedByline.js +15 -15
  111. package/lib/LicenseByline/EmbedByline.js.map +1 -1
  112. package/lib/LicenseByline/LicenseLink.js +3 -3
  113. package/lib/LicenseByline/LicenseLink.js.map +1 -1
  114. package/lib/LinkBlock/LinkBlock.js +10 -10
  115. package/lib/LinkBlock/LinkBlock.js.map +1 -1
  116. package/lib/LinkBlock/LinkBlockSection.js +2 -2
  117. package/lib/LinkBlock/LinkBlockSection.js.map +1 -1
  118. package/lib/Pitch/Pitch.js +10 -10
  119. package/lib/Pitch/Pitch.js.map +1 -1
  120. package/lib/RelatedArticleList/RelatedArticleList.js +19 -19
  121. package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -1
  122. package/lib/ResourceBox/ResourceBox.js +13 -13
  123. package/lib/ResourceBox/ResourceBox.js.map +1 -1
  124. package/lib/TagSelector/TagSelector.js +22 -22
  125. package/lib/TagSelector/TagSelector.js.map +1 -1
  126. package/lib/ZendeskButton/ZendeskButton.js +2 -2
  127. package/lib/_virtual/rolldown_runtime.js +2 -2
  128. package/lib/index.d.ts +1 -1
  129. package/lib/index.js +6 -6
  130. package/lib/locale/messages-en.d.ts +1 -0
  131. package/lib/locale/messages-en.js +3 -2
  132. package/lib/locale/messages-en.js.map +1 -1
  133. package/lib/locale/messages-nb.d.ts +1 -0
  134. package/lib/locale/messages-nb.js +3 -2
  135. package/lib/locale/messages-nb.js.map +1 -1
  136. package/lib/locale/messages-nn.d.ts +1 -0
  137. package/lib/locale/messages-nn.js +3 -2
  138. package/lib/locale/messages-nn.js.map +1 -1
  139. package/lib/locale/messages-se.d.ts +1 -0
  140. package/lib/locale/messages-se.js +3 -2
  141. package/lib/locale/messages-se.js.map +1 -1
  142. package/lib/model/ContentType.js.map +1 -1
  143. package/lib/model/SubjectCategories.js +1 -1
  144. package/lib/model/SubjectTypes.js +1 -1
  145. package/lib/model/WordClass.js +1 -1
  146. package/lib/utils/licenseAttributes.js +2 -2
  147. package/lib/utils/licenseAttributes.js.map +1 -1
  148. package/package.json +10 -10
  149. package/src/AnchorHeading/AnchorHeading.tsx +60 -0
  150. package/src/Embed/UuDisclaimerEmbed.stories.tsx +8 -8
  151. package/src/Grid/Grid.tsx +4 -2
  152. package/src/index.ts +1 -1
  153. package/src/locale/messages-en.ts +1 -0
  154. package/src/locale/messages-nb.ts +1 -0
  155. package/src/locale/messages-nn.ts +1 -0
  156. package/src/locale/messages-se.ts +1 -0
  157. package/es/CopyParagraphButton/CopyParagraphButton.mjs +0 -69
  158. package/es/CopyParagraphButton/CopyParagraphButton.mjs.map +0 -1
  159. package/lib/CopyParagraphButton/CopyParagraphButton.js +0 -70
  160. package/lib/CopyParagraphButton/CopyParagraphButton.js.map +0 -1
  161. package/src/CopyParagraphButton/CopyParagraphButton.tsx +0 -87
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ndla-ui
1
+ # @ndla/ui
2
2
 
3
3
  Main UI component library for NDLA.
4
4
 
@@ -31,16 +31,6 @@ See: [package.json](package.json) for version requirements.
31
31
 
32
32
  **N.B!** Optional dependencies are required if you use `import {...} from '@ndla/ui'`.
33
33
 
34
- ## Usage
35
-
36
- ### Styling
37
-
38
- ```scss
39
- /* Your project's main .scss import file */
40
- @import "~@ndla/ui/scss/main"; // with webpack and sass-loader
41
- @import "../path/to/node_modules/ndla-ui/scss/main"; // direct reference
42
- ```
43
-
44
34
  ### Component Usage
45
35
 
46
36
  ```jsx
@@ -2,6 +2,12 @@
2
2
  "schemaVersion": "1.7.0",
3
3
  "styles": {
4
4
  "atomic": [
5
+ "position]___[value:absolute]___[cond:_before",
6
+ "marginInlineStart]___[value:-1em]___[cond:_before",
7
+ "content]___[value:\"#\"]___[cond:_before",
8
+ "visibility]___[value:hidden]___[cond:_before",
9
+ "textDecoration]___[value:underline]___[cond:_hover",
10
+ "visibility]___[value:visible]___[cond:_hover<___>tablet<___>_before",
5
11
  "background]___[value:background.default",
6
12
  "display]___[value:flex",
7
13
  "flexDirection]___[value:column",
@@ -147,7 +153,6 @@
147
153
  "flexDirection]___[value:row]___[cond:tablet",
148
154
  "zIndex]___[value:base",
149
155
  "content]___[value:\"\"]___[cond:_before",
150
- "position]___[value:absolute]___[cond:_before",
151
156
  "top]___[value:-60px]___[cond:_before",
152
157
  "left]___[value:-50px]___[cond:_before",
153
158
  "right]___[value:0]___[cond:_before",
@@ -174,14 +179,6 @@
174
179
  "width]___[value:surface.xsmall",
175
180
  "height]___[value:surface.xsmall",
176
181
  "fontFamily]___[value:serif",
177
- "opacity]___[value:1]___[cond:_hover<___>& [data-copy-button]",
178
- "cursor]___[value:pointer]___[cond:_hover<___>& [data-copy-button]",
179
- "position]___[value:absolute",
180
- "left]___[value:-xxlarge",
181
- "top]___[value:-4xsmall",
182
- "opacity]___[value:0",
183
- "cursor]___[value:pointer",
184
- "opacity]___[value:1]___[cond:&:focus, &:focus-visible, &:active",
185
182
  "clear]___[value:both",
186
183
  "marginBlockStart]___[value:3xsmall",
187
184
  "border]___[value:0",
@@ -198,6 +195,7 @@
198
195
  "borderColor]___[value:stroke.hover",
199
196
  "paddingBlockStart]___[value:5xsmall",
200
197
  "width]___[value:fit-content",
198
+ "cursor]___[value:pointer",
201
199
  "borderColor]___[value:text.link]___[cond:_hover",
202
200
  "background]___[value:surface.actionSubtle.hover]___[cond:_hover",
203
201
  "borderColor]___[value:text.link]___[cond:_active",
@@ -228,6 +226,7 @@
228
226
  "background]___[value:background.default]___[cond:_hover<___>& [data-byline-button]",
229
227
  "transform]___[value:scale(1.2)]___[cond:_hover<___>& button[data-expanded]",
230
228
  "transform]___[value:rotate(-45deg)]___[cond:& button[data-expanded='true']<___>& svg",
229
+ "position]___[value:absolute",
231
230
  "padding]___[value:0",
232
231
  "top]___[value:xsmall",
233
232
  "right]___[value:xsmall",
@@ -308,6 +307,7 @@
308
307
  "gridTemplateColumns]___[value:repeat(4, minmax(0, 1fr))]___[cond:desktop",
309
308
  "borderColor]___[value:surface.brand.2",
310
309
  "outline]___[value:1px solid",
310
+ "outlineColor]___[value:stroke.default",
311
311
  "paddingBlock]___[value:xxlarge]___[cond:&:not(:has(> img))",
312
312
  "width]___[value:surface.3xsmall",
313
313
  "textStyle]___[value:heading.large",
package/dist/styles.css CHANGED
@@ -477,18 +477,6 @@
477
477
  font-family: var(--fonts-serif);
478
478
  }
479
479
 
480
- .pos_absolute {
481
- position: absolute;
482
- }
483
-
484
- .op_0 {
485
- opacity: 0;
486
- }
487
-
488
- .cursor_pointer {
489
- cursor: pointer;
490
- }
491
-
492
480
  .clear_both {
493
481
  clear: both;
494
482
  }
@@ -505,6 +493,10 @@
505
493
  padding-block-start: var(--spacing-5xsmall);
506
494
  }
507
495
 
496
+ .cursor_pointer {
497
+ cursor: pointer;
498
+ }
499
+
508
500
  .mbe_xsmall {
509
501
  margin-block-end: var(--spacing-xsmall);
510
502
  }
@@ -513,6 +505,10 @@
513
505
  z-index: var(--z-index-docked);
514
506
  }
515
507
 
508
+ .pos_absolute {
509
+ position: absolute;
510
+ }
511
+
516
512
  .trs-prop_transform\,_background-color\,_color {
517
513
  --transition-prop: transform, background-color, color;
518
514
  transition-property: transform, background-color, color;
@@ -595,6 +591,10 @@
595
591
  grid-template-columns: repeat(2, minmax(0, 1fr));
596
592
  }
597
593
 
594
+ .ring-c_stroke\.default {
595
+ outline-color: var(--colors-stroke-default);
596
+ }
597
+
598
598
  .c_text\.subtle {
599
599
  color: var(--colors-text-subtle);
600
600
  }
@@ -715,14 +715,6 @@
715
715
  height: var(--sizes-surface-xsmall);
716
716
  }
717
717
 
718
- .left_-xxlarge {
719
- left: calc(var(--spacing-xxlarge) * -1);
720
- }
721
-
722
- .top_-4xsmall {
723
- top: calc(var(--spacing-4xsmall) * -1);
724
- }
725
-
726
718
  .h_auto {
727
719
  height: auto;
728
720
  }
@@ -807,6 +799,22 @@
807
799
  text-decoration: underline;
808
800
  }
809
801
 
802
+ .before\:pos_absolute::before {
803
+ position: absolute;
804
+ }
805
+
806
+ .before\:ms_-1em::before {
807
+ margin-inline-start: -1em;
808
+ }
809
+
810
+ .before\:content_\"\#\"::before {
811
+ content: "#";
812
+ }
813
+
814
+ .before\:vis_hidden::before {
815
+ visibility: hidden;
816
+ }
817
+
810
818
  .\[\&_mjx-stretchy-v_\>_mjx-ext_\>_mjx-c\]\:trf_scaleY\(100\)_translateY\(0\.075em\) mjx-stretchy-v > mjx-ext > mjx-c {
811
819
  transform: scaleY(100) translateY(0.075em);
812
820
  }
@@ -859,10 +867,6 @@
859
867
  content: "";
860
868
  }
861
869
 
862
- .before\:pos_absolute::before {
863
- position: absolute;
864
- }
865
-
866
870
  .before\:trf_rotate\(-4deg\)::before {
867
871
  transform: rotate(-4deg);
868
872
  }
@@ -1087,14 +1091,14 @@
1087
1091
  border-radius: 0;
1088
1092
  }
1089
1093
 
1090
- .\[\&\:focus\,_\&\:focus-visible\,_\&\:active\]\:op_1:focus,.\[\&\:focus\,_\&\:focus-visible\,_\&\:active\]\:op_1:focus-visible,.\[\&\:focus\,_\&\:focus-visible\,_\&\:active\]\:op_1:active {
1091
- opacity: 1;
1092
- }
1093
-
1094
1094
  .hover\:bg_surface\.actionSubtle\.hover:is(:hover, [data-hover]) {
1095
1095
  background: var(--colors-surface-action-subtle-hover);
1096
1096
  }
1097
1097
 
1098
+ .hover\:td_underline:is(:hover, [data-hover]) {
1099
+ text-decoration: underline;
1100
+ }
1101
+
1098
1102
  .hover\:td_none:is(:hover, [data-hover]) {
1099
1103
  text-decoration: none;
1100
1104
  }
@@ -1179,14 +1183,6 @@
1179
1183
  text-decoration: none;
1180
1184
  }
1181
1185
 
1182
- .hover\:\[\&_\[data-copy-button\]\]\:op_1:is(:hover, [data-hover]) [data-copy-button] {
1183
- opacity: 1;
1184
- }
1185
-
1186
- .hover\:\[\&_\[data-copy-button\]\]\:cursor_pointer:is(:hover, [data-hover]) [data-copy-button] {
1187
- cursor: pointer;
1188
- }
1189
-
1190
1186
  .hover\:\[\&_button\[data-expanded\]\]\:trf_scale\(1\.2\):is(:hover, [data-hover]) button[data-expanded] {
1191
1187
  transform: scale(1.2);
1192
1188
  }
@@ -1273,6 +1269,12 @@
1273
1269
  .\[\&\[data-has-image\=\'true\'\]\]\:tablet\:px_medium[data-has-image='true'] {
1274
1270
  padding-inline: var(--spacing-medium);
1275
1271
  }
1272
+ }
1273
+
1274
+ @media screen and (min-width: 37.5625rem) {
1275
+ .hover\:tablet\:before\:vis_visible:is(:hover, [data-hover])::before {
1276
+ visibility: visible;
1277
+ }
1276
1278
  }
1277
1279
 
1278
1280
  @media screen and (min-width: 37.5625rem) and (max-width: 61.31rem) {
@@ -0,0 +1,43 @@
1
+ import { useMemo } from "react";
2
+ import { styled } from "@ndla/styled-system/jsx";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/AnchorHeading/AnchorHeading.tsx
6
+ /**
7
+ * Copyright (c) 2021-present, NDLA.
8
+ *
9
+ * This source code is licensed under the GPLv3 license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ *
12
+ */
13
+ const StyledAnchor = styled("a", { base: {
14
+ _before: {
15
+ position: "absolute",
16
+ marginInlineStart: "-1em",
17
+ content: "\"#\"",
18
+ visibility: "hidden"
19
+ },
20
+ _hover: {
21
+ textDecoration: "underline",
22
+ tablet: { _before: { visibility: "visible" } }
23
+ }
24
+ } });
25
+ function slugifyUnicode(input) {
26
+ return input.trim().toLowerCase().normalize("NFKC").replace(/[^\p{Letter}\p{Number}]+/gu, "-").replace(/^-+|-+$/g, "");
27
+ }
28
+ const AnchorHeading = ({ children, copyText, lang }) => {
29
+ const slug = useMemo(() => slugifyUnicode(copyText.replace(/ /g, "_")), [copyText]);
30
+ return /* @__PURE__ */ jsx("h2", {
31
+ id: slug,
32
+ lang,
33
+ tabIndex: -1,
34
+ children: /* @__PURE__ */ jsx(StyledAnchor, {
35
+ href: `#${encodeURIComponent(slug)}`,
36
+ children
37
+ })
38
+ });
39
+ };
40
+
41
+ //#endregion
42
+ export { AnchorHeading };
43
+ //# sourceMappingURL=AnchorHeading.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnchorHeading.mjs","names":[],"sources":["../../src/AnchorHeading/AnchorHeading.tsx"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ReactNode, useMemo } from \"react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\nconst StyledAnchor = styled(\"a\", {\n base: {\n _before: {\n position: \"absolute\",\n marginInlineStart: \"-1em\",\n content: '\"#\"',\n visibility: \"hidden\",\n },\n _hover: {\n textDecoration: \"underline\",\n tablet: {\n _before: {\n visibility: \"visible\",\n },\n },\n },\n },\n});\n\ninterface Props {\n // What to render within the h2\n children: ReactNode;\n copyText: string;\n lang?: string;\n}\n\nfunction slugifyUnicode(input: string) {\n return (\n input\n .trim()\n .toLowerCase()\n // Normalize to reduce weird Unicode equivalences\n .normalize(\"NFKC\")\n // Keep any Unicode letters/numbers; replace everything else with \"-\"\n .replace(/[^\\p{Letter}\\p{Number}]+/gu, \"-\")\n // Trim leading/trailing \"-\"\n .replace(/^-+|-+$/g, \"\")\n );\n}\n\nexport const AnchorHeading = ({ children, copyText, lang }: Props) => {\n const slug = useMemo(() => slugifyUnicode(copyText.replace(/ /g, \"_\")), [copyText]);\n\n return (\n <h2 id={slug} lang={lang} tabIndex={-1}>\n <StyledAnchor href={`#${encodeURIComponent(slug)}`}>{children}</StyledAnchor>\n </h2>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,eAAe,OAAO,KAAK,EAC/B,MAAM;CACJ,SAAS;EACP,UAAU;EACV,mBAAmB;EACnB,SAAS;EACT,YAAY;EACb;CACD,QAAQ;EACN,gBAAgB;EAChB,QAAQ,EACN,SAAS,EACP,YAAY,WACb,EACF;EACF;CACF,EACF,CAAC;AASF,SAAS,eAAe,OAAe;AACrC,QACE,MACG,MAAM,CACN,aAAa,CAEb,UAAU,OAAO,CAEjB,QAAQ,8BAA8B,IAAI,CAE1C,QAAQ,YAAY,GAAG;;AAI9B,MAAa,iBAAiB,EAAE,UAAU,UAAU,WAAkB;CACpE,MAAM,OAAO,cAAc,eAAe,SAAS,QAAQ,MAAM,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;AAEnF,QACE,oBAAC;EAAG,IAAI;EAAY;EAAM,UAAU;YAClC,oBAAC;GAAa,MAAM,IAAI,mBAAmB,KAAK;GAAK;IAAwB;GAC1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"codeLanguageOptions.mjs","names":["codeLanguageOptions: Array<ICodeLangugeOption>"],"sources":["../../src/CodeBlock/codeLanguageOptions.ts"],"sourcesContent":["/**\n * Copyright (c) 2019-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const codeLanguageOptions: Array<ICodeLangugeOption> = [\n {\n title: \"Bash\",\n format: \"bash\",\n },\n {\n title: \"C\",\n format: \"c\",\n },\n {\n title: \"CSharp\",\n format: \"csharp\",\n },\n {\n title: \"CSS\",\n format: \"css\",\n },\n {\n title: \"Diff\",\n format: \"diff\",\n },\n {\n title: \"HTML\",\n format: \"markup\",\n },\n {\n title: \"Ini\",\n format: \"ini\",\n },\n {\n title: \"Java\",\n format: \"java\",\n },\n {\n title: \"Javascript\",\n format: \"js\",\n },\n {\n title: \"JSON\",\n format: \"json\",\n },\n {\n title: \"JSX\",\n format: \"jsx\",\n },\n {\n title: \"Kotlin\",\n format: \"kotlin\",\n },\n {\n title: \"LUA\",\n format: \"lua\",\n },\n {\n title: \"Markdown\",\n format: \"markdown\",\n },\n {\n title: \"Matlab\",\n format: \"matlab\",\n },\n {\n title: \"NSIS\",\n format: \"nsis\",\n },\n {\n title: \"PHP\",\n format: \"php\",\n },\n {\n title: \"Powershell\",\n format: \"powershell\",\n },\n {\n title: \"Python\",\n format: \"python\",\n },\n {\n title: \"Ruby\",\n format: \"ruby\",\n },\n {\n title: \"Rust\",\n format: \"rust\",\n },\n {\n title: \"SQL\",\n format: \"sql\",\n },\n {\n title: \"Text\",\n format: \"text\",\n },\n {\n title: \"VHDL\",\n format: \"vhdl\",\n },\n {\n title: \"XML\",\n format: \"xml\",\n },\n];\n\nexport interface ICodeLangugeOption {\n title: string;\n format: string;\n}\n"],"mappings":";;;;;;;;AAQA,MAAaA,sBAAiD;CAC5D;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACF"}
1
+ {"version":3,"file":"codeLanguageOptions.mjs","names":[],"sources":["../../src/CodeBlock/codeLanguageOptions.ts"],"sourcesContent":["/**\n * Copyright (c) 2019-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const codeLanguageOptions: Array<ICodeLangugeOption> = [\n {\n title: \"Bash\",\n format: \"bash\",\n },\n {\n title: \"C\",\n format: \"c\",\n },\n {\n title: \"CSharp\",\n format: \"csharp\",\n },\n {\n title: \"CSS\",\n format: \"css\",\n },\n {\n title: \"Diff\",\n format: \"diff\",\n },\n {\n title: \"HTML\",\n format: \"markup\",\n },\n {\n title: \"Ini\",\n format: \"ini\",\n },\n {\n title: \"Java\",\n format: \"java\",\n },\n {\n title: \"Javascript\",\n format: \"js\",\n },\n {\n title: \"JSON\",\n format: \"json\",\n },\n {\n title: \"JSX\",\n format: \"jsx\",\n },\n {\n title: \"Kotlin\",\n format: \"kotlin\",\n },\n {\n title: \"LUA\",\n format: \"lua\",\n },\n {\n title: \"Markdown\",\n format: \"markdown\",\n },\n {\n title: \"Matlab\",\n format: \"matlab\",\n },\n {\n title: \"NSIS\",\n format: \"nsis\",\n },\n {\n title: \"PHP\",\n format: \"php\",\n },\n {\n title: \"Powershell\",\n format: \"powershell\",\n },\n {\n title: \"Python\",\n format: \"python\",\n },\n {\n title: \"Ruby\",\n format: \"ruby\",\n },\n {\n title: \"Rust\",\n format: \"rust\",\n },\n {\n title: \"SQL\",\n format: \"sql\",\n },\n {\n title: \"Text\",\n format: \"text\",\n },\n {\n title: \"VHDL\",\n format: \"vhdl\",\n },\n {\n title: \"XML\",\n format: \"xml\",\n },\n];\n\nexport interface ICodeLangugeOption {\n title: string;\n format: string;\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,sBAAiD;CAC5D;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACD;EACE,OAAO;EACP,QAAQ;EACT;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContactBlock.mjs","names":["BackgroundVariant: Record<ContactBlockBackground, SystemStyleObject>"],"sources":["../../src/ContactBlock/ContactBlock.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport { Text } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { SystemStyleObject } from \"@ndla/styled-system/types\";\nimport type { ImageMetaInformationV3DTO } from \"@ndla/types-backend/image-api\";\nimport { LicenseContainerContent } from \"../LicenseByline/EmbedByline\";\n\nexport type ContactBlockBackground = \"strong\" | \"moderate\" | \"subtle\";\n\nconst BackgroundVariant: Record<ContactBlockBackground, SystemStyleObject> = {\n strong: { _before: { backgroundColor: \"surface.brand.3\" } },\n moderate: { _before: { backgroundColor: \"surface.brand.3.moderate\" } },\n subtle: { _before: { backgroundColor: \"surface.brand.3.subtle\" } },\n};\n\nexport const contactBlockBackgrounds = Object.keys(BackgroundVariant) as ContactBlockBackground[];\n\nconst StyledWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n minWidth: \"surface.xxsmall\",\n padding: \"medium\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n boxShadow: \"full\",\n border: \"1px solid\",\n gap: \"medium\",\n position: \"relative\",\n borderColor: \"stroke.default\",\n borderRadius: \"xsmall\",\n overflow: \"hidden\",\n background: \"surface.default\",\n flexDirection: \"column-reverse\",\n tablet: {\n alignItems: \"unset\",\n flexDirection: \"row\",\n },\n },\n});\n\nconst EmailLink = styled(\"a\", {\n base: {\n color: \"text.default\",\n textDecoration: \"underline\",\n _hover: { textDecoration: \"none\" },\n _focusVisible: { textDecoration: \"none\" },\n },\n});\n\nconst HeaderWrapper = styled(\"div\", {\n base: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n zIndex: \"base\",\n _before: {\n content: '\"\"',\n position: \"absolute\",\n top: \"-60px\",\n left: \"-50px\",\n right: \"0\",\n bottom: \"0\",\n height: \"calc(100% + 50px)\",\n width: \"surface.3xlarge\",\n transform: \"rotate(-4deg)\",\n zIndex: \"hide\",\n },\n },\n variants: {\n variant: BackgroundVariant,\n imageExists: {\n true: {\n tabletDown: {\n _before: {\n display: \"none\",\n },\n },\n },\n },\n },\n});\n\nconst ImageWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n gap: \"xxsmall\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n flexDirection: \"column\",\n zIndex: \"base\",\n tabletDown: {\n _before: {\n content: '\"\"',\n position: \"absolute\",\n top: \"-50px\",\n left: \"-50px\",\n right: \"0\",\n bottom: \"0\",\n height: \"surface.xxsmall\",\n width: \"surface.3xlarge\",\n transform: \"rotate(-4deg)\",\n zIndex: \"hide\",\n },\n },\n },\n variants: {\n variant: BackgroundVariant,\n },\n});\n\nconst StyledImage = styled(\"img\", {\n base: {\n borderRadius: \"xsmall\",\n width: \"surface.xsmall\",\n height: \"surface.xsmall\",\n objectFit: \"cover\",\n },\n});\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"medium\",\n flex: \"1\",\n width: \"100%\",\n },\n});\n\nconst StyledDescription = styled(Text, {\n base: {\n fontFamily: \"serif\",\n },\n});\n\ninterface Props {\n image?: ImageMetaInformationV3DTO;\n jobTitle: string;\n description: string;\n backgroundColor?: ContactBlockBackground;\n imageWidth?: number;\n name: string;\n email: string;\n embedAlt?: string;\n lang?: string;\n}\n\nexport const ContactBlock = ({\n image,\n jobTitle,\n description,\n name,\n email,\n embedAlt,\n lang,\n backgroundColor = \"strong\",\n}: Props) => {\n const { t } = useTranslation();\n return (\n <StyledWrapper data-embed-type=\"contact-block\">\n <ContentWrapper>\n <HeaderWrapper variant={backgroundColor} imageExists={!!image}>\n <Text lang={lang} fontWeight=\"bold\" textStyle=\"heading.small\">\n {name}\n </Text>\n <Text lang={lang}>{jobTitle}</Text>\n <Text>\n {`${t(\"email\")}: `}\n <EmailLink href={`mailto:${email}`}>{email}</EmailLink>\n </Text>\n </HeaderWrapper>\n <StyledDescription textStyle=\"body.large\">{description}</StyledDescription>\n </ContentWrapper>\n {!!image && (\n <ImageWrapper variant={backgroundColor}>\n <StyledImage\n alt={embedAlt !== undefined ? embedAlt : image.alttext.alttext}\n src={image.image.imageUrl}\n width={300}\n height={300}\n />\n <LicenseContainerContent type=\"image\" copyright={image.copyright} />\n </ImageWrapper>\n )}\n </StyledWrapper>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAMA,oBAAuE;CAC3E,QAAQ,EAAE,SAAS,EAAE,iBAAiB,mBAAmB,EAAE;CAC3D,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,OAAO,EAChC,MAAM;CACJ,cAAc;CACd,OAAO;CACP,QAAQ;CACR,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,MAAM;CACN,OAAO;CACR,EACF,CAAC;AAEF,MAAM,oBAAoB,OAAO,MAAM,EACrC,MAAM,EACJ,YAAY,SACb,EACF,CAAC;AAcF,MAAa,gBAAgB,EAC3B,OACA,UACA,aACA,MACA,OACA,UACA,MACA,kBAAkB,eACP;CACX,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC;EAAc,mBAAgB;aAC7B,qBAAC,6BACC,qBAAC;GAAc,SAAS;GAAiB,aAAa,CAAC,CAAC;;IACtD,oBAAC;KAAW;KAAM,YAAW;KAAO,WAAU;eAC3C;MACI;IACP,oBAAC;KAAW;eAAO;MAAgB;IACnC,qBAAC,mBACE,GAAG,EAAE,QAAQ,CAAC,KACf,oBAAC;KAAU,MAAM,UAAU;eAAU;MAAkB,IAClD;;IACO,EAChB,oBAAC;GAAkB,WAAU;aAAc;IAAgC,IAC5D,EAChB,CAAC,CAAC,SACD,qBAAC;GAAa,SAAS;cACrB,oBAAC;IACC,KAAK,aAAa,SAAY,WAAW,MAAM,QAAQ;IACvD,KAAK,MAAM,MAAM;IACjB,OAAO;IACP,QAAQ;KACR,EACF,oBAAC;IAAwB,MAAK;IAAQ,WAAW,MAAM;KAAa;IACvD;GAEH"}
1
+ {"version":3,"file":"ContactBlock.mjs","names":[],"sources":["../../src/ContactBlock/ContactBlock.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport { Text } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { SystemStyleObject } from \"@ndla/styled-system/types\";\nimport type { ImageMetaInformationV3DTO } from \"@ndla/types-backend/image-api\";\nimport { LicenseContainerContent } from \"../LicenseByline/EmbedByline\";\n\nexport type ContactBlockBackground = \"strong\" | \"moderate\" | \"subtle\";\n\nconst BackgroundVariant: Record<ContactBlockBackground, SystemStyleObject> = {\n strong: { _before: { backgroundColor: \"surface.brand.3\" } },\n moderate: { _before: { backgroundColor: \"surface.brand.3.moderate\" } },\n subtle: { _before: { backgroundColor: \"surface.brand.3.subtle\" } },\n};\n\nexport const contactBlockBackgrounds = Object.keys(BackgroundVariant) as ContactBlockBackground[];\n\nconst StyledWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n minWidth: \"surface.xxsmall\",\n padding: \"medium\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n boxShadow: \"full\",\n border: \"1px solid\",\n gap: \"medium\",\n position: \"relative\",\n borderColor: \"stroke.default\",\n borderRadius: \"xsmall\",\n overflow: \"hidden\",\n background: \"surface.default\",\n flexDirection: \"column-reverse\",\n tablet: {\n alignItems: \"unset\",\n flexDirection: \"row\",\n },\n },\n});\n\nconst EmailLink = styled(\"a\", {\n base: {\n color: \"text.default\",\n textDecoration: \"underline\",\n _hover: { textDecoration: \"none\" },\n _focusVisible: { textDecoration: \"none\" },\n },\n});\n\nconst HeaderWrapper = styled(\"div\", {\n base: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n zIndex: \"base\",\n _before: {\n content: '\"\"',\n position: \"absolute\",\n top: \"-60px\",\n left: \"-50px\",\n right: \"0\",\n bottom: \"0\",\n height: \"calc(100% + 50px)\",\n width: \"surface.3xlarge\",\n transform: \"rotate(-4deg)\",\n zIndex: \"hide\",\n },\n },\n variants: {\n variant: BackgroundVariant,\n imageExists: {\n true: {\n tabletDown: {\n _before: {\n display: \"none\",\n },\n },\n },\n },\n },\n});\n\nconst ImageWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n gap: \"xxsmall\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n flexDirection: \"column\",\n zIndex: \"base\",\n tabletDown: {\n _before: {\n content: '\"\"',\n position: \"absolute\",\n top: \"-50px\",\n left: \"-50px\",\n right: \"0\",\n bottom: \"0\",\n height: \"surface.xxsmall\",\n width: \"surface.3xlarge\",\n transform: \"rotate(-4deg)\",\n zIndex: \"hide\",\n },\n },\n },\n variants: {\n variant: BackgroundVariant,\n },\n});\n\nconst StyledImage = styled(\"img\", {\n base: {\n borderRadius: \"xsmall\",\n width: \"surface.xsmall\",\n height: \"surface.xsmall\",\n objectFit: \"cover\",\n },\n});\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"medium\",\n flex: \"1\",\n width: \"100%\",\n },\n});\n\nconst StyledDescription = styled(Text, {\n base: {\n fontFamily: \"serif\",\n },\n});\n\ninterface Props {\n image?: ImageMetaInformationV3DTO;\n jobTitle: string;\n description: string;\n backgroundColor?: ContactBlockBackground;\n imageWidth?: number;\n name: string;\n email: string;\n embedAlt?: string;\n lang?: string;\n}\n\nexport const ContactBlock = ({\n image,\n jobTitle,\n description,\n name,\n email,\n embedAlt,\n lang,\n backgroundColor = \"strong\",\n}: Props) => {\n const { t } = useTranslation();\n return (\n <StyledWrapper data-embed-type=\"contact-block\">\n <ContentWrapper>\n <HeaderWrapper variant={backgroundColor} imageExists={!!image}>\n <Text lang={lang} fontWeight=\"bold\" textStyle=\"heading.small\">\n {name}\n </Text>\n <Text lang={lang}>{jobTitle}</Text>\n <Text>\n {`${t(\"email\")}: `}\n <EmailLink href={`mailto:${email}`}>{email}</EmailLink>\n </Text>\n </HeaderWrapper>\n <StyledDescription textStyle=\"body.large\">{description}</StyledDescription>\n </ContentWrapper>\n {!!image && (\n <ImageWrapper variant={backgroundColor}>\n <StyledImage\n alt={embedAlt !== undefined ? embedAlt : image.alttext.alttext}\n src={image.image.imageUrl}\n width={300}\n height={300}\n />\n <LicenseContainerContent type=\"image\" copyright={image.copyright} />\n </ImageWrapper>\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O;GACP,QAAQ;GACR,QAAQ;GACR,OAAO;GACP,WAAW;GACX,QAAQ;GACT,EACF;EACF;CACD,UAAU,EACR,SAAS,mBACV;CACF,CAAC;AAEF,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,cAAc;CACd,OAAO;CACP,QAAQ;CACR,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,MAAM;CACN,OAAO;CACR,EACF,CAAC;AAEF,MAAM,oBAAoB,OAAO,MAAM,EACrC,MAAM,EACJ,YAAY,SACb,EACF,CAAC;AAcF,MAAa,gBAAgB,EAC3B,OACA,UACA,aACA,MACA,OACA,UACA,MACA,kBAAkB,eACP;CACX,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC;EAAc,mBAAgB;aAC7B,qBAAC,6BACC,qBAAC;GAAc,SAAS;GAAiB,aAAa,CAAC,CAAC;;IACtD,oBAAC;KAAW;KAAM,YAAW;KAAO,WAAU;eAC3C;MACI;IACP,oBAAC;KAAW;eAAO;MAAgB;IACnC,qBAAC,mBACE,GAAG,EAAE,QAAQ,CAAC,KACf,oBAAC;KAAU,MAAM,UAAU;eAAU;MAAkB,IAClD;;IACO,EAChB,oBAAC;GAAkB,WAAU;aAAc;IAAgC,IAC5D,EAChB,CAAC,CAAC,SACD,qBAAC;GAAa,SAAS;cACrB,oBAAC;IACC,KAAK,aAAa,SAAY,WAAW,MAAM,QAAQ;IACvD,KAAK,MAAM,MAAM;IACjB,OAAO;IACP,QAAQ;KACR,EACF,oBAAC;IAAwB,MAAK;IAAQ,WAAW,MAAM;KAAa;IACvD;GAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTypeBadge.mjs","names":["contentTypeToBadgeVariantMap: Record<ContentType, BadgeVariant>","contentTypes.SUBJECT_MATERIAL","contentTypes.TASKS_AND_ACTIVITIES","contentTypes.ASSESSMENT_RESOURCES","contentTypes.SUBJECT","contentTypes.SOURCE_MATERIAL","contentTypes.LEARNING_PATH","contentTypes.TOPIC","contentTypes.MULTIDISCIPLINARY","contentTypes.CONCEPT","contentTypes.EXTERNAL","contentTypes.IMAGE","contentTypes.AUDIO","contentTypes.PODCAST","contentTypes.VIDEO","contentTypes.MISSING","contentTypes.PODCAST_SERIES","contentTypes.GLOSS","contentTypes.PROGRAMME","contentTypes.FRONTPAGE_ARTICLE"],"sources":["../../src/ContentTypeBadge/ContentTypeBadge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Badge, type BadgeProps, type BadgeVariant } from \"@ndla/primitives\";\nimport * as contentTypes from \"../model/ContentType\";\n\nexport interface ContentTypeBadgeProps extends Omit<BadgeProps, \"colorTheme\"> {\n contentType: ContentType | undefined;\n}\n\nexport type StrictContentType =\n | typeof contentTypes.SUBJECT_MATERIAL\n | typeof contentTypes.TASKS_AND_ACTIVITIES\n | typeof contentTypes.ASSESSMENT_RESOURCES\n | typeof contentTypes.SUBJECT\n | typeof contentTypes.SOURCE_MATERIAL\n | typeof contentTypes.LEARNING_PATH\n | typeof contentTypes.TOPIC\n | typeof contentTypes.MULTIDISCIPLINARY\n | typeof contentTypes.CONCEPT\n | typeof contentTypes.EXTERNAL\n | typeof contentTypes.IMAGE\n | typeof contentTypes.AUDIO\n | typeof contentTypes.VIDEO\n | typeof contentTypes.MISSING\n | typeof contentTypes.PODCAST\n | typeof contentTypes.GLOSS\n | typeof contentTypes.PROGRAMME\n | typeof contentTypes.PODCAST_SERIES\n | typeof contentTypes.FRONTPAGE_ARTICLE;\n\nexport type ContentType =\n | StrictContentType\n // This allows for us to fallback to string without getting a ts error, while still keeping intellisense\n | (string & {});\n\nexport const contentTypeToBadgeVariantMap: Record<ContentType, BadgeVariant> = {\n [contentTypes.SUBJECT_MATERIAL]: \"brand1\",\n [contentTypes.TASKS_AND_ACTIVITIES]: \"brand2\",\n [contentTypes.ASSESSMENT_RESOURCES]: \"brand2\",\n [contentTypes.SUBJECT]: \"neutral\",\n [contentTypes.SOURCE_MATERIAL]: \"brand1\",\n [contentTypes.LEARNING_PATH]: \"brand3\",\n [contentTypes.TOPIC]: \"neutral\",\n [contentTypes.MULTIDISCIPLINARY]: \"neutral\",\n [contentTypes.CONCEPT]: \"brand1\",\n [contentTypes.EXTERNAL]: \"brand2\",\n [contentTypes.IMAGE]: \"brand1\",\n [contentTypes.AUDIO]: \"brand1\",\n [contentTypes.PODCAST]: \"brand1\",\n [contentTypes.VIDEO]: \"brand1\",\n [contentTypes.MISSING]: \"neutral\",\n [contentTypes.PODCAST_SERIES]: \"brand1\",\n [contentTypes.GLOSS]: \"brand1\",\n [contentTypes.PROGRAMME]: \"neutral\",\n [contentTypes.FRONTPAGE_ARTICLE]: \"brand2\",\n};\n\nexport const ContentTypeBadge = forwardRef<HTMLDivElement, ContentTypeBadgeProps>(\n ({ contentType, children, ...props }, ref) => {\n const { t } = useTranslation();\n return (\n <Badge\n colorTheme={contentTypeToBadgeVariantMap[contentType ?? \"missing\"] ?? contentTypeToBadgeVariantMap[\"missing\"]}\n {...props}\n ref={ref}\n >\n {children ?? t(`contentTypes.${contentType}`)}\n </Badge>\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;AA2CA,MAAaA,+BAAkE;EAC5EC,mBAAgC;EAChCC,uBAAoC;EACpCC,uBAAoC;EACpCC,UAAuB;EACvBC,kBAA+B;EAC/BC,gBAA6B;EAC7BC,QAAqB;EACrBC,oBAAiC;EACjCC,UAAuB;EACvBC,WAAwB;EACxBC,QAAqB;EACrBC,QAAqB;EACrBC,UAAuB;EACvBC,QAAqB;EACrBC,UAAuB;EACvBC,iBAA8B;EAC9BC,QAAqB;EACrBC,YAAyB;EACzBC,oBAAiC;CACnC;AAED,MAAa,mBAAmB,YAC7B,EAAE,aAAa,UAAU,GAAG,SAAS,QAAQ;CAC5C,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,oBAAC;EACC,YAAY,6BAA6B,eAAe,cAAc,6BAA6B;EACnG,GAAI;EACC;YAEJ,YAAY,EAAE,gBAAgB,cAAc;GACvC;EAGb"}
1
+ {"version":3,"file":"ContentTypeBadge.mjs","names":["contentTypes.SUBJECT_MATERIAL","contentTypes.TASKS_AND_ACTIVITIES","contentTypes.ASSESSMENT_RESOURCES","contentTypes.SUBJECT","contentTypes.SOURCE_MATERIAL","contentTypes.LEARNING_PATH","contentTypes.TOPIC","contentTypes.MULTIDISCIPLINARY","contentTypes.CONCEPT","contentTypes.EXTERNAL","contentTypes.IMAGE","contentTypes.AUDIO","contentTypes.PODCAST","contentTypes.VIDEO","contentTypes.MISSING","contentTypes.PODCAST_SERIES","contentTypes.GLOSS","contentTypes.PROGRAMME","contentTypes.FRONTPAGE_ARTICLE"],"sources":["../../src/ContentTypeBadge/ContentTypeBadge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Badge, type BadgeProps, type BadgeVariant } from \"@ndla/primitives\";\nimport * as contentTypes from \"../model/ContentType\";\n\nexport interface ContentTypeBadgeProps extends Omit<BadgeProps, \"colorTheme\"> {\n contentType: ContentType | undefined;\n}\n\nexport type StrictContentType =\n | typeof contentTypes.SUBJECT_MATERIAL\n | typeof contentTypes.TASKS_AND_ACTIVITIES\n | typeof contentTypes.ASSESSMENT_RESOURCES\n | typeof contentTypes.SUBJECT\n | typeof contentTypes.SOURCE_MATERIAL\n | typeof contentTypes.LEARNING_PATH\n | typeof contentTypes.TOPIC\n | typeof contentTypes.MULTIDISCIPLINARY\n | typeof contentTypes.CONCEPT\n | typeof contentTypes.EXTERNAL\n | typeof contentTypes.IMAGE\n | typeof contentTypes.AUDIO\n | typeof contentTypes.VIDEO\n | typeof contentTypes.MISSING\n | typeof contentTypes.PODCAST\n | typeof contentTypes.GLOSS\n | typeof contentTypes.PROGRAMME\n | typeof contentTypes.PODCAST_SERIES\n | typeof contentTypes.FRONTPAGE_ARTICLE;\n\nexport type ContentType =\n | StrictContentType\n // This allows for us to fallback to string without getting a ts error, while still keeping intellisense\n | (string & {});\n\nexport const contentTypeToBadgeVariantMap: Record<ContentType, BadgeVariant> = {\n [contentTypes.SUBJECT_MATERIAL]: \"brand1\",\n [contentTypes.TASKS_AND_ACTIVITIES]: \"brand2\",\n [contentTypes.ASSESSMENT_RESOURCES]: \"brand2\",\n [contentTypes.SUBJECT]: \"neutral\",\n [contentTypes.SOURCE_MATERIAL]: \"brand1\",\n [contentTypes.LEARNING_PATH]: \"brand3\",\n [contentTypes.TOPIC]: \"neutral\",\n [contentTypes.MULTIDISCIPLINARY]: \"neutral\",\n [contentTypes.CONCEPT]: \"brand1\",\n [contentTypes.EXTERNAL]: \"brand2\",\n [contentTypes.IMAGE]: \"brand1\",\n [contentTypes.AUDIO]: \"brand1\",\n [contentTypes.PODCAST]: \"brand1\",\n [contentTypes.VIDEO]: \"brand1\",\n [contentTypes.MISSING]: \"neutral\",\n [contentTypes.PODCAST_SERIES]: \"brand1\",\n [contentTypes.GLOSS]: \"brand1\",\n [contentTypes.PROGRAMME]: \"neutral\",\n [contentTypes.FRONTPAGE_ARTICLE]: \"brand2\",\n};\n\nexport const ContentTypeBadge = forwardRef<HTMLDivElement, ContentTypeBadgeProps>(\n ({ contentType, children, ...props }, ref) => {\n const { t } = useTranslation();\n return (\n <Badge\n colorTheme={contentTypeToBadgeVariantMap[contentType ?? \"missing\"] ?? contentTypeToBadgeVariantMap[\"missing\"]}\n {...props}\n ref={ref}\n >\n {children ?? t(`contentTypes.${contentType}`)}\n </Badge>\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;AA2CA,MAAa,+BAAkE;EAC5EA,mBAAgC;EAChCC,uBAAoC;EACpCC,uBAAoC;EACpCC,UAAuB;EACvBC,kBAA+B;EAC/BC,gBAA6B;EAC7BC,QAAqB;EACrBC,oBAAiC;EACjCC,UAAuB;EACvBC,WAAwB;EACxBC,QAAqB;EACrBC,QAAqB;EACrBC,UAAuB;EACvBC,QAAqB;EACrBC,UAAuB;EACvBC,iBAA8B;EAC9BC,QAAqB;EACrBC,YAAyB;EACzBC,oBAAiC;CACnC;AAED,MAAa,mBAAmB,YAC7B,EAAE,aAAa,UAAU,GAAG,SAAS,QAAQ;CAC5C,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,oBAAC;EACC,YAAY,6BAA6B,eAAe,cAAc,6BAA6B;EACnG,GAAI;EACC;YAEJ,YAAY,EAAE,gBAAgB,cAAc;GACvC;EAGb"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImageEmbed.mjs","names":["actualSize: FigureSize"],"sources":["../../src/Embed/ImageEmbed.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { type ReactNode, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { AddLine } from \"@ndla/icons\";\nimport { Figure, type FigureSize, type FigureVariantProps, Image } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { ImageEmbedData, ImageMetaData } from \"@ndla/types-embed\";\nimport { EmbedErrorPlaceholder } from \"./EmbedErrorPlaceholder\";\nimport type { RenderContext } from \"./types\";\nimport { EmbedByline } from \"../LicenseByline/EmbedByline\";\nimport { licenseAttributes } from \"../utils/licenseAttributes\";\n\ninterface Props {\n embed: ImageMetaData;\n previewAlt?: boolean;\n lang?: string;\n renderContext?: RenderContext;\n children?: ReactNode;\n}\n\nexport interface Author {\n name: string;\n type: string;\n}\n\nconst getFigureProps = (size?: string, float?: string): FigureVariantProps => {\n const actualFloat = float === \"left\" ? \"left\" : float === \"right\" ? \"right\" : undefined;\n const replacedSize = size?.replace(\"-hide-byline\", \"\") ?? \"full\";\n const actualSize: FigureSize = (replacedSize === \"fullwidth\" ? \"full\" : replacedSize) as FigureSize;\n return {\n float: actualFloat,\n // 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.\n size: actualSize === \"full\" && float ? \"medium\" : actualSize,\n };\n};\n\nconst getSizes = (size?: string, align?: string) => {\n if (align && size === \"full\") {\n return \"(min-width: 1024px) 512px, (min-width: 768px) 350px, 100vw\";\n }\n if (align && size === \"small\") {\n return \"(min-width: 1024px) 350px, (min-width: 768px) 180px, 100vw\";\n }\n if (align && size === \"xsmall\") {\n return \"(min-width: 1024px) 180px, (min-width: 768px) 180px, 100vw\";\n }\n return \"(min-width: 1024px) 1024px, 100vw\";\n};\n\nexport const getFocalPoint = (data: ImageEmbedData) => {\n const focalX = Number.parseFloat(data.focalX ?? \"\");\n const focalY = Number.parseFloat(data.focalY ?? \"\");\n if (!Number.isNaN(focalX) && !Number.isNaN(focalY)) {\n return { x: focalX, y: focalY };\n }\n return undefined;\n};\n\nexport const getCrop = (data: ImageEmbedData) => {\n const lowerRightX = Number.parseFloat(data.lowerRightX ?? \"\");\n const lowerRightY = Number.parseFloat(data.lowerRightY ?? \"\");\n const upperLeftX = Number.parseFloat(data.upperLeftX ?? \"\");\n const upperLeftY = Number.parseFloat(data.upperLeftY ?? \"\");\n if (\n !Number.isNaN(lowerRightX) &&\n !Number.isNaN(lowerRightY) &&\n !Number.isNaN(upperLeftX) &&\n !Number.isNaN(upperLeftY)\n ) {\n return {\n startX: lowerRightX,\n startY: lowerRightY,\n endX: upperLeftX,\n endY: upperLeftY,\n };\n }\n return undefined;\n};\n\nconst expandedSizes = \"(min-width: 1024px) 1024px, 100vw\";\n\nconst ImageWrapper = styled(\"div\", {\n base: {\n overflow: \"hidden\",\n position: \"relative\",\n width: \"100%\",\n \"& img\": {\n width: \"100%\",\n },\n },\n variants: {\n svg: {\n true: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n false: {},\n },\n border: {\n true: {\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n \"& img\": {\n borderRadius: \"0\",\n },\n },\n false: {},\n },\n expandable: {\n true: {\n cursor: \"pointer\",\n },\n false: {},\n },\n },\n});\n\nconst StyledFigure = styled(Figure, {\n base: {\n zIndex: \"docked\",\n _hover: {\n \"& [data-byline-button]\": {\n background: \"background.default\",\n },\n \"& button[data-expanded]\": {\n transform: \"scale(1.2)\",\n },\n },\n \"& button[data-expanded='true']\": {\n \"& svg\": {\n transform: \"rotate(-45deg)\",\n },\n },\n },\n});\n\nconst ExpandButton = styled(\n \"button\",\n {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n position: \"absolute\",\n padding: \"0\",\n top: \"xsmall\",\n right: \"xsmall\",\n width: \"medium\",\n height: \"medium\",\n border: \"2px solid\",\n borderColor: \"background.default\",\n transitionProperty: \"transform, background-color, color\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"ease-out\",\n color: \"background.default\",\n backgroundColor: \"surface.action\",\n borderRadius: \"large\",\n \"& svg\": {\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"ease-out\",\n },\n tabletDown: {\n display: \"none\",\n },\n _print: {\n display: \"none\",\n },\n },\n },\n { defaultProps: { type: \"button\" } },\n);\n\nexport const ImageEmbed = ({ embed, previewAlt, lang, renderContext = \"article\", children }: Props) => {\n const [expanded, setExpanded] = useState(false);\n const figureProps = getFigureProps(embed.embedData.size, embed.embedData.align);\n const { t } = useTranslation();\n\n const parsedDescription = useMemo(() => {\n if (embed.embedData.caption || renderContext === \"article\") {\n return embed.embedData.caption ? parse(embed.embedData.caption) : undefined;\n }\n if (embed.status === \"success\" && embed.data.caption.caption) {\n return parse(embed.data.caption.caption);\n }\n }, [embed, renderContext]);\n\n if (embed.status === \"error\") {\n return <EmbedErrorPlaceholder type={\"image\"} figureType={figureProps?.size} float={figureProps?.float} />;\n }\n\n const { data, embedData } = embed;\n\n const altText = embedData.alt || \"\";\n\n const sizes = getSizes(embedData.size, embedData.align);\n\n const focalPoint = getFocalPoint(embedData);\n const crop = getCrop(embedData);\n\n const toggleImageSize = () => {\n setExpanded((prev) => !prev);\n };\n\n const licenseProps = licenseAttributes(data.copyright.license.license, lang, embedData.url);\n\n const figureSize = figureProps?.float ? (figureProps?.size ?? \"medium\") : \"full\";\n\n return (\n <StyledFigure\n float={figureProps?.float}\n size={expanded ? \"full\" : figureSize}\n data-embed-type=\"image\"\n {...licenseProps}\n >\n {children}\n <ImageWrapper border={embedData.border === \"true\"} expandable={!!figureProps?.float}>\n <Image\n focalPoint={focalPoint}\n contentType={data.image.contentType}\n crop={crop}\n sizes={expanded ? expandedSizes : sizes}\n alt={altText}\n src={data.image.imageUrl}\n variants={data.image.variants}\n lang={lang}\n onClick={figureProps?.float ? toggleImageSize : undefined}\n variant=\"rounded\"\n {...data.image.dimensions}\n />\n {(embedData.align === \"right\" || embedData.align === \"left\") && (\n <ExpandButton\n aria-label={t(`license.images.itemImage.zoom${expanded ? \"Out\" : \"\"}ImageButtonLabel`)}\n onClick={toggleImageSize}\n data-expanded={expanded}\n >\n <AddLine />\n </ExpandButton>\n )}\n </ImageWrapper>\n <EmbedByline\n type=\"image\"\n copyright={data.copyright}\n description={parsedDescription}\n hideDescription={embedData.hideCaption === \"true\"}\n hideCopyright={embedData.hideByline === \"true\"}\n visibleAlt={previewAlt ? embed.embedData.alt : \"\"}\n />\n </StyledFigure>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,MAAM,kBAAkB,MAAe,UAAuC;CAC5E,MAAM,cAAc,UAAU,SAAS,SAAS,UAAU,UAAU,UAAU;CAC9E,MAAM,eAAe,MAAM,QAAQ,gBAAgB,GAAG,IAAI;CAC1D,MAAMA,aAA0B,iBAAiB,cAAc,SA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3G,MAAM,EAAE,MAAM,cAAc;CAE5B,MAAM,UAAU,UAAU,OAAO;CAEjC,MAAM,QAAQ,SAAS,UAAU,MAAM,UAAU,MAAM;CAEvD,MAAM,aAAa,cAAc,UAAU;CAC3C,MAAM,OAAO,QAAQ,UAAU;CAE/B,MAAM,wBAAwB;AAC5B,eAAa,SAAS,CAAC,KAAK;;CAG9B,MAAM,eAAe,kBAAkB,KAAK,UAAU,QAAQ,SAAS,MAAM,UAAU,IAAI;CAE3F,MAAM,aAAa,aAAa,QAAS,aAAa,QAAQ,WAAY;AAE1E,QACE,qBAAC;EACC,OAAO,aAAa;EACpB,MAAM,WAAW,SAAS;EAC1B,mBAAgB;EAChB,GAAI;;GAEH;GACD,qBAAC;IAAa,QAAQ,UAAU,WAAW;IAAQ,YAAY,CAAC,CAAC,aAAa;eAC5E,oBAAC;KACa;KACZ,aAAa,KAAK,MAAM;KAClB;KACN,OAAO,WAAW,gBAAgB;KAClC,KAAK;KACL,KAAK,KAAK,MAAM;KAChB,UAAU,KAAK,MAAM;KACf;KACN,SAAS,aAAa,QAAQ,kBAAkB;KAChD,SAAQ;KACR,GAAI,KAAK,MAAM;MACf,GACA,UAAU,UAAU,WAAW,UAAU,UAAU,WACnD,oBAAC;KACC,cAAY,EAAE,gCAAgC,WAAW,QAAQ,GAAG,kBAAkB;KACtF,SAAS;KACT,iBAAe;eAEf,oBAAC,YAAU;MACE;KAEJ;GACf,oBAAC;IACC,MAAK;IACL,WAAW,KAAK;IAChB,aAAa;IACb,iBAAiB,UAAU,gBAAgB;IAC3C,eAAe,UAAU,eAAe;IACxC,YAAY,aAAa,MAAM,UAAU,MAAM;KAC/C;;GACW"}
1
+ {"version":3,"file":"ImageEmbed.mjs","names":[],"sources":["../../src/Embed/ImageEmbed.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { type ReactNode, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { AddLine } from \"@ndla/icons\";\nimport { Figure, type FigureSize, type FigureVariantProps, Image } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { ImageEmbedData, ImageMetaData } from \"@ndla/types-embed\";\nimport { EmbedErrorPlaceholder } from \"./EmbedErrorPlaceholder\";\nimport type { RenderContext } from \"./types\";\nimport { EmbedByline } from \"../LicenseByline/EmbedByline\";\nimport { licenseAttributes } from \"../utils/licenseAttributes\";\n\ninterface Props {\n embed: ImageMetaData;\n previewAlt?: boolean;\n lang?: string;\n renderContext?: RenderContext;\n children?: ReactNode;\n}\n\nexport interface Author {\n name: string;\n type: string;\n}\n\nconst getFigureProps = (size?: string, float?: string): FigureVariantProps => {\n const actualFloat = float === \"left\" ? \"left\" : float === \"right\" ? \"right\" : undefined;\n const replacedSize = size?.replace(\"-hide-byline\", \"\") ?? \"full\";\n const actualSize: FigureSize = (replacedSize === \"fullwidth\" ? \"full\" : replacedSize) as FigureSize;\n return {\n float: actualFloat,\n // 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.\n size: actualSize === \"full\" && float ? \"medium\" : actualSize,\n };\n};\n\nconst getSizes = (size?: string, align?: string) => {\n if (align && size === \"full\") {\n return \"(min-width: 1024px) 512px, (min-width: 768px) 350px, 100vw\";\n }\n if (align && size === \"small\") {\n return \"(min-width: 1024px) 350px, (min-width: 768px) 180px, 100vw\";\n }\n if (align && size === \"xsmall\") {\n return \"(min-width: 1024px) 180px, (min-width: 768px) 180px, 100vw\";\n }\n return \"(min-width: 1024px) 1024px, 100vw\";\n};\n\nexport const getFocalPoint = (data: ImageEmbedData) => {\n const focalX = Number.parseFloat(data.focalX ?? \"\");\n const focalY = Number.parseFloat(data.focalY ?? \"\");\n if (!Number.isNaN(focalX) && !Number.isNaN(focalY)) {\n return { x: focalX, y: focalY };\n }\n return undefined;\n};\n\nexport const getCrop = (data: ImageEmbedData) => {\n const lowerRightX = Number.parseFloat(data.lowerRightX ?? \"\");\n const lowerRightY = Number.parseFloat(data.lowerRightY ?? \"\");\n const upperLeftX = Number.parseFloat(data.upperLeftX ?? \"\");\n const upperLeftY = Number.parseFloat(data.upperLeftY ?? \"\");\n if (\n !Number.isNaN(lowerRightX) &&\n !Number.isNaN(lowerRightY) &&\n !Number.isNaN(upperLeftX) &&\n !Number.isNaN(upperLeftY)\n ) {\n return {\n startX: lowerRightX,\n startY: lowerRightY,\n endX: upperLeftX,\n endY: upperLeftY,\n };\n }\n return undefined;\n};\n\nconst expandedSizes = \"(min-width: 1024px) 1024px, 100vw\";\n\nconst ImageWrapper = styled(\"div\", {\n base: {\n overflow: \"hidden\",\n position: \"relative\",\n width: \"100%\",\n \"& img\": {\n width: \"100%\",\n },\n },\n variants: {\n svg: {\n true: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n false: {},\n },\n border: {\n true: {\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n \"& img\": {\n borderRadius: \"0\",\n },\n },\n false: {},\n },\n expandable: {\n true: {\n cursor: \"pointer\",\n },\n false: {},\n },\n },\n});\n\nconst StyledFigure = styled(Figure, {\n base: {\n zIndex: \"docked\",\n _hover: {\n \"& [data-byline-button]\": {\n background: \"background.default\",\n },\n \"& button[data-expanded]\": {\n transform: \"scale(1.2)\",\n },\n },\n \"& button[data-expanded='true']\": {\n \"& svg\": {\n transform: \"rotate(-45deg)\",\n },\n },\n },\n});\n\nconst ExpandButton = styled(\n \"button\",\n {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n position: \"absolute\",\n padding: \"0\",\n top: \"xsmall\",\n right: \"xsmall\",\n width: \"medium\",\n height: \"medium\",\n border: \"2px solid\",\n borderColor: \"background.default\",\n transitionProperty: \"transform, background-color, color\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"ease-out\",\n color: \"background.default\",\n backgroundColor: \"surface.action\",\n borderRadius: \"large\",\n \"& svg\": {\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"ease-out\",\n },\n tabletDown: {\n display: \"none\",\n },\n _print: {\n display: \"none\",\n },\n },\n },\n { defaultProps: { type: \"button\" } },\n);\n\nexport const ImageEmbed = ({ embed, previewAlt, lang, renderContext = \"article\", children }: Props) => {\n const [expanded, setExpanded] = useState(false);\n const figureProps = getFigureProps(embed.embedData.size, embed.embedData.align);\n const { t } = useTranslation();\n\n const parsedDescription = useMemo(() => {\n if (embed.embedData.caption || renderContext === \"article\") {\n return embed.embedData.caption ? parse(embed.embedData.caption) : undefined;\n }\n if (embed.status === \"success\" && embed.data.caption.caption) {\n return parse(embed.data.caption.caption);\n }\n }, [embed, renderContext]);\n\n if (embed.status === \"error\") {\n return <EmbedErrorPlaceholder type={\"image\"} figureType={figureProps?.size} float={figureProps?.float} />;\n }\n\n const { data, embedData } = embed;\n\n const altText = embedData.alt || \"\";\n\n const sizes = getSizes(embedData.size, embedData.align);\n\n const focalPoint = getFocalPoint(embedData);\n const crop = getCrop(embedData);\n\n const toggleImageSize = () => {\n setExpanded((prev) => !prev);\n };\n\n const licenseProps = licenseAttributes(data.copyright.license.license, lang, embedData.url);\n\n const figureSize = figureProps?.float ? (figureProps?.size ?? \"medium\") : \"full\";\n\n return (\n <StyledFigure\n float={figureProps?.float}\n size={expanded ? \"full\" : figureSize}\n data-embed-type=\"image\"\n {...licenseProps}\n >\n {children}\n <ImageWrapper border={embedData.border === \"true\"} expandable={!!figureProps?.float}>\n <Image\n focalPoint={focalPoint}\n contentType={data.image.contentType}\n crop={crop}\n sizes={expanded ? expandedSizes : sizes}\n alt={altText}\n src={data.image.imageUrl}\n variants={data.image.variants}\n lang={lang}\n onClick={figureProps?.float ? toggleImageSize : undefined}\n variant=\"rounded\"\n {...data.image.dimensions}\n />\n {(embedData.align === \"right\" || embedData.align === \"left\") && (\n <ExpandButton\n aria-label={t(`license.images.itemImage.zoom${expanded ? \"Out\" : \"\"}ImageButtonLabel`)}\n onClick={toggleImageSize}\n data-expanded={expanded}\n >\n <AddLine />\n </ExpandButton>\n )}\n </ImageWrapper>\n <EmbedByline\n type=\"image\"\n copyright={data.copyright}\n description={parsedDescription}\n hideDescription={embedData.hideCaption === \"true\"}\n hideCopyright={embedData.hideByline === \"true\"}\n visibleAlt={previewAlt ? embed.embedData.alt : \"\"}\n />\n </StyledFigure>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,MAAM,kBAAkB,MAAe,UAAuC;CAC5E,MAAM,cAAc,UAAU,SAAS,SAAS,UAAU,UAAU,UAAU;CAC9E,MAAM,eAAe,MAAM,QAAQ,gBAAgB,GAAG,IAAI;CAC1D,MAAM,aAA0B,iBAAiB,cAAc,SAAS;AACxE,QAAO;EACL,OAAO;EAEP,MAAM,eAAe,UAAU,QAAQ,WAAW;EACnD;;AAGH,MAAM,YAAY,MAAe,UAAmB;AAClD,KAAI,SAAS,SAAS,OACpB,QAAO;AAET,KAAI,SAAS,SAAS,QACpB,QAAO;AAET,KAAI,SAAS,SAAS,SACpB,QAAO;AAET,QAAO;;AAGT,MAAa,iBAAiB,SAAyB;CACrD,MAAM,SAAS,OAAO,WAAW,KAAK,UAAU,GAAG;CACnD,MAAM,SAAS,OAAO,WAAW,KAAK,UAAU,GAAG;AACnD,KAAI,CAAC,OAAO,MAAM,OAAO,IAAI,CAAC,OAAO,MAAM,OAAO,CAChD,QAAO;EAAE,GAAG;EAAQ,GAAG;EAAQ;;AAKnC,MAAa,WAAW,SAAyB;CAC/C,MAAM,cAAc,OAAO,WAAW,KAAK,eAAe,GAAG;CAC7D,MAAM,cAAc,OAAO,WAAW,KAAK,eAAe,GAAG;CAC7D,MAAM,aAAa,OAAO,WAAW,KAAK,cAAc,GAAG;CAC3D,MAAM,aAAa,OAAO,WAAW,KAAK,cAAc,GAAG;AAC3D,KACE,CAAC,OAAO,MAAM,YAAY,IAC1B,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,GACA,UAAU,UAAU,WAAW,UAAU,UAAU,WACnD,oBAAC;KACC,cAAY,EAAE,gCAAgC,WAAW,QAAQ,GAAG,kBAAkB;KACtF,SAAS;KACT,iBAAe;eAEf,oBAAC,YAAU;MACE;KAEJ;GACf,oBAAC;IACC,MAAK;IACL,WAAW,KAAK;IAChB,aAAa;IACb,iBAAiB,UAAU,gBAAgB;IAC3C,eAAe,UAAU,eAAe;IACxC,YAAY,aAAa,MAAM,UAAU,MAAM;KAC/C;;GACW"}
package/es/Grid/Grid.mjs CHANGED
@@ -44,10 +44,10 @@ const GridContainer = styled("div", {
44
44
  }
45
45
  });
46
46
  const StyledGridItem = styled("div", {
47
- base: {},
47
+ base: { padding: "medium" },
48
48
  variants: { border: { true: {
49
49
  outline: "1px solid",
50
- borderColor: "stroke.default"
50
+ outlineColor: "stroke.default"
51
51
  } } }
52
52
  });
53
53
  const Grid = ({ columns, border, children, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.mjs","names":[],"sources":["../../src/Grid/Grid.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ComponentProps, type ReactNode } from \"react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledVariantProps } from \"@ndla/styled-system/types\";\n\nconst GridContainer = styled(\"div\", {\n base: {\n display: \"grid\",\n justifyContent: \"center\",\n borderRadius: \"xsmall\",\n gridRowGap: \"large\",\n gridColumnGap: \"medium\",\n width: \"100%\",\n minWidth: \"surface.xxsmall\",\n gridTemplateColumns: \"repeat(2, minmax(0, 1fr))\",\n\n \"& div[data-embed-type='pitch']\": {\n height: \"100%\",\n \"& > :last-child\": {\n marginTop: \"auto\",\n },\n },\n tabletDown: {\n gridTemplateColumns: \"repeat(1, minmax(0, 1fr))\",\n },\n tabletToDesktop: {\n gridTemplateColumns: \"repeat(2, minmax(0, 1fr))\",\n \"& > div:nth-child(3):last-child\": {\n display: \"flex\",\n flexFlow: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gridColumn: \"span 2\",\n },\n },\n },\n variants: {\n columns: {\n \"2\": {},\n \"2x2\": {},\n \"3\": { desktop: { gridTemplateColumns: \"repeat(3, minmax(0, 1fr))\" } },\n \"4\": { desktop: { gridTemplateColumns: \"repeat(4, minmax(0, 1fr))\" } },\n },\n border: {\n lightBlue: {\n padding: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"surface.brand.2\",\n },\n },\n },\n});\n\nconst StyledGridItem = styled(\"div\", {\n base: {},\n variants: {\n border: {\n true: {\n outline: \"1px solid\",\n borderColor: \"stroke.default\",\n },\n },\n },\n});\n\ntype GridVariantProps = NonNullable<StyledVariantProps<typeof GridContainer>>;\n\nexport interface GridProps extends ComponentProps<\"div\">, GridVariantProps {\n children?: ReactNode[];\n columns: NonNullable<GridVariantProps[\"columns\"]>;\n}\n\ntype GridItemVariantProps = NonNullable<StyledVariantProps<typeof StyledGridItem>>;\n\nexport interface GridItemProps extends ComponentProps<\"div\">, GridItemVariantProps {}\n\nexport const Grid = ({ columns, border, children, ...rest }: GridProps) => {\n const amountOfColumns = children?.length === 3 ? \"3\" : columns;\n\n return (\n <GridContainer data-embed-type=\"grid\" border={border} columns={amountOfColumns} {...rest}>\n {children}\n </GridContainer>\n );\n};\n\nexport const GridItem = ({ border, children, ...rest }: GridItemProps) => {\n return (\n <StyledGridItem data-embed-type=\"grid-cell\" border={border} {...rest}>\n {children}\n </StyledGridItem>\n );\n};\n"],"mappings":";;;;;AAYA,MAAM,gBAAgB,OAAO,OAAO;CAClC,MAAM;EACJ,SAAS;EACT,gBAAgB;EAChB,cAAc;EACd,YAAY;EACZ,eAAe;EACf,OAAO;EACP,UAAU;EACV,qBAAqB;EAErB,kCAAkC;GAChC,QAAQ;GACR,mBAAmB,EACjB,WAAW,QACZ;GACF;EACD,YAAY,EACV,qBAAqB,6BACtB;EACD,iBAAiB;GACf,qBAAqB;GACrB,mCAAmC;IACjC,SAAS;IACT,UAAU;IACV,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACb;GACF;EACF;CACD,UAAU;EACR,SAAS;GACP,KAAK,EAAE;GACP,OAAO,EAAE;GACT,KAAK,EAAE,SAAS,EAAE,qBAAqB,6BAA6B,EAAE;GACtE,KAAK,EAAE,SAAS,EAAE,qBAAqB,6BAA6B,EAAE;GACvE;EACD,QAAQ,EACN,WAAW;GACT,SAAS;GACT,QAAQ;GACR,aAAa;GACd,EACF;EACF;CACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO;CACnC,MAAM,EAAE;CACR,UAAU,EACR,QAAQ,EACN,MAAM;EACJ,SAAS;EACT,aAAa;EACd,EACF,EACF;CACF,CAAC;AAaF,MAAa,QAAQ,EAAE,SAAS,QAAQ,UAAU,GAAG,WAAsB;CACzE,MAAM,kBAAkB,UAAU,WAAW,IAAI,MAAM;AAEvD,QACE,oBAAC;EAAc,mBAAgB;EAAe;EAAQ,SAAS;EAAiB,GAAI;EACjF;GACa;;AAIpB,MAAa,YAAY,EAAE,QAAQ,UAAU,GAAG,WAA0B;AACxE,QACE,oBAAC;EAAe,mBAAgB;EAAoB;EAAQ,GAAI;EAC7D;GACc"}
1
+ {"version":3,"file":"Grid.mjs","names":[],"sources":["../../src/Grid/Grid.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ComponentProps, type ReactNode } from \"react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledVariantProps } from \"@ndla/styled-system/types\";\n\nconst GridContainer = styled(\"div\", {\n base: {\n display: \"grid\",\n justifyContent: \"center\",\n borderRadius: \"xsmall\",\n gridRowGap: \"large\",\n gridColumnGap: \"medium\",\n width: \"100%\",\n minWidth: \"surface.xxsmall\",\n gridTemplateColumns: \"repeat(2, minmax(0, 1fr))\",\n\n \"& div[data-embed-type='pitch']\": {\n height: \"100%\",\n \"& > :last-child\": {\n marginTop: \"auto\",\n },\n },\n tabletDown: {\n gridTemplateColumns: \"repeat(1, minmax(0, 1fr))\",\n },\n tabletToDesktop: {\n gridTemplateColumns: \"repeat(2, minmax(0, 1fr))\",\n \"& > div:nth-child(3):last-child\": {\n display: \"flex\",\n flexFlow: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gridColumn: \"span 2\",\n },\n },\n },\n variants: {\n columns: {\n \"2\": {},\n \"2x2\": {},\n \"3\": { desktop: { gridTemplateColumns: \"repeat(3, minmax(0, 1fr))\" } },\n \"4\": { desktop: { gridTemplateColumns: \"repeat(4, minmax(0, 1fr))\" } },\n },\n border: {\n lightBlue: {\n padding: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"surface.brand.2\",\n },\n },\n },\n});\n\nconst StyledGridItem = styled(\"div\", {\n base: {\n padding: \"medium\",\n },\n variants: {\n border: {\n true: {\n outline: \"1px solid\",\n outlineColor: \"stroke.default\",\n },\n },\n },\n});\n\ntype GridVariantProps = NonNullable<StyledVariantProps<typeof GridContainer>>;\n\nexport interface GridProps extends ComponentProps<\"div\">, GridVariantProps {\n children?: ReactNode[];\n columns: NonNullable<GridVariantProps[\"columns\"]>;\n}\n\ntype GridItemVariantProps = NonNullable<StyledVariantProps<typeof StyledGridItem>>;\n\nexport interface GridItemProps extends ComponentProps<\"div\">, GridItemVariantProps {}\n\nexport const Grid = ({ columns, border, children, ...rest }: GridProps) => {\n const amountOfColumns = children?.length === 3 ? \"3\" : columns;\n\n return (\n <GridContainer data-embed-type=\"grid\" border={border} columns={amountOfColumns} {...rest}>\n {children}\n </GridContainer>\n );\n};\n\nexport const GridItem = ({ border, children, ...rest }: GridItemProps) => {\n return (\n <StyledGridItem data-embed-type=\"grid-cell\" border={border} {...rest}>\n {children}\n </StyledGridItem>\n );\n};\n"],"mappings":";;;;;AAYA,MAAM,gBAAgB,OAAO,OAAO;CAClC,MAAM;EACJ,SAAS;EACT,gBAAgB;EAChB,cAAc;EACd,YAAY;EACZ,eAAe;EACf,OAAO;EACP,UAAU;EACV,qBAAqB;EAErB,kCAAkC;GAChC,QAAQ;GACR,mBAAmB,EACjB,WAAW,QACZ;GACF;EACD,YAAY,EACV,qBAAqB,6BACtB;EACD,iBAAiB;GACf,qBAAqB;GACrB,mCAAmC;IACjC,SAAS;IACT,UAAU;IACV,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACb;GACF;EACF;CACD,UAAU;EACR,SAAS;GACP,KAAK,EAAE;GACP,OAAO,EAAE;GACT,KAAK,EAAE,SAAS,EAAE,qBAAqB,6BAA6B,EAAE;GACtE,KAAK,EAAE,SAAS,EAAE,qBAAqB,6BAA6B,EAAE;GACvE;EACD,QAAQ,EACN,WAAW;GACT,SAAS;GACT,QAAQ;GACR,aAAa;GACd,EACF;EACF;CACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO;CACnC,MAAM,EACJ,SAAS,UACV;CACD,UAAU,EACR,QAAQ,EACN,MAAM;EACJ,SAAS;EACT,cAAc;EACf,EACF,EACF;CACF,CAAC;AAaF,MAAa,QAAQ,EAAE,SAAS,QAAQ,UAAU,GAAG,WAAsB;CACzE,MAAM,kBAAkB,UAAU,WAAW,IAAI,MAAM;AAEvD,QACE,oBAAC;EAAc,mBAAgB;EAAe;EAAQ,SAAS;EAAiB,GAAI;EACjF;GACa;;AAIpB,MAAa,YAAY,EAAE,QAAQ,UAAU,GAAG,WAA0B;AACxE,QACE,oBAAC;EAAe,mBAAgB;EAAoB;EAAQ,GAAI;EAC7D;GACc"}
@@ -1,6 +1,6 @@
1
1
  //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (all, symbols) => {
3
+ var __exportAll = (all, symbols) => {
4
4
  let target = {};
5
5
  for (var name in all) {
6
6
  __defProp(target, name, {
@@ -15,4 +15,4 @@ var __export = (all, symbols) => {
15
15
  };
16
16
 
17
17
  //#endregion
18
- export { __export };
18
+ export { __exportAll };
package/es/index.mjs CHANGED
@@ -50,7 +50,7 @@ import { formatNestedMessages } from "./i18n/formatNestedMessages.mjs";
50
50
  import { TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger } from "./TagSelector/TagSelector.mjs";
51
51
  import { useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations } from "./i18n/useComponentTranslations.mjs";
52
52
  import { ContentTypeBadge, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadge.mjs";
53
- import { CopyParagraphButton } from "./CopyParagraphButton/CopyParagraphButton.mjs";
53
+ import { AnchorHeading } from "./AnchorHeading/AnchorHeading.mjs";
54
54
  import { Pitch } from "./Pitch/Pitch.mjs";
55
55
  import { KeyFigure } from "./KeyFigure/KeyFigure.mjs";
56
56
  import { ContactBlock, contactBlockBackgrounds } from "./ContactBlock/ContactBlock.mjs";
@@ -60,4 +60,4 @@ import { LinkBlock } from "./LinkBlock/LinkBlock.mjs";
60
60
  import { LinkBlockSection } from "./LinkBlock/LinkBlockSection.mjs";
61
61
  import { ZendeskButton } from "./ZendeskButton/ZendeskButton.mjs";
62
62
 
63
- export { Article, ArticleByline, ArticleBylineAccordionItem, ArticleContent, ArticleFootNotes, ArticleFooter, ArticleHGroup, ArticleHeader, ArticleTitle, ArticleWrapper, AudioEmbed, AudioPlayer, BadgesContainer, BlockConcept, Breadcrumb, BrightcoveEmbed, CampaignBlock, CodeBlock, CodeEmbed, Concept, ConceptEmbed, ConceptInlineTriggerButton, ContactBlock, ContentLinkEmbed, ContentTypeBadge, CopyParagraphButton, CopyrightEmbed, EmbedByline, EmbedWrapper, ExternalEmbed, FactBox, File, FileListElement, FileListEmbed, FileListItem, FileListWrapper, FootnoteEmbed, Gloss, GlossExample, Grid, GridItem, H5pEmbed, HomeBreadcrumb, IframeEmbed, ImageEmbed, InlineConcept, InlineTriggerButton, KeyFigure, LicenseLink, LinkBlock, LinkBlockSection, PdfFile, Pitch, RelatedArticle, RelatedArticleList, RelatedContentEmbed, ResourceBox, TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger, UnknownEmbed, UuDisclaimerEmbed, ZendeskButton, codeLanguageOptions, constants, contactBlockBackgrounds, contentTypeMapping, contentTypeToBadgeVariantMap, contentTypes, formatNestedMessages, getCrop, getFocalPoint, getPossiblyRelativeUrl, licenseAttributes, messages_en_default as messagesEN, messages_nb_default as messagesNB, messages_nn_default as messagesNN, messages_se_default as messagesSE, resourceEmbedTypeMapping, subjectCategories, subjectTypes, useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations, wordClass };
63
+ export { AnchorHeading, Article, ArticleByline, ArticleBylineAccordionItem, ArticleContent, ArticleFootNotes, ArticleFooter, ArticleHGroup, ArticleHeader, ArticleTitle, ArticleWrapper, AudioEmbed, AudioPlayer, BadgesContainer, BlockConcept, Breadcrumb, BrightcoveEmbed, CampaignBlock, CodeBlock, CodeEmbed, Concept, ConceptEmbed, ConceptInlineTriggerButton, ContactBlock, ContentLinkEmbed, ContentTypeBadge, CopyrightEmbed, EmbedByline, EmbedWrapper, ExternalEmbed, FactBox, File, FileListElement, FileListEmbed, FileListItem, FileListWrapper, FootnoteEmbed, Gloss, GlossExample, Grid, GridItem, H5pEmbed, HomeBreadcrumb, IframeEmbed, ImageEmbed, InlineConcept, InlineTriggerButton, KeyFigure, LicenseLink, LinkBlock, LinkBlockSection, PdfFile, Pitch, RelatedArticle, RelatedArticleList, RelatedContentEmbed, ResourceBox, TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger, UnknownEmbed, UuDisclaimerEmbed, ZendeskButton, codeLanguageOptions, constants, contactBlockBackgrounds, contentTypeMapping, contentTypeToBadgeVariantMap, contentTypes, formatNestedMessages, getCrop, getFocalPoint, getPossiblyRelativeUrl, licenseAttributes, messages_en_default as messagesEN, messages_nb_default as messagesNB, messages_nn_default as messagesNN, messages_se_default as messagesSE, resourceEmbedTypeMapping, subjectCategories, subjectTypes, useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations, wordClass };
@@ -200,6 +200,7 @@ const messages = {
200
200
  learningpath: "Learning path",
201
201
  "learning-path": "Learning path",
202
202
  "subject-material": "Subject material",
203
+ standard: "Subject material",
203
204
  "tasks-and-activities": "Task and activities",
204
205
  "source-material": "Source material",
205
206
  "assessment-resources": "Assessment resource",
@@ -1 +1 @@
1
- {"version":3,"file":"messages-en.mjs","names":[],"sources":["../../src/locale/messages-en.ts"],"sourcesContent":["/**\n * Copyright (c) 2018-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { contributorTypes } from \"@ndla/licenses\";\nimport { subjectCategories } from \"../model/SubjectCategories\";\nimport { subjectTypes } from \"../model/SubjectTypes\";\nimport { wordClass } from \"../model/WordClass\";\n\nconst messages = {\n ...Object.entries(contributorTypes).reduce<Record<string, string>>((acc, curr) => {\n acc[curr[0]] = curr[1].en;\n return acc;\n }, {}),\n askNDLA: \"Ask NDLA\",\n subjectCategories: {\n [subjectCategories.ACTIVE_SUBJECTS]: \"Active\",\n [subjectCategories.ARCHIVE_SUBJECTS]: \"Expired\",\n [subjectCategories.BETA_SUBJECTS]: \"Revised\",\n [subjectCategories.OTHER]: \"Other resources\",\n [subjectTypes.RESOURCE_COLLECTION]: \"Resource collections\",\n },\n subjectTypes: {\n [subjectTypes.ARCHIVE_SUBJECT]: \"Archive subject\",\n [subjectTypes.BETA_SUBJECT]: \"Beta subject\",\n [subjectTypes.RESOURCE_COLLECTION]: \"Resource collection\",\n [subjectTypes.SUBJECT]: \"Subject\",\n },\n meta: {\n description: \"Norwegian Digital Learning Arena, Open Educational Resources for upper secondary education.\",\n keywords: \"open educational resources,teaching,learning\",\n },\n logo: {\n altText: \"The Norwegian Digital Learning Arena\",\n },\n article: {\n lastUpdated: \"Last revised date\",\n useContent: \"Cite or reuse?\",\n authorsLabel_article: \"Written by\",\n authorsLabel_learningPath: \"Made by\",\n authorsLabel_external: \"This link is added by\",\n copyPageLinkCopied: \"Link copied\",\n copyHeaderLink: \"Copy link to header\",\n conjunction: \"and\",\n supplierLabel_one: \"Rightsholder:\",\n supplierLabel_other: \"Rightsholders:\",\n printPage: \"Print text\",\n access: {\n onlyTeacher: \"This resource is accessible only to teachers who are logged in with Feide.\",\n },\n footnotes: \"Footnotes\",\n },\n external: {\n lastUpdated: \"Last revised date\",\n },\n learningPath: {\n copiedFrom: \"This is a remix of a different learning path\",\n lastUpdated: \"Last revised date\",\n },\n license: {\n tabs: {\n text: \"Text\",\n images: \"Images\",\n audio: \"Audio\",\n video: \"Video\",\n h5p: \"H5P\",\n files: \"Files\",\n embedlink: \"Embedded link\",\n concept: \"Concepts\",\n gloss: \"Glosses\",\n podcast: \"Podcast\",\n other: \"Other content\",\n },\n embedlink: {\n heading: \"How to show the article in other content\",\n description: \"This url shows the article without menu and footer\",\n copyTitle: \"Copy link\",\n hasCopiedTitle: \"Link copied\",\n },\n image: {\n rules: \"Rules for use of image:\",\n },\n images: {\n heading: \"How to reuse images\",\n description: \"Remember to copy the text to be attached to the image where you use it.\",\n rules: \"Rules for use of image\",\n itemImage: {\n ariaLabel: \"Open image in new window\",\n zoomImageButtonLabel: \"Expand image\",\n zoomOutImageButtonLabel: \"Shrink image\",\n expandByline: \"Show byline\",\n minimizeByline: \"Hide byline\",\n },\n licenseText: \"This image has the license\",\n restrictedUseText: \"This image has\",\n },\n text: {\n heading: \"How to reuse the text\",\n description: \"Remember to refer to the source when reusing text.\",\n rules: \"Rules for use of text\",\n published: \"Published\",\n licenseText: \"This text has the license\",\n restrictedUseText: \"This text has\",\n },\n audio: {\n heading: \"How to reuse audio files\",\n description: \"Remember to copy the text to be attached to the audio where you use it.\",\n rules: \"Rules for use of audio file\",\n licenseText: \"This audio file has the license\",\n restrictedUseText: \"This audio file has\",\n },\n podcast: {\n heading: \"How to reuse podcasts\",\n description: \"Remember to copy the text to be attached to the podcast where you use it.\",\n rules: \"Rules for use of podcast\",\n licenseText: \"This podcast has the license\",\n restrictedUseText: \"This podcast has\",\n },\n video: {\n heading: \"How to reuse videos\",\n description: \"Remember to copy the text to be attached to the video where you use it.\",\n rules: \"Rules for use of video files\",\n itemImage: {\n ariaLabel: \"Open video in new window\",\n },\n licenseText: \"This video has the license\",\n restrictedUseText: \"This video has\",\n },\n other: {\n heading: \"How to reuse other content\",\n description: \"You will find guidelines for use of other content in the asset\",\n itemImage: {\n ariaLabel: \"Open in new window\",\n },\n },\n h5p: {\n heading: \"How to reuse H5P content\",\n description: \"You will find guidelines for use of H5P content in the asset\",\n rules: \"Rules for use of H5P\",\n licenseText: \"This interactive task (H5P) is licensed\",\n restrictedUseText: \"This interactive task (H5P) has\",\n },\n concept: {\n heading: \"How to reuse concept content\",\n description: \"Remember that built-in content might have a different license than the explanation text\",\n rules: \"Rules for use of concept\",\n embedlink: {\n heading: \"How to show the concept in other content\",\n description: \"This url shows the concept without menu and footer\",\n copyTitle: \"Copy embed link\",\n hasCopiedTitle: \"Embed link copied\",\n },\n licenseText: \"This concept has the license\",\n restrictedUseText: \"This concept has\",\n },\n gloss: {\n heading: \"How to reuse gloss content\",\n description: \"Remember that built-in content might have a different license than the gloss text\",\n rules: \"Rules for use of gloss\",\n showOrHideExamples: \"Show or hide examples\",\n embedlink: {\n heading: \"How to show the gloss in other content\",\n description: \"This url shows the gloss without menu and footer\",\n copyTitle: \"Copy embed link\",\n hasCopiedTitle: \"Embed link copied\",\n },\n licenseText: \"This gloss has the license\",\n restrictedUseText: \"This gloss has\",\n },\n files: {\n heading: \"How to reuse files\",\n description: \"Remember to copy the text to be attached to the file where you use it.\",\n rules: \"Rules for use of file\",\n itemImage: {\n ariaLabel: \"Open video in new window\",\n },\n },\n copyTitle: \"Copy source reference\",\n embed: \"Embed\",\n embedCopied: \"Copied embed code!\",\n copyText: {\n now: \"now\",\n podcast: \"podcast\",\n by: \"by\",\n internet: \"[Internet]. \",\n noTitle: \"No title\",\n downloadedFrom: \"Downloaded from: \",\n readDate: \"Read: \",\n },\n hasCopiedTitle: \"Copied!\",\n download: \"Download\",\n openLink: \"Open in new tab\",\n processed: \"The content has been processed\",\n },\n errorMessage: {\n title: \"Oops, something went wrong\",\n description: \"Sorry, an error occurred.\",\n back: \"Go back\",\n goToFrontPage: \"Go to frontpage\",\n },\n figure: {\n button: {\n alternative: \"Switch to visually interpreted video\",\n original: \"Switch to original video\",\n },\n },\n contentTypes: {\n all: \"All\",\n article: \"Article\",\n subject: \"Subject\",\n \"topic-article\": \"Topic article\",\n learningpath: \"Learning path\",\n \"learning-path\": \"Learning path\",\n \"subject-material\": \"Subject material\",\n \"tasks-and-activities\": \"Task and activities\",\n \"source-material\": \"Source material\",\n \"assessment-resources\": \"Assessment resource\",\n topic: \"Topic\",\n multidisciplinary: \"Multidisciplinary case\",\n image: \"Image\",\n concept: \"Concept\",\n audio: \"Audio\",\n podcast: \"Podcast\",\n h5p: \"H5P\",\n video: \"Video\",\n missing: \"Unknown\",\n external: \"External\",\n gloss: \"Gloss\",\n programme: \"Programme\",\n \"podcast-series\": \"Podcast series\",\n \"frontpage-article\": \"About NDLA article\",\n },\n languages: {\n nb: \"Norwegian Bokmål\",\n nn: \"Norwegian Nynorsk\",\n en: \"English\",\n fr: \"French\",\n de: \"German\",\n se: \"Northern Sami\",\n sma: \"Southern Sami\",\n es: \"Spanish\",\n zh: \"Chinese\",\n ukr: \"Ukranian\",\n unknown: \"Unknown\",\n prefixChangeLanguage: \"Choose language\",\n },\n breadcrumb: {\n toFrontpage: \"NDLA frontpage\",\n breadcrumb: \"Breadcrumb\",\n },\n codeBlock: {\n copiedCode: \"Copied code\",\n copyCode: \"Copy code\",\n },\n cancel: \"Cancel\",\n close: \"Close\",\n loading: \"Loading\",\n title: \"Title\",\n save: \"Save\",\n email: \"Email\",\n finished: \"Finished\",\n audio: {\n play: \"Play\",\n pause: \"Pause\",\n progressBar: \"Progress bar\",\n valueText: \"{{start}} of {{end}}\",\n controls: {\n forward15sec: \"Forward 15 seconds\",\n rewind15sec: \"Rewind 15 seconds\",\n selectSpeed: \"Choose speed\",\n adjustVolume: \"Adjust volume\",\n },\n textVersion: {\n heading: \"Text version\",\n close: \"Close text version\",\n },\n readMoreDescriptionLabel: \"Show more\",\n readLessDescriptionLabel: \"Show less\",\n },\n source: \"Source\",\n related: {\n title: \"Related content\",\n linkInfo: \"Web page at\",\n showMore: \"Show more related content\",\n showLess: \"Show less\",\n },\n download: \"Download file: \",\n factbox: {\n open: \"Open fact box\",\n close: \"Close fact box\",\n },\n embed: {\n linkError: \"Failed to show link.\",\n unsupported: `Embed {{type}} not supported.`,\n embedError: `An error occurred while loading the {{type}}. Try reloading the page.`,\n type: {\n image: \"Image\",\n video: \"Video\",\n audio: \"Audio\",\n podcast: \"Podcast\",\n concept: \"Concept\",\n h5p: \"H5P\",\n external: \"External resource\",\n gloss: \"Gloss\",\n copyright: \"Text\",\n code: \"Code block\",\n disclaimer: \"Accessibility warning\",\n },\n },\n uuDisclaimer: { title: \"Accessibility\" },\n gloss: {\n examples: \"Examples\",\n showExamples: \"Show examples\",\n wordClass: \"Word class\",\n play: \"Play gloss\",\n transcriptions: {\n traditional: \"Traditional spelling\",\n pinyin: \"Pinyin\",\n },\n },\n wordClass: {\n [wordClass.adjective]: \"Adjective\",\n [wordClass.adverb]: \"Adverb\",\n [wordClass.properNoun]: \"Proper Noun\",\n [wordClass.auxiliary]: \"Auxiliary\",\n [wordClass.complement]: \"Complement\",\n [wordClass.conjunction]: \"Conjunction\",\n [wordClass.coverb]: \"Coverb\",\n [wordClass.determiner]: \"Determiner\",\n [wordClass.interjection]: \"Interjection\",\n [wordClass.quantifier]: \"Quantifier\",\n [wordClass.marker]: \"Marker\",\n [wordClass.modalVerb]: \"Modal Verb\",\n [wordClass.measureWord]: \"Measure Word\",\n [wordClass.noun]: \"Noun\",\n [wordClass[\"noun-zh\"]]: \"Noun\",\n [wordClass.nounPhrase]: \"Noun Phrase\",\n [wordClass.onomatopoeia]: \"Onomatopoeia\",\n [wordClass.particle]: \"Particle\",\n [wordClass.demonstrative]: \"Demonstrative\",\n [wordClass.personalPronoun]: \"Personal Pronoun\",\n [wordClass.preposition]: \"Preposition\",\n [wordClass.pronoun]: \"Pronoun\",\n [wordClass.questionWord]: \"Question Word\",\n [wordClass.locationWord]: \"Location Word\",\n [wordClass.suffix]: \"Suffix\",\n [wordClass.numeral]: \"Numeral\",\n [wordClass.timeWord]: \"Time word\",\n [wordClass.timeExpression]: \"Time Expression\",\n [wordClass.stativeVerb]: \"Stative Verb\",\n [wordClass.subordinatingConjunction]: \"Subordinating Conjunction\",\n [wordClass.exclamationWord]: \"Exclamation Word\",\n [wordClass.expression]: \"Expression\",\n [wordClass.verb]: \"Verb\",\n [wordClass.verbComplement]: \"Verb-Complement\",\n [wordClass.verbObject]: \"Verb-Object\",\n },\n login: \"Log in\",\n component: {\n tagsInput: {\n clearTriggerLabel: \"Clear all tags\",\n deleteTagTriggerLabel: \"Remove tag {{tag}}\",\n tagAdded: \"Added tag {{tag}}\",\n tagsPasted: \"Pasted {{length}} tags\",\n tagEdited: \"Edited tag {{tag}}. Press enter to save, or escape to cancel.\",\n tagUpdated: \"Tag updated to {{tag}}\",\n tagDeleted: \"Tag {{tag}} deleted\",\n tagSelected: \"Tag {{tag}} selected. Press enter to edit. Press backspace or delete to delete.\",\n },\n combobox: {\n triggerLabel: \"Show suggestions\",\n clearTriggerLabel: \"Clear selection\",\n },\n pagination: {\n rootLabel: \"Pagination\",\n prevTriggerLabel: \"Previous page\",\n nextTriggerLabel: \"Next page\",\n lastPage: \"Last page, page {{page}}\",\n page: \"Page {{page}}\",\n },\n imageSearch: {\n searchPlaceholder: \"Search images\",\n searchButtonTitle: \"Search\",\n imagePreview: {\n creatorsLabel: \"Image\",\n license: \"License\",\n caption: \"Caption\",\n altText: \"Alt-text\",\n modelRelease: \"Model released\",\n tags: \"Tags\",\n checkboxLabel: \"Set as meta image\",\n close: \"Close\",\n useImageTitle: \"Use image\",\n },\n },\n audioSearch: {\n searchPlaceholder: \"Search in audio files\",\n searchButtonTitle: \"Search\",\n useAudio: \"Chose audio\",\n noResults: \"No audio files found\",\n },\n videoSearch: {\n searchPlaceholder: \"Search videos\",\n searchButtonTitle: \"Search\",\n loadMoreVideos: \"Load more videos\",\n noResults: \"No videos found\",\n addVideo: \"Use video\",\n previewVideo: \"Preview\",\n is360Video: \"VR video\",\n close: \"Lukk\",\n },\n datePicker: {\n dayCell: {\n unavailable: \"Unavailable date. {{date}}\",\n selected: \"Selected date. {{date}}\",\n select: \"Select date. {{date}}\",\n },\n nextTrigger: {\n day: \"Go to next month\",\n month: \"Go to next year\",\n year: \"Go to next decade\",\n },\n prevTrigger: {\n day: \"Go to previous month\",\n month: \"Go to previous year\",\n year: \"Go to previous decade\",\n },\n monthSelect: \"Select month\",\n yearSelect: \"Select year\",\n viewTrigger: {\n day: \"Switch to day view\",\n month: \"Switch to month view\",\n year: \"Switch to year view\",\n },\n presetTrigger: {\n single: \"Select {{date}}\",\n range: \"Select from {{start}} to {{end}}\",\n },\n clearTrigger: \"Clear selected dates\",\n trigger: {\n open: \"Open date picker\",\n close: \"Close date picker\",\n },\n content: \"Calendar\",\n },\n },\n richTextEditor: {\n tooltip: {\n bold: \"Bold ({{shortcut}})\",\n code: \"Code ({{shortcut}})\",\n sub: \"Subscript ({{shortcut}})\",\n sup: \"Superscript ({{shortcut}})\",\n underlined: \"Underlined ({{shortcut}})\",\n italic: \"Italic ({{shortcut}})\",\n \"numbered-list\": \"Numbered list ({{shortcut}})\",\n \"letter-list\": \"Alphabetical list ({{shortcut}})\",\n \"bulleted-list\": \"Bulleted list ({{shortcut}})\",\n heading: \"Heading {{level}} ({{shortcut}})\",\n paragraph: \"Paragraph ({{shortcut}})\",\n section: \"Section ({{shortcut}})\",\n link: \"Link ({{shortcut}})\",\n },\n },\n articleTraits: {\n VIDEO: \"Video\",\n AUDIO: \"Audio\",\n H5P: \"Interactive content\",\n PODCAST: \"Podcast\",\n },\n relevance: {\n core: \"Core content\",\n supplementary: \"Supplementary content\",\n },\n};\n\nexport default messages;\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW;CACf,GAAG,OAAO,QAAQ,iBAAiB,CAAC,QAAgC,KAAK,SAAS;AAChF,MAAI,KAAK,MAAM,KAAK,GAAG;AACvB,SAAO;IACN,EAAE,CAAC;CACN,SAAS;CACT,mBAAmB;GAChB,kBAAkB,kBAAkB;GACpC,kBAAkB,mBAAmB;GACrC,kBAAkB,gBAAgB;GAClC,kBAAkB,QAAQ;GAC1B,aAAa,sBAAsB;EACrC;CACD,cAAc;GACX,aAAa,kBAAkB;GAC/B,aAAa,eAAe;GAC5B,aAAa,sBAAsB;GACnC,aAAa,UAAU;EACzB;CACD,MAAM;EACJ,aAAa;EACb,UAAU;EACX;CACD,MAAM,EACJ,SAAS,wCACV;CACD,SAAS;EACP,aAAa;EACb,YAAY;EACZ,sBAAsB;EACtB,2BAA2B;EAC3B,uBAAuB;EACvB,oBAAoB;EACpB,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,qBAAqB;EACrB,WAAW;EACX,QAAQ,EACN,aAAa,8EACd;EACD,WAAW;EACZ;CACD,UAAU,EACR,aAAa,qBACd;CACD,cAAc;EACZ,YAAY;EACZ,aAAa;EACd;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,QAAQ;GACR,OAAO;GACP,OAAO;GACP,KAAK;GACL,OAAO;GACP,WAAW;GACX,SAAS;GACT,OAAO;GACP,SAAS;GACT,OAAO;GACR;EACD,WAAW;GACT,SAAS;GACT,aAAa;GACb,WAAW;GACX,gBAAgB;GACjB;EACD,OAAO,EACL,OAAO,2BACR;EACD,QAAQ;GACN,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;IACT,WAAW;IACX,sBAAsB;IACtB,yBAAyB;IACzB,cAAc;IACd,gBAAgB;IACjB;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,MAAM;GACJ,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;GACX,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,SAAS;GACP,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW,EACT,WAAW,4BACZ;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,WAAW,EACT,WAAW,sBACZ;GACF;EACD,KAAK;GACH,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,SAAS;GACP,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;IACT,SAAS;IACT,aAAa;IACb,WAAW;IACX,gBAAgB;IACjB;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,oBAAoB;GACpB,WAAW;IACT,SAAS;IACT,aAAa;IACb,WAAW;IACX,gBAAgB;IACjB;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW,EACT,WAAW,4BACZ;GACF;EACD,WAAW;EACX,OAAO;EACP,aAAa;EACb,UAAU;GACR,KAAK;GACL,SAAS;GACT,IAAI;GACJ,UAAU;GACV,SA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ACT,cAAc;IACd,MAAM;IACN,eAAe;IACf,OAAO;IACP,eAAe;IAChB;GACF;EACD,aAAa;GACX,mBAAmB;GACnB,mBAAmB;GACnB,UAAU;GACV,WAAW;GACZ;EACD,aAAa;GACX,mBAAmB;GACnB,mBAAmB;GACnB,gBAAgB;GAChB,WAAW;GACX,UAAU;GACV,cAAc;GACd,YAAY;GACZ,OAAO;GACR;EACD,YAAY;GACV,SAAS;IACP,aAAa;IACb,UAAU;IACV,QAAQ;IACT;GACD,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,aAAa;GACb,YAAY;GACZ,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,eAAe;IACb,QAAQ;IACR,OAAO;IACR;GACD,cAAc;GACd,SAAS;IACP,MAAM;IACN,OAAO;IACR;GACD,SAAS;GACV;EACF;CACD,gBAAgB,EACd,SAAS;EACP,MAAM;EACN,MAAM;EACN,KAAK;EACL,KAAK;EACL,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,eAAe;EACf,iBAAiB;EACjB,SAAS;EACT,WAAW;EACX,SAAS;EACT,MAAM;EACP,EACF;CACD,eAAe;EACb,OAAO;EACP,OAAO;EACP,KAAK;EACL,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,eAAe;EAChB;CACF;AAED,0BAAe"}
1
+ {"version":3,"file":"messages-en.mjs","names":[],"sources":["../../src/locale/messages-en.ts"],"sourcesContent":["/**\n * Copyright (c) 2018-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { contributorTypes } from \"@ndla/licenses\";\nimport { subjectCategories } from \"../model/SubjectCategories\";\nimport { subjectTypes } from \"../model/SubjectTypes\";\nimport { wordClass } from \"../model/WordClass\";\n\nconst messages = {\n ...Object.entries(contributorTypes).reduce<Record<string, string>>((acc, curr) => {\n acc[curr[0]] = curr[1].en;\n return acc;\n }, {}),\n askNDLA: \"Ask NDLA\",\n subjectCategories: {\n [subjectCategories.ACTIVE_SUBJECTS]: \"Active\",\n [subjectCategories.ARCHIVE_SUBJECTS]: \"Expired\",\n [subjectCategories.BETA_SUBJECTS]: \"Revised\",\n [subjectCategories.OTHER]: \"Other resources\",\n [subjectTypes.RESOURCE_COLLECTION]: \"Resource collections\",\n },\n subjectTypes: {\n [subjectTypes.ARCHIVE_SUBJECT]: \"Archive subject\",\n [subjectTypes.BETA_SUBJECT]: \"Beta subject\",\n [subjectTypes.RESOURCE_COLLECTION]: \"Resource collection\",\n [subjectTypes.SUBJECT]: \"Subject\",\n },\n meta: {\n description: \"Norwegian Digital Learning Arena, Open Educational Resources for upper secondary education.\",\n keywords: \"open educational resources,teaching,learning\",\n },\n logo: {\n altText: \"The Norwegian Digital Learning Arena\",\n },\n article: {\n lastUpdated: \"Last revised date\",\n useContent: \"Cite or reuse?\",\n authorsLabel_article: \"Written by\",\n authorsLabel_learningPath: \"Made by\",\n authorsLabel_external: \"This link is added by\",\n copyPageLinkCopied: \"Link copied\",\n copyHeaderLink: \"Copy link to header\",\n conjunction: \"and\",\n supplierLabel_one: \"Rightsholder:\",\n supplierLabel_other: \"Rightsholders:\",\n printPage: \"Print text\",\n access: {\n onlyTeacher: \"This resource is accessible only to teachers who are logged in with Feide.\",\n },\n footnotes: \"Footnotes\",\n },\n external: {\n lastUpdated: \"Last revised date\",\n },\n learningPath: {\n copiedFrom: \"This is a remix of a different learning path\",\n lastUpdated: \"Last revised date\",\n },\n license: {\n tabs: {\n text: \"Text\",\n images: \"Images\",\n audio: \"Audio\",\n video: \"Video\",\n h5p: \"H5P\",\n files: \"Files\",\n embedlink: \"Embedded link\",\n concept: \"Concepts\",\n gloss: \"Glosses\",\n podcast: \"Podcast\",\n other: \"Other content\",\n },\n embedlink: {\n heading: \"How to show the article in other content\",\n description: \"This url shows the article without menu and footer\",\n copyTitle: \"Copy link\",\n hasCopiedTitle: \"Link copied\",\n },\n image: {\n rules: \"Rules for use of image:\",\n },\n images: {\n heading: \"How to reuse images\",\n description: \"Remember to copy the text to be attached to the image where you use it.\",\n rules: \"Rules for use of image\",\n itemImage: {\n ariaLabel: \"Open image in new window\",\n zoomImageButtonLabel: \"Expand image\",\n zoomOutImageButtonLabel: \"Shrink image\",\n expandByline: \"Show byline\",\n minimizeByline: \"Hide byline\",\n },\n licenseText: \"This image has the license\",\n restrictedUseText: \"This image has\",\n },\n text: {\n heading: \"How to reuse the text\",\n description: \"Remember to refer to the source when reusing text.\",\n rules: \"Rules for use of text\",\n published: \"Published\",\n licenseText: \"This text has the license\",\n restrictedUseText: \"This text has\",\n },\n audio: {\n heading: \"How to reuse audio files\",\n description: \"Remember to copy the text to be attached to the audio where you use it.\",\n rules: \"Rules for use of audio file\",\n licenseText: \"This audio file has the license\",\n restrictedUseText: \"This audio file has\",\n },\n podcast: {\n heading: \"How to reuse podcasts\",\n description: \"Remember to copy the text to be attached to the podcast where you use it.\",\n rules: \"Rules for use of podcast\",\n licenseText: \"This podcast has the license\",\n restrictedUseText: \"This podcast has\",\n },\n video: {\n heading: \"How to reuse videos\",\n description: \"Remember to copy the text to be attached to the video where you use it.\",\n rules: \"Rules for use of video files\",\n itemImage: {\n ariaLabel: \"Open video in new window\",\n },\n licenseText: \"This video has the license\",\n restrictedUseText: \"This video has\",\n },\n other: {\n heading: \"How to reuse other content\",\n description: \"You will find guidelines for use of other content in the asset\",\n itemImage: {\n ariaLabel: \"Open in new window\",\n },\n },\n h5p: {\n heading: \"How to reuse H5P content\",\n description: \"You will find guidelines for use of H5P content in the asset\",\n rules: \"Rules for use of H5P\",\n licenseText: \"This interactive task (H5P) is licensed\",\n restrictedUseText: \"This interactive task (H5P) has\",\n },\n concept: {\n heading: \"How to reuse concept content\",\n description: \"Remember that built-in content might have a different license than the explanation text\",\n rules: \"Rules for use of concept\",\n embedlink: {\n heading: \"How to show the concept in other content\",\n description: \"This url shows the concept without menu and footer\",\n copyTitle: \"Copy embed link\",\n hasCopiedTitle: \"Embed link copied\",\n },\n licenseText: \"This concept has the license\",\n restrictedUseText: \"This concept has\",\n },\n gloss: {\n heading: \"How to reuse gloss content\",\n description: \"Remember that built-in content might have a different license than the gloss text\",\n rules: \"Rules for use of gloss\",\n showOrHideExamples: \"Show or hide examples\",\n embedlink: {\n heading: \"How to show the gloss in other content\",\n description: \"This url shows the gloss without menu and footer\",\n copyTitle: \"Copy embed link\",\n hasCopiedTitle: \"Embed link copied\",\n },\n licenseText: \"This gloss has the license\",\n restrictedUseText: \"This gloss has\",\n },\n files: {\n heading: \"How to reuse files\",\n description: \"Remember to copy the text to be attached to the file where you use it.\",\n rules: \"Rules for use of file\",\n itemImage: {\n ariaLabel: \"Open video in new window\",\n },\n },\n copyTitle: \"Copy source reference\",\n embed: \"Embed\",\n embedCopied: \"Copied embed code!\",\n copyText: {\n now: \"now\",\n podcast: \"podcast\",\n by: \"by\",\n internet: \"[Internet]. \",\n noTitle: \"No title\",\n downloadedFrom: \"Downloaded from: \",\n readDate: \"Read: \",\n },\n hasCopiedTitle: \"Copied!\",\n download: \"Download\",\n openLink: \"Open in new tab\",\n processed: \"The content has been processed\",\n },\n errorMessage: {\n title: \"Oops, something went wrong\",\n description: \"Sorry, an error occurred.\",\n back: \"Go back\",\n goToFrontPage: \"Go to frontpage\",\n },\n figure: {\n button: {\n alternative: \"Switch to visually interpreted video\",\n original: \"Switch to original video\",\n },\n },\n contentTypes: {\n all: \"All\",\n article: \"Article\",\n subject: \"Subject\",\n \"topic-article\": \"Topic article\",\n learningpath: \"Learning path\",\n \"learning-path\": \"Learning path\",\n \"subject-material\": \"Subject material\",\n standard: \"Subject material\",\n \"tasks-and-activities\": \"Task and activities\",\n \"source-material\": \"Source material\",\n \"assessment-resources\": \"Assessment resource\",\n topic: \"Topic\",\n multidisciplinary: \"Multidisciplinary case\",\n image: \"Image\",\n concept: \"Concept\",\n audio: \"Audio\",\n podcast: \"Podcast\",\n h5p: \"H5P\",\n video: \"Video\",\n missing: \"Unknown\",\n external: \"External\",\n gloss: \"Gloss\",\n programme: \"Programme\",\n \"podcast-series\": \"Podcast series\",\n \"frontpage-article\": \"About NDLA article\",\n },\n languages: {\n nb: \"Norwegian Bokmål\",\n nn: \"Norwegian Nynorsk\",\n en: \"English\",\n fr: \"French\",\n de: \"German\",\n se: \"Northern Sami\",\n sma: \"Southern Sami\",\n es: \"Spanish\",\n zh: \"Chinese\",\n ukr: \"Ukranian\",\n unknown: \"Unknown\",\n prefixChangeLanguage: \"Choose language\",\n },\n breadcrumb: {\n toFrontpage: \"NDLA frontpage\",\n breadcrumb: \"Breadcrumb\",\n },\n codeBlock: {\n copiedCode: \"Copied code\",\n copyCode: \"Copy code\",\n },\n cancel: \"Cancel\",\n close: \"Close\",\n loading: \"Loading\",\n title: \"Title\",\n save: \"Save\",\n email: \"Email\",\n finished: \"Finished\",\n audio: {\n play: \"Play\",\n pause: \"Pause\",\n progressBar: \"Progress bar\",\n valueText: \"{{start}} of {{end}}\",\n controls: {\n forward15sec: \"Forward 15 seconds\",\n rewind15sec: \"Rewind 15 seconds\",\n selectSpeed: \"Choose speed\",\n adjustVolume: \"Adjust volume\",\n },\n textVersion: {\n heading: \"Text version\",\n close: \"Close text version\",\n },\n readMoreDescriptionLabel: \"Show more\",\n readLessDescriptionLabel: \"Show less\",\n },\n source: \"Source\",\n related: {\n title: \"Related content\",\n linkInfo: \"Web page at\",\n showMore: \"Show more related content\",\n showLess: \"Show less\",\n },\n download: \"Download file: \",\n factbox: {\n open: \"Open fact box\",\n close: \"Close fact box\",\n },\n embed: {\n linkError: \"Failed to show link.\",\n unsupported: `Embed {{type}} not supported.`,\n embedError: `An error occurred while loading the {{type}}. Try reloading the page.`,\n type: {\n image: \"Image\",\n video: \"Video\",\n audio: \"Audio\",\n podcast: \"Podcast\",\n concept: \"Concept\",\n h5p: \"H5P\",\n external: \"External resource\",\n gloss: \"Gloss\",\n copyright: \"Text\",\n code: \"Code block\",\n disclaimer: \"Accessibility warning\",\n },\n },\n uuDisclaimer: { title: \"Accessibility\" },\n gloss: {\n examples: \"Examples\",\n showExamples: \"Show examples\",\n wordClass: \"Word class\",\n play: \"Play gloss\",\n transcriptions: {\n traditional: \"Traditional spelling\",\n pinyin: \"Pinyin\",\n },\n },\n wordClass: {\n [wordClass.adjective]: \"Adjective\",\n [wordClass.adverb]: \"Adverb\",\n [wordClass.properNoun]: \"Proper Noun\",\n [wordClass.auxiliary]: \"Auxiliary\",\n [wordClass.complement]: \"Complement\",\n [wordClass.conjunction]: \"Conjunction\",\n [wordClass.coverb]: \"Coverb\",\n [wordClass.determiner]: \"Determiner\",\n [wordClass.interjection]: \"Interjection\",\n [wordClass.quantifier]: \"Quantifier\",\n [wordClass.marker]: \"Marker\",\n [wordClass.modalVerb]: \"Modal Verb\",\n [wordClass.measureWord]: \"Measure Word\",\n [wordClass.noun]: \"Noun\",\n [wordClass[\"noun-zh\"]]: \"Noun\",\n [wordClass.nounPhrase]: \"Noun Phrase\",\n [wordClass.onomatopoeia]: \"Onomatopoeia\",\n [wordClass.particle]: \"Particle\",\n [wordClass.demonstrative]: \"Demonstrative\",\n [wordClass.personalPronoun]: \"Personal Pronoun\",\n [wordClass.preposition]: \"Preposition\",\n [wordClass.pronoun]: \"Pronoun\",\n [wordClass.questionWord]: \"Question Word\",\n [wordClass.locationWord]: \"Location Word\",\n [wordClass.suffix]: \"Suffix\",\n [wordClass.numeral]: \"Numeral\",\n [wordClass.timeWord]: \"Time word\",\n [wordClass.timeExpression]: \"Time Expression\",\n [wordClass.stativeVerb]: \"Stative Verb\",\n [wordClass.subordinatingConjunction]: \"Subordinating Conjunction\",\n [wordClass.exclamationWord]: \"Exclamation Word\",\n [wordClass.expression]: \"Expression\",\n [wordClass.verb]: \"Verb\",\n [wordClass.verbComplement]: \"Verb-Complement\",\n [wordClass.verbObject]: \"Verb-Object\",\n },\n login: \"Log in\",\n component: {\n tagsInput: {\n clearTriggerLabel: \"Clear all tags\",\n deleteTagTriggerLabel: \"Remove tag {{tag}}\",\n tagAdded: \"Added tag {{tag}}\",\n tagsPasted: \"Pasted {{length}} tags\",\n tagEdited: \"Edited tag {{tag}}. Press enter to save, or escape to cancel.\",\n tagUpdated: \"Tag updated to {{tag}}\",\n tagDeleted: \"Tag {{tag}} deleted\",\n tagSelected: \"Tag {{tag}} selected. Press enter to edit. Press backspace or delete to delete.\",\n },\n combobox: {\n triggerLabel: \"Show suggestions\",\n clearTriggerLabel: \"Clear selection\",\n },\n pagination: {\n rootLabel: \"Pagination\",\n prevTriggerLabel: \"Previous page\",\n nextTriggerLabel: \"Next page\",\n lastPage: \"Last page, page {{page}}\",\n page: \"Page {{page}}\",\n },\n imageSearch: {\n searchPlaceholder: \"Search images\",\n searchButtonTitle: \"Search\",\n imagePreview: {\n creatorsLabel: \"Image\",\n license: \"License\",\n caption: \"Caption\",\n altText: \"Alt-text\",\n modelRelease: \"Model released\",\n tags: \"Tags\",\n checkboxLabel: \"Set as meta image\",\n close: \"Close\",\n useImageTitle: \"Use image\",\n },\n },\n audioSearch: {\n searchPlaceholder: \"Search in audio files\",\n searchButtonTitle: \"Search\",\n useAudio: \"Chose audio\",\n noResults: \"No audio files found\",\n },\n videoSearch: {\n searchPlaceholder: \"Search videos\",\n searchButtonTitle: \"Search\",\n loadMoreVideos: \"Load more videos\",\n noResults: \"No videos found\",\n addVideo: \"Use video\",\n previewVideo: \"Preview\",\n is360Video: \"VR video\",\n close: \"Lukk\",\n },\n datePicker: {\n dayCell: {\n unavailable: \"Unavailable date. {{date}}\",\n selected: \"Selected date. {{date}}\",\n select: \"Select date. {{date}}\",\n },\n nextTrigger: {\n day: \"Go to next month\",\n month: \"Go to next year\",\n year: \"Go to next decade\",\n },\n prevTrigger: {\n day: \"Go to previous month\",\n month: \"Go to previous year\",\n year: \"Go to previous decade\",\n },\n monthSelect: \"Select month\",\n yearSelect: \"Select year\",\n viewTrigger: {\n day: \"Switch to day view\",\n month: \"Switch to month view\",\n year: \"Switch to year view\",\n },\n presetTrigger: {\n single: \"Select {{date}}\",\n range: \"Select from {{start}} to {{end}}\",\n },\n clearTrigger: \"Clear selected dates\",\n trigger: {\n open: \"Open date picker\",\n close: \"Close date picker\",\n },\n content: \"Calendar\",\n },\n },\n richTextEditor: {\n tooltip: {\n bold: \"Bold ({{shortcut}})\",\n code: \"Code ({{shortcut}})\",\n sub: \"Subscript ({{shortcut}})\",\n sup: \"Superscript ({{shortcut}})\",\n underlined: \"Underlined ({{shortcut}})\",\n italic: \"Italic ({{shortcut}})\",\n \"numbered-list\": \"Numbered list ({{shortcut}})\",\n \"letter-list\": \"Alphabetical list ({{shortcut}})\",\n \"bulleted-list\": \"Bulleted list ({{shortcut}})\",\n heading: \"Heading {{level}} ({{shortcut}})\",\n paragraph: \"Paragraph ({{shortcut}})\",\n section: \"Section ({{shortcut}})\",\n link: \"Link ({{shortcut}})\",\n },\n },\n articleTraits: {\n VIDEO: \"Video\",\n AUDIO: \"Audio\",\n H5P: \"Interactive content\",\n PODCAST: \"Podcast\",\n },\n relevance: {\n core: \"Core content\",\n supplementary: \"Supplementary content\",\n },\n};\n\nexport default messages;\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW;CACf,GAAG,OAAO,QAAQ,iBAAiB,CAAC,QAAgC,KAAK,SAAS;AAChF,MAAI,KAAK,MAAM,KAAK,GAAG;AACvB,SAAO;IACN,EAAE,CAAC;CACN,SAAS;CACT,mBAAmB;GAChB,kBAAkB,kBAAkB;GACpC,kBAAkB,mBAAmB;GACrC,kBAAkB,gBAAgB;GAClC,kBAAkB,QAAQ;GAC1B,aAAa,sBAAsB;EACrC;CACD,cAAc;GACX,aAAa,kBAAkB;GAC/B,aAAa,eAAe;GAC5B,aAAa,sBAAsB;GACnC,aAAa,UAAU;EACzB;CACD,MAAM;EACJ,aAAa;EACb,UAAU;EACX;CACD,MAAM,EACJ,SAAS,wCACV;CACD,SAAS;EACP,aAAa;EACb,YAAY;EACZ,sBAAsB;EACtB,2BAA2B;EAC3B,uBAAuB;EACvB,oBAAoB;EACpB,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,qBAAqB;EACrB,WAAW;EACX,QAAQ,EACN,aAAa,8EACd;EACD,WAAW;EACZ;CACD,UAAU,EACR,aAAa,qBACd;CACD,cAAc;EACZ,YAAY;EACZ,aAAa;EACd;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,QAAQ;GACR,OAAO;GACP,OAAO;GACP,KAAK;GACL,OAAO;GACP,WAAW;GACX,SAAS;GACT,OAAO;GACP,SAAS;GACT,OAAO;GACR;EACD,WAAW;GACT,SAAS;GACT,aAAa;GACb,WAAW;GACX,gBAAgB;GACjB;EACD,OAAO,EACL,OAAO,2BACR;EACD,QAAQ;GACN,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;IACT,WAAW;IACX,sBAAsB;IACtB,yBAAyB;IACzB,cAAc;IACd,gBAAgB;IACjB;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,MAAM;GACJ,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;GACX,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,SAAS;GACP,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW,EACT,WAAW,4BACZ;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,SAAS;GACT,aAAa;GACb,WAAW,EACT,WAAW,sBACZ;GACF;EACD,KAAK;GACH,SAAS;GACT,aAAa;GACb,OAAO;GACP,aAAa;GACb,mBAAmB;GACpB;EACD,SAAS;GACP,SAAS;GACT,aAAa;GACb,OAAO;GACP,WAAW;IACT,SAAS;IACT,aAAa;IACb,WAAW;IACX,gBAAgB;IACjB;GACD,aAAa;GACb,mBAAmB;GACpB;EACD,OAAO;GACL,S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GACT,mBAAmB;GACnB,uBAAuB;GACvB,UAAU;GACV,YAAY;GACZ,WAAW;GACX,YAAY;GACZ,YAAY;GACZ,aAAa;GACd;EACD,UAAU;GACR,cAAc;GACd,mBAAmB;GACpB;EACD,YAAY;GACV,WAAW;GACX,kBAAkB;GAClB,kBAAkB;GAClB,UAAU;GACV,MAAM;GACP;EACD,aAAa;GACX,mBAAmB;GACnB,mBAAmB;GACnB,cAAc;IACZ,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,cAAc;IACd,MAAM;IACN,eAAe;IACf,OAAO;IACP,eAAe;IAChB;GACF;EACD,aAAa;GACX,mBAAmB;GACnB,mBAAmB;GACnB,UAAU;GACV,WAAW;GACZ;EACD,aAAa;GACX,mBAAmB;GACnB,mBAAmB;GACnB,gBAAgB;GAChB,WAAW;GACX,UAAU;GACV,cAAc;GACd,YAAY;GACZ,OAAO;GACR;EACD,YAAY;GACV,SAAS;IACP,aAAa;IACb,UAAU;IACV,QAAQ;IACT;GACD,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,aAAa;GACb,YAAY;GACZ,aAAa;IACX,KAAK;IACL,OAAO;IACP,MAAM;IACP;GACD,eAAe;IACb,QAAQ;IACR,OAAO;IACR;GACD,cAAc;GACd,SAAS;IACP,MAAM;IACN,OAAO;IACR;GACD,SAAS;GACV;EACF;CACD,gBAAgB,EACd,SAAS;EACP,MAAM;EACN,MAAM;EACN,KAAK;EACL,KAAK;EACL,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,eAAe;EACf,iBAAiB;EACjB,SAAS;EACT,WAAW;EACX,SAAS;EACT,MAAM;EACP,EACF;CACD,eAAe;EACb,OAAO;EACP,OAAO;EACP,KAAK;EACL,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,eAAe;EAChB;CACF;AAED,0BAAe"}