@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.
@@ -382,6 +382,7 @@ declare const messages: {
382
382
  access: {
383
383
  onlyTeacher: string;
384
384
  };
385
+ possiblyOutdated: string;
385
386
  };
386
387
  competenceGoals: {
387
388
  competenceGoal: string;
@@ -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',
@@ -382,6 +382,7 @@ declare const messages: {
382
382
  access: {
383
383
  onlyTeacher: string;
384
384
  };
385
+ possiblyOutdated: string;
385
386
  };
386
387
  competenceGoals: {
387
388
  competenceGoal: string;
@@ -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',
@@ -382,6 +382,7 @@ declare const messages: {
382
382
  access: {
383
383
  onlyTeacher: string;
384
384
  };
385
+ possiblyOutdated: string;
385
386
  };
386
387
  competenceGoals: {
387
388
  competenceGoal: string;
@@ -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.1.1",
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.3",
35
- "@ndla/carousel": "^1.2.3",
36
- "@ndla/core": "^2.0.1",
37
- "@ndla/hooks": "^1.1.2",
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.3",
40
- "@ndla/modal": "^1.2.3",
41
- "@ndla/safelink": "^1.1.4",
42
- "@ndla/switch": "^0.1.3",
43
- "@ndla/tabs": "^1.1.2",
44
- "@ndla/tooltip": "^0.3.3",
45
- "@ndla/util": "^2.0.4",
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": "19a0a99a7cf6f731faef74a89d05ebeb3a8dd12e"
83
+ "gitHead": "60f179c8f18630a8b4fa2f4d6936eca458f60214"
84
84
  }
@@ -191,9 +191,7 @@ export const Article = ({
191
191
 
192
192
  {messages.messageBox && (
193
193
  <MSGboxWrapper>
194
- <MessageBox links={messageBoxLinks} showCloseButton>
195
- {messages.messageBox}
196
- </MessageBox>
194
+ <MessageBox links={messageBoxLinks}>{messages.messageBox}</MessageBox>
197
195
  </MSGboxWrapper>
198
196
  )}
199
197
  <ArticleHeaderWrapper competenceGoals={competenceGoals} competenceGoalTypes={competenceGoalTypes}>
@@ -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>
@@ -366,6 +366,7 @@ const messages = {
366
366
  access: {
367
367
  onlyTeacher: 'This resource is accessible only to teachers who are logged in with Feide.',
368
368
  },
369
+ possiblyOutdated: 'The article is outdated',
369
370
  },
370
371
  competenceGoals: {
371
372
  competenceGoal: 'competence-goal',
@@ -364,6 +364,7 @@ const messages = {
364
364
  access: {
365
365
  onlyTeacher: 'Denne ressursen er bare tilgjengelig for lærere som er pålogget med Feide.',
366
366
  },
367
+ possiblyOutdated: 'Artikkelen er foreldet.',
367
368
  },
368
369
  competenceGoals: {
369
370
  competenceGoal: 'kompetansemål',
@@ -365,6 +365,7 @@ const messages = {
365
365
  access: {
366
366
  onlyTeacher: 'Denne ressursen er berre tilgjengeleg for lærarar som er pålogga med Feide.',
367
367
  },
368
+ possiblyOutdated: 'Artikkelen er foreldet.',
368
369
  },
369
370
  competenceGoals: {
370
371
  competenceGoal: 'kompetansemål',