@kystverket/styrbord 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/components/designsystemet/Button/Button.d.ts +2 -1
- package/dist/src/components/designsystemet/Button/Button.stories.d.ts +1 -0
- package/dist/src/components/kystverket/ColorTokenCollections/ColorTokenCollections.stories.d.ts +43 -0
- package/dist/src/components/kystverket/FileUploader/FileUploader.d.ts +6 -1
- package/dist/src/components/kystverket/FileUploader/FileUploader.stories.d.ts +1 -0
- package/dist/src/components/kystverket/FileUploader/fileUploadActions/FileUploadActions.d.ts +4 -2
- package/dist/src/components/kystverket/Icon/icon.types.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/style.js +2049 -1985
- package/dist/style.umd.cjs +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ applikasjonen ha et Kystverket uttrykk samtidig som det følger moderne prinsipp
|
|
|
7
7
|
Styrbord tar i bruk [designsystemet.no](https://www.designsystemet.no/) sine komponenter og prinsipper.
|
|
8
8
|
Komponentene til Designsystemet blir eksportert videre av Styrbord med Kystverkets farger og tekststil.
|
|
9
9
|
Dette betyr at [dokumentasjonen til Designsystemet](https://storybook.designsystemet.no/) er vel så viktig
|
|
10
|
-
som den du finner her.
|
|
10
|
+
som den du finner [her](https://kystverket.github.io/styrbord/base).
|
|
11
11
|
|
|
12
12
|
Alle komponentene og typene i Designsystemet er tilgjengelig i Styrbord med følgende merknader:
|
|
13
13
|
|
|
@@ -4,8 +4,9 @@ export type ButtonProps = {
|
|
|
4
4
|
variant?: 'filled' | 'subtle' | 'outline' | 'ghost' | 'dashed';
|
|
5
5
|
color?: 'primary' | 'neutral' | 'danger';
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
text?: string;
|
|
8
9
|
href?: string;
|
|
9
10
|
target?: string;
|
|
10
|
-
} & Omit<DsButtonProps, 'variant' | 'data-color' | 'data-size'>;
|
|
11
|
+
} & Omit<DsButtonProps, 'variant' | 'data-color' | 'data-size' | 'disabled'>;
|
|
11
12
|
export declare const Button: FC<ButtonProps>;
|
package/dist/src/components/kystverket/ColorTokenCollections/ColorTokenCollections.stories.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
type DataColor = 'primary' | 'neutral' | 'danger';
|
|
3
|
+
type DataColorSchemes = 'light' | 'dark';
|
|
4
|
+
type StoryArgs = {
|
|
5
|
+
dataColor: DataColor;
|
|
6
|
+
dataColorScheme: DataColorSchemes;
|
|
7
|
+
};
|
|
8
|
+
declare const meta: {
|
|
9
|
+
title: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
component: ({ dataColor, dataColorScheme }: StoryArgs) => React.JSX.Element;
|
|
12
|
+
args: {
|
|
13
|
+
dataColor: "primary";
|
|
14
|
+
dataColorScheme: "light";
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
dataColor: {
|
|
18
|
+
options: DataColor[];
|
|
19
|
+
control: {
|
|
20
|
+
type: "inline-radio";
|
|
21
|
+
};
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
dataColorScheme: {
|
|
25
|
+
options: DataColorSchemes[];
|
|
26
|
+
control: {
|
|
27
|
+
type: "inline-radio";
|
|
28
|
+
};
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
parameters: {
|
|
33
|
+
docs: {
|
|
34
|
+
description: {
|
|
35
|
+
component: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
render: (args: StoryArgs) => React.JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<typeof meta>;
|
|
43
|
+
export declare const AllCollectionTokens: Story;
|
|
@@ -21,7 +21,12 @@ export interface FileUploaderProps {
|
|
|
21
21
|
allowedFileTypes?: string[];
|
|
22
22
|
required?: boolean | string;
|
|
23
23
|
optional?: boolean | string;
|
|
24
|
+
/**
|
|
25
|
+
* Adds a button with "Open Camera" on most NON-PC devices
|
|
26
|
+
* \ Opens on the back camera by default
|
|
27
|
+
*/
|
|
28
|
+
withCaptureButton?: boolean;
|
|
24
29
|
existingFilesProvider?: () => Promise<ExistingFilesProviderItem[]>;
|
|
25
30
|
variant?: 'dropzone' | 'buttons';
|
|
26
31
|
}
|
|
27
|
-
export declare const FileUploader: ({ label, maxSizeInBytes, required, optional, description, error, multiple, files, maxFiles, onChange, allowedFileTypes, existingFilesProvider, variant, }: FileUploaderProps) => React.JSX.Element;
|
|
32
|
+
export declare const FileUploader: ({ label, maxSizeInBytes, required, optional, description, error, multiple, files, maxFiles, onChange, allowedFileTypes, withCaptureButton, existingFilesProvider, variant, }: FileUploaderProps) => React.JSX.Element;
|
|
@@ -17,6 +17,7 @@ export declare const RequiredText: Story;
|
|
|
17
17
|
export declare const Dropzone: Story;
|
|
18
18
|
export declare const DropzoneWithExistingFiles: Story;
|
|
19
19
|
export declare const WithError: Story;
|
|
20
|
+
export declare const WithCaptureButton: Story;
|
|
20
21
|
export declare const WithExistingFiles: Story;
|
|
21
22
|
export declare const withFileSizeLimit: Story;
|
|
22
23
|
export declare const withAllowedFileTypes: Story;
|
package/dist/src/components/kystverket/FileUploader/fileUploadActions/FileUploadActions.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import { ExistingFilesDialogHandle } from '../existingFilesDialog/ExistingFilesD
|
|
|
2
2
|
import { FileUploaderProps } from '~/main';
|
|
3
3
|
type FileUploadActionsProps = {
|
|
4
4
|
fileInputRef: React.RefObject<HTMLInputElement | null>;
|
|
5
|
+
fileCameraInputRef: React.RefObject<HTMLInputElement | null>;
|
|
5
6
|
dialogRef: React.RefObject<ExistingFilesDialogHandle | null>;
|
|
6
7
|
t: (key: string) => string;
|
|
7
8
|
onUploadFile: (uploadedFiles: File[]) => void;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
allowedFileTypes: string[];
|
|
10
|
+
} & Pick<FileUploaderProps, 'variant' | 'existingFilesProvider' | 'withCaptureButton' | 'multiple'>;
|
|
11
|
+
export declare function FileUploadActions({ variant, fileInputRef, onUploadFile, existingFilesProvider, fileCameraInputRef, dialogRef, allowedFileTypes, withCaptureButton, multiple, t, }: FileUploadActionsProps): React.JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const iconIdList: readonly ["
|
|
1
|
+
export declare const iconIdList: readonly ["add", "add_box", "add_location", "add_location_alt", "adjust", "anchor", "archive", "arrow_back", "arrow_forward", "arrow_right_alt", "article", "calendar_month", "change_history", "chat", "check", "check_circle", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "code_blocks", "content_copy", "data_table", "delete", "description", "directions_boat", "distance", "domain", "download", "edit", "edit_document", "edit_location", "edit_location_alt", "edit_square", "error", "event", "explore", "explore_nearby", "export_notes", "favorite", "file_map", "file_save", "folder_open", "format_align_center", "format_align_left", "format_align_right", "globe_uk", "image", "inbox", "info", "info_i", "keyboard_arrow_down", "keyboard_arrow_up", "language", "layers", "lightbulb", "link", "location_chip", "lock", "login", "logout", "mail", "map", "map_pin_heart", "menu", "mode_cool", "more_vert", "move", "numbers", "open_in_new", "pan_zoom", "pending_actions", "person", "person_add", "person_pin", "person_pin_circle", "photo_camera", "picture_as_pdf", "pin_drop", "radio_button_checked", "radio_button_unchecked", "sailing", "save", "send", "settings", "settings_input_antenna", "severe_cold", "source_environment", "stylus", "timeline", "upload", "video_library", "videocam", "view_list", "warning", "zoom_in_map", "zoom_out_map"];
|
|
2
2
|
export type IconId = (typeof iconIdList)[number];
|