@ndla/ui 37.1.4 → 39.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.
- package/es/Article/Article.js +2 -2
- package/es/Article/ArticleHeaderWrapper.js +4 -7
- package/es/Article/ArticleNotions.js +16 -17
- package/es/Article/ArticleSideBar.js +4 -5
- package/es/AudioPlayer/Controls.js +187 -237
- package/es/BlogPost/BlogPost.js +4 -4
- package/es/CompetenceGoals/CompetenceGoalsDialog.js +12 -25
- package/es/Filter/FilterButtons.js +12 -14
- package/es/Filter/FilterListPhone.js +2 -4
- package/es/Footer/index.js +1 -2
- package/es/Grid/Grid.js +41 -0
- package/es/Grid/index.js +9 -0
- package/es/LearningPaths/LearningPathMenuModalWrapper.js +10 -6
- package/es/Masthead/MastheadSearchModal.js +56 -47
- package/es/MyNdla/SettingsMenu.js +6 -6
- package/es/NDLAFilm/AboutNdlaFilm.js +3 -3
- package/es/ResourcesWrapper/ResourcesTopicTitle.js +19 -23
- package/es/SearchTypeResult/PopupFilter.js +14 -20
- package/es/SearchTypeResult/components/ItemContexts.js +10 -21
- package/es/Topic/Topic.js +23 -23
- package/es/User/index.js +1 -3
- package/es/index.js +2 -3
- package/es/locale/messages-en.js +1 -0
- package/es/locale/messages-nb.js +1 -0
- package/es/locale/messages-nn.js +1 -0
- package/es/locale/messages-se.js +1 -0
- package/es/locale/messages-sma.js +1 -0
- package/lib/Article/Article.d.ts +2 -2
- package/lib/Article/Article.js +2 -2
- package/lib/Article/ArticleHeaderWrapper.d.ts +3 -2
- package/lib/Article/ArticleHeaderWrapper.js +4 -7
- package/lib/Article/ArticleNotions.js +17 -21
- package/lib/Article/ArticleSideBar.js +5 -9
- package/lib/AudioPlayer/Controls.d.ts +2 -2
- package/lib/AudioPlayer/Controls.js +187 -237
- package/lib/BlogPost/BlogPost.d.ts +1 -1
- package/lib/BlogPost/BlogPost.js +4 -4
- package/lib/CompetenceGoals/CompetenceGoalsDialog.d.ts +3 -14
- package/lib/CompetenceGoals/CompetenceGoalsDialog.js +11 -26
- package/lib/Filter/FilterButtons.js +13 -15
- package/lib/Filter/FilterListPhone.js +3 -5
- package/lib/Footer/index.d.ts +1 -2
- package/lib/Footer/index.js +0 -7
- package/lib/Grid/Grid.d.ts +15 -0
- package/lib/Grid/Grid.js +48 -0
- package/lib/Grid/index.d.ts +9 -0
- package/lib/Grid/index.js +13 -0
- package/lib/LearningPaths/LearningPathMenuModalWrapper.js +9 -8
- package/lib/Masthead/MastheadSearchModal.d.ts +1 -1
- package/lib/Masthead/MastheadSearchModal.js +58 -46
- package/lib/MyNdla/SettingsMenu.js +5 -5
- package/lib/NDLAFilm/AboutNdlaFilm.js +2 -2
- package/lib/ResourcesWrapper/ResourcesTopicTitle.js +20 -27
- package/lib/SearchTypeResult/PopupFilter.js +14 -20
- package/lib/SearchTypeResult/components/ItemContexts.js +10 -21
- package/lib/Topic/Topic.js +22 -22
- package/lib/User/index.d.ts +0 -2
- package/lib/User/index.js +1 -13
- package/lib/index.d.ts +3 -3
- package/lib/index.js +8 -20
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +1 -0
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +1 -0
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +1 -0
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +1 -0
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +1 -0
- package/package.json +20 -22
- package/src/Article/Article.tsx +4 -4
- package/src/Article/ArticleHeaderWrapper.tsx +12 -18
- package/src/Article/ArticleNotions.tsx +7 -8
- package/src/Article/ArticleSideBar.tsx +3 -3
- package/src/AudioPlayer/Controls.tsx +150 -289
- package/src/BlogPost/BlogPost.stories.tsx +15 -12
- package/src/BlogPost/BlogPost.tsx +1 -1
- package/src/CompetenceGoals/CompetenceGoalsDialog.tsx +13 -38
- package/src/Filter/FilterButtons.tsx +4 -5
- package/src/Filter/FilterListPhone.tsx +3 -4
- package/src/Footer/index.ts +1 -2
- package/src/Grid/Grid.stories.tsx +68 -0
- package/src/Grid/Grid.tsx +63 -0
- package/src/Grid/index.ts +10 -0
- package/src/KeyFigure/KeyFigure.stories.tsx +10 -8
- package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +10 -6
- package/src/Masthead/MastheadSearchModal.tsx +48 -74
- package/src/MyNdla/SettingsMenu.tsx +3 -3
- package/src/NDLAFilm/AboutNdlaFilm.tsx +3 -3
- package/src/ResourcesWrapper/ResourcesTopicTitle.tsx +4 -8
- package/src/SearchTypeResult/PopupFilter.tsx +6 -11
- package/src/SearchTypeResult/components/ItemContexts.tsx +4 -21
- package/src/Topic/Topic.tsx +7 -7
- package/src/User/index.ts +0 -2
- package/src/index.ts +3 -3
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
- package/es/Figure/FigureLicenseDialogContent.js +0 -75
- package/es/Footer/FooterAuth.js +0 -110
- package/es/Masthead/MastheadAuthModal.js +0 -50
- package/es/SearchTypeResult/SearchNotionItem.js +0 -208
- package/es/User/AuthModal.js +0 -116
- package/lib/Figure/FigureLicenseDialogContent.d.ts +0 -22
- package/lib/Figure/FigureLicenseDialogContent.js +0 -80
- package/lib/Footer/FooterAuth.d.ts +0 -10
- package/lib/Footer/FooterAuth.js +0 -114
- package/lib/Masthead/MastheadAuthModal.d.ts +0 -13
- package/lib/Masthead/MastheadAuthModal.js +0 -56
- package/lib/SearchTypeResult/SearchNotionItem.d.ts +0 -29
- package/lib/SearchTypeResult/SearchNotionItem.js +0 -215
- package/lib/User/AuthModal.d.ts +0 -22
- package/lib/User/AuthModal.js +0 -124
- package/src/Figure/FigureLicenseDialogContent.tsx +0 -80
- package/src/Footer/FooterAuth.tsx +0 -104
- package/src/Masthead/MastheadAuthModal.tsx +0 -62
- package/src/SearchTypeResult/SearchNotionItem.tsx +0 -228
- package/src/User/AuthModal.tsx +0 -123
package/lib/User/index.d.ts
CHANGED
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import AuthModal from './AuthModal';
|
|
9
8
|
import { UserInfo } from './UserInfo';
|
|
10
9
|
import type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser } from './apiTypes';
|
|
11
10
|
export { UserInfo };
|
|
12
11
|
export type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser };
|
|
13
|
-
export default AuthModal;
|
package/lib/User/index.js
CHANGED
|
@@ -9,16 +9,4 @@ Object.defineProperty(exports, "UserInfo", {
|
|
|
9
9
|
return _UserInfo.UserInfo;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
var _AuthModal = _interopRequireDefault(require("./AuthModal"));
|
|
14
|
-
var _UserInfo = require("./UserInfo");
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
/**
|
|
17
|
-
* Copyright (c) 2021-present, NDLA.
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
var _default = _AuthModal["default"];
|
|
24
|
-
exports["default"] = _default;
|
|
12
|
+
var _UserInfo = require("./UserInfo");
|
package/lib/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type { ImageCrop, ImageFocalPoint } from './Image';
|
|
|
30
30
|
export type { HeroContentType } from './Hero';
|
|
31
31
|
export { SubjectMaterialHero, TasksAndActivitiesHero, AssessmentResourcesHero, SubjectHero, ExternalLearningResourcesHero, SourceMaterialHero, Hero, NdlaFilmHero, } from './Hero';
|
|
32
32
|
export { FilterList, FilterListPhone, FilterButtons, ToggleItem } from './Filter';
|
|
33
|
-
export { Footer, EditorName, FooterText
|
|
33
|
+
export { Footer, EditorName, FooterText } from './Footer';
|
|
34
34
|
export { Figure, FigureCaption, FigureLicenseDialog, FigureExpandButton, FigureOpenDialogButton, FigureBylineExpandButton, } from './Figure';
|
|
35
35
|
export type { FigureType } from './Figure';
|
|
36
36
|
export { LanguageSelector } from './LanguageSelector';
|
|
@@ -40,9 +40,7 @@ export { default as SearchResultSleeve } from './Search/SearchResultSleeve';
|
|
|
40
40
|
export { default as ContentTypeResult } from './Search/ContentTypeResult';
|
|
41
41
|
export { SearchFieldForm } from './Search/SearchFieldForm';
|
|
42
42
|
export { default as MastheadSearchModal } from './Masthead/MastheadSearchModal';
|
|
43
|
-
export { default as MastheadAuthModal } from './Masthead/MastheadAuthModal';
|
|
44
43
|
export { UserInfo } from './User';
|
|
45
|
-
export { default as AuthModal } from './User';
|
|
46
44
|
export type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser, } from './User';
|
|
47
45
|
export { default as resourceTypeColor } from './utils/resourceTypeColor';
|
|
48
46
|
export { default as CreatedBy } from './CreatedBy';
|
|
@@ -103,5 +101,7 @@ export { KeyFigure } from './KeyFigure';
|
|
|
103
101
|
export { default as ContactBlock } from './ContactBlock';
|
|
104
102
|
export type { HeartButtonType } from './Embed';
|
|
105
103
|
export { CampaignBlock } from './CampaignBlock';
|
|
104
|
+
export { Grid } from './Grid';
|
|
105
|
+
export type { GridType } from './Grid';
|
|
106
106
|
export { Heading } from './Typography';
|
|
107
107
|
export type { HeadingLevel } from './types';
|
package/lib/index.js
CHANGED
|
@@ -112,12 +112,6 @@ Object.defineProperty(exports, "AudioPlayer", {
|
|
|
112
112
|
return _AudioPlayer["default"];
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
Object.defineProperty(exports, "AuthModal", {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
get: function get() {
|
|
118
|
-
return _User["default"];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
115
|
Object.defineProperty(exports, "AuthorInfo", {
|
|
122
116
|
enumerable: true,
|
|
123
117
|
get: function get() {
|
|
@@ -466,12 +460,6 @@ Object.defineProperty(exports, "Footer", {
|
|
|
466
460
|
return _Footer.Footer;
|
|
467
461
|
}
|
|
468
462
|
});
|
|
469
|
-
Object.defineProperty(exports, "FooterAuth", {
|
|
470
|
-
enumerable: true,
|
|
471
|
-
get: function get() {
|
|
472
|
-
return _Footer.FooterAuth;
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
463
|
Object.defineProperty(exports, "FooterText", {
|
|
476
464
|
enumerable: true,
|
|
477
465
|
get: function get() {
|
|
@@ -532,6 +520,12 @@ Object.defineProperty(exports, "FrontpageToolbox", {
|
|
|
532
520
|
return _Frontpage.FrontpageToolbox;
|
|
533
521
|
}
|
|
534
522
|
});
|
|
523
|
+
Object.defineProperty(exports, "Grid", {
|
|
524
|
+
enumerable: true,
|
|
525
|
+
get: function get() {
|
|
526
|
+
return _Grid.Grid;
|
|
527
|
+
}
|
|
528
|
+
});
|
|
535
529
|
Object.defineProperty(exports, "H5pEmbed", {
|
|
536
530
|
enumerable: true,
|
|
537
531
|
get: function get() {
|
|
@@ -712,12 +706,6 @@ Object.defineProperty(exports, "Masthead", {
|
|
|
712
706
|
return _Masthead["default"];
|
|
713
707
|
}
|
|
714
708
|
});
|
|
715
|
-
Object.defineProperty(exports, "MastheadAuthModal", {
|
|
716
|
-
enumerable: true,
|
|
717
|
-
get: function get() {
|
|
718
|
-
return _MastheadAuthModal["default"];
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
709
|
Object.defineProperty(exports, "MastheadItem", {
|
|
722
710
|
enumerable: true,
|
|
723
711
|
get: function get() {
|
|
@@ -1338,8 +1326,7 @@ var _SearchResultSleeve = _interopRequireDefault(require("./Search/SearchResultS
|
|
|
1338
1326
|
var _ContentTypeResult = _interopRequireDefault(require("./Search/ContentTypeResult"));
|
|
1339
1327
|
var _SearchFieldForm = require("./Search/SearchFieldForm");
|
|
1340
1328
|
var _MastheadSearchModal = _interopRequireDefault(require("./Masthead/MastheadSearchModal"));
|
|
1341
|
-
var
|
|
1342
|
-
var _User = _interopRequireWildcard(require("./User"));
|
|
1329
|
+
var _User = require("./User");
|
|
1343
1330
|
var _resourceTypeColor = _interopRequireDefault(require("./utils/resourceTypeColor"));
|
|
1344
1331
|
var _CreatedBy = _interopRequireDefault(require("./CreatedBy"));
|
|
1345
1332
|
var _Breadcrumblist = _interopRequireDefault(require("./Breadcrumblist"));
|
|
@@ -1390,6 +1377,7 @@ var _ProgrammeCard = require("./ProgrammeCard");
|
|
|
1390
1377
|
var _KeyFigure = require("./KeyFigure");
|
|
1391
1378
|
var _ContactBlock = _interopRequireDefault(require("./ContactBlock"));
|
|
1392
1379
|
var _CampaignBlock = require("./CampaignBlock");
|
|
1380
|
+
var _Grid = require("./Grid");
|
|
1393
1381
|
var _Typography = require("./Typography");
|
|
1394
1382
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
1395
1383
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "39.0.0",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,27 +31,25 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@ndla/
|
|
36
|
-
"@ndla/
|
|
37
|
-
"@ndla/
|
|
38
|
-
"@ndla/carousel": "^3.1.0",
|
|
34
|
+
"@ndla/accordion": "^2.2.5",
|
|
35
|
+
"@ndla/article-scripts": "^3.0.18",
|
|
36
|
+
"@ndla/button": "^10.1.4",
|
|
37
|
+
"@ndla/carousel": "^3.1.2",
|
|
39
38
|
"@ndla/core": "^4.0.0",
|
|
40
|
-
"@ndla/forms": "^4.3.
|
|
41
|
-
"@ndla/hooks": "^2.0.
|
|
42
|
-
"@ndla/icons": "^
|
|
39
|
+
"@ndla/forms": "^4.3.4",
|
|
40
|
+
"@ndla/hooks": "^2.0.7",
|
|
41
|
+
"@ndla/icons": "^3.0.0",
|
|
43
42
|
"@ndla/licenses": "^7.0.4",
|
|
44
|
-
"@ndla/modal": "^
|
|
45
|
-
"@ndla/notion": "^
|
|
46
|
-
"@ndla/safelink": "^4.1.
|
|
47
|
-
"@ndla/switch": "^1.1.
|
|
48
|
-
"@ndla/tabs": "^2.2.
|
|
49
|
-
"@ndla/tooltip": "^4.1.
|
|
50
|
-
"@ndla/util": "^3.1.
|
|
51
|
-
"@radix-ui/react-dropdown-menu": "2.0.
|
|
52
|
-
"@radix-ui/react-popover": "^1.0.
|
|
53
|
-
"@
|
|
54
|
-
"@reach/slider": "^0.16.0",
|
|
43
|
+
"@ndla/modal": "^3.0.1",
|
|
44
|
+
"@ndla/notion": "^5.0.1",
|
|
45
|
+
"@ndla/safelink": "^4.1.4",
|
|
46
|
+
"@ndla/switch": "^1.1.2",
|
|
47
|
+
"@ndla/tabs": "^2.2.4",
|
|
48
|
+
"@ndla/tooltip": "^4.1.4",
|
|
49
|
+
"@ndla/util": "^3.1.13",
|
|
50
|
+
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
|
51
|
+
"@radix-ui/react-popover": "^1.0.6",
|
|
52
|
+
"@radix-ui/react-slider": "^1.1.2",
|
|
55
53
|
"focus-trap-react": "^8.9.2",
|
|
56
54
|
"framer-motion": "^6.5.1",
|
|
57
55
|
"html-react-parser": "^3.0.8",
|
|
@@ -69,7 +67,7 @@
|
|
|
69
67
|
"@emotion/styled": "^11.10.4",
|
|
70
68
|
"i18next": "^21.9.2",
|
|
71
69
|
"lodash": "^4.17.20",
|
|
72
|
-
"react": "
|
|
70
|
+
"react": ">= 16.8.0",
|
|
73
71
|
"react-i18next": "^11.18.6",
|
|
74
72
|
"react-router-dom": "^6.3.0"
|
|
75
73
|
},
|
|
@@ -87,5 +85,5 @@
|
|
|
87
85
|
"publishConfig": {
|
|
88
86
|
"access": "public"
|
|
89
87
|
},
|
|
90
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "72e986568cbd38a53cb3d9e2e189d4e309fbb302"
|
|
91
89
|
}
|
package/src/Article/Article.tsx
CHANGED
|
@@ -124,10 +124,10 @@ type Props = {
|
|
|
124
124
|
contentTransformed?: boolean;
|
|
125
125
|
locale: Locale;
|
|
126
126
|
messageBoxLinks?: [];
|
|
127
|
-
competenceGoals?:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
competenceGoals?: (inp: {
|
|
128
|
+
Dialog: ComponentType;
|
|
129
|
+
dialogProps: { isOpen: boolean; onClose: () => void };
|
|
130
|
+
}) => ReactNode;
|
|
131
131
|
id: string;
|
|
132
132
|
renderMarkdown: (text: string) => string;
|
|
133
133
|
notions?: { list: ConceptNotionType[]; related: NotionRelatedContent[] };
|
|
@@ -26,10 +26,10 @@ const CompetenceBadgeText = styled.span`
|
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
28
|
type Props = {
|
|
29
|
-
competenceGoals?:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
competenceGoals?: (inp: {
|
|
30
|
+
Dialog: ComponentType;
|
|
31
|
+
dialogProps: { isOpen: boolean; onClose: () => void; controlled: true };
|
|
32
|
+
}) => ReactNode;
|
|
33
33
|
competenceGoalsLoading?: boolean;
|
|
34
34
|
children: ReactNode;
|
|
35
35
|
};
|
|
@@ -60,20 +60,14 @@ const ArticleHeaderWrapper = ({ children, competenceGoals, competenceGoalsLoadin
|
|
|
60
60
|
return <div {...classes('header')}>{children}</div>;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
const dialog =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
72
|
-
) : (
|
|
73
|
-
<CompetenceGoalsDialog onClose={closeDialog} isOpen={isOpen}>
|
|
74
|
-
{competenceGoals}
|
|
75
|
-
</CompetenceGoalsDialog>
|
|
76
|
-
);
|
|
63
|
+
const dialog = competenceGoals({
|
|
64
|
+
Dialog: CompetenceGoalsDialog,
|
|
65
|
+
dialogProps: {
|
|
66
|
+
isOpen: isOpen,
|
|
67
|
+
onClose: closeDialog,
|
|
68
|
+
controlled: true,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
77
71
|
return (
|
|
78
72
|
<div {...classes('header')}>
|
|
79
73
|
{children}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import
|
|
12
|
+
import { ModalHeader, ModalCloseButton, ModalBody, Modal, ModalTitle } from '@ndla/modal';
|
|
13
13
|
import { mq, breakpoints, fonts, colors } from '@ndla/core';
|
|
14
14
|
import { Explanation, NotionFlip } from '@ndla/icons/common';
|
|
15
15
|
import { ConceptNotion } from '../Notion';
|
|
@@ -170,7 +170,7 @@ export const ArticleNotions = ({ notions, relatedContent = [], buttonOffsetRight
|
|
|
170
170
|
return (
|
|
171
171
|
<ArticleNotionsContainer>
|
|
172
172
|
<Modal
|
|
173
|
-
|
|
173
|
+
aria-labelledby={headingId}
|
|
174
174
|
activateButton={
|
|
175
175
|
<NotionsTrigger role="button" aria-label={t('article.notionsPrompt')} style={{ left: leftOffset }}>
|
|
176
176
|
<NotionFlip />
|
|
@@ -179,18 +179,17 @@ export const ArticleNotions = ({ notions, relatedContent = [], buttonOffsetRight
|
|
|
179
179
|
</NotionsTrigger>
|
|
180
180
|
}
|
|
181
181
|
size="large"
|
|
182
|
-
backgroundColor="white"
|
|
183
182
|
>
|
|
184
183
|
{(onClose: () => void) => (
|
|
185
184
|
<div>
|
|
186
|
-
<ModalHeader
|
|
187
|
-
<ModalCloseButton onClick={onClose} title="Lukk" />
|
|
188
|
-
</ModalHeader>
|
|
189
|
-
<ModalBody modifier="notions-modal-body no-padding">
|
|
185
|
+
<ModalHeader className="no-padding">
|
|
190
186
|
<ModalHeadingContainer>
|
|
191
187
|
<Explanation />
|
|
192
|
-
<
|
|
188
|
+
<ModalTitle>{t('article.notionsPrompt')}</ModalTitle>
|
|
193
189
|
</ModalHeadingContainer>
|
|
190
|
+
<ModalCloseButton onClick={onClose} title="Lukk" />
|
|
191
|
+
</ModalHeader>
|
|
192
|
+
<ModalBody modifier="notions-modal-body no-padding">
|
|
194
193
|
<NotionsContainer>
|
|
195
194
|
{notions.map((notion) => (
|
|
196
195
|
<ConceptNotion key={notion.id} concept={notion} type={type} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CopyButton, ButtonV2 } from '@ndla/button';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import
|
|
4
|
+
import { ModalHeader, ModalBody, ModalCloseButton, Modal } from '@ndla/modal';
|
|
5
5
|
import { copyTextToClipboard } from '@ndla/util';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
@@ -54,11 +54,11 @@ const ArticleSideBar = ({ copyPageUrlLink, licenseBox }: Props) => {
|
|
|
54
54
|
{t('article.useContent')}
|
|
55
55
|
</ButtonV2>
|
|
56
56
|
}
|
|
57
|
-
size="
|
|
57
|
+
size="normal"
|
|
58
58
|
>
|
|
59
59
|
{(onClose: () => void) => (
|
|
60
60
|
<>
|
|
61
|
-
<ModalHeader
|
|
61
|
+
<ModalHeader>
|
|
62
62
|
<ModalCloseButton onClick={onClose} title={t('article.closeLabel')} />
|
|
63
63
|
</ModalHeader>
|
|
64
64
|
<ModalBody>{licenseBox}</ModalBody>
|