@ndla/ui 45.0.14 → 45.0.15
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 +3 -3
- package/es/BlogPost/BlogPost.js +4 -4
- package/es/CampaignBlock/CampaignBlock.js +6 -6
- package/es/Frontpage/FrontpageMultidisciplinarySubject.js +7 -7
- package/es/Frontpage/FrontpageToolbox.js +4 -4
- package/es/FrontpageArticle/FrontpageArticle.js +3 -3
- package/es/InfoWidget/InfoWidget.js +8 -8
- package/es/LearningPaths/LearningPathInformation.js +4 -4
- package/es/LinkBlock/LinkBlock.js +6 -6
- package/es/MultidisciplinarySubject/MultidisciplinarySubject.js +7 -7
- package/es/Navigation/NavigationBox.js +20 -20
- package/es/Programme/Programme.js +6 -6
- package/es/RelatedArticleList/RelatedArticleV2.js +1 -1
- package/es/ResourceGroup/ResourceGroup.js +4 -4
- package/es/SectionHeading/SectionHeading.js +2 -2
- package/es/Subject/Subject.js +11 -11
- package/es/Subject/SubjectNewContent.js +8 -8
- package/es/Subject/SubjectSocial.js +2 -2
- package/es/ToolboxPage/ToolboxInfo.js +2 -2
- package/es/Topic/Topic.js +18 -18
- package/es/index.js +0 -1
- package/lib/Article/Article.js +4 -4
- package/lib/BlogPost/BlogPost.d.ts +1 -1
- package/lib/BlogPost/BlogPost.js +4 -4
- package/lib/CampaignBlock/CampaignBlock.d.ts +1 -1
- package/lib/CampaignBlock/CampaignBlock.js +6 -6
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +1 -1
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +7 -7
- package/lib/Frontpage/FrontpageToolbox.d.ts +1 -1
- package/lib/Frontpage/FrontpageToolbox.js +4 -4
- package/lib/FrontpageArticle/FrontpageArticle.js +4 -4
- package/lib/InfoWidget/InfoWidget.d.ts +1 -1
- package/lib/InfoWidget/InfoWidget.js +8 -8
- package/lib/LearningPaths/LearningPathInformation.js +5 -5
- package/lib/LinkBlock/LinkBlock.js +7 -7
- package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +8 -8
- package/lib/Navigation/NavigationBox.js +21 -21
- package/lib/Programme/Programme.js +7 -7
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +1 -1
- package/lib/RelatedArticleList/RelatedArticleV2.d.ts +1 -1
- package/lib/RelatedArticleList/RelatedArticleV2.js +1 -1
- package/lib/ResourceGroup/ResourceGroup.d.ts +1 -1
- package/lib/ResourceGroup/ResourceGroup.js +4 -4
- package/lib/SectionHeading/SectionHeading.d.ts +1 -1
- package/lib/SectionHeading/SectionHeading.js +2 -2
- package/lib/Subject/Subject.d.ts +1 -1
- package/lib/Subject/Subject.js +11 -11
- package/lib/Subject/SubjectNewContent.d.ts +1 -1
- package/lib/Subject/SubjectNewContent.js +8 -8
- package/lib/Subject/SubjectSocial.d.ts +1 -1
- package/lib/Subject/SubjectSocial.js +2 -2
- package/lib/ToolboxPage/ToolboxInfo.js +3 -3
- package/lib/Topic/Topic.js +19 -19
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -7
- package/lib/types.d.ts +0 -1
- package/package.json +17 -16
- package/src/Article/Article.tsx +1 -1
- package/src/BlogPost/BlogPost.tsx +1 -1
- package/src/CampaignBlock/CampaignBlock.tsx +1 -1
- package/src/Frontpage/FrontpageMultidisciplinarySubject.tsx +1 -1
- package/src/Frontpage/FrontpageToolbox.tsx +1 -1
- package/src/FrontpageArticle/FrontpageArticle.tsx +1 -1
- package/src/InfoWidget/InfoWidget.tsx +1 -1
- package/src/LearningPaths/LearningPathInformation.tsx +1 -1
- package/src/LinkBlock/LinkBlock.tsx +1 -1
- package/src/MultidisciplinarySubject/MultidisciplinarySubject.tsx +1 -1
- package/src/Navigation/NavigationBox.tsx +1 -1
- package/src/Programme/Programme.tsx +1 -1
- package/src/RelatedArticleList/RelatedArticleList.tsx +1 -1
- package/src/RelatedArticleList/RelatedArticleV2.tsx +1 -1
- package/src/ResourceGroup/ResourceGroup.tsx +1 -1
- package/src/SectionHeading/SectionHeading.tsx +1 -1
- package/src/Subject/Subject.tsx +1 -1
- package/src/Subject/SubjectNewContent.tsx +1 -1
- package/src/Subject/SubjectSocial.tsx +1 -1
- package/src/ToolboxPage/ToolboxInfo.tsx +1 -1
- package/src/Topic/Topic.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/types.ts +0 -2
- package/es/Typography/Heading.js +0 -48
- package/es/Typography/index.js +0 -9
- package/lib/Typography/Heading.d.ts +0 -25
- package/lib/Typography/Heading.js +0 -54
- package/lib/Typography/index.d.ts +0 -8
- package/lib/Typography/index.js +0 -13
- package/src/Typography/Heading.tsx +0 -96
- package/src/Typography/index.ts +0 -9
package/lib/index.d.ts
CHANGED
|
@@ -97,8 +97,6 @@ export type { HeartButtonType } from './Embed';
|
|
|
97
97
|
export { CampaignBlock } from './CampaignBlock';
|
|
98
98
|
export { Grid, GridParallaxItem } from './Grid';
|
|
99
99
|
export type { GridType } from './Grid';
|
|
100
|
-
export { Heading } from './Typography';
|
|
101
|
-
export type { HeadingLevel } from './types';
|
|
102
100
|
export { default as FrontpageArticle, FRONTPAGE_ARTICLE_MAX_WIDTH, WIDE_FRONTPAGE_ARTICLE_MAX_WIDTH, } from './FrontpageArticle';
|
|
103
101
|
export { DefinitionTerm, DefinitionDescription } from './DefinitionList';
|
|
104
102
|
export type { ProgrammeV2 } from './ProgrammeCard';
|
package/lib/index.js
CHANGED
|
@@ -520,12 +520,6 @@ Object.defineProperty(exports, "HeaderBreadcrumb", {
|
|
|
520
520
|
return _Breadcrumb.HeaderBreadcrumb;
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
|
-
Object.defineProperty(exports, "Heading", {
|
|
524
|
-
enumerable: true,
|
|
525
|
-
get: function get() {
|
|
526
|
-
return _Typography.Heading;
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
523
|
Object.defineProperty(exports, "Hero", {
|
|
530
524
|
enumerable: true,
|
|
531
525
|
get: function get() {
|
|
@@ -1360,7 +1354,6 @@ var _KeyFigure = require("./KeyFigure");
|
|
|
1360
1354
|
var _ContactBlock = _interopRequireDefault(require("./ContactBlock"));
|
|
1361
1355
|
var _CampaignBlock = require("./CampaignBlock");
|
|
1362
1356
|
var _Grid = require("./Grid");
|
|
1363
|
-
var _Typography = require("./Typography");
|
|
1364
1357
|
var _FrontpageArticle = _interopRequireWildcard(require("./FrontpageArticle"));
|
|
1365
1358
|
var _DefinitionList = require("./DefinitionList");
|
|
1366
1359
|
var _Gloss = require("./Gloss");
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "45.0.
|
|
3
|
+
"version": "45.0.15",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,23 +31,24 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/accordion": "^2.2.
|
|
34
|
+
"@ndla/accordion": "^2.2.23",
|
|
35
35
|
"@ndla/article-scripts": "^3.0.21",
|
|
36
|
-
"@ndla/button": "^11.0.
|
|
37
|
-
"@ndla/carousel": "^4.0.
|
|
38
|
-
"@ndla/core": "^4.1.
|
|
39
|
-
"@ndla/dropdown-menu": "^1.0.
|
|
40
|
-
"@ndla/forms": "^4.3.
|
|
36
|
+
"@ndla/button": "^11.0.8",
|
|
37
|
+
"@ndla/carousel": "^4.0.1",
|
|
38
|
+
"@ndla/core": "^4.1.8",
|
|
39
|
+
"@ndla/dropdown-menu": "^1.0.6",
|
|
40
|
+
"@ndla/forms": "^4.3.24",
|
|
41
41
|
"@ndla/hooks": "^2.1.0",
|
|
42
|
-
"@ndla/icons": "^4.0.
|
|
42
|
+
"@ndla/icons": "^4.0.7",
|
|
43
43
|
"@ndla/licenses": "^7.1.4",
|
|
44
|
-
"@ndla/modal": "^4.0.
|
|
45
|
-
"@ndla/notion": "^5.0.
|
|
46
|
-
"@ndla/safelink": "^4.1.
|
|
47
|
-
"@ndla/select": "^2.4.
|
|
48
|
-
"@ndla/switch": "^1.1.
|
|
49
|
-
"@ndla/tabs": "^3.0.
|
|
50
|
-
"@ndla/tooltip": "^4.1.
|
|
44
|
+
"@ndla/modal": "^4.0.8",
|
|
45
|
+
"@ndla/notion": "^5.0.26",
|
|
46
|
+
"@ndla/safelink": "^4.1.22",
|
|
47
|
+
"@ndla/select": "^2.4.14",
|
|
48
|
+
"@ndla/switch": "^1.1.13",
|
|
49
|
+
"@ndla/tabs": "^3.0.9",
|
|
50
|
+
"@ndla/tooltip": "^4.1.19",
|
|
51
|
+
"@ndla/typography": "^0.2.0",
|
|
51
52
|
"@ndla/util": "^3.2.0",
|
|
52
53
|
"@radix-ui/react-popover": "^1.0.6",
|
|
53
54
|
"@radix-ui/react-slider": "^1.1.2",
|
|
@@ -83,5 +84,5 @@
|
|
|
83
84
|
"publishConfig": {
|
|
84
85
|
"access": "public"
|
|
85
86
|
},
|
|
86
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "00d70afe163dcf81cd7154743319ae3fe6f6fdff"
|
|
87
88
|
}
|
package/src/Article/Article.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import styled from '@emotion/styled';
|
|
|
14
14
|
import { useIntersectionObserver } from '@ndla/hooks';
|
|
15
15
|
import { resizeObserver } from '@ndla/util';
|
|
16
16
|
import { spacing, spacingUnit, mq, breakpoints } from '@ndla/core';
|
|
17
|
+
import { Heading } from '@ndla/typography';
|
|
17
18
|
import { Article as ArticleType } from '../types';
|
|
18
19
|
import ArticleByline from './ArticleByline';
|
|
19
20
|
import LayoutItem from '../Layout';
|
|
@@ -21,7 +22,6 @@ import ArticleHeaderWrapper from './ArticleHeaderWrapper';
|
|
|
21
22
|
import ArticleNotions from './ArticleNotions';
|
|
22
23
|
import ArticleAccessMessage from './ArticleAccessMessage';
|
|
23
24
|
import MessageBox from '../Messages/MessageBox';
|
|
24
|
-
import { Heading } from '../Typography';
|
|
25
25
|
|
|
26
26
|
const classes = new BEMHelper({
|
|
27
27
|
name: 'article',
|
|
@@ -11,8 +11,8 @@ import { css } from '@emotion/react';
|
|
|
11
11
|
import SafeLink from '@ndla/safelink';
|
|
12
12
|
import { breakpoints, colors, fonts, misc, mq, spacing } from '@ndla/core';
|
|
13
13
|
import { Quote } from '@ndla/icons/editor';
|
|
14
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
14
15
|
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { HeadingLevel } from '../types';
|
|
16
16
|
import { usePossiblyRelativeUrl } from '../utils/relativeUrl';
|
|
17
17
|
|
|
18
18
|
export interface Props {
|
|
@@ -11,7 +11,7 @@ import { css } from '@emotion/react';
|
|
|
11
11
|
import SafeLink from '@ndla/safelink';
|
|
12
12
|
import { Forward } from '@ndla/icons/common';
|
|
13
13
|
import { breakpoints, colors, fonts, spacing, mq, misc } from '@ndla/core';
|
|
14
|
-
import { HeadingLevel } from '
|
|
14
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
15
15
|
import { usePossiblyRelativeUrl } from '../utils/relativeUrl';
|
|
16
16
|
|
|
17
17
|
interface Image {
|
|
@@ -2,9 +2,9 @@ import SafeLink, { SafeLinkButton } from '@ndla/safelink';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
6
|
import SectionHeading from '../SectionHeading';
|
|
6
7
|
import { MultidisciplinarySubjectIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
7
|
-
import { HeadingLevel } from '../types';
|
|
8
8
|
|
|
9
9
|
export const StyledSection = styled.section`
|
|
10
10
|
position: relative;
|
|
@@ -2,9 +2,9 @@ import styled from '@emotion/styled';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
4
4
|
import { SafeLinkButton } from '@ndla/safelink';
|
|
5
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
6
|
import SectionHeading from '../SectionHeading';
|
|
6
7
|
import { ToolboxIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
7
|
-
import { HeadingLevel } from '../types';
|
|
8
8
|
|
|
9
9
|
const StyledSection = styled.section`
|
|
10
10
|
margin-top: ${spacing.large};
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { CSSProperties, ReactNode, useMemo } from 'react';
|
|
10
10
|
import { breakpoints, fonts, mq, spacing, spacingUnit } from '@ndla/core';
|
|
11
11
|
import styled from '@emotion/styled';
|
|
12
|
+
import { Heading } from '@ndla/typography';
|
|
12
13
|
import { Article } from '../types';
|
|
13
|
-
import { Heading } from '../Typography';
|
|
14
14
|
import { ArticleByline } from '../Article';
|
|
15
15
|
import { useMastheadHeight } from '../Masthead';
|
|
16
16
|
|
|
@@ -5,8 +5,8 @@ import { Forward } from '@ndla/icons/common';
|
|
|
5
5
|
import SafeLink from '@ndla/safelink';
|
|
6
6
|
import { colors, fonts, spacing } from '@ndla/core';
|
|
7
7
|
|
|
8
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
8
9
|
import SectionHeading from '../SectionHeading';
|
|
9
|
-
import { HeadingLevel } from '../types';
|
|
10
10
|
|
|
11
11
|
interface InfoWidgetSectionProps {
|
|
12
12
|
center?: boolean;
|
|
@@ -10,7 +10,7 @@ import styled from '@emotion/styled';
|
|
|
10
10
|
import { spacing, spacingUnit, breakpoints, mq, colors } from '@ndla/core';
|
|
11
11
|
import { getLicenseByAbbreviation } from '@ndla/licenses';
|
|
12
12
|
import { LicenseByline } from '@ndla/notion';
|
|
13
|
-
import { Heading } from '
|
|
13
|
+
import { Heading } from '@ndla/typography';
|
|
14
14
|
|
|
15
15
|
type StyledWrapperProps = {
|
|
16
16
|
invertedStyle?: boolean;
|
|
@@ -14,7 +14,7 @@ import { Forward, CalendarEd } from '@ndla/icons/common';
|
|
|
14
14
|
import { breakpoints, colors, spacing, mq } from '@ndla/core';
|
|
15
15
|
import { LinkBlockEmbedData } from '@ndla/types-embed';
|
|
16
16
|
import { useMemo } from 'react';
|
|
17
|
-
import Heading from '
|
|
17
|
+
import { Heading } from '@ndla/typography';
|
|
18
18
|
import { usePossiblyRelativeUrl } from '../utils/relativeUrl';
|
|
19
19
|
|
|
20
20
|
const StyledForward = styled(Forward)`
|
|
@@ -2,11 +2,11 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { breakpoints, mq } from '@ndla/core';
|
|
5
|
+
import { Heading } from '@ndla/typography';
|
|
5
6
|
import LayoutItem, { OneColumn } from '../Layout';
|
|
6
7
|
import List from './List';
|
|
7
8
|
import { ListItemProps } from './ListItem';
|
|
8
9
|
import { HomeBreadcrumb, SimpleBreadcrumbItem } from '../Breadcrumb';
|
|
9
|
-
import { Heading } from '../Typography';
|
|
10
10
|
|
|
11
11
|
const StyledWrapper = styled.div`
|
|
12
12
|
display: flex;
|
|
@@ -8,7 +8,7 @@ import { Switch } from '@ndla/switch';
|
|
|
8
8
|
import { uuid } from '@ndla/util';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import { HumanMaleBoard } from '@ndla/icons/common';
|
|
11
|
-
import { Heading } from '
|
|
11
|
+
import { Heading } from '@ndla/typography';
|
|
12
12
|
|
|
13
13
|
const StyledWrapper = styled.nav`
|
|
14
14
|
margin: 20px 0 34px;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { breakpoints, mq, spacing } from '@ndla/core';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { Heading } from '@ndla/typography';
|
|
4
5
|
import LayoutItem, { OneColumn } from '../Layout';
|
|
5
6
|
import ProgrammeSubjects, { GradesProps } from './ProgrammeSubjects';
|
|
6
7
|
import MessageBox from '../Messages/MessageBox';
|
|
7
|
-
import { Heading } from '..';
|
|
8
8
|
const StyledWrapper = styled.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
@@ -2,8 +2,8 @@ import { Children, cloneElement, ReactElement } from 'react';
|
|
|
2
2
|
import BEMHelper from 'react-bem-helper';
|
|
3
3
|
import { ButtonV2 } from '@ndla/button';
|
|
4
4
|
import SafeLink from '@ndla/safelink';
|
|
5
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
6
|
import SectionHeading from '../SectionHeading';
|
|
6
|
-
import { HeadingLevel } from '../types';
|
|
7
7
|
|
|
8
8
|
const classes = new BEMHelper({
|
|
9
9
|
name: 'related-articles',
|
|
@@ -12,8 +12,8 @@ import { useTranslation } from 'react-i18next';
|
|
|
12
12
|
import styled from '@emotion/styled';
|
|
13
13
|
import { ButtonV2 } from '@ndla/button';
|
|
14
14
|
import SafeLink from '@ndla/safelink';
|
|
15
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
15
16
|
import SectionHeading from '../SectionHeading';
|
|
16
|
-
import { HeadingLevel } from '../types';
|
|
17
17
|
import ContentTypeBadge from '../ContentTypeBadge';
|
|
18
18
|
import { contentTypes } from '../model/ContentType';
|
|
19
19
|
|
|
@@ -11,8 +11,8 @@ import styled from '@emotion/styled';
|
|
|
11
11
|
import { css } from '@emotion/react';
|
|
12
12
|
import { colors, fonts, spacing } from '@ndla/core';
|
|
13
13
|
|
|
14
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
14
15
|
import ResourceList, { ResourceListProps } from './ResourceList';
|
|
15
|
-
import { HeadingLevel } from '../types';
|
|
16
16
|
|
|
17
17
|
const Wrapper = styled.section`
|
|
18
18
|
margin-bottom: ${spacing.large};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { breakpoints, fonts, mq, spacing } from '@ndla/core';
|
|
4
|
-
import { HeadingLevel } from '
|
|
4
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
5
|
|
|
6
6
|
const headingStyle = css`
|
|
7
7
|
font-weight: ${fonts.weight.bold};
|
package/src/Subject/Subject.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { breakpoints, colors, mq, spacing, spacingUnit } from '@ndla/core';
|
|
5
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
6
|
import SectionHeading from '../SectionHeading';
|
|
6
|
-
import { HeadingLevel } from '../types';
|
|
7
7
|
|
|
8
8
|
const SubjectContentWrapper = styled.div`
|
|
9
9
|
${mq.range({ from: breakpoints.tablet })} {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import SafeLink from '@ndla/safelink';
|
|
3
3
|
import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
|
|
4
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
4
5
|
import ContentTypeBadge from '../ContentTypeBadge';
|
|
5
6
|
import { SubjectSectionTitle } from './Subject';
|
|
6
|
-
import { HeadingLevel } from '../types';
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
headingLevel: HeadingLevel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { breakpoints, mq, spacing } from '@ndla/core';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { HeadingLevel } from '
|
|
4
|
+
import { HeadingLevel } from '@ndla/typography';
|
|
5
5
|
import { SubjectSectionTitle } from './Subject';
|
|
6
6
|
|
|
7
7
|
const StyledSubjectSocialContent = styled.div`
|
|
@@ -10,9 +10,9 @@ import { MouseEvent } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { breakpoints, fonts, mq } from '@ndla/core';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
+
import { Heading } from '@ndla/typography';
|
|
13
14
|
import { ItemProps } from '../Navigation/NavigationBox';
|
|
14
15
|
import { NavigationBox } from '../Navigation';
|
|
15
|
-
import { Heading } from '../Typography';
|
|
16
16
|
|
|
17
17
|
const Introduction = styled.p`
|
|
18
18
|
max-width: 800px;
|
package/src/Topic/Topic.tsx
CHANGED
|
@@ -18,12 +18,12 @@ import { CursorClick, ExpandTwoArrows } from '@ndla/icons/action';
|
|
|
18
18
|
import { css } from '@emotion/react';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
import { EmbedMetaData } from '@ndla/types-embed';
|
|
21
|
+
import { Heading } from '@ndla/typography';
|
|
21
22
|
import Loader from './Loader';
|
|
22
23
|
import { ItemProps } from '../Navigation/NavigationBox';
|
|
23
24
|
import { NavigationBox } from '../Navigation';
|
|
24
25
|
import { makeSrcQueryString, ImageCrop, ImageFocalPoint } from '../Image';
|
|
25
26
|
import { MessageBox } from '../Messages';
|
|
26
|
-
import { Heading } from '../Typography';
|
|
27
27
|
import { getCrop, getFocalPoint } from '../Embed/ImageEmbed';
|
|
28
28
|
|
|
29
29
|
type InvertItProps = {
|
package/src/index.ts
CHANGED
|
@@ -268,8 +268,6 @@ export type { HeartButtonType } from './Embed';
|
|
|
268
268
|
export { CampaignBlock } from './CampaignBlock';
|
|
269
269
|
export { Grid, GridParallaxItem } from './Grid';
|
|
270
270
|
export type { GridType } from './Grid';
|
|
271
|
-
export { Heading } from './Typography';
|
|
272
|
-
export type { HeadingLevel } from './types';
|
|
273
271
|
|
|
274
272
|
export {
|
|
275
273
|
default as FrontpageArticle,
|
package/src/types.ts
CHANGED
package/es/Typography/Heading.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["element", "children", "headingStyle", "margin", "serif"];
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
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; }
|
|
9
|
-
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; }
|
|
10
|
-
/**
|
|
11
|
-
* Copyright (c) 2023-present, NDLA.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { css } from '@emotion/react';
|
|
19
|
-
import { breakpoints, fonts, mq, spacing } from '@ndla/core';
|
|
20
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
21
|
-
var style = /*#__PURE__*/css("font-weight:", fonts.weight.bold, ";font-family:", fonts.sans, ";", fonts.sizes('22px', '30px'), ";margin:", spacing.normal, " 0 ", spacing.normal, " 0;&[data-margin='none']{margin:0px;}&[data-margin='xlarge']{margin:", spacing.normal, " 0 ", spacing.small, " 0;", mq.range({
|
|
22
|
-
from: breakpoints.tablet
|
|
23
|
-
}), "{margin-bottom:", spacing.normal, ";}}&[data-margin='large']{margin-top:", spacing.large, ";margin-bottom:", spacing.small, ";}&[data-margin='small']{margin-top:", spacing.normal, ";margin-bottom:", spacing.small, ";}&[data-style='h1']{", fonts.sizes('30px', '36px'), ";", mq.range({
|
|
24
|
-
from: breakpoints.tablet
|
|
25
|
-
}), "{", fonts.sizes('48px', '60px'), ";margin-bottom:", spacing.normal, ";}}&[data-style='h2']{", fonts.sizes('28px', '36px'), ";", mq.range({
|
|
26
|
-
from: breakpoints.tablet
|
|
27
|
-
}), "{", fonts.sizes('30px', '38px'), ";}}&[data-style='h3']{", fonts.sizes('26px', '35px'), ";", mq.range({
|
|
28
|
-
from: breakpoints.tablet
|
|
29
|
-
}), "{", fonts.sizes('26px', '36px'), ";}}&[data-style='list-title']{", fonts.sizes('18px', '24px'), ";text-transform:uppercase;};label:style;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkhlYWRpbmcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFpQiIsImZpbGUiOiJIZWFkaW5nLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDIzLXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgYnJlYWtwb2ludHMsIGZvbnRzLCBtcSwgc3BhY2luZyB9IGZyb20gJ0BuZGxhL2NvcmUnO1xuaW1wb3J0IHsgQ29tcG9uZW50UHJvcHMsIEVsZW1lbnRUeXBlLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBIZWFkaW5nTGV2ZWwgfSBmcm9tICcuLi90eXBlcyc7XG5cbmNvbnN0IHN0eWxlID0gY3NzYFxuICBmb250LXdlaWdodDogJHtmb250cy53ZWlnaHQuYm9sZH07XG4gIGZvbnQtZmFtaWx5OiAke2ZvbnRzLnNhbnN9O1xuICAke2ZvbnRzLnNpemVzKCcyMnB4JywgJzMwcHgnKX07XG4gIG1hcmdpbjogJHtzcGFjaW5nLm5vcm1hbH0gMCAke3NwYWNpbmcubm9ybWFsfSAwO1xuXG4gICZbZGF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+KSA9PiB7XG4gIGNvbnN0IEVsZW1lbnQgPSBlbGVtZW50IGFzIEVsZW1lbnRUeXBlO1xuICByZXR1cm4gKFxuICAgIDxFbGVtZW50IGNzcz17c3R5bGV9IGRhdGEtc2VyaWY9e3NlcmlmfSBkYXRhLXN0eWxlPXtoZWFkaW5nU3R5bGV9IGRhdGEtbWFyZ2luPXttYXJnaW59IHsuLi5yZXN0fT5cbiAgICAgIHtjaGlsZHJlbn1cbiAgICA8L0VsZW1lbnQ+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBIZWFkaW5nO1xuIl19 */"));
|
|
30
|
-
var Heading = function Heading(_ref) {
|
|
31
|
-
var element = _ref.element,
|
|
32
|
-
children = _ref.children,
|
|
33
|
-
headingStyle = _ref.headingStyle,
|
|
34
|
-
_ref$margin = _ref.margin,
|
|
35
|
-
margin = _ref$margin === void 0 ? 'normal' : _ref$margin,
|
|
36
|
-
serif = _ref.serif,
|
|
37
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
-
var Element = element;
|
|
39
|
-
return _jsx(Element, _objectSpread(_objectSpread({
|
|
40
|
-
css: style,
|
|
41
|
-
"data-serif": serif,
|
|
42
|
-
"data-style": headingStyle,
|
|
43
|
-
"data-margin": margin
|
|
44
|
-
}, rest), {}, {
|
|
45
|
-
children: children
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
export default Heading;
|
package/es/Typography/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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 { ComponentProps, ReactNode } from 'react';
|
|
9
|
-
import { HeadingLevel } from '../types';
|
|
10
|
-
type AllowedElements = HeadingLevel | 'p' | 'span';
|
|
11
|
-
interface Props<T extends AllowedElements> {
|
|
12
|
-
element: T;
|
|
13
|
-
headingStyle: 'h1' | 'h2' | 'h3' | 'list-title' | 'default';
|
|
14
|
-
serif?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* General usage
|
|
17
|
-
* xlarge -> h1
|
|
18
|
-
* large -> h2
|
|
19
|
-
* normal -> anything else
|
|
20
|
-
*/
|
|
21
|
-
margin?: 'xlarge' | 'large' | 'normal' | 'small' | 'none';
|
|
22
|
-
children: ReactNode;
|
|
23
|
-
}
|
|
24
|
-
declare const Heading: <T extends AllowedElements>({ element, children, headingStyle, margin, serif, ...rest }: Props<T> & ComponentProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
-
export default Heading;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
|
-
var _core = require("@ndla/core");
|
|
10
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
var _excluded = ["element", "children", "headingStyle", "margin", "serif"];
|
|
12
|
-
/**
|
|
13
|
-
* Copyright (c) 2023-present, NDLA.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
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; }
|
|
22
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
-
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; }
|
|
25
|
-
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; }
|
|
26
|
-
var style = /*#__PURE__*/(0, _react.css)("font-weight:", _core.fonts.weight.bold, ";font-family:", _core.fonts.sans, ";", _core.fonts.sizes('22px', '30px'), ";margin:", _core.spacing.normal, " 0 ", _core.spacing.normal, " 0;&[data-margin='none']{margin:0px;}&[data-margin='xlarge']{margin:", _core.spacing.normal, " 0 ", _core.spacing.small, " 0;", _core.mq.range({
|
|
27
|
-
from: _core.breakpoints.tablet
|
|
28
|
-
}), "{margin-bottom:", _core.spacing.normal, ";}}&[data-margin='large']{margin-top:", _core.spacing.large, ";margin-bottom:", _core.spacing.small, ";}&[data-margin='small']{margin-top:", _core.spacing.normal, ";margin-bottom:", _core.spacing.small, ";}&[data-style='h1']{", _core.fonts.sizes('30px', '36px'), ";", _core.mq.range({
|
|
29
|
-
from: _core.breakpoints.tablet
|
|
30
|
-
}), "{", _core.fonts.sizes('48px', '60px'), ";margin-bottom:", _core.spacing.normal, ";}}&[data-style='h2']{", _core.fonts.sizes('28px', '36px'), ";", _core.mq.range({
|
|
31
|
-
from: _core.breakpoints.tablet
|
|
32
|
-
}), "{", _core.fonts.sizes('30px', '38px'), ";}}&[data-style='h3']{", _core.fonts.sizes('26px', '35px'), ";", _core.mq.range({
|
|
33
|
-
from: _core.breakpoints.tablet
|
|
34
|
-
}), "{", _core.fonts.sizes('26px', '36px'), ";}}&[data-style='list-title']{", _core.fonts.sizes('18px', '24px'), ";text-transform:uppercase;};label:style;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkhlYWRpbmcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFpQiIsImZpbGUiOiJIZWFkaW5nLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDIzLXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcb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VsZW1lbnRzPiB7XG4gIGVsZW1lbnQ6IFQ7XG4gIGhlYWRpbmdTdHlsZTogJ2gxJyB8ICdoMicgfCAnaDMnIHwgJ2xpc3QtdGl0bGUnIHwgJ2RlZmF1bHQnO1xuICBzZXJpZj86IGJvb2xlYW47XG4gIC8qKlxuICAgKiBHZW5lcmFsIHVzYWdlXG4gICAqIHhsYXJnZSAtPiBoMVxuICAgKiBsYXJnZSAtPiBoMlxuICAgKiBub3JtYWwgLT4gYW55dGhpbmcgZWxzZVxuICAgKi9cbiAgbWFyZ2luPzogJ3hsYXJnZScgfCAnbGFyZ2UnIHwgJ25vcm1hbCcgfCAnc21hbGwnIHwgJ25vbmUnO1xuICBjaGlsZHJlbjogUmVhY3ROb2RlO1xufVxuXG5jb25zdCBIZWFkaW5nID0gPFQgZXh0ZW5kcyBBbGxvd2VkRWxlbWVudHM+KHtcbiAgZWxlbWVudCxcbiAgY2hpbGRyZW4sXG4gIGhlYWRpbmdTdHlsZSxcbiAgbWFyZ2luID0gJ25vcm1hbCcsXG4gIHNlcmlmLFxuICAuLi5yZXN0XG59OiBQcm9wczxUPiAmIENvbXBvbmVudFByb3BzPFQ+KSA9PiB7XG4gIGNvbnN0IEVsZW1lbnQgPSBlbGVtZW50IGFzIEVsZW1lbnRUeXBlO1xuICByZXR1cm4gKFxuICAgIDxFbGVtZW50IGNzcz17c3R5bGV9IGRhdGEtc2VyaWY9e3NlcmlmfSBkYXRhLXN0eWxlPXtoZWFkaW5nU3R5bGV9IGRhdGEtbWFyZ2luPXttYXJnaW59IHsuLi5yZXN0fT5cbiAgICAgIHtjaGlsZHJlbn1cbiAgICA8L0VsZW1lbnQ+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBIZWFkaW5nO1xuIl19 */"));
|
|
35
|
-
var Heading = function Heading(_ref) {
|
|
36
|
-
var element = _ref.element,
|
|
37
|
-
children = _ref.children,
|
|
38
|
-
headingStyle = _ref.headingStyle,
|
|
39
|
-
_ref$margin = _ref.margin,
|
|
40
|
-
margin = _ref$margin === void 0 ? 'normal' : _ref$margin,
|
|
41
|
-
serif = _ref.serif,
|
|
42
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
-
var Element = element;
|
|
44
|
-
return (0, _jsxRuntime.jsx)(Element, _objectSpread(_objectSpread({
|
|
45
|
-
css: style,
|
|
46
|
-
"data-serif": serif,
|
|
47
|
-
"data-style": headingStyle,
|
|
48
|
-
"data-margin": margin
|
|
49
|
-
}, rest), {}, {
|
|
50
|
-
children: children
|
|
51
|
-
}));
|
|
52
|
-
};
|
|
53
|
-
var _default = Heading;
|
|
54
|
-
exports.default = _default;
|
package/lib/Typography/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Heading", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _Heading.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Heading = _interopRequireDefault(require("./Heading"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|