@gustavo-valsechi/client 1.4.27 → 1.4.29
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/components/types/form/index.js +6 -3
- package/dist/components/types/form/index.mjs +6 -3
- package/dist/components/types/form/styles.js +12 -1
- package/dist/components/types/form/styles.mjs +12 -1
- package/dist/components/types/form/types/custom/index.js +1 -1
- package/dist/components/types/form/types/custom/index.mjs +1 -1
- package/dist/interfaces/components/form/custom/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ function Form(props) {
|
|
|
99
99
|
type: component2 ? void 0 : data.type,
|
|
100
100
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
101
101
|
register,
|
|
102
|
-
|
|
102
|
+
setvalue: inputType === "InputCustom" ? setValue : void 0
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
105
|
};
|
|
@@ -112,9 +112,12 @@ function Form(props) {
|
|
|
112
112
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { ref: formRef, onSubmit: handleSubmit(onSubmit), children: [
|
|
113
113
|
import_lodash.default.map(
|
|
114
114
|
props.inputs,
|
|
115
|
-
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children:
|
|
115
|
+
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: import_lodash.default.isArray(data) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-form-content", children: import_lodash.default.map(
|
|
116
|
+
data,
|
|
117
|
+
(input, index2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: component(input) }, index2)
|
|
118
|
+
) }) : component(data) }, index)
|
|
116
119
|
),
|
|
117
|
-
import_lodash.default.isArray(props.buttons) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-buttons", children: import_lodash.default.map(
|
|
120
|
+
import_lodash.default.isArray(props.buttons) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-form-buttons", children: import_lodash.default.map(
|
|
118
121
|
props.buttons,
|
|
119
122
|
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
123
|
Types.Button,
|
|
@@ -65,7 +65,7 @@ function Form(props) {
|
|
|
65
65
|
type: component2 ? void 0 : data.type,
|
|
66
66
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
67
67
|
register,
|
|
68
|
-
|
|
68
|
+
setvalue: inputType === "InputCustom" ? setValue : void 0
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
};
|
|
@@ -78,9 +78,12 @@ function Form(props) {
|
|
|
78
78
|
return /* @__PURE__ */ jsxs(Container, { ref: formRef, onSubmit: handleSubmit(onSubmit), children: [
|
|
79
79
|
_.map(
|
|
80
80
|
props.inputs,
|
|
81
|
-
(data, index) => /* @__PURE__ */ jsx(React.Fragment, { children:
|
|
81
|
+
(data, index) => /* @__PURE__ */ jsx(React.Fragment, { children: _.isArray(data) ? /* @__PURE__ */ jsx("div", { className: "iz-form-content", children: _.map(
|
|
82
|
+
data,
|
|
83
|
+
(input, index2) => /* @__PURE__ */ jsx(React.Fragment, { children: component(input) }, index2)
|
|
84
|
+
) }) : component(data) }, index)
|
|
82
85
|
),
|
|
83
|
-
_.isArray(props.buttons) && /* @__PURE__ */ jsx("div", { className: "form-buttons", children: _.map(
|
|
86
|
+
_.isArray(props.buttons) && /* @__PURE__ */ jsx("div", { className: "iz-form-buttons", children: _.map(
|
|
84
87
|
props.buttons,
|
|
85
88
|
(data, index) => /* @__PURE__ */ jsx(
|
|
86
89
|
Types.Button,
|
|
@@ -38,8 +38,19 @@ const Container = import_styled_components.default.form`
|
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
gap: .3rem;
|
|
41
|
+
|
|
42
|
+
.iz-form-content {
|
|
43
|
+
width: 100%;
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: .5rem;
|
|
46
|
+
flex-wrap: wrap;
|
|
47
|
+
|
|
48
|
+
.iz-input-content {
|
|
49
|
+
min-width: 10rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
41
52
|
|
|
42
|
-
.form-buttons {
|
|
53
|
+
.iz-form-buttons {
|
|
43
54
|
width: 100%;
|
|
44
55
|
padding-top: 1rem;
|
|
45
56
|
|
|
@@ -5,8 +5,19 @@ const Container = styled.form`
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: .3rem;
|
|
8
|
+
|
|
9
|
+
.iz-form-content {
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: .5rem;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
|
|
15
|
+
.iz-input-content {
|
|
16
|
+
min-width: 10rem;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
8
19
|
|
|
9
|
-
.form-buttons {
|
|
20
|
+
.iz-form-buttons {
|
|
10
21
|
width: 100%;
|
|
11
22
|
padding-top: 1rem;
|
|
12
23
|
|
|
@@ -31,7 +31,7 @@ function InputCustom(props) {
|
|
|
31
31
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
32
32
|
(0, import_react.useEffect)(() => {
|
|
33
33
|
var _a;
|
|
34
|
-
(_a = props.
|
|
34
|
+
(_a = props.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
|
|
35
35
|
}, [props.name, props.value]);
|
|
36
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, children: [
|
|
37
37
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
@@ -8,7 +8,7 @@ function InputCustom(props) {
|
|
|
8
8
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
var _a;
|
|
11
|
-
(_a = props.
|
|
11
|
+
(_a = props.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
|
|
12
12
|
}, [props.name, props.value]);
|
|
13
13
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, children: [
|
|
14
14
|
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|