@delightui/components 0.1.114 → 0.1.116
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/cjs/components/atoms/Input/Input.d.ts +1 -0
- package/dist/cjs/components/atoms/Input/Input.presenter.d.ts +2 -1
- package/dist/cjs/components/atoms/Input/Input.types.d.ts +5 -0
- package/dist/cjs/components/atoms/Password/Password.presenter.d.ts +1 -0
- package/dist/cjs/components/molecules/List/List.types.d.ts +1 -1
- package/dist/cjs/library.js +2 -2
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/atoms/Input/Input.d.ts +1 -0
- package/dist/esm/components/atoms/Input/Input.presenter.d.ts +2 -1
- package/dist/esm/components/atoms/Input/Input.types.d.ts +5 -0
- package/dist/esm/components/atoms/Password/Password.presenter.d.ts +1 -0
- package/dist/esm/components/molecules/List/List.types.d.ts +1 -1
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/docs/components/molecules/List.md +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ declare const Input: import("react").ForwardRefExoticComponent<Omit<import("reac
|
|
|
2
2
|
inputType?: import("./Input.types").InputTypeEnum;
|
|
3
3
|
leadingIcon?: React.ReactNode;
|
|
4
4
|
trailingIcon?: React.ReactNode;
|
|
5
|
+
preProcessInput?: (text: string) => string;
|
|
5
6
|
'component-variant'?: string;
|
|
6
7
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
8
|
export default Input;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputProps } from './Input.types';
|
|
2
|
-
declare const usePresenter: (props: InputProps) => {
|
|
2
|
+
declare const usePresenter: (props: InputProps, ref: React.ForwardedRef<HTMLInputElement>) => {
|
|
3
3
|
variantProps: {
|
|
4
4
|
'component-variant': string;
|
|
5
5
|
};
|
|
@@ -307,5 +307,6 @@ declare const usePresenter: (props: InputProps) => {
|
|
|
307
307
|
inputType: "number" | "text" | "email" | "password";
|
|
308
308
|
required: boolean | undefined;
|
|
309
309
|
componentVariant: string | undefined;
|
|
310
|
+
inputRef: import("react").Ref<HTMLInputElement>;
|
|
310
311
|
};
|
|
311
312
|
export default usePresenter;
|
|
@@ -18,6 +18,11 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'v
|
|
|
18
18
|
* Icon to be displayed after the input.
|
|
19
19
|
*/
|
|
20
20
|
trailingIcon?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* a function that will preprocess the value before updating the value for form
|
|
23
|
+
* and onValueChange value
|
|
24
|
+
*/
|
|
25
|
+
preProcessInput?: (text: string) => string;
|
|
21
26
|
/**
|
|
22
27
|
* provide a way to override the styling
|
|
23
28
|
*/
|
|
@@ -304,6 +304,7 @@ declare const usePresenter: (props: PasswordProps) => {
|
|
|
304
304
|
placeholder?: string | undefined;
|
|
305
305
|
readOnly?: boolean | undefined;
|
|
306
306
|
onValueChange?: ((value: string) => void) | undefined;
|
|
307
|
+
preProcessInput?: (text: string) => string;
|
|
307
308
|
'component-variant'?: string;
|
|
308
309
|
initialValue?: string | undefined;
|
|
309
310
|
};
|