@ndla/ui 55.0.13-alpha.0 → 55.0.15-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 (337) hide show
  1. package/dist/panda.buildinfo.json +142 -1
  2. package/dist/styles.css +597 -0
  3. package/es/Article/ArticleByline.js +7 -7
  4. package/es/Article/ArticleParagraph.js +11 -13
  5. package/es/AudioPlayer/AudioPlayer.js +1 -0
  6. package/es/CampaignBlock/CampaignBlock.js +103 -68
  7. package/es/Concept/Concept.js +69 -0
  8. package/es/ContactBlock/ContactBlock.js +17 -17
  9. package/es/ContentTypeBadge/ContentTypeBadgeNew.js +48 -0
  10. package/es/Embed/AudioEmbed.js +1 -2
  11. package/es/Embed/BrightcoveEmbed.js +13 -25
  12. package/es/Embed/ConceptEmbed.js +57 -301
  13. package/es/Embed/ConceptListEmbed.js +18 -24
  14. package/es/Embed/ContentLinkEmbed.js +10 -10
  15. package/es/Embed/CopyrightEmbed.js +3 -21
  16. package/es/Embed/ExternalEmbed.js +10 -18
  17. package/es/Embed/FootnoteEmbed.js +11 -8
  18. package/es/Embed/GlossEmbed.js +68 -0
  19. package/es/Embed/H5pEmbed.js +19 -19
  20. package/es/Embed/IframeEmbed.js +9 -6
  21. package/es/Embed/InlineTriggerButton.js +70 -0
  22. package/es/Embed/UnknownEmbed.js +9 -9
  23. package/es/Embed/UuDisclaimerEmbed.js +14 -25
  24. package/es/Embed/index.js +1 -3
  25. package/es/ErrorMessage/ErrorMessage.js +41 -22
  26. package/es/ErrorMessage/ErrorResourceAccessDenied.js +8 -6
  27. package/es/FactBox/FactBox.js +118 -47
  28. package/es/FileList/PdfFile.js +23 -5
  29. package/es/Gloss/Gloss.js +116 -86
  30. package/es/Gloss/GlossExample.js +49 -51
  31. package/es/LicenseByline/EmbedByline.js +143 -33
  32. package/es/LicenseByline/LicenseLink.js +16 -9
  33. package/es/LicenseByline/index.js +2 -2
  34. package/es/LinkBlock/LinkBlock.js +61 -33
  35. package/es/LinkBlock/LinkBlockSection.js +9 -6
  36. package/es/Logo/Logo.js +1 -30
  37. package/es/RelatedArticleList/RelatedArticleList.js +70 -87
  38. package/es/ResourceBox/ResourceBox.js +65 -37
  39. package/es/TagSelector/TagSelector.js +124 -131
  40. package/es/i18n/index.js +2 -1
  41. package/es/i18n/useComponentTranslations.js +83 -0
  42. package/es/index.js +4 -12
  43. package/es/locale/messages-en.js +30 -4
  44. package/es/locale/messages-nb.js +30 -4
  45. package/es/locale/messages-nn.js +30 -4
  46. package/es/locale/messages-se.js +30 -4
  47. package/es/locale/messages-sma.js +30 -4
  48. package/es/model/ContentType.js +3 -0
  49. package/es/styles.css +597 -0
  50. package/lib/Article/ArticleByline.js +8 -8
  51. package/lib/Article/ArticleParagraph.js +12 -14
  52. package/lib/AudioPlayer/AudioPlayer.js +1 -0
  53. package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
  54. package/lib/CampaignBlock/CampaignBlock.js +106 -68
  55. package/lib/Concept/Concept.d.ts +18 -0
  56. package/lib/Concept/Concept.js +75 -0
  57. package/lib/ContactBlock/ContactBlock.js +18 -18
  58. package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +17 -0
  59. package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +56 -0
  60. package/lib/Embed/AudioEmbed.js +2 -3
  61. package/lib/Embed/BrightcoveEmbed.d.ts +1 -2
  62. package/lib/Embed/BrightcoveEmbed.js +16 -26
  63. package/lib/Embed/ConceptEmbed.d.ts +15 -21
  64. package/lib/Embed/ConceptEmbed.js +58 -301
  65. package/lib/Embed/ConceptListEmbed.js +21 -26
  66. package/lib/Embed/ContentLinkEmbed.js +10 -11
  67. package/lib/Embed/CopyrightEmbed.js +5 -22
  68. package/lib/Embed/ExternalEmbed.d.ts +1 -2
  69. package/lib/Embed/ExternalEmbed.js +13 -19
  70. package/lib/Embed/FootnoteEmbed.js +11 -9
  71. package/lib/Embed/GlossEmbed.d.ts +13 -0
  72. package/lib/Embed/GlossEmbed.js +76 -0
  73. package/lib/Embed/H5pEmbed.d.ts +1 -2
  74. package/lib/Embed/H5pEmbed.js +21 -19
  75. package/lib/Embed/IframeEmbed.d.ts +1 -2
  76. package/lib/Embed/IframeEmbed.js +11 -8
  77. package/lib/Embed/InlineTriggerButton.d.ts +11 -0
  78. package/lib/Embed/InlineTriggerButton.js +76 -0
  79. package/lib/Embed/UnknownEmbed.js +9 -10
  80. package/lib/Embed/UuDisclaimerEmbed.js +16 -26
  81. package/lib/Embed/index.d.ts +2 -3
  82. package/lib/Embed/index.js +2 -9
  83. package/lib/ErrorMessage/ErrorMessage.js +40 -23
  84. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +7 -6
  85. package/lib/FactBox/FactBox.d.ts +0 -1
  86. package/lib/FactBox/FactBox.js +119 -46
  87. package/lib/FileList/PdfFile.js +23 -5
  88. package/lib/Gloss/Gloss.d.ts +10 -2
  89. package/lib/Gloss/Gloss.js +116 -85
  90. package/lib/Gloss/GlossExample.d.ts +3 -5
  91. package/lib/Gloss/GlossExample.js +49 -52
  92. package/lib/LicenseByline/EmbedByline.d.ts +2 -4
  93. package/lib/LicenseByline/EmbedByline.js +145 -35
  94. package/lib/LicenseByline/LicenseLink.d.ts +2 -2
  95. package/lib/LicenseByline/LicenseLink.js +16 -9
  96. package/lib/LicenseByline/index.d.ts +2 -2
  97. package/lib/LicenseByline/index.js +4 -5
  98. package/lib/LinkBlock/LinkBlock.js +62 -34
  99. package/lib/LinkBlock/LinkBlockSection.js +9 -7
  100. package/lib/Logo/Logo.d.ts +1 -3
  101. package/lib/Logo/Logo.js +2 -30
  102. package/lib/RelatedArticleList/RelatedArticleList.d.ts +4 -4
  103. package/lib/RelatedArticleList/RelatedArticleList.js +74 -90
  104. package/lib/ResourceBox/ResourceBox.js +64 -37
  105. package/lib/TagSelector/TagSelector.d.ts +27 -12
  106. package/lib/TagSelector/TagSelector.js +126 -131
  107. package/lib/i18n/index.d.ts +1 -0
  108. package/lib/i18n/index.js +20 -1
  109. package/lib/i18n/useComponentTranslations.d.ts +14 -0
  110. package/lib/i18n/useComponentTranslations.js +93 -0
  111. package/lib/index.d.ts +5 -15
  112. package/lib/index.js +70 -102
  113. package/lib/locale/messages-en.d.ts +26 -0
  114. package/lib/locale/messages-en.js +30 -4
  115. package/lib/locale/messages-nb.d.ts +26 -0
  116. package/lib/locale/messages-nb.js +30 -4
  117. package/lib/locale/messages-nn.d.ts +26 -0
  118. package/lib/locale/messages-nn.js +30 -4
  119. package/lib/locale/messages-se.d.ts +26 -0
  120. package/lib/locale/messages-se.js +30 -4
  121. package/lib/locale/messages-sma.d.ts +26 -0
  122. package/lib/locale/messages-sma.js +30 -4
  123. package/lib/model/ContentType.d.ts +3 -0
  124. package/lib/model/ContentType.js +4 -1
  125. package/lib/styles.css +597 -0
  126. package/package.json +11 -13
  127. package/src/Article/ArticleByline.tsx +1 -1
  128. package/src/Article/ArticleParagraph.tsx +11 -9
  129. package/src/AudioPlayer/AudioPlayer.tsx +1 -0
  130. package/src/CampaignBlock/CampaignBlock.tsx +92 -55
  131. package/src/Concept/Concept.stories.tsx +142 -0
  132. package/src/Concept/Concept.tsx +73 -0
  133. package/src/ContactBlock/ContactBlock.tsx +1 -1
  134. package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +70 -0
  135. package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +69 -0
  136. package/src/Embed/AudioEmbed.tsx +2 -2
  137. package/src/Embed/BrightcoveEmbed.stories.tsx +0 -3
  138. package/src/Embed/BrightcoveEmbed.tsx +18 -20
  139. package/src/Embed/ConceptEmbed.stories.tsx +1 -105
  140. package/src/Embed/ConceptEmbed.tsx +60 -385
  141. package/src/Embed/ConceptListEmbed.tsx +20 -19
  142. package/src/Embed/ContentLinkEmbed.tsx +8 -10
  143. package/src/Embed/CopyrightEmbed.tsx +1 -11
  144. package/src/Embed/ExternalEmbed.tsx +14 -17
  145. package/src/Embed/FootnoteEmbed.stories.tsx +2 -5
  146. package/src/Embed/FootnoteEmbed.tsx +13 -16
  147. package/src/Embed/GlossEmbed.stories.tsx +140 -0
  148. package/src/Embed/GlossEmbed.tsx +64 -0
  149. package/src/Embed/H5pEmbed.tsx +22 -16
  150. package/src/Embed/IframeEmbed.tsx +12 -6
  151. package/src/Embed/InlineTriggerButton.tsx +72 -0
  152. package/src/Embed/UnknownEmbed.tsx +6 -7
  153. package/src/Embed/UuDisclaimerEmbed.stories.tsx +4 -4
  154. package/src/Embed/UuDisclaimerEmbed.tsx +17 -25
  155. package/src/Embed/index.ts +2 -3
  156. package/src/ErrorMessage/ErrorMessage.tsx +40 -29
  157. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +8 -6
  158. package/src/FactBox/FactBox.tsx +115 -115
  159. package/src/FactBox/Factbox.stories.tsx +43 -27
  160. package/src/FileList/FileList.stories.tsx +6 -1
  161. package/src/FileList/PdfFile.tsx +22 -5
  162. package/src/Gloss/Gloss.stories.tsx +107 -1
  163. package/src/Gloss/Gloss.tsx +143 -156
  164. package/src/Gloss/GlossExample.tsx +51 -77
  165. package/src/LicenseByline/EmbedByline.stories.tsx +9 -4
  166. package/src/LicenseByline/EmbedByline.tsx +139 -53
  167. package/src/LicenseByline/LicenseLink.tsx +15 -15
  168. package/src/LicenseByline/index.tsx +2 -2
  169. package/src/LinkBlock/LinkBlock.stories.tsx +8 -10
  170. package/src/LinkBlock/LinkBlock.tsx +54 -59
  171. package/src/LinkBlock/LinkBlockSection.tsx +9 -12
  172. package/src/Logo/Logo.stories.tsx +0 -1
  173. package/src/Logo/Logo.tsx +2 -30
  174. package/src/RelatedArticleList/RelatedArticleList.tsx +69 -88
  175. package/src/ResourceBox/ResourceBox.tsx +63 -59
  176. package/src/TagSelector/TagSelector.stories.tsx +92 -68
  177. package/src/TagSelector/TagSelector.tsx +161 -126
  178. package/src/i18n/index.ts +5 -0
  179. package/src/i18n/useComponentTranslations.ts +72 -0
  180. package/src/index.ts +23 -19
  181. package/src/locale/messages-en.ts +28 -2
  182. package/src/locale/messages-nb.ts +28 -2
  183. package/src/locale/messages-nn.ts +28 -2
  184. package/src/locale/messages-se.ts +28 -2
  185. package/src/locale/messages-sma.ts +28 -2
  186. package/src/model/ContentType.ts +3 -0
  187. package/es/DefinitionList/DefinitionDescription.js +0 -28
  188. package/es/DefinitionList/DefinitionTerm.js +0 -28
  189. package/es/DefinitionList/index.js +0 -10
  190. package/es/Embed/conceptComponents.js +0 -155
  191. package/es/ExpandableBox/ExpandableBox.js +0 -29
  192. package/es/ExpandableBox/index.js +0 -9
  193. package/es/Figure/Figure.js +0 -73
  194. package/es/Figure/index.js +0 -9
  195. package/es/FramedContent/FramedContent.js +0 -28
  196. package/es/FramedContent/index.js +0 -10
  197. package/es/Image/Image.js +0 -99
  198. package/es/Image/ImageLink.js +0 -39
  199. package/es/Image/index.js +0 -12
  200. package/es/LetterFilter/LetterFilter.js +0 -54
  201. package/es/LetterFilter/alphabet.js +0 -9
  202. package/es/LetterFilter/index.js +0 -10
  203. package/es/LicenseByline/LicenseDescription.js +0 -63
  204. package/es/List/OrderedList.js +0 -41
  205. package/es/List/UnOrderedList.js +0 -28
  206. package/es/List/index.js +0 -10
  207. package/es/Notion/Notion.js +0 -76
  208. package/es/Notion/NotionImage.js +0 -46
  209. package/es/Notion/index.js +0 -9
  210. package/es/Table/Table.js +0 -141
  211. package/es/Table/index.js +0 -11
  212. package/es/TagSelector/Control.js +0 -28
  213. package/es/TagSelector/DropdownIndicator.js +0 -60
  214. package/es/TagSelector/Input.js +0 -22
  215. package/es/TagSelector/Menu.js +0 -27
  216. package/es/TagSelector/MenuList.js +0 -28
  217. package/es/TagSelector/Option.js +0 -60
  218. package/es/TagSelector/SelectContainer.js +0 -27
  219. package/es/TagSelector/ValueButton.js +0 -53
  220. package/es/TagSelector/ariaMessages.js +0 -94
  221. package/es/TagSelector/index.js +0 -10
  222. package/es/TagSelector/types.js +0 -1
  223. package/lib/DefinitionList/DefinitionDescription.d.ts +0 -10
  224. package/lib/DefinitionList/DefinitionDescription.js +0 -35
  225. package/lib/DefinitionList/DefinitionTerm.d.ts +0 -10
  226. package/lib/DefinitionList/DefinitionTerm.js +0 -35
  227. package/lib/DefinitionList/index.d.ts +0 -9
  228. package/lib/DefinitionList/index.js +0 -20
  229. package/lib/Embed/conceptComponents.d.ts +0 -40
  230. package/lib/Embed/conceptComponents.js +0 -163
  231. package/lib/ExpandableBox/ExpandableBox.d.ts +0 -15
  232. package/lib/ExpandableBox/ExpandableBox.js +0 -37
  233. package/lib/ExpandableBox/index.d.ts +0 -8
  234. package/lib/ExpandableBox/index.js +0 -18
  235. package/lib/Figure/Figure.d.ts +0 -16
  236. package/lib/Figure/Figure.js +0 -81
  237. package/lib/Figure/index.d.ts +0 -9
  238. package/lib/Figure/index.js +0 -13
  239. package/lib/FramedContent/FramedContent.d.ts +0 -12
  240. package/lib/FramedContent/FramedContent.js +0 -35
  241. package/lib/FramedContent/index.d.ts +0 -9
  242. package/lib/FramedContent/index.js +0 -16
  243. package/lib/Image/Image.d.ts +0 -38
  244. package/lib/Image/Image.js +0 -105
  245. package/lib/Image/ImageLink.d.ts +0 -18
  246. package/lib/Image/ImageLink.js +0 -44
  247. package/lib/Image/index.d.ts +0 -12
  248. package/lib/Image/index.js +0 -30
  249. package/lib/LetterFilter/LetterFilter.d.ts +0 -14
  250. package/lib/LetterFilter/LetterFilter.js +0 -61
  251. package/lib/LetterFilter/alphabet.d.ts +0 -8
  252. package/lib/LetterFilter/alphabet.js +0 -15
  253. package/lib/LetterFilter/index.d.ts +0 -9
  254. package/lib/LetterFilter/index.js +0 -16
  255. package/lib/LicenseByline/LicenseDescription.d.ts +0 -15
  256. package/lib/LicenseByline/LicenseDescription.js +0 -70
  257. package/lib/List/OrderedList.d.ts +0 -16
  258. package/lib/List/OrderedList.js +0 -48
  259. package/lib/List/UnOrderedList.d.ts +0 -10
  260. package/lib/List/UnOrderedList.js +0 -35
  261. package/lib/List/index.d.ts +0 -9
  262. package/lib/List/index.js +0 -20
  263. package/lib/Notion/Notion.d.ts +0 -20
  264. package/lib/Notion/Notion.js +0 -82
  265. package/lib/Notion/NotionImage.d.ts +0 -13
  266. package/lib/Notion/NotionImage.js +0 -54
  267. package/lib/Notion/index.d.ts +0 -8
  268. package/lib/Notion/index.js +0 -13
  269. package/lib/Table/Table.d.ts +0 -19
  270. package/lib/Table/Table.js +0 -145
  271. package/lib/Table/index.d.ts +0 -10
  272. package/lib/Table/index.js +0 -23
  273. package/lib/TagSelector/Control.d.ts +0 -11
  274. package/lib/TagSelector/Control.js +0 -35
  275. package/lib/TagSelector/DropdownIndicator.d.ts +0 -11
  276. package/lib/TagSelector/DropdownIndicator.js +0 -64
  277. package/lib/TagSelector/Input.d.ts +0 -12
  278. package/lib/TagSelector/Input.js +0 -29
  279. package/lib/TagSelector/Menu.d.ts +0 -12
  280. package/lib/TagSelector/Menu.js +0 -34
  281. package/lib/TagSelector/MenuList.d.ts +0 -16
  282. package/lib/TagSelector/MenuList.js +0 -35
  283. package/lib/TagSelector/Option.d.ts +0 -12
  284. package/lib/TagSelector/Option.js +0 -67
  285. package/lib/TagSelector/SelectContainer.d.ts +0 -11
  286. package/lib/TagSelector/SelectContainer.js +0 -34
  287. package/lib/TagSelector/ValueButton.d.ts +0 -20
  288. package/lib/TagSelector/ValueButton.js +0 -60
  289. package/lib/TagSelector/ariaMessages.d.ts +0 -16
  290. package/lib/TagSelector/ariaMessages.js +0 -101
  291. package/lib/TagSelector/index.d.ts +0 -11
  292. package/lib/TagSelector/index.js +0 -13
  293. package/lib/TagSelector/types.d.ts +0 -11
  294. package/lib/TagSelector/types.js +0 -5
  295. package/src/DefinitionList/DefinitionDescription.tsx +0 -26
  296. package/src/DefinitionList/DefinitionTerm.tsx +0 -26
  297. package/src/DefinitionList/index.tsx +0 -10
  298. package/src/Embed/conceptComponents.tsx +0 -293
  299. package/src/ExpandableBox/ExpandableBox.stories.tsx +0 -41
  300. package/src/ExpandableBox/ExpandableBox.tsx +0 -23
  301. package/src/ExpandableBox/index.ts +0 -9
  302. package/src/Figure/Figure.tsx +0 -167
  303. package/src/Figure/index.ts +0 -11
  304. package/src/FramedContent/FramedContent.stories.tsx +0 -152
  305. package/src/FramedContent/FramedContent.tsx +0 -26
  306. package/src/FramedContent/index.ts +0 -10
  307. package/src/Image/Image.stories.tsx +0 -61
  308. package/src/Image/Image.tsx +0 -147
  309. package/src/Image/ImageLink.tsx +0 -37
  310. package/src/Image/index.ts +0 -14
  311. package/src/LetterFilter/LetterFilter.stories.tsx +0 -29
  312. package/src/LetterFilter/LetterFilter.tsx +0 -78
  313. package/src/LetterFilter/alphabet.ts +0 -39
  314. package/src/LetterFilter/index.ts +0 -11
  315. package/src/LicenseByline/LicenseDescription.tsx +0 -100
  316. package/src/List/OrderedList.stories.tsx +0 -135
  317. package/src/List/OrderedList.tsx +0 -158
  318. package/src/List/UnOrderedList.tsx +0 -43
  319. package/src/List/UnorderedList.stories.tsx +0 -72
  320. package/src/List/index.ts +0 -10
  321. package/src/Notion/Notion.tsx +0 -96
  322. package/src/Notion/NotionImage.tsx +0 -64
  323. package/src/Notion/index.ts +0 -9
  324. package/src/Table/Table.stories.tsx +0 -738
  325. package/src/Table/Table.tsx +0 -284
  326. package/src/Table/index.ts +0 -12
  327. package/src/TagSelector/Control.tsx +0 -34
  328. package/src/TagSelector/DropdownIndicator.tsx +0 -55
  329. package/src/TagSelector/Input.tsx +0 -31
  330. package/src/TagSelector/Menu.tsx +0 -38
  331. package/src/TagSelector/MenuList.tsx +0 -30
  332. package/src/TagSelector/Option.tsx +0 -58
  333. package/src/TagSelector/SelectContainer.tsx +0 -31
  334. package/src/TagSelector/ValueButton.tsx +0 -47
  335. package/src/TagSelector/ariaMessages.ts +0 -96
  336. package/src/TagSelector/index.ts +0 -14
  337. package/src/TagSelector/types.ts +0 -12
@@ -4,36 +4,34 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _reactI18next = require("react-i18next");
9
- var _core = require("@ndla/core");
8
+ var _primitives = require("@ndla/primitives");
9
+ var _jsx2 = require("@ndla/styled-system/jsx");
10
10
  var _ConceptEmbed = require("./ConceptEmbed");
11
- var _Figure = require("../Figure");
12
11
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /**
12
+ /**
15
13
  * Copyright (c) 2023-present, NDLA.
16
14
  *
17
15
  * This source code is licensed under the GPLv3 license found in the
18
16
  * LICENSE file in the root directory of this source tree.
19
17
  *
20
18
  */
21
- const ConceptList = /*#__PURE__*/(0, _base.default)("div", {
22
- target: "e1g5p4xu1",
23
- label: "ConceptList"
24
- })(process.env.NODE_ENV === "production" ? {
25
- name: "1m0jptr",
26
- styles: "&>figure:first-of-type{margin-top:32px;}& li{display:block;}"
27
- } : {
28
- name: "1m0jptr",
29
- styles: "&>figure:first-of-type{margin-top:32px;}& li{display:block;}",
30
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9COEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9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tYmVkRGF0YSwgZGF0YSB9ID0gZW1iZWQ7XG4gIHJldHVybiAoXG4gICAgPGRpdj5cbiAgICAgIDxGaWd1cmUgdHlwZT1cImZ1bGxcIj5cbiAgICAgICAge2VtYmVkRGF0YS50aXRsZSAmJiA8aDIgbGFuZz17bGFuZ30+e2VtYmVkRGF0YS50aXRsZX08L2gyPn1cbiAgICAgICAgPENvbmNlcHRMaXN0PlxuICAgICAgICAgIDx1bCBsYW5nPXtsYW5nfT5cbiAgICAgICAgICAgIHtkYXRhLmNvbmNlcHRzLm1hcCgoeyBjb25jZXB0LCB2aXN1YWxFbGVtZW50IH0pID0+IChcbiAgICAgICAgICAgICAgPGxpIGtleT17Y29uY2VwdC5pZH0+XG4gICAgICAgICAgICAgICAgPEJsb2NrQ29uY2VwdFxuICAgICAgICAgICAgICAgICAgdGl0bGU9e2NvbmNlcHQudGl0bGV9XG4gICAgICAgICAgICAgICAgICBjb250ZW50PXtjb25jZXB0LmNvbnRlbnQuY29udGVudH1cbiAgICAgICAgICAgICAgICAgIG1ldGFJbWFnZT17Y29uY2VwdC5tZXRhSW1hZ2V9XG4gICAgICAgICAgICAgICAgICBjb3B5cmlnaHQ9e2NvbmNlcHQuY29weXJpZ2h0fVxuICAgICAgICAgICAgICAgICAgc291cmNlPXtjb25jZXB0LnNvdXJjZX1cbiAgICAgICAgICAgICAgICAgIHZpc3VhbEVsZW1lbnQ9e3Zpc3VhbEVsZW1lbnR9XG4gICAgICAgICAgICAgICAgICBjb25jZXB0VHlwZT17Y29uY2VwdC5jb25jZXB0VHlwZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgPC91bD5cbiAgICAgICAgPC9Db25jZXB0TGlzdD5cbiAgICAgIDwvRmlndXJlPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uY2VwdExpc3RFbWJlZDtcbiJdfQ== */",
31
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+
20
+ // TODO: Find out if we're actually still going to use this.
21
+ // If we are, we need to re-add some margin between the list items. We should also probably parse the concept content to HTML, like we do in ConceptEmbed.
22
+
23
+ const ConceptList = (0, _jsx2.styled)("div", {
24
+ base: {
25
+ "& li": {
26
+ display: "block"
27
+ }
28
+ }
29
+ });
30
+ const StyledSpan = (0, _jsx2.styled)("span", {
31
+ base: {
32
+ color: "text.error"
33
+ }
32
34
  });
33
- const StyledSpan = /*#__PURE__*/(0, _base.default)("span", {
34
- target: "e1g5p4xu0",
35
- label: "StyledSpan"
36
- })("color:", _core.colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZCOEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSBcInJlYWN0LWkxOG5leHRcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgY29sb3JzIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcbmltcG9ydCB7IENvbmNlcHRMaXN0TWV0YURhdGEgfSBmcm9tIFwiQG5kbGEvdHlwZXMtZ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vbmNlcHRzLm1hcCgoeyBjb25jZXB0LCB2aXN1YWxFbGVtZW50IH0pID0+IChcbiAgICAgICAgICAgICAgPGxpIGtleT17Y29uY2VwdC5pZH0+XG4gICAgICAgICAgICAgICAgPEJsb2NrQ29uY2VwdFxuICAgICAgICAgICAgICAgICAgdGl0bGU9e2NvbmNlcHQudGl0bGV9XG4gICAgICAgICAgICAgICAgICBjb250ZW50PXtjb25jZXB0LmNvbnRlbnQuY29udGVudH1cbiAgICAgICAgICAgICAgICAgIG1ldGFJbWFnZT17Y29uY2VwdC5tZXRhSW1hZ2V9XG4gICAgICAgICAgICAgICAgICBjb3B5cmlnaHQ9e2NvbmNlcHQuY29weXJpZ2h0fVxuICAgICAgICAgICAgICAgICAgc291cmNlPXtjb25jZXB0LnNvdXJjZX1cbiAgICAgICAgICAgICAgICAgIHZpc3VhbEVsZW1lbnQ9e3Zpc3VhbEVsZW1lbnR9XG4gICAgICAgICAgICAgICAgICBjb25jZXB0VHlwZT17Y29uY2VwdC5jb25jZXB0VHlwZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgPC91bD5cbiAgICAgICAgPC9Db25jZXB0TGlzdD5cbiAgICAgIDwvRmlndXJlPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uY2VwdExpc3RFbWJlZDtcbiJdfQ== */"));
37
35
  const ConceptListEmbed = _ref => {
38
36
  let {
39
37
  embed,
@@ -52,8 +50,7 @@ const ConceptListEmbed = _ref => {
52
50
  data
53
51
  } = embed;
54
52
  return (0, _jsxRuntime.jsx)("div", {
55
- children: (0, _jsxRuntime.jsxs)(_Figure.Figure, {
56
- type: "full",
53
+ children: (0, _jsxRuntime.jsxs)(_primitives.Figure, {
57
54
  children: [embedData.title && (0, _jsxRuntime.jsx)("h2", {
58
55
  lang: lang,
59
56
  children: embedData.title
@@ -67,13 +64,11 @@ const ConceptListEmbed = _ref => {
67
64
  } = _ref2;
68
65
  return (0, _jsxRuntime.jsx)("li", {
69
66
  children: (0, _jsxRuntime.jsx)(_ConceptEmbed.BlockConcept, {
70
- title: concept.title,
67
+ title: concept.title.title,
71
68
  content: concept.content.content,
72
- metaImage: concept.metaImage,
73
69
  copyright: concept.copyright,
74
- source: concept.source,
75
70
  visualElement: visualElement,
76
- conceptType: concept.conceptType
71
+ lang: lang
77
72
  })
78
73
  }, concept.id);
79
74
  })
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _reactI18next = require("react-i18next");
9
- var _core = require("@ndla/core");
8
+ var _primitives = require("@ndla/primitives");
10
9
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
10
  /**
13
11
  * Copyright (c) 2023-present, NDLA.
14
12
  *
@@ -17,10 +15,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
17
15
  *
18
16
  */
19
17
 
20
- const StyledSpan = /*#__PURE__*/(0, _base.default)("span", {
21
- target: "e1s10cki0",
22
- label: "StyledSpan"
23
- })("color:", _core.colors.support.red, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbnRlbnRMaW5rRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1COEIiLCJmaWxlIjoiQ29udGVudExpbmtFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW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lbWJlZDtcblxuICBpZiAoZW1iZWREYXRhLm9wZW5JbiA9PT0gXCJuZXctY29udGV4dFwiIHx8IGlzT2VtYmVkKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxhIGhyZWY9e2RhdGEucGF0aH0gdGFyZ2V0PVwiX2JsYW5rXCIgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2E+XG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiA8YSBocmVmPXtkYXRhLnBhdGh9PntjaGlsZHJlbn08L2E+O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29udGVudExpbmtFbWJlZDtcbiJdfQ== */"));
24
18
  const ContentLinkEmbed = _ref => {
25
19
  let {
26
20
  embed,
@@ -31,10 +25,15 @@ const ContentLinkEmbed = _ref => {
31
25
  t
32
26
  } = (0, _reactI18next.useTranslation)();
33
27
  if (embed.status === "error") {
34
- return (0, _jsxRuntime.jsxs)(StyledSpan, {
35
- children: [(0, _jsxRuntime.jsx)("span", {
36
- children: `${t("embed.linkError")}: `
37
- }), children]
28
+ return (0, _jsxRuntime.jsx)(_primitives.Text, {
29
+ color: "text.error",
30
+ asChild: true,
31
+ consumeCss: true,
32
+ children: (0, _jsxRuntime.jsxs)("span", {
33
+ children: [(0, _jsxRuntime.jsx)("span", {
34
+ children: `${t("embed.linkError")}: `
35
+ }), children]
36
+ })
38
37
  });
39
38
  }
40
39
  const {
@@ -4,42 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _LicenseByline = require("../LicenseByline");
9
8
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /**
9
+ /**
12
10
  * Copyright (c) 2024-present, NDLA.
13
11
  *
14
12
  * This source code is licensed under the GPLv3 license found in the
15
13
  * LICENSE file in the root directory of this source tree.
16
14
  *
17
15
  */
18
- const StyledFigCaption = /*#__PURE__*/(0, _base.default)("figcaption", {
19
- target: "eds2zp40",
20
- label: "StyledFigCaption"
21
- })(process.env.NODE_ENV === "production" ? {
22
- name: "1oo694u",
23
- styles: "background:unset;font-size:unset;padding:unset;color:unset"
24
- } : {
25
- name: "1oo694u",
26
- styles: "background:unset;font-size:unset;padding:unset;color:unset",
27
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvcHlyaWdodEVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQjBDIiwiZmlsZSI6IkNvcHlyaWdodEVtYmVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDI0LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IENvcHlyaWdodE1ldGFEYXRhIH0gZnJvbSBcIkBuZGxhL3R5cGVzLWVtYmVkXCI7XG5pbXBvcnQgeyBFbWJlZEJ5bGluZSB9IGZyb20gXCIuLi9MaWNlbnNlQnlsaW5lXCI7XG5cbmludGVyZmFjZSBQcm9wcyB7XG4gIGVtYmVkOiBDb3B5cmlnaHRNZXRhRGF0YTtcbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG59XG5cbmNvbnN0IFN0eWxlZEZpZ0NhcHRpb24gPSBzdHlsZWQuZmlnY2FwdGlvbmBcbiAgYmFja2dyb3VuZDogdW5zZXQ7XG4gIGZvbnQtc2l6ZTogdW5zZXQ7XG4gIHBhZGRpbmc6IHVuc2V0O1xuICBjb2xvcjogdW5zZXQ7XG5gO1xuXG5jb25zdCBDb3B5cmlnaHRFbWJlZCA9ICh7IGVtYmVkLCBjaGlsZHJlbiB9OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxmaWd1cmU+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgICA8U3R5bGVkRmlnQ2FwdGlvbiBjb250ZW50RWRpdGFibGU9e2ZhbHNlfT5cbiAgICAgICAgPEVtYmVkQnlsaW5lIHR5cGU9XCJjb3B5cmlnaHRcIiBjb3B5cmlnaHQ9e2VtYmVkLmVtYmVkRGF0YS5jb3B5cmlnaHR9IGJvdHRvbVJvdW5kZWQgLz5cbiAgICAgIDwvU3R5bGVkRmlnQ2FwdGlvbj5cbiAgICA8L2ZpZ3VyZT5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvcHlyaWdodEVtYmVkO1xuIl19 */",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
- });
16
+
30
17
  const CopyrightEmbed = _ref => {
31
18
  let {
32
19
  embed,
33
20
  children
34
21
  } = _ref;
35
22
  return (0, _jsxRuntime.jsxs)("figure", {
36
- children: [children, (0, _jsxRuntime.jsx)(StyledFigCaption, {
37
- contentEditable: false,
38
- children: (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
39
- type: "copyright",
40
- copyright: embed.embedData.copyright,
41
- bottomRounded: true
42
- })
23
+ children: [children, (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
24
+ type: "copyright",
25
+ copyright: embed.embedData.copyright
43
26
  })]
44
27
  });
45
28
  };
@@ -8,7 +8,6 @@
8
8
  import { OembedMetaData } from "@ndla/types-embed";
9
9
  interface Props {
10
10
  embed: OembedMetaData;
11
- isConcept?: boolean;
12
11
  }
13
- declare const ExternalEmbed: ({ embed, isConcept }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ declare const ExternalEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
14
13
  export default ExternalEmbed;
@@ -4,37 +4,33 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _react = require("react");
9
8
  var _reactI18next = require("react-i18next");
9
+ var _primitives = require("@ndla/primitives");
10
+ var _jsx2 = require("@ndla/styled-system/jsx");
10
11
  var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
11
- var _Figure = require("../Figure");
12
12
  var _ResourceBox = require("../ResourceBox");
13
13
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /**
15
+ /**
16
16
  * Copyright (c) 2023-present, NDLA.
17
17
  *
18
18
  * This source code is licensed under the GPLv3 license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  *
21
21
  */
22
- const StyledFigure = /*#__PURE__*/(0, _base.default)(_Figure.Figure, {
23
- target: "e13ppouw0",
24
- label: "StyledFigure"
25
- })(process.env.NODE_ENV === "production" ? {
26
- name: "9y4sui",
27
- styles: "iframe{height:auto;}"
28
- } : {
29
- name: "9y4sui",
30
- styles: "iframe{height:auto;}",
31
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJz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1iZWREYXRhLmFsdCA6IGRhdGEuaWZyYW1lSW1hZ2U/LmFsdHRleHQ/LmFsdHRleHQgPz8gXCJcIixcbiAgICB9O1xuICAgIHJldHVybiAoXG4gICAgICA8RmlndXJlIHR5cGU9XCJmdWxsXCI+XG4gICAgICAgIDxSZXNvdXJjZUJveFxuICAgICAgICAgIGltYWdlPXtpbWFnZX1cbiAgICAgICAgICB0aXRsZT17ZW1iZWREYXRhLnRpdGxlID8/IFwiXCJ9XG4gICAgICAgICAgdXJsPXtlbWJlZERhdGEudXJsfVxuICAgICAgICAgIGNhcHRpb249e2VtYmVkRGF0YS5jYXB0aW9uID8/IFwiXCJ9XG4gICAgICAgICAgYnV0dG9uVGV4dD17dChcImxpY2Vuc2Uub3RoZXIuaXRlbUltYWdlLmFyaWFMYWJlbFwiKX1cbiAgICAgICAgLz5cbiAgICAgIDwvRmlndXJlPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxTdHlsZWRGaWd1cmVcbiAgICAgIHJlZj17ZmlnUmVmfVxuICAgICAgdHlwZT17aXNDb25jZXB0ID8gXCJmdWxsLWNvbHVtblwiIDogdW5kZWZpbmVkfVxuICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3sgX19odG1sOiBkYXRhLm9lbWJlZC5odG1sID8/IFwiXCIgfX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRXh0ZXJuYWxFbWJlZDtcbiJdfQ== */",
32
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
+
23
+ const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
24
+ base: {
25
+ "& iframe": {
26
+ height: "auto",
27
+ width: "100%"
28
+ }
29
+ }
33
30
  });
34
31
  const ExternalEmbed = _ref => {
35
32
  let {
36
- embed,
37
- isConcept
33
+ embed
38
34
  } = _ref;
39
35
  const {
40
36
  t
@@ -63,8 +59,7 @@ const ExternalEmbed = _ref => {
63
59
  src: data.iframeImage?.image.imageUrl ?? "",
64
60
  alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
65
61
  };
66
- return (0, _jsxRuntime.jsx)(_Figure.Figure, {
67
- type: "full",
62
+ return (0, _jsxRuntime.jsx)(_primitives.Figure, {
68
63
  children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
69
64
  image: image,
70
65
  title: embedData.title ?? "",
@@ -76,7 +71,6 @@ const ExternalEmbed = _ref => {
76
71
  }
77
72
  return (0, _jsxRuntime.jsx)(StyledFigure, {
78
73
  ref: figRef,
79
- type: isConcept ? "full-column" : undefined,
80
74
  dangerouslySetInnerHTML: {
81
75
  __html: data.oembed.html ?? ""
82
76
  }
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _reactI18next = require("react-i18next");
9
- var _core = require("@ndla/core");
8
+ var _jsx2 = require("@ndla/styled-system/jsx");
10
9
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
10
  /**
13
11
  * Copyright (c) 2023-present, NDLA.
14
12
  *
@@ -17,10 +15,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
17
15
  *
18
16
  */
19
17
 
20
- const FootnoteRef = /*#__PURE__*/(0, _base.default)("span", {
21
- target: "eva0wyf0",
22
- label: "FootnoteRef"
23
- })("sup{a{margin-left:-2px;padding:", _core.spacing.small, " ", _core.spacing.xsmall, ";box-shadow:none;text-decoration:underline;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvb3Rub3RlRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCK0IiLCJmaWxlIjoiRm9vdG5vdGV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iKX08L2Rpdj47XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxGb290bm90ZVJlZiBpZD17YHJlZiR7ZW1iZWQuZGF0YS5lbnRyeU51bX1gfT5cbiAgICAgIDxzdXA+XG4gICAgICAgIDxhIGhyZWY9e2Ajbm90ZSR7ZW1iZWQuZGF0YS5lbnRyeU51bX1gfSB0YXJnZXQ9XCJfc2VsZlwiPntgWyR7ZW1iZWQuZGF0YS5lbnRyeU51bX1dYH08L2E+XG4gICAgICA8L3N1cD5cbiAgICA8L0Zvb3Rub3RlUmVmPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRm9vdG5vdGVFbWJlZDtcbiJdfQ== */"));
18
+ const StyledSup = (0, _jsx2.styled)("sup", {
19
+ base: {
20
+ "& a": {
21
+ textStyle: "label.xsmall",
22
+ marginInlineStart: "1"
23
+ }
24
+ }
25
+ });
24
26
  const FootnoteEmbed = _ref => {
25
27
  let {
26
28
  embed
@@ -33,9 +35,9 @@ const FootnoteEmbed = _ref => {
33
35
  children: t("error")
34
36
  });
35
37
  }
36
- return (0, _jsxRuntime.jsx)(FootnoteRef, {
38
+ return (0, _jsxRuntime.jsx)("span", {
37
39
  id: `ref${embed.data.entryNum}`,
38
- children: (0, _jsxRuntime.jsx)("sup", {
40
+ children: (0, _jsxRuntime.jsx)(StyledSup, {
39
41
  children: (0, _jsxRuntime.jsx)("a", {
40
42
  href: `#note${embed.data.entryNum}`,
41
43
  target: "_self",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import { ConceptMetaData } from "@ndla/types-embed";
9
+ interface Props {
10
+ embed: ConceptMetaData;
11
+ }
12
+ export declare const GlossEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GlossEmbed = void 0;
7
+ var _primitives = require("@ndla/primitives");
8
+ var _jsx2 = require("@ndla/styled-system/jsx");
9
+ var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
10
+ var _InlineTriggerButton = require("./InlineTriggerButton");
11
+ var _Gloss = require("../Gloss");
12
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /**
15
+ * Copyright (c) 2024-present, NDLA.
16
+ *
17
+ * This source code is licensed under the GPLv3 license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ *
20
+ */
21
+
22
+ const StyledPopoverContent = (0, _jsx2.styled)(_primitives.PopoverContent, {
23
+ base: {
24
+ width: "surface.xlarge"
25
+ }
26
+ });
27
+ const GlossEmbed = _ref => {
28
+ let {
29
+ embed
30
+ } = _ref;
31
+ if (embed.status === "error" && embed.embedData.type === "inline") {
32
+ return (0, _jsxRuntime.jsx)("span", {
33
+ children: embed.embedData.linkText
34
+ });
35
+ }
36
+ if (embed.status === "error" || !embed.data.concept.glossData) {
37
+ return (0, _jsxRuntime.jsx)(_EmbedErrorPlaceholder.default, {
38
+ type: "gloss"
39
+ });
40
+ }
41
+ const {
42
+ concept,
43
+ visualElement
44
+ } = embed.data;
45
+ const audio = visualElement?.status === "success" && visualElement.resource === "audio" ? {
46
+ src: visualElement.data.audioFile.url,
47
+ title: visualElement.data.title.title
48
+ } : undefined;
49
+ if (embed.embedData.type === "inline") {
50
+ return (0, _jsxRuntime.jsxs)(_primitives.PopoverRoot, {
51
+ children: [(0, _jsxRuntime.jsx)(_primitives.PopoverTrigger, {
52
+ asChild: true,
53
+ children: (0, _jsxRuntime.jsx)(_InlineTriggerButton.InlineTriggerButton, {
54
+ children: embed.embedData.linkText
55
+ })
56
+ }), (0, _jsxRuntime.jsx)(StyledPopoverContent, {
57
+ children: (0, _jsxRuntime.jsx)(_primitives.Figure, {
58
+ children: (0, _jsxRuntime.jsx)(_Gloss.Gloss, {
59
+ glossData: concept.glossData,
60
+ title: concept.title,
61
+ audio: audio
62
+ })
63
+ })
64
+ })]
65
+ });
66
+ }
67
+ return (0, _jsxRuntime.jsx)(_primitives.Figure, {
68
+ children: (0, _jsxRuntime.jsx)(_Gloss.Gloss, {
69
+ glossData: concept.glossData,
70
+ title: concept.title,
71
+ audio: audio,
72
+ variant: "bordered"
73
+ })
74
+ });
75
+ };
76
+ exports.GlossEmbed = GlossEmbed;
@@ -8,7 +8,6 @@
8
8
  import { H5pMetaData } from "@ndla/types-embed";
9
9
  interface Props {
10
10
  embed: H5pMetaData;
11
- isConcept?: boolean;
12
11
  }
13
- declare const H5pEmbed: ({ embed, isConcept }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ declare const H5pEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
14
13
  export default H5pEmbed;
@@ -4,34 +4,38 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
7
+ var _primitives = require("@ndla/primitives");
8
+ var _jsx2 = require("@ndla/styled-system/jsx");
8
9
  var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
9
- var _Figure = require("../Figure");
10
10
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /**
12
+ /**
13
13
  * Copyright (c) 2023-present, NDLA.
14
14
  *
15
15
  * This source code is licensed under the GPLv3 license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
17
  *
18
18
  */
19
- const StyledFigure = /*#__PURE__*/(0, _base.default)(_Figure.Figure, {
20
- target: "etjdel10",
21
- label: "StyledFigure"
22
- })(process.env.NODE_ENV === "production" ? {
23
- name: "9y4sui",
24
- styles: "iframe{height:auto;}"
25
- } : {
26
- name: "9y4sui",
27
- styles: "iframe{height:auto;}",
28
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkg1cEVtYmVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQm1DIiwiZmlsZSI6Ikg1cEVtYmVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDIzLXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBINXBNZXRhRGF0YSB9IGZyb20gXCJAbmRsYS90eXBlcy1lbWJlZFwiO1xuaW1wb3J0IEVtYmVkRXJyb3JQbGFjZWhvbGRlciBmcm9tIFwiLi9FbWJlZEVycm9yUGxhY2Vob2xkZXJcIjtcbmltcG9ydCB7IEZpZ3VyZSB9IGZyb20gXCIuLi9GaWd1cmVcIjtcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgZW1iZWQ6IEg1cE1ldGFEYXRhO1xuICBpc0NvbmNlcHQ/OiBib29sZWFuO1xufVxuXG5jb25zdCBTdHlsZWRGaWd1cmUgPSBzdHlsZWQoRmlndXJlKWBcbiAgaWZyYW1lIHtcbiAgICBoZWlnaHQ6IGF1dG87XG4gIH1cbmA7XG5cbmNvbnN0IEg1cEVtYmVkID0gKHsgZW1iZWQsIGlzQ29uY2VwdCB9OiBQcm9wcykgPT4ge1xuICBpZiAoZW1iZWQuc3RhdHVzID09PSBcImVycm9yXCIpIHtcbiAgICByZXR1cm4gPEVtYmVkRXJyb3JQbGFjZWhvbGRlciB0eXBlPVwiaDVwXCIgLz47XG4gIH1cblxuICBpZiAoZW1iZWQuZGF0YS5vZW1iZWQpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPEZpZ3VyZVxuICAgICAgICB0eXBlPXtpc0NvbmNlcHQgPyBcImZ1bGwtY29sdW1uXCIgOiB1bmRlZmluZWR9XG4gICAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7IF9faHRtbDogZW1iZWQuZGF0YS5vZW1iZWQuaHRtbCA/PyBcIlwiIH19XG4gICAgICAvPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxTdHlsZWRGaWd1cmUgdHlwZT17aXNDb25jZXB0ID8gXCJmdWxsLWNvbHVtblwiIDogdW5kZWZpbmVkfT5cbiAgICAgIDxpZnJhbWUgdGl0bGU9e2VtYmVkLmVtYmVkRGF0YS51cmx9IGFyaWEtbGFiZWw9e2VtYmVkLmVtYmVkRGF0YS51cmx9IHNyYz17ZW1iZWQuZW1iZWREYXRhLnVybH0gLz5cbiAgICA8L1N0eWxlZEZpZ3VyZT5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEg1cEVtYmVkO1xuIl19 */",
29
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+
20
+ const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
21
+ base: {
22
+ "& iframe": {
23
+ height: "auto",
24
+ width: "100%"
25
+ }
26
+ }
27
+ });
28
+ const FigureOembed = (0, _jsx2.styled)(_primitives.Figure, {
29
+ base: {
30
+ width: "100%",
31
+ "& iframe": {
32
+ width: "100%"
33
+ }
34
+ }
30
35
  });
31
36
  const H5pEmbed = _ref => {
32
37
  let {
33
- embed,
34
- isConcept
38
+ embed
35
39
  } = _ref;
36
40
  if (embed.status === "error") {
37
41
  return (0, _jsxRuntime.jsx)(_EmbedErrorPlaceholder.default, {
@@ -39,15 +43,13 @@ const H5pEmbed = _ref => {
39
43
  });
40
44
  }
41
45
  if (embed.data.oembed) {
42
- return (0, _jsxRuntime.jsx)(_Figure.Figure, {
43
- type: isConcept ? "full-column" : undefined,
46
+ return (0, _jsxRuntime.jsx)(FigureOembed, {
44
47
  dangerouslySetInnerHTML: {
45
48
  __html: embed.data.oembed.html ?? ""
46
49
  }
47
50
  });
48
51
  }
49
52
  return (0, _jsxRuntime.jsx)(StyledFigure, {
50
- type: isConcept ? "full-column" : undefined,
51
53
  children: (0, _jsxRuntime.jsx)("iframe", {
52
54
  title: embed.embedData.url,
53
55
  "aria-label": embed.embedData.url,
@@ -8,7 +8,6 @@
8
8
  import { IframeMetaData } from "@ndla/types-embed";
9
9
  interface Props {
10
10
  embed: IframeMetaData;
11
- isConcept?: boolean;
12
11
  }
13
- declare const IframeEmbed: ({ embed, isConcept }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ declare const IframeEmbed: ({ embed }: Props) => import("react/jsx-runtime").JSX.Element;
14
13
  export default IframeEmbed;
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _reactI18next = require("react-i18next");
9
+ var _primitives = require("@ndla/primitives");
10
+ var _jsx2 = require("@ndla/styled-system/jsx");
9
11
  var _EmbedErrorPlaceholder = _interopRequireDefault(require("./EmbedErrorPlaceholder"));
10
- var _Figure = require("../Figure");
11
12
  var _ResourceBox = require("../ResourceBox");
12
13
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -19,10 +20,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
19
20
  *
20
21
  */
21
22
 
23
+ const StyledIframe = (0, _jsx2.styled)("iframe", {
24
+ base: {
25
+ width: "100%"
26
+ }
27
+ });
22
28
  const IframeEmbed = _ref => {
23
29
  let {
24
- embed,
25
- isConcept
30
+ embed
26
31
  } = _ref;
27
32
  const {
28
33
  t
@@ -53,8 +58,7 @@ const IframeEmbed = _ref => {
53
58
  src: iframeImage?.image.imageUrl ?? "",
54
59
  alt: alt ?? ""
55
60
  };
56
- return (0, _jsxRuntime.jsx)(_Figure.Figure, {
57
- type: "full",
61
+ return (0, _jsxRuntime.jsx)(_primitives.Figure, {
58
62
  children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
59
63
  image: image,
60
64
  title: embedData.title ?? "",
@@ -73,9 +77,8 @@ const IframeEmbed = _ref => {
73
77
  const strippedWidth = typeof width === "number" ? width : width?.replace(/\s*px/, "");
74
78
  const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
75
79
  const urlOrTitle = title || url;
76
- return (0, _jsxRuntime.jsx)(_Figure.Figure, {
77
- type: isConcept ? "full-column" : undefined,
78
- children: (0, _jsxRuntime.jsx)("iframe", {
80
+ return (0, _jsxRuntime.jsx)(_primitives.Figure, {
81
+ children: (0, _jsxRuntime.jsx)(StyledIframe, {
79
82
  ref: iframeRef,
80
83
  title: urlOrTitle,
81
84
  "aria-label": urlOrTitle,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ /// <reference types="react" />
9
+ export declare const InlineTriggerButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
10
+ ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
11
+ }, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InlineTriggerButton = void 0;
7
+ var _react = require("react");
8
+ var _jsx2 = require("@ndla/styled-system/jsx");
9
+ var _util = require("@ndla/util");
10
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
+ /**
12
+ * Copyright (c) 2024-present, NDLA.
13
+ *
14
+ * This source code is licensed under the GPLv3 license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
18
+
19
+ const StyledSpan = (0, _jsx2.styled)("span", {
20
+ base: {
21
+ position: "relative",
22
+ overflow: "visible",
23
+ borderBottom: "1px solid",
24
+ borderStyle: "dashed",
25
+ borderColor: "stroke.hover",
26
+ paddingBlock: "4xsmall",
27
+ paddingInline: "4xsmall",
28
+ width: "fit-content",
29
+ cursor: "pointer",
30
+ _hover: {
31
+ borderColor: "text.link",
32
+ background: "surface.actionSubtle.hover"
33
+ },
34
+ _active: {
35
+ borderColor: "text.link",
36
+ background: "surface.actionSubtle.active"
37
+ },
38
+ // The global focus ring forces the border-radius to be xsmall, causing the dashed border to be cut off. This is a workaround.
39
+ _focusVisible: {
40
+ outline: "none",
41
+ borderRadius: "0",
42
+ _after: {
43
+ content: '""',
44
+ position: "absolute",
45
+ inset: "0",
46
+ outline: "3px",
47
+ borderRadius: "xsmall",
48
+ outlineColor: "stroke.default",
49
+ outlineOffset: "3px",
50
+ outlineStyle: "solid"
51
+ }
52
+ }
53
+ }
54
+ });
55
+ const InlineTriggerButton = exports.InlineTriggerButton = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
56
+ let {
57
+ onClick,
58
+ ...props
59
+ } = _ref;
60
+ const spanRef = (0, _react.useRef)(null);
61
+
62
+ // Emulate a button click when pressing Enter or Space
63
+ const onKeyboardEvent = (0, _react.useCallback)(event => {
64
+ if (event.key === "Enter" || event.key === " ") {
65
+ spanRef.current?.click();
66
+ }
67
+ }, []);
68
+ return (0, _jsxRuntime.jsx)(StyledSpan, {
69
+ ref: (0, _util.composeRefs)(spanRef, ref),
70
+ onKeyUp: onKeyboardEvent,
71
+ onClick: onClick,
72
+ role: "button",
73
+ tabIndex: 0,
74
+ ...props
75
+ });
76
+ });