@ndla/ui 3.3.11 → 3.3.15

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 (132) hide show
  1. package/es/Figure/Figure.js +3 -1
  2. package/es/Filter/FilterButtons.js +11 -13
  3. package/es/Frontpage/FrontpageAllSubjects.js +7 -7
  4. package/es/Frontpage/FrontpageSearch.js +2 -4
  5. package/es/LearningPaths/LearningPathMenu.js +4 -5
  6. package/es/LearningPaths/LearningPathMobileHeader.js +4 -5
  7. package/es/NDLAFilm/AboutNdlaFilm.js +6 -17
  8. package/es/NDLAFilm/AllMoviesAlphabetically.js +11 -11
  9. package/es/NDLAFilm/CategorySelect.js +17 -18
  10. package/es/NDLAFilm/FilmContentCard.js +8 -22
  11. package/es/NDLAFilm/FilmContentCardTags.js +4 -8
  12. package/es/NDLAFilm/FilmMovieList.js +6 -21
  13. package/es/NDLAFilm/FilmMovieSearch.js +18 -26
  14. package/es/NDLAFilm/MovieGrid.js +10 -19
  15. package/es/NDLAFilm/VisualElement.js +22 -29
  16. package/es/Search/SearchResultSleeve.js +12 -15
  17. package/es/SearchTypeResult/SearchFieldHeader.js +5 -5
  18. package/es/SearchTypeResult/SearchHeader.js +9 -9
  19. package/es/SearchTypeResult/SearchItem.js +19 -19
  20. package/es/SearchTypeResult/SearchNotionItem.js +12 -12
  21. package/es/TopicIntroductionList/TopicIntroduction.js +14 -33
  22. package/es/TopicIntroductionList/TopicIntroductionList.js +6 -23
  23. package/es/TopicIntroductionList/TopicIntroductionShortcuts.js +71 -110
  24. package/es/TopicIntroductionList/TopicShortcutItem.js +0 -9
  25. package/es/all.css +1 -4
  26. package/es/index-javascript.js +1 -5
  27. package/es/index.js +4 -0
  28. package/es/shapes.js +0 -6
  29. package/lib/Figure/Figure.js +3 -1
  30. package/lib/Filter/FilterButtons.js +9 -9
  31. package/lib/Frontpage/FrontpageAllSubjects.d.ts +1 -1
  32. package/lib/Frontpage/FrontpageAllSubjects.js +7 -7
  33. package/lib/Frontpage/FrontpageSearch.d.ts +3 -5
  34. package/lib/Frontpage/FrontpageSearch.js +2 -4
  35. package/lib/LearningPaths/LearningPathMenu.js +3 -3
  36. package/lib/LearningPaths/LearningPathMobileHeader.js +4 -5
  37. package/lib/NDLAFilm/AboutNdlaFilm.d.ts +15 -0
  38. package/lib/NDLAFilm/AboutNdlaFilm.js +6 -18
  39. package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +2 -2
  40. package/lib/NDLAFilm/AllMoviesAlphabetically.js +11 -11
  41. package/lib/NDLAFilm/CategorySelect.d.ts +11 -0
  42. package/lib/NDLAFilm/CategorySelect.js +20 -19
  43. package/lib/NDLAFilm/FilmContentCard.d.ts +11 -0
  44. package/lib/NDLAFilm/FilmContentCard.js +8 -23
  45. package/lib/NDLAFilm/FilmContentCardTags.d.ts +7 -0
  46. package/lib/NDLAFilm/FilmContentCardTags.js +4 -9
  47. package/lib/NDLAFilm/FilmMovieList.d.ts +19 -0
  48. package/lib/NDLAFilm/FilmMovieList.js +5 -21
  49. package/lib/NDLAFilm/FilmMovieSearch.d.ts +21 -0
  50. package/lib/NDLAFilm/FilmMovieSearch.js +25 -30
  51. package/lib/NDLAFilm/FilmSlideshow.d.ts +5 -5
  52. package/lib/NDLAFilm/MovieGrid.d.ts +13 -0
  53. package/lib/NDLAFilm/MovieGrid.js +9 -21
  54. package/lib/NDLAFilm/SlideshowIndicator.d.ts +2 -2
  55. package/lib/NDLAFilm/VisualElement.d.ts +16 -0
  56. package/lib/NDLAFilm/VisualElement.js +22 -30
  57. package/lib/NDLAFilm/index.d.ts +14 -0
  58. package/lib/NDLAFilm/types.d.ts +6 -4
  59. package/lib/Search/SearchResultSleeve.d.ts +4 -6
  60. package/lib/Search/SearchResultSleeve.js +10 -11
  61. package/lib/SearchTypeResult/SearchFieldHeader.d.ts +3 -3
  62. package/lib/SearchTypeResult/SearchFieldHeader.js +5 -5
  63. package/lib/SearchTypeResult/SearchHeader.d.ts +3 -3
  64. package/lib/SearchTypeResult/SearchHeader.js +9 -9
  65. package/lib/SearchTypeResult/SearchItem.d.ts +2 -3
  66. package/lib/SearchTypeResult/SearchItem.js +19 -19
  67. package/lib/SearchTypeResult/SearchNotionItem.d.ts +1 -1
  68. package/lib/SearchTypeResult/SearchNotionItem.js +12 -12
  69. package/lib/SearchTypeResult/index.d.ts +1 -0
  70. package/lib/TopicIntroductionList/TopicIntroduction.d.ts +21 -0
  71. package/lib/TopicIntroductionList/TopicIntroduction.js +16 -36
  72. package/lib/TopicIntroductionList/TopicIntroductionList.d.ts +35 -0
  73. package/lib/TopicIntroductionList/TopicIntroductionList.js +6 -25
  74. package/lib/TopicIntroductionList/TopicIntroductionShortcuts.d.ts +8 -0
  75. package/lib/TopicIntroductionList/TopicIntroductionShortcuts.js +72 -110
  76. package/lib/TopicIntroductionList/TopicShortcutItem.d.ts +6 -0
  77. package/lib/TopicIntroductionList/TopicShortcutItem.js +0 -11
  78. package/lib/TopicIntroductionList/index.d.ts +9 -0
  79. package/lib/all.css +1 -4
  80. package/lib/index-javascript.js +3 -137
  81. package/lib/index.d.ts +4 -0
  82. package/lib/index.js +155 -0
  83. package/lib/shapes.js +1 -10
  84. package/lib/types.d.ts +2 -2
  85. package/package.json +10 -10
  86. package/src/Figure/Figure.tsx +2 -1
  87. package/src/Figure/component.figure.scss +37 -3
  88. package/src/Filter/FilterButtons.tsx +0 -2
  89. package/src/Frontpage/FrontpageAllSubjects.tsx +2 -2
  90. package/src/Frontpage/FrontpageSearch.tsx +3 -7
  91. package/src/LearningPaths/LearningPathMenu.tsx +0 -1
  92. package/src/LearningPaths/LearningPathMobileHeader.tsx +1 -2
  93. package/src/NDLAFilm/{AboutNdlaFilm.jsx → AboutNdlaFilm.tsx} +19 -18
  94. package/src/NDLAFilm/AllMoviesAlphabetically.tsx +3 -3
  95. package/src/NDLAFilm/{CategorySelect.jsx → CategorySelect.tsx} +23 -20
  96. package/src/NDLAFilm/{FilmContentCard.jsx → FilmContentCard.tsx} +21 -21
  97. package/src/NDLAFilm/{FilmContentCardTags.jsx → FilmContentCardTags.tsx} +7 -7
  98. package/src/NDLAFilm/{FilmMovieList.jsx → FilmMovieList.tsx} +17 -27
  99. package/src/NDLAFilm/FilmMovieSearch.tsx +71 -0
  100. package/src/NDLAFilm/FilmSlideshow.tsx +6 -6
  101. package/src/NDLAFilm/MovieGrid.tsx +76 -0
  102. package/src/NDLAFilm/SlideshowIndicator.tsx +2 -2
  103. package/src/NDLAFilm/VisualElement.tsx +40 -0
  104. package/src/NDLAFilm/{index.js → index.ts} +0 -0
  105. package/src/NDLAFilm/types.ts +7 -4
  106. package/src/Search/SearchResultSleeve.tsx +7 -19
  107. package/src/SearchTypeResult/SearchFieldHeader.tsx +3 -3
  108. package/src/SearchTypeResult/SearchHeader.tsx +3 -3
  109. package/src/SearchTypeResult/SearchItem.tsx +4 -5
  110. package/src/SearchTypeResult/SearchNotionItem.tsx +1 -1
  111. package/src/SearchTypeResult/index.ts +2 -0
  112. package/src/TopicIntroductionList/{TopicIntroduction.jsx → TopicIntroduction.tsx} +22 -35
  113. package/src/TopicIntroductionList/{TopicIntroductionList.jsx → TopicIntroductionList.tsx} +32 -26
  114. package/src/TopicIntroductionList/TopicIntroductionShortcuts.tsx +71 -0
  115. package/src/TopicIntroductionList/{TopicShortcutItem.jsx → TopicShortcutItem.tsx} +5 -13
  116. package/src/TopicIntroductionList/{index.js → index.ts} +0 -0
  117. package/src/index-javascript.js +0 -30
  118. package/src/index.ts +31 -0
  119. package/src/shapes.js +0 -7
  120. package/src/types.ts +2 -2
  121. package/es/NDLAFilm/interfaces.js +0 -0
  122. package/es/NDLAFilm/shapes.js +0 -15
  123. package/lib/NDLAFilm/interfaces.d.ts +0 -10
  124. package/lib/NDLAFilm/interfaces.js +0 -1
  125. package/lib/NDLAFilm/shapes.d.ts +0 -15
  126. package/lib/NDLAFilm/shapes.js +0 -30
  127. package/src/NDLAFilm/FilmMovieSearch.jsx +0 -66
  128. package/src/NDLAFilm/MovieGrid.jsx +0 -75
  129. package/src/NDLAFilm/VisualElement.jsx +0 -48
  130. package/src/NDLAFilm/interfaces.ts +0 -10
  131. package/src/NDLAFilm/shapes.ts +0 -17
  132. package/src/TopicIntroductionList/TopicIntroductionShortcuts.jsx +0 -92
@@ -95,54 +95,6 @@ Object.defineProperty(exports, "ToggleSearchButton", {
95
95
  return _Search.ToggleSearchButton;
96
96
  }
97
97
  });
98
- Object.defineProperty(exports, "ContentTypeBadge", {
99
- enumerable: true,
100
- get: function get() {
101
- return _ContentTypeBadge["default"];
102
- }
103
- });
104
- Object.defineProperty(exports, "SubjectMaterialBadge", {
105
- enumerable: true,
106
- get: function get() {
107
- return _ContentTypeBadge.SubjectMaterialBadge;
108
- }
109
- });
110
- Object.defineProperty(exports, "TasksAndActivitiesBadge", {
111
- enumerable: true,
112
- get: function get() {
113
- return _ContentTypeBadge.TasksAndActivitiesBadge;
114
- }
115
- });
116
- Object.defineProperty(exports, "AssessmentResourcesBadge", {
117
- enumerable: true,
118
- get: function get() {
119
- return _ContentTypeBadge.AssessmentResourcesBadge;
120
- }
121
- });
122
- Object.defineProperty(exports, "LearningPathBadge", {
123
- enumerable: true,
124
- get: function get() {
125
- return _ContentTypeBadge.LearningPathBadge;
126
- }
127
- });
128
- Object.defineProperty(exports, "SubjectBadge", {
129
- enumerable: true,
130
- get: function get() {
131
- return _ContentTypeBadge.SubjectBadge;
132
- }
133
- });
134
- Object.defineProperty(exports, "ExternalLearningResourcesBadge", {
135
- enumerable: true,
136
- get: function get() {
137
- return _ContentTypeBadge.ExternalLearningResourcesBadge;
138
- }
139
- });
140
- Object.defineProperty(exports, "SourceMaterialBadge", {
141
- enumerable: true,
142
- get: function get() {
143
- return _ContentTypeBadge.SourceMaterialBadge;
144
- }
145
- });
146
98
  Object.defineProperty(exports, "TopicIntroductionList", {
147
99
  enumerable: true,
148
100
  get: function get() {
@@ -191,42 +143,6 @@ Object.defineProperty(exports, "CompetenceGoalsDialog", {
191
143
  return _CompetenceGoals.CompetenceGoalsDialog;
192
144
  }
193
145
  });
194
- Object.defineProperty(exports, "MediaList", {
195
- enumerable: true,
196
- get: function get() {
197
- return _MediaList.MediaList;
198
- }
199
- });
200
- Object.defineProperty(exports, "MediaListItem", {
201
- enumerable: true,
202
- get: function get() {
203
- return _MediaList.MediaListItem;
204
- }
205
- });
206
- Object.defineProperty(exports, "MediaListItemBody", {
207
- enumerable: true,
208
- get: function get() {
209
- return _MediaList.MediaListItemBody;
210
- }
211
- });
212
- Object.defineProperty(exports, "MediaListItemActions", {
213
- enumerable: true,
214
- get: function get() {
215
- return _MediaList.MediaListItemActions;
216
- }
217
- });
218
- Object.defineProperty(exports, "MediaListItemImage", {
219
- enumerable: true,
220
- get: function get() {
221
- return _MediaList.MediaListItemImage;
222
- }
223
- });
224
- Object.defineProperty(exports, "MediaListItemMeta", {
225
- enumerable: true,
226
- get: function get() {
227
- return _MediaList.MediaListItemMeta;
228
- }
229
- });
230
146
  Object.defineProperty(exports, "EmbeddedTwitter", {
231
147
  enumerable: true,
232
148
  get: function get() {
@@ -245,71 +161,21 @@ Object.defineProperty(exports, "EmbeddedFacebookPage", {
245
161
  return _Embedded.EmbeddedFacebookPage;
246
162
  }
247
163
  });
248
- Object.defineProperty(exports, "DisplayOnPageYOffset", {
249
- enumerable: true,
250
- get: function get() {
251
- return _Animation.DisplayOnPageYOffset;
252
- }
253
- });
254
- Object.defineProperty(exports, "FilmSlideshow", {
255
- enumerable: true,
256
- get: function get() {
257
- return _NDLAFilm.FilmSlideshow;
258
- }
259
- });
260
- Object.defineProperty(exports, "MovieGrid", {
261
- enumerable: true,
262
- get: function get() {
263
- return _NDLAFilm.MovieGrid;
264
- }
265
- });
266
- Object.defineProperty(exports, "AboutNdlaFilm", {
267
- enumerable: true,
268
- get: function get() {
269
- return _NDLAFilm.AboutNdlaFilm;
270
- }
271
- });
272
- Object.defineProperty(exports, "FilmMovieSearch", {
273
- enumerable: true,
274
- get: function get() {
275
- return _NDLAFilm.FilmMovieSearch;
276
- }
277
- });
278
- Object.defineProperty(exports, "FilmMovieList", {
279
- enumerable: true,
280
- get: function get() {
281
- return _NDLAFilm.FilmMovieList;
282
- }
283
- });
284
- Object.defineProperty(exports, "AllMoviesAlphabetically", {
285
- enumerable: true,
286
- get: function get() {
287
- return _NDLAFilm.AllMoviesAlphabetically;
288
- }
289
- });
290
164
 
291
165
  var _Filter = require("./Filter");
292
166
 
293
167
  var _Search = require("./Search");
294
168
 
295
- var _ContentTypeBadge = _interopRequireWildcard(require("./ContentTypeBadge"));
296
-
297
169
  var _TopicIntroductionList = _interopRequireDefault(require("./TopicIntroductionList"));
298
170
 
299
171
  var _TopicMenu = _interopRequireWildcard(require("./TopicMenu"));
300
172
 
301
173
  var _CompetenceGoals = _interopRequireWildcard(require("./CompetenceGoals"));
302
174
 
303
- var _MediaList = require("./MediaList");
304
-
305
175
  var _Embedded = require("./Embedded");
306
176
 
307
- var _Animation = require("./Animation");
308
-
309
- var _NDLAFilm = require("./NDLAFilm");
310
-
311
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
312
-
313
177
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
314
178
 
315
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
179
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
180
+
181
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
package/lib/index.d.ts CHANGED
@@ -64,6 +64,10 @@ export type { BreadcrumbItemProps } from './Breadcrumblist/Breadcrumblist';
64
64
  export { i18nInstance, formatNestedMessages, formatMessage } from './i18n';
65
65
  export { default as ResourceGroup } from './ResourceGroup';
66
66
  export { default as LayoutItem, OneColumn, PageContainer, Content } from './Layout';
67
+ export { FilmSlideshow, MovieGrid, AboutNdlaFilm, FilmMovieSearch, FilmMovieList, AllMoviesAlphabetically, } from './NDLAFilm';
68
+ export { DisplayOnPageYOffset } from './Animation';
69
+ export { MediaList, MediaListItem, MediaListItemBody, MediaListItemActions, MediaListItemImage, MediaListItemMeta, } from './MediaList';
70
+ export { default as ContentTypeBadge, SubjectMaterialBadge, TasksAndActivitiesBadge, AssessmentResourcesBadge, LearningPathBadge, SubjectBadge, ExternalLearningResourcesBadge, SourceMaterialBadge, } from './ContentTypeBadge';
67
71
  export { SubjectAbout, SubjectArchive, SubjectCarousel, SubjectChildContent, SubjectContent, SubjectFilter, SubjectFlexChild, SubjectFlexWrapper, SubjectHeader, SubjectLinks, SubjectNewContent, SubjectSecondaryContent, SubjectSectionTitle, SubjectShortcuts, SubjectSidebarWrapper, SubjectSocialContent, SubjectSocialSection, SubjectTopics, SubjectBanner, } from './Subject';
68
72
  export { default as ContentCard } from './ContentCard';
69
73
  export { default as CopyParagraphButton } from './CopyParagraphButton';
package/lib/index.js CHANGED
@@ -124,6 +124,27 @@ var _exportNames = {
124
124
  OneColumn: true,
125
125
  PageContainer: true,
126
126
  Content: true,
127
+ FilmSlideshow: true,
128
+ MovieGrid: true,
129
+ AboutNdlaFilm: true,
130
+ FilmMovieSearch: true,
131
+ FilmMovieList: true,
132
+ AllMoviesAlphabetically: true,
133
+ DisplayOnPageYOffset: true,
134
+ MediaList: true,
135
+ MediaListItem: true,
136
+ MediaListItemBody: true,
137
+ MediaListItemActions: true,
138
+ MediaListItemImage: true,
139
+ MediaListItemMeta: true,
140
+ ContentTypeBadge: true,
141
+ SubjectMaterialBadge: true,
142
+ TasksAndActivitiesBadge: true,
143
+ AssessmentResourcesBadge: true,
144
+ LearningPathBadge: true,
145
+ SubjectBadge: true,
146
+ ExternalLearningResourcesBadge: true,
147
+ SourceMaterialBadge: true,
127
148
  SubjectAbout: true,
128
149
  SubjectArchive: true,
129
150
  SubjectCarousel: true,
@@ -854,6 +875,132 @@ Object.defineProperty(exports, "Content", {
854
875
  return _Layout.Content;
855
876
  }
856
877
  });
878
+ Object.defineProperty(exports, "FilmSlideshow", {
879
+ enumerable: true,
880
+ get: function get() {
881
+ return _NDLAFilm.FilmSlideshow;
882
+ }
883
+ });
884
+ Object.defineProperty(exports, "MovieGrid", {
885
+ enumerable: true,
886
+ get: function get() {
887
+ return _NDLAFilm.MovieGrid;
888
+ }
889
+ });
890
+ Object.defineProperty(exports, "AboutNdlaFilm", {
891
+ enumerable: true,
892
+ get: function get() {
893
+ return _NDLAFilm.AboutNdlaFilm;
894
+ }
895
+ });
896
+ Object.defineProperty(exports, "FilmMovieSearch", {
897
+ enumerable: true,
898
+ get: function get() {
899
+ return _NDLAFilm.FilmMovieSearch;
900
+ }
901
+ });
902
+ Object.defineProperty(exports, "FilmMovieList", {
903
+ enumerable: true,
904
+ get: function get() {
905
+ return _NDLAFilm.FilmMovieList;
906
+ }
907
+ });
908
+ Object.defineProperty(exports, "AllMoviesAlphabetically", {
909
+ enumerable: true,
910
+ get: function get() {
911
+ return _NDLAFilm.AllMoviesAlphabetically;
912
+ }
913
+ });
914
+ Object.defineProperty(exports, "DisplayOnPageYOffset", {
915
+ enumerable: true,
916
+ get: function get() {
917
+ return _Animation.DisplayOnPageYOffset;
918
+ }
919
+ });
920
+ Object.defineProperty(exports, "MediaList", {
921
+ enumerable: true,
922
+ get: function get() {
923
+ return _MediaList.MediaList;
924
+ }
925
+ });
926
+ Object.defineProperty(exports, "MediaListItem", {
927
+ enumerable: true,
928
+ get: function get() {
929
+ return _MediaList.MediaListItem;
930
+ }
931
+ });
932
+ Object.defineProperty(exports, "MediaListItemBody", {
933
+ enumerable: true,
934
+ get: function get() {
935
+ return _MediaList.MediaListItemBody;
936
+ }
937
+ });
938
+ Object.defineProperty(exports, "MediaListItemActions", {
939
+ enumerable: true,
940
+ get: function get() {
941
+ return _MediaList.MediaListItemActions;
942
+ }
943
+ });
944
+ Object.defineProperty(exports, "MediaListItemImage", {
945
+ enumerable: true,
946
+ get: function get() {
947
+ return _MediaList.MediaListItemImage;
948
+ }
949
+ });
950
+ Object.defineProperty(exports, "MediaListItemMeta", {
951
+ enumerable: true,
952
+ get: function get() {
953
+ return _MediaList.MediaListItemMeta;
954
+ }
955
+ });
956
+ Object.defineProperty(exports, "ContentTypeBadge", {
957
+ enumerable: true,
958
+ get: function get() {
959
+ return _ContentTypeBadge["default"];
960
+ }
961
+ });
962
+ Object.defineProperty(exports, "SubjectMaterialBadge", {
963
+ enumerable: true,
964
+ get: function get() {
965
+ return _ContentTypeBadge.SubjectMaterialBadge;
966
+ }
967
+ });
968
+ Object.defineProperty(exports, "TasksAndActivitiesBadge", {
969
+ enumerable: true,
970
+ get: function get() {
971
+ return _ContentTypeBadge.TasksAndActivitiesBadge;
972
+ }
973
+ });
974
+ Object.defineProperty(exports, "AssessmentResourcesBadge", {
975
+ enumerable: true,
976
+ get: function get() {
977
+ return _ContentTypeBadge.AssessmentResourcesBadge;
978
+ }
979
+ });
980
+ Object.defineProperty(exports, "LearningPathBadge", {
981
+ enumerable: true,
982
+ get: function get() {
983
+ return _ContentTypeBadge.LearningPathBadge;
984
+ }
985
+ });
986
+ Object.defineProperty(exports, "SubjectBadge", {
987
+ enumerable: true,
988
+ get: function get() {
989
+ return _ContentTypeBadge.SubjectBadge;
990
+ }
991
+ });
992
+ Object.defineProperty(exports, "ExternalLearningResourcesBadge", {
993
+ enumerable: true,
994
+ get: function get() {
995
+ return _ContentTypeBadge.ExternalLearningResourcesBadge;
996
+ }
997
+ });
998
+ Object.defineProperty(exports, "SourceMaterialBadge", {
999
+ enumerable: true,
1000
+ get: function get() {
1001
+ return _ContentTypeBadge.SourceMaterialBadge;
1002
+ }
1003
+ });
857
1004
  Object.defineProperty(exports, "SubjectAbout", {
858
1005
  enumerable: true,
859
1006
  get: function get() {
@@ -1102,6 +1249,14 @@ var _ResourceGroup = _interopRequireDefault(require("./ResourceGroup"));
1102
1249
 
1103
1250
  var _Layout = _interopRequireWildcard(require("./Layout"));
1104
1251
 
1252
+ var _NDLAFilm = require("./NDLAFilm");
1253
+
1254
+ var _Animation = require("./Animation");
1255
+
1256
+ var _MediaList = require("./MediaList");
1257
+
1258
+ var _ContentTypeBadge = _interopRequireWildcard(require("./ContentTypeBadge"));
1259
+
1105
1260
  var _Subject = require("./Subject");
1106
1261
 
1107
1262
  var _ContentCard = _interopRequireDefault(require("./ContentCard"));
package/lib/shapes.js CHANGED
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.CompetenceGoalShape = exports.ContentTypeResultShape = exports.ContentTypeShape = exports.ShortcutShape = exports.ResourceShape = exports.ArticleShape = exports.ContributorShape = exports.FootNoteShape = exports.TopicShape = exports.SubjectShape = exports.LicenseShape = exports.LicenseRightShape = void 0;
8
+ exports.CompetenceGoalShape = exports.ContentTypeResultShape = exports.ContentTypeShape = exports.ResourceShape = exports.ArticleShape = exports.ContributorShape = exports.FootNoteShape = exports.TopicShape = exports.SubjectShape = exports.LicenseShape = exports.LicenseRightShape = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -100,15 +100,6 @@ var ResourceShape = _propTypes["default"].shape({
100
100
 
101
101
  exports.ResourceShape = ResourceShape;
102
102
 
103
- var ShortcutShape = _propTypes["default"].shape({
104
- tooltip: _propTypes["default"].string.isRequired,
105
- contentType: _propTypes["default"].string.isRequired,
106
- url: _propTypes["default"].string.isRequired,
107
- count: _propTypes["default"].number.isRequired
108
- });
109
-
110
- exports.ShortcutShape = ShortcutShape;
111
-
112
103
  var ContentTypeShape = _propTypes["default"].oneOf([contentTypes.SUBJECT_MATERIAL, contentTypes.TASKS_AND_ACTIVITIES, contentTypes.ASSESSMENT_RESOURCES, contentTypes.SUBJECT, contentTypes.EXTERNAL_LEARNING_RESOURCES, contentTypes.SOURCE_MATERIAL, contentTypes.LEARNING_PATH, contentTypes.TOPIC, 'beta', 'ndla-film', 'ndla-film has-image']);
113
104
 
114
105
  exports.ContentTypeShape = ContentTypeShape;
package/lib/types.d.ts CHANGED
@@ -18,9 +18,9 @@ declare type ResourceTypes = {
18
18
  name: string;
19
19
  };
20
20
  export declare type Resource = {
21
- id: string;
21
+ id: string | number;
22
22
  name: string;
23
- contentUri: string;
23
+ contentUri?: string;
24
24
  path: string;
25
25
  primary?: boolean;
26
26
  rank?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "3.3.11",
3
+ "version": "3.3.15",
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/button": "^1.1.4",
35
- "@ndla/carousel": "^1.1.2",
36
- "@ndla/core": "^0.7.2",
34
+ "@ndla/button": "^1.1.5",
35
+ "@ndla/carousel": "^1.1.3",
36
+ "@ndla/core": "^0.7.3",
37
37
  "@ndla/hooks": "^1.0.7",
38
38
  "@ndla/icons": "^1.4.1",
39
- "@ndla/licenses": "^1.1.6",
40
- "@ndla/modal": "^1.1.18",
39
+ "@ndla/licenses": "^1.1.7",
40
+ "@ndla/modal": "^1.1.20",
41
41
  "@ndla/safelink": "^1.0.9",
42
- "@ndla/switch": "^0.0.32",
43
- "@ndla/tabs": "^1.0.15",
44
- "@ndla/tooltip": "^0.2.49",
42
+ "@ndla/switch": "^0.0.33",
43
+ "@ndla/tabs": "^1.0.16",
44
+ "@ndla/tooltip": "^0.2.50",
45
45
  "@ndla/util": "^2.0.1",
46
46
  "@reach/menu-button": "^0.12.1",
47
47
  "@reach/slider": "^0.12.1",
@@ -92,5 +92,5 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "gitHead": "931121c140745578c341fff16a8d8eeb6fd918ee"
95
+ "gitHead": "2f41952b351cc94317b452ef956efa82d706bd30"
96
96
  }
@@ -121,8 +121,9 @@ interface FigureCaptionProps {
121
121
 
122
122
  const Figure = ({ children, type = 'full', resizeIframe, ...rest }: Props) => {
123
123
  const typeClass = type === 'full-column' ? 'c-figure--full-column' : `u-float-${type}`;
124
+ const right = ['small-right', 'xsmall-right'].includes(type);
124
125
  return (
125
- <figure data-sizetype={type} {...classes('', { resize: !!resizeIframe }, typeClass)} {...rest}>
126
+ <figure data-sizetype={type} {...classes('', { resize: !!resizeIframe, right }, typeClass)} {...rest}>
126
127
  {isFunction(children) ? children({ typeClass }) : children}
127
128
  </figure>
128
129
  );
@@ -17,6 +17,25 @@
17
17
  **/
18
18
 
19
19
  /* 1. */
20
+
21
+ @keyframes rightFloatTransition {
22
+ 0% {
23
+ left: 75%;
24
+ }
25
+ 100% {
26
+ left: -16.6%;
27
+ }
28
+ }
29
+
30
+ @keyframes smallRightFloatTransition {
31
+ 0% {
32
+ left: 78.5%;
33
+ }
34
+ 100% {
35
+ left: -16.6%;
36
+ }
37
+ }
38
+
20
39
  .c-figure {
21
40
  img {
22
41
  width: 100%;
@@ -51,6 +70,21 @@
51
70
  padding-bottom: $spacing--large;
52
71
  margin-bottom: 0;
53
72
  }
73
+ &--right {
74
+ &.expanded {
75
+ @include mq($from: desktop) {
76
+ animation-name: rightFloatTransition;
77
+ animation-duration: 0.4s;
78
+ }
79
+
80
+ &[data-sizetype='xsmall-right'] {
81
+ @include mq($from: desktop) {
82
+ animation-name: smallRightFloatTransition;
83
+ animation-duration: 0.4s;
84
+ }
85
+ }
86
+ }
87
+ }
54
88
  &.expanded {
55
89
  .c-figure__caption--hidden-caption {
56
90
  display: block;
@@ -74,7 +108,7 @@
74
108
  background-color: $white;
75
109
  padding: $spacing--small 0;
76
110
  display: block;
77
- border-bottom: 1px solid #D1D6DB;
111
+ border-bottom: 1px solid #d1d6db;
78
112
  }
79
113
 
80
114
  .c-figure__caption--hidden-caption {
@@ -119,7 +153,7 @@
119
153
  margin-bottom: $spacing--small;
120
154
  }
121
155
  p {
122
- margin:0;
156
+ margin: 0;
123
157
  }
124
158
  }
125
159
 
@@ -179,7 +213,7 @@
179
213
  padding: $spacing--small;
180
214
  transition: all 0.3s ease-out;
181
215
  background: rgba($white, 0.2);
182
- border:0;
216
+ border: 0;
183
217
 
184
218
  .expanded-icon {
185
219
  display: none;
@@ -12,9 +12,7 @@ import styled from '@emotion/styled';
12
12
  import Button from '@ndla/button';
13
13
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
14
14
  import { useTranslation } from 'react-i18next';
15
- // @ts-ignore
16
15
  import { Cross as CrossIcon, Plus as PlusIcon } from '@ndla/icons/action';
17
- // @ts-ignore
18
16
  import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
19
17
 
20
18
  // @ts-ignore
@@ -73,7 +73,7 @@ const StyledLetterSpacing = styled.span`
73
73
  type subjectProps = {
74
74
  name: string;
75
75
  url?: string;
76
- path: string;
76
+ path?: string;
77
77
  id?: string;
78
78
  };
79
79
  type categoryProps = {
@@ -160,7 +160,7 @@ const renderList = (
160
160
  onNavigate();
161
161
  }
162
162
  }}
163
- to={subject.url || subject.path}>
163
+ to={subject.url || subject.path || ''}>
164
164
  {subject.name}
165
165
  </SafeLink>
166
166
  <StyledSpacingElement />
@@ -1,7 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { isIE, browserVersion, isMobileSafari } from 'react-device-detect';
3
3
  import styled from '@emotion/styled';
4
- import { History } from 'history';
5
4
  import { colors, spacing, mq, breakpoints, animations } from '@ndla/core';
6
5
  // @ts-ignore
7
6
  import { noScroll } from '@ndla/util';
@@ -54,11 +53,10 @@ type Props = {
54
53
  };
55
54
  onSearch: (event: React.FormEvent) => void;
56
55
  allResultUrl: string;
57
- searchResult: Array<ContentTypeResultType>;
56
+ searchResult?: Array<ContentTypeResultType>;
58
57
  loading: boolean;
59
- history: History;
60
- suggestion: string;
61
- suggestionUrl: string;
58
+ suggestion?: string;
59
+ suggestionUrl?: string;
62
60
  };
63
61
 
64
62
  const FrontpageSearch: React.FunctionComponent<Props> = ({
@@ -73,7 +71,6 @@ const FrontpageSearch: React.FunctionComponent<Props> = ({
73
71
  allResultUrl,
74
72
  searchResult,
75
73
  loading,
76
- history,
77
74
  suggestion,
78
75
  suggestionUrl,
79
76
  }) => {
@@ -190,7 +187,6 @@ const FrontpageSearch: React.FunctionComponent<Props> = ({
190
187
  allResultUrl={allResultUrl}
191
188
  resourceToLinkProps={resourceToLinkProps}
192
189
  infoText={t('welcomePage.searchDisclaimer')}
193
- history={history}
194
190
  suggestion={suggestion}
195
191
  suggestionUrl={suggestionUrl}
196
192
  />
@@ -14,7 +14,6 @@ import { useTranslation } from 'react-i18next';
14
14
  import Tooltip from '@ndla/tooltip';
15
15
  import { useWindowSize } from '@ndla/hooks';
16
16
  import { colors, spacing, misc, mq, breakpoints } from '@ndla/core';
17
- // @ts-ignore
18
17
  import { ArrowExpandRight, ArrowExpandLeft } from '@ndla/icons/action';
19
18
  import LearningPathMenuModalWrapper from './LearningPathMenuModalWrapper';
20
19
  import LearningPathMenuAside from './LearningPathMenuAside';
@@ -10,8 +10,7 @@ import styled from '@emotion/styled';
10
10
  import { colors, fonts, spacing } from '@ndla/core';
11
11
  import React from 'react';
12
12
  import { WithTranslation, withTranslation } from 'react-i18next';
13
- // @ts-ignore
14
- import { LearningPathBadge } from '../index-javascript';
13
+ import { LearningPathBadge } from '../';
15
14
 
16
15
  const StyledWrapper = styled.div`
17
16
  display: flex;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { OneColumn } from '@ndla/ui';
1
+ import React, { ReactNode } from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import styled from '@emotion/styled';
4
4
  import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
5
5
  import { colors, spacing, fonts, mq, breakpoints } from '@ndla/core';
6
+ //@ts-ignore
6
7
  import Button from '@ndla/button';
7
- import styled from '@emotion/styled';
8
- import { useTranslation } from 'react-i18next';
8
+ import { OneColumn } from '..';
9
9
  import VisualElement from './VisualElement';
10
10
 
11
11
  const StyledAside = styled.aside`
@@ -44,7 +44,20 @@ const StyledAside = styled.aside`
44
44
  }
45
45
  `;
46
46
 
47
- const AboutNdlaFilm = ({ aboutNDLAVideo, moreAboutNdlaFilm }) => {
47
+ interface Props {
48
+ aboutNDLAVideo: {
49
+ title: string;
50
+ description: string;
51
+ visualElement: {
52
+ alt?: string;
53
+ url: string;
54
+ type: string;
55
+ };
56
+ };
57
+ moreAboutNdlaFilm: ReactNode;
58
+ }
59
+
60
+ const AboutNdlaFilm = ({ aboutNDLAVideo, moreAboutNdlaFilm }: Props) => {
48
61
  const { t } = useTranslation();
49
62
  return (
50
63
  <div className="o-wrapper">
@@ -71,16 +84,4 @@ const AboutNdlaFilm = ({ aboutNDLAVideo, moreAboutNdlaFilm }) => {
71
84
  );
72
85
  };
73
86
 
74
- AboutNdlaFilm.propTypes = {
75
- aboutNDLAVideo: PropTypes.shape({
76
- title: PropTypes.string,
77
- description: PropTypes.string,
78
- visualElement: PropTypes.shape({
79
- url: PropTypes.string,
80
- alt: PropTypes.string,
81
- type: PropTypes.string,
82
- }),
83
- }),
84
- };
85
-
86
87
  export default AboutNdlaFilm;