@kystverket/styrbord 1.15.0 → 1.15.2
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/Icon/icon.types.d.ts +1 -1
- package/dist/src/components/kystverket/RichTextArea/components/Toolbar/toolbar.d.ts +2 -1
- package/dist/src/components/kystverket/RichTextArea/components/Toolbar/toolbar.stories.d.ts +3 -2
- package/dist/src/components/kystverket/RichTextArea/richTextArea.editorFactory.d.ts +3 -1
- package/dist/src/components/kystverket/RichTextArea/richTextArea.stories.d.ts +2 -0
- package/dist/src/components/kystverket/RichTextArea/richTextArea.types.d.ts +3 -0
- package/dist/src/components/kystverket/SaksbehandlingShell/SaksbehandlingShell.types.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/style.js +2013 -1952
- package/dist/style.umd.cjs +7 -7
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const iconIdList: readonly ["add_box", "add_location_alt", "add_location", "add_notes", "add", "adjust", "air", "alternate_email", "anchor", "apps", "archive", "arrow_back", "arrow_downward", "arrow_forward", "arrow_right_alt", "arrow_upward", "article", "assignment", "attach_email", "attach_file", "autorenew", "backspace", "backup", "book_4", "bottom_panel_close", "bottom_panel_open", "cached", "calendar_month", "change_history", "chat_add_on", "chat_bubble", "chat", "check_circle", "check", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "code_blocks", "comment", "compare_arrows", "compare", "content_copy", "conversation", "copy_all", "cycle", "dark_mode", "data_table", "delete_history", "delete", "description", "difference", "directions_boat", "directory_sync", "distance", "document_search", "domain", "download", "drafts", "edit_document", "edit_location_alt", "edit_location", "edit_square", "edit", "error", "event", "explore_nearby", "explore", "export_notes", "exposure_zero", "favorite", "file_map_stack", "file_map", "file_save", "folder_check_2", "folder_match", "folder_off", "folder_open", "folder_supervised", "folder", "format_align_center", "format_align_justify", "format_align_left", "format_align_right", "format_bold", "format_italic", "format_list_bulleted", "format_list_numbered", "forum", "forward_to_inbox", "forward", "globe_uk", "groups", "history_off", "history_toggle_off", "history", "image", "inbox", "info_i", "info", "keep_off", "keep", "keyboard_arrow_down", "keyboard_arrow_up", "language", "layers", "left_panel_close", "left_panel_open", "light_mode", "lightbulb", "link", "location_chip", "lock", "login", "logout", "mail_shield", "mail", "manage_history", "manage_search", "map_pin_heart", "map", "mark_as_unread", "mark_chat_read", "mark_chat_unread", "mark_email_read", "mark_email_unread", "match_case", "menu_open", "menu", "mode_cool", "more_vert", "move_to_inbox", "move", "note_stack_add", "note_stack", "notification_add", "numbers", "open_in_new", "pan_zoom", "pending_actions", "person_add", "person_pin_circle", "person_pin", "person", "photo_camera", "picture_as_pdf", "pin_drop", "pin_history", "question_exchange", "radio_button_checked", "radio_button_unchecked", "redo", "reply_all", "reply", "right_panel_close", "right_panel_open", "sailing", "save", "send_and_archive", "send", "settings_input_antenna", "settings", "severe_cold", "sort", "source_environment", "splitscreen_landscape", "stacked_email", "stylus", "sync", "text_compare", "text_snippet", "timeline", "top_panel_close", "top_panel_open", "tsunami", "undo", "unknown_document", "upload", "vertical_align_bottom", "vertical_align_top", "video_library", "videocam", "view_list", "visibility", "vital_signs", "warning", "water", "waves", "zoom_in_map", "zoom_out_map"];
|
|
1
|
+
export declare const iconIdList: readonly ["add_box", "add_location_alt", "add_location", "add_notes", "add", "adjust", "air", "alternate_email", "anchor", "apps", "archive", "arrow_back", "arrow_downward", "arrow_forward", "arrow_right_alt", "arrow_upward", "article", "assignment", "attach_email", "attach_file", "autorenew", "backspace", "backup", "book_4", "bottom_panel_close", "bottom_panel_open", "cached", "calendar_month", "change_history", "chat_add_on", "chat_bubble", "chat", "check_circle", "check", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "code_blocks", "comment", "compare_arrows", "compare", "content_copy", "conversation", "copy_all", "cycle", "dark_mode", "data_table", "delete_history", "delete", "description", "difference", "directions_boat", "directory_sync", "distance", "document_search", "domain", "download", "drafts", "edit_document", "edit_location_alt", "edit_location", "edit_square", "edit", "error", "event", "explore_nearby", "explore", "export_notes", "exposure_zero", "favorite", "file_map_stack", "file_map", "file_save", "folder_check_2", "folder_match", "folder_off", "folder_open", "folder_supervised", "folder", "format_align_center", "format_align_justify", "format_align_left", "format_align_right", "format_bold", "format_italic", "format_list_bulleted", "format_list_numbered", "format_size", "forum", "forward_to_inbox", "forward", "globe_uk", "groups", "history_off", "history_toggle_off", "history", "image", "inbox", "info_i", "info", "keep_off", "keep", "keyboard_arrow_down", "keyboard_arrow_up", "language", "layers", "left_panel_close", "left_panel_open", "light_mode", "lightbulb", "link", "location_chip", "lock", "login", "logout", "mail_shield", "mail", "manage_history", "manage_search", "map_pin_heart", "map", "mark_as_unread", "mark_chat_read", "mark_chat_unread", "mark_email_read", "mark_email_unread", "match_case", "menu_open", "menu", "mode_cool", "more_vert", "move_to_inbox", "move", "note_stack_add", "note_stack", "notification_add", "numbers", "open_in_new", "pan_zoom", "pending_actions", "person_add", "person_pin_circle", "person_pin", "person", "photo_camera", "picture_as_pdf", "pin_drop", "pin_history", "question_exchange", "radio_button_checked", "radio_button_unchecked", "redo", "reply_all", "reply", "right_panel_close", "right_panel_open", "sailing", "save", "send_and_archive", "send", "settings_input_antenna", "settings", "severe_cold", "sort", "source_environment", "splitscreen_landscape", "stacked_email", "stylus", "sync", "text_compare", "text_snippet", "timeline", "top_panel_close", "top_panel_open", "tsunami", "undo", "unknown_document", "upload", "vertical_align_bottom", "vertical_align_top", "video_library", "videocam", "view_list", "visibility", "vital_signs", "warning", "water", "waves", "zoom_in_map", "zoom_out_map"];
|
|
2
2
|
export type IconId = (typeof iconIdList)[number];
|
|
@@ -10,6 +10,7 @@ type ToolbarProps = {
|
|
|
10
10
|
selectedFormat: BlockType;
|
|
11
11
|
linkPopoverTarget?: string;
|
|
12
12
|
canUploadImage?: boolean;
|
|
13
|
+
showToolbar?: boolean;
|
|
13
14
|
onBold: () => void;
|
|
14
15
|
onItalic: () => void;
|
|
15
16
|
onBulletList: () => void;
|
|
@@ -20,5 +21,5 @@ type ToolbarProps = {
|
|
|
20
21
|
onLink: () => void;
|
|
21
22
|
onImageUpload?: () => void;
|
|
22
23
|
};
|
|
23
|
-
export declare const Toolbar: ({ disabled, isBoldActive, isItalicActive, isBulletListActive, isOrderedListActive, isLinkActive, selectedFormat, linkPopoverTarget, canUploadImage, onBulletList, onOrderedList, onBold, onItalic, onUndo, onRedo, onFormatChange, onLink, onImageUpload, }: ToolbarProps) => React.JSX.Element;
|
|
24
|
+
export declare const Toolbar: ({ disabled, isBoldActive, isItalicActive, isBulletListActive, isOrderedListActive, isLinkActive, selectedFormat, linkPopoverTarget, canUploadImage, onBulletList, onOrderedList, onBold, onItalic, onUndo, onRedo, onFormatChange, onLink, onImageUpload, showToolbar, }: ToolbarProps) => React.JSX.Element | undefined;
|
|
24
25
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { type BlockType } from './toolbar';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ disabled, isBoldActive, isItalicActive, isBulletListActive, isOrderedListActive, isLinkActive, selectedFormat, linkPopoverTarget, canUploadImage, onBulletList, onOrderedList, onBold, onItalic, onUndo, onRedo, onFormatChange, onLink, onImageUpload, }: {
|
|
5
|
+
component: ({ disabled, isBoldActive, isItalicActive, isBulletListActive, isOrderedListActive, isLinkActive, selectedFormat, linkPopoverTarget, canUploadImage, onBulletList, onOrderedList, onBold, onItalic, onUndo, onRedo, onFormatChange, onLink, onImageUpload, showToolbar, }: {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
isBoldActive: boolean;
|
|
8
8
|
isItalicActive: boolean;
|
|
@@ -12,6 +12,7 @@ declare const meta: {
|
|
|
12
12
|
selectedFormat: BlockType;
|
|
13
13
|
linkPopoverTarget?: string;
|
|
14
14
|
canUploadImage?: boolean;
|
|
15
|
+
showToolbar?: boolean;
|
|
15
16
|
onBold: () => void;
|
|
16
17
|
onItalic: () => void;
|
|
17
18
|
onBulletList: () => void;
|
|
@@ -21,7 +22,7 @@ declare const meta: {
|
|
|
21
22
|
onFormatChange: (format: BlockType) => void;
|
|
22
23
|
onLink: () => void;
|
|
23
24
|
onImageUpload?: () => void;
|
|
24
|
-
}) => React.JSX.Element;
|
|
25
|
+
}) => React.JSX.Element | undefined;
|
|
25
26
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element)[];
|
|
26
27
|
tags: string[];
|
|
27
28
|
argTypes: {
|
|
@@ -10,6 +10,8 @@ type CreateRichTextAreaEditorParams = {
|
|
|
10
10
|
updateInlineImageConfig: (config: InlineImageConfig) => InlineImageConfig;
|
|
11
11
|
updateToolbarState: (ctx: Ctx) => void;
|
|
12
12
|
onMarkdownUpdated: (ctx: Ctx, markdown: string) => void;
|
|
13
|
+
/** Fires synchronously on every doc-changing transaction, unlike onMarkdownUpdated which is debounced by @milkdown/plugin-listener. */
|
|
14
|
+
onEmptyChange: (isEmpty: boolean) => void;
|
|
13
15
|
};
|
|
14
|
-
export declare const createRichTextAreaEditor: ({ root, disabled, editorMarkdown, canUploadImage, dispatchImageFromFile, updateInlineImageConfig, updateToolbarState, onMarkdownUpdated, }: CreateRichTextAreaEditorParams) => Editor;
|
|
16
|
+
export declare const createRichTextAreaEditor: ({ root, disabled, editorMarkdown, canUploadImage, dispatchImageFromFile, updateInlineImageConfig, updateToolbarState, onMarkdownUpdated, onEmptyChange, }: CreateRichTextAreaEditorParams) => Editor;
|
|
15
17
|
export {};
|
|
@@ -8,6 +8,7 @@ declare const meta: {
|
|
|
8
8
|
onChange: (markdown: string) => void;
|
|
9
9
|
placeholder?: string | undefined;
|
|
10
10
|
disabled?: boolean | undefined;
|
|
11
|
+
rows?: "sm" | "md" | "lg" | undefined;
|
|
11
12
|
className?: string | undefined;
|
|
12
13
|
label?: string | undefined;
|
|
13
14
|
description?: React.ReactNode;
|
|
@@ -15,6 +16,7 @@ declare const meta: {
|
|
|
15
16
|
required?: boolean | string | undefined;
|
|
16
17
|
error?: string | undefined;
|
|
17
18
|
bottomToolbar?: React.ReactNode;
|
|
19
|
+
showToolbar?: boolean | undefined;
|
|
18
20
|
onImageUpload?: import("./richTextArea.types").OnImageUploadFn | undefined;
|
|
19
21
|
onImageRemove?: ((ref: string) => Promise<void>) | undefined;
|
|
20
22
|
}>) => React.JSX.Element))[];
|
|
@@ -5,6 +5,8 @@ export type RichTextAreaProps = {
|
|
|
5
5
|
onChange: (markdown: string) => void;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
/** Editor height in lines. Defaults to a medium height. */
|
|
9
|
+
rows?: 'sm' | 'md' | 'lg';
|
|
8
10
|
className?: string;
|
|
9
11
|
label?: string;
|
|
10
12
|
description?: string | React.ReactNode;
|
|
@@ -14,6 +16,7 @@ export type RichTextAreaProps = {
|
|
|
14
16
|
/** Used for the bottomToolbar */
|
|
15
17
|
bottomToolbar?: ReactNode;
|
|
16
18
|
/** Optional upload handler that returns a display src and optional stable image ref. */
|
|
19
|
+
showToolbar?: boolean;
|
|
17
20
|
onImageUpload?: OnImageUploadFn;
|
|
18
21
|
/** Optional remove handler for deleting persisted images by stable ref. */
|
|
19
22
|
onImageRemove?: (ref: string) => Promise<void>;
|
|
@@ -16,7 +16,7 @@ export interface SaksbehandlingShellProps {
|
|
|
16
16
|
caseActions?: ReactNode;
|
|
17
17
|
/** Actions related to the currently selected item, shown on the right of the toolbar. */
|
|
18
18
|
itemActions?: ReactNode;
|
|
19
|
-
items
|
|
19
|
+
items?: SaksbehandlingItem[];
|
|
20
20
|
selectedItemId?: string;
|
|
21
21
|
onSelectItemId: (id: string) => void;
|
|
22
22
|
/** Optional comparison section content. When omitted, the comparison panel and its toggle are not rendered. */
|