@ndla/ui 41.0.1 → 41.0.3

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.
@@ -269,6 +269,7 @@ declare const messages: {
269
269
  conceptListError: string;
270
270
  linkError: string;
271
271
  unsupported: string;
272
+ goTo: string;
272
273
  embedError: string;
273
274
  type: {
274
275
  image: string;
@@ -560,7 +560,7 @@ var messages = _objectSpread(_objectSpread({
560
560
  },
561
561
  concept: {
562
562
  heading: 'How to reuse concept content',
563
- description: 'You will find guidelines for use of concept content in the asset',
563
+ description: 'Remember that built-in content might have a different license than the explanation text',
564
564
  rules: 'Rules for use of concept:',
565
565
  title: 'Title',
566
566
  embedlink: {
@@ -1267,6 +1267,7 @@ var messages = _objectSpread(_objectSpread({
1267
1267
  conceptListError: 'Failed to show concept list',
1268
1268
  linkError: 'Failed to show link.',
1269
1269
  unsupported: "Embed {{type}} not supported.",
1270
+ goTo: 'Go to {{type}}',
1270
1271
  embedError: "An error occurred while loading the {{type}}. Try reloading the page.",
1271
1272
  type: {
1272
1273
  image: 'Image',
@@ -269,6 +269,7 @@ declare const messages: {
269
269
  conceptListError: string;
270
270
  linkError: string;
271
271
  unsupported: string;
272
+ goTo: string;
272
273
  embedError: string;
273
274
  type: {
274
275
  image: string;
@@ -575,7 +575,7 @@ var messages = _objectSpread(_objectSpread({
575
575
  },
576
576
  concept: {
577
577
  heading: 'Slik gjenbruker du forklaringer',
578
- description: 'Du finner retningslinjene for bruk av innholdet i forklaring-elementet',
578
+ description: 'Husk at innebygd innhold i en forklaring kan ha en annen lisens enn selve forklaringsteksten',
579
579
  rules: 'Regler for bruk av forklaring:',
580
580
  title: 'Tittel',
581
581
  embedlink: {
@@ -1267,6 +1267,7 @@ var messages = _objectSpread(_objectSpread({
1267
1267
  conceptListError: 'Klarte ikke å vise forklaringsliste',
1268
1268
  linkError: 'Klarte ikke å vise lenke.',
1269
1269
  unsupported: "Embed {{type}} er ikke st\xF8ttet.",
1270
+ goTo: 'Gå til {{type}}',
1270
1271
  embedError: "Beklager, en feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn siden p\xE5 nytt.",
1271
1272
  type: {
1272
1273
  image: 'Bilde',
@@ -269,6 +269,7 @@ declare const messages: {
269
269
  conceptListError: string;
270
270
  linkError: string;
271
271
  unsupported: string;
272
+ goTo: string;
272
273
  embedError: string;
273
274
  type: {
274
275
  image: string;
@@ -581,7 +581,7 @@ var messages = _objectSpread(_objectSpread({
581
581
  hasCopiedTitle: 'Innbyggingslenke kopiert'
582
582
  },
583
583
  heading: 'Slik gjenbruker du forklaringar',
584
- description: 'Du finn retningslinjene for bruk av innhaldet i forklaring-elementet',
584
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
585
585
  rules: 'Reglar for bruk av forklaring:',
586
586
  title: 'Tittel'
587
587
  },
@@ -1267,6 +1267,7 @@ var messages = _objectSpread(_objectSpread({
1267
1267
  conceptListError: 'Klarte ikkje å vise forklaringsliste',
1268
1268
  linkError: 'Klarte ikkje å vise lenke.',
1269
1269
  unsupported: "Embed {{type}} er ikkje st\xF8tta.",
1270
+ goTo: 'Gå til {{type}}',
1270
1271
  embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
1271
1272
  type: {
1272
1273
  image: 'Bilde',
@@ -269,6 +269,7 @@ declare const messages: {
269
269
  conceptListError: string;
270
270
  linkError: string;
271
271
  unsupported: string;
272
+ goTo: string;
272
273
  embedError: string;
273
274
  type: {
274
275
  image: string;
@@ -575,7 +575,7 @@ var messages = _objectSpread(_objectSpread({
575
575
  },
576
576
  concept: {
577
577
  heading: 'Ná geavahat čilgehusaid ođđasit',
578
- description: 'Njuolggadusaid sisdoalu geavaheapmái gávnnat čilgehus-elemeanttas',
578
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
579
579
  rules: 'Njuolggadusat čilgehusa geavaheapmái:',
580
580
  title: 'Tihttel',
581
581
  embedlink: {
@@ -1267,6 +1267,7 @@ var messages = _objectSpread(_objectSpread({
1267
1267
  conceptListError: 'Ii sáhttán čájehit čilgehuslisttu',
1268
1268
  linkError: 'Ii sáhttán čájehit liŋkka.',
1269
1269
  unsupported: "Embed {{type}} ii dorjojuvvo.",
1270
+ goTo: 'Gå til {{type}}',
1270
1271
  embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
1271
1272
  type: {
1272
1273
  image: 'Bilde',
@@ -269,6 +269,7 @@ declare const messages: {
269
269
  conceptListError: string;
270
270
  linkError: string;
271
271
  unsupported: string;
272
+ goTo: string;
272
273
  embedError: string;
273
274
  type: {
274
275
  image: string;
@@ -575,7 +575,7 @@ var messages = _objectSpread(_objectSpread({
575
575
  },
576
576
  concept: {
577
577
  heading: 'Slik gjenbruker du forklaringer',
578
- description: 'Datne njoelkedassh sisvege-åtnoen bïjre gaavnh buerkiestimmiebiehkesne',
578
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
579
579
  rules: 'Njoelkedassh guktie buerkiestimmiem nuhtjh:',
580
580
  title: 'Tihtele',
581
581
  embedlink: {
@@ -1267,6 +1267,7 @@ var messages = _objectSpread(_objectSpread({
1267
1267
  conceptListError: 'Klarte ikkje å vise forklaringsliste',
1268
1268
  linkError: 'Klarte ikkje å vise lenke.',
1269
1269
  unsupported: "Embed {{type}} er ikkje st\xF8tta.",
1270
+ goTo: 'Gå til {{type}}',
1270
1271
  embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
1271
1272
  type: {
1272
1273
  image: 'Bilde',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "41.0.1",
3
+ "version": "41.0.3",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,21 +31,21 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^2.2.7",
34
+ "@ndla/accordion": "^2.2.8",
35
35
  "@ndla/article-scripts": "^3.0.18",
36
- "@ndla/button": "^10.1.6",
37
- "@ndla/carousel": "^3.1.4",
38
- "@ndla/core": "^4.1.0",
39
- "@ndla/forms": "^4.3.6",
36
+ "@ndla/button": "^10.1.7",
37
+ "@ndla/carousel": "^3.1.5",
38
+ "@ndla/core": "^4.1.1",
39
+ "@ndla/forms": "^4.3.7",
40
40
  "@ndla/hooks": "^2.0.7",
41
- "@ndla/icons": "^3.0.2",
41
+ "@ndla/icons": "^3.0.3",
42
42
  "@ndla/licenses": "^7.0.4",
43
- "@ndla/modal": "^3.0.4",
44
- "@ndla/notion": "^5.0.4",
45
- "@ndla/safelink": "^4.1.6",
46
- "@ndla/switch": "^1.1.4",
47
- "@ndla/tabs": "^3.0.0",
48
- "@ndla/tooltip": "^4.1.6",
43
+ "@ndla/modal": "^3.0.5",
44
+ "@ndla/notion": "^5.0.5",
45
+ "@ndla/safelink": "^4.1.7",
46
+ "@ndla/switch": "^1.1.5",
47
+ "@ndla/tabs": "^3.0.1",
48
+ "@ndla/tooltip": "^4.1.7",
49
49
  "@ndla/util": "^3.1.13",
50
50
  "@radix-ui/react-dropdown-menu": "^2.0.5",
51
51
  "@radix-ui/react-popover": "^1.0.6",
@@ -74,8 +74,7 @@
74
74
  "devDependencies": {
75
75
  "@babel/plugin-proposal-optional-chaining": "^7.11.0",
76
76
  "@ndla/types-backend": "^0.2.5",
77
- "@ndla/types-embed": "^2.0.3",
78
- "@types/reach__dialog": "^0.1.0",
77
+ "@ndla/types-embed": "^2.0.4",
79
78
  "css-loader": "^6.7.3",
80
79
  "mini-css-extract-plugin": "^2.7.5",
81
80
  "sass-loader": "^13.2.2",
@@ -85,5 +84,5 @@
85
84
  "publishConfig": {
86
85
  "access": "public"
87
86
  },
88
- "gitHead": "fa0ea0a3016d954806212f3cf8f5351da28bdcef"
87
+ "gitHead": "114d24a32a8a13f1feca024e2569d191da9a2abb"
89
88
  }
@@ -125,7 +125,7 @@ const ImageEmbed = ({ embed, previewAlt, heartButton: HeartButton }: Props) => {
125
125
  type={imageSizes ? undefined : figureType}
126
126
  className={imageSizes ? 'c-figure--right expanded' : ''}
127
127
  >
128
- <ImageWrapper src={data.image.imageUrl} crop={crop} size={embedData.size}>
128
+ <ImageWrapper src={embedData.pageUrl || data.image.imageUrl} crop={crop} size={embedData.size}>
129
129
  <Image
130
130
  focalPoint={focalPoint}
131
131
  contentType={data.image.contentType}
@@ -33,7 +33,11 @@ const StyledSpan = styled.span`
33
33
 
34
34
  const LicenseLink = ({ license, asLink = true }: Props) => {
35
35
  if (asLink) {
36
- return <StyledSafeLink to={license.url}>{license.abbreviation}</StyledSafeLink>;
36
+ return (
37
+ <StyledSafeLink to={license.url} rel="license">
38
+ {license.abbreviation}
39
+ </StyledSafeLink>
40
+ );
37
41
  } else {
38
42
  return <StyledSpan>{license.abbreviation}</StyledSpan>;
39
43
  }
@@ -594,7 +594,7 @@ const messages = {
594
594
  },
595
595
  concept: {
596
596
  heading: 'How to reuse concept content',
597
- description: 'You will find guidelines for use of concept content in the asset',
597
+ description: 'Remember that built-in content might have a different license than the explanation text',
598
598
  rules: 'Rules for use of concept:',
599
599
  title: 'Title',
600
600
  embedlink: {
@@ -1315,6 +1315,7 @@ const messages = {
1315
1315
  conceptListError: 'Failed to show concept list',
1316
1316
  linkError: 'Failed to show link.',
1317
1317
  unsupported: `Embed {{type}} not supported.`,
1318
+ goTo: 'Go to {{type}}',
1318
1319
  embedError: `An error occurred while loading the {{type}}. Try reloading the page.`,
1319
1320
  type: {
1320
1321
  image: 'Image',
@@ -608,7 +608,7 @@ const messages = {
608
608
  },
609
609
  concept: {
610
610
  heading: 'Slik gjenbruker du forklaringer',
611
- description: 'Du finner retningslinjene for bruk av innholdet i forklaring-elementet',
611
+ description: 'Husk at innebygd innhold i en forklaring kan ha en annen lisens enn selve forklaringsteksten',
612
612
  rules: 'Regler for bruk av forklaring:',
613
613
  title: 'Tittel',
614
614
  embedlink: {
@@ -1311,6 +1311,7 @@ const messages = {
1311
1311
  conceptListError: 'Klarte ikke å vise forklaringsliste',
1312
1312
  linkError: 'Klarte ikke å vise lenke.',
1313
1313
  unsupported: `Embed {{type}} er ikke støttet.`,
1314
+ goTo: 'Gå til {{type}}',
1314
1315
  embedError: `Beklager, en feil oppstod ved lasting av {{type}}. Prøv å laste inn siden på nytt.`,
1315
1316
  type: {
1316
1317
  image: 'Bilde',
@@ -614,7 +614,7 @@ const messages = {
614
614
  hasCopiedTitle: 'Innbyggingslenke kopiert',
615
615
  },
616
616
  heading: 'Slik gjenbruker du forklaringar',
617
- description: 'Du finn retningslinjene for bruk av innhaldet i forklaring-elementet',
617
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
618
618
  rules: 'Reglar for bruk av forklaring:',
619
619
  title: 'Tittel',
620
620
  },
@@ -1311,6 +1311,7 @@ const messages = {
1311
1311
  conceptListError: 'Klarte ikkje å vise forklaringsliste',
1312
1312
  linkError: 'Klarte ikkje å vise lenke.',
1313
1313
  unsupported: `Embed {{type}} er ikkje støtta.`,
1314
+ goTo: 'Gå til {{type}}',
1314
1315
  embedError: `Orsak, ein feil oppstod ved lasting av {{type}}. Prøv å laste inn sida på nytt.`,
1315
1316
  type: {
1316
1317
  image: 'Bilde',
@@ -609,7 +609,7 @@ const messages = {
609
609
  },
610
610
  concept: {
611
611
  heading: 'Ná geavahat čilgehusaid ođđasit',
612
- description: 'Njuolggadusaid sisdoalu geavaheapmái gávnnat čilgehus-elemeanttas',
612
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
613
613
  rules: 'Njuolggadusat čilgehusa geavaheapmái:',
614
614
  title: 'Tihttel',
615
615
  embedlink: {
@@ -1312,6 +1312,7 @@ const messages = {
1312
1312
  conceptListError: 'Ii sáhttán čájehit čilgehuslisttu',
1313
1313
  linkError: 'Ii sáhttán čájehit liŋkka.',
1314
1314
  unsupported: `Embed {{type}} ii dorjojuvvo.`,
1315
+ goTo: 'Gå til {{type}}',
1315
1316
  embedError: `Orsak, ein feil oppstod ved lasting av {{type}}. Prøv å laste inn sida på nytt.`,
1316
1317
  type: {
1317
1318
  image: 'Bilde',
@@ -611,7 +611,7 @@ const messages = {
611
611
  },
612
612
  concept: {
613
613
  heading: 'Slik gjenbruker du forklaringer',
614
- description: 'Datne njoelkedassh sisvege-åtnoen bïjre gaavnh buerkiestimmiebiehkesne',
614
+ description: 'Husk at innebygd innhald i ei forklaring kan ha ein anna lisens enn sjølve forklaringsteksten',
615
615
  rules: 'Njoelkedassh guktie buerkiestimmiem nuhtjh:',
616
616
  title: 'Tihtele',
617
617
  embedlink: {
@@ -1316,6 +1316,7 @@ const messages = {
1316
1316
  conceptListError: 'Klarte ikkje å vise forklaringsliste',
1317
1317
  linkError: 'Klarte ikkje å vise lenke.',
1318
1318
  unsupported: `Embed {{type}} er ikkje støtta.`,
1319
+ goTo: 'Gå til {{type}}',
1319
1320
  embedError: `Orsak, ein feil oppstod ved lasting av {{type}}. Prøv å laste inn sida på nytt.`,
1320
1321
  type: {
1321
1322
  image: 'Bilde',