@gustavo-valsechi/client 1.4.296 → 1.4.299

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.
@@ -65,16 +65,18 @@ function Table(props) {
65
65
  modal.setProps("table", { content });
66
66
  };
67
67
  const renderRowContainer = (data, option) => {
68
- var _a2, _b2, _c2, _d2;
68
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g;
69
69
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
70
  "div",
71
71
  {
72
72
  className: `
73
- table-content
73
+ table-content item
74
74
  ${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "table-action" : ""}
75
75
  ${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "table-identifier" : ""}
76
76
  `,
77
77
  style: import_lodash.default.isFunction((_c2 = option.row) == null ? void 0 : _c2.style) ? option.row.style(data, option) : (_d2 = option.row) == null ? void 0 : _d2.style,
78
+ "data-tooltip": !((_e2 = option.row) == null ? void 0 : _e2.actions) ? import_lodash.default.isFunction((_f2 = option.row) == null ? void 0 : _f2.info) ? option.row.info(data, option) : (_g = option.row) == null ? void 0 : _g.info : "",
79
+ "data-tooltip-props": '{"position":"bottom"}',
78
80
  children: renderRowContent(data, option)
79
81
  }
80
82
  );
@@ -126,7 +128,7 @@ function Table(props) {
126
128
  "div",
127
129
  {
128
130
  className: "table-content-elipse",
129
- "data-tooltip": import_lodash.default.isString(body) ? body : "",
131
+ "data-tooltip": import_lodash.default.isString(body) && !row.info ? body : "",
130
132
  "data-tooltip-props": '{"position":"bottom"}',
131
133
  children: body
132
134
  }
@@ -31,16 +31,18 @@ function Table(props) {
31
31
  modal.setProps("table", { content });
32
32
  };
33
33
  const renderRowContainer = (data, option) => {
34
- var _a2, _b2, _c2, _d2;
34
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g;
35
35
  return /* @__PURE__ */ jsx(
36
36
  "div",
37
37
  {
38
38
  className: `
39
- table-content
39
+ table-content item
40
40
  ${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "table-action" : ""}
41
41
  ${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "table-identifier" : ""}
42
42
  `,
43
43
  style: _.isFunction((_c2 = option.row) == null ? void 0 : _c2.style) ? option.row.style(data, option) : (_d2 = option.row) == null ? void 0 : _d2.style,
44
+ "data-tooltip": !((_e2 = option.row) == null ? void 0 : _e2.actions) ? _.isFunction((_f2 = option.row) == null ? void 0 : _f2.info) ? option.row.info(data, option) : (_g = option.row) == null ? void 0 : _g.info : "",
45
+ "data-tooltip-props": '{"position":"bottom"}',
44
46
  children: renderRowContent(data, option)
45
47
  }
46
48
  );
@@ -92,7 +94,7 @@ function Table(props) {
92
94
  "div",
93
95
  {
94
96
  className: "table-content-elipse",
95
- "data-tooltip": _.isString(body) ? body : "",
97
+ "data-tooltip": _.isString(body) && !row.info ? body : "",
96
98
  "data-tooltip-props": '{"position":"bottom"}',
97
99
  children: body
98
100
  }
@@ -36,8 +36,6 @@ module.exports = __toCommonJS(styles_exports);
36
36
  var import_styled_components = __toESM(require("styled-components"));
37
37
  const Container = import_styled_components.default.div`
38
38
  .table-container {
39
- overflow-x: auto;
40
-
41
39
  &::-webkit-scrollbar {
42
40
  width: 0;
43
41
  height: ${(props) => props.notFound ? "0px" : "5px"};
@@ -64,12 +62,15 @@ const Container = import_styled_components.default.div`
64
62
  background: ${({ theme }) => theme.t05};
65
63
  height: 2.7rem;
66
64
  padding: 0.8rem 1.3rem;
67
- margin-top: 0.5rem;
68
65
  white-space: nowrap;
69
66
  display: flex;
70
67
  align-items: center;
71
68
  position: relative;
72
69
  transition: ease 0.3s;
70
+
71
+ &.item {
72
+ margin-top: 0.5rem;
73
+ }
73
74
 
74
75
  &.table-identifier {
75
76
  padding: .8rem .5rem !important;
@@ -3,8 +3,6 @@
3
3
  import styled from "styled-components";
4
4
  const Container = styled.div`
5
5
  .table-container {
6
- overflow-x: auto;
7
-
8
6
  &::-webkit-scrollbar {
9
7
  width: 0;
10
8
  height: ${(props) => props.notFound ? "0px" : "5px"};
@@ -31,12 +29,15 @@ const Container = styled.div`
31
29
  background: ${({ theme }) => theme.t05};
32
30
  height: 2.7rem;
33
31
  padding: 0.8rem 1.3rem;
34
- margin-top: 0.5rem;
35
32
  white-space: nowrap;
36
33
  display: flex;
37
34
  align-items: center;
38
35
  position: relative;
39
36
  transition: ease 0.3s;
37
+
38
+ &.item {
39
+ margin-top: 0.5rem;
40
+ }
40
41
 
41
42
  &.table-identifier {
42
43
  padding: .8rem .5rem !important;
@@ -111,7 +111,7 @@ const TooltipProviderContainer = ({ children }) => {
111
111
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipContext.Provider, { value: {}, children: [
112
112
  import_lodash.default.map(
113
113
  tooltips,
114
- (data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ (data, index) => !!data.content && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
115
  import_components.Tooltip,
116
116
  {
117
117
  style: {
@@ -77,7 +77,7 @@ const TooltipProviderContainer = ({ children }) => {
77
77
  return /* @__PURE__ */ jsxs(TooltipContext.Provider, { value: {}, children: [
78
78
  _.map(
79
79
  tooltips,
80
- (data, index) => /* @__PURE__ */ jsx(
80
+ (data, index) => !!data.content && /* @__PURE__ */ jsx(
81
81
  Tooltip,
82
82
  {
83
83
  style: {
@@ -20,6 +20,7 @@ export interface ITableRow {
20
20
  mask?: any;
21
21
  custom?: (data: any) => React.ReactNode;
22
22
  name?: string;
23
+ info?: any;
23
24
  }
24
25
  export interface ITable {
25
26
  content: Array<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.296",
3
+ "version": "1.4.299",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",