kelt-ui-kit-react 1.2.8 → 1.3.1
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/form/Form.d.ts +4 -4
- package/dist/form/form.enum.d.ts +2 -1
- package/dist/form/form.interface.d.ts +7 -2
- package/dist/form/input/Input.d.ts +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1100 -1023
- package/dist/search/Search.d.ts +1 -1
- package/dist/select/Select.d.ts +5 -3
- package/package.json +1 -1
- package/src/form/Form.tsx +75 -33
- package/src/form/Form.view.tsx +1 -1
- package/src/form/form.enum.ts +1 -0
- package/src/form/form.interface.tsx +7 -2
- package/src/form/input/Input.tsx +76 -0
- package/src/form/input/input.css +0 -0
- package/src/index.ts +1 -0
- package/src/search/Search.tsx +1 -1
- package/src/search/Search.view.tsx +1 -1
- package/src/select/Select.tsx +29 -7
package/dist/form/Form.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { FormInterface, FormValuesInterface } from './form.interface';
|
|
3
3
|
|
|
4
4
|
export type FormProps<T extends {
|
|
5
|
-
[key: string]: string | number | boolean | Date;
|
|
5
|
+
[key: string]: string | number | boolean | Date | string[];
|
|
6
6
|
}> = {
|
|
7
7
|
className?: string;
|
|
8
8
|
title?: string;
|
|
@@ -12,15 +12,15 @@ export type FormProps<T extends {
|
|
|
12
12
|
onChange?: (values: FormValuesInterface<T>) => void;
|
|
13
13
|
};
|
|
14
14
|
export declare const DynamicForm: React.ForwardRefExoticComponent<FormProps<{
|
|
15
|
-
[key: string]: string | number | boolean | Date;
|
|
15
|
+
[key: string]: string | number | boolean | string[] | Date;
|
|
16
16
|
}> & React.RefAttributes<{
|
|
17
17
|
clearInput?: ((name: string) => void) | undefined;
|
|
18
18
|
resetForm?: (() => void) | undefined;
|
|
19
19
|
focusInitialElement?: (() => void) | undefined;
|
|
20
20
|
getValues?: (() => Partial<{
|
|
21
|
-
[x: string]: string | number | boolean | Date;
|
|
21
|
+
[x: string]: string | number | boolean | string[] | Date;
|
|
22
22
|
}>) | undefined;
|
|
23
23
|
updateFormValue?: ((values: Partial<{
|
|
24
|
-
[x: string]: string | number | boolean | Date;
|
|
24
|
+
[x: string]: string | number | boolean | string[] | Date;
|
|
25
25
|
}>) => void) | undefined;
|
|
26
26
|
}>>;
|
package/dist/form/form.enum.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TypeInputEnum } from './form.enum';
|
|
2
2
|
|
|
3
3
|
export type FormValuesInterface<T extends {
|
|
4
|
-
[key: string]: string | number | boolean | Date;
|
|
4
|
+
[key: string]: string | number | boolean | Date | string[];
|
|
5
5
|
}> = Partial<{
|
|
6
6
|
[K in keyof T]: T[K];
|
|
7
7
|
}>;
|
|
@@ -22,10 +22,15 @@ export interface FormInterface {
|
|
|
22
22
|
required?: boolean;
|
|
23
23
|
condition?: FormCondition;
|
|
24
24
|
icon?: string;
|
|
25
|
+
multiple?: boolean;
|
|
26
|
+
options?: {
|
|
27
|
+
value: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}[];
|
|
25
30
|
className?: string;
|
|
26
31
|
autoComplete?: autoCompleteType;
|
|
27
32
|
step?: string;
|
|
28
|
-
onChange?: (value: string | number | boolean | Date, name?: string) => void;
|
|
33
|
+
onChange?: (value: string | number | boolean | Date | string[], name?: string) => void;
|
|
29
34
|
onRequired?: (value: string | number | boolean | Date) => boolean;
|
|
30
35
|
onDisabled?: (value: string | number | boolean | Date) => boolean;
|
|
31
36
|
onInvalid?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
export interface InputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
onInvalid?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
value?: string | number;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
inputMode?: "text" | "numeric" | "decimal" | "email" | "tel" | "search";
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
minLength?: number;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
autoComplete?: "on" | "off";
|
|
17
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
18
|
+
step?: string;
|
|
19
|
+
tabIndex?: number;
|
|
20
|
+
checked?: boolean;
|
|
21
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const Input: ({ id, name, type, value, onInvalid, placeholder, className, inputMode, minLength, maxLength, autoFocus, disabled, required, autoComplete, ref, tabIndex, step, checked, onChange, onBlur, }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { Expands } from './expands/Expands';
|
|
|
13
13
|
export { FilAriane } from './filAriane/FilAriane';
|
|
14
14
|
export { DynamicForm } from './form/Form';
|
|
15
15
|
export { TypeInputEnum } from './form/form.enum';
|
|
16
|
+
export { Input } from './form/input/Input';
|
|
16
17
|
export { TextArea } from './form/textArea/TextArea';
|
|
17
18
|
export { Grid } from './grid/Grid';
|
|
18
19
|
export { Header } from './header/Header';
|