@ndla/ui 44.0.24 → 45.0.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 (93) hide show
  1. package/es/CampaignBlock/CampaignBlock.js +13 -16
  2. package/es/CompetenceGoalTab/CompetenceItem.js +9 -9
  3. package/es/Embed/ImageEmbed.js +17 -9
  4. package/es/ErrorMessage/ErrorMessage.js +7 -7
  5. package/es/Layout/PageContainer.js +7 -3
  6. package/es/LicenseByline/EmbedByline.js +6 -6
  7. package/es/List/OrderedList.js +1 -1
  8. package/es/List/UnOrderedList.js +1 -1
  9. package/es/NDLAFilm/AllMoviesAlphabetically.js +11 -9
  10. package/es/NDLAFilm/FilmContentCard.js +45 -29
  11. package/es/NDLAFilm/FilmContentCardTags.js +13 -9
  12. package/es/NDLAFilm/FilmMovieList.js +7 -16
  13. package/es/NDLAFilm/FilmMovieSearch.js +4 -4
  14. package/es/NDLAFilm/FilmSlideshow.js +55 -106
  15. package/es/NDLAFilm/MovieGrid.js +9 -12
  16. package/es/NDLAFilm/filmStyles.js +4 -4
  17. package/es/Table/Table.js +8 -6
  18. package/es/all.css +1 -1
  19. package/es/locale/messages-en.js +3 -2
  20. package/es/locale/messages-nb.js +3 -2
  21. package/es/locale/messages-nn.js +3 -2
  22. package/es/locale/messages-se.js +2 -1
  23. package/es/locale/messages-sma.js +3 -2
  24. package/lib/CampaignBlock/CampaignBlock.d.ts +3 -3
  25. package/lib/CampaignBlock/CampaignBlock.js +13 -16
  26. package/lib/CompetenceGoalTab/CompetenceItem.js +9 -9
  27. package/lib/Embed/ImageEmbed.d.ts +6 -6
  28. package/lib/Embed/ImageEmbed.js +17 -9
  29. package/lib/ErrorMessage/ErrorMessage.js +7 -7
  30. package/lib/Layout/PageContainer.d.ts +3 -3
  31. package/lib/Layout/PageContainer.js +16 -11
  32. package/lib/LicenseByline/EmbedByline.js +6 -6
  33. package/lib/List/OrderedList.js +1 -1
  34. package/lib/List/UnOrderedList.js +1 -1
  35. package/lib/NDLAFilm/AllMoviesAlphabetically.js +11 -9
  36. package/lib/NDLAFilm/FilmContentCard.d.ts +3 -4
  37. package/lib/NDLAFilm/FilmContentCard.js +50 -35
  38. package/lib/NDLAFilm/FilmContentCardTags.js +13 -9
  39. package/lib/NDLAFilm/FilmMovieList.d.ts +1 -4
  40. package/lib/NDLAFilm/FilmMovieList.js +14 -21
  41. package/lib/NDLAFilm/FilmMovieSearch.js +4 -4
  42. package/lib/NDLAFilm/FilmSlideshow.d.ts +0 -9
  43. package/lib/NDLAFilm/FilmSlideshow.js +54 -106
  44. package/lib/NDLAFilm/MovieGrid.d.ts +1 -4
  45. package/lib/NDLAFilm/MovieGrid.js +8 -11
  46. package/lib/NDLAFilm/filmStyles.d.ts +2 -6
  47. package/lib/NDLAFilm/filmStyles.js +3 -3
  48. package/lib/Table/Table.js +8 -6
  49. package/lib/all.css +1 -1
  50. package/lib/locale/messages-en.d.ts +1 -0
  51. package/lib/locale/messages-en.js +3 -2
  52. package/lib/locale/messages-nb.d.ts +1 -0
  53. package/lib/locale/messages-nb.js +3 -2
  54. package/lib/locale/messages-nn.d.ts +1 -0
  55. package/lib/locale/messages-nn.js +3 -2
  56. package/lib/locale/messages-se.d.ts +1 -0
  57. package/lib/locale/messages-se.js +2 -1
  58. package/lib/locale/messages-sma.d.ts +1 -0
  59. package/lib/locale/messages-sma.js +3 -2
  60. package/package.json +20 -20
  61. package/src/Aside/component.aside.scss +1 -2
  62. package/src/CampaignBlock/CampaignBlock.stories.tsx +5 -8
  63. package/src/CampaignBlock/CampaignBlock.tsx +15 -17
  64. package/src/CompetenceGoalTab/CompetenceItem.tsx +0 -1
  65. package/src/Embed/ImageEmbed.tsx +13 -12
  66. package/src/ErrorMessage/ErrorMessage.tsx +1 -1
  67. package/src/FactBox/component.factbox.scss +1 -2
  68. package/src/Layout/PageContainer.tsx +8 -3
  69. package/src/LicenseByline/EmbedByline.tsx +3 -3
  70. package/src/List/OrderedList.tsx +1 -0
  71. package/src/List/UnOrderedList.tsx +0 -3
  72. package/src/NDLAFilm/AllMoviesAlphabetically.tsx +2 -0
  73. package/src/NDLAFilm/FilmContentCard.tsx +48 -51
  74. package/src/NDLAFilm/FilmContentCardTags.tsx +5 -2
  75. package/src/NDLAFilm/FilmMovieList.tsx +4 -21
  76. package/src/NDLAFilm/FilmMovieSearch.tsx +0 -1
  77. package/src/NDLAFilm/FilmSlideshow.tsx +47 -100
  78. package/src/NDLAFilm/MovieGrid.tsx +11 -17
  79. package/src/NDLAFilm/filmStyles.ts +8 -7
  80. package/src/Table/Table.tsx +8 -1
  81. package/src/locale/messages-en.ts +3 -2
  82. package/src/locale/messages-nb.ts +3 -2
  83. package/src/locale/messages-nn.ts +3 -2
  84. package/src/locale/messages-se.ts +2 -1
  85. package/src/locale/messages-sma.ts +3 -2
  86. package/es/NDLAFilm/NavigationArrow.js +0 -54
  87. package/es/NDLAFilm/SlideshowIndicator.js +0 -47
  88. package/lib/NDLAFilm/NavigationArrow.d.ts +0 -23
  89. package/lib/NDLAFilm/NavigationArrow.js +0 -63
  90. package/lib/NDLAFilm/SlideshowIndicator.d.ts +0 -15
  91. package/lib/NDLAFilm/SlideshowIndicator.js +0 -55
  92. package/src/NDLAFilm/NavigationArrow.tsx +0 -108
  93. package/src/NDLAFilm/SlideshowIndicator.tsx +0 -82
@@ -1307,6 +1307,7 @@ declare const messages: {
1307
1307
  showLess: string;
1308
1308
  };
1309
1309
  files: string;
1310
+ fileTypesNotSupported: string;
1310
1311
  download: string;
1311
1312
  expandButton: string;
1312
1313
  };
@@ -307,7 +307,7 @@ var messages = _objectSpread(_objectSpread({
307
307
  },
308
308
  socialMedia: {
309
309
  heading: 'Follow us',
310
- description: 'NDLA has several facebook- and twitter accounts. Find the one that suits you, and follow us!',
310
+ description: 'NDLA has several Facebook- and X-accounts. Find the one that suits you, and follow us!',
311
311
  mainLink: {
312
312
  name: 'Follow us'
313
313
  }
@@ -1017,6 +1017,7 @@ var messages = _objectSpread(_objectSpread({
1017
1017
  showLess: 'Show less'
1018
1018
  },
1019
1019
  files: 'Files',
1020
+ fileTypesNotSupported: 'Filetype(s) not supported: {{fileTypes}}',
1020
1021
  download: 'Download file: ',
1021
1022
  expandButton: 'Show large version'
1022
1023
  }, _licenses.contributorTypes.en), {}, {
@@ -1175,7 +1176,7 @@ var messages = _objectSpread(_objectSpread({
1175
1176
  loginTextLink: 'privacy policy here',
1176
1177
  loginTerms: 'Log in with Feide to receive access. By logging on your accept your terms of service',
1177
1178
  loginResourcePitch: 'Do you want to favorite this resource?',
1178
- loginWelcome: 'Welcome to My NDLA! This page allows you to organize your articles in your <i>own</i> way!',
1179
+ loginWelcome: 'Welcome to My NDLA! This page allows you to organize your articles in your own way!',
1179
1180
  deleteAccount: 'Delete My NDLA',
1180
1181
  welcome: 'Welcome to my NDLA! You can now save your favourite resources from NDLA and organise them in folders with tags',
1181
1182
  read: {
@@ -1307,6 +1307,7 @@ declare const messages: {
1307
1307
  showLess: string;
1308
1308
  };
1309
1309
  files: string;
1310
+ fileTypesNotSupported: string;
1310
1311
  download: string;
1311
1312
  expandButton: string;
1312
1313
  };
@@ -305,7 +305,7 @@ var messages = _objectSpread(_objectSpread({
305
305
  },
306
306
  socialMedia: {
307
307
  heading: 'Følg oss',
308
- description: 'NDLA har mange Facebook- og Twitter-kontoer. Finn den som passer for deg, og følg oss!',
308
+ description: 'NDLA har mange Facebook- og X-kontoer. Finn den som passer for deg, og følg oss!!',
309
309
  mainLink: {
310
310
  name: 'Følg oss'
311
311
  }
@@ -1015,6 +1015,7 @@ var messages = _objectSpread(_objectSpread({
1015
1015
  showLess: 'Vis mindre'
1016
1016
  },
1017
1017
  files: 'Filer',
1018
+ fileTypesNotSupported: 'Filtypen(e) støttes ikke: {{fileTypes}}',
1018
1019
  download: 'Last ned fil: ',
1019
1020
  expandButton: 'Vis stor versjon'
1020
1021
  }, _licenses.contributorTypes.nb), {}, {
@@ -1174,7 +1175,7 @@ var messages = _objectSpread(_objectSpread({
1174
1175
  loginTextLink: 'personvernerklæring her',
1175
1176
  loginTerms: 'Logg på med Feide for å få tilgang. Ved å logge på godkjenner du våre vilkår for bruk',
1176
1177
  loginResourcePitch: 'Ønsker du å favorittmerke denne ressursen?',
1177
- loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på <i>din</i> måte!',
1178
+ loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på din måte!',
1178
1179
  welcome: 'Velkommen til Min NDLA! Nå kan du lagre favorittressursene dine fra NDLA og organisere dem i mapper og med emneknagger.',
1179
1180
  read: {
1180
1181
  read: 'Les',
@@ -1307,6 +1307,7 @@ declare const messages: {
1307
1307
  };
1308
1308
  source: string;
1309
1309
  files: string;
1310
+ fileTypesNotSupported: string;
1310
1311
  download: string;
1311
1312
  expandButton: string;
1312
1313
  };
@@ -305,7 +305,7 @@ var messages = _objectSpread(_objectSpread({
305
305
  },
306
306
  socialMedia: {
307
307
  heading: 'Følg oss',
308
- description: 'NDLA har mange Facebook- og Twitter-kontoar. Finn den som passar for deg, og følg oss!',
308
+ description: 'NDLA har mange Facebook- og X-kontoar. Finn den som passar for deg, og følg oss',
309
309
  mainLink: {
310
310
  name: 'Følg oss'
311
311
  }
@@ -1015,6 +1015,7 @@ var messages = _objectSpread(_objectSpread({
1015
1015
  },
1016
1016
  source: 'Kjelde',
1017
1017
  files: 'Filer',
1018
+ fileTypesNotSupported: 'Filtypen(e) støttast ikkje: {{fileTypes}}',
1018
1019
  download: 'Last ned fil: ',
1019
1020
  expandButton: 'Vis stor versjon'
1020
1021
  }, _licenses.contributorTypes.nn), {}, {
@@ -1174,7 +1175,7 @@ var messages = _objectSpread(_objectSpread({
1174
1175
  loginTextLink: 'personvernerklæring her',
1175
1176
  loginTerms: 'Logg på med Feide for å få tilgang. Ved å logge på godkjennar du våre vilkår for bruk',
1176
1177
  loginResourcePitch: 'Ønsker du å favorittmerke denne resursen?',
1177
- loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på <i>din</i> måte!',
1178
+ loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på din måte!',
1178
1179
  welcome: 'Velkommen til Min NDLA! No kan du lagre favorittressursane dine frå NDLA og organisere dei i mapper og med emneknaggar.',
1179
1180
  read: {
1180
1181
  read: 'Les',
@@ -1307,6 +1307,7 @@ declare const messages: {
1307
1307
  showLess: string;
1308
1308
  };
1309
1309
  files: string;
1310
+ fileTypesNotSupported: string;
1310
1311
  download: string;
1311
1312
  expandButton: string;
1312
1313
  };
@@ -305,7 +305,7 @@ var messages = _objectSpread(_objectSpread({
305
305
  },
306
306
  socialMedia: {
307
307
  heading: 'Čuovo min',
308
- description: 'NDLAs leat máŋga Facebook- ja Twitter-konttu. Gávnna dan mii dutnje heive ja čuovo min!',
308
+ description: 'NDLAs leat máŋga Facebook- ja X-konttu. Gávnna dan mii dutnje heive ja čuovo min!',
309
309
  mainLink: {
310
310
  name: 'Čuovo min'
311
311
  }
@@ -1015,6 +1015,7 @@ var messages = _objectSpread(_objectSpread({
1015
1015
  showLess: 'Čájet unnit'
1016
1016
  },
1017
1017
  files: 'Fiillat',
1018
+ fileTypesNotSupported: 'Filtypen(e) støttast ikkje: {{fileTypes}}',
1018
1019
  download: 'Viečča fiilla: ',
1019
1020
  expandButton: 'Čájet stuora veršuvnna'
1020
1021
  }, _licenses.contributorTypes.se), {}, {
@@ -1307,6 +1307,7 @@ declare const messages: {
1307
1307
  showLess: string;
1308
1308
  };
1309
1309
  files: string;
1310
+ fileTypesNotSupported: string;
1310
1311
  download: string;
1311
1312
  expandButton: string;
1312
1313
  };
@@ -305,7 +305,7 @@ var messages = _objectSpread(_objectSpread({
305
305
  },
306
306
  socialMedia: {
307
307
  heading: 'Fulkh mijjem',
308
- description: 'NDLA gellie Facebook- jïh Twitterkontoeh åtna. Gaavnh dam mij dutnjien sjeahta jïh fulkh mijjem!',
308
+ description: 'NDLA gellie Facebook- jïh X-kontoeh åtna. Gaavnh dam mij dutnjien sjeahta jïh fulkh mijjem!',
309
309
  mainLink: {
310
310
  name: 'Fulkh mijjem'
311
311
  }
@@ -1015,6 +1015,7 @@ var messages = _objectSpread(_objectSpread({
1015
1015
  showLess: 'Vis mindre'
1016
1016
  },
1017
1017
  files: 'Filer',
1018
+ fileTypesNotSupported: 'Filtypen(e) støttast ikkje: {{fileTypes}}',
1018
1019
  download: 'Veedtjh fijlem: ',
1019
1020
  expandButton: 'Vuesehth stoerre versjovnem'
1020
1021
  }, _licenses.contributorTypes.nb), {}, {
@@ -1174,7 +1175,7 @@ var messages = _objectSpread(_objectSpread({
1174
1175
  loginTextLink: 'personvernerklæring her',
1175
1176
  loginTerms: 'Logg på med Feide for å få tilgang. Ved å logge på godkjenner du våre vilkår for bruk',
1176
1177
  loginResourcePitch: 'Ønsker du å favorittmerke denne ressursen?',
1177
- loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på <i>din</i> måte!',
1178
+ loginWelcome: 'Velkommen til NDLA! Her kan du organisere fagstoffet på din måte!',
1178
1179
  welcome: 'Velkommen til Min NDLA! Nå kan du lagre favorittressursene dine fra NDLA og organisere dem i mapper og med emneknagger.',
1179
1180
  read: {
1180
1181
  read: 'Les',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "44.0.24",
3
+ "version": "45.0.0",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,24 +31,24 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^2.2.21",
35
- "@ndla/article-scripts": "^3.0.20",
36
- "@ndla/button": "^11.0.6",
37
- "@ndla/carousel": "^3.1.15",
38
- "@ndla/core": "^4.1.6",
39
- "@ndla/dropdown-menu": "^1.0.4",
40
- "@ndla/forms": "^4.3.21",
41
- "@ndla/hooks": "^2.0.9",
42
- "@ndla/icons": "^4.0.5",
34
+ "@ndla/accordion": "^2.2.22",
35
+ "@ndla/article-scripts": "^3.0.21",
36
+ "@ndla/button": "^11.0.7",
37
+ "@ndla/carousel": "^4.0.0",
38
+ "@ndla/core": "^4.1.7",
39
+ "@ndla/dropdown-menu": "^1.0.5",
40
+ "@ndla/forms": "^4.3.22",
41
+ "@ndla/hooks": "^2.1.0",
42
+ "@ndla/icons": "^4.0.6",
43
43
  "@ndla/licenses": "^7.1.3",
44
- "@ndla/modal": "^4.0.5",
45
- "@ndla/notion": "^5.0.21",
46
- "@ndla/safelink": "^4.1.20",
47
- "@ndla/select": "^2.4.11",
48
- "@ndla/switch": "^1.1.11",
49
- "@ndla/tabs": "^3.0.7",
50
- "@ndla/tooltip": "^4.1.17",
51
- "@ndla/util": "^3.1.15",
44
+ "@ndla/modal": "^4.0.6",
45
+ "@ndla/notion": "^5.0.22",
46
+ "@ndla/safelink": "^4.1.21",
47
+ "@ndla/select": "^2.4.12",
48
+ "@ndla/switch": "^1.1.12",
49
+ "@ndla/tabs": "^3.0.8",
50
+ "@ndla/tooltip": "^4.1.18",
51
+ "@ndla/util": "^3.2.0",
52
52
  "@radix-ui/react-popover": "^1.0.6",
53
53
  "@radix-ui/react-slider": "^1.1.2",
54
54
  "date-fns": "^2.30.0",
@@ -73,7 +73,7 @@
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-optional-chaining": "^7.11.0",
75
75
  "@ndla/types-backend": "^0.2.5",
76
- "@ndla/types-embed": "^3.0.0",
76
+ "@ndla/types-embed": "^4.0.0",
77
77
  "css-loader": "^6.7.3",
78
78
  "mini-css-extract-plugin": "^2.7.5",
79
79
  "sass-loader": "^13.2.2",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "be3d061e056efdba7047017a37ca87fa8fe57bef"
86
+ "gitHead": "5acc97933b03a599d9ad83a4e3a6d305b573f83c"
87
87
  }
@@ -84,8 +84,7 @@
84
84
  }
85
85
 
86
86
  .c-aside__content > ol:not([class]),
87
- .c-aside__content :not(li) > ol:not([class]),
88
- .c-aside__content .ol-list--roman {
87
+ .c-aside__content :not(li) > ol:not([class]) {
89
88
  @include mq(desktop) {
90
89
  margin-left: $spacing--large;
91
90
  }
@@ -20,7 +20,7 @@ export default {
20
20
  args: {},
21
21
  } as Meta<typeof CampaignBlock>;
22
22
 
23
- export const BothImages: StoryObj<typeof CampaignBlock> = {
23
+ export const ImageLeft: StoryObj<typeof CampaignBlock> = {
24
24
  args: {
25
25
  title: { title: 'NDLA film', language: 'nb-no' },
26
26
  description: {
@@ -32,18 +32,14 @@ export const BothImages: StoryObj<typeof CampaignBlock> = {
32
32
  url: '#',
33
33
  text: 'Gå til NDLA film',
34
34
  },
35
- imageBefore: {
35
+ image: {
36
36
  alt: '',
37
37
  src: 'https://api.test.ndla.no/image-api/raw/n2UYRxEG.png',
38
38
  },
39
- imageAfter: {
40
- alt: '',
41
- src: 'https://api.test.ndla.no/image-api/raw/8GOxOhjr.png',
42
- },
43
39
  },
44
40
  };
45
41
 
46
- export const SingleImage: StoryObj<typeof CampaignBlock> = {
42
+ export const ImageRight: StoryObj<typeof CampaignBlock> = {
47
43
  args: {
48
44
  title: { title: 'FN-dagen 24. oktober!', language: 'nb-no' },
49
45
  description: {
@@ -54,9 +50,10 @@ export const SingleImage: StoryObj<typeof CampaignBlock> = {
54
50
  url: '#',
55
51
  text: 'Les mer om FN-dagen',
56
52
  },
57
- imageAfter: {
53
+ image: {
58
54
  alt: 'FN-symbol',
59
55
  src: 'https://api.test.ndla.no/image-api/raw/LkmDGtip.png',
60
56
  },
57
+ imageSide: 'right',
61
58
  },
62
59
  };
@@ -33,8 +33,8 @@ interface Props {
33
33
  url: string;
34
34
  text: string;
35
35
  };
36
- imageBefore?: Image;
37
- imageAfter?: Image;
36
+ image?: Image;
37
+ imageSide?: 'left' | 'right';
38
38
  className?: string;
39
39
  path?: string;
40
40
  }
@@ -43,14 +43,20 @@ const Container = styled.div`
43
43
  max-width: 390px;
44
44
  display: flex;
45
45
  flex-direction: column;
46
- gap: ${spacing.xsmall};
46
+ gap: ${spacing.normal};
47
47
  border: 1px ${colors.brand.lighter} solid;
48
48
  border-radius: ${misc.borderRadius};
49
- padding: ${spacing.normal} ${spacing.small};
49
+ padding: ${spacing.normal};
50
50
  background-color: ${colors.white};
51
+ &[data-image-side='right'] {
52
+ flex-direction: column-reverse;
53
+ }
51
54
  ${mq.range({ from: breakpoints.tabletWide })} {
52
55
  max-width: 1100px;
53
56
  flex-direction: row;
57
+ &[data-image-side='right'] {
58
+ flex-direction: row-reverse;
59
+ }
54
60
  }
55
61
  `;
56
62
 
@@ -69,17 +75,10 @@ const StyledImg = styled.img`
69
75
  `;
70
76
 
71
77
  const StyledLink = styled(SafeLink)`
72
- display: flex;
78
+ display: inline-flex;
73
79
  align-items: center;
74
80
  gap: ${spacing.xxsmall};
75
- box-shadow: none;
76
- text-decoration: underline;
77
- font-weight: ${fonts.weight.semibold};
78
81
  color: ${colors.brand.primary};
79
- &:hover,
80
- &:focus-visible {
81
- text-decoration: none;
82
- }
83
82
  `;
84
83
 
85
84
  const TextWrapper = styled.div`
@@ -88,18 +87,18 @@ const TextWrapper = styled.div`
88
87
 
89
88
  const CampaignBlock = ({
90
89
  title,
91
- imageBefore,
90
+ image,
91
+ imageSide = 'left',
92
92
  description,
93
93
  headingLevel: Heading = 'h2',
94
- imageAfter,
95
94
  url,
96
95
  path,
97
96
  className,
98
97
  }: Props) => {
99
98
  const href = usePossiblyRelativeUrl(url.url, path);
100
99
  return (
101
- <Container className={className} data-type="campaign-block">
102
- {imageBefore && <StyledImg src={imageBefore.src} height={200} width={240} alt="" />}
100
+ <Container className={className} data-type="campaign-block" data-image-side={imageSide}>
101
+ {image && <StyledImg src={image.src} height={200} width={240} alt="" />}
103
102
  <TextWrapper>
104
103
  <Heading css={headingStyle}>{title.title}</Heading>
105
104
  <StyledDescription>{description.text}</StyledDescription>
@@ -108,7 +107,6 @@ const CampaignBlock = ({
108
107
  <Forward />
109
108
  </StyledLink>
110
109
  </TextWrapper>
111
- {imageAfter && <StyledImg src={imageAfter.src} height={200} width={240} alt="" />}
112
110
  </Container>
113
111
  );
114
112
  };
@@ -39,7 +39,6 @@ const GoalList = styled.ul`
39
39
  margin: 0;
40
40
  padding: 0;
41
41
  list-style-type: none;
42
- list-style-image: none;
43
42
  `;
44
43
 
45
44
  export type CompetenceTypeProps = 'competenceGoals' | 'coreElement';
@@ -77,24 +77,25 @@ const getSizes = (size?: string, align?: string) => {
77
77
  };
78
78
 
79
79
  export const getFocalPoint = (data: ImageEmbedData) => {
80
- if (typeof data.focalX === 'number' && typeof data.focalY === 'number') {
81
- return { x: data.focalX, y: data.focalY };
80
+ const focalX = parseFloat(data.focalX ?? '');
81
+ const focalY = parseFloat(data.focalY ?? '');
82
+ if (!!focalX && !!focalY) {
83
+ return { x: focalX, y: focalY };
82
84
  }
83
85
  return undefined;
84
86
  };
85
87
 
86
88
  export const getCrop = (data: ImageEmbedData) => {
87
- if (
88
- typeof data.lowerRightX === 'number' &&
89
- typeof data.lowerRightY === 'number' &&
90
- typeof data.upperLeftX === 'number' &&
91
- typeof data.upperLeftY === 'number'
92
- ) {
89
+ const lowerRightX = parseFloat(data.lowerRightX ?? '');
90
+ const lowerRightY = parseFloat(data.lowerRightY ?? '');
91
+ const upperLeftX = parseFloat(data.upperLeftX ?? '');
92
+ const upperLeftY = parseFloat(data.upperLeftY ?? '');
93
+ if (!!lowerRightX && !!lowerRightY && !!upperLeftX && !!upperLeftY) {
93
94
  return {
94
- startX: data.lowerRightX,
95
- startY: data.lowerRightY,
96
- endX: data.upperLeftX,
97
- endY: data.upperLeftY,
95
+ startX: lowerRightX,
96
+ startY: lowerRightY,
97
+ endX: upperLeftX,
98
+ endY: upperLeftY,
98
99
  };
99
100
  }
100
101
  return undefined;
@@ -69,7 +69,7 @@ export const ErrorMessage = ({ children, messages, illustration, illustrationEle
69
69
  {messages.description && <Description>{messages.description}</Description>}
70
70
  {customElement && <CustomElementWrapper>{customElement}</CustomElementWrapper>}
71
71
  {messages.linksTitle && <h2>{messages.linksTitle}</h2>}
72
- {messages.back && typeof window !== 'undefined' && window.history.length > 1 && (
72
+ {messages.back && (
73
73
  <SafeLink to={`/#${encodeURI(messages.back)}`} onClick={() => window.history.back()}>
74
74
  {messages.back}
75
75
  </SafeLink>
@@ -41,8 +41,7 @@ $padding-bottom: 17px;
41
41
  }
42
42
 
43
43
  & > ol:not([class]),
44
- :not(li) > ol:not([class]),
45
- .ol-list--roman {
44
+ :not(li) > ol:not([class]) {
46
45
  @include mq(desktop) {
47
46
  margin-left: $spacing--large;
48
47
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { ReactNode } from 'react';
9
+ import { HTMLAttributes, ReactNode } from 'react';
10
10
  import BEMHelper from 'react-bem-helper';
11
11
 
12
12
  const classes = new BEMHelper({
@@ -14,7 +14,7 @@ const classes = new BEMHelper({
14
14
  prefix: 'o-',
15
15
  });
16
16
 
17
- interface Props {
17
+ interface Props extends HTMLAttributes<HTMLDivElement> {
18
18
  children?: ReactNode;
19
19
  background?: boolean;
20
20
  backgroundWide?: boolean;
@@ -28,6 +28,11 @@ export const PageContainer = ({
28
28
  backgroundWide = false,
29
29
  ndlaFilm = false,
30
30
  learningPath = false,
31
- }: Props) => <div {...classes('', { background, backgroundWide, ndlaFilm, learningPath })}>{children}</div>;
31
+ ...rest
32
+ }: Props) => (
33
+ <div {...classes('', { background, backgroundWide, ndlaFilm, learningPath })} {...rest}>
34
+ {children}
35
+ </div>
36
+ );
32
37
 
33
38
  export default PageContainer;
@@ -76,7 +76,7 @@ const BylineWrapper = styled.div`
76
76
  ${fonts.sizes('18px', '24px')};
77
77
  background-color: ${colors.brand.lightest};
78
78
  padding: ${spacing.nsmall} ${spacing.normal};
79
- border: 1px solid ${colors.brand.tertiary};
79
+ border: 1px solid ${colors.brand.light};
80
80
  border-top: none;
81
81
 
82
82
  &[data-top-rounded='true'] {
@@ -94,7 +94,7 @@ const BylineWrapper = styled.div`
94
94
  background-color: ${colors.support.redLightest};
95
95
  }
96
96
  &[data-first='true'] {
97
- border-top: 1px solid ${colors.brand.tertiary};
97
+ border-top: 1px solid ${colors.brand.light};
98
98
  }
99
99
  `;
100
100
 
@@ -113,7 +113,7 @@ const RightsWrapper = styled.div`
113
113
  ${mobileStyling}
114
114
  }
115
115
 
116
- ${mq.range({ until: breakpoints.tablet })} {
116
+ ${mq.range({ until: breakpoints.tabletWide })} {
117
117
  ${mobileStyling}
118
118
  }
119
119
  `;
@@ -64,6 +64,7 @@ const StyledOl = styled.ol`
64
64
  }
65
65
 
66
66
  > li {
67
+ min-height: ${spacing.normal};
67
68
  counter-increment: level1;
68
69
  &:before {
69
70
  position: absolute;
@@ -9,7 +9,6 @@
9
9
  import styled from '@emotion/styled';
10
10
  import { colors, fonts, spacing } from '@ndla/core';
11
11
  import { forwardRef, HTMLAttributes } from 'react';
12
- import { generateListResets } from './OrderedList';
13
12
 
14
13
  const StyledUl = styled.ul`
15
14
  padding-left: ${spacing.nsmall} !important;
@@ -18,9 +17,7 @@ const StyledUl = styled.ul`
18
17
  ${fonts.sizes('18px', '29px')};
19
18
 
20
19
  ul {
21
- list-style-image: none;
22
20
  padding-left: ${spacing.nsmall};
23
-
24
21
  margin-left: 0 !important;
25
22
  }
26
23
 
@@ -130,6 +130,8 @@ const AllMoviesAlphabetically = ({ movies }: Props) => {
130
130
  <MovieItem key={movie.id}>
131
131
  <StyledSafeLink to={movie.path}>
132
132
  <MovieImage
133
+ alt=""
134
+ loading="lazy"
133
135
  src={
134
136
  movie?.metaImage?.url ? `${movie.metaImage?.url}?${makeSrcQueryString(IMAGE_WIDTH * 2)}` : undefined
135
137
  }