@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.
@@ -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
  };
@@ -134,5 +134,5 @@ export type ListProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLUListEle
134
134
  * @param data
135
135
  * @returns
136
136
  */
137
- updateSortOrder?: (data: T[]) => void;
137
+ updateSortOrder?: (data: T[], oldIndex: number, newIndex: number) => void;
138
138
  };