@ndla/ui 50.13.2 → 50.14.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/BlogPost/BlogPost.js +5 -5
- package/es/ContactBlock/ContactBlock.js +14 -22
- package/es/ContentTypeBadge/ContentTypeBadge.js +12 -7
- package/es/Embed/conceptComponents.js +11 -9
- package/es/Messages/MessageBanner.js +15 -6
- package/es/Messages/MessageBox.js +21 -21
- package/es/Navigation/NavigationBox.js +14 -14
- package/es/Resource/BlockResource.js +17 -8
- package/es/Resource/ListResource.js +17 -8
- package/es/Resource/resourceComponents.js +11 -11
- package/es/ResourceGroup/ResourceItem.js +25 -19
- package/es/SearchTypeResult/SearchFieldHeader.js +9 -7
- package/es/SearchTypeResult/components/ItemContexts.js +22 -16
- package/es/utils/resourceTypeColor.js +2 -0
- package/lib/BlogPost/BlogPost.js +5 -5
- package/lib/CompetenceGoalTab/styles.d.ts +5 -5
- package/lib/ContactBlock/ContactBlock.js +14 -22
- package/lib/ContentTypeBadge/ContentTypeBadge.js +11 -6
- package/lib/Embed/conceptComponents.js +11 -9
- package/lib/Hero/HeroContent.d.ts +1 -1
- package/lib/Messages/MessageBanner.js +14 -5
- package/lib/Messages/MessageBox.js +22 -20
- package/lib/NDLAFilm/filmStyles.d.ts +2 -2
- package/lib/Navigation/NavigationBox.js +14 -14
- package/lib/Resource/BlockResource.js +16 -7
- package/lib/Resource/ListResource.js +16 -7
- package/lib/Resource/resourceComponents.js +11 -11
- package/lib/ResourceGroup/ResourceItem.js +25 -19
- package/lib/Search/ActiveFilterContent.d.ts +1 -1
- package/lib/Search/ContentTypeResultStyles.d.ts +6 -6
- package/lib/SearchTypeResult/ActiveFilterContent.d.ts +1 -1
- package/lib/SearchTypeResult/SearchFieldHeader.js +9 -7
- package/lib/SearchTypeResult/components/ItemContexts.js +22 -16
- package/lib/TagSelector/MenuList.d.ts +1 -1
- package/lib/TagSelector/ValueButton.d.ts +1 -1
- package/lib/utils/resourceTypeColor.js +2 -0
- package/package.json +17 -17
- package/src/Article/ArticleByline.stories.tsx +0 -2
- package/src/AudioPlayer/AudiPlayer.stories.tsx +0 -2
- package/src/BlogPost/BlogPost.stories.tsx +0 -4
- package/src/BlogPost/BlogPost.tsx +1 -0
- package/src/Breadcrumb/Breadcrumb.stories.tsx +0 -2
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +0 -2
- package/src/CampaignBlock/CampaignBlock.stories.tsx +0 -4
- package/src/ContactBlock/ContactBlock.tsx +5 -1
- package/src/ContactBlock/Contactblock.stories.tsx +0 -4
- package/src/ContentLoader/ContentLoader.stories.tsx +0 -2
- package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +0 -2
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +6 -1
- package/src/CreatedBy/CreatedBy.stories.tsx +0 -2
- package/src/Embed/AudioEmbed.stories.tsx +0 -2
- package/src/Embed/BrightcoveEmbed.stories.tsx +0 -2
- package/src/Embed/ConceptEmbed.stories.tsx +0 -2
- package/src/Embed/ExternalEmbed.stories.tsx +0 -2
- package/src/Embed/FootnoteEmbed.stories.tsx +0 -2
- package/src/Embed/H5pEmbed.stories.tsx +0 -2
- package/src/Embed/IframeEmbed.stories.tsx +0 -2
- package/src/Embed/ImageEmbed.stories.tsx +0 -2
- package/src/Embed/RelatedContentEmbed.stories.tsx +0 -2
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +0 -2
- package/src/Embed/conceptComponents.tsx +17 -5
- package/src/ErrorMessage/ErrorMessage.stories.tsx +0 -2
- package/src/ExpandableBox/ExpandableBox.stories.tsx +0 -2
- package/src/FactBox/Factbox.stories.tsx +0 -2
- package/src/FileList/FileList.stories.tsx +0 -2
- package/src/Footer/Footer.stories.tsx +0 -2
- package/src/FramedContent/FramedContent.stories.tsx +0 -2
- package/src/Gloss/Gloss.stories.tsx +0 -4
- package/src/Grid/Grid.stories.tsx +0 -2
- package/src/Hero/Hero.stories.tsx +0 -2
- package/src/Image/Image.stories.tsx +0 -2
- package/src/KeyFigure/KeyFigure.stories.tsx +0 -2
- package/src/LanguageSelector/LanguageSelector.stories.tsx +0 -4
- package/src/LearningPaths/LearningPathMenu.stories.tsx +0 -2
- package/src/LetterFilter/LetterFilter.stories.tsx +0 -4
- package/src/LicenseByline/EmbedByline.stories.tsx +0 -4
- package/src/LinkBlock/LinkBlock.stories.tsx +0 -4
- package/src/List/OrderedList.stories.tsx +0 -2
- package/src/List/UnorderedList.stories.tsx +3 -0
- package/src/Logo/Logo.stories.tsx +0 -2
- package/src/Messages/MessageBanner.stories.tsx +0 -2
- package/src/Messages/MessageBanner.tsx +10 -3
- package/src/Messages/MessageBox.stories.tsx +0 -2
- package/src/Messages/MessageBox.tsx +14 -5
- package/src/MyNdla/Resource/Folder.stories.tsx +0 -4
- package/src/MyNdla/Resource/FolderInput.stories.tsx +0 -2
- package/src/Navigation/NavigationBox.tsx +1 -1
- package/src/ProgrammeCard/ProgrammeCard.stories.tsx +0 -4
- package/src/Resource/BlockResource.stories.tsx +8 -4
- package/src/Resource/BlockResource.tsx +22 -12
- package/src/Resource/ListResource.stories.tsx +8 -4
- package/src/Resource/ListResource.tsx +17 -4
- package/src/Resource/resourceComponents.tsx +4 -0
- package/src/ResourceGroup/ResourceItem.stories.tsx +0 -2
- package/src/ResourceGroup/ResourceItem.tsx +10 -2
- package/src/SearchTypeResult/SearchFieldHeader.tsx +5 -4
- package/src/SearchTypeResult/components/ItemContexts.tsx +11 -9
- package/src/SnackBar/Snack.stories.tsx +0 -2
- package/src/Table/Table.stories.tsx +0 -2
- package/src/TagSelector/TagSelector.stories.tsx +0 -2
- package/src/TreeStructure/TreeStructure.stories.tsx +0 -2
- package/src/utils/resourceTypeColor.tsx +2 -0
|
@@ -8,15 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import CampaignBlock from "./CampaignBlock";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "Components/Campaign Block",
|
|
15
14
|
component: CampaignBlock,
|
|
16
15
|
tags: ["autodocs"],
|
|
17
|
-
parameters: {
|
|
18
|
-
...defaultParameters,
|
|
19
|
-
},
|
|
20
16
|
args: {},
|
|
21
17
|
} as Meta<typeof CampaignBlock>;
|
|
22
18
|
|
|
@@ -120,6 +120,10 @@ const blobStyling = css`
|
|
|
120
120
|
width: 165px;
|
|
121
121
|
height: 180px;
|
|
122
122
|
transform: translate(10%, 0);
|
|
123
|
+
color: ${colors.support.redLight};
|
|
124
|
+
&[data-green="true"] {
|
|
125
|
+
color: ${colors.support.greenLight};
|
|
126
|
+
}
|
|
123
127
|
`;
|
|
124
128
|
const Email = styled.div`
|
|
125
129
|
white-space: nowrap;
|
|
@@ -199,7 +203,7 @@ const ContactBlock = ({
|
|
|
199
203
|
</StyledText>
|
|
200
204
|
</InfoWrapper>
|
|
201
205
|
<BlobWrapper>
|
|
202
|
-
<Blob css={blobStyling}
|
|
206
|
+
<Blob css={blobStyling} data-green={isGreenBlob} />
|
|
203
207
|
</BlobWrapper>
|
|
204
208
|
</TextWrapper>
|
|
205
209
|
<SummaryBlock>{description}</SummaryBlock>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn } from "@storybook/react";
|
|
10
10
|
import ContactBlock from "./ContactBlock";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "Components/Contact block",
|
|
@@ -80,9 +79,6 @@ export default {
|
|
|
80
79
|
blobColor: "green",
|
|
81
80
|
blob: "pointy",
|
|
82
81
|
},
|
|
83
|
-
parameters: {
|
|
84
|
-
...defaultParameters,
|
|
85
|
-
},
|
|
86
82
|
} as Meta<typeof ContactBlock>;
|
|
87
83
|
|
|
88
84
|
export const ContactBlockStory: StoryFn<typeof ContactBlock> = ({ ...args }) => {
|
|
@@ -8,14 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import ContentLoader from ".";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "Components/ContentLoader",
|
|
15
14
|
tags: ["autodocs"],
|
|
16
15
|
parameters: {
|
|
17
16
|
inlineStories: true,
|
|
18
|
-
...defaultParameters,
|
|
19
17
|
},
|
|
20
18
|
args: {
|
|
21
19
|
speed: 2,
|
|
@@ -10,7 +10,6 @@ import styled from "@emotion/styled";
|
|
|
10
10
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
11
11
|
import { spacing } from "@ndla/core";
|
|
12
12
|
import { ContentTypeBadge } from "./ContentTypeBadge";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
import * as contentTypes from "../model/ContentType";
|
|
15
14
|
|
|
16
15
|
export default {
|
|
@@ -18,7 +17,6 @@ export default {
|
|
|
18
17
|
tags: ["autodocs"],
|
|
19
18
|
parameters: {
|
|
20
19
|
inlineStories: true,
|
|
21
|
-
...defaultParameters,
|
|
22
20
|
},
|
|
23
21
|
args: {
|
|
24
22
|
size: "small",
|
|
@@ -11,7 +11,7 @@ import { CSSProperties, ComponentProps, useMemo } from "react";
|
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
13
|
import { breakpoints, colors, mq } from "@ndla/core";
|
|
14
|
-
import { MenuBook } from "@ndla/icons/action";
|
|
14
|
+
import { Minus, MenuBook } from "@ndla/icons/action";
|
|
15
15
|
import { Audio } from "@ndla/icons/common";
|
|
16
16
|
import {
|
|
17
17
|
AssessmentResource,
|
|
@@ -159,6 +159,11 @@ const iconMap = {
|
|
|
159
159
|
iconColor: colors.brand.grey,
|
|
160
160
|
backgroundColor: colors.brand.greyLight,
|
|
161
161
|
},
|
|
162
|
+
[contentTypes.MISSING]: {
|
|
163
|
+
icon: Minus,
|
|
164
|
+
iconColor: colors.brand.grey,
|
|
165
|
+
backgroundColor: colors.brand.greyLight,
|
|
166
|
+
},
|
|
162
167
|
} as const;
|
|
163
168
|
|
|
164
169
|
export const ContentTypeBadge = ({
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import CreatedBy from "./CreatedBy";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
/***
|
|
14
13
|
* LTI-versjoner av innhold fra NDLA skal vise denne teksten og logo i bunnen. "NDLA" og logoen lenker til ndla.no. "Artikkel" kan være en lenke til artikkelen på ndla.no om den fins. Begge lenker åpner som standard i ny fane men det kan overstyres med target-parameter.
|
|
@@ -19,7 +18,6 @@ export default {
|
|
|
19
18
|
tags: ["autodocs"],
|
|
20
19
|
parameters: {
|
|
21
20
|
inlineStories: true,
|
|
22
|
-
...defaultParameters,
|
|
23
21
|
},
|
|
24
22
|
args: {
|
|
25
23
|
name: "Artikkelen",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { AudioEmbedData, AudioMeta } from "@ndla/types-embed";
|
|
11
11
|
import AudioEmbed from "./AudioEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import StoryFavoriteButton from "../../../../stories/StoryFavoriteButton";
|
|
14
13
|
|
|
15
14
|
const embedData: AudioEmbedData = {
|
|
@@ -198,7 +197,6 @@ const meta: Meta<typeof AudioEmbed> = {
|
|
|
198
197
|
</div>
|
|
199
198
|
),
|
|
200
199
|
],
|
|
201
|
-
parameters: defaultParameters,
|
|
202
200
|
};
|
|
203
201
|
|
|
204
202
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { BrightcoveData, BrightcoveEmbedData, BrightcoveMetaData } from "@ndla/types-embed";
|
|
11
11
|
import BrightcoveEmbed from "./BrightcoveEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import StoryFavoriteButton from "../../../../stories/StoryFavoriteButton";
|
|
14
13
|
|
|
15
14
|
const embedData: BrightcoveEmbedData = {
|
|
@@ -171,7 +170,6 @@ const meta: Meta<typeof BrightcoveEmbed> = {
|
|
|
171
170
|
</div>
|
|
172
171
|
),
|
|
173
172
|
],
|
|
174
|
-
parameters: defaultParameters,
|
|
175
173
|
};
|
|
176
174
|
|
|
177
175
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { ConceptData, ConceptEmbedData } from "@ndla/types-embed";
|
|
11
11
|
import ConceptEmbed from "./ConceptEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import StoryFavoriteButton from "../../../../stories/StoryFavoriteButton";
|
|
14
13
|
|
|
15
14
|
const blockEmbedData: ConceptEmbedData = {
|
|
@@ -243,7 +242,6 @@ const meta: Meta<typeof ConceptEmbed> = {
|
|
|
243
242
|
</div>
|
|
244
243
|
),
|
|
245
244
|
],
|
|
246
|
-
parameters: defaultParameters,
|
|
247
245
|
};
|
|
248
246
|
|
|
249
247
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { OembedEmbedData, OembedData } from "@ndla/types-embed";
|
|
11
11
|
import ExternalEmbed from "./ExternalEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
const embedData: OembedEmbedData = {
|
|
15
14
|
resource: "external",
|
|
@@ -65,7 +64,6 @@ const meta: Meta<typeof ExternalEmbed> = {
|
|
|
65
64
|
</div>
|
|
66
65
|
),
|
|
67
66
|
],
|
|
68
|
-
parameters: defaultParameters,
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
10
10
|
import { FootnoteData, FootnoteEmbedData } from "@ndla/types-embed";
|
|
11
11
|
import FootnoteEmbed from "./FootnoteEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import { ArticleByline } from "../Article";
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -25,7 +24,6 @@ export default {
|
|
|
25
24
|
component: FootnoteEmbed,
|
|
26
25
|
parameters: {
|
|
27
26
|
inlineStories: true,
|
|
28
|
-
...defaultParameters,
|
|
29
27
|
},
|
|
30
28
|
args: {
|
|
31
29
|
embed: {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { H5pEmbedData, H5pData } from "@ndla/types-embed";
|
|
11
11
|
import H5pEmbed from "./H5pEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
const embedData: H5pEmbedData = {
|
|
15
14
|
resource: "h5p",
|
|
@@ -62,7 +61,6 @@ const meta: Meta<typeof H5pEmbed> = {
|
|
|
62
61
|
</div>
|
|
63
62
|
),
|
|
64
63
|
],
|
|
65
|
-
parameters: defaultParameters,
|
|
66
64
|
};
|
|
67
65
|
|
|
68
66
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { IframeData, IframeEmbedData } from "@ndla/types-embed";
|
|
11
11
|
import IframeEmbed from "./IframeEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
const embedData: IframeEmbedData = {
|
|
15
14
|
width: "708px",
|
|
@@ -37,7 +36,6 @@ const meta: Meta<typeof IframeEmbed> = {
|
|
|
37
36
|
</div>
|
|
38
37
|
),
|
|
39
38
|
],
|
|
40
|
-
parameters: defaultParameters,
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
export default meta;
|
|
@@ -11,7 +11,6 @@ import { Meta, StoryObj } from "@storybook/react";
|
|
|
11
11
|
import { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
|
|
12
12
|
import { ImageEmbedData } from "@ndla/types-embed";
|
|
13
13
|
import ImageEmbed from "./ImageEmbed";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
import StoryFavoriteButton from "../../../../stories/StoryFavoriteButton";
|
|
16
15
|
|
|
17
16
|
const embedData: ImageEmbedData = {
|
|
@@ -104,7 +103,6 @@ const meta: Meta<typeof ImageEmbed> = {
|
|
|
104
103
|
</div>
|
|
105
104
|
),
|
|
106
105
|
],
|
|
107
|
-
parameters: defaultParameters,
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
export default meta;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { RelatedContentMetaData } from "@ndla/types-embed";
|
|
11
11
|
import RelatedContentEmbed from "./RelatedContentEmbed";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import RelatedArticleList from "../RelatedArticleList";
|
|
14
13
|
|
|
15
14
|
const filmResourceMeta: RelatedContentMetaData = {
|
|
@@ -377,7 +376,6 @@ const meta: Meta<typeof RelatedContentEmbed> = {
|
|
|
377
376
|
</div>
|
|
378
377
|
),
|
|
379
378
|
],
|
|
380
|
-
parameters: defaultParameters,
|
|
381
379
|
};
|
|
382
380
|
|
|
383
381
|
export default meta;
|
|
@@ -11,7 +11,6 @@ import { UuDisclaimerEmbedData } from "@ndla/types-embed";
|
|
|
11
11
|
import H5pEmbed from "./H5pEmbed";
|
|
12
12
|
import IframeEmbed from "./IframeEmbed";
|
|
13
13
|
import UuDisclaimerEmbed from "./UuDisclaimerEmbed";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
import FactBox from "../FactBox";
|
|
16
15
|
import FramedContent from "../FramedContent";
|
|
17
16
|
|
|
@@ -38,7 +37,6 @@ const meta: Meta<typeof UuDisclaimerEmbed> = {
|
|
|
38
37
|
</div>
|
|
39
38
|
),
|
|
40
39
|
],
|
|
41
|
-
parameters: defaultParameters,
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
export default meta;
|
|
@@ -113,20 +113,32 @@ const NotionHeader = styled.div`
|
|
|
113
113
|
border-bottom: 2px solid ${colors.brand.tertiary};
|
|
114
114
|
padding-bottom: ${spacing.small};
|
|
115
115
|
h1 {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
flex-wrap: wrap;
|
|
116
119
|
flex-grow: 1;
|
|
117
120
|
margin: 0;
|
|
118
121
|
font-weight: ${fonts.weight.bold};
|
|
119
122
|
${fonts.sizes("22px", 1.2)};
|
|
120
123
|
}
|
|
121
124
|
small {
|
|
122
|
-
|
|
123
|
-
border-left: 1px solid ${colors.brand.greyLight};
|
|
124
|
-
padding-left: ${spacing.small};
|
|
125
|
-
margin-left: ${spacing.xsmall};
|
|
126
|
-
}
|
|
125
|
+
display: flex;
|
|
127
126
|
${fonts.sizes("20px", 1.2)};
|
|
128
127
|
font-weight: ${fonts.weight.normal};
|
|
129
128
|
}
|
|
129
|
+
${mq.range({ from: breakpoints.mobileWide })} {
|
|
130
|
+
&[data-is-concept="true"] {
|
|
131
|
+
small:before {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-self: center;
|
|
134
|
+
margin: 0 ${spacing.xsmall};
|
|
135
|
+
content: "";
|
|
136
|
+
height: ${spacing.normal};
|
|
137
|
+
width: 1px;
|
|
138
|
+
background-color: ${colors.brand.greyLight};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
130
142
|
&[data-is-concept="false"] {
|
|
131
143
|
margin-bottom: ${spacing.large};
|
|
132
144
|
}
|
|
@@ -10,7 +10,6 @@ import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
|
10
10
|
import ErrorMessage from "./ErrorMessage";
|
|
11
11
|
//@ts-ignore
|
|
12
12
|
import Oops from "../../../../images/oops.gif";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Feilmeldingskomponenten lenker tilbake til forrige side eller til forsiden. Den brukes når det har oppstått en feil i systemet, f.eks. ved 404- eller 503-feil.
|
|
@@ -21,7 +20,6 @@ export default {
|
|
|
21
20
|
tags: ["autodocs"],
|
|
22
21
|
parameters: {
|
|
23
22
|
inlineStories: true,
|
|
24
|
-
...defaultParameters,
|
|
25
23
|
},
|
|
26
24
|
args: {
|
|
27
25
|
illustration: {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
10
10
|
import { ExpandableBox, ExpandableBoxSummary } from "./ExpandableBox";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* This is just a thin wrapper around the native HTML details element.
|
|
@@ -20,7 +19,6 @@ export default {
|
|
|
20
19
|
tags: ["autodocs"],
|
|
21
20
|
parameters: {
|
|
22
21
|
inlineStories: true,
|
|
23
|
-
...defaultParameters,
|
|
24
22
|
},
|
|
25
23
|
component: ExpandableBox,
|
|
26
24
|
render: (args) => (
|
|
@@ -11,7 +11,6 @@ import { Meta, StoryObj } from "@storybook/react";
|
|
|
11
11
|
import { spacing } from "@ndla/core";
|
|
12
12
|
import { Heading, Text } from "@ndla/typography";
|
|
13
13
|
import FactBox from "./FactBox";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
|
|
16
15
|
const Wrapper = styled.div`
|
|
17
16
|
padding: ${spacing.normal};
|
|
@@ -26,7 +25,6 @@ export default {
|
|
|
26
25
|
tags: ["autodocs"],
|
|
27
26
|
paramemeters: {
|
|
28
27
|
inlineStories: true,
|
|
29
|
-
...defaultParameters,
|
|
30
28
|
},
|
|
31
29
|
decorators: [
|
|
32
30
|
(Story) => (
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import File from "./File";
|
|
11
11
|
import FileList from "./FileList";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
14
|
title: "Components/FileList",
|
|
@@ -17,7 +16,6 @@ export default {
|
|
|
17
16
|
component: File,
|
|
18
17
|
parameters: {
|
|
19
18
|
inlineStories: true,
|
|
20
|
-
...defaultParameters,
|
|
21
19
|
},
|
|
22
20
|
args: {
|
|
23
21
|
title: "Min fil",
|
|
@@ -11,7 +11,6 @@ import { EmailOutline, Facebook, Instagram, LinkedIn, Share, Youtube } from "@nd
|
|
|
11
11
|
import { EditorName } from "./EditorName";
|
|
12
12
|
import Footer from "./Footer";
|
|
13
13
|
import { FooterText } from "./FooterText";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
|
|
16
15
|
const mockCommonLinks = [
|
|
17
16
|
{
|
|
@@ -85,7 +84,6 @@ export default {
|
|
|
85
84
|
component: Footer,
|
|
86
85
|
parameters: {
|
|
87
86
|
inlineStories: true,
|
|
88
|
-
...defaultParameters,
|
|
89
87
|
},
|
|
90
88
|
|
|
91
89
|
args: {
|
|
@@ -10,7 +10,6 @@ import { Meta, StoryObj } from "@storybook/react";
|
|
|
10
10
|
import { CopyrightMetaData } from "@ndla/types-embed";
|
|
11
11
|
import FramedContent from "./FramedContent";
|
|
12
12
|
import FigureImage from "../../../../stories/article/FigureImage";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
import { CopyrightEmbed } from "../Embed";
|
|
15
14
|
|
|
16
15
|
export default {
|
|
@@ -19,7 +18,6 @@ export default {
|
|
|
19
18
|
tags: ["autodocs"],
|
|
20
19
|
parameters: {
|
|
21
20
|
inlineStories: true,
|
|
22
|
-
...defaultParameters,
|
|
23
21
|
},
|
|
24
22
|
args: {
|
|
25
23
|
children: <p>Content!</p>,
|
|
@@ -9,16 +9,12 @@
|
|
|
9
9
|
import { Meta, StoryObj, StoryFn } from "@storybook/react";
|
|
10
10
|
import Gloss from "./Gloss";
|
|
11
11
|
import GlossExample from "./GlossExample";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
import { wordClass } from "../model/WordClass";
|
|
14
13
|
|
|
15
14
|
const meta: Meta<typeof Gloss> = {
|
|
16
15
|
title: "Components/Gloss",
|
|
17
16
|
component: Gloss,
|
|
18
17
|
tags: ["autodocs"],
|
|
19
|
-
parameters: {
|
|
20
|
-
...defaultParameters,
|
|
21
|
-
},
|
|
22
18
|
args: {
|
|
23
19
|
title: {
|
|
24
20
|
title: "Å angripe",
|
|
@@ -11,7 +11,6 @@ import { DocsContainer, DocsContainerProps } from "@storybook/addon-docs";
|
|
|
11
11
|
import { Meta, StoryFn } from "@storybook/react";
|
|
12
12
|
import { colors } from "@ndla/core";
|
|
13
13
|
import Grid from "./Grid";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
import { BlogPostStory } from "../BlogPost/BlogPost.stories";
|
|
16
15
|
import { KeyFigureStory } from "../KeyFigure/KeyFigure.stories";
|
|
17
16
|
|
|
@@ -32,7 +31,6 @@ export default {
|
|
|
32
31
|
component: Grid,
|
|
33
32
|
tags: ["autodocs"],
|
|
34
33
|
parameters: {
|
|
35
|
-
...defaultParameters,
|
|
36
34
|
layout: "centered",
|
|
37
35
|
docs: {
|
|
38
36
|
container: GridDocsContainer,
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import styled from "@emotion/styled";
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
11
|
import { Hero } from "./Hero";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
const StyledDiv = styled.div`
|
|
15
14
|
width: 1000px;
|
|
@@ -20,7 +19,6 @@ export default {
|
|
|
20
19
|
component: Hero,
|
|
21
20
|
tags: ["autodocs"],
|
|
22
21
|
parameters: {
|
|
23
|
-
...defaultParameters,
|
|
24
22
|
layout: "centered",
|
|
25
23
|
},
|
|
26
24
|
args: {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import Image from "./Image";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "Components/Image",
|
|
@@ -16,7 +15,6 @@ export default {
|
|
|
16
15
|
component: Image,
|
|
17
16
|
parameters: {
|
|
18
17
|
inlineStories: true,
|
|
19
|
-
...defaultParameters,
|
|
20
18
|
},
|
|
21
19
|
args: {
|
|
22
20
|
alt: "Mann med maske",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn } from "@storybook/react";
|
|
10
10
|
import KeyFigure from "./KeyFigure";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
const args = {
|
|
13
12
|
title: "<i>500</i>",
|
|
14
13
|
subtitle: `<span lang="nn">TVERRFAGLEGE</span> RESSURSER`,
|
|
@@ -23,7 +22,6 @@ export default {
|
|
|
23
22
|
component: KeyFigure,
|
|
24
23
|
tags: ["autodocs"],
|
|
25
24
|
parameters: {
|
|
26
|
-
...defaultParameters,
|
|
27
25
|
layout: "centered",
|
|
28
26
|
},
|
|
29
27
|
args: args,
|
|
@@ -10,14 +10,10 @@ import styled from "@emotion/styled";
|
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
11
|
import { colors, spacing } from "@ndla/core";
|
|
12
12
|
import { LanguageSelector } from "@ndla/ui";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
export default {
|
|
15
14
|
title: "Components/LanguageSelector",
|
|
16
15
|
tags: ["autodocs"],
|
|
17
16
|
component: LanguageSelector,
|
|
18
|
-
parameters: {
|
|
19
|
-
...defaultParameters,
|
|
20
|
-
},
|
|
21
17
|
args: {
|
|
22
18
|
locales: ["en", "nb", "nn"],
|
|
23
19
|
inverted: false,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn } from "@storybook/react";
|
|
10
10
|
import LearningPathMenu from "./LearningPathMenu";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
import { contentTypes } from "../model/ContentType";
|
|
13
12
|
const args = {
|
|
14
13
|
name: "Læringssti",
|
|
@@ -53,7 +52,6 @@ export default {
|
|
|
53
52
|
component: LearningPathMenu,
|
|
54
53
|
tags: ["autodocs"],
|
|
55
54
|
parameters: {
|
|
56
|
-
...defaultParameters,
|
|
57
55
|
layout: "centered",
|
|
58
56
|
},
|
|
59
57
|
args: args,
|
|
@@ -9,15 +9,11 @@
|
|
|
9
9
|
import { useArgs } from "@storybook/preview-api";
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
11
|
import LetterFilter from "./LetterFilter";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
14
|
title: "Components/LetterFilter",
|
|
16
15
|
component: LetterFilter,
|
|
17
16
|
tags: ["autodocs"],
|
|
18
|
-
parameters: {
|
|
19
|
-
...defaultParameters,
|
|
20
|
-
},
|
|
21
17
|
args: {
|
|
22
18
|
enabledLetters: ["a", "c"],
|
|
23
19
|
onChange: (value?: string) => {},
|
|
@@ -13,7 +13,6 @@ import { breakpoints, mq, spacing } from "@ndla/core";
|
|
|
13
13
|
import { HeartOutline } from "@ndla/icons/action";
|
|
14
14
|
import { Switch } from "@ndla/switch";
|
|
15
15
|
import EmbedByline from "./EmbedByline";
|
|
16
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
17
16
|
|
|
18
17
|
const ButtonWrapper = styled.div`
|
|
19
18
|
display: flex;
|
|
@@ -30,9 +29,6 @@ export default {
|
|
|
30
29
|
title: "Components/EmbedByline",
|
|
31
30
|
component: EmbedByline,
|
|
32
31
|
tags: ["autodocs"],
|
|
33
|
-
parameters: {
|
|
34
|
-
...defaultParameters,
|
|
35
|
-
},
|
|
36
32
|
args: {
|
|
37
33
|
topRounded: true,
|
|
38
34
|
bottomRounded: true,
|
|
@@ -9,15 +9,11 @@
|
|
|
9
9
|
import { Meta, StoryObj, StoryFn } from "@storybook/react";
|
|
10
10
|
import { LinkBlockSection } from ".";
|
|
11
11
|
import LinkBlock from "./LinkBlock";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
14
|
title: "Components/Link Block",
|
|
16
15
|
component: LinkBlock,
|
|
17
16
|
tags: ["autodocs"],
|
|
18
|
-
parameters: {
|
|
19
|
-
...defaultParameters,
|
|
20
|
-
},
|
|
21
17
|
args: {},
|
|
22
18
|
} as Meta<typeof LinkBlock>;
|
|
23
19
|
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
10
10
|
import OrderedList from "./OrderedList";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Lister bør ikke inneholde flere enn 10 punkter. Har du mye mer, bør du vurdere å organisere innholdet annerledes.
|
|
@@ -19,7 +18,6 @@ export default {
|
|
|
19
18
|
component: OrderedList,
|
|
20
19
|
parameters: {
|
|
21
20
|
inlineStories: true,
|
|
22
|
-
...defaultParameters,
|
|
23
21
|
},
|
|
24
22
|
render: ({ ...args }) => (
|
|
25
23
|
<OrderedList {...args}>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import Logo from "./Logo";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
/***
|
|
14
13
|
* Logoen er vårt tydeligste kjennetegn og vårt viktigste verktøy for kommunikasjon. Den skal inspirere målgruppen elever og lærere i videregående opplæring og gjøre dem nysgjerrige på NDLA.
|
|
@@ -23,7 +22,6 @@ export default {
|
|
|
23
22
|
tags: ["autodocs"],
|
|
24
23
|
parameters: {
|
|
25
24
|
inlineStories: true,
|
|
26
|
-
...defaultParameters,
|
|
27
25
|
},
|
|
28
26
|
args: {
|
|
29
27
|
cssModifier: "large",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
11
|
import MessageBanner from "./MessageBanner";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Brukes i toppen av nettleseren når noe trenger mye oppmerksomhet globalt i systemet.
|
|
@@ -20,7 +19,6 @@ export default {
|
|
|
20
19
|
tags: ["autodocs"],
|
|
21
20
|
parameters: {
|
|
22
21
|
inlineStories: true,
|
|
23
|
-
...defaultParameters,
|
|
24
22
|
},
|
|
25
23
|
args: {
|
|
26
24
|
showCloseButton: true,
|