@kystverket/styrbord 2.13.0 → 2.14.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/kystverket/FilePreviewer/FilePreviewer.stories.d.ts +3 -0
- package/dist/src/components/kystverket/FilePreviewer/dialog/FilePreviewer-dialog.d.ts +4 -0
- package/dist/src/components/kystverket/FilePreviewer/index.d.ts +5 -0
- package/dist/src/components/kystverket/FilePreviewer/panel/FilePreviewer-panel.d.ts +17 -0
- package/dist/src/components/kystverket/SaksbehandlingShell/SaksbehandlingShell.d.ts +1 -1
- package/dist/src/components/kystverket/SaksbehandlingShell/SaksbehandlingShell.stories.d.ts +10 -0
- package/dist/src/components/kystverket/SaksbehandlingShell/SaksbehandlingShell.types.d.ts +7 -0
- package/dist/src/components/kystverket/SaksbehandlingShell/ShellSideSheet/ShellSideSheet.d.ts +4 -0
- package/dist/src/components/kystverket/SaksbehandlingShell/ShellSideSheet/ShellSideSheet.types.d.ts +27 -0
- package/dist/src/main.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/style.js +2466 -2317
- package/dist/style.umd.cjs +12 -12
- package/package.json +1 -1
|
@@ -6,6 +6,9 @@ declare const meta: {
|
|
|
6
6
|
Thumbnail: typeof import("./thumbnail/FilePreviewer-thumbnail").FilePreviewerThumbnail & {
|
|
7
7
|
displayName?: string;
|
|
8
8
|
};
|
|
9
|
+
Panel: typeof import("./panel/FilePreviewer-panel").FilePreviewerPanel & {
|
|
10
|
+
displayName?: string;
|
|
11
|
+
};
|
|
9
12
|
displayName?: string;
|
|
10
13
|
};
|
|
11
14
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element)[];
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { FilePreviewerContext } from './FilePreviewer-context';
|
|
2
2
|
import { FilePreviewerThumbnail } from './thumbnail/FilePreviewer-thumbnail';
|
|
3
|
+
import { FilePreviewerPanel } from './panel/FilePreviewer-panel';
|
|
3
4
|
type FilePreviewerCompound = typeof FilePreviewerContext & {
|
|
4
5
|
Thumbnail: typeof FilePreviewerThumbnail & {
|
|
5
6
|
displayName?: string;
|
|
6
7
|
};
|
|
8
|
+
Panel: typeof FilePreviewerPanel & {
|
|
9
|
+
displayName?: string;
|
|
10
|
+
};
|
|
7
11
|
displayName?: string;
|
|
8
12
|
};
|
|
9
13
|
declare const FilePreviewer: FilePreviewerCompound;
|
|
10
14
|
export type { FilePreviewerContextProps as FilePreviewerProps } from './FilePreviewer-context';
|
|
11
15
|
export type { FilePreviewerThumbnailProps } from './thumbnail/FilePreviewer-thumbnail';
|
|
16
|
+
export type { FilePreviewerPanelProps } from './panel/FilePreviewer-panel';
|
|
12
17
|
export { FilePreviewer };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FileInfo } from '../FilePreviewer.types';
|
|
3
|
+
export interface FilePreviewerPanelProps {
|
|
4
|
+
/** The file to show. When unset, `emptyContent` is shown instead. */
|
|
5
|
+
file?: FileInfo;
|
|
6
|
+
/** Shown when no file is selected. Default: a short "no file selected" text. */
|
|
7
|
+
emptyContent?: ReactNode;
|
|
8
|
+
/** Heading level of the file name. Default: `2`. */
|
|
9
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Shows one file inline — file name, size, "open in new tab" and "download" — for use in a side
|
|
14
|
+
* panel such as `SaksbehandlingShell`'s `comparisonContent`. Unlike `FilePreviewer.Thumbnail`
|
|
15
|
+
* it does not need a surrounding `<FilePreviewer>`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function FilePreviewerPanel({ file, emptyContent, headingLevel, className }: FilePreviewerPanelProps): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SaksbehandlingShellProps } from './SaksbehandlingShell.types';
|
|
2
|
-
export declare function SaksbehandlingShell({ headerContent, caseActions, itemActions, items, selectedItemId, onSelectItemId, comparisonContent, defaultItemListOpen, defaultComparisonOpen, children, className, }: Readonly<SaksbehandlingShellProps>): React.JSX.Element;
|
|
2
|
+
export declare function SaksbehandlingShell({ headerContent, caseActions, itemActions, items, selectedItemId, onSelectItemId, comparisonContent, defaultItemListOpen, defaultComparisonOpen, comparisonOpen, onComparisonOpenChange, children, className, }: Readonly<SaksbehandlingShellProps>): React.JSX.Element;
|
|
@@ -11,3 +11,13 @@ declare const meta: {
|
|
|
11
11
|
};
|
|
12
12
|
export default meta;
|
|
13
13
|
export declare const Default: StoryFn<typeof SaksbehandlingShell>;
|
|
14
|
+
/**
|
|
15
|
+
* The shell inside a full page: it fills the viewport below the header, and the footer sits
|
|
16
|
+
* below the fold, as in an application.
|
|
17
|
+
*/
|
|
18
|
+
export declare const WithHeaderAndFooter: StoryFn<typeof SaksbehandlingShell>;
|
|
19
|
+
/**
|
|
20
|
+
* Postmottak mocked in the shell: each innsending is an item in the list, the filters sit in the
|
|
21
|
+
* toolbar as GitHub-style dropdowns, and the row actions become actions on the selected item.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Postmottak: StoryFn<typeof SaksbehandlingShell>;
|
|
@@ -25,6 +25,13 @@ export interface SaksbehandlingShellProps {
|
|
|
25
25
|
defaultItemListOpen?: boolean;
|
|
26
26
|
/** Default open state of the comparison panel. Default: `false`. */
|
|
27
27
|
defaultComparisonOpen?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Controlled open state of the comparison panel, e.g. to open it when the user clicks an
|
|
30
|
+
* attachment in the main section. Use together with `onComparisonOpenChange`.
|
|
31
|
+
*/
|
|
32
|
+
comparisonOpen?: boolean;
|
|
33
|
+
/** Called when the comparison panel is opened or closed from the toolbar, Escape or backdrop. */
|
|
34
|
+
onComparisonOpenChange?: (open: boolean) => void;
|
|
28
35
|
/** Main section content for the currently selected item. */
|
|
29
36
|
children?: ReactNode;
|
|
30
37
|
className?: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShellSideSheetLayoutProps, ShellSideSheetProps } from './ShellSideSheet.types';
|
|
2
|
+
export declare function ShellSideSheet({ open, onClose, placement, size, pinned, backdrop, children, className, style, 'aria-label': ariaLabel, }: Readonly<ShellSideSheetProps>): React.JSX.Element;
|
|
3
|
+
/** Flex row a pinned `ShellSideSheet` takes its width from; the rest of the row fills the remainder. */
|
|
4
|
+
export declare function ShellSideSheetLayout({ children, className, style }: Readonly<ShellSideSheetLayoutProps>): React.JSX.Element;
|
package/dist/src/components/kystverket/SaksbehandlingShell/ShellSideSheet/ShellSideSheet.types.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type ShellSideSheetSize = 'sm' | 'md' | 'lg' | '33%' | '40%' | '50%' | '66%';
|
|
3
|
+
export type ShellSideSheetPlacement = 'left' | 'right';
|
|
4
|
+
export interface ShellSideSheetProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/** Called on Escape and backdrop click while the sheet is open and not pinned. */
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
placement?: ShellSideSheetPlacement;
|
|
9
|
+
size?: ShellSideSheetSize;
|
|
10
|
+
/**
|
|
11
|
+
* When `true` the sheet is a flex child of `<ShellSideSheetLayout>` and reflows the content
|
|
12
|
+
* next to it. When `false` it overlays the content.
|
|
13
|
+
*/
|
|
14
|
+
pinned?: boolean;
|
|
15
|
+
/** Dim the content and trap focus while overlaying. Default: `true`. */
|
|
16
|
+
backdrop?: boolean;
|
|
17
|
+
/** Accessible name of the sheet. Required: the shell's sheets have no visible heading. */
|
|
18
|
+
'aria-label': string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
export interface ShellSideSheetLayoutProps {
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
package/dist/src/main.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { default as DeprecatedErrorLabel, type ErrorLabelProps as DeprecatedErro
|
|
|
13
13
|
export { default as DeprecatedInputLabel, type InputLabelProps as DeprecatedInputLabelProps, } from './components/deprecated/InputLabel/inputLabel';
|
|
14
14
|
export { Details as DeprecatedDetails, type DetailsProps as DeprecatedDetailsProps, } from './components/deprecated/Details/Details';
|
|
15
15
|
export { default as DeprecatedCard, type CardProps as DeprecatedCardProps } from './components/deprecated/Card/Card';
|
|
16
|
-
export { FilePreviewer, type FilePreviewerProps } from './components/kystverket/FilePreviewer';
|
|
16
|
+
export { FilePreviewer, type FilePreviewerProps, type FilePreviewerPanelProps, } from './components/kystverket/FilePreviewer';
|
|
17
17
|
export { StyrbordTranslations } from './translations';
|
|
18
18
|
export { default as KyvDivider } from './components/kystverket/KyvDivider/KyvDivider';
|
|
19
19
|
export { PageHeading } from './components/kystverket/PageHeading/PageHeading';
|