@kystverket/styrbord 0.301.5
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/README.md +78 -0
- package/dist/main.js +10332 -0
- package/dist/main.umd.cjs +37 -0
- package/dist/src/components/deprecated/Card/Card.d.ts +16 -0
- package/dist/src/components/deprecated/Card/Card.stories.d.ts +37 -0
- package/dist/src/components/deprecated/Details/Details.d.ts +6 -0
- package/dist/src/components/deprecated/Details/Details.stories.d.ts +12 -0
- package/dist/src/components/deprecated/ErrorLabel/errorLabel.d.ts +8 -0
- package/dist/src/components/deprecated/ErrorLabel/errorLabel.stories.d.ts +13 -0
- package/dist/src/components/deprecated/InputLabel/inputLabel.d.ts +12 -0
- package/dist/src/components/deprecated/InputLabel/inputLabel.stories.d.ts +20 -0
- package/dist/src/components/designsystemet/Button/Button.d.ts +11 -0
- package/dist/src/components/designsystemet/Button/Button.stories.d.ts +24 -0
- package/dist/src/components/designsystemet/Card/Card.stories.d.ts +30 -0
- package/dist/src/components/designsystemet/CardTitle/CardTitle.d.ts +10 -0
- package/dist/src/components/designsystemet/Details/Details.stories.d.ts +16 -0
- package/dist/src/components/designsystemet/Link/Link.stories.d.ts +10 -0
- package/dist/src/components/designsystemet/List/List.stories.d.ts +16 -0
- package/dist/src/components/designsystemet/NumberInput/NumberInput.d.ts +23 -0
- package/dist/src/components/designsystemet/NumberInput/NumberInput.stories.d.ts +21 -0
- package/dist/src/components/designsystemet/Select/Select.d.ts +19 -0
- package/dist/src/components/designsystemet/Select/Select.stories.d.ts +13 -0
- package/dist/src/components/designsystemet/Table/Table.d.ts +17 -0
- package/dist/src/components/designsystemet/Table/Table.stories.d.ts +17 -0
- package/dist/src/components/designsystemet/Tabs/Tabs.d.ts +15 -0
- package/dist/src/components/designsystemet/Tabs/Tabs.stories.d.ts +10 -0
- package/dist/src/components/designsystemet/TextArea/TextArea.d.ts +20 -0
- package/dist/src/components/designsystemet/TextArea/TextArea.stories.d.ts +20 -0
- package/dist/src/components/designsystemet/TextInput/TextInput.d.ts +24 -0
- package/dist/src/components/designsystemet/TextInput/TextInput.stories.d.ts +20 -0
- package/dist/src/components/kystverket/Alert/alert.d.ts +15 -0
- package/dist/src/components/kystverket/Alert/alert.stories.d.ts +17 -0
- package/dist/src/components/kystverket/Alert/alert.types.d.ts +3 -0
- package/dist/src/components/kystverket/Alert/alert.util.d.ts +3 -0
- package/dist/src/components/kystverket/BorderedRadioGroup/borderedRadioGroup.d.ts +16 -0
- package/dist/src/components/kystverket/BorderedRadioGroup/borderedRadioGroup.stories.d.ts +15 -0
- package/dist/src/components/kystverket/BorderedToggleGroup/borderedToggleGroup.d.ts +17 -0
- package/dist/src/components/kystverket/BorderedToggleGroup/borderedToggleGroup.stories.d.ts +15 -0
- package/dist/src/components/kystverket/Box/box.constants.d.ts +3 -0
- package/dist/src/components/kystverket/Box/box.d.ts +35 -0
- package/dist/src/components/kystverket/Box/box.stories.d.ts +21 -0
- package/dist/src/components/kystverket/Box/box.types.d.ts +14 -0
- package/dist/src/components/kystverket/Datepicker/Datepicker.d.ts +12 -0
- package/dist/src/components/kystverket/Datepicker/Datepicker.stories.d.ts +14 -0
- package/dist/src/components/kystverket/FileUploader/FileUploader.context.d.ts +7 -0
- package/dist/src/components/kystverket/FileUploader/FileUploader.d.ts +14 -0
- package/dist/src/components/kystverket/FileUploader/FileUploader.stories.d.ts +13 -0
- package/dist/src/components/kystverket/FileUploader/FileUploader.types.d.ts +17 -0
- package/dist/src/components/kystverket/Footer/Footer.d.ts +14 -0
- package/dist/src/components/kystverket/Footer/Footer.stories.d.ts +15 -0
- package/dist/src/components/kystverket/Header/Header.d.ts +33 -0
- package/dist/src/components/kystverket/Header/Header.stories.d.ts +38 -0
- package/dist/src/components/kystverket/Icon/Icon.stories.d.ts +11 -0
- package/dist/src/components/kystverket/Icon/icon.d.ts +10 -0
- package/dist/src/components/kystverket/Icon/icon.types.d.ts +2 -0
- package/dist/src/components/kystverket/Image/image.d.ts +29 -0
- package/dist/src/components/kystverket/Image/image.stories.d.ts +12 -0
- package/dist/src/components/kystverket/LabelContent/labelContent.d.ts +8 -0
- package/dist/src/components/kystverket/LabelContent/labelContent.stories.d.ts +20 -0
- package/dist/src/components/kystverket/Logo/Logo.d.ts +9 -0
- package/dist/src/components/kystverket/Logo/Logo.stories.d.ts +21 -0
- package/dist/src/components/kystverket/Stepper/stepper.d.ts +11 -0
- package/dist/src/components/kystverket/Stepper/stepper.stories.d.ts +13 -0
- package/dist/src/components/kystverket/Summary/summary.d.ts +4 -0
- package/dist/src/components/kystverket/Summary/summary.stories.d.ts +13 -0
- package/dist/src/components/kystverket/Summary/summary.types.d.ts +26 -0
- package/dist/src/components/kystverket/Typography/typography.d.ts +26 -0
- package/dist/src/components/kystverket/Typography/typography.stories.d.ts +13 -0
- package/dist/src/components/kystverket/Typography/typography.util.d.ts +14 -0
- package/dist/src/i18n/translations.d.ts +2 -0
- package/dist/src/main.d.ts +52 -0
- package/dist/src/utils/input/input.d.ts +2 -0
- package/dist/src/utils/sizing.d.ts +5 -0
- package/dist/src/utils/types.d.ts +2 -0
- package/dist/storybook/styrbordDecorator.d.ts +5 -0
- package/dist/style.css +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BorderRadiusProps, Spacing, SpacingProps, SurfaceStyleProps } from './box.types';
|
|
3
|
+
import { ScreenSize } from '~/utils/types';
|
|
4
|
+
import { AllSizes, TypographyPrefix } from '../Typography/typography.util';
|
|
5
|
+
type WrapType = boolean | 'reverse';
|
|
6
|
+
export interface BaseBoxProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
align?: 'normal' | 'start' | 'center' | 'end' | 'stretch';
|
|
9
|
+
gap?: Spacing;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
wrap?: WrapType;
|
|
12
|
+
grow?: boolean | number;
|
|
13
|
+
shrink?: boolean | number;
|
|
14
|
+
basis?: string;
|
|
15
|
+
width?: 'auto' | 'fit' | 'full' | 'container' | 'form' | 'form-sidebar';
|
|
16
|
+
show?: ScreenSize;
|
|
17
|
+
hide?: ScreenSize;
|
|
18
|
+
font?: {
|
|
19
|
+
base?: TypographyPrefix;
|
|
20
|
+
size?: AllSizes;
|
|
21
|
+
strong?: boolean;
|
|
22
|
+
};
|
|
23
|
+
container?: 'size' | 'inline-size';
|
|
24
|
+
}
|
|
25
|
+
type VerticalBoxProps = BaseBoxProps & {
|
|
26
|
+
horizontal?: false;
|
|
27
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'stretch';
|
|
28
|
+
};
|
|
29
|
+
type HorizontalBoxProps = BaseBoxProps & {
|
|
30
|
+
horizontal: true | ScreenSize;
|
|
31
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'stretch';
|
|
32
|
+
};
|
|
33
|
+
export type BoxProps = (VerticalBoxProps | HorizontalBoxProps) & SpacingProps & BorderRadiusProps & SurfaceStyleProps;
|
|
34
|
+
declare const Box: ({ className, radius, width, gap, wrap, align, grow, shrink, basis, show, hide, container, children, ...props }: BoxProps) => React.JSX.Element;
|
|
35
|
+
export default Box;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BoxProps } from './box';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ className, radius, width, gap, wrap, align, grow, shrink, basis, show, hide, container, children, ...props }: BoxProps) => React.JSX.Element;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Horizontal: Story;
|
|
14
|
+
export declare const Gap: Story;
|
|
15
|
+
export declare const HorizontalJustifyEnd: Story;
|
|
16
|
+
export declare const HorizontalJustifyBetween: Story;
|
|
17
|
+
export declare const NoShrink: Story;
|
|
18
|
+
export declare const Spacings: Story;
|
|
19
|
+
export declare const Colors: Story;
|
|
20
|
+
export declare const WrapAndBasis: Story;
|
|
21
|
+
export declare const HorizontalBreakpoints: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { spacingKeys } from './box.constants';
|
|
2
|
+
export type Spacing = 0 | 2 | 4 | 6 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 64 | 80 | 96 | 112 | 128;
|
|
3
|
+
export type SpacingKey = (typeof spacingKeys)[number];
|
|
4
|
+
export type SpacingProps = {
|
|
5
|
+
[K in SpacingKey]?: Spacing;
|
|
6
|
+
};
|
|
7
|
+
export type BorderRadiusProps = {
|
|
8
|
+
radius?: 'sm' | 'md' | 'lg' | 'full';
|
|
9
|
+
};
|
|
10
|
+
export type SurfaceStyleProps = {
|
|
11
|
+
color?: 'action' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' | 'navy';
|
|
12
|
+
subtle?: boolean;
|
|
13
|
+
border?: 'sm' | 'md' | 'lg';
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DatepickerProps {
|
|
2
|
+
optional?: boolean | string | undefined;
|
|
3
|
+
required?: boolean | string | undefined;
|
|
4
|
+
label: string;
|
|
5
|
+
dateFormat?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
onBlur?: () => void;
|
|
9
|
+
value: Date | undefined;
|
|
10
|
+
onChange?: (date: Date | undefined) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Datepicker: ({ value, onChange, dateFormat, ...props }: DatepickerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { DatepickerProps } from './Datepicker';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: DatepickerProps) => React.JSX.Element;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithValue: Story;
|
|
14
|
+
export declare const WithError: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FileInfo } from './FileUploader.types';
|
|
2
|
+
export type FileChangeCallback = (files: FileInfo[]) => void;
|
|
3
|
+
export interface FileUploaderContextProps {
|
|
4
|
+
uploadFile: (file: FormData) => Promise<string>;
|
|
5
|
+
deleteFile: (fileId: string) => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare const FileUploaderContext: React.Context<FileUploaderContextProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FileInfo } from './FileUploader.types';
|
|
3
|
+
export interface FileUploaderProps {
|
|
4
|
+
label: string;
|
|
5
|
+
buttonLabel: string;
|
|
6
|
+
description?: string | string[] | ReactNode;
|
|
7
|
+
error?: string | null;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
files: FileInfo[];
|
|
10
|
+
maxFiles?: number;
|
|
11
|
+
onChange: (files: FileInfo[]) => void;
|
|
12
|
+
allowedFileTypes?: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare const FileUploader: ({ label, buttonLabel, description, error, multiple, files, maxFiles, onChange, allowedFileTypes, }: FileUploaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { FileUploaderProps } from './FileUploader';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: FileUploaderProps) => React.JSX.Element;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithError: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type FileStatus = 'uploading' | 'uploaded' | 'error';
|
|
2
|
+
export type FileInfo = {
|
|
3
|
+
contextId: string;
|
|
4
|
+
fileName: string;
|
|
5
|
+
storageId?: string;
|
|
6
|
+
contentType: string;
|
|
7
|
+
status: FileStatus;
|
|
8
|
+
exif?: Exif;
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
11
|
+
export interface UploadFileResponse {
|
|
12
|
+
attachmentId: string;
|
|
13
|
+
}
|
|
14
|
+
export type Exif = {
|
|
15
|
+
latitude?: number;
|
|
16
|
+
longitude?: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SupportedLanguage } from '~/utils/types';
|
|
2
|
+
interface LinkToSite {
|
|
3
|
+
text: string;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FooterProps {
|
|
7
|
+
language: SupportedLanguage;
|
|
8
|
+
contactLinks?: LinkToSite[];
|
|
9
|
+
contactLinksAsSelect?: boolean;
|
|
10
|
+
links?: LinkToSite[];
|
|
11
|
+
langLinks?: LinkToSite[];
|
|
12
|
+
}
|
|
13
|
+
export declare function Footer({ links, langLinks, language, contactLinks, contactLinksAsSelect, }: FooterProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Footer } from '~/components/kystverket/Footer/Footer';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Footer;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithLanguageLinks: Story;
|
|
14
|
+
export declare const WithContactLinks: Story;
|
|
15
|
+
export declare const WithMaritimSikringLinks: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LogoVariant, SupportedLanguage } from '~/main';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface HeaderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Utvidelse for å legge til ekstra innhold i headeren.
|
|
6
|
+
* @default undefined
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Spesifiserer språk for headeren.
|
|
11
|
+
*/
|
|
12
|
+
language: SupportedLanguage;
|
|
13
|
+
/**
|
|
14
|
+
* Spesifiserer logovarianten som brukes (standard: Kystverket) med en eventuell ekstra undertittel og navigeringslenke ved klikk
|
|
15
|
+
*/
|
|
16
|
+
logo: {
|
|
17
|
+
/**
|
|
18
|
+
* Undertittel for logoen.
|
|
19
|
+
* @default undefined
|
|
20
|
+
*/
|
|
21
|
+
title?: string;
|
|
22
|
+
/**
|
|
23
|
+
* URL for logoen.
|
|
24
|
+
*/
|
|
25
|
+
url: string;
|
|
26
|
+
/**
|
|
27
|
+
* Logovariant.
|
|
28
|
+
* @default 'blue-horizontal'
|
|
29
|
+
*/
|
|
30
|
+
variant?: LogoVariant;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function Header({ children, language, logo: { title, variant, url }, }: HeaderProps): React.JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
import { SupportedLanguage } from '~/main';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof Header;
|
|
7
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
children: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "object";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
language: {
|
|
16
|
+
control: {
|
|
17
|
+
type: "select";
|
|
18
|
+
options: SupportedLanguage[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
logo: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "object";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export declare const Default: Story;
|
|
31
|
+
export declare const Kystverket: Story;
|
|
32
|
+
export declare const MedUndertittel: Story;
|
|
33
|
+
export declare const Datakatalog: Story;
|
|
34
|
+
export declare const Fyr: Story;
|
|
35
|
+
export declare const Hais: Story;
|
|
36
|
+
export declare const Pfsa: Story;
|
|
37
|
+
export declare const Saksbehandling: Story;
|
|
38
|
+
export declare const Selvbetjening: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StoryFn } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ material, filled, className, size }: import("~/components/kystverket/Icon/icon").MaterialIconProps) => React.JSX.Element;
|
|
5
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export declare const IconShowcase: StoryFn;
|
|
11
|
+
export declare const IconSizing: StoryFn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconId } from './icon.types';
|
|
2
|
+
type IconSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
export interface MaterialIconProps {
|
|
4
|
+
material: IconId;
|
|
5
|
+
filled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: IconSize;
|
|
8
|
+
}
|
|
9
|
+
declare const Icon: ({ material, filled, className, size }: MaterialIconProps) => React.JSX.Element;
|
|
10
|
+
export default Icon;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const iconIdList: readonly ["add", "adjust", "anchor", "arrow_back", "arrow_right_alt", "calendar_month", "change_history", "check_circle", "check", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "content_copy", "delete", "download", "edit", "error", "event", "file_save", "info", "keyboard_arrow_down", "keyboard_arrow_up", "lightbulb", "link", "lock", "login", "logout", "menu", "more_vert", "pending_actions", "person_add", "person", "radio_button_checked", "radio_button_unchecked", "sailing", "settings_input_antenna", "source_environment", "stylus", "timeline", "video_library", "warning", "domain", "distance", "article", "edit_square"];
|
|
2
|
+
export type IconId = (typeof iconIdList)[number];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
|
+
export type ImageProps = ImgHTMLAttributes<HTMLImageElement>;
|
|
3
|
+
export declare const Image: ({ src, className, ...props }: ImageProps) => React.JSX.Element;
|
|
4
|
+
export declare const ImageAis: (props: ImageProps) => React.JSX.Element;
|
|
5
|
+
export declare const ImageAisSat: (props: ImageProps) => React.JSX.Element;
|
|
6
|
+
export declare const ImageArcticInfo: (props: ImageProps) => React.JSX.Element;
|
|
7
|
+
export declare const ImageAvgiftskalkulator: (props: ImageProps) => React.JSX.Element;
|
|
8
|
+
export declare const ImageBaatfartMarine: (props: ImageProps) => React.JSX.Element;
|
|
9
|
+
export declare const ImageBestilleLos: (props: ImageProps) => React.JSX.Element;
|
|
10
|
+
export declare const ImageBoelgevarsel: (props: ImageProps) => React.JSX.Element;
|
|
11
|
+
export declare const ImageDgps: (props: ImageProps) => React.JSX.Element;
|
|
12
|
+
export declare const ImageDigitalRutetjeneste: (props: ImageProps) => React.JSX.Element;
|
|
13
|
+
export declare const ImageEDialog: (props: ImageProps) => React.JSX.Element;
|
|
14
|
+
export declare const ImageFarledsbevis: (props: ImageProps) => React.JSX.Element;
|
|
15
|
+
export declare const ImageHavbase: (props: ImageProps) => React.JSX.Element;
|
|
16
|
+
export declare const ImageHavnOgFarvannsloven: (props: ImageProps) => React.JSX.Element;
|
|
17
|
+
export declare const ImageIstjeneste: (props: ImageProps) => React.JSX.Element;
|
|
18
|
+
export declare const ImageKikkert: (props: ImageProps) => React.JSX.Element;
|
|
19
|
+
export declare const ImageKystdatahuset: (props: ImageProps) => React.JSX.Element;
|
|
20
|
+
export declare const ImageKystinfoKart: (props: ImageProps) => React.JSX.Element;
|
|
21
|
+
export declare const ImageLavutslipp: (props: ImageProps) => React.JSX.Element;
|
|
22
|
+
export declare const ImageLrit: (props: ImageProps) => React.JSX.Element;
|
|
23
|
+
export declare const ImageNasjonalHavneoversikt: (props: ImageProps) => React.JSX.Element;
|
|
24
|
+
export declare const ImageNavigasjonsvarsler: (props: ImageProps) => React.JSX.Element;
|
|
25
|
+
export declare const ImageOhoi: (props: ImageProps) => React.JSX.Element;
|
|
26
|
+
export declare const ImagePaagaaendeSeilaser: (props: ImageProps) => React.JSX.Element;
|
|
27
|
+
export declare const ImageSeLosbestilling: (props: ImageProps) => React.JSX.Element;
|
|
28
|
+
export declare const ImageSkipsrapportering: (props: ImageProps) => React.JSX.Element;
|
|
29
|
+
export declare const ImageSlukkedeFyrlys: (props: ImageProps) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryFn } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ src, className, ...props }: import("~/main").ImageProps) => React.JSX.Element;
|
|
5
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export declare const Showcase: StoryFn;
|
|
11
|
+
export declare const Big: StoryFn;
|
|
12
|
+
export declare const Small: StoryFn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface LabelContentProps {
|
|
2
|
+
optional?: boolean | string | undefined;
|
|
3
|
+
required?: boolean | string | undefined;
|
|
4
|
+
text?: string | null;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const LabelContent: ({ text, loading, optional, required }: LabelContentProps) => React.JSX.Element | null;
|
|
8
|
+
export default LabelContent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { LabelContentProps } from './labelContent';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ text, loading, optional, required }: LabelContentProps) => React.JSX.Element | null;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Valgfritt: Story;
|
|
14
|
+
export declare const LangTekst: Story;
|
|
15
|
+
export declare const LangRequired: Story;
|
|
16
|
+
export declare const LangRequiredText: Story;
|
|
17
|
+
export declare const Required: Story;
|
|
18
|
+
export declare const RequiredText: Story;
|
|
19
|
+
export declare const Hvorfor: Story;
|
|
20
|
+
export declare const Hvorfor2: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type LogoVariant = 'blue-horizontal' | 'datakatalog' | 'fyr' | 'hais' | 'pfsa' | 'saksbehandling' | 'selvbetjening' | 'white-horizontal' | 'white-vertical';
|
|
2
|
+
export interface LogoProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
variant?: LogoVariant;
|
|
5
|
+
alt?: string;
|
|
6
|
+
height?: number;
|
|
7
|
+
width?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function Logo({ className, variant, alt, height, width }: LogoProps): React.JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Logo } from '~/components/kystverket/Logo/Logo';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Logo;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const OnlyWidth: Story;
|
|
14
|
+
export declare const OnlyHeight: Story;
|
|
15
|
+
export declare const White: Story;
|
|
16
|
+
export declare const Datakatalog: Story;
|
|
17
|
+
export declare const Fyr: Story;
|
|
18
|
+
export declare const Hais: Story;
|
|
19
|
+
export declare const Pfsa: Story;
|
|
20
|
+
export declare const Saksbehandling: Story;
|
|
21
|
+
export declare const Selvbetjening: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StepItem {
|
|
3
|
+
identifier?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StepperProps {
|
|
7
|
+
steps: StepItem[];
|
|
8
|
+
step: number;
|
|
9
|
+
}
|
|
10
|
+
declare const Stepper: ({ steps, step }: StepperProps) => React.JSX.Element;
|
|
11
|
+
export default Stepper;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { StepperProps } from './stepper';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ steps, step }: StepperProps) => React.JSX.Element;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Vertical: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ rows }: {
|
|
5
|
+
rows: import("./summary.types").SummaryRowProps[];
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface HeadingRowProps {
|
|
3
|
+
title: string;
|
|
4
|
+
editButton: {
|
|
5
|
+
label: string;
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface TitleRowProps {
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ValueRowProps {
|
|
14
|
+
label: string;
|
|
15
|
+
value?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ContentRowProps {
|
|
19
|
+
label: string;
|
|
20
|
+
content?: ReactNode;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export type SummaryRowProps = TitleRowProps | HeadingRowProps | ValueRowProps | ContentRowProps;
|
|
24
|
+
export type SummaryProps = {
|
|
25
|
+
rows: SummaryRowProps[];
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TypographyProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children?: ReactNode | undefined;
|
|
5
|
+
}
|
|
6
|
+
export type BodyTypographyProps = TypographyProps & {
|
|
7
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
+
strong?: boolean;
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type AccentTypographyProps = TypographyProps & {
|
|
12
|
+
size?: 'sm' | 'md';
|
|
13
|
+
strong?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type LabelTypographyProps = TypographyProps & {
|
|
16
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
17
|
+
strong?: boolean;
|
|
18
|
+
inline?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const Body: ({ inline, strong, size, className, children }: BodyTypographyProps) => React.JSX.Element;
|
|
21
|
+
export declare const Accent: ({ strong, size, className, children }: AccentTypographyProps) => React.JSX.Element;
|
|
22
|
+
export declare const Typography: {
|
|
23
|
+
Body: ({ inline, strong, size, className, children }: BodyTypographyProps) => React.JSX.Element;
|
|
24
|
+
Accent: ({ strong, size, className, children }: AccentTypographyProps) => React.JSX.Element;
|
|
25
|
+
Label: ({ strong, size, className, children, inline }: LabelTypographyProps) => React.JSX.Element;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BoxProps } from '../Box/box';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ className, radius, width, gap, wrap, align, grow, shrink, basis, show, hide, container, children, ...props }: BoxProps) => React.JSX.Element;
|
|
6
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const LangTittel: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TypographyPrefix = 'body' | 'accent' | 'label';
|
|
2
|
+
export type AllSizes = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
3
|
+
export type TypographyColor = 'accent' | 'neutral';
|
|
4
|
+
type BuildTypographyProps = {
|
|
5
|
+
type: TypographyPrefix;
|
|
6
|
+
size?: AllSizes;
|
|
7
|
+
strong?: boolean;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
color?: TypographyColor;
|
|
10
|
+
margin?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const buildTypographyClasses: ({ type, size, strong, inline, className, }: BuildTypographyProps) => string;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import './css/index.scss';
|
|
2
|
+
export type { SupportedLanguage, ScreenSize } from './utils/types';
|
|
3
|
+
export { default as DeprecatedErrorLabel, type ErrorLabelProps as DeprecatedErrorLabelProps, } from './components/deprecated/ErrorLabel/errorLabel';
|
|
4
|
+
export { default as DeprecatedInputLabel, type InputLabelProps as DeprecatedInputLabelProps, } from './components/deprecated/InputLabel/inputLabel';
|
|
5
|
+
export { Details as DeprecatedDetails, type DetailsProps as DeprecatedDetailsProps, } from './components/deprecated/Details/Details';
|
|
6
|
+
export { default as DeprecatedCard, type CardProps as DeprecatedCardProps } from './components/deprecated/Card/Card';
|
|
7
|
+
export { default as Alert } from './components/kystverket/Alert/alert';
|
|
8
|
+
export type { AlertLevel } from './components/kystverket/Alert/alert.types';
|
|
9
|
+
export type { AlertProps } from './components/kystverket/Alert/alert';
|
|
10
|
+
export { default as Box } from './components/kystverket/Box/box';
|
|
11
|
+
export type { BoxProps } from './components/kystverket/Box/box';
|
|
12
|
+
export { default as Stepper } from './components/kystverket/Stepper/stepper';
|
|
13
|
+
export type { StepperProps } from './components/kystverket/Stepper/stepper';
|
|
14
|
+
export { default as LabelContent, type LabelContentProps } from './components/kystverket/LabelContent/labelContent';
|
|
15
|
+
export { default as Icon } from './components/kystverket/Icon/icon';
|
|
16
|
+
export type { IconId } from './components/kystverket/Icon/icon.types';
|
|
17
|
+
export * from './components/kystverket/Image/image';
|
|
18
|
+
export { Body, Accent, Typography } from './components/kystverket/Typography/typography';
|
|
19
|
+
export type { TypographyProps, BodyTypographyProps, AccentTypographyProps, LabelTypographyProps, } from './components/kystverket/Typography/typography';
|
|
20
|
+
export { default as BorderedToggleGroup } from './components/kystverket/BorderedToggleGroup/borderedToggleGroup';
|
|
21
|
+
export type { BorderedToggleGroupProps } from './components/kystverket/BorderedToggleGroup/borderedToggleGroup';
|
|
22
|
+
export { default as BorderedRadioGroup } from './components/kystverket/BorderedRadioGroup/borderedRadioGroup';
|
|
23
|
+
export type { BorderedRadioGroupProps } from './components/kystverket/BorderedRadioGroup/borderedRadioGroup';
|
|
24
|
+
export { Summary } from './components/kystverket/Summary/summary';
|
|
25
|
+
export type { SummaryProps, SummaryRowProps } from './components/kystverket/Summary/summary.types';
|
|
26
|
+
export { Logo } from './components/kystverket/Logo/Logo';
|
|
27
|
+
export type { LogoProps, LogoVariant } from './components/kystverket/Logo/Logo';
|
|
28
|
+
export { Footer } from './components/kystverket/Footer/Footer';
|
|
29
|
+
export type { FooterProps } from './components/kystverket/Footer/Footer';
|
|
30
|
+
export { Header } from './components/kystverket/Header/Header';
|
|
31
|
+
export type { HeaderProps } from './components/kystverket/Header/Header';
|
|
32
|
+
export { Datepicker, type DatepickerProps } from './components/kystverket/Datepicker/Datepicker';
|
|
33
|
+
export { FileUploader, type FileUploaderProps } from './components/kystverket/FileUploader/FileUploader';
|
|
34
|
+
export { FileUploaderContext, type FileUploaderContextProps, } from './components/kystverket/FileUploader/FileUploader.context';
|
|
35
|
+
export type * from './components/kystverket/FileUploader/FileUploader.types';
|
|
36
|
+
export { default as CardTitle, type CardTitleProps } from './components/designsystemet/CardTitle/CardTitle';
|
|
37
|
+
export { Button } from './components/designsystemet/Button/Button';
|
|
38
|
+
export type { ButtonProps } from './components/designsystemet/Button/Button';
|
|
39
|
+
export { TextInput } from './components/designsystemet/TextInput/TextInput';
|
|
40
|
+
export type { TextInputProps } from './components/designsystemet/TextInput/TextInput';
|
|
41
|
+
export { NumberInput } from './components/designsystemet/NumberInput/NumberInput';
|
|
42
|
+
export type { NumberInputProps } from './components/designsystemet/NumberInput/NumberInput';
|
|
43
|
+
export { TextArea } from './components/designsystemet/TextArea/TextArea';
|
|
44
|
+
export type { TextAreaProps } from './components/designsystemet/TextArea/TextArea';
|
|
45
|
+
export type { InputSize } from './utils/input/input';
|
|
46
|
+
export { Select } from './components/designsystemet/Select/Select';
|
|
47
|
+
export type { SelectProps, SelectOption } from './components/designsystemet/Select/Select';
|
|
48
|
+
export { default as Tabs } from './components/designsystemet/Tabs/Tabs';
|
|
49
|
+
export type { TabsProps } from './components/designsystemet/Tabs/Tabs';
|
|
50
|
+
export { default as Table } from './components/designsystemet/Table/Table';
|
|
51
|
+
export { EXPERIMENTAL_Suggestion as Suggestion } from '@digdir/designsystemet-react';
|
|
52
|
+
export * from '@digdir/designsystemet-react';
|