@gustavo-valsechi/client 1.3.28 → 1.3.30
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/index.d.ts +3 -10
- package/dist/components/index.js +13 -3070
- package/dist/components/index.mjs +11 -3082
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.js +54 -0
- package/dist/components/styles.mjs +19 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.js +63 -0
- package/dist/components/types/avatar/index.mjs +29 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.js +93 -0
- package/dist/components/types/avatar/styles.mjs +59 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.js +54 -0
- package/dist/components/types/badge/index.mjs +20 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.js +71 -0
- package/dist/components/types/badge/styles.mjs +37 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.js +44 -0
- package/dist/components/types/block/index.mjs +20 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.js +65 -0
- package/dist/components/types/block/styles.mjs +30 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.js +80 -0
- package/dist/components/types/chart/index.mjs +46 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.js +42 -0
- package/dist/components/types/chart/styles.mjs +8 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.js +41 -0
- package/dist/components/types/credit-card/assets/index.mjs +21 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.js +67 -0
- package/dist/components/types/credit-card/card/index.mjs +37 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.js +170 -0
- package/dist/components/types/credit-card/card/styles.mjs +136 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.js +52 -0
- package/dist/components/types/credit-card/functions/index.mjs +22 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.js +75 -0
- package/dist/components/types/credit-card/functions/styles.mjs +41 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.js +70 -0
- package/dist/components/types/credit-card/index.mjs +36 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.js +72 -0
- package/dist/components/types/credit-card/styles.mjs +38 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.js +58 -0
- package/dist/components/types/credit-card/tools/index.mjs +23 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.js +111 -0
- package/dist/components/types/form/index.mjs +75 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.js +53 -0
- package/dist/components/types/form/styles.mjs +19 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.js +58 -0
- package/dist/components/types/form/types/button/index.mjs +24 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.js +38 -0
- package/dist/components/types/form/types/button/loading/index.mjs +14 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.js +126 -0
- package/dist/components/types/form/types/button/loading/styles.mjs +92 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.js +79 -0
- package/dist/components/types/form/types/button/styles.mjs +45 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.js +72 -0
- package/dist/components/types/form/types/datetime/index.mjs +38 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.js +78 -0
- package/dist/components/types/form/types/datetime/styles.mjs +44 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.js +71 -0
- package/dist/components/types/form/types/file/index.mjs +47 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.js +65 -0
- package/dist/components/types/form/types/file/styles.mjs +31 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.js +35 -0
- package/dist/components/types/form/types/index.mjs +8 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.js +84 -0
- package/dist/components/types/form/types/input/index.mjs +50 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.js +84 -0
- package/dist/components/types/form/types/input/styles.mjs +50 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.js +34 -0
- package/dist/components/types/form/types/label/index.mjs +10 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.js +45 -0
- package/dist/components/types/form/types/label/styles.mjs +11 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.js +90 -0
- package/dist/components/types/form/types/select/index.mjs +56 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.js +90 -0
- package/dist/components/types/form/types/select/styles.mjs +56 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.js +72 -0
- package/dist/components/types/form/types/textarea/index.mjs +38 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.js +77 -0
- package/dist/components/types/form/types/textarea/styles.mjs +43 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/types/index.js +43 -0
- package/dist/components/types/index.mjs +12 -0
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.js +35 -0
- package/dist/components/types/loading/app/index.mjs +11 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.js +125 -0
- package/dist/components/types/loading/app/styles.mjs +91 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.js +34 -0
- package/dist/components/types/loading/bar/index.mjs +10 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.js +59 -0
- package/dist/components/types/loading/bar/styles.mjs +25 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.js +25 -0
- package/dist/components/types/loading/index.mjs +3 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.js +37 -0
- package/dist/components/types/logo/index.mjs +13 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.js +57 -0
- package/dist/components/types/logo/styles.mjs +23 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.js +36 -0
- package/dist/components/types/lottie/animations/index.mjs +6 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.js +72 -0
- package/dist/components/types/lottie/index.mjs +38 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.js +60 -0
- package/dist/components/types/lottie/styles.mjs +26 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.js +66 -0
- package/dist/components/types/modal/index.mjs +32 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.js +167 -0
- package/dist/components/types/modal/styles.mjs +133 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/components/types/table/index.js +171 -0
- package/dist/components/types/table/index.mjs +135 -0
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.js +30 -0
- package/dist/components/types/table/modal/actions.mjs +10 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.js +91 -0
- package/dist/components/types/table/modal/index.mjs +61 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.js +90 -0
- package/dist/components/types/table/modal/styles.mjs +56 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.js +92 -0
- package/dist/components/types/table/paginate/index.mjs +58 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.js +74 -0
- package/dist/components/types/table/paginate/styles.mjs +40 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.js +300 -0
- package/dist/components/types/table/styles.mjs +266 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.js +31 -0
- package/dist/contexts/icon/assets/brands/index.mjs +11 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.js +42 -0
- package/dist/contexts/icon/assets/index.mjs +12 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.js +31 -0
- package/dist/contexts/icon/assets/regular/index.mjs +11 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.js +31 -0
- package/dist/contexts/icon/assets/solid/index.mjs +11 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.js +107 -0
- package/dist/contexts/icon/index.mjs +72 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.js +42 -0
- package/dist/contexts/icon/styles.mjs +8 -0
- package/dist/contexts/index.d.ts +4 -20
- package/dist/contexts/index.js +9 -504
- package/dist/contexts/index.mjs +4 -486
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.js +92 -0
- package/dist/contexts/modal/index.mjs +57 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.js +42 -0
- package/dist/contexts/modal/styles.mjs +8 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.js +104 -0
- package/dist/contexts/theme/content.mjs +79 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.js +68 -0
- package/dist/contexts/theme/index.mjs +43 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.js +116 -0
- package/dist/contexts/theme/styles.mjs +82 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.js +107 -0
- package/dist/contexts/tooltip/index.mjs +72 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.js +78 -0
- package/dist/contexts/tooltip/styles.mjs +44 -0
- package/dist/index.d.ts +4 -17
- package/dist/index.js +8 -3325
- package/dist/index.mjs +4 -3312
- package/dist/interfaces/components/avatar/index.d.ts +6 -0
- package/dist/interfaces/components/avatar/index.js +17 -0
- package/dist/interfaces/components/avatar/index.mjs +1 -0
- package/dist/interfaces/components/badge/index.d.ts +3 -0
- package/dist/interfaces/components/badge/index.js +17 -0
- package/dist/interfaces/components/badge/index.mjs +1 -0
- package/dist/interfaces/components/block/index.d.ts +16 -0
- package/dist/interfaces/components/block/index.js +17 -0
- package/dist/interfaces/components/block/index.mjs +1 -0
- package/dist/interfaces/components/chart/index.d.ts +9 -0
- package/dist/interfaces/components/chart/index.js +17 -0
- package/dist/interfaces/components/chart/index.mjs +1 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -0
- package/dist/interfaces/components/credit-card/index.js +17 -0
- package/dist/interfaces/components/credit-card/index.mjs +1 -0
- package/dist/interfaces/components/form/button/index.d.ts +7 -0
- package/dist/interfaces/components/form/button/index.js +17 -0
- package/dist/interfaces/components/form/button/index.mjs +1 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
- package/dist/interfaces/components/form/datetime/index.js +17 -0
- package/dist/interfaces/components/form/datetime/index.mjs +1 -0
- package/dist/interfaces/components/form/file/index.d.ts +14 -0
- package/dist/interfaces/components/form/file/index.js +17 -0
- package/dist/interfaces/components/form/file/index.mjs +1 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.js +35 -0
- package/dist/interfaces/components/form/index.mjs +8 -0
- package/dist/interfaces/components/form/input/index.d.ts +17 -0
- package/dist/interfaces/components/form/input/index.js +17 -0
- package/dist/interfaces/components/form/input/index.mjs +1 -0
- package/dist/interfaces/components/form/label/index.d.ts +5 -0
- package/dist/interfaces/components/form/label/index.js +17 -0
- package/dist/interfaces/components/form/label/index.mjs +1 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -0
- package/dist/interfaces/components/form/select/index.js +17 -0
- package/dist/interfaces/components/form/select/index.mjs +1 -0
- package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
- package/dist/interfaces/components/form/textarea/index.js +17 -0
- package/dist/interfaces/components/form/textarea/index.mjs +1 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.js +43 -0
- package/dist/interfaces/components/index.mjs +12 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -0
- package/dist/interfaces/components/loading/app/index.js +17 -0
- package/dist/interfaces/components/loading/app/index.mjs +1 -0
- package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
- package/dist/interfaces/components/loading/bar/index.js +17 -0
- package/dist/interfaces/components/loading/bar/index.mjs +1 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.js +25 -0
- package/dist/interfaces/components/loading/index.mjs +3 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -0
- package/dist/interfaces/components/logo/index.js +17 -0
- package/dist/interfaces/components/logo/index.mjs +1 -0
- package/dist/interfaces/components/lottie/index.d.ts +12 -0
- package/dist/interfaces/components/lottie/index.js +17 -0
- package/dist/interfaces/components/lottie/index.mjs +1 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -0
- package/dist/interfaces/components/modal/index.js +17 -0
- package/dist/interfaces/components/modal/index.mjs +1 -0
- package/dist/interfaces/components/table/index.d.ts +46 -0
- package/dist/interfaces/components/table/index.js +23 -0
- package/dist/interfaces/components/table/index.mjs +2 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
- package/dist/interfaces/components/table/paginate/index.js +17 -0
- package/dist/interfaces/components/table/paginate/index.mjs +1 -0
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/dist/interfaces/contexts/icon/index.js +17 -0
- package/dist/interfaces/contexts/icon/index.mjs +1 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.js +29 -0
- package/dist/interfaces/contexts/index.mjs +5 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -0
- package/dist/interfaces/contexts/modal/index.js +18 -0
- package/dist/interfaces/contexts/modal/index.mjs +2 -0
- package/dist/interfaces/contexts/theme/index.d.ts +42 -0
- package/dist/interfaces/contexts/theme/index.js +17 -0
- package/dist/interfaces/contexts/theme/index.mjs +1 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.js +17 -0
- package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/interfaces/index.js +8 -2
- package/dist/interfaces/index.mjs +2 -0
- package/dist/styled.d.ts +6 -0
- package/dist/tsup.config.d.ts +2 -0
- package/package.json +5 -5
- package/dist/components/index.d.mts +0 -10
- package/dist/contexts/index.d.mts +0 -20
- package/dist/index-BhaGW0O1.d.ts +0 -601
- package/dist/index-BxA8LyyD.d.mts +0 -68
- package/dist/index-DDi0w5pw.d.mts +0 -601
- package/dist/index-DT7VKE7H.d.ts +0 -68
- package/dist/index-Da-DtPS-.d.mts +0 -29
- package/dist/index-Da-DtPS-.d.ts +0 -29
- package/dist/index.d.mts +0 -17
- package/dist/interfaces/index.d.mts +0 -12
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var modal_exports = {};
|
|
32
|
+
__export(modal_exports, {
|
|
33
|
+
Modal: () => Modal
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(modal_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_styles = require("./styles");
|
|
38
|
+
var import__ = require("../..");
|
|
39
|
+
var import_lodash = __toESM(require("lodash"));
|
|
40
|
+
function Modal(props) {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { ...props, position: props.position || "center", children: [
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-modal-back", onClick: props.onClose }),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-container", children: [
|
|
45
|
+
(!!props.title || !!props.header) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-header", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-title", children: [
|
|
47
|
+
((_a = props.header) == null ? void 0 : _a.icon) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: (_b = props.header) == null ? void 0 : _b.icon }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: props.title || ((_c = props.header) == null ? void 0 : _c.title) })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-content", children: [
|
|
53
|
+
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
54
|
+
props.children
|
|
55
|
+
] }),
|
|
56
|
+
props.buttons && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-modal-buttons", children: import_lodash.default.map(
|
|
57
|
+
props.buttons,
|
|
58
|
+
(button, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Button, { ...button }, index)
|
|
59
|
+
) })
|
|
60
|
+
] })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
Modal
|
|
66
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Container } from "./styles";
|
|
5
|
+
import { Button } from "../..";
|
|
6
|
+
import _ from "lodash";
|
|
7
|
+
function Modal(props) {
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
return /* @__PURE__ */ jsxs(Container, { ...props, position: props.position || "center", children: [
|
|
10
|
+
/* @__PURE__ */ jsx("div", { className: "iz-modal-back", onClick: props.onClose }),
|
|
11
|
+
/* @__PURE__ */ jsxs("div", { className: "iz-modal-container", children: [
|
|
12
|
+
(!!props.title || !!props.header) && /* @__PURE__ */ jsxs("div", { className: "iz-modal-header", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "iz-modal-title", children: [
|
|
14
|
+
((_a = props.header) == null ? void 0 : _a.icon) && /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: (_b = props.header) == null ? void 0 : _b.icon }),
|
|
15
|
+
/* @__PURE__ */ jsx("span", { children: props.title || ((_c = props.header) == null ? void 0 : _c.title) })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "iz-modal-content", children: [
|
|
20
|
+
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ jsx("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
21
|
+
props.children
|
|
22
|
+
] }),
|
|
23
|
+
props.buttons && /* @__PURE__ */ jsx("div", { className: "iz-modal-buttons", children: _.map(
|
|
24
|
+
props.buttons,
|
|
25
|
+
(button, index) => /* @__PURE__ */ jsx(Button, { ...button }, index)
|
|
26
|
+
) })
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
Modal
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var styles_exports = {};
|
|
32
|
+
__export(styles_exports, {
|
|
33
|
+
Container: () => Container
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(styles_exports);
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
const Container = import_styled_components.default.div`
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
top: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
display: flex !important;
|
|
43
|
+
position: fixed;
|
|
44
|
+
z-index: ${(props) => props.toggle ? "9" : "-1"};
|
|
45
|
+
flex-direction: ${(props) => props.position === "left" ? "row-reverse" : "row"} !important;
|
|
46
|
+
transform: ${(props) => props.toggle ? "translateX(0%)" : "translateX(100%)"};
|
|
47
|
+
transition: ${(props) => props.toggle ? ".0s ease .0s" : ".3s ease .3s"};
|
|
48
|
+
|
|
49
|
+
.iz-modal-back {
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
background: rgb(0, 0, 0, 0.3);
|
|
53
|
+
opacity: ${(props) => props.toggle ? "1" : "0"};
|
|
54
|
+
transition: ease 0.3s;
|
|
55
|
+
position: absolute;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.iz-modal-container {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
height: ${(props) => props.position !== "center" ? "100%" : void 0};
|
|
62
|
+
width: ${(props) => props.position !== "center" ? "18rem" : void 0};
|
|
63
|
+
border-radius: ${(props) => props.position === "center" ? "10px" : void 0};
|
|
64
|
+
max-height: ${(props) => props.position === "center" ? "95%" : "100%"};
|
|
65
|
+
max-width: ${(props) => props.position === "center" ? "95%" : "100%"};
|
|
66
|
+
background: ${({ theme }) => theme.primary};
|
|
67
|
+
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(50%)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(43%)"};
|
|
68
|
+
opacity: ${(props) => props.position === "center" && !props.toggle ? "0" : "1"};
|
|
69
|
+
transition: ease 0.3s;
|
|
70
|
+
position: absolute;
|
|
71
|
+
|
|
72
|
+
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 50%;"}
|
|
73
|
+
|
|
74
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
75
|
+
border-radius: ${(props) => props.position === "center" ? "10px 10px 0 0" : void 0};
|
|
76
|
+
width: ${(props) => props.position !== "center" ? "18rem" : "100%"};
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
padding-bottom: 3rem !important;
|
|
79
|
+
|
|
80
|
+
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
81
|
+
|
|
82
|
+
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 0;"}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.iz-modal-header {
|
|
86
|
+
padding: 1.5rem 2rem;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
border-bottom: 1px solid rgb(0, 0, 0, 0.2);
|
|
91
|
+
|
|
92
|
+
.iz-modal-title {
|
|
93
|
+
color: ${({ theme }) => theme.t6};
|
|
94
|
+
font-size: 1rem;
|
|
95
|
+
font-weight: 500;
|
|
96
|
+
|
|
97
|
+
i {
|
|
98
|
+
margin-right: .5rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
span {
|
|
102
|
+
word-break: break-word;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.fa-xmark {
|
|
107
|
+
color: ${({ theme }) => theme.t6};
|
|
108
|
+
margin-left: .5rem;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
color: ${({ theme }) => theme.t8};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.iz-modal-content {
|
|
118
|
+
overflow-x: hidden;
|
|
119
|
+
overflow-y: overlay;
|
|
120
|
+
position: relative;
|
|
121
|
+
height: ${(props) => props.position === "center" ? "initial" : "100%"};
|
|
122
|
+
|
|
123
|
+
.iz-modal-close {
|
|
124
|
+
position: absolute;
|
|
125
|
+
color: ${(props) => props.light ? "rgb(255, 255, 255, 0.6)" : "rgb(0, 0, 0, 0.6)"};
|
|
126
|
+
top: ${(props) => props.position === "center" ? "1rem" : "1.5rem"};
|
|
127
|
+
right: ${(props) => props.position === "center" ? "1rem" : "1.5rem"};
|
|
128
|
+
width: 1rem;
|
|
129
|
+
height: 1rem;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
z-index: 9;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
|
|
136
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:hover {
|
|
141
|
+
color: ${(props) => props.light ? "rgb(255, 255, 255, 1)" : "rgb(0, 0, 0, 1)"};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.iz-modal-buttons {
|
|
147
|
+
padding: 1rem 2rem;
|
|
148
|
+
|
|
149
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
150
|
+
padding: 1rem 2rem 2rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
button {
|
|
154
|
+
width: 100%;
|
|
155
|
+
margin-bottom: .5rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
button:last-child {
|
|
159
|
+
margin-bottom: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
165
|
+
0 && (module.exports = {
|
|
166
|
+
Container
|
|
167
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
top: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
display: flex !important;
|
|
10
|
+
position: fixed;
|
|
11
|
+
z-index: ${(props) => props.toggle ? "9" : "-1"};
|
|
12
|
+
flex-direction: ${(props) => props.position === "left" ? "row-reverse" : "row"} !important;
|
|
13
|
+
transform: ${(props) => props.toggle ? "translateX(0%)" : "translateX(100%)"};
|
|
14
|
+
transition: ${(props) => props.toggle ? ".0s ease .0s" : ".3s ease .3s"};
|
|
15
|
+
|
|
16
|
+
.iz-modal-back {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
background: rgb(0, 0, 0, 0.3);
|
|
20
|
+
opacity: ${(props) => props.toggle ? "1" : "0"};
|
|
21
|
+
transition: ease 0.3s;
|
|
22
|
+
position: absolute;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.iz-modal-container {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
height: ${(props) => props.position !== "center" ? "100%" : void 0};
|
|
29
|
+
width: ${(props) => props.position !== "center" ? "18rem" : void 0};
|
|
30
|
+
border-radius: ${(props) => props.position === "center" ? "10px" : void 0};
|
|
31
|
+
max-height: ${(props) => props.position === "center" ? "95%" : "100%"};
|
|
32
|
+
max-width: ${(props) => props.position === "center" ? "95%" : "100%"};
|
|
33
|
+
background: ${({ theme }) => theme.primary};
|
|
34
|
+
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(50%)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(43%)"};
|
|
35
|
+
opacity: ${(props) => props.position === "center" && !props.toggle ? "0" : "1"};
|
|
36
|
+
transition: ease 0.3s;
|
|
37
|
+
position: absolute;
|
|
38
|
+
|
|
39
|
+
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 50%;"}
|
|
40
|
+
|
|
41
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
42
|
+
border-radius: ${(props) => props.position === "center" ? "10px 10px 0 0" : void 0};
|
|
43
|
+
width: ${(props) => props.position !== "center" ? "18rem" : "100%"};
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
padding-bottom: 3rem !important;
|
|
46
|
+
|
|
47
|
+
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
48
|
+
|
|
49
|
+
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 0;"}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.iz-modal-header {
|
|
53
|
+
padding: 1.5rem 2rem;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
border-bottom: 1px solid rgb(0, 0, 0, 0.2);
|
|
58
|
+
|
|
59
|
+
.iz-modal-title {
|
|
60
|
+
color: ${({ theme }) => theme.t6};
|
|
61
|
+
font-size: 1rem;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
|
|
64
|
+
i {
|
|
65
|
+
margin-right: .5rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
span {
|
|
69
|
+
word-break: break-word;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.fa-xmark {
|
|
74
|
+
color: ${({ theme }) => theme.t6};
|
|
75
|
+
margin-left: .5rem;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
|
|
78
|
+
&:hover {
|
|
79
|
+
color: ${({ theme }) => theme.t8};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.iz-modal-content {
|
|
85
|
+
overflow-x: hidden;
|
|
86
|
+
overflow-y: overlay;
|
|
87
|
+
position: relative;
|
|
88
|
+
height: ${(props) => props.position === "center" ? "initial" : "100%"};
|
|
89
|
+
|
|
90
|
+
.iz-modal-close {
|
|
91
|
+
position: absolute;
|
|
92
|
+
color: ${(props) => props.light ? "rgb(255, 255, 255, 0.6)" : "rgb(0, 0, 0, 0.6)"};
|
|
93
|
+
top: ${(props) => props.position === "center" ? "1rem" : "1.5rem"};
|
|
94
|
+
right: ${(props) => props.position === "center" ? "1rem" : "1.5rem"};
|
|
95
|
+
width: 1rem;
|
|
96
|
+
height: 1rem;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
z-index: 9;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
|
|
103
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:hover {
|
|
108
|
+
color: ${(props) => props.light ? "rgb(255, 255, 255, 1)" : "rgb(0, 0, 0, 1)"};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.iz-modal-buttons {
|
|
114
|
+
padding: 1rem 2rem;
|
|
115
|
+
|
|
116
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
117
|
+
padding: 1rem 2rem 2rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
button {
|
|
121
|
+
width: 100%;
|
|
122
|
+
margin-bottom: .5rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
button:last-child {
|
|
126
|
+
margin-bottom: 0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
export {
|
|
132
|
+
Container
|
|
133
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
var table_exports = {};
|
|
33
|
+
__export(table_exports, {
|
|
34
|
+
Table: () => Table
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(table_exports);
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
var import_react = require("react");
|
|
39
|
+
var import_styles = require("./styles");
|
|
40
|
+
var import_components = require("@components");
|
|
41
|
+
var import_paginate = require("./paginate");
|
|
42
|
+
var import_contexts = require("@contexts");
|
|
43
|
+
var import_lodash = __toESM(require("lodash"));
|
|
44
|
+
var import_modal = __toESM(require("./modal"));
|
|
45
|
+
__reExport(table_exports, require("./paginate"), module.exports);
|
|
46
|
+
function Table(props) {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f;
|
|
48
|
+
const theme = (0, import_contexts.useTheme)();
|
|
49
|
+
const modal = (0, import_contexts.useModal)();
|
|
50
|
+
const loading = ((_a = props.loading) == null ? void 0 : _a.is) || props.loading;
|
|
51
|
+
(0, import_react.useEffect)(() => {
|
|
52
|
+
modal.add({ component: import_modal.default, name: "table" });
|
|
53
|
+
return () => modal.remove("table");
|
|
54
|
+
}, []);
|
|
55
|
+
const onShowLine = (key) => {
|
|
56
|
+
if (window.innerWidth > Number(import_lodash.default.replace(theme.content.mobileMaxWidth, "px", ""))) return;
|
|
57
|
+
let content = {};
|
|
58
|
+
import_lodash.default.forEach(props.options, (data, index) => {
|
|
59
|
+
var _a2, _b2;
|
|
60
|
+
const column = ((_a2 = data.column) == null ? void 0 : _a2.name) || data.column;
|
|
61
|
+
const columnName = !import_lodash.default.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
|
|
62
|
+
content[columnName] = columnName === "actions" ? (_b2 = data.row) == null ? void 0 : _b2.actions : renderRowContainer(props.content[key], data);
|
|
63
|
+
});
|
|
64
|
+
modal.setProps("table", { toggle: true, content });
|
|
65
|
+
};
|
|
66
|
+
const renderRowContainer = (data, option) => {
|
|
67
|
+
var _a2, _b2, _c2, _d2;
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: `
|
|
72
|
+
iz-table-content
|
|
73
|
+
${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "iz-table-action" : ""}
|
|
74
|
+
${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "iz-table-identifier" : ""}
|
|
75
|
+
`,
|
|
76
|
+
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,
|
|
77
|
+
children: renderRowContent(data, option)
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
const renderRowContent = (data, option) => {
|
|
82
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
83
|
+
if (!!((_a2 = option.row) == null ? void 0 : _a2.actions)) {
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-table-actions", children: import_lodash.default.map(
|
|
85
|
+
(_b2 = option.row) == null ? void 0 : _b2.actions,
|
|
86
|
+
(action, index) => renderButton(action, data, index)
|
|
87
|
+
) });
|
|
88
|
+
}
|
|
89
|
+
if ((_c2 = option.row) == null ? void 0 : _c2.icon) {
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-table-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
+
"i",
|
|
92
|
+
{
|
|
93
|
+
"aria-hidden": true,
|
|
94
|
+
className: import_lodash.default.isFunction((_d2 = option.row) == null ? void 0 : _d2.icon) ? option.row.icon(data) || "fa-solid fa-circle-user" : ((_e2 = option.row) == null ? void 0 : _e2.icon) || "fa-solid fa-circle-user"
|
|
95
|
+
}
|
|
96
|
+
) });
|
|
97
|
+
}
|
|
98
|
+
return renderRowText(data, option);
|
|
99
|
+
};
|
|
100
|
+
const renderButton = (action, data, index) => {
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
className: `iz-table-button ${import_lodash.default.includes(action.icon, "trash") ? "negative" : ""}`,
|
|
105
|
+
onClick: () => action.function ? action.function(data) : null,
|
|
106
|
+
disabled: action.disabled,
|
|
107
|
+
"data-tooltip": action.tooltip,
|
|
108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" })
|
|
109
|
+
},
|
|
110
|
+
index
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
const renderRowText = (data, option) => {
|
|
114
|
+
const row = option.row || {};
|
|
115
|
+
const content = data[row.name] || data;
|
|
116
|
+
let body;
|
|
117
|
+
while (!body) {
|
|
118
|
+
if (import_lodash.default.isString(row)) body = data[row];
|
|
119
|
+
if (import_lodash.default.isString(content)) body = content;
|
|
120
|
+
if (import_lodash.default.isFunction(row.mask)) body = row.mask(content);
|
|
121
|
+
if (import_lodash.default.isFunction(row.custom)) body = row.custom(content);
|
|
122
|
+
body = body != null ? body : "---";
|
|
123
|
+
}
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: "iz-table-content-elipse",
|
|
128
|
+
title: import_lodash.default.isString(body) ? body : "",
|
|
129
|
+
children: body
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { notFound: !((_b = props.content) == null ? void 0 : _b.length) && !props.loading, children: [
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-table-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: import_lodash.default.map(
|
|
136
|
+
props.options,
|
|
137
|
+
(option, index) => {
|
|
138
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { style: (_a2 = option.column) == null ? void 0 : _a2.style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
className: `iz-table-content ${((_b2 = option.column) == null ? void 0 : _b2.action) ? `iz-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 : ""}` : ""}`,
|
|
143
|
+
children: !!((_g = option.column) == null ? void 0 : _g.action) ? renderButton(option.column.action) : import_lodash.default.isString(((_h = option.column) == null ? void 0 : _h.name) || option.column) ? ((_i = option.column) == null ? void 0 : _i.name) || option.column : ""
|
|
144
|
+
}
|
|
145
|
+
) }, index);
|
|
146
|
+
}
|
|
147
|
+
) }) }),
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: loading ? import_lodash.default.map(((_c = props.loading) == null ? void 0 : _c.items) || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], (data, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: import_lodash.default.map(props.options, (data2, index) => {
|
|
149
|
+
var _a2;
|
|
150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
151
|
+
import_components.LoadingBar,
|
|
152
|
+
{
|
|
153
|
+
height: "2.5rem",
|
|
154
|
+
borderRadius: index === 0 ? "5px 0 0 5px" : ((_a2 = props.options) == null ? void 0 : _a2.length) - 1 === index ? "0 5px 5px 0" : "0",
|
|
155
|
+
margin: key === 0 ? "1.5rem 0 0" : ".5rem 0 0"
|
|
156
|
+
}
|
|
157
|
+
) }, index);
|
|
158
|
+
}) }, key)) : import_lodash.default.map(props.content, (data, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: import_lodash.default.map(props.options, (option, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { onClick: () => index < 2 ? onShowLine(key) : null, children: renderRowContainer(data, option) }, index)) }, key)) })
|
|
159
|
+
] }) }),
|
|
160
|
+
!((_d = props.content) == null ? void 0 : _d.length) && !props.loading && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-table-not-found", children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: ((_e = props.notFound) == null ? void 0 : _e.title) || "Nenhuma campanha encontrado" }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: ((_f = props.notFound) == null ? void 0 : _f.message) || "Envie uma campanha de marketing para aparecer algum registro" })
|
|
163
|
+
] }),
|
|
164
|
+
!!props.paginate && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_paginate.Paginate, { ...props.paginate })
|
|
165
|
+
] });
|
|
166
|
+
}
|
|
167
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
168
|
+
0 && (module.exports = {
|
|
169
|
+
Table,
|
|
170
|
+
...require("./paginate")
|
|
171
|
+
});
|