@ndla/ui 56.0.142-alpha.0 → 56.0.143-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 (352) hide show
  1. package/dist/panda.buildinfo.json +2 -3
  2. package/dist/styles.css +5 -9
  3. package/es/Article/Article.mjs +10 -12
  4. package/es/Article/Article.mjs.map +1 -1
  5. package/es/Article/ArticleByline.mjs.map +1 -1
  6. package/es/Article/ArticleFootNotes.mjs.map +1 -1
  7. package/es/AudioPlayer/AudioPlayer.mjs +3 -3
  8. package/es/AudioPlayer/AudioPlayer.mjs.map +1 -1
  9. package/es/AudioPlayer/Controls.mjs +1 -1
  10. package/es/AudioPlayer/Controls.mjs.map +1 -1
  11. package/es/AudioPlayer/SpeechControl.mjs +1 -1
  12. package/es/AudioPlayer/SpeechControl.mjs.map +1 -1
  13. package/es/Breadcrumb/Breadcrumb.mjs +2 -2
  14. package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
  15. package/es/Breadcrumb/BreadcrumbItem.mjs +1 -1
  16. package/es/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  17. package/es/Breadcrumb/HomeBreadcrumb.mjs +2 -2
  18. package/es/Breadcrumb/HomeBreadcrumb.mjs.map +1 -1
  19. package/es/CampaignBlock/CampaignBlock.mjs +1 -1
  20. package/es/CampaignBlock/CampaignBlock.mjs.map +1 -1
  21. package/es/CodeBlock/CodeBlock.mjs +1 -1
  22. package/es/CodeBlock/CodeBlock.mjs.map +1 -1
  23. package/es/CodeBlock/codeLanguageOptions.mjs.map +1 -1
  24. package/es/Concept/Concept.mjs +5 -5
  25. package/es/Concept/Concept.mjs.map +1 -1
  26. package/es/ContactBlock/ContactBlock.mjs.map +1 -1
  27. package/es/ContentTypeBadge/ContentTypeBadge.mjs.map +1 -1
  28. package/es/CopyParagraphButton/CopyParagraphButton.mjs +1 -1
  29. package/es/CopyParagraphButton/CopyParagraphButton.mjs.map +1 -1
  30. package/es/Embed/AudioEmbed.mjs +3 -3
  31. package/es/Embed/AudioEmbed.mjs.map +1 -1
  32. package/es/Embed/BrightcoveEmbed.mjs +2 -2
  33. package/es/Embed/BrightcoveEmbed.mjs.map +1 -1
  34. package/es/Embed/CodeEmbed.mjs +3 -4
  35. package/es/Embed/CodeEmbed.mjs.map +1 -1
  36. package/es/Embed/ConceptEmbed.mjs +2 -2
  37. package/es/Embed/ConceptEmbed.mjs.map +1 -1
  38. package/es/Embed/ConceptInlineTriggerButton.mjs.map +1 -1
  39. package/es/Embed/ContentLinkEmbed.mjs +1 -1
  40. package/es/Embed/ContentLinkEmbed.mjs.map +1 -1
  41. package/es/Embed/CopyrightEmbed.mjs +1 -1
  42. package/es/Embed/CopyrightEmbed.mjs.map +1 -1
  43. package/es/Embed/EmbedErrorPlaceholder.mjs +1 -1
  44. package/es/Embed/EmbedErrorPlaceholder.mjs.map +1 -1
  45. package/es/Embed/EmbedWrapper.mjs.map +1 -1
  46. package/es/Embed/ExternalEmbed.mjs +3 -3
  47. package/es/Embed/ExternalEmbed.mjs.map +1 -1
  48. package/es/Embed/FootnoteEmbed.mjs +1 -1
  49. package/es/Embed/FootnoteEmbed.mjs.map +1 -1
  50. package/es/Embed/GlossEmbed.mjs +2 -2
  51. package/es/Embed/GlossEmbed.mjs.map +1 -1
  52. package/es/Embed/H5pEmbed.mjs +2 -2
  53. package/es/Embed/H5pEmbed.mjs.map +1 -1
  54. package/es/Embed/IframeEmbed.mjs +3 -3
  55. package/es/Embed/IframeEmbed.mjs.map +1 -1
  56. package/es/Embed/ImageEmbed.mjs +2 -4
  57. package/es/Embed/ImageEmbed.mjs.map +1 -1
  58. package/es/Embed/InlineTriggerButton.mjs.map +1 -1
  59. package/es/Embed/RelatedContentEmbed.mjs +2 -3
  60. package/es/Embed/RelatedContentEmbed.mjs.map +1 -1
  61. package/es/Embed/UnknownEmbed.mjs +1 -1
  62. package/es/Embed/UnknownEmbed.mjs.map +1 -1
  63. package/es/Embed/UuDisclaimerEmbed.mjs +1 -1
  64. package/es/Embed/UuDisclaimerEmbed.mjs.map +1 -1
  65. package/es/FactBox/FactBox.mjs +1 -1
  66. package/es/FactBox/FactBox.mjs.map +1 -1
  67. package/es/FileList/File.mjs +34 -30
  68. package/es/FileList/File.mjs.map +1 -1
  69. package/es/FileList/FileList.mjs.map +1 -1
  70. package/es/FileList/PdfFile.mjs.map +1 -1
  71. package/es/Gloss/Gloss.mjs +5 -7
  72. package/es/Gloss/Gloss.mjs.map +1 -1
  73. package/es/Gloss/GlossExample.mjs +1 -1
  74. package/es/Gloss/GlossExample.mjs.map +1 -1
  75. package/es/Grid/Grid.mjs.map +1 -1
  76. package/es/Grid/GridParallaxItem.mjs.map +1 -1
  77. package/es/KeyFigure/KeyFigure.mjs +1 -1
  78. package/es/KeyFigure/KeyFigure.mjs.map +1 -1
  79. package/es/LicenseByline/EmbedByline.mjs +1 -2
  80. package/es/LicenseByline/EmbedByline.mjs.map +1 -1
  81. package/es/LicenseByline/LicenseLink.mjs.map +1 -1
  82. package/es/LinkBlock/LinkBlock.mjs +1 -1
  83. package/es/LinkBlock/LinkBlock.mjs.map +1 -1
  84. package/es/LinkBlock/LinkBlockSection.mjs +1 -1
  85. package/es/LinkBlock/LinkBlockSection.mjs.map +1 -1
  86. package/es/Pitch/Pitch.mjs.map +1 -1
  87. package/es/RelatedArticleList/RelatedArticleList.mjs.map +1 -1
  88. package/es/ResourceBox/ResourceBox.mjs +1 -1
  89. package/es/ResourceBox/ResourceBox.mjs.map +1 -1
  90. package/es/TagSelector/TagSelector.mjs.map +1 -1
  91. package/es/ZendeskButton/ZendeskButton.mjs.map +1 -1
  92. package/es/_virtual/rolldown_runtime.mjs +3 -1
  93. package/es/i18n/formatNestedMessages.mjs.map +1 -1
  94. package/es/i18n/useComponentTranslations.mjs +1 -2
  95. package/es/i18n/useComponentTranslations.mjs.map +1 -1
  96. package/es/index.mjs +34 -38
  97. package/es/locale/messages-en.mjs +2 -2
  98. package/es/locale/messages-en.mjs.map +1 -1
  99. package/es/locale/messages-nb.mjs +2 -2
  100. package/es/locale/messages-nb.mjs.map +1 -1
  101. package/es/locale/messages-nn.mjs +2 -2
  102. package/es/locale/messages-nn.mjs.map +1 -1
  103. package/es/locale/messages-se.mjs +2 -2
  104. package/es/locale/messages-se.mjs.map +1 -1
  105. package/es/model/ContentType.mjs.map +1 -1
  106. package/es/model/SubjectCategories.mjs +1 -2
  107. package/es/model/SubjectCategories.mjs.map +1 -1
  108. package/es/model/SubjectTypes.mjs +1 -2
  109. package/es/model/SubjectTypes.mjs.map +1 -1
  110. package/es/model/WordClass.mjs +1 -2
  111. package/es/model/WordClass.mjs.map +1 -1
  112. package/es/model/index.mjs +1 -1
  113. package/es/model/index.mjs.map +1 -1
  114. package/es/utils/licenseAttributes.mjs +1 -2
  115. package/es/utils/licenseAttributes.mjs.map +1 -1
  116. package/es/utils/relativeUrl.mjs.map +1 -1
  117. package/lib/Article/Article.js +24 -20
  118. package/lib/Article/Article.js.map +1 -1
  119. package/lib/Article/ArticleByline.js +18 -10
  120. package/lib/Article/ArticleByline.js.map +1 -1
  121. package/lib/Article/ArticleFootNotes.js +6 -3
  122. package/lib/Article/ArticleFootNotes.js.map +1 -1
  123. package/lib/AudioPlayer/AudioPlayer.js +17 -11
  124. package/lib/AudioPlayer/AudioPlayer.js.map +1 -1
  125. package/lib/AudioPlayer/Controls.js +15 -8
  126. package/lib/AudioPlayer/Controls.js.map +1 -1
  127. package/lib/AudioPlayer/SpeechControl.js +11 -6
  128. package/lib/AudioPlayer/SpeechControl.js.map +1 -1
  129. package/lib/Breadcrumb/Breadcrumb.js +11 -7
  130. package/lib/Breadcrumb/Breadcrumb.js.map +1 -1
  131. package/lib/Breadcrumb/BreadcrumbItem.js +11 -6
  132. package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -1
  133. package/lib/Breadcrumb/HomeBreadcrumb.js +11 -7
  134. package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -1
  135. package/lib/CampaignBlock/CampaignBlock.js +17 -10
  136. package/lib/CampaignBlock/CampaignBlock.js.map +1 -1
  137. package/lib/CodeBlock/CodeBlock.js +9 -5
  138. package/lib/CodeBlock/CodeBlock.js.map +1 -1
  139. package/lib/CodeBlock/codeLanguageOptions.js.map +1 -1
  140. package/lib/Concept/Concept.js +19 -15
  141. package/lib/Concept/Concept.js.map +1 -1
  142. package/lib/ContactBlock/ContactBlock.js +10 -6
  143. package/lib/ContactBlock/ContactBlock.js.map +1 -1
  144. package/lib/ContentTypeBadge/ContentTypeBadge.js +28 -24
  145. package/lib/ContentTypeBadge/ContentTypeBadge.js.map +1 -1
  146. package/lib/CopyParagraphButton/CopyParagraphButton.js +13 -7
  147. package/lib/CopyParagraphButton/CopyParagraphButton.js.map +1 -1
  148. package/lib/Embed/AudioEmbed.js +16 -13
  149. package/lib/Embed/AudioEmbed.js.map +1 -1
  150. package/lib/Embed/BrightcoveEmbed.js +19 -13
  151. package/lib/Embed/BrightcoveEmbed.js.map +1 -1
  152. package/lib/Embed/CodeEmbed.js +19 -14
  153. package/lib/Embed/CodeEmbed.js.map +1 -1
  154. package/lib/Embed/ConceptEmbed.js +21 -15
  155. package/lib/Embed/ConceptEmbed.js.map +1 -1
  156. package/lib/Embed/ConceptInlineTriggerButton.js +4 -3
  157. package/lib/Embed/ConceptInlineTriggerButton.js.map +1 -1
  158. package/lib/Embed/ContentLinkEmbed.js +7 -4
  159. package/lib/Embed/ContentLinkEmbed.js.map +1 -1
  160. package/lib/Embed/CopyrightEmbed.js +7 -5
  161. package/lib/Embed/CopyrightEmbed.js.map +1 -1
  162. package/lib/Embed/EmbedErrorPlaceholder.js +13 -8
  163. package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -1
  164. package/lib/Embed/EmbedWrapper.js +10 -5
  165. package/lib/Embed/EmbedWrapper.js.map +1 -1
  166. package/lib/Embed/ExternalEmbed.js +15 -10
  167. package/lib/Embed/ExternalEmbed.js.map +1 -1
  168. package/lib/Embed/FootnoteEmbed.js +7 -4
  169. package/lib/Embed/FootnoteEmbed.js.map +1 -1
  170. package/lib/Embed/GlossEmbed.js +17 -12
  171. package/lib/Embed/GlossEmbed.js.map +1 -1
  172. package/lib/Embed/H5pEmbed.js +11 -7
  173. package/lib/Embed/H5pEmbed.js.map +1 -1
  174. package/lib/Embed/IframeEmbed.js +15 -10
  175. package/lib/Embed/IframeEmbed.js.map +1 -1
  176. package/lib/Embed/ImageEmbed.js +21 -16
  177. package/lib/Embed/ImageEmbed.js.map +1 -1
  178. package/lib/Embed/InlineTriggerButton.js +8 -4
  179. package/lib/Embed/InlineTriggerButton.js.map +1 -1
  180. package/lib/Embed/RelatedContentEmbed.js +12 -11
  181. package/lib/Embed/RelatedContentEmbed.js.map +1 -1
  182. package/lib/Embed/UnknownEmbed.js +7 -4
  183. package/lib/Embed/UnknownEmbed.js.map +1 -1
  184. package/lib/Embed/UuDisclaimerEmbed.js +15 -8
  185. package/lib/Embed/UuDisclaimerEmbed.js.map +1 -1
  186. package/lib/FactBox/FactBox.js +13 -7
  187. package/lib/FactBox/FactBox.js.map +1 -1
  188. package/lib/FileList/File.js +51 -39
  189. package/lib/FileList/File.js.map +1 -1
  190. package/lib/FileList/FileList.js +8 -4
  191. package/lib/FileList/FileList.js.map +1 -1
  192. package/lib/FileList/PdfFile.js +6 -3
  193. package/lib/FileList/PdfFile.js.map +1 -1
  194. package/lib/Gloss/Gloss.js +23 -17
  195. package/lib/Gloss/Gloss.js.map +1 -1
  196. package/lib/Gloss/GlossExample.js +9 -5
  197. package/lib/Gloss/GlossExample.js.map +1 -1
  198. package/lib/Grid/Grid.js +6 -3
  199. package/lib/Grid/Grid.js.map +1 -1
  200. package/lib/Grid/GridParallaxItem.js +6 -3
  201. package/lib/Grid/GridParallaxItem.js.map +1 -1
  202. package/lib/KeyFigure/KeyFigure.js +7 -4
  203. package/lib/KeyFigure/KeyFigure.js.map +1 -1
  204. package/lib/LicenseByline/EmbedByline.js +17 -11
  205. package/lib/LicenseByline/EmbedByline.js.map +1 -1
  206. package/lib/LicenseByline/LicenseLink.js +8 -4
  207. package/lib/LicenseByline/LicenseLink.js.map +1 -1
  208. package/lib/LinkBlock/LinkBlock.js +17 -10
  209. package/lib/LinkBlock/LinkBlock.js.map +1 -1
  210. package/lib/LinkBlock/LinkBlockSection.js +7 -4
  211. package/lib/LinkBlock/LinkBlockSection.js.map +1 -1
  212. package/lib/Pitch/Pitch.js +14 -8
  213. package/lib/Pitch/Pitch.js.map +1 -1
  214. package/lib/RelatedArticleList/RelatedArticleList.js +20 -12
  215. package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -1
  216. package/lib/ResourceBox/ResourceBox.js +14 -7
  217. package/lib/ResourceBox/ResourceBox.js.map +1 -1
  218. package/lib/TagSelector/TagSelector.js +12 -6
  219. package/lib/TagSelector/TagSelector.js.map +1 -1
  220. package/lib/ZendeskButton/ZendeskButton.js +6 -3
  221. package/lib/ZendeskButton/ZendeskButton.js.map +1 -1
  222. package/lib/_virtual/rolldown_runtime.js +5 -13
  223. package/lib/i18n/formatNestedMessages.js.map +1 -1
  224. package/lib/i18n/useComponentTranslations.js +5 -4
  225. package/lib/i18n/useComponentTranslations.js.map +1 -1
  226. package/lib/index.d.ts +51 -30
  227. package/lib/index.js +145 -152
  228. package/lib/locale/messages-en.js +5 -4
  229. package/lib/locale/messages-en.js.map +1 -1
  230. package/lib/locale/messages-nb.js +5 -4
  231. package/lib/locale/messages-nb.js.map +1 -1
  232. package/lib/locale/messages-nn.js +5 -4
  233. package/lib/locale/messages-nn.js.map +1 -1
  234. package/lib/locale/messages-se.js +5 -4
  235. package/lib/locale/messages-se.js.map +1 -1
  236. package/lib/model/ContentType.js.map +1 -1
  237. package/lib/model/SubjectCategories.js +1 -2
  238. package/lib/model/SubjectCategories.js.map +1 -1
  239. package/lib/model/SubjectTypes.js +1 -2
  240. package/lib/model/SubjectTypes.js.map +1 -1
  241. package/lib/model/WordClass.js +1 -2
  242. package/lib/model/WordClass.js.map +1 -1
  243. package/lib/model/index.js +11 -11
  244. package/lib/model/index.js.map +1 -1
  245. package/lib/utils/licenseAttributes.js +3 -3
  246. package/lib/utils/licenseAttributes.js.map +1 -1
  247. package/lib/utils/relativeUrl.js.map +1 -1
  248. package/package.json +8 -8
  249. package/src/Article/Article.tsx +8 -4
  250. package/src/Concept/Concept.tsx +5 -1
  251. package/src/Embed/AudioEmbed.stories.tsx +1 -1
  252. package/src/Embed/AudioEmbed.tsx +2 -2
  253. package/src/Embed/BrightcoveEmbed.stories.tsx +1 -1
  254. package/src/Embed/BrightcoveEmbed.tsx +1 -1
  255. package/src/Embed/CodeEmbed.tsx +2 -2
  256. package/src/Embed/ConceptEmbed.stories.tsx +1 -1
  257. package/src/Embed/CopyrightEmbed.tsx +1 -1
  258. package/src/Embed/EmbedErrorPlaceholder.tsx +1 -2
  259. package/src/Embed/ExternalEmbed.stories.tsx +1 -1
  260. package/src/Embed/ExternalEmbed.tsx +1 -1
  261. package/src/Embed/FootnoteEmbed.stories.tsx +1 -1
  262. package/src/Embed/GlossEmbed.tsx +1 -1
  263. package/src/Embed/H5pEmbed.stories.tsx +1 -1
  264. package/src/Embed/IframeEmbed.stories.tsx +1 -1
  265. package/src/Embed/IframeEmbed.tsx +1 -1
  266. package/src/Embed/ImageEmbed.stories.tsx +2 -2
  267. package/src/Embed/ImageEmbed.tsx +1 -1
  268. package/src/Embed/RelatedContentEmbed.stories.tsx +2 -2
  269. package/src/Embed/UuDisclaimerEmbed.stories.tsx +3 -3
  270. package/src/FileList/File.tsx +18 -7
  271. package/src/LinkBlock/LinkBlock.stories.tsx +1 -1
  272. package/src/Pitch/Pitch.stories.tsx +2 -2
  273. package/src/index.ts +53 -61
  274. package/es/AudioPlayer/index.mjs +0 -8
  275. package/es/AudioPlayer/index.mjs.map +0 -1
  276. package/es/Breadcrumb/index.mjs +0 -9
  277. package/es/Breadcrumb/index.mjs.map +0 -1
  278. package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.mjs +0 -25
  279. package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.mjs.map +0 -1
  280. package/es/ContentTypeFramedContent/ContentTypeFramedContent.mjs +0 -25
  281. package/es/ContentTypeFramedContent/ContentTypeFramedContent.mjs.map +0 -1
  282. package/es/ContentTypeHero/ContentTypeHero.mjs +0 -39
  283. package/es/ContentTypeHero/ContentTypeHero.mjs.map +0 -1
  284. package/es/CopyParagraphButton/index.mjs +0 -8
  285. package/es/CopyParagraphButton/index.mjs.map +0 -1
  286. package/es/FactBox/index.mjs +0 -8
  287. package/es/FactBox/index.mjs.map +0 -1
  288. package/es/RelatedArticleList/index.mjs +0 -8
  289. package/es/RelatedArticleList/index.mjs.map +0 -1
  290. package/lib/Article/index.d.ts +0 -10
  291. package/lib/AudioPlayer/index.d.ts +0 -9
  292. package/lib/AudioPlayer/index.js +0 -8
  293. package/lib/AudioPlayer/index.js.map +0 -1
  294. package/lib/Breadcrumb/index.d.ts +0 -11
  295. package/lib/Breadcrumb/index.js +0 -9
  296. package/lib/Breadcrumb/index.js.map +0 -1
  297. package/lib/CampaignBlock/index.d.ts +0 -8
  298. package/lib/CodeBlock/index.d.ts +0 -9
  299. package/lib/ContactBlock/index.d.ts +0 -9
  300. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.d.ts +0 -16
  301. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js +0 -26
  302. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +0 -1
  303. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.d.ts +0 -16
  304. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js +0 -26
  305. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js.map +0 -1
  306. package/lib/ContentTypeHero/ContentTypeHero.d.ts +0 -14
  307. package/lib/ContentTypeHero/ContentTypeHero.js +0 -40
  308. package/lib/ContentTypeHero/ContentTypeHero.js.map +0 -1
  309. package/lib/ContentTypeHero/index.d.ts +0 -9
  310. package/lib/CopyParagraphButton/index.d.ts +0 -10
  311. package/lib/CopyParagraphButton/index.js +0 -8
  312. package/lib/CopyParagraphButton/index.js.map +0 -1
  313. package/lib/Embed/index.d.ts +0 -27
  314. package/lib/FactBox/index.d.ts +0 -9
  315. package/lib/FactBox/index.js +0 -8
  316. package/lib/FactBox/index.js.map +0 -1
  317. package/lib/FileList/index.d.ts +0 -10
  318. package/lib/Gloss/index.d.ts +0 -9
  319. package/lib/Grid/index.d.ts +0 -10
  320. package/lib/KeyFigure/index.d.ts +0 -8
  321. package/lib/LicenseByline/index.d.ts +0 -9
  322. package/lib/LinkBlock/index.d.ts +0 -9
  323. package/lib/Pitch/index.d.ts +0 -8
  324. package/lib/RelatedArticleList/index.d.ts +0 -10
  325. package/lib/RelatedArticleList/index.js +0 -8
  326. package/lib/RelatedArticleList/index.js.map +0 -1
  327. package/lib/ResourceBox/index.d.ts +0 -9
  328. package/lib/i18n/index.d.ts +0 -9
  329. package/src/Article/index.ts +0 -20
  330. package/src/AudioPlayer/index.ts +0 -11
  331. package/src/Breadcrumb/index.ts +0 -15
  332. package/src/CampaignBlock/index.ts +0 -9
  333. package/src/CodeBlock/index.ts +0 -10
  334. package/src/ContactBlock/index.ts +0 -10
  335. package/src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx +0 -32
  336. package/src/ContentTypeFramedContent/ContentTypeFramedContent.tsx +0 -34
  337. package/src/ContentTypeHero/ContentTypeHero.stories.tsx +0 -75
  338. package/src/ContentTypeHero/ContentTypeHero.tsx +0 -56
  339. package/src/ContentTypeHero/index.ts +0 -10
  340. package/src/CopyParagraphButton/index.tsx +0 -12
  341. package/src/Embed/index.ts +0 -28
  342. package/src/FactBox/index.ts +0 -11
  343. package/src/FileList/index.ts +0 -11
  344. package/src/Gloss/index.tsx +0 -10
  345. package/src/Grid/index.ts +0 -12
  346. package/src/KeyFigure/index.ts +0 -9
  347. package/src/LicenseByline/index.tsx +0 -10
  348. package/src/LinkBlock/index.ts +0 -10
  349. package/src/Pitch/index.ts +0 -9
  350. package/src/RelatedArticleList/index.ts +0 -13
  351. package/src/ResourceBox/index.ts +0 -11
  352. package/src/i18n/index.ts +0 -19
@@ -1,8 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
2
 
3
3
  //#region src/model/SubjectCategories.ts
4
- var SubjectCategories_exports = {};
5
- require_rolldown_runtime.__export(SubjectCategories_exports, {
4
+ var SubjectCategories_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
6
5
  ACTIVE_SUBJECTS: () => ACTIVE_SUBJECTS,
7
6
  ARCHIVE_SUBJECTS: () => ARCHIVE_SUBJECTS,
8
7
  BETA_SUBJECTS: () => BETA_SUBJECTS,
@@ -1 +1 @@
1
- {"version":3,"file":"SubjectCategories.js","names":[],"sources":["../../src/model/SubjectCategories.ts"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const ACTIVE_SUBJECTS = \"active\";\nexport const ARCHIVE_SUBJECTS = \"archive\";\nexport const BETA_SUBJECTS = \"beta\";\nexport const OTHER = \"otherResources\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,MAAa,kBAAkB;AAC/B,MAAa,mBAAmB;AAChC,MAAa,gBAAgB;AAC7B,MAAa,QAAQ"}
1
+ {"version":3,"file":"SubjectCategories.js","names":[],"sources":["../../src/model/SubjectCategories.ts"],"sourcesContent":["/**\n * Copyright (c) 2021-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const ACTIVE_SUBJECTS = \"active\";\nexport const ARCHIVE_SUBJECTS = \"archive\";\nexport const BETA_SUBJECTS = \"beta\";\nexport const OTHER = \"otherResources\";\n"],"mappings":";;;;;;;;;;;;;;;;AAQA,MAAa,kBAAkB;AAC/B,MAAa,mBAAmB;AAChC,MAAa,gBAAgB;AAC7B,MAAa,QAAQ"}
@@ -1,8 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
2
 
3
3
  //#region src/model/SubjectTypes.ts
4
- var SubjectTypes_exports = {};
5
- require_rolldown_runtime.__export(SubjectTypes_exports, {
4
+ var SubjectTypes_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
6
5
  ARCHIVE_SUBJECT: () => ARCHIVE_SUBJECT,
7
6
  BETA_SUBJECT: () => BETA_SUBJECT,
8
7
  RESOURCE_COLLECTION: () => RESOURCE_COLLECTION,
@@ -1 +1 @@
1
- {"version":3,"file":"SubjectTypes.js","names":[],"sources":["../../src/model/SubjectTypes.ts"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const BETA_SUBJECT = \"betaSubject\";\nexport const SUBJECT = \"subject\";\nexport const RESOURCE_COLLECTION = \"resourceCollection\";\nexport const ARCHIVE_SUBJECT = \"archiveSubject\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,MAAa,eAAe;AAC5B,MAAa,UAAU;AACvB,MAAa,sBAAsB;AACnC,MAAa,kBAAkB"}
1
+ {"version":3,"file":"SubjectTypes.js","names":[],"sources":["../../src/model/SubjectTypes.ts"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const BETA_SUBJECT = \"betaSubject\";\nexport const SUBJECT = \"subject\";\nexport const RESOURCE_COLLECTION = \"resourceCollection\";\nexport const ARCHIVE_SUBJECT = \"archiveSubject\";\n"],"mappings":";;;;;;;;;;;;;;;;AAQA,MAAa,eAAe;AAC5B,MAAa,UAAU;AACvB,MAAa,sBAAsB;AACnC,MAAa,kBAAkB"}
@@ -1,8 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
2
 
3
3
  //#region src/model/WordClass.ts
4
- var WordClass_exports = {};
5
- require_rolldown_runtime.__export(WordClass_exports, { wordClass: () => wordClass });
4
+ var WordClass_exports = /* @__PURE__ */ require_rolldown_runtime.__export({ wordClass: () => wordClass });
6
5
  /**
7
6
  * Copyright (c) 2023-present, NDLA.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"WordClass.js","names":[],"sources":["../../src/model/WordClass.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const wordClass = {\n adjective: \"adjective\",\n adverb: \"adverb\",\n properNoun: \"proper-noun\",\n auxiliary: \"auxiliary\",\n complement: \"complement\",\n conjunction: \"conjunction\",\n coverb: \"coverb\",\n determiner: \"determiner\",\n interjection: \"interjection\",\n quantifier: \"quantifier\",\n marker: \"marker\",\n modalVerb: \"modal-verb\",\n measureWord: \"measure-word\",\n noun: \"noun\",\n \"noun-zh\": \"noun-zh\",\n nounPhrase: \"noun-phrase\",\n onomatopoeia: \"onomatopoeia\",\n particle: \"particle\",\n demonstrative: \"demonstrative\",\n personalPronoun: \"personal-pronoun\",\n preposition: \"preposition\",\n pronoun: \"pronoun\",\n questionWord: \"question-word\",\n locationWord: \"location-word\",\n suffix: \"suffix\",\n numeral: \"numeral\",\n timeWord: \"time word\",\n timeExpression: \"time-expression\",\n stativeVerb: \"stative-verb\",\n subordinatingConjunction: \"subordinating-conjunction\",\n exclamationWord: \"exclamation-word\",\n expression: \"expression\",\n verb: \"verb\",\n verbComplement: \"verb-complement\",\n verbObject: \"verb-object\",\n};\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,YAAY;CACvB,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,QAAQ;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,QAAQ;CACR,WAAW;CACX,aAAa;CACb,MAAM;CACN,WAAW;CACX,YAAY;CACZ,cAAc;CACd,UAAU;CACV,eAAe;CACf,iBAAiB;CACjB,aAAa;CACb,SAAS;CACT,cAAc;CACd,cAAc;CACd,QAAQ;CACR,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,0BAA0B;CAC1B,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,gBAAgB;CAChB,YAAY;AACb"}
1
+ {"version":3,"file":"WordClass.js","names":[],"sources":["../../src/model/WordClass.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const wordClass = {\n adjective: \"adjective\",\n adverb: \"adverb\",\n properNoun: \"proper-noun\",\n auxiliary: \"auxiliary\",\n complement: \"complement\",\n conjunction: \"conjunction\",\n coverb: \"coverb\",\n determiner: \"determiner\",\n interjection: \"interjection\",\n quantifier: \"quantifier\",\n marker: \"marker\",\n modalVerb: \"modal-verb\",\n measureWord: \"measure-word\",\n noun: \"noun\",\n \"noun-zh\": \"noun-zh\",\n nounPhrase: \"noun-phrase\",\n onomatopoeia: \"onomatopoeia\",\n particle: \"particle\",\n demonstrative: \"demonstrative\",\n personalPronoun: \"personal-pronoun\",\n preposition: \"preposition\",\n pronoun: \"pronoun\",\n questionWord: \"question-word\",\n locationWord: \"location-word\",\n suffix: \"suffix\",\n numeral: \"numeral\",\n timeWord: \"time word\",\n timeExpression: \"time-expression\",\n stativeVerb: \"stative-verb\",\n subordinatingConjunction: \"subordinating-conjunction\",\n exclamationWord: \"exclamation-word\",\n expression: \"expression\",\n verb: \"verb\",\n verbComplement: \"verb-complement\",\n verbObject: \"verb-object\",\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,YAAY;CACvB,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,QAAQ;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,QAAQ;CACR,WAAW;CACX,aAAa;CACb,MAAM;CACN,WAAW;CACX,YAAY;CACZ,cAAc;CACd,UAAU;CACV,eAAe;CACf,iBAAiB;CACjB,aAAa;CACb,SAAS;CACT,cAAc;CACd,cAAc;CACd,QAAQ;CACR,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,0BAA0B;CAC1B,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,gBAAgB;CAChB,YAAY;CACb"}
@@ -1,19 +1,19 @@
1
- const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType = require('./ContentType.js');
2
- const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_SubjectCategories = require('./SubjectCategories.js');
3
- const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_SubjectTypes = require('./SubjectTypes.js');
4
- const require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_WordClass = require('./WordClass.js');
1
+ const require_ContentType = require('./ContentType.js');
2
+ const require_SubjectCategories = require('./SubjectCategories.js');
3
+ const require_SubjectTypes = require('./SubjectTypes.js');
4
+ const require_WordClass = require('./WordClass.js');
5
5
 
6
6
  //#region src/model/index.ts
7
7
  const model = {
8
- contentTypes: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.contentTypes,
9
- subjectCategories: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_SubjectCategories.SubjectCategories_exports,
10
- subjectTypes: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_SubjectTypes.SubjectTypes_exports,
11
- contentTypeMapping: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.contentTypeMapping,
12
- resourceEmbedTypeMapping: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_ContentType.resourceEmbedTypeMapping,
13
- wordClass: require__Users_jec_code_ndla_frontend_packages_packages_ndla_ui_src_model_WordClass.WordClass_exports
8
+ contentTypes: require_ContentType.contentTypes,
9
+ subjectCategories: require_SubjectCategories.SubjectCategories_exports,
10
+ subjectTypes: require_SubjectTypes.SubjectTypes_exports,
11
+ contentTypeMapping: require_ContentType.contentTypeMapping,
12
+ resourceEmbedTypeMapping: require_ContentType.resourceEmbedTypeMapping,
13
+ wordClass: require_WordClass.WordClass_exports
14
14
  };
15
15
  var model_default = model;
16
16
 
17
17
  //#endregion
18
- exports.model_default = model_default;
18
+ exports.default = model_default;
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/model/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2017-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { contentTypes, contentTypeMapping, resourceEmbedTypeMapping } from \"./ContentType\";\nimport * as subjectCategories from \"./SubjectCategories\";\nimport * as subjectTypes from \"./SubjectTypes\";\nimport * as wordClass from \"./WordClass\";\n\nconst model = {\n contentTypes,\n subjectCategories,\n subjectTypes,\n contentTypeMapping,\n resourceEmbedTypeMapping,\n wordClass,\n};\n\nexport default model;\n"],"mappings":";;;;;;AAaA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;AACD;AAED,oBAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/model/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2017-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { contentTypes, contentTypeMapping, resourceEmbedTypeMapping } from \"./ContentType\";\nimport * as subjectCategories from \"./SubjectCategories\";\nimport * as subjectTypes from \"./SubjectTypes\";\nimport * as wordClass from \"./WordClass\";\n\nconst model = {\n contentTypes,\n subjectCategories,\n subjectTypes,\n contentTypeMapping,\n resourceEmbedTypeMapping,\n wordClass,\n};\n\nexport default model;\n"],"mappings":";;;;;;AAaA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACD;AAED,oBAAe"}
@@ -1,15 +1,15 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
- const __ndla_licenses = require_rolldown_runtime.__toESM(require("@ndla/licenses"));
2
+ let __ndla_licenses = require("@ndla/licenses");
3
+ __ndla_licenses = require_rolldown_runtime.__toESM(__ndla_licenses);
3
4
 
4
5
  //#region src/utils/licenseAttributes.ts
5
6
  const licenseAttributes = (license, lang, url) => {
6
7
  const licenseAbbr = (0, __ndla_licenses.getLicenseByAbbreviation)(license ? license : "", lang);
7
- const licenseProps = (0, __ndla_licenses.isCreativeCommonsLicense)(licenseAbbr.rights) ? {
8
+ return (0, __ndla_licenses.isCreativeCommonsLicense)(licenseAbbr.rights) ? {
8
9
  "xmlns:cc": "https://creativecommons.org/ns#",
9
10
  "xmlns:dct": "http://purl.org/dc/terms/",
10
11
  about: url ?? void 0
11
12
  } : {};
12
- return licenseProps;
13
13
  };
14
14
 
15
15
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"licenseAttributes.js","names":["license: string | undefined","lang: string | undefined","url: string | undefined"],"sources":["../../src/utils/licenseAttributes.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { getLicenseByAbbreviation, isCreativeCommonsLicense } from \"@ndla/licenses\";\n\nexport const licenseAttributes = (license: string | undefined, lang: string | undefined, url: string | undefined) => {\n const licenseAbbr = getLicenseByAbbreviation(license ? license : \"\", lang);\n\n const licenseProps = isCreativeCommonsLicense(licenseAbbr.rights)\n ? {\n \"xmlns:cc\": \"https://creativecommons.org/ns#\",\n \"xmlns:dct\": \"http://purl.org/dc/terms/\",\n about: url ?? undefined,\n }\n : {};\n\n return licenseProps;\n};\n"],"mappings":";;;;AAUA,MAAa,oBAAoB,CAACA,SAA6BC,MAA0BC,QAA4B;CACnH,MAAM,cAAc,8CAAyB,UAAU,UAAU,IAAI,KAAK;CAE1E,MAAM,eAAe,8CAAyB,YAAY,OAAO,GAC7D;EACE,YAAY;EACZ,aAAa;EACb,OAAO;CACR,IACD,CAAE;AAEN,QAAO;AACR"}
1
+ {"version":3,"file":"licenseAttributes.js","names":[],"sources":["../../src/utils/licenseAttributes.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { getLicenseByAbbreviation, isCreativeCommonsLicense } from \"@ndla/licenses\";\n\nexport const licenseAttributes = (license: string | undefined, lang: string | undefined, url: string | undefined) => {\n const licenseAbbr = getLicenseByAbbreviation(license ? license : \"\", lang);\n\n const licenseProps = isCreativeCommonsLicense(licenseAbbr.rights)\n ? {\n \"xmlns:cc\": \"https://creativecommons.org/ns#\",\n \"xmlns:dct\": \"http://purl.org/dc/terms/\",\n about: url ?? undefined,\n }\n : {};\n\n return licenseProps;\n};\n"],"mappings":";;;;;AAUA,MAAa,qBAAqB,SAA6B,MAA0B,QAA4B;CACnH,MAAM,4DAAuC,UAAU,UAAU,IAAI,KAAK;AAU1E,sDAR8C,YAAY,OAAO,GAC7D;EACE,YAAY;EACZ,aAAa;EACb,OAAO,OAAO;EACf,GACD,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"relativeUrl.js","names":["url: string","path?: string"],"sources":["../../src/utils/relativeUrl.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nconst supportedTranslationLanguages = [\"nb\", \"nn\", \"en\", \"se\"] as const;\n\nconst ENV_REGEX = /(staging|test)\\.?/;\nconst LANGUAGE_REGEX = new RegExp(`^\\\\/((?:${supportedTranslationLanguages.join(\"|\")})(?:$|\\\\/))`, \"\");\n\nconst NDLA_URL = /(.*\\.)?ndla.no.*/;\nconst REPLACE_WWW = /^www\\./;\n\nexport const getPossiblyRelativeUrl = (url: string, path?: string) => {\n if (!path) return url;\n // If url is a mailto link, return url as is.\n if (url.startsWith(\"mailto:\")) return url;\n // If not on NDLA, or if url is not a NDLA url, return url as is\n if (!NDLA_URL.test(url) || !NDLA_URL.test(path)) return url;\n //Remove environment info\n const urlObj = new URL(url.replace(ENV_REGEX, \"\"));\n const pathObj = new URL(path.replace(ENV_REGEX, \"\"));\n // If the host is the same, return the relative path\n if (urlObj.hostname.replace(REPLACE_WWW, \"\") === pathObj.hostname.replace(REPLACE_WWW, \"\")) {\n // Replace the language part of the url with the language part of the path\n // Keep the search params if they exist\n const search = urlObj.search;\n // If the path language part does not exist, remove it.\n const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);\n const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);\n if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) {\n return `${urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || \"\")}${search}`;\n }\n\n return `${urlObj.pathname}${search}`;\n }\n return url;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,gCAAgC;CAAC;CAAM;CAAM;CAAM;AAAK;AAE9D,MAAM,YAAY;AAClB,MAAM,iBAAiB,IAAI,QAAQ,UAAU,8BAA8B,KAAK,IAAI,CAAC,cAAc;AAEnG,MAAM,WAAW;AACjB,MAAM,cAAc;AAEpB,MAAa,yBAAyB,CAACA,KAAaC,SAAkB;AACpE,MAAK,KAAM,QAAO;AAElB,KAAI,IAAI,WAAW,UAAU,CAAE,QAAO;AAEtC,MAAK,SAAS,KAAK,IAAI,KAAK,SAAS,KAAK,KAAK,CAAE,QAAO;CAExD,MAAM,SAAS,IAAI,IAAI,IAAI,QAAQ,WAAW,GAAG;CACjD,MAAM,UAAU,IAAI,IAAI,KAAK,QAAQ,WAAW,GAAG;AAEnD,KAAI,OAAO,SAAS,QAAQ,aAAa,GAAG,KAAK,QAAQ,SAAS,QAAQ,aAAa,GAAG,EAAE;EAG1F,MAAM,SAAS,OAAO;EAEtB,MAAM,WAAW,OAAO,SAAS,MAAM,eAAe;EACtD,MAAM,YAAY,QAAQ,SAAS,MAAM,eAAe;AACxD,MAAI,WAAW,MAAM,WAAW,OAAO,YAAY,GACjD,SAAQ,EAAE,OAAO,SAAS,QAAQ,SAAS,IAAI,YAAY,MAAM,GAAG,CAAC,EAAE,OAAO;AAGhF,UAAQ,EAAE,OAAO,SAAS,EAAE,OAAO;CACpC;AACD,QAAO;AACR"}
1
+ {"version":3,"file":"relativeUrl.js","names":[],"sources":["../../src/utils/relativeUrl.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nconst supportedTranslationLanguages = [\"nb\", \"nn\", \"en\", \"se\"] as const;\n\nconst ENV_REGEX = /(staging|test)\\.?/;\nconst LANGUAGE_REGEX = new RegExp(`^\\\\/((?:${supportedTranslationLanguages.join(\"|\")})(?:$|\\\\/))`, \"\");\n\nconst NDLA_URL = /(.*\\.)?ndla.no.*/;\nconst REPLACE_WWW = /^www\\./;\n\nexport const getPossiblyRelativeUrl = (url: string, path?: string) => {\n if (!path) return url;\n // If url is a mailto link, return url as is.\n if (url.startsWith(\"mailto:\")) return url;\n // If not on NDLA, or if url is not a NDLA url, return url as is\n if (!NDLA_URL.test(url) || !NDLA_URL.test(path)) return url;\n //Remove environment info\n const urlObj = new URL(url.replace(ENV_REGEX, \"\"));\n const pathObj = new URL(path.replace(ENV_REGEX, \"\"));\n // If the host is the same, return the relative path\n if (urlObj.hostname.replace(REPLACE_WWW, \"\") === pathObj.hostname.replace(REPLACE_WWW, \"\")) {\n // Replace the language part of the url with the language part of the path\n // Keep the search params if they exist\n const search = urlObj.search;\n // If the path language part does not exist, remove it.\n const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);\n const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);\n if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) {\n return `${urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || \"\")}${search}`;\n }\n\n return `${urlObj.pathname}${search}`;\n }\n return url;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,gCAAgC;CAAC;CAAM;CAAM;CAAM;CAAK;AAE9D,MAAM,YAAY;AAClB,MAAM,iBAAiB,IAAI,OAAO,WAAW,8BAA8B,KAAK,IAAI,CAAC,cAAc,GAAG;AAEtG,MAAM,WAAW;AACjB,MAAM,cAAc;AAEpB,MAAa,0BAA0B,KAAa,SAAkB;AACpE,KAAI,CAAC,KAAM,QAAO;AAElB,KAAI,IAAI,WAAW,UAAU,CAAE,QAAO;AAEtC,KAAI,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,CAAE,QAAO;CAExD,MAAM,SAAS,IAAI,IAAI,IAAI,QAAQ,WAAW,GAAG,CAAC;CAClD,MAAM,UAAU,IAAI,IAAI,KAAK,QAAQ,WAAW,GAAG,CAAC;AAEpD,KAAI,OAAO,SAAS,QAAQ,aAAa,GAAG,KAAK,QAAQ,SAAS,QAAQ,aAAa,GAAG,EAAE;EAG1F,MAAM,SAAS,OAAO;EAEtB,MAAM,WAAW,OAAO,SAAS,MAAM,eAAe;EACtD,MAAM,YAAY,QAAQ,SAAS,MAAM,eAAe;AACxD,MAAI,WAAW,MAAM,WAAW,OAAO,YAAY,GACjD,QAAO,GAAG,OAAO,SAAS,QAAQ,SAAS,IAAI,YAAY,MAAM,GAAG,GAAG;AAGzE,SAAO,GAAG,OAAO,WAAW;;AAE9B,QAAO"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
3
  "type": "module",
4
- "version": "56.0.142-alpha.0",
4
+ "version": "56.0.143-alpha.0",
5
5
  "description": "UI component library for NDLA",
6
6
  "license": "GPL-3.0",
7
7
  "exports": {
@@ -38,11 +38,11 @@
38
38
  "dependencies": {
39
39
  "@ark-ui/react": "^5.25.0",
40
40
  "@ndla/core": "^6.0.3-alpha.0",
41
- "@ndla/icons": "^8.0.67-alpha.0",
42
- "@ndla/licenses": "^10.0.0-alpha.0",
43
- "@ndla/primitives": "^1.0.99-alpha.0",
44
- "@ndla/safelink": "^7.0.102-alpha.0",
45
- "@ndla/styled-system": "^0.0.39",
41
+ "@ndla/icons": "^8.0.68-alpha.0",
42
+ "@ndla/licenses": "^10.0.1-alpha.0",
43
+ "@ndla/primitives": "^1.0.100-alpha.0",
44
+ "@ndla/safelink": "^7.0.103-alpha.0",
45
+ "@ndla/styled-system": "^0.0.40",
46
46
  "@ndla/util": "^5.0.12-alpha.0",
47
47
  "html-react-parser": "^5.1.19"
48
48
  },
@@ -54,7 +54,7 @@
54
54
  "react-router": ">= 7.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@ndla/preset-panda": "^0.0.60",
57
+ "@ndla/preset-panda": "^0.0.61",
58
58
  "@ndla/types-backend": "^1.0.50",
59
59
  "@ndla/types-embed": "^5.0.16-alpha.0",
60
60
  "@pandacss/dev": "^1.3.1"
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "6fde2ca9ba17fc522610391805f05984bbe630f6"
65
+ "gitHead": "6718375438d7cf56673b291d98ce643a7ebd54a9"
66
66
  }
@@ -10,7 +10,7 @@ import { type ComponentPropsWithRef, type ReactNode, forwardRef } from "react";
10
10
  import { ark, type HTMLArkProps } from "@ark-ui/react";
11
11
  import { Heading, Text } from "@ndla/primitives";
12
12
  import { cx } from "@ndla/styled-system/css";
13
- import { Stack, styled } from "@ndla/styled-system/jsx";
13
+ import { styled } from "@ndla/styled-system/jsx";
14
14
  import type { StyledProps } from "@ndla/styled-system/types";
15
15
  import { ArticleByline } from "./ArticleByline";
16
16
  import { ContentTypeBadge, type ContentType } from "../ContentTypeBadge/ContentTypeBadge";
@@ -101,8 +101,12 @@ export const ArticleFooter = styled(
101
101
  { baseComponent: true },
102
102
  );
103
103
 
104
- const StyledStack = styled(Stack, {
104
+ const InfoWrapper = styled("div", {
105
105
  base: {
106
+ display: "flex",
107
+ alignItems: "center",
108
+ justifyContent: "space-between",
109
+ gap: "small",
106
110
  width: "100%",
107
111
  minHeight: "xxlarge",
108
112
  },
@@ -144,10 +148,10 @@ export const ArticleTitle = ({
144
148
  <ArticleHeader>
145
149
  <ArticleHGroup>
146
150
  {(!!contentType || !!heartButton) && (
147
- <StyledStack justify="space-between" align="center" direction="row" gap="small">
151
+ <InfoWrapper>
148
152
  {!!contentType && <ContentTypeBadge contentType={contentType}>{contentTypeLabel}</ContentTypeBadge>}
149
153
  {heartButton}
150
- </StyledStack>
154
+ </InfoWrapper>
151
155
  )}
152
156
  <Heading textStyle="heading.medium" id={id} lang={lang} property="dct:title">
153
157
  {title}
@@ -11,7 +11,11 @@ import { Figure } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
12
  import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
13
13
  import type { ConceptVisualElementMeta } from "@ndla/types-embed";
14
- import { BrightcoveEmbed, ExternalEmbed, H5pEmbed, IframeEmbed, ImageEmbed } from "../Embed";
14
+ import BrightcoveEmbed from "../Embed/BrightcoveEmbed";
15
+ import ExternalEmbed from "../Embed/ExternalEmbed";
16
+ import H5pEmbed from "../Embed/H5pEmbed";
17
+ import IframeEmbed from "../Embed/IframeEmbed";
18
+ import ImageEmbed from "../Embed/ImageEmbed";
15
19
  import { EmbedByline } from "../LicenseByline/EmbedByline";
16
20
  import { licenseAttributes } from "../utils/licenseAttributes";
17
21
 
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { AudioEmbedData, AudioMeta } from "@ndla/types-embed";
12
12
  import AudioEmbed from "./AudioEmbed";
13
- import { ArticleContent, ArticleWrapper } from "../Article";
13
+ import { ArticleContent, ArticleWrapper } from "../Article/Article";
14
14
 
15
15
  const embedData: AudioEmbedData = {
16
16
  resource: "audio",
@@ -11,8 +11,8 @@ import { styled } from "@ndla/styled-system/jsx";
11
11
  import type { AudioMetaData } from "@ndla/types-embed";
12
12
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
13
13
  import type { Author } from "./ImageEmbed";
14
- import AudioPlayer from "../AudioPlayer";
15
- import { EmbedByline } from "../LicenseByline";
14
+ import AudioPlayer from "../AudioPlayer/AudioPlayer";
15
+ import { EmbedByline } from "../LicenseByline/EmbedByline";
16
16
  import { licenseAttributes } from "../utils/licenseAttributes";
17
17
 
18
18
  const StyledFigure = styled(Figure, {
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { BrightcoveData, BrightcoveEmbedData, BrightcoveMetaData } from "@ndla/types-embed";
12
12
  import BrightcoveEmbed from "./BrightcoveEmbed";
13
- import { ArticleContent, ArticleWrapper } from "../Article";
13
+ import { ArticleContent, ArticleWrapper } from "../Article/Article";
14
14
 
15
15
  const embedData: BrightcoveEmbedData = {
16
16
  resource: "brightcove",
@@ -14,7 +14,7 @@ import { styled } from "@ndla/styled-system/jsx";
14
14
  import type { BrightcoveEmbedData, BrightcoveMetaData, BrightcoveVideoSource } from "@ndla/types-embed";
15
15
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
16
16
  import type { RenderContext } from "./types";
17
- import { EmbedByline } from "../LicenseByline";
17
+ import { EmbedByline } from "../LicenseByline/EmbedByline";
18
18
  import { licenseAttributes } from "../utils/licenseAttributes";
19
19
 
20
20
  interface Props {
@@ -13,8 +13,8 @@ import { Button, Figure } from "@ndla/primitives";
13
13
  import { styled } from "@ndla/styled-system/jsx";
14
14
  import type { CodeMetaData } from "@ndla/types-embed";
15
15
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
16
- import { CodeBlock, codeLanguageOptions } from "../CodeBlock";
17
- import type { ICodeLangugeOption } from "../CodeBlock/codeLanguageOptions";
16
+ import CodeBlock from "../CodeBlock/CodeBlock";
17
+ import { codeLanguageOptions, type ICodeLangugeOption } from "../CodeBlock/codeLanguageOptions";
18
18
 
19
19
  interface Props {
20
20
  embed: CodeMetaData;
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { ConceptData, ConceptEmbedData } from "@ndla/types-embed";
12
12
  import { ConceptEmbed } from "./ConceptEmbed";
13
- import { ArticleContent, ArticleWrapper } from "../Article";
13
+ import { ArticleContent, ArticleWrapper } from "../Article/Article";
14
14
 
15
15
  const blockEmbedData: ConceptEmbedData = {
16
16
  contentId: "35",
@@ -9,7 +9,7 @@
9
9
  import type { ReactNode } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
  import type { CopyrightMetaData } from "@ndla/types-embed";
12
- import { EmbedByline } from "../LicenseByline";
12
+ import { EmbedByline } from "../LicenseByline/EmbedByline";
13
13
 
14
14
  interface Props {
15
15
  embed: CopyrightMetaData;
@@ -10,8 +10,7 @@ import { type ReactNode } from "react";
10
10
  import { ErrorWarningLine } from "@ndla/icons";
11
11
  import { Figure, type FigureFloat, type FigureSize } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
- import { EmbedByline } from "../LicenseByline";
14
- import { type EmbedBylineErrorProps } from "../LicenseByline/EmbedByline";
13
+ import { EmbedByline, type EmbedBylineErrorProps } from "../LicenseByline/EmbedByline";
15
14
 
16
15
  interface Props {
17
16
  type: EmbedBylineErrorProps["type"];
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { OembedEmbedData, OembedData } from "@ndla/types-embed";
12
12
  import ExternalEmbed from "./ExternalEmbed";
13
- import { ArticleWrapper, ArticleContent } from "../Article";
13
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
14
 
15
15
  const embedData: OembedEmbedData = {
16
16
  resource: "external",
@@ -12,7 +12,7 @@ import { Figure } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
13
  import type { OembedMetaData } from "@ndla/types-embed";
14
14
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
15
- import { ResourceBox } from "../ResourceBox";
15
+ import ResourceBox from "../ResourceBox/ResourceBox";
16
16
 
17
17
  interface Props {
18
18
  embed: OembedMetaData;
@@ -9,7 +9,7 @@
9
9
  import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
10
  import type { FootnoteData, FootnoteEmbedData } from "@ndla/types-embed";
11
11
  import FootnoteEmbed from "./FootnoteEmbed";
12
- import { ArticleByline } from "../Article";
12
+ import { ArticleByline } from "../Article/ArticleByline";
13
13
 
14
14
  /**
15
15
  * Kildehenvisninger benytter [APA-stilen](https://sokogskriv.no/kildebruk-og-referanser/referansestiler/apa-6th/) for utlistning nederst på siden.
@@ -13,7 +13,7 @@ import { styled } from "@ndla/styled-system/jsx";
13
13
  import type { ConceptMetaData } from "@ndla/types-embed";
14
14
  import { ConceptInlineTriggerButton } from "./ConceptInlineTriggerButton";
15
15
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
16
- import { Gloss } from "../Gloss";
16
+ import Gloss from "../Gloss/Gloss";
17
17
 
18
18
  interface Props {
19
19
  embed: ConceptMetaData;
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { H5pEmbedData, H5pData } from "@ndla/types-embed";
12
12
  import H5pEmbed from "./H5pEmbed";
13
- import { ArticleWrapper, ArticleContent } from "../Article";
13
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
14
 
15
15
  const embedData: H5pEmbedData = {
16
16
  resource: "h5p",
@@ -10,7 +10,7 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { IframeData, IframeEmbedData } from "@ndla/types-embed";
12
12
  import IframeEmbed from "./IframeEmbed";
13
- import { ArticleWrapper, ArticleContent } from "../Article";
13
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
14
 
15
15
  const embedData: IframeEmbedData = {
16
16
  width: "708px",
@@ -12,7 +12,7 @@ import { Figure } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
13
  import type { IframeMetaData } from "@ndla/types-embed";
14
14
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
15
- import { ResourceBox } from "../ResourceBox";
15
+ import ResourceBox from "../ResourceBox/ResourceBox";
16
16
 
17
17
  interface Props {
18
18
  embed: IframeMetaData;
@@ -13,8 +13,8 @@ import { styled } from "@ndla/styled-system/jsx";
13
13
  import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
14
14
  import type { ImageEmbedData } from "@ndla/types-embed";
15
15
  import ImageEmbed from "./ImageEmbed";
16
- import { ArticleWrapper, ArticleContent } from "../Article";
17
- import { Grid } from "../Grid";
16
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
17
+ import { Grid } from "../Grid/Grid";
18
18
 
19
19
  const embedData: ImageEmbedData = {
20
20
  resource: "image",
@@ -15,7 +15,7 @@ import { styled } from "@ndla/styled-system/jsx";
15
15
  import type { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
16
16
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
17
17
  import type { RenderContext } from "./types";
18
- import { EmbedByline } from "../LicenseByline";
18
+ import { EmbedByline } from "../LicenseByline/EmbedByline";
19
19
  import { licenseAttributes } from "../utils/licenseAttributes";
20
20
 
21
21
  interface Props {
@@ -10,8 +10,8 @@ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import type { RelatedContentMetaData } from "@ndla/types-embed";
12
12
  import RelatedContentEmbed from "./RelatedContentEmbed";
13
- import { ArticleWrapper, ArticleContent } from "../Article";
14
- import RelatedArticleList from "../RelatedArticleList";
13
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
14
+ import { RelatedArticleList } from "../RelatedArticleList/RelatedArticleList";
15
15
 
16
16
  const filmResourceMeta: RelatedContentMetaData = {
17
17
  resource: "related-content",
@@ -12,9 +12,9 @@ import type { UUDisclaimerData, UuDisclaimerEmbedData } from "@ndla/types-embed"
12
12
  import H5pEmbed from "./H5pEmbed";
13
13
  import IframeEmbed from "./IframeEmbed";
14
14
  import UuDisclaimerEmbed from "./UuDisclaimerEmbed";
15
- import { ArticleWrapper, ArticleContent } from "../Article";
16
- import CopyParagraphButton from "../CopyParagraphButton";
17
- import FactBox from "../FactBox";
15
+ import { ArticleWrapper, ArticleContent } from "../Article/Article";
16
+ import CopyParagraphButton from "../CopyParagraphButton/CopyParagraphButton";
17
+ import FactBox from "../FactBox/FactBox";
18
18
 
19
19
  const embedData: UuDisclaimerEmbedData = {
20
20
  resource: "uu-disclaimer",
@@ -11,9 +11,9 @@ import { useTranslation } from "react-i18next";
11
11
  import { DownloadLine } from "@ndla/icons";
12
12
  import { Text } from "@ndla/primitives";
13
13
  import { SafeLink } from "@ndla/safelink";
14
- import { HStack, styled } from "@ndla/styled-system/jsx";
14
+ import { styled } from "@ndla/styled-system/jsx";
15
15
  import { linkOverlay } from "@ndla/styled-system/patterns";
16
- import { FileListItem } from ".";
16
+ import { FileListItem } from "./FileList";
17
17
 
18
18
  export interface FileProps extends ComponentPropsWithRef<"div"> {
19
19
  title: string;
@@ -45,8 +45,11 @@ const StyledSafeLink = styled(SafeLink, {
45
45
  },
46
46
  });
47
47
 
48
- const StyledHStack = styled(HStack, {
48
+ const FileContainer = styled("div", {
49
49
  base: {
50
+ display: "flex",
51
+ alignItems: "center",
52
+ justifyContent: "space-between",
50
53
  position: "relative",
51
54
  paddingBlock: "small",
52
55
  paddingInlineEnd: "medium",
@@ -55,6 +58,14 @@ const StyledHStack = styled(HStack, {
55
58
  },
56
59
  });
57
60
 
61
+ const InfoContainer = styled("div", {
62
+ base: {
63
+ display: "flex",
64
+ gap: "xxsmall",
65
+ alignItems: "center",
66
+ },
67
+ });
68
+
58
69
  export const File = forwardRef<HTMLDivElement, FileProps>(
59
70
  ({ title, url, fileExists, fileType, fileSize, ...rest }, ref) => {
60
71
  const { t } = useTranslation();
@@ -63,8 +74,8 @@ export const File = forwardRef<HTMLDivElement, FileProps>(
63
74
  const tooltip = `${t("download")} ${filename}`;
64
75
 
65
76
  return (
66
- <StyledHStack justify="space-between" ref={ref} {...rest}>
67
- <HStack gap="xxsmall">
77
+ <FileContainer ref={ref} {...rest}>
78
+ <InfoContainer>
68
79
  <DownloadLine />
69
80
  {fileExists ? (
70
81
  <StyledSafeLink unstyled css={linkOverlay.raw()} to={downloadUrl} title={tooltip}>
@@ -76,11 +87,11 @@ export const File = forwardRef<HTMLDivElement, FileProps>(
76
87
  <Text textStyle="label.large" asChild consumeCss>
77
88
  <span>({fileType?.toUpperCase()})</span>
78
89
  </Text>
79
- </HStack>
90
+ </InfoContainer>
80
91
  <Text textStyle="label.large" asChild consumeCss>
81
92
  <span>{fileSize}</span>
82
93
  </Text>
83
- </StyledHStack>
94
+ </FileContainer>
84
95
  );
85
96
  },
86
97
  );
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import type { Meta, StoryObj, StoryFn } from "@storybook/react";
10
- import { LinkBlockSection } from ".";
11
10
  import LinkBlock from "./LinkBlock";
11
+ import LinkBlockSection from "./LinkBlockSection";
12
12
 
13
13
  export default {
14
14
  title: "Components/Link Block",
@@ -9,8 +9,8 @@
9
9
  import type { Meta } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import { Pitch, type Props } from "./Pitch";
12
- import { ArticleContent, ArticleWrapper } from "../Article";
13
- import { Grid } from "../Grid";
12
+ import { ArticleContent, ArticleWrapper } from "../Article/Article";
13
+ import { Grid } from "../Grid/Grid";
14
14
 
15
15
  const args: Props = {
16
16
  title: "Min pitch",