@ndla/ui 11.1.4 → 11.2.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/BlogPosts/BlogPost.js +4 -4
- package/es/CreatedBy/CreatedBy.js +4 -4
- package/es/Footer/FooterLinks.js +6 -6
- package/es/SearchTypeResult/SearchItem.js +11 -10
- package/es/all.css +1 -1
- package/lib/BlogPosts/BlogPost.js +4 -4
- package/lib/CreatedBy/CreatedBy.js +4 -4
- package/lib/Footer/FooterLinks.js +6 -6
- package/lib/SearchTypeResult/SearchItem.d.ts +2 -0
- package/lib/SearchTypeResult/SearchItem.js +11 -10
- package/lib/all.css +1 -1
- package/package.json +4 -4
- package/src/Article/component.article.scss +1 -1
- package/src/BlogPosts/BlogPost.tsx +1 -2
- package/src/CreatedBy/CreatedBy.tsx +1 -2
- package/src/Footer/FooterLinks.tsx +1 -2
- package/src/SearchTypeResult/SearchItem.tsx +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@ndla/hooks": "^1.1.4",
|
|
38
38
|
"@ndla/icons": "^1.7.0",
|
|
39
39
|
"@ndla/licenses": "^4.1.0",
|
|
40
|
-
"@ndla/modal": "^1.2.
|
|
41
|
-
"@ndla/notion": "^3.1.
|
|
40
|
+
"@ndla/modal": "^1.2.7",
|
|
41
|
+
"@ndla/notion": "^3.1.4",
|
|
42
42
|
"@ndla/safelink": "^1.1.7",
|
|
43
43
|
"@ndla/switch": "^0.1.5",
|
|
44
44
|
"@ndla/tabs": "^1.1.5",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "4f4f1e2e973a94db7d3c2ea08d66bacbcde29d3e"
|
|
85
85
|
}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
|
-
import { LinkProps } from 'react-router-dom';
|
|
12
11
|
import { spacing, colors, fonts, breakpoints, mq, misc, spacingUnit } from '@ndla/core';
|
|
13
12
|
import { getLicenseByAbbreviation, LicenseByline } from '@ndla/licenses';
|
|
14
13
|
import { Launch as LaunchIcon } from '@ndla/icons/common';
|
|
@@ -116,7 +115,7 @@ const StyledTag = styled.div`
|
|
|
116
115
|
}
|
|
117
116
|
`;
|
|
118
117
|
|
|
119
|
-
const StyledSafeLink = styled(SafeLink)
|
|
118
|
+
const StyledSafeLink = styled(SafeLink)`
|
|
120
119
|
padding: ${spacing.xsmall} 0 ${spacing.small};
|
|
121
120
|
${fonts.sizes(22, 1.1)};
|
|
122
121
|
font-weight: ${fonts.weight.bold};
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { LinkProps } from 'react-router-dom';
|
|
11
10
|
import styled from '@emotion/styled';
|
|
12
11
|
import { colors, fonts } from '@ndla/core';
|
|
13
12
|
import SafeLink from '@ndla/safelink';
|
|
@@ -30,7 +29,7 @@ const Text = styled.div`
|
|
|
30
29
|
${fonts.sizes('20px', '20px')};
|
|
31
30
|
`;
|
|
32
31
|
|
|
33
|
-
const StyledSafeLink = styled(SafeLink)
|
|
32
|
+
const StyledSafeLink = styled(SafeLink)`
|
|
34
33
|
color: ${colors.text.light};
|
|
35
34
|
`;
|
|
36
35
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { LinkProps } from 'react-router-dom';
|
|
4
3
|
import { spacing, fonts, colors, mq, breakpoints, spacingUnit } from '@ndla/core';
|
|
5
4
|
import SafeLink from '@ndla/safelink';
|
|
6
5
|
import { Forward, Launch } from '@ndla/icons/common';
|
|
@@ -57,7 +56,7 @@ const StyledNav = styled.nav`
|
|
|
57
56
|
}
|
|
58
57
|
`;
|
|
59
58
|
|
|
60
|
-
const StyledSafeLink = styled(SafeLink)
|
|
59
|
+
const StyledSafeLink = styled(SafeLink)`
|
|
61
60
|
color: #fff;
|
|
62
61
|
${fonts.sizes(16, 1.5)};
|
|
63
62
|
svg {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { ReactNode } from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import parse from 'html-react-parser';
|
|
12
12
|
|
|
@@ -173,13 +173,14 @@ export type SearchItemProps = {
|
|
|
173
173
|
img?: { url: string; alt: string };
|
|
174
174
|
labels?: string[];
|
|
175
175
|
type?: ContentType;
|
|
176
|
+
children?: ReactNode;
|
|
176
177
|
};
|
|
177
178
|
export type SearchItemType = {
|
|
178
179
|
item: SearchItemProps;
|
|
179
180
|
type?: ContentType;
|
|
180
181
|
};
|
|
181
182
|
const SearchItem = ({ item, type }: SearchItemType) => {
|
|
182
|
-
const { title, url, ingress, contexts, img = null, labels = [] } = item;
|
|
183
|
+
const { title, url, ingress, contexts, img = null, labels = [], children } = item;
|
|
183
184
|
|
|
184
185
|
const isTopic = type === contentTypes.TOPIC || type === contentTypes.MULTIDISCIPLINARY_TOPIC;
|
|
185
186
|
|
|
@@ -209,6 +210,7 @@ const SearchItem = ({ item, type }: SearchItemType) => {
|
|
|
209
210
|
{contexts && contexts.length > 0 && <ItemContexts contexts={contexts} id={item.id} title={item.title} />}
|
|
210
211
|
</ContextWrapper>
|
|
211
212
|
</ItemLink>
|
|
213
|
+
{children}
|
|
212
214
|
</ItemWrapper>
|
|
213
215
|
</Container>
|
|
214
216
|
);
|