tp-react-elements-dev 1.4.13 → 1.4.14

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.
@@ -4,6 +4,9 @@ interface OptionsProps {
4
4
  label: string | boolean | number;
5
5
  value: string | number;
6
6
  }
7
+ interface TextFieldInputProps {
8
+ autoComplete: 'new-password' | 'off';
9
+ }
7
10
  export interface FormSectionPropsItem {
8
11
  name: string;
9
12
  label: string;
@@ -25,6 +28,7 @@ export interface FormSectionPropsItem {
25
28
  monthSpan?: number;
26
29
  variant?: string;
27
30
  allowSpecialChars?: boolean;
31
+ InputProps?: TextFieldInputProps;
28
32
  }
29
33
  export interface FormRenderProps {
30
34
  item: FormSectionPropsItem;
package/dist/index.esm.js CHANGED
@@ -52082,24 +52082,27 @@ const PasswordField = ({ props }) => {
52082
52082
  const handleTogglePasswordVisibility = () => {
52083
52083
  setShowPassword((prevShowPassword) => !prevShowPassword);
52084
52084
  };
52085
- return (jsxRuntimeExports.jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [" ", jsxRuntimeExports.jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(Box, Object.assign({ sx: { position: "relative" } }, { children: [" ", jsxRuntimeExports.jsx(TextField, Object.assign({ size: "small", type: showPassword ? "text" : "password", placeholder: props.item.placeholder || "" }, field, { label: `${props.item.label}${props.item.required ? ' *' : ''}`, sx: {
52086
- width: "100%",
52087
- "& .css-kichxs-MuiFormLabel-root-MuiInputLabel-root,.css-1holvmy": {
52088
- top: "-8px",
52089
- },
52090
- }, value: field.value || null, disabled: props.item.disable })), jsxRuntimeExports.jsx(IconButton, Object.assign({ sx: {
52091
- position: "absolute",
52092
- right: "14px",
52093
- top: "50%",
52094
- transform: "translateY(-50%)",
52095
- width: '25px'
52096
- }, "aria-label": "toggle password visibility", onClick: handleTogglePasswordVisibility, edge: "end" }, { children: showPassword ? (jsxRuntimeExports.jsx(Visibility, { sx: {
52097
- fontSize: "12px",
52098
- position: "absolute",
52099
- } })) : (jsxRuntimeExports.jsx(VisibilityOff, { sx: {
52100
- fontSize: "12px",
52085
+ return (jsxRuntimeExports.jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [" ", jsxRuntimeExports.jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => {
52086
+ var _a, _b;
52087
+ return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(Box, Object.assign({ sx: { position: "relative" } }, { children: [" ", jsxRuntimeExports.jsx(TextField, Object.assign({ size: "small", type: showPassword ? "text" : "password", autoComplete: ((_b = (_a = props.item) === null || _a === void 0 ? void 0 : _a.InputProps) === null || _b === void 0 ? void 0 : _b.autoComplete) || 'off', placeholder: props.item.placeholder || "" }, field, { label: `${props.item.label}${props.item.required ? ' *' : ''}`, sx: {
52088
+ width: "100%",
52089
+ "& .css-kichxs-MuiFormLabel-root-MuiInputLabel-root,.css-1holvmy": {
52090
+ top: "-8px",
52091
+ },
52092
+ }, value: field.value || null, disabled: props.item.disable })), jsxRuntimeExports.jsx(IconButton, Object.assign({ sx: {
52101
52093
  position: "absolute",
52102
- } })) }))] })), jsxRuntimeExports.jsx(ErrorMessageComponent, { children: jsxRuntimeExports.jsx(s, { errors: props.errors, name: props.item.name }) })] })) })] })));
52094
+ right: "14px",
52095
+ top: "50%",
52096
+ transform: "translateY(-50%)",
52097
+ width: '25px'
52098
+ }, "aria-label": "toggle password visibility", onClick: handleTogglePasswordVisibility, edge: "end" }, { children: showPassword ? (jsxRuntimeExports.jsx(Visibility, { sx: {
52099
+ fontSize: "12px",
52100
+ position: "absolute",
52101
+ } })) : (jsxRuntimeExports.jsx(VisibilityOff, { sx: {
52102
+ fontSize: "12px",
52103
+ position: "absolute",
52104
+ } })) }))] })), jsxRuntimeExports.jsx(ErrorMessageComponent, { children: jsxRuntimeExports.jsx(s, { errors: props.errors, name: props.item.name }) })] }));
52105
+ } })] })));
52103
52106
  };
52104
52107
 
52105
52108
  const Monthpickerrender = ({ props }) => {
@@ -52868,9 +52871,9 @@ const FormRenderWrapper = ({ formArray, name, numberOfColumns = 3, form, }) => {
52868
52871
  // useEffect(() => {
52869
52872
  // // form.reset(initialValues, { resolver: yupResolver(validationSchema) });
52870
52873
  // }, [formArray, validationSchema, initialValues]);
52871
- return (jsxRuntimeExports.jsx(ThemeProvider, Object.assign({ theme: customTheme }, { children: jsxRuntimeExports.jsx(FormComponent, Object.assign({ container: true, margin: "auto" }, { children: formArray.map((item, i) => {
52872
- return (jsxRuntimeExports.jsx(Formitem, Object.assign({ container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns }, { children: jsxRuntimeExports.jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: form.formState.errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue }) }), i));
52873
- }) })) })));
52874
+ return (jsxRuntimeExports.jsx(ThemeProvider, Object.assign({ theme: customTheme }, { children: jsxRuntimeExports.jsx(Box, Object.assign({ component: 'form', autoComplete: "off" }, { children: jsxRuntimeExports.jsx(FormComponent, Object.assign({ container: true, margin: "auto" }, { children: formArray.map((item, i) => {
52875
+ return (jsxRuntimeExports.jsx(Formitem, Object.assign({ container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns }, { children: jsxRuntimeExports.jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: form.formState.errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue }) }), i));
52876
+ }) })) })) })));
52874
52877
  };
52875
52878
 
52876
52879
  /**