@ndla/ui 49.0.3 → 49.0.4

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.
@@ -241,6 +241,17 @@ declare const messages: {
241
241
  option1: string;
242
242
  option2: string;
243
243
  };
244
+ modalTexts: {
245
+ title: string;
246
+ uploadSection: {
247
+ title: string;
248
+ subTitle: string;
249
+ };
250
+ fileName: string;
251
+ fileTypes: string;
252
+ savePicture: string;
253
+ deletePicture: string;
254
+ };
244
255
  };
245
256
  resource: {
246
257
  add: string;
@@ -1264,6 +1264,17 @@ var messages = _objectSpread(_objectSpread({
1264
1264
  radioButtonText: {
1265
1265
  option1: 'Show my name when I share a folder',
1266
1266
  option2: 'Do not show my name when I share a folder'
1267
+ },
1268
+ modalTexts: {
1269
+ title: 'Upload a new profile picture',
1270
+ uploadSection: {
1271
+ title: 'Drag and drop',
1272
+ subTitle: 'or press to upload picture'
1273
+ },
1274
+ fileName: 'Uploaded file:',
1275
+ fileTypes: 'Accepted file types: PNG, JPG (Max 5MB)',
1276
+ savePicture: 'Save profile picture',
1277
+ deletePicture: 'Delete profile picture'
1267
1278
  }
1268
1279
  },
1269
1280
  resource: {
@@ -241,6 +241,17 @@ declare const messages: {
241
241
  option1: string;
242
242
  option2: string;
243
243
  };
244
+ modalTexts: {
245
+ title: string;
246
+ uploadSection: {
247
+ title: string;
248
+ subTitle: string;
249
+ };
250
+ fileName: string;
251
+ fileTypes: string;
252
+ savePicture: string;
253
+ deletePicture: string;
254
+ };
244
255
  };
245
256
  resource: {
246
257
  add: string;
@@ -1262,6 +1262,17 @@ var messages = _objectSpread(_objectSpread({
1262
1262
  radioButtonText: {
1263
1263
  option1: 'Vis navnet mitt når jeg deler en mappe',
1264
1264
  option2: 'Ikke vis navnet mitt når jeg deler mappe'
1265
+ },
1266
+ modalTexts: {
1267
+ title: 'Last opp nytt profilbilde',
1268
+ uploadSection: {
1269
+ title: 'Dra og slipp',
1270
+ subTitle: 'eller trykk for å laste opp bilde'
1271
+ },
1272
+ fileName: 'Opplastet fil:',
1273
+ fileTypes: 'Godkjente filtyper: PNG, JPG (Maks 5MB)',
1274
+ savePicture: 'Lagre profilbilde',
1275
+ deletePicture: 'Slett profilbilde'
1265
1276
  }
1266
1277
  },
1267
1278
  resource: {
@@ -241,6 +241,17 @@ declare const messages: {
241
241
  option1: string;
242
242
  option2: string;
243
243
  };
244
+ modalTexts: {
245
+ title: string;
246
+ uploadSection: {
247
+ title: string;
248
+ subTitle: string;
249
+ };
250
+ fileName: string;
251
+ fileTypes: string;
252
+ savePicture: string;
253
+ deletePicture: string;
254
+ };
244
255
  };
245
256
  resource: {
246
257
  add: string;
@@ -1262,6 +1262,17 @@ var messages = _objectSpread(_objectSpread({
1262
1262
  radioButtonText: {
1263
1263
  option1: 'Vis namnet mitt når eg deler ei mappe',
1264
1264
  option2: 'Ikkje vis namnet mitt når eg deler mappe'
1265
+ },
1266
+ modalTexts: {
1267
+ title: 'Last opp nytt profilbilete',
1268
+ uploadSection: {
1269
+ title: 'Dra og slepp',
1270
+ subTitle: 'eller trykk for å lasta opp bilete'
1271
+ },
1272
+ fileName: 'Opplasta fil:',
1273
+ fileTypes: 'Godkjente filtyper: PNG, JPG (Maks 5MB)',
1274
+ savePicture: 'Lagre profilbilete',
1275
+ deletePicture: 'Slett profilbilete'
1265
1276
  }
1266
1277
  },
1267
1278
  resource: {
@@ -241,6 +241,17 @@ declare const messages: {
241
241
  option1: string;
242
242
  option2: string;
243
243
  };
244
+ modalTexts: {
245
+ title: string;
246
+ uploadSection: {
247
+ title: string;
248
+ subTitle: string;
249
+ };
250
+ fileName: string;
251
+ fileTypes: string;
252
+ savePicture: string;
253
+ deletePicture: string;
254
+ };
244
255
  };
245
256
  resource: {
246
257
  add: string;
@@ -1262,6 +1262,17 @@ var messages = _objectSpread(_objectSpread({
1262
1262
  radioButtonText: {
1263
1263
  option1: 'Čájet mu nama máhpa juohkkedettiin',
1264
1264
  option2: 'Ale čájet mu nama máhpa juohkkedettiin'
1265
+ },
1266
+ modalTexts: {
1267
+ title: 'Viečča ođđa profiila gova',
1268
+ uploadSection: {
1269
+ title: 'Gease ja luoitte',
1270
+ subTitle: 'dahje coahkkal vai viežžat gova'
1271
+ },
1272
+ fileName: 'Sáddejuvvon fiila:',
1273
+ fileTypes: 'Dohkkehuvvon fiilašlájat: PNG, JPG (Máksá 5MB)',
1274
+ savePicture: 'Vurke profiilagova',
1275
+ deletePicture: 'Sihko profiilagova'
1265
1276
  }
1266
1277
  },
1267
1278
  resource: {
@@ -241,6 +241,17 @@ declare const messages: {
241
241
  option1: string;
242
242
  option2: string;
243
243
  };
244
+ modalTexts: {
245
+ title: string;
246
+ uploadSection: {
247
+ title: string;
248
+ subTitle: string;
249
+ };
250
+ fileName: string;
251
+ fileTypes: string;
252
+ savePicture: string;
253
+ deletePicture: string;
254
+ };
244
255
  };
245
256
  resource: {
246
257
  add: string;
@@ -1262,6 +1262,17 @@ var messages = _objectSpread(_objectSpread({
1262
1262
  radioButtonText: {
1263
1263
  option1: 'Vuesehth mov nommem gosse maabpam juekieh',
1264
1264
  option2: 'Aellieh mov nommem vuesehth gosse maabpam juekieh'
1265
+ },
1266
+ modalTexts: {
1267
+ title: 'Orre profijleguvviem bæjhkoehtidh',
1268
+ uploadSection: {
1269
+ title: 'Gïesh jïh luajhth',
1270
+ subTitle: 'jallh diedtieh juktie guvviem bæjjese vaeltedh'
1271
+ },
1272
+ fileName: 'Bijjiedamme tjaatsege:',
1273
+ fileTypes: 'Nænnoestamme tjaatsegh: PNG , JPG (Maakseme 5 MB)',
1274
+ savePicture: 'Vurkehth profijleguvviem',
1275
+ deletePicture: 'Prefikse guvviem sliejhtedh'
1265
1276
  }
1266
1277
  },
1267
1278
  resource: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "49.0.3",
3
+ "version": "49.0.4",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,23 +31,23 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^3.0.2",
35
- "@ndla/button": "^12.0.8",
36
- "@ndla/carousel": "^4.0.10",
37
- "@ndla/core": "^4.2.4",
38
- "@ndla/dropdown-menu": "^1.0.13",
39
- "@ndla/forms": "^5.0.10",
34
+ "@ndla/accordion": "^3.0.3",
35
+ "@ndla/button": "^12.0.9",
36
+ "@ndla/carousel": "^4.0.11",
37
+ "@ndla/core": "^4.2.5",
38
+ "@ndla/dropdown-menu": "^1.0.14",
39
+ "@ndla/forms": "^5.0.11",
40
40
  "@ndla/hooks": "^2.1.1",
41
- "@ndla/icons": "^4.1.5",
41
+ "@ndla/icons": "^4.1.6",
42
42
  "@ndla/licenses": "^7.2.2",
43
- "@ndla/modal": "^5.0.7",
44
- "@ndla/notion": "^6.0.10",
45
- "@ndla/safelink": "^4.1.33",
46
- "@ndla/select": "^3.1.5",
47
- "@ndla/switch": "^1.1.19",
48
- "@ndla/tabs": "^3.1.4",
49
- "@ndla/tooltip": "^6.0.1",
50
- "@ndla/typography": "^0.2.6",
43
+ "@ndla/modal": "^5.0.8",
44
+ "@ndla/notion": "^6.0.11",
45
+ "@ndla/safelink": "^4.1.34",
46
+ "@ndla/select": "^3.1.6",
47
+ "@ndla/switch": "^1.1.20",
48
+ "@ndla/tabs": "^3.1.5",
49
+ "@ndla/tooltip": "^6.0.2",
50
+ "@ndla/typography": "^0.2.7",
51
51
  "@ndla/util": "^4.0.0",
52
52
  "@radix-ui/react-popover": "^1.0.7",
53
53
  "@radix-ui/react-radio-group": "^1.1.3",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@ndla/types-backend": "^0.2.21",
73
- "@ndla/types-embed": "^4.0.5",
73
+ "@ndla/types-embed": "^4.0.6",
74
74
  "css-loader": "^6.7.3",
75
75
  "mini-css-extract-plugin": "^2.7.5",
76
76
  "sass-loader": "^13.2.2",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "ce524951b1e5c641505befbf93f9e605015aba6f"
83
+ "gitHead": "7b7ae968b766e37ae17f3917e2c051a22d2eb4e5"
84
84
  }
@@ -57,18 +57,21 @@ const Wrapper = styled.div`
57
57
 
58
58
  const GlossContainer = styled.div`
59
59
  display: flex;
60
+ align-items: center;
60
61
  flex-wrap: wrap;
61
62
  gap: ${spacing.nsmall};
63
+ span {
64
+ ${fonts.sizes('16px', '24px')};
65
+ }
66
+ span[data-pinyin] {
67
+ font-style: italic;
68
+ }
62
69
  `;
63
70
 
64
71
  const GlossSpan = styled.span`
65
72
  font-weight: ${fonts.weight.bold};
66
73
  `;
67
74
 
68
- const TypeSpan = styled.span`
69
- font-style: italic;
70
- `;
71
-
72
75
  const StyledAccordionHeader = styled(AccordionHeader)`
73
76
  font-family: ${fonts.sans};
74
77
  ${fonts.sizes('16px', '24px')};
@@ -92,6 +95,9 @@ const TranslatedText = styled.span`
92
95
  font-weight: ${fonts.weight.bold};
93
96
  background-color: ${colors.background.lightBlue};
94
97
  }
98
+ &[data-pinyin] {
99
+ font-style: italic;
100
+ }
95
101
  `;
96
102
 
97
103
  const Gloss = ({ title, glossData, audio }: Props) => {
@@ -116,6 +122,7 @@ const Gloss = ({ title, glossData, audio }: Props) => {
116
122
  )}
117
123
  {glossData.transcriptions.pinyin && (
118
124
  <span
125
+ data-pinyin=""
119
126
  key={t('gloss.transcriptions.pinyin')}
120
127
  aria-label={t('gloss.transcriptions.pinyin')}
121
128
  lang={glossData.originalLanguage}
@@ -124,7 +131,7 @@ const Gloss = ({ title, glossData, audio }: Props) => {
124
131
  </span>
125
132
  )}
126
133
  {glossData.wordClass && (
127
- <TypeSpan aria-label={t('gloss.wordClass')}>{t(`wordClass.${glossData.wordClass}`)}</TypeSpan>
134
+ <span aria-label={t('gloss.wordClass')}>{t(`wordClass.${glossData.wordClass}`).toLowerCase()}</span>
128
135
  )}
129
136
  </GlossContainer>
130
137
  {audio?.src && <SpeechControl src={audio.src} title={audio.title}></SpeechControl>}
@@ -144,7 +151,11 @@ const Gloss = ({ title, glossData, audio }: Props) => {
144
151
  {translation.example}
145
152
  </TranslatedText>
146
153
  {translation.transcriptions.pinyin && (
147
- <TranslatedText key={t('gloss.transcriptions.pinyin')} lang={glossData.originalLanguage}>
154
+ <TranslatedText
155
+ key={t('gloss.transcriptions.pinyin')}
156
+ data-pinyin=""
157
+ lang={glossData.originalLanguage}
158
+ >
148
159
  {translation.transcriptions?.pinyin}
149
160
  </TranslatedText>
150
161
  )}
@@ -188,6 +188,7 @@ interface Props {
188
188
  contentTypeDescription?: string;
189
189
  extraBottomMargin?: boolean;
190
190
  showAdditionalResources?: boolean;
191
+ language?: string;
191
192
  access?: 'teacher';
192
193
  heartButton?: (path: string) => ReactNode;
193
194
  }
@@ -212,6 +213,7 @@ const ResourceItem = ({
212
213
  additional,
213
214
  showAdditionalResources,
214
215
  access,
216
+ language,
215
217
  heartButton,
216
218
  }: Props & Resource) => {
217
219
  const { t } = useTranslation();
@@ -238,7 +240,12 @@ const ResourceItem = ({
238
240
  <ContentTypeBadge type={contentType ?? ''} background border={false} />
239
241
  </ContentBadgeWrapper>
240
242
  <InlineContainer>
241
- <ResourceLink to={path} aria-current={active ? 'page' : undefined} aria-describedby={describedBy}>
243
+ <ResourceLink
244
+ to={path}
245
+ lang={language}
246
+ aria-current={active ? 'page' : undefined}
247
+ aria-describedby={describedBy}
248
+ >
242
249
  {name}
243
250
  </ResourceLink>
244
251
  {active ? <CurrentSmall>{t('resource.youAreHere')}</CurrentSmall> : undefined}
@@ -205,6 +205,7 @@ const TableWrapper = styled.div`
205
205
  `;
206
206
 
207
207
  const OverflowWrapper = styled.div`
208
+ position: relative;
208
209
  overflow-x: auto;
209
210
  `;
210
211
 
@@ -1307,6 +1307,17 @@ const messages = {
1307
1307
  option1: 'Show my name when I share a folder',
1308
1308
  option2: 'Do not show my name when I share a folder',
1309
1309
  },
1310
+ modalTexts: {
1311
+ title: 'Upload a new profile picture',
1312
+ uploadSection: {
1313
+ title: 'Drag and drop',
1314
+ subTitle: 'or press to upload picture',
1315
+ },
1316
+ fileName: 'Uploaded file:',
1317
+ fileTypes: 'Accepted file types: PNG, JPG (Max 5MB)',
1318
+ savePicture: 'Save profile picture',
1319
+ deletePicture: 'Delete profile picture',
1320
+ },
1310
1321
  },
1311
1322
  resource: {
1312
1323
  add: 'Add folder/tag',
@@ -1306,6 +1306,17 @@ const messages = {
1306
1306
  option1: 'Vis navnet mitt når jeg deler en mappe',
1307
1307
  option2: 'Ikke vis navnet mitt når jeg deler mappe',
1308
1308
  },
1309
+ modalTexts: {
1310
+ title: 'Last opp nytt profilbilde',
1311
+ uploadSection: {
1312
+ title: 'Dra og slipp',
1313
+ subTitle: 'eller trykk for å laste opp bilde',
1314
+ },
1315
+ fileName: 'Opplastet fil:',
1316
+ fileTypes: 'Godkjente filtyper: PNG, JPG (Maks 5MB)',
1317
+ savePicture: 'Lagre profilbilde',
1318
+ deletePicture: 'Slett profilbilde',
1319
+ },
1309
1320
  },
1310
1321
  resource: {
1311
1322
  add: 'Legg til mappe/emneknagg',
@@ -1306,6 +1306,17 @@ const messages = {
1306
1306
  option1: 'Vis namnet mitt når eg deler ei mappe',
1307
1307
  option2: 'Ikkje vis namnet mitt når eg deler mappe',
1308
1308
  },
1309
+ modalTexts: {
1310
+ title: 'Last opp nytt profilbilete',
1311
+ uploadSection: {
1312
+ title: 'Dra og slepp',
1313
+ subTitle: 'eller trykk for å lasta opp bilete',
1314
+ },
1315
+ fileName: 'Opplasta fil:',
1316
+ fileTypes: 'Godkjente filtyper: PNG, JPG (Maks 5MB)',
1317
+ savePicture: 'Lagre profilbilete',
1318
+ deletePicture: 'Slett profilbilete',
1319
+ },
1309
1320
  },
1310
1321
  resource: {
1311
1322
  add: 'Legg til mappe/emneknagg',
@@ -1304,6 +1304,17 @@ const messages = {
1304
1304
  option1: 'Čájet mu nama máhpa juohkkedettiin',
1305
1305
  option2: 'Ale čájet mu nama máhpa juohkkedettiin',
1306
1306
  },
1307
+ modalTexts: {
1308
+ title: 'Viečča ođđa profiila gova',
1309
+ uploadSection: {
1310
+ title: 'Gease ja luoitte',
1311
+ subTitle: 'dahje coahkkal vai viežžat gova',
1312
+ },
1313
+ fileName: 'Sáddejuvvon fiila:',
1314
+ fileTypes: 'Dohkkehuvvon fiilašlájat: PNG, JPG (Máksá 5MB)',
1315
+ savePicture: 'Vurke profiilagova',
1316
+ deletePicture: 'Sihko profiilagova',
1317
+ },
1307
1318
  },
1308
1319
  resource: {
1309
1320
  add: 'Lasit máhpa/fáddágilkora',
@@ -1308,6 +1308,17 @@ const messages = {
1308
1308
  option1: 'Vuesehth mov nommem gosse maabpam juekieh',
1309
1309
  option2: 'Aellieh mov nommem vuesehth gosse maabpam juekieh',
1310
1310
  },
1311
+ modalTexts: {
1312
+ title: 'Orre profijleguvviem bæjhkoehtidh',
1313
+ uploadSection: {
1314
+ title: 'Gïesh jïh luajhth',
1315
+ subTitle: 'jallh diedtieh juktie guvviem bæjjese vaeltedh',
1316
+ },
1317
+ fileName: 'Bijjiedamme tjaatsege:',
1318
+ fileTypes: 'Nænnoestamme tjaatsegh: PNG , JPG (Maakseme 5 MB)',
1319
+ savePicture: 'Vurkehth profijleguvviem',
1320
+ deletePicture: 'Prefikse guvviem sliejhtedh',
1321
+ },
1311
1322
  },
1312
1323
  resource: {
1313
1324
  add: 'Legg til mappe/emneknagg',