@ndla/ui 56.0.22-alpha.0 → 56.0.24-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 (53) hide show
  1. package/dist/panda.buildinfo.json +7 -7
  2. package/dist/styles.css +22 -22
  3. package/es/AudioPlayer/Controls.js +16 -5
  4. package/es/Embed/ConceptEmbed.js +2 -0
  5. package/es/Embed/EmbedErrorPlaceholder.js +1 -0
  6. package/es/Embed/GlossEmbed.js +9 -6
  7. package/es/Embed/ImageEmbed.js +5 -4
  8. package/es/Embed/InlineTriggerButton.js +1 -1
  9. package/es/KeyFigure/KeyFigure.js +2 -1
  10. package/es/ResourceBox/ResourceBox.js +2 -1
  11. package/es/i18n/useComponentTranslations.js +18 -0
  12. package/es/locale/messages-en.js +12 -2
  13. package/es/locale/messages-nb.js +10 -0
  14. package/es/locale/messages-nn.js +10 -0
  15. package/es/locale/messages-se.js +10 -0
  16. package/es/locale/messages-sma.js +10 -0
  17. package/es/styles.css +22 -22
  18. package/lib/AudioPlayer/Controls.js +16 -5
  19. package/lib/Embed/ConceptEmbed.js +2 -0
  20. package/lib/Embed/EmbedErrorPlaceholder.js +1 -0
  21. package/lib/Embed/GlossEmbed.js +9 -6
  22. package/lib/Embed/ImageEmbed.js +5 -4
  23. package/lib/Embed/InlineTriggerButton.js +1 -1
  24. package/lib/KeyFigure/KeyFigure.js +2 -1
  25. package/lib/ResourceBox/ResourceBox.js +2 -1
  26. package/lib/i18n/useComponentTranslations.d.ts +13 -2
  27. package/lib/i18n/useComponentTranslations.js +21 -2
  28. package/lib/locale/messages-en.d.ts +10 -0
  29. package/lib/locale/messages-en.js +12 -2
  30. package/lib/locale/messages-nb.d.ts +10 -0
  31. package/lib/locale/messages-nb.js +10 -0
  32. package/lib/locale/messages-nn.d.ts +10 -0
  33. package/lib/locale/messages-nn.js +10 -0
  34. package/lib/locale/messages-se.d.ts +10 -0
  35. package/lib/locale/messages-se.js +10 -0
  36. package/lib/locale/messages-sma.d.ts +10 -0
  37. package/lib/locale/messages-sma.js +10 -0
  38. package/lib/styles.css +22 -22
  39. package/package.json +8 -8
  40. package/src/AudioPlayer/Controls.tsx +20 -7
  41. package/src/Embed/ConceptEmbed.tsx +9 -2
  42. package/src/Embed/EmbedErrorPlaceholder.tsx +1 -0
  43. package/src/Embed/GlossEmbed.tsx +8 -5
  44. package/src/Embed/ImageEmbed.tsx +4 -3
  45. package/src/Embed/InlineTriggerButton.tsx +1 -1
  46. package/src/KeyFigure/KeyFigure.tsx +1 -0
  47. package/src/ResourceBox/ResourceBox.tsx +1 -0
  48. package/src/i18n/useComponentTranslations.ts +28 -2
  49. package/src/locale/messages-en.ts +12 -2
  50. package/src/locale/messages-nb.ts +10 -0
  51. package/src/locale/messages-nn.ts +10 -0
  52. package/src/locale/messages-se.ts +10 -0
  53. package/src/locale/messages-sma.ts +10 -0
@@ -84,7 +84,17 @@ interface AudioSearchTranslations {
84
84
  paginationTranslations: PaginationRootProps["translations"];
85
85
  }
86
86
 
87
- export interface PreviewTranslations {
87
+ interface VideoTranslations {
88
+ searchPlaceholder: string;
89
+ searchButtonTitle: string;
90
+ loadMoreVideos: string;
91
+ noResults: string;
92
+ is360Video: string;
93
+ previewVideo: string;
94
+ addVideo: string;
95
+ close: string;
96
+ }
97
+ interface PreviewTranslations {
88
98
  creatorsLabel: string;
89
99
  license: string;
90
100
  caption: string;
@@ -97,7 +107,7 @@ export interface PreviewTranslations {
97
107
  useImageTitle: string;
98
108
  }
99
109
 
100
- export interface ImageSearchTranslations {
110
+ interface ImageSearchTranslations {
101
111
  searchPlaceholder: string;
102
112
  searchButtonTitle: string;
103
113
  imagePreview: PreviewTranslations;
@@ -149,3 +159,19 @@ export const useAudioSearchTranslations = (
149
159
  ...remaining,
150
160
  };
151
161
  };
162
+
163
+ export const useVideoSearchTranslations = (translations?: Partial<VideoTranslations>): VideoTranslations => {
164
+ const { t } = useTranslation("translation", { keyPrefix: "component.videoSearch" });
165
+
166
+ return {
167
+ searchPlaceholder: t("searchPlaceholder"),
168
+ searchButtonTitle: t("searchButtonTitle"),
169
+ loadMoreVideos: t("loadMoreVideos"),
170
+ noResults: t("noResults"),
171
+ is360Video: t("is360Video"),
172
+ previewVideo: t("previewVideo"),
173
+ addVideo: t("addVideo"),
174
+ close: t("close"),
175
+ ...translations,
176
+ };
177
+ };
@@ -263,8 +263,8 @@ const messages = {
263
263
  activateAdditionalResources: "Show additional content",
264
264
  toggleFilterLabel: "Show additional content",
265
265
  label: "Learning content",
266
- tooltipCoreTopic: "Core content is a subject that is on the curriculum",
267
- tooltipAdditionalTopic: "Additional content is a subject that is not on the curriculum",
266
+ tooltipCoreTopic: "Core content",
267
+ tooltipAdditionalTopic: "Additional content",
268
268
  additionalTooltip: "Additional content is not on the curriculum",
269
269
  dialogTooltip: "What is core content and additional content?",
270
270
  dialogHeading: "Core content and additional content",
@@ -1526,6 +1526,16 @@ const messages = {
1526
1526
  useAudio: "Chose audio",
1527
1527
  noResults: "No audio files found",
1528
1528
  },
1529
+ videoSearch: {
1530
+ searchPlaceholder: "Search videos",
1531
+ searchButtonTitle: "Search",
1532
+ loadMoreVideos: "Load more videos",
1533
+ noResults: "No videos found",
1534
+ addVideo: "Use video",
1535
+ previewVideo: "Preview",
1536
+ is360Video: "VR video",
1537
+ close: "Lukk",
1538
+ },
1529
1539
  },
1530
1540
  };
1531
1541
 
@@ -1526,6 +1526,16 @@ const messages = {
1526
1526
  useAudio: "Velg lyd",
1527
1527
  noResults: "Ingen resultater funnet",
1528
1528
  },
1529
+ videoSearch: {
1530
+ searchPlaceholder: "Søk i videoer",
1531
+ searchButtonTitle: "Søk",
1532
+ loadMoreVideos: "Last flere videoer",
1533
+ noResults: "Ingen videoer funnet",
1534
+ addVideo: "Bruk video",
1535
+ previewVideo: "Forhåndsvis",
1536
+ is360Video: "VR-video",
1537
+ close: "Lukk",
1538
+ },
1529
1539
  },
1530
1540
  };
1531
1541
 
@@ -1525,6 +1525,16 @@ const messages = {
1525
1525
  useAudio: "Velg lyd",
1526
1526
  noResults: "Ingen resultat funnet",
1527
1527
  },
1528
+ videoSearch: {
1529
+ searchPlaceholder: "Søk i videoar",
1530
+ searchButtonTitle: "Søk",
1531
+ loadMoreVideos: "Last fleire videoar",
1532
+ noResults: "Ingen videoar funnet",
1533
+ addVideo: "Bruk video",
1534
+ previewVideo: "Førehandsvis",
1535
+ is360Video: "VR-video",
1536
+ close: "Lukk",
1537
+ },
1528
1538
  },
1529
1539
  };
1530
1540
 
@@ -1528,6 +1528,16 @@ const messages = {
1528
1528
  useAudio: "Velg lyd",
1529
1529
  noResults: "Ingen resultater funnet",
1530
1530
  },
1531
+ videoSearch: {
1532
+ searchPlaceholder: "Søk i videoar",
1533
+ searchButtonTitle: "Søk",
1534
+ loadMoreVideos: "Last fleire videoar",
1535
+ noResults: "Ingen videoar funnet",
1536
+ addVideo: "Bruk video",
1537
+ previewVideo: "Forhåndsvis",
1538
+ is360Video: "VR-video",
1539
+ close: "Lukk",
1540
+ },
1531
1541
  },
1532
1542
  };
1533
1543
 
@@ -1530,6 +1530,16 @@ const messages = {
1530
1530
  useAudio: "Velg lyd",
1531
1531
  noResults: "Ingen resultater funnet",
1532
1532
  },
1533
+ videoSearch: {
1534
+ searchPlaceholder: "Søk i videoar",
1535
+ searchButtonTitle: "Søk",
1536
+ loadMoreVideos: "Last fleire videoar",
1537
+ noResults: "Ingen videoar funnet",
1538
+ addVideo: "Bruk video",
1539
+ previewVideo: "Forhåndsvis",
1540
+ is360Video: "VR-video",
1541
+ close: "Lukk",
1542
+ },
1533
1543
  },
1534
1544
  };
1535
1545