@navikt/ds-react 6.5.0 → 6.6.1
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/cjs/collapsible/Collapsible.context.d.ts +48 -0
- package/cjs/collapsible/Collapsible.context.js +10 -0
- package/cjs/collapsible/Collapsible.context.js.map +1 -0
- package/cjs/collapsible/Collapsible.d.ts +48 -0
- package/cjs/collapsible/Collapsible.js +91 -0
- package/cjs/collapsible/Collapsible.js.map +1 -0
- package/cjs/collapsible/Collapsible.types.d.ts +19 -0
- package/cjs/collapsible/Collapsible.types.js +3 -0
- package/cjs/collapsible/Collapsible.types.js.map +1 -0
- package/cjs/collapsible/index.d.ts +3 -0
- package/cjs/collapsible/index.js +14 -0
- package/cjs/collapsible/index.js.map +1 -0
- package/cjs/collapsible/parts/Collapsible.Content.d.ts +10 -0
- package/cjs/collapsible/parts/Collapsible.Content.js +48 -0
- package/cjs/collapsible/parts/Collapsible.Content.js.map +1 -0
- package/cjs/collapsible/parts/Collapsible.Trigger.d.ts +10 -0
- package/cjs/collapsible/parts/Collapsible.Trigger.js +49 -0
- package/cjs/collapsible/parts/Collapsible.Trigger.js.map +1 -0
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js +2 -4
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/cjs/form/combobox/Input/Input.js +6 -1
- package/cjs/form/combobox/Input/Input.js.map +1 -1
- package/cjs/form/form-summary/FormSummary.d.ts +82 -0
- package/cjs/form/form-summary/FormSummary.js +81 -0
- package/cjs/form/form-summary/FormSummary.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryAnswer.d.ts +11 -0
- package/cjs/form/form-summary/FormSummaryAnswer.js +25 -0
- package/cjs/form/form-summary/FormSummaryAnswer.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryAnswers.d.ts +9 -0
- package/cjs/form/form-summary/FormSummaryAnswers.js +48 -0
- package/cjs/form/form-summary/FormSummaryAnswers.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryEditLink.d.ts +17 -0
- package/cjs/form/form-summary/FormSummaryEditLink.js +49 -0
- package/cjs/form/form-summary/FormSummaryEditLink.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryHeader.d.ts +9 -0
- package/cjs/form/form-summary/FormSummaryHeader.js +48 -0
- package/cjs/form/form-summary/FormSummaryHeader.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryHeading.d.ts +14 -0
- package/cjs/form/form-summary/FormSummaryHeading.js +31 -0
- package/cjs/form/form-summary/FormSummaryHeading.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryLabel.d.ts +6 -0
- package/cjs/form/form-summary/FormSummaryLabel.js +45 -0
- package/cjs/form/form-summary/FormSummaryLabel.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryValue.d.ts +6 -0
- package/cjs/form/form-summary/FormSummaryValue.js +49 -0
- package/cjs/form/form-summary/FormSummaryValue.js.map +1 -0
- package/cjs/form/form-summary/index.d.ts +8 -0
- package/cjs/form/form-summary/index.js +24 -0
- package/cjs/form/form-summary/index.js.map +1 -0
- package/cjs/index.d.ts +3 -2
- package/cjs/index.js +5 -3
- package/cjs/index.js.map +1 -1
- package/cjs/layout/stack/Spacer.js +1 -1
- package/cjs/layout/stack/Spacer.js.map +1 -1
- package/cjs/util/hooks/descendants/descendant.js +10 -1
- package/cjs/util/hooks/descendants/descendant.js.map +1 -1
- package/cjs/util/hooks/descendants/useDescendant.js +0 -5
- package/cjs/util/hooks/descendants/useDescendant.js.map +1 -1
- package/esm/collapsible/Collapsible.context.d.ts +48 -0
- package/esm/collapsible/Collapsible.context.js +6 -0
- package/esm/collapsible/Collapsible.context.js.map +1 -0
- package/esm/collapsible/Collapsible.d.ts +48 -0
- package/esm/collapsible/Collapsible.js +62 -0
- package/esm/collapsible/Collapsible.js.map +1 -0
- package/esm/collapsible/Collapsible.types.d.ts +19 -0
- package/esm/collapsible/Collapsible.types.js +2 -0
- package/esm/collapsible/Collapsible.types.js.map +1 -0
- package/esm/collapsible/index.d.ts +3 -0
- package/esm/collapsible/index.js +5 -0
- package/esm/collapsible/index.js.map +1 -0
- package/esm/collapsible/parts/Collapsible.Content.d.ts +10 -0
- package/esm/collapsible/parts/Collapsible.Content.js +22 -0
- package/esm/collapsible/parts/Collapsible.Content.js.map +1 -0
- package/esm/collapsible/parts/Collapsible.Trigger.d.ts +10 -0
- package/esm/collapsible/parts/Collapsible.Trigger.js +23 -0
- package/esm/collapsible/parts/Collapsible.Trigger.js.map +1 -0
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js +2 -4
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/esm/form/combobox/Input/Input.js +6 -1
- package/esm/form/combobox/Input/Input.js.map +1 -1
- package/esm/form/form-summary/FormSummary.d.ts +82 -0
- package/esm/form/form-summary/FormSummary.js +52 -0
- package/esm/form/form-summary/FormSummary.js.map +1 -0
- package/esm/form/form-summary/FormSummaryAnswer.d.ts +11 -0
- package/esm/form/form-summary/FormSummaryAnswer.js +19 -0
- package/esm/form/form-summary/FormSummaryAnswer.js.map +1 -0
- package/esm/form/form-summary/FormSummaryAnswers.d.ts +9 -0
- package/esm/form/form-summary/FormSummaryAnswers.js +19 -0
- package/esm/form/form-summary/FormSummaryAnswers.js.map +1 -0
- package/esm/form/form-summary/FormSummaryEditLink.d.ts +17 -0
- package/esm/form/form-summary/FormSummaryEditLink.js +20 -0
- package/esm/form/form-summary/FormSummaryEditLink.js.map +1 -0
- package/esm/form/form-summary/FormSummaryHeader.d.ts +9 -0
- package/esm/form/form-summary/FormSummaryHeader.js +19 -0
- package/esm/form/form-summary/FormSummaryHeader.js.map +1 -0
- package/esm/form/form-summary/FormSummaryHeading.d.ts +14 -0
- package/esm/form/form-summary/FormSummaryHeading.js +5 -0
- package/esm/form/form-summary/FormSummaryHeading.js.map +1 -0
- package/esm/form/form-summary/FormSummaryLabel.d.ts +6 -0
- package/esm/form/form-summary/FormSummaryLabel.js +19 -0
- package/esm/form/form-summary/FormSummaryLabel.js.map +1 -0
- package/esm/form/form-summary/FormSummaryValue.d.ts +6 -0
- package/esm/form/form-summary/FormSummaryValue.js +20 -0
- package/esm/form/form-summary/FormSummaryValue.js.map +1 -0
- package/esm/form/form-summary/index.d.ts +8 -0
- package/esm/form/form-summary/index.js +10 -0
- package/esm/form/form-summary/index.js.map +1 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -1
- package/esm/layout/stack/Spacer.js +1 -1
- package/esm/layout/stack/Spacer.js.map +1 -1
- package/esm/util/hooks/descendants/descendant.js +10 -1
- package/esm/util/hooks/descendants/descendant.js.map +1 -1
- package/esm/util/hooks/descendants/useDescendant.js +0 -5
- package/esm/util/hooks/descendants/useDescendant.js.map +1 -1
- package/package.json +15 -4
- package/src/collapsible/Collapsible.context.tsx +32 -0
- package/src/collapsible/Collapsible.tsx +100 -0
- package/src/collapsible/Collapsible.types.ts +19 -0
- package/src/collapsible/index.ts +10 -0
- package/src/collapsible/parts/Collapsible.Content.tsx +39 -0
- package/src/collapsible/parts/Collapsible.Trigger.tsx +42 -0
- package/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx +9 -1
- package/src/form/combobox/Input/Input.tsx +5 -0
- package/src/form/form-summary/FormSummary.tsx +106 -0
- package/src/form/form-summary/FormSummaryAnswer.tsx +27 -0
- package/src/form/form-summary/FormSummaryAnswers.tsx +25 -0
- package/src/form/form-summary/FormSummaryEditLink.tsx +35 -0
- package/src/form/form-summary/FormSummaryHeader.tsx +25 -0
- package/src/form/form-summary/FormSummaryHeading.tsx +23 -0
- package/src/form/form-summary/FormSummaryLabel.tsx +17 -0
- package/src/form/form-summary/FormSummaryValue.tsx +24 -0
- package/src/form/form-summary/index.ts +30 -0
- package/src/index.ts +16 -15
- package/src/layout/stack/Spacer.tsx +1 -1
- package/src/util/hooks/descendants/descendant.ts +15 -1
- package/src/util/hooks/descendants/useDescendant.tsx +0 -5
- package/src/accordion/accordion.stories.tsx +0 -286
- package/src/alert/alert.stories.tsx +0 -306
- package/src/button/button.stories.tsx +0 -185
- package/src/chat/chat.stories.tsx +0 -341
- package/src/chips/chips.stories.tsx +0 -260
- package/src/copybutton/copy-button.stories.tsx +0 -261
- package/src/date/datepicker/datepicker.stories.tsx +0 -614
- package/src/date/monthpicker/monthpicker.stories.tsx +0 -221
- package/src/dropdown/dropdown.stories.tsx +0 -124
- package/src/expansion-card/expansion-card.stories.tsx +0 -282
- package/src/form/checkbox/checkbox.stories.tsx +0 -281
- package/src/form/combobox/combobox.stories.tsx +0 -626
- package/src/form/confirmation-panel/confirmation-panel.stories.tsx +0 -128
- package/src/form/error-summary/error-summary.stories.tsx +0 -81
- package/src/form/fieldset/fieldset.stories.tsx +0 -157
- package/src/form/file-upload/file-upload-dropzone.stories.tsx +0 -123
- package/src/form/file-upload/file-upload-item.stories.tsx +0 -148
- package/src/form/file-upload/file-upload.stories.tsx +0 -248
- package/src/form/radio/radio.stories.tsx +0 -230
- package/src/form/search/search.stories.tsx +0 -238
- package/src/form/select/select.stories.tsx +0 -172
- package/src/form/switch/switch.stories.tsx +0 -171
- package/src/form/textarea/textarea.stories.tsx +0 -254
- package/src/form/textfield/text-field.stories.tsx +0 -143
- package/src/guide-panel/guidepanel.stories.tsx +0 -90
- package/src/help-text/help-text.stories.tsx +0 -91
- package/src/internal-header/header.stories.tsx +0 -229
- package/src/layout/bleed/Bleed.stories.tsx +0 -395
- package/src/layout/box/Box.stories.tsx +0 -380
- package/src/layout/grid/h-grid.stories.tsx +0 -122
- package/src/layout/page/Page.stories.tsx +0 -271
- package/src/layout/responsive/hide.stories.tsx +0 -80
- package/src/layout/responsive/show.stories.tsx +0 -80
- package/src/layout/sidemal-test/navno-sidemal.stories.tsx +0 -69
- package/src/layout/stack/stack.stories.tsx +0 -183
- package/src/link/stories/link.stories.tsx +0 -304
- package/src/link-panel/link-panel.stories.tsx +0 -59
- package/src/list/list.stories.tsx +0 -280
- package/src/loader/loader.stories.tsx +0 -82
- package/src/modal/modal.stories.tsx +0 -391
- package/src/pagination/pagination.stories.tsx +0 -110
- package/src/popover/popover.stories.tsx +0 -113
- package/src/portal/Portal.stories.tsx +0 -102
- package/src/read-more/readmore.stories.tsx +0 -91
- package/src/skeleton/skeleton.stories.tsx +0 -130
- package/src/stepper/stepper.stories.tsx +0 -200
- package/src/table/stories/table-1.stories.tsx +0 -292
- package/src/table/stories/table-2-expandable.stories.tsx +0 -298
- package/src/table/stories/table-3-async.stories.tsx +0 -179
- package/src/table/stories/tests/table.stories.tsx +0 -102
- package/src/tabs/Tabs.stories.tsx +0 -311
- package/src/tag/tag.stories.tsx +0 -126
- package/src/timeline/timeline.stories.tsx +0 -445
- package/src/toggle-group/ToggleGroup.stories.tsx +0 -198
- package/src/tooltip/tooltip.stories.tsx +0 -101
- package/src/typography/stories/bodylong.stories.tsx +0 -209
- package/src/typography/stories/bodyshort.stories.tsx +0 -208
- package/src/typography/stories/detail.stories.tsx +0 -115
- package/src/typography/stories/error-message.stories.tsx +0 -122
- package/src/typography/stories/heading.stories.tsx +0 -169
- package/src/typography/stories/label.stories.tsx +0 -131
- package/src/util/hooks/descendants/descendant.stories.tsx +0 -147
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box } from "../layout/box";
|
|
3
|
-
import { Provider } from "../provider";
|
|
4
|
-
import { Portal } from "./Portal";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Utilities/Portal",
|
|
8
|
-
parameters: {
|
|
9
|
-
chromatic: { disable: true },
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const Default = () => {
|
|
14
|
-
return (
|
|
15
|
-
<Box background="surface-neutral-subtle">
|
|
16
|
-
<h1>In regular DOM tree</h1>
|
|
17
|
-
<p>
|
|
18
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus
|
|
19
|
-
necessitatibus quis esse nesciunt est velit voluptatibus. Distinctio eum
|
|
20
|
-
commodi tempora unde. Nulla vel tempora incidunt? Voluptatem molestias
|
|
21
|
-
impedit commodi. Tenetur!
|
|
22
|
-
</p>
|
|
23
|
-
<Portal>
|
|
24
|
-
<h1>Inside Portal to different DOM tree</h1>
|
|
25
|
-
<p>
|
|
26
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus
|
|
27
|
-
necessitatibus quis esse nesciunt est velit voluptatibus. Distinctio
|
|
28
|
-
eum commodi tempora unde. Nulla vel tempora incidunt? Voluptatem
|
|
29
|
-
molestias impedit commodi. Tenetur!
|
|
30
|
-
</p>
|
|
31
|
-
</Portal>
|
|
32
|
-
</Box>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const CustomPortalRoot = () => {
|
|
37
|
-
const [portalContainer, setPortalContainer] =
|
|
38
|
-
React.useState<HTMLDivElement | null>(null);
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Box background="surface-neutral-subtle">
|
|
42
|
-
<Box background="surface-alt-1-subtle">
|
|
43
|
-
<h1>Tree A</h1>
|
|
44
|
-
<Portal rootElement={portalContainer}>
|
|
45
|
-
<p>This is mounted to Tree B, while created inside Tree A</p>
|
|
46
|
-
</Portal>
|
|
47
|
-
</Box>
|
|
48
|
-
<Box background="surface-alt-3-subtle" ref={setPortalContainer}>
|
|
49
|
-
<h1>Tree B</h1>
|
|
50
|
-
</Box>
|
|
51
|
-
</Box>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const CustomPortalRootFromProvider = () => {
|
|
56
|
-
const [portalContainer, setPortalContainer] =
|
|
57
|
-
React.useState<HTMLDivElement>();
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<Provider rootElement={portalContainer}>
|
|
61
|
-
<Box background="surface-neutral-subtle">
|
|
62
|
-
<Box background="surface-alt-1-subtle">
|
|
63
|
-
<h1>Tree A</h1>
|
|
64
|
-
<Portal>
|
|
65
|
-
<p>This is mounted to Tree B, while created inside Tree A</p>
|
|
66
|
-
</Portal>
|
|
67
|
-
</Box>
|
|
68
|
-
<Box
|
|
69
|
-
background="surface-alt-3-subtle"
|
|
70
|
-
ref={(el) => el && setPortalContainer(el)}
|
|
71
|
-
>
|
|
72
|
-
<h1>Tree B</h1>
|
|
73
|
-
</Box>
|
|
74
|
-
</Box>
|
|
75
|
-
</Provider>
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const AsChild = () => {
|
|
80
|
-
return (
|
|
81
|
-
<Box background="surface-neutral-subtle">
|
|
82
|
-
<h1>In regular DOM tree</h1>
|
|
83
|
-
<p>
|
|
84
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus
|
|
85
|
-
necessitatibus quis esse nesciunt est velit voluptatibus. Distinctio eum
|
|
86
|
-
commodi tempora unde. Nulla vel tempora incidunt? Voluptatem molestias
|
|
87
|
-
impedit commodi. Tenetur!
|
|
88
|
-
</p>
|
|
89
|
-
<Portal asChild>
|
|
90
|
-
<div data-this-is-the-child>
|
|
91
|
-
<h1>Inside Portal to different DOM tree</h1>
|
|
92
|
-
<p>
|
|
93
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus
|
|
94
|
-
necessitatibus quis esse nesciunt est velit voluptatibus. Distinctio
|
|
95
|
-
eum commodi tempora unde. Nulla vel tempora incidunt? Voluptatem
|
|
96
|
-
molestias impedit commodi. Tenetur!
|
|
97
|
-
</p>
|
|
98
|
-
</div>
|
|
99
|
-
</Portal>
|
|
100
|
-
</Box>
|
|
101
|
-
);
|
|
102
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { fn } from "@storybook/test";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ReadMore } from ".";
|
|
5
|
-
import { VStack } from "../layout/stack";
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: "ds-react/ReadMore",
|
|
9
|
-
component: ReadMore,
|
|
10
|
-
parameters: {
|
|
11
|
-
chromatic: { disable: true },
|
|
12
|
-
},
|
|
13
|
-
} satisfies Meta<typeof ReadMore>;
|
|
14
|
-
|
|
15
|
-
type Story = StoryObj<typeof ReadMore>;
|
|
16
|
-
|
|
17
|
-
const Content = (
|
|
18
|
-
<div style={{ maxWidth: 300 }}>
|
|
19
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia, tempore
|
|
20
|
-
corporis exercitationem minus dignissimos eius aspernatur fugiat iusto.
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export const Default: Story = {
|
|
25
|
-
args: {
|
|
26
|
-
size: "medium",
|
|
27
|
-
defaultOpen: false,
|
|
28
|
-
onOpenChange: fn(),
|
|
29
|
-
children: Content,
|
|
30
|
-
header: "Grunnen til at vi spør om dette og i tillegg ber om vedlegg",
|
|
31
|
-
},
|
|
32
|
-
argTypes: {
|
|
33
|
-
size: {
|
|
34
|
-
options: ["medium", "small"],
|
|
35
|
-
control: { type: "radio" },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const Small: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
...Default.args,
|
|
43
|
-
size: "small",
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const DefaultOpen: Story = {
|
|
48
|
-
args: {
|
|
49
|
-
...Default.args,
|
|
50
|
-
defaultOpen: true,
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const Open: Story = {
|
|
55
|
-
args: {
|
|
56
|
-
...Default.args,
|
|
57
|
-
open: true,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const Chromatic: Story = {
|
|
62
|
-
render: () => {
|
|
63
|
-
return (
|
|
64
|
-
<VStack gap="4">
|
|
65
|
-
<div>
|
|
66
|
-
<h2>Default</h2>
|
|
67
|
-
{/* @ts-expect-error Args are partial, leading to required prop mismatch */}
|
|
68
|
-
<ReadMore {...Default.args} />
|
|
69
|
-
</div>
|
|
70
|
-
<div>
|
|
71
|
-
<h2>Small</h2>
|
|
72
|
-
{/* @ts-expect-error Args are partial, leading to required prop mismatch */}
|
|
73
|
-
<ReadMore {...Small.args} />
|
|
74
|
-
</div>
|
|
75
|
-
<div>
|
|
76
|
-
<h2>DefaultOpen</h2>
|
|
77
|
-
{/* @ts-expect-error Args are partial, leading to required prop mismatch */}
|
|
78
|
-
<ReadMore {...DefaultOpen.args} />
|
|
79
|
-
</div>
|
|
80
|
-
<div>
|
|
81
|
-
<h2>Controlled open</h2>
|
|
82
|
-
{/* @ts-expect-error Args are partial, leading to required prop mismatch */}
|
|
83
|
-
<ReadMore {...Open.args} />
|
|
84
|
-
</div>
|
|
85
|
-
</VStack>
|
|
86
|
-
);
|
|
87
|
-
},
|
|
88
|
-
parameters: {
|
|
89
|
-
chromatic: { disable: false },
|
|
90
|
-
},
|
|
91
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Skeleton } from ".";
|
|
3
|
-
import { Alert } from "../alert";
|
|
4
|
-
import { Button } from "../button";
|
|
5
|
-
import { Checkbox } from "../form/checkbox";
|
|
6
|
-
import { BodyLong, Heading } from "../typography";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: "ds-react/Skeleton",
|
|
10
|
-
component: Skeleton,
|
|
11
|
-
decorators: [
|
|
12
|
-
(Story) => (
|
|
13
|
-
<div style={{ display: "grid", gap: "0.5rem" }}>
|
|
14
|
-
<Story />
|
|
15
|
-
</div>
|
|
16
|
-
),
|
|
17
|
-
],
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const Default = {
|
|
21
|
-
render: () => (
|
|
22
|
-
<div>
|
|
23
|
-
<Skeleton>
|
|
24
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
|
|
25
|
-
voluptas sint dolore omnis quia consequatur beatae vero cum officia
|
|
26
|
-
debitis. Quidem debitis omnis reprehenderit nobis rerum. Nulla, magnam?
|
|
27
|
-
Saepe, eveniet? Test
|
|
28
|
-
</Skeleton>
|
|
29
|
-
<Skeleton>
|
|
30
|
-
<Alert variant="info">
|
|
31
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
|
|
32
|
-
voluptas sint dolore omnis quia consequatur beatae vero cum officia
|
|
33
|
-
debitis. Quidem debitis omnis reprehenderit nobis rerum. Nulla,
|
|
34
|
-
magnam? Saepe, eveniet?
|
|
35
|
-
</Alert>
|
|
36
|
-
</Skeleton>
|
|
37
|
-
<Skeleton>
|
|
38
|
-
<BodyLong>
|
|
39
|
-
Quidem debitis omnis reprehenderit nobis rerum. Nulla, magnam? Saepe,
|
|
40
|
-
eveniet?
|
|
41
|
-
</BodyLong>
|
|
42
|
-
<Checkbox value="test">Valg 1</Checkbox>
|
|
43
|
-
<Checkbox value="tes2">Valg 2</Checkbox>
|
|
44
|
-
<div style={{ display: "flex", gap: "2rem" }}>
|
|
45
|
-
<Button>Send inn</Button>
|
|
46
|
-
<Button>Tilbake</Button>
|
|
47
|
-
</div>
|
|
48
|
-
</Skeleton>
|
|
49
|
-
</div>
|
|
50
|
-
),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const Shapes = {
|
|
54
|
-
render: () => (
|
|
55
|
-
<>
|
|
56
|
-
<Skeleton variant="text"></Skeleton>
|
|
57
|
-
<Skeleton variant="circle" width={60} height={60}></Skeleton>
|
|
58
|
-
<Skeleton variant="rectangle" width={200} height={40}></Skeleton>
|
|
59
|
-
<Skeleton variant="rounded" width={200} height={40}></Skeleton>
|
|
60
|
-
</>
|
|
61
|
-
),
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const WrappingComponents = {
|
|
65
|
-
render: () => (
|
|
66
|
-
<Skeleton style={{ display: "grid", gap: "0.5rem" }}>
|
|
67
|
-
<BodyLong>
|
|
68
|
-
Quidem debitis omnis reprehenderit nobis rerum. Nulla, magnam? Saepe,
|
|
69
|
-
eveniet?
|
|
70
|
-
</BodyLong>
|
|
71
|
-
<Checkbox value="test">Valg 1</Checkbox>
|
|
72
|
-
<Checkbox value="tes2">Valg 2</Checkbox>
|
|
73
|
-
<div style={{ display: "flex", gap: "2rem" }}>
|
|
74
|
-
<Button>Send inn</Button>
|
|
75
|
-
<Button>Tilbake</Button>
|
|
76
|
-
</div>
|
|
77
|
-
</Skeleton>
|
|
78
|
-
),
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const TextSizing = {
|
|
82
|
-
render: () => (
|
|
83
|
-
<div style={{ display: "grid", width: 300 }}>
|
|
84
|
-
<Skeleton>
|
|
85
|
-
<Heading level="1" size="xlarge">
|
|
86
|
-
Placeholder
|
|
87
|
-
</Heading>
|
|
88
|
-
</Skeleton>
|
|
89
|
-
<Skeleton>
|
|
90
|
-
<BodyLong>Placeholder</BodyLong>
|
|
91
|
-
</Skeleton>
|
|
92
|
-
<BodyLong as={Skeleton}>Placeholder</BodyLong>
|
|
93
|
-
</div>
|
|
94
|
-
),
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const NativeText = {
|
|
98
|
-
render: () => (
|
|
99
|
-
<div>
|
|
100
|
-
<h1>
|
|
101
|
-
<Skeleton>
|
|
102
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
|
|
103
|
-
voluptas sint dolore omnis quia consequatur beatae vero cum officia
|
|
104
|
-
debitis. Quidem debitis omnis reprehenderit nobis rerum. Nulla,
|
|
105
|
-
magnam? Saepe, eveniet?
|
|
106
|
-
</Skeleton>
|
|
107
|
-
</h1>
|
|
108
|
-
<Skeleton>
|
|
109
|
-
<p>
|
|
110
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
|
|
111
|
-
voluptas sint dolore omnis quia consequatur beatae vero cum officia
|
|
112
|
-
debitis. Quidem debitis omnis reprehenderit nobis rerum. Nulla,
|
|
113
|
-
magnam? Saepe, eveniet?
|
|
114
|
-
</p>
|
|
115
|
-
</Skeleton>
|
|
116
|
-
</div>
|
|
117
|
-
),
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const InlineText = {
|
|
121
|
-
render: () => (
|
|
122
|
-
<BodyLong>
|
|
123
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
|
|
124
|
-
voluptas sint dolore <Skeleton width="40px" as="span" variant="text" />{" "}
|
|
125
|
-
beatae vero cum officia debitis. Quidem debitis omnis reprehenderit nobis{" "}
|
|
126
|
-
<Skeleton as="span">test text</Skeleton> rerum. Nulla, magnam? Saepe,
|
|
127
|
-
eveniet?
|
|
128
|
-
</BodyLong>
|
|
129
|
-
),
|
|
130
|
-
};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { BodyLong } from "../typography";
|
|
4
|
-
import Stepper from "./Stepper";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof Stepper> = {
|
|
7
|
-
title: "ds-react/Stepper",
|
|
8
|
-
component: Stepper,
|
|
9
|
-
argTypes: {
|
|
10
|
-
orientation: {
|
|
11
|
-
control: { type: "radio" },
|
|
12
|
-
options: ["horizontal", "vertical"],
|
|
13
|
-
},
|
|
14
|
-
activeStep: {
|
|
15
|
-
control: { type: "number" },
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export default meta;
|
|
20
|
-
|
|
21
|
-
const storyTexts = [
|
|
22
|
-
"Minimize backwards overflow agile. Horsehead offer commitment to the cause nor copy and paste from stack overflow problem territories, innovation is hot right now for can you slack it to me?. High touch client table the discussion , and get buy-in so manage expectations loop back, please advise soonest. We need a paradigm shift dogpile that, and i need to pee and then go to another meeting for let's prioritize the low-hanging fruit.",
|
|
23
|
-
"Customer centric sorry i didn't get your email proceduralize, and first-order optimal strategies. I dont care if you got some copy, why you dont use officeipsumcom or something like that ? wheelhouse. Viral engagement new economy, this proposal is a win-win situation which will cause a stellar paradigm shift, and produce a multi-fold increase in deliverables Bob called an all-hands this afternoon. Fire up your browser touch base innovation is hot right now so this medium needs to be more dynamic.",
|
|
24
|
-
"Touch base define the underlying principles that drive decisions and strategy for your design language. I have zero cycles for this. Cadence social currency, for low engagement execute . Deliverables rehydrate the team or let's circle back to that those options are already baked in with this model teams were able to drive adoption and awareness we need to start advertising on social media circle back. Through the lens of face time.",
|
|
25
|
-
"Take five, punch the tree, and come back in here with a clear head those options are already baked in with this model ultimate measure of success and we need to crystallize a plan yet open door policy who's responsible for the ask for this request? what do you feel you would bring to the table if you were hired for this position. Wiggle room guerrilla marketing shelfware. Code feature creep can we parallel path lose client to 10:00 meeting hire the best manage expectations root-and-branch review.",
|
|
26
|
-
"Curate downselect tread it daily cc me on that due diligence, or close the loop. All hands on deck my supervisor didn't like the latest revision you gave me can you switch back to the first revision? ping me or game-plan, yet make it a priority, on this journey win-win. Our competitors are jumping the shark we need to build it so that it scales post launch future-proof can we align on lunch orders. Deliverables message the initiative.",
|
|
27
|
-
"Out of scope poop, so pre launch. I just wanted to give you a heads-up wiggle room cc me on that I have been doing some research this morning and we need to better, nor dog and pony show prioritize these line items so UX. Big data upstream selling circle back, in an ideal world. Get all your ducks in a row land it in region so code so one-sheet. Action item we need to think big start small and scale fast to energize our clients. Cta due diligence, for this vendor is incompetent nor forcing function and circle back and low engagement.",
|
|
28
|
-
"Move the needle a loss a day will keep you focus yet can you put it into a banner that is not alarming, but eye catching and not too giant or strategic fit, nor it is all exactly as i said, but i don't like it or streamline. We've bootstrapped the model. This proposal is a win-win situation which will cause a stellar paradigm shift, and produce a multi-fold increase in deliverables the horse is out of the barn usabiltiy, for going forward but going forward.",
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
export const Default = ({ asButton, ...props }) => {
|
|
32
|
-
const [activeStep, setActiveStep] = useState(1);
|
|
33
|
-
|
|
34
|
-
const newProps = {
|
|
35
|
-
onClick: (e) => e.preventDefault(),
|
|
36
|
-
...(asButton ? { as: "button" } : { href: "#" }),
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<div style={{ display: "flex", gap: "10rem", flexDirection: "column" }}>
|
|
41
|
-
<Stepper
|
|
42
|
-
aria-labelledby="stepper-heading"
|
|
43
|
-
activeStep={activeStep}
|
|
44
|
-
onStepChange={setActiveStep}
|
|
45
|
-
orientation="vertical"
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
<Stepper.Step {...newProps} completed={props.completed}>
|
|
49
|
-
Start søknad
|
|
50
|
-
</Stepper.Step>
|
|
51
|
-
<Stepper.Step {...newProps}>Personopplysninger</Stepper.Step>
|
|
52
|
-
<Stepper.Step {...newProps} completed={props.completed}>
|
|
53
|
-
Saksopplysninger
|
|
54
|
-
</Stepper.Step>
|
|
55
|
-
<Stepper.Step {...newProps} completed={props.completed}>
|
|
56
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som må beskrives og
|
|
57
|
-
forklares i sitt fulle i denne labelen
|
|
58
|
-
</Stepper.Step>
|
|
59
|
-
<Stepper.Step {...newProps}>Vedlegg</Stepper.Step>
|
|
60
|
-
<Stepper.Step {...newProps}>Oppsummering</Stepper.Step>
|
|
61
|
-
<Stepper.Step {...newProps}>Innsending</Stepper.Step>
|
|
62
|
-
</Stepper>
|
|
63
|
-
<BodyLong style={{ marginTop: "5rem" }}>
|
|
64
|
-
{storyTexts[activeStep]}
|
|
65
|
-
</BodyLong>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
Default.args = {
|
|
70
|
-
asButton: false,
|
|
71
|
-
interactive: true,
|
|
72
|
-
completed: false,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const Horizontal = () => {
|
|
76
|
-
const [activeStep, setActiveStep] = useState(2);
|
|
77
|
-
const props = { onClick: (e) => e.preventDefault(), href: "#" };
|
|
78
|
-
return (
|
|
79
|
-
<Stepper
|
|
80
|
-
aria-labelledby="stepper-heading"
|
|
81
|
-
activeStep={activeStep}
|
|
82
|
-
onStepChange={setActiveStep}
|
|
83
|
-
orientation="horizontal"
|
|
84
|
-
>
|
|
85
|
-
<Stepper.Step {...props}>Start søknad</Stepper.Step>
|
|
86
|
-
<Stepper.Step {...props}>Personopplysninger</Stepper.Step>
|
|
87
|
-
<Stepper.Step {...props}>Saksopplysninger</Stepper.Step>
|
|
88
|
-
<Stepper.Step {...props}>
|
|
89
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
90
|
-
</Stepper.Step>
|
|
91
|
-
<Stepper.Step {...props}>Vedlegg</Stepper.Step>
|
|
92
|
-
<Stepper.Step {...props}>Oppsummering</Stepper.Step>
|
|
93
|
-
<Stepper.Step {...props}>Innsending</Stepper.Step>
|
|
94
|
-
</Stepper>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const Vertical = () => {
|
|
99
|
-
const [activeStep, setActiveStep] = useState(2);
|
|
100
|
-
const props = { onClick: (e) => e.preventDefault(), href: "#" };
|
|
101
|
-
return (
|
|
102
|
-
<Stepper
|
|
103
|
-
aria-labelledby="stepper-heading"
|
|
104
|
-
activeStep={activeStep}
|
|
105
|
-
onStepChange={setActiveStep}
|
|
106
|
-
orientation="vertical"
|
|
107
|
-
>
|
|
108
|
-
<Stepper.Step {...props}>Start søknad</Stepper.Step>
|
|
109
|
-
<Stepper.Step {...props}>Personopplysninger</Stepper.Step>
|
|
110
|
-
<Stepper.Step {...props}>Saksopplysninger</Stepper.Step>
|
|
111
|
-
<Stepper.Step {...props}>
|
|
112
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
113
|
-
</Stepper.Step>
|
|
114
|
-
<Stepper.Step {...props}>Vedlegg</Stepper.Step>
|
|
115
|
-
<Stepper.Step {...props}>Oppsummering</Stepper.Step>
|
|
116
|
-
<Stepper.Step {...props}>Innsending</Stepper.Step>
|
|
117
|
-
</Stepper>
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const DisplayOnly = () => {
|
|
122
|
-
return (
|
|
123
|
-
<div className="colgap">
|
|
124
|
-
<Stepper
|
|
125
|
-
aria-labelledby="stepper-heading"
|
|
126
|
-
activeStep={2}
|
|
127
|
-
orientation="vertical"
|
|
128
|
-
interactive={false}
|
|
129
|
-
>
|
|
130
|
-
<Stepper.Step completed>Start søknad</Stepper.Step>
|
|
131
|
-
<Stepper.Step completed>Personopplysninger</Stepper.Step>
|
|
132
|
-
<Stepper.Step>Saksopplysninger</Stepper.Step>
|
|
133
|
-
<Stepper.Step>
|
|
134
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
135
|
-
</Stepper.Step>
|
|
136
|
-
<Stepper.Step>Vedlegg</Stepper.Step>
|
|
137
|
-
<Stepper.Step>Oppsummering</Stepper.Step>
|
|
138
|
-
<Stepper.Step>Innsending</Stepper.Step>
|
|
139
|
-
</Stepper>
|
|
140
|
-
<Stepper
|
|
141
|
-
aria-labelledby="stepper-heading"
|
|
142
|
-
activeStep={3}
|
|
143
|
-
orientation="vertical"
|
|
144
|
-
interactive={false}
|
|
145
|
-
>
|
|
146
|
-
<Stepper.Step completed>Start søknad</Stepper.Step>
|
|
147
|
-
<Stepper.Step completed>Personopplysninger</Stepper.Step>
|
|
148
|
-
<Stepper.Step>Saksopplysninger</Stepper.Step>
|
|
149
|
-
<Stepper.Step>
|
|
150
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
151
|
-
</Stepper.Step>
|
|
152
|
-
<Stepper.Step>Vedlegg</Stepper.Step>
|
|
153
|
-
<Stepper.Step>Oppsummering</Stepper.Step>
|
|
154
|
-
<Stepper.Step>Innsending</Stepper.Step>
|
|
155
|
-
</Stepper>
|
|
156
|
-
</div>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const CompletedSteps = () => {
|
|
161
|
-
const [activeStep, setActiveStep] = useState(3);
|
|
162
|
-
return (
|
|
163
|
-
<div className="colgap">
|
|
164
|
-
<Stepper
|
|
165
|
-
aria-labelledby="stepper-heading"
|
|
166
|
-
activeStep={activeStep}
|
|
167
|
-
orientation="vertical"
|
|
168
|
-
onStepChange={(step) => setActiveStep(step)}
|
|
169
|
-
>
|
|
170
|
-
<Stepper.Step completed={activeStep > 1}>Start søknad</Stepper.Step>
|
|
171
|
-
<Stepper.Step completed>Personopplysninger</Stepper.Step>
|
|
172
|
-
<Stepper.Step completed={activeStep > 3}>Saksopplysninger</Stepper.Step>
|
|
173
|
-
<Stepper.Step completed={activeStep >= 4}>
|
|
174
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
175
|
-
</Stepper.Step>
|
|
176
|
-
<Stepper.Step completed={activeStep > 5}>Vedlegg</Stepper.Step>
|
|
177
|
-
<Stepper.Step completed={activeStep > 6}>Oppsummering</Stepper.Step>
|
|
178
|
-
<Stepper.Step completed={activeStep > 7}>Innsending</Stepper.Step>
|
|
179
|
-
</Stepper>
|
|
180
|
-
<Stepper
|
|
181
|
-
aria-labelledby="stepper-heading"
|
|
182
|
-
activeStep={activeStep - 1}
|
|
183
|
-
orientation="vertical"
|
|
184
|
-
onStepChange={(step) => setActiveStep(step)}
|
|
185
|
-
>
|
|
186
|
-
<Stepper.Step completed={activeStep > 1}>Start søknad</Stepper.Step>
|
|
187
|
-
<Stepper.Step completed={activeStep > 2}>
|
|
188
|
-
Personopplysninger
|
|
189
|
-
</Stepper.Step>
|
|
190
|
-
<Stepper.Step completed={activeStep > 3}>Saksopplysninger</Stepper.Step>
|
|
191
|
-
<Stepper.Step completed={activeStep >= 4}>
|
|
192
|
-
Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst
|
|
193
|
-
</Stepper.Step>
|
|
194
|
-
<Stepper.Step completed={activeStep > 5}>Vedlegg</Stepper.Step>
|
|
195
|
-
<Stepper.Step completed={activeStep > 6}>Oppsummering</Stepper.Step>
|
|
196
|
-
<Stepper.Step completed={activeStep > 7}>Innsending</Stepper.Step>
|
|
197
|
-
</Stepper>
|
|
198
|
-
</div>
|
|
199
|
-
);
|
|
200
|
-
};
|