@ndla/ui 11.0.1 → 11.1.2
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/Notion/ConceptNotion.js +5 -3
- package/es/Notion/FigureNotion.js +4 -3
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +14 -0
- package/es/locale/messages-nb.js +14 -0
- package/es/locale/messages-nn.js +14 -0
- package/es/locale/messages-se.js +14 -0
- package/es/locale/messages-sma.js +14 -0
- package/lib/Notion/ConceptNotion.d.ts +3 -1
- package/lib/Notion/ConceptNotion.js +5 -3
- package/lib/Notion/FigureNotion.d.ts +3 -1
- package/lib/Notion/FigureNotion.js +4 -3
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.d.ts +14 -0
- package/lib/locale/messages-en.js +14 -0
- package/lib/locale/messages-nb.d.ts +14 -0
- package/lib/locale/messages-nb.js +14 -0
- package/lib/locale/messages-nn.d.ts +14 -0
- package/lib/locale/messages-nn.js +14 -0
- package/lib/locale/messages-se.d.ts +14 -0
- package/lib/locale/messages-se.js +14 -0
- package/lib/locale/messages-sma.d.ts +14 -0
- package/lib/locale/messages-sma.js +14 -0
- package/package.json +3 -3
- package/src/Article/component.article.scss +5 -2
- package/src/Notion/ConceptNotion.tsx +5 -2
- package/src/Notion/FigureNotion.tsx +4 -2
- package/src/locale/messages-en.ts +14 -0
- package/src/locale/messages-nb.ts +14 -0
- package/src/locale/messages-nn.ts +14 -0
- package/src/locale/messages-se.ts +14 -0
- package/src/locale/messages-sma.ts +14 -0
|
@@ -841,6 +841,20 @@ declare const messages: {
|
|
|
841
841
|
close: string;
|
|
842
842
|
title: string;
|
|
843
843
|
image: {
|
|
844
|
+
altText: string;
|
|
845
|
+
caption: string;
|
|
846
|
+
type: string;
|
|
847
|
+
width: string;
|
|
848
|
+
height: string;
|
|
849
|
+
size: string;
|
|
850
|
+
modelReleased: {
|
|
851
|
+
label: string;
|
|
852
|
+
yes: string;
|
|
853
|
+
no: string;
|
|
854
|
+
'not-applicable': string;
|
|
855
|
+
'not-set': string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
844
858
|
download: string;
|
|
845
859
|
reuse: string;
|
|
846
860
|
largeSize: string;
|
|
@@ -781,6 +781,20 @@ var messages = _objectSpread(_objectSpread({
|
|
|
781
781
|
close: 'Close',
|
|
782
782
|
title: 'Title',
|
|
783
783
|
image: {
|
|
784
|
+
altText: 'Alt-text',
|
|
785
|
+
caption: 'Caption',
|
|
786
|
+
type: 'File type',
|
|
787
|
+
width: 'Width',
|
|
788
|
+
height: 'Height',
|
|
789
|
+
size: 'Size (bytes)',
|
|
790
|
+
modelReleased: {
|
|
791
|
+
label: 'Model released',
|
|
792
|
+
yes: 'Yes',
|
|
793
|
+
no: 'No',
|
|
794
|
+
'not-applicable': 'Not applicable',
|
|
795
|
+
'not-set': 'Not set',
|
|
796
|
+
description: 'Whether the image is model released or not:'
|
|
797
|
+
},
|
|
784
798
|
download: 'Download image',
|
|
785
799
|
reuse: 'Use image',
|
|
786
800
|
largeSize: 'View original',
|
|
@@ -841,6 +841,20 @@ declare const messages: {
|
|
|
841
841
|
close: string;
|
|
842
842
|
title: string;
|
|
843
843
|
image: {
|
|
844
|
+
altText: string;
|
|
845
|
+
caption: string;
|
|
846
|
+
type: string;
|
|
847
|
+
width: string;
|
|
848
|
+
height: string;
|
|
849
|
+
size: string;
|
|
850
|
+
modelReleased: {
|
|
851
|
+
label: string;
|
|
852
|
+
yes: string;
|
|
853
|
+
no: string;
|
|
854
|
+
'not-applicable': string;
|
|
855
|
+
'not-set': string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
844
858
|
download: string;
|
|
845
859
|
reuse: string;
|
|
846
860
|
largeSize: string;
|
|
@@ -781,6 +781,20 @@ var messages = _objectSpread(_objectSpread({
|
|
|
781
781
|
close: 'Lukk',
|
|
782
782
|
title: 'Tittel',
|
|
783
783
|
image: {
|
|
784
|
+
altText: 'Alt-tekst',
|
|
785
|
+
caption: 'Bildetekst',
|
|
786
|
+
type: 'Filtype',
|
|
787
|
+
width: 'Bredde',
|
|
788
|
+
height: 'Høyde',
|
|
789
|
+
size: 'Størrelse (bytes)',
|
|
790
|
+
modelReleased: {
|
|
791
|
+
label: 'Modellklarert',
|
|
792
|
+
yes: 'Ja',
|
|
793
|
+
no: 'Nei',
|
|
794
|
+
'not-applicable': 'Ikke relevant',
|
|
795
|
+
'not-set': 'Ikke valgt',
|
|
796
|
+
description: 'Om bildet er modellklarert eller ikke:'
|
|
797
|
+
},
|
|
784
798
|
download: 'Last ned bildet',
|
|
785
799
|
reuse: 'Bruk bildet',
|
|
786
800
|
largeSize: 'Se stor utgave av bilde',
|
|
@@ -841,6 +841,20 @@ declare const messages: {
|
|
|
841
841
|
close: string;
|
|
842
842
|
title: string;
|
|
843
843
|
image: {
|
|
844
|
+
altText: string;
|
|
845
|
+
caption: string;
|
|
846
|
+
type: string;
|
|
847
|
+
width: string;
|
|
848
|
+
height: string;
|
|
849
|
+
size: string;
|
|
850
|
+
modelReleased: {
|
|
851
|
+
label: string;
|
|
852
|
+
yes: string;
|
|
853
|
+
no: string;
|
|
854
|
+
'not-applicable': string;
|
|
855
|
+
'not-set': string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
844
858
|
download: string;
|
|
845
859
|
reuse: string;
|
|
846
860
|
largeSize: string;
|
|
@@ -781,6 +781,20 @@ var messages = _objectSpread(_objectSpread({
|
|
|
781
781
|
close: 'Lukk',
|
|
782
782
|
title: 'Tittel',
|
|
783
783
|
image: {
|
|
784
|
+
altText: 'Alt-tekst',
|
|
785
|
+
caption: 'Bilettekst',
|
|
786
|
+
type: 'Filtype',
|
|
787
|
+
width: 'Breidde',
|
|
788
|
+
height: 'Høgde',
|
|
789
|
+
size: 'Størrelse (bytes)',
|
|
790
|
+
modelReleased: {
|
|
791
|
+
label: 'Modellklarert',
|
|
792
|
+
yes: 'Ja',
|
|
793
|
+
no: 'Nei',
|
|
794
|
+
'not-applicable': 'Ikkje relevant',
|
|
795
|
+
'not-set': 'Ikkje valgt',
|
|
796
|
+
description: 'Om bildet er modellklarert eller ikkje:'
|
|
797
|
+
},
|
|
784
798
|
download: 'Last ned biletet',
|
|
785
799
|
reuse: 'Bruk biletet',
|
|
786
800
|
largeSize: 'Sjå stor utgave av biletet',
|
|
@@ -841,6 +841,20 @@ declare const messages: {
|
|
|
841
841
|
close: string;
|
|
842
842
|
title: string;
|
|
843
843
|
image: {
|
|
844
|
+
altText: string;
|
|
845
|
+
caption: string;
|
|
846
|
+
type: string;
|
|
847
|
+
width: string;
|
|
848
|
+
height: string;
|
|
849
|
+
size: string;
|
|
850
|
+
modelReleased: {
|
|
851
|
+
label: string;
|
|
852
|
+
yes: string;
|
|
853
|
+
no: string;
|
|
854
|
+
'not-applicable': string;
|
|
855
|
+
'not-set': string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
844
858
|
download: string;
|
|
845
859
|
reuse: string;
|
|
846
860
|
largeSize: string;
|
|
@@ -781,6 +781,20 @@ var messages = _objectSpread(_objectSpread({
|
|
|
781
781
|
close: 'Lukk',
|
|
782
782
|
title: 'Tittel',
|
|
783
783
|
image: {
|
|
784
|
+
altText: 'Alt-tekst',
|
|
785
|
+
caption: 'Bilettekst',
|
|
786
|
+
type: 'Filtype',
|
|
787
|
+
width: 'Breidde',
|
|
788
|
+
height: 'Høgde',
|
|
789
|
+
size: 'Størrelse (bytes)',
|
|
790
|
+
modelReleased: {
|
|
791
|
+
label: 'Modellklarert',
|
|
792
|
+
yes: 'Ja',
|
|
793
|
+
no: 'Nei',
|
|
794
|
+
'not-applicable': 'Ikkje relevant',
|
|
795
|
+
'not-set': 'Ikkje valgt',
|
|
796
|
+
description: 'Om bildet er modellklarert eller ikkje:'
|
|
797
|
+
},
|
|
784
798
|
download: 'Last ned bildet',
|
|
785
799
|
reuse: 'Bruk bildet',
|
|
786
800
|
largeSize: 'Se stor utgave av bilde',
|
|
@@ -841,6 +841,20 @@ declare const messages: {
|
|
|
841
841
|
close: string;
|
|
842
842
|
title: string;
|
|
843
843
|
image: {
|
|
844
|
+
altText: string;
|
|
845
|
+
imageText: string;
|
|
846
|
+
type: string;
|
|
847
|
+
width: string;
|
|
848
|
+
height: string;
|
|
849
|
+
size: string;
|
|
850
|
+
modelReleased: {
|
|
851
|
+
label: string;
|
|
852
|
+
yes: string;
|
|
853
|
+
no: string;
|
|
854
|
+
'not-applicable': string;
|
|
855
|
+
'not-set': string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
844
858
|
download: string;
|
|
845
859
|
reuse: string;
|
|
846
860
|
largeSize: string;
|
|
@@ -781,6 +781,20 @@ var messages = _objectSpread(_objectSpread({
|
|
|
781
781
|
close: 'Lukk',
|
|
782
782
|
title: 'Tittel',
|
|
783
783
|
image: {
|
|
784
|
+
altText: 'Alt-tekst',
|
|
785
|
+
imageText: 'Bilettekst',
|
|
786
|
+
type: 'Filtype',
|
|
787
|
+
width: 'Breidde',
|
|
788
|
+
height: 'Høgde',
|
|
789
|
+
size: 'Størrelse (bytes)',
|
|
790
|
+
modelReleased: {
|
|
791
|
+
label: 'Modellklarert',
|
|
792
|
+
yes: 'Ja',
|
|
793
|
+
no: 'Nei',
|
|
794
|
+
'not-applicable': 'Ikkje relevant',
|
|
795
|
+
'not-set': 'Ikkje valgt',
|
|
796
|
+
description: 'Om bildet er modellklarert eller ikkje:'
|
|
797
|
+
},
|
|
784
798
|
download: 'Last ned bildet',
|
|
785
799
|
reuse: 'Bruk bildet',
|
|
786
800
|
largeSize: 'Se stor utgave av bilde',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.2",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@ndla/icons": "^1.7.0",
|
|
39
39
|
"@ndla/licenses": "^4.1.0",
|
|
40
40
|
"@ndla/modal": "^1.2.6",
|
|
41
|
-
"@ndla/notion": "^3.1.
|
|
41
|
+
"@ndla/notion": "^3.1.1",
|
|
42
42
|
"@ndla/safelink": "^1.1.7",
|
|
43
43
|
"@ndla/switch": "^0.1.5",
|
|
44
44
|
"@ndla/tabs": "^1.1.5",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8a59a8f8007cfe393447f430de2e7c87cd5789f5"
|
|
85
85
|
}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
@include font-size(18px, 29px);
|
|
25
25
|
position: relative;
|
|
26
26
|
|
|
27
|
+
mjx-stretchy-v > mjx-ext > mjx-c {
|
|
28
|
+
transform: scaleY(200) translateY(0.075em);
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
> section > p {
|
|
28
32
|
&:not([class]) {
|
|
29
33
|
margin-bottom: 29px;
|
|
@@ -117,7 +121,7 @@
|
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
&--multidisciplinary-topic {
|
|
120
|
-
margin-top:0;
|
|
124
|
+
margin-top: 0;
|
|
121
125
|
padding: $spacing--small;
|
|
122
126
|
@include mq(tablet) {
|
|
123
127
|
padding: 0;
|
|
@@ -206,4 +210,3 @@
|
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
}
|
|
209
|
-
|
|
@@ -18,6 +18,7 @@ import { NotionImage } from './NotionImage';
|
|
|
18
18
|
import NotionVisualElement, { NotionVisualElementType } from './NotionVisualElement';
|
|
19
19
|
import FigureNotion from './FigureNotion';
|
|
20
20
|
import { Copyright } from '../types';
|
|
21
|
+
import { FigureType } from '../Figure';
|
|
21
22
|
|
|
22
23
|
const ImageWrapper = styled.div`
|
|
23
24
|
float: right;
|
|
@@ -47,9 +48,10 @@ interface Props {
|
|
|
47
48
|
concept: ConceptNotionType;
|
|
48
49
|
disableScripts?: boolean;
|
|
49
50
|
hideIconsAndAuthors?: boolean;
|
|
51
|
+
figureType?: FigureType;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
const ConceptNotion = ({ concept, disableScripts, type, hideIconsAndAuthors }: Props) => {
|
|
54
|
+
const ConceptNotion = ({ concept, disableScripts, type, hideIconsAndAuthors, figureType }: Props) => {
|
|
53
55
|
const notionId = `notion-${concept.id}`;
|
|
54
56
|
const figureId = `notion-figure-${concept.id}`;
|
|
55
57
|
const visualElementId = `visual-element-${concept.id}`;
|
|
@@ -69,7 +71,8 @@ const ConceptNotion = ({ concept, disableScripts, type, hideIconsAndAuthors }: P
|
|
|
69
71
|
copyright={concept.copyright}
|
|
70
72
|
licenseString={concept.copyright?.license?.license ?? ''}
|
|
71
73
|
type="concept"
|
|
72
|
-
hideIconsAndAuthors={hideIconsAndAuthors}
|
|
74
|
+
hideIconsAndAuthors={hideIconsAndAuthors}
|
|
75
|
+
figureType={figureType}>
|
|
73
76
|
<UINotion
|
|
74
77
|
id={notionId}
|
|
75
78
|
title={concept.title}
|
|
@@ -10,7 +10,7 @@ import { colors, spacing } from '@ndla/core';
|
|
|
10
10
|
import { getGroupedContributorDescriptionList, getLicenseByAbbreviation } from '@ndla/licenses';
|
|
11
11
|
import React, { ReactNode } from 'react';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import { Figure, FigureCaption, FigureLicenseDialog } from '../Figure';
|
|
13
|
+
import { Figure, FigureCaption, FigureLicenseDialog, FigureType } from '../Figure';
|
|
14
14
|
import { Copyright } from '../types';
|
|
15
15
|
|
|
16
16
|
const BottomBorder = styled.div`
|
|
@@ -29,6 +29,7 @@ interface Props {
|
|
|
29
29
|
type: 'video' | 'h5p' | 'image' | 'concept' | 'other';
|
|
30
30
|
hideFigCaption?: boolean;
|
|
31
31
|
hideIconsAndAuthors?: boolean;
|
|
32
|
+
figureType?: FigureType;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
const FigureNotion = ({
|
|
@@ -42,6 +43,7 @@ const FigureNotion = ({
|
|
|
42
43
|
type,
|
|
43
44
|
hideFigCaption,
|
|
44
45
|
hideIconsAndAuthors,
|
|
46
|
+
figureType,
|
|
45
47
|
}: Props) => {
|
|
46
48
|
const { t, i18n } = useTranslation();
|
|
47
49
|
const license = getLicenseByAbbreviation(licenseString, i18n.language);
|
|
@@ -56,7 +58,7 @@ const FigureNotion = ({
|
|
|
56
58
|
).map((i) => ({ name: i.description, type: i.label }));
|
|
57
59
|
|
|
58
60
|
return (
|
|
59
|
-
<Figure resizeIframe={resizeIframe} id={figureId} type={'full-column'}>
|
|
61
|
+
<Figure resizeIframe={resizeIframe} id={figureId} type={figureType || 'full-column'}>
|
|
60
62
|
{({ typeClass }) => (
|
|
61
63
|
<>
|
|
62
64
|
{typeof children === 'function' ? children({ typeClass }) : children}
|
|
@@ -819,6 +819,20 @@ const messages = {
|
|
|
819
819
|
close: 'Close',
|
|
820
820
|
title: 'Title',
|
|
821
821
|
image: {
|
|
822
|
+
altText: 'Alt-text',
|
|
823
|
+
caption: 'Caption',
|
|
824
|
+
type: 'File type',
|
|
825
|
+
width: 'Width',
|
|
826
|
+
height: 'Height',
|
|
827
|
+
size: 'Size (bytes)',
|
|
828
|
+
modelReleased: {
|
|
829
|
+
label: 'Model released',
|
|
830
|
+
yes: 'Yes',
|
|
831
|
+
no: 'No',
|
|
832
|
+
'not-applicable': 'Not applicable',
|
|
833
|
+
'not-set': 'Not set',
|
|
834
|
+
description: 'Whether the image is model released or not:',
|
|
835
|
+
},
|
|
822
836
|
download: 'Download image',
|
|
823
837
|
reuse: 'Use image',
|
|
824
838
|
largeSize: 'View original',
|
|
@@ -817,6 +817,20 @@ const messages = {
|
|
|
817
817
|
close: 'Lukk',
|
|
818
818
|
title: 'Tittel',
|
|
819
819
|
image: {
|
|
820
|
+
altText: 'Alt-tekst',
|
|
821
|
+
caption: 'Bildetekst',
|
|
822
|
+
type: 'Filtype',
|
|
823
|
+
width: 'Bredde',
|
|
824
|
+
height: 'Høyde',
|
|
825
|
+
size: 'Størrelse (bytes)',
|
|
826
|
+
modelReleased: {
|
|
827
|
+
label: 'Modellklarert',
|
|
828
|
+
yes: 'Ja',
|
|
829
|
+
no: 'Nei',
|
|
830
|
+
'not-applicable': 'Ikke relevant',
|
|
831
|
+
'not-set': 'Ikke valgt',
|
|
832
|
+
description: 'Om bildet er modellklarert eller ikke:',
|
|
833
|
+
},
|
|
820
834
|
download: 'Last ned bildet',
|
|
821
835
|
reuse: 'Bruk bildet',
|
|
822
836
|
largeSize: 'Se stor utgave av bilde',
|
|
@@ -818,6 +818,20 @@ const messages = {
|
|
|
818
818
|
close: 'Lukk',
|
|
819
819
|
title: 'Tittel',
|
|
820
820
|
image: {
|
|
821
|
+
altText: 'Alt-tekst',
|
|
822
|
+
caption: 'Bilettekst',
|
|
823
|
+
type: 'Filtype',
|
|
824
|
+
width: 'Breidde',
|
|
825
|
+
height: 'Høgde',
|
|
826
|
+
size: 'Størrelse (bytes)',
|
|
827
|
+
modelReleased: {
|
|
828
|
+
label: 'Modellklarert',
|
|
829
|
+
yes: 'Ja',
|
|
830
|
+
no: 'Nei',
|
|
831
|
+
'not-applicable': 'Ikkje relevant',
|
|
832
|
+
'not-set': 'Ikkje valgt',
|
|
833
|
+
description: 'Om bildet er modellklarert eller ikkje:',
|
|
834
|
+
},
|
|
821
835
|
download: 'Last ned biletet',
|
|
822
836
|
reuse: 'Bruk biletet',
|
|
823
837
|
largeSize: 'Sjå stor utgave av biletet',
|
|
@@ -817,6 +817,20 @@ const messages = {
|
|
|
817
817
|
close: 'Lukk',
|
|
818
818
|
title: 'Tittel',
|
|
819
819
|
image: {
|
|
820
|
+
altText: 'Alt-tekst',
|
|
821
|
+
caption: 'Bilettekst',
|
|
822
|
+
type: 'Filtype',
|
|
823
|
+
width: 'Breidde',
|
|
824
|
+
height: 'Høgde',
|
|
825
|
+
size: 'Størrelse (bytes)',
|
|
826
|
+
modelReleased: {
|
|
827
|
+
label: 'Modellklarert',
|
|
828
|
+
yes: 'Ja',
|
|
829
|
+
no: 'Nei',
|
|
830
|
+
'not-applicable': 'Ikkje relevant',
|
|
831
|
+
'not-set': 'Ikkje valgt',
|
|
832
|
+
description: 'Om bildet er modellklarert eller ikkje:',
|
|
833
|
+
},
|
|
820
834
|
download: 'Last ned bildet',
|
|
821
835
|
reuse: 'Bruk bildet',
|
|
822
836
|
largeSize: 'Se stor utgave av bilde',
|
|
@@ -817,6 +817,20 @@ const messages = {
|
|
|
817
817
|
close: 'Lukk',
|
|
818
818
|
title: 'Tittel',
|
|
819
819
|
image: {
|
|
820
|
+
altText: 'Alt-tekst',
|
|
821
|
+
imageText: 'Bilettekst',
|
|
822
|
+
type: 'Filtype',
|
|
823
|
+
width: 'Breidde',
|
|
824
|
+
height: 'Høgde',
|
|
825
|
+
size: 'Størrelse (bytes)',
|
|
826
|
+
modelReleased: {
|
|
827
|
+
label: 'Modellklarert',
|
|
828
|
+
yes: 'Ja',
|
|
829
|
+
no: 'Nei',
|
|
830
|
+
'not-applicable': 'Ikkje relevant',
|
|
831
|
+
'not-set': 'Ikkje valgt',
|
|
832
|
+
description: 'Om bildet er modellklarert eller ikkje:',
|
|
833
|
+
},
|
|
820
834
|
download: 'Last ned bildet',
|
|
821
835
|
reuse: 'Bruk bildet',
|
|
822
836
|
largeSize: 'Se stor utgave av bilde',
|