@ndla/ui 39.0.4 → 40.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/README.md +0 -18
- package/es/Article/Article.js +6 -3
- package/es/Frontpage/FrontpageAllSubjects.js +17 -10
- package/es/LearningPaths/LearningPathInformation.js +10 -6
- package/es/MultidisciplinarySubject/MultidisciplinarySubject.js +32 -28
- package/es/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +15 -10
- package/es/Navigation/index.js +1 -2
- package/es/Programme/Programme.js +13 -8
- package/es/ToolboxPage/ToolboxInfo.js +4 -9
- package/es/Topic/Topic.js +21 -18
- package/es/Translation/index.js +0 -1
- package/es/all.css +1 -1
- package/es/index.js +2 -2
- package/lib/Article/Article.js +6 -3
- package/lib/Frontpage/FrontpageAllSubjects.js +17 -10
- package/lib/LearningPaths/LearningPathInformation.js +9 -5
- package/lib/MultidisciplinarySubject/MultidisciplinarySubject.d.ts +3 -1
- package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +31 -27
- package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.d.ts +3 -1
- package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +14 -9
- package/lib/Navigation/index.d.ts +1 -2
- package/lib/Navigation/index.js +0 -7
- package/lib/Programme/Programme.js +12 -7
- package/lib/ToolboxPage/ToolboxInfo.js +5 -10
- package/lib/Topic/Topic.js +21 -18
- package/lib/Translation/index.d.ts +0 -1
- package/lib/Translation/index.js +0 -7
- package/lib/all.css +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +0 -12
- package/package.json +14 -14
- package/src/Article/Article.tsx +4 -1
- package/src/Dialog/component.dialog.scss +0 -4
- package/src/Frontpage/FrontpageAllSubjects.tsx +3 -21
- package/src/LearningPaths/LearningPathInformation.tsx +6 -12
- package/src/MultidisciplinarySubject/MultidisciplinarySubject.tsx +15 -25
- package/src/MultidisciplinarySubject/MultidisciplinarySubjectHeader.tsx +8 -2
- package/src/Navigation/index.ts +1 -2
- package/src/Programme/Programme.tsx +4 -2
- package/src/Search/component.search-result.scss +0 -8
- package/src/ToolboxPage/ToolboxInfo.tsx +2 -13
- package/src/Topic/Topic.tsx +3 -2
- package/src/Translation/index.ts +0 -1
- package/src/all.scss +0 -1
- package/src/index.ts +2 -2
- package/src/main.scss +0 -1
- package/es/Navigation/NavigationHeading.js +0 -50
- package/es/Translation/TranslationBox.js +0 -16
- package/lib/Navigation/NavigationHeading.d.ts +0 -9
- package/lib/Navigation/NavigationHeading.js +0 -58
- package/lib/Translation/TranslationBox.d.ts +0 -10
- package/lib/Translation/TranslationBox.js +0 -24
- package/src/Navigation/NavigationHeading.tsx +0 -49
- package/src/Translation/TranslationBox.tsx +0 -19
- package/src/Translation/component.translation-box.scss +0 -9
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _tabs = require("@ndla/tabs");
|
|
9
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
var TranslationBox = function TranslationBox(_ref) {
|
|
12
|
-
var tabs = _ref.tabs;
|
|
13
|
-
return (0, _jsxRuntime.jsx)("div", {
|
|
14
|
-
className: "c-translation-box",
|
|
15
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
16
|
-
className: "c-bodybox c-bodybox--translation",
|
|
17
|
-
children: (0, _jsxRuntime.jsx)(_tabs.ArticleTabs, {
|
|
18
|
-
tabs: tabs
|
|
19
|
-
})
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
var _default = TranslationBox;
|
|
24
|
-
exports["default"] = _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
import { breakpoints, colors, fonts, mq } from '@ndla/core';
|
|
4
|
-
import { Heading } from '../Typography';
|
|
5
|
-
|
|
6
|
-
const StyledHeading = styled(Heading)`
|
|
7
|
-
&[data-inverted='true'] {
|
|
8
|
-
color: ${colors.white};
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
const StyledMainText = styled.span`
|
|
12
|
-
display: block;
|
|
13
|
-
`;
|
|
14
|
-
const StyledSubText = styled.span`
|
|
15
|
-
display: block;
|
|
16
|
-
font-weight: bold;
|
|
17
|
-
text-transform: uppercase;
|
|
18
|
-
margin-bottom: 6px;
|
|
19
|
-
|
|
20
|
-
${fonts.sizes('14px', '24px')};
|
|
21
|
-
|
|
22
|
-
${mq.range({ from: breakpoints.tablet })} {
|
|
23
|
-
${fonts.sizes('18px', '32px')};
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
type Props = {
|
|
28
|
-
subHeading?: string;
|
|
29
|
-
children: ReactNode;
|
|
30
|
-
invertedStyle?: boolean;
|
|
31
|
-
headingId?: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const NavigationHeading = ({ subHeading, children, invertedStyle, headingId }: Props) => (
|
|
35
|
-
<StyledHeading
|
|
36
|
-
element="h1"
|
|
37
|
-
margin="xlarge"
|
|
38
|
-
headingStyle="h1"
|
|
39
|
-
serif
|
|
40
|
-
data-inverted={invertedStyle}
|
|
41
|
-
id={headingId}
|
|
42
|
-
tabIndex={-1}
|
|
43
|
-
>
|
|
44
|
-
{subHeading && <StyledSubText>{subHeading}</StyledSubText>}
|
|
45
|
-
<StyledMainText>{children}</StyledMainText>
|
|
46
|
-
</StyledHeading>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export default NavigationHeading;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { ArticleTabs } from '@ndla/tabs';
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
tabs: {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
content: (() => ReactNode) | ReactNode;
|
|
9
|
-
}[];
|
|
10
|
-
}
|
|
11
|
-
const TranslationBox = ({ tabs }: Props) => (
|
|
12
|
-
<div className="c-translation-box">
|
|
13
|
-
<div className="c-bodybox c-bodybox--translation">
|
|
14
|
-
<ArticleTabs tabs={tabs} />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default TranslationBox;
|