@ndla/ui 50.13.2 → 50.13.3
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/Embed/conceptComponents.js +11 -9
- package/lib/BlogPost/BlogPost.js +5 -5
- package/lib/CompetenceGoalTab/styles.d.ts +5 -5
- package/lib/Embed/conceptComponents.js +11 -9
- package/lib/Hero/HeroContent.d.ts +1 -1
- package/lib/NDLAFilm/filmStyles.d.ts +2 -2
- 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/TagSelector/MenuList.d.ts +1 -1
- package/lib/TagSelector/ValueButton.d.ts +1 -1
- 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.stories.tsx +0 -4
- package/src/ContentLoader/ContentLoader.stories.tsx +0 -2
- package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +0 -2
- 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/MessageBox.stories.tsx +0 -2
- package/src/MyNdla/Resource/Folder.stories.tsx +0 -4
- package/src/MyNdla/Resource/FolderInput.stories.tsx +0 -2
- package/src/ProgrammeCard/ProgrammeCard.stories.tsx +0 -4
- package/src/Resource/BlockResource.stories.tsx +0 -4
- package/src/Resource/ListResource.stories.tsx +0 -4
- package/src/ResourceGroup/ResourceItem.stories.tsx +0 -2
- 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
|
@@ -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,
|
|
@@ -10,7 +10,6 @@ import { useTranslation } from "react-i18next";
|
|
|
10
10
|
import { Meta, StoryFn } from "@storybook/react";
|
|
11
11
|
import { Alarm, HumanMaleBoard, InformationOutline, WarningOutline } from "@ndla/icons/common";
|
|
12
12
|
import MessageBox from "./MessageBox";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
|
|
15
14
|
export default {
|
|
16
15
|
title: "Patterns/MessageBox",
|
|
@@ -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
|
showCloseButton: true,
|
|
@@ -15,15 +15,11 @@ import { Pencil } from "@ndla/icons/action";
|
|
|
15
15
|
import { HorizontalMenu } from "@ndla/icons/contentType";
|
|
16
16
|
import { DeleteForever } from "@ndla/icons/editor";
|
|
17
17
|
import Folder from "./Folder";
|
|
18
|
-
import { defaultParameters } from "../../../../../stories/defaults";
|
|
19
18
|
|
|
20
19
|
export default {
|
|
21
20
|
title: "My NDLA/Folder",
|
|
22
21
|
component: Folder,
|
|
23
22
|
tags: ["autodocs"],
|
|
24
|
-
parameters: {
|
|
25
|
-
...defaultParameters,
|
|
26
|
-
},
|
|
27
23
|
argTypes: {
|
|
28
24
|
menu: {
|
|
29
25
|
control: false,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import FolderInput from "./FolderInput";
|
|
11
|
-
import { defaultParameters } from "../../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "My NDLA/FolderInput",
|
|
@@ -16,7 +15,6 @@ export default {
|
|
|
16
15
|
component: FolderInput,
|
|
17
16
|
parameters: {
|
|
18
17
|
inlineStories: true,
|
|
19
|
-
...defaultParameters,
|
|
20
18
|
},
|
|
21
19
|
args: {
|
|
22
20
|
labelHidden: false,
|
|
@@ -8,15 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn } from "@storybook/react";
|
|
10
10
|
import ProgrammeCard from "./ProgrammeCard";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
title: "Components/ProgrammeCard",
|
|
15
14
|
component: ProgrammeCard,
|
|
16
15
|
tags: ["autodocs"],
|
|
17
|
-
parameters: {
|
|
18
|
-
...defaultParameters,
|
|
19
|
-
},
|
|
20
16
|
args: {
|
|
21
17
|
id: "test ID",
|
|
22
18
|
title: { title: "Elektro og datateknologi", language: "nb" },
|
|
@@ -11,15 +11,11 @@ import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
|
11
11
|
import { spacing } from "@ndla/core";
|
|
12
12
|
import BlockResource from "./BlockResource";
|
|
13
13
|
import { StoryResourceMenu, resourceTypesArr } from "./storyComponents";
|
|
14
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
14
|
|
|
16
15
|
export default {
|
|
17
16
|
title: "My NDLA/BlockResource",
|
|
18
17
|
component: BlockResource,
|
|
19
18
|
tags: ["autodocs"],
|
|
20
|
-
parameters: {
|
|
21
|
-
...defaultParameters,
|
|
22
|
-
},
|
|
23
19
|
argTypes: {
|
|
24
20
|
resourceImage: {
|
|
25
21
|
control: false,
|
|
@@ -10,16 +10,12 @@ import styled from "@emotion/styled";
|
|
|
10
10
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
11
11
|
import ListResource from "./ListResource";
|
|
12
12
|
import { StoryResourceMenu, resourceTypesArr } from "./storyComponents";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
import { spacing } from "../../../core/src";
|
|
15
14
|
|
|
16
15
|
export default {
|
|
17
16
|
title: "My NDLA/ListResource",
|
|
18
17
|
component: ListResource,
|
|
19
18
|
tags: ["autodocs"],
|
|
20
|
-
parameters: {
|
|
21
|
-
...defaultParameters,
|
|
22
|
-
},
|
|
23
19
|
argTypes: {
|
|
24
20
|
resourceImage: {
|
|
25
21
|
control: false,
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { FavoriteButton } from "@ndla/button";
|
|
11
11
|
import ResourceItem from "./ResourceItem";
|
|
12
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
14
|
title: "Components/ResourceItem",
|
|
@@ -17,7 +16,6 @@ export default {
|
|
|
17
16
|
component: ResourceItem,
|
|
18
17
|
parameters: {
|
|
19
18
|
inlineStories: true,
|
|
20
|
-
...defaultParameters,
|
|
21
19
|
},
|
|
22
20
|
args: {
|
|
23
21
|
id: "urn:resource:a7a49c0a-32ea-4343-8b11-bd6d65c24f87",
|
|
@@ -10,7 +10,6 @@ import { Meta, StoryObj } from "@storybook/react";
|
|
|
10
10
|
import { ButtonV2 } from "@ndla/button";
|
|
11
11
|
import { PersonOutlined } from "@ndla/icons/common";
|
|
12
12
|
import { Snack, SnackbarProvider, useSnack } from ".";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
|
|
15
14
|
const SnackComponent = ({ ...args }: Snack) => {
|
|
16
15
|
const { addSnack } = useSnack();
|
|
@@ -30,7 +29,6 @@ export default {
|
|
|
30
29
|
tags: ["autodocs"],
|
|
31
30
|
parameters: {
|
|
32
31
|
inlineStories: true,
|
|
33
|
-
...defaultParameters,
|
|
34
32
|
},
|
|
35
33
|
args: {
|
|
36
34
|
content: <span>This is a snack</span>,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryFn } from "@storybook/react";
|
|
10
10
|
import Table from "./Table";
|
|
11
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Tabeller skal brukes til å presentere data (tabulære data), ikke til utforming. Det anbefales å holde tabellene så enkle som mulig. Ved mer kompleksitet kan data heller deles opp i flere tabeller.
|
|
@@ -35,7 +34,6 @@ const meta: Meta = {
|
|
|
35
34
|
),
|
|
36
35
|
],
|
|
37
36
|
title: "Base styles/Tables",
|
|
38
|
-
parameters: defaultParameters,
|
|
39
37
|
};
|
|
40
38
|
|
|
41
39
|
export default meta;
|
|
@@ -10,7 +10,6 @@ import { useState } from "react";
|
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
11
|
import { Meta, StoryFn } from "@storybook/react";
|
|
12
12
|
import TagSelector from "./TagSelector";
|
|
13
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Komponent for å tagge noe, primært tiltenkt Min NDLA
|
|
@@ -21,7 +20,6 @@ export default {
|
|
|
21
20
|
tags: ["autodocs"],
|
|
22
21
|
parameters: {
|
|
23
22
|
inlineStories: true,
|
|
24
|
-
...defaultParameters,
|
|
25
23
|
},
|
|
26
24
|
argTypes: {
|
|
27
25
|
onChange: { control: false },
|
|
@@ -13,7 +13,6 @@ import { IFolder } from "@ndla/types-backend/learningpath-api";
|
|
|
13
13
|
import { uuid } from "@ndla/util";
|
|
14
14
|
import { flattenFolders } from "./helperFunctions";
|
|
15
15
|
import TreeStructure, { TreeStructureProps } from "./TreeStructure";
|
|
16
|
-
import { defaultParameters } from "../../../../stories/defaults";
|
|
17
16
|
import { FolderInput } from "../MyNdla";
|
|
18
17
|
|
|
19
18
|
const MY_FOLDERS_ID = "folders";
|
|
@@ -124,7 +123,6 @@ export default {
|
|
|
124
123
|
component: TreeStructure,
|
|
125
124
|
parameters: {
|
|
126
125
|
inlineStories: true,
|
|
127
|
-
...defaultParameters,
|
|
128
126
|
},
|
|
129
127
|
args: {
|
|
130
128
|
defaultOpenFolders: [MY_FOLDERS_ID],
|