@gustavo-valsechi/client 1.4.75 → 1.4.77
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 +13 -4
- package/dist/components/types/form/types/select/options/index.mjs +13 -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 +15 -25
- package/dist/contexts/target/index.mjs +15 -25
- package/dist/interfaces/contexts/tooltip/index.d.ts +0 -7
- package/package.json +1 -1
|
@@ -35,9 +35,9 @@ function Table(props) {
|
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
className: `
|
|
38
|
-
|
|
39
|
-
${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "
|
|
40
|
-
${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "
|
|
38
|
+
table-content
|
|
39
|
+
${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "table-action" : ""}
|
|
40
|
+
${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "table-identifier" : ""}
|
|
41
41
|
`,
|
|
42
42
|
style: _.isFunction((_c2 = option.row) == null ? void 0 : _c2.style) ? option.row.style(data, option) : (_d2 = option.row) == null ? void 0 : _d2.style,
|
|
43
43
|
children: renderRowContent(data, option)
|
|
@@ -47,13 +47,13 @@ function Table(props) {
|
|
|
47
47
|
const renderRowContent = (data, option) => {
|
|
48
48
|
var _a2, _b2, _c2, _d2, _e2;
|
|
49
49
|
if (!!((_a2 = option.row) == null ? void 0 : _a2.actions)) {
|
|
50
|
-
return /* @__PURE__ */ jsx("div", { className: "
|
|
50
|
+
return /* @__PURE__ */ jsx("div", { className: "table-actions", children: _.map(
|
|
51
51
|
(_b2 = option.row) == null ? void 0 : _b2.actions,
|
|
52
52
|
(action, index) => renderButton(action, data, index)
|
|
53
53
|
) });
|
|
54
54
|
}
|
|
55
55
|
if ((_c2 = option.row) == null ? void 0 : _c2.icon) {
|
|
56
|
-
return /* @__PURE__ */ jsx("div", { className: "
|
|
56
|
+
return /* @__PURE__ */ jsx("div", { className: "table-icon", children: /* @__PURE__ */ jsx(
|
|
57
57
|
"i",
|
|
58
58
|
{
|
|
59
59
|
"aria-hidden": true,
|
|
@@ -67,7 +67,7 @@ function Table(props) {
|
|
|
67
67
|
return /* @__PURE__ */ jsx(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
|
-
className: `
|
|
70
|
+
className: `table-button ${_.includes(action.icon, "trash") ? "negative" : ""}`,
|
|
71
71
|
onClick: () => action.function ? action.function(data) : null,
|
|
72
72
|
disabled: action.disabled,
|
|
73
73
|
"data-tooltip": action.tooltip,
|
|
@@ -90,7 +90,7 @@ function Table(props) {
|
|
|
90
90
|
return /* @__PURE__ */ jsx(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
|
-
className: "
|
|
93
|
+
className: "table-content-elipse",
|
|
94
94
|
"data-tooltip": _.isString(body) ? body : "",
|
|
95
95
|
"data-tooltip-props": '{"position":"bottom"}',
|
|
96
96
|
children: body
|
|
@@ -98,7 +98,7 @@ function Table(props) {
|
|
|
98
98
|
);
|
|
99
99
|
};
|
|
100
100
|
return /* @__PURE__ */ jsxs(Container, { notFound: !((_b = props.content) == null ? void 0 : _b.length) && !props.loading, children: [
|
|
101
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
101
|
+
/* @__PURE__ */ jsx("div", { className: "table-container", children: /* @__PURE__ */ jsxs("table", { children: [
|
|
102
102
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: _.map(
|
|
103
103
|
props.options,
|
|
104
104
|
(option, index) => {
|
|
@@ -106,7 +106,7 @@ function Table(props) {
|
|
|
106
106
|
return /* @__PURE__ */ jsx("th", { style: (_a2 = option.column) == null ? void 0 : _a2.style, children: /* @__PURE__ */ jsx(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
className: `
|
|
109
|
+
className: `table-content ${((_b2 = option.column) == null ? void 0 : _b2.action) ? `table-action ${((_d2 = (_c2 = option.column) == null ? void 0 : _c2.action) == null ? void 0 : _d2.position) ? (_f2 = (_e2 = option.column) == null ? void 0 : _e2.action) == null ? void 0 : _f2.position : ""}` : ""}`,
|
|
110
110
|
children: !!((_g = option.column) == null ? void 0 : _g.action) ? renderButton(option.column.action) : !((_h = props.content) == null ? void 0 : _h.length) && !props.loading ? "" : _.isString(((_i = option.column) == null ? void 0 : _i.name) || option.column) ? ((_j = option.column) == null ? void 0 : _j.name) || option.column : ""
|
|
111
111
|
}
|
|
112
112
|
) }, index);
|
|
@@ -124,7 +124,7 @@ function Table(props) {
|
|
|
124
124
|
) }, index);
|
|
125
125
|
}) }, key)) : _.map(props.content, (data, key) => /* @__PURE__ */ jsx("tr", { children: _.map(props.options, (option, index) => /* @__PURE__ */ jsx("td", { onClick: () => index < 2 ? onShowLine(key) : null, children: renderRowContainer(data, option) }, index)) }, key)) })
|
|
126
126
|
] }) }),
|
|
127
|
-
!((_d = props.content) == null ? void 0 : _d.length) && !props.loading && /* @__PURE__ */ jsxs("div", { className: "
|
|
127
|
+
!((_d = props.content) == null ? void 0 : _d.length) && !props.loading && /* @__PURE__ */ jsxs("div", { className: "table-not-found", children: [
|
|
128
128
|
/* @__PURE__ */ jsx("p", { children: ((_e = props.notFound) == null ? void 0 : _e.title) || "Nenhuma campanha encontrado" }),
|
|
129
129
|
/* @__PURE__ */ jsx("p", { children: ((_f = props.notFound) == null ? void 0 : _f.message) || "Envie uma campanha de marketing para aparecer algum registro" })
|
|
130
130
|
] }),
|
|
@@ -55,15 +55,15 @@ function Modal(props) {
|
|
|
55
55
|
toggle: props.toggle,
|
|
56
56
|
onClose,
|
|
57
57
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles2.Container, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Content, { children: [
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "table-modal-title", children: "Conte\xFAdo" }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "table-modal-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { children: import_lodash.default.map(
|
|
60
60
|
content,
|
|
61
61
|
(value, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
62
|
-
!!key && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
62
|
+
!!key && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "table-modal-column", children: key }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "table-modal-row", children: value })
|
|
64
64
|
] }, key)
|
|
65
65
|
) }) }),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "table-modal-actions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
67
|
import__.default,
|
|
68
68
|
{
|
|
69
69
|
content: import_lodash.default.concat(import_lodash.default.map(actions, (data) => ({
|
|
@@ -22,15 +22,15 @@ function Modal(props) {
|
|
|
22
22
|
toggle: props.toggle,
|
|
23
23
|
onClose,
|
|
24
24
|
children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
25
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "table-modal-title", children: "Conte\xFAdo" }),
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "table-modal-content", children: /* @__PURE__ */ jsx("ul", { children: _.map(
|
|
27
27
|
content,
|
|
28
28
|
(value, key) => /* @__PURE__ */ jsxs("li", { children: [
|
|
29
|
-
!!key && /* @__PURE__ */ jsx("div", { className: "
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
29
|
+
!!key && /* @__PURE__ */ jsx("div", { className: "table-modal-column", children: key }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "table-modal-row", children: value })
|
|
31
31
|
] }, key)
|
|
32
32
|
) }) }),
|
|
33
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
33
|
+
/* @__PURE__ */ jsx("div", { className: "table-modal-actions", children: /* @__PURE__ */ jsx(
|
|
34
34
|
Component,
|
|
35
35
|
{
|
|
36
36
|
content: _.concat(_.map(actions, (data) => ({
|
|
@@ -39,7 +39,7 @@ const Content = import_styled_components.default.div`
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
gap: 1.5rem;
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.table-modal-title {
|
|
43
43
|
font-size: 1.2rem;
|
|
44
44
|
font-weight: 500;
|
|
45
45
|
width: 100%;
|
|
@@ -49,7 +49,7 @@ const Content = import_styled_components.default.div`
|
|
|
49
49
|
color: ${({ theme }) => theme.t6};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.table-modal-content {
|
|
53
53
|
ul {
|
|
54
54
|
li {
|
|
55
55
|
border-bottom: solid 1px ${({ theme }) => theme.t05};
|
|
@@ -65,21 +65,21 @@ const Content = import_styled_components.default.div`
|
|
|
65
65
|
border-bottom: none;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.
|
|
68
|
+
.table-modal-column {
|
|
69
69
|
background: ${({ theme }) => theme.t05};
|
|
70
70
|
padding: .5rem .8rem;
|
|
71
71
|
font-weight: 600;
|
|
72
72
|
border-radius: 5px;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
.table-modal-row {
|
|
76
76
|
text-align: right;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.table-modal-actions {
|
|
83
83
|
margin-top: 1rem;
|
|
84
84
|
}
|
|
85
85
|
`;
|
|
@@ -6,7 +6,7 @@ const Content = styled.div`
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: 1.5rem;
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.table-modal-title {
|
|
10
10
|
font-size: 1.2rem;
|
|
11
11
|
font-weight: 500;
|
|
12
12
|
width: 100%;
|
|
@@ -16,7 +16,7 @@ const Content = styled.div`
|
|
|
16
16
|
color: ${({ theme }) => theme.t6};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
.table-modal-content {
|
|
20
20
|
ul {
|
|
21
21
|
li {
|
|
22
22
|
border-bottom: solid 1px ${({ theme }) => theme.t05};
|
|
@@ -32,21 +32,21 @@ const Content = styled.div`
|
|
|
32
32
|
border-bottom: none;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
35
|
+
.table-modal-column {
|
|
36
36
|
background: ${({ theme }) => theme.t05};
|
|
37
37
|
padding: .5rem .8rem;
|
|
38
38
|
font-weight: 600;
|
|
39
39
|
border-radius: 5px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.table-modal-row {
|
|
43
43
|
text-align: right;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.table-modal-actions {
|
|
50
50
|
margin-top: 1rem;
|
|
51
51
|
}
|
|
52
52
|
`;
|
|
@@ -34,7 +34,7 @@ __export(styles_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(styles_exports);
|
|
35
35
|
var import_styled_components = __toESM(require("styled-components"));
|
|
36
36
|
const Container = import_styled_components.default.div`
|
|
37
|
-
.
|
|
37
|
+
.table-container {
|
|
38
38
|
overflow-x: auto;
|
|
39
39
|
|
|
40
40
|
&::-webkit-scrollbar {
|
|
@@ -59,7 +59,7 @@ const Container = import_styled_components.default.div`
|
|
|
59
59
|
width: 100%;
|
|
60
60
|
border-spacing: 0;
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.table-content {
|
|
63
63
|
background: ${({ theme }) => theme.t05};
|
|
64
64
|
height: 2.7rem;
|
|
65
65
|
padding: 0.8rem 1.3rem;
|
|
@@ -70,11 +70,11 @@ const Container = import_styled_components.default.div`
|
|
|
70
70
|
position: relative;
|
|
71
71
|
transition: ease 0.3s;
|
|
72
72
|
|
|
73
|
-
&.
|
|
73
|
+
&.table-identifier {
|
|
74
74
|
padding: .8rem .5rem !important;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
&.
|
|
77
|
+
&.table-action {
|
|
78
78
|
display: flex;
|
|
79
79
|
justify-content: flex-end;
|
|
80
80
|
padding: .8rem .5rem !important;
|
|
@@ -88,14 +88,14 @@ const Container = import_styled_components.default.div`
|
|
|
88
88
|
justify-content: center;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.
|
|
91
|
+
.table-actions {
|
|
92
92
|
display: flex;
|
|
93
93
|
align-items: center;
|
|
94
94
|
justify-content: flex-end;
|
|
95
95
|
gap: .5rem;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
98
|
+
.table-button {
|
|
99
99
|
min-width: 1.8rem;
|
|
100
100
|
height: 1.8rem;
|
|
101
101
|
border-radius: 5px;
|
|
@@ -142,7 +142,7 @@ const Container = import_styled_components.default.div`
|
|
|
142
142
|
height: 2.5rem;
|
|
143
143
|
|
|
144
144
|
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
145
|
-
.
|
|
145
|
+
.table-content {
|
|
146
146
|
font-size: .7rem;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -156,14 +156,14 @@ const Container = import_styled_components.default.div`
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
&:first-child {
|
|
159
|
-
.
|
|
159
|
+
.table-content {
|
|
160
160
|
border-top-left-radius: 5px;
|
|
161
161
|
border-bottom-left-radius: 5px;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&:last-child {
|
|
166
|
-
.
|
|
166
|
+
.table-content {
|
|
167
167
|
border-top-right-radius: 5px;
|
|
168
168
|
border-bottom-right-radius: 5px;
|
|
169
169
|
}
|
|
@@ -176,7 +176,7 @@ const Container = import_styled_components.default.div`
|
|
|
176
176
|
tr {
|
|
177
177
|
&:hover {
|
|
178
178
|
td {
|
|
179
|
-
.
|
|
179
|
+
.table-content {
|
|
180
180
|
background: ${({ theme }) => theme.tertiary};
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -197,20 +197,20 @@ const Container = import_styled_components.default.div`
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
&:first-child {
|
|
200
|
-
.
|
|
200
|
+
.table-content {
|
|
201
201
|
border-top-left-radius: 5px;
|
|
202
202
|
border-bottom-left-radius: 5px;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
&:last-child {
|
|
207
|
-
.
|
|
207
|
+
.table-content {
|
|
208
208
|
border-top-right-radius: 5px;
|
|
209
209
|
border-bottom-right-radius: 5px;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.
|
|
213
|
+
.table-content-elipse {
|
|
214
214
|
position: absolute;
|
|
215
215
|
left: 0;
|
|
216
216
|
right: 0;
|
|
@@ -223,7 +223,7 @@ const Container = import_styled_components.default.div`
|
|
|
223
223
|
|
|
224
224
|
&:first-child {
|
|
225
225
|
td {
|
|
226
|
-
.
|
|
226
|
+
.table-content {
|
|
227
227
|
margin-top: 1.5rem;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -233,7 +233,7 @@ const Container = import_styled_components.default.div`
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
.
|
|
236
|
+
.table-icon {
|
|
237
237
|
width: 1.8rem;
|
|
238
238
|
height: 1.8rem;
|
|
239
239
|
background: ${({ theme }) => theme.t08};
|
|
@@ -254,7 +254,7 @@ const Container = import_styled_components.default.div`
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
.
|
|
257
|
+
.table-not-found {
|
|
258
258
|
border-radius: 5px;
|
|
259
259
|
background: ${({ theme }) => theme.t05};
|
|
260
260
|
display: flex;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
const Container = styled.div`
|
|
4
|
-
.
|
|
4
|
+
.table-container {
|
|
5
5
|
overflow-x: auto;
|
|
6
6
|
|
|
7
7
|
&::-webkit-scrollbar {
|
|
@@ -26,7 +26,7 @@ const Container = styled.div`
|
|
|
26
26
|
width: 100%;
|
|
27
27
|
border-spacing: 0;
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.table-content {
|
|
30
30
|
background: ${({ theme }) => theme.t05};
|
|
31
31
|
height: 2.7rem;
|
|
32
32
|
padding: 0.8rem 1.3rem;
|
|
@@ -37,11 +37,11 @@ const Container = styled.div`
|
|
|
37
37
|
position: relative;
|
|
38
38
|
transition: ease 0.3s;
|
|
39
39
|
|
|
40
|
-
&.
|
|
40
|
+
&.table-identifier {
|
|
41
41
|
padding: .8rem .5rem !important;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
&.
|
|
44
|
+
&.table-action {
|
|
45
45
|
display: flex;
|
|
46
46
|
justify-content: flex-end;
|
|
47
47
|
padding: .8rem .5rem !important;
|
|
@@ -55,14 +55,14 @@ const Container = styled.div`
|
|
|
55
55
|
justify-content: center;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.table-actions {
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
justify-content: flex-end;
|
|
62
62
|
gap: .5rem;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.table-button {
|
|
66
66
|
min-width: 1.8rem;
|
|
67
67
|
height: 1.8rem;
|
|
68
68
|
border-radius: 5px;
|
|
@@ -109,7 +109,7 @@ const Container = styled.div`
|
|
|
109
109
|
height: 2.5rem;
|
|
110
110
|
|
|
111
111
|
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
112
|
-
.
|
|
112
|
+
.table-content {
|
|
113
113
|
font-size: .7rem;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -123,14 +123,14 @@ const Container = styled.div`
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
&:first-child {
|
|
126
|
-
.
|
|
126
|
+
.table-content {
|
|
127
127
|
border-top-left-radius: 5px;
|
|
128
128
|
border-bottom-left-radius: 5px;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
&:last-child {
|
|
133
|
-
.
|
|
133
|
+
.table-content {
|
|
134
134
|
border-top-right-radius: 5px;
|
|
135
135
|
border-bottom-right-radius: 5px;
|
|
136
136
|
}
|
|
@@ -143,7 +143,7 @@ const Container = styled.div`
|
|
|
143
143
|
tr {
|
|
144
144
|
&:hover {
|
|
145
145
|
td {
|
|
146
|
-
.
|
|
146
|
+
.table-content {
|
|
147
147
|
background: ${({ theme }) => theme.tertiary};
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -164,20 +164,20 @@ const Container = styled.div`
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
&:first-child {
|
|
167
|
-
.
|
|
167
|
+
.table-content {
|
|
168
168
|
border-top-left-radius: 5px;
|
|
169
169
|
border-bottom-left-radius: 5px;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
&:last-child {
|
|
174
|
-
.
|
|
174
|
+
.table-content {
|
|
175
175
|
border-top-right-radius: 5px;
|
|
176
176
|
border-bottom-right-radius: 5px;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.
|
|
180
|
+
.table-content-elipse {
|
|
181
181
|
position: absolute;
|
|
182
182
|
left: 0;
|
|
183
183
|
right: 0;
|
|
@@ -190,7 +190,7 @@ const Container = styled.div`
|
|
|
190
190
|
|
|
191
191
|
&:first-child {
|
|
192
192
|
td {
|
|
193
|
-
.
|
|
193
|
+
.table-content {
|
|
194
194
|
margin-top: 1.5rem;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -200,7 +200,7 @@ const Container = styled.div`
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
.
|
|
203
|
+
.table-icon {
|
|
204
204
|
width: 1.8rem;
|
|
205
205
|
height: 1.8rem;
|
|
206
206
|
background: ${({ theme }) => theme.t08};
|
|
@@ -221,7 +221,7 @@ const Container = styled.div`
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
.
|
|
224
|
+
.table-not-found {
|
|
225
225
|
border-radius: 5px;
|
|
226
226
|
background: ${({ theme }) => theme.t05};
|
|
227
227
|
display: flex;
|
|
@@ -42,41 +42,31 @@ const memory = [];
|
|
|
42
42
|
const TargetProviderContainer = ({ children }) => {
|
|
43
43
|
const containerRef = (0, import_react.useRef)([]);
|
|
44
44
|
const [targets, setTargets] = (0, import_react.useState)([]);
|
|
45
|
-
const [show, setShow] = (0, import_react.useState)([]);
|
|
46
45
|
(0, import_react.useEffect)(() => {
|
|
47
46
|
import_lodash.default.forEach(targets, (target, index) => {
|
|
48
47
|
var _a;
|
|
49
48
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
50
49
|
if (!element) return;
|
|
51
50
|
element.addEventListener("click", () => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
setShow(showMemory);
|
|
51
|
+
const targetElement = import_lodash.default.find(containerRef.current, (data, i) => i === index);
|
|
52
|
+
if (!targetElement) return;
|
|
53
|
+
if (targetElement.style.opacity === "1") {
|
|
54
|
+
targetElement.style.opacity = "0";
|
|
55
|
+
targetElement.style.zIndex = "-1";
|
|
58
56
|
return;
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
import_lodash.default.forEach(containerRef.current, () => {
|
|
59
|
+
targetElement.style.opacity = "0";
|
|
60
|
+
targetElement.style.zIndex = "-1";
|
|
61
|
+
});
|
|
62
|
+
const coords = getCoords(element);
|
|
63
|
+
targetElement.style.top = `${coords.top}px`;
|
|
64
|
+
targetElement.style.left = `${coords.left}px`;
|
|
65
|
+
targetElement.style.opacity = "1";
|
|
66
|
+
targetElement.style.zIndex = "10";
|
|
62
67
|
});
|
|
63
68
|
});
|
|
64
|
-
}, [targets
|
|
65
|
-
(0, import_react.useEffect)(() => {
|
|
66
|
-
if (!containerRef.current) return;
|
|
67
|
-
import_lodash.default.forEach(containerRef.current, (element, index) => {
|
|
68
|
-
const config = import_lodash.default.find(show, (data) => data.index === index);
|
|
69
|
-
if (!config) {
|
|
70
|
-
element.style.opacity = "0";
|
|
71
|
-
element.style.zIndex = "-1";
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
element.style.top = `${config.coords.top}px`;
|
|
75
|
-
element.style.left = `${config.coords.left}px`;
|
|
76
|
-
element.style.opacity = "1";
|
|
77
|
-
element.style.zIndex = "10";
|
|
78
|
-
});
|
|
79
|
-
}, [show, containerRef]);
|
|
69
|
+
}, [targets]);
|
|
80
70
|
const getCoords = (target) => {
|
|
81
71
|
const rect = target.getBoundingClientRect();
|
|
82
72
|
const targetTop = rect.top + window.scrollY;
|
|
@@ -8,41 +8,31 @@ const memory = [];
|
|
|
8
8
|
const TargetProviderContainer = ({ children }) => {
|
|
9
9
|
const containerRef = useRef([]);
|
|
10
10
|
const [targets, setTargets] = useState([]);
|
|
11
|
-
const [show, setShow] = useState([]);
|
|
12
11
|
useEffect(() => {
|
|
13
12
|
_.forEach(targets, (target, index) => {
|
|
14
13
|
var _a;
|
|
15
14
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
16
15
|
if (!element) return;
|
|
17
16
|
element.addEventListener("click", () => {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
setShow(showMemory);
|
|
17
|
+
const targetElement = _.find(containerRef.current, (data, i) => i === index);
|
|
18
|
+
if (!targetElement) return;
|
|
19
|
+
if (targetElement.style.opacity === "1") {
|
|
20
|
+
targetElement.style.opacity = "0";
|
|
21
|
+
targetElement.style.zIndex = "-1";
|
|
24
22
|
return;
|
|
25
23
|
}
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
_.forEach(containerRef.current, () => {
|
|
25
|
+
targetElement.style.opacity = "0";
|
|
26
|
+
targetElement.style.zIndex = "-1";
|
|
27
|
+
});
|
|
28
|
+
const coords = getCoords(element);
|
|
29
|
+
targetElement.style.top = `${coords.top}px`;
|
|
30
|
+
targetElement.style.left = `${coords.left}px`;
|
|
31
|
+
targetElement.style.opacity = "1";
|
|
32
|
+
targetElement.style.zIndex = "10";
|
|
28
33
|
});
|
|
29
34
|
});
|
|
30
|
-
}, [targets
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!containerRef.current) return;
|
|
33
|
-
_.forEach(containerRef.current, (element, index) => {
|
|
34
|
-
const config = _.find(show, (data) => data.index === index);
|
|
35
|
-
if (!config) {
|
|
36
|
-
element.style.opacity = "0";
|
|
37
|
-
element.style.zIndex = "-1";
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
element.style.top = `${config.coords.top}px`;
|
|
41
|
-
element.style.left = `${config.coords.left}px`;
|
|
42
|
-
element.style.opacity = "1";
|
|
43
|
-
element.style.zIndex = "10";
|
|
44
|
-
});
|
|
45
|
-
}, [show, containerRef]);
|
|
35
|
+
}, [targets]);
|
|
46
36
|
const getCoords = (target) => {
|
|
47
37
|
const rect = target.getBoundingClientRect();
|
|
48
38
|
const targetTop = rect.top + window.scrollY;
|
|
@@ -6,13 +6,6 @@ export interface ITargetConfig {
|
|
|
6
6
|
ref: React.RefObject<any>;
|
|
7
7
|
component: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export interface ITargetShow {
|
|
10
|
-
index: number;
|
|
11
|
-
coords: {
|
|
12
|
-
top: number;
|
|
13
|
-
left: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
9
|
export interface ITargetConfigCoords {
|
|
17
10
|
top: number;
|
|
18
11
|
left: number;
|