@gustavo-valsechi/client 1.4.60 → 1.4.62

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,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import styled from "styled-components";
2
3
  const Container = styled.div`
3
4
 
@@ -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
- setvalue: setValue
102
+ setValue
103
103
  }
104
104
  );
105
105
  };
@@ -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
- setvalue: setValue
68
+ setValue
69
69
  }
70
70
  );
71
71
  };
@@ -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.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
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.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
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: [
@@ -53,7 +53,7 @@ function InputDateTime(props) {
53
53
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
54
  "input",
55
55
  {
56
- ...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
56
+ ...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
57
57
  type: "datetime-local",
58
58
  onFocus: () => {
59
59
  if (props.onFocus) props.onFocus(props.name);
@@ -20,7 +20,7 @@ function InputDateTime(props) {
20
20
  /* @__PURE__ */ jsx("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx(
21
21
  "input",
22
22
  {
23
- ..._.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
23
+ ..._.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
24
24
  type: "datetime-local",
25
25
  onFocus: () => {
26
26
  if (props.onFocus) props.onFocus(props.name);
@@ -72,7 +72,7 @@ function InputSelect(props) {
72
72
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
73
  "input",
74
74
  {
75
- ...import_lodash.default.omit(props, ["className", "register", "mask"]),
75
+ ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue"]),
76
76
  type: "text",
77
77
  maxLength: props.maxLength || 255,
78
78
  ...register,
@@ -39,7 +39,7 @@ function InputSelect(props) {
39
39
  /* @__PURE__ */ jsx(
40
40
  "input",
41
41
  {
42
- ..._.omit(props, ["className", "register", "mask"]),
42
+ ..._.omit(props, ["className", "register", "mask", "setValue"]),
43
43
  type: "text",
44
44
  maxLength: props.maxLength || 255,
45
45
  ...register,
@@ -56,7 +56,7 @@ function InputText(props) {
56
56
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
57
  "input",
58
58
  {
59
- ...import_lodash.default.omit(props, ["className", "register", "mask"]),
59
+ ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue"]),
60
60
  type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
61
61
  maxLength: props.maxLength || 255,
62
62
  onFocus: () => {
@@ -23,7 +23,7 @@ function InputText(props) {
23
23
  /* @__PURE__ */ jsx(
24
24
  "input",
25
25
  {
26
- ..._.omit(props, ["className", "register", "mask"]),
26
+ ..._.omit(props, ["className", "register", "mask", "setValue"]),
27
27
  type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
28
28
  maxLength: props.maxLength || 255,
29
29
  onFocus: () => {
@@ -53,7 +53,7 @@ function InputTextarea(props) {
53
53
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
54
  "textarea",
55
55
  {
56
- ...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
56
+ ...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register", "setValue"]),
57
57
  maxLength: props.maxLength,
58
58
  rows: props.rows || 5,
59
59
  onFocus: () => {
@@ -20,7 +20,7 @@ function InputTextarea(props) {
20
20
  /* @__PURE__ */ jsx("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx(
21
21
  "textarea",
22
22
  {
23
- ..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
23
+ ..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register", "setValue"]),
24
24
  maxLength: props.maxLength,
25
25
  rows: props.rows || 5,
26
26
  onFocus: () => {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import styled from "styled-components";
2
3
  const setPosition = ({ position = "top", theme }, isBorder) => {
3
4
  const coord = isBorder ? "9" : "8";
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import styled from "styled-components";
2
3
  const Container = styled.div`
3
4
 
@@ -34,7 +34,7 @@ __export(target_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(target_exports);
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
- var import_react = require("react");
37
+ var import_react = __toESM(require("react"));
38
38
  var import_styles = require("./styles");
39
39
  var import_lodash = __toESM(require("lodash"));
40
40
  const TargetContext = (0, import_react.createContext)({});
@@ -49,12 +49,10 @@ const TargetProviderContainer = ({ children }) => {
49
49
  const element = (_a = target.ref) == null ? void 0 : _a.current;
50
50
  if (!element) return;
51
51
  element.addEventListener("click", () => {
52
- console.log("showMemory", showMemory);
53
52
  const isShow = import_lodash.default.find(showMemory, (data) => data.index === index);
54
- console.log("isShow", isShow);
55
53
  if (isShow) {
56
54
  const showIndex = import_lodash.default.findIndex(showMemory, (data) => data.index === index);
57
- showMemory.slice(showIndex, 1);
55
+ showMemory.splice(showIndex, 1);
58
56
  setShow(showMemory);
59
57
  return;
60
58
  }
@@ -63,6 +61,7 @@ const TargetProviderContainer = ({ children }) => {
63
61
  });
64
62
  });
65
63
  }, [targets]);
64
+ console.log(show);
66
65
  const getCoords = (target) => {
67
66
  const rect = target.getBoundingClientRect();
68
67
  const targetTop = rect.top + window.scrollY;
@@ -107,7 +106,7 @@ const TargetProviderContainer = ({ children }) => {
107
106
  children: target.component
108
107
  },
109
108
  index
110
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
109
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {}, index);
111
110
  }
112
111
  ),
113
112
  children
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, useState } from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import React, { createContext, useContext, useEffect, useState } from "react";
4
4
  import { Container } from "./styles";
5
5
  import _ from "lodash";
6
6
  const TargetContext = createContext({});
@@ -15,12 +15,10 @@ const TargetProviderContainer = ({ children }) => {
15
15
  const element = (_a = target.ref) == null ? void 0 : _a.current;
16
16
  if (!element) return;
17
17
  element.addEventListener("click", () => {
18
- console.log("showMemory", showMemory);
19
18
  const isShow = _.find(showMemory, (data) => data.index === index);
20
- console.log("isShow", isShow);
21
19
  if (isShow) {
22
20
  const showIndex = _.findIndex(showMemory, (data) => data.index === index);
23
- showMemory.slice(showIndex, 1);
21
+ showMemory.splice(showIndex, 1);
24
22
  setShow(showMemory);
25
23
  return;
26
24
  }
@@ -29,6 +27,7 @@ const TargetProviderContainer = ({ children }) => {
29
27
  });
30
28
  });
31
29
  }, [targets]);
30
+ console.log(show);
32
31
  const getCoords = (target) => {
33
32
  const rect = target.getBoundingClientRect();
34
33
  const targetTop = rect.top + window.scrollY;
@@ -73,7 +72,7 @@ const TargetProviderContainer = ({ children }) => {
73
72
  children: target.component
74
73
  },
75
74
  index
76
- ) : /* @__PURE__ */ jsx(Fragment, {});
75
+ ) : /* @__PURE__ */ jsx(React.Fragment, {}, index);
77
76
  }
78
77
  ),
79
78
  children
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import styled from "styled-components";
2
3
  const Container = styled.div`
3
4
  position: absolute;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import styled from "styled-components";
2
3
  const Switcher = styled.div`
3
4
  width: 3rem;
@@ -13,7 +13,7 @@ export interface IInputCustom {
13
13
  disabled?: boolean;
14
14
  required?: boolean;
15
15
  register?: UseFormRegister<any>;
16
- setvalue?: (...args: any[]) => void;
16
+ setValue?: (...args: any[]) => void;
17
17
  children: React.ReactNode;
18
18
  validation?: typeof z;
19
19
  }
@@ -16,6 +16,6 @@ export interface IInputSelect {
16
16
  register?: UseFormRegister<any>;
17
17
  validation?: typeof z;
18
18
  mask?: (value: string) => void;
19
- setvalue?: (...args: any[]) => void;
19
+ setValue?: (...args: any[]) => void;
20
20
  maxLength?: number;
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.60",
3
+ "version": "1.4.62",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",