@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
package/es/Image/Image.js
CHANGED
|
@@ -18,7 +18,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { colors } from '@ndla/core';
|
|
21
|
-
import LazyLoadImage from './LazyLoadImage';
|
|
22
21
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
23
22
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
24
23
|
export var makeSrcQueryString = function makeSrcQueryString(width, crop, focalPoint) {
|
|
@@ -39,7 +38,7 @@ var getSrcSet = function getSrcSet(src, crop, focalPoint) {
|
|
|
39
38
|
var StyledImageWrapper = /*#__PURE__*/_styled("div", {
|
|
40
39
|
target: "ejtxxex1",
|
|
41
40
|
label: "StyledImageWrapper"
|
|
42
|
-
})("position:relative;picture{width:100%;}&[data-svg='true']{display:flex;justify-content:center;}&[data-border='true']{border:1px solid ", colors.brand.tertiary, ";border-bottom:0;border-radius:4px;border-bottom-left-radius:0;border-bottom-right-radius:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
41
|
+
})("position:relative;picture{width:100%;}&[data-svg='true']{display:flex;justify-content:center;}&[data-border='true']{border:1px solid ", colors.brand.tertiary, ";border-bottom:0;border-radius:4px;border-bottom-left-radius:0;border-bottom-right-radius:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkltYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q3FDIiwiZmlsZSI6IkltYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDE3LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY29sb3JzIH0gZnJvbSAnQG5kbGEvY29yZSc7XG5pbXBvcnQgc3R5bGV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cmRlcj17Ym9yZGVyfT5cbiAgICAgICAgPFN0eWxlZEltYWdlIGFsdD17YWx0fSBsb2FkaW5nPXtsb2FkaW5nfSBzcmM9e2Ake3NyY31gfSB7Li4ucmVzdH0gZGF0YS1ib3JkZXI9e2JvcmRlcn0gLz5cbiAgICAgIDwvU3R5bGVkSW1hZ2VXcmFwcGVyPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxTdHlsZWRJbWFnZVdyYXBwZXIgZGF0YS1zdmc9e2NvbnRlbnRUeXBlID09PSAnaW1hZ2Uvc3ZnK3htbCd9IGRhdGEtYm9yZGVyPXtib3JkZXJ9PlxuICAgICAgPHBpY3R1cmU+XG4gICAgICAgIDxzb3VyY2UgdHlwZT17Y29udGVudFR5cGV9IHNyY1NldD17c3JjU2V0fSBzaXplcz17c2l6ZXN9IC8+XG4gICAgICAgIDxTdHlsZWRJbWFnZSBhbHQ9e2FsdH0gbG9hZGluZz17bG9hZGluZ30gc3JjPXtgJHtzcmN9PyR7cXVlcnlTdHJpbmd9YH0gey4uLnJlc3R9IGRhdGEtYm9yZGVyPXtib3JkZXJ9IC8+XG4gICAgICA8L3BpY3R1cmU+XG4gICAgICB7ZXhwYW5kQnV0dG9ufVxuICAgIDwvU3R5bGVkSW1hZ2VXcmFwcGVyPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgSW1hZ2U7XG4iXX0= */"));
|
|
43
42
|
var StyledImage = /*#__PURE__*/_styled("img", {
|
|
44
43
|
target: "ejtxxex0",
|
|
45
44
|
label: "StyledImage"
|
|
@@ -49,7 +48,7 @@ var StyledImage = /*#__PURE__*/_styled("img", {
|
|
|
49
48
|
} : {
|
|
50
49
|
name: "c7y25p",
|
|
51
50
|
styles: "&[data-border='true']{border-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:0;}",
|
|
52
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
51
|
+
map: "/*# sourceMappingURL=data:application/json;charset=ut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cnlTdHJpbmd9YH0gey4uLnJlc3R9IGRhdGEtYm9yZGVyPXtib3JkZXJ9IC8+XG4gICAgICA8L3BpY3R1cmU+XG4gICAgICB7ZXhwYW5kQnV0dG9ufVxuICAgIDwvU3R5bGVkSW1hZ2VXcmFwcGVyPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgSW1hZ2U7XG4iXX0= */",
|
|
53
52
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
54
53
|
});
|
|
55
54
|
var Image = function Image(_ref) {
|
|
@@ -70,28 +69,19 @@ var Image = function Image(_ref) {
|
|
|
70
69
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
71
70
|
var srcSet = (_rest$srcSet = rest.srcSet) !== null && _rest$srcSet !== void 0 ? _rest$srcSet : getSrcSet(src, crop, focalPoint);
|
|
72
71
|
var queryString = makeSrcQueryString(fallbackWidth, crop, focalPoint);
|
|
72
|
+
var loading = lazyLoad ? 'lazy' : undefined;
|
|
73
73
|
if (contentType && contentType === 'image/gif') {
|
|
74
74
|
return _jsx(StyledImageWrapper, {
|
|
75
75
|
"data-border": border,
|
|
76
76
|
children: _jsx(StyledImage, _objectSpread(_objectSpread({
|
|
77
77
|
alt: alt,
|
|
78
|
+
loading: loading,
|
|
78
79
|
src: "".concat(src)
|
|
79
80
|
}, rest), {}, {
|
|
80
81
|
"data-border": border
|
|
81
82
|
}))
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
|
-
if (lazyLoad) {
|
|
85
|
-
return _jsx(StyledImageWrapper, {
|
|
86
|
-
children: _jsx(LazyLoadImage, {
|
|
87
|
-
alt: alt,
|
|
88
|
-
src: "".concat(src, "?").concat(queryString),
|
|
89
|
-
srcSet: srcSet,
|
|
90
|
-
sizes: sizes,
|
|
91
|
-
lazyLoadSrc: lazyLoadSrc
|
|
92
|
-
})
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
85
|
return _jsxs(StyledImageWrapper, {
|
|
96
86
|
"data-svg": contentType === 'image/svg+xml',
|
|
97
87
|
"data-border": border,
|
|
@@ -102,6 +92,7 @@ var Image = function Image(_ref) {
|
|
|
102
92
|
sizes: sizes
|
|
103
93
|
}), _jsx(StyledImage, _objectSpread(_objectSpread({
|
|
104
94
|
alt: alt,
|
|
95
|
+
loading: loading,
|
|
105
96
|
src: "".concat(src, "?").concat(queryString)
|
|
106
97
|
}, rest), {}, {
|
|
107
98
|
"data-border": border
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
|
|
9
|
+
import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from '@ndla/dropdown-menu';
|
|
10
|
+
import { IconButtonV2, ButtonV2 } from '@ndla/button';
|
|
11
|
+
import { HorizontalMenu } from '@ndla/icons/contentType';
|
|
12
|
+
import { Pencil } from '@ndla/icons/action';
|
|
13
|
+
import { DeleteForever } from '@ndla/icons/editor';
|
|
14
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
16
|
+
export var resourceTypesArr = [{
|
|
17
|
+
id: 'urn:resourcetype:learningPath',
|
|
18
|
+
name: 'Læringssti'
|
|
19
|
+
}, {
|
|
20
|
+
id: 'urn:resourcetype:subjectMaterial',
|
|
21
|
+
name: 'Fagstoff'
|
|
22
|
+
}, {
|
|
23
|
+
id: 'urn:resourcetype:tasksAndActivities',
|
|
24
|
+
name: 'Oppgaver og aktiviteter'
|
|
25
|
+
}, {
|
|
26
|
+
id: 'urn:resourcetype:reviewResource',
|
|
27
|
+
name: 'Vurderingsressurs'
|
|
28
|
+
}, {
|
|
29
|
+
id: 'urn:resourcetype:externalResource',
|
|
30
|
+
name: 'Ekstern læringsressurs'
|
|
31
|
+
}, {
|
|
32
|
+
id: 'urn:resourcetype:SourceMaterial',
|
|
33
|
+
name: 'Kildemateriale'
|
|
34
|
+
}];
|
|
35
|
+
export var StoryResourceMenu = function StoryResourceMenu() {
|
|
36
|
+
return _jsxs(DropdownMenu, {
|
|
37
|
+
children: [_jsx(DropdownTrigger, {
|
|
38
|
+
children: _jsx(IconButtonV2, {
|
|
39
|
+
"aria-label": "Show more",
|
|
40
|
+
title: "Show more",
|
|
41
|
+
variant: "ghost",
|
|
42
|
+
colorTheme: "light",
|
|
43
|
+
children: _jsx(HorizontalMenu, {})
|
|
44
|
+
})
|
|
45
|
+
}), _jsxs(DropdownContent, {
|
|
46
|
+
children: [_jsx(DropdownItem, {
|
|
47
|
+
children: _jsxs(ButtonV2, {
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
colorTheme: "light",
|
|
50
|
+
shape: "sharp",
|
|
51
|
+
size: "small",
|
|
52
|
+
fontWeight: "normal",
|
|
53
|
+
children: [_jsx(Pencil, {}), "Rediger"]
|
|
54
|
+
})
|
|
55
|
+
}), _jsx(DropdownItem, {
|
|
56
|
+
children: _jsxs(ButtonV2, {
|
|
57
|
+
variant: "ghost",
|
|
58
|
+
colorTheme: "danger",
|
|
59
|
+
shape: "sharp",
|
|
60
|
+
size: "small",
|
|
61
|
+
fontWeight: "normal",
|
|
62
|
+
children: [_jsx(DeleteForever, {}), "Slett"]
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
};
|
package/es/index.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// Ignore typescript implicit any warning and export all javascript components
|
|
10
10
|
// Move components to this file when they are migrated to typescript
|
|
11
11
|
|
|
12
|
+
export { ExpandableBox, ExpandableBoxSummary } from './ExpandableBox';
|
|
12
13
|
export { default as FramedContent } from './FramedContent';
|
|
13
14
|
export { default as SectionHeading } from './SectionHeading';
|
|
14
15
|
export { ConceptNotionV2, ImageEmbed, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept } from './Embed';
|
package/es/locale/messages-en.js
CHANGED
|
@@ -477,6 +477,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
477
477
|
subject: {
|
|
478
478
|
associatedTopics: 'Associated topics'
|
|
479
479
|
},
|
|
480
|
+
subjectFrontPage: {
|
|
481
|
+
buildsOn: 'Builds on',
|
|
482
|
+
connectedTo: 'Common programme subject with',
|
|
483
|
+
leadsTo: 'Leads to'
|
|
484
|
+
},
|
|
480
485
|
accordion: {
|
|
481
486
|
closeAll: 'Close all',
|
|
482
487
|
openAll: 'Open all'
|
|
@@ -1222,8 +1227,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1222
1227
|
},
|
|
1223
1228
|
myProfile: {
|
|
1224
1229
|
title: 'My Profile',
|
|
1225
|
-
disclaimerTitle:
|
|
1226
|
-
|
|
1230
|
+
disclaimerTitle: {
|
|
1231
|
+
employee: 'Where is my picture and name used?',
|
|
1232
|
+
student: 'Where is my name used?'
|
|
1233
|
+
},
|
|
1234
|
+
disclaimerText: {
|
|
1235
|
+
employee: 'Your picture and name are displayed when you participate in discussions in the arena.',
|
|
1236
|
+
student: 'Your name is only displayed for you'
|
|
1237
|
+
},
|
|
1227
1238
|
preferenceTitle: 'Choose whether you want to display name when sharing a folder',
|
|
1228
1239
|
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.',
|
|
1229
1240
|
editButtonText: 'Change profile picture',
|
|
@@ -1287,8 +1298,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1287
1298
|
help: 'Help'
|
|
1288
1299
|
},
|
|
1289
1300
|
programmes: {
|
|
1290
|
-
header: '
|
|
1291
|
-
description: '
|
|
1301
|
+
header: 'What do you want to learn today?',
|
|
1302
|
+
description: 'Choose a programme to see your subjects',
|
|
1292
1303
|
grades: 'Grades',
|
|
1293
1304
|
accordionHeader: 'All educational programmes'
|
|
1294
1305
|
},
|
package/es/locale/messages-nb.js
CHANGED
|
@@ -476,6 +476,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
476
476
|
subject: {
|
|
477
477
|
associatedTopics: 'Tilhørende emner'
|
|
478
478
|
},
|
|
479
|
+
subjectFrontPage: {
|
|
480
|
+
buildsOn: 'Bygger på',
|
|
481
|
+
connectedTo: 'Felles programfag sammen med',
|
|
482
|
+
leadsTo: 'Leder til'
|
|
483
|
+
},
|
|
479
484
|
accordion: {
|
|
480
485
|
closeAll: 'Lukk alle',
|
|
481
486
|
openAll: 'Åpne alle'
|
|
@@ -1221,8 +1226,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1221
1226
|
},
|
|
1222
1227
|
myProfile: {
|
|
1223
1228
|
title: 'Min Profil',
|
|
1224
|
-
disclaimerTitle:
|
|
1225
|
-
|
|
1229
|
+
disclaimerTitle: {
|
|
1230
|
+
employee: 'Hvor brukes bildet og navnet mitt?',
|
|
1231
|
+
student: 'Hvor brukes navnet mitt?'
|
|
1232
|
+
},
|
|
1233
|
+
disclaimerText: {
|
|
1234
|
+
employee: 'Bilde og navn vises når du deltar i diskusjoner i arenaen.',
|
|
1235
|
+
student: 'Navnet ditt vises bare for deg selv når du er logget inn.'
|
|
1236
|
+
},
|
|
1226
1237
|
preferenceTitle: 'Velg om du vil vise navn når du deler en mappe',
|
|
1227
1238
|
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.',
|
|
1228
1239
|
editButtonText: 'Endre profilbilde',
|
|
@@ -1286,8 +1297,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1286
1297
|
help: 'Hjelp'
|
|
1287
1298
|
},
|
|
1288
1299
|
programmes: {
|
|
1289
|
-
header: '
|
|
1290
|
-
description: '
|
|
1300
|
+
header: 'Hva vil du lære om i dag?',
|
|
1301
|
+
description: 'Velg utdanningsprogram for å se dine fag',
|
|
1291
1302
|
grades: 'Trinn',
|
|
1292
1303
|
accordionHeader: 'Alle utdanningsprogram'
|
|
1293
1304
|
},
|
package/es/locale/messages-nn.js
CHANGED
|
@@ -476,6 +476,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
476
476
|
subject: {
|
|
477
477
|
associatedTopics: 'Tilhøyrande emne'
|
|
478
478
|
},
|
|
479
|
+
subjectFrontPage: {
|
|
480
|
+
buildsOn: 'Byggjer på',
|
|
481
|
+
connectedTo: 'Felles programfag saman med',
|
|
482
|
+
leadsTo: 'Leier til'
|
|
483
|
+
},
|
|
479
484
|
accordion: {
|
|
480
485
|
closeAll: 'Lukk alle',
|
|
481
486
|
openAll: 'Åpne alle'
|
|
@@ -1221,8 +1226,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1221
1226
|
},
|
|
1222
1227
|
myProfile: {
|
|
1223
1228
|
title: 'Min Profil',
|
|
1224
|
-
disclaimerTitle:
|
|
1225
|
-
|
|
1229
|
+
disclaimerTitle: {
|
|
1230
|
+
employee: 'Kvar blir biletet og namnet mitt brukt?',
|
|
1231
|
+
student: 'Kvar blir namnet mitt brukt?'
|
|
1232
|
+
},
|
|
1233
|
+
disclaimerText: {
|
|
1234
|
+
employee: 'Bilete og namn vert vist når du deltek i diskusjonar i arenaen.',
|
|
1235
|
+
student: 'Namnet ditt blir berre vist for deg sjølv når du er logga inn.'
|
|
1236
|
+
},
|
|
1226
1237
|
preferenceTitle: 'Vel om du vil vise namn når du deler ei mappe',
|
|
1227
1238
|
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.',
|
|
1228
1239
|
editButtonText: 'Endre profilbilete',
|
|
@@ -1286,8 +1297,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1286
1297
|
help: 'Hjelp'
|
|
1287
1298
|
},
|
|
1288
1299
|
programmes: {
|
|
1289
|
-
header: '
|
|
1290
|
-
description: '
|
|
1300
|
+
header: 'Kva vil du lære om i dag?',
|
|
1301
|
+
description: 'Vel utdanningsprogram for å sjå faga dine',
|
|
1291
1302
|
grades: 'Trinn',
|
|
1292
1303
|
accordionHeader: 'Alle utdanningsprogram'
|
|
1293
1304
|
},
|
package/es/locale/messages-se.js
CHANGED
|
@@ -476,6 +476,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
476
476
|
subject: {
|
|
477
477
|
associatedTopics: 'Gullevaš fáttát'
|
|
478
478
|
},
|
|
479
|
+
subjectFrontPage: {
|
|
480
|
+
buildsOn: 'Duddjo dása',
|
|
481
|
+
connectedTo: 'Oktasaš prográmmafáddán lea',
|
|
482
|
+
leadsTo: 'Dát doalvu'
|
|
483
|
+
},
|
|
479
484
|
accordion: {
|
|
480
485
|
closeAll: 'Govčča buot',
|
|
481
486
|
openAll: 'Raba buot'
|
|
@@ -1221,8 +1226,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1221
1226
|
},
|
|
1222
1227
|
myProfile: {
|
|
1223
1228
|
title: 'Mu profiila',
|
|
1224
|
-
disclaimerTitle:
|
|
1225
|
-
|
|
1229
|
+
disclaimerTitle: {
|
|
1230
|
+
employee: 'Gos geavahit mu gova ja mu nama?',
|
|
1231
|
+
student: 'Gos geavahit mu nama?'
|
|
1232
|
+
},
|
|
1233
|
+
disclaimerText: {
|
|
1234
|
+
employee: 'Govva ja namma čájehuvvojit go searvat digaštallamii arenain.',
|
|
1235
|
+
student: 'Du namma čájehuvvo dušše go leat sisačálihuvvon'
|
|
1236
|
+
},
|
|
1226
1237
|
preferenceTitle: 'Vállje jos namma čájehuvvo máhpa juohkkedettiin',
|
|
1227
1238
|
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.',
|
|
1228
1239
|
editButtonText: 'Rievdat profiilagova',
|
|
@@ -476,6 +476,11 @@ var messages = _objectSpread(_objectSpread({
|
|
|
476
476
|
subject: {
|
|
477
477
|
associatedTopics: 'Teemah mah govlehtuvvieh'
|
|
478
478
|
},
|
|
479
|
+
subjectFrontPage: {
|
|
480
|
+
buildsOn: 'Bigkie bæjjese',
|
|
481
|
+
connectedTo: 'Tjåenghkies programmefaage aalkoealmetjidie',
|
|
482
|
+
leadsTo: 'Goh ryökneme'
|
|
483
|
+
},
|
|
479
484
|
accordion: {
|
|
480
485
|
closeAll: 'Dahph gaajhkh',
|
|
481
486
|
openAll: 'Rïhpesth gaajhkh'
|
|
@@ -1221,8 +1226,14 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1221
1226
|
},
|
|
1222
1227
|
myProfile: {
|
|
1223
1228
|
title: 'Mov Profijle',
|
|
1224
|
-
disclaimerTitle:
|
|
1225
|
-
|
|
1229
|
+
disclaimerTitle: {
|
|
1230
|
+
employee: 'Gusnie guvvie jïh nomme åtnasuvvieh?',
|
|
1231
|
+
student: 'Gusnie mov nomme'
|
|
1232
|
+
},
|
|
1233
|
+
disclaimerText: {
|
|
1234
|
+
employee: 'Guvvie jïh nomme våajnoes sjidtieh gosse meatan digkiedimmesne sijjesne.',
|
|
1235
|
+
student: 'Dov nomme ajve tjaalasåvva dutnjien gosse sïjse loggedh'
|
|
1236
|
+
},
|
|
1226
1237
|
preferenceTitle: 'Sjïehtedh jis edtja nommem vuesiehtidh gosse maabpam juekedh',
|
|
1227
1238
|
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.',
|
|
1228
1239
|
editButtonText: 'Naemhtie profijleguvviem jarkelidh',
|
|
@@ -1286,10 +1297,10 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1286
1297
|
help: 'Hjelp'
|
|
1287
1298
|
},
|
|
1288
1299
|
programmes: {
|
|
1289
|
-
header: '
|
|
1290
|
-
description: '
|
|
1291
|
-
grades: '
|
|
1292
|
-
accordionHeader: '
|
|
1300
|
+
header: 'Maam sïjhth daan biejjien lïeredh ?',
|
|
1301
|
+
description: 'Veeljh ööhpehtimmieprogrammem juktie dov faagide vuartasjidh',
|
|
1302
|
+
grades: 'Daltesasse',
|
|
1303
|
+
accordionHeader: 'Gaajhkh ööhpehtimmieprogrammh'
|
|
1293
1304
|
},
|
|
1294
1305
|
embed: {
|
|
1295
1306
|
conceptListError: 'Klarte ikkje å vise forklaringsliste',
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
import { HTMLAttributes } from 'react';
|
|
9
|
+
interface Props extends HTMLAttributes<HTMLDetailsElement> {
|
|
10
|
+
}
|
|
11
|
+
export declare const ExpandableBox: ({ children, ...rest }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface SummaryProps extends HTMLAttributes<HTMLElement> {
|
|
13
|
+
}
|
|
14
|
+
export declare const ExpandableBoxSummary: ({ children, ...rest }: SummaryProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -4,9 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.ExpandableBoxSummary = exports.ExpandableBox = void 0;
|
|
8
8
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
9
|
-
var _excluded = ["
|
|
9
|
+
var _excluded = ["children"],
|
|
10
|
+
_excluded2 = ["children"];
|
|
10
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -15,41 +16,26 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
18
|
/**
|
|
18
|
-
* Copyright (c)
|
|
19
|
+
* Copyright (c) 2023-present, NDLA.
|
|
19
20
|
*
|
|
20
21
|
* This source code is licensed under the GPLv3 license found in the
|
|
21
22
|
* LICENSE file in the root directory of this source tree.
|
|
22
23
|
*
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
var alt = _ref.alt,
|
|
28
|
-
src = _ref.src,
|
|
29
|
-
srcSet = _ref.srcSet,
|
|
30
|
-
lazyLoadSrc = _ref.lazyLoadSrc,
|
|
31
|
-
sizes = _ref.sizes,
|
|
26
|
+
var ExpandableBox = function ExpandableBox(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
32
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
return (0, _jsxRuntime.
|
|
34
|
-
children:
|
|
35
|
-
|
|
36
|
-
alt: alt,
|
|
37
|
-
src: "".concat(src),
|
|
38
|
-
srcSet: srcSet,
|
|
39
|
-
sizes: sizes
|
|
40
|
-
}, rest))
|
|
41
|
-
}, "noscript"), (0, _jsxRuntime.jsx)("img", _objectSpread({
|
|
42
|
-
alt: alt,
|
|
43
|
-
style: {
|
|
44
|
-
width: '100%'
|
|
45
|
-
},
|
|
46
|
-
className: "lazyload",
|
|
47
|
-
src: lazyLoadSrc,
|
|
48
|
-
"data-src": src,
|
|
49
|
-
"data-src-set": srcSet,
|
|
50
|
-
"data-sizes": sizes
|
|
51
|
-
}, rest), "img")]
|
|
52
|
-
});
|
|
29
|
+
return (0, _jsxRuntime.jsx)("details", _objectSpread(_objectSpread({}, rest), {}, {
|
|
30
|
+
children: children
|
|
31
|
+
}));
|
|
53
32
|
};
|
|
54
|
-
|
|
55
|
-
|
|
33
|
+
exports.ExpandableBox = ExpandableBox;
|
|
34
|
+
var ExpandableBoxSummary = function ExpandableBoxSummary(_ref2) {
|
|
35
|
+
var children = _ref2.children,
|
|
36
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
37
|
+
return (0, _jsxRuntime.jsx)("summary", _objectSpread(_objectSpread({}, rest), {}, {
|
|
38
|
+
children: children
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
exports.ExpandableBoxSummary = ExpandableBoxSummary;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ExpandableBox", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ExpandableBox.ExpandableBox;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ExpandableBoxSummary", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _ExpandableBox.ExpandableBoxSummary;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _ExpandableBox = require("./ExpandableBox");
|
package/lib/Footer/Footer.d.ts
CHANGED
|
@@ -10,15 +10,11 @@ import { Locale } from '../types';
|
|
|
10
10
|
type Props = {
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
lang: Locale;
|
|
13
|
-
links?:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
facebook: string;
|
|
19
|
-
twitter: string;
|
|
20
|
-
}
|
|
21
|
-
];
|
|
13
|
+
links?: {
|
|
14
|
+
to: string;
|
|
15
|
+
text: string;
|
|
16
|
+
icon: ReactNode;
|
|
17
|
+
}[];
|
|
22
18
|
privacyLinks?: {
|
|
23
19
|
url: string;
|
|
24
20
|
label: string;
|