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.
@@ -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,iHA8R7B,CAAC"}
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
- const funcStr = onChange.toString();
79
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
80
- if (paramMatch) {
81
- const param = paramMatch[1].trim();
82
- // If parameter is not 'e', 'event', or starts with 'e:', it might expect value
83
- if (param &&
84
- param !== 'e' &&
85
- param !== 'event' &&
86
- !param.startsWith('e:')) {
87
- // Custom pattern - call with value
88
- onChange(css);
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
- // Standard React pattern - call with event
97
+ // Default to standard React pattern
92
98
  onChange(e);
93
99
  }
94
100
  }
95
- else {
96
- // Default to standard React pattern
97
- onChange(e);
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
- const funcStr = onBlur.toString();
107
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
108
- if (paramMatch) {
109
- const param = paramMatch[1].trim();
110
- if (param &&
111
- param !== 'e' &&
112
- param !== 'event' &&
113
- !param.startsWith('e:')) {
114
- onBlur(css);
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
- else {
121
- onBlur(e);
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,qFAuIjB,CAAC"}
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
- const funcStr = onChange.toString();
18
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
19
- if (paramMatch) {
20
- const param = paramMatch[1].trim();
21
- // If parameter is not 'e', 'event', or starts with 'e:', it might expect value
22
- if (param &&
23
- param !== 'e' &&
24
- param !== 'event' &&
25
- !param.startsWith('e:')) {
26
- // Custom pattern - call with value
27
- onChange(value);
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
- // Standard React pattern - call with event
36
+ // Default to standard React pattern
31
37
  onChange(e);
32
38
  }
33
39
  }
34
- else {
35
- // Default to standard React pattern
36
- onChange(e);
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
- const funcStr = onBlur.toString();
46
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
47
- if (paramMatch) {
48
- const param = paramMatch[1].trim();
49
- if (param &&
50
- param !== 'e' &&
51
- param !== 'event' &&
52
- !param.startsWith('e:')) {
53
- onBlur(value);
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
- else {
60
- onBlur(e);
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,2FAmIpB,CAAC"}
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
- const funcStr = onChange.toString();
18
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
19
- if (paramMatch) {
20
- const param = paramMatch[1].trim();
21
- // If parameter is not 'e', 'event', or starts with 'e:', it might expect value
22
- if (param &&
23
- param !== 'e' &&
24
- param !== 'event' &&
25
- !param.startsWith('e:')) {
26
- // Custom pattern - call with value
27
- onChange(value);
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
- // Standard React pattern - call with event
36
+ // Default to standard React pattern
31
37
  onChange(e);
32
38
  }
33
39
  }
34
- else {
35
- // Default to standard React pattern
36
- onChange(e);
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
- const funcStr = onBlur.toString();
46
- const paramMatch = funcStr.match(/\(([^)]+)\)/);
47
- if (paramMatch) {
48
- const param = paramMatch[1].trim();
49
- if (param &&
50
- param !== 'e' &&
51
- param !== 'event' &&
52
- !param.startsWith('e:')) {
53
- onBlur(value);
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
- else {
60
- onBlur(e);
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.3.81",
3
+ "version": "0.3.83",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {