@kystverket/styrbord 1.19.0 → 1.20.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/dist/src/components/designsystemet/AvatarStack/AvatarStack.stories.d.ts +0 -4
- package/dist/src/components/designsystemet/Card/Card.stories.d.ts +32 -0
- package/dist/src/components/designsystemet/Checkbox/Checkbox.stories.d.ts +9 -6
- package/dist/src/components/designsystemet/Chip/Chip.stories.d.ts +85 -0
- package/dist/src/components/designsystemet/Details/Details.stories.d.ts +4 -2
- package/dist/src/components/designsystemet/Dialog/Dialog.d.ts +23 -0
- package/dist/src/components/designsystemet/Dialog/Dialog.stories.d.ts +80 -0
- package/dist/src/components/designsystemet/List/List.stories.d.ts +17 -0
- package/dist/src/components/designsystemet/Paragraph/Paragraph.d.ts +1 -1
- package/dist/src/components/designsystemet/Popover/Popover.stories.d.ts +59 -0
- package/dist/src/components/designsystemet/Suggestion/Suggestion.stories.d.ts +37 -0
- package/dist/src/components/designsystemet/Text/Text.d.ts +1 -1
- package/dist/src/components/designsystemet/Text/Text.stories.d.ts +1 -1
- package/dist/src/components/kystverket/Typography/typography.util.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/style.js +198 -198
- package/dist/style.umd.cjs +5 -5
- package/package.json +3 -3
|
@@ -4,10 +4,6 @@ type Story = StoryFn<typeof AvatarStack>;
|
|
|
4
4
|
declare const meta: Meta<typeof AvatarStack>;
|
|
5
5
|
export default meta;
|
|
6
6
|
export declare const Preview: Story;
|
|
7
|
-
export declare const Sizes: Story;
|
|
8
|
-
export declare const Overlap: Story;
|
|
9
|
-
export declare const Gap: Story;
|
|
10
7
|
export declare const Expandable: Story;
|
|
11
8
|
export declare const WithSuffix: Story;
|
|
12
|
-
export declare const ShapeVariants: Story;
|
|
13
9
|
export declare const ExpandableWithTooltips: Story;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { CardBlock } from '@digdir/designsystemet-react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "children" | "asChild" | "variant"> & {
|
|
6
|
+
variant?: "default" | "tinted";
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
10
|
+
Block: typeof CardBlock;
|
|
11
|
+
};
|
|
12
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element)[];
|
|
13
|
+
tags: string[];
|
|
14
|
+
argTypes: {
|
|
15
|
+
variant: {
|
|
16
|
+
options: string[];
|
|
17
|
+
control: {
|
|
18
|
+
type: "radio";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const ColorVariants: Story['render'];
|
|
27
|
+
export declare const Colors: Story;
|
|
28
|
+
export declare const CardWithTitleAndIcon: Story;
|
|
29
|
+
export declare const CardWithTitle: Story;
|
|
30
|
+
export declare const CardWithLinkInTitle: Story;
|
|
31
|
+
export declare const CardAsLink: Story;
|
|
32
|
+
export declare const CardAsButton: Story;
|
|
@@ -51,8 +51,8 @@ export declare const Disabled: {
|
|
|
51
51
|
className?: string | undefined | undefined;
|
|
52
52
|
width?: number | string | undefined | undefined;
|
|
53
53
|
color?: string | undefined | undefined;
|
|
54
|
-
'data-
|
|
55
|
-
'data-
|
|
54
|
+
'data-size'?: (import("@digdir/designsystemet-types").Size | (string & {})) | undefined;
|
|
55
|
+
'data-color'?: (import("@digdir/designsystemet-types").Color | import("@digdir/designsystemet-types").SeverityColors | (string & {})) | undefined;
|
|
56
56
|
defaultChecked?: boolean | undefined | undefined;
|
|
57
57
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
58
58
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -352,6 +352,7 @@ export declare const Disabled: {
|
|
|
352
352
|
value?: string | number | readonly string[] | undefined;
|
|
353
353
|
error?: React.ReactNode;
|
|
354
354
|
variant?: "outline" | undefined;
|
|
355
|
+
position?: "start" | "end" | undefined;
|
|
355
356
|
'aria-labelledby'?: never | undefined;
|
|
356
357
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
357
358
|
key?: React.Key | null | undefined;
|
|
@@ -368,8 +369,8 @@ export declare const Disabled: {
|
|
|
368
369
|
className?: string | undefined | undefined;
|
|
369
370
|
width?: number | string | undefined | undefined;
|
|
370
371
|
color?: string | undefined | undefined;
|
|
371
|
-
'data-
|
|
372
|
-
'data-
|
|
372
|
+
'data-size'?: (import("@digdir/designsystemet-types").Size | (string & {})) | undefined;
|
|
373
|
+
'data-color'?: (import("@digdir/designsystemet-types").Color | import("@digdir/designsystemet-types").SeverityColors | (string & {})) | undefined;
|
|
373
374
|
defaultChecked?: boolean | undefined | undefined;
|
|
374
375
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
375
376
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -669,6 +670,7 @@ export declare const Disabled: {
|
|
|
669
670
|
value?: string | number | readonly string[] | undefined;
|
|
670
671
|
error?: React.ReactNode;
|
|
671
672
|
variant?: "outline" | undefined;
|
|
673
|
+
position?: "start" | "end" | undefined;
|
|
672
674
|
'aria-labelledby'?: never | undefined;
|
|
673
675
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
674
676
|
key?: React.Key | null | undefined;
|
|
@@ -685,8 +687,8 @@ export declare const Disabled: {
|
|
|
685
687
|
className?: string | undefined | undefined;
|
|
686
688
|
width?: number | string | undefined | undefined;
|
|
687
689
|
color?: string | undefined | undefined;
|
|
688
|
-
'data-
|
|
689
|
-
'data-
|
|
690
|
+
'data-size'?: (import("@digdir/designsystemet-types").Size | (string & {})) | undefined;
|
|
691
|
+
'data-color'?: (import("@digdir/designsystemet-types").Color | import("@digdir/designsystemet-types").SeverityColors | (string & {})) | undefined;
|
|
690
692
|
defaultChecked?: boolean | undefined | undefined;
|
|
691
693
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
692
694
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -986,6 +988,7 @@ export declare const Disabled: {
|
|
|
986
988
|
value?: string | number | readonly string[] | undefined;
|
|
987
989
|
error?: React.ReactNode;
|
|
988
990
|
variant?: "outline" | undefined;
|
|
991
|
+
position?: "start" | "end" | undefined;
|
|
989
992
|
'aria-labelledby'?: string | undefined;
|
|
990
993
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
991
994
|
key?: React.Key | null | undefined;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ChipButtonProps } from '~/main';
|
|
2
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
3
|
+
declare const chipVariants: readonly ["Radio", "Checkbox", "Removable", "Button"];
|
|
4
|
+
type ChipVariant = (typeof chipVariants)[number];
|
|
5
|
+
type ChipStoryArgs = {
|
|
6
|
+
variant: ChipVariant;
|
|
7
|
+
label: string;
|
|
8
|
+
color: ChipColor;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ChipColor = NonNullable<ChipButtonProps['data-color']>;
|
|
12
|
+
declare const meta: {
|
|
13
|
+
title: string;
|
|
14
|
+
component: React.FC<Omit<import("@digdir/designsystemet-react").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type">, keyof {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
17
|
+
}> & {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
20
|
+
} & {
|
|
21
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
22
|
+
}>;
|
|
23
|
+
tags: string[];
|
|
24
|
+
parameters: {
|
|
25
|
+
customStyles: {
|
|
26
|
+
display: string;
|
|
27
|
+
gap: string;
|
|
28
|
+
};
|
|
29
|
+
docs: {
|
|
30
|
+
description: {
|
|
31
|
+
component: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<ChipStoryArgs>;
|
|
38
|
+
export declare const Preview: Story;
|
|
39
|
+
/**
|
|
40
|
+
* Go into the story itself to have an option to switch between variants
|
|
41
|
+
*/
|
|
42
|
+
export declare const Sizes: Story;
|
|
43
|
+
export declare const Colors: Story;
|
|
44
|
+
export declare const Checkbox: {
|
|
45
|
+
render: (args: Omit<import("@digdir/designsystemet-react").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type">, keyof {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
48
|
+
}> & {
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
51
|
+
} & {
|
|
52
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
53
|
+
}) => React.JSX.Element;
|
|
54
|
+
};
|
|
55
|
+
export declare const Removable: {
|
|
56
|
+
render: (args: Omit<import("@digdir/designsystemet-react").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, keyof {
|
|
57
|
+
asChild?: boolean;
|
|
58
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
59
|
+
}> & {
|
|
60
|
+
asChild?: boolean;
|
|
61
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
62
|
+
} & {
|
|
63
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
64
|
+
}) => React.JSX.Element;
|
|
65
|
+
args: {
|
|
66
|
+
'aria-label': string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare const Button: {
|
|
70
|
+
render: (args: Omit<import("@digdir/designsystemet-react").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, keyof {
|
|
71
|
+
asChild?: boolean;
|
|
72
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
73
|
+
}> & {
|
|
74
|
+
asChild?: boolean;
|
|
75
|
+
'data-wrap'?: "nowrap" | "wrap";
|
|
76
|
+
} & {
|
|
77
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
78
|
+
}) => React.JSX.Element;
|
|
79
|
+
parameters: {
|
|
80
|
+
customStyles: {
|
|
81
|
+
flexWrap: string;
|
|
82
|
+
justifyContent: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -3,8 +3,10 @@ import { DetailsProps } from '@digdir/designsystemet-react';
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: React.ForwardRefExoticComponent<DetailsProps & React.RefAttributes<HTMLDetailsElement>> & {
|
|
6
|
-
Summary:
|
|
7
|
-
|
|
6
|
+
Summary: React.ForwardRefExoticComponent<{
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
Content: React.ForwardRefExoticComponent<import("@digdir/designsystemet-react").DetailsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
10
|
};
|
|
9
11
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element)[];
|
|
10
12
|
tags: string[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DialogBlock, DialogTrigger, DialogTriggerContext, type DialogProps as DSDialogProps } from '@digdir/designsystemet-react';
|
|
2
|
+
export type DialogSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type DialogProps = DSDialogProps & {
|
|
4
|
+
size?: DialogSize;
|
|
5
|
+
};
|
|
6
|
+
declare const DialogRoot: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "onClose" | "placement" | "closeButton" | "closedby" | "modal"> & {
|
|
7
|
+
closeButton?: string | false;
|
|
8
|
+
closedby?: "none" | "closerequest" | "any";
|
|
9
|
+
placement?: "center" | "left" | "right" | "top" | "bottom";
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onClose?: (event: Event) => void;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
} & {
|
|
15
|
+
size?: DialogSize;
|
|
16
|
+
} & React.RefAttributes<HTMLDialogElement>>;
|
|
17
|
+
type DialogComponent = typeof DialogRoot & {
|
|
18
|
+
TriggerContext: typeof DialogTriggerContext;
|
|
19
|
+
Trigger: typeof DialogTrigger;
|
|
20
|
+
Block: typeof DialogBlock;
|
|
21
|
+
};
|
|
22
|
+
export declare const Dialog: DialogComponent;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Dialog } from '~/main';
|
|
2
|
+
import type { StoryFn } from '@storybook/react-vite';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "onClose" | "placement" | "closeButton" | "closedby" | "modal"> & {
|
|
6
|
+
closeButton?: string | false;
|
|
7
|
+
closedby?: "none" | "closerequest" | "any";
|
|
8
|
+
placement?: "center" | "left" | "right" | "top" | "bottom";
|
|
9
|
+
modal?: boolean;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onClose?: (event: Event) => void;
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
} & {
|
|
14
|
+
size?: import("~/main").DialogSize;
|
|
15
|
+
} & React.RefAttributes<HTMLDialogElement>> & {
|
|
16
|
+
TriggerContext: {
|
|
17
|
+
(rest: import("@digdir/designsystemet-react").DialogTriggerContextProps): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Trigger: React.ForwardRefExoticComponent<Omit<Omit<import("@digdir/designsystemet-react").DefaultProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "asChild" | "loading" | "variant" | "type" | "icon" | "command" | "commandfor" | "commandFor"> & {
|
|
21
|
+
variant?: "primary" | "secondary" | "tertiary";
|
|
22
|
+
icon?: boolean;
|
|
23
|
+
loading?: boolean | import("react").ReactNode;
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
type?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
26
|
+
command?: string;
|
|
27
|
+
commandfor?: string;
|
|
28
|
+
commandFor?: string;
|
|
29
|
+
} & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
Block: React.ForwardRefExoticComponent<{
|
|
31
|
+
asChild?: boolean;
|
|
32
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
};
|
|
34
|
+
tags: string[];
|
|
35
|
+
parameters: {
|
|
36
|
+
layout: string;
|
|
37
|
+
customStyles: {
|
|
38
|
+
display: string;
|
|
39
|
+
alignItems: string;
|
|
40
|
+
justifyItems: string;
|
|
41
|
+
story: {
|
|
42
|
+
boxSizing: string;
|
|
43
|
+
height: string;
|
|
44
|
+
width: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
chromatic: {
|
|
48
|
+
disableSnapshot: boolean;
|
|
49
|
+
modes: {
|
|
50
|
+
mobile: {
|
|
51
|
+
viewport: {
|
|
52
|
+
height: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
desktop: {
|
|
56
|
+
viewport: {
|
|
57
|
+
height: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
docs: {
|
|
63
|
+
description: {
|
|
64
|
+
component: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
play: (ctx: import("storybook/internal/csf").PlayFunctionContext<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>) => Promise<void>;
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
71
|
+
export declare const Preview: StoryFn<typeof Dialog>;
|
|
72
|
+
export declare const WithoutDialogTriggerContext: StoryFn<typeof Dialog>;
|
|
73
|
+
export declare const DialogWithOpenProp: StoryFn<typeof Dialog>;
|
|
74
|
+
export declare const BackdropClosedbyAny: StoryFn<typeof Dialog>;
|
|
75
|
+
export declare const WithHeaderAndFooter: StoryFn<typeof Dialog>;
|
|
76
|
+
export declare const DialogWithForm: StoryFn<typeof Dialog>;
|
|
77
|
+
export declare const DialogWithMaxWidth: StoryFn<typeof Dialog>;
|
|
78
|
+
export declare const DialogWithSuggestion: StoryFn<typeof Dialog>;
|
|
79
|
+
export declare const DialogNonModal: StoryFn<typeof Dialog>;
|
|
80
|
+
export declare const NestedDialogs: StoryFn<typeof Dialog>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { List } from '~/main';
|
|
2
|
+
import type { StoryFn } from '@storybook/react-vite';
|
|
3
|
+
type Story = StoryFn<typeof List.Unordered>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<{
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
} & import("@digdir/designsystemet-react").DefaultProps & Omit<React.HTMLAttributes<HTMLUListElement>, "size"> & React.RefAttributes<HTMLUListElement>>;
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
export declare const Preview: Story;
|
|
13
|
+
export declare const Sortert: StoryFn<typeof List.Ordered>;
|
|
14
|
+
export declare const Usortert: Story;
|
|
15
|
+
export declare const Innrykk: Story;
|
|
16
|
+
export declare const ListeMedLenker: Story;
|
|
17
|
+
export declare const ListeMedOverskrift: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ParagraphProps as DsParagraphProps } from '@digdir/designsystemet-react';
|
|
2
2
|
export type ParagraphProps = DsParagraphProps & {
|
|
3
3
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
-
/** @deprecated Use `
|
|
4
|
+
/** @deprecated Use `weight="medium"` instead. */
|
|
5
5
|
strong?: boolean;
|
|
6
6
|
weight?: 'regular' | 'medium' | 'semibold';
|
|
7
7
|
'data-color-subtle'?: boolean;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { StoryFn } from '@storybook/react-vite';
|
|
2
|
+
import { Popover } from '~/main';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "id" | "asChild" | "variant" | "open" | "onClose" | "placement" | "autoPlacement" | "onOpen"> & {
|
|
6
|
+
id?: string;
|
|
7
|
+
placement?: import("@digdir/designsystemet-react").Placement;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
variant?: "default" | "tinted";
|
|
10
|
+
onOpen?: () => void;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
autoPlacement?: boolean;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
15
|
+
TriggerContext: {
|
|
16
|
+
({ children }: import("@digdir/designsystemet-react").PopoverTriggerContextProps): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
Trigger: React.ForwardRefExoticComponent<import("@digdir/designsystemet-react").PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
};
|
|
21
|
+
tags: string[];
|
|
22
|
+
parameters: {
|
|
23
|
+
chromatic: {
|
|
24
|
+
disableSnapshot: boolean;
|
|
25
|
+
};
|
|
26
|
+
docs: {
|
|
27
|
+
description: {
|
|
28
|
+
component: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
argTypes: {
|
|
33
|
+
'data-color': {
|
|
34
|
+
control: "select";
|
|
35
|
+
options: (string | undefined)[];
|
|
36
|
+
};
|
|
37
|
+
'data-size': {
|
|
38
|
+
control: "radio";
|
|
39
|
+
options: string[];
|
|
40
|
+
};
|
|
41
|
+
placement: {
|
|
42
|
+
control: "select";
|
|
43
|
+
options: string[];
|
|
44
|
+
};
|
|
45
|
+
variant: {
|
|
46
|
+
control: "radio";
|
|
47
|
+
options: (string | undefined)[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
play: (ctx: import("storybook/internal/csf").PlayFunctionContext<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>) => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
53
|
+
export declare const Preview: StoryFn<typeof Popover>;
|
|
54
|
+
export declare const Interactive: StoryFn<typeof Popover>;
|
|
55
|
+
export declare const DottedUnderline: StoryFn<typeof Popover>;
|
|
56
|
+
export declare const Variants: StoryFn<typeof Popover>;
|
|
57
|
+
export declare const Controlled: StoryFn<typeof Popover>;
|
|
58
|
+
export declare const Sizes: StoryFn<typeof Popover>;
|
|
59
|
+
export declare const WithoutContext: StoryFn<typeof Popover>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (({ children, label, className, required, optional, error, ...props }: import("~/main").SuggestionProps) => React.JSX.Element) & {
|
|
5
|
+
Clear: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & {
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Empty: React.ForwardRefExoticComponent<import("@digdir/designsystemet-react").DefaultProps & React.OptionHTMLAttributes<HTMLOptionElement> & {
|
|
9
|
+
'data-empty'?: string;
|
|
10
|
+
} & React.RefAttributes<HTMLOptionElement>>;
|
|
11
|
+
Input: React.ForwardRefExoticComponent<import("@digdir/designsystemet-react").SuggestionInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
List: React.ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & React.HTMLAttributes<HTMLDataListElement>, "autoPlacement" | "singular" | "plural"> & {
|
|
13
|
+
singular?: string;
|
|
14
|
+
plural?: string;
|
|
15
|
+
autoPlacement?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDataListElement>>;
|
|
17
|
+
Option: React.ForwardRefExoticComponent<React.OptionHTMLAttributes<HTMLOptionElement> & import("@digdir/designsystemet-react").DefaultProps & React.RefAttributes<HTMLOptionElement>>;
|
|
18
|
+
};
|
|
19
|
+
tags: string[];
|
|
20
|
+
args: {
|
|
21
|
+
label: string;
|
|
22
|
+
error: string;
|
|
23
|
+
};
|
|
24
|
+
parameters: {
|
|
25
|
+
docs: {
|
|
26
|
+
description: {
|
|
27
|
+
component: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
export declare const Preview: Story;
|
|
35
|
+
export declare const Multiple: Story;
|
|
36
|
+
export declare const ControlledMultiple: Story;
|
|
37
|
+
export declare const Creatable: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ParagraphProps } from '../Paragraph/Paragraph';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
|
-
export declare const colorValues: readonly ["primary", "accent", "neutral", "extra1", "extra2", "success", "danger", "info", "warning", "focus", "hav", "stein", "gress", "sol", "
|
|
3
|
+
export declare const colorValues: readonly ["primary", "accent", "neutral", "extra1", "extra2", "success", "danger", "info", "warning", "focus", "lyng", "hav", "stein", "gress", "sol", "himmel", "sand", "fyr", "dyphav", "skog"];
|
|
4
4
|
export declare const textWrapValues: readonly ["wrap", "balance", "pretty", "nowrap"];
|
|
5
5
|
export declare const textTransformValues: readonly ["none", "capitalize", "uppercase", "lowercase"];
|
|
6
6
|
export declare const textAlignValues: readonly ["left", "center", "right", "justify"];
|
|
@@ -33,7 +33,7 @@ declare const meta: {
|
|
|
33
33
|
};
|
|
34
34
|
"data-color": {
|
|
35
35
|
control: "select";
|
|
36
|
-
options: ("info" | "warning" | "
|
|
36
|
+
options: ("info" | "warning" | "lyng" | "hav" | "stein" | "gress" | "sol" | "himmel" | "sand" | "fyr" | "dyphav" | "skog" | "primary" | "accent" | "neutral" | "extra1" | "extra2" | "success" | "danger" | "focus" | undefined)[];
|
|
37
37
|
table: {
|
|
38
38
|
defaultValue: {
|
|
39
39
|
summary: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type TypographyPrefix = 'body' | 'accent' | 'label';
|
|
2
2
|
export type AllSizes = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
3
|
-
export type TypographyColor = 'accent' | 'neutral';
|
|
4
3
|
export type TypographyWeight = 'regular' | 'medium' | 'semibold';
|
|
5
4
|
type BuildTypographyProps = {
|
|
6
5
|
type: TypographyPrefix;
|
|
@@ -9,8 +8,6 @@ type BuildTypographyProps = {
|
|
|
9
8
|
strong?: boolean;
|
|
10
9
|
weight?: TypographyWeight;
|
|
11
10
|
inline?: boolean;
|
|
12
|
-
color?: TypographyColor;
|
|
13
|
-
margin?: boolean;
|
|
14
11
|
className?: string;
|
|
15
12
|
};
|
|
16
13
|
export declare const buildTypographyClasses: ({ type, size, strong, weight, inline, className, }: BuildTypographyProps) => string;
|