@gustavo-valsechi/client 1.4.0 → 1.4.2

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.
@@ -41,7 +41,7 @@ const Container = import_styled_components.default.div`
41
41
  padding: 1.3rem 1.5rem;
42
42
  border-radius: 5px;
43
43
  background: ${({ theme }) => theme.t05};
44
- flex: 1 1 20rem;
44
+ flex: 1 1;
45
45
 
46
46
  header {
47
47
  display: flex;
@@ -7,7 +7,7 @@ const Container = styled.div`
7
7
  padding: 1.3rem 1.5rem;
8
8
  border-radius: 5px;
9
9
  background: ${({ theme }) => theme.t05};
10
- flex: 1 1 20rem;
10
+ flex: 1 1;
11
11
 
12
12
  header {
13
13
  display: flex;
@@ -60,7 +60,8 @@ function Table(props) {
60
60
  const columnName = !import_lodash.default.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
61
61
  content[columnName] = columnName === "actions" ? (_b2 = data.row) == null ? void 0 : _b2.actions : renderRowContainer(props.content[key], data);
62
62
  });
63
- modal.setProps("table", { toggle: true, content });
63
+ modal.toggle("table");
64
+ modal.setProps("table", { content });
64
65
  };
65
66
  const renderRowContainer = (data, option) => {
66
67
  var _a2, _b2, _c2, _d2;
@@ -26,7 +26,8 @@ function Table(props) {
26
26
  const columnName = !_.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
27
27
  content[columnName] = columnName === "actions" ? (_b2 = data.row) == null ? void 0 : _b2.actions : renderRowContainer(props.content[key], data);
28
28
  });
29
- modal.setProps("table", { toggle: true, content });
29
+ modal.toggle("table");
30
+ modal.setProps("table", { content });
30
31
  };
31
32
  const renderRowContainer = (data, option) => {
32
33
  var _a2, _b2, _c2, _d2;
@@ -65,10 +65,12 @@ const ModalProviderContainer = ({ children }) => {
65
65
  setModals(settedModals);
66
66
  };
67
67
  const toggle = (modalName) => {
68
- var _a;
68
+ var _a, _b;
69
69
  const content = import_lodash.default.find(modals, (modal) => modal.name === modalName);
70
+ console.log(content);
71
+ console.log({ toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
70
72
  if (!content) return;
71
- setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
73
+ setProps(modalName, { toggle: !((_b = content == null ? void 0 : content.props) == null ? void 0 : _b.toggle) });
72
74
  };
73
75
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
74
76
  ModalContext.Provider,
@@ -31,10 +31,12 @@ const ModalProviderContainer = ({ children }) => {
31
31
  setModals(settedModals);
32
32
  };
33
33
  const toggle = (modalName) => {
34
- var _a;
34
+ var _a, _b;
35
35
  const content = _.find(modals, (modal) => modal.name === modalName);
36
+ console.log(content);
37
+ console.log({ toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
36
38
  if (!content) return;
37
- setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
39
+ setProps(modalName, { toggle: !((_b = content == null ? void 0 : content.props) == null ? void 0 : _b.toggle) });
38
40
  };
39
41
  return /* @__PURE__ */ jsxs(
40
42
  ModalContext.Provider,
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IButton } from "@interfaces";
3
3
  export interface IModal {
4
- toggle: boolean;
4
+ toggle?: boolean;
5
5
  onClose?: () => void;
6
6
  title?: string;
7
7
  header?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "build:remodel": "node scripts/remodel.js",
16
16
  "build:assets": "node scripts/assets.js",
17
17
  "build": "npm run clean && npm run build:js && npm run build:types && npm run build:assets && npm run build:remodel",
18
- "commit": "npm run build && npm publish --access public"
18
+ "commit": "npm run build && npm version patch --no-git-tag-version && npm publish --access public"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": "18.3.1",