@gustavo-valsechi/client 1.4.189 → 1.4.191
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/src/components/types/credit-card/card/index.js +2 -1
- package/dist/src/components/types/credit-card/card/index.mjs +2 -1
- package/dist/src/components/types/form/types/datetime/index.js +1 -1
- package/dist/src/components/types/form/types/datetime/index.mjs +1 -1
- package/dist/src/components/types/form/types/select/index.js +1 -1
- package/dist/src/components/types/form/types/select/index.mjs +1 -1
- package/dist/src/components/types/form/types/text/index.js +1 -1
- package/dist/src/components/types/form/types/text/index.mjs +1 -1
- package/dist/src/components/types/form/types/textarea/index.js +1 -1
- package/dist/src/components/types/form/types/textarea/index.mjs +1 -1
- package/dist/src/interfaces/components/credit-card/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -45,13 +45,14 @@ function CreditCardComponent(props) {
|
|
|
45
45
|
const flagRef = (0, import_react.useRef)({});
|
|
46
46
|
(0, import_react.useEffect)(() => {
|
|
47
47
|
const content = (0, import_tools.getCardContent)(props.number);
|
|
48
|
+
if (props.onSetFlag) props.onSetFlag(content);
|
|
48
49
|
if (!flagRef.current) return;
|
|
49
50
|
if (!content.logo) {
|
|
50
51
|
flagRef.current.style.backgroundImage = "";
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
54
|
flagRef.current.style.backgroundImage = `url(${content.logo})`;
|
|
54
|
-
}, [flagRef, props.number]);
|
|
55
|
+
}, [flagRef, props.number, props.onSetFlag]);
|
|
55
56
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { children: [
|
|
56
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "credit-card-left", children: [
|
|
57
58
|
/* @__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})` } }) }),
|
|
@@ -12,13 +12,14 @@ function CreditCardComponent(props) {
|
|
|
12
12
|
const flagRef = useRef({});
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
const content = getCardContent(props.number);
|
|
15
|
+
if (props.onSetFlag) props.onSetFlag(content);
|
|
15
16
|
if (!flagRef.current) return;
|
|
16
17
|
if (!content.logo) {
|
|
17
18
|
flagRef.current.style.backgroundImage = "";
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
21
|
flagRef.current.style.backgroundImage = `url(${content.logo})`;
|
|
21
|
-
}, [flagRef, props.number]);
|
|
22
|
+
}, [flagRef, props.number, props.onSetFlag]);
|
|
22
23
|
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
23
24
|
/* @__PURE__ */ jsxs("div", { className: "credit-card-left", children: [
|
|
24
25
|
/* @__PURE__ */ jsx("div", { className: "credit-card-top", children: /* @__PURE__ */ jsx("div", { id: "credit-card-chip", style: { backgroundImage: `url(${assets.Chip})` } }) }),
|
|
@@ -51,7 +51,7 @@ function InputDateTime(props) {
|
|
|
51
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
52
|
"input",
|
|
53
53
|
{
|
|
54
|
-
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch"]),
|
|
54
|
+
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch", "optional"]),
|
|
55
55
|
type: "datetime-local",
|
|
56
56
|
onFocus: () => {
|
|
57
57
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -18,7 +18,7 @@ function InputDateTime(props) {
|
|
|
18
18
|
/* @__PURE__ */ jsx("div", { className: "input-content", children: /* @__PURE__ */ jsx(
|
|
19
19
|
"input",
|
|
20
20
|
{
|
|
21
|
-
..._.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch"]),
|
|
21
|
+
..._.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch", "optional"]),
|
|
22
22
|
type: "datetime-local",
|
|
23
23
|
onFocus: () => {
|
|
24
24
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -105,7 +105,7 @@ function InputSelect(props) {
|
|
|
105
105
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
106
|
"input",
|
|
107
107
|
{
|
|
108
|
-
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
108
|
+
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch", "optional"]),
|
|
109
109
|
type: "text",
|
|
110
110
|
maxLength: props.maxLength || 255,
|
|
111
111
|
value: focus ? filter : inputValue,
|
|
@@ -72,7 +72,7 @@ function InputSelect(props) {
|
|
|
72
72
|
/* @__PURE__ */ jsx(
|
|
73
73
|
"input",
|
|
74
74
|
{
|
|
75
|
-
..._.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
75
|
+
..._.omit(props, ["className", "register", "mask", "setValue", "watch", "optional"]),
|
|
76
76
|
type: "text",
|
|
77
77
|
maxLength: props.maxLength || 255,
|
|
78
78
|
value: focus ? filter : inputValue,
|
|
@@ -54,7 +54,7 @@ function InputText(props) {
|
|
|
54
54
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
55
|
"input",
|
|
56
56
|
{
|
|
57
|
-
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
57
|
+
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch", "optional"]),
|
|
58
58
|
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
59
59
|
maxLength: props.maxLength || 255,
|
|
60
60
|
onFocus: () => {
|
|
@@ -21,7 +21,7 @@ function InputText(props) {
|
|
|
21
21
|
/* @__PURE__ */ jsx(
|
|
22
22
|
"input",
|
|
23
23
|
{
|
|
24
|
-
..._.omit(props, ["className", "register", "mask", "setValue", "watch"]),
|
|
24
|
+
..._.omit(props, ["className", "register", "mask", "setValue", "watch", "optional"]),
|
|
25
25
|
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
26
26
|
maxLength: props.maxLength || 255,
|
|
27
27
|
onFocus: () => {
|
|
@@ -51,7 +51,7 @@ function InputTextarea(props) {
|
|
|
51
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
52
|
"textarea",
|
|
53
53
|
{
|
|
54
|
-
...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "optional", "register", "setValue", "watch"]),
|
|
54
|
+
...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "optional", "register", "setValue", "watch", "optional"]),
|
|
55
55
|
maxLength: props.maxLength,
|
|
56
56
|
rows: props.rows || 5,
|
|
57
57
|
onFocus: () => {
|
|
@@ -18,7 +18,7 @@ function InputTextarea(props) {
|
|
|
18
18
|
/* @__PURE__ */ jsx("div", { className: "input-content", children: /* @__PURE__ */ jsx(
|
|
19
19
|
"textarea",
|
|
20
20
|
{
|
|
21
|
-
..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "optional", "register", "setValue", "watch"]),
|
|
21
|
+
..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "optional", "register", "setValue", "watch", "optional"]),
|
|
22
22
|
maxLength: props.maxLength,
|
|
23
23
|
rows: props.rows || 5,
|
|
24
24
|
onFocus: () => {
|