@navikt/ds-react 0.19.9 → 0.19.12
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/_docs.json +1 -1
- package/cjs/form/error-summary/ErrorSummary.js +4 -2
- package/cjs/loader/Loader.js +2 -2
- package/esm/form/error-summary/ErrorSummary.js +4 -2
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/loader/Loader.d.ts +1 -1
- package/esm/loader/Loader.js +2 -2
- package/esm/loader/Loader.js.map +1 -1
- package/package.json +2 -2
- package/src/alert/alert.stories.tsx +9 -1
- package/src/form/error-summary/ErrorSummary.tsx +9 -3
- package/src/guide-panel/guidepanel.stories.tsx +51 -0
- package/src/help-text/help-text.stories.tsx +53 -18
- package/src/link/link.stories.tsx +77 -0
- package/src/link-panel/link-panel.stories.tsx +57 -0
- package/src/loader/Loader.tsx +8 -5
- package/src/loader/loader.stories.tsx +79 -0
- package/src/modal/modal.stories.tsx +71 -38
- package/src/panel/{stories/panel.stories.tsx → panel.stories.tsx} +27 -5
- package/src/popover/popover.stories.tsx +126 -0
- package/src/table/stories/table-async.stories.tsx +1 -1
- package/src/table/stories/table-expandable.stories.tsx +89 -62
- package/src/table/stories/table.stories.tsx +73 -83
- package/src/tag/tag.stories.tsx +45 -0
- package/src/toggle-group/ToggleGroup.stories.tsx +63 -81
- package/src/typography/heading.stories.tsx +75 -0
- package/src/typography/typography.stories.tsx +184 -111
- package/src/guide-panel/stories/example.css +0 -13
- package/src/guide-panel/stories/guidepanel.stories.mdx +0 -81
- package/src/guide-panel/stories/guidepanel.stories.tsx +0 -68
- package/src/link/stories/link.stories.mdx +0 -26
- package/src/link/stories/link.stories.tsx +0 -53
- package/src/link-panel/stories/illustration.tsx +0 -125
- package/src/link-panel/stories/link-panel.stories.mdx +0 -110
- package/src/link-panel/stories/link-panel.stories.tsx +0 -51
- package/src/loader/stories/loader.stories.mdx +0 -65
- package/src/loader/stories/loader.stories.tsx +0 -69
- package/src/panel/stories/panel.stories.mdx +0 -42
- package/src/popover/stories/popover.stories.mdx +0 -23
- package/src/popover/stories/popover.stories.tsx +0 -56
- package/src/table/stories/table-hot.stories.tsx +0 -376
- package/src/table/stories/table.stories.mdx +0 -112
- package/src/tag/stories/tag.stories.mdx +0 -56
- package/src/tag/stories/tag.stories.tsx +0 -32
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas } from "@storybook/addon-docs";
|
|
2
|
-
import { Button, Loader, GuidePanel } from "../../index";
|
|
3
|
-
import { Success } from "@navikt/ds-react";
|
|
4
|
-
import "./example.css";
|
|
5
|
-
|
|
6
|
-
<Meta title="ds-react/guidepanel/intro" />
|
|
7
|
-
|
|
8
|
-
# Hvordan ta i bruk GuidePanel
|
|
9
|
-
|
|
10
|
-
```jsx
|
|
11
|
-
<GuidePanel>
|
|
12
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
13
|
-
</GuidePanel>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
<Canvas>
|
|
17
|
-
<GuidePanel>
|
|
18
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
19
|
-
</GuidePanel>
|
|
20
|
-
</Canvas>
|
|
21
|
-
|
|
22
|
-
## Varianter
|
|
23
|
-
|
|
24
|
-
`poster` endrer på plassering av illustrasjon
|
|
25
|
-
|
|
26
|
-
<Canvas>
|
|
27
|
-
<GuidePanel>
|
|
28
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
29
|
-
</GuidePanel>
|
|
30
|
-
<GuidePanel poster>
|
|
31
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
32
|
-
</GuidePanel>
|
|
33
|
-
</Canvas>
|
|
34
|
-
|
|
35
|
-
## Fargebruk
|
|
36
|
-
|
|
37
|
-
Istedenfor fargetema/themes slik som tidligere veileder brukte velger man nå selv farge på border/illustrasjons-bakgrunn ved å
|
|
38
|
-
overskrive tokens. Det anbefalses å gjøre dette med eks Styled-Components eller css-klasser, men kan inlines også
|
|
39
|
-
|
|
40
|
-
```css
|
|
41
|
-
/* Tokens */
|
|
42
|
-
--navds-guide-panel-color-border
|
|
43
|
-
--navds-guide-panel-color-illustration-background
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
```jsx
|
|
47
|
-
/* Css */
|
|
48
|
-
<GuidePanel className="sb-guidepanel__tokens--purple">
|
|
49
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
50
|
-
</GuidePanel>
|
|
51
|
-
<GuidePanel className="sb-guidepanel__tokens--green">
|
|
52
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
53
|
-
</GuidePanel>
|
|
54
|
-
|
|
55
|
-
/* Inline */
|
|
56
|
-
<GuidePanel
|
|
57
|
-
style={{
|
|
58
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
59
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
63
|
-
</GuidePanel>
|
|
64
|
-
<GuidePanel
|
|
65
|
-
style={{
|
|
66
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
67
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
71
|
-
</GuidePanel>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
<Canvas>
|
|
75
|
-
<GuidePanel className="sb-guidepanel__tokens--purple">
|
|
76
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
77
|
-
</GuidePanel>
|
|
78
|
-
<GuidePanel className="sb-guidepanel__tokens--green">
|
|
79
|
-
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
80
|
-
</GuidePanel>
|
|
81
|
-
</Canvas>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { GuidePanel } from "../index";
|
|
3
|
-
import { Meta } from "@storybook/react/types-6-0";
|
|
4
|
-
export default {
|
|
5
|
-
title: "ds-react/guidepanel",
|
|
6
|
-
component: GuidePanel,
|
|
7
|
-
} as Meta;
|
|
8
|
-
|
|
9
|
-
const panelText = `Sit sint eu dolore reprehenderit exercitation labore aute anim sit
|
|
10
|
-
adipisicing proident. Tempor ipsum ea cupidatat qui esse do veniam
|
|
11
|
-
cupidatat. Excepteur irure reprehenderit esse tempor nisi duis qui ea
|
|
12
|
-
enim id.`;
|
|
13
|
-
|
|
14
|
-
export const All = () => {
|
|
15
|
-
return (
|
|
16
|
-
<div>
|
|
17
|
-
<h1>GuidePanel</h1>
|
|
18
|
-
<GuidePanel>{panelText}</GuidePanel>
|
|
19
|
-
<h2>GuidePanel poster</h2>
|
|
20
|
-
<GuidePanel poster>{panelText}</GuidePanel>
|
|
21
|
-
<h2>custom colors</h2>
|
|
22
|
-
<GuidePanel
|
|
23
|
-
style={{
|
|
24
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-purple-200)",
|
|
25
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-purple-400)",
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
{panelText}
|
|
29
|
-
</GuidePanel>
|
|
30
|
-
<GuidePanel
|
|
31
|
-
style={{
|
|
32
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-green-200)",
|
|
33
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-green-400)",
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{panelText}
|
|
37
|
-
</GuidePanel>
|
|
38
|
-
<GuidePanel
|
|
39
|
-
style={{
|
|
40
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
41
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
42
|
-
}}
|
|
43
|
-
>
|
|
44
|
-
{panelText}Ullamco reprehenderit fugiat reprehenderit ad nisi aliqua
|
|
45
|
-
irure enim id nisi do non magna. Nisi ut incididunt dolor aliqua
|
|
46
|
-
adipisicing. Cupidatat sint et qui minim sint aute anim non Lorem
|
|
47
|
-
reprehenderit id et excepteur. Consectetur velit aliqua eiusmod sit. Sit
|
|
48
|
-
velit minim consectetur deserunt Lorem non elit fugiat consectetur sunt
|
|
49
|
-
aliqua Lorem minim. Ullamco dolor mollit laboris velit deserunt nisi
|
|
50
|
-
ipsum minim dolor ad cillum in id do.
|
|
51
|
-
{panelText}Ullamco reprehenderit fugiat reprehenderit ad nisi aliqua
|
|
52
|
-
irure enim id nisi do non magna. Nisi ut incididunt dolor aliqua
|
|
53
|
-
adipisicing. Cupidatat sint et qui minim sint aute anim non Lorem
|
|
54
|
-
reprehenderit id et excepteur. Consectetur velit aliqua eiusmod sit. Sit
|
|
55
|
-
velit minim consectetur deserunt Lorem non elit fugiat consectetur sunt
|
|
56
|
-
aliqua Lorem minim. Ullamco dolor mollit laboris velit deserunt nisi
|
|
57
|
-
ipsum minim dolor ad cillum in id do.
|
|
58
|
-
{panelText}Ullamco reprehenderit fugiat reprehenderit ad nisi aliqua
|
|
59
|
-
irure enim id nisi do non magna. Nisi ut incididunt dolor aliqua
|
|
60
|
-
adipisicing. Cupidatat sint et qui minim sint aute anim non Lorem
|
|
61
|
-
reprehenderit id et excepteur. Consectetur velit aliqua eiusmod sit. Sit
|
|
62
|
-
velit minim consectetur deserunt Lorem non elit fugiat consectetur sunt
|
|
63
|
-
aliqua Lorem minim. Ullamco dolor mollit laboris velit deserunt nisi
|
|
64
|
-
ipsum minim dolor ad cillum in id do.
|
|
65
|
-
</GuidePanel>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas } from "@storybook/addon-docs";
|
|
2
|
-
import { Link } from "../../index";
|
|
3
|
-
import { Add } from "@navikt/ds-icons";
|
|
4
|
-
|
|
5
|
-
<Meta title="ds-react/link/intro" />
|
|
6
|
-
|
|
7
|
-
# Hvordan ta i bruk Link
|
|
8
|
-
|
|
9
|
-
Komponeten skal være nesten 1-1 med nav-frontend-lenker for de som er kjent med den.
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Link href="#">Dette er en tekstlenke</Link>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
<Canvas>
|
|
16
|
-
<Link href="#">Dette er en tekstlenke</Link>
|
|
17
|
-
</Canvas>
|
|
18
|
-
|
|
19
|
-
## Med ikon
|
|
20
|
-
|
|
21
|
-
<Canvas>
|
|
22
|
-
<Link href="#">
|
|
23
|
-
<span>Dette er en tekstlenke</span>
|
|
24
|
-
<Add />
|
|
25
|
-
</Link>
|
|
26
|
-
</Canvas>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Link } from "..";
|
|
3
|
-
import { Add } from "@navikt/ds-icons";
|
|
4
|
-
import { Alert } from "../..";
|
|
5
|
-
import { ConfirmationPanel } from "../../form";
|
|
6
|
-
export default {
|
|
7
|
-
title: "ds-react/link",
|
|
8
|
-
component: Link,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const All = () => {
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<h1>Link</h1>
|
|
15
|
-
<Link href="#">Dette er en tekstlenke</Link>
|
|
16
|
-
<h2>Icon after</h2>
|
|
17
|
-
<Link href="#">
|
|
18
|
-
<span>Dette er en tekstlenke</span>
|
|
19
|
-
<Add />
|
|
20
|
-
</Link>
|
|
21
|
-
<h2>Icon before</h2>
|
|
22
|
-
<Link href="#">
|
|
23
|
-
<Add />
|
|
24
|
-
<span>Dette er en tekstlenke </span>
|
|
25
|
-
</Link>
|
|
26
|
-
<h2>På farget bakgrunn</h2>
|
|
27
|
-
<Alert variant="error">
|
|
28
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
29
|
-
</Alert>
|
|
30
|
-
<Alert variant="info">
|
|
31
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
32
|
-
</Alert>
|
|
33
|
-
<Alert variant="success">
|
|
34
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
35
|
-
</Alert>
|
|
36
|
-
<Alert variant="warning">
|
|
37
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
38
|
-
</Alert>
|
|
39
|
-
<ConfirmationPanel label="Samtykke?" checked={false} error="feilmelding">
|
|
40
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
41
|
-
</ConfirmationPanel>
|
|
42
|
-
<ConfirmationPanel label="Samtykke?" checked error="feilmelding">
|
|
43
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
44
|
-
</ConfirmationPanel>
|
|
45
|
-
<ConfirmationPanel label="Samtykke?" checked={false}>
|
|
46
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
47
|
-
</ConfirmationPanel>
|
|
48
|
-
<ConfirmationPanel label="Samtykke?" checked>
|
|
49
|
-
Her er en <Link href="#about">lenke</Link> på farget bakgrunn
|
|
50
|
-
</ConfirmationPanel>
|
|
51
|
-
</>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const Illustration = (
|
|
3
|
-
<>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="110" height="110">
|
|
5
|
-
<defs>
|
|
6
|
-
<path id="a" d="M.686.654h4.399v5.852H.686z"></path>
|
|
7
|
-
</defs>
|
|
8
|
-
<g fill="none" fillRule="evenodd">
|
|
9
|
-
<path fill="transparent" d="M-287-1518H993V543H-287z"></path>
|
|
10
|
-
<rect
|
|
11
|
-
width="796"
|
|
12
|
-
height="181"
|
|
13
|
-
fill="transparent"
|
|
14
|
-
rx="8"
|
|
15
|
-
transform="translate(-45 -36)"
|
|
16
|
-
></rect>
|
|
17
|
-
<circle cx="55" cy="55" r="55" fill="#CCDEE6"></circle>
|
|
18
|
-
<g fill="#D8D8D8">
|
|
19
|
-
<path
|
|
20
|
-
fill="#337C9B"
|
|
21
|
-
d="M32.034 5.834l-11.606 3.11-9.517 2.55-4.637 1.242 1.284 4.794 9.069 33.843 1.284 4.795 4.637-1.243 9.518-2.55 11.605-3.11c2.561-.686 4.063-3.389 3.353-6.037L37.956 9.385c-.71-2.648-3.361-4.238-5.922-3.551"
|
|
22
|
-
></path>
|
|
23
|
-
<path
|
|
24
|
-
fill="#38363A"
|
|
25
|
-
d="M38.322 51.833l1.77-.474-12.12-45.233-1.77.474z"
|
|
26
|
-
></path>
|
|
27
|
-
<path
|
|
28
|
-
fill="#CE2128"
|
|
29
|
-
d="M26.593 57.996l-1.179-.613-.713 1.12-.93-3.47 1.892-.507z"
|
|
30
|
-
></path>
|
|
31
|
-
</g>
|
|
32
|
-
<path
|
|
33
|
-
fill="#FFF"
|
|
34
|
-
d="M61.773 69.14l8.95 38.112a2.524 2.524 0 0 0 3.036 1.881l32.913-7.745a2.528 2.528 0 0 0 1.88-3.04L98.279 54.591a2.526 2.526 0 0 0-3.037-1.883L68.425 59.02l-6.652 10.12z"
|
|
35
|
-
></path>
|
|
36
|
-
<path
|
|
37
|
-
fill="#C0C0BE"
|
|
38
|
-
d="M68.425 59.02l1.326 5.645a2.527 2.527 0 0 1-1.88 3.038l-6.098 1.436 6.652-10.12z"
|
|
39
|
-
></path>
|
|
40
|
-
<path
|
|
41
|
-
stroke="#8E9294"
|
|
42
|
-
strokeLinecap="round"
|
|
43
|
-
strokeWidth="2.152"
|
|
44
|
-
d="M68.902 74.197l11.982-2.82m-10.721 8.19l24.874-5.853M71.424 84.937l24.873-5.853"
|
|
45
|
-
></path>
|
|
46
|
-
<path
|
|
47
|
-
stroke="#8E9294"
|
|
48
|
-
strokeLinecap="round"
|
|
49
|
-
strokeWidth="2.264"
|
|
50
|
-
d="M72.685 90.307l24.873-5.854M73.857 95.297l24.873-5.853M75.021 100.7l24.874-5.853"
|
|
51
|
-
></path>
|
|
52
|
-
<path
|
|
53
|
-
fill="#CCDEE6"
|
|
54
|
-
d="M21.698 86.68c-5.726-3.643-7.42-11.243-3.78-16.976 3.64-5.733 11.231-7.427 16.958-3.784 5.727 3.643 7.42 11.243 3.78 16.976-3.639 5.733-11.231 7.427-16.958 3.784z"
|
|
55
|
-
></path>
|
|
56
|
-
<path
|
|
57
|
-
fill="#C42B34"
|
|
58
|
-
d="M9.283 106.905a2.772 2.772 0 0 1-.851-3.823l8.759-13.798a2.765 2.765 0 0 1 3.817-.852 2.77 2.77 0 0 1 .851 3.822l-8.758 13.799a2.764 2.764 0 0 1-3.818.852"
|
|
59
|
-
></path>
|
|
60
|
-
<path
|
|
61
|
-
fill="#2E3137"
|
|
62
|
-
d="M19.032 90.912c-.86-.547-1.348-1.318-.801-2.179l1.826-2.877a1.841 1.841 0 0 1 2.546-.567 1.847 1.847 0 0 1 .566 2.547l-1.826 2.878c-.547.86-1.452.744-2.31.198"
|
|
63
|
-
></path>
|
|
64
|
-
<path
|
|
65
|
-
fill="#D84B55"
|
|
66
|
-
d="M16.41 91l-8.266 13.021a.925.925 0 0 0 .283 1.275.92.92 0 0 0 1.272-.284l7.912-12.463c-.713-.47-1.083-1.039-1.2-1.549"
|
|
67
|
-
></path>
|
|
68
|
-
<path
|
|
69
|
-
fill="#2E3137"
|
|
70
|
-
d="M27.811 87.523a11.115 11.115 0 0 1-1.117-.196 11.283 11.283 0 0 1-3.577-1.48c-5.295-3.369-6.866-10.423-3.502-15.723 3.366-5.301 10.412-6.874 15.709-3.504 5.296 3.368 6.866 10.422 3.5 15.723a11.317 11.317 0 0 1-2.86 3.053 11.4 11.4 0 0 1-4.72 2.029c-1.127.203-2.284.24-3.433.098m12.57-4.19c3.911-6.16 2.085-14.358-4.069-18.271-6.154-3.915-14.342-2.089-18.253 4.072-3.91 6.16-2.085 14.356 4.07 18.271 6.153 3.915 14.343 2.09 18.252-4.072"
|
|
71
|
-
></path>
|
|
72
|
-
<path
|
|
73
|
-
fill="#FFD399"
|
|
74
|
-
d="M93.445 12.554c2.45 5.367.088 11.707-5.274 14.159-5.361 2.452-11.695.088-14.145-5.279-2.449-5.368-.088-11.707 5.275-14.16 5.361-2.452 11.695-.088 14.144 5.28"
|
|
75
|
-
></path>
|
|
76
|
-
<path
|
|
77
|
-
fill="#FFD399"
|
|
78
|
-
d="M91.45 28.239l-4.274 1.954a2.697 2.697 0 0 1-3.574-1.334l-2.775-6.08a2.7 2.7 0 0 1 1.333-3.578l4.274-1.955a2.696 2.696 0 0 1 3.575 1.334l2.775 6.08a2.702 2.702 0 0 1-1.333 3.579"
|
|
79
|
-
></path>
|
|
80
|
-
<path
|
|
81
|
-
fill="#5A5C5D"
|
|
82
|
-
d="M94.1 30.6l-6.9 3.156a1.255 1.255 0 0 1-1.043-2.284l6.902-3.155a1.253 1.253 0 1 1 1.04 2.282m1.275 2.794l-6.9 3.156a1.254 1.254 0 1 1-1.041-2.283l6.9-3.156a1.254 1.254 0 0 1 1.041 2.283m-1.682 1.387l-3.044 1.392c-.458.21-.4.889.09 1.006.685.164 1.425.11 2.115-.207a3.25 3.25 0 0 0 1.54-1.464c.233-.449-.241-.936-.701-.727"
|
|
83
|
-
></path>
|
|
84
|
-
<g transform="rotate(-69 92.268 -44.056)">
|
|
85
|
-
<mask id="b" fill="#fff">
|
|
86
|
-
<use xlinkHref="#a"></use>
|
|
87
|
-
</mask>
|
|
88
|
-
<path
|
|
89
|
-
fill="#C42B34"
|
|
90
|
-
d="M.732 4.08l.397-1.844a1.999 1.999 0 1 1 3.91.842l-.396 1.846A2 2 0 1 1 .732 4.08"
|
|
91
|
-
mask="url(#b)"
|
|
92
|
-
></path>
|
|
93
|
-
</g>
|
|
94
|
-
<path
|
|
95
|
-
fill="#E1CFB4"
|
|
96
|
-
d="M86.458 79.011l-1.334 7.43 6.268-4.21-2.12-2.355z"
|
|
97
|
-
></path>
|
|
98
|
-
<path
|
|
99
|
-
fill="#FECB86"
|
|
100
|
-
d="M103.266 56.87l-1.644-1.073-14.841 22.72 1.643 1.072z"
|
|
101
|
-
></path>
|
|
102
|
-
<path
|
|
103
|
-
fill="#FAA736"
|
|
104
|
-
d="M104.912 57.945l-1.644-1.074-14.841 22.72 1.644 1.073z"
|
|
105
|
-
></path>
|
|
106
|
-
<path
|
|
107
|
-
fill="#FECB86"
|
|
108
|
-
d="M90.071 80.664l1.644 1.072 14.842-22.72-1.645-1.072zm-3.306-.951c.31.203.774-.055 1.188.215a.513.513 0 0 1 .152.15l.32-.488-1.644-1.073-.297.453s-.028.542.281.743"
|
|
109
|
-
></path>
|
|
110
|
-
<path
|
|
111
|
-
fill="#FAA736"
|
|
112
|
-
d="M88.106 80.078c.205.277.111.67.548.956.44.286.764.042 1.098.118l.32-.488-1.648-1.075-.318.489z"
|
|
113
|
-
></path>
|
|
114
|
-
<path
|
|
115
|
-
fill="#FECB86"
|
|
116
|
-
d="M89.752 81.152a.507.507 0 0 1 .198.08c.414.27.365.797.675 1 .311.204.794-.041.794-.041l.296-.454-1.644-1.073-.32.488z"
|
|
117
|
-
></path>
|
|
118
|
-
<path
|
|
119
|
-
fill="#535756"
|
|
120
|
-
d="M85.123 86.44l2.22-1.488-1.749-1.14zm21.434-27.423l-4.935-3.22.437-.67 4.935 3.22z"
|
|
121
|
-
></path>
|
|
122
|
-
</g>
|
|
123
|
-
</svg>
|
|
124
|
-
</>
|
|
125
|
-
);
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas } from "@storybook/addon-docs";
|
|
2
|
-
import { LinkPanel } from "../../index";
|
|
3
|
-
import { Success } from "@navikt/ds-react";
|
|
4
|
-
import { Illustration } from "./illustration";
|
|
5
|
-
|
|
6
|
-
<Meta title="ds-react/linkPanel/intro" />
|
|
7
|
-
|
|
8
|
-
# Hvordan ta i bruk LinkPanel
|
|
9
|
-
|
|
10
|
-
```jsx
|
|
11
|
-
<LinkPanel href="#">
|
|
12
|
-
<LinkPanel.Title>
|
|
13
|
-
Consectetur eu duis aliqua eu irure fugiat fugiat eu.
|
|
14
|
-
</LinkPanel.Title>
|
|
15
|
-
</LinkPanel>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
<Canvas>
|
|
19
|
-
<LinkPanel href="#">
|
|
20
|
-
<LinkPanel.Title>
|
|
21
|
-
Consectetur eu duis aliqua eu irure fugiat fugiat eu.
|
|
22
|
-
</LinkPanel.Title>
|
|
23
|
-
</LinkPanel>
|
|
24
|
-
</Canvas>
|
|
25
|
-
|
|
26
|
-
## Med description
|
|
27
|
-
|
|
28
|
-
```jsx
|
|
29
|
-
<LinkPanel href="#">
|
|
30
|
-
<LinkPanel.Title>
|
|
31
|
-
Consectetur eu duis aliqua eu irure fugiat fugiat eu.
|
|
32
|
-
</LinkPanel.Title>
|
|
33
|
-
<LinkPanel.Description>
|
|
34
|
-
Velit mollit do commodo elit Lorem aliqua Lorem.
|
|
35
|
-
</LinkPanel.Description>
|
|
36
|
-
</LinkPanel>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
<Canvas>
|
|
40
|
-
<LinkPanel href="#">
|
|
41
|
-
<LinkPanel.Title>
|
|
42
|
-
Consectetur eu duis aliqua eu irure fugiat fugiat eu.
|
|
43
|
-
</LinkPanel.Title>
|
|
44
|
-
<LinkPanel.Description>
|
|
45
|
-
Velit mollit do commodo elit Lorem aliqua Lorem.
|
|
46
|
-
</LinkPanel.Description>
|
|
47
|
-
</LinkPanel>
|
|
48
|
-
</Canvas>
|
|
49
|
-
|
|
50
|
-
## Uten border
|
|
51
|
-
|
|
52
|
-
```jsx
|
|
53
|
-
<LinkPanel href="#" border={false}>
|
|
54
|
-
<LinkPanel.Title>
|
|
55
|
-
Veniam cillum cupidatat aliqua id ipsum culpa ea.
|
|
56
|
-
</LinkPanel.Title>
|
|
57
|
-
</LinkPanel>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
<Canvas>
|
|
61
|
-
<LinkPanel href="#" border={false}>
|
|
62
|
-
<LinkPanel.Title>
|
|
63
|
-
Veniam cillum cupidatat aliqua id ipsum culpa ea.
|
|
64
|
-
</LinkPanel.Title>
|
|
65
|
-
</LinkPanel>
|
|
66
|
-
</Canvas>
|
|
67
|
-
|
|
68
|
-
## Custom styling
|
|
69
|
-
|
|
70
|
-
```jsx
|
|
71
|
-
<LinkPanel href="#">
|
|
72
|
-
<div
|
|
73
|
-
style={{
|
|
74
|
-
display: "grid",
|
|
75
|
-
gridAutoFlow: "column",
|
|
76
|
-
gap: "var(--navds-spacing-8)",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
{Illustration}
|
|
81
|
-
<div>
|
|
82
|
-
<LinkPanel.Title>Consectetur eu duis aliqua</LinkPanel.Title>
|
|
83
|
-
<LinkPanel.Description>
|
|
84
|
-
Aliqua id aliquip Lorem esse
|
|
85
|
-
</LinkPanel.Description>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
</LinkPanel>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
<Canvas>
|
|
92
|
-
<LinkPanel href="#">
|
|
93
|
-
<div
|
|
94
|
-
style={{
|
|
95
|
-
display: "grid",
|
|
96
|
-
gridAutoFlow: "column",
|
|
97
|
-
gap: "var(--navds-spacing-8)",
|
|
98
|
-
alignItems: "center",
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
{Illustration}
|
|
102
|
-
<div>
|
|
103
|
-
<LinkPanel.Title>Consectetur eu duis aliqua</LinkPanel.Title>
|
|
104
|
-
<LinkPanel.Description>
|
|
105
|
-
Aliqua id aliquip Lorem esse
|
|
106
|
-
</LinkPanel.Description>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
</LinkPanel>
|
|
110
|
-
</Canvas>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LinkPanel } from "..";
|
|
3
|
-
import { Illustration } from "./illustration";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "ds-react/linkPanel",
|
|
7
|
-
component: LinkPanel,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const All = () => (
|
|
11
|
-
<>
|
|
12
|
-
<h1>Link panel</h1>
|
|
13
|
-
<LinkPanel href="#">
|
|
14
|
-
<LinkPanel.Title>
|
|
15
|
-
Consectetur eu duis aliqua eu irure fugiat fugiat eu.
|
|
16
|
-
</LinkPanel.Title>
|
|
17
|
-
<LinkPanel.Description>
|
|
18
|
-
Aliqua id aliquip Lorem esse
|
|
19
|
-
</LinkPanel.Description>
|
|
20
|
-
</LinkPanel>
|
|
21
|
-
|
|
22
|
-
<h1>No border</h1>
|
|
23
|
-
<LinkPanel href="#" border={false}>
|
|
24
|
-
<LinkPanel.Title>
|
|
25
|
-
Veniam cillum cupidatat aliqua id ipsum culpa ea.
|
|
26
|
-
</LinkPanel.Title>
|
|
27
|
-
</LinkPanel>
|
|
28
|
-
|
|
29
|
-
<h1>Custom styling</h1>
|
|
30
|
-
<LinkPanel href="#" className="linkpanel">
|
|
31
|
-
{Illustration}
|
|
32
|
-
<div>
|
|
33
|
-
<LinkPanel.Title>
|
|
34
|
-
Anim pariatur eiusmod deserunt elit cillum
|
|
35
|
-
</LinkPanel.Title>
|
|
36
|
-
<LinkPanel.Description>
|
|
37
|
-
Ex velit id voluptate labore irure ipsum exercitation sunt et id enim
|
|
38
|
-
magna veniam consequat. id aliquip Lorem esse
|
|
39
|
-
</LinkPanel.Description>
|
|
40
|
-
</div>
|
|
41
|
-
</LinkPanel>
|
|
42
|
-
<style>{`
|
|
43
|
-
.linkpanel .navds-link-panel__content {
|
|
44
|
-
display: grid;
|
|
45
|
-
grid-auto-flow: column;
|
|
46
|
-
gap: var(--navds-spacing-8);
|
|
47
|
-
align-items: center;
|
|
48
|
-
}
|
|
49
|
-
`}</style>
|
|
50
|
-
</>
|
|
51
|
-
);
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas } from "@storybook/addon-docs";
|
|
2
|
-
import { background } from "@storybook/theming";
|
|
3
|
-
import { Loader } from "../index";
|
|
4
|
-
import { Button } from "../../index";
|
|
5
|
-
|
|
6
|
-
<Meta title="ds-react/loader/intro" />
|
|
7
|
-
|
|
8
|
-
# Hvordan ta i bruk Loader
|
|
9
|
-
|
|
10
|
-
```jsx
|
|
11
|
-
<Loader title="Laster inn ny data" />
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
<Canvas>
|
|
15
|
-
<Loader />
|
|
16
|
-
</Canvas>
|
|
17
|
-
|
|
18
|
-
Her kan `title` proppen brukes for å gi en liten tooltip som sier hvorfor den laster
|
|
19
|
-
|
|
20
|
-
## Justering av størrelse
|
|
21
|
-
|
|
22
|
-
Loaderen kommer i størrelsene `2xlarge`, `xlarge`, `large`, `medium`, `small` og `xsmall`
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
<Loader size="xlarge" />
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
<Canvas>
|
|
29
|
-
<Loader size="2xlarge" />
|
|
30
|
-
<Loader size="xlarge" />
|
|
31
|
-
<Loader size="large" />
|
|
32
|
-
<Loader size="medium" />
|
|
33
|
-
<Loader size="small" />
|
|
34
|
-
<Loader size="xsmall" />
|
|
35
|
-
</Canvas>
|
|
36
|
-
|
|
37
|
-
## Varianter
|
|
38
|
-
|
|
39
|
-
Loaderen kommer i variantene `neutral`, `interaction` og `inverted`
|
|
40
|
-
|
|
41
|
-
```jsx
|
|
42
|
-
<Loader size="2xlarge" variant="neutral"/>
|
|
43
|
-
<Loader size="2xlarge" variant="interaction"/>
|
|
44
|
-
<Loader size="2xlarge" variant="inverted"/>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
<Canvas>
|
|
48
|
-
<Loader size="2xlarge" variant="neutral" />
|
|
49
|
-
<Loader size="2xlarge" variant="interaction" />
|
|
50
|
-
<div style={{ backgroundColor: "black" }}>
|
|
51
|
-
<Loader size="2xlarge" variant="inverted" />
|
|
52
|
-
</div>
|
|
53
|
-
</Canvas>
|
|
54
|
-
|
|
55
|
-
## Transparent
|
|
56
|
-
|
|
57
|
-
Bakgrunnen kan settes til transparent med `transparent={true}`
|
|
58
|
-
|
|
59
|
-
```jsx
|
|
60
|
-
<Loader transparent />
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
<Canvas>
|
|
64
|
-
<Loader size="2xlarge" transparent />
|
|
65
|
-
</Canvas>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Loader } from "..";
|
|
3
|
-
import { Button } from "../..";
|
|
4
|
-
import { Meta } from "@storybook/react/types-6-0";
|
|
5
|
-
export default {
|
|
6
|
-
title: "ds-react/loader",
|
|
7
|
-
component: Loader,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const All = () => {
|
|
11
|
-
return (
|
|
12
|
-
<div>
|
|
13
|
-
<h1>Loader</h1>
|
|
14
|
-
<Loader />
|
|
15
|
-
|
|
16
|
-
<h2>Transparent</h2>
|
|
17
|
-
<Loader transparent />
|
|
18
|
-
|
|
19
|
-
<h2>Sizing</h2>
|
|
20
|
-
<Loader size="2xlarge" />
|
|
21
|
-
<Loader size="xlarge" />
|
|
22
|
-
<Loader size="large" />
|
|
23
|
-
<Loader size="medium" />
|
|
24
|
-
<Loader size="small" />
|
|
25
|
-
<Loader size="xsmall" />
|
|
26
|
-
<h2>Sizing transparent</h2>
|
|
27
|
-
<Loader size="2xlarge" transparent />
|
|
28
|
-
<Loader size="xlarge" transparent />
|
|
29
|
-
<Loader size="large" transparent />
|
|
30
|
-
<Loader size="medium" transparent />
|
|
31
|
-
<Loader size="small" transparent />
|
|
32
|
-
<Loader size="xsmall" transparent />
|
|
33
|
-
<div style={{ backgroundColor: "#c9c9c9" }}>
|
|
34
|
-
<h2>Varianter</h2>
|
|
35
|
-
<Loader size="xlarge" variant="neutral" />
|
|
36
|
-
<Loader size="xlarge" variant="interaction" />
|
|
37
|
-
<Loader size="xlarge" variant="inverted" />
|
|
38
|
-
<h2>Varianter transparent</h2>
|
|
39
|
-
<Loader size="xlarge" variant="neutral" transparent />
|
|
40
|
-
<Loader size="xlarge" variant="interaction" transparent />
|
|
41
|
-
<Loader size="xlarge" variant="inverted" transparent />
|
|
42
|
-
</div>
|
|
43
|
-
<h2>Brukt i knapper</h2>
|
|
44
|
-
<div>
|
|
45
|
-
<Button>
|
|
46
|
-
Laster...
|
|
47
|
-
<Loader />
|
|
48
|
-
</Button>
|
|
49
|
-
<Button size="small">
|
|
50
|
-
Laster...
|
|
51
|
-
<Loader />
|
|
52
|
-
</Button>
|
|
53
|
-
<h2>Variants</h2>
|
|
54
|
-
<Button variant="secondary">
|
|
55
|
-
Laster...
|
|
56
|
-
<Loader />
|
|
57
|
-
</Button>
|
|
58
|
-
<Button variant="action">
|
|
59
|
-
Laster...
|
|
60
|
-
<Loader />
|
|
61
|
-
</Button>
|
|
62
|
-
<Button variant="danger">
|
|
63
|
-
Laster...
|
|
64
|
-
<Loader />
|
|
65
|
-
</Button>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
};
|