tp-react-elements 1.2.7 → 1.2.9
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/_virtual/index.esm10.js +2 -2
- package/dist/_virtual/index.esm11.js +2 -2
- package/dist/_virtual/index.esm12.js +2 -2
- package/dist/_virtual/index.esm13.js +2 -2
- package/dist/_virtual/index.esm14.js +2 -2
- package/dist/_virtual/index.esm5.js +2 -2
- package/dist/_virtual/index.esm7.js +2 -2
- package/dist/_virtual/index.esm9.js +2 -2
- package/dist/components/Form/FormRenderWrapper.esm.js +1 -1
- package/dist/components/FormComponents/PasswordField/PasswordField.esm.js +40 -40
- package/dist/node_modules/prop-types/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/accessibility/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DayCell/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +1 -1
- package/dist/utils/Interface/FormInterface.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var propTypes = {exports: {}};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { propTypes as __module };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Month = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Month as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateInput = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateInput as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DayCell = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DayCell as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var InputRangeField = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { InputRangeField as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Calendar = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Calendar as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DefinedRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DefinedRange as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var accessibility = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { accessibility as __exports };
|
|
@@ -21,7 +21,7 @@ const FormRenderWrapper = ({ formArray, name = '', numberOfColumns = 3, form, va
|
|
|
21
21
|
* Maps through the form array and renders each item with appropriate configuration
|
|
22
22
|
*/
|
|
23
23
|
return (jsx(FormComponent, { container: true, margin: 'auto', children: formArray.map((item, i) => {
|
|
24
|
-
return (item.inputType && (jsx(Formitem, { container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns, children: item.inputType === 'custom' ? (item.FormElement || jsx(Fragment, {})) : (jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue, watch: form.watch, variant: variant, fieldError: fieldError })) }, `${name}_${i}`)));
|
|
24
|
+
return (item.inputType && (jsx(Formitem, { id: item.id || '', className: item.className || '', container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns, children: item.inputType === 'custom' ? (item.FormElement || jsx(Fragment, {})) : (jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue, watch: form.watch, variant: variant, fieldError: fieldError })) }, `${name}_${i}`)));
|
|
25
25
|
}) }));
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
@@ -46,46 +46,46 @@ const PasswordField = ({ props, variant }) => {
|
|
|
46
46
|
/**
|
|
47
47
|
* Renders the password field component with visibility toggle
|
|
48
48
|
*/
|
|
49
|
-
return (jsx(Box, { position: 'relative', children: jsx(FormControl, { fullWidth: true, children: jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => (jsxs(Fragment, { children: [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
49
|
+
return (jsx(Box, { position: 'relative', children: jsx(FormControl, { fullWidth: true, children: jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => (jsxs(Fragment, { children: [renderLabel(variant, props), jsx(TextField, { size: "small", error: isShowBorderError, type: showPassword ? 'text' : 'password', autoComplete: props.item?.InputProps?.autoComplete || 'off', placeholder: props.item.placeholder || '', ...field, label: label, sx: {
|
|
50
|
+
width: '100%',
|
|
51
|
+
'& .css-kichxs-MuiFormLabel-root-MuiInputLabel-root,.css-1holvmy': {
|
|
52
|
+
top: '-8px',
|
|
53
|
+
},
|
|
54
|
+
}, inputProps: {
|
|
55
|
+
maxLength: props.item.maxLength || 100,
|
|
56
|
+
/**
|
|
57
|
+
* Handles input events
|
|
58
|
+
* Calls custom onInputProps handler if provided
|
|
59
|
+
*
|
|
60
|
+
* @param {any} e - The input event object
|
|
61
|
+
*/
|
|
62
|
+
onInput: (e) => {
|
|
63
|
+
props.item.onInputProps && props.item.onInputProps(e);
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Handles paste events
|
|
67
|
+
* Prevents paste action if configured
|
|
68
|
+
*
|
|
69
|
+
* @param {React.ClipboardEvent} e - The paste event object
|
|
70
|
+
*/
|
|
71
|
+
onPaste: (e) => {
|
|
72
|
+
if (props.item?.doNotAllowPaste) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
}, value: field.value || null, disabled: props.item.disable }), jsx(IconButton, { sx: {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
right: '14px',
|
|
79
|
+
top: variant === 'standard' ? '65%' : '45%',
|
|
80
|
+
transform: 'translateY(-50%)',
|
|
81
|
+
width: '25px',
|
|
82
|
+
}, "aria-label": showPassword ? 'Hide password' : 'Show password', "aria-pressed": showPassword, onClick: handleTogglePasswordVisibility, edge: "end", children: showPassword ? (jsx(Visibility, { sx: {
|
|
83
|
+
fontSize: '12px',
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
} })) : (jsx(VisibilityOff, { sx: {
|
|
86
|
+
fontSize: '12px',
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
} })) }), jsx(FormBottomField, { ...props })] })) }) }) }, props.item.name));
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
export { PasswordField as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as propTypes } from '../../_virtual/index.
|
|
1
|
+
import { __module as propTypes } from '../../_virtual/index.esm10.js';
|
|
2
2
|
import { __require as requireReactIs } from './node_modules/react-is/index.esm.js';
|
|
3
3
|
import { __require as requireFactoryWithTypeCheckers } from './factoryWithTypeCheckers.esm.js';
|
|
4
4
|
import { __require as requireFactoryWithThrowingShims } from './factoryWithThrowingShims.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as accessibility } from '../../../../_virtual/index.
|
|
1
|
+
import { __exports as accessibility } from '../../../../_virtual/index.esm9.js';
|
|
2
2
|
import { __require as requirePropTypes } from '../../../prop-types/index.esm.js';
|
|
3
3
|
|
|
4
4
|
var hasRequiredAccessibility;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Calendar } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Calendar } from '../../../../../_virtual/index.esm5.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateInput } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateInput } from '../../../../../_virtual/index.esm12.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireClassnames } from '../../../../classnames/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DayCell } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DayCell } from '../../../../../_virtual/index.esm13.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireClassnames } from '../../../../classnames/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DefinedRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DefinedRange } from '../../../../../_virtual/index.esm7.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireStyles } from '../../styles.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as InputRangeField } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as InputRangeField } from '../../../../../_virtual/index.esm14.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Month } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Month } from '../../../../../_virtual/index.esm11.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
|
@@ -84,6 +84,8 @@ export interface FormSectionPropsItem {
|
|
|
84
84
|
optionFontSize?: string;
|
|
85
85
|
isTooltipEnable?: boolean;
|
|
86
86
|
doNotEnableMultiselectOrder?: boolean;
|
|
87
|
+
id?: string;
|
|
88
|
+
className?: string;
|
|
87
89
|
}
|
|
88
90
|
export type VariantProps = 'standard' | 'outlined' | '';
|
|
89
91
|
export interface FormRenderProps {
|