@ndla/ui 56.0.74-alpha.0 → 56.0.76-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 (232) hide show
  1. package/dist/panda.buildinfo.json +4 -21
  2. package/dist/styles.css +12 -76
  3. package/es/Article/Article.js +2 -2
  4. package/es/Article/ArticleByline.js +1 -1
  5. package/es/AudioPlayer/AudioPlayer.js +1 -0
  6. package/es/AudioPlayer/Controls.js +1 -3
  7. package/es/AudioPlayer/SpeechControl.js +1 -1
  8. package/es/Breadcrumb/BreadcrumbItem.js +1 -1
  9. package/es/Breadcrumb/HomeBreadcrumb.js +1 -1
  10. package/es/CampaignBlock/CampaignBlock.js +1 -1
  11. package/es/ContentTypeBadge/ContentTypeBadge.js +35 -213
  12. package/es/ContentTypeHero/ContentTypeHero.js +2 -1
  13. package/es/CopyParagraphButton/CopyParagraphButton.js +1 -1
  14. package/es/Embed/CodeEmbed.js +1 -2
  15. package/es/Embed/EmbedErrorPlaceholder.js +2 -2
  16. package/es/Embed/ImageEmbed.js +1 -1
  17. package/es/Embed/UuDisclaimerEmbed.js +1 -1
  18. package/es/ErrorMessage/ErrorResourceAccessDenied.js +1 -1
  19. package/es/FactBox/FactBox.js +1 -1
  20. package/es/FileList/File.js +1 -1
  21. package/es/Gloss/Gloss.js +1 -1
  22. package/es/LicenseByline/EmbedByline.js +1 -1
  23. package/es/LinkBlock/LinkBlock.js +1 -2
  24. package/es/RelatedArticleList/RelatedArticleList.js +2 -2
  25. package/es/ResourceBox/ResourceBox.js +1 -1
  26. package/es/TagSelector/TagSelector.js +1 -1
  27. package/es/index.js +1 -3
  28. package/es/locale/messages-en.js +2 -1
  29. package/es/locale/messages-nb.js +2 -1
  30. package/es/locale/messages-nn.js +2 -1
  31. package/es/locale/messages-se.js +2 -1
  32. package/es/locale/messages-sma.js +2 -1
  33. package/es/model/ContentType.js +2 -0
  34. package/lib/Article/Article.d.ts +3 -3
  35. package/lib/Article/Article.js +1 -1
  36. package/lib/Article/ArticleByline.d.ts +3 -3
  37. package/lib/Article/ArticleByline.js +2 -2
  38. package/lib/Article/ArticleFootNotes.d.ts +1 -1
  39. package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
  40. package/lib/AudioPlayer/AudioPlayer.js +1 -0
  41. package/lib/AudioPlayer/Controls.js +6 -8
  42. package/lib/AudioPlayer/SpeechControl.js +2 -2
  43. package/lib/Breadcrumb/Breadcrumb.d.ts +2 -2
  44. package/lib/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  45. package/lib/Breadcrumb/BreadcrumbItem.js +2 -2
  46. package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -1
  47. package/lib/Breadcrumb/HomeBreadcrumb.js +4 -4
  48. package/lib/CampaignBlock/CampaignBlock.d.ts +2 -2
  49. package/lib/CampaignBlock/CampaignBlock.js +2 -2
  50. package/lib/CodeBlock/CodeBlock.d.ts +1 -1
  51. package/lib/Concept/Concept.d.ts +3 -3
  52. package/lib/ContactBlock/ContactBlock.d.ts +1 -1
  53. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +9 -19
  54. package/lib/ContentTypeBadge/ContentTypeBadge.js +36 -223
  55. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.d.ts +2 -2
  56. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.d.ts +2 -2
  57. package/lib/ContentTypeHero/ContentTypeHero.d.ts +2 -2
  58. package/lib/ContentTypeHero/ContentTypeHero.js +2 -1
  59. package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -1
  60. package/lib/CopyParagraphButton/CopyParagraphButton.js +2 -2
  61. package/lib/Embed/AudioEmbed.d.ts +2 -2
  62. package/lib/Embed/BrightcoveEmbed.d.ts +2 -2
  63. package/lib/Embed/CodeEmbed.d.ts +1 -1
  64. package/lib/Embed/CodeEmbed.js +2 -3
  65. package/lib/Embed/ConceptEmbed.d.ts +3 -3
  66. package/lib/Embed/ContentLinkEmbed.d.ts +2 -2
  67. package/lib/Embed/CopyrightEmbed.d.ts +2 -2
  68. package/lib/Embed/EmbedErrorPlaceholder.d.ts +2 -2
  69. package/lib/Embed/EmbedErrorPlaceholder.js +2 -2
  70. package/lib/Embed/EmbedWrapper.d.ts +1 -1
  71. package/lib/Embed/ExternalEmbed.d.ts +1 -1
  72. package/lib/Embed/FootnoteEmbed.d.ts +1 -1
  73. package/lib/Embed/GlossEmbed.d.ts +1 -1
  74. package/lib/Embed/H5pEmbed.d.ts +1 -1
  75. package/lib/Embed/IframeEmbed.d.ts +1 -1
  76. package/lib/Embed/ImageEmbed.d.ts +3 -3
  77. package/lib/Embed/ImageEmbed.js +2 -2
  78. package/lib/Embed/RelatedContentEmbed.d.ts +1 -1
  79. package/lib/Embed/UnknownEmbed.d.ts +1 -1
  80. package/lib/Embed/UuDisclaimerEmbed.d.ts +2 -2
  81. package/lib/Embed/UuDisclaimerEmbed.js +2 -2
  82. package/lib/Embed/types.d.ts +3 -3
  83. package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
  84. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
  85. package/lib/FactBox/FactBox.d.ts +1 -1
  86. package/lib/FactBox/FactBox.js +2 -2
  87. package/lib/FileList/File.d.ts +1 -1
  88. package/lib/FileList/File.js +2 -2
  89. package/lib/FileList/FileList.d.ts +1 -1
  90. package/lib/Gloss/Gloss.d.ts +1 -1
  91. package/lib/Gloss/Gloss.js +2 -2
  92. package/lib/Gloss/GlossExample.d.ts +1 -1
  93. package/lib/Grid/Grid.d.ts +1 -1
  94. package/lib/Grid/GridParallaxItem.d.ts +1 -1
  95. package/lib/LicenseByline/EmbedByline.d.ts +6 -6
  96. package/lib/LicenseByline/EmbedByline.js +2 -2
  97. package/lib/LicenseByline/LicenseLink.d.ts +2 -2
  98. package/lib/LinkBlock/LinkBlock.d.ts +1 -1
  99. package/lib/LinkBlock/LinkBlock.js +3 -4
  100. package/lib/LinkBlock/LinkBlockSection.d.ts +1 -1
  101. package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
  102. package/lib/RelatedArticleList/RelatedArticleList.js +4 -4
  103. package/lib/ResourceBox/ResourceBox.js +2 -2
  104. package/lib/TagSelector/TagSelector.d.ts +1 -1
  105. package/lib/TagSelector/TagSelector.js +2 -2
  106. package/lib/ZendeskButton/ZendeskButton.d.ts +1 -1
  107. package/lib/i18n/useComponentTranslations.d.ts +1 -1
  108. package/lib/index.d.ts +2 -4
  109. package/lib/index.js +5 -61
  110. package/lib/locale/messages-en.d.ts +1 -0
  111. package/lib/locale/messages-en.js +2 -1
  112. package/lib/locale/messages-nb.d.ts +1 -0
  113. package/lib/locale/messages-nb.js +2 -1
  114. package/lib/locale/messages-nn.d.ts +1 -0
  115. package/lib/locale/messages-nn.js +2 -1
  116. package/lib/locale/messages-se.d.ts +1 -0
  117. package/lib/locale/messages-se.js +2 -1
  118. package/lib/locale/messages-sma.d.ts +1 -0
  119. package/lib/locale/messages-sma.js +2 -1
  120. package/lib/model/ContentType.d.ts +1 -0
  121. package/lib/model/ContentType.js +3 -1
  122. package/lib/types.d.ts +1 -1
  123. package/package.json +12 -12
  124. package/src/Article/Article.tsx +6 -6
  125. package/src/Article/ArticleByline.stories.tsx +1 -1
  126. package/src/Article/ArticleByline.tsx +5 -5
  127. package/src/Article/ArticleFootNotes.tsx +1 -1
  128. package/src/AudioPlayer/AudiPlayer.stories.tsx +1 -1
  129. package/src/AudioPlayer/AudioPlayer.tsx +2 -1
  130. package/src/AudioPlayer/Controls.tsx +1 -3
  131. package/src/AudioPlayer/SpeechControl.tsx +1 -1
  132. package/src/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  133. package/src/Breadcrumb/Breadcrumb.tsx +2 -2
  134. package/src/Breadcrumb/BreadcrumbItem.tsx +2 -2
  135. package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +1 -1
  136. package/src/Breadcrumb/HomeBreadcrumb.tsx +2 -2
  137. package/src/CampaignBlock/CampaignBlock.stories.tsx +1 -1
  138. package/src/CampaignBlock/CampaignBlock.tsx +4 -4
  139. package/src/CodeBlock/CodeBlock.stories.tsx +1 -1
  140. package/src/CodeBlock/CodeBlock.tsx +1 -1
  141. package/src/Concept/Concept.stories.tsx +2 -2
  142. package/src/Concept/Concept.tsx +3 -3
  143. package/src/ContactBlock/ContactBlock.stories.tsx +1 -1
  144. package/src/ContactBlock/ContactBlock.tsx +2 -2
  145. package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +46 -54
  146. package/src/ContentTypeBadge/ContentTypeBadge.tsx +63 -211
  147. package/src/ContentTypeBlockQuote/ContentTypeBlockQuote.tsx +2 -2
  148. package/src/ContentTypeFramedContent/ContentTypeFramedContent.tsx +2 -2
  149. package/src/ContentTypeHero/ContentTypeHero.stories.tsx +1 -1
  150. package/src/ContentTypeHero/ContentTypeHero.tsx +3 -2
  151. package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -2
  152. package/src/Embed/AudioEmbed.stories.tsx +2 -2
  153. package/src/Embed/AudioEmbed.tsx +2 -2
  154. package/src/Embed/BrightcoveEmbed.stories.tsx +2 -2
  155. package/src/Embed/BrightcoveEmbed.tsx +2 -2
  156. package/src/Embed/CodeEmbed.stories.tsx +1 -1
  157. package/src/Embed/CodeEmbed.tsx +3 -4
  158. package/src/Embed/ConceptEmbed.stories.tsx +2 -2
  159. package/src/Embed/ConceptEmbed.tsx +3 -3
  160. package/src/Embed/ContentLinkEmbed.tsx +2 -2
  161. package/src/Embed/CopyrightEmbed.tsx +2 -2
  162. package/src/Embed/EmbedErrorPlaceholder.tsx +4 -4
  163. package/src/Embed/EmbedWrapper.tsx +1 -1
  164. package/src/Embed/ExternalEmbed.stories.tsx +2 -2
  165. package/src/Embed/ExternalEmbed.tsx +1 -1
  166. package/src/Embed/FootnoteEmbed.stories.tsx +2 -2
  167. package/src/Embed/FootnoteEmbed.tsx +1 -1
  168. package/src/Embed/GlossEmbed.stories.tsx +2 -2
  169. package/src/Embed/GlossEmbed.tsx +1 -1
  170. package/src/Embed/H5pEmbed.stories.tsx +2 -2
  171. package/src/Embed/H5pEmbed.tsx +1 -1
  172. package/src/Embed/IframeEmbed.stories.tsx +2 -2
  173. package/src/Embed/IframeEmbed.tsx +1 -1
  174. package/src/Embed/ImageEmbed.stories.tsx +4 -4
  175. package/src/Embed/ImageEmbed.tsx +5 -5
  176. package/src/Embed/InlineTriggerButton.tsx +1 -1
  177. package/src/Embed/RelatedContentEmbed.stories.tsx +2 -2
  178. package/src/Embed/RelatedContentEmbed.tsx +1 -1
  179. package/src/Embed/UnknownEmbed.tsx +1 -1
  180. package/src/Embed/UuDisclaimerEmbed.stories.tsx +2 -2
  181. package/src/Embed/UuDisclaimerEmbed.tsx +3 -3
  182. package/src/Embed/types.ts +3 -3
  183. package/src/ErrorMessage/ErrorMessage.stories.tsx +1 -1
  184. package/src/ErrorMessage/ErrorMessage.tsx +1 -1
  185. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +1 -1
  186. package/src/FactBox/FactBox.tsx +11 -2
  187. package/src/FactBox/Factbox.stories.tsx +1 -1
  188. package/src/FileList/File.tsx +2 -2
  189. package/src/FileList/FileList.stories.tsx +3 -4
  190. package/src/FileList/FileList.tsx +1 -1
  191. package/src/Gloss/Gloss.stories.tsx +1 -1
  192. package/src/Gloss/Gloss.tsx +2 -2
  193. package/src/Gloss/GlossExample.tsx +1 -1
  194. package/src/Grid/Grid.stories.tsx +1 -1
  195. package/src/Grid/Grid.tsx +1 -1
  196. package/src/Grid/GridParallaxItem.tsx +1 -1
  197. package/src/KeyFigure/KeyFigure.stories.tsx +1 -1
  198. package/src/LicenseByline/EmbedByline.stories.tsx +1 -1
  199. package/src/LicenseByline/EmbedByline.tsx +7 -7
  200. package/src/LicenseByline/LicenseLink.tsx +2 -2
  201. package/src/LinkBlock/LinkBlock.stories.tsx +1 -1
  202. package/src/LinkBlock/LinkBlock.tsx +2 -3
  203. package/src/LinkBlock/LinkBlockSection.tsx +1 -1
  204. package/src/Pitch/Pitch.stories.tsx +2 -2
  205. package/src/RelatedArticleList/RelatedArticleList.tsx +4 -4
  206. package/src/ResourceBox/ResourceBox.tsx +1 -1
  207. package/src/TagSelector/TagSelector.stories.tsx +2 -4
  208. package/src/TagSelector/TagSelector.tsx +7 -7
  209. package/src/ZendeskButton/ZendeskButton.tsx +1 -1
  210. package/src/i18n/useComponentTranslations.ts +1 -1
  211. package/src/index.ts +2 -18
  212. package/src/locale/messages-en.ts +1 -0
  213. package/src/locale/messages-nb.ts +1 -0
  214. package/src/locale/messages-nn.ts +1 -0
  215. package/src/locale/messages-se.ts +1 -0
  216. package/src/locale/messages-sma.ts +1 -0
  217. package/src/model/ContentType.ts +2 -0
  218. package/src/types.ts +1 -1
  219. package/es/ContentLoader/index.js +0 -82
  220. package/es/ContentTypeBadge/ContentTypeBadgeNew.js +0 -49
  221. package/es/ContentTypeBadge/index.js +0 -11
  222. package/lib/ContentLoader/index.d.ts +0 -16
  223. package/lib/ContentLoader/index.js +0 -88
  224. package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +0 -16
  225. package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +0 -57
  226. package/lib/ContentTypeBadge/index.d.ts +0 -10
  227. package/lib/ContentTypeBadge/index.js +0 -57
  228. package/src/ContentLoader/ContentLoader.stories.tsx +0 -62
  229. package/src/ContentLoader/index.tsx +0 -73
  230. package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +0 -70
  231. package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +0 -77
  232. package/src/ContentTypeBadge/index.ts +0 -21
@@ -6,12 +6,12 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from "react";
10
- import { Meta, StoryFn, StoryObj } from "@storybook/react";
9
+ import type { ReactNode } from "react";
10
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
11
11
  import { PageContent, Text } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
- import { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
14
- import { ImageEmbedData } from "@ndla/types-embed";
13
+ import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
14
+ import type { ImageEmbedData } from "@ndla/types-embed";
15
15
  import ImageEmbed from "./ImageEmbed";
16
16
  import { ArticleWrapper, ArticleContent } from "../Article";
17
17
  import { Grid } from "../Grid";
@@ -7,14 +7,14 @@
7
7
  */
8
8
 
9
9
  import parse from "html-react-parser";
10
- import { ReactNode, useMemo, useState } from "react";
10
+ import { type ReactNode, useMemo, useState } from "react";
11
11
  import { useTranslation } from "react-i18next";
12
- import { AddLine } from "@ndla/icons/action";
13
- import { Figure, FigureSize, FigureVariantProps, Image } from "@ndla/primitives";
12
+ import { AddLine } from "@ndla/icons";
13
+ import { Figure, type FigureSize, type FigureVariantProps, Image } from "@ndla/primitives";
14
14
  import { styled } from "@ndla/styled-system/jsx";
15
- import { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
15
+ import type { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
16
16
  import EmbedErrorPlaceholder from "./EmbedErrorPlaceholder";
17
- import { RenderContext } from "./types";
17
+ import type { RenderContext } from "./types";
18
18
  import { EmbedByline } from "../LicenseByline";
19
19
  import { licenseAttributes } from "../utils/licenseAttributes";
20
20
 
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ComponentPropsWithRef, KeyboardEvent, forwardRef, useCallback, useRef } from "react";
9
+ import { type ComponentPropsWithRef, type KeyboardEvent, forwardRef, useCallback, useRef } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
  import { composeRefs } from "@ndla/util";
12
12
 
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
- import { RelatedContentMetaData } from "@ndla/types-embed";
11
+ import type { RelatedContentMetaData } from "@ndla/types-embed";
12
12
  import RelatedContentEmbed from "./RelatedContentEmbed";
13
13
  import { ArticleWrapper, ArticleContent } from "../Article";
14
14
  import RelatedArticleList from "../RelatedArticleList";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { useTranslation } from "react-i18next";
10
- import { RelatedContentMetaData } from "@ndla/types-embed";
10
+ import type { RelatedContentMetaData } from "@ndla/types-embed";
11
11
  import { contentTypeMapping } from "../model/ContentType";
12
12
  import { RelatedArticle } from "../RelatedArticleList/RelatedArticleList";
13
13
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { useTranslation } from "react-i18next";
10
10
  import { Text } from "@ndla/primitives";
11
- import { MetaData } from "@ndla/types-embed";
11
+ import type { MetaData } from "@ndla/types-embed";
12
12
 
13
13
  interface Props {
14
14
  embed: MetaData<any, any>;
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { ExpandableBox, ExpandableBoxSummary, FramedContent, PageContent } from "@ndla/primitives";
11
- import { UuDisclaimerEmbedData } from "@ndla/types-embed";
11
+ import type { UuDisclaimerEmbedData } from "@ndla/types-embed";
12
12
  import H5pEmbed from "./H5pEmbed";
13
13
  import IframeEmbed from "./IframeEmbed";
14
14
  import UuDisclaimerEmbed from "./UuDisclaimerEmbed";
@@ -6,12 +6,12 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from "react";
10
- import { InformationLine } from "@ndla/icons/common";
9
+ import { type ReactNode } from "react";
10
+ import { InformationLine } from "@ndla/icons";
11
11
  import { MessageBox } from "@ndla/primitives";
12
12
  import { SafeLink } from "@ndla/safelink";
13
13
  import { styled } from "@ndla/styled-system/jsx";
14
- import { UuDisclaimerMetaData } from "@ndla/types-embed";
14
+ import type { UuDisclaimerMetaData } from "@ndla/types-embed";
15
15
 
16
16
  interface Props {
17
17
  embed: UuDisclaimerMetaData;
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ElementType } from "react";
10
- import { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
11
- import { EmbedMetaData } from "@ndla/types-embed";
9
+ import type { ElementType } from "react";
10
+ import type { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
11
+ import type { EmbedMetaData } from "@ndla/types-embed";
12
12
 
13
13
  export type HeartButtonType = ElementType<{
14
14
  embed: Extract<EmbedMetaData, { status: "success" }>;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
10
  import ErrorMessage from "./ErrorMessage";
11
11
  // @ts-expect-error - It exists.
12
12
  import Oops from "../../../../images/oops.gif";
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from "react";
9
+ import { type ReactNode } from "react";
10
10
  import { Text } from "@ndla/primitives";
11
11
  import { SafeLink } from "@ndla/safelink";
12
12
  import { styled } from "@ndla/styled-system/jsx";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { useTranslation } from "react-i18next";
10
- import { PresentationLine, LoginBoxLine } from "@ndla/icons/common";
10
+ import { PresentationLine, LoginBoxLine } from "@ndla/icons";
11
11
  import { Button } from "@ndla/primitives";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
13
  import ErrorMessage from "./ErrorMessage";
@@ -6,9 +6,18 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ComponentProps, ReactNode, forwardRef, useCallback, useEffect, useId, useMemo, useState } from "react";
9
+ import {
10
+ type ComponentProps,
11
+ type ReactNode,
12
+ forwardRef,
13
+ useCallback,
14
+ useEffect,
15
+ useId,
16
+ useMemo,
17
+ useState,
18
+ } from "react";
10
19
  import { useTranslation } from "react-i18next";
11
- import { ArrowDownShortLine } from "@ndla/icons/common";
20
+ import { ArrowDownShortLine } from "@ndla/icons";
12
21
  import { IconButton } from "@ndla/primitives";
13
22
  import { styled } from "@ndla/styled-system/jsx";
14
23
 
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryObj } from "@storybook/react";
10
10
  import { Button, Heading, UnOrderedList, OrderedList } from "@ndla/primitives";
11
11
  import FactBox from "./FactBox";
12
12
 
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ComponentPropsWithRef, forwardRef } from "react";
9
+ import { type ComponentPropsWithRef, forwardRef } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
- import { DownloadLine } from "@ndla/icons/common";
11
+ import { DownloadLine } from "@ndla/icons";
12
12
  import { Text } from "@ndla/primitives";
13
13
  import { SafeLink } from "@ndla/safelink";
14
14
  import { HStack, styled } from "@ndla/styled-system/jsx";
@@ -6,9 +6,8 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn, StoryObj } from "@storybook/react";
10
- import { PencilFill, DeleteBinLine } from "@ndla/icons/action";
11
- import { DragVertical } from "@ndla/icons/editor";
9
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
+ import { PencilFill, DeleteBinLine, Draggable } from "@ndla/icons";
12
11
  import { IconButton } from "@ndla/primitives";
13
12
  import { HStack, styled } from "@ndla/styled-system/jsx";
14
13
  import { File } from "./File";
@@ -151,7 +150,7 @@ export const FilesWithDragHandle: StoryObj<typeof File> = {
151
150
  <ul>
152
151
  <StyledFileListItem>
153
152
  <IconButton variant="clear">
154
- <DragVertical />
153
+ <Draggable />
155
154
  </IconButton>
156
155
  <File title="Fil 1" url="https://ndla.no/1" fileExists fileType="mp4" fileSize="100 mb" />
157
156
  </StyledFileListItem>
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ComponentPropsWithoutRef } from "react";
9
+ import { type ComponentPropsWithoutRef } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
11
  import { ark } from "@ark-ui/react";
12
12
  import { Heading } from "@ndla/primitives";
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryObj, StoryFn } from "@storybook/react";
9
+ import type { Meta, StoryObj, StoryFn } from "@storybook/react";
10
10
  import Gloss from "./Gloss";
11
11
  import GlossExample from "./GlossExample";
12
12
  import { wordClass } from "../model/WordClass";
@@ -9,7 +9,7 @@
9
9
  import { useMemo } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
11
  import { AccordionItemTrigger } from "@ark-ui/react";
12
- import { ArrowDownShortLine } from "@ndla/icons/common";
12
+ import { ArrowDownShortLine } from "@ndla/icons";
13
13
  import {
14
14
  AccordionItem,
15
15
  AccordionItemContent,
@@ -19,7 +19,7 @@ import {
19
19
  Text,
20
20
  } from "@ndla/primitives";
21
21
  import { styled } from "@ndla/styled-system/jsx";
22
- import { type StyledVariantProps } from "@ndla/styled-system/types";
22
+ import type { StyledVariantProps } from "@ndla/styled-system/types";
23
23
  import type { IGlossData, IGlossExample } from "@ndla/types-backend/concept-api";
24
24
  import GlossExample from "./GlossExample";
25
25
  import SpeechControl from "../AudioPlayer/SpeechControl";
@@ -9,7 +9,7 @@
9
9
  import { Fragment } from "react";
10
10
  import { Text } from "@ndla/primitives";
11
11
  import { styled } from "@ndla/styled-system/jsx";
12
- import { IGlossExample } from "@ndla/types-backend/concept-api";
12
+ import type { IGlossExample } from "@ndla/types-backend/concept-api";
13
13
 
14
14
  interface Props {
15
15
  examples: IGlossExample[];
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from "@storybook/react";
9
+ import type { Meta, StoryFn } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
11
  import { ArticleContent, ArticleWrapper } from "@ndla/ui";
12
12
  import { Grid } from "./Grid";
package/src/Grid/Grid.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from "react";
9
+ import { type ReactNode } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
 
12
12
  const GridContainer = styled("div", {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { HTMLAttributes } from "react";
9
+ import { type HTMLAttributes } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
 
12
12
  const StyledGridParallaxItem = styled("div", {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
10
  import KeyFigure from "./KeyFigure";
11
11
 
12
12
  const args = {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn, StoryObj } from "@storybook/react";
9
+ import type { Meta, StoryFn, StoryObj } from "@storybook/react";
10
10
  import { EmbedByline } from "./EmbedByline";
11
11
 
12
12
  export default {
@@ -6,17 +6,17 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Dispatch, ReactNode, SetStateAction, useState } from "react";
9
+ import { type Dispatch, type ReactNode, type SetStateAction, useState } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
- import { AlertLine } from "@ndla/icons/common";
11
+ import { AlertLine } from "@ndla/icons";
12
12
  import { getLicenseByAbbreviation, getLicenseCredits } from "@ndla/licenses";
13
13
  import { Button, Text } from "@ndla/primitives";
14
14
  import { styled } from "@ndla/styled-system/jsx";
15
- import { ICopyright as ArticleCopyright } from "@ndla/types-backend/article-api";
16
- import { ICopyright as AudioCopyright } from "@ndla/types-backend/audio-api";
17
- import { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
18
- import { ICopyright as ImageCopyright } from "@ndla/types-backend/image-api";
19
- import { BrightcoveCopyright } from "@ndla/types-embed";
15
+ import type { ICopyright as ArticleCopyright } from "@ndla/types-backend/article-api";
16
+ import type { ICopyright as AudioCopyright } from "@ndla/types-backend/audio-api";
17
+ import type { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
18
+ import type { ICopyright as ImageCopyright } from "@ndla/types-backend/image-api";
19
+ import type { BrightcoveCopyright } from "@ndla/types-embed";
20
20
  import { LicenseLink } from "./LicenseLink";
21
21
 
22
22
  interface BaseProps {
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import { forwardRef } from "react";
10
- import { LicenseLocaleType } from "@ndla/licenses";
11
- import { SafeLink, SafeLinkProps } from "@ndla/safelink";
10
+ import type { LicenseLocaleType } from "@ndla/licenses";
11
+ import { SafeLink, type SafeLinkProps } from "@ndla/safelink";
12
12
  import { styled } from "@ndla/styled-system/jsx";
13
13
 
14
14
  interface Props extends Omit<SafeLinkProps, "to"> {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryObj, StoryFn } from "@storybook/react";
9
+ import type { Meta, StoryObj, StoryFn } from "@storybook/react";
10
10
  import { LinkBlockSection } from ".";
11
11
  import LinkBlock from "./LinkBlock";
12
12
 
@@ -8,12 +8,11 @@
8
8
 
9
9
  import parse from "html-react-parser";
10
10
  import { useMemo } from "react";
11
- import { ArrowRightLine } from "@ndla/icons/common";
12
- import { CalendarLine } from "@ndla/icons/editor";
11
+ import { ArrowRightLine, CalendarLine } from "@ndla/icons";
13
12
  import { Heading } from "@ndla/primitives";
14
13
  import { SafeLink } from "@ndla/safelink";
15
14
  import { styled } from "@ndla/styled-system/jsx";
16
- import { LinkBlockEmbedData } from "@ndla/types-embed";
15
+ import type { LinkBlockEmbedData } from "@ndla/types-embed";
17
16
  import { getPossiblyRelativeUrl } from "../utils/relativeUrl";
18
17
 
19
18
  const InfoWrapper = styled("div", {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Children, HTMLAttributes, ReactNode } from "react";
9
+ import { Children, type HTMLAttributes, type ReactNode } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
 
12
12
  interface Props extends HTMLAttributes<HTMLElement> {
@@ -6,9 +6,9 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from "@storybook/react";
9
+ import type { Meta, StoryFn } from "@storybook/react";
10
10
  import { PageContent } from "@ndla/primitives";
11
- import { Pitch, Props } from "./Pitch";
11
+ import { Pitch, type Props } from "./Pitch";
12
12
  import { ArticleContent, ArticleWrapper } from "../Article";
13
13
  import { Grid } from "../Grid";
14
14
 
@@ -6,16 +6,16 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Children, ComponentPropsWithoutRef, ReactNode, useMemo, useState } from "react";
9
+ import { Children, type ComponentPropsWithoutRef, type ReactNode, useMemo, useState } from "react";
10
10
  import { useTranslation } from "react-i18next";
11
- import { ExternalLinkLine } from "@ndla/icons/common";
11
+ import { ExternalLinkLine } from "@ndla/icons";
12
12
  import { CardContent, CardHeading, CardRoot, Text, Heading, Button } from "@ndla/primitives";
13
13
  import { SafeLink } from "@ndla/safelink";
14
14
  import { styled } from "@ndla/styled-system/jsx";
15
15
  import { linkOverlay } from "@ndla/styled-system/patterns";
16
- import { ContentTypeBadge } from "../ContentTypeBadge/ContentTypeBadgeNew";
16
+ import { ContentTypeBadge } from "../ContentTypeBadge/ContentTypeBadge";
17
17
  import { contentTypes } from "../model/ContentType";
18
- import { HeadingLevel } from "../types";
18
+ import type { HeadingLevel } from "../types";
19
19
 
20
20
  interface RelatedArticleProps {
21
21
  title: string;
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { breakpoints } from "@ndla/core";
10
- import { ShareBoxLine } from "@ndla/icons/common";
10
+ import { ShareBoxLine } from "@ndla/icons";
11
11
  import { Heading, Image, Text } from "@ndla/primitives";
12
12
  import { SafeLinkButton } from "@ndla/safelink";
13
13
  import { styled } from "@ndla/styled-system/jsx";
@@ -9,10 +9,8 @@
9
9
  import { useState } from "react";
10
10
  import { type ComboboxInputValueChangeDetails, createListCollection } from "@ark-ui/react";
11
11
 
12
- import { Meta, StoryFn } from "@storybook/react";
13
- import { CloseLine } from "@ndla/icons/action";
14
- import { ArrowDownShortLine } from "@ndla/icons/common";
15
- import { CheckLine } from "@ndla/icons/editor";
12
+ import type { Meta, StoryFn } from "@storybook/react";
13
+ import { CloseLine, ArrowDownShortLine, CheckLine } from "@ndla/icons";
16
14
  import {
17
15
  ComboboxContent,
18
16
  ComboboxItem,
@@ -8,27 +8,27 @@
8
8
 
9
9
  import { forwardRef, useEffect, useId, useRef } from "react";
10
10
  import { type CollectionItem, useTagsInputContext, useComboboxContext } from "@ark-ui/react";
11
- import { CloseLine } from "@ndla/icons/action";
11
+ import { CloseLine } from "@ndla/icons";
12
12
  import {
13
13
  ComboboxClearTrigger,
14
14
  ComboboxControl,
15
- ComboboxControlProps,
15
+ type ComboboxControlProps,
16
16
  ComboboxInput,
17
- ComboboxInputProps,
17
+ type ComboboxInputProps,
18
18
  ComboboxLabel,
19
19
  ComboboxRoot,
20
- ComboboxRootProps,
20
+ type ComboboxRootProps,
21
21
  ComboboxTrigger,
22
22
  TagsInputControl,
23
- TagsInputControlProps,
23
+ type TagsInputControlProps,
24
24
  TagsInputInput,
25
- TagsInputInputProps,
25
+ type TagsInputInputProps,
26
26
  TagsInputItem,
27
27
  TagsInputItemDeleteTrigger,
28
28
  TagsInputItemPreview,
29
29
  TagsInputItemText,
30
30
  TagsInputRoot,
31
- TagsInputRootProps,
31
+ type TagsInputRootProps,
32
32
  TagsInputItemInput,
33
33
  } from "@ndla/primitives";
34
34
  import { contains } from "@ndla/util";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { forwardRef, useState } from "react";
10
- import { Button, ButtonProps } from "@ndla/primitives";
10
+ import { Button, type ButtonProps } from "@ndla/primitives";
11
11
 
12
12
  // TODO: Let's consider abandoning `disabled` on the button here. It should instead just open/close the widget based on its current state.
13
13
 
@@ -9,7 +9,7 @@
9
9
  import { useTranslation } from "react-i18next";
10
10
  import type { CollectionItem } from "@ark-ui/react";
11
11
  import type { ComboboxRootProps, PaginationRootProps, TagsInputRootProps } from "@ndla/primitives";
12
- import { TagSelectorRootProps } from "../TagSelector/TagSelector";
12
+ import { type TagSelectorRootProps } from "../TagSelector/TagSelector";
13
13
 
14
14
  type DeepPartial<T> = {
15
15
  [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
package/src/index.ts CHANGED
@@ -54,8 +54,6 @@ export {
54
54
 
55
55
  export { getPossiblyRelativeUrl } from "./utils/relativeUrl";
56
56
 
57
- export { default as ContentLoader } from "./ContentLoader";
58
-
59
57
  export { default as RelatedArticleList, RelatedArticle } from "./RelatedArticleList";
60
58
 
61
59
  export { ErrorResourceAccessDenied, default as ErrorMessage } from "./ErrorMessage";
@@ -94,22 +92,8 @@ export {
94
92
  useVideoSearchTranslations,
95
93
  } from "./i18n";
96
94
 
97
- export {
98
- default as ContentTypeBadge,
99
- SubjectMaterialBadge,
100
- TasksAndActivitiesBadge,
101
- AssessmentResourcesBadge,
102
- LearningPathBadge,
103
- SubjectBadge,
104
- SourceMaterialBadge,
105
- ConceptBadge,
106
- } from "./ContentTypeBadge";
107
-
108
- export type { ContentTypeBadgeProps, StrictContentType, ContentType } from "./ContentTypeBadge/ContentTypeBadgeNew";
109
- export {
110
- ContentTypeBadge as ContentTypeBadgeNew,
111
- contentTypeToBadgeVariantMap,
112
- } from "./ContentTypeBadge/ContentTypeBadgeNew";
95
+ export type { ContentTypeBadgeProps, StrictContentType, ContentType } from "./ContentTypeBadge/ContentTypeBadge";
96
+ export { ContentTypeBadge, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadge";
113
97
 
114
98
  export { ContentTypeBlockQuote } from "./ContentTypeBlockQuote/ContentTypeBlockQuote";
115
99
  export { type ContentTypeBlockQuoteVariant } from "./ContentTypeBlockQuote/ContentTypeBlockQuote";
@@ -584,6 +584,7 @@ const messages = {
584
584
  gloss: "Gloss",
585
585
  programme: "Programme",
586
586
  "podcast-series": "Podcast series",
587
+ "frontpage-article": "About NDLA article",
587
588
  },
588
589
  modal: {
589
590
  closeModal: "Close",
@@ -585,6 +585,7 @@ const messages = {
585
585
  gloss: "Glose",
586
586
  programme: "Programfag",
587
587
  "podcast-series": "Podkast-serie",
588
+ "frontpage-article": "Om NDLA-artikkel",
588
589
  },
589
590
  modal: {
590
591
  closeModal: "Lukk",
@@ -585,6 +585,7 @@ const messages = {
585
585
  gloss: "Glose",
586
586
  programme: "Programfag",
587
587
  "podcast-series": "Podkast-serie",
588
+ "frontpage-article": "Om NDLA-artikkel",
588
589
  },
589
590
  modal: {
590
591
  closeModal: "Lukk",
@@ -586,6 +586,7 @@ const messages = {
586
586
  gloss: "Glose",
587
587
  programme: "Programfag",
588
588
  "podcast-series": "Podkast-serie",
589
+ "frontpage-article": "Om NDLA-artikkel",
589
590
  },
590
591
  modal: {
591
592
  closeModal: "Govčča",
@@ -588,6 +588,7 @@ const messages = {
588
588
  gloss: "Glose",
589
589
  programme: "Programfag",
590
590
  "podcast-series": "Podkast-serie",
591
+ "frontpage-article": "Om NDLA-artikkel",
591
592
  },
592
593
  modal: {
593
594
  closeModal: "Dahph",
@@ -24,6 +24,7 @@ export const PODCAST = "podcast";
24
24
  export const GLOSS = "gloss";
25
25
  export const PROGRAMME = "programme";
26
26
  export const PODCAST_SERIES = "podcast-series";
27
+ export const FRONTPAGE_ARTICLE = "frontpage-article";
27
28
 
28
29
  export const contentTypes = {
29
30
  SUBJECT_MATERIAL,
@@ -57,6 +58,7 @@ export const contentTypeMapping: Record<string, string> = {
57
58
  [RESOURCE_TYPE_CONCEPT]: CONCEPT,
58
59
  [MULTIDISCIPLINARY]: MULTIDISCIPLINARY,
59
60
  [TOPIC]: TOPIC,
61
+ [FRONTPAGE_ARTICLE]: FRONTPAGE_ARTICLE,
60
62
  default: SUBJECT_MATERIAL,
61
63
  };
62
64
 
package/src/types.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from "react";
9
+ import { type ReactNode } from "react";
10
10
 
11
11
  export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
12
12