@ssplib/react-components 0.0.333 → 0.0.334
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/components/form/input/Input.d.ts +6 -7
- package/components/form/input/MaskInput.d.ts +9 -6
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.esm.js +2 -2
- package/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type
|
|
2
|
+
type InputType = 'cnpj' | 'cpf' | 'input' | 'email' | 'cpf_cnpj' | 'phone' | 'number' | 'rg' | 'password' | 'cep' | 'sei';
|
|
3
|
+
interface InputProps {
|
|
4
|
+
type?: InputType;
|
|
5
5
|
name: string;
|
|
6
|
-
watchValue?: string;
|
|
7
6
|
title?: string;
|
|
8
7
|
required?: boolean;
|
|
9
8
|
numberMask?: string;
|
|
@@ -15,8 +14,8 @@ export declare function Input({ type, numberMask, xs, sm, inputMinLength, inputM
|
|
|
15
14
|
sm?: number;
|
|
16
15
|
md?: number;
|
|
17
16
|
disabled?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}): JSX.Element;
|
|
17
|
+
customValidate?: (value: string, form: Record<string, any>) => string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function Input({ type, numberMask, xs, sm, md, inputMinLength, inputMaxLength, defaultValue, disabled, name, title, required, customPlaceholder, customValidate, }: InputProps): JSX.Element;
|
|
21
20
|
declare const _default: React.MemoExoticComponent<typeof Input>;
|
|
22
21
|
export default _default;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IMaskInput } from 'react-imask';
|
|
3
3
|
export type IMaskConfig = Partial<React.ComponentProps<typeof IMaskInput>>;
|
|
4
|
-
|
|
5
|
-
formConfig:
|
|
4
|
+
interface MaskInputProps {
|
|
5
|
+
formConfig: {
|
|
6
|
+
name: string;
|
|
7
|
+
} & Record<string, any>;
|
|
6
8
|
defaultValue?: string;
|
|
7
9
|
disabled?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}): JSX.Element;
|
|
10
|
+
imaskConfig: IMaskConfig;
|
|
11
|
+
onMaskChange?: (value: string, setMask: React.Dispatch<React.SetStateAction<IMaskConfig['mask']>>) => void;
|
|
12
|
+
}
|
|
13
|
+
export default function MaskInput({ formConfig, disabled, imaskConfig, onMaskChange }: MaskInputProps): JSX.Element;
|
|
14
|
+
export {};
|