@ostack.tech/ui-kform 0.6.5 → 0.8.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.
@@ -29,7 +29,7 @@ export interface AnnexesManagerProps extends ComponentPropsWithoutRef<"nav"> {
29
29
  /** Properties to pass to the menu container element. */
30
30
  menuContainerProps?: ComponentPropsWithRef<"div">;
31
31
  /** Properties to pass to the menu trigger component. */
32
- menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button>, "icon">;
32
+ menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "icon">;
33
33
  /** Properties to pass to the menu content component. */
34
34
  menuContentProps?: ComponentPropsWithRef<typeof DropdownMenuContent>;
35
35
  /** Properties to pass to the menu component. */
@@ -3,7 +3,7 @@ import { ComponentPropsWithoutRef, ComponentPropsWithRef } from 'react';
3
3
  import { AnnexesManager } from './AnnexesManager.tsx';
4
4
  /** Properties of the annexes' menu. */
5
5
  export interface AnnexesMenuProps extends Pick<ComponentPropsWithoutRef<typeof AnnexesManager>, "menuButtonText" | "addAnnexText" | "removeAnnexButtonLabel" | "removeAnnexKeyboardHint" | "removeAnnexConfirmDialogTitle" | "removeAnnexConfirmDialogMessage" | "removeAnnexConfirmDialogOkText" | "removeAnnexConfirmDialogCancelText">, ComponentPropsWithoutRef<typeof DropdownMenu> {
6
- menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button>, "icon">;
6
+ menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "icon">;
7
7
  menuContentProps?: ComponentPropsWithRef<typeof DropdownMenuContent>;
8
8
  }
9
9
  /** Component that allows to navigate between, add, and remove annexes. */
@@ -15,7 +15,7 @@ import { IssueMessages, IssueMessagesByCode } from '../IssueMessages';
15
15
  */
16
16
  export type FileControlFileInteraction = "view" | "download" | "none";
17
17
  /** Properties of the file control component. */
18
- export interface FileControlProps<T extends KFormFile | null = KFormFile | null> extends Omit<FileInputOptions<T, FileList, ComponentRef<typeof Input>>, "enabled" | "formatFromFileList" | "parseToFileList">, Omit<ComponentPropsWithoutRef<typeof Input>, "type" | "multiple" | "defaultValue" | "value" | "onValueChange" | "status" | "align"> {
18
+ export interface FileControlProps<T extends KFormFile | null = KFormFile | null> extends Omit<FileInputOptions<T, File | null, ComponentRef<typeof Input>>, "enabled" | "formatFromJsFile" | "parseToJsFile">, Omit<ComponentPropsWithoutRef<typeof Input>, "type" | "multiple" | "defaultValue" | "value" | "onValueChange" | "status" | "align"> {
19
19
  /** Path to the value. */
20
20
  path?: string | Path;
21
21
  /**
@@ -48,7 +48,7 @@ export interface FileControlProps<T extends KFormFile | null = KFormFile | null>
48
48
  */
49
49
  preventAutoFocus?: boolean;
50
50
  /** Reference to the control's API. */
51
- apiRef?: Ref<FileInputController<T, FileList, ComponentRef<typeof Input>> | undefined>;
51
+ apiRef?: Ref<FileInputController<T, File | null, ComponentRef<typeof Input>> | undefined>;
52
52
  /**
53
53
  * Type of interaction with the selected file.
54
54
  *
@@ -86,15 +86,15 @@ export interface IssuesPanelProps extends Pick<IssuesTrackerOptions, "issuesOrde
86
86
  /** Properties to pass to the pagination element. */
87
87
  paginationProps?: ComponentPropsWithRef<"div">;
88
88
  /** Properties to pass to the "focus" button component. */
89
- focusButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "label">;
89
+ focusButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "label">;
90
90
  /** Properties to pass to the "previous issue" button component. */
91
- previousIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "label">;
91
+ previousIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "label">;
92
92
  /** Properties to pass to the "next issue" button component. */
93
- nextIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "label">;
93
+ nextIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "label">;
94
94
  /** Properties to pass to the "first issue" button component. */
95
- firstIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "label">;
95
+ firstIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "label">;
96
96
  /** Properties to pass to the "last issue" button component. */
97
- lastIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "label">;
97
+ lastIssueButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "label">;
98
98
  /** Properties to pass to the icon component. */
99
99
  iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
100
100
  /** Properties to pass to the title component. */
@@ -19,4 +19,4 @@ export interface LoadActionProps<T = unknown> extends Omit<ButtonProps, "childre
19
19
  keybinds?: string | string[] | null;
20
20
  }
21
21
  /** Action used to load a form from a file. */
22
- export declare function LoadAction<T = unknown>({ label, keybinds, loading, enabledWhenLoading, disabled, onClick, decode, path, extensions, mimeTypes, description, startIn, id, setPristineOnLoad, validateOnLoad, successMessage, errorMessage, ...otherProps }: LoadActionProps<T>): import("react/jsx-runtime").JSX.Element;
22
+ export declare function LoadAction<T = unknown>({ label, keybinds, loading, disabled, onClick, decode, path, extensions, mimeTypes, description, startIn, id, setPristineOnLoad, validateOnLoad, successMessage, errorMessage, ...otherProps }: LoadActionProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { AbsolutePath, Path } from '@ostack.tech/kform';
2
2
  import { Link } from '@ostack.tech/ui';
3
3
  import { ComponentPropsWithoutRef } from 'react';
4
4
  /** Properties of the path link component. */
5
- export interface PathLinkProps extends Omit<ComponentPropsWithoutRef<typeof Link>, "href"> {
5
+ export interface PathLinkProps extends Omit<ComponentPropsWithoutRef<typeof Link<"a">>, "href"> {
6
6
  /** KForm path to link to. */
7
7
  to: string | Path;
8
8
  /**
@@ -13,4 +13,4 @@ export interface PathLinkProps extends Omit<ComponentPropsWithoutRef<typeof Link
13
13
  buildHref?: (path: AbsolutePath) => string;
14
14
  }
15
15
  /** Link to a KForm path. */
16
- export declare function PathLink({ to, buildHref, onClick, ...otherProps }: PathLinkProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare const PathLink: import('react').ForwardRefExoticComponent<PathLinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
@@ -38,4 +38,4 @@ export interface PrintActionProps extends Omit<ButtonProps, "children"> {
38
38
  * </Printer>;
39
39
  * ```
40
40
  */
41
- export declare function PrintAction({ label, keybinds, disabled, loading, enabledWhenLoading, onClick, ...otherProps }: PrintActionProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function PrintAction({ label, keybinds, disabled, loading, onClick, ...otherProps }: PrintActionProps): import("react/jsx-runtime").JSX.Element;
@@ -43,9 +43,9 @@ export interface SaveActionProps<T = unknown> extends Omit<ButtonProps, "childre
43
43
  */
44
44
  saveAsKeybinds?: string | string[] | null;
45
45
  /** Properties to pass to the save options button component. */
46
- saveOptionsProps?: Omit<Partial<ComponentPropsWithRef<typeof IconButton>>, "label">;
46
+ saveOptionsProps?: Omit<Partial<ComponentPropsWithRef<typeof IconButton<"button">>>, "label">;
47
47
  /** Properties to pass to the save options dropdown menu component. */
48
48
  dropdownMenuProps?: ComponentPropsWithRef<typeof DropdownMenuContent>;
49
49
  }
50
50
  /** Action used to save the form to a file. */
51
- export declare function SaveAction<T = unknown>({ label, keybinds, disableOverwrite, saveOptionsLabel, saveAsLabel, saveAsKeybinds, loading, enabledWhenLoading, disabled, onClick, variant, color, path, encode, fileName, extensions, description, mimeTypes, startIn, excludeAcceptAllOption, id, successMessage, errorMessage, saveOptionsProps, dropdownMenuProps, ...otherProps }: SaveActionProps<T>): import("react/jsx-runtime").JSX.Element;
51
+ export declare function SaveAction<T = unknown>({ label, keybinds, disableOverwrite, saveOptionsLabel, saveAsLabel, saveAsKeybinds, loading, disabled, onClick, variant, color, path, encode, fileName, extensions, description, mimeTypes, startIn, excludeAcceptAllOption, id, successMessage, errorMessage, saveOptionsProps, dropdownMenuProps, ...otherProps }: SaveActionProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -84,13 +84,13 @@ export interface SubmitActionProps<T = unknown, TSubmitResult = unknown> extends
84
84
  /** Properties to pass to the confirmation dialog footer component. */
85
85
  dialogFooterProps?: Omit<ComponentPropsWithRef<typeof AlertDialogFooter>, "children">;
86
86
  /** Properties to pass to the confirmation dialog OK button component. */
87
- dialogOkButtonProps?: Omit<ComponentPropsWithRef<typeof Button>, "children">;
87
+ dialogOkButtonProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "children">;
88
88
  /** Properties to pass to the confirmation dialog cancel button component. */
89
- dialogCancelButtonProps?: Omit<ComponentPropsWithRef<typeof Button>, "children">;
89
+ dialogCancelButtonProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "children">;
90
90
  /** Properties to pass to the alert used to confirm warnings. */
91
91
  confirmWarningsAlertProps?: Omit<ComponentPropsWithRef<typeof Alert>, "children">;
92
92
  /** Properties to pass to the checkbox used to confirm warnings. */
93
93
  confirmWarningsCheckboxProps?: Omit<ComponentPropsWithRef<typeof Checkbox>, "checked" | "onCheckedChange" | "children">;
94
94
  }
95
95
  /** Action used to submit the form. */
96
- export declare function SubmitAction<T = unknown, TSubmitResult = unknown>({ onSubmit, onInvalidSubmit, onSuccessfulSubmit, onFailedSubmit, setTouchedOnSubmit, validateOnSubmit, setPristineOnSuccessfulSubmit, convertExternalIssuesTableRowIndicesToIds, label, keybinds, confirmWarnings, loading, enabledWhenLoading, disabled, onClick, dialogTitle, dialogDescription, dialogBody, confirmWarningsCheckboxLabel, dialogOkText, dialogCancelText, successMessage, errorMessage, dialogContentProps, dialogHeaderProps, dialogTitleProps, dialogBodyProps, dialogDescriptionProps, dialogFooterProps, dialogOkButtonProps, dialogCancelButtonProps, confirmWarningsAlertProps, confirmWarningsCheckboxProps, ...otherProps }: SubmitActionProps<T, TSubmitResult>): import("react/jsx-runtime").JSX.Element;
96
+ export declare function SubmitAction<T = unknown, TSubmitResult = unknown>({ onSubmit, onInvalidSubmit, onSuccessfulSubmit, onFailedSubmit, setTouchedOnSubmit, validateOnSubmit, setPristineOnSuccessfulSubmit, convertExternalIssuesTableRowIndicesToIds, label, keybinds, confirmWarnings, loading, disabled, onClick, dialogTitle, dialogDescription, dialogBody, confirmWarningsCheckboxLabel, dialogOkText, dialogCancelText, successMessage, errorMessage, dialogContentProps, dialogHeaderProps, dialogTitleProps, dialogBodyProps, dialogDescriptionProps, dialogFooterProps, dialogOkButtonProps, dialogCancelButtonProps, confirmWarningsAlertProps, confirmWarningsCheckboxProps, ...otherProps }: SubmitActionProps<T, TSubmitResult>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Button } from '@ostack.tech/ui';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
  /** Properties of the table control add row trigger component. */
4
- export interface TableControlAddRowTriggerProps extends ComponentPropsWithoutRef<typeof Button> {
4
+ export interface TableControlAddRowTriggerProps extends ComponentPropsWithoutRef<typeof Button<"button">> {
5
5
  /**
6
6
  * Text displayed on the button rendered by default when no `children` are
7
7
  * provided. If `children` are provided, this property has no effect.
@@ -1,7 +1,7 @@
1
1
  import { IconButton } from '@ostack.tech/ui';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
  /** Properties of the table control remove row trigger component. */
4
- export interface TableControlRemoveRowTriggerProps extends Omit<Partial<ComponentPropsWithoutRef<typeof IconButton>>, "children"> {
4
+ export interface TableControlRemoveRowTriggerProps extends Omit<Partial<ComponentPropsWithoutRef<typeof IconButton<"button">>>, "children"> {
5
5
  /**
6
6
  * Whether to show a confirmation message when removing a row.
7
7
  *
@@ -18,4 +18,4 @@ export interface ValidateActionProps extends Omit<ButtonProps, "children"> {
18
18
  keybinds?: string | string[] | null;
19
19
  }
20
20
  /** Action used to validate the form. */
21
- export declare function ValidateAction({ label, keybinds, loading, enabledWhenLoading, disabled, onClick, ...otherProps }: ValidateActionProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ValidateAction({ label, keybinds, loading, disabled, onClick, ...otherProps }: ValidateActionProps): import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,7 @@ export interface UseRegisterControlResult<TElem> {
16
16
  displayDisabled: boolean;
17
17
  displayReadOnly: boolean;
18
18
  displayStatusToDisplay: DisplayStatus | undefined;
19
+ displayValidating: boolean;
19
20
  issuesToDisplay: SealedValidationIssue[];
20
21
  autofocusRef: RefObject<TElem | null>;
21
22
  handleFocus: (event: FocusEvent) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ostack.tech/ui-kform",
3
3
  "description": "Integration of ostack/UI with ostack/KForm.",
4
- "version": "0.6.5",
4
+ "version": "0.8.0",
5
5
  "homepage": "https://ui.ostack.tech/",
6
6
  "author": {
7
7
  "name": "Opensoft",
@@ -50,9 +50,9 @@
50
50
  "@fortawesome/fontawesome-svg-core": "^6.2.0 || ^7.0.0",
51
51
  "@fortawesome/free-regular-svg-icons": "^6.2.0 || ^7.0.0",
52
52
  "@fortawesome/free-solid-svg-icons": "^6.2.0 || ^7.0.0",
53
- "@ostack.tech/kform": "~0.31.0",
54
- "@ostack.tech/kform-react": "~0.31.0",
55
- "@ostack.tech/ui": "~0.6.5",
53
+ "@ostack.tech/kform": "~0.32.0",
54
+ "@ostack.tech/kform-react": "~0.32.0",
55
+ "@ostack.tech/ui": "~0.8.0",
56
56
  "@types/react": "^18.0.0 || ^19.0.0",
57
57
  "@types/react-dom": "^18.0.0 || ^19.0.0",
58
58
  "date-fns": "^4.1.0",