@ndla/ui 13.2.1 → 15.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 +22 -3
- package/es/Article/ArticleFavoritesButton.js +38 -0
- package/es/Article/index.js +2 -1
- package/es/Breadcrumb/ActionBreadcrumb.js +57 -0
- package/es/Breadcrumb/index.js +1 -0
- package/es/Footer/FooterAuth.js +15 -22
- package/es/InfoBlock/InfoBlock.js +55 -0
- package/es/InfoBlock/index.js +1 -0
- package/es/LearningPaths/LearningPathMenu.js +3 -4
- package/es/Masthead/MastheadAuthModal.js +2 -2
- package/es/MyNdla/Navigation/VerticalNavigation.js +51 -0
- package/es/MyNdla/Navigation/index.js +2 -0
- package/es/MyNdla/Resource/Folder.js +86 -0
- package/{lib/MyNdla/ResourceDash/ResourcesView.d.ts → es/MyNdla/Resource/index.js} +2 -3
- package/es/MyNdla/index.js +3 -4
- package/es/Notion/ConceptNotion.js +2 -1
- package/es/Notion/FigureNotion.js +13 -9
- package/es/Notion/NotionVisualElement.js +3 -2
- package/es/Resource/BlockResource.js +73 -0
- package/es/Resource/ListResource.js +66 -0
- package/es/Resource/index.js +10 -0
- package/es/Resource/resourceComponents.js +97 -0
- package/es/ResourceGroup/ResourceGroup.js +7 -5
- package/es/ResourceGroup/ResourceItem.js +28 -30
- package/es/ResourceGroup/ResourceList.js +18 -6
- package/es/Search/ActiveFilters.js +6 -7
- package/es/Search/ContentTypeResult.js +6 -8
- package/es/SearchTypeResult/ActiveFilters.js +6 -10
- package/es/SearchTypeResult/SearchViewType.js +5 -5
- package/es/SnackBar/SnackBar.js +117 -0
- package/es/SnackBar/index.js +9 -0
- package/es/TagSelector/SuggestionInput.js +240 -0
- package/es/TagSelector/Suggestions.js +93 -0
- package/es/TagSelector/TagSelector.js +137 -0
- package/es/TagSelector/index.js +9 -0
- package/es/TopicIntroductionList/TopicIntroduction.js +2 -4
- package/es/TopicIntroductionList/TopicShortcutItem.js +1 -3
- package/es/TreeStructure/FolderItem.js +130 -0
- package/es/TreeStructure/FolderItems.js +123 -0
- package/es/TreeStructure/FolderNameInput.js +112 -0
- package/es/TreeStructure/TreeStructure.js +254 -0
- package/es/TreeStructure/TreeStructure.types.js +0 -0
- package/es/TreeStructure/TreeStructureWrapper.js +13 -0
- package/es/TreeStructure/helperFunctions.js +92 -0
- package/es/TreeStructure/index.js +9 -0
- package/es/TreeStructure/keyboardNavigation/keyboardNavigation.js +182 -0
- package/es/TreeStructure/keyboardNavigation/keyboardNavigation.types.js +0 -0
- package/es/User/AuthModal.js +15 -24
- package/es/User/UserInfo.js +70 -0
- package/es/User/apiTypes.js +0 -0
- package/es/User/index.js +2 -0
- package/es/User/parseUserObject.js +102 -0
- package/es/all.css +90 -0
- package/es/index.js +9 -3
- package/es/locale/messages-en.js +75 -8
- package/es/locale/messages-nb.js +74 -7
- package/es/locale/messages-nn.js +74 -7
- package/es/locale/messages-se.js +74 -7
- package/es/locale/messages-sma.js +74 -7
- package/lib/Article/Article.d.ts +3 -1
- package/lib/Article/Article.js +43 -23
- package/lib/Article/ArticleFavoritesButton.d.ts +15 -0
- package/lib/Article/ArticleFavoritesButton.js +56 -0
- package/lib/Article/index.d.ts +2 -1
- package/lib/Article/index.js +8 -0
- package/lib/Breadcrumb/ActionBreadcrumb.d.ts +16 -0
- package/lib/Breadcrumb/ActionBreadcrumb.js +72 -0
- package/lib/Breadcrumb/index.d.ts +1 -0
- package/lib/Breadcrumb/index.js +8 -0
- package/lib/Footer/FooterAuth.d.ts +1 -1
- package/lib/Footer/FooterAuth.js +17 -17
- package/lib/InfoBlock/InfoBlock.d.ts +8 -0
- package/lib/InfoBlock/InfoBlock.js +58 -0
- package/lib/InfoBlock/index.d.ts +1 -0
- package/lib/InfoBlock/index.js +13 -0
- package/lib/LearningPaths/LearningPathMenu.js +3 -4
- package/lib/Masthead/MastheadAuthModal.d.ts +3 -3
- package/lib/Masthead/MastheadAuthModal.js +3 -3
- package/lib/MyNdla/Navigation/VerticalNavigation.d.ts +10 -0
- package/lib/MyNdla/Navigation/VerticalNavigation.js +61 -0
- package/lib/MyNdla/Navigation/index.d.ts +2 -0
- package/lib/MyNdla/Navigation/index.js +15 -0
- package/lib/MyNdla/Resource/Folder.d.ts +20 -0
- package/lib/MyNdla/Resource/Folder.js +100 -0
- package/lib/MyNdla/Resource/index.d.ts +9 -0
- package/lib/MyNdla/Resource/index.js +15 -0
- package/lib/MyNdla/index.d.ts +3 -4
- package/lib/MyNdla/index.js +9 -11
- package/lib/Notion/ConceptNotion.js +2 -1
- package/lib/Notion/FigureNotion.d.ts +1 -1
- package/lib/Notion/FigureNotion.js +12 -8
- package/lib/Notion/NotionVisualElement.js +3 -2
- package/lib/Resource/BlockResource.d.ts +20 -0
- package/lib/Resource/BlockResource.js +84 -0
- package/lib/Resource/ListResource.d.ts +20 -0
- package/lib/Resource/ListResource.js +78 -0
- package/lib/Resource/index.d.ts +11 -0
- package/lib/Resource/index.js +29 -0
- package/lib/Resource/resourceComponents.d.ts +24 -0
- package/lib/Resource/resourceComponents.js +106 -0
- package/lib/ResourceGroup/ResourceGroup.d.ts +2 -1
- package/lib/ResourceGroup/ResourceGroup.js +7 -5
- package/lib/ResourceGroup/ResourceItem.d.ts +5 -1
- package/lib/ResourceGroup/ResourceItem.js +29 -30
- package/lib/ResourceGroup/ResourceList.d.ts +3 -1
- package/lib/ResourceGroup/ResourceList.js +18 -6
- package/lib/Search/ActiveFilters.js +6 -7
- package/lib/Search/ContentTypeResult.js +6 -8
- package/lib/SearchTypeResult/ActiveFilters.js +6 -10
- package/lib/SearchTypeResult/SearchViewType.js +5 -5
- package/lib/SnackBar/SnackBar.d.ts +23 -0
- package/lib/SnackBar/SnackBar.js +127 -0
- package/lib/SnackBar/index.d.ts +10 -0
- package/lib/SnackBar/index.js +15 -0
- package/lib/TagSelector/SuggestionInput.d.ts +19 -0
- package/lib/TagSelector/SuggestionInput.js +255 -0
- package/lib/TagSelector/Suggestions.d.ts +12 -0
- package/lib/TagSelector/Suggestions.js +96 -0
- package/lib/TagSelector/TagSelector.d.ts +16 -0
- package/lib/TagSelector/TagSelector.js +150 -0
- package/lib/TagSelector/index.d.ts +10 -0
- package/lib/TagSelector/index.js +19 -0
- package/lib/TopicIntroductionList/TopicIntroduction.js +2 -4
- package/lib/TopicIntroductionList/TopicShortcutItem.js +1 -3
- package/lib/TreeStructure/FolderItem.d.ts +27 -0
- package/lib/TreeStructure/FolderItem.js +140 -0
- package/lib/TreeStructure/FolderItems.d.ts +11 -0
- package/lib/TreeStructure/FolderItems.js +130 -0
- package/lib/TreeStructure/FolderNameInput.d.ts +15 -0
- package/lib/TreeStructure/FolderNameInput.js +125 -0
- package/lib/TreeStructure/TreeStructure.d.ts +12 -0
- package/lib/TreeStructure/TreeStructure.js +273 -0
- package/lib/TreeStructure/TreeStructure.types.d.ts +63 -0
- package/lib/TreeStructure/TreeStructure.types.js +1 -0
- package/lib/TreeStructure/TreeStructureWrapper.d.ts +12 -0
- package/lib/TreeStructure/TreeStructureWrapper.js +24 -0
- package/lib/TreeStructure/helperFunctions.d.ts +5 -0
- package/lib/TreeStructure/helperFunctions.js +103 -0
- package/lib/TreeStructure/index.d.ts +10 -0
- package/lib/TreeStructure/index.js +15 -0
- package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.d.ts +11 -0
- package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.js +186 -0
- package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.types.d.ts +26 -0
- package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.types.js +1 -0
- package/lib/User/AuthModal.d.ts +3 -3
- package/lib/User/AuthModal.js +16 -23
- package/lib/User/UserInfo.d.ts +13 -0
- package/lib/User/UserInfo.js +84 -0
- package/lib/User/apiTypes.d.ts +61 -0
- package/lib/User/apiTypes.js +1 -0
- package/lib/User/index.d.ts +4 -0
- package/lib/User/index.js +8 -0
- package/lib/User/parseUserObject.d.ts +32 -0
- package/lib/User/parseUserObject.js +105 -0
- package/lib/all.css +90 -0
- package/lib/index.d.ts +14 -3
- package/lib/index.js +76 -10
- package/lib/locale/messages-en.d.ts +67 -0
- package/lib/locale/messages-en.js +75 -8
- package/lib/locale/messages-nb.d.ts +67 -0
- package/lib/locale/messages-nb.js +74 -7
- package/lib/locale/messages-nn.d.ts +67 -0
- package/lib/locale/messages-nn.js +74 -7
- package/lib/locale/messages-se.d.ts +67 -0
- package/lib/locale/messages-se.js +74 -7
- package/lib/locale/messages-sma.d.ts +67 -0
- package/lib/locale/messages-sma.js +74 -7
- package/lib/types.d.ts +1 -1
- package/package.json +11 -11
- package/src/Article/Article.tsx +31 -0
- package/src/Article/ArticleFavoritesButton.tsx +40 -0
- package/src/Article/index.ts +2 -0
- package/src/Breadcrumb/ActionBreadcrumb.tsx +68 -0
- package/src/Breadcrumb/index.ts +2 -0
- package/src/Footer/FooterAuth.tsx +7 -9
- package/src/InfoBlock/InfoBlock.tsx +61 -0
- package/src/InfoBlock/index.ts +1 -0
- package/src/LearningPaths/LearningPathMenu.tsx +1 -1
- package/src/Masthead/MastheadAuthModal.tsx +4 -5
- package/src/MyNdla/Navigation/VerticalNavigation.tsx +93 -0
- package/src/MyNdla/Navigation/index.ts +2 -0
- package/src/MyNdla/Resource/Folder.tsx +143 -0
- package/src/MyNdla/Resource/index.ts +10 -0
- package/src/MyNdla/index.ts +3 -5
- package/src/Notion/ConceptNotion.tsx +1 -0
- package/src/Notion/FigureNotion.tsx +12 -5
- package/src/Notion/NotionVisualElement.tsx +1 -1
- package/src/Resource/BlockResource.tsx +101 -0
- package/src/Resource/ListResource.tsx +111 -0
- package/src/Resource/index.ts +12 -0
- package/src/Resource/resourceComponents.tsx +143 -0
- package/src/ResourceGroup/ResourceGroup.tsx +3 -0
- package/src/ResourceGroup/ResourceItem.tsx +20 -3
- package/src/ResourceGroup/ResourceList.tsx +16 -3
- package/src/Search/ActiveFilters.jsx +0 -1
- package/src/Search/ContentTypeResult.tsx +8 -9
- package/src/SearchTypeResult/ActiveFilters.tsx +1 -3
- package/src/SearchTypeResult/SearchViewType.tsx +1 -1
- package/src/SnackBar/SnackBar.tsx +183 -0
- package/src/SnackBar/index.ts +13 -0
- package/src/TagSelector/SuggestionInput.tsx +230 -0
- package/src/TagSelector/Suggestions.tsx +125 -0
- package/src/TagSelector/TagSelector.tsx +111 -0
- package/src/TagSelector/index.ts +13 -0
- package/src/TopicIntroductionList/TopicIntroduction.tsx +2 -2
- package/src/TopicIntroductionList/TopicShortcutItem.tsx +1 -5
- package/src/TreeStructure/FolderItem.tsx +160 -0
- package/src/TreeStructure/FolderItems.tsx +109 -0
- package/src/TreeStructure/FolderNameInput.tsx +109 -0
- package/src/TreeStructure/TreeStructure.tsx +184 -0
- package/src/TreeStructure/TreeStructure.types.ts +69 -0
- package/src/TreeStructure/TreeStructureWrapper.tsx +34 -0
- package/src/TreeStructure/helperFunctions.ts +52 -0
- package/src/TreeStructure/index.ts +11 -0
- package/src/TreeStructure/keyboardNavigation/keyboardNavigation.ts +161 -0
- package/src/TreeStructure/keyboardNavigation/keyboardNavigation.types.ts +28 -0
- package/src/User/AuthModal.tsx +5 -26
- package/src/User/UserInfo.tsx +80 -0
- package/src/User/__tests__/parseUserObject-test.ts +315 -0
- package/src/User/apiTypes.ts +74 -0
- package/src/User/index.ts +4 -0
- package/src/User/parseUserObject.ts +83 -0
- package/src/all.scss +2 -0
- package/src/index.ts +15 -4
- package/src/locale/messages-en.ts +69 -7
- package/src/locale/messages-nb.ts +68 -6
- package/src/locale/messages-nn.ts +68 -6
- package/src/locale/messages-se.ts +68 -6
- package/src/locale/messages-sma.ts +68 -6
- package/src/types.ts +1 -1
- package/es/MyNdla/ResourceDash/Breadcrumbs.js +0 -22
- package/es/MyNdla/ResourceDash/ResourceElement.js +0 -27
- package/es/MyNdla/ResourceDash/ResourcesView.js +0 -43
- package/es/MyNdla/ResourceDash/index.js +0 -4
- package/lib/MyNdla/ResourceDash/Breadcrumbs.d.ts +0 -15
- package/lib/MyNdla/ResourceDash/Breadcrumbs.js +0 -35
- package/lib/MyNdla/ResourceDash/ResourceElement.d.ts +0 -18
- package/lib/MyNdla/ResourceDash/ResourceElement.js +0 -38
- package/lib/MyNdla/ResourceDash/ResourcesView.js +0 -57
- package/lib/MyNdla/ResourceDash/index.d.ts +0 -4
- package/lib/MyNdla/ResourceDash/index.js +0 -31
- package/src/MyNdla/ResourceDash/Breadcrumbs.tsx +0 -31
- package/src/MyNdla/ResourceDash/ResourceElement.tsx +0 -50
- package/src/MyNdla/ResourceDash/ResourcesView.tsx +0 -42
- package/src/MyNdla/ResourceDash/index.ts +0 -5
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledBase = _interopRequireDefault(require("@emotion/styled-base"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _core = require("@emotion/core");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
|
-
var ResourceElementWrapper = (0, _styledBase["default"])("div", {
|
|
17
|
-
target: "eskq45w0",
|
|
18
|
-
label: "ResourceElementWrapper"
|
|
19
|
-
})("display:flex;align-items:center;padding:0.5rem;border:1px solid rgba(209,214,219,1);border-radius:2px;background:", function (_ref) {
|
|
20
|
-
var type = _ref.type;
|
|
21
|
-
return type === 'folder' ? '#fafaf9' : '#fff';
|
|
22
|
-
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlc291cmNlRWxlbWVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JxRSIsImZpbGUiOiJSZ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dodFNpZGU/OiBSZWFjdEVsZW1lbnQ7XG4gIGxlZnRTaWRlPzogUmVhY3RFbGVtZW50O1xuICBkZXNjcmlwdGlvbj86IHN0cmluZztcbiAgY2hpbGRyZW4/OiBSZWFjdEVsZW1lbnQ7XG59O1xuXG5jb25zdCBSZXNvdXJjZUVsZW1lbnQgPSAoeyB0eXBlLCB0aXRsZSwgZGVzY3JpcHRpb24sIGxlZnRTaWRlLCByaWdodFNpZGUsIGNoaWxkcmVuIH06IFJlc291cmNlRWxlbWVudFByb3BzKSA9PiB7XG4gIC8vIGNvbnN0IHsgdCB9ID0gdXNlVHJhbnNsYXRpb24oKTtcbiAgcmV0dXJuIChcbiAgICA8UmVzb3VyY2VFbGVtZW50V3JhcHBlciB0eXBlPXt0eXBlfT5cbiAgICAgIDxkaXY+e2xlZnRTaWRlfTwvZGl2PlxuICAgICAgPGRpdj5cbiAgICAgICAgPGgxPnt0aXRsZX08L2gxPlxuICAgICAgICA8cD57ZGVzY3JpcHRpb259PC9wPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXY+e3JpZ2h0U2lkZX08L2Rpdj5cbiAgICA8L1Jlc291cmNlRWxlbWVudFdyYXBwZXI+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBSZXNvdXJjZUVsZW1lbnQ7XG4iXX0= */"));
|
|
23
|
-
|
|
24
|
-
var ResourceElement = function ResourceElement(_ref2) {
|
|
25
|
-
var type = _ref2.type,
|
|
26
|
-
title = _ref2.title,
|
|
27
|
-
description = _ref2.description,
|
|
28
|
-
leftSide = _ref2.leftSide,
|
|
29
|
-
rightSide = _ref2.rightSide,
|
|
30
|
-
children = _ref2.children;
|
|
31
|
-
// const { t } = useTranslation();
|
|
32
|
-
return (0, _core.jsx)(ResourceElementWrapper, {
|
|
33
|
-
type: type
|
|
34
|
-
}, (0, _core.jsx)("div", null, leftSide), (0, _core.jsx)("div", null, (0, _core.jsx)("h1", null, title), (0, _core.jsx)("p", null, description), children), (0, _core.jsx)("div", null, rightSide));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
var _default = ResourceElement;
|
|
38
|
-
exports["default"] = _default;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.ResourcesView = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledBase = _interopRequireDefault(require("@emotion/styled-base"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _ResourceElement = _interopRequireDefault(require("./ResourceElement"));
|
|
13
|
-
|
|
14
|
-
var _core = require("@emotion/core");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
19
|
-
|
|
20
|
-
var ResourcesWrapper = (0, _styledBase["default"])("div", {
|
|
21
|
-
target: "eef59gq0",
|
|
22
|
-
label: "ResourcesWrapper"
|
|
23
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "1hhdphc",
|
|
25
|
-
styles: "display:flex;flex-direction:column;gap:1rem;0;"
|
|
26
|
-
} : {
|
|
27
|
-
name: "1hhdphc",
|
|
28
|
-
styles: "display:flex;flex-direction:column;gap:1rem;0;",
|
|
29
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlc291cmNlc1ZpZXcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVltQyIsImZpbGUiOiJSZXNvdXJjZXNWaW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DwvUmVzb3VyY2VFbGVtZW50PlxuICAgICAgPFJlc291cmNlRWxlbWVudFxuICAgICAgICB0eXBlPVwicmVzb3VyY2VcIlxuICAgICAgICB0aXRsZT1cIkV4YW1wbGUgUmVzb3VyY2VcIlxuICAgICAgICBsZWZ0U2lkZT17PGltZyBzcmM9XCJodHRwOi8vcGxhY2VraXR0ZW4uY29tLzIwMC8yMDBcIiBhbHQ9XCJCcnJyXCIgLz59XG4gICAgICAgIHJpZ2h0U2lkZT17PHNwYW4+I3RhZzwvc3Bhbj59XG4gICAgICAgIGRlc2NyaXB0aW9uPVwic29tZSBkZXNjcmlwdGlvblwiPlxuICAgICAgICA8cD5JbSBhIGNoaWxkLi4gaW5zZXJ0IGNvbnRlbnQ8L3A+XG4gICAgICA8L1Jlc291cmNlRWxlbWVudD5cbiAgICA8L1Jlc291cmNlc1dyYXBwZXI+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBSZXNvdXJjZXNWaWV3O1xuIl19 */",
|
|
30
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var ResourcesView = function ResourcesView() {
|
|
34
|
-
return (0, _core.jsx)(ResourcesWrapper, null, (0, _core.jsx)(_ResourceElement["default"], {
|
|
35
|
-
type: "folder",
|
|
36
|
-
title: "Example folder",
|
|
37
|
-
leftSide: (0, _core.jsx)("img", {
|
|
38
|
-
src: "http://placekitten.com/200/200",
|
|
39
|
-
alt: "Mjaoo"
|
|
40
|
-
}),
|
|
41
|
-
rightSide: (0, _core.jsx)("span", null, "#tag"),
|
|
42
|
-
description: "some description"
|
|
43
|
-
}, (0, _core.jsx)("p", null, "Im a child.. insert content")), (0, _core.jsx)(_ResourceElement["default"], {
|
|
44
|
-
type: "resource",
|
|
45
|
-
title: "Example Resource",
|
|
46
|
-
leftSide: (0, _core.jsx)("img", {
|
|
47
|
-
src: "http://placekitten.com/200/200",
|
|
48
|
-
alt: "Brrr"
|
|
49
|
-
}),
|
|
50
|
-
rightSide: (0, _core.jsx)("span", null, "#tag"),
|
|
51
|
-
description: "some description"
|
|
52
|
-
}, (0, _core.jsx)("p", null, "Im a child.. insert content")));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.ResourcesView = ResourcesView;
|
|
56
|
-
var _default = ResourcesView;
|
|
57
|
-
exports["default"] = _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Breadcrumbs", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _Breadcrumbs["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ResourceElement", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _ResourceElement["default"];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ResourcesView", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _ResourcesView["default"];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var _Breadcrumbs = _interopRequireDefault(require("./Breadcrumbs"));
|
|
26
|
-
|
|
27
|
-
var _ResourceElement = _interopRequireDefault(require("./ResourceElement"));
|
|
28
|
-
|
|
29
|
-
var _ResourcesView = _interopRequireDefault(require("./ResourcesView"));
|
|
30
|
-
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,31 +0,0 @@
|
|
|
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 styled from '@emotion/styled';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
const BreadcrumbsWrapper = styled.div``;
|
|
13
|
-
|
|
14
|
-
type BreadcrumbsProps = {
|
|
15
|
-
items: {
|
|
16
|
-
title: string;
|
|
17
|
-
url: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Breadcrumbs = ({ items }: BreadcrumbsProps) => {
|
|
22
|
-
<BreadcrumbsWrapper>
|
|
23
|
-
{items.map(({ title, url }) => (
|
|
24
|
-
<a key={url} href={url}>
|
|
25
|
-
{title}
|
|
26
|
-
</a>
|
|
27
|
-
))}
|
|
28
|
-
</BreadcrumbsWrapper>;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default Breadcrumbs;
|
|
@@ -1,50 +0,0 @@
|
|
|
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 styled from '@emotion/styled';
|
|
10
|
-
import React, { ReactElement } from 'react';
|
|
11
|
-
// import { useTranslation } from 'react-i18next';
|
|
12
|
-
|
|
13
|
-
type ResourceElementWrapperProp = {
|
|
14
|
-
type: 'folder' | 'resource';
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const ResourceElementWrapper = styled.div<ResourceElementWrapperProp>`
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
padding: 0.5rem;
|
|
21
|
-
border: 1px solid rgba(209, 214, 219, 1);
|
|
22
|
-
border-radius: 2px;
|
|
23
|
-
background: ${({ type }) => (type === 'folder' ? '#fafaf9' : '#fff')};
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
type ResourceElementProps = {
|
|
27
|
-
type: 'folder' | 'resource';
|
|
28
|
-
title: string;
|
|
29
|
-
rightSide?: ReactElement;
|
|
30
|
-
leftSide?: ReactElement;
|
|
31
|
-
description?: string;
|
|
32
|
-
children?: ReactElement;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const ResourceElement = ({ type, title, description, leftSide, rightSide, children }: ResourceElementProps) => {
|
|
36
|
-
// const { t } = useTranslation();
|
|
37
|
-
return (
|
|
38
|
-
<ResourceElementWrapper type={type}>
|
|
39
|
-
<div>{leftSide}</div>
|
|
40
|
-
<div>
|
|
41
|
-
<h1>{title}</h1>
|
|
42
|
-
<p>{description}</p>
|
|
43
|
-
{children}
|
|
44
|
-
</div>
|
|
45
|
-
<div>{rightSide}</div>
|
|
46
|
-
</ResourceElementWrapper>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default ResourceElement;
|
|
@@ -1,42 +0,0 @@
|
|
|
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 styled from '@emotion/styled';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import ResourceElement from './ResourceElement';
|
|
12
|
-
|
|
13
|
-
const ResourcesWrapper = styled.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 1rem; 0;
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const ResourcesView = () => {
|
|
20
|
-
return (
|
|
21
|
-
<ResourcesWrapper>
|
|
22
|
-
<ResourceElement
|
|
23
|
-
type="folder"
|
|
24
|
-
title="Example folder"
|
|
25
|
-
leftSide={<img src="http://placekitten.com/200/200" alt="Mjaoo" />}
|
|
26
|
-
rightSide={<span>#tag</span>}
|
|
27
|
-
description="some description">
|
|
28
|
-
<p>Im a child.. insert content</p>
|
|
29
|
-
</ResourceElement>
|
|
30
|
-
<ResourceElement
|
|
31
|
-
type="resource"
|
|
32
|
-
title="Example Resource"
|
|
33
|
-
leftSide={<img src="http://placekitten.com/200/200" alt="Brrr" />}
|
|
34
|
-
rightSide={<span>#tag</span>}
|
|
35
|
-
description="some description">
|
|
36
|
-
<p>Im a child.. insert content</p>
|
|
37
|
-
</ResourceElement>
|
|
38
|
-
</ResourcesWrapper>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default ResourcesView;
|