@ndla/ui 33.1.4 → 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.
Files changed (108) hide show
  1. package/es/Animation/DisplayOnPageYOffset.js +0 -6
  2. package/es/Article/ArticleHeaderWrapper.js +14 -56
  3. package/es/Aside/Aside.js +0 -9
  4. package/es/ContentTypeBadge/ContentTypeBadge.js +0 -10
  5. package/es/CopyParagraphButton/CopyParagraphButton.js +3 -3
  6. package/es/Figure/FigureLicenseDialog.js +1 -1
  7. package/es/Layout/Content.js +0 -4
  8. package/es/Layout/LayoutItem.js +0 -5
  9. package/es/Layout/OneColumn.js +0 -9
  10. package/es/Layout/PageContainer.js +0 -13
  11. package/es/LearningPaths/LearningPathSticky.js +3 -7
  12. package/es/Programme/Programme.js +6 -8
  13. package/es/Programme/ProgrammeSubjects.js +22 -20
  14. package/es/Table/Table.js +5 -31
  15. package/es/TopicMenu/SubtopicLinkList.js +5 -33
  16. package/es/TopicMenu/TopicMenu.js +1 -51
  17. package/es/TopicMenu/TopicMenuButton.js +1 -6
  18. package/es/all.css +1 -1
  19. package/es/locale/messages-en.js +14 -2
  20. package/es/locale/messages-nb.js +14 -2
  21. package/es/locale/messages-nn.js +14 -2
  22. package/es/locale/messages-se.js +14 -2
  23. package/es/locale/messages-sma.js +14 -2
  24. package/lib/Animation/DisplayOnPageYOffset.d.ts +0 -6
  25. package/lib/Animation/DisplayOnPageYOffset.js +0 -6
  26. package/lib/Article/ArticleHeaderWrapper.d.ts +0 -5
  27. package/lib/Article/ArticleHeaderWrapper.js +15 -58
  28. package/lib/Aside/Aside.d.ts +1 -12
  29. package/lib/Aside/Aside.js +0 -9
  30. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +0 -8
  31. package/lib/ContentTypeBadge/ContentTypeBadge.js +0 -9
  32. package/lib/CopyParagraphButton/CopyParagraphButton.js +3 -3
  33. package/lib/Figure/FigureLicenseDialog.js +1 -1
  34. package/lib/Layout/Content.d.ts +1 -7
  35. package/lib/Layout/Content.js +0 -4
  36. package/lib/Layout/LayoutItem.d.ts +1 -8
  37. package/lib/Layout/LayoutItem.js +0 -5
  38. package/lib/Layout/OneColumn.d.ts +1 -12
  39. package/lib/Layout/OneColumn.js +0 -9
  40. package/lib/Layout/PageContainer.d.ts +1 -16
  41. package/lib/Layout/PageContainer.js +0 -13
  42. package/lib/LearningPaths/LearningPathSticky.d.ts +1 -7
  43. package/lib/LearningPaths/LearningPathSticky.js +3 -7
  44. package/lib/Programme/Programme.d.ts +1 -1
  45. package/lib/Programme/Programme.js +6 -8
  46. package/lib/Programme/ProgrammeSubjects.d.ts +1 -2
  47. package/lib/Programme/ProgrammeSubjects.js +24 -19
  48. package/lib/Table/Table.d.ts +1 -5
  49. package/lib/Table/Table.js +5 -31
  50. package/lib/TopicMenu/SubtopicLinkList.js +5 -33
  51. package/lib/TopicMenu/TopicMenu.js +1 -51
  52. package/lib/TopicMenu/TopicMenuButton.js +1 -6
  53. package/lib/all.css +1 -1
  54. package/lib/locale/messages-en.d.ts +12 -0
  55. package/lib/locale/messages-en.js +14 -2
  56. package/lib/locale/messages-nb.d.ts +12 -0
  57. package/lib/locale/messages-nb.js +14 -2
  58. package/lib/locale/messages-nn.d.ts +12 -0
  59. package/lib/locale/messages-nn.js +14 -2
  60. package/lib/locale/messages-se.d.ts +12 -0
  61. package/lib/locale/messages-se.js +14 -2
  62. package/lib/locale/messages-sma.d.ts +12 -0
  63. package/lib/locale/messages-sma.js +14 -2
  64. package/package.json +19 -20
  65. package/src/Animation/DisplayOnPageYOffset.tsx +0 -6
  66. package/src/Article/ArticleHeaderWrapper.tsx +5 -57
  67. package/src/Aside/Aside.tsx +0 -10
  68. package/src/ContentTypeBadge/ContentTypeBadge.tsx +0 -11
  69. package/src/CopyParagraphButton/CopyParagraphButton.tsx +1 -1
  70. package/src/Figure/FigureLicenseDialog.tsx +2 -2
  71. package/src/Layout/Content.tsx +0 -5
  72. package/src/Layout/LayoutItem.tsx +0 -6
  73. package/src/Layout/OneColumn.tsx +0 -10
  74. package/src/Layout/PageContainer.tsx +0 -15
  75. package/src/LearningPaths/LearningPathSticky.tsx +0 -5
  76. package/src/Programme/Programme.tsx +2 -10
  77. package/src/Programme/ProgrammeSubjects.tsx +31 -27
  78. package/src/Table/Table.tsx +2 -35
  79. package/src/Table/component.tables.scss +0 -33
  80. package/src/TopicMenu/SubtopicLinkList.jsx +0 -30
  81. package/src/TopicMenu/TopicMenu.jsx +0 -70
  82. package/src/TopicMenu/TopicMenuButton.jsx +0 -6
  83. package/src/locale/messages-en.ts +12 -0
  84. package/src/locale/messages-nb.ts +12 -0
  85. package/src/locale/messages-nn.ts +12 -0
  86. package/src/locale/messages-se.ts +12 -0
  87. package/src/locale/messages-sma.ts +12 -0
  88. package/src/main.scss +0 -1
  89. package/es/internal-icons/Book.js +0 -29
  90. package/es/internal-icons/Download.js +0 -28
  91. package/es/internal-icons/Embed.js +0 -26
  92. package/es/internal-icons/InsertTemplate.js +0 -29
  93. package/es/internal-icons/OpenWindow.js +0 -26
  94. package/es/shapes.js +0 -75
  95. package/lib/internal-icons/Book.js +0 -37
  96. package/lib/internal-icons/Download.js +0 -36
  97. package/lib/internal-icons/Embed.js +0 -34
  98. package/lib/internal-icons/InsertTemplate.js +0 -37
  99. package/lib/internal-icons/OpenWindow.js +0 -34
  100. package/lib/shapes.js +0 -96
  101. package/src/global/components/component.source-list.scss +0 -16
  102. package/src/internal-icons/Book.jsx +0 -22
  103. package/src/internal-icons/Download.jsx +0 -25
  104. package/src/internal-icons/Embed.jsx +0 -22
  105. package/src/internal-icons/InsertTemplate.jsx +0 -28
  106. package/src/internal-icons/OpenWindow.jsx +0 -22
  107. package/src/internal-icons/close.svg +0 -7
  108. package/src/shapes.js +0 -101
@@ -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
- <h3 id={headingLabelId} {...classLicenses('title')}>
23
+ <h1 id={headingLabelId} {...classLicenses('title')}>
24
24
  {messages.rulesForUse}
25
- </h3>
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}
@@ -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;
@@ -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} onChangeGrade={onChangeGrade} />
82
+ <ProgrammeSubjects grades={grades} selectedGrade={selectedGrade} />
91
83
  </SubjectsWrapper>
92
84
  </StyledContentWrapper>
93
85
  </LayoutItem>
@@ -6,30 +6,24 @@
6
6
  *
7
7
  */
8
8
 
9
- import React from 'react';
9
+ import React, { useMemo } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
- import Button from '@ndla/button';
13
- import { breakpoints, mq } from '@ndla/core';
12
+ import { spacing } from '@ndla/core';
13
+ import { SafeLinkButton } from '@ndla/safelink';
14
14
  import { NavigationBox } from '../Navigation';
15
15
  import { MessageBox } from '../Messages';
16
16
 
17
- const GradesMenu = styled.div`
18
- margin-bottom: 28px;
19
- > * {
20
- margin-right: 10px;
21
- }
22
- > *:last-of-type {
23
- margin-right: 0;
24
- }
25
- ${mq.range({ from: breakpoints.tablet })} {
26
- margin-bottom: 40px;
17
+ const GradesMenu = styled.ul`
18
+ display: flex;
19
+ gap: ${spacing.small};
20
+ li {
21
+ list-style: none;
27
22
  }
28
23
  `;
29
24
 
30
25
  export type GradesProps = {
31
26
  selectedGrade?: string;
32
- onChangeGrade: (newGrade: string) => void;
33
27
  grades: {
34
28
  missingProgrammeSubjects?: boolean;
35
29
  name: string;
@@ -47,22 +41,32 @@ type Props = GradesProps & {
47
41
  onNavigate?: () => void;
48
42
  };
49
43
 
50
- const ProgrammeSubjects = ({ grades, onNavigate, onChangeGrade, selectedGrade = 'vg1' }: Props) => {
44
+ const ProgrammeSubjects = ({ grades, onNavigate, selectedGrade = 'vg1' }: Props) => {
51
45
  const { t } = useTranslation();
52
- const grade = grades.find((grade) => grade.name.toLowerCase() === selectedGrade) ?? grades[0];
46
+
47
+ const grade = useMemo(
48
+ () => grades.find((grade) => grade.name.toLowerCase() === selectedGrade) ?? grades[0],
49
+ [grades, selectedGrade],
50
+ );
51
+
53
52
  return (
54
53
  <>
55
- <GradesMenu>
56
- {grades.map((item) => (
57
- <Button
58
- key={item.name}
59
- onClick={() => onChangeGrade(item.name.toLowerCase())}
60
- lighter={item !== grade}
61
- size="normal"
62
- borderShape="rounded">
63
- {item.name}
64
- </Button>
65
- ))}
54
+ <GradesMenu aria-label={t('programme.grades')}>
55
+ {grades.map((item) => {
56
+ const current = item.name.toLowerCase() === selectedGrade;
57
+ return (
58
+ <li key={item.name}>
59
+ <SafeLinkButton
60
+ to={current ? '' : item.name.toLowerCase()}
61
+ lighter={item !== grade}
62
+ borderShape="rounded"
63
+ buttonSize="normal"
64
+ aria-current={current}>
65
+ {item.name}
66
+ </SafeLinkButton>
67
+ </li>
68
+ );
69
+ })}
66
70
  </GradesMenu>
67
71
  {grade.missingProgrammeSubjects && <MessageBox>{t('messageBoxInfo.noContent')}</MessageBox>}
68
72
  {grade.categories.map((category) => (
@@ -8,60 +8,27 @@
8
8
 
9
9
  import React, { ReactNode } from 'react';
10
10
  import BEMHelper from 'react-bem-helper';
11
- import { ZoomOutMap } from '@ndla/icons/common';
12
-
13
- import { uuid } from '@ndla/util';
14
- import Dialog from '../Dialog';
15
11
 
16
12
  const classes = BEMHelper('c-table');
17
13
 
18
14
  interface Props {
19
15
  id?: string;
20
- messages: {
21
- dialogCloseButton: string;
22
- expandButtonLabel: string;
23
- };
24
16
  children?: ReactNode;
25
17
  dangerouslySetInnerHTML?: {
26
18
  __html: string;
27
19
  };
28
20
  }
29
21
 
30
- const Table = ({ children, messages, id, ...rest }: Props) => {
31
- const tableId = id || uuid();
32
- const dialogId = `dialog-${tableId}`;
33
-
22
+ const Table = ({ children, id, ...rest }: Props) => {
34
23
  return (
35
24
  <div {...classes('wrapper')}>
36
25
  <div {...classes('content')}>
37
26
  <div {...classes('left-shadow')} />
38
- <table id={tableId} {...classes({ extra: ['o-table'] })} {...rest}>
27
+ <table id={id} {...classes({ extra: ['o-table'] })} {...rest}>
39
28
  {children}
40
29
  </table>
41
- <button
42
- type="button"
43
- data-dialog-trigger-id={dialogId}
44
- data-dialog-source-id={tableId}
45
- data-table-id={tableId}
46
- {...classes('expand-button')}
47
- aria-label={messages.expandButtonLabel}>
48
- <ZoomOutMap />
49
- </button>
50
30
  <div {...classes('right-shadow')} />
51
31
  </div>
52
- <Dialog
53
- id={dialogId}
54
- label={messages.expandButtonLabel}
55
- messages={{
56
- close: messages.dialogCloseButton,
57
- }}
58
- modifier="fullscreen">
59
- <div {...classes('dialog')}>
60
- <div {...classes('expanded-table-wrapper')}>
61
- <div {...classes('content')} />
62
- </div>
63
- </div>
64
- </Dialog>
65
32
  </div>
66
33
  );
67
34
  };
@@ -26,39 +26,6 @@
26
26
  @include mq($from: desktop) {
27
27
  @include grids-expand(4, 6, 2);
28
28
  }
29
-
30
- &--has-scroll {
31
- .c-table {
32
- padding-bottom: $spacing;
33
-
34
- &__expand-button {
35
- @include mq($from: wide) {
36
- display: block;
37
- }
38
- }
39
- }
40
- }
41
- }
42
-
43
- &__expand-button {
44
- display: none;
45
- background: $brand-color--lighter;
46
- border: 0;
47
- height: 38px;
48
- width: 38px;
49
- border-radius: 0;
50
- margin: $spacing 0 0 auto;
51
- }
52
-
53
- &__expanded-table-wrapper {
54
- display: inline-block;
55
- background: $white;
56
- padding: $spacing--medium $spacing--medium $spacing--large $spacing--medium;
57
- margin: $spacing--large;
58
- }
59
-
60
- &__dialog {
61
- text-align: center;
62
29
  }
63
30
 
64
31
  &__content {
@@ -7,7 +7,6 @@
7
7
  */
8
8
 
9
9
  import React, { Component } from 'react';
10
- import PropTypes from 'prop-types';
11
10
  import { Back, ChevronRight } from '@ndla/icons/common';
12
11
  import { Switch } from '@ndla/switch';
13
12
  import styled from '@emotion/styled';
@@ -15,7 +14,6 @@ import { css } from '@emotion/react';
15
14
  import { mq, breakpoints, fonts, spacing } from '@ndla/core';
16
15
  import SafeLink from '@ndla/safelink';
17
16
  import { withTranslation } from 'react-i18next';
18
- import { TopicShape } from '../shapes';
19
17
  import ContentTypeResult from '../Search/ContentTypeResult';
20
18
  import { renderAdditionalIcon } from './TopicMenu';
21
19
 
@@ -85,17 +83,6 @@ const SubtopicLink = ({
85
83
  );
86
84
  };
87
85
 
88
- SubtopicLink.propTypes = {
89
- classes: PropTypes.func.isRequired,
90
- subtopic: TopicShape.isRequired,
91
- to: PropTypes.string.isRequired,
92
- onSubtopicExpand: PropTypes.func,
93
- expandedSubtopicId: PropTypes.string,
94
- toTopic: PropTypes.func,
95
- subtopicId: PropTypes.string,
96
- additionalTooltipLabel: PropTypes.string,
97
- };
98
-
99
86
  class SubtopicLinkList extends Component {
100
87
  constructor(props) {
101
88
  super(props);
@@ -257,21 +244,4 @@ class SubtopicLinkList extends Component {
257
244
  }
258
245
  }
259
246
 
260
- SubtopicLinkList.propTypes = {
261
- resourceToLinkProps: PropTypes.func.isRequired,
262
- expandedSubtopicId: PropTypes.string,
263
- onSubtopicExpand: PropTypes.func,
264
- classes: PropTypes.func.isRequired,
265
- className: PropTypes.string,
266
- closeMenu: PropTypes.func.isRequired,
267
- topic: TopicShape.isRequired,
268
- toTopic: PropTypes.func.isRequired,
269
- onGoBack: PropTypes.func.isRequired,
270
- backLabel: PropTypes.string.isRequired,
271
- defaultCount: PropTypes.number,
272
- t: PropTypes.func.isRequired,
273
- lastOpen: PropTypes.bool,
274
- isUngrouped: PropTypes.bool,
275
- };
276
-
277
247
  export default withTranslation()(SubtopicLinkList);
@@ -10,7 +10,6 @@
10
10
  /* eslint jsx-a11y/no-noninteractive-element-to-interactive-role: 1 */
11
11
 
12
12
  import React, { Fragment, useEffect, useState } from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import BEMHelper from 'react-bem-helper';
15
14
  import debounce from 'lodash/debounce';
16
15
  import { spacing } from '@ndla/core';
@@ -24,7 +23,6 @@ import SafeLink from '@ndla/safelink';
24
23
  import Tooltip from '@ndla/tooltip';
25
24
  import { useTranslation } from 'react-i18next';
26
25
  import SubtopicLinkList from './SubtopicLinkList';
27
- import { TopicShape } from '../shapes';
28
26
 
29
27
  import Logo from '../Logo';
30
28
  import FrontpageAllSubjects from '../Frontpage/FrontpageAllSubjects';
@@ -365,74 +363,6 @@ export const TopicMenu = ({
365
363
  );
366
364
  };
367
365
 
368
- TopicMenu.propTypes = {
369
- topics: PropTypes.arrayOf(TopicShape).isRequired,
370
- toFrontpage: PropTypes.func.isRequired,
371
- toTopic: PropTypes.func,
372
- closeAlert: PropTypes.func,
373
- toSubject: PropTypes.func,
374
- close: PropTypes.func,
375
- defaultCount: PropTypes.number,
376
- subjectTitle: PropTypes.string,
377
- resourceToLinkProps: PropTypes.func.isRequired,
378
- onNavigate: PropTypes.func.isRequired,
379
- expandedTopicId: PropTypes.string,
380
- expandedSubtopicsId: PropTypes.arrayOf(PropTypes.string).isRequired,
381
- hideSearch: PropTypes.bool,
382
- searchFieldComponent: PropTypes.node,
383
- locale: PropTypes.string,
384
- messages: PropTypes.arrayOf(
385
- PropTypes.shape({
386
- content: PropTypes.string.isRequired,
387
- closable: PropTypes.bool.isRequired,
388
- number: PropTypes.number.isRequired,
389
- }),
390
- ),
391
- subjectCategories: PropTypes.arrayOf(
392
- PropTypes.shape({
393
- name: PropTypes.string.isRequired,
394
- subjects: PropTypes.arrayOf(
395
- PropTypes.shape({
396
- name: PropTypes.string.isRequired,
397
- url: PropTypes.string.isRequired,
398
- }),
399
- ),
400
- }),
401
- ),
402
- programmes: PropTypes.arrayOf(
403
- PropTypes.shape({
404
- label: PropTypes.string.isRequired,
405
- url: PropTypes.string.isRequired,
406
- }),
407
- ),
408
- currentProgramme: PropTypes.shape({
409
- name: PropTypes.string.isRequired,
410
- grades: PropTypes.arrayOf(
411
- PropTypes.shape({
412
- name: PropTypes.string.isRequired,
413
- categories: PropTypes.arrayOf(
414
- PropTypes.shape({
415
- name: PropTypes.string,
416
- subjects: PropTypes.arrayOf(
417
- PropTypes.shape({
418
- label: PropTypes.string.isRequired,
419
- url: PropTypes.string.isRequired,
420
- }),
421
- ),
422
- }),
423
- ),
424
- }),
425
- ).isRequired,
426
- selectedGradeIndex: PropTypes.number,
427
- }),
428
- initialSelectedMenu: PropTypes.oneOf([
429
- MENU_CURRENT_SUBJECT,
430
- MENU_CURRENT_PROGRAMME,
431
- MENU_PROGRAMMES,
432
- MENU_ALL_SUBJECTS,
433
- ]),
434
- };
435
-
436
366
  TopicMenu.defaultProps = {
437
367
  defaultCount: 12,
438
368
  };
@@ -7,7 +7,6 @@
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import PropTypes from 'prop-types';
11
10
  import { css } from '@emotion/react';
12
11
  import { spacing, fonts, colors, mq, breakpoints } from '@ndla/core';
13
12
  import { Menu } from '@ndla/icons/common';
@@ -49,9 +48,4 @@ const TopicMenuButton = ({ ndlaFilm, children, ...rest }) => (
49
48
  </Button>
50
49
  );
51
50
 
52
- TopicMenuButton.propTypes = {
53
- children: PropTypes.node.isRequired,
54
- ndlaFilm: PropTypes.bool,
55
- };
56
-
57
51
  export default TopicMenuButton;
@@ -253,8 +253,15 @@ const messages = {
253
253
  archived: 'This is an expired and unmaintained subject.',
254
254
  },
255
255
  subjectsPage: {
256
+ allSubjects: 'All subjects',
256
257
  chooseSubject: 'Choose subject',
257
258
  errorDescription: 'Sorry, an error occurred while loading the subjects.',
259
+ confirmRemove: 'Are you sure you want to remove {{subject}} from your favorite subjects?',
260
+ addFavorite: 'Add favorite subject',
261
+ removeFavorite: 'Remove favorite subject',
262
+ removeConfirmed: '{{subject}} is removed from your favorite subjects',
263
+ addConfirmed: '{{subject}} is added to your favorite subjects',
264
+ shows: 'Shows',
258
265
  },
259
266
  topicPage: {
260
267
  articleErrorDescription: 'Sorry, an error occurred while loading the topic description.',
@@ -845,6 +852,7 @@ const messages = {
845
852
  searching: 'Searching...',
846
853
  create: 'Create new',
847
854
  isSelectedItem: 'Added',
855
+ selected: '{{count}} selected',
848
856
  },
849
857
  blogPosts: {
850
858
  blog1: {
@@ -1088,6 +1096,7 @@ const messages = {
1088
1096
  confirmDeleteTag: 'Are you sure you want to delete this tag? This process cannot be undone.',
1089
1097
  myFolders: 'My folders',
1090
1098
  myTags: 'My tags',
1099
+ mySubjects: 'My subjects',
1091
1100
  newFolder: 'New folder',
1092
1101
  newFolderUnder: 'Create new folder under {{folderName}}',
1093
1102
  myAccount: 'My account',
@@ -1190,6 +1199,9 @@ const messages = {
1190
1199
  contact: 'Contact',
1191
1200
  help: 'Help',
1192
1201
  },
1202
+ programme: {
1203
+ grades: 'Grades',
1204
+ },
1193
1205
  };
1194
1206
 
1195
1207
  export default messages;
@@ -252,8 +252,15 @@ const messages = {
252
252
  archived: 'Dette er et utgått fag som ikke vedlikeholdes.',
253
253
  },
254
254
  subjectsPage: {
255
+ allSubjects: 'Alle fag',
255
256
  errorDescription: 'Beklager, en feil oppstod under lasting av fagene.',
256
257
  chooseSubject: 'Velg fag',
258
+ confirmRemove: 'Er du sikker på at du vil fjerne {{subject}} fra favorittfag?',
259
+ addFavorite: 'Legg til favorittfag',
260
+ removeFavorite: 'Fjern favorittfag',
261
+ removeConfirmed: '{{subject}} er fjernet fra favorittfag',
262
+ addConfirmed: '{{subject}} er lagt til som favorittfag',
263
+ shows: 'Viser',
257
264
  },
258
265
  topicPage: {
259
266
  articleErrorDescription: 'Beklager, en feil oppstod under lasting av emnebeskrivelsen.',
@@ -844,6 +851,7 @@ const messages = {
844
851
  searching: 'Søker...',
845
852
  create: 'Opprett ny',
846
853
  isSelectedItem: 'Lagt til',
854
+ selected: '{{count}} valgte',
847
855
  },
848
856
  blogPosts: {
849
857
  blog1: {
@@ -1086,6 +1094,7 @@ const messages = {
1086
1094
  confirmDeleteTag: 'Er du sikker på at du vil slette emneknagg? Denne handlingen kan ikke endres.',
1087
1095
  myFolders: 'Mine mapper',
1088
1096
  myTags: 'Mine emneknagger',
1097
+ mySubjects: 'Mine fag',
1089
1098
  newFolder: 'Ny mappe',
1090
1099
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
1091
1100
  myAccount: 'Min konto',
@@ -1187,6 +1196,9 @@ const messages = {
1187
1196
  contact: 'Kontakt',
1188
1197
  help: 'Hjelp',
1189
1198
  },
1199
+ programme: {
1200
+ grades: 'Trinn',
1201
+ },
1190
1202
  };
1191
1203
 
1192
1204
  export default messages;
@@ -252,8 +252,15 @@ const messages = {
252
252
  archived: 'Dette er eit utgått fag som ikkje blir halde ved like.',
253
253
  },
254
254
  subjectsPage: {
255
+ allSubjects: 'Alle fag',
255
256
  errorDescription: 'Orsak, ein feil oppstod under lasting av faga.',
256
257
  chooseSubject: 'Vel fag',
258
+ confirmRemove: 'Er du sikker på at du vil fjerne {{subject}} fra favorittfag?',
259
+ addFavorite: 'Legg til favorittfag',
260
+ removeFavorite: 'Fjern favorittfag',
261
+ removeConfirmed: '{{subject}} er fjerna frå favorittfag',
262
+ addConfirmed: '{{subject}} er lagt til som favorittfag',
263
+ shows: 'Viser',
257
264
  },
258
265
  topicPage: {
259
266
  articleErrorDescription: 'Orsak, ein feil oppstod under lasting av emneskildringa.',
@@ -845,6 +852,7 @@ const messages = {
845
852
  searching: 'Søkjer...',
846
853
  create: 'Opprett ny',
847
854
  isSelectedItem: 'Lagt til',
855
+ selected: '{{count}} valgte',
848
856
  },
849
857
  blogPosts: {
850
858
  blog1: {
@@ -1087,6 +1095,7 @@ const messages = {
1087
1095
  confirmDeleteTag: 'Er du sikker på at du vil slette tag? Denne handlinga kan ikkje endrast.',
1088
1096
  myFolders: 'Mine mapper',
1089
1097
  myTags: 'Mine emneknaggar',
1098
+ mySubjects: 'Mine fag',
1090
1099
  newFolder: 'Ny mappe',
1091
1100
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
1092
1101
  myAccount: 'Min konto',
@@ -1188,6 +1197,9 @@ const messages = {
1188
1197
  contact: 'Kontakt',
1189
1198
  help: 'Hjelp',
1190
1199
  },
1200
+ programme: {
1201
+ grades: 'Trinn',
1202
+ },
1191
1203
  };
1192
1204
 
1193
1205
  export default messages;
@@ -252,8 +252,15 @@ const messages = {
252
252
  archived: 'Dát leat heaittihuvvon fága mii ii ođasmahttojuvvo.',
253
253
  },
254
254
  subjectsPage: {
255
+ allSubjects: 'Buot fágat',
255
256
  errorDescription: 'Šállošat, boasttuvuohta čuožžilii fágaid viežžamis.',
256
257
  chooseSubject: 'Vállje fága',
258
+ confirmRemove: 'Er du sikker på at du vil fjerne {{subject}} fra favorittfag?',
259
+ addFavorite: 'Legg til favorittfag',
260
+ removeFavorite: 'Fjern favorittfag',
261
+ removeConfirmed: '{{subject}} er fjernet fra favorittfag',
262
+ addConfirmed: '{{subject}} er lagt til som favorittfag',
263
+ shows: 'Viser',
257
264
  },
258
265
  topicPage: {
259
266
  articleErrorDescription: 'Šállošat, boasttuvuohta čuožžilii fáddáčilgehusa viežžamis.',
@@ -845,6 +852,7 @@ const messages = {
845
852
  searching: 'Ohcá...',
846
853
  create: 'Ráhkat ođđa',
847
854
  isSelectedItem: 'Lasihuvvon',
855
+ selected: '{{count}} valgte',
848
856
  },
849
857
  blogPosts: {
850
858
  blog1: {
@@ -1087,6 +1095,7 @@ const messages = {
1087
1095
  confirmDeleteTag: 'Leat go sihkar ahte dáhtut sihkkut fáddágilkora? Dan ii sáhte gáhtat.',
1088
1096
  myFolders: 'Mu máhpat',
1089
1097
  myTags: 'Mu fáddágilkorat',
1098
+ mySubjects: 'Mine fag',
1090
1099
  newFolder: 'Ođđa máhppa',
1091
1100
  newFolderUnder: 'Ráhkat ođđa máhpa dán vuolde {{folderName}}',
1092
1101
  myAccount: 'Mu kontu',
@@ -1189,6 +1198,9 @@ const messages = {
1189
1198
  contact: 'Váldde oktavuođa',
1190
1199
  help: 'Veahket',
1191
1200
  },
1201
+ programme: {
1202
+ grades: 'Trinn',
1203
+ },
1192
1204
  };
1193
1205
 
1194
1206
  export default messages;