@ndla/ui 3.2.1-alpha.8 → 3.2.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.
- package/es/Article/ArticleAuthorContent.js +1 -2
- package/es/Article/ArticleSideBar.js +42 -14
- package/es/AuthorInfo/AuthorInfo.js +1 -2
- package/es/BackgroundImage/BackgroundImage.js +5 -15
- package/es/ContentLoader/index.js +14 -27
- package/es/Dialog/Dialog.js +10 -28
- package/es/FactBox/FactBox.js +7 -11
- package/es/Figure/Figure.js +13 -41
- package/es/Figure/FigureExpandButton.js +2 -11
- package/es/Figure/FigureLicense.js +4 -24
- package/es/Figure/FigureLicenseDialog.js +2 -20
- package/es/FileList/File.js +0 -13
- package/es/FileList/FileList.js +0 -13
- package/es/Hero/Hero.js +0 -6
- package/es/Image/Image.js +4 -27
- package/es/Image/ImageLink.js +3 -12
- package/es/Image/LazyLoadImage.js +4 -13
- package/es/InfoBox/InfoBox.js +0 -4
- package/es/InfoWidget/InfoWidget.js +2 -21
- package/es/Logo/Logo.js +6 -22
- package/es/Logo/SvgLogo.js +4 -12
- package/es/Masthead/Masthead.js +12 -33
- package/es/NoContentBox/NoContentBox.js +2 -11
- package/es/Portrait/Portrait.js +0 -11
- package/es/RelatedArticleList/RelatedArticleList.js +4 -23
- package/es/ResourcesWrapper/ResourcesTitle.js +0 -4
- package/es/ResourcesWrapper/ResourcesTopicTitle.js +12 -25
- package/es/ResourcesWrapper/ResourcesWrapper.js +2 -11
- package/es/Topic/Topic.js +21 -22
- package/es/Translation/Translation.js +0 -5
- package/es/Translation/TranslationBox.js +7 -3
- package/es/Translation/TranslationLine.js +4 -15
- package/es/index-javascript.js +1 -19
- package/es/index.js +18 -0
- package/es/locale/messages-en.js +4 -0
- package/es/locale/messages-nb.js +5 -1
- package/es/locale/messages-nn.js +5 -1
- package/lib/Article/ArticleSideBar.d.ts +2 -1
- package/lib/Article/ArticleSideBar.js +43 -14
- package/lib/BackgroundImage/BackgroundImage.d.ts +11 -0
- package/lib/BackgroundImage/BackgroundImage.js +5 -17
- package/lib/BackgroundImage/index.d.ts +2 -0
- package/lib/ContentLoader/index.d.ts +20 -0
- package/lib/ContentLoader/index.js +14 -28
- package/lib/Dialog/Dialog.d.ts +23 -0
- package/lib/Dialog/Dialog.js +9 -29
- package/lib/Dialog/index.d.ts +10 -0
- package/lib/FactBox/FactBox.d.ts +16 -0
- package/lib/FactBox/FactBox.js +5 -11
- package/lib/FactBox/index.d.ts +2 -0
- package/lib/Figure/Figure.d.ts +49 -0
- package/lib/Figure/Figure.js +11 -41
- package/lib/Figure/FigureExpandButton.d.ts +16 -0
- package/lib/Figure/FigureExpandButton.js +2 -13
- package/lib/Figure/FigureLicense.d.ts +33 -0
- package/lib/Figure/FigureLicense.js +5 -27
- package/lib/Figure/FigureLicenseDialog.d.ts +29 -0
- package/lib/Figure/FigureLicenseDialog.js +1 -22
- package/lib/Figure/index.d.ts +12 -0
- package/lib/FileList/File.d.ts +7 -0
- package/lib/FileList/File.js +0 -14
- package/lib/FileList/FileList.d.ts +17 -0
- package/lib/FileList/FileList.js +0 -14
- package/lib/FileList/index.d.ts +3 -0
- package/lib/Hero/Hero.d.ts +27 -0
- package/lib/Hero/Hero.js +0 -8
- package/lib/Hero/index.d.ts +9 -0
- package/lib/Image/Image.d.ts +34 -0
- package/lib/Image/Image.js +4 -28
- package/lib/Image/ImageLink.d.ts +18 -0
- package/lib/Image/ImageLink.js +3 -15
- package/lib/Image/LazyLoadImage.d.ts +17 -0
- package/lib/Image/LazyLoadImage.js +3 -13
- package/lib/Image/index.d.ts +12 -0
- package/lib/InfoBox/InfoBox.d.ts +6 -0
- package/lib/InfoBox/InfoBox.js +0 -5
- package/{src/InfoBox/index.js → lib/InfoBox/index.d.ts} +0 -0
- package/lib/InfoWidget/InfoWidget.d.ts +19 -0
- package/lib/InfoWidget/InfoWidget.js +2 -22
- package/lib/InfoWidget/index.d.ts +2 -0
- package/lib/Logo/Logo.d.ts +24 -0
- package/lib/Logo/Logo.js +6 -29
- package/lib/Logo/SvgLogo.d.ts +14 -0
- package/lib/Logo/SvgLogo.js +4 -13
- package/lib/Logo/index.d.ts +9 -0
- package/lib/Masthead/Masthead.d.ts +27 -0
- package/lib/Masthead/Masthead.js +10 -34
- package/lib/Masthead/index.d.ts +10 -0
- package/lib/NoContentBox/NoContentBox.d.ts +14 -0
- package/lib/NoContentBox/NoContentBox.js +1 -11
- package/lib/NoContentBox/index.d.ts +9 -0
- package/lib/Portrait/Portrait.d.ts +15 -0
- package/lib/Portrait/Portrait.js +0 -12
- package/lib/Portrait/index.d.ts +9 -0
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +25 -0
- package/lib/RelatedArticleList/RelatedArticleList.js +2 -23
- package/lib/RelatedArticleList/index.d.ts +10 -0
- package/lib/ResourcesWrapper/ResourcesTitle.d.ts +13 -0
- package/lib/ResourcesWrapper/ResourcesTitle.js +0 -5
- package/lib/ResourcesWrapper/ResourcesTopicTitle.d.ts +13 -0
- package/lib/ResourcesWrapper/ResourcesTopicTitle.js +11 -26
- package/lib/ResourcesWrapper/ResourcesWrapper.d.ts +18 -0
- package/lib/ResourcesWrapper/ResourcesWrapper.js +2 -12
- package/lib/ResourcesWrapper/index.d.ts +11 -0
- package/lib/Topic/Topic.d.ts +3 -2
- package/lib/Topic/Topic.js +20 -20
- package/lib/Translation/Translation.d.ts +14 -0
- package/lib/Translation/Translation.js +0 -6
- package/lib/Translation/TranslationBox.d.ts +10 -0
- package/lib/Translation/TranslationBox.js +6 -2
- package/lib/Translation/TranslationLine.d.ts +16 -0
- package/lib/Translation/TranslationLine.js +4 -22
- package/{src/Translation/index.js → lib/Translation/index.d.ts} +0 -0
- package/lib/index-javascript.js +0 -250
- package/lib/index.d.ts +18 -0
- package/lib/index.js +286 -0
- package/lib/locale/messages-en.d.ts +4 -0
- package/lib/locale/messages-en.js +4 -0
- package/lib/locale/messages-nb.d.ts +4 -0
- package/lib/locale/messages-nb.js +5 -1
- package/lib/locale/messages-nn.d.ts +4 -0
- package/lib/locale/messages-nn.js +5 -1
- package/lib/utils/createUniversalPortal.d.ts +9 -0
- package/package.json +6 -6
- package/src/Article/ArticleAuthorContent.tsx +0 -1
- package/src/Article/ArticleSideBar.tsx +31 -3
- package/src/AuthorInfo/AuthorInfo.tsx +0 -1
- package/src/BackgroundImage/BackgroundImage.tsx +32 -0
- package/src/BackgroundImage/{index.js → index.ts} +0 -0
- package/src/ContentLoader/{index.js → index.tsx} +20 -30
- package/src/Dialog/{Dialog.jsx → Dialog.tsx} +20 -32
- package/src/Dialog/{index.js → index.ts} +0 -0
- package/src/FactBox/{FactBox.jsx → FactBox.tsx} +12 -14
- package/src/FactBox/{index.js → index.ts} +0 -0
- package/src/Figure/{Figure.js → Figure.tsx} +46 -53
- package/src/Figure/{FigureExpandButton.js → FigureExpandButton.tsx} +8 -9
- package/src/Figure/{FigureLicense.js → FigureLicense.tsx} +32 -30
- package/src/Figure/{FigureLicenseDialog.js → FigureLicenseDialog.tsx} +22 -22
- package/src/Figure/{index.js → index.ts} +0 -0
- package/src/FileList/{File.jsx → File.tsx} +8 -18
- package/src/FileList/FileList.tsx +36 -0
- package/src/FileList/{index.js → index.ts} +0 -0
- package/src/Hero/Hero.tsx +58 -0
- package/src/Hero/{index.js → index.ts} +2 -0
- package/src/Image/{Image.jsx → Image.tsx} +40 -30
- package/src/Image/{ImageLink.js → ImageLink.tsx} +11 -12
- package/src/Image/LazyLoadImage.tsx +40 -0
- package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +4 -3
- package/src/Image/{index.js → index.ts} +1 -0
- package/src/InfoBox/InfoBox.tsx +11 -0
- package/src/InfoBox/index.ts +1 -0
- package/src/InfoWidget/{InfoWidget.jsx → InfoWidget.tsx} +19 -26
- package/src/InfoWidget/{index.js → index.ts} +0 -0
- package/src/Logo/{Logo.jsx → Logo.tsx} +21 -28
- package/src/Logo/{SvgLogo.jsx → SvgLogo.tsx} +8 -14
- package/src/Logo/{index.js → index.ts} +0 -0
- package/src/Masthead/{Masthead.jsx → Masthead.tsx} +33 -35
- package/src/Masthead/{index.js → index.ts} +0 -0
- package/src/NoContentBox/{NoContentBox.jsx → NoContentBox.tsx} +7 -13
- package/src/NoContentBox/{index.js → index.ts} +0 -0
- package/src/Portrait/{Portrait.jsx → Portrait.tsx} +8 -14
- package/src/Portrait/{index.js → index.ts} +0 -0
- package/src/RelatedArticleList/{RelatedArticleList.jsx → RelatedArticleList.tsx} +43 -30
- package/src/RelatedArticleList/{index.js → index.ts} +0 -0
- package/src/ResourcesWrapper/{ResourcesTitle.jsx → ResourcesTitle.tsx} +5 -7
- package/src/ResourcesWrapper/{ResourcesTopicTitle.jsx → ResourcesTopicTitle.tsx} +23 -22
- package/src/ResourcesWrapper/{ResourcesWrapper.jsx → ResourcesWrapper.tsx} +9 -14
- package/src/ResourcesWrapper/{index.js → index.ts} +0 -0
- package/src/Topic/Topic.tsx +3 -4
- package/src/Translation/{Translation.jsx → Translation.tsx} +7 -8
- package/src/Translation/TranslationBox.tsx +20 -0
- package/src/Translation/{TranslationLine.jsx → TranslationLine.tsx} +11 -18
- package/src/Translation/index.ts +3 -0
- package/src/index-javascript.js +0 -33
- package/src/index.ts +43 -0
- package/src/locale/messages-en.ts +4 -0
- package/src/locale/messages-nb.ts +5 -1
- package/src/locale/messages-nn.ts +5 -1
- package/src/utils/{createUniversalPortal.jsx → createUniversalPortal.tsx} +3 -3
- package/es/Image/shapes.js +0 -18
- package/lib/Image/shapes.js +0 -33
- package/src/BackgroundImage/BackgroundImage.jsx +0 -39
- package/src/FileList/FileList.jsx +0 -36
- package/src/Hero/Hero.jsx +0 -38
- package/src/Image/LazyLoadImage.jsx +0 -39
- package/src/Image/shapes.js +0 -21
- package/src/InfoBox/InfoBox.jsx +0 -13
- package/src/Translation/TranslationBox.jsx +0 -12
package/lib/index.js
CHANGED
|
@@ -15,10 +15,26 @@ var _exportNames = {
|
|
|
15
15
|
ArticleHeaderWrapper: true,
|
|
16
16
|
ArticleSideBar: true,
|
|
17
17
|
Article: true,
|
|
18
|
+
ResourcesWrapper: true,
|
|
19
|
+
ResourcesTitle: true,
|
|
20
|
+
ResourcesTopicTitle: true,
|
|
21
|
+
createUniversalPortal: true,
|
|
22
|
+
NoContentBox: true,
|
|
23
|
+
Masthead: true,
|
|
24
|
+
MastheadItem: true,
|
|
25
|
+
Portrait: true,
|
|
26
|
+
ContentLoader: true,
|
|
27
|
+
RelatedArticleList: true,
|
|
28
|
+
RelatedArticle: true,
|
|
18
29
|
ErrorResourceAccessDenied: true,
|
|
19
30
|
ErrorMessage: true,
|
|
31
|
+
FileList: true,
|
|
32
|
+
File: true,
|
|
20
33
|
BlogPost: true,
|
|
21
34
|
BlogPostWrapper: true,
|
|
35
|
+
Logo: true,
|
|
36
|
+
InfoBox: true,
|
|
37
|
+
InfoWidget: true,
|
|
22
38
|
FrontpageInfo: true,
|
|
23
39
|
FrontpageFilm: true,
|
|
24
40
|
FrontpageToolbox: true,
|
|
@@ -27,10 +43,26 @@ var _exportNames = {
|
|
|
27
43
|
FrontpageSubjectIllustration: true,
|
|
28
44
|
FrontpageSearch: true,
|
|
29
45
|
FrontpageProgramMenu: true,
|
|
46
|
+
FactBox: true,
|
|
47
|
+
Image: true,
|
|
48
|
+
ImageLink: true,
|
|
49
|
+
makeSrcQueryString: true,
|
|
50
|
+
SubjectMaterialHero: true,
|
|
51
|
+
TasksAndActivitiesHero: true,
|
|
52
|
+
AssessmentResourcesHero: true,
|
|
53
|
+
SubjectHero: true,
|
|
54
|
+
ExternalLearningResourcesHero: true,
|
|
55
|
+
SourceMaterialHero: true,
|
|
56
|
+
Hero: true,
|
|
57
|
+
NdlaFilmHero: true,
|
|
30
58
|
Footer: true,
|
|
31
59
|
EditorName: true,
|
|
32
60
|
FooterText: true,
|
|
33
61
|
FooterAuth: true,
|
|
62
|
+
Figure: true,
|
|
63
|
+
FigureCaption: true,
|
|
64
|
+
FigureLicenseDialog: true,
|
|
65
|
+
FigureExpandButton: true,
|
|
34
66
|
LanguageSelector: true,
|
|
35
67
|
LearningPathWrapper: true,
|
|
36
68
|
LearningPathContent: true,
|
|
@@ -42,6 +74,10 @@ var _exportNames = {
|
|
|
42
74
|
LearningPathLastStepNavigation: true,
|
|
43
75
|
LearningPathMobileStepInfo: true,
|
|
44
76
|
LearningPathMobileHeader: true,
|
|
77
|
+
Translation: true,
|
|
78
|
+
TranslationLine: true,
|
|
79
|
+
TranslationBox: true,
|
|
80
|
+
Spinner: true,
|
|
45
81
|
SearchResultSleeve: true,
|
|
46
82
|
ContentTypeResult: true,
|
|
47
83
|
SearchFieldForm: true,
|
|
@@ -160,6 +196,72 @@ Object.defineProperty(exports, "Article", {
|
|
|
160
196
|
return _Article["default"];
|
|
161
197
|
}
|
|
162
198
|
});
|
|
199
|
+
Object.defineProperty(exports, "ResourcesWrapper", {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function get() {
|
|
202
|
+
return _ResourcesWrapper["default"];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
Object.defineProperty(exports, "ResourcesTitle", {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function get() {
|
|
208
|
+
return _ResourcesWrapper.ResourcesTitle;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
Object.defineProperty(exports, "ResourcesTopicTitle", {
|
|
212
|
+
enumerable: true,
|
|
213
|
+
get: function get() {
|
|
214
|
+
return _ResourcesWrapper.ResourcesTopicTitle;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
Object.defineProperty(exports, "createUniversalPortal", {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function get() {
|
|
220
|
+
return _createUniversalPortal.createUniversalPortal;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
Object.defineProperty(exports, "NoContentBox", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function get() {
|
|
226
|
+
return _NoContentBox["default"];
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(exports, "Masthead", {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function get() {
|
|
232
|
+
return _Masthead["default"];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
Object.defineProperty(exports, "MastheadItem", {
|
|
236
|
+
enumerable: true,
|
|
237
|
+
get: function get() {
|
|
238
|
+
return _Masthead.MastheadItem;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(exports, "Portrait", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function get() {
|
|
244
|
+
return _Portrait["default"];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
Object.defineProperty(exports, "ContentLoader", {
|
|
248
|
+
enumerable: true,
|
|
249
|
+
get: function get() {
|
|
250
|
+
return _ContentLoader["default"];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
Object.defineProperty(exports, "RelatedArticleList", {
|
|
254
|
+
enumerable: true,
|
|
255
|
+
get: function get() {
|
|
256
|
+
return _RelatedArticleList["default"];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
Object.defineProperty(exports, "RelatedArticle", {
|
|
260
|
+
enumerable: true,
|
|
261
|
+
get: function get() {
|
|
262
|
+
return _RelatedArticleList.RelatedArticle;
|
|
263
|
+
}
|
|
264
|
+
});
|
|
163
265
|
Object.defineProperty(exports, "ErrorResourceAccessDenied", {
|
|
164
266
|
enumerable: true,
|
|
165
267
|
get: function get() {
|
|
@@ -172,6 +274,18 @@ Object.defineProperty(exports, "ErrorMessage", {
|
|
|
172
274
|
return _ErrorMessage["default"];
|
|
173
275
|
}
|
|
174
276
|
});
|
|
277
|
+
Object.defineProperty(exports, "FileList", {
|
|
278
|
+
enumerable: true,
|
|
279
|
+
get: function get() {
|
|
280
|
+
return _FileList["default"];
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
Object.defineProperty(exports, "File", {
|
|
284
|
+
enumerable: true,
|
|
285
|
+
get: function get() {
|
|
286
|
+
return _FileList.File;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
175
289
|
Object.defineProperty(exports, "BlogPost", {
|
|
176
290
|
enumerable: true,
|
|
177
291
|
get: function get() {
|
|
@@ -184,6 +298,24 @@ Object.defineProperty(exports, "BlogPostWrapper", {
|
|
|
184
298
|
return _BlogPosts.BlogPostWrapper;
|
|
185
299
|
}
|
|
186
300
|
});
|
|
301
|
+
Object.defineProperty(exports, "Logo", {
|
|
302
|
+
enumerable: true,
|
|
303
|
+
get: function get() {
|
|
304
|
+
return _Logo["default"];
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
Object.defineProperty(exports, "InfoBox", {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
get: function get() {
|
|
310
|
+
return _InfoBox.InfoBox;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
Object.defineProperty(exports, "InfoWidget", {
|
|
314
|
+
enumerable: true,
|
|
315
|
+
get: function get() {
|
|
316
|
+
return _InfoWidget["default"];
|
|
317
|
+
}
|
|
318
|
+
});
|
|
187
319
|
Object.defineProperty(exports, "FrontpageInfo", {
|
|
188
320
|
enumerable: true,
|
|
189
321
|
get: function get() {
|
|
@@ -232,6 +364,78 @@ Object.defineProperty(exports, "FrontpageProgramMenu", {
|
|
|
232
364
|
return _Frontpage.FrontpageProgramMenu;
|
|
233
365
|
}
|
|
234
366
|
});
|
|
367
|
+
Object.defineProperty(exports, "FactBox", {
|
|
368
|
+
enumerable: true,
|
|
369
|
+
get: function get() {
|
|
370
|
+
return _FactBox["default"];
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
Object.defineProperty(exports, "Image", {
|
|
374
|
+
enumerable: true,
|
|
375
|
+
get: function get() {
|
|
376
|
+
return _Image["default"];
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
Object.defineProperty(exports, "ImageLink", {
|
|
380
|
+
enumerable: true,
|
|
381
|
+
get: function get() {
|
|
382
|
+
return _Image.ImageLink;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
Object.defineProperty(exports, "makeSrcQueryString", {
|
|
386
|
+
enumerable: true,
|
|
387
|
+
get: function get() {
|
|
388
|
+
return _Image.makeSrcQueryString;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
Object.defineProperty(exports, "SubjectMaterialHero", {
|
|
392
|
+
enumerable: true,
|
|
393
|
+
get: function get() {
|
|
394
|
+
return _Hero.SubjectMaterialHero;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
Object.defineProperty(exports, "TasksAndActivitiesHero", {
|
|
398
|
+
enumerable: true,
|
|
399
|
+
get: function get() {
|
|
400
|
+
return _Hero.TasksAndActivitiesHero;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
Object.defineProperty(exports, "AssessmentResourcesHero", {
|
|
404
|
+
enumerable: true,
|
|
405
|
+
get: function get() {
|
|
406
|
+
return _Hero.AssessmentResourcesHero;
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
Object.defineProperty(exports, "SubjectHero", {
|
|
410
|
+
enumerable: true,
|
|
411
|
+
get: function get() {
|
|
412
|
+
return _Hero.SubjectHero;
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
Object.defineProperty(exports, "ExternalLearningResourcesHero", {
|
|
416
|
+
enumerable: true,
|
|
417
|
+
get: function get() {
|
|
418
|
+
return _Hero.ExternalLearningResourcesHero;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
Object.defineProperty(exports, "SourceMaterialHero", {
|
|
422
|
+
enumerable: true,
|
|
423
|
+
get: function get() {
|
|
424
|
+
return _Hero.SourceMaterialHero;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
Object.defineProperty(exports, "Hero", {
|
|
428
|
+
enumerable: true,
|
|
429
|
+
get: function get() {
|
|
430
|
+
return _Hero.Hero;
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
Object.defineProperty(exports, "NdlaFilmHero", {
|
|
434
|
+
enumerable: true,
|
|
435
|
+
get: function get() {
|
|
436
|
+
return _Hero.NdlaFilmHero;
|
|
437
|
+
}
|
|
438
|
+
});
|
|
235
439
|
Object.defineProperty(exports, "Footer", {
|
|
236
440
|
enumerable: true,
|
|
237
441
|
get: function get() {
|
|
@@ -256,6 +460,30 @@ Object.defineProperty(exports, "FooterAuth", {
|
|
|
256
460
|
return _Footer.FooterAuth;
|
|
257
461
|
}
|
|
258
462
|
});
|
|
463
|
+
Object.defineProperty(exports, "Figure", {
|
|
464
|
+
enumerable: true,
|
|
465
|
+
get: function get() {
|
|
466
|
+
return _Figure.Figure;
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
Object.defineProperty(exports, "FigureCaption", {
|
|
470
|
+
enumerable: true,
|
|
471
|
+
get: function get() {
|
|
472
|
+
return _Figure.FigureCaption;
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
Object.defineProperty(exports, "FigureLicenseDialog", {
|
|
476
|
+
enumerable: true,
|
|
477
|
+
get: function get() {
|
|
478
|
+
return _Figure.FigureLicenseDialog;
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
Object.defineProperty(exports, "FigureExpandButton", {
|
|
482
|
+
enumerable: true,
|
|
483
|
+
get: function get() {
|
|
484
|
+
return _Figure.FigureExpandButton;
|
|
485
|
+
}
|
|
486
|
+
});
|
|
259
487
|
Object.defineProperty(exports, "LanguageSelector", {
|
|
260
488
|
enumerable: true,
|
|
261
489
|
get: function get() {
|
|
@@ -322,6 +550,30 @@ Object.defineProperty(exports, "LearningPathMobileHeader", {
|
|
|
322
550
|
return _LearningPaths.LearningPathMobileHeader;
|
|
323
551
|
}
|
|
324
552
|
});
|
|
553
|
+
Object.defineProperty(exports, "Translation", {
|
|
554
|
+
enumerable: true,
|
|
555
|
+
get: function get() {
|
|
556
|
+
return _Translation.Translation;
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
Object.defineProperty(exports, "TranslationLine", {
|
|
560
|
+
enumerable: true,
|
|
561
|
+
get: function get() {
|
|
562
|
+
return _Translation.TranslationLine;
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
Object.defineProperty(exports, "TranslationBox", {
|
|
566
|
+
enumerable: true,
|
|
567
|
+
get: function get() {
|
|
568
|
+
return _Translation.TranslationBox;
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
Object.defineProperty(exports, "Spinner", {
|
|
572
|
+
enumerable: true,
|
|
573
|
+
get: function get() {
|
|
574
|
+
return _Spinner["default"];
|
|
575
|
+
}
|
|
576
|
+
});
|
|
325
577
|
Object.defineProperty(exports, "SearchResultSleeve", {
|
|
326
578
|
enumerable: true,
|
|
327
579
|
get: function get() {
|
|
@@ -716,18 +968,52 @@ Object.keys(_indexJavascript).forEach(function (key) {
|
|
|
716
968
|
|
|
717
969
|
var _Article = _interopRequireWildcard(require("./Article"));
|
|
718
970
|
|
|
971
|
+
var _ResourcesWrapper = _interopRequireWildcard(require("./ResourcesWrapper"));
|
|
972
|
+
|
|
973
|
+
var _createUniversalPortal = require("./utils/createUniversalPortal");
|
|
974
|
+
|
|
975
|
+
var _NoContentBox = _interopRequireDefault(require("./NoContentBox"));
|
|
976
|
+
|
|
977
|
+
var _Masthead = _interopRequireWildcard(require("./Masthead"));
|
|
978
|
+
|
|
979
|
+
var _Portrait = _interopRequireDefault(require("./Portrait"));
|
|
980
|
+
|
|
981
|
+
var _ContentLoader = _interopRequireDefault(require("./ContentLoader"));
|
|
982
|
+
|
|
983
|
+
var _RelatedArticleList = _interopRequireWildcard(require("./RelatedArticleList"));
|
|
984
|
+
|
|
719
985
|
var _ErrorMessage = _interopRequireWildcard(require("./ErrorMessage"));
|
|
720
986
|
|
|
987
|
+
var _FileList = _interopRequireWildcard(require("./FileList"));
|
|
988
|
+
|
|
721
989
|
var _BlogPosts = require("./BlogPosts");
|
|
722
990
|
|
|
991
|
+
var _Logo = _interopRequireDefault(require("./Logo"));
|
|
992
|
+
|
|
993
|
+
var _InfoBox = require("./InfoBox");
|
|
994
|
+
|
|
995
|
+
var _InfoWidget = _interopRequireDefault(require("./InfoWidget"));
|
|
996
|
+
|
|
723
997
|
var _Frontpage = require("./Frontpage");
|
|
724
998
|
|
|
999
|
+
var _FactBox = _interopRequireDefault(require("./FactBox"));
|
|
1000
|
+
|
|
1001
|
+
var _Image = _interopRequireWildcard(require("./Image"));
|
|
1002
|
+
|
|
1003
|
+
var _Hero = require("./Hero");
|
|
1004
|
+
|
|
725
1005
|
var _Footer = require("./Footer");
|
|
726
1006
|
|
|
1007
|
+
var _Figure = require("./Figure");
|
|
1008
|
+
|
|
727
1009
|
var _LanguageSelector = require("./LanguageSelector");
|
|
728
1010
|
|
|
729
1011
|
var _LearningPaths = require("./LearningPaths");
|
|
730
1012
|
|
|
1013
|
+
var _Translation = require("./Translation");
|
|
1014
|
+
|
|
1015
|
+
var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
1016
|
+
|
|
731
1017
|
var _SearchResultSleeve = _interopRequireDefault(require("./Search/SearchResultSleeve"));
|
|
732
1018
|
|
|
733
1019
|
var _ContentTypeResult = _interopRequireDefault(require("./Search/ContentTypeResult"));
|
|
@@ -779,6 +779,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
779
779
|
reuse: 'Use video',
|
|
780
780
|
error: 'Sorry, an error occurred while loading the video or metadata about the video.'
|
|
781
781
|
},
|
|
782
|
+
other: {
|
|
783
|
+
download: 'Download content',
|
|
784
|
+
reuse: 'Use content'
|
|
785
|
+
},
|
|
782
786
|
concept: {
|
|
783
787
|
showDescription: 'Show concept description',
|
|
784
788
|
error: {
|
|
@@ -515,7 +515,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
515
515
|
es: 'Spansk',
|
|
516
516
|
zh: 'Kinesisk',
|
|
517
517
|
unknown: 'Ukjent',
|
|
518
|
-
prefixChangeLanguage: 'Velg
|
|
518
|
+
prefixChangeLanguage: 'Velg språk'
|
|
519
519
|
},
|
|
520
520
|
changeLanguage: {
|
|
521
521
|
nb: 'Endre språk til bokmål',
|
|
@@ -779,6 +779,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
779
779
|
reuse: 'Bruk video',
|
|
780
780
|
error: 'Beklager, en feil oppstod ved lasting av videoen eller metadata om videoen.'
|
|
781
781
|
},
|
|
782
|
+
other: {
|
|
783
|
+
download: 'Last ned innhold',
|
|
784
|
+
reuse: 'Bruk innhold'
|
|
785
|
+
},
|
|
782
786
|
concept: {
|
|
783
787
|
showDescription: 'Vis beskrivelsen av forklaringen.',
|
|
784
788
|
error: {
|
|
@@ -515,7 +515,7 @@ var messages = _objectSpread(_objectSpread({
|
|
|
515
515
|
es: 'Spansk',
|
|
516
516
|
zh: 'Kinesisk',
|
|
517
517
|
unknown: 'Ukjent',
|
|
518
|
-
prefixChangeLanguage: 'Vel
|
|
518
|
+
prefixChangeLanguage: 'Vel språk'
|
|
519
519
|
},
|
|
520
520
|
changeLanguage: {
|
|
521
521
|
nb: 'Endre språk til bokmål',
|
|
@@ -779,6 +779,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
779
779
|
reuse: 'Bruk video',
|
|
780
780
|
error: 'Orsak, ein feil oppstod ved lasting av videoen eller metadata om videoen.'
|
|
781
781
|
},
|
|
782
|
+
other: {
|
|
783
|
+
download: 'Last ned innhald',
|
|
784
|
+
reuse: 'Bruk innhald'
|
|
785
|
+
},
|
|
782
786
|
concept: {
|
|
783
787
|
showDescription: 'Vis skildring av forklaringa',
|
|
784
788
|
error: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
export declare function createUniversalPortal(children: ReactNode, selector: string): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.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/button": "^1.
|
|
34
|
+
"@ndla/button": "^1.1.1",
|
|
35
35
|
"@ndla/carousel": "^1.0.6",
|
|
36
36
|
"@ndla/core": "^0.7.2",
|
|
37
37
|
"@ndla/hooks": "^1.0.6",
|
|
38
38
|
"@ndla/icons": "^1.3.1",
|
|
39
39
|
"@ndla/licenses": "^1.0.7",
|
|
40
|
-
"@ndla/modal": "^1.1.
|
|
40
|
+
"@ndla/modal": "^1.1.13",
|
|
41
41
|
"@ndla/safelink": "^1.0.5",
|
|
42
42
|
"@ndla/switch": "^0.0.32",
|
|
43
|
-
"@ndla/tabs": "^1.0.
|
|
44
|
-
"@ndla/tooltip": "^0.2.
|
|
43
|
+
"@ndla/tabs": "^1.0.11",
|
|
44
|
+
"@ndla/tooltip": "^0.2.49",
|
|
45
45
|
"@ndla/util": "^2.0.0",
|
|
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": "
|
|
95
|
+
"gitHead": "04aa8900a09da5b5831aa4778c8f9bd95cb98e90"
|
|
96
96
|
}
|
|
@@ -22,7 +22,10 @@ const ButtonWrapper = styled.div`
|
|
|
22
22
|
width: 100%;
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
type CursorWrapperProps = {
|
|
26
|
+
hide: boolean;
|
|
27
|
+
};
|
|
28
|
+
const CursorWrapper = styled.div<CursorWrapperProps>`
|
|
26
29
|
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light+Two&display=swap');
|
|
27
30
|
width: 120px;
|
|
28
31
|
font-family: 'Shadows Into Light Two', cursive;
|
|
@@ -30,12 +33,15 @@ const CursorWrapper = styled.div`
|
|
|
30
33
|
background-image: url("data:image/svg+xml,%3Csvg width='10' height='46' viewBox='0 0 10 46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.7626 0.887965L4.52762 0.446621L3.64494 0.91658L3.87992 1.35792L4.7626 0.887965ZM8.03372 45.2321L8.46374 39.4747L3.26262 41.981L8.03372 45.2321ZM4.32126 1.12294C3.87992 1.35792 3.8798 1.3577 3.87969 1.3575C3.87968 1.35748 3.87959 1.35731 3.87956 1.35726C3.87951 1.35716 3.87952 1.35717 3.87959 1.35731C3.87973 1.35758 3.88012 1.35832 3.88076 1.35954C3.88203 1.36199 3.88428 1.36633 3.88747 1.3726C3.89384 1.38513 3.90397 1.40533 3.91755 1.43329C3.9447 1.48921 3.98562 1.57616 4.0378 1.69484C4.14215 1.9322 4.29157 2.29653 4.46596 2.79343C4.8147 3.78714 5.2635 5.31159 5.65136 7.41155C6.42699 11.611 6.95965 18.1161 5.95809 27.2851L6.95217 27.3937C7.96354 18.1349 7.42926 11.5317 6.63473 7.22992C6.2375 5.07924 5.77541 3.5048 5.40953 2.46228C5.22661 1.94106 5.06779 1.55294 4.95323 1.29237C4.89595 1.16209 4.84974 1.06371 4.81713 0.996535C4.80082 0.96295 4.78791 0.937167 4.77872 0.9191C4.77413 0.910067 4.77046 0.902963 4.76776 0.897778C4.76641 0.895185 4.7653 0.893072 4.76444 0.891437C4.76401 0.890619 4.76364 0.889921 4.76333 0.889343C4.76318 0.889054 4.763 0.888709 4.76292 0.888565C4.76276 0.88825 4.7626 0.887965 4.32126 1.12294ZM5.95809 27.2851C5.19358 34.284 5.23105 38.5891 5.58488 41.2448L6.57612 41.1128C6.23761 38.5721 6.19146 34.3579 6.95217 27.3937L5.95809 27.2851Z' fill='%2320588F'/%3E%3C/svg%3E%0A");
|
|
31
34
|
background-position: bottom center;
|
|
32
35
|
background-repeat: no-repeat;
|
|
36
|
+
${(p) => p.hide && 'opacity:0;'}
|
|
37
|
+
transition-duration: 0.5s;
|
|
33
38
|
padding-bottom: 60px;
|
|
34
39
|
`;
|
|
35
40
|
|
|
36
41
|
const LinkText = styled.div`
|
|
37
42
|
transform: rotate(-4.15deg);
|
|
38
43
|
text-align: center;
|
|
44
|
+
|
|
39
45
|
${fonts.sizes('18px', '26px')};
|
|
40
46
|
`;
|
|
41
47
|
|
|
@@ -44,8 +50,15 @@ type Props = {
|
|
|
44
50
|
onLinkToResourcesClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
45
51
|
copyPageUrlLink?: string;
|
|
46
52
|
licenseBox?: React.ReactNode;
|
|
53
|
+
resourcesRef?: React.RefObject<HTMLElement>;
|
|
47
54
|
};
|
|
48
|
-
const ArticleSideBar = ({
|
|
55
|
+
const ArticleSideBar = ({
|
|
56
|
+
linkToResources,
|
|
57
|
+
onLinkToResourcesClick,
|
|
58
|
+
copyPageUrlLink,
|
|
59
|
+
licenseBox,
|
|
60
|
+
resourcesRef,
|
|
61
|
+
}: Props) => {
|
|
49
62
|
const { t } = useTranslation();
|
|
50
63
|
const copyLinkHandler = () => {
|
|
51
64
|
if (copyPageUrlLink) {
|
|
@@ -53,6 +66,21 @@ const ArticleSideBar = ({ linkToResources, onLinkToResourcesClick, copyPageUrlLi
|
|
|
53
66
|
}
|
|
54
67
|
};
|
|
55
68
|
|
|
69
|
+
const [hide, setHide] = React.useState(Boolean(false));
|
|
70
|
+
React.useEffect(() => {
|
|
71
|
+
window.onscroll = function () {
|
|
72
|
+
if (!resourcesRef?.current) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
//TOP
|
|
76
|
+
if (resourcesRef.current.getBoundingClientRect().top <= 0) {
|
|
77
|
+
setHide(true);
|
|
78
|
+
} else if (resourcesRef.current.getBoundingClientRect().top <= 0) {
|
|
79
|
+
setHide(false);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
|
|
56
84
|
return (
|
|
57
85
|
<Wrapper>
|
|
58
86
|
{copyPageUrlLink && (
|
|
@@ -87,7 +115,7 @@ const ArticleSideBar = ({ linkToResources, onLinkToResourcesClick, copyPageUrlLi
|
|
|
87
115
|
</Modal>
|
|
88
116
|
)}
|
|
89
117
|
{linkToResources && (
|
|
90
|
-
<CursorWrapper>
|
|
118
|
+
<CursorWrapper hide={hide}>
|
|
91
119
|
<LinkText>
|
|
92
120
|
<SafeLink
|
|
93
121
|
to={linkToResources}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BEMHelper from 'react-bem-helper';
|
|
3
|
+
|
|
4
|
+
const classes = BEMHelper('c-background-image');
|
|
5
|
+
|
|
6
|
+
type ImageType = 'mobile' | 'tablet' | 'desktop' | 'wide';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
showOverlay?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
images: {
|
|
12
|
+
url: string;
|
|
13
|
+
types: ImageType[];
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const BackgroundImage = ({ images, showOverlay = false }: Props) => (
|
|
18
|
+
<div {...classes('', { showOverlay })}>
|
|
19
|
+
{images &&
|
|
20
|
+
images.map((image) =>
|
|
21
|
+
image.types.map((type) => (
|
|
22
|
+
<div
|
|
23
|
+
key={`${image.url}${type}`}
|
|
24
|
+
{...classes('background', type)}
|
|
25
|
+
style={{ backgroundImage: `url(${image.url})` }}
|
|
26
|
+
/>
|
|
27
|
+
)),
|
|
28
|
+
)}
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export default BackgroundImage;
|
|
File without changes
|