react-restyle-components 0.3.81 → 0.3.83
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/lib/src/core-components/src/components/FormField/components/CssMultilineInput.d.ts.map +1 -1
- package/lib/src/core-components/src/components/FormField/components/CssMultilineInput.js +50 -26
- package/lib/src/core-components/src/core-components/atoms/Input/Input.d.ts.map +1 -1
- package/lib/src/core-components/src/core-components/atoms/Input/Input.js +50 -26
- package/lib/src/core-components/src/core-components/atoms/Textarea/Textarea.d.ts.map +1 -1
- package/lib/src/core-components/src/core-components/atoms/Textarea/Textarea.js +50 -26
- package/package.json +1 -1
package/lib/src/core-components/src/components/FormField/components/CssMultilineInput.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CssMultilineInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/FormField/components/CssMultilineInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAkBzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACxE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"CssMultilineInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/FormField/components/CssMultilineInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAkBzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACxE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,iHAkT7B,CAAC"}
|
|
@@ -75,26 +75,38 @@ export const CssMultilineInput = React.forwardRef(({ id, label, error, required,
|
|
|
75
75
|
// Check if onChange expects a string (custom pattern) by examining function signature
|
|
76
76
|
// If parameter name suggests it expects a value (not 'e' or 'event'), call with value
|
|
77
77
|
// Otherwise, call with event (standard React pattern)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
param
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
try {
|
|
79
|
+
const funcStr = onChange.toString();
|
|
80
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
81
|
+
if (paramMatch) {
|
|
82
|
+
const param = paramMatch[1].trim();
|
|
83
|
+
// If parameter is not 'e', 'event', or starts with 'e:', it might expect value
|
|
84
|
+
if (param &&
|
|
85
|
+
param !== 'e' &&
|
|
86
|
+
param !== 'event' &&
|
|
87
|
+
!param.startsWith('e:')) {
|
|
88
|
+
// Custom pattern - call with value
|
|
89
|
+
onChange(css);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// Standard React pattern - call with event
|
|
93
|
+
onChange(e);
|
|
94
|
+
}
|
|
89
95
|
}
|
|
90
96
|
else {
|
|
91
|
-
//
|
|
97
|
+
// Default to standard React pattern
|
|
92
98
|
onChange(e);
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
|
|
101
|
+
catch (error) {
|
|
102
|
+
// If calling with value fails, try with event
|
|
103
|
+
try {
|
|
104
|
+
onChange(e);
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// If both fail, call with value as fallback
|
|
108
|
+
onChange(css);
|
|
109
|
+
}
|
|
98
110
|
}
|
|
99
111
|
}
|
|
100
112
|
};
|
|
@@ -103,22 +115,34 @@ export const CssMultilineInput = React.forwardRef(({ id, label, error, required,
|
|
|
103
115
|
if (onBlur) {
|
|
104
116
|
const css = e.target.value;
|
|
105
117
|
// Similar logic for onBlur
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
param
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
try {
|
|
119
|
+
const funcStr = onBlur.toString();
|
|
120
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
121
|
+
if (paramMatch) {
|
|
122
|
+
const param = paramMatch[1].trim();
|
|
123
|
+
if (param &&
|
|
124
|
+
param !== 'e' &&
|
|
125
|
+
param !== 'event' &&
|
|
126
|
+
!param.startsWith('e:')) {
|
|
127
|
+
onBlur(css);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
onBlur(e);
|
|
131
|
+
}
|
|
115
132
|
}
|
|
116
133
|
else {
|
|
117
134
|
onBlur(e);
|
|
118
135
|
}
|
|
119
136
|
}
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
catch (error) {
|
|
138
|
+
// If calling with value fails, try with event
|
|
139
|
+
try {
|
|
140
|
+
onBlur(e);
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// If both fail, call with value as fallback
|
|
144
|
+
onBlur(css);
|
|
145
|
+
}
|
|
122
146
|
}
|
|
123
147
|
}
|
|
124
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/core-components/atoms/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,QAAQ,CACtB;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACrE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;CACnE;AAED,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/core-components/atoms/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,QAAQ,CACtB;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACrE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;CACnE;AAED,eAAO,MAAM,KAAK,qFA2JjB,CAAC"}
|
|
@@ -14,26 +14,38 @@ export const Input = React.forwardRef(({ className, error, label, id, onChange,
|
|
|
14
14
|
// Check if onChange expects a string (custom pattern) by examining function signature
|
|
15
15
|
// If parameter name suggests it expects a value (not 'e' or 'event'), call with value
|
|
16
16
|
// Otherwise, call with event (standard React pattern)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
param
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
try {
|
|
18
|
+
const funcStr = onChange.toString();
|
|
19
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
20
|
+
if (paramMatch) {
|
|
21
|
+
const param = paramMatch[1].trim();
|
|
22
|
+
// If parameter is not 'e', 'event', or starts with 'e:', it might expect value
|
|
23
|
+
if (param &&
|
|
24
|
+
param !== 'e' &&
|
|
25
|
+
param !== 'event' &&
|
|
26
|
+
!param.startsWith('e:')) {
|
|
27
|
+
// Custom pattern - call with value
|
|
28
|
+
onChange(value);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// Standard React pattern - call with event
|
|
32
|
+
onChange(e);
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
else {
|
|
30
|
-
//
|
|
36
|
+
// Default to standard React pattern
|
|
31
37
|
onChange(e);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
40
|
+
catch (error) {
|
|
41
|
+
// If calling with value fails, try with event
|
|
42
|
+
try {
|
|
43
|
+
onChange(e);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// If both fail, call with value as fallback
|
|
47
|
+
onChange(value);
|
|
48
|
+
}
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
};
|
|
@@ -42,22 +54,34 @@ export const Input = React.forwardRef(({ className, error, label, id, onChange,
|
|
|
42
54
|
if (onBlur) {
|
|
43
55
|
const value = e.target.value;
|
|
44
56
|
// Similar logic for onBlur
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
param
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
try {
|
|
58
|
+
const funcStr = onBlur.toString();
|
|
59
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
60
|
+
if (paramMatch) {
|
|
61
|
+
const param = paramMatch[1].trim();
|
|
62
|
+
if (param &&
|
|
63
|
+
param !== 'e' &&
|
|
64
|
+
param !== 'event' &&
|
|
65
|
+
!param.startsWith('e:')) {
|
|
66
|
+
onBlur(value);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
onBlur(e);
|
|
70
|
+
}
|
|
54
71
|
}
|
|
55
72
|
else {
|
|
56
73
|
onBlur(e);
|
|
57
74
|
}
|
|
58
75
|
}
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
catch (error) {
|
|
77
|
+
// If calling with value fails, try with event
|
|
78
|
+
try {
|
|
79
|
+
onBlur(e);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// If both fail, call with value as fallback
|
|
83
|
+
onBlur(value);
|
|
84
|
+
}
|
|
61
85
|
}
|
|
62
86
|
}
|
|
63
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/core-components/atoms/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,UAAU,GAAG,QAAQ,CACtB;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACxE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;CACtE;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/core-components/atoms/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,UAAU,GAAG,QAAQ,CACtB;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;IACxE,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC;CACtE;AAED,eAAO,MAAM,QAAQ,2FAuJpB,CAAC"}
|
|
@@ -14,26 +14,38 @@ export const Textarea = React.forwardRef(({ className, error, label, id, onChang
|
|
|
14
14
|
// Check if onChange expects a string (custom pattern) by examining function signature
|
|
15
15
|
// If parameter name suggests it expects a value (not 'e' or 'event'), call with value
|
|
16
16
|
// Otherwise, call with event (standard React pattern)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
param
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
try {
|
|
18
|
+
const funcStr = onChange.toString();
|
|
19
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
20
|
+
if (paramMatch) {
|
|
21
|
+
const param = paramMatch[1].trim();
|
|
22
|
+
// If parameter is not 'e', 'event', or starts with 'e:', it might expect value
|
|
23
|
+
if (param &&
|
|
24
|
+
param !== 'e' &&
|
|
25
|
+
param !== 'event' &&
|
|
26
|
+
!param.startsWith('e:')) {
|
|
27
|
+
// Custom pattern - call with value
|
|
28
|
+
onChange(value);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// Standard React pattern - call with event
|
|
32
|
+
onChange(e);
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
else {
|
|
30
|
-
//
|
|
36
|
+
// Default to standard React pattern
|
|
31
37
|
onChange(e);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
40
|
+
catch (error) {
|
|
41
|
+
// If calling with value fails, try with event
|
|
42
|
+
try {
|
|
43
|
+
onChange(e);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// If both fail, call with value as fallback
|
|
47
|
+
onChange(value);
|
|
48
|
+
}
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
};
|
|
@@ -42,22 +54,34 @@ export const Textarea = React.forwardRef(({ className, error, label, id, onChang
|
|
|
42
54
|
if (onBlur) {
|
|
43
55
|
const value = e.target.value;
|
|
44
56
|
// Similar logic for onBlur
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
param
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
try {
|
|
58
|
+
const funcStr = onBlur.toString();
|
|
59
|
+
const paramMatch = funcStr.match(/\(([^)]+)\)/);
|
|
60
|
+
if (paramMatch) {
|
|
61
|
+
const param = paramMatch[1].trim();
|
|
62
|
+
if (param &&
|
|
63
|
+
param !== 'e' &&
|
|
64
|
+
param !== 'event' &&
|
|
65
|
+
!param.startsWith('e:')) {
|
|
66
|
+
onBlur(value);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
onBlur(e);
|
|
70
|
+
}
|
|
54
71
|
}
|
|
55
72
|
else {
|
|
56
73
|
onBlur(e);
|
|
57
74
|
}
|
|
58
75
|
}
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
catch (error) {
|
|
77
|
+
// If calling with value fails, try with event
|
|
78
|
+
try {
|
|
79
|
+
onBlur(e);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// If both fail, call with value as fallback
|
|
83
|
+
onBlur(value);
|
|
84
|
+
}
|
|
61
85
|
}
|
|
62
86
|
}
|
|
63
87
|
};
|