@ndla/ui 8.1.1 → 8.2.1
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/Article.js +2 -3
- package/es/Topic/Topic.js +25 -21
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +2 -1
- package/es/locale/messages-nb.js +2 -1
- package/es/locale/messages-nn.js +2 -1
- package/lib/Article/Article.js +2 -3
- package/lib/Topic/Topic.d.ts +2 -1
- package/lib/Topic/Topic.js +26 -21
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +2 -1
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +2 -1
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +2 -1
- package/package.json +13 -13
- package/src/Article/Article.tsx +1 -3
- package/src/Topic/Topic.tsx +4 -0
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
|
@@ -333,7 +333,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
333
333
|
printPage: 'Print',
|
|
334
334
|
access: {
|
|
335
335
|
onlyTeacher: 'This resource is accessible only to teachers who are logged in with Feide.'
|
|
336
|
-
}
|
|
336
|
+
},
|
|
337
|
+
possiblyOutdated: 'The article is outdated'
|
|
337
338
|
},
|
|
338
339
|
competenceGoals: {
|
|
339
340
|
competenceGoal: 'competence-goal',
|
|
@@ -333,7 +333,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
333
333
|
printPage: 'Skriv ut',
|
|
334
334
|
access: {
|
|
335
335
|
onlyTeacher: 'Denne ressursen er bare tilgjengelig for lærere som er pålogget med Feide.'
|
|
336
|
-
}
|
|
336
|
+
},
|
|
337
|
+
possiblyOutdated: 'Artikkelen er foreldet.'
|
|
337
338
|
},
|
|
338
339
|
competenceGoals: {
|
|
339
340
|
competenceGoal: 'kompetansemål',
|
|
@@ -333,7 +333,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
333
333
|
printPage: 'Skriv ut',
|
|
334
334
|
access: {
|
|
335
335
|
onlyTeacher: 'Denne ressursen er berre tilgjengeleg for lærarar som er pålogga med Feide.'
|
|
336
|
-
}
|
|
336
|
+
},
|
|
337
|
+
possiblyOutdated: 'Artikkelen er foreldet.'
|
|
337
338
|
},
|
|
338
339
|
competenceGoals: {
|
|
339
340
|
competenceGoal: 'kompetansemål',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/button": "^2.1.
|
|
35
|
-
"@ndla/carousel": "^1.2.
|
|
36
|
-
"@ndla/core": "^2.0
|
|
37
|
-
"@ndla/hooks": "^1.1.
|
|
34
|
+
"@ndla/button": "^2.1.4",
|
|
35
|
+
"@ndla/carousel": "^1.2.4",
|
|
36
|
+
"@ndla/core": "^2.1.0",
|
|
37
|
+
"@ndla/hooks": "^1.1.3",
|
|
38
38
|
"@ndla/icons": "^1.6.1",
|
|
39
|
-
"@ndla/licenses": "^4.0.
|
|
40
|
-
"@ndla/modal": "^1.2.
|
|
41
|
-
"@ndla/safelink": "^1.1.
|
|
42
|
-
"@ndla/switch": "^0.1.
|
|
43
|
-
"@ndla/tabs": "^1.1.
|
|
44
|
-
"@ndla/tooltip": "^0.3.
|
|
45
|
-
"@ndla/util": "^2.0.
|
|
39
|
+
"@ndla/licenses": "^4.0.4",
|
|
40
|
+
"@ndla/modal": "^1.2.4",
|
|
41
|
+
"@ndla/safelink": "^1.1.5",
|
|
42
|
+
"@ndla/switch": "^0.1.4",
|
|
43
|
+
"@ndla/tabs": "^1.1.3",
|
|
44
|
+
"@ndla/tooltip": "^0.3.4",
|
|
45
|
+
"@ndla/util": "^2.0.5",
|
|
46
46
|
"@reach/menu-button": "^0.16.2",
|
|
47
47
|
"@reach/slider": "^0.16.0",
|
|
48
48
|
"focus-trap-react": "^8.9.2",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "60f179c8f18630a8b4fa2f4d6936eca458f60214"
|
|
84
84
|
}
|
package/src/Article/Article.tsx
CHANGED
|
@@ -191,9 +191,7 @@ export const Article = ({
|
|
|
191
191
|
|
|
192
192
|
{messages.messageBox && (
|
|
193
193
|
<MSGboxWrapper>
|
|
194
|
-
<MessageBox links={messageBoxLinks}
|
|
195
|
-
{messages.messageBox}
|
|
196
|
-
</MessageBox>
|
|
194
|
+
<MessageBox links={messageBoxLinks}>{messages.messageBox}</MessageBox>
|
|
197
195
|
</MSGboxWrapper>
|
|
198
196
|
)}
|
|
199
197
|
<ArticleHeaderWrapper competenceGoals={competenceGoals} competenceGoalTypes={competenceGoalTypes}>
|
package/src/Topic/Topic.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import Loader from './Loader';
|
|
|
21
21
|
import { ItemProps } from '../Navigation/NavigationBox';
|
|
22
22
|
import { NavigationBox } from '../Navigation';
|
|
23
23
|
import { makeSrcQueryString, ImageCrop, ImageFocalPoint } from '../Image';
|
|
24
|
+
import { MessageBox, MessageBoxType } from '../MessageBox';
|
|
24
25
|
|
|
25
26
|
type InvertItProps = {
|
|
26
27
|
invertedStyle?: boolean;
|
|
@@ -235,6 +236,7 @@ export type TopicProps = {
|
|
|
235
236
|
showContent?: boolean;
|
|
236
237
|
isAdditionalTopic?: boolean;
|
|
237
238
|
frame?: boolean;
|
|
239
|
+
messageBox?: string;
|
|
238
240
|
children?: ReactNode;
|
|
239
241
|
};
|
|
240
242
|
|
|
@@ -249,6 +251,7 @@ const Topic = ({
|
|
|
249
251
|
showContent,
|
|
250
252
|
isAdditionalTopic,
|
|
251
253
|
frame,
|
|
254
|
+
messageBox,
|
|
252
255
|
children,
|
|
253
256
|
}: TopicProps) => {
|
|
254
257
|
const { t } = useTranslation();
|
|
@@ -328,6 +331,7 @@ const Topic = ({
|
|
|
328
331
|
</StyledAdditionalResource>
|
|
329
332
|
)}
|
|
330
333
|
</TopicHeading>
|
|
334
|
+
{messageBox && <MessageBox type={MessageBoxType.medium}>{messageBox}</MessageBox>}
|
|
331
335
|
<TopicIntroduction invertedStyle={invertedStyle}>
|
|
332
336
|
{renderMarkdown ? parse(renderMarkdown(topic.introduction)) : topic.introduction}
|
|
333
337
|
</TopicIntroduction>
|