@ndla/ui 33.2.0 → 33.3.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.
- package/es/Animation/DisplayOnPageYOffset.js +0 -6
- package/es/Article/ArticleHeaderWrapper.js +14 -56
- package/es/Aside/Aside.js +0 -9
- package/es/ContentTypeBadge/ContentTypeBadge.js +0 -10
- package/es/CopyParagraphButton/CopyParagraphButton.js +3 -3
- package/es/Figure/FigureLicenseDialog.js +1 -1
- package/es/Layout/Content.js +0 -4
- package/es/Layout/LayoutItem.js +0 -5
- package/es/Layout/OneColumn.js +0 -9
- package/es/Layout/PageContainer.js +0 -13
- package/es/LearningPaths/LearningPathSticky.js +3 -7
- package/es/Programme/Programme.js +6 -8
- package/es/Programme/ProgrammeSubjects.js +22 -20
- package/es/Table/Table.js +5 -31
- package/es/TopicMenu/SubtopicLinkList.js +5 -33
- package/es/TopicMenu/TopicMenu.js +1 -51
- package/es/TopicMenu/TopicMenuButton.js +1 -6
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +7 -2
- package/es/locale/messages-nb.js +7 -2
- package/es/locale/messages-nn.js +7 -2
- package/es/locale/messages-se.js +7 -2
- package/es/locale/messages-sma.js +7 -2
- package/lib/Animation/DisplayOnPageYOffset.d.ts +0 -6
- package/lib/Animation/DisplayOnPageYOffset.js +0 -6
- package/lib/Article/ArticleHeaderWrapper.d.ts +0 -5
- package/lib/Article/ArticleHeaderWrapper.js +15 -58
- package/lib/Aside/Aside.d.ts +1 -12
- package/lib/Aside/Aside.js +0 -9
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +0 -8
- package/lib/ContentTypeBadge/ContentTypeBadge.js +0 -9
- package/lib/CopyParagraphButton/CopyParagraphButton.js +3 -3
- package/lib/Figure/FigureLicenseDialog.js +1 -1
- package/lib/Layout/Content.d.ts +1 -7
- package/lib/Layout/Content.js +0 -4
- package/lib/Layout/LayoutItem.d.ts +1 -8
- package/lib/Layout/LayoutItem.js +0 -5
- package/lib/Layout/OneColumn.d.ts +1 -12
- package/lib/Layout/OneColumn.js +0 -9
- package/lib/Layout/PageContainer.d.ts +1 -16
- package/lib/Layout/PageContainer.js +0 -13
- package/lib/LearningPaths/LearningPathSticky.d.ts +1 -7
- package/lib/LearningPaths/LearningPathSticky.js +3 -7
- package/lib/Programme/Programme.d.ts +1 -1
- package/lib/Programme/Programme.js +6 -8
- package/lib/Programme/ProgrammeSubjects.d.ts +1 -2
- package/lib/Programme/ProgrammeSubjects.js +24 -19
- package/lib/Table/Table.d.ts +1 -5
- package/lib/Table/Table.js +5 -31
- package/lib/TopicMenu/SubtopicLinkList.js +5 -33
- package/lib/TopicMenu/TopicMenu.js +1 -51
- package/lib/TopicMenu/TopicMenuButton.js +1 -6
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.d.ts +5 -0
- package/lib/locale/messages-en.js +7 -2
- package/lib/locale/messages-nb.d.ts +5 -0
- package/lib/locale/messages-nb.js +7 -2
- package/lib/locale/messages-nn.d.ts +5 -0
- package/lib/locale/messages-nn.js +7 -2
- package/lib/locale/messages-se.d.ts +5 -0
- package/lib/locale/messages-se.js +7 -2
- package/lib/locale/messages-sma.d.ts +5 -0
- package/lib/locale/messages-sma.js +7 -2
- package/package.json +19 -20
- package/src/Animation/DisplayOnPageYOffset.tsx +0 -6
- package/src/Article/ArticleHeaderWrapper.tsx +5 -57
- package/src/Aside/Aside.tsx +0 -10
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +0 -11
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +1 -1
- package/src/Figure/FigureLicenseDialog.tsx +2 -2
- package/src/Layout/Content.tsx +0 -5
- package/src/Layout/LayoutItem.tsx +0 -6
- package/src/Layout/OneColumn.tsx +0 -10
- package/src/Layout/PageContainer.tsx +0 -15
- package/src/LearningPaths/LearningPathSticky.tsx +0 -5
- package/src/Programme/Programme.tsx +2 -10
- package/src/Programme/ProgrammeSubjects.tsx +31 -27
- package/src/Table/Table.tsx +2 -35
- package/src/Table/component.tables.scss +0 -33
- package/src/TopicMenu/SubtopicLinkList.jsx +0 -30
- package/src/TopicMenu/TopicMenu.jsx +0 -70
- package/src/TopicMenu/TopicMenuButton.jsx +0 -6
- package/src/locale/messages-en.ts +5 -0
- package/src/locale/messages-nb.ts +5 -0
- package/src/locale/messages-nn.ts +5 -0
- package/src/locale/messages-se.ts +5 -0
- package/src/locale/messages-sma.ts +5 -0
- package/src/main.scss +0 -1
- package/es/internal-icons/Book.js +0 -29
- package/es/internal-icons/Download.js +0 -28
- package/es/internal-icons/Embed.js +0 -26
- package/es/internal-icons/InsertTemplate.js +0 -29
- package/es/internal-icons/OpenWindow.js +0 -26
- package/es/shapes.js +0 -75
- package/lib/internal-icons/Book.js +0 -37
- package/lib/internal-icons/Download.js +0 -36
- package/lib/internal-icons/Embed.js +0 -34
- package/lib/internal-icons/InsertTemplate.js +0 -37
- package/lib/internal-icons/OpenWindow.js +0 -34
- package/lib/shapes.js +0 -96
- package/src/global/components/component.source-list.scss +0 -16
- package/src/internal-icons/Book.jsx +0 -22
- package/src/internal-icons/Download.jsx +0 -25
- package/src/internal-icons/Embed.jsx +0 -22
- package/src/internal-icons/InsertTemplate.jsx +0 -28
- package/src/internal-icons/OpenWindow.jsx +0 -22
- package/src/internal-icons/close.svg +0 -7
- package/src/shapes.js +0 -101
|
@@ -202,6 +202,9 @@ declare const messages: {
|
|
|
202
202
|
contact: string;
|
|
203
203
|
help: string;
|
|
204
204
|
};
|
|
205
|
+
programme: {
|
|
206
|
+
grades: string;
|
|
207
|
+
};
|
|
205
208
|
treeStructure: {
|
|
206
209
|
folderChildOptions: {
|
|
207
210
|
edit: string;
|
|
@@ -445,6 +448,7 @@ declare const messages: {
|
|
|
445
448
|
removeFavorite: string;
|
|
446
449
|
removeConfirmed: string;
|
|
447
450
|
addConfirmed: string;
|
|
451
|
+
shows: string;
|
|
448
452
|
};
|
|
449
453
|
topicPage: {
|
|
450
454
|
articleErrorDescription: string;
|
|
@@ -1006,6 +1010,7 @@ declare const messages: {
|
|
|
1006
1010
|
searching: string;
|
|
1007
1011
|
create: string;
|
|
1008
1012
|
isSelectedItem: string;
|
|
1013
|
+
selected: string;
|
|
1009
1014
|
};
|
|
1010
1015
|
blogPosts: {
|
|
1011
1016
|
blog1: {
|
|
@@ -251,7 +251,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
251
251
|
addFavorite: 'Add favorite subject',
|
|
252
252
|
removeFavorite: 'Remove favorite subject',
|
|
253
253
|
removeConfirmed: '{{subject}} is removed from your favorite subjects',
|
|
254
|
-
addConfirmed: '{{subject}} is added to your favorite subjects'
|
|
254
|
+
addConfirmed: '{{subject}} is added to your favorite subjects',
|
|
255
|
+
shows: 'Shows'
|
|
255
256
|
},
|
|
256
257
|
topicPage: {
|
|
257
258
|
articleErrorDescription: 'Sorry, an error occurred while loading the topic description.',
|
|
@@ -803,7 +804,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
803
804
|
numberHits: "Search returned {{hits}} hits",
|
|
804
805
|
searching: 'Searching...',
|
|
805
806
|
create: 'Create new',
|
|
806
|
-
isSelectedItem: 'Added'
|
|
807
|
+
isSelectedItem: 'Added',
|
|
808
|
+
selected: '{{count}} selected'
|
|
807
809
|
},
|
|
808
810
|
blogPosts: {
|
|
809
811
|
blog1: {
|
|
@@ -1147,6 +1149,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1147
1149
|
search: 'Search',
|
|
1148
1150
|
contact: 'Contact',
|
|
1149
1151
|
help: 'Help'
|
|
1152
|
+
},
|
|
1153
|
+
programme: {
|
|
1154
|
+
grades: 'Grades'
|
|
1150
1155
|
}
|
|
1151
1156
|
});
|
|
1152
1157
|
var _default = messages;
|
|
@@ -202,6 +202,9 @@ declare const messages: {
|
|
|
202
202
|
contact: string;
|
|
203
203
|
help: string;
|
|
204
204
|
};
|
|
205
|
+
programme: {
|
|
206
|
+
grades: string;
|
|
207
|
+
};
|
|
205
208
|
treeStructure: {
|
|
206
209
|
folderChildOptions: {
|
|
207
210
|
edit: string;
|
|
@@ -445,6 +448,7 @@ declare const messages: {
|
|
|
445
448
|
removeFavorite: string;
|
|
446
449
|
removeConfirmed: string;
|
|
447
450
|
addConfirmed: string;
|
|
451
|
+
shows: string;
|
|
448
452
|
};
|
|
449
453
|
topicPage: {
|
|
450
454
|
articleErrorDescription: string;
|
|
@@ -1006,6 +1010,7 @@ declare const messages: {
|
|
|
1006
1010
|
searching: string;
|
|
1007
1011
|
create: string;
|
|
1008
1012
|
isSelectedItem: string;
|
|
1013
|
+
selected: string;
|
|
1009
1014
|
};
|
|
1010
1015
|
blogPosts: {
|
|
1011
1016
|
blog1: {
|
|
@@ -251,7 +251,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
251
251
|
addFavorite: 'Legg til favorittfag',
|
|
252
252
|
removeFavorite: 'Fjern favorittfag',
|
|
253
253
|
removeConfirmed: '{{subject}} er fjernet fra favorittfag',
|
|
254
|
-
addConfirmed: '{{subject}} er lagt til som favorittfag'
|
|
254
|
+
addConfirmed: '{{subject}} er lagt til som favorittfag',
|
|
255
|
+
shows: 'Viser'
|
|
255
256
|
},
|
|
256
257
|
topicPage: {
|
|
257
258
|
articleErrorDescription: 'Beklager, en feil oppstod under lasting av emnebeskrivelsen.',
|
|
@@ -803,7 +804,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
803
804
|
numberHits: "S\xF8ket gav {{hits}} treff",
|
|
804
805
|
searching: 'Søker...',
|
|
805
806
|
create: 'Opprett ny',
|
|
806
|
-
isSelectedItem: 'Lagt til'
|
|
807
|
+
isSelectedItem: 'Lagt til',
|
|
808
|
+
selected: '{{count}} valgte'
|
|
807
809
|
},
|
|
808
810
|
blogPosts: {
|
|
809
811
|
blog1: {
|
|
@@ -1147,6 +1149,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1147
1149
|
search: 'Søk',
|
|
1148
1150
|
contact: 'Kontakt',
|
|
1149
1151
|
help: 'Hjelp'
|
|
1152
|
+
},
|
|
1153
|
+
programme: {
|
|
1154
|
+
grades: 'Trinn'
|
|
1150
1155
|
}
|
|
1151
1156
|
});
|
|
1152
1157
|
var _default = messages;
|
|
@@ -202,6 +202,9 @@ declare const messages: {
|
|
|
202
202
|
contact: string;
|
|
203
203
|
help: string;
|
|
204
204
|
};
|
|
205
|
+
programme: {
|
|
206
|
+
grades: string;
|
|
207
|
+
};
|
|
205
208
|
treeStructure: {
|
|
206
209
|
folderChildOptions: {
|
|
207
210
|
edit: string;
|
|
@@ -445,6 +448,7 @@ declare const messages: {
|
|
|
445
448
|
removeFavorite: string;
|
|
446
449
|
removeConfirmed: string;
|
|
447
450
|
addConfirmed: string;
|
|
451
|
+
shows: string;
|
|
448
452
|
};
|
|
449
453
|
topicPage: {
|
|
450
454
|
articleErrorDescription: string;
|
|
@@ -1006,6 +1010,7 @@ declare const messages: {
|
|
|
1006
1010
|
searching: string;
|
|
1007
1011
|
create: string;
|
|
1008
1012
|
isSelectedItem: string;
|
|
1013
|
+
selected: string;
|
|
1009
1014
|
};
|
|
1010
1015
|
blogPosts: {
|
|
1011
1016
|
blog1: {
|
|
@@ -251,7 +251,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
251
251
|
addFavorite: 'Legg til favorittfag',
|
|
252
252
|
removeFavorite: 'Fjern favorittfag',
|
|
253
253
|
removeConfirmed: '{{subject}} er fjerna frå favorittfag',
|
|
254
|
-
addConfirmed: '{{subject}} er lagt til som favorittfag'
|
|
254
|
+
addConfirmed: '{{subject}} er lagt til som favorittfag',
|
|
255
|
+
shows: 'Viser'
|
|
255
256
|
},
|
|
256
257
|
topicPage: {
|
|
257
258
|
articleErrorDescription: 'Orsak, ein feil oppstod under lasting av emneskildringa.',
|
|
@@ -803,7 +804,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
803
804
|
numberHits: "S\xF8ket gav {{hits}} treff",
|
|
804
805
|
searching: 'Søkjer...',
|
|
805
806
|
create: 'Opprett ny',
|
|
806
|
-
isSelectedItem: 'Lagt til'
|
|
807
|
+
isSelectedItem: 'Lagt til',
|
|
808
|
+
selected: '{{count}} valgte'
|
|
807
809
|
},
|
|
808
810
|
blogPosts: {
|
|
809
811
|
blog1: {
|
|
@@ -1147,6 +1149,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1147
1149
|
search: 'Søk',
|
|
1148
1150
|
contact: 'Kontakt',
|
|
1149
1151
|
help: 'Hjelp'
|
|
1152
|
+
},
|
|
1153
|
+
programme: {
|
|
1154
|
+
grades: 'Trinn'
|
|
1150
1155
|
}
|
|
1151
1156
|
});
|
|
1152
1157
|
var _default = messages;
|
|
@@ -202,6 +202,9 @@ declare const messages: {
|
|
|
202
202
|
contact: string;
|
|
203
203
|
help: string;
|
|
204
204
|
};
|
|
205
|
+
programme: {
|
|
206
|
+
grades: string;
|
|
207
|
+
};
|
|
205
208
|
treeStructure: {
|
|
206
209
|
folderChildOptions: {
|
|
207
210
|
edit: string;
|
|
@@ -445,6 +448,7 @@ declare const messages: {
|
|
|
445
448
|
removeFavorite: string;
|
|
446
449
|
removeConfirmed: string;
|
|
447
450
|
addConfirmed: string;
|
|
451
|
+
shows: string;
|
|
448
452
|
};
|
|
449
453
|
topicPage: {
|
|
450
454
|
articleErrorDescription: string;
|
|
@@ -1006,6 +1010,7 @@ declare const messages: {
|
|
|
1006
1010
|
searching: string;
|
|
1007
1011
|
create: string;
|
|
1008
1012
|
isSelectedItem: string;
|
|
1013
|
+
selected: string;
|
|
1009
1014
|
};
|
|
1010
1015
|
blogPosts: {
|
|
1011
1016
|
blog1: {
|
|
@@ -251,7 +251,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
251
251
|
addFavorite: 'Legg til favorittfag',
|
|
252
252
|
removeFavorite: 'Fjern favorittfag',
|
|
253
253
|
removeConfirmed: '{{subject}} er fjernet fra favorittfag',
|
|
254
|
-
addConfirmed: '{{subject}} er lagt til som favorittfag'
|
|
254
|
+
addConfirmed: '{{subject}} er lagt til som favorittfag',
|
|
255
|
+
shows: 'Viser'
|
|
255
256
|
},
|
|
256
257
|
topicPage: {
|
|
257
258
|
articleErrorDescription: 'Šállošat, boasttuvuohta čuožžilii fáddáčilgehusa viežžamis.',
|
|
@@ -803,7 +804,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
803
804
|
numberHits: "Ohcamis ledje {{hits}} deaivama",
|
|
804
805
|
searching: 'Ohcá...',
|
|
805
806
|
create: 'Ráhkat ođđa',
|
|
806
|
-
isSelectedItem: 'Lasihuvvon'
|
|
807
|
+
isSelectedItem: 'Lasihuvvon',
|
|
808
|
+
selected: '{{count}} valgte'
|
|
807
809
|
},
|
|
808
810
|
blogPosts: {
|
|
809
811
|
blog1: {
|
|
@@ -1147,6 +1149,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1147
1149
|
search: 'Oza',
|
|
1148
1150
|
contact: 'Váldde oktavuođa',
|
|
1149
1151
|
help: 'Veahket'
|
|
1152
|
+
},
|
|
1153
|
+
programme: {
|
|
1154
|
+
grades: 'Trinn'
|
|
1150
1155
|
}
|
|
1151
1156
|
});
|
|
1152
1157
|
var _default = messages;
|
|
@@ -202,6 +202,9 @@ declare const messages: {
|
|
|
202
202
|
contact: string;
|
|
203
203
|
help: string;
|
|
204
204
|
};
|
|
205
|
+
programme: {
|
|
206
|
+
grades: string;
|
|
207
|
+
};
|
|
205
208
|
treeStructure: {
|
|
206
209
|
folderChildOptions: {
|
|
207
210
|
edit: string;
|
|
@@ -445,6 +448,7 @@ declare const messages: {
|
|
|
445
448
|
removeFavorite: string;
|
|
446
449
|
removeConfirmed: string;
|
|
447
450
|
addConfirmed: string;
|
|
451
|
+
shows: string;
|
|
448
452
|
};
|
|
449
453
|
topicPage: {
|
|
450
454
|
articleErrorDescription: string;
|
|
@@ -1006,6 +1010,7 @@ declare const messages: {
|
|
|
1006
1010
|
searching: string;
|
|
1007
1011
|
create: string;
|
|
1008
1012
|
isSelectedItem: string;
|
|
1013
|
+
selected: string;
|
|
1009
1014
|
};
|
|
1010
1015
|
blogPosts: {
|
|
1011
1016
|
blog1: {
|
|
@@ -251,7 +251,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
251
251
|
addFavorite: 'Legg til favorittfag',
|
|
252
252
|
removeFavorite: 'Fjern favorittfag',
|
|
253
253
|
removeConfirmed: '{{subject}} er fjernet fra favorittfag',
|
|
254
|
-
addConfirmed: '{{subject}} er lagt til som favorittfag'
|
|
254
|
+
addConfirmed: '{{subject}} er lagt til som favorittfag',
|
|
255
|
+
shows: 'Viser'
|
|
255
256
|
},
|
|
256
257
|
topicPage: {
|
|
257
258
|
articleErrorDescription: 'Beklager, en feil oppstod under lasting av emnebeskrivelsen.',
|
|
@@ -803,7 +804,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
803
804
|
numberHits: "S\xF8ket gav {{hits}} treff",
|
|
804
805
|
searching: 'Søker...',
|
|
805
806
|
create: 'Opprett ny',
|
|
806
|
-
isSelectedItem: 'Lagt til'
|
|
807
|
+
isSelectedItem: 'Lagt til',
|
|
808
|
+
selected: '{{count}} valgte'
|
|
807
809
|
},
|
|
808
810
|
blogPosts: {
|
|
809
811
|
blog1: {
|
|
@@ -1147,6 +1149,9 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1147
1149
|
search: 'Søk',
|
|
1148
1150
|
contact: 'Kontakt',
|
|
1149
1151
|
help: 'Hjelp'
|
|
1152
|
+
},
|
|
1153
|
+
programme: {
|
|
1154
|
+
grades: 'Trinn'
|
|
1150
1155
|
}
|
|
1151
1156
|
});
|
|
1152
1157
|
var _default = messages;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.3.0",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/article-scripts": "^3.0.
|
|
35
|
-
"@ndla/button": "^7.0.
|
|
36
|
-
"@ndla/carousel": "^2.1.
|
|
34
|
+
"@ndla/article-scripts": "^3.0.14",
|
|
35
|
+
"@ndla/button": "^7.0.3",
|
|
36
|
+
"@ndla/carousel": "^2.1.1",
|
|
37
37
|
"@ndla/core": "^3.0.3",
|
|
38
|
-
"@ndla/forms": "^4.1.
|
|
38
|
+
"@ndla/forms": "^4.1.7",
|
|
39
39
|
"@ndla/hooks": "^1.2.0",
|
|
40
|
-
"@ndla/icons": "^2.1.
|
|
41
|
-
"@ndla/licenses": "^6.1.
|
|
42
|
-
"@ndla/modal": "^2.2.
|
|
43
|
-
"@ndla/notion": "^4.1.
|
|
44
|
-
"@ndla/safelink": "^3.1.
|
|
40
|
+
"@ndla/icons": "^2.1.1",
|
|
41
|
+
"@ndla/licenses": "^6.1.5",
|
|
42
|
+
"@ndla/modal": "^2.2.2",
|
|
43
|
+
"@ndla/notion": "^4.1.9",
|
|
44
|
+
"@ndla/safelink": "^3.1.7",
|
|
45
45
|
"@ndla/switch": "^1.0.3",
|
|
46
|
-
"@ndla/tabs": "^2.1.
|
|
47
|
-
"@ndla/tooltip": "^4.0.
|
|
46
|
+
"@ndla/tabs": "^2.1.1",
|
|
47
|
+
"@ndla/tooltip": "^4.0.3",
|
|
48
48
|
"@ndla/types-learningpath-api": "^0.0.17",
|
|
49
49
|
"@ndla/util": "^3.1.9",
|
|
50
50
|
"@reach/menu-button": "^0.16.2",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"invariant": "^2.2.3",
|
|
57
57
|
"react-bem-helper": "1.4.1",
|
|
58
58
|
"react-device-detect": "^2.2.2",
|
|
59
|
-
"react-select": "^5.
|
|
59
|
+
"react-select": "^5.7.0",
|
|
60
60
|
"react-swipeable": "^7.0.0",
|
|
61
61
|
"remarkable": "^2.0.1",
|
|
62
62
|
"shave": "^2.5.10"
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"@emotion/styled": "^11.10.4",
|
|
67
67
|
"i18next": "^21.9.2",
|
|
68
68
|
"lodash": "^4.17.20",
|
|
69
|
-
"prop-types": "^15.8.1",
|
|
70
69
|
"react": "^16.8.4 || ^17.0.0",
|
|
71
70
|
"react-i18next": "^11.18.6",
|
|
72
71
|
"react-router-dom": "^6.3.0"
|
|
@@ -74,14 +73,14 @@
|
|
|
74
73
|
"devDependencies": {
|
|
75
74
|
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
|
76
75
|
"@types/reach__dialog": "^0.1.0",
|
|
77
|
-
"css-loader": "^
|
|
78
|
-
"mini-css-extract-plugin": "^
|
|
79
|
-
"sass-loader": "^
|
|
80
|
-
"webpack": "^
|
|
81
|
-
"webpack-cli": "^
|
|
76
|
+
"css-loader": "^6.7.3",
|
|
77
|
+
"mini-css-extract-plugin": "^2.7.2",
|
|
78
|
+
"sass-loader": "^13.2.0",
|
|
79
|
+
"webpack": "^5.75.0",
|
|
80
|
+
"webpack-cli": "^5.0.1"
|
|
82
81
|
},
|
|
83
82
|
"publishConfig": {
|
|
84
83
|
"access": "public"
|
|
85
84
|
},
|
|
86
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "48dd90f1aea68b7f7107d331ea9ca9df4e51b3be"
|
|
87
86
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { Component, ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import throttle from 'lodash/throttle';
|
|
12
11
|
import Fade from './Fade';
|
|
13
12
|
|
|
@@ -60,11 +59,6 @@ export default class DisplayOnPageYOffset extends Component<Props, State> {
|
|
|
60
59
|
const { children } = this.props;
|
|
61
60
|
return <Fade show={this.state.show}>{children}</Fade>;
|
|
62
61
|
}
|
|
63
|
-
static propTypes = {
|
|
64
|
-
children: PropTypes.node.isRequired,
|
|
65
|
-
yOffsetMin: PropTypes.number.isRequired,
|
|
66
|
-
yOffsetMax: PropTypes.number,
|
|
67
|
-
};
|
|
68
62
|
|
|
69
63
|
static defaultProps = {
|
|
70
64
|
yOffsetMax: null,
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
import React, { ComponentType, ReactNode, useEffect, useState } from 'react';
|
|
10
10
|
import BEMHelper from 'react-bem-helper';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import
|
|
12
|
+
import { ButtonV2 } from '@ndla/button';
|
|
13
13
|
import { isMobile } from 'react-device-detect';
|
|
14
|
-
import { fonts, colors } from '@ndla/core';
|
|
15
14
|
|
|
16
15
|
import styled from '@emotion/styled';
|
|
17
16
|
import { FooterHeaderIcon } from '@ndla/icons/common';
|
|
@@ -22,50 +21,10 @@ const classes = new BEMHelper({
|
|
|
22
21
|
prefix: 'c-',
|
|
23
22
|
});
|
|
24
23
|
|
|
25
|
-
type OpenButtonProps = {
|
|
26
|
-
onClick: () => void;
|
|
27
|
-
children: ReactNode;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const OpenButton = ({ children, onClick }: OpenButtonProps) => (
|
|
31
|
-
<Button size="xsmall" lighter borderShape="rounded" onClick={onClick}>
|
|
32
|
-
{children}
|
|
33
|
-
</Button>
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const CompetenceWrapper = styled.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const CompetenceBadge = styled.span`
|
|
42
|
-
display: inline-flex;
|
|
43
|
-
background: ${colors.brand.greyLighter};
|
|
44
|
-
border-radius: 36px;
|
|
45
|
-
font-weight: ${fonts.weight.semibold};
|
|
46
|
-
${fonts.sizes('12px', '15px')};
|
|
47
|
-
align-items: center;
|
|
48
|
-
color: ${colors.text.primary};
|
|
49
|
-
font-family: ${fonts.sans};
|
|
50
|
-
padding: 0 6px;
|
|
51
|
-
height: 25px;
|
|
52
|
-
margin-right: 7px;
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
24
|
const CompetenceBadgeText = styled.span`
|
|
56
25
|
padding: 0 5px;
|
|
57
26
|
`;
|
|
58
27
|
|
|
59
|
-
type CompetenceButtonWrapperProps = {
|
|
60
|
-
addSpace: boolean | undefined;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const CompetenceButtonWrapper = styled.div<CompetenceButtonWrapperProps>`
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
${(props) => props.addSpace && `padding-left: 12px;`}
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
28
|
type Props = {
|
|
70
29
|
competenceGoals?:
|
|
71
30
|
| ((inp: { Dialog: ComponentType; dialogProps: { isOpen: boolean; onClose: () => void } }) => ReactNode)
|
|
@@ -118,21 +77,10 @@ const ArticleHeaderWrapper = ({ children, competenceGoals, competenceGoalTypes }
|
|
|
118
77
|
return (
|
|
119
78
|
<div {...classes('header')}>
|
|
120
79
|
{children}
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<FooterHeaderIcon />
|
|
126
|
-
<CompetenceBadgeText>{type}</CompetenceBadgeText>
|
|
127
|
-
</CompetenceBadge>
|
|
128
|
-
))}
|
|
129
|
-
<CompetenceButtonWrapper addSpace={competenceGoalTypes && competenceGoalTypes.length > 0}>
|
|
130
|
-
<OpenButton onClick={openDialog}>
|
|
131
|
-
<FooterHeaderIcon />
|
|
132
|
-
<CompetenceBadgeText>{t('competenceGoals.showCompetenceGoals')}</CompetenceBadgeText>
|
|
133
|
-
</OpenButton>
|
|
134
|
-
</CompetenceButtonWrapper>
|
|
135
|
-
</CompetenceWrapper>
|
|
80
|
+
<ButtonV2 size="xsmall" colorTheme="light" shape="pill" onClick={openDialog}>
|
|
81
|
+
<FooterHeaderIcon />
|
|
82
|
+
<CompetenceBadgeText>{t('competenceGoals.showCompetenceGoals')}</CompetenceBadgeText>
|
|
83
|
+
</ButtonV2>
|
|
136
84
|
{dialog}
|
|
137
85
|
</div>
|
|
138
86
|
);
|
package/src/Aside/Aside.tsx
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import BEMHelper from 'react-bem-helper';
|
|
12
11
|
|
|
13
12
|
const classes = BEMHelper({
|
|
@@ -38,13 +37,4 @@ const Aside = ({ children, narrowScreen = false, dangerouslySetInnerHTML, wideSc
|
|
|
38
37
|
);
|
|
39
38
|
};
|
|
40
39
|
|
|
41
|
-
Aside.propTypes = {
|
|
42
|
-
dangerouslySetInnerHTML: PropTypes.shape({
|
|
43
|
-
__html: PropTypes.string.isRequired,
|
|
44
|
-
}),
|
|
45
|
-
children: PropTypes.node,
|
|
46
|
-
narrowScreen: PropTypes.bool,
|
|
47
|
-
wideScreen: PropTypes.bool,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
40
|
export default Aside;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import BEMHelper from 'react-bem-helper';
|
|
4
3
|
|
|
5
4
|
import {
|
|
@@ -16,8 +15,6 @@ import {
|
|
|
16
15
|
import { MenuBook } from '@ndla/icons/action';
|
|
17
16
|
|
|
18
17
|
import * as contentTypes from '../model/ContentType';
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
import { ContentTypeShape } from '../shapes';
|
|
21
18
|
|
|
22
19
|
const classes = new BEMHelper({
|
|
23
20
|
name: 'content-type-badge',
|
|
@@ -77,14 +74,6 @@ export const ContentTypeBadge = ({ type, background, title, size = 'small', bord
|
|
|
77
74
|
return <div {...classes('', modifiers)}>{icon}</div>;
|
|
78
75
|
};
|
|
79
76
|
|
|
80
|
-
ContentTypeBadge.propTypes = {
|
|
81
|
-
size: PropTypes.oneOf(['xx-small', 'x-small', 'small', 'large']),
|
|
82
|
-
type: ContentTypeShape,
|
|
83
|
-
title: PropTypes.string,
|
|
84
|
-
background: PropTypes.bool,
|
|
85
|
-
border: PropTypes.bool,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
77
|
ContentTypeBadge.defaultProps = {
|
|
89
78
|
size: 'small',
|
|
90
79
|
border: true,
|
|
@@ -59,7 +59,7 @@ const CopyButton = ({ onClick, title, tooltip, content }: CopyButtonProps) => {
|
|
|
59
59
|
return (
|
|
60
60
|
<div>
|
|
61
61
|
<Tooltip tooltip={tooltip}>
|
|
62
|
-
<IconButton onClick={onClick} data-title={title} aria-label={`${tooltip}: ${
|
|
62
|
+
<IconButton onClick={onClick} data-title={title} aria-label={`${tooltip}: ${content}`}>
|
|
63
63
|
<Link title={''} />
|
|
64
64
|
</IconButton>
|
|
65
65
|
</Tooltip>
|
|
@@ -20,9 +20,9 @@ export const FigureLicenseDialog = ({ children, messages, id, authors, origin, t
|
|
|
20
20
|
return (
|
|
21
21
|
<Dialog id={id} labelledby={headingLabelId} messages={messages}>
|
|
22
22
|
<div {...classLicenses()}>
|
|
23
|
-
<
|
|
23
|
+
<h1 id={headingLabelId} {...classLicenses('title')}>
|
|
24
24
|
{messages.rulesForUse}
|
|
25
|
-
</
|
|
25
|
+
</h1>
|
|
26
26
|
<FigureLicenseByline license={license} messages={messages} locale={locale} />
|
|
27
27
|
<FigureLicenseCta authors={authors} title={title} origin={origin} messages={messages}>
|
|
28
28
|
{children}
|
package/src/Layout/Content.tsx
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
|
|
12
11
|
interface Props {
|
|
13
12
|
children: ReactNode;
|
|
@@ -15,8 +14,4 @@ interface Props {
|
|
|
15
14
|
|
|
16
15
|
export const Content = ({ children }: Props) => <div className="o-content">{children}</div>;
|
|
17
16
|
|
|
18
|
-
Content.propTypes = {
|
|
19
|
-
children: PropTypes.node.isRequired,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
17
|
export default Content;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
|
|
12
11
|
interface Props {
|
|
13
12
|
children?: ReactNode;
|
|
@@ -35,9 +34,4 @@ export const LayoutItem = ({ children, layout }: Props) => {
|
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
LayoutItem.propTypes = {
|
|
39
|
-
children: PropTypes.node,
|
|
40
|
-
layout: PropTypes.string,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
37
|
export default LayoutItem;
|
package/src/Layout/OneColumn.tsx
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import BEMHelper from 'react-bem-helper';
|
|
12
11
|
|
|
13
12
|
const classes = BEMHelper({
|
|
@@ -47,13 +46,4 @@ export const OneColumn = ({ children, className, cssModifier, wide, noPadding, e
|
|
|
47
46
|
return <div className={`${classes('', modifiers)} ${className}`}>{children}</div>;
|
|
48
47
|
};
|
|
49
48
|
|
|
50
|
-
OneColumn.propTypes = {
|
|
51
|
-
children: PropTypes.node,
|
|
52
|
-
cssModifier: PropTypes.string,
|
|
53
|
-
wide: PropTypes.bool,
|
|
54
|
-
noPadding: PropTypes.bool,
|
|
55
|
-
extraPadding: PropTypes.bool,
|
|
56
|
-
className: PropTypes.string,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
49
|
export default OneColumn;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import BEMHelper from 'react-bem-helper';
|
|
12
11
|
|
|
13
12
|
const classes = new BEMHelper({
|
|
@@ -31,18 +30,4 @@ export const PageContainer = ({
|
|
|
31
30
|
learningPath = false,
|
|
32
31
|
}: Props) => <div {...classes('', { background, backgroundWide, ndlaFilm, learningPath })}>{children}</div>;
|
|
33
32
|
|
|
34
|
-
PageContainer.propTypes = {
|
|
35
|
-
children: PropTypes.node,
|
|
36
|
-
background: PropTypes.bool,
|
|
37
|
-
backgroundWide: PropTypes.bool,
|
|
38
|
-
ndlaFilm: PropTypes.bool,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
PageContainer.defaultProps = {
|
|
42
|
-
background: false,
|
|
43
|
-
backgroundWide: false,
|
|
44
|
-
ndlaFilm: false,
|
|
45
|
-
learningPath: false,
|
|
46
|
-
};
|
|
47
|
-
|
|
48
33
|
export default PageContainer;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { ReactNode } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import styled from '@emotion/styled';
|
|
12
11
|
import { css } from '@emotion/react';
|
|
13
12
|
import { colors, spacing, animations, mq, breakpoints } from '@ndla/core';
|
|
@@ -46,10 +45,6 @@ interface Props {
|
|
|
46
45
|
|
|
47
46
|
export const LearningPathSticky = ({ children }: Props) => <StyledFooter>{children}</StyledFooter>;
|
|
48
47
|
|
|
49
|
-
LearningPathSticky.propTypes = {
|
|
50
|
-
children: PropTypes.node,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
48
|
const SafeLinkCSS = css`
|
|
54
49
|
display: flex;
|
|
55
50
|
box-shadow: none;
|
|
@@ -67,15 +67,7 @@ type Props = GradesProps & {
|
|
|
67
67
|
headingId?: string;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
export const Programme = ({
|
|
71
|
-
heading,
|
|
72
|
-
image,
|
|
73
|
-
grades,
|
|
74
|
-
selectedGrade,
|
|
75
|
-
onChangeGrade,
|
|
76
|
-
messageBoxText,
|
|
77
|
-
headingId,
|
|
78
|
-
}: Props) => {
|
|
70
|
+
export const Programme = ({ heading, image, grades, selectedGrade, messageBoxText, headingId }: Props) => {
|
|
79
71
|
const { t } = useTranslation();
|
|
80
72
|
return (
|
|
81
73
|
<StyledWrapper>
|
|
@@ -87,7 +79,7 @@ export const Programme = ({
|
|
|
87
79
|
<NavigationHeading headingId={headingId}>{heading}</NavigationHeading>
|
|
88
80
|
{messageBoxText && <MessageBox>{t(messageBoxText)}</MessageBox>}
|
|
89
81
|
<SubjectsWrapper>
|
|
90
|
-
<ProgrammeSubjects grades={grades} selectedGrade={selectedGrade}
|
|
82
|
+
<ProgrammeSubjects grades={grades} selectedGrade={selectedGrade} />
|
|
91
83
|
</SubjectsWrapper>
|
|
92
84
|
</StyledContentWrapper>
|
|
93
85
|
</LayoutItem>
|