@ndla/ui 56.0.2-alpha.0 → 56.0.3-alpha.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/ArticleByline.js +3 -3
- package/es/AudioPlayer/Controls.js +8 -8
- package/es/AudioPlayer/SpeechControl.js +2 -2
- package/es/Breadcrumb/BreadcrumbItem.js +2 -2
- package/es/Breadcrumb/HomeBreadcrumb.js +5 -5
- package/es/CampaignBlock/CampaignBlock.js +2 -2
- package/es/ContentTypeBadge/ContentTypeBadge.js +15 -15
- package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/es/Embed/CodeEmbed.js +3 -3
- package/es/Embed/EmbedErrorPlaceholder.js +2 -2
- package/es/Embed/ImageEmbed.js +4 -4
- package/es/Embed/UuDisclaimerEmbed.js +2 -2
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
- package/es/FactBox/FactBox.js +2 -2
- package/es/FileList/Format.js +7 -7
- package/es/Gloss/Gloss.js +2 -2
- package/es/LicenseByline/EmbedByline.js +2 -2
- package/es/LinkBlock/LinkBlock.js +4 -3
- package/es/Messages/MessageBox.js +10 -10
- package/es/ResourceBox/ResourceBox.js +2 -2
- package/es/TagSelector/TagSelector.js +2 -2
- package/es/TreeStructure/AddFolderButton.js +4 -4
- package/es/TreeStructure/ComboboxButton.js +4 -4
- package/es/TreeStructure/FolderItem.js +16 -16
- package/lib/Article/ArticleByline.js +2 -2
- package/lib/AudioPlayer/Controls.js +5 -5
- package/lib/AudioPlayer/SpeechControl.js +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.js +4 -4
- package/lib/CampaignBlock/CampaignBlock.js +1 -1
- package/lib/ContentTypeBadge/ContentTypeBadge.js +11 -11
- package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/lib/Embed/CodeEmbed.js +1 -1
- package/lib/Embed/EmbedErrorPlaceholder.js +1 -1
- package/lib/Embed/ImageEmbed.js +2 -2
- package/lib/Embed/UuDisclaimerEmbed.js +1 -1
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +2 -2
- package/lib/FactBox/FactBox.js +1 -1
- package/lib/FileList/Format.js +6 -6
- package/lib/Gloss/Gloss.js +1 -1
- package/lib/LicenseByline/EmbedByline.js +1 -1
- package/lib/LinkBlock/LinkBlock.js +3 -2
- package/lib/Messages/MessageBox.js +8 -8
- package/lib/ResourceBox/ResourceBox.js +1 -1
- package/lib/TagSelector/TagSelector.js +1 -1
- package/lib/TreeStructure/AddFolderButton.js +3 -3
- package/lib/TreeStructure/ComboboxButton.js +3 -3
- package/lib/TreeStructure/FolderItem.js +13 -13
- package/package.json +6 -6
- package/src/Article/ArticleByline.tsx +3 -3
- package/src/AudioPlayer/Controls.tsx +8 -8
- package/src/AudioPlayer/SpeechControl.tsx +2 -2
- package/src/Breadcrumb/BreadcrumbItem.tsx +2 -2
- package/src/Breadcrumb/HomeBreadcrumb.tsx +5 -5
- package/src/CampaignBlock/CampaignBlock.tsx +2 -2
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +15 -24
- package/src/ContentTypeBadge/ContentTypeBadgeNew.stories.tsx +2 -2
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -2
- package/src/Embed/CodeEmbed.tsx +3 -3
- package/src/Embed/EmbedErrorPlaceholder.tsx +2 -2
- package/src/Embed/ImageEmbed.tsx +4 -4
- package/src/Embed/UuDisclaimerEmbed.tsx +2 -2
- package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +3 -3
- package/src/FactBox/FactBox.tsx +2 -2
- package/src/FileList/Format.tsx +2 -2
- package/src/Gloss/Gloss.tsx +2 -2
- package/src/LicenseByline/EmbedByline.tsx +2 -2
- package/src/LinkBlock/LinkBlock.tsx +4 -3
- package/src/Messages/MessageBox.stories.tsx +7 -7
- package/src/Messages/MessageBox.tsx +4 -4
- package/src/ResourceBox/ResourceBox.tsx +2 -2
- package/src/TagSelector/TagSelector.stories.tsx +6 -6
- package/src/TagSelector/TagSelector.tsx +2 -2
- package/src/TreeStructure/AddFolderButton.tsx +2 -2
- package/src/TreeStructure/ComboboxButton.tsx +2 -2
- package/src/TreeStructure/FolderItem.tsx +8 -8
- package/src/TreeStructure/TreeStructure.stories.tsx +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.3-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"types"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ndla/button": "^15.0.
|
|
36
|
+
"@ndla/button": "^15.0.3-alpha.0",
|
|
37
37
|
"@ndla/core": "^5.0.1",
|
|
38
38
|
"@ndla/hooks": "^2.1.8",
|
|
39
|
-
"@ndla/icons": "^8.0.
|
|
39
|
+
"@ndla/icons": "^8.0.3-alpha.0",
|
|
40
40
|
"@ndla/licenses": "^8.0.0-alpha.0",
|
|
41
|
-
"@ndla/primitives": "^1.0.
|
|
42
|
-
"@ndla/safelink": "^7.0.
|
|
41
|
+
"@ndla/primitives": "^1.0.3-alpha.0",
|
|
42
|
+
"@ndla/safelink": "^7.0.3-alpha.0",
|
|
43
43
|
"@ndla/styled-system": "^0.0.10",
|
|
44
44
|
"@ndla/typography": "^0.4.23",
|
|
45
45
|
"@ndla/util": "^4.1.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "72e6aeb8c306996655995cd2471e080704b7c928"
|
|
77
77
|
}
|
|
@@ -10,7 +10,7 @@ import { TFunction } from "i18next";
|
|
|
10
10
|
import { ReactNode, useCallback, useEffect, useState } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
import { useLocation } from "react-router-dom";
|
|
13
|
-
import {
|
|
13
|
+
import { ArrowDownShortLine } from "@ndla/icons/common";
|
|
14
14
|
import { getLicenseByAbbreviation } from "@ndla/licenses";
|
|
15
15
|
import {
|
|
16
16
|
AccordionItem,
|
|
@@ -195,7 +195,7 @@ const ArticleByline = ({
|
|
|
195
195
|
<h2>{t("article.useContent")}</h2>
|
|
196
196
|
</Heading>
|
|
197
197
|
<AccordionItemIndicator asChild>
|
|
198
|
-
<
|
|
198
|
+
<ArrowDownShortLine />
|
|
199
199
|
</AccordionItemIndicator>
|
|
200
200
|
</AccordionItemTrigger>
|
|
201
201
|
<AccordionItemContent>{licenseBox}</AccordionItemContent>
|
|
@@ -209,7 +209,7 @@ const ArticleByline = ({
|
|
|
209
209
|
<h2>{t("article.footnotes")}</h2>
|
|
210
210
|
</Heading>
|
|
211
211
|
<AccordionItemIndicator asChild>
|
|
212
|
-
<
|
|
212
|
+
<ArrowDownShortLine />
|
|
213
213
|
</AccordionItemIndicator>
|
|
214
214
|
</AccordionItemTrigger>
|
|
215
215
|
<AccordionItemContent>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import { useEffect, useRef, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import type { SliderValueChangeDetails } from "@ark-ui/react";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { Replay15Line, Forward15Line } from "@ndla/icons/action";
|
|
13
|
+
import { PlayFill, PauseLine, VolumeUpFill } from "@ndla/icons/common";
|
|
14
|
+
import { CheckLine } from "@ndla/icons/editor";
|
|
15
15
|
import {
|
|
16
16
|
Button,
|
|
17
17
|
IconButton,
|
|
@@ -234,10 +234,10 @@ const Controls = ({ src, title }: Props) => {
|
|
|
234
234
|
aria-label={t("audio.controls.rewind15sec")}
|
|
235
235
|
onClick={() => onSeekSeconds(-15)}
|
|
236
236
|
>
|
|
237
|
-
<
|
|
237
|
+
<Replay15Line />
|
|
238
238
|
</Back15SecButton>
|
|
239
239
|
<PlayButton aria-label={t(playing ? t("audio.pause") : t("audio.play"))} variant="primary" onClick={togglePlay}>
|
|
240
|
-
{playing ? <
|
|
240
|
+
{playing ? <PauseLine /> : <PlayFill />}
|
|
241
241
|
</PlayButton>
|
|
242
242
|
<Forward15SecButton
|
|
243
243
|
variant="tertiary"
|
|
@@ -245,7 +245,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
245
245
|
aria-label={t("audio.controls.forward15sec")}
|
|
246
246
|
onClick={() => onSeekSeconds(15)}
|
|
247
247
|
>
|
|
248
|
-
<
|
|
248
|
+
<Forward15Line />
|
|
249
249
|
</Forward15SecButton>
|
|
250
250
|
<ProgressWrapper>
|
|
251
251
|
<Text textStyle="label.medium" asChild consumeCss>
|
|
@@ -301,7 +301,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
301
301
|
<SelectItem key={speed} item={speed}>
|
|
302
302
|
<SelectItemText>{speed}x</SelectItemText>
|
|
303
303
|
<SelectItemIndicator>
|
|
304
|
-
<
|
|
304
|
+
<CheckLine />
|
|
305
305
|
</SelectItemIndicator>
|
|
306
306
|
</SelectItem>
|
|
307
307
|
))}
|
|
@@ -311,7 +311,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
311
311
|
<PopoverRoot positioning={{ placement: "top" }}>
|
|
312
312
|
<PopoverTrigger asChild>
|
|
313
313
|
<VolumeButton variant="tertiary" aria-label={t("audio.controls.adjustVolume")}>
|
|
314
|
-
<
|
|
314
|
+
<VolumeUpFill />
|
|
315
315
|
</VolumeButton>
|
|
316
316
|
</PopoverTrigger>
|
|
317
317
|
<PopoverContent>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { useRef } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
11
|
+
import { VolumeUpFill } from "@ndla/icons/common";
|
|
12
12
|
import { TooltipRoot, TooltipTrigger, TooltipContent, IconButton } from "@ndla/primitives";
|
|
13
13
|
|
|
14
14
|
type Props = {
|
|
@@ -38,7 +38,7 @@ const SpeechControl = ({ src, title, type = "audio" }: Props) => {
|
|
|
38
38
|
<TooltipRoot>
|
|
39
39
|
<TooltipTrigger asChild>
|
|
40
40
|
<IconButton variant="tertiary" aria-label={t(`${type}.play`)} onClick={togglePlay}>
|
|
41
|
-
<
|
|
41
|
+
<VolumeUpFill />
|
|
42
42
|
</IconButton>
|
|
43
43
|
</TooltipTrigger>
|
|
44
44
|
<TooltipContent>{t(`${type}.play`)}</TooltipContent>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { useRef, useImperativeHandle, ReactNode, forwardRef } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { ArrowRightShortLine } from "@ndla/icons/common";
|
|
11
11
|
import { SafeLink } from "@ndla/safelink";
|
|
12
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
|
|
@@ -67,7 +67,7 @@ const BreadcrumbItem = forwardRef<any, Props>(({ renderItem, renderSeparator, it
|
|
|
67
67
|
<span>{name}</span>
|
|
68
68
|
</SafeLink>
|
|
69
69
|
)}
|
|
70
|
-
{renderSeparator ? renderSeparator(item, totalCount) : !isLast && <
|
|
70
|
+
{renderSeparator ? renderSeparator(item, totalCount) : !isLast && <ArrowRightShortLine />}
|
|
71
71
|
</StyledListItem>
|
|
72
72
|
);
|
|
73
73
|
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { ArrowRightShortLine, HomeFill } from "@ndla/icons/common";
|
|
10
10
|
import { SafeLink } from "@ndla/safelink";
|
|
11
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
12
12
|
import Breadcrumb from "./Breadcrumb";
|
|
@@ -25,7 +25,7 @@ const StyledSafeLink = styled(SafeLink, {
|
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const StyledArrowRight = styled(ArrowRightShortLine, {
|
|
29
29
|
base: {
|
|
30
30
|
tabletDown: {
|
|
31
31
|
display: "none",
|
|
@@ -51,7 +51,7 @@ const HomeBreadcrumb = ({ items }: Props) => {
|
|
|
51
51
|
if (item.index === 0 && typeof item.name === "string") {
|
|
52
52
|
return (
|
|
53
53
|
<IconSafeLink aria-label={item.name} to={item.to}>
|
|
54
|
-
<
|
|
54
|
+
<HomeFill title={item.name} />
|
|
55
55
|
</IconSafeLink>
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -63,9 +63,9 @@ const HomeBreadcrumb = ({ items }: Props) => {
|
|
|
63
63
|
return null;
|
|
64
64
|
}
|
|
65
65
|
if (item.index === 0) {
|
|
66
|
-
return <
|
|
66
|
+
return <StyledArrowRight />;
|
|
67
67
|
}
|
|
68
|
-
return <
|
|
68
|
+
return <ArrowRightShortLine />;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
return <Breadcrumb items={items} renderItem={renderItem} renderSeparator={renderSeparator} />;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import parse from "html-react-parser";
|
|
10
10
|
import { ReactNode } from "react";
|
|
11
|
-
import {
|
|
11
|
+
import { ArrowRightLine } from "@ndla/icons/common";
|
|
12
12
|
import { Text } from "@ndla/primitives";
|
|
13
13
|
import { SafeLink } from "@ndla/safelink";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -136,7 +136,7 @@ const CampaignBlock = ({
|
|
|
136
136
|
<MaybeLinkText url={url.url} path={path}>
|
|
137
137
|
<LinkText textStyle="body.medium">
|
|
138
138
|
{parse(url.text ?? "")}
|
|
139
|
-
<
|
|
139
|
+
<ArrowRightLine />
|
|
140
140
|
</LinkText>
|
|
141
141
|
</MaybeLinkText>
|
|
142
142
|
)}
|
|
@@ -9,19 +9,10 @@
|
|
|
9
9
|
import { CSSProperties, ComponentPropsWithoutRef, useMemo } from "react";
|
|
10
10
|
|
|
11
11
|
import { colors } from "@ndla/core";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
ExternalLearningResource,
|
|
17
|
-
LearningPath,
|
|
18
|
-
MultidisciplinaryTopic,
|
|
19
|
-
SharedResource,
|
|
20
|
-
Subject,
|
|
21
|
-
SubjectMaterial,
|
|
22
|
-
TasksAndActivities,
|
|
23
|
-
} from "@ndla/icons/contentType";
|
|
24
|
-
import { Concept, Media, Video } from "@ndla/icons/editor";
|
|
12
|
+
import { BookmarkLine, SubtractLine } from "@ndla/icons/action";
|
|
13
|
+
import { BookReadFill, ShareFill, VoicePrintLine } from "@ndla/icons/common";
|
|
14
|
+
import { MenuSearchLine, LearningPath, SharedResource, TasksAndActivities } from "@ndla/icons/contentType";
|
|
15
|
+
import { ChatLine, FileListLine, LinkMedium, ImageLine, MovieLine } from "@ndla/icons/editor";
|
|
25
16
|
import { styled } from "@ndla/styled-system/jsx";
|
|
26
17
|
|
|
27
18
|
import * as contentTypes from "../model/ContentType";
|
|
@@ -106,7 +97,7 @@ const StyledContentTypeBadge = styled("div", {
|
|
|
106
97
|
|
|
107
98
|
const iconMap = {
|
|
108
99
|
[contentTypes.SUBJECT_MATERIAL]: {
|
|
109
|
-
icon:
|
|
100
|
+
icon: FileListLine,
|
|
110
101
|
iconColor: colors.subjectMaterial.dark,
|
|
111
102
|
backgroundColor: colors.subjectMaterial.light,
|
|
112
103
|
},
|
|
@@ -116,12 +107,12 @@ const iconMap = {
|
|
|
116
107
|
backgroundColor: colors.tasksAndActivities.light,
|
|
117
108
|
},
|
|
118
109
|
[contentTypes.ASSESSMENT_RESOURCES]: {
|
|
119
|
-
icon:
|
|
110
|
+
icon: MenuSearchLine,
|
|
120
111
|
iconColor: colors.assessmentResource.dark,
|
|
121
112
|
backgroundColor: colors.assessmentResource.light,
|
|
122
113
|
},
|
|
123
114
|
[contentTypes.SUBJECT]: {
|
|
124
|
-
icon:
|
|
115
|
+
icon: BookReadFill,
|
|
125
116
|
iconColor: colors.subject.dark,
|
|
126
117
|
backgroundColor: colors.subject.light,
|
|
127
118
|
},
|
|
@@ -136,41 +127,41 @@ const iconMap = {
|
|
|
136
127
|
backgroundColor: colors.learningPath.light,
|
|
137
128
|
},
|
|
138
129
|
[contentTypes.TOPIC]: {
|
|
139
|
-
icon:
|
|
130
|
+
icon: BookmarkLine,
|
|
140
131
|
iconColor: colors.subject.dark,
|
|
141
132
|
backgroundColor: colors.subject.light,
|
|
142
133
|
},
|
|
143
134
|
[contentTypes.MULTIDISCIPLINARY_TOPIC]: {
|
|
144
|
-
icon:
|
|
135
|
+
icon: ShareFill,
|
|
145
136
|
backgroundColor: "#b9b37b",
|
|
146
137
|
},
|
|
147
138
|
[contentTypes.CONCEPT]: {
|
|
148
|
-
icon:
|
|
139
|
+
icon: ChatLine,
|
|
149
140
|
iconColor: colors.concept.text,
|
|
150
141
|
backgroundColor: colors.concept.light,
|
|
151
142
|
},
|
|
152
143
|
[contentTypes.EXTERNAL]: {
|
|
153
|
-
icon:
|
|
144
|
+
icon: LinkMedium,
|
|
154
145
|
iconColor: colors.external.dark,
|
|
155
146
|
backgroundColor: colors.external.light,
|
|
156
147
|
},
|
|
157
148
|
[contentTypes.resourceEmbedTypeMapping.image]: {
|
|
158
|
-
icon:
|
|
149
|
+
icon: ImageLine,
|
|
159
150
|
iconColor: colors.brand.grey,
|
|
160
151
|
backgroundColor: colors.brand.greyLight,
|
|
161
152
|
},
|
|
162
153
|
[contentTypes.resourceEmbedTypeMapping.audio]: {
|
|
163
|
-
icon:
|
|
154
|
+
icon: VoicePrintLine,
|
|
164
155
|
iconColor: colors.brand.grey,
|
|
165
156
|
backgroundColor: colors.brand.greyLight,
|
|
166
157
|
},
|
|
167
158
|
[contentTypes.resourceEmbedTypeMapping.video]: {
|
|
168
|
-
icon:
|
|
159
|
+
icon: MovieLine,
|
|
169
160
|
iconColor: colors.brand.grey,
|
|
170
161
|
backgroundColor: colors.brand.greyLight,
|
|
171
162
|
},
|
|
172
163
|
[contentTypes.MISSING]: {
|
|
173
|
-
icon:
|
|
164
|
+
icon: SubtractLine,
|
|
174
165
|
iconColor: colors.brand.grey,
|
|
175
166
|
backgroundColor: colors.brand.greyLight,
|
|
176
167
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
11
|
-
import {
|
|
11
|
+
import { MovieLine } from "@ndla/icons/editor";
|
|
12
12
|
import { HStack, styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
import { ContentTypeBadge } from "./ContentTypeBadgeNew";
|
|
14
14
|
|
|
@@ -63,7 +63,7 @@ export const ContentOverride: StoryFn<typeof ContentTypeBadge> = () => {
|
|
|
63
63
|
const { t } = useTranslation();
|
|
64
64
|
return (
|
|
65
65
|
<StyledContentTypeBadge contentType="video">
|
|
66
|
-
<
|
|
66
|
+
<MovieLine size="small" />
|
|
67
67
|
{t("contentTypes.video")}
|
|
68
68
|
</StyledContentTypeBadge>
|
|
69
69
|
);
|
|
@@ -10,7 +10,7 @@ import { ReactNode, useCallback, useEffect, useMemo, useState } from "react";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
12
|
import { colors, stackOrder } from "@ndla/core";
|
|
13
|
-
import {
|
|
13
|
+
import { LinkMedium } from "@ndla/icons/editor";
|
|
14
14
|
import { copyTextToClipboard } from "@ndla/util";
|
|
15
15
|
|
|
16
16
|
const ContainerDiv = styled.div`
|
|
@@ -77,7 +77,7 @@ const CopyParagraphButton = ({ children, copyText, lang }: Props) => {
|
|
|
77
77
|
return (
|
|
78
78
|
<ContainerDiv data-embed-type="copy-heading">
|
|
79
79
|
<IconButton data-copy-button="" onClick={onCopyClick} title={tooltip} aria-label={`${tooltip}: ${copyText}`}>
|
|
80
|
-
<
|
|
80
|
+
<LinkMedium />
|
|
81
81
|
</IconButton>
|
|
82
82
|
<h2 id={sanitizedTitle} tabIndex={-1} lang={lang}>
|
|
83
83
|
{children}
|
package/src/Embed/CodeEmbed.tsx
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
import { useEffect, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { FileCopyLine } from "@ndla/icons/action";
|
|
12
|
+
import { CheckLine } from "@ndla/icons/editor";
|
|
13
13
|
import { Button, Figure } from "@ndla/primitives";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
15
15
|
import { CodeMetaData } from "@ndla/types-embed";
|
|
@@ -75,7 +75,7 @@ const CodeEmbed = ({ embed }: Props) => {
|
|
|
75
75
|
setIsCopied(true);
|
|
76
76
|
}}
|
|
77
77
|
>
|
|
78
|
-
{isCopied ? <
|
|
78
|
+
{isCopied ? <CheckLine /> : <FileCopyLine />}
|
|
79
79
|
{isCopied ? t("codeBlock.copiedCode") : t("codeBlock.copyCode")}
|
|
80
80
|
</Button>
|
|
81
81
|
</StyledFigure>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { AlertLine } from "@ndla/icons/common";
|
|
11
11
|
import { Figure, type FigureFloat, type FigureSize } from "@ndla/primitives";
|
|
12
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
import { EmbedByline } from "../LicenseByline";
|
|
@@ -51,7 +51,7 @@ const EmbedErrorPlaceholder = ({ type, children, figureType, float }: Props) =>
|
|
|
51
51
|
<StyledFigure size={figureType} float={float} data-embed-type={type}>
|
|
52
52
|
{children ?? (
|
|
53
53
|
<ErrorPlaceholder data-embed-type={type}>
|
|
54
|
-
<
|
|
54
|
+
<AlertLine />
|
|
55
55
|
</ErrorPlaceholder>
|
|
56
56
|
)}
|
|
57
57
|
<EmbedByline error type={type} />
|
package/src/Embed/ImageEmbed.tsx
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import parse from "html-react-parser";
|
|
10
10
|
import { ReactNode, useMemo, useState } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { AddLine } from "@ndla/icons/action";
|
|
13
|
+
import { ArrowDownShortLine, ArrowUpShortLine } from "@ndla/icons/common";
|
|
14
14
|
import { Figure, FigureSize, FigureVariantProps, Image } from "@ndla/primitives";
|
|
15
15
|
import { styled } from "@ndla/styled-system/jsx";
|
|
16
16
|
import { ImageEmbedData, ImageMetaData } from "@ndla/types-embed";
|
|
@@ -273,7 +273,7 @@ const ImageEmbed = ({ embed, previewAlt, lang, renderContext = "article", childr
|
|
|
273
273
|
onClick={toggleImageSize}
|
|
274
274
|
data-expanded={!!imageSizes}
|
|
275
275
|
>
|
|
276
|
-
<
|
|
276
|
+
<AddLine />
|
|
277
277
|
</ExpandButton>
|
|
278
278
|
)}
|
|
279
279
|
{(embedData.size?.endsWith("-hide-byline") || embedData.hideByline === "true") && (
|
|
@@ -282,7 +282,7 @@ const ImageEmbed = ({ embed, previewAlt, lang, renderContext = "article", childr
|
|
|
282
282
|
aria-label={t(`license.images.itemImage.${isBylineHidden ? "expandByline" : "minimizeByline"}`)}
|
|
283
283
|
onClick={() => setIsBylineHidden((p) => !p)}
|
|
284
284
|
>
|
|
285
|
-
{isBylineHidden ? <
|
|
285
|
+
{isBylineHidden ? <ArrowDownShortLine /> : <ArrowUpShortLine />}
|
|
286
286
|
</BylineButton>
|
|
287
287
|
)}
|
|
288
288
|
</ImageWrapper>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
11
|
+
import { InformationLine } from "@ndla/icons/common";
|
|
12
12
|
import { MessageBox } from "@ndla/primitives";
|
|
13
13
|
import { SafeLink } from "@ndla/safelink";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -52,7 +52,7 @@ const UuDisclaimerEmbed = ({ embed, children }: Props) => {
|
|
|
52
52
|
return (
|
|
53
53
|
<div role="region" data-embed-type="uu-disclaimer">
|
|
54
54
|
<StyledMessageBox variant="warning" contentEditable={false}>
|
|
55
|
-
<
|
|
55
|
+
<InformationLine />
|
|
56
56
|
<Disclaimer>
|
|
57
57
|
{embedData.disclaimer}
|
|
58
58
|
{disclaimerLink}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
|
-
import {
|
|
10
|
+
import { PresentationLine, LoginBoxLine } from "@ndla/icons/common";
|
|
11
11
|
import { Button } from "@ndla/primitives";
|
|
12
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
import ErrorMessage from "./ErrorMessage";
|
|
@@ -32,12 +32,12 @@ const ErrorResourceAccessDenied = ({ onAuthenticateClick }: Props) => {
|
|
|
32
32
|
back: t("errorMessage.back"),
|
|
33
33
|
goToFrontPage: t("errorMessage.goToFrontPage"),
|
|
34
34
|
}}
|
|
35
|
-
illustrationElement={<
|
|
35
|
+
illustrationElement={<PresentationLine size="medium" />}
|
|
36
36
|
customElement={
|
|
37
37
|
<Button onClick={onAuthenticateClick}>
|
|
38
38
|
{t("user.buttonLogIn")}
|
|
39
39
|
<StyledLogInIconWrapper aria-hidden>
|
|
40
|
-
<
|
|
40
|
+
<LoginBoxLine size="medium" />
|
|
41
41
|
</StyledLogInIconWrapper>
|
|
42
42
|
</Button>
|
|
43
43
|
}
|
package/src/FactBox/FactBox.tsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ComponentProps, ReactNode, forwardRef, useCallback, useEffect, useId, useMemo, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
11
|
+
import { ArrowDownShortLine } from "@ndla/icons/common";
|
|
12
12
|
import { IconButton } from "@ndla/primitives";
|
|
13
13
|
import { styled } from "@ndla/styled-system/jsx";
|
|
14
14
|
|
|
@@ -141,7 +141,7 @@ const FactBox = forwardRef<HTMLElement, Props>(
|
|
|
141
141
|
aria-controls={contentId}
|
|
142
142
|
aria-label={t(`factbox.${state === "open" ? "close" : "open"}`)}
|
|
143
143
|
>
|
|
144
|
-
<
|
|
144
|
+
<ArrowDownShortLine />
|
|
145
145
|
</StyledIconButton>
|
|
146
146
|
<StyledContent id={contentId} data-state={state} aria-hidden={state === "closed"} {...inertAttribute}>
|
|
147
147
|
{children}
|
package/src/FileList/Format.tsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import styled from "@emotion/styled";
|
|
10
10
|
import { colors, spacing } from "@ndla/core";
|
|
11
|
-
import {
|
|
11
|
+
import { DownloadLine } from "@ndla/icons/common";
|
|
12
12
|
import { SafeLink } from "@ndla/safelink";
|
|
13
13
|
import { Text } from "@ndla/typography";
|
|
14
14
|
import { FileFormat } from "./File";
|
|
@@ -39,7 +39,7 @@ const FileLink = styled(SafeLink)`
|
|
|
39
39
|
overflow-wrap: anywhere;
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
|
-
const StyledDownload = styled(
|
|
42
|
+
const StyledDownload = styled(DownloadLine)`
|
|
43
43
|
margin-top: 3px;
|
|
44
44
|
flex-shrink: 0;
|
|
45
45
|
margin-right: ${spacing.small};
|
package/src/Gloss/Gloss.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { useMemo } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { AccordionItemTrigger } from "@ark-ui/react";
|
|
12
|
-
import {
|
|
12
|
+
import { ArrowDownShortLine } from "@ndla/icons/common";
|
|
13
13
|
import {
|
|
14
14
|
AccordionItem,
|
|
15
15
|
AccordionItemContent,
|
|
@@ -170,7 +170,7 @@ const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs, variant }: P
|
|
|
170
170
|
<AccordionItemTrigger asChild>
|
|
171
171
|
<IconButton variant="tertiary" aria-label={t("gloss.showExamples")} title={t("gloss.showExamples")}>
|
|
172
172
|
<AccordionItemIndicator asChild>
|
|
173
|
-
<
|
|
173
|
+
<ArrowDownShortLine size="medium" />
|
|
174
174
|
</AccordionItemIndicator>
|
|
175
175
|
</IconButton>
|
|
176
176
|
</AccordionItemTrigger>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ReactNode, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
-
import {
|
|
11
|
+
import { AlertLine } from "@ndla/icons/common";
|
|
12
12
|
import { getLicenseByAbbreviation, getLicenseCredits } from "@ndla/licenses";
|
|
13
13
|
import { Button, Text } from "@ndla/primitives";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -122,7 +122,7 @@ export const EmbedByline = ({ type, description, children, visibleAlt, ...props
|
|
|
122
122
|
return (
|
|
123
123
|
<ErrorBylineWrapper>
|
|
124
124
|
<ContentWrapper>
|
|
125
|
-
<
|
|
125
|
+
<AlertLine />
|
|
126
126
|
<BaseDescription>
|
|
127
127
|
<span>{t("embed.embedError", { type: typeString })}</span>
|
|
128
128
|
</BaseDescription>
|
|
@@ -10,7 +10,8 @@ import { format } from "date-fns";
|
|
|
10
10
|
import { enGB, nb, nn } from "date-fns/locale";
|
|
11
11
|
import parse from "html-react-parser";
|
|
12
12
|
import { useMemo } from "react";
|
|
13
|
-
import {
|
|
13
|
+
import { ArrowRightLine } from "@ndla/icons/common";
|
|
14
|
+
import { CalendarLine } from "@ndla/icons/editor";
|
|
14
15
|
import { Heading } from "@ndla/primitives";
|
|
15
16
|
import { SafeLink } from "@ndla/safelink";
|
|
16
17
|
import { styled } from "@ndla/styled-system/jsx";
|
|
@@ -63,7 +64,7 @@ const StyledDateContainer = styled("div", {
|
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
66
|
|
|
66
|
-
const StyledCalendarEd = styled(
|
|
67
|
+
const StyledCalendarEd = styled(CalendarLine, {
|
|
67
68
|
base: {
|
|
68
69
|
color: "icon.strong",
|
|
69
70
|
},
|
|
@@ -94,7 +95,7 @@ const LinkBlock = ({ title, articleLanguage, date, url, path }: Props) => {
|
|
|
94
95
|
</StyledDateContainer>
|
|
95
96
|
)}
|
|
96
97
|
</InfoWrapper>
|
|
97
|
-
<
|
|
98
|
+
<ArrowRightLine data-forward />
|
|
98
99
|
</StyledSafeLink>
|
|
99
100
|
);
|
|
100
101
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
|
-
import {
|
|
11
|
+
import { NotificationLine, PresentationLine, InformationLine, AlertLine } from "@ndla/icons/common";
|
|
12
12
|
import MessageBox from "./MessageBox";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
@@ -27,7 +27,7 @@ export const Default: StoryFn<typeof MessageBox> = ({ ...args }) => {
|
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
return (
|
|
29
29
|
<MessageBox {...args}>
|
|
30
|
-
<
|
|
30
|
+
<InformationLine />
|
|
31
31
|
{t("messageBoxInfo.noContent")}
|
|
32
32
|
</MessageBox>
|
|
33
33
|
);
|
|
@@ -37,7 +37,7 @@ export const WithoutCloseButton: StoryFn<typeof MessageBox> = () => {
|
|
|
37
37
|
const { t } = useTranslation();
|
|
38
38
|
return (
|
|
39
39
|
<MessageBox>
|
|
40
|
-
<
|
|
40
|
+
<InformationLine />
|
|
41
41
|
{t("messageBoxInfo.subjectOutdated")}
|
|
42
42
|
</MessageBox>
|
|
43
43
|
);
|
|
@@ -53,7 +53,7 @@ export const WithLinks: StoryFn<typeof MessageBox> = () => {
|
|
|
53
53
|
{ text: "link 3", href: "#" },
|
|
54
54
|
]}
|
|
55
55
|
>
|
|
56
|
-
<
|
|
56
|
+
<InformationLine />
|
|
57
57
|
{t("messageBoxInfo.newVersion")}
|
|
58
58
|
</MessageBox>
|
|
59
59
|
);
|
|
@@ -63,7 +63,7 @@ export const Ghost: StoryFn<typeof MessageBox> = () => {
|
|
|
63
63
|
const { t } = useTranslation();
|
|
64
64
|
return (
|
|
65
65
|
<MessageBox type="ghost">
|
|
66
|
-
<
|
|
66
|
+
<PresentationLine />
|
|
67
67
|
{t("messageBoxInfo.feide")}
|
|
68
68
|
</MessageBox>
|
|
69
69
|
);
|
|
@@ -73,7 +73,7 @@ export const Danger: StoryFn<typeof MessageBox> = () => {
|
|
|
73
73
|
const { t } = useTranslation();
|
|
74
74
|
return (
|
|
75
75
|
<MessageBox type="danger">
|
|
76
|
-
<
|
|
76
|
+
<AlertLine />
|
|
77
77
|
{t("messageBoxInfo.feide")}
|
|
78
78
|
</MessageBox>
|
|
79
79
|
);
|
|
@@ -83,7 +83,7 @@ export const WithCustomIcon: StoryFn<typeof MessageBox> = () => {
|
|
|
83
83
|
const { t } = useTranslation();
|
|
84
84
|
return (
|
|
85
85
|
<MessageBox type="danger">
|
|
86
|
-
<
|
|
86
|
+
<NotificationLine />
|
|
87
87
|
{t("messageBoxInfo.feide")}
|
|
88
88
|
</MessageBox>
|
|
89
89
|
);
|
|
@@ -11,8 +11,8 @@ import { useTranslation } from "react-i18next";
|
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
12
|
import { IconButtonV2 } from "@ndla/button";
|
|
13
13
|
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { CloseLine } from "@ndla/icons/action";
|
|
15
|
+
import { ArrowRightLine } from "@ndla/icons/common";
|
|
16
16
|
|
|
17
17
|
type MessageBoxType = "ghost" | "danger" | "info";
|
|
18
18
|
|
|
@@ -107,7 +107,7 @@ export const MessageBox = ({ type, children, links, showCloseButton, onClose, co
|
|
|
107
107
|
{links.map((x) => (
|
|
108
108
|
<Link href={x.href} key={x.href}>
|
|
109
109
|
<span>{x.text}</span>
|
|
110
|
-
<
|
|
110
|
+
<ArrowRightLine />
|
|
111
111
|
</Link>
|
|
112
112
|
))}
|
|
113
113
|
</LinkWrapper>
|
|
@@ -116,7 +116,7 @@ export const MessageBox = ({ type, children, links, showCloseButton, onClose, co
|
|
|
116
116
|
</InfoWrapper>
|
|
117
117
|
{showCloseButton && (
|
|
118
118
|
<StyledCloseButton variant="ghost" aria-label={t("close")} title={t("close")} onClick={onClose}>
|
|
119
|
-
<
|
|
119
|
+
<CloseLine />
|
|
120
120
|
</StyledCloseButton>
|
|
121
121
|
)}
|
|
122
122
|
</MessageBoxWrapper>
|