@ndla/ui 47.1.3 → 47.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.
- package/es/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +15 -32
- package/es/ExpandableBox/index.js +9 -0
- package/es/Footer/Footer.js +8 -8
- package/es/Footer/FooterLinks.js +6 -6
- package/es/Image/Image.js +5 -14
- package/es/Resource/storyComponents.js +67 -0
- package/es/index.js +1 -0
- package/es/locale/messages-en.js +15 -4
- package/es/locale/messages-nb.js +15 -4
- package/es/locale/messages-nn.js +15 -4
- package/es/locale/messages-se.js +13 -2
- package/es/locale/messages-sma.js +17 -6
- package/lib/ExpandableBox/ExpandableBox.d.ts +15 -0
- package/lib/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +18 -32
- package/lib/ExpandableBox/index.d.ts +8 -0
- package/lib/ExpandableBox/index.js +18 -0
- package/lib/Footer/Footer.d.ts +5 -9
- package/lib/Footer/Footer.js +8 -8
- package/lib/Footer/FooterLinks.d.ts +5 -9
- package/lib/Footer/FooterLinks.js +6 -6
- package/lib/Image/Image.js +5 -14
- package/lib/Resource/storyComponents.d.ts +12 -0
- package/lib/Resource/storyComponents.js +74 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/locale/messages-en.d.ts +13 -2
- package/lib/locale/messages-en.js +15 -4
- package/lib/locale/messages-nb.d.ts +13 -2
- package/lib/locale/messages-nb.js +15 -4
- package/lib/locale/messages-nn.d.ts +13 -2
- package/lib/locale/messages-nn.js +15 -4
- package/lib/locale/messages-se.d.ts +13 -2
- package/lib/locale/messages-se.js +13 -2
- package/lib/locale/messages-sma.d.ts +13 -2
- package/lib/locale/messages-sma.js +17 -6
- package/package.json +18 -18
- package/src/Breadcrumb/Breadcrumb.stories.tsx +77 -0
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +57 -0
- package/src/ContentLoader/ContentLoader.stories.tsx +64 -0
- package/src/ExpandableBox/ExpandableBox.stories.tsx +34 -0
- package/src/ExpandableBox/ExpandableBox.tsx +21 -0
- package/src/ExpandableBox/index.ts +9 -0
- package/src/FactBox/Factbox.stories.tsx +62 -0
- package/src/FileList/FileList.stories.tsx +48 -0
- package/src/Footer/Footer.stories.tsx +116 -0
- package/src/Footer/Footer.tsx +5 -9
- package/src/Footer/FooterLinks.tsx +5 -9
- package/src/Image/Image.stories.tsx +63 -0
- package/src/Image/Image.tsx +3 -17
- package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +19 -10
- package/src/List/OrderedList.stories.tsx +114 -0
- package/src/List/UnorderedList.stories.tsx +46 -0
- package/src/Messages/MessageBanner.stories.tsx +33 -0
- package/src/Messages/MessageBox.stories.tsx +60 -0
- package/src/MyNdla/Resource/Folder.stories.tsx +31 -4
- package/src/MyNdla/Resource/FolderInput.stories.tsx +29 -0
- package/src/Resource/BlockResource.stories.tsx +51 -5
- package/src/Resource/ListResource.stories.tsx +98 -0
- package/src/Resource/storyComponents.tsx +46 -0
- package/src/SnackBar/Snack.stories.tsx +91 -0
- package/src/Table/Table.stories.tsx +701 -0
- package/src/index.ts +1 -0
- package/src/locale/messages-en.ts +12 -4
- package/src/locale/messages-nb.ts +15 -4
- package/src/locale/messages-nn.ts +15 -4
- package/src/locale/messages-se.ts +10 -2
- package/src/locale/messages-sma.ts +14 -6
- package/lib/Image/LazyLoadImage.d.ts +0 -17
- package/src/Image/LazyLoadImage.tsx +0 -37
- package/src/Resource/Resource.stories.tsx +0 -81
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare const resourceTypesArr: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare const StoryResourceMenu: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resourceTypesArr = exports.StoryResourceMenu = void 0;
|
|
7
|
+
var _dropdownMenu = require("@ndla/dropdown-menu");
|
|
8
|
+
var _button = require("@ndla/button");
|
|
9
|
+
var _contentType = require("@ndla/icons/contentType");
|
|
10
|
+
var _action = require("@ndla/icons/action");
|
|
11
|
+
var _editor = require("@ndla/icons/editor");
|
|
12
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
+
/**
|
|
14
|
+
* Copyright (c) 2022-present, NDLA.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var resourceTypesArr = [{
|
|
22
|
+
id: 'urn:resourcetype:learningPath',
|
|
23
|
+
name: 'Læringssti'
|
|
24
|
+
}, {
|
|
25
|
+
id: 'urn:resourcetype:subjectMaterial',
|
|
26
|
+
name: 'Fagstoff'
|
|
27
|
+
}, {
|
|
28
|
+
id: 'urn:resourcetype:tasksAndActivities',
|
|
29
|
+
name: 'Oppgaver og aktiviteter'
|
|
30
|
+
}, {
|
|
31
|
+
id: 'urn:resourcetype:reviewResource',
|
|
32
|
+
name: 'Vurderingsressurs'
|
|
33
|
+
}, {
|
|
34
|
+
id: 'urn:resourcetype:externalResource',
|
|
35
|
+
name: 'Ekstern læringsressurs'
|
|
36
|
+
}, {
|
|
37
|
+
id: 'urn:resourcetype:SourceMaterial',
|
|
38
|
+
name: 'Kildemateriale'
|
|
39
|
+
}];
|
|
40
|
+
exports.resourceTypesArr = resourceTypesArr;
|
|
41
|
+
var StoryResourceMenu = function StoryResourceMenu() {
|
|
42
|
+
return (0, _jsxRuntime.jsxs)(_dropdownMenu.DropdownMenu, {
|
|
43
|
+
children: [(0, _jsxRuntime.jsx)(_dropdownMenu.DropdownTrigger, {
|
|
44
|
+
children: (0, _jsxRuntime.jsx)(_button.IconButtonV2, {
|
|
45
|
+
"aria-label": "Show more",
|
|
46
|
+
title: "Show more",
|
|
47
|
+
variant: "ghost",
|
|
48
|
+
colorTheme: "light",
|
|
49
|
+
children: (0, _jsxRuntime.jsx)(_contentType.HorizontalMenu, {})
|
|
50
|
+
})
|
|
51
|
+
}), (0, _jsxRuntime.jsxs)(_dropdownMenu.DropdownContent, {
|
|
52
|
+
children: [(0, _jsxRuntime.jsx)(_dropdownMenu.DropdownItem, {
|
|
53
|
+
children: (0, _jsxRuntime.jsxs)(_button.ButtonV2, {
|
|
54
|
+
variant: "ghost",
|
|
55
|
+
colorTheme: "light",
|
|
56
|
+
shape: "sharp",
|
|
57
|
+
size: "small",
|
|
58
|
+
fontWeight: "normal",
|
|
59
|
+
children: [(0, _jsxRuntime.jsx)(_action.Pencil, {}), "Rediger"]
|
|
60
|
+
})
|
|
61
|
+
}), (0, _jsxRuntime.jsx)(_dropdownMenu.DropdownItem, {
|
|
62
|
+
children: (0, _jsxRuntime.jsxs)(_button.ButtonV2, {
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
colorTheme: "danger",
|
|
65
|
+
shape: "sharp",
|
|
66
|
+
size: "small",
|
|
67
|
+
fontWeight: "normal",
|
|
68
|
+
children: [(0, _jsxRuntime.jsx)(_editor.DeleteForever, {}), "Slett"]
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
exports.StoryResourceMenu = StoryResourceMenu;
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
export { ExpandableBox, ExpandableBoxSummary } from './ExpandableBox';
|
|
8
9
|
export { default as FramedContent } from './FramedContent';
|
|
9
10
|
export { default as SectionHeading } from './SectionHeading';
|
|
10
11
|
export { ConceptNotionV2, ImageEmbed, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept, } from './Embed';
|
package/lib/index.js
CHANGED
|
@@ -274,6 +274,18 @@ Object.defineProperty(exports, "ErrorResourceAccessDenied", {
|
|
|
274
274
|
return _ErrorMessage.ErrorResourceAccessDenied;
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
|
+
Object.defineProperty(exports, "ExpandableBox", {
|
|
278
|
+
enumerable: true,
|
|
279
|
+
get: function get() {
|
|
280
|
+
return _ExpandableBox.ExpandableBox;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
Object.defineProperty(exports, "ExpandableBoxSummary", {
|
|
284
|
+
enumerable: true,
|
|
285
|
+
get: function get() {
|
|
286
|
+
return _ExpandableBox.ExpandableBoxSummary;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
277
289
|
Object.defineProperty(exports, "ExternalEmbed", {
|
|
278
290
|
enumerable: true,
|
|
279
291
|
get: function get() {
|
|
@@ -1252,6 +1264,7 @@ Object.defineProperty(exports, "useSnack", {
|
|
|
1252
1264
|
return _SnackBar.useSnack;
|
|
1253
1265
|
}
|
|
1254
1266
|
});
|
|
1267
|
+
var _ExpandableBox = require("./ExpandableBox");
|
|
1255
1268
|
var _FramedContent = _interopRequireDefault(require("./FramedContent"));
|
|
1256
1269
|
var _SectionHeading = _interopRequireDefault(require("./SectionHeading"));
|
|
1257
1270
|
var _Embed = require("./Embed");
|
|
@@ -225,8 +225,14 @@ declare const messages: {
|
|
|
225
225
|
};
|
|
226
226
|
myProfile: {
|
|
227
227
|
title: string;
|
|
228
|
-
disclaimerTitle:
|
|
229
|
-
|
|
228
|
+
disclaimerTitle: {
|
|
229
|
+
employee: string;
|
|
230
|
+
student: string;
|
|
231
|
+
};
|
|
232
|
+
disclaimerText: {
|
|
233
|
+
employee: string;
|
|
234
|
+
student: string;
|
|
235
|
+
};
|
|
230
236
|
preferenceTitle: string;
|
|
231
237
|
preferenceText: string;
|
|
232
238
|
editButtonText: string;
|
|
@@ -799,6 +805,11 @@ declare const messages: {
|
|
|
799
805
|
subject: {
|
|
800
806
|
associatedTopics: string;
|
|
801
807
|
};
|
|
808
|
+
subjectFrontPage: {
|
|
809
|
+
buildsOn: string;
|
|
810
|
+
connectedTo: string;
|
|
811
|
+
leadsTo: string;
|
|
812
|
+
};
|
|
802
813
|
accordion: {
|
|
803
814
|
closeAll: string;
|
|
804
815
|
openAll: string;
|
|
@@ -486,6 +486,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
486
486
|
subject: {
|
|
487
487
|
associatedTopics: 'Associated topics'
|
|
488
488
|
},
|
|
489
|
+
subjectFrontPage: {
|
|
490
|
+
buildsOn: 'Builds on',
|
|
491
|
+
connectedTo: 'Common programme subject with',
|
|
492
|
+
leadsTo: 'Leads to'
|
|
493
|
+
},
|
|
489
494
|
accordion: {
|
|
490
495
|
closeAll: 'Close all',
|
|
491
496
|
openAll: 'Open all'
|
|
@@ -1231,8 +1236,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1231
1236
|
},
|
|
1232
1237
|
myProfile: {
|
|
1233
1238
|
title: 'My Profile',
|
|
1234
|
-
disclaimerTitle:
|
|
1235
|
-
|
|
1239
|
+
disclaimerTitle: {
|
|
1240
|
+
employee: 'Where is my picture and name used?',
|
|
1241
|
+
student: 'Where is my name used?'
|
|
1242
|
+
},
|
|
1243
|
+
disclaimerText: {
|
|
1244
|
+
employee: 'Your picture and name are displayed when you participate in discussions in the arena.',
|
|
1245
|
+
student: 'Your name is only displayed for you'
|
|
1246
|
+
},
|
|
1236
1247
|
preferenceTitle: 'Choose whether you want to display name when sharing a folder',
|
|
1237
1248
|
preferenceText: 'Here you can choose whether you want to display your name when you share a folder. The selected option applies to all your folders and can be changed later. If you later change the option, your name will appear on all your shared folders.',
|
|
1238
1249
|
editButtonText: 'Change profile picture',
|
|
@@ -1296,8 +1307,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1296
1307
|
help: 'Help'
|
|
1297
1308
|
},
|
|
1298
1309
|
programmes: {
|
|
1299
|
-
header: '
|
|
1300
|
-
description: '
|
|
1310
|
+
header: 'What do you want to learn today?',
|
|
1311
|
+
description: 'Choose a programme to see your subjects',
|
|
1301
1312
|
grades: 'Grades',
|
|
1302
1313
|
accordionHeader: 'All educational programmes'
|
|
1303
1314
|
},
|
|
@@ -225,8 +225,14 @@ declare const messages: {
|
|
|
225
225
|
};
|
|
226
226
|
myProfile: {
|
|
227
227
|
title: string;
|
|
228
|
-
disclaimerTitle:
|
|
229
|
-
|
|
228
|
+
disclaimerTitle: {
|
|
229
|
+
employee: string;
|
|
230
|
+
student: string;
|
|
231
|
+
};
|
|
232
|
+
disclaimerText: {
|
|
233
|
+
employee: string;
|
|
234
|
+
student: string;
|
|
235
|
+
};
|
|
230
236
|
preferenceTitle: string;
|
|
231
237
|
preferenceText: string;
|
|
232
238
|
editButtonText: string;
|
|
@@ -799,6 +805,11 @@ declare const messages: {
|
|
|
799
805
|
subject: {
|
|
800
806
|
associatedTopics: string;
|
|
801
807
|
};
|
|
808
|
+
subjectFrontPage: {
|
|
809
|
+
buildsOn: string;
|
|
810
|
+
connectedTo: string;
|
|
811
|
+
leadsTo: string;
|
|
812
|
+
};
|
|
802
813
|
accordion: {
|
|
803
814
|
closeAll: string;
|
|
804
815
|
openAll: string;
|
|
@@ -484,6 +484,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
484
484
|
subject: {
|
|
485
485
|
associatedTopics: 'Tilhørende emner'
|
|
486
486
|
},
|
|
487
|
+
subjectFrontPage: {
|
|
488
|
+
buildsOn: 'Bygger på',
|
|
489
|
+
connectedTo: 'Felles programfag sammen med',
|
|
490
|
+
leadsTo: 'Leder til'
|
|
491
|
+
},
|
|
487
492
|
accordion: {
|
|
488
493
|
closeAll: 'Lukk alle',
|
|
489
494
|
openAll: 'Åpne alle'
|
|
@@ -1229,8 +1234,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1229
1234
|
},
|
|
1230
1235
|
myProfile: {
|
|
1231
1236
|
title: 'Min Profil',
|
|
1232
|
-
disclaimerTitle:
|
|
1233
|
-
|
|
1237
|
+
disclaimerTitle: {
|
|
1238
|
+
employee: 'Hvor brukes bildet og navnet mitt?',
|
|
1239
|
+
student: 'Hvor brukes navnet mitt?'
|
|
1240
|
+
},
|
|
1241
|
+
disclaimerText: {
|
|
1242
|
+
employee: 'Bilde og navn vises når du deltar i diskusjoner i arenaen.',
|
|
1243
|
+
student: 'Navnet ditt vises bare for deg selv når du er logget inn.'
|
|
1244
|
+
},
|
|
1234
1245
|
preferenceTitle: 'Velg om du vil vise navn når du deler en mappe',
|
|
1235
1246
|
preferenceText: 'Her kan du selv velge om du vil vise navnet ditt når du deler en mappe. Valget gjelder for alle mappene dine og kan endres senere. Dersom du endrer vil navnet ditt vises på alle dine delte mapper.',
|
|
1236
1247
|
editButtonText: 'Endre profilbilde',
|
|
@@ -1294,8 +1305,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1294
1305
|
help: 'Hjelp'
|
|
1295
1306
|
},
|
|
1296
1307
|
programmes: {
|
|
1297
|
-
header: '
|
|
1298
|
-
description: '
|
|
1308
|
+
header: 'Hva vil du lære om i dag?',
|
|
1309
|
+
description: 'Velg utdanningsprogram for å se dine fag',
|
|
1299
1310
|
grades: 'Trinn',
|
|
1300
1311
|
accordionHeader: 'Alle utdanningsprogram'
|
|
1301
1312
|
},
|
|
@@ -225,8 +225,14 @@ declare const messages: {
|
|
|
225
225
|
};
|
|
226
226
|
myProfile: {
|
|
227
227
|
title: string;
|
|
228
|
-
disclaimerTitle:
|
|
229
|
-
|
|
228
|
+
disclaimerTitle: {
|
|
229
|
+
employee: string;
|
|
230
|
+
student: string;
|
|
231
|
+
};
|
|
232
|
+
disclaimerText: {
|
|
233
|
+
employee: string;
|
|
234
|
+
student: string;
|
|
235
|
+
};
|
|
230
236
|
preferenceTitle: string;
|
|
231
237
|
preferenceText: string;
|
|
232
238
|
editButtonText: string;
|
|
@@ -799,6 +805,11 @@ declare const messages: {
|
|
|
799
805
|
subject: {
|
|
800
806
|
associatedTopics: string;
|
|
801
807
|
};
|
|
808
|
+
subjectFrontPage: {
|
|
809
|
+
buildsOn: string;
|
|
810
|
+
connectedTo: string;
|
|
811
|
+
leadsTo: string;
|
|
812
|
+
};
|
|
802
813
|
accordion: {
|
|
803
814
|
closeAll: string;
|
|
804
815
|
openAll: string;
|
|
@@ -484,6 +484,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
484
484
|
subject: {
|
|
485
485
|
associatedTopics: 'Tilhøyrande emne'
|
|
486
486
|
},
|
|
487
|
+
subjectFrontPage: {
|
|
488
|
+
buildsOn: 'Byggjer på',
|
|
489
|
+
connectedTo: 'Felles programfag saman med',
|
|
490
|
+
leadsTo: 'Leier til'
|
|
491
|
+
},
|
|
487
492
|
accordion: {
|
|
488
493
|
closeAll: 'Lukk alle',
|
|
489
494
|
openAll: 'Åpne alle'
|
|
@@ -1229,8 +1234,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1229
1234
|
},
|
|
1230
1235
|
myProfile: {
|
|
1231
1236
|
title: 'Min Profil',
|
|
1232
|
-
disclaimerTitle:
|
|
1233
|
-
|
|
1237
|
+
disclaimerTitle: {
|
|
1238
|
+
employee: 'Kvar blir biletet og namnet mitt brukt?',
|
|
1239
|
+
student: 'Kvar blir namnet mitt brukt?'
|
|
1240
|
+
},
|
|
1241
|
+
disclaimerText: {
|
|
1242
|
+
employee: 'Bilete og namn vert vist når du deltek i diskusjonar i arenaen.',
|
|
1243
|
+
student: 'Namnet ditt blir berre vist for deg sjølv når du er logga inn.'
|
|
1244
|
+
},
|
|
1234
1245
|
preferenceTitle: 'Vel om du vil vise namn når du deler ei mappe',
|
|
1235
1246
|
preferenceText: 'Her kan du sjølv velje om du vil vise namnet ditt når du deler ei mappe. Valet gjeld for alle mappene dine og kan endrast seinare. Dersom du endrar vil namnet ditt visast på alle dine delte mapper.',
|
|
1236
1247
|
editButtonText: 'Endre profilbilete',
|
|
@@ -1294,8 +1305,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1294
1305
|
help: 'Hjelp'
|
|
1295
1306
|
},
|
|
1296
1307
|
programmes: {
|
|
1297
|
-
header: '
|
|
1298
|
-
description: '
|
|
1308
|
+
header: 'Kva vil du lære om i dag?',
|
|
1309
|
+
description: 'Vel utdanningsprogram for å sjå faga dine',
|
|
1299
1310
|
grades: 'Trinn',
|
|
1300
1311
|
accordionHeader: 'Alle utdanningsprogram'
|
|
1301
1312
|
},
|
|
@@ -225,8 +225,14 @@ declare const messages: {
|
|
|
225
225
|
};
|
|
226
226
|
myProfile: {
|
|
227
227
|
title: string;
|
|
228
|
-
disclaimerTitle:
|
|
229
|
-
|
|
228
|
+
disclaimerTitle: {
|
|
229
|
+
employee: string;
|
|
230
|
+
student: string;
|
|
231
|
+
};
|
|
232
|
+
disclaimerText: {
|
|
233
|
+
employee: string;
|
|
234
|
+
student: string;
|
|
235
|
+
};
|
|
230
236
|
preferenceTitle: string;
|
|
231
237
|
preferenceText: string;
|
|
232
238
|
editButtonText: string;
|
|
@@ -799,6 +805,11 @@ declare const messages: {
|
|
|
799
805
|
subject: {
|
|
800
806
|
associatedTopics: string;
|
|
801
807
|
};
|
|
808
|
+
subjectFrontPage: {
|
|
809
|
+
buildsOn: string;
|
|
810
|
+
connectedTo: string;
|
|
811
|
+
leadsTo: string;
|
|
812
|
+
};
|
|
802
813
|
accordion: {
|
|
803
814
|
closeAll: string;
|
|
804
815
|
openAll: string;
|
|
@@ -484,6 +484,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
484
484
|
subject: {
|
|
485
485
|
associatedTopics: 'Gullevaš fáttát'
|
|
486
486
|
},
|
|
487
|
+
subjectFrontPage: {
|
|
488
|
+
buildsOn: 'Duddjo dása',
|
|
489
|
+
connectedTo: 'Oktasaš prográmmafáddán lea',
|
|
490
|
+
leadsTo: 'Dát doalvu'
|
|
491
|
+
},
|
|
487
492
|
accordion: {
|
|
488
493
|
closeAll: 'Govčča buot',
|
|
489
494
|
openAll: 'Raba buot'
|
|
@@ -1229,8 +1234,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1229
1234
|
},
|
|
1230
1235
|
myProfile: {
|
|
1231
1236
|
title: 'Mu profiila',
|
|
1232
|
-
disclaimerTitle:
|
|
1233
|
-
|
|
1237
|
+
disclaimerTitle: {
|
|
1238
|
+
employee: 'Gos geavahit mu gova ja mu nama?',
|
|
1239
|
+
student: 'Gos geavahit mu nama?'
|
|
1240
|
+
},
|
|
1241
|
+
disclaimerText: {
|
|
1242
|
+
employee: 'Govva ja namma čájehuvvojit go searvat digaštallamii arenain.',
|
|
1243
|
+
student: 'Du namma čájehuvvo dušše go leat sisačálihuvvon'
|
|
1244
|
+
},
|
|
1234
1245
|
preferenceTitle: 'Vállje jos namma čájehuvvo máhpa juohkkedettiin',
|
|
1235
1246
|
preferenceText: 'Dás válljet jos iežat namma čájehuvvo juohkkedettiin máhpa. Dát molssaeaktu guoská buot máhpaide ja sáhttá rievdaduvvot maŋŋil. Jos rievdadat dán, de čájehuvvo du namma buot juogaduvvon máhpain.',
|
|
1236
1247
|
editButtonText: 'Rievdat profiilagova',
|
|
@@ -225,8 +225,14 @@ declare const messages: {
|
|
|
225
225
|
};
|
|
226
226
|
myProfile: {
|
|
227
227
|
title: string;
|
|
228
|
-
disclaimerTitle:
|
|
229
|
-
|
|
228
|
+
disclaimerTitle: {
|
|
229
|
+
employee: string;
|
|
230
|
+
student: string;
|
|
231
|
+
};
|
|
232
|
+
disclaimerText: {
|
|
233
|
+
employee: string;
|
|
234
|
+
student: string;
|
|
235
|
+
};
|
|
230
236
|
preferenceTitle: string;
|
|
231
237
|
preferenceText: string;
|
|
232
238
|
editButtonText: string;
|
|
@@ -799,6 +805,11 @@ declare const messages: {
|
|
|
799
805
|
subject: {
|
|
800
806
|
associatedTopics: string;
|
|
801
807
|
};
|
|
808
|
+
subjectFrontPage: {
|
|
809
|
+
buildsOn: string;
|
|
810
|
+
connectedTo: string;
|
|
811
|
+
leadsTo: string;
|
|
812
|
+
};
|
|
802
813
|
accordion: {
|
|
803
814
|
closeAll: string;
|
|
804
815
|
openAll: string;
|
|
@@ -484,6 +484,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
484
484
|
subject: {
|
|
485
485
|
associatedTopics: 'Teemah mah govlehtuvvieh'
|
|
486
486
|
},
|
|
487
|
+
subjectFrontPage: {
|
|
488
|
+
buildsOn: 'Bigkie bæjjese',
|
|
489
|
+
connectedTo: 'Tjåenghkies programmefaage aalkoealmetjidie',
|
|
490
|
+
leadsTo: 'Goh ryökneme'
|
|
491
|
+
},
|
|
487
492
|
accordion: {
|
|
488
493
|
closeAll: 'Dahph gaajhkh',
|
|
489
494
|
openAll: 'Rïhpesth gaajhkh'
|
|
@@ -1229,8 +1234,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1229
1234
|
},
|
|
1230
1235
|
myProfile: {
|
|
1231
1236
|
title: 'Mov Profijle',
|
|
1232
|
-
disclaimerTitle:
|
|
1233
|
-
|
|
1237
|
+
disclaimerTitle: {
|
|
1238
|
+
employee: 'Gusnie guvvie jïh nomme åtnasuvvieh?',
|
|
1239
|
+
student: 'Gusnie mov nomme'
|
|
1240
|
+
},
|
|
1241
|
+
disclaimerText: {
|
|
1242
|
+
employee: 'Guvvie jïh nomme våajnoes sjidtieh gosse meatan digkiedimmesne sijjesne.',
|
|
1243
|
+
student: 'Dov nomme ajve tjaalasåvva dutnjien gosse sïjse loggedh'
|
|
1244
|
+
},
|
|
1234
1245
|
preferenceTitle: 'Sjïehtedh jis edtja nommem vuesiehtidh gosse maabpam juekedh',
|
|
1235
1246
|
preferenceText: 'Daesnie jïjtje veeljh mejtie sïjhth dov nommem vuesiehtidh gosse maabpam juekedh . Daate veeljeme lea gaajhkine dov maabpojne, jïh maahta dam mænngan jarkelidh. Jis jeatjahdahtah , dov nomme sæjhta våajnoes årrodh gaajhkine dov joekedamme maabpojne.',
|
|
1236
1247
|
editButtonText: 'Naemhtie profijleguvviem jarkelidh',
|
|
@@ -1294,10 +1305,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1294
1305
|
help: 'Hjelp'
|
|
1295
1306
|
},
|
|
1296
1307
|
programmes: {
|
|
1297
|
-
header: '
|
|
1298
|
-
description: '
|
|
1299
|
-
grades: '
|
|
1300
|
-
accordionHeader: '
|
|
1308
|
+
header: 'Maam sïjhth daan biejjien lïeredh ?',
|
|
1309
|
+
description: 'Veeljh ööhpehtimmieprogrammem juktie dov faagide vuartasjidh',
|
|
1310
|
+
grades: 'Daltesasse',
|
|
1311
|
+
accordionHeader: 'Gaajhkh ööhpehtimmieprogrammh'
|
|
1301
1312
|
},
|
|
1302
1313
|
embed: {
|
|
1303
1314
|
conceptListError: 'Klarte ikkje å vise forklaringsliste',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "47.1
|
|
3
|
+
"version": "47.2.1",
|
|
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": "^2.2.
|
|
35
|
-
"@ndla/button": "^12.0.
|
|
36
|
-
"@ndla/carousel": "^4.0.
|
|
37
|
-
"@ndla/core": "^4.2.
|
|
38
|
-
"@ndla/dropdown-menu": "^1.0.
|
|
39
|
-
"@ndla/forms": "^5.0.
|
|
34
|
+
"@ndla/accordion": "^2.2.31",
|
|
35
|
+
"@ndla/button": "^12.0.5",
|
|
36
|
+
"@ndla/carousel": "^4.0.8",
|
|
37
|
+
"@ndla/core": "^4.2.2",
|
|
38
|
+
"@ndla/dropdown-menu": "^1.0.11",
|
|
39
|
+
"@ndla/forms": "^5.0.6",
|
|
40
40
|
"@ndla/hooks": "^2.1.1",
|
|
41
|
-
"@ndla/icons": "^4.1.
|
|
42
|
-
"@ndla/licenses": "^7.2.
|
|
43
|
-
"@ndla/modal": "^5.0.
|
|
44
|
-
"@ndla/notion": "^6.0.
|
|
45
|
-
"@ndla/safelink": "^4.1.
|
|
46
|
-
"@ndla/select": "^3.1.
|
|
47
|
-
"@ndla/switch": "^1.1.
|
|
48
|
-
"@ndla/tabs": "^3.1.
|
|
49
|
-
"@ndla/tooltip": "^5.0.
|
|
50
|
-
"@ndla/typography": "^0.2.
|
|
41
|
+
"@ndla/icons": "^4.1.3",
|
|
42
|
+
"@ndla/licenses": "^7.2.2",
|
|
43
|
+
"@ndla/modal": "^5.0.5",
|
|
44
|
+
"@ndla/notion": "^6.0.7",
|
|
45
|
+
"@ndla/safelink": "^4.1.30",
|
|
46
|
+
"@ndla/select": "^3.1.3",
|
|
47
|
+
"@ndla/switch": "^1.1.17",
|
|
48
|
+
"@ndla/tabs": "^3.1.2",
|
|
49
|
+
"@ndla/tooltip": "^5.0.5",
|
|
50
|
+
"@ndla/typography": "^0.2.4",
|
|
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",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4c1fdc46a9a9b9e34ae1429f70d233391a44e54b"
|
|
84
84
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
10
|
+
import Breadcrumb from './Breadcrumb';
|
|
11
|
+
import { defaultParameters } from '../../../../stories/defaults';
|
|
12
|
+
|
|
13
|
+
const items = [
|
|
14
|
+
{
|
|
15
|
+
name: 'Fag',
|
|
16
|
+
to: '#1',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Hovedemne tittel',
|
|
20
|
+
to: '#2',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Underemne tittel',
|
|
24
|
+
to: '#3',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Tittel på side/ressurs',
|
|
28
|
+
to: '#4',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
title: 'Components/Breadcrumb/Breadcrumb',
|
|
34
|
+
component: Breadcrumb,
|
|
35
|
+
tags: ['autodocs'],
|
|
36
|
+
args: {
|
|
37
|
+
items: items,
|
|
38
|
+
},
|
|
39
|
+
parameters: {
|
|
40
|
+
inlineStories: true,
|
|
41
|
+
...defaultParameters,
|
|
42
|
+
},
|
|
43
|
+
} as Meta<typeof Breadcrumb>;
|
|
44
|
+
|
|
45
|
+
export const Defalt: StoryObj<typeof Breadcrumb> = {};
|
|
46
|
+
|
|
47
|
+
export const CollapseFirst: StoryObj<typeof Breadcrumb> = {
|
|
48
|
+
args: { collapseFirst: true },
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const CollapseLast: StoryObj<typeof Breadcrumb> = {
|
|
52
|
+
args: { collapseLast: true },
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const AutoCollapse: StoryObj<typeof Breadcrumb> = {
|
|
56
|
+
args: { autoCollapse: true },
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const CustomSeparator: StoryObj<typeof Breadcrumb> = {
|
|
60
|
+
args: {
|
|
61
|
+
renderSeparator: (item, totalCount) => (
|
|
62
|
+
<div style={{ padding: '0px 12px' }}>
|
|
63
|
+
{item.index}/{totalCount}
|
|
64
|
+
</div>
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const CustomItem: StoryObj<typeof Breadcrumb> = {
|
|
70
|
+
args: {
|
|
71
|
+
renderItem: (item) => (
|
|
72
|
+
<div>
|
|
73
|
+
{item.index}:{item.name}
|
|
74
|
+
</div>
|
|
75
|
+
),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
10
|
+
import { colors } from '@ndla/core';
|
|
11
|
+
import HomeBreadcrumb from './HomeBreadcrumb';
|
|
12
|
+
import { defaultParameters } from '../../../../stories/defaults';
|
|
13
|
+
|
|
14
|
+
const items = [
|
|
15
|
+
{
|
|
16
|
+
name: 'Fag',
|
|
17
|
+
to: '#1',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Hovedemne tittel',
|
|
21
|
+
to: '#2',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Underemne tittel',
|
|
25
|
+
to: '#3',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Tittel på side/ressurs',
|
|
29
|
+
to: '#4',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
title: 'Components/Breadcrumb/HomeBreadcrumb',
|
|
35
|
+
component: HomeBreadcrumb,
|
|
36
|
+
tags: ['autodocs'],
|
|
37
|
+
parameters: {
|
|
38
|
+
inlineStories: true,
|
|
39
|
+
...defaultParameters,
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
items: items,
|
|
43
|
+
},
|
|
44
|
+
} as Meta<typeof HomeBreadcrumb>;
|
|
45
|
+
|
|
46
|
+
export const Default: StoryObj<typeof HomeBreadcrumb> = {};
|
|
47
|
+
|
|
48
|
+
export const Light: StoryObj<typeof HomeBreadcrumb> = {
|
|
49
|
+
args: { light: true },
|
|
50
|
+
decorators: [
|
|
51
|
+
(Story) => (
|
|
52
|
+
<div style={{ backgroundColor: colors.brand.primary }}>
|
|
53
|
+
<Story />
|
|
54
|
+
</div>
|
|
55
|
+
),
|
|
56
|
+
],
|
|
57
|
+
};
|