@ndla/ui 54.0.2 → 54.0.4

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 (164) hide show
  1. package/es/Article/Article.js +10 -9
  2. package/es/BlogPost/BlogPost.js +5 -4
  3. package/es/CampaignBlock/CampaignBlock.js +7 -6
  4. package/es/ContactBlock/ContactBlock.js +15 -13
  5. package/es/ContentTypeBadge/ContentTypeBadge.js +7 -6
  6. package/es/Embed/ImageEmbed.js +33 -21
  7. package/es/Embed/conceptComponents.js +10 -9
  8. package/es/FactBox/FactBox.js +7 -6
  9. package/es/Figure/Figure.js +11 -10
  10. package/es/Layout/LayoutItem.js +3 -2
  11. package/es/Layout/OneColumn.js +4 -2
  12. package/es/Layout/PageContainer.js +4 -2
  13. package/es/Logo/Logo.js +4 -3
  14. package/es/Notion/NotionImage.js +4 -3
  15. package/es/Resource/BlockResource.js +7 -6
  16. package/es/Resource/ListResource.js +7 -6
  17. package/es/Search/ContentTypeResult.js +2 -1
  18. package/es/Search/SearchResultSleeve.js +9 -8
  19. package/es/Table/Table.js +7 -6
  20. package/es/TagSelector/DropdownIndicator.js +2 -1
  21. package/es/TagSelector/Input.js +2 -1
  22. package/es/TagSelector/Menu.js +2 -1
  23. package/es/TagSelector/Option.js +4 -2
  24. package/es/TagSelector/ValueButton.js +3 -1
  25. package/lib/Article/Article.d.ts +1 -0
  26. package/lib/Article/Article.js +10 -10
  27. package/lib/Article/ArticleByline.d.ts +1 -1
  28. package/lib/Article/ArticleFootNotes.d.ts +1 -1
  29. package/lib/Article/ArticleHeaderWrapper.d.ts +1 -1
  30. package/lib/Article/ArticleParagraph.d.ts +1 -1
  31. package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
  32. package/lib/AudioPlayer/Controls.d.ts +1 -1
  33. package/lib/AudioPlayer/SpeechControl.d.ts +1 -1
  34. package/lib/BlogPost/BlogPost.js +6 -4
  35. package/lib/Breadcrumb/Breadcrumb.d.ts +1 -1
  36. package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -1
  37. package/lib/CampaignBlock/CampaignBlock.js +7 -7
  38. package/lib/CodeBlock/CodeBlock.d.ts +1 -1
  39. package/lib/ContactBlock/ContactBlock.js +14 -14
  40. package/lib/ContentLoader/index.d.ts +1 -1
  41. package/lib/ContentPlaceholder/ContentPlaceholder.d.ts +1 -1
  42. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +1 -0
  43. package/lib/ContentTypeBadge/ContentTypeBadge.js +7 -7
  44. package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -1
  45. package/lib/CreatedBy/CreatedBy.d.ts +1 -1
  46. package/lib/Embed/AudioEmbed.d.ts +1 -1
  47. package/lib/Embed/BrightcoveEmbed.d.ts +1 -1
  48. package/lib/Embed/CodeEmbed.d.ts +1 -1
  49. package/lib/Embed/ConceptEmbed.d.ts +2 -2
  50. package/lib/Embed/ConceptListEmbed.d.ts +1 -1
  51. package/lib/Embed/ContentLinkEmbed.d.ts +1 -1
  52. package/lib/Embed/CopyrightEmbed.d.ts +1 -1
  53. package/lib/Embed/EmbedErrorPlaceholder.d.ts +1 -1
  54. package/lib/Embed/ExternalEmbed.d.ts +1 -1
  55. package/lib/Embed/FootnoteEmbed.d.ts +1 -1
  56. package/lib/Embed/H5pEmbed.d.ts +1 -1
  57. package/lib/Embed/IframeEmbed.d.ts +1 -1
  58. package/lib/Embed/ImageEmbed.js +34 -21
  59. package/lib/Embed/RelatedContentEmbed.d.ts +1 -1
  60. package/lib/Embed/UnknownEmbed.d.ts +1 -1
  61. package/lib/Embed/UuDisclaimerEmbed.d.ts +1 -1
  62. package/lib/Embed/conceptComponents.d.ts +1 -0
  63. package/lib/Embed/conceptComponents.js +11 -9
  64. package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
  65. package/lib/ErrorMessage/ErrorResourceAccessDenied.d.ts +1 -1
  66. package/lib/ExpandableBox/ExpandableBox.d.ts +2 -2
  67. package/lib/FactBox/FactBox.d.ts +1 -0
  68. package/lib/FactBox/FactBox.js +7 -7
  69. package/lib/Figure/Figure.d.ts +1 -0
  70. package/lib/Figure/Figure.js +12 -10
  71. package/lib/FileList/File.d.ts +1 -1
  72. package/lib/FileList/FileList.d.ts +1 -1
  73. package/lib/FileList/Format.d.ts +1 -1
  74. package/lib/FileList/PdfFile.d.ts +1 -1
  75. package/lib/FrontpageArticle/FrontpageArticle.d.ts +1 -1
  76. package/lib/Gloss/Gloss.d.ts +1 -1
  77. package/lib/Gloss/GlossExample.d.ts +1 -1
  78. package/lib/Grid/Grid.d.ts +2 -2
  79. package/lib/Hero/Hero.d.ts +8 -8
  80. package/lib/Image/Image.d.ts +1 -1
  81. package/lib/Image/ImageLink.d.ts +1 -1
  82. package/lib/KeyFigure/KeyFigure.d.ts +1 -1
  83. package/lib/LanguageSelector/LanguageSelector.d.ts +1 -1
  84. package/lib/Layout/LayoutItem.d.ts +1 -0
  85. package/lib/Layout/LayoutItem.js +3 -3
  86. package/lib/Layout/OneColumn.d.ts +1 -0
  87. package/lib/Layout/OneColumn.js +3 -3
  88. package/lib/Layout/PageContainer.d.ts +1 -0
  89. package/lib/Layout/PageContainer.js +3 -3
  90. package/lib/LetterFilter/LetterFilter.d.ts +1 -1
  91. package/lib/LicenseByline/EmbedByline.d.ts +1 -1
  92. package/lib/LicenseByline/LicenseDescription.d.ts +1 -1
  93. package/lib/LicenseByline/LicenseLink.d.ts +1 -1
  94. package/lib/LinkBlock/LinkBlock.d.ts +1 -1
  95. package/lib/LinkBlock/LinkBlockSection.d.ts +1 -1
  96. package/lib/Logo/Logo.js +4 -4
  97. package/lib/Logo/SvgLogo.d.ts +1 -1
  98. package/lib/MediaList/MediaList.d.ts +7 -7
  99. package/lib/Messages/MessageBanner.d.ts +1 -1
  100. package/lib/Messages/MessageBox.d.ts +1 -1
  101. package/lib/MyNdla/Resource/Folder.d.ts +1 -1
  102. package/lib/Notion/Notion.d.ts +1 -1
  103. package/lib/Notion/NotionImage.js +5 -3
  104. package/lib/ProgrammeCard/ProgrammeCard.d.ts +1 -1
  105. package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
  106. package/lib/Resource/BlockResource.d.ts +1 -0
  107. package/lib/Resource/BlockResource.js +7 -7
  108. package/lib/Resource/ListResource.d.ts +1 -0
  109. package/lib/Resource/ListResource.js +7 -7
  110. package/lib/Resource/resourceComponents.d.ts +4 -4
  111. package/lib/Resource/storyComponents.d.ts +1 -1
  112. package/lib/ResourceBox/ResourceBox.d.ts +1 -1
  113. package/lib/Search/ActiveFilters.d.ts +1 -1
  114. package/lib/Search/ContentTypeResult.js +3 -1
  115. package/lib/Search/LoadingWrapper.d.ts +1 -1
  116. package/lib/Search/SearchField.d.ts +1 -1
  117. package/lib/Search/SearchFieldForm.d.ts +1 -1
  118. package/lib/Search/SearchResult.d.ts +2 -2
  119. package/lib/Search/SearchResultSleeve.js +10 -8
  120. package/lib/SnackBar/DefaultSnackbar.d.ts +1 -1
  121. package/lib/SnackBar/SnackbarProvider.d.ts +2 -2
  122. package/lib/Table/Table.js +7 -7
  123. package/lib/TagSelector/Control.d.ts +1 -1
  124. package/lib/TagSelector/DropdownIndicator.js +2 -2
  125. package/lib/TagSelector/Input.d.ts +1 -0
  126. package/lib/TagSelector/Input.js +3 -1
  127. package/lib/TagSelector/Menu.d.ts +1 -0
  128. package/lib/TagSelector/Menu.js +3 -1
  129. package/lib/TagSelector/MenuList.d.ts +1 -1
  130. package/lib/TagSelector/Option.d.ts +1 -0
  131. package/lib/TagSelector/Option.js +4 -2
  132. package/lib/TagSelector/SelectContainer.d.ts +1 -1
  133. package/lib/TagSelector/TagSelector.d.ts +1 -1
  134. package/lib/TagSelector/ValueButton.d.ts +1 -0
  135. package/lib/TagSelector/ValueButton.js +3 -1
  136. package/lib/TreeStructure/AddFolderButton.d.ts +1 -1
  137. package/lib/TreeStructure/FolderItem.d.ts +1 -1
  138. package/lib/TreeStructure/FolderItems.d.ts +1 -1
  139. package/lib/TreeStructure/TreeStructure.d.ts +1 -1
  140. package/package.json +11 -11
  141. package/src/Article/Article.tsx +1 -0
  142. package/src/BlogPost/BlogPost.tsx +1 -0
  143. package/src/CampaignBlock/CampaignBlock.tsx +1 -0
  144. package/src/ContactBlock/ContactBlock.tsx +1 -0
  145. package/src/ContentTypeBadge/ContentTypeBadge.tsx +1 -0
  146. package/src/Embed/ImageEmbed.tsx +30 -17
  147. package/src/Embed/conceptComponents.tsx +1 -0
  148. package/src/FactBox/FactBox.tsx +1 -0
  149. package/src/Figure/Figure.tsx +1 -0
  150. package/src/Layout/LayoutItem.tsx +1 -0
  151. package/src/Layout/OneColumn.tsx +1 -0
  152. package/src/Layout/PageContainer.tsx +1 -0
  153. package/src/Logo/Logo.tsx +1 -0
  154. package/src/Notion/NotionImage.tsx +1 -0
  155. package/src/Resource/BlockResource.tsx +1 -0
  156. package/src/Resource/ListResource.tsx +1 -0
  157. package/src/Search/ContentTypeResult.tsx +1 -0
  158. package/src/Search/SearchResultSleeve.tsx +1 -0
  159. package/src/Table/Table.tsx +1 -0
  160. package/src/TagSelector/DropdownIndicator.tsx +1 -0
  161. package/src/TagSelector/Input.tsx +1 -0
  162. package/src/TagSelector/Menu.tsx +1 -0
  163. package/src/TagSelector/Option.tsx +1 -0
  164. package/src/TagSelector/ValueButton.tsx +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "54.0.2",
3
+ "version": "54.0.4",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,17 +31,17 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^4.0.3",
35
- "@ndla/button": "^13.0.3",
34
+ "@ndla/accordion": "^4.0.5",
35
+ "@ndla/button": "^13.0.5",
36
36
  "@ndla/core": "^5.0.1",
37
37
  "@ndla/dropdown-menu": "^1.0.38",
38
- "@ndla/forms": "^8.0.3",
38
+ "@ndla/forms": "^8.0.5",
39
39
  "@ndla/hooks": "^2.1.7",
40
- "@ndla/icons": "^6.1.6",
40
+ "@ndla/icons": "^6.1.8",
41
41
  "@ndla/licenses": "^7.2.6",
42
- "@ndla/modal": "^6.0.2",
43
- "@ndla/notion": "^7.0.2",
44
- "@ndla/safelink": "^5.1.6",
42
+ "@ndla/modal": "^6.0.4",
43
+ "@ndla/notion": "^7.0.4",
44
+ "@ndla/safelink": "^5.1.8",
45
45
  "@ndla/tooltip": "^8.0.1",
46
46
  "@ndla/typography": "^0.4.22",
47
47
  "@ndla/util": "^4.0.4",
@@ -66,8 +66,8 @@
66
66
  "react-router-dom": "> 6.0.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@ndla/types-backend": "^0.2.82",
70
- "@ndla/types-embed": "^4.1.7",
69
+ "@ndla/types-backend": "^0.2.86",
70
+ "@ndla/types-embed": "^4.1.8",
71
71
  "css-loader": "^6.7.3",
72
72
  "mini-css-extract-plugin": "^2.7.5",
73
73
  "sass-loader": "^13.2.2",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "84069e3b3a58e43981a00f31520ff0e9919beb3f"
80
+ "gitHead": "c3c7ec99f9fa1bcd8e6d6f0c96d77f59773323cc"
81
81
  }
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ReactNode, forwardRef, ComponentPropsWithRef, useMemo, CSSProperties } from "react";
10
11
  import { SerializedStyles, css } from "@emotion/react";
11
12
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import parse from "html-react-parser";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { css } from "@emotion/react";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import parse from "html-react-parser";
10
11
  import { css } from "@emotion/react";
11
12
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ReactNode } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { css } from "@emotion/react";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { CSSProperties, ComponentProps, useMemo } from "react";
10
11
 
11
12
  import { css } from "@emotion/react";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import parse from "html-react-parser";
10
11
  import { MouseEventHandler, ReactNode, useMemo, useState } from "react";
11
12
  import { useTranslation } from "react-i18next";
@@ -141,8 +142,13 @@ const ImageEmbed = ({
141
142
  renderContext = "article",
142
143
  children,
143
144
  }: Props) => {
144
- const [isBylineHidden, setIsBylineHidden] = useState(hideByline(embed.embedData.size));
145
+ const [isBylineHidden, setIsBylineHidden] = useState(hideByline(embed.embedData));
145
146
  const [imageSizes, setImageSizes] = useState<string | undefined>(undefined);
147
+ // Full-size figures automatically get a margin of {spacing.normal} on its y-axis if a float is not set (or if float is an empty string).
148
+ // This adds some margin to normal figures within an article, but should not happen for figures in a grid.
149
+ const [floatAttr, setFloatAttr] = useState<{ "data-float"?: string }>(() =>
150
+ inGrid && !embed.embedData.align ? {} : { "data-float": embed.embedData.align },
151
+ );
146
152
 
147
153
  const parsedDescription = useMemo(() => {
148
154
  if (embed.embedData.caption || renderContext === "article") {
@@ -161,10 +167,6 @@ const ImageEmbed = ({
161
167
 
162
168
  const { data, embedData } = embed;
163
169
 
164
- // Full-size figures automatically get a margin of {spacing.normal} on its y-axis if a float is not set (or if float is an empty string).
165
- // This adds some margin to normal figures within an article, but should not happen for figures in a grid.
166
- const floatAttr = inGrid && !embedData.align ? {} : { "data-float": embedData.align };
167
-
168
170
  const altText = embedData.alt || "";
169
171
 
170
172
  const figureType = getFigureType(embedData.size, embedData.align);
@@ -181,7 +183,7 @@ const ImageEmbed = ({
181
183
  <ImageWrapper
182
184
  src={!isCopyrighted ? canonicalUrl?.(data) : undefined}
183
185
  crop={crop}
184
- size={embedData.size}
186
+ embedData={embedData}
185
187
  pagePath={path}
186
188
  >
187
189
  <Image
@@ -194,10 +196,20 @@ const ImageEmbed = ({
194
196
  border={embedData.border}
195
197
  expandButton={
196
198
  <ExpandButton
197
- size={embedData.size}
199
+ embedData={embedData}
198
200
  expanded={!!imageSizes}
199
201
  bylineHidden={isBylineHidden}
200
- onExpand={() => setImageSizes((p) => (p ? undefined : expandedSizes))}
202
+ onExpand={() => {
203
+ if (!imageSizes) {
204
+ setImageSizes(expandedSizes);
205
+ setTimeout(() => {
206
+ setFloatAttr({});
207
+ }, 400); //Removing the float parameter too quickly causes the image to be resized from left regardless
208
+ } else {
209
+ setImageSizes(undefined);
210
+ setFloatAttr({ "data-float": embedData.align });
211
+ }
212
+ }}
201
213
  onHideByline={() => setIsBylineHidden((p) => !p)}
202
214
  />
203
215
  }
@@ -235,15 +247,16 @@ interface ImageWrapperProps {
235
247
  endX: number;
236
248
  endY: number;
237
249
  };
238
- size?: string;
250
+ embedData: ImageEmbedData;
239
251
  }
240
- const hideByline = (size?: string): boolean => {
241
- return !!size && size.endsWith("-hide-byline");
252
+
253
+ const hideByline = (embed: ImageEmbedData): boolean => {
254
+ return (!!embed.size && embed.size.endsWith("-hide-byline")) || embed.hideByline === "true";
242
255
  };
243
256
 
244
- const ImageWrapper = ({ src, crop, size, children, pagePath }: ImageWrapperProps) => {
257
+ const ImageWrapper = ({ src, crop, children, pagePath, embedData }: ImageWrapperProps) => {
245
258
  const { t } = useTranslation();
246
- if (isSmall(size) || hideByline(size) || !src || (pagePath && src.endsWith(pagePath))) {
259
+ if (isSmall(embedData.size) || hideByline(embedData) || !src || (pagePath && src.endsWith(pagePath))) {
247
260
  return <>{children}</>;
248
261
  }
249
262
 
@@ -256,7 +269,7 @@ const ImageWrapper = ({ src, crop, size, children, pagePath }: ImageWrapperProps
256
269
  };
257
270
 
258
271
  interface ExpandButtonProps {
259
- size?: string;
272
+ embedData: ImageEmbedData;
260
273
  expanded: boolean;
261
274
  bylineHidden: boolean;
262
275
  onExpand: MouseEventHandler<HTMLButtonElement>;
@@ -282,9 +295,9 @@ const BylineButton = styled.button`
282
295
  }
283
296
  `;
284
297
 
285
- const ExpandButton = ({ size, expanded, bylineHidden, onExpand, onHideByline }: ExpandButtonProps) => {
298
+ const ExpandButton = ({ embedData, expanded, bylineHidden, onExpand, onHideByline }: ExpandButtonProps) => {
286
299
  const { t } = useTranslation();
287
- if (isSmall(size)) {
300
+ if (isSmall(embedData.size)) {
288
301
  return (
289
302
  <button
290
303
  type="button"
@@ -297,7 +310,7 @@ const ExpandButton = ({ size, expanded, bylineHidden, onExpand, onHideByline }:
297
310
  </button>
298
311
  );
299
312
  }
300
- if (hideByline(size)) {
313
+ if (hideByline(embedData)) {
301
314
  return (
302
315
  <BylineButton
303
316
  type="button"
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { forwardRef, ReactNode, RefAttributes } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { css } from "@emotion/react";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ComponentProps, ReactNode, forwardRef, useCallback, useEffect, useState } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { css } from "@emotion/react";
@@ -8,6 +8,7 @@
8
8
 
9
9
  // N.B These components is used to render static markup serverside
10
10
 
11
+ /** @jsxImportSource @emotion/react */
11
12
  import { ComponentPropsWithRef, forwardRef, useMemo } from "react";
12
13
  import { SerializedStyles, css } from "@emotion/react";
13
14
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { HTMLAttributes, ReactNode, useMemo } from "react";
10
11
  import { css } from "@emotion/react";
11
12
  import { mq, breakpoints } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ComponentPropsWithoutRef } from "react";
10
11
  import { css } from "@emotion/react";
11
12
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ComponentPropsWithoutRef } from "react";
10
11
  import { css } from "@emotion/react";
11
12
  import styled from "@emotion/styled";
package/src/Logo/Logo.tsx CHANGED
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { useMemo } from "react";
10
11
  import { SerializedStyles, css } from "@emotion/react";
11
12
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { useTranslation } from "react-i18next";
10
11
  import styled from "@emotion/styled";
11
12
  import { animations, breakpoints, colors, mq, spacing } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ReactNode, useMemo } from "react";
10
11
  import styled from "@emotion/styled";
11
12
  import { colors, spacing, stackOrder } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ReactNode, useMemo } from "react";
10
11
  import styled from "@emotion/styled";
11
12
  import { spacing, colors, breakpoints, mq, stackOrder } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { ReactElement, useEffect, useRef, useState } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { ButtonV2 } from "@ndla/button";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { useEffect, useRef, useState } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import styled from "@emotion/styled";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import throttle from "lodash.throttle";
10
11
  import { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from "react";
11
12
  import { css } from "@emotion/react";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { useMemo } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  import { DropdownIndicatorProps, components } from "react-select";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { components, InputProps } from "react-select";
10
11
  import { css } from "@emotion/react";
11
12
  import { colors, spacing } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { MenuProps, components } from "react-select";
10
11
  import { css } from "@emotion/react";
11
12
  import { colors } from "@ndla/core";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { OptionProps } from "react-select";
10
11
  import styled from "@emotion/styled";
11
12
  import { buttonStyleV2 as buttonStyle } from "@ndla/button";
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /** @jsxImportSource @emotion/react */
9
10
  import { MultiValueProps } from "react-select";
10
11
  import styled from "@emotion/styled";
11
12
  import { buttonStyleV2 as buttonStyle } from "@ndla/button";