@ndla/ui 55.0.13-alpha.0 → 55.0.14-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 (297) hide show
  1. package/dist/panda.buildinfo.json +120 -1
  2. package/dist/styles.css +511 -0
  3. package/es/Article/ArticleParagraph.js +11 -13
  4. package/es/CampaignBlock/CampaignBlock.js +103 -68
  5. package/es/Concept/Concept.js +69 -0
  6. package/es/ContentTypeBadge/ContentTypeBadgeNew.js +48 -0
  7. package/es/Embed/AudioEmbed.js +1 -2
  8. package/es/Embed/BrightcoveEmbed.js +13 -24
  9. package/es/Embed/ConceptEmbed.js +57 -301
  10. package/es/Embed/ConceptListEmbed.js +18 -24
  11. package/es/Embed/ContentLinkEmbed.js +10 -10
  12. package/es/Embed/CopyrightEmbed.js +4 -21
  13. package/es/Embed/ExternalEmbed.js +10 -18
  14. package/es/Embed/FootnoteEmbed.js +11 -8
  15. package/es/Embed/GlossEmbed.js +68 -0
  16. package/es/Embed/H5pEmbed.js +19 -19
  17. package/es/Embed/IframeEmbed.js +9 -6
  18. package/es/Embed/InlineTriggerButton.js +70 -0
  19. package/es/Embed/UnknownEmbed.js +9 -9
  20. package/es/Embed/UuDisclaimerEmbed.js +14 -25
  21. package/es/Embed/index.js +1 -3
  22. package/es/ErrorMessage/ErrorMessage.js +41 -22
  23. package/es/ErrorMessage/ErrorResourceAccessDenied.js +8 -6
  24. package/es/FactBox/FactBox.js +118 -47
  25. package/es/FileList/PdfFile.js +23 -5
  26. package/es/Gloss/Gloss.js +116 -86
  27. package/es/Gloss/GlossExample.js +49 -51
  28. package/es/LinkBlock/LinkBlock.js +61 -33
  29. package/es/LinkBlock/LinkBlockSection.js +9 -6
  30. package/es/Logo/Logo.js +1 -30
  31. package/es/RelatedArticleList/RelatedArticleList.js +70 -87
  32. package/es/ResourceBox/ResourceBox.js +65 -37
  33. package/es/TagSelector/TagSelector.js +124 -131
  34. package/es/i18n/index.js +2 -1
  35. package/es/i18n/useComponentTranslations.js +83 -0
  36. package/es/index.js +4 -11
  37. package/es/locale/messages-en.js +30 -4
  38. package/es/locale/messages-nb.js +30 -4
  39. package/es/locale/messages-nn.js +30 -4
  40. package/es/locale/messages-se.js +30 -4
  41. package/es/locale/messages-sma.js +30 -4
  42. package/es/model/ContentType.js +3 -0
  43. package/es/styles.css +511 -0
  44. package/lib/Article/ArticleParagraph.js +12 -14
  45. package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
  46. package/lib/CampaignBlock/CampaignBlock.js +106 -68
  47. package/lib/Concept/Concept.d.ts +18 -0
  48. package/lib/Concept/Concept.js +75 -0
  49. package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +17 -0
  50. package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +56 -0
  51. package/lib/Embed/AudioEmbed.js +2 -3
  52. package/lib/Embed/BrightcoveEmbed.d.ts +1 -2
  53. package/lib/Embed/BrightcoveEmbed.js +16 -25
  54. package/lib/Embed/ConceptEmbed.d.ts +15 -21
  55. package/lib/Embed/ConceptEmbed.js +58 -301
  56. package/lib/Embed/ConceptListEmbed.js +21 -26
  57. package/lib/Embed/ContentLinkEmbed.js +10 -11
  58. package/lib/Embed/CopyrightEmbed.js +6 -22
  59. package/lib/Embed/ExternalEmbed.d.ts +1 -2
  60. package/lib/Embed/ExternalEmbed.js +13 -19
  61. package/lib/Embed/FootnoteEmbed.js +11 -9
  62. package/lib/Embed/GlossEmbed.d.ts +13 -0
  63. package/lib/Embed/GlossEmbed.js +76 -0
  64. package/lib/Embed/H5pEmbed.d.ts +1 -2
  65. package/lib/Embed/H5pEmbed.js +21 -19
  66. package/lib/Embed/IframeEmbed.d.ts +1 -2
  67. package/lib/Embed/IframeEmbed.js +11 -8
  68. package/lib/Embed/InlineTriggerButton.d.ts +11 -0
  69. package/lib/Embed/InlineTriggerButton.js +76 -0
  70. package/lib/Embed/UnknownEmbed.js +9 -10
  71. package/lib/Embed/UuDisclaimerEmbed.js +16 -26
  72. package/lib/Embed/index.d.ts +2 -3
  73. package/lib/Embed/index.js +2 -9
  74. package/lib/ErrorMessage/ErrorMessage.js +40 -23
  75. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +7 -6
  76. package/lib/FactBox/FactBox.d.ts +0 -1
  77. package/lib/FactBox/FactBox.js +119 -46
  78. package/lib/FileList/PdfFile.js +23 -5
  79. package/lib/Gloss/Gloss.d.ts +10 -2
  80. package/lib/Gloss/Gloss.js +116 -85
  81. package/lib/Gloss/GlossExample.d.ts +3 -5
  82. package/lib/Gloss/GlossExample.js +49 -52
  83. package/lib/LinkBlock/LinkBlock.js +62 -34
  84. package/lib/LinkBlock/LinkBlockSection.js +9 -7
  85. package/lib/Logo/Logo.d.ts +1 -3
  86. package/lib/Logo/Logo.js +2 -30
  87. package/lib/RelatedArticleList/RelatedArticleList.d.ts +4 -4
  88. package/lib/RelatedArticleList/RelatedArticleList.js +74 -90
  89. package/lib/ResourceBox/ResourceBox.js +64 -37
  90. package/lib/TagSelector/TagSelector.d.ts +27 -12
  91. package/lib/TagSelector/TagSelector.js +126 -131
  92. package/lib/i18n/index.d.ts +1 -0
  93. package/lib/i18n/index.js +20 -1
  94. package/lib/i18n/useComponentTranslations.d.ts +14 -0
  95. package/lib/i18n/useComponentTranslations.js +93 -0
  96. package/lib/index.d.ts +5 -14
  97. package/lib/index.js +70 -89
  98. package/lib/locale/messages-en.d.ts +26 -0
  99. package/lib/locale/messages-en.js +30 -4
  100. package/lib/locale/messages-nb.d.ts +26 -0
  101. package/lib/locale/messages-nb.js +30 -4
  102. package/lib/locale/messages-nn.d.ts +26 -0
  103. package/lib/locale/messages-nn.js +30 -4
  104. package/lib/locale/messages-se.d.ts +26 -0
  105. package/lib/locale/messages-se.js +30 -4
  106. package/lib/locale/messages-sma.d.ts +26 -0
  107. package/lib/locale/messages-sma.js +30 -4
  108. package/lib/model/ContentType.d.ts +3 -0
  109. package/lib/model/ContentType.js +4 -1
  110. package/lib/styles.css +511 -0
  111. package/package.json +11 -13
  112. package/src/Article/ArticleParagraph.tsx +11 -9
  113. package/src/CampaignBlock/CampaignBlock.tsx +92 -55
  114. package/src/Concept/Concept.stories.tsx +142 -0
  115. package/src/Concept/Concept.tsx +73 -0
  116. package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +70 -0
  117. package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +69 -0
  118. package/src/Embed/AudioEmbed.tsx +2 -2
  119. package/src/Embed/BrightcoveEmbed.stories.tsx +0 -3
  120. package/src/Embed/BrightcoveEmbed.tsx +17 -19
  121. package/src/Embed/ConceptEmbed.stories.tsx +1 -105
  122. package/src/Embed/ConceptEmbed.tsx +60 -385
  123. package/src/Embed/ConceptListEmbed.tsx +20 -19
  124. package/src/Embed/ContentLinkEmbed.tsx +8 -10
  125. package/src/Embed/CopyrightEmbed.tsx +1 -11
  126. package/src/Embed/ExternalEmbed.tsx +14 -17
  127. package/src/Embed/FootnoteEmbed.stories.tsx +2 -5
  128. package/src/Embed/FootnoteEmbed.tsx +13 -16
  129. package/src/Embed/GlossEmbed.stories.tsx +140 -0
  130. package/src/Embed/GlossEmbed.tsx +64 -0
  131. package/src/Embed/H5pEmbed.tsx +22 -16
  132. package/src/Embed/IframeEmbed.tsx +12 -6
  133. package/src/Embed/InlineTriggerButton.tsx +72 -0
  134. package/src/Embed/UnknownEmbed.tsx +6 -7
  135. package/src/Embed/UuDisclaimerEmbed.stories.tsx +4 -4
  136. package/src/Embed/UuDisclaimerEmbed.tsx +17 -25
  137. package/src/Embed/index.ts +2 -3
  138. package/src/ErrorMessage/ErrorMessage.tsx +40 -29
  139. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +8 -6
  140. package/src/FactBox/FactBox.tsx +115 -115
  141. package/src/FactBox/Factbox.stories.tsx +43 -27
  142. package/src/FileList/FileList.stories.tsx +6 -1
  143. package/src/FileList/PdfFile.tsx +22 -5
  144. package/src/Gloss/Gloss.stories.tsx +107 -1
  145. package/src/Gloss/Gloss.tsx +143 -156
  146. package/src/Gloss/GlossExample.tsx +51 -77
  147. package/src/LinkBlock/LinkBlock.stories.tsx +8 -10
  148. package/src/LinkBlock/LinkBlock.tsx +54 -59
  149. package/src/LinkBlock/LinkBlockSection.tsx +9 -12
  150. package/src/Logo/Logo.stories.tsx +0 -1
  151. package/src/Logo/Logo.tsx +2 -30
  152. package/src/RelatedArticleList/RelatedArticleList.tsx +69 -88
  153. package/src/ResourceBox/ResourceBox.tsx +63 -59
  154. package/src/TagSelector/TagSelector.stories.tsx +92 -68
  155. package/src/TagSelector/TagSelector.tsx +161 -126
  156. package/src/i18n/index.ts +5 -0
  157. package/src/i18n/useComponentTranslations.ts +72 -0
  158. package/src/index.ts +23 -18
  159. package/src/locale/messages-en.ts +28 -2
  160. package/src/locale/messages-nb.ts +28 -2
  161. package/src/locale/messages-nn.ts +28 -2
  162. package/src/locale/messages-se.ts +28 -2
  163. package/src/locale/messages-sma.ts +28 -2
  164. package/src/model/ContentType.ts +3 -0
  165. package/es/DefinitionList/DefinitionDescription.js +0 -28
  166. package/es/DefinitionList/DefinitionTerm.js +0 -28
  167. package/es/DefinitionList/index.js +0 -10
  168. package/es/Embed/conceptComponents.js +0 -155
  169. package/es/ExpandableBox/ExpandableBox.js +0 -29
  170. package/es/ExpandableBox/index.js +0 -9
  171. package/es/Figure/Figure.js +0 -73
  172. package/es/Figure/index.js +0 -9
  173. package/es/FramedContent/FramedContent.js +0 -28
  174. package/es/FramedContent/index.js +0 -10
  175. package/es/Image/Image.js +0 -99
  176. package/es/Image/ImageLink.js +0 -39
  177. package/es/Image/index.js +0 -12
  178. package/es/LetterFilter/LetterFilter.js +0 -54
  179. package/es/LetterFilter/alphabet.js +0 -9
  180. package/es/LetterFilter/index.js +0 -10
  181. package/es/Notion/Notion.js +0 -76
  182. package/es/Notion/NotionImage.js +0 -46
  183. package/es/Notion/index.js +0 -9
  184. package/es/Table/Table.js +0 -141
  185. package/es/Table/index.js +0 -11
  186. package/es/TagSelector/Control.js +0 -28
  187. package/es/TagSelector/DropdownIndicator.js +0 -60
  188. package/es/TagSelector/Input.js +0 -22
  189. package/es/TagSelector/Menu.js +0 -27
  190. package/es/TagSelector/MenuList.js +0 -28
  191. package/es/TagSelector/Option.js +0 -60
  192. package/es/TagSelector/SelectContainer.js +0 -27
  193. package/es/TagSelector/ValueButton.js +0 -53
  194. package/es/TagSelector/ariaMessages.js +0 -94
  195. package/es/TagSelector/index.js +0 -10
  196. package/es/TagSelector/types.js +0 -1
  197. package/lib/DefinitionList/DefinitionDescription.d.ts +0 -10
  198. package/lib/DefinitionList/DefinitionDescription.js +0 -35
  199. package/lib/DefinitionList/DefinitionTerm.d.ts +0 -10
  200. package/lib/DefinitionList/DefinitionTerm.js +0 -35
  201. package/lib/DefinitionList/index.d.ts +0 -9
  202. package/lib/DefinitionList/index.js +0 -20
  203. package/lib/Embed/conceptComponents.d.ts +0 -40
  204. package/lib/Embed/conceptComponents.js +0 -163
  205. package/lib/ExpandableBox/ExpandableBox.d.ts +0 -15
  206. package/lib/ExpandableBox/ExpandableBox.js +0 -37
  207. package/lib/ExpandableBox/index.d.ts +0 -8
  208. package/lib/ExpandableBox/index.js +0 -18
  209. package/lib/Figure/Figure.d.ts +0 -16
  210. package/lib/Figure/Figure.js +0 -81
  211. package/lib/Figure/index.d.ts +0 -9
  212. package/lib/Figure/index.js +0 -13
  213. package/lib/FramedContent/FramedContent.d.ts +0 -12
  214. package/lib/FramedContent/FramedContent.js +0 -35
  215. package/lib/FramedContent/index.d.ts +0 -9
  216. package/lib/FramedContent/index.js +0 -16
  217. package/lib/Image/Image.d.ts +0 -38
  218. package/lib/Image/Image.js +0 -105
  219. package/lib/Image/ImageLink.d.ts +0 -18
  220. package/lib/Image/ImageLink.js +0 -44
  221. package/lib/Image/index.d.ts +0 -12
  222. package/lib/Image/index.js +0 -30
  223. package/lib/LetterFilter/LetterFilter.d.ts +0 -14
  224. package/lib/LetterFilter/LetterFilter.js +0 -61
  225. package/lib/LetterFilter/alphabet.d.ts +0 -8
  226. package/lib/LetterFilter/alphabet.js +0 -15
  227. package/lib/LetterFilter/index.d.ts +0 -9
  228. package/lib/LetterFilter/index.js +0 -16
  229. package/lib/Notion/Notion.d.ts +0 -20
  230. package/lib/Notion/Notion.js +0 -82
  231. package/lib/Notion/NotionImage.d.ts +0 -13
  232. package/lib/Notion/NotionImage.js +0 -54
  233. package/lib/Notion/index.d.ts +0 -8
  234. package/lib/Notion/index.js +0 -13
  235. package/lib/Table/Table.d.ts +0 -19
  236. package/lib/Table/Table.js +0 -145
  237. package/lib/Table/index.d.ts +0 -10
  238. package/lib/Table/index.js +0 -23
  239. package/lib/TagSelector/Control.d.ts +0 -11
  240. package/lib/TagSelector/Control.js +0 -35
  241. package/lib/TagSelector/DropdownIndicator.d.ts +0 -11
  242. package/lib/TagSelector/DropdownIndicator.js +0 -64
  243. package/lib/TagSelector/Input.d.ts +0 -12
  244. package/lib/TagSelector/Input.js +0 -29
  245. package/lib/TagSelector/Menu.d.ts +0 -12
  246. package/lib/TagSelector/Menu.js +0 -34
  247. package/lib/TagSelector/MenuList.d.ts +0 -16
  248. package/lib/TagSelector/MenuList.js +0 -35
  249. package/lib/TagSelector/Option.d.ts +0 -12
  250. package/lib/TagSelector/Option.js +0 -67
  251. package/lib/TagSelector/SelectContainer.d.ts +0 -11
  252. package/lib/TagSelector/SelectContainer.js +0 -34
  253. package/lib/TagSelector/ValueButton.d.ts +0 -20
  254. package/lib/TagSelector/ValueButton.js +0 -60
  255. package/lib/TagSelector/ariaMessages.d.ts +0 -16
  256. package/lib/TagSelector/ariaMessages.js +0 -101
  257. package/lib/TagSelector/index.d.ts +0 -11
  258. package/lib/TagSelector/index.js +0 -13
  259. package/lib/TagSelector/types.d.ts +0 -11
  260. package/lib/TagSelector/types.js +0 -5
  261. package/src/DefinitionList/DefinitionDescription.tsx +0 -26
  262. package/src/DefinitionList/DefinitionTerm.tsx +0 -26
  263. package/src/DefinitionList/index.tsx +0 -10
  264. package/src/Embed/conceptComponents.tsx +0 -293
  265. package/src/ExpandableBox/ExpandableBox.stories.tsx +0 -41
  266. package/src/ExpandableBox/ExpandableBox.tsx +0 -23
  267. package/src/ExpandableBox/index.ts +0 -9
  268. package/src/Figure/Figure.tsx +0 -167
  269. package/src/Figure/index.ts +0 -11
  270. package/src/FramedContent/FramedContent.stories.tsx +0 -152
  271. package/src/FramedContent/FramedContent.tsx +0 -26
  272. package/src/FramedContent/index.ts +0 -10
  273. package/src/Image/Image.stories.tsx +0 -61
  274. package/src/Image/Image.tsx +0 -147
  275. package/src/Image/ImageLink.tsx +0 -37
  276. package/src/Image/index.ts +0 -14
  277. package/src/LetterFilter/LetterFilter.stories.tsx +0 -29
  278. package/src/LetterFilter/LetterFilter.tsx +0 -78
  279. package/src/LetterFilter/alphabet.ts +0 -39
  280. package/src/LetterFilter/index.ts +0 -11
  281. package/src/Notion/Notion.tsx +0 -96
  282. package/src/Notion/NotionImage.tsx +0 -64
  283. package/src/Notion/index.ts +0 -9
  284. package/src/Table/Table.stories.tsx +0 -738
  285. package/src/Table/Table.tsx +0 -284
  286. package/src/Table/index.ts +0 -12
  287. package/src/TagSelector/Control.tsx +0 -34
  288. package/src/TagSelector/DropdownIndicator.tsx +0 -55
  289. package/src/TagSelector/Input.tsx +0 -31
  290. package/src/TagSelector/Menu.tsx +0 -38
  291. package/src/TagSelector/MenuList.tsx +0 -30
  292. package/src/TagSelector/Option.tsx +0 -58
  293. package/src/TagSelector/SelectContainer.tsx +0 -31
  294. package/src/TagSelector/ValueButton.tsx +0 -47
  295. package/src/TagSelector/ariaMessages.ts +0 -96
  296. package/src/TagSelector/index.ts +0 -14
  297. 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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9COEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZVR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PGRpdj5cbiAgICAgIDxGaWd1cmUgdHlwZT1cImZ1bGxcIj5cbiAgICAgICAge2VtYmVkRGF0YS50aXRsZSAmJiA8aDIgbGFuZz17bGFuZ30+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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmNlcHRMaXN0RW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZCOEIiLCJmaWxlIjoiQ29uY2VwdExpc3RFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuXG4gKlxuICovXG5cbmltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSBcInJlYWN0LWkxOG5leHRcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgY29sb3JzIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcbmltcG9ydCB7IENvbmNlcHRMaXN0TWV0YURhdGEgfSBmcm9tIFwiQG5kbGEvdHlwZXMtZW1iZWRcIjtcbmltcG9ydCB7IEJsb2NrQ29uY2VwdCB9IGZyb20gXCIuL0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ChcbiAgICAgICAgICAgICAgPGxpIGtleT17Y29uY2VwdC5pZH0+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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbnRlbnRMaW5rRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1COEIiLCJmaWxlIjoiQ29udGVudExpbmtFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAyMy1wcmVzZW50LCBORExBLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIEdQTHYzIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b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udGV4dFwiIHx8IGlzT2VtYmVkKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxhIGhyZWY9e2RhdGEucGF0aH0gdGFyZ2V0PVwiX2JsYW5rXCIgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2E+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,26 @@ 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,
26
+ bottomRounded: true
43
27
  })]
44
28
  });
45
29
  };
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkV4dGVybmFsRW1iZWQ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/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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvb3Rub3RlRW1iZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCK0IiLCJmaWxlIjoiRm9vdG5vdGVFbWJlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcb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DxGb290bm90ZVJlZiBpZD17YHJlZiR7ZW1iZWQuZGF0YS5lbnRyeU51bX1gfT5cbiAgICAgIDxzdXA+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
+ });