@gustavo-valsechi/client 1.3.14 → 1.3.16
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/chunk-7KA3WXTD.mjs +1252 -0
- package/dist/chunk-7KA3WXTD.mjs.map +1 -0
- package/dist/chunk-IF6P6NOG.mjs +141 -0
- package/dist/chunk-IF6P6NOG.mjs.map +1 -0
- package/dist/chunk-RWFXFZB5.mjs +2 -0
- package/dist/chunk-RWFXFZB5.mjs.map +1 -0
- package/dist/components.d.mts +10 -0
- package/dist/components.d.ts +10 -0
- package/dist/components.js +1390 -0
- package/dist/components.js.map +1 -0
- package/dist/components.mjs +3 -0
- package/dist/components.mjs.map +1 -0
- package/dist/contexts.d.mts +20 -0
- package/dist/contexts.d.ts +20 -0
- package/dist/contexts.js +141 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.mjs +3 -0
- package/dist/contexts.mjs.map +1 -0
- package/dist/index-BhaGW0O1.d.ts +601 -0
- package/dist/index-BxA8LyyD.d.mts +68 -0
- package/dist/index-DDi0w5pw.d.mts +601 -0
- package/dist/index-DT7VKE7H.d.ts +68 -0
- package/dist/index-Da-DtPS-.d.mts +29 -0
- package/dist/index-Da-DtPS-.d.ts +29 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1390 -4
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces.d.mts +12 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +3 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/interfaces.mjs +3 -0
- package/dist/interfaces.mjs.map +1 -0
- package/package.json +8 -15
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +0 -17
- package/dist/components/styles.d.ts +0 -2
- package/dist/components/styles.js +0 -14
- package/dist/components/types/avatar/index.d.ts +0 -2
- package/dist/components/types/avatar/index.js +0 -34
- package/dist/components/types/avatar/styles.d.ts +0 -1
- package/dist/components/types/avatar/styles.js +0 -55
- package/dist/components/types/badge/index.d.ts +0 -2
- package/dist/components/types/badge/index.js +0 -16
- package/dist/components/types/badge/styles.d.ts +0 -1
- package/dist/components/types/badge/styles.js +0 -33
- package/dist/components/types/block/index.d.ts +0 -2
- package/dist/components/types/block/index.js +0 -8
- package/dist/components/types/block/styles.d.ts +0 -2
- package/dist/components/types/block/styles.js +0 -25
- package/dist/components/types/chart/index.d.ts +0 -2
- package/dist/components/types/chart/index.js +0 -33
- package/dist/components/types/chart/styles.d.ts +0 -1
- package/dist/components/types/chart/styles.js +0 -4
- package/dist/components/types/credit-card/assets/index.d.ts +0 -4
- package/dist/components/types/credit-card/assets/index.js +0 -17
- package/dist/components/types/credit-card/card/index.d.ts +0 -2
- package/dist/components/types/credit-card/card/index.js +0 -23
- package/dist/components/types/credit-card/card/styles.d.ts +0 -1
- package/dist/components/types/credit-card/card/styles.js +0 -132
- package/dist/components/types/credit-card/functions/index.d.ts +0 -2
- package/dist/components/types/credit-card/functions/index.js +0 -8
- package/dist/components/types/credit-card/functions/styles.d.ts +0 -1
- package/dist/components/types/credit-card/functions/styles.js +0 -37
- package/dist/components/types/credit-card/index.d.ts +0 -2
- package/dist/components/types/credit-card/index.js +0 -29
- package/dist/components/types/credit-card/styles.d.ts +0 -1
- package/dist/components/types/credit-card/styles.js +0 -34
- package/dist/components/types/credit-card/tools/index.d.ts +0 -6
- package/dist/components/types/credit-card/tools/index.js +0 -19
- package/dist/components/types/form/index.d.ts +0 -3
- package/dist/components/types/form/index.js +0 -53
- package/dist/components/types/form/styles.d.ts +0 -1
- package/dist/components/types/form/styles.js +0 -15
- package/dist/components/types/form/types/button/index.d.ts +0 -2
- package/dist/components/types/form/types/button/index.js +0 -8
- package/dist/components/types/form/types/button/loading/index.d.ts +0 -1
- package/dist/components/types/form/types/button/loading/index.js +0 -6
- package/dist/components/types/form/types/button/loading/styles.d.ts +0 -1
- package/dist/components/types/form/types/button/loading/styles.js +0 -88
- package/dist/components/types/form/types/button/styles.d.ts +0 -1
- package/dist/components/types/form/types/button/styles.js +0 -55
- package/dist/components/types/form/types/datetime/index.d.ts +0 -2
- package/dist/components/types/form/types/datetime/index.js +0 -20
- package/dist/components/types/form/types/datetime/styles.d.ts +0 -1
- package/dist/components/types/form/types/datetime/styles.js +0 -40
- package/dist/components/types/form/types/file/index.d.ts +0 -2
- package/dist/components/types/form/types/file/index.js +0 -24
- package/dist/components/types/form/types/file/styles.d.ts +0 -1
- package/dist/components/types/form/types/file/styles.js +0 -27
- package/dist/components/types/form/types/index.d.ts +0 -7
- package/dist/components/types/form/types/index.js +0 -7
- package/dist/components/types/form/types/input/index.d.ts +0 -2
- package/dist/components/types/form/types/input/index.js +0 -22
- package/dist/components/types/form/types/input/styles.d.ts +0 -1
- package/dist/components/types/form/types/input/styles.js +0 -46
- package/dist/components/types/form/types/label/index.d.ts +0 -2
- package/dist/components/types/form/types/label/index.js +0 -6
- package/dist/components/types/form/types/label/styles.d.ts +0 -1
- package/dist/components/types/form/types/label/styles.js +0 -7
- package/dist/components/types/form/types/select/index.d.ts +0 -2
- package/dist/components/types/form/types/select/index.js +0 -25
- package/dist/components/types/form/types/select/styles.d.ts +0 -1
- package/dist/components/types/form/types/select/styles.js +0 -52
- package/dist/components/types/form/types/textarea/index.d.ts +0 -2
- package/dist/components/types/form/types/textarea/index.js +0 -20
- package/dist/components/types/form/types/textarea/styles.d.ts +0 -1
- package/dist/components/types/form/types/textarea/styles.js +0 -39
- package/dist/components/types/index.d.ts +0 -11
- package/dist/components/types/index.js +0 -11
- package/dist/components/types/loading/app/index.d.ts +0 -2
- package/dist/components/types/loading/app/index.js +0 -7
- package/dist/components/types/loading/app/styles.d.ts +0 -1
- package/dist/components/types/loading/app/styles.js +0 -87
- package/dist/components/types/loading/bar/index.d.ts +0 -2
- package/dist/components/types/loading/bar/index.js +0 -6
- package/dist/components/types/loading/bar/styles.d.ts +0 -1
- package/dist/components/types/loading/bar/styles.js +0 -21
- package/dist/components/types/loading/index.d.ts +0 -2
- package/dist/components/types/loading/index.js +0 -2
- package/dist/components/types/logo/index.d.ts +0 -2
- package/dist/components/types/logo/index.js +0 -6
- package/dist/components/types/logo/styles.d.ts +0 -1
- package/dist/components/types/logo/styles.js +0 -19
- package/dist/components/types/lottie/animations/index.d.ts +0 -293
- package/dist/components/types/lottie/animations/index.js +0 -2
- package/dist/components/types/lottie/animations/loader.json +0 -1
- package/dist/components/types/lottie/index.d.ts +0 -2
- package/dist/components/types/lottie/index.js +0 -28
- package/dist/components/types/lottie/styles.d.ts +0 -1
- package/dist/components/types/lottie/styles.js +0 -22
- package/dist/components/types/modal/index.d.ts +0 -2
- package/dist/components/types/modal/index.js +0 -12
- package/dist/components/types/modal/styles.d.ts +0 -1
- package/dist/components/types/modal/styles.js +0 -153
- package/dist/components/types/table/index.d.ts +0 -3
- package/dist/components/types/table/index.js +0 -93
- package/dist/components/types/table/modal/actions.d.ts +0 -10
- package/dist/components/types/table/modal/actions.js +0 -6
- package/dist/components/types/table/modal/index.d.ts +0 -2
- package/dist/components/types/table/modal/index.js +0 -37
- package/dist/components/types/table/modal/styles.d.ts +0 -1
- package/dist/components/types/table/modal/styles.js +0 -52
- package/dist/components/types/table/paginate/index.d.ts +0 -2
- package/dist/components/types/table/paginate/index.js +0 -30
- package/dist/components/types/table/paginate/styles.d.ts +0 -1
- package/dist/components/types/table/paginate/styles.js +0 -36
- package/dist/components/types/table/styles.d.ts +0 -5
- package/dist/components/types/table/styles.js +0 -262
- package/dist/contexts/icon/assets/brands/index.d.ts +0 -2
- package/dist/contexts/icon/assets/brands/index.js +0 -7
- package/dist/contexts/icon/assets/index.d.ts +0 -6
- package/dist/contexts/icon/assets/index.js +0 -8
- package/dist/contexts/icon/assets/regular/index.d.ts +0 -2
- package/dist/contexts/icon/assets/regular/index.js +0 -7
- package/dist/contexts/icon/assets/solid/index.d.ts +0 -2
- package/dist/contexts/icon/assets/solid/index.js +0 -7
- package/dist/contexts/icon/index.d.ts +0 -4
- package/dist/contexts/icon/index.js +0 -75
- package/dist/contexts/icon/styles.d.ts +0 -1
- package/dist/contexts/icon/styles.js +0 -4
- package/dist/contexts/index.d.ts +0 -4
- package/dist/contexts/index.js +0 -5
- package/dist/contexts/modal/index.d.ts +0 -4
- package/dist/contexts/modal/index.js +0 -46
- package/dist/contexts/modal/styles.d.ts +0 -1
- package/dist/contexts/modal/styles.js +0 -4
- package/dist/contexts/theme/content.d.ts +0 -3
- package/dist/contexts/theme/content.js +0 -74
- package/dist/contexts/theme/index.d.ts +0 -4
- package/dist/contexts/theme/index.js +0 -26
- package/dist/contexts/theme/styles.d.ts +0 -1
- package/dist/contexts/theme/styles.js +0 -78
- package/dist/contexts/tooltip/index.d.ts +0 -6
- package/dist/contexts/tooltip/index.js +0 -58
- package/dist/contexts/tooltip/styles.d.ts +0 -1
- package/dist/contexts/tooltip/styles.js +0 -40
- package/dist/interfaces/components/avatar/index.d.ts +0 -6
- package/dist/interfaces/components/avatar/index.js +0 -1
- package/dist/interfaces/components/badge/index.d.ts +0 -3
- package/dist/interfaces/components/badge/index.js +0 -1
- package/dist/interfaces/components/block/index.d.ts +0 -16
- package/dist/interfaces/components/block/index.js +0 -1
- package/dist/interfaces/components/chart/index.d.ts +0 -9
- package/dist/interfaces/components/chart/index.js +0 -1
- package/dist/interfaces/components/credit-card/index.d.ts +0 -16
- package/dist/interfaces/components/credit-card/index.js +0 -1
- package/dist/interfaces/components/form/button/index.d.ts +0 -7
- package/dist/interfaces/components/form/button/index.js +0 -1
- package/dist/interfaces/components/form/datetime/index.d.ts +0 -15
- package/dist/interfaces/components/form/datetime/index.js +0 -1
- package/dist/interfaces/components/form/file/index.d.ts +0 -14
- package/dist/interfaces/components/form/file/index.js +0 -1
- package/dist/interfaces/components/form/index.d.ts +0 -16
- package/dist/interfaces/components/form/index.js +0 -7
- package/dist/interfaces/components/form/input/index.d.ts +0 -17
- package/dist/interfaces/components/form/input/index.js +0 -1
- package/dist/interfaces/components/form/label/index.d.ts +0 -5
- package/dist/interfaces/components/form/label/index.js +0 -1
- package/dist/interfaces/components/form/select/index.d.ts +0 -14
- package/dist/interfaces/components/form/select/index.js +0 -1
- package/dist/interfaces/components/form/textarea/index.d.ts +0 -16
- package/dist/interfaces/components/form/textarea/index.js +0 -1
- package/dist/interfaces/components/index.d.ts +0 -26
- package/dist/interfaces/components/index.js +0 -11
- package/dist/interfaces/components/loading/app/index.d.ts +0 -3
- package/dist/interfaces/components/loading/app/index.js +0 -1
- package/dist/interfaces/components/loading/bar/index.d.ts +0 -7
- package/dist/interfaces/components/loading/bar/index.js +0 -1
- package/dist/interfaces/components/loading/index.d.ts +0 -2
- package/dist/interfaces/components/loading/index.js +0 -2
- package/dist/interfaces/components/logo/index.d.ts +0 -6
- package/dist/interfaces/components/logo/index.js +0 -1
- package/dist/interfaces/components/lottie/index.d.ts +0 -12
- package/dist/interfaces/components/lottie/index.js +0 -1
- package/dist/interfaces/components/modal/index.d.ts +0 -16
- package/dist/interfaces/components/modal/index.js +0 -1
- package/dist/interfaces/components/table/index.d.ts +0 -46
- package/dist/interfaces/components/table/index.js +0 -1
- package/dist/interfaces/components/table/paginate/index.d.ts +0 -7
- package/dist/interfaces/components/table/paginate/index.js +0 -1
- package/dist/interfaces/contexts/icon/index.d.ts +0 -3
- package/dist/interfaces/contexts/icon/index.js +0 -1
- package/dist/interfaces/contexts/index.d.ts +0 -8
- package/dist/interfaces/contexts/index.js +0 -4
- package/dist/interfaces/contexts/modal/index.d.ts +0 -16
- package/dist/interfaces/contexts/modal/index.js +0 -2
- package/dist/interfaces/contexts/theme/index.d.ts +0 -42
- package/dist/interfaces/contexts/theme/index.js +0 -1
- package/dist/interfaces/contexts/tooltip/index.d.ts +0 -3
- package/dist/interfaces/contexts/tooltip/index.js +0 -1
- package/dist/interfaces/index.d.ts +0 -2
- package/dist/interfaces/index.js +0 -2
- package/dist/styled.d.ts +0 -6
- package/dist/styled.js +0 -1
- package/dist/tsup.config.d.ts +0 -2
- package/dist/tsup.config.js +0 -20
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
import { Container } from "./styles";
|
|
5
|
-
import { LoadingBar } from "../../../components";
|
|
6
|
-
import { Paginate } from "./paginate";
|
|
7
|
-
import { useModal, useTheme } from "../../../contexts";
|
|
8
|
-
import _ from "lodash";
|
|
9
|
-
import Modal from "./modal";
|
|
10
|
-
export * from "./paginate";
|
|
11
|
-
export function Table(props) {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13
|
-
const theme = useTheme();
|
|
14
|
-
const modal = useModal();
|
|
15
|
-
const loading = ((_a = props.loading) === null || _a === void 0 ? void 0 : _a.is) || props.loading;
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
modal.add({ component: Modal, name: "table" });
|
|
18
|
-
return () => modal.remove("table");
|
|
19
|
-
}, []);
|
|
20
|
-
const onShowLine = (key) => {
|
|
21
|
-
if (window.innerWidth > Number(_.replace(theme.content.mobileMaxWidth, "px", "")))
|
|
22
|
-
return;
|
|
23
|
-
let content = {};
|
|
24
|
-
_.forEach(props.options, (data, index) => {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
const column = ((_a = data.column) === null || _a === void 0 ? void 0 : _a.name) || data.column;
|
|
27
|
-
const columnName = !_.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
|
|
28
|
-
content[columnName] = columnName === "actions" ? (_b = data.row) === null || _b === void 0 ? void 0 : _b.actions : renderRowContainer(props.content[key], data);
|
|
29
|
-
});
|
|
30
|
-
modal.setProps("table", { toggle: true, content });
|
|
31
|
-
};
|
|
32
|
-
const renderRowContainer = (data, option) => {
|
|
33
|
-
var _a, _b, _c, _d;
|
|
34
|
-
return (_jsx("div", { className: `
|
|
35
|
-
iz-table-content
|
|
36
|
-
${((_a = option.row) === null || _a === void 0 ? void 0 : _a.actions) ? "iz-table-action" : ""}
|
|
37
|
-
${((_b = option.row) === null || _b === void 0 ? void 0 : _b.icon) ? "iz-table-identifier" : ""}
|
|
38
|
-
`, style: _.isFunction((_c = option.row) === null || _c === void 0 ? void 0 : _c.style)
|
|
39
|
-
? option.row.style(data, option)
|
|
40
|
-
: (_d = option.row) === null || _d === void 0 ? void 0 : _d.style, children: renderRowContent(data, option) }));
|
|
41
|
-
};
|
|
42
|
-
const renderRowContent = (data, option) => {
|
|
43
|
-
var _a, _b, _c, _d, _e;
|
|
44
|
-
if (!!((_a = option.row) === null || _a === void 0 ? void 0 : _a.actions)) {
|
|
45
|
-
return (_jsx("div", { className: "iz-table-actions", children: _.map((_b = option.row) === null || _b === void 0 ? void 0 : _b.actions, (action, index) => renderButton(action, data, index)) }));
|
|
46
|
-
}
|
|
47
|
-
if ((_c = option.row) === null || _c === void 0 ? void 0 : _c.icon) {
|
|
48
|
-
return (_jsx("div", { className: "iz-table-icon", children: _jsx("i", { "aria-hidden": true, className: _.isFunction((_d = option.row) === null || _d === void 0 ? void 0 : _d.icon)
|
|
49
|
-
? option.row.icon(data) || "fa-solid fa-circle-user"
|
|
50
|
-
: ((_e = option.row) === null || _e === void 0 ? void 0 : _e.icon) || "fa-solid fa-circle-user" }) }));
|
|
51
|
-
}
|
|
52
|
-
return renderRowText(data, option);
|
|
53
|
-
};
|
|
54
|
-
const renderButton = (action, data, index) => {
|
|
55
|
-
return (_jsx("button", { className: `iz-table-button ${_.includes(action.icon, "trash") ? "negative" : ""}`, onClick: () => action.function ? action.function(data) : null, disabled: action.disabled, "data-tooltip": action.tooltip, children: _jsx("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" }) }, index));
|
|
56
|
-
};
|
|
57
|
-
const renderRowText = (data, option) => {
|
|
58
|
-
const row = option.row || {};
|
|
59
|
-
const content = data[row.name] || data;
|
|
60
|
-
let body;
|
|
61
|
-
while (!body) {
|
|
62
|
-
if (_.isString(row))
|
|
63
|
-
body = data[row];
|
|
64
|
-
if (_.isString(content))
|
|
65
|
-
body = content;
|
|
66
|
-
if (_.isFunction(row.mask))
|
|
67
|
-
body = row.mask(content);
|
|
68
|
-
if (_.isFunction(row.custom))
|
|
69
|
-
body = row.custom(content);
|
|
70
|
-
body = body !== null && body !== void 0 ? body : "---";
|
|
71
|
-
}
|
|
72
|
-
return (_jsx("div", { className: "iz-table-content-elipse", title: _.isString(body) ? body : "", children: body }));
|
|
73
|
-
};
|
|
74
|
-
return (_jsxs(Container, { notFound: !((_b = props.content) === null || _b === void 0 ? void 0 : _b.length) && !props.loading, children: [_jsx("div", { className: "iz-table-container", children: _jsxs("table", { children: [_jsx("thead", { children: _jsx("tr", { children: _.map(props.options, (option, index) => {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
-
return _jsx("th", { style: (_a = option.column) === null || _a === void 0 ? void 0 : _a.style, children: _jsx("div", { className: `iz-table-content ${((_b = option.column) === null || _b === void 0 ? void 0 : _b.action)
|
|
77
|
-
? `iz-table-action ${((_d = (_c = option.column) === null || _c === void 0 ? void 0 : _c.action) === null || _d === void 0 ? void 0 : _d.position)
|
|
78
|
-
? (_f = (_e = option.column) === null || _e === void 0 ? void 0 : _e.action) === null || _f === void 0 ? void 0 : _f.position
|
|
79
|
-
: ""}`
|
|
80
|
-
: ""}`, children: !!((_g = option.column) === null || _g === void 0 ? void 0 : _g.action)
|
|
81
|
-
? renderButton(option.column.action)
|
|
82
|
-
: _.isString(((_h = option.column) === null || _h === void 0 ? void 0 : _h.name) || option.column) ? ((_j = option.column) === null || _j === void 0 ? void 0 : _j.name) || option.column : "" }) }, index);
|
|
83
|
-
}) }) }), _jsx("tbody", { children: loading
|
|
84
|
-
? _.map(((_c = props.loading) === null || _c === void 0 ? void 0 : _c.items) || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], (data, key) => _jsx("tr", { children: _.map(props.options, (data, index) => {
|
|
85
|
-
var _a;
|
|
86
|
-
return (_jsx("td", { children: _jsx(LoadingBar, { height: "2.5rem", borderRadius: index === 0
|
|
87
|
-
? "5px 0 0 5px"
|
|
88
|
-
: ((_a = props.options) === null || _a === void 0 ? void 0 : _a.length) - 1 === index
|
|
89
|
-
? "0 5px 5px 0"
|
|
90
|
-
: "0", margin: key === 0 ? "1.5rem 0 0" : ".5rem 0 0" }) }, index));
|
|
91
|
-
}) }, key))
|
|
92
|
-
: _.map(props.content, (data, key) => _jsx("tr", { children: _.map(props.options, (option, index) => (_jsx("td", { onClick: () => index < 2 ? onShowLine(key) : null, children: renderRowContainer(data, option) }, index))) }, key)) })] }) }), !((_d = props.content) === null || _d === void 0 ? void 0 : _d.length) && !props.loading && (_jsxs("div", { className: "iz-table-not-found", children: [_jsx("p", { children: ((_e = props.notFound) === null || _e === void 0 ? void 0 : _e.title) || "Nenhuma campanha encontrado" }), _jsx("p", { children: ((_f = props.notFound) === null || _f === void 0 ? void 0 : _f.message) || "Envie uma campanha de marketing para aparecer algum registro" })] })), !!props.paginate && _jsx(Paginate, { ...props.paginate })] }));
|
|
93
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Content } from "./styles";
|
|
4
|
-
import { Container } from "../styles";
|
|
5
|
-
import { Component } from "../../..";
|
|
6
|
-
import { useModal } from "../../../../contexts";
|
|
7
|
-
import _ from "lodash";
|
|
8
|
-
import actionConfig from "./actions";
|
|
9
|
-
export default function Modal(props) {
|
|
10
|
-
const modal = useModal();
|
|
11
|
-
const content = _.omit(props.content, ["actions"]);
|
|
12
|
-
const actions = Object.values(_.pick(props.content, ["actions"]))[0];
|
|
13
|
-
const onClose = () => {
|
|
14
|
-
modal.setProps("table", { toggle: false });
|
|
15
|
-
};
|
|
16
|
-
return (_jsx(Component, { content: [{
|
|
17
|
-
type: "Modal",
|
|
18
|
-
props: {
|
|
19
|
-
toggle: props.toggle,
|
|
20
|
-
onClose,
|
|
21
|
-
children: (_jsx(Container, { children: _jsxs(Content, { children: [_jsx("div", { className: "iz-table-modal-title", children: "Conte\u00FAdo" }), _jsx("div", { className: "iz-table-modal-content", children: _jsx("ul", { children: _.map(content, (value, key) => _jsxs("li", { children: [!!key && _jsx("div", { className: "iz-table-modal-column", children: key }), _jsx("div", { className: "iz-table-modal-row", children: value })] }, key)) }) }), _jsx("div", { className: "iz-table-modal-actions", children: _jsx(Component, { content: _.concat(_.map(actions, (data) => ({
|
|
22
|
-
type: "Button",
|
|
23
|
-
props: {
|
|
24
|
-
...actionConfig[data.icon] || {},
|
|
25
|
-
onClick: data.function
|
|
26
|
-
}
|
|
27
|
-
})), {
|
|
28
|
-
type: "Button",
|
|
29
|
-
props: {
|
|
30
|
-
label: "fechar",
|
|
31
|
-
outline: true,
|
|
32
|
-
onClick: onClose
|
|
33
|
-
}
|
|
34
|
-
}) }) })] }) }))
|
|
35
|
-
}
|
|
36
|
-
}] }));
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
export const Content = styled.div `
|
|
4
|
-
padding: 1.5rem;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 1.5rem;
|
|
8
|
-
|
|
9
|
-
.iz-table-modal-title {
|
|
10
|
-
font-size: 1.2rem;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
width: 100%;
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
color: ${({ theme }) => theme.t6};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.iz-table-modal-content {
|
|
20
|
-
ul {
|
|
21
|
-
li {
|
|
22
|
-
border-bottom: solid 1px ${({ theme }) => theme.t05};
|
|
23
|
-
padding: .8rem 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
gap: 1rem;
|
|
28
|
-
font-size: .8rem;
|
|
29
|
-
color: ${({ theme }) => theme.t6};
|
|
30
|
-
|
|
31
|
-
&:last-child {
|
|
32
|
-
border-bottom: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.iz-table-modal-column {
|
|
36
|
-
background: ${({ theme }) => theme.t05};
|
|
37
|
-
padding: .5rem .8rem;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
border-radius: 5px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.iz-table-modal-row {
|
|
43
|
-
text-align: right;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.iz-table-modal-actions {
|
|
50
|
-
margin-top: 1rem;
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Container } from "./styles";
|
|
4
|
-
import _ from "lodash";
|
|
5
|
-
export function Paginate(props) {
|
|
6
|
-
const pages = () => {
|
|
7
|
-
const offset = Number(props.page.value) - 4;
|
|
8
|
-
let page = offset > 0 ? offset + 1 : 1;
|
|
9
|
-
let pages = [];
|
|
10
|
-
while (Number(props.total) >= page) {
|
|
11
|
-
pages.push(page);
|
|
12
|
-
page++;
|
|
13
|
-
}
|
|
14
|
-
pages = _.slice(pages, 0, 5);
|
|
15
|
-
if ((Number(props.page.value) + 1) > 5)
|
|
16
|
-
pages = _.concat(["1.."], pages);
|
|
17
|
-
if (Number(props.total) > 6 && (Number(props.page.value) + 1) < Number(props.total))
|
|
18
|
-
return _.concat(pages, `..${props.total}`);
|
|
19
|
-
return pages;
|
|
20
|
-
};
|
|
21
|
-
return Number(props.total) > 1 && (_jsxs(Container, { children: [_jsx("div", { className: "paginate back", onClick: () => props.page.set
|
|
22
|
-
? props.page.set(props.page.value
|
|
23
|
-
? props.page.value - 1
|
|
24
|
-
: props.page.value)
|
|
25
|
-
: null, children: _jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-left" }) }), _.map(pages(), (page, index) => _jsx("div", { className: "paginate page", "data-current": String(props.page.value === (Number(_.replace(page, /\D/g, "")) - 1)), onClick: () => props.page.set ? props.page.set(Number(_.replace(page, /\D/g, "")) - 1) : null, children: page }, index)), _jsx("div", { className: "paginate next", onClick: () => props.page.set
|
|
26
|
-
? props.page.set(props.page.value !== (props.total - 1)
|
|
27
|
-
? props.page.value + 1
|
|
28
|
-
: props.page.value)
|
|
29
|
-
: null, children: _jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-right" }) })] }));
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Container: any;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
export const Container = styled.div `
|
|
4
|
-
width: 100%;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
margin-top: 1.5rem;
|
|
9
|
-
|
|
10
|
-
.paginate {
|
|
11
|
-
font-size: .8rem;
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
height: 1.5rem;
|
|
14
|
-
padding: 0 .6rem;
|
|
15
|
-
border-radius: 1rem;
|
|
16
|
-
transition: ease .3s;
|
|
17
|
-
color: ${({ theme }) => theme.t6};
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
|
|
23
|
-
&[data-current="true"] {
|
|
24
|
-
background: ${({ theme }) => theme.tertiary};
|
|
25
|
-
color: ${({ theme }) => theme.secondary};
|
|
26
|
-
|
|
27
|
-
&:hover {
|
|
28
|
-
background: ${({ theme }) => theme.tertiary};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:hover {
|
|
33
|
-
background: ${({ theme }) => theme.t05};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
interface IProps {
|
|
2
|
-
notFound?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IProps>> & string;
|
|
5
|
-
export {};
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
export const Container = styled.div `
|
|
4
|
-
.iz-table-container {
|
|
5
|
-
overflow-x: auto;
|
|
6
|
-
|
|
7
|
-
&::-webkit-scrollbar {
|
|
8
|
-
width: 0;
|
|
9
|
-
height: ${(props) => (props.notFound ? "0px" : "5px")};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&::-webkit-scrollbar-track {
|
|
13
|
-
background: transparent;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&::-webkit-scrollbar-thumb {
|
|
17
|
-
background-color: rgb(255, 255, 255, 0.1);
|
|
18
|
-
border-radius: 5px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
table {
|
|
22
|
-
font-size: .8rem;
|
|
23
|
-
border: 0;
|
|
24
|
-
color: ${({ theme }) => theme.t6};
|
|
25
|
-
overflow-x: ${(props) => (props.notFound ? "auto" : "hidden")};
|
|
26
|
-
width: 100%;
|
|
27
|
-
border-spacing: 0;
|
|
28
|
-
|
|
29
|
-
.iz-table-content {
|
|
30
|
-
background: ${({ theme }) => theme.t05};
|
|
31
|
-
height: 2.7rem;
|
|
32
|
-
padding: 0.8rem 1.3rem;
|
|
33
|
-
margin-top: 0.5rem;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
position: relative;
|
|
38
|
-
transition: ease 0.3s;
|
|
39
|
-
|
|
40
|
-
&.iz-table-identifier {
|
|
41
|
-
padding: .8rem .5rem !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.iz-table-action {
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: flex-end;
|
|
47
|
-
padding: .8rem .5rem !important;
|
|
48
|
-
position: relative;
|
|
49
|
-
|
|
50
|
-
&.left {
|
|
51
|
-
justify-content: flex-start;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&.center {
|
|
55
|
-
justify-content: center;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.iz-table-actions {
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
justify-content: flex-end;
|
|
62
|
-
gap: .5rem;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.iz-table-button {
|
|
66
|
-
min-width: 1.8rem;
|
|
67
|
-
height: 1.8rem;
|
|
68
|
-
border-radius: 5px;
|
|
69
|
-
border: 1px solid ${({ theme }) => theme.t05};
|
|
70
|
-
background: ${({ theme }) => theme.t05};
|
|
71
|
-
color: ${({ theme }) => theme.t6};
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
transition: ease 0.3s, width 1s, position 0s;
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
gap: .5rem;
|
|
78
|
-
font-weight: 500;
|
|
79
|
-
text-transform: lowercase;
|
|
80
|
-
padding: 0 .5rem;
|
|
81
|
-
position: relative;
|
|
82
|
-
|
|
83
|
-
&:disabled {
|
|
84
|
-
pointer-events: none;
|
|
85
|
-
opacity: .6;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:hover {
|
|
89
|
-
opacity: .9;
|
|
90
|
-
|
|
91
|
-
&.negative {
|
|
92
|
-
color: ${({ theme }) => theme.primary};
|
|
93
|
-
background: ${({ theme }) => theme.negative};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
thead {
|
|
101
|
-
tr {
|
|
102
|
-
th {
|
|
103
|
-
border: none;
|
|
104
|
-
padding: 0;
|
|
105
|
-
text-transform: uppercase;
|
|
106
|
-
font-weight: 500;
|
|
107
|
-
letter-spacing: 2px;
|
|
108
|
-
position: relative;
|
|
109
|
-
height: 2.5rem;
|
|
110
|
-
|
|
111
|
-
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
112
|
-
.iz-table-content {
|
|
113
|
-
font-size: .7rem;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
118
|
-
display: none;
|
|
119
|
-
|
|
120
|
-
&:nth-child(1), &:nth-child(2), &:last-child {
|
|
121
|
-
display: table-cell;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&:first-child {
|
|
126
|
-
.iz-table-content {
|
|
127
|
-
border-top-left-radius: 5px;
|
|
128
|
-
border-bottom-left-radius: 5px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&:last-child {
|
|
133
|
-
.iz-table-content {
|
|
134
|
-
border-top-right-radius: 5px;
|
|
135
|
-
border-bottom-right-radius: 5px;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
tbody {
|
|
143
|
-
tr {
|
|
144
|
-
&:hover {
|
|
145
|
-
td {
|
|
146
|
-
.iz-table-content {
|
|
147
|
-
background: ${({ theme }) => theme.tertiary};
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
td {
|
|
153
|
-
border: none;
|
|
154
|
-
padding: 0;
|
|
155
|
-
font-weight: 400;
|
|
156
|
-
position: relative;
|
|
157
|
-
|
|
158
|
-
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
159
|
-
display: none;
|
|
160
|
-
|
|
161
|
-
&:nth-child(1), &:nth-child(2), &:last-child {
|
|
162
|
-
display: table-cell;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&:first-child {
|
|
167
|
-
.iz-table-content {
|
|
168
|
-
border-top-left-radius: 5px;
|
|
169
|
-
border-bottom-left-radius: 5px;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&:last-child {
|
|
174
|
-
.iz-table-content {
|
|
175
|
-
border-top-right-radius: 5px;
|
|
176
|
-
border-bottom-right-radius: 5px;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.iz-table-content-elipse {
|
|
181
|
-
position: absolute;
|
|
182
|
-
left: 0;
|
|
183
|
-
right: 0;
|
|
184
|
-
white-space: nowrap;
|
|
185
|
-
overflow: hidden;
|
|
186
|
-
text-overflow: ellipsis;
|
|
187
|
-
padding: 0.8rem 1.3rem;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
&:first-child {
|
|
192
|
-
td {
|
|
193
|
-
.iz-table-content {
|
|
194
|
-
margin-top: 1.5rem;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.iz-table-icon {
|
|
204
|
-
width: 1.8rem;
|
|
205
|
-
height: 1.8rem;
|
|
206
|
-
background: ${({ theme }) => theme.t08};
|
|
207
|
-
border-radius: 5px;
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
justify-content: center;
|
|
211
|
-
overflow: hidden;
|
|
212
|
-
|
|
213
|
-
img {
|
|
214
|
-
width: 100%;
|
|
215
|
-
height: 100%;
|
|
216
|
-
object-fit: cover;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
i {
|
|
220
|
-
font-size: .9rem;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.iz-table-not-found {
|
|
225
|
-
border-radius: 5px;
|
|
226
|
-
background: ${({ theme }) => theme.t05};
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: column;
|
|
229
|
-
align-items: center;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
margin: 1.5rem 0;
|
|
232
|
-
padding: 2.5rem;
|
|
233
|
-
width: 100%;
|
|
234
|
-
|
|
235
|
-
p {
|
|
236
|
-
color: ${({ theme }) => theme.t6};
|
|
237
|
-
text-align: center;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
p:first-child {
|
|
241
|
-
font-size: 1.3rem;
|
|
242
|
-
font-weight: 600;
|
|
243
|
-
margin-top: 0;
|
|
244
|
-
margin-bottom: 0.5rem;
|
|
245
|
-
|
|
246
|
-
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
247
|
-
font-size: 1rem;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
p:last-child {
|
|
252
|
-
font-size: 0.8rem;
|
|
253
|
-
max-width: 50rem;
|
|
254
|
-
margin-top: 0;
|
|
255
|
-
margin-bottom: 0;
|
|
256
|
-
|
|
257
|
-
@media (max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
258
|
-
font-size: 0.7rem;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
`;
|