@oneplatformdev/ui 0.0.1-beta.74 → 0.0.1-beta.77
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/FormInput/FormInput.mjs +17 -15
- package/package.json +1 -1
package/FormInput/FormInput.mjs
CHANGED
@@ -1,38 +1,40 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
2
2
|
import { FormControl as C } from "../Form/Form.mjs";
|
3
3
|
import { FormRenderControl as h } from "../Form/FormRenderControl.mjs";
|
4
4
|
import { Input as v } from "../Input/Input.mjs";
|
5
5
|
import { forwardRef as x } from "react";
|
6
|
-
function
|
7
|
-
const { form: c, label:
|
8
|
-
return /* @__PURE__ */
|
6
|
+
function y(a, t) {
|
7
|
+
const { form: c, label: s, name: e, onChange: m, onBlur: p, style: F, ...I } = a;
|
8
|
+
return /* @__PURE__ */ u(
|
9
9
|
h,
|
10
10
|
{
|
11
11
|
form: c,
|
12
|
-
name:
|
13
|
-
label:
|
14
|
-
render: ({ field: r }) => /* @__PURE__ */
|
12
|
+
name: e,
|
13
|
+
label: s,
|
14
|
+
render: ({ field: r }) => /* @__PURE__ */ u(C, { children: /* @__PURE__ */ u(
|
15
15
|
v,
|
16
16
|
{
|
17
17
|
...r,
|
18
18
|
...I,
|
19
|
-
ref:
|
19
|
+
ref: (o) => {
|
20
|
+
r.ref(o), typeof t == "function" ? t(o) : t && (t.current = o);
|
21
|
+
},
|
20
22
|
style: F,
|
21
23
|
value: r.value || "",
|
22
|
-
onChange: (...
|
23
|
-
var
|
24
|
-
(
|
24
|
+
onChange: (...o) => {
|
25
|
+
var n;
|
26
|
+
(n = r.onChange) == null || n.call(r, ...o), m == null || m(...o);
|
25
27
|
},
|
26
|
-
onBlur: (...
|
27
|
-
var
|
28
|
-
(
|
28
|
+
onBlur: (...o) => {
|
29
|
+
var n;
|
30
|
+
(n = r.onBlur) == null || n.call(r), p == null || p(...o);
|
29
31
|
}
|
30
32
|
}
|
31
33
|
) })
|
32
34
|
}
|
33
35
|
);
|
34
36
|
}
|
35
|
-
const B = x(
|
37
|
+
const B = x(y);
|
36
38
|
export {
|
37
39
|
B as FormInput
|
38
40
|
};
|