@kystverket/styrbord 1.1.26 → 1.1.28
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/main.js +1928 -1914
- package/dist/main.umd.cjs +6 -6
- package/dist/src/components/kystverket/FilePreviewer/FilePreviewer-context.d.ts +3 -2
- package/dist/src/components/kystverket/FilePreviewer/FilePreviewer-dialog.d.ts +3 -2
- package/dist/src/components/kystverket/FilePreviewer/FilePreviewer.stories.d.ts +41 -5
- package/dist/src/components/kystverket/FilePreviewer/FileRenderer.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, Ref } from 'react';
|
|
2
|
-
import { FilePreviewRef } from './FilePreviewer-dialog';
|
|
2
|
+
import { FilePreviewerDialogProps, FilePreviewRef } from './FilePreviewer-dialog';
|
|
3
3
|
import { FileInfo } from './FilePreviewer.types';
|
|
4
4
|
export declare const FPContext: React.Context<{
|
|
5
5
|
files: FileInfo[];
|
|
@@ -10,5 +10,6 @@ export interface FilePreviewerContextProps {
|
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
ref?: Ref<FilePreviewRef>;
|
|
12
12
|
files?: FileInfo[];
|
|
13
|
+
animation?: FilePreviewerDialogProps['animation'];
|
|
13
14
|
}
|
|
14
|
-
export declare const FilePreviewerContext: ({ children, ref, files }: FilePreviewerContextProps) => React.JSX.Element;
|
|
15
|
+
export declare const FilePreviewerContext: ({ animation, children, ref, files }: FilePreviewerContextProps) => React.JSX.Element;
|
|
@@ -3,9 +3,10 @@ export type FilePreviewRef = {
|
|
|
3
3
|
close: () => void;
|
|
4
4
|
showModal: (idx?: number) => void;
|
|
5
5
|
};
|
|
6
|
-
export interface
|
|
6
|
+
export interface FilePreviewerDialogProps {
|
|
7
|
+
animation?: 'none' | 'slide';
|
|
7
8
|
files: FileInfo[];
|
|
8
9
|
startIndex?: number;
|
|
9
10
|
onClose?: () => void;
|
|
10
11
|
}
|
|
11
|
-
export declare const FilePreviewerDialog: ({ onClose, files, startIndex }:
|
|
12
|
+
export declare const FilePreviewerDialog: ({ animation, onClose, files, startIndex }: FilePreviewerDialogProps) => React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { StoryFn } from '@storybook/react';
|
|
2
|
+
import { FilePreviewerDialogProps } from './FilePreviewer-dialog';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
|
-
component: (({ children, ref, files }: import("~/main").FilePreviewerProps) => React.JSX.Element) & {
|
|
5
|
+
component: (({ animation, children, ref, files }: import("~/main").FilePreviewerProps) => React.JSX.Element) & {
|
|
5
6
|
Thumbnail: typeof import("./FilePreviewer-thumbnail").FilePreviewerThumbnail & {
|
|
6
7
|
displayName?: string;
|
|
7
8
|
};
|
|
@@ -9,9 +10,44 @@ declare const meta: {
|
|
|
9
10
|
};
|
|
10
11
|
decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
|
|
11
12
|
tags: string[];
|
|
12
|
-
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
source: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
animation: "slide";
|
|
22
|
+
files: import("./FilePreviewer.types").FileInfo[];
|
|
23
|
+
};
|
|
24
|
+
argTypes: {
|
|
25
|
+
animation: {
|
|
26
|
+
control: "radio";
|
|
27
|
+
options: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: string;
|
|
32
|
+
};
|
|
33
|
+
defaultValue: {
|
|
34
|
+
summary: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
files: {
|
|
39
|
+
control: "object";
|
|
40
|
+
description: string;
|
|
41
|
+
table: {
|
|
42
|
+
type: {
|
|
43
|
+
summary: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
13
48
|
};
|
|
14
49
|
export default meta;
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
50
|
+
export declare const Default: StoryFn<FilePreviewerDialogProps>;
|
|
51
|
+
export declare const withFlex: StoryFn<FilePreviewerDialogProps>;
|
|
52
|
+
export declare const openWithRef: StoryFn<FilePreviewerDialogProps>;
|
|
53
|
+
export declare const withNoneAnimation: StoryFn<FilePreviewerDialogProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileInfo } from './FilePreviewer.types';
|
|
2
|
-
export declare const FileRenderer: ({ file, className, mode, }: {
|
|
2
|
+
export declare const FileRenderer: ({ file, className, mode, tabIndex, }: {
|
|
3
3
|
file: FileInfo;
|
|
4
4
|
mode?: "thumbnail" | "full";
|
|
5
5
|
className?: string;
|
|
6
|
+
tabIndex?: number;
|
|
6
7
|
}) => React.JSX.Element | undefined;
|