@gustavo-valsechi/client 1.4.76 → 1.4.78
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/credit-card/card/index.js +8 -8
- package/dist/components/types/credit-card/card/index.mjs +8 -8
- package/dist/components/types/credit-card/card/styles.js +9 -9
- package/dist/components/types/credit-card/card/styles.mjs +9 -9
- package/dist/components/types/credit-card/functions/index.js +2 -2
- package/dist/components/types/credit-card/functions/index.mjs +2 -2
- package/dist/components/types/credit-card/functions/styles.js +3 -3
- package/dist/components/types/credit-card/functions/styles.mjs +3 -3
- package/dist/components/types/credit-card/styles.js +4 -4
- package/dist/components/types/credit-card/styles.mjs +4 -4
- package/dist/components/types/form/index.js +4 -4
- package/dist/components/types/form/index.mjs +4 -4
- package/dist/components/types/form/styles.js +3 -3
- package/dist/components/types/form/styles.mjs +3 -3
- package/dist/components/types/form/types/button/index.js +1 -1
- package/dist/components/types/form/types/button/index.mjs +1 -1
- package/dist/components/types/form/types/custom/index.js +2 -2
- package/dist/components/types/form/types/custom/index.mjs +2 -2
- package/dist/components/types/form/types/custom/styles.js +2 -2
- package/dist/components/types/form/types/custom/styles.mjs +2 -2
- package/dist/components/types/form/types/datetime/index.js +1 -1
- package/dist/components/types/form/types/datetime/index.mjs +1 -1
- package/dist/components/types/form/types/datetime/styles.js +1 -1
- package/dist/components/types/form/types/datetime/styles.mjs +1 -1
- package/dist/components/types/form/types/file/index.js +1 -1
- package/dist/components/types/form/types/file/index.mjs +1 -1
- package/dist/components/types/form/types/file/styles.js +1 -1
- package/dist/components/types/form/types/file/styles.mjs +1 -1
- package/dist/components/types/form/types/select/index.js +4 -4
- package/dist/components/types/form/types/select/index.mjs +4 -4
- package/dist/components/types/form/types/select/options/index.d.ts +1 -1
- package/dist/components/types/form/types/select/options/index.js +11 -4
- package/dist/components/types/form/types/select/options/index.mjs +11 -4
- package/dist/components/types/form/types/select/options/styles.js +11 -2
- package/dist/components/types/form/types/select/options/styles.mjs +11 -2
- package/dist/components/types/form/types/select/styles.js +5 -1
- package/dist/components/types/form/types/select/styles.mjs +5 -1
- package/dist/components/types/form/types/text/index.js +1 -1
- package/dist/components/types/form/types/text/index.mjs +1 -1
- package/dist/components/types/form/types/text/styles.js +1 -1
- package/dist/components/types/form/types/text/styles.mjs +1 -1
- package/dist/components/types/form/types/textarea/index.js +1 -1
- package/dist/components/types/form/types/textarea/index.mjs +1 -1
- package/dist/components/types/form/types/textarea/styles.js +1 -1
- package/dist/components/types/form/types/textarea/styles.mjs +1 -1
- package/dist/components/types/loading/app/index.js +1 -1
- package/dist/components/types/loading/app/index.mjs +1 -1
- package/dist/components/types/loading/app/styles.js +1 -1
- package/dist/components/types/loading/app/styles.mjs +1 -1
- package/dist/components/types/modal/index.js +7 -7
- package/dist/components/types/modal/index.mjs +7 -7
- package/dist/components/types/modal/styles.js +7 -7
- package/dist/components/types/modal/styles.mjs +7 -7
- package/dist/components/types/table/index.js +10 -10
- package/dist/components/types/table/index.mjs +10 -10
- package/dist/components/types/table/modal/index.js +5 -5
- package/dist/components/types/table/modal/index.mjs +5 -5
- package/dist/components/types/table/modal/styles.js +5 -5
- package/dist/components/types/table/modal/styles.mjs +5 -5
- package/dist/components/types/table/styles.js +16 -16
- package/dist/components/types/table/styles.mjs +16 -16
- package/dist/contexts/target/index.js +35 -9
- package/dist/contexts/target/index.mjs +35 -9
- package/package.json +1 -1
|
@@ -52,16 +52,16 @@ function CreditCardComponent(props) {
|
|
|
52
52
|
flagRef.current.style.backgroundImage = `url(${content.logo})`;
|
|
53
53
|
}, [flagRef, props.number]);
|
|
54
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { children: [
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "credit-card-left", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "credit-card-chip", style: { backgroundImage: `url(${import_assets.default.Chip})` } }) }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "credit-card-bottom", children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-number", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-elipse", children: import_utils.default.mask.loop(props.number, { sequencyNumber: 4, maxSequency: 4, placeholder: "\u2022" }) }) }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-name", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-elipse", children: import_lodash.default.deburr((_a = props.name) == null ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })
|
|
60
60
|
] })
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "credit-card-right", children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "credit-card-top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "credit-card-flag", ref: flagRef }) }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "credit-card-bottom", children: [
|
|
65
65
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "validade" }),
|
|
66
66
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: import_utils.default.mask.loop(props.expiry, { sequencyNumber: 2, maxSequency: 2, placeholder: "\u2022", separator: "/" }) })
|
|
67
67
|
] })
|
|
@@ -19,16 +19,16 @@ function CreditCardComponent(props) {
|
|
|
19
19
|
flagRef.current.style.backgroundImage = `url(${content.logo})`;
|
|
20
20
|
}, [flagRef, props.number]);
|
|
21
21
|
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
22
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
23
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
24
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
25
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "credit-card-left", children: [
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: "credit-card-top", children: /* @__PURE__ */ jsx("div", { id: "credit-card-chip", style: { backgroundImage: `url(${assets.Chip})` } }) }),
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "credit-card-bottom", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "credit-card-number", children: /* @__PURE__ */ jsx("div", { className: "credit-card-elipse", children: Utils.mask.loop(props.number, { sequencyNumber: 4, maxSequency: 4, placeholder: "\u2022" }) }) }),
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "credit-card-name", children: /* @__PURE__ */ jsx("div", { className: "credit-card-elipse", children: _.deburr((_a = props.name) == null ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })
|
|
27
27
|
] })
|
|
28
28
|
] }),
|
|
29
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
31
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
29
|
+
/* @__PURE__ */ jsxs("div", { className: "credit-card-right", children: [
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "credit-card-top", children: /* @__PURE__ */ jsx("div", { id: "credit-card-flag", ref: flagRef }) }),
|
|
31
|
+
/* @__PURE__ */ jsxs("div", { className: "credit-card-bottom", children: [
|
|
32
32
|
/* @__PURE__ */ jsx("span", { children: "validade" }),
|
|
33
33
|
/* @__PURE__ */ jsx("span", { children: Utils.mask.loop(props.expiry, { sequencyNumber: 2, maxSequency: 2, placeholder: "\u2022", separator: "/" }) })
|
|
34
34
|
] })
|
|
@@ -56,14 +56,14 @@ const Container = import_styled_components.default.div`
|
|
|
56
56
|
height: 9rem;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
.credit-card-left {
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
justify-content: space-between;
|
|
63
63
|
gap: 1rem;
|
|
64
64
|
width: 100%;
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.credit-card-top {
|
|
67
67
|
div {
|
|
68
68
|
width: 2.5rem;
|
|
69
69
|
height: 1.5rem;
|
|
@@ -72,12 +72,12 @@ const Container = import_styled_components.default.div`
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
.credit-card-bottom {
|
|
76
76
|
display: flex;
|
|
77
77
|
flex-direction: column;
|
|
78
78
|
gap: .8rem;
|
|
79
79
|
|
|
80
|
-
.
|
|
80
|
+
.credit-card-elipse {
|
|
81
81
|
position: absolute;
|
|
82
82
|
left: 0;
|
|
83
83
|
right: 0;
|
|
@@ -86,7 +86,7 @@ const Container = import_styled_components.default.div`
|
|
|
86
86
|
text-overflow: ellipsis;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.
|
|
89
|
+
.credit-card-number {
|
|
90
90
|
font-size: 1.1rem;
|
|
91
91
|
font-weight: 600;
|
|
92
92
|
color: ${({ theme }) => theme.t6};
|
|
@@ -104,7 +104,7 @@ const Container = import_styled_components.default.div`
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.
|
|
107
|
+
.credit-card-name {
|
|
108
108
|
font-size: .9rem;
|
|
109
109
|
font-weight: 500;
|
|
110
110
|
position: relative;
|
|
@@ -125,14 +125,14 @@ const Container = import_styled_components.default.div`
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
.
|
|
128
|
+
.credit-card-right {
|
|
129
129
|
display: flex;
|
|
130
130
|
flex-direction: column;
|
|
131
131
|
justify-content: space-between;
|
|
132
132
|
align-items: flex-end;
|
|
133
133
|
gap: 1rem;
|
|
134
134
|
|
|
135
|
-
.
|
|
135
|
+
.credit-card-top {
|
|
136
136
|
display: flex;
|
|
137
137
|
justify-content: end;
|
|
138
138
|
|
|
@@ -144,7 +144,7 @@ const Container = import_styled_components.default.div`
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.
|
|
147
|
+
.credit-card-bottom {
|
|
148
148
|
display: flex;
|
|
149
149
|
flex-direction: column;
|
|
150
150
|
text-align: right;
|
|
@@ -23,14 +23,14 @@ const Container = styled.div`
|
|
|
23
23
|
height: 9rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.credit-card-left {
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
justify-content: space-between;
|
|
30
30
|
gap: 1rem;
|
|
31
31
|
width: 100%;
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
.credit-card-top {
|
|
34
34
|
div {
|
|
35
35
|
width: 2.5rem;
|
|
36
36
|
height: 1.5rem;
|
|
@@ -39,12 +39,12 @@ const Container = styled.div`
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.credit-card-bottom {
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
gap: .8rem;
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
.credit-card-elipse {
|
|
48
48
|
position: absolute;
|
|
49
49
|
left: 0;
|
|
50
50
|
right: 0;
|
|
@@ -53,7 +53,7 @@ const Container = styled.div`
|
|
|
53
53
|
text-overflow: ellipsis;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
56
|
+
.credit-card-number {
|
|
57
57
|
font-size: 1.1rem;
|
|
58
58
|
font-weight: 600;
|
|
59
59
|
color: ${({ theme }) => theme.t6};
|
|
@@ -71,7 +71,7 @@ const Container = styled.div`
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.credit-card-name {
|
|
75
75
|
font-size: .9rem;
|
|
76
76
|
font-weight: 500;
|
|
77
77
|
position: relative;
|
|
@@ -92,14 +92,14 @@ const Container = styled.div`
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
.credit-card-right {
|
|
96
96
|
display: flex;
|
|
97
97
|
flex-direction: column;
|
|
98
98
|
justify-content: space-between;
|
|
99
99
|
align-items: flex-end;
|
|
100
100
|
gap: 1rem;
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
.credit-card-top {
|
|
103
103
|
display: flex;
|
|
104
104
|
justify-content: end;
|
|
105
105
|
|
|
@@ -111,7 +111,7 @@ const Container = styled.div`
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.
|
|
114
|
+
.credit-card-bottom {
|
|
115
115
|
display: flex;
|
|
116
116
|
flex-direction: column;
|
|
117
117
|
text-align: right;
|
|
@@ -36,12 +36,12 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_styles = require("./styles");
|
|
37
37
|
var import_lodash = __toESM(require("lodash"));
|
|
38
38
|
function CreditCardFunctions(props) {
|
|
39
|
-
return import_lodash.default.some(props.functions, (data) => !data.hide) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Container, { className: "
|
|
39
|
+
return import_lodash.default.some(props.functions, (data) => !data.hide) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Container, { className: "credit-card-function-container", children: import_lodash.default.map(
|
|
40
40
|
props.functions,
|
|
41
41
|
(data, index) => !data.hide && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
|
-
className: "
|
|
44
|
+
className: "credit-card-function",
|
|
45
45
|
onClick: data.function,
|
|
46
46
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: data.icon })
|
|
47
47
|
},
|
|
@@ -3,12 +3,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Container } from "./styles";
|
|
4
4
|
import _ from "lodash";
|
|
5
5
|
function CreditCardFunctions(props) {
|
|
6
|
-
return _.some(props.functions, (data) => !data.hide) && /* @__PURE__ */ jsx(Container, { className: "
|
|
6
|
+
return _.some(props.functions, (data) => !data.hide) && /* @__PURE__ */ jsx(Container, { className: "credit-card-function-container", children: _.map(
|
|
7
7
|
props.functions,
|
|
8
8
|
(data, index) => !data.hide && /* @__PURE__ */ jsx(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
|
-
className: "
|
|
11
|
+
className: "credit-card-function",
|
|
12
12
|
onClick: data.function,
|
|
13
13
|
children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: data.icon })
|
|
14
14
|
},
|
|
@@ -41,7 +41,7 @@ const Container = import_styled_components.default.div`
|
|
|
41
41
|
transition: ease .3s;
|
|
42
42
|
width: 2rem;
|
|
43
43
|
|
|
44
|
-
.
|
|
44
|
+
.credit-card-function {
|
|
45
45
|
width: 2rem;
|
|
46
46
|
height: 2rem;
|
|
47
47
|
display: flex;
|
|
@@ -60,11 +60,11 @@ const Container = import_styled_components.default.div`
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.
|
|
63
|
+
.credit-card-function:nth-child(1) {
|
|
64
64
|
transition: 5s ease transform, ease .2s opacity, ease .3s color;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.
|
|
67
|
+
.credit-card-function:nth-child(2) {
|
|
68
68
|
transition: .3s ease .1s transform, ease .2s opacity, ease .3s color;
|
|
69
69
|
}
|
|
70
70
|
`;
|
|
@@ -8,7 +8,7 @@ const Container = styled.div`
|
|
|
8
8
|
transition: ease .3s;
|
|
9
9
|
width: 2rem;
|
|
10
10
|
|
|
11
|
-
.
|
|
11
|
+
.credit-card-function {
|
|
12
12
|
width: 2rem;
|
|
13
13
|
height: 2rem;
|
|
14
14
|
display: flex;
|
|
@@ -27,11 +27,11 @@ const Container = styled.div`
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.credit-card-function:nth-child(1) {
|
|
31
31
|
transition: 5s ease transform, ease .2s opacity, ease .3s color;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.credit-card-function:nth-child(2) {
|
|
35
35
|
transition: .3s ease .1s transform, ease .2s opacity, ease .3s color;
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
@@ -47,19 +47,19 @@ const Container = import_styled_components.default.div`
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&:hover {
|
|
50
|
-
.
|
|
50
|
+
.credit-card-function-container {
|
|
51
51
|
margin-left: 0;
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
.credit-card-function {
|
|
54
54
|
transform: translateX(0);
|
|
55
55
|
opacity: 1;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.credit-card-function:nth-child(1) {
|
|
59
59
|
transition: .3s ease transform, .2s ease .1s opacity, ease .3s color;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.credit-card-function:nth-child(2) {
|
|
63
63
|
transition: .3s ease .1s transform, .2s ease .2s opacity, ease .3s color;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -14,19 +14,19 @@ const Container = styled.div`
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&:hover {
|
|
17
|
-
.
|
|
17
|
+
.credit-card-function-container {
|
|
18
18
|
margin-left: 0;
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.credit-card-function {
|
|
21
21
|
transform: translateX(0);
|
|
22
22
|
opacity: 1;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
25
|
+
.credit-card-function:nth-child(1) {
|
|
26
26
|
transition: .3s ease transform, .2s ease .1s opacity, ease .3s color;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.credit-card-function:nth-child(2) {
|
|
30
30
|
transition: .3s ease .1s transform, .2s ease .2s opacity, ease .3s color;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -95,7 +95,7 @@ function Form(props) {
|
|
|
95
95
|
ComponentType,
|
|
96
96
|
{
|
|
97
97
|
...import_lodash.default.omit(data, ["validation"]),
|
|
98
|
-
id: `
|
|
98
|
+
id: `input-${data.name}`,
|
|
99
99
|
type: component2 ? void 0 : data.type,
|
|
100
100
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
101
101
|
register,
|
|
@@ -112,12 +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: import_lodash.default.isArray(data) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
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: "form-content", children: import_lodash.default.map(
|
|
116
116
|
data,
|
|
117
|
-
(input, index2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
117
|
+
(input, index2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-input", children: component(input) }, index2)
|
|
118
118
|
) }) : component(data) }, index)
|
|
119
119
|
),
|
|
120
|
-
import_lodash.default.isArray(props.buttons) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
120
|
+
import_lodash.default.isArray(props.buttons) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-buttons", children: import_lodash.default.map(
|
|
121
121
|
props.buttons,
|
|
122
122
|
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
123
|
Types.Button,
|
|
@@ -61,7 +61,7 @@ function Form(props) {
|
|
|
61
61
|
ComponentType,
|
|
62
62
|
{
|
|
63
63
|
..._.omit(data, ["validation"]),
|
|
64
|
-
id: `
|
|
64
|
+
id: `input-${data.name}`,
|
|
65
65
|
type: component2 ? void 0 : data.type,
|
|
66
66
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
67
67
|
register,
|
|
@@ -78,12 +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: _.isArray(data) ? /* @__PURE__ */ jsx("div", { className: "
|
|
81
|
+
(data, index) => /* @__PURE__ */ jsx(React.Fragment, { children: _.isArray(data) ? /* @__PURE__ */ jsx("div", { className: "form-content", children: _.map(
|
|
82
82
|
data,
|
|
83
|
-
(input, index2) => /* @__PURE__ */ jsx("div", { className: "
|
|
83
|
+
(input, index2) => /* @__PURE__ */ jsx("div", { className: "form-input", children: component(input) }, index2)
|
|
84
84
|
) }) : component(data) }, index)
|
|
85
85
|
),
|
|
86
|
-
_.isArray(props.buttons) && /* @__PURE__ */ jsx("div", { className: "
|
|
86
|
+
_.isArray(props.buttons) && /* @__PURE__ */ jsx("div", { className: "form-buttons", children: _.map(
|
|
87
87
|
props.buttons,
|
|
88
88
|
(data, index) => /* @__PURE__ */ jsx(
|
|
89
89
|
Types.Button,
|
|
@@ -39,18 +39,18 @@ const Container = import_styled_components.default.form`
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
gap: .3rem;
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.form-content {
|
|
43
43
|
width: 100%;
|
|
44
44
|
display: flex;
|
|
45
45
|
gap: .5rem;
|
|
46
46
|
flex-wrap: wrap;
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.form-input {
|
|
49
49
|
flex: 1 1 10rem;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
.form-buttons {
|
|
54
54
|
width: 100%;
|
|
55
55
|
padding-top: 1rem;
|
|
56
56
|
|
|
@@ -6,18 +6,18 @@ const Container = styled.form`
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: .3rem;
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.form-content {
|
|
10
10
|
width: 100%;
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: .5rem;
|
|
13
13
|
flex-wrap: wrap;
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.form-input {
|
|
16
16
|
flex: 1 1 10rem;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.form-buttons {
|
|
21
21
|
width: 100%;
|
|
22
22
|
padding-top: 1rem;
|
|
23
23
|
|
|
@@ -53,7 +53,7 @@ function Button(props) {
|
|
|
53
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
54
54
|
import_styles.Container,
|
|
55
55
|
{
|
|
56
|
-
id: `
|
|
56
|
+
id: `button-${import_lodash.default.replace(import_lodash.default.lowerCase(props.label), /\s/g, "-")}`,
|
|
57
57
|
loading: String(loading || !!props.loading),
|
|
58
58
|
disabled: props.disabled,
|
|
59
59
|
type: props.type || "button",
|
|
@@ -20,7 +20,7 @@ function Button(props) {
|
|
|
20
20
|
return /* @__PURE__ */ jsxs(
|
|
21
21
|
Container,
|
|
22
22
|
{
|
|
23
|
-
id: `
|
|
23
|
+
id: `button-${_.replace(_.lowerCase(props.label), /\s/g, "-")}`,
|
|
24
24
|
loading: String(loading || !!props.loading),
|
|
25
25
|
disabled: props.disabled,
|
|
26
26
|
type: props.type || "button",
|
|
@@ -38,11 +38,11 @@ function InputCustom(props) {
|
|
|
38
38
|
props.label,
|
|
39
39
|
props.required ? "*" : ""
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "input-content", children: [
|
|
42
42
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { hidden: true, ...register }),
|
|
43
43
|
props.children
|
|
44
44
|
] }),
|
|
45
|
-
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error.InputError, { className: "
|
|
45
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error.InputError, { className: "input-custom-error", children: props.error })
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -15,11 +15,11 @@ function InputCustom(props) {
|
|
|
15
15
|
props.label,
|
|
16
16
|
props.required ? "*" : ""
|
|
17
17
|
] }),
|
|
18
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: "input-content", children: [
|
|
19
19
|
/* @__PURE__ */ jsx("input", { hidden: true, ...register }),
|
|
20
20
|
props.children
|
|
21
21
|
] }),
|
|
22
|
-
!!props.error && /* @__PURE__ */ jsx(InputError, { className: "
|
|
22
|
+
!!props.error && /* @__PURE__ */ jsx(InputError, { className: "input-custom-error", children: props.error })
|
|
23
23
|
] });
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
@@ -36,11 +36,11 @@ var import_styled_components = __toESM(require("styled-components"));
|
|
|
36
36
|
const Container = import_styled_components.default.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.input-content {
|
|
40
40
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.
|
|
43
|
+
.input-custom-error {
|
|
44
44
|
padding-top: .5rem;
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
@@ -50,7 +50,7 @@ function InputDateTime(props) {
|
|
|
50
50
|
props.label,
|
|
51
51
|
props.required ? "*" : ""
|
|
52
52
|
] }),
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
54
|
"input",
|
|
55
55
|
{
|
|
56
56
|
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
|
|
@@ -17,7 +17,7 @@ function InputDateTime(props) {
|
|
|
17
17
|
props.label,
|
|
18
18
|
props.required ? "*" : ""
|
|
19
19
|
] }),
|
|
20
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "input-content", children: /* @__PURE__ */ jsx(
|
|
21
21
|
"input",
|
|
22
22
|
{
|
|
23
23
|
..._.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
|
|
@@ -36,7 +36,7 @@ var import_styled_components = __toESM(require("styled-components"));
|
|
|
36
36
|
const Container = import_styled_components.default.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.input-content {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: center;
|
|
@@ -61,7 +61,7 @@ function InputFile(props) {
|
|
|
61
61
|
props.label,
|
|
62
62
|
props.required ? "*" : ""
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "image-content", onClick: () => inputRef.current.click(), children: ((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) || "selecione uma imagem" }),
|
|
65
65
|
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error.InputError, { children: props.error })
|
|
66
66
|
] });
|
|
67
67
|
}
|
|
@@ -38,7 +38,7 @@ function InputFile(props) {
|
|
|
38
38
|
props.label,
|
|
39
39
|
props.required ? "*" : ""
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "image-content", onClick: () => inputRef.current.click(), children: ((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) || "selecione uma imagem" }),
|
|
42
42
|
!!props.error && /* @__PURE__ */ jsx(InputError, { children: props.error })
|
|
43
43
|
] });
|
|
44
44
|
}
|
|
@@ -36,7 +36,7 @@ var import_styled_components = __toESM(require("styled-components"));
|
|
|
36
36
|
const Container = import_styled_components.default.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.image-content {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: center;
|
|
@@ -43,11 +43,10 @@ var import_options = __toESM(require("./options"));
|
|
|
43
43
|
function InputSelect(props) {
|
|
44
44
|
const inputRef = (0, import_react.useRef)({});
|
|
45
45
|
const target = (0, import_contexts.useTarget)();
|
|
46
|
-
const option = (0, import_react.useState)("");
|
|
47
46
|
const [focus, setFocus] = (0, import_react.useState)(false);
|
|
48
47
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
49
48
|
(0, import_react.useEffect)(() => {
|
|
50
|
-
target.add({ ref: inputRef, component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_options.default, {
|
|
49
|
+
target.add({ ref: inputRef, component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_options.default, { ...props, inputRef, register }) });
|
|
51
50
|
return () => target.remove(inputRef);
|
|
52
51
|
}, []);
|
|
53
52
|
const onBlur = (event) => {
|
|
@@ -68,7 +67,7 @@ function InputSelect(props) {
|
|
|
68
67
|
props.label,
|
|
69
68
|
props.required ? "*" : ""
|
|
70
69
|
] }),
|
|
71
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: inputRef, className: "
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: inputRef, className: "input-content", children: [
|
|
72
71
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
72
|
"input",
|
|
74
73
|
{
|
|
@@ -78,7 +77,8 @@ function InputSelect(props) {
|
|
|
78
77
|
...register,
|
|
79
78
|
onChange,
|
|
80
79
|
onFocus,
|
|
81
|
-
onBlur
|
|
80
|
+
onBlur,
|
|
81
|
+
focus
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" })
|