@ndla/ui 56.0.148-alpha.0 → 56.0.149-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 (263) hide show
  1. package/es/AudioPlayer/AudioPlayer.mjs +5 -6
  2. package/es/AudioPlayer/AudioPlayer.mjs.map +1 -1
  3. package/es/AudioPlayer/Controls.mjs +1 -2
  4. package/es/AudioPlayer/Controls.mjs.map +1 -1
  5. package/es/AudioPlayer/SpeechControl.mjs +1 -2
  6. package/es/AudioPlayer/SpeechControl.mjs.map +1 -1
  7. package/es/Breadcrumb/Breadcrumb.mjs +3 -4
  8. package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
  9. package/es/Breadcrumb/BreadcrumbItem.mjs +1 -2
  10. package/es/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  11. package/es/Breadcrumb/HomeBreadcrumb.mjs +3 -4
  12. package/es/Breadcrumb/HomeBreadcrumb.mjs.map +1 -1
  13. package/es/CampaignBlock/CampaignBlock.mjs +1 -2
  14. package/es/CampaignBlock/CampaignBlock.mjs.map +1 -1
  15. package/es/CodeBlock/CodeBlock.mjs +2 -3
  16. package/es/CodeBlock/CodeBlock.mjs.map +1 -1
  17. package/es/Concept/Concept.mjs +7 -7
  18. package/es/Concept/Concept.mjs.map +1 -1
  19. package/es/CopyParagraphButton/CopyParagraphButton.mjs +1 -2
  20. package/es/CopyParagraphButton/CopyParagraphButton.mjs.map +1 -1
  21. package/es/Embed/AudioEmbed.mjs +6 -7
  22. package/es/Embed/AudioEmbed.mjs.map +1 -1
  23. package/es/Embed/BrightcoveEmbed.mjs +3 -4
  24. package/es/Embed/BrightcoveEmbed.mjs.map +1 -1
  25. package/es/Embed/CodeEmbed.mjs +5 -6
  26. package/es/Embed/CodeEmbed.mjs.map +1 -1
  27. package/es/Embed/ConceptEmbed.mjs +2 -2
  28. package/es/Embed/ConceptEmbed.mjs.map +1 -1
  29. package/es/Embed/ContentLinkEmbed.mjs +1 -2
  30. package/es/Embed/ContentLinkEmbed.mjs.map +1 -1
  31. package/es/Embed/CopyrightEmbed.mjs +1 -2
  32. package/es/Embed/CopyrightEmbed.mjs.map +1 -1
  33. package/es/Embed/EmbedErrorPlaceholder.mjs +1 -2
  34. package/es/Embed/EmbedErrorPlaceholder.mjs.map +1 -1
  35. package/es/Embed/ExternalEmbed.mjs +5 -6
  36. package/es/Embed/ExternalEmbed.mjs.map +1 -1
  37. package/es/Embed/FootnoteEmbed.mjs +1 -2
  38. package/es/Embed/FootnoteEmbed.mjs.map +1 -1
  39. package/es/Embed/GlossEmbed.mjs +5 -5
  40. package/es/Embed/GlossEmbed.mjs.map +1 -1
  41. package/es/Embed/H5pEmbed.mjs +3 -4
  42. package/es/Embed/H5pEmbed.mjs.map +1 -1
  43. package/es/Embed/IframeEmbed.mjs +5 -6
  44. package/es/Embed/IframeEmbed.mjs.map +1 -1
  45. package/es/Embed/ImageEmbed.mjs +3 -4
  46. package/es/Embed/ImageEmbed.mjs.map +1 -1
  47. package/es/Embed/RelatedContentEmbed.mjs +1 -2
  48. package/es/Embed/RelatedContentEmbed.mjs.map +1 -1
  49. package/es/Embed/UnknownEmbed.mjs +1 -2
  50. package/es/Embed/UnknownEmbed.mjs.map +1 -1
  51. package/es/Embed/UuDisclaimerEmbed.mjs +1 -2
  52. package/es/Embed/UuDisclaimerEmbed.mjs.map +1 -1
  53. package/es/FactBox/FactBox.mjs +1 -2
  54. package/es/FactBox/FactBox.mjs.map +1 -1
  55. package/es/Gloss/Gloss.mjs +5 -6
  56. package/es/Gloss/Gloss.mjs.map +1 -1
  57. package/es/Gloss/GlossExample.mjs +1 -2
  58. package/es/Gloss/GlossExample.mjs.map +1 -1
  59. package/es/KeyFigure/KeyFigure.mjs +1 -2
  60. package/es/KeyFigure/KeyFigure.mjs.map +1 -1
  61. package/es/LinkBlock/LinkBlock.mjs +1 -2
  62. package/es/LinkBlock/LinkBlock.mjs.map +1 -1
  63. package/es/LinkBlock/LinkBlockSection.mjs +1 -2
  64. package/es/LinkBlock/LinkBlockSection.mjs.map +1 -1
  65. package/es/ResourceBox/ResourceBox.mjs +1 -2
  66. package/es/ResourceBox/ResourceBox.mjs.map +1 -1
  67. package/es/index.mjs +31 -27
  68. package/es/locale/messages-en.mjs +38 -37
  69. package/es/locale/messages-en.mjs.map +1 -1
  70. package/es/locale/messages-nb.mjs +38 -37
  71. package/es/locale/messages-nb.mjs.map +1 -1
  72. package/es/locale/messages-nn.mjs +38 -37
  73. package/es/locale/messages-nn.mjs.map +1 -1
  74. package/es/locale/messages-se.mjs +38 -37
  75. package/es/locale/messages-se.mjs.map +1 -1
  76. package/es/model/SubjectCategories.mjs +9 -2
  77. package/es/model/SubjectCategories.mjs.map +1 -1
  78. package/es/model/SubjectTypes.mjs +9 -2
  79. package/es/model/SubjectTypes.mjs.map +1 -1
  80. package/es/model/WordClass.mjs +1 -1
  81. package/es/model/index.mjs +2 -3
  82. package/es/model/index.mjs.map +1 -1
  83. package/lib/AudioPlayer/AudioPlayer.d.ts +2 -2
  84. package/lib/AudioPlayer/AudioPlayer.js +3 -4
  85. package/lib/AudioPlayer/AudioPlayer.js.map +1 -1
  86. package/lib/AudioPlayer/Controls.d.ts +2 -2
  87. package/lib/AudioPlayer/Controls.js +1 -2
  88. package/lib/AudioPlayer/Controls.js.map +1 -1
  89. package/lib/AudioPlayer/SpeechControl.d.ts +2 -2
  90. package/lib/AudioPlayer/SpeechControl.js +1 -2
  91. package/lib/AudioPlayer/SpeechControl.js.map +1 -1
  92. package/lib/Breadcrumb/Breadcrumb.d.ts +2 -2
  93. package/lib/Breadcrumb/Breadcrumb.js +2 -3
  94. package/lib/Breadcrumb/Breadcrumb.js.map +1 -1
  95. package/lib/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  96. package/lib/Breadcrumb/BreadcrumbItem.js +1 -2
  97. package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -1
  98. package/lib/Breadcrumb/HomeBreadcrumb.d.ts +2 -2
  99. package/lib/Breadcrumb/HomeBreadcrumb.js +2 -3
  100. package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -1
  101. package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
  102. package/lib/CampaignBlock/CampaignBlock.js +1 -2
  103. package/lib/CampaignBlock/CampaignBlock.js.map +1 -1
  104. package/lib/CodeBlock/CodeBlock.d.ts +2 -2
  105. package/lib/CodeBlock/CodeBlock.js +2 -3
  106. package/lib/CodeBlock/CodeBlock.js.map +1 -1
  107. package/lib/Concept/Concept.js +2 -2
  108. package/lib/Concept/Concept.js.map +1 -1
  109. package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +2 -2
  110. package/lib/CopyParagraphButton/CopyParagraphButton.js +1 -2
  111. package/lib/CopyParagraphButton/CopyParagraphButton.js.map +1 -1
  112. package/lib/Embed/AudioEmbed.d.ts +2 -2
  113. package/lib/Embed/AudioEmbed.js +4 -5
  114. package/lib/Embed/AudioEmbed.js.map +1 -1
  115. package/lib/Embed/BrightcoveEmbed.d.ts +2 -2
  116. package/lib/Embed/BrightcoveEmbed.js +2 -3
  117. package/lib/Embed/BrightcoveEmbed.js.map +1 -1
  118. package/lib/Embed/CodeEmbed.d.ts +2 -2
  119. package/lib/Embed/CodeEmbed.js +3 -4
  120. package/lib/Embed/CodeEmbed.js.map +1 -1
  121. package/lib/Embed/ConceptEmbed.js +1 -1
  122. package/lib/Embed/ConceptEmbed.js.map +1 -1
  123. package/lib/Embed/ContentLinkEmbed.d.ts +2 -2
  124. package/lib/Embed/ContentLinkEmbed.js +1 -2
  125. package/lib/Embed/ContentLinkEmbed.js.map +1 -1
  126. package/lib/Embed/CopyrightEmbed.d.ts +2 -2
  127. package/lib/Embed/CopyrightEmbed.js +1 -2
  128. package/lib/Embed/CopyrightEmbed.js.map +1 -1
  129. package/lib/Embed/EmbedErrorPlaceholder.d.ts +2 -2
  130. package/lib/Embed/EmbedErrorPlaceholder.js +1 -2
  131. package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -1
  132. package/lib/Embed/ExternalEmbed.d.ts +2 -2
  133. package/lib/Embed/ExternalEmbed.js +3 -4
  134. package/lib/Embed/ExternalEmbed.js.map +1 -1
  135. package/lib/Embed/FootnoteEmbed.d.ts +2 -2
  136. package/lib/Embed/FootnoteEmbed.js +1 -2
  137. package/lib/Embed/FootnoteEmbed.js.map +1 -1
  138. package/lib/Embed/GlossEmbed.js +3 -3
  139. package/lib/Embed/GlossEmbed.js.map +1 -1
  140. package/lib/Embed/H5pEmbed.d.ts +2 -2
  141. package/lib/Embed/H5pEmbed.js +2 -3
  142. package/lib/Embed/H5pEmbed.js.map +1 -1
  143. package/lib/Embed/IframeEmbed.d.ts +2 -2
  144. package/lib/Embed/IframeEmbed.js +3 -4
  145. package/lib/Embed/IframeEmbed.js.map +1 -1
  146. package/lib/Embed/ImageEmbed.d.ts +2 -2
  147. package/lib/Embed/ImageEmbed.js +2 -3
  148. package/lib/Embed/ImageEmbed.js.map +1 -1
  149. package/lib/Embed/RelatedContentEmbed.d.ts +2 -2
  150. package/lib/Embed/RelatedContentEmbed.js +1 -2
  151. package/lib/Embed/RelatedContentEmbed.js.map +1 -1
  152. package/lib/Embed/UnknownEmbed.d.ts +2 -2
  153. package/lib/Embed/UnknownEmbed.js +1 -2
  154. package/lib/Embed/UnknownEmbed.js.map +1 -1
  155. package/lib/Embed/UuDisclaimerEmbed.d.ts +2 -2
  156. package/lib/Embed/UuDisclaimerEmbed.js +1 -2
  157. package/lib/Embed/UuDisclaimerEmbed.js.map +1 -1
  158. package/lib/FactBox/FactBox.d.ts +2 -2
  159. package/lib/FactBox/FactBox.js +1 -2
  160. package/lib/FactBox/FactBox.js.map +1 -1
  161. package/lib/Gloss/Gloss.d.ts +2 -2
  162. package/lib/Gloss/Gloss.js +3 -4
  163. package/lib/Gloss/Gloss.js.map +1 -1
  164. package/lib/Gloss/GlossExample.d.ts +2 -2
  165. package/lib/Gloss/GlossExample.js +1 -2
  166. package/lib/Gloss/GlossExample.js.map +1 -1
  167. package/lib/KeyFigure/KeyFigure.d.ts +1 -2
  168. package/lib/KeyFigure/KeyFigure.js +1 -2
  169. package/lib/KeyFigure/KeyFigure.js.map +1 -1
  170. package/lib/LinkBlock/LinkBlock.d.ts +2 -2
  171. package/lib/LinkBlock/LinkBlock.js +1 -2
  172. package/lib/LinkBlock/LinkBlock.js.map +1 -1
  173. package/lib/LinkBlock/LinkBlockSection.d.ts +2 -2
  174. package/lib/LinkBlock/LinkBlockSection.js +1 -2
  175. package/lib/LinkBlock/LinkBlockSection.js.map +1 -1
  176. package/lib/ResourceBox/ResourceBox.d.ts +1 -1
  177. package/lib/ResourceBox/ResourceBox.js +0 -2
  178. package/lib/ResourceBox/ResourceBox.js.map +1 -1
  179. package/lib/index.d.ts +30 -26
  180. package/lib/index.js +37 -27
  181. package/lib/locale/messages-en.d.ts +11 -9
  182. package/lib/locale/messages-en.js +47 -46
  183. package/lib/locale/messages-en.js.map +1 -1
  184. package/lib/locale/messages-nb.d.ts +11 -9
  185. package/lib/locale/messages-nb.js +47 -46
  186. package/lib/locale/messages-nb.js.map +1 -1
  187. package/lib/locale/messages-nn.d.ts +11 -9
  188. package/lib/locale/messages-nn.js +47 -46
  189. package/lib/locale/messages-nn.js.map +1 -1
  190. package/lib/locale/messages-se.d.ts +11 -9
  191. package/lib/locale/messages-se.js +47 -46
  192. package/lib/locale/messages-se.js.map +1 -1
  193. package/lib/model/SubjectCategories.d.ts +6 -0
  194. package/lib/model/SubjectCategories.js +9 -1
  195. package/lib/model/SubjectCategories.js.map +1 -1
  196. package/lib/model/SubjectTypes.d.ts +6 -0
  197. package/lib/model/SubjectTypes.js +9 -1
  198. package/lib/model/SubjectTypes.js.map +1 -1
  199. package/lib/model/WordClass.js +1 -0
  200. package/lib/model/index.d.ts +1 -2
  201. package/lib/model/index.js +2 -3
  202. package/lib/model/index.js.map +1 -1
  203. package/package.json +8 -8
  204. package/src/AudioPlayer/AudiPlayer.stories.tsx +1 -1
  205. package/src/AudioPlayer/AudioPlayer.tsx +3 -5
  206. package/src/AudioPlayer/Controls.tsx +1 -3
  207. package/src/AudioPlayer/SpeechControl.tsx +1 -3
  208. package/src/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  209. package/src/Breadcrumb/Breadcrumb.tsx +2 -4
  210. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -3
  211. package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +1 -1
  212. package/src/Breadcrumb/HomeBreadcrumb.tsx +2 -4
  213. package/src/CampaignBlock/CampaignBlock.stories.tsx +1 -1
  214. package/src/CampaignBlock/CampaignBlock.tsx +1 -3
  215. package/src/CodeBlock/CodeBlock.stories.tsx +1 -1
  216. package/src/CodeBlock/CodeBlock.tsx +1 -3
  217. package/src/Concept/Concept.tsx +5 -5
  218. package/src/CopyParagraphButton/CopyParagraphButton.tsx +1 -3
  219. package/src/Embed/AudioEmbed.stories.tsx +1 -1
  220. package/src/Embed/AudioEmbed.tsx +3 -5
  221. package/src/Embed/BrightcoveEmbed.stories.tsx +1 -1
  222. package/src/Embed/BrightcoveEmbed.tsx +2 -4
  223. package/src/Embed/CodeEmbed.stories.tsx +1 -1
  224. package/src/Embed/CodeEmbed.tsx +3 -5
  225. package/src/Embed/ConceptEmbed.tsx +1 -1
  226. package/src/Embed/ContentLinkEmbed.tsx +1 -3
  227. package/src/Embed/CopyrightEmbed.tsx +1 -3
  228. package/src/Embed/EmbedErrorPlaceholder.tsx +1 -3
  229. package/src/Embed/ExternalEmbed.stories.tsx +1 -1
  230. package/src/Embed/ExternalEmbed.tsx +3 -4
  231. package/src/Embed/FootnoteEmbed.stories.tsx +1 -1
  232. package/src/Embed/FootnoteEmbed.tsx +1 -3
  233. package/src/Embed/GlossEmbed.tsx +2 -2
  234. package/src/Embed/H5pEmbed.stories.tsx +1 -1
  235. package/src/Embed/H5pEmbed.tsx +2 -4
  236. package/src/Embed/IframeEmbed.stories.tsx +1 -1
  237. package/src/Embed/IframeEmbed.tsx +3 -5
  238. package/src/Embed/ImageEmbed.stories.tsx +1 -1
  239. package/src/Embed/ImageEmbed.tsx +2 -4
  240. package/src/Embed/RelatedContentEmbed.stories.tsx +1 -1
  241. package/src/Embed/RelatedContentEmbed.tsx +1 -3
  242. package/src/Embed/UnknownEmbed.tsx +1 -3
  243. package/src/Embed/UuDisclaimerEmbed.stories.tsx +5 -5
  244. package/src/Embed/UuDisclaimerEmbed.tsx +1 -3
  245. package/src/FactBox/FactBox.tsx +1 -3
  246. package/src/FactBox/Factbox.stories.tsx +1 -1
  247. package/src/Gloss/Gloss.stories.tsx +2 -2
  248. package/src/Gloss/Gloss.tsx +3 -5
  249. package/src/Gloss/GlossExample.tsx +1 -3
  250. package/src/KeyFigure/KeyFigure.stories.tsx +1 -1
  251. package/src/KeyFigure/KeyFigure.tsx +1 -3
  252. package/src/LinkBlock/LinkBlock.stories.tsx +2 -2
  253. package/src/LinkBlock/LinkBlock.tsx +1 -3
  254. package/src/LinkBlock/LinkBlockSection.tsx +1 -3
  255. package/src/ResourceBox/ResourceBox.tsx +0 -2
  256. package/src/index.ts +30 -26
  257. package/src/locale/messages-en.ts +38 -38
  258. package/src/locale/messages-nb.ts +38 -38
  259. package/src/locale/messages-nn.ts +38 -38
  260. package/src/locale/messages-se.ts +38 -38
  261. package/src/model/SubjectCategories.ts +7 -0
  262. package/src/model/SubjectTypes.ts +7 -0
  263. package/src/model/index.ts +1 -3
@@ -47,8 +47,7 @@ const UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }) => {
47
47
  })]
48
48
  });
49
49
  };
50
- var UuDisclaimerEmbed_default = UuDisclaimerEmbed;
51
50
 
52
51
  //#endregion
53
- export { UuDisclaimerEmbed_default as default };
52
+ export { UuDisclaimerEmbed };
54
53
  //# sourceMappingURL=UuDisclaimerEmbed.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"UuDisclaimerEmbed.mjs","names":[],"sources":["../../src/Embed/UuDisclaimerEmbed.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Portal } from \"@ark-ui/react\";\nimport { AccessibilityFill, ErrorWarningFill } from \"@ndla/icons\";\nimport { IconButton, PopoverContent, PopoverRoot, PopoverTrigger } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { UuDisclaimerMetaData } from \"@ndla/types-embed\";\n\ninterface Props {\n embed: UuDisclaimerMetaData;\n transformedDisclaimer: ReactNode;\n children?: ReactNode;\n}\n\nconst DisclaimerWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n clear: \"both\",\n },\n});\n\nconst StyledIconButton = styled(IconButton, {\n base: {\n alignSelf: \"flex-end\",\n },\n});\n\nconst StyledErrorWarningFill = styled(ErrorWarningFill, {\n base: {\n alignSelf: \"flex-end\",\n fill: \"icon.subtle\",\n },\n});\n\nconst StyledPopoverContent = styled(PopoverContent, {\n base: {\n width: \"surface.xlarge\",\n maxHeight: \"50vh\",\n overflowY: \"auto\",\n },\n});\n\nconst UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }: Props) => {\n const { t } = useTranslation();\n if (embed.status === \"error\") {\n return (\n <DisclaimerWrapper>\n <StyledErrorWarningFill\n aria-label={t(\"embed.embedError\", { type: t(\"embed.type.disclaimer\") })}\n title={t(\"embed.embedError\", { type: t(\"embed.type.disclaimer\") })}\n />\n {children}\n </DisclaimerWrapper>\n );\n }\n\n return (\n <DisclaimerWrapper role=\"region\" data-embed-type=\"uu-disclaimer\">\n <PopoverRoot>\n <PopoverTrigger asChild>\n <StyledIconButton\n size=\"small\"\n variant=\"secondary\"\n aria-label={t(\"uuDisclaimer.title\")}\n title={t(\"uuDisclaimer.title\")}\n >\n <AccessibilityFill />\n </StyledIconButton>\n </PopoverTrigger>\n <Portal>\n <StyledPopoverContent>\n <div>{transformedDisclaimer}</div>\n </StyledPopoverContent>\n </Portal>\n </PopoverRoot>\n <div data-uu-content=\"\">{children}</div>\n </DisclaimerWrapper>\n );\n};\n\nexport default UuDisclaimerEmbed;\n"],"mappings":";;;;;;;;;AAsBA,MAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,OAAO;CACR,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,YAAY,EAC1C,MAAM,EACJ,WAAW,YACZ,EACF,CAAC;AAEF,MAAM,yBAAyB,OAAO,kBAAkB,EACtD,MAAM;CACJ,WAAW;CACX,MAAM;CACP,EACF,CAAC;AAEF,MAAM,uBAAuB,OAAO,gBAAgB,EAClD,MAAM;CACJ,OAAO;CACP,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,qBAAqB,EAAE,OAAO,uBAAuB,eAAsB;CAC/E,MAAM,EAAE,MAAM,gBAAgB;AAC9B,KAAI,MAAM,WAAW,QACnB,QACE,qBAAC,gCACC,oBAAC;EACC,cAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;EACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;GAClE,EACD,YACiB;AAIxB,QACE,qBAAC;EAAkB,MAAK;EAAS,mBAAgB;aAC/C,qBAAC,0BACC,oBAAC;GAAe;aACd,oBAAC;IACC,MAAK;IACL,SAAQ;IACR,cAAY,EAAE,qBAAqB;IACnC,OAAO,EAAE,qBAAqB;cAE9B,oBAAC,sBAAoB;KACJ;IACJ,EACjB,oBAAC,oBACC,oBAAC,kCACC,oBAAC,mBAAK,wBAA4B,GACb,GAChB,IACG,EACd,oBAAC;GAAI,mBAAgB;GAAI;IAAe;GACtB;;AAIxB,gCAAe"}
1
+ {"version":3,"file":"UuDisclaimerEmbed.mjs","names":[],"sources":["../../src/Embed/UuDisclaimerEmbed.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Portal } from \"@ark-ui/react\";\nimport { AccessibilityFill, ErrorWarningFill } from \"@ndla/icons\";\nimport { IconButton, PopoverContent, PopoverRoot, PopoverTrigger } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { UuDisclaimerMetaData } from \"@ndla/types-embed\";\n\ninterface Props {\n embed: UuDisclaimerMetaData;\n transformedDisclaimer: ReactNode;\n children?: ReactNode;\n}\n\nconst DisclaimerWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n clear: \"both\",\n },\n});\n\nconst StyledIconButton = styled(IconButton, {\n base: {\n alignSelf: \"flex-end\",\n },\n});\n\nconst StyledErrorWarningFill = styled(ErrorWarningFill, {\n base: {\n alignSelf: \"flex-end\",\n fill: \"icon.subtle\",\n },\n});\n\nconst StyledPopoverContent = styled(PopoverContent, {\n base: {\n width: \"surface.xlarge\",\n maxHeight: \"50vh\",\n overflowY: \"auto\",\n },\n});\n\nexport const UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }: Props) => {\n const { t } = useTranslation();\n if (embed.status === \"error\") {\n return (\n <DisclaimerWrapper>\n <StyledErrorWarningFill\n aria-label={t(\"embed.embedError\", { type: t(\"embed.type.disclaimer\") })}\n title={t(\"embed.embedError\", { type: t(\"embed.type.disclaimer\") })}\n />\n {children}\n </DisclaimerWrapper>\n );\n }\n\n return (\n <DisclaimerWrapper role=\"region\" data-embed-type=\"uu-disclaimer\">\n <PopoverRoot>\n <PopoverTrigger asChild>\n <StyledIconButton\n size=\"small\"\n variant=\"secondary\"\n aria-label={t(\"uuDisclaimer.title\")}\n title={t(\"uuDisclaimer.title\")}\n >\n <AccessibilityFill />\n </StyledIconButton>\n </PopoverTrigger>\n <Portal>\n <StyledPopoverContent>\n <div>{transformedDisclaimer}</div>\n </StyledPopoverContent>\n </Portal>\n </PopoverRoot>\n <div data-uu-content=\"\">{children}</div>\n </DisclaimerWrapper>\n );\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,OAAO;CACR,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,YAAY,EAC1C,MAAM,EACJ,WAAW,YACZ,EACF,CAAC;AAEF,MAAM,yBAAyB,OAAO,kBAAkB,EACtD,MAAM;CACJ,WAAW;CACX,MAAM;CACP,EACF,CAAC;AAEF,MAAM,uBAAuB,OAAO,gBAAgB,EAClD,MAAM;CACJ,OAAO;CACP,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAEF,MAAa,qBAAqB,EAAE,OAAO,uBAAuB,eAAsB;CACtF,MAAM,EAAE,MAAM,gBAAgB;AAC9B,KAAI,MAAM,WAAW,QACnB,QACE,qBAAC,gCACC,oBAAC;EACC,cAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;EACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;GAClE,EACD,YACiB;AAIxB,QACE,qBAAC;EAAkB,MAAK;EAAS,mBAAgB;aAC/C,qBAAC,0BACC,oBAAC;GAAe;aACd,oBAAC;IACC,MAAK;IACL,SAAQ;IACR,cAAY,EAAE,qBAAqB;IACnC,OAAO,EAAE,qBAAqB;cAE9B,oBAAC,sBAAoB;KACJ;IACJ,EACjB,oBAAC,oBACC,oBAAC,kCACC,oBAAC,mBAAK,wBAA4B,GACb,GAChB,IACG,EACd,oBAAC;GAAI,mBAAgB;GAAI;IAAe;GACtB"}
@@ -114,8 +114,7 @@ const FactBox = forwardRef(({ children, open, onOpenChange, defaultOpen = false,
114
114
  })]
115
115
  });
116
116
  });
117
- var FactBox_default = FactBox;
118
117
 
119
118
  //#endregion
120
- export { FactBox_default as default };
119
+ export { FactBox };
121
120
  //# sourceMappingURL=FactBox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FactBox.mjs","names":[],"sources":["../../src/FactBox/FactBox.tsx"],"sourcesContent":["/**\n * Copyright (c) 2016-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 React, {\n type ComponentProps,\n type ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ArrowDownShortLine } from \"@ndla/icons\";\nimport { IconButton } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\ninterface Props extends ComponentProps<\"aside\"> {\n children?: ReactNode;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nconst StyledAside = styled(\"aside\", {\n base: {\n position: \"relative\",\n padding: \"medium\",\n display: \"grid\",\n gridTemplateRows: \"0fr\",\n transitionProperty: \"grid-template-rows\",\n transitionDuration: \"slow\",\n transitionTimingFunction: \"ease-in-out\",\n justifyItems: \"center\",\n border: \"1px solid\",\n borderColor: \"stroke.default\",\n borderRadius: \"xsmall\",\n clear: \"both\",\n _open: {\n gridTemplateRows: \"1fr\",\n },\n _closed: {\n _print: {\n overflow: \"visible\",\n maxHeight: \"500vh\",\n },\n },\n \"& > div\": {\n minHeight: \"surface.3xsmall\",\n },\n },\n variants: {\n overflowHidden: {\n true: {\n \"& > div\": {\n overflow: \"hidden\",\n },\n },\n },\n },\n});\n\nconst StyledContent = styled(\"div\", {\n base: {\n position: \"relative\",\n width: \"100%\",\n // Reset the top margin of the very first child.\n \"& :first-child\": {\n marginBlockStart: \"0\",\n },\n _after: {\n content: '\"\"',\n textAlign: \"center\",\n position: \"absolute\",\n inset: \"0\",\n transitionProperty: \"opacity\",\n transitionDuration: \"slow\",\n transitionTimingFunction: \"ease-in-out\",\n gradientFrom: \"surface.default/20\",\n gradientTo: \"surface.default/95\",\n backgroundGradient: \"to-b\",\n opacity: \"1\",\n zIndex: \"base\",\n pointerEvents: \"none\",\n },\n _print: {\n overflow: \"visible\",\n _after: {\n display: \"none\",\n },\n },\n _open: {\n paddingBlockEnd: \"xsmall\",\n _after: {\n opacity: \"0\",\n },\n },\n },\n});\n\nconst StyledIconButton = styled(IconButton, {\n base: {\n position: \"absolute\",\n bottom: \"-medium\",\n zIndex: \"base\",\n \"& svg\": {\n transitionProperty: \"transform\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"fast\",\n },\n _open: {\n \"& svg\": {\n transform: \"rotate(180deg)\",\n },\n },\n _print: {\n display: \"none\",\n },\n },\n});\n\n// TODO: Consider moving the open trigger depending on whether the content is open or closed.\n\nconst FactBox = forwardRef<HTMLElement, Props>(\n ({ children, open, onOpenChange, defaultOpen = false, ...rest }, ref) => {\n const { t } = useTranslation();\n const [state, setState] = useState<\"open\" | \"closed\">(defaultOpen ? \"open\" : \"closed\");\n const [overflowHidden, setOverflowHidden] = useState(!defaultOpen);\n const contentId = useId();\n // Inert has existed since early 2023. It allows us to disable tabindex inside the content if it is closed, allowing us to be accessible for users with newish browsers. React 18 removes this because it doesn't recognize the attribute. This is a workaround for that.\n // When running in React 18, we need to use an empty string instead of true.\n // TODO: Remove this hack once we upgrade to React 19 as a peer dep.\n const inertAttribute = useMemo(() => {\n return state === \"closed\" ? { inert: typeof React.use === \"function\" ? true : \"\" } : {};\n }, [state]) as { inert?: boolean };\n\n useEffect(() => {\n if (open !== undefined) {\n setState(open ? \"open\" : \"closed\");\n }\n }, [open]);\n\n const onClick = useCallback(() => {\n const newState = state === \"open\" ? \"closed\" : \"open\";\n setState(newState);\n onOpenChange?.(newState === \"open\");\n }, [state, onOpenChange]);\n\n return (\n <StyledAside\n data-state={state}\n data-embed-type=\"factbox\"\n {...rest}\n ref={ref}\n overflowHidden={overflowHidden}\n onTransitionStart={(e) => {\n if (e.target === e.currentTarget && state === \"closed\") {\n setOverflowHidden(true);\n }\n }}\n onTransitionEnd={(e) => {\n if (e.target === e.currentTarget && state === \"open\") {\n setOverflowHidden(false);\n }\n }}\n >\n <StyledIconButton\n data-state={state}\n onClick={onClick}\n contentEditable={false}\n aria-expanded={state === \"open\"}\n aria-controls={contentId}\n aria-label={t(`factbox.${state === \"open\" ? \"close\" : \"open\"}`)}\n >\n <ArrowDownShortLine />\n </StyledIconButton>\n <StyledContent id={contentId} data-state={state} aria-hidden={state === \"closed\"} {...inertAttribute}>\n {children}\n </StyledContent>\n </StyledAside>\n );\n },\n);\n\nexport default FactBox;\n"],"mappings":";;;;;;;;AA8BA,MAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EACJ,UAAU;EACV,SAAS;EACT,SAAS;EACT,kBAAkB;EAClB,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,cAAc;EACd,QAAQ;EACR,aAAa;EACb,cAAc;EACd,OAAO;EACP,OAAO,EACL,kBAAkB,OACnB;EACD,SAAS,EACP,QAAQ;GACN,UAAU;GACV,WAAW;GACZ,EACF;EACD,WAAW,EACT,WAAW,mBACZ;EACF;CACD,UAAU,EACR,gBAAgB,EACd,MAAM,EACJ,WAAW,EACT,UAAU,UACX,EACF,EACF,EACF;CACF,CAAC;AAEF,MAAM,gBAAgB,OAAO,OAAO,EAClC,MAAM;CACJ,UAAU;CACV,OAAO;CAEP,kBAAkB,EAChB,kBAAkB,KACnB;CACD,QAAQ;EACN,SAAS;EACT,WAAW;EACX,UAAU;EACV,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,cAAc;EACd,YAAY;EACZ,oBAAoB;EACpB,SAAS;EACT,QAAQ;EACR,eAAe;EAChB;CACD,QAAQ;EACN,UAAU;EACV,QAAQ,EACN,SAAS,QACV;EACF;CACD,OAAO;EACL,iBAAiB;EACjB,QAAQ,EACN,SAAS,KACV;EACF;CACF,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,YAAY,EAC1C,MAAM;CACJ,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,SAAS;EACP,oBAAoB;EACpB,0BAA0B;EAC1B,oBAAoB;EACrB;CACD,OAAO,EACL,SAAS,EACP,WAAW,kBACZ,EACF;CACD,QAAQ,EACN,SAAS,QACV;CACF,EACF,CAAC;AAIF,MAAM,UAAU,YACb,EAAE,UAAU,MAAM,cAAc,cAAc,MAAO,GAAG,QAAQ,QAAQ;CACvE,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,OAAO,YAAY,SAA4B,cAAc,SAAS,SAAS;CACtF,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,CAAC,YAAY;CAClE,MAAM,YAAY,OAAO;CAIzB,MAAM,iBAAiB,cAAc;AACnC,SAAO,UAAU,WAAW,EAAE,OAAO,OAAO,MAAM,QAAQ,aAAa,OAAO,IAAI,GAAG,EAAE;IACtF,CAAC,MAAM,CAAC;AAEX,iBAAgB;AACd,MAAI,SAAS,OACX,UAAS,OAAO,SAAS,SAAS;IAEnC,CAAC,KAAK,CAAC;CAEV,MAAM,UAAU,kBAAkB;EAChC,MAAM,WAAW,UAAU,SAAS,WAAW;AAC/C,WAAS,SAAS;AAClB,iBAAe,aAAa,OAAO;IAClC,CAAC,OAAO,aAAa,CAAC;AAEzB,QACE,qBAAC;EACC,cAAY;EACZ,mBAAgB;EAChB,GAAI;EACC;EACW;EAChB,oBAAoB,MAAM;AACxB,OAAI,EAAE,WAAW,EAAE,iBAAiB,UAAU,SAC5C,mBAAkB,KAAK;;EAG3B,kBAAkB,MAAM;AACtB,OAAI,EAAE,WAAW,EAAE,iBAAiB,UAAU,OAC5C,mBAAkB,MAAM;;aAI5B,oBAAC;GACC,cAAY;GACH;GACT,iBAAiB;GACjB,iBAAe,UAAU;GACzB,iBAAe;GACf,cAAY,EAAE,WAAW,UAAU,SAAS,UAAU,SAAS;aAE/D,oBAAC,uBAAqB;IACL,EACnB,oBAAC;GAAc,IAAI;GAAW,cAAY;GAAO,eAAa,UAAU;GAAU,GAAI;GACnF;IACa;GACJ;EAGnB;AAED,sBAAe"}
1
+ {"version":3,"file":"FactBox.mjs","names":[],"sources":["../../src/FactBox/FactBox.tsx"],"sourcesContent":["/**\n * Copyright (c) 2016-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 React, {\n type ComponentProps,\n type ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ArrowDownShortLine } from \"@ndla/icons\";\nimport { IconButton } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\ninterface Props extends ComponentProps<\"aside\"> {\n children?: ReactNode;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nconst StyledAside = styled(\"aside\", {\n base: {\n position: \"relative\",\n padding: \"medium\",\n display: \"grid\",\n gridTemplateRows: \"0fr\",\n transitionProperty: \"grid-template-rows\",\n transitionDuration: \"slow\",\n transitionTimingFunction: \"ease-in-out\",\n justifyItems: \"center\",\n border: \"1px solid\",\n borderColor: \"stroke.default\",\n borderRadius: \"xsmall\",\n clear: \"both\",\n _open: {\n gridTemplateRows: \"1fr\",\n },\n _closed: {\n _print: {\n overflow: \"visible\",\n maxHeight: \"500vh\",\n },\n },\n \"& > div\": {\n minHeight: \"surface.3xsmall\",\n },\n },\n variants: {\n overflowHidden: {\n true: {\n \"& > div\": {\n overflow: \"hidden\",\n },\n },\n },\n },\n});\n\nconst StyledContent = styled(\"div\", {\n base: {\n position: \"relative\",\n width: \"100%\",\n // Reset the top margin of the very first child.\n \"& :first-child\": {\n marginBlockStart: \"0\",\n },\n _after: {\n content: '\"\"',\n textAlign: \"center\",\n position: \"absolute\",\n inset: \"0\",\n transitionProperty: \"opacity\",\n transitionDuration: \"slow\",\n transitionTimingFunction: \"ease-in-out\",\n gradientFrom: \"surface.default/20\",\n gradientTo: \"surface.default/95\",\n backgroundGradient: \"to-b\",\n opacity: \"1\",\n zIndex: \"base\",\n pointerEvents: \"none\",\n },\n _print: {\n overflow: \"visible\",\n _after: {\n display: \"none\",\n },\n },\n _open: {\n paddingBlockEnd: \"xsmall\",\n _after: {\n opacity: \"0\",\n },\n },\n },\n});\n\nconst StyledIconButton = styled(IconButton, {\n base: {\n position: \"absolute\",\n bottom: \"-medium\",\n zIndex: \"base\",\n \"& svg\": {\n transitionProperty: \"transform\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"fast\",\n },\n _open: {\n \"& svg\": {\n transform: \"rotate(180deg)\",\n },\n },\n _print: {\n display: \"none\",\n },\n },\n});\n\n// TODO: Consider moving the open trigger depending on whether the content is open or closed.\n\nexport const FactBox = forwardRef<HTMLElement, Props>(\n ({ children, open, onOpenChange, defaultOpen = false, ...rest }, ref) => {\n const { t } = useTranslation();\n const [state, setState] = useState<\"open\" | \"closed\">(defaultOpen ? \"open\" : \"closed\");\n const [overflowHidden, setOverflowHidden] = useState(!defaultOpen);\n const contentId = useId();\n // Inert has existed since early 2023. It allows us to disable tabindex inside the content if it is closed, allowing us to be accessible for users with newish browsers. React 18 removes this because it doesn't recognize the attribute. This is a workaround for that.\n // When running in React 18, we need to use an empty string instead of true.\n // TODO: Remove this hack once we upgrade to React 19 as a peer dep.\n const inertAttribute = useMemo(() => {\n return state === \"closed\" ? { inert: typeof React.use === \"function\" ? true : \"\" } : {};\n }, [state]) as { inert?: boolean };\n\n useEffect(() => {\n if (open !== undefined) {\n setState(open ? \"open\" : \"closed\");\n }\n }, [open]);\n\n const onClick = useCallback(() => {\n const newState = state === \"open\" ? \"closed\" : \"open\";\n setState(newState);\n onOpenChange?.(newState === \"open\");\n }, [state, onOpenChange]);\n\n return (\n <StyledAside\n data-state={state}\n data-embed-type=\"factbox\"\n {...rest}\n ref={ref}\n overflowHidden={overflowHidden}\n onTransitionStart={(e) => {\n if (e.target === e.currentTarget && state === \"closed\") {\n setOverflowHidden(true);\n }\n }}\n onTransitionEnd={(e) => {\n if (e.target === e.currentTarget && state === \"open\") {\n setOverflowHidden(false);\n }\n }}\n >\n <StyledIconButton\n data-state={state}\n onClick={onClick}\n contentEditable={false}\n aria-expanded={state === \"open\"}\n aria-controls={contentId}\n aria-label={t(`factbox.${state === \"open\" ? \"close\" : \"open\"}`)}\n >\n <ArrowDownShortLine />\n </StyledIconButton>\n <StyledContent id={contentId} data-state={state} aria-hidden={state === \"closed\"} {...inertAttribute}>\n {children}\n </StyledContent>\n </StyledAside>\n );\n },\n);\n"],"mappings":";;;;;;;;AA8BA,MAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EACJ,UAAU;EACV,SAAS;EACT,SAAS;EACT,kBAAkB;EAClB,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,cAAc;EACd,QAAQ;EACR,aAAa;EACb,cAAc;EACd,OAAO;EACP,OAAO,EACL,kBAAkB,OACnB;EACD,SAAS,EACP,QAAQ;GACN,UAAU;GACV,WAAW;GACZ,EACF;EACD,WAAW,EACT,WAAW,mBACZ;EACF;CACD,UAAU,EACR,gBAAgB,EACd,MAAM,EACJ,WAAW,EACT,UAAU,UACX,EACF,EACF,EACF;CACF,CAAC;AAEF,MAAM,gBAAgB,OAAO,OAAO,EAClC,MAAM;CACJ,UAAU;CACV,OAAO;CAEP,kBAAkB,EAChB,kBAAkB,KACnB;CACD,QAAQ;EACN,SAAS;EACT,WAAW;EACX,UAAU;EACV,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,cAAc;EACd,YAAY;EACZ,oBAAoB;EACpB,SAAS;EACT,QAAQ;EACR,eAAe;EAChB;CACD,QAAQ;EACN,UAAU;EACV,QAAQ,EACN,SAAS,QACV;EACF;CACD,OAAO;EACL,iBAAiB;EACjB,QAAQ,EACN,SAAS,KACV;EACF;CACF,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,YAAY,EAC1C,MAAM;CACJ,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,SAAS;EACP,oBAAoB;EACpB,0BAA0B;EAC1B,oBAAoB;EACrB;CACD,OAAO,EACL,SAAS,EACP,WAAW,kBACZ,EACF;CACD,QAAQ,EACN,SAAS,QACV;CACF,EACF,CAAC;AAIF,MAAa,UAAU,YACpB,EAAE,UAAU,MAAM,cAAc,cAAc,MAAO,GAAG,QAAQ,QAAQ;CACvE,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,OAAO,YAAY,SAA4B,cAAc,SAAS,SAAS;CACtF,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,CAAC,YAAY;CAClE,MAAM,YAAY,OAAO;CAIzB,MAAM,iBAAiB,cAAc;AACnC,SAAO,UAAU,WAAW,EAAE,OAAO,OAAO,MAAM,QAAQ,aAAa,OAAO,IAAI,GAAG,EAAE;IACtF,CAAC,MAAM,CAAC;AAEX,iBAAgB;AACd,MAAI,SAAS,OACX,UAAS,OAAO,SAAS,SAAS;IAEnC,CAAC,KAAK,CAAC;CAEV,MAAM,UAAU,kBAAkB;EAChC,MAAM,WAAW,UAAU,SAAS,WAAW;AAC/C,WAAS,SAAS;AAClB,iBAAe,aAAa,OAAO;IAClC,CAAC,OAAO,aAAa,CAAC;AAEzB,QACE,qBAAC;EACC,cAAY;EACZ,mBAAgB;EAChB,GAAI;EACC;EACW;EAChB,oBAAoB,MAAM;AACxB,OAAI,EAAE,WAAW,EAAE,iBAAiB,UAAU,SAC5C,mBAAkB,KAAK;;EAG3B,kBAAkB,MAAM;AACtB,OAAI,EAAE,WAAW,EAAE,iBAAiB,UAAU,OAC5C,mBAAkB,MAAM;;aAI5B,oBAAC;GACC,cAAY;GACH;GACT,iBAAiB;GACjB,iBAAe,UAAU;GACzB,iBAAe;GACf,cAAY,EAAE,WAAW,UAAU,SAAS,UAAU,SAAS;aAE/D,oBAAC,uBAAqB;IACL,EACnB,oBAAC;GAAc,IAAI;GAAW,cAAY;GAAO,eAAa,UAAU;GAAU,GAAI;GACnF;IACa;GACJ;EAGnB"}
@@ -1,5 +1,5 @@
1
- import SpeechControl_default from "../AudioPlayer/SpeechControl.mjs";
2
- import GlossExample_default from "./GlossExample.mjs";
1
+ import { SpeechControl } from "../AudioPlayer/SpeechControl.mjs";
2
+ import { GlossExample } from "./GlossExample.mjs";
3
3
  import { useMemo } from "react";
4
4
  import { AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionRoot, IconButton, Text } from "@ndla/primitives";
5
5
  import { styled } from "@ndla/styled-system/jsx";
@@ -102,7 +102,7 @@ const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }) =
102
102
  children: t(`wordClass.${glossData.wordClass}`).toLowerCase()
103
103
  })
104
104
  })
105
- ] }), !!audio?.src && /* @__PURE__ */ jsx(SpeechControl_default, {
105
+ ] }), !!audio?.src && /* @__PURE__ */ jsx(SpeechControl, {
106
106
  src: audio.src,
107
107
  title: audio.title,
108
108
  type: "gloss"
@@ -127,7 +127,7 @@ const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }) =
127
127
  })
128
128
  })
129
129
  })] }),
130
- /* @__PURE__ */ jsx(StyledAccordionItemContent, { children: filteredExamples.map((examples, index) => /* @__PURE__ */ jsx(GlossExample_default, {
130
+ /* @__PURE__ */ jsx(StyledAccordionItemContent, { children: filteredExamples.map((examples, index) => /* @__PURE__ */ jsx(GlossExample, {
131
131
  examples,
132
132
  originalLanguage: glossData.originalLanguage
133
133
  }, `gloss-example-${index}`)) })
@@ -135,8 +135,7 @@ const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }) =
135
135
  })
136
136
  });
137
137
  };
138
- var Gloss_default = Gloss;
139
138
 
140
139
  //#endregion
141
- export { Gloss_default as default };
140
+ export { Gloss };
142
141
  //# sourceMappingURL=Gloss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Gloss.mjs","names":["SpeechControl","AccordionItemTrigger","GlossExample"],"sources":["../../src/Gloss/Gloss.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { useMemo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { AccordionItemTrigger } from \"@ark-ui/react\";\nimport { ArrowDownShortLine } from \"@ndla/icons\";\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemIndicator,\n AccordionRoot,\n IconButton,\n Text,\n} from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledVariantProps } from \"@ndla/styled-system/types\";\nimport type { ConceptTitleDTO, IGlossDataDTO, IGlossExampleDTO } from \"@ndla/types-backend/concept-api\";\nimport GlossExample from \"./GlossExample\";\nimport SpeechControl from \"../AudioPlayer/SpeechControl\";\n\n// TODO: Figure out padding between bordered and simple variant.\n// The design says that the content above the accordion content should have enough padding to align with the accordion content.\n// When a gloss is bordered there's way too much padding.\n\nconst getFilteredExamples = (\n glossData: IGlossDataDTO | undefined,\n exampleIds: string | undefined,\n exampleLangs: string | undefined,\n): IGlossExampleDTO[][] => {\n if (exampleIds !== undefined || exampleLangs !== undefined) {\n const exampleIdsList = exampleIds?.toString()?.split(\",\") ?? [];\n const exampleLangsList = exampleLangs?.split(\",\") ?? [];\n\n const filteredExamples =\n glossData?.examples?.map((examples, i) => {\n if (exampleIdsList.includes(i.toString())) {\n return examples.filter((e) => exampleLangsList.includes(e.language));\n }\n return [];\n }) ?? [];\n const examplesWithoutEmpty = filteredExamples.filter((el) => !!el.length);\n return examplesWithoutEmpty;\n }\n return glossData?.examples ?? [];\n};\n\nconst Container = styled(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n },\n});\n\nconst TextWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n gap: \"small\",\n },\n});\n\nconst StyledAccordionItemContent = styled(AccordionItemContent, {\n base: {\n paddingInline: \"0\",\n },\n});\n\nconst StyledContainer = styled(Container, {\n base: {\n marginBlockStart: \"3xsmall\",\n },\n});\n\nconst StyledAccordionItem = styled(AccordionItem, {\n base: {\n paddingBlock: \"small\",\n paddingInline: \"medium\",\n },\n defaultVariants: {\n variant: \"simple\",\n },\n variants: {\n variant: {\n simple: {},\n bordered: {\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n },\n },\n },\n});\n\ntype GlossVariantProps = StyledVariantProps<typeof StyledAccordionItem>;\n\nexport interface Props {\n title: ConceptTitleDTO;\n glossData?: IGlossDataDTO;\n audio?: {\n title: string;\n src?: string;\n };\n exampleIds?: string;\n exampleLangs?: string;\n}\n\nconst Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }: Props & GlossVariantProps) => {\n const { t } = useTranslation();\n\n const parsedTitle = useMemo(() => parse(title.htmlTitle), [title.htmlTitle]);\n\n const filteredExamples = useMemo(\n () => getFilteredExamples(glossData, exampleIds, exampleLangs),\n [exampleIds, exampleLangs, glossData],\n );\n\n if (!glossData) return null;\n\n return (\n <AccordionRoot multiple variant=\"clean\">\n <StyledAccordionItem value=\"gloss\" variant={variant}>\n <Container>\n <TextWrapper>\n <Text textStyle=\"label.medium\" fontWeight=\"bold\" asChild consumeCss lang={glossData.originalLanguage}>\n <span>{glossData.gloss}</span>\n </Text>\n {!!glossData.transcriptions.traditional && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span\n key={t(\"gloss.transcriptions.traditional\")}\n aria-label={t(\"gloss.transcriptions.traditional\")}\n lang={glossData.originalLanguage}\n >\n {glossData.transcriptions.traditional}\n </span>\n </Text>\n )}\n {!!glossData.transcriptions.pinyin && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span\n data-pinyin=\"\"\n key={t(\"gloss.transcriptions.pinyin\")}\n aria-label={t(\"gloss.transcriptions.pinyin\")}\n lang={glossData.originalLanguage}\n >\n {glossData.transcriptions.pinyin}\n </span>\n </Text>\n )}\n {!!glossData.wordClass && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span aria-label={t(\"gloss.wordClass\")}>{t(`wordClass.${glossData.wordClass}`).toLowerCase()}</span>\n </Text>\n )}\n </TextWrapper>\n {!!audio?.src && <SpeechControl src={audio.src} title={audio.title} type=\"gloss\" />}\n </Container>\n <StyledContainer>\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span lang={title.language}>{parsedTitle}</span>\n </Text>\n {!!filteredExamples.length && (\n <AccordionItemTrigger asChild>\n <IconButton variant=\"tertiary\" aria-label={t(\"gloss.showExamples\")} title={t(\"gloss.showExamples\")}>\n <AccordionItemIndicator asChild>\n <ArrowDownShortLine size=\"medium\" />\n </AccordionItemIndicator>\n </IconButton>\n </AccordionItemTrigger>\n )}\n </StyledContainer>\n <StyledAccordionItemContent>\n {filteredExamples.map((examples, index) => (\n <GlossExample\n key={`gloss-example-${index}`}\n examples={examples}\n originalLanguage={glossData.originalLanguage}\n />\n ))}\n </StyledAccordionItemContent>\n </StyledAccordionItem>\n </AccordionRoot>\n );\n};\n\nexport default Gloss;\n"],"mappings":"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"}
1
+ {"version":3,"file":"Gloss.mjs","names":["AccordionItemTrigger"],"sources":["../../src/Gloss/Gloss.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { useMemo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { AccordionItemTrigger } from \"@ark-ui/react\";\nimport { ArrowDownShortLine } from \"@ndla/icons\";\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemIndicator,\n AccordionRoot,\n IconButton,\n Text,\n} from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledVariantProps } from \"@ndla/styled-system/types\";\nimport type { ConceptTitleDTO, IGlossDataDTO, IGlossExampleDTO } from \"@ndla/types-backend/concept-api\";\nimport { GlossExample } from \"./GlossExample\";\nimport { SpeechControl } from \"../AudioPlayer/SpeechControl\";\n\n// TODO: Figure out padding between bordered and simple variant.\n// The design says that the content above the accordion content should have enough padding to align with the accordion content.\n// When a gloss is bordered there's way too much padding.\n\nconst getFilteredExamples = (\n glossData: IGlossDataDTO | undefined,\n exampleIds: string | undefined,\n exampleLangs: string | undefined,\n): IGlossExampleDTO[][] => {\n if (exampleIds !== undefined || exampleLangs !== undefined) {\n const exampleIdsList = exampleIds?.toString()?.split(\",\") ?? [];\n const exampleLangsList = exampleLangs?.split(\",\") ?? [];\n\n const filteredExamples =\n glossData?.examples?.map((examples, i) => {\n if (exampleIdsList.includes(i.toString())) {\n return examples.filter((e) => exampleLangsList.includes(e.language));\n }\n return [];\n }) ?? [];\n const examplesWithoutEmpty = filteredExamples.filter((el) => !!el.length);\n return examplesWithoutEmpty;\n }\n return glossData?.examples ?? [];\n};\n\nconst Container = styled(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n },\n});\n\nconst TextWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n gap: \"small\",\n },\n});\n\nconst StyledAccordionItemContent = styled(AccordionItemContent, {\n base: {\n paddingInline: \"0\",\n },\n});\n\nconst StyledContainer = styled(Container, {\n base: {\n marginBlockStart: \"3xsmall\",\n },\n});\n\nconst StyledAccordionItem = styled(AccordionItem, {\n base: {\n paddingBlock: \"small\",\n paddingInline: \"medium\",\n },\n defaultVariants: {\n variant: \"simple\",\n },\n variants: {\n variant: {\n simple: {},\n bordered: {\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n },\n },\n },\n});\n\ntype GlossVariantProps = StyledVariantProps<typeof StyledAccordionItem>;\n\nexport interface Props {\n title: ConceptTitleDTO;\n glossData?: IGlossDataDTO;\n audio?: {\n title: string;\n src?: string;\n };\n exampleIds?: string;\n exampleLangs?: string;\n}\n\nexport const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }: Props & GlossVariantProps) => {\n const { t } = useTranslation();\n\n const parsedTitle = useMemo(() => parse(title.htmlTitle), [title.htmlTitle]);\n\n const filteredExamples = useMemo(\n () => getFilteredExamples(glossData, exampleIds, exampleLangs),\n [exampleIds, exampleLangs, glossData],\n );\n\n if (!glossData) return null;\n\n return (\n <AccordionRoot multiple variant=\"clean\">\n <StyledAccordionItem value=\"gloss\" variant={variant}>\n <Container>\n <TextWrapper>\n <Text textStyle=\"label.medium\" fontWeight=\"bold\" asChild consumeCss lang={glossData.originalLanguage}>\n <span>{glossData.gloss}</span>\n </Text>\n {!!glossData.transcriptions.traditional && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span\n key={t(\"gloss.transcriptions.traditional\")}\n aria-label={t(\"gloss.transcriptions.traditional\")}\n lang={glossData.originalLanguage}\n >\n {glossData.transcriptions.traditional}\n </span>\n </Text>\n )}\n {!!glossData.transcriptions.pinyin && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span\n data-pinyin=\"\"\n key={t(\"gloss.transcriptions.pinyin\")}\n aria-label={t(\"gloss.transcriptions.pinyin\")}\n lang={glossData.originalLanguage}\n >\n {glossData.transcriptions.pinyin}\n </span>\n </Text>\n )}\n {!!glossData.wordClass && (\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span aria-label={t(\"gloss.wordClass\")}>{t(`wordClass.${glossData.wordClass}`).toLowerCase()}</span>\n </Text>\n )}\n </TextWrapper>\n {!!audio?.src && <SpeechControl src={audio.src} title={audio.title} type=\"gloss\" />}\n </Container>\n <StyledContainer>\n <Text textStyle=\"label.medium\" asChild consumeCss>\n <span lang={title.language}>{parsedTitle}</span>\n </Text>\n {!!filteredExamples.length && (\n <AccordionItemTrigger asChild>\n <IconButton variant=\"tertiary\" aria-label={t(\"gloss.showExamples\")} title={t(\"gloss.showExamples\")}>\n <AccordionItemIndicator asChild>\n <ArrowDownShortLine size=\"medium\" />\n </AccordionItemIndicator>\n </IconButton>\n </AccordionItemTrigger>\n )}\n </StyledContainer>\n <StyledAccordionItemContent>\n {filteredExamples.map((examples, index) => (\n <GlossExample\n key={`gloss-example-${index}`}\n examples={examples}\n originalLanguage={glossData.originalLanguage}\n />\n ))}\n </StyledAccordionItemContent>\n </StyledAccordionItem>\n </AccordionRoot>\n );\n};\n"],"mappings":"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"}
@@ -39,8 +39,7 @@ const GlossExample = ({ examples, originalLanguage }) => {
39
39
  }) })
40
40
  ] }, index)) });
41
41
  };
42
- var GlossExample_default = GlossExample;
43
42
 
44
43
  //#endregion
45
- export { GlossExample_default as default };
44
+ export { GlossExample };
46
45
  //# sourceMappingURL=GlossExample.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"GlossExample.mjs","names":["examples"],"sources":["../../src/Gloss/GlossExample.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Fragment } from \"react\";\nimport { Text } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { IGlossExampleDTO } from \"@ndla/types-backend/concept-api\";\n\ninterface Props {\n examples: IGlossExampleDTO[];\n originalLanguage: string | undefined;\n}\n\nconst StyledGlossExample = styled(\"div\", {\n base: {\n borderTop: \"1px solid\",\n borderColor: \"stroke.subtle\",\n paddingBlock: \"xsmall\",\n paddingInline: \"medium\",\n _first: {\n background: \"surface.brand.1.subtle\",\n borderColor: \"stroke.default\",\n \"& p\": {\n fontWeight: \"bold\",\n },\n },\n },\n});\n\nconst PinyinText = styled(Text, {\n base: {\n fontStyle: \"italic\",\n },\n});\n\nconst GlossExample = ({ examples, originalLanguage }: Props) => {\n return (\n <div>\n {examples.map((examples, index) => (\n <Fragment key={index}>\n <StyledGlossExample lang={examples.language}>\n <Text textStyle=\"label.medium\" lang={examples.language}>\n {examples.example}\n </Text>\n </StyledGlossExample>\n {!!examples.transcriptions.pinyin && (\n <StyledGlossExample>\n <PinyinText data-pinyin=\"\" lang={originalLanguage} textStyle=\"label.medium\">\n {examples.transcriptions?.pinyin}\n </PinyinText>\n </StyledGlossExample>\n )}\n {!!examples.transcriptions?.traditional && (\n <StyledGlossExample>\n <Text textStyle=\"label.medium\" lang={originalLanguage}>\n {examples.transcriptions.traditional}\n </Text>\n </StyledGlossExample>\n )}\n </Fragment>\n ))}\n </div>\n );\n};\n\nexport default GlossExample;\n"],"mappings":";;;;;;AAkBA,MAAM,qBAAqB,OAAO,OAAO,EACvC,MAAM;CACJ,WAAW;CACX,aAAa;CACb,cAAc;CACd,eAAe;CACf,QAAQ;EACN,YAAY;EACZ,aAAa;EACb,OAAO,EACL,YAAY,QACb;EACF;CACF,EACF,CAAC;AAEF,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,EACJ,WAAW,UACZ,EACF,CAAC;AAEF,MAAM,gBAAgB,EAAE,UAAU,uBAA8B;AAC9D,QACE,oBAAC,mBACE,SAAS,KAAK,YAAU,UACvB,qBAAC;EACC,oBAAC;GAAmB,MAAMA,WAAS;aACjC,oBAAC;IAAK,WAAU;IAAe,MAAMA,WAAS;cAC3CA,WAAS;KACL;IACY;EACpB,CAAC,CAACA,WAAS,eAAe,UACzB,oBAAC,gCACC,oBAAC;GAAW,eAAY;GAAG,MAAM;GAAkB,WAAU;aAC1DA,WAAS,gBAAgB;IACf,GACM;EAEtB,CAAC,CAACA,WAAS,gBAAgB,eAC1B,oBAAC,gCACC,oBAAC;GAAK,WAAU;GAAe,MAAM;aAClCA,WAAS,eAAe;IACpB,GACY;MAlBV,MAoBJ,CACX,GACE;;AAIV,2BAAe"}
1
+ {"version":3,"file":"GlossExample.mjs","names":["examples"],"sources":["../../src/Gloss/GlossExample.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Fragment } from \"react\";\nimport { Text } from \"@ndla/primitives\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { IGlossExampleDTO } from \"@ndla/types-backend/concept-api\";\n\ninterface Props {\n examples: IGlossExampleDTO[];\n originalLanguage: string | undefined;\n}\n\nconst StyledGlossExample = styled(\"div\", {\n base: {\n borderTop: \"1px solid\",\n borderColor: \"stroke.subtle\",\n paddingBlock: \"xsmall\",\n paddingInline: \"medium\",\n _first: {\n background: \"surface.brand.1.subtle\",\n borderColor: \"stroke.default\",\n \"& p\": {\n fontWeight: \"bold\",\n },\n },\n },\n});\n\nconst PinyinText = styled(Text, {\n base: {\n fontStyle: \"italic\",\n },\n});\n\nexport const GlossExample = ({ examples, originalLanguage }: Props) => {\n return (\n <div>\n {examples.map((examples, index) => (\n <Fragment key={index}>\n <StyledGlossExample lang={examples.language}>\n <Text textStyle=\"label.medium\" lang={examples.language}>\n {examples.example}\n </Text>\n </StyledGlossExample>\n {!!examples.transcriptions.pinyin && (\n <StyledGlossExample>\n <PinyinText data-pinyin=\"\" lang={originalLanguage} textStyle=\"label.medium\">\n {examples.transcriptions?.pinyin}\n </PinyinText>\n </StyledGlossExample>\n )}\n {!!examples.transcriptions?.traditional && (\n <StyledGlossExample>\n <Text textStyle=\"label.medium\" lang={originalLanguage}>\n {examples.transcriptions.traditional}\n </Text>\n </StyledGlossExample>\n )}\n </Fragment>\n ))}\n </div>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAM,qBAAqB,OAAO,OAAO,EACvC,MAAM;CACJ,WAAW;CACX,aAAa;CACb,cAAc;CACd,eAAe;CACf,QAAQ;EACN,YAAY;EACZ,aAAa;EACb,OAAO,EACL,YAAY,QACb;EACF;CACF,EACF,CAAC;AAEF,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,EACJ,WAAW,UACZ,EACF,CAAC;AAEF,MAAa,gBAAgB,EAAE,UAAU,uBAA8B;AACrE,QACE,oBAAC,mBACE,SAAS,KAAK,YAAU,UACvB,qBAAC;EACC,oBAAC;GAAmB,MAAMA,WAAS;aACjC,oBAAC;IAAK,WAAU;IAAe,MAAMA,WAAS;cAC3CA,WAAS;KACL;IACY;EACpB,CAAC,CAACA,WAAS,eAAe,UACzB,oBAAC,gCACC,oBAAC;GAAW,eAAY;GAAG,MAAM;GAAkB,WAAU;aAC1DA,WAAS,gBAAgB;IACf,GACM;EAEtB,CAAC,CAACA,WAAS,gBAAgB,eAC1B,oBAAC,gCACC,oBAAC;GAAK,WAAU;GAAe,MAAM;aAClCA,WAAS,eAAe;IACpB,GACY;MAlBV,MAoBJ,CACX,GACE"}
@@ -39,8 +39,7 @@ const KeyFigure = ({ image, title, subtitle }) => {
39
39
  ]
40
40
  });
41
41
  };
42
- var KeyFigure_default = KeyFigure;
43
42
 
44
43
  //#endregion
45
- export { KeyFigure_default as default };
44
+ export { KeyFigure };
46
45
  //# sourceMappingURL=KeyFigure.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyFigure.mjs","names":[],"sources":["../../src/KeyFigure/KeyFigure.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"xsmall\",\n\n \"&:not(:has(> img))\": {\n paddingBlock: \"xxlarge\",\n },\n },\n});\n\nconst StyledImage = styled(\"img\", {\n base: {\n height: \"surface.3xsmall\",\n width: \"surface.3xsmall\",\n borderRadius: \"xsmall\",\n },\n});\n\nconst TitleWrapper = styled(\"div\", {\n base: {\n textStyle: \"heading.large\",\n textAlign: \"center\",\n },\n});\n\nconst SubTitleWrapper = styled(\"div\", {\n base: {\n textStyle: \"title.medium\",\n textAlign: \"center\",\n },\n});\n\nexport interface Props {\n image?: {\n src?: string;\n alt?: string;\n };\n title: string;\n subtitle: string;\n}\n\nconst KeyFigure = ({ image, title, subtitle }: Props) => {\n return (\n <ContentWrapper data-embed-type=\"key-figure\">\n {!!image && <StyledImage src={`${image?.src}?width=150`} width={150} height={150} alt={image?.alt} />}\n <TitleWrapper>{parse(title)}</TitleWrapper>\n <SubTitleWrapper>{parse(subtitle)}</SubTitleWrapper>\n </ContentWrapper>\n );\n};\n\nexport default KeyFigure;\n"],"mappings":";;;;;AAWA,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,KAAK;CAEL,sBAAsB,EACpB,cAAc,WACf;CACF,EACF,CAAC;AAEF,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,QAAQ;CACR,OAAO;CACP,cAAc;CACf,EACF,CAAC;AAEF,MAAM,eAAe,OAAO,OAAO,EACjC,MAAM;CACJ,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,kBAAkB,OAAO,OAAO,EACpC,MAAM;CACJ,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAWF,MAAM,aAAa,EAAE,OAAO,OAAO,eAAsB;AACvD,QACE,qBAAC;EAAe,mBAAgB;;GAC7B,CAAC,CAAC,SAAS,oBAAC;IAAY,KAAK,GAAG,OAAO,IAAI;IAAa,OAAO;IAAK,QAAQ;IAAK,KAAK,OAAO;KAAO;GACrG,oBAAC,0BAAc,MAAM,MAAM,GAAgB;GAC3C,oBAAC,6BAAiB,MAAM,SAAS,GAAmB;;GACrC;;AAIrB,wBAAe"}
1
+ {"version":3,"file":"KeyFigure.mjs","names":[],"sources":["../../src/KeyFigure/KeyFigure.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"xsmall\",\n\n \"&:not(:has(> img))\": {\n paddingBlock: \"xxlarge\",\n },\n },\n});\n\nconst StyledImage = styled(\"img\", {\n base: {\n height: \"surface.3xsmall\",\n width: \"surface.3xsmall\",\n borderRadius: \"xsmall\",\n },\n});\n\nconst TitleWrapper = styled(\"div\", {\n base: {\n textStyle: \"heading.large\",\n textAlign: \"center\",\n },\n});\n\nconst SubTitleWrapper = styled(\"div\", {\n base: {\n textStyle: \"title.medium\",\n textAlign: \"center\",\n },\n});\n\nexport interface Props {\n image?: {\n src?: string;\n alt?: string;\n };\n title: string;\n subtitle: string;\n}\n\nexport const KeyFigure = ({ image, title, subtitle }: Props) => {\n return (\n <ContentWrapper data-embed-type=\"key-figure\">\n {!!image && <StyledImage src={`${image?.src}?width=150`} width={150} height={150} alt={image?.alt} />}\n <TitleWrapper>{parse(title)}</TitleWrapper>\n <SubTitleWrapper>{parse(subtitle)}</SubTitleWrapper>\n </ContentWrapper>\n );\n};\n"],"mappings":";;;;;AAWA,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,KAAK;CAEL,sBAAsB,EACpB,cAAc,WACf;CACF,EACF,CAAC;AAEF,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,QAAQ;CACR,OAAO;CACP,cAAc;CACf,EACF,CAAC;AAEF,MAAM,eAAe,OAAO,OAAO,EACjC,MAAM;CACJ,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,kBAAkB,OAAO,OAAO,EACpC,MAAM;CACJ,WAAW;CACX,WAAW;CACZ,EACF,CAAC;AAWF,MAAa,aAAa,EAAE,OAAO,OAAO,eAAsB;AAC9D,QACE,qBAAC;EAAe,mBAAgB;;GAC7B,CAAC,CAAC,SAAS,oBAAC;IAAY,KAAK,GAAG,OAAO,IAAI;IAAa,OAAO;IAAK,QAAQ;IAAK,KAAK,OAAO;KAAO;GACrG,oBAAC,0BAAc,MAAM,MAAM,GAAgB;GAC3C,oBAAC,6BAAiB,MAAM,SAAS,GAAmB;;GACrC"}
@@ -67,8 +67,7 @@ const LinkBlock = ({ title, articleLanguage, date, url, path }) => {
67
67
  }), !!date && /* @__PURE__ */ jsxs(StyledDateContainer, { children: [/* @__PURE__ */ jsx(StyledCalendarEd, {}), formattedDate] })] }), /* @__PURE__ */ jsx(ArrowRightLine, { "data-forward": true })]
68
68
  });
69
69
  };
70
- var LinkBlock_default = LinkBlock;
71
70
 
72
71
  //#endregion
73
- export { LinkBlock_default as default };
72
+ export { LinkBlock };
74
73
  //# sourceMappingURL=LinkBlock.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkBlock.mjs","names":[],"sources":["../../src/LinkBlock/LinkBlock.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { useMemo } from \"react\";\nimport { ArrowRightLine, CalendarLine } from \"@ndla/icons\";\nimport { Heading } from \"@ndla/primitives\";\nimport { SafeLink } from \"@ndla/safelink\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { LinkBlockEmbedData } from \"@ndla/types-embed\";\nimport { getPossiblyRelativeUrl } from \"../utils/relativeUrl\";\n\nconst InfoWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n },\n});\n\nconst StyledSafeLink = styled(SafeLink, {\n base: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n background: \"surface.default\",\n padding: \"medium\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n \"& h3\": {\n textDecoration: \"underline\",\n },\n \"& [data-forward]\": {\n transitionProperty: \"width, height\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"fast\",\n },\n _hover: {\n \"& h3\": {\n textDecoration: \"none\",\n },\n \"& [data-forward]\": {\n width: \"large\",\n height: \"large\",\n },\n },\n },\n});\n\nconst StyledDateContainer = styled(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"xxsmall\",\n },\n});\n\nconst StyledCalendarEd = styled(CalendarLine, {\n base: {\n color: \"icon.strong\",\n },\n});\n\ninterface Props extends Omit<LinkBlockEmbedData, \"resource\"> {\n path?: string;\n articleLanguage?: string;\n}\n\nconst LinkBlock = ({ title, articleLanguage, date, url, path }: Props) => {\n const href = getPossiblyRelativeUrl(url, path);\n const formattedDate = useMemo(() => {\n if (!date) return null;\n return new Intl.DateTimeFormat(articleLanguage, {\n timeZone: \"CET\",\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n }).format(new Date(date));\n }, [date, articleLanguage]);\n return (\n <StyledSafeLink to={href} data-embed-type=\"link-block\">\n <InfoWrapper>\n <Heading asChild consumeCss textStyle=\"title.medium\">\n <h3 data-heading>{parse(title)}</h3>\n </Heading>\n {!!date && (\n <StyledDateContainer>\n <StyledCalendarEd />\n {formattedDate}\n </StyledDateContainer>\n )}\n </InfoWrapper>\n <ArrowRightLine data-forward />\n </StyledSafeLink>\n );\n};\n\nexport default LinkBlock;\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACN,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,UAAU,EACtC,MAAM;CACJ,SAAS;CACT,gBAAgB;CAChB,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,QAAQ,EACN,gBAAgB,aACjB;CACD,oBAAoB;EAClB,oBAAoB;EACpB,0BAA0B;EAC1B,oBAAoB;EACrB;CACD,QAAQ;EACN,QAAQ,EACN,gBAAgB,QACjB;EACD,oBAAoB;GAClB,OAAO;GACP,QAAQ;GACT;EACF;CACF,EACF,CAAC;AAEF,MAAM,sBAAsB,OAAO,OAAO,EACxC,MAAM;CACJ,SAAS;CACT,YAAY;CACZ,KAAK;CACN,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,cAAc,EAC5C,MAAM,EACJ,OAAO,eACR,EACF,CAAC;AAOF,MAAM,aAAa,EAAE,OAAO,iBAAiB,MAAM,KAAK,WAAkB;CACxE,MAAM,OAAO,uBAAuB,KAAK,KAAK;CAC9C,MAAM,gBAAgB,cAAc;AAClC,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,IAAI,KAAK,eAAe,iBAAiB;GAC9C,UAAU;GACV,KAAK;GACL,OAAO;GACP,MAAM;GACP,CAAC,CAAC,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC,MAAM,gBAAgB,CAAC;AAC3B,QACE,qBAAC;EAAe,IAAI;EAAM,mBAAgB;aACxC,qBAAC,0BACC,oBAAC;GAAQ;GAAQ;GAAW,WAAU;aACpC,oBAAC;IAAG;cAAc,MAAM,MAAM;KAAM;IAC5B,EACT,CAAC,CAAC,QACD,qBAAC,kCACC,oBAAC,qBAAmB,EACnB,iBACmB,IAEZ,EACd,oBAAC,kBAAe,uBAAe;GAChB;;AAIrB,wBAAe"}
1
+ {"version":3,"file":"LinkBlock.mjs","names":[],"sources":["../../src/LinkBlock/LinkBlock.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport parse from \"html-react-parser\";\nimport { useMemo } from \"react\";\nimport { ArrowRightLine, CalendarLine } from \"@ndla/icons\";\nimport { Heading } from \"@ndla/primitives\";\nimport { SafeLink } from \"@ndla/safelink\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { LinkBlockEmbedData } from \"@ndla/types-embed\";\nimport { getPossiblyRelativeUrl } from \"../utils/relativeUrl\";\n\nconst InfoWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n },\n});\n\nconst StyledSafeLink = styled(SafeLink, {\n base: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n background: \"surface.default\",\n padding: \"medium\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n \"& h3\": {\n textDecoration: \"underline\",\n },\n \"& [data-forward]\": {\n transitionProperty: \"width, height\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"fast\",\n },\n _hover: {\n \"& h3\": {\n textDecoration: \"none\",\n },\n \"& [data-forward]\": {\n width: \"large\",\n height: \"large\",\n },\n },\n },\n});\n\nconst StyledDateContainer = styled(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"xxsmall\",\n },\n});\n\nconst StyledCalendarEd = styled(CalendarLine, {\n base: {\n color: \"icon.strong\",\n },\n});\n\ninterface Props extends Omit<LinkBlockEmbedData, \"resource\"> {\n path?: string;\n articleLanguage?: string;\n}\n\nexport const LinkBlock = ({ title, articleLanguage, date, url, path }: Props) => {\n const href = getPossiblyRelativeUrl(url, path);\n const formattedDate = useMemo(() => {\n if (!date) return null;\n return new Intl.DateTimeFormat(articleLanguage, {\n timeZone: \"CET\",\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n }).format(new Date(date));\n }, [date, articleLanguage]);\n return (\n <StyledSafeLink to={href} data-embed-type=\"link-block\">\n <InfoWrapper>\n <Heading asChild consumeCss textStyle=\"title.medium\">\n <h3 data-heading>{parse(title)}</h3>\n </Heading>\n {!!date && (\n <StyledDateContainer>\n <StyledCalendarEd />\n {formattedDate}\n </StyledDateContainer>\n )}\n </InfoWrapper>\n <ArrowRightLine data-forward />\n </StyledSafeLink>\n );\n};\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACN,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,UAAU,EACtC,MAAM;CACJ,SAAS;CACT,gBAAgB;CAChB,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,QAAQ,EACN,gBAAgB,aACjB;CACD,oBAAoB;EAClB,oBAAoB;EACpB,0BAA0B;EAC1B,oBAAoB;EACrB;CACD,QAAQ;EACN,QAAQ,EACN,gBAAgB,QACjB;EACD,oBAAoB;GAClB,OAAO;GACP,QAAQ;GACT;EACF;CACF,EACF,CAAC;AAEF,MAAM,sBAAsB,OAAO,OAAO,EACxC,MAAM;CACJ,SAAS;CACT,YAAY;CACZ,KAAK;CACN,EACF,CAAC;AAEF,MAAM,mBAAmB,OAAO,cAAc,EAC5C,MAAM,EACJ,OAAO,eACR,EACF,CAAC;AAOF,MAAa,aAAa,EAAE,OAAO,iBAAiB,MAAM,KAAK,WAAkB;CAC/E,MAAM,OAAO,uBAAuB,KAAK,KAAK;CAC9C,MAAM,gBAAgB,cAAc;AAClC,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,IAAI,KAAK,eAAe,iBAAiB;GAC9C,UAAU;GACV,KAAK;GACL,OAAO;GACP,MAAM;GACP,CAAC,CAAC,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC,MAAM,gBAAgB,CAAC;AAC3B,QACE,qBAAC;EAAe,IAAI;EAAM,mBAAgB;aACxC,qBAAC,0BACC,oBAAC;GAAQ;GAAQ;GAAW,WAAU;aACpC,oBAAC;IAAG;cAAc,MAAM,MAAM;KAAM;IAC5B,EACT,CAAC,CAAC,QACD,qBAAC,kCACC,oBAAC,qBAAmB,EACnB,iBACmB,IAEZ,EACd,oBAAC,kBAAe,uBAAe;GAChB"}
@@ -16,8 +16,7 @@ const LinkBlockSection = ({ children,...rest }) => {
16
16
  children: /* @__PURE__ */ jsx(StyledList, { children: Children.map(children, (child) => /* @__PURE__ */ jsx("li", { children: child })) })
17
17
  });
18
18
  };
19
- var LinkBlockSection_default = LinkBlockSection;
20
19
 
21
20
  //#endregion
22
- export { LinkBlockSection_default as default };
21
+ export { LinkBlockSection };
23
22
  //# sourceMappingURL=LinkBlockSection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkBlockSection.mjs","names":[],"sources":["../../src/LinkBlock/LinkBlockSection.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Children, type HTMLAttributes, type ReactNode } from \"react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\ninterface Props extends HTMLAttributes<HTMLElement> {\n children: ReactNode;\n}\n\nconst StyledList = styled(\"ul\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n listStyle: \"none\",\n },\n});\n\nconst LinkBlockSection = ({ children, ...rest }: Props) => {\n return (\n <nav {...rest} data-embed-type=\"link-block-list\">\n <StyledList>\n {Children.map(children, (child) => (\n <li>{child}</li>\n ))}\n </StyledList>\n </nav>\n );\n};\n\nexport default LinkBlockSection;\n"],"mappings":";;;;;AAeA,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,WAAW;CACZ,EACF,CAAC;AAEF,MAAM,oBAAoB,EAAE,SAAU,GAAG,WAAkB;AACzD,QACE,oBAAC;EAAI,GAAI;EAAM,mBAAgB;YAC7B,oBAAC,wBACE,SAAS,IAAI,WAAW,UACvB,oBAAC,kBAAI,QAAW,CAChB,GACS;GACT;;AAIV,+BAAe"}
1
+ {"version":3,"file":"LinkBlockSection.mjs","names":[],"sources":["../../src/LinkBlock/LinkBlockSection.tsx"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Children, type HTMLAttributes, type ReactNode } from \"react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\ninterface Props extends HTMLAttributes<HTMLElement> {\n children: ReactNode;\n}\n\nconst StyledList = styled(\"ul\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n listStyle: \"none\",\n },\n});\n\nexport const LinkBlockSection = ({ children, ...rest }: Props) => {\n return (\n <nav {...rest} data-embed-type=\"link-block-list\">\n <StyledList>\n {Children.map(children, (child) => (\n <li>{child}</li>\n ))}\n </StyledList>\n </nav>\n );\n};\n"],"mappings":";;;;;AAeA,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM;CACJ,SAAS;CACT,eAAe;CACf,KAAK;CACL,WAAW;CACZ,EACF,CAAC;AAEF,MAAa,oBAAoB,EAAE,SAAU,GAAG,WAAkB;AAChE,QACE,oBAAC;EAAI,GAAI;EAAM,mBAAgB;YAC7B,oBAAC,wBACE,SAAS,IAAI,WAAW,UACvB,oBAAC,kBAAI,QAAW,CAChB,GACS;GACT"}
@@ -67,8 +67,7 @@ const ResourceBox = ({ image, title, caption, url, buttonText }) => {
67
67
  })
68
68
  ] })] });
69
69
  };
70
- var ResourceBox_default = ResourceBox;
71
70
 
72
71
  //#endregion
73
- export { ResourceBox, ResourceBox_default as default };
72
+ export { ResourceBox };
74
73
  //# sourceMappingURL=ResourceBox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceBox.mjs","names":[],"sources":["../../src/ResourceBox/ResourceBox.tsx"],"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\nimport { breakpoints } from \"@ndla/core\";\nimport { ShareBoxLine } from \"@ndla/icons\";\nimport { Heading, Image, Text } from \"@ndla/primitives\";\nimport { SafeLinkButton } from \"@ndla/safelink\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\nconst Container = styled(\"div\", {\n base: {\n display: \"flex\",\n padding: \"medium\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"stroke.default\",\n boxShadow: \"full\",\n marginBlockEnd: \"medium\",\n gap: \"medium\",\n tabletWideDown: {\n padding: \"xsmall\",\n },\n tabletDown: {\n flexDirection: \"column\",\n gap: \"0\",\n padding: \"0\",\n },\n },\n});\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"xsmall\",\n flex: \"1\",\n tabletDown: {\n padding: \"xsmall\",\n },\n },\n});\n\nconst StyledImage = styled(Image, {\n base: {\n objectFit: \"cover\",\n borderRadius: \"xsmall\",\n width: \"fit-content\",\n aspectRatio: \"1/1\",\n tabletDown: {\n width: \"100%\",\n borderRadius: \"0\",\n },\n },\n});\n\nconst StyledText = styled(Text, {\n base: {\n flex: \"1\",\n },\n});\n\ninterface ImageMeta {\n src: string | undefined;\n alt: string;\n}\n\ninterface Props {\n image?: ImageMeta;\n title: string;\n caption: string;\n url: string;\n buttonText: string;\n}\n\nexport const ResourceBox = ({ image, title, caption, url, buttonText }: Props) => {\n return (\n <Container>\n {image ? (\n <StyledImage\n src={image.src}\n alt={image.alt}\n sizes={`(min-width: ${breakpoints.desktop}) 150px, (max-width: ${breakpoints.tablet} ) 400px, 200px`}\n variant=\"rounded\"\n />\n ) : null}\n <ContentWrapper>\n <Heading textStyle=\"label.large\" fontWeight=\"bold\" asChild consumeCss>\n <h3>{title}</h3>\n </Heading>\n <StyledText textStyle=\"body.medium\">{caption}</StyledText>\n <SafeLinkButton to={url} target=\"_blank\" variant=\"secondary\">\n {buttonText}\n <ShareBoxLine />\n </SafeLinkButton>\n </ContentWrapper>\n </Container>\n );\n};\n\nexport default ResourceBox;\n"],"mappings":";;;;;;;;AAcA,MAAM,YAAY,OAAO,OAAO,EAC9B,MAAM;CACJ,SAAS;CACT,SAAS;CACT,cAAc;CACd,QAAQ;CACR,aAAa;CACb,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,gBAAgB,EACd,SAAS,UACV;CACD,YAAY;EACV,eAAe;EACf,KAAK;EACL,SAAS;EACV;CACF,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,YAAY;CACZ,KAAK;CACL,MAAM;CACN,YAAY,EACV,SAAS,UACV;CACF,EACF,CAAC;AAEF,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,WAAW;CACX,cAAc;CACd,OAAO;CACP,aAAa;CACb,YAAY;EACV,OAAO;EACP,cAAc;EACf;CACF,EACF,CAAC;AAEF,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,EACJ,MAAM,KACP,EACF,CAAC;AAeF,MAAa,eAAe,EAAE,OAAO,OAAO,SAAS,KAAK,iBAAwB;AAChF,QACE,qBAAC,wBACE,QACC,oBAAC;EACC,KAAK,MAAM;EACX,KAAK,MAAM;EACX,OAAO,eAAe,YAAY,QAAQ,uBAAuB,YAAY,OAAO;EACpF,SAAQ;GACR,GACA,MACJ,qBAAC;EACC,oBAAC;GAAQ,WAAU;GAAc,YAAW;GAAO;GAAQ;aACzD,oBAAC,kBAAI,QAAW;IACR;EACV,oBAAC;GAAW,WAAU;aAAe;IAAqB;EAC1D,qBAAC;GAAe,IAAI;GAAK,QAAO;GAAS,SAAQ;cAC9C,YACD,oBAAC,iBAAe;IACD;KACF,IACP;;AAIhB,0BAAe"}
1
+ {"version":3,"file":"ResourceBox.mjs","names":[],"sources":["../../src/ResourceBox/ResourceBox.tsx"],"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\nimport { breakpoints } from \"@ndla/core\";\nimport { ShareBoxLine } from \"@ndla/icons\";\nimport { Heading, Image, Text } from \"@ndla/primitives\";\nimport { SafeLinkButton } from \"@ndla/safelink\";\nimport { styled } from \"@ndla/styled-system/jsx\";\n\nconst Container = styled(\"div\", {\n base: {\n display: \"flex\",\n padding: \"medium\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"stroke.default\",\n boxShadow: \"full\",\n marginBlockEnd: \"medium\",\n gap: \"medium\",\n tabletWideDown: {\n padding: \"xsmall\",\n },\n tabletDown: {\n flexDirection: \"column\",\n gap: \"0\",\n padding: \"0\",\n },\n },\n});\n\nconst ContentWrapper = styled(\"div\", {\n base: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"xsmall\",\n flex: \"1\",\n tabletDown: {\n padding: \"xsmall\",\n },\n },\n});\n\nconst StyledImage = styled(Image, {\n base: {\n objectFit: \"cover\",\n borderRadius: \"xsmall\",\n width: \"fit-content\",\n aspectRatio: \"1/1\",\n tabletDown: {\n width: \"100%\",\n borderRadius: \"0\",\n },\n },\n});\n\nconst StyledText = styled(Text, {\n base: {\n flex: \"1\",\n },\n});\n\ninterface ImageMeta {\n src: string | undefined;\n alt: string;\n}\n\ninterface Props {\n image?: ImageMeta;\n title: string;\n caption: string;\n url: string;\n buttonText: string;\n}\n\nexport const ResourceBox = ({ image, title, caption, url, buttonText }: Props) => {\n return (\n <Container>\n {image ? (\n <StyledImage\n src={image.src}\n alt={image.alt}\n sizes={`(min-width: ${breakpoints.desktop}) 150px, (max-width: ${breakpoints.tablet} ) 400px, 200px`}\n variant=\"rounded\"\n />\n ) : null}\n <ContentWrapper>\n <Heading textStyle=\"label.large\" fontWeight=\"bold\" asChild consumeCss>\n <h3>{title}</h3>\n </Heading>\n <StyledText textStyle=\"body.medium\">{caption}</StyledText>\n <SafeLinkButton to={url} target=\"_blank\" variant=\"secondary\">\n {buttonText}\n <ShareBoxLine />\n </SafeLinkButton>\n </ContentWrapper>\n </Container>\n );\n};\n"],"mappings":";;;;;;;;AAcA,MAAM,YAAY,OAAO,OAAO,EAC9B,MAAM;CACJ,SAAS;CACT,SAAS;CACT,cAAc;CACd,QAAQ;CACR,aAAa;CACb,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,gBAAgB,EACd,SAAS,UACV;CACD,YAAY;EACV,eAAe;EACf,KAAK;EACL,SAAS;EACV;CACF,EACF,CAAC;AAEF,MAAM,iBAAiB,OAAO,OAAO,EACnC,MAAM;CACJ,SAAS;CACT,eAAe;CACf,YAAY;CACZ,KAAK;CACL,MAAM;CACN,YAAY,EACV,SAAS,UACV;CACF,EACF,CAAC;AAEF,MAAM,cAAc,OAAO,OAAO,EAChC,MAAM;CACJ,WAAW;CACX,cAAc;CACd,OAAO;CACP,aAAa;CACb,YAAY;EACV,OAAO;EACP,cAAc;EACf;CACF,EACF,CAAC;AAEF,MAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,EACJ,MAAM,KACP,EACF,CAAC;AAeF,MAAa,eAAe,EAAE,OAAO,OAAO,SAAS,KAAK,iBAAwB;AAChF,QACE,qBAAC,wBACE,QACC,oBAAC;EACC,KAAK,MAAM;EACX,KAAK,MAAM;EACX,OAAO,eAAe,YAAY,QAAQ,uBAAuB,YAAY,OAAO;EACpF,SAAQ;GACR,GACA,MACJ,qBAAC;EACC,oBAAC;GAAQ,WAAU;GAAc,YAAW;GAAO;GAAQ;aACzD,oBAAC,kBAAI,QAAW;IACR;EACV,oBAAC;GAAW,WAAU;aAAe;IAAqB;EAC1D,qBAAC;GAAe,IAAI;GAAK,QAAO;GAAS,SAAQ;cAC9C,YACD,oBAAC,iBAAe;IACD;KACF,IACP"}
package/es/index.mjs CHANGED
@@ -1,31 +1,32 @@
1
1
  import { LicenseLink } from "./LicenseByline/LicenseLink.mjs";
2
2
  import { EmbedByline } from "./LicenseByline/EmbedByline.mjs";
3
3
  import { licenseAttributes } from "./utils/licenseAttributes.mjs";
4
- import BrightcoveEmbed_default from "./Embed/BrightcoveEmbed.mjs";
4
+ import { BrightcoveEmbed } from "./Embed/BrightcoveEmbed.mjs";
5
5
  import { ResourceBox } from "./ResourceBox/ResourceBox.mjs";
6
- import ExternalEmbed_default from "./Embed/ExternalEmbed.mjs";
7
- import H5pEmbed_default from "./Embed/H5pEmbed.mjs";
8
- import IframeEmbed_default from "./Embed/IframeEmbed.mjs";
9
- import ImageEmbed_default, { getCrop, getFocalPoint } from "./Embed/ImageEmbed.mjs";
6
+ import { ExternalEmbed } from "./Embed/ExternalEmbed.mjs";
7
+ import { H5pEmbed } from "./Embed/H5pEmbed.mjs";
8
+ import { IframeEmbed } from "./Embed/IframeEmbed.mjs";
9
+ import { ImageEmbed, getCrop, getFocalPoint } from "./Embed/ImageEmbed.mjs";
10
10
  import { Concept } from "./Concept/Concept.mjs";
11
11
  import { InlineTriggerButton } from "./Embed/InlineTriggerButton.mjs";
12
- import AudioPlayer_default from "./AudioPlayer/AudioPlayer.mjs";
13
- import AudioEmbed_default from "./Embed/AudioEmbed.mjs";
14
- import FootnoteEmbed_default from "./Embed/FootnoteEmbed.mjs";
15
- import ContentLinkEmbed_default from "./Embed/ContentLinkEmbed.mjs";
12
+ import { AudioPlayer } from "./AudioPlayer/AudioPlayer.mjs";
13
+ import { AudioEmbed } from "./Embed/AudioEmbed.mjs";
14
+ import { FootnoteEmbed } from "./Embed/FootnoteEmbed.mjs";
15
+ import { ContentLinkEmbed } from "./Embed/ContentLinkEmbed.mjs";
16
+ import { contentTypeMapping, contentTypes, resourceEmbedTypeMapping } from "./model/ContentType.mjs";
16
17
  import { ContentTypeBadge, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadge.mjs";
17
18
  import { RelatedArticle, RelatedArticleList } from "./RelatedArticleList/RelatedArticleList.mjs";
18
- import RelatedContentEmbed_default from "./Embed/RelatedContentEmbed.mjs";
19
+ import { RelatedContentEmbed } from "./Embed/RelatedContentEmbed.mjs";
19
20
  import { ConceptInlineTriggerButton } from "./Embed/ConceptInlineTriggerButton.mjs";
20
- import GlossExample_default from "./Gloss/GlossExample.mjs";
21
- import Gloss_default from "./Gloss/Gloss.mjs";
21
+ import { GlossExample } from "./Gloss/GlossExample.mjs";
22
+ import { Gloss } from "./Gloss/Gloss.mjs";
22
23
  import { BlockConcept, ConceptEmbed, InlineConcept } from "./Embed/ConceptEmbed.mjs";
23
- import UnknownEmbed_default from "./Embed/UnknownEmbed.mjs";
24
- import UuDisclaimerEmbed_default from "./Embed/UuDisclaimerEmbed.mjs";
25
- import CopyrightEmbed_default from "./Embed/CopyrightEmbed.mjs";
26
- import CodeBlock_default from "./CodeBlock/CodeBlock.mjs";
24
+ import { UnknownEmbed } from "./Embed/UnknownEmbed.mjs";
25
+ import { UuDisclaimerEmbed } from "./Embed/UuDisclaimerEmbed.mjs";
26
+ import { CopyrightEmbed } from "./Embed/CopyrightEmbed.mjs";
27
+ import { CodeBlock } from "./CodeBlock/CodeBlock.mjs";
27
28
  import { codeLanguageOptions } from "./CodeBlock/codeLanguageOptions.mjs";
28
- import CodeEmbed_default from "./Embed/CodeEmbed.mjs";
29
+ import { CodeEmbed } from "./Embed/CodeEmbed.mjs";
29
30
  import { EmbedWrapper } from "./Embed/EmbedWrapper.mjs";
30
31
  import { ArticleFootNotes } from "./Article/ArticleFootNotes.mjs";
31
32
  import { ArticleByline, ArticleBylineAccordionItem } from "./Article/ArticleByline.mjs";
@@ -34,26 +35,29 @@ import { getPossiblyRelativeUrl } from "./utils/relativeUrl.mjs";
34
35
  import { FileListEmbed, FileListItem, FileListWrapper } from "./FileList/FileList.mjs";
35
36
  import { File, FileListElement } from "./FileList/File.mjs";
36
37
  import { PdfFile } from "./FileList/PdfFile.mjs";
37
- import FactBox_default from "./FactBox/FactBox.mjs";
38
- import model_default from "./model/index.mjs";
38
+ import { FactBox } from "./FactBox/FactBox.mjs";
39
+ import { subjectCategories } from "./model/SubjectCategories.mjs";
40
+ import { subjectTypes } from "./model/SubjectTypes.mjs";
41
+ import { wordClass } from "./model/WordClass.mjs";
42
+ import { constants } from "./model/index.mjs";
39
43
  import messages_nb_default from "./locale/messages-nb.mjs";
40
44
  import messages_nn_default from "./locale/messages-nn.mjs";
41
45
  import messages_en_default from "./locale/messages-en.mjs";
42
46
  import messages_se_default from "./locale/messages-se.mjs";
43
- import Breadcrumb_default from "./Breadcrumb/Breadcrumb.mjs";
44
- import HomeBreadcrumb_default from "./Breadcrumb/HomeBreadcrumb.mjs";
47
+ import { Breadcrumb } from "./Breadcrumb/Breadcrumb.mjs";
48
+ import { HomeBreadcrumb } from "./Breadcrumb/HomeBreadcrumb.mjs";
45
49
  import { formatNestedMessages } from "./i18n/formatNestedMessages.mjs";
46
50
  import { TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger } from "./TagSelector/TagSelector.mjs";
47
51
  import { useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations } from "./i18n/useComponentTranslations.mjs";
48
- import CopyParagraphButton_default from "./CopyParagraphButton/CopyParagraphButton.mjs";
52
+ import { CopyParagraphButton } from "./CopyParagraphButton/CopyParagraphButton.mjs";
49
53
  import { Pitch } from "./Pitch/Pitch.mjs";
50
- import KeyFigure_default from "./KeyFigure/KeyFigure.mjs";
54
+ import { KeyFigure } from "./KeyFigure/KeyFigure.mjs";
51
55
  import { ContactBlock, contactBlockBackgrounds } from "./ContactBlock/ContactBlock.mjs";
52
- import CampaignBlock_default from "./CampaignBlock/CampaignBlock.mjs";
56
+ import { CampaignBlock } from "./CampaignBlock/CampaignBlock.mjs";
53
57
  import { Grid } from "./Grid/Grid.mjs";
54
58
  import { GridParallaxItem } from "./Grid/GridParallaxItem.mjs";
55
- import LinkBlock_default from "./LinkBlock/LinkBlock.mjs";
56
- import LinkBlockSection_default from "./LinkBlock/LinkBlockSection.mjs";
59
+ import { LinkBlock } from "./LinkBlock/LinkBlock.mjs";
60
+ import { LinkBlockSection } from "./LinkBlock/LinkBlockSection.mjs";
57
61
  import { ZendeskButton } from "./ZendeskButton/ZendeskButton.mjs";
58
62
 
59
- export { Article, ArticleByline, ArticleBylineAccordionItem, ArticleContent, ArticleFootNotes, ArticleFooter, ArticleHGroup, ArticleHeader, ArticleTitle, ArticleWrapper, AudioEmbed_default as AudioEmbed, AudioPlayer_default as AudioPlayer, BlockConcept, Breadcrumb_default as Breadcrumb, BrightcoveEmbed_default as BrightcoveEmbed, CampaignBlock_default as CampaignBlock, CodeBlock_default as CodeBlock, CodeEmbed_default as CodeEmbed, Concept, ConceptEmbed, ConceptInlineTriggerButton, ContactBlock, ContentLinkEmbed_default as ContentLinkEmbed, ContentTypeBadge, CopyParagraphButton_default as CopyParagraphButton, CopyrightEmbed_default as CopyrightEmbed, EmbedByline, EmbedWrapper, ExternalEmbed_default as ExternalEmbed, FactBox_default as FactBox, File, FileListElement, FileListEmbed, FileListItem, FileListWrapper, FootnoteEmbed_default as FootnoteEmbed, Gloss_default as Gloss, GlossExample_default as GlossExample, Grid, GridParallaxItem, H5pEmbed_default as H5pEmbed, HomeBreadcrumb_default as HomeBreadcrumb, IframeEmbed_default as IframeEmbed, ImageEmbed_default as ImageEmbed, InlineConcept, InlineTriggerButton, KeyFigure_default as KeyFigure, LicenseLink, LinkBlock_default as LinkBlock, LinkBlockSection_default as LinkBlockSection, PdfFile, Pitch, RelatedArticle, RelatedArticleList, RelatedContentEmbed_default as RelatedContentEmbed, ResourceBox, TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger, UnknownEmbed_default as UnknownEmbed, UuDisclaimerEmbed_default as UuDisclaimerEmbed, ZendeskButton, codeLanguageOptions, model_default as constants, contactBlockBackgrounds, contentTypeToBadgeVariantMap, formatNestedMessages, getCrop, getFocalPoint, getPossiblyRelativeUrl, licenseAttributes, messages_en_default as messagesEN, messages_nb_default as messagesNB, messages_nn_default as messagesNN, messages_se_default as messagesSE, useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations };
63
+ export { Article, ArticleByline, ArticleBylineAccordionItem, ArticleContent, ArticleFootNotes, ArticleFooter, ArticleHGroup, ArticleHeader, ArticleTitle, ArticleWrapper, AudioEmbed, AudioPlayer, BlockConcept, Breadcrumb, BrightcoveEmbed, CampaignBlock, CodeBlock, CodeEmbed, Concept, ConceptEmbed, ConceptInlineTriggerButton, ContactBlock, ContentLinkEmbed, ContentTypeBadge, CopyParagraphButton, CopyrightEmbed, EmbedByline, EmbedWrapper, ExternalEmbed, FactBox, File, FileListElement, FileListEmbed, FileListItem, FileListWrapper, FootnoteEmbed, Gloss, GlossExample, Grid, GridParallaxItem, H5pEmbed, HomeBreadcrumb, IframeEmbed, ImageEmbed, InlineConcept, InlineTriggerButton, KeyFigure, LicenseLink, LinkBlock, LinkBlockSection, PdfFile, Pitch, RelatedArticle, RelatedArticleList, RelatedContentEmbed, ResourceBox, TagSelectorClearTrigger, TagSelectorControl, TagSelectorInput, TagSelectorInputBase, TagSelectorItemInput, TagSelectorLabel, TagSelectorRoot, TagSelectorTrigger, UnknownEmbed, UuDisclaimerEmbed, ZendeskButton, codeLanguageOptions, constants, contactBlockBackgrounds, contentTypeMapping, contentTypeToBadgeVariantMap, contentTypes, formatNestedMessages, getCrop, getFocalPoint, getPossiblyRelativeUrl, licenseAttributes, messages_en_default as messagesEN, messages_nb_default as messagesNB, messages_nn_default as messagesNN, messages_se_default as messagesSE, resourceEmbedTypeMapping, subjectCategories, subjectTypes, useAudioSearchTranslations, useComboboxTranslations, useDatePickerTranslations, useImageSearchTranslations, usePaginationTranslations, useTagSelectorTranslations, useTagsInputTranslations, useVideoSearchTranslations, wordClass };
@@ -1,8 +1,9 @@
1
- import model_default from "../model/index.mjs";
1
+ import { subjectCategories } from "../model/SubjectCategories.mjs";
2
+ import { subjectTypes } from "../model/SubjectTypes.mjs";
3
+ import { wordClass } from "../model/WordClass.mjs";
2
4
  import { contributorTypes } from "@ndla/licenses";
3
5
 
4
6
  //#region src/locale/messages-en.ts
5
- const { subjectCategories, subjectTypes, wordClass } = model_default;
6
7
  const messages = {
7
8
  ...Object.entries(contributorTypes).reduce((acc, curr) => {
8
9
  acc[curr[0]] = curr[1].en;
@@ -299,41 +300,41 @@ const messages = {
299
300
  }
300
301
  },
301
302
  wordClass: {
302
- [wordClass.wordClass.adjective]: "Adjective",
303
- [wordClass.wordClass.adverb]: "Adverb",
304
- [wordClass.wordClass.properNoun]: "Proper Noun",
305
- [wordClass.wordClass.auxiliary]: "Auxiliary",
306
- [wordClass.wordClass.complement]: "Complement",
307
- [wordClass.wordClass.conjunction]: "Conjunction",
308
- [wordClass.wordClass.coverb]: "Coverb",
309
- [wordClass.wordClass.determiner]: "Determiner",
310
- [wordClass.wordClass.interjection]: "Interjection",
311
- [wordClass.wordClass.quantifier]: "Quantifier",
312
- [wordClass.wordClass.marker]: "Marker",
313
- [wordClass.wordClass.modalVerb]: "Modal Verb",
314
- [wordClass.wordClass.measureWord]: "Measure Word",
315
- [wordClass.wordClass.noun]: "Noun",
316
- [wordClass.wordClass["noun-zh"]]: "Noun",
317
- [wordClass.wordClass.nounPhrase]: "Noun Phrase",
318
- [wordClass.wordClass.onomatopoeia]: "Onomatopoeia",
319
- [wordClass.wordClass.particle]: "Particle",
320
- [wordClass.wordClass.demonstrative]: "Demonstrative",
321
- [wordClass.wordClass.personalPronoun]: "Personal Pronoun",
322
- [wordClass.wordClass.preposition]: "Preposition",
323
- [wordClass.wordClass.pronoun]: "Pronoun",
324
- [wordClass.wordClass.questionWord]: "Question Word",
325
- [wordClass.wordClass.locationWord]: "Location Word",
326
- [wordClass.wordClass.suffix]: "Suffix",
327
- [wordClass.wordClass.numeral]: "Numeral",
328
- [wordClass.wordClass.timeWord]: "Time word",
329
- [wordClass.wordClass.timeExpression]: "Time Expression",
330
- [wordClass.wordClass.stativeVerb]: "Stative Verb",
331
- [wordClass.wordClass.subordinatingConjunction]: "Subordinating Conjunction",
332
- [wordClass.wordClass.exclamationWord]: "Exclamation Word",
333
- [wordClass.wordClass.expression]: "Expression",
334
- [wordClass.wordClass.verb]: "Verb",
335
- [wordClass.wordClass.verbComplement]: "Verb-Complement",
336
- [wordClass.wordClass.verbObject]: "Verb-Object"
303
+ [wordClass.adjective]: "Adjective",
304
+ [wordClass.adverb]: "Adverb",
305
+ [wordClass.properNoun]: "Proper Noun",
306
+ [wordClass.auxiliary]: "Auxiliary",
307
+ [wordClass.complement]: "Complement",
308
+ [wordClass.conjunction]: "Conjunction",
309
+ [wordClass.coverb]: "Coverb",
310
+ [wordClass.determiner]: "Determiner",
311
+ [wordClass.interjection]: "Interjection",
312
+ [wordClass.quantifier]: "Quantifier",
313
+ [wordClass.marker]: "Marker",
314
+ [wordClass.modalVerb]: "Modal Verb",
315
+ [wordClass.measureWord]: "Measure Word",
316
+ [wordClass.noun]: "Noun",
317
+ [wordClass["noun-zh"]]: "Noun",
318
+ [wordClass.nounPhrase]: "Noun Phrase",
319
+ [wordClass.onomatopoeia]: "Onomatopoeia",
320
+ [wordClass.particle]: "Particle",
321
+ [wordClass.demonstrative]: "Demonstrative",
322
+ [wordClass.personalPronoun]: "Personal Pronoun",
323
+ [wordClass.preposition]: "Preposition",
324
+ [wordClass.pronoun]: "Pronoun",
325
+ [wordClass.questionWord]: "Question Word",
326
+ [wordClass.locationWord]: "Location Word",
327
+ [wordClass.suffix]: "Suffix",
328
+ [wordClass.numeral]: "Numeral",
329
+ [wordClass.timeWord]: "Time word",
330
+ [wordClass.timeExpression]: "Time Expression",
331
+ [wordClass.stativeVerb]: "Stative Verb",
332
+ [wordClass.subordinatingConjunction]: "Subordinating Conjunction",
333
+ [wordClass.exclamationWord]: "Exclamation Word",
334
+ [wordClass.expression]: "Expression",
335
+ [wordClass.verb]: "Verb",
336
+ [wordClass.verbComplement]: "Verb-Complement",
337
+ [wordClass.verbObject]: "Verb-Object"
337
338
  },
338
339
  login: "Log in",
339
340
  component: {