@gustavo-valsechi/client 1.3.24 → 1.3.25
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/styles.d.ts +2 -0
- package/dist/components/styles.mjs +21 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.mjs +88 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.mjs +61 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.mjs +324 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.mjs +39 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.mjs +3078 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.mjs +32 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.mjs +322 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.mjs +10 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.mjs +23 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.mjs +732 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.mjs +138 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.mjs +61 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.mjs +43 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.mjs +853 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.mjs +40 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.mjs +566 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.mjs +711 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.mjs +21 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.mjs +165 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.mjs +104 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.mjs +94 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.mjs +47 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.mjs +93 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.mjs +46 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.mjs +91 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.mjs +33 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.mjs +603 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.mjs +113 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.mjs +52 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.mjs +19 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.mjs +13 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.mjs +125 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.mjs +58 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.mjs +92 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.mjs +45 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/{index.js → types/index.mjs} +379 -405
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.mjs +128 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.mjs +93 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.mjs +33 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.mjs +27 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.mjs +156 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.mjs +34 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.mjs +25 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.mjs +10 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.mjs +69 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.mjs +28 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.mjs +2324 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.mjs +135 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/{index.js → components/types/table/index.mjs} +1050 -1316
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.mjs +87 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.mjs +3076 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.mjs +58 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.mjs +96 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.mjs +42 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.mjs +268 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.mjs +19 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.mjs +44 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.mjs +19 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.mjs +19 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.mjs +281 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.mjs +10 -0
- package/dist/contexts/index.d.ts +4 -20
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.mjs +66 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.mjs +10 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.mjs +81 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.mjs +201 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.mjs +84 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.mjs +117 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.mjs +46 -0
- package/dist/index.d.ts +4 -17
- package/dist/interfaces/components/avatar/index.d.ts +6 -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.mjs +1 -0
- package/dist/interfaces/components/block/index.d.ts +16 -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.mjs +1 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -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.mjs +1 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -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.mjs +1 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.mjs +1 -0
- package/dist/interfaces/components/form/input/index.d.ts +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.mjs +1 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -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.mjs +1 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.mjs +1 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -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.mjs +1 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.mjs +1 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -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.mjs +1 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -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.mjs +1 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -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.mjs +1 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.mjs +1 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -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.mjs +1 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/styled.d.ts +6 -0
- package/dist/tsup.config.d.ts +2 -0
- package/package.json +13 -7
- package/dist/components/index.d.mts +0 -10
- package/dist/contexts/index.d.mts +0 -20
- package/dist/contexts/index.js +0 -525
- 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
- package/dist/interfaces/index.js +0 -19
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use
|
|
2
|
+
"use client";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var
|
|
9
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
10
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
11
|
+
}) : x)(function(x) {
|
|
12
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
|
+
});
|
|
15
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
10
16
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
17
|
};
|
|
12
18
|
var __export = (target, all) => {
|
|
@@ -29,11 +35,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
35
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
36
|
mod
|
|
31
37
|
));
|
|
32
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
38
|
|
|
34
39
|
// node_modules/credit-card-type/dist/lib/card-types.js
|
|
35
40
|
var require_card_types = __commonJS({
|
|
36
|
-
"node_modules/credit-card-type/dist/lib/card-types.js"(
|
|
41
|
+
"node_modules/credit-card-type/dist/lib/card-types.js"(exports, module) {
|
|
37
42
|
"use strict";
|
|
38
43
|
var cardTypes = {
|
|
39
44
|
visa: {
|
|
@@ -230,32 +235,32 @@ var require_card_types = __commonJS({
|
|
|
230
235
|
}
|
|
231
236
|
}
|
|
232
237
|
};
|
|
233
|
-
|
|
238
|
+
module.exports = cardTypes;
|
|
234
239
|
}
|
|
235
240
|
});
|
|
236
241
|
|
|
237
242
|
// node_modules/credit-card-type/dist/lib/clone.js
|
|
238
243
|
var require_clone = __commonJS({
|
|
239
|
-
"node_modules/credit-card-type/dist/lib/clone.js"(
|
|
244
|
+
"node_modules/credit-card-type/dist/lib/clone.js"(exports) {
|
|
240
245
|
"use strict";
|
|
241
|
-
Object.defineProperty(
|
|
242
|
-
|
|
246
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
247
|
+
exports.clone = void 0;
|
|
243
248
|
function clone(originalObject) {
|
|
244
249
|
if (!originalObject) {
|
|
245
250
|
return null;
|
|
246
251
|
}
|
|
247
252
|
return JSON.parse(JSON.stringify(originalObject));
|
|
248
253
|
}
|
|
249
|
-
|
|
254
|
+
exports.clone = clone;
|
|
250
255
|
}
|
|
251
256
|
});
|
|
252
257
|
|
|
253
258
|
// node_modules/credit-card-type/dist/lib/matches.js
|
|
254
259
|
var require_matches = __commonJS({
|
|
255
|
-
"node_modules/credit-card-type/dist/lib/matches.js"(
|
|
260
|
+
"node_modules/credit-card-type/dist/lib/matches.js"(exports) {
|
|
256
261
|
"use strict";
|
|
257
|
-
Object.defineProperty(
|
|
258
|
-
|
|
262
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
263
|
+
exports.matches = void 0;
|
|
259
264
|
function matchesRange(cardNumber, min, max) {
|
|
260
265
|
var maxLengthToCheck = String(min).length;
|
|
261
266
|
var substr = cardNumber.substr(0, maxLengthToCheck);
|
|
@@ -274,16 +279,16 @@ var require_matches = __commonJS({
|
|
|
274
279
|
}
|
|
275
280
|
return matchesPattern(cardNumber, pattern);
|
|
276
281
|
}
|
|
277
|
-
|
|
282
|
+
exports.matches = matches;
|
|
278
283
|
}
|
|
279
284
|
});
|
|
280
285
|
|
|
281
286
|
// node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js
|
|
282
287
|
var require_add_matching_cards_to_results = __commonJS({
|
|
283
|
-
"node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js"(
|
|
288
|
+
"node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js"(exports) {
|
|
284
289
|
"use strict";
|
|
285
|
-
Object.defineProperty(
|
|
286
|
-
|
|
290
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
291
|
+
exports.addMatchingCardsToResults = void 0;
|
|
287
292
|
var clone_1 = require_clone();
|
|
288
293
|
var matches_1 = require_matches();
|
|
289
294
|
function addMatchingCardsToResults(cardNumber, cardConfiguration, results) {
|
|
@@ -306,29 +311,29 @@ var require_add_matching_cards_to_results = __commonJS({
|
|
|
306
311
|
break;
|
|
307
312
|
}
|
|
308
313
|
}
|
|
309
|
-
|
|
314
|
+
exports.addMatchingCardsToResults = addMatchingCardsToResults;
|
|
310
315
|
}
|
|
311
316
|
});
|
|
312
317
|
|
|
313
318
|
// node_modules/credit-card-type/dist/lib/is-valid-input-type.js
|
|
314
319
|
var require_is_valid_input_type = __commonJS({
|
|
315
|
-
"node_modules/credit-card-type/dist/lib/is-valid-input-type.js"(
|
|
320
|
+
"node_modules/credit-card-type/dist/lib/is-valid-input-type.js"(exports) {
|
|
316
321
|
"use strict";
|
|
317
|
-
Object.defineProperty(
|
|
318
|
-
|
|
322
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
323
|
+
exports.isValidInputType = void 0;
|
|
319
324
|
function isValidInputType(cardNumber) {
|
|
320
325
|
return typeof cardNumber === "string" || cardNumber instanceof String;
|
|
321
326
|
}
|
|
322
|
-
|
|
327
|
+
exports.isValidInputType = isValidInputType;
|
|
323
328
|
}
|
|
324
329
|
});
|
|
325
330
|
|
|
326
331
|
// node_modules/credit-card-type/dist/lib/find-best-match.js
|
|
327
332
|
var require_find_best_match = __commonJS({
|
|
328
|
-
"node_modules/credit-card-type/dist/lib/find-best-match.js"(
|
|
333
|
+
"node_modules/credit-card-type/dist/lib/find-best-match.js"(exports) {
|
|
329
334
|
"use strict";
|
|
330
|
-
Object.defineProperty(
|
|
331
|
-
|
|
335
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
336
|
+
exports.findBestMatch = void 0;
|
|
332
337
|
function hasEnoughResultsToDetermineBestMatch(results) {
|
|
333
338
|
var numberOfResultsWithMaxStrengthProperty = results.filter(function(result) {
|
|
334
339
|
return result.matchStrength;
|
|
@@ -349,15 +354,15 @@ var require_find_best_match = __commonJS({
|
|
|
349
354
|
return bestMatch;
|
|
350
355
|
});
|
|
351
356
|
}
|
|
352
|
-
|
|
357
|
+
exports.findBestMatch = findBestMatch;
|
|
353
358
|
}
|
|
354
359
|
});
|
|
355
360
|
|
|
356
361
|
// node_modules/credit-card-type/dist/index.js
|
|
357
362
|
var require_dist = __commonJS({
|
|
358
|
-
"node_modules/credit-card-type/dist/index.js"(
|
|
363
|
+
"node_modules/credit-card-type/dist/index.js"(exports, module) {
|
|
359
364
|
"use strict";
|
|
360
|
-
var __assign =
|
|
365
|
+
var __assign = exports && exports.__assign || function() {
|
|
361
366
|
__assign = Object.assign || function(t) {
|
|
362
367
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
363
368
|
s = arguments[i];
|
|
@@ -475,15 +480,15 @@ var require_dist = __commonJS({
|
|
|
475
480
|
customCards = {};
|
|
476
481
|
};
|
|
477
482
|
creditCardType2.types = cardNames;
|
|
478
|
-
|
|
483
|
+
module.exports = creditCardType2;
|
|
479
484
|
}
|
|
480
485
|
});
|
|
481
486
|
|
|
482
487
|
// node_modules/luhn/src/luhn.js
|
|
483
488
|
var require_luhn = __commonJS({
|
|
484
|
-
"node_modules/luhn/src/luhn.js"(
|
|
489
|
+
"node_modules/luhn/src/luhn.js"(exports, module) {
|
|
485
490
|
"use strict";
|
|
486
|
-
|
|
491
|
+
module.exports = /* @__PURE__ */ (function() {
|
|
487
492
|
function validate(cardNumber) {
|
|
488
493
|
var trimmed = String(cardNumber).replace(/[\s]/g, ""), length = trimmed.length, odd = false, total = 0, calc, calc2;
|
|
489
494
|
if (!/^[0-9]+$/.test(trimmed)) {
|
|
@@ -527,96 +532,12 @@ var require_luhn = __commonJS({
|
|
|
527
532
|
}
|
|
528
533
|
});
|
|
529
534
|
|
|
530
|
-
// index.tsx
|
|
531
|
-
var index_exports = {};
|
|
532
|
-
__export(index_exports, {
|
|
533
|
-
Avatar: () => Avatar,
|
|
534
|
-
Badge: () => Badge,
|
|
535
|
-
Block: () => Block,
|
|
536
|
-
Button: () => Button,
|
|
537
|
-
Chart: () => Chart,
|
|
538
|
-
Component: () => Component,
|
|
539
|
-
CreditCard: () => CreditCard,
|
|
540
|
-
Form: () => Form,
|
|
541
|
-
IconProvider: () => IconProviderContainer,
|
|
542
|
-
InputDateTime: () => InputDateTime,
|
|
543
|
-
InputFile: () => InputFile,
|
|
544
|
-
InputLabel: () => InputLabel,
|
|
545
|
-
InputSelect: () => InputSelect,
|
|
546
|
-
InputText: () => InputText,
|
|
547
|
-
InputTextarea: () => InputTextarea,
|
|
548
|
-
LoadingApp: () => LoadingApp,
|
|
549
|
-
LoadingBar: () => LoadingBar,
|
|
550
|
-
Logo: () => Logo,
|
|
551
|
-
Lottie: () => Lottie,
|
|
552
|
-
Modal: () => Modal2,
|
|
553
|
-
ModalProvider: () => ModalProviderContainer,
|
|
554
|
-
Paginate: () => Paginate,
|
|
555
|
-
Table: () => Table,
|
|
556
|
-
ThemeProvider: () => ThemeProviderContainer,
|
|
557
|
-
TooltipProvider: () => TooltipProviderContainer,
|
|
558
|
-
useIcon: () => useIcon,
|
|
559
|
-
useModal: () => useModal,
|
|
560
|
-
useTheme: () => useTheme,
|
|
561
|
-
useTooltip: () => useTooltip
|
|
562
|
-
});
|
|
563
|
-
module.exports = __toCommonJS(index_exports);
|
|
564
|
-
|
|
565
|
-
// styled.ts
|
|
566
|
-
var import_styled_components = require("styled-components");
|
|
567
|
-
|
|
568
|
-
// components/index.tsx
|
|
569
|
-
var import_react12 = require("react");
|
|
570
|
-
|
|
571
|
-
// components/styles.tsx
|
|
572
|
-
var import_styled_components2 = __toESM(require("styled-components"));
|
|
573
|
-
var Container = import_styled_components2.default.div`
|
|
574
|
-
display: flex;
|
|
575
|
-
flex-direction: column;
|
|
576
|
-
gap: 1rem;
|
|
577
|
-
`;
|
|
578
|
-
var RowContainer = import_styled_components2.default.div`
|
|
579
|
-
display: flex;
|
|
580
|
-
flex-direction: row;
|
|
581
|
-
align-items: stretch;
|
|
582
|
-
gap: 1rem;
|
|
583
|
-
flex-wrap: wrap;
|
|
584
|
-
`;
|
|
585
|
-
|
|
586
|
-
// components/index.tsx
|
|
587
|
-
var import_lodash20 = __toESM(require("lodash"));
|
|
588
|
-
|
|
589
|
-
// components/types/index.tsx
|
|
590
|
-
var types_exports2 = {};
|
|
591
|
-
__export(types_exports2, {
|
|
592
|
-
Avatar: () => Avatar,
|
|
593
|
-
Badge: () => Badge,
|
|
594
|
-
Block: () => Block,
|
|
595
|
-
Button: () => Button,
|
|
596
|
-
Chart: () => Chart,
|
|
597
|
-
CreditCard: () => CreditCard,
|
|
598
|
-
Form: () => Form,
|
|
599
|
-
InputDateTime: () => InputDateTime,
|
|
600
|
-
InputFile: () => InputFile,
|
|
601
|
-
InputLabel: () => InputLabel,
|
|
602
|
-
InputSelect: () => InputSelect,
|
|
603
|
-
InputText: () => InputText,
|
|
604
|
-
InputTextarea: () => InputTextarea,
|
|
605
|
-
LoadingApp: () => LoadingApp,
|
|
606
|
-
LoadingBar: () => LoadingBar,
|
|
607
|
-
Logo: () => Logo,
|
|
608
|
-
Lottie: () => Lottie,
|
|
609
|
-
Modal: () => Modal2,
|
|
610
|
-
Paginate: () => Paginate,
|
|
611
|
-
Table: () => Table
|
|
612
|
-
});
|
|
613
|
-
|
|
614
535
|
// components/types/table/index.tsx
|
|
615
|
-
|
|
536
|
+
import { useEffect as useEffect8 } from "react";
|
|
616
537
|
|
|
617
538
|
// components/types/table/styles.tsx
|
|
618
|
-
|
|
619
|
-
var
|
|
539
|
+
import styled from "styled-components";
|
|
540
|
+
var Container = styled.div`
|
|
620
541
|
.iz-table-container {
|
|
621
542
|
overflow-x: auto;
|
|
622
543
|
|
|
@@ -877,870 +798,113 @@ var Container2 = import_styled_components3.default.div`
|
|
|
877
798
|
}
|
|
878
799
|
`;
|
|
879
800
|
|
|
880
|
-
// components/
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
801
|
+
// components/index.tsx
|
|
802
|
+
import { Fragment } from "react";
|
|
803
|
+
|
|
804
|
+
// components/styles.tsx
|
|
805
|
+
import styled2 from "styled-components";
|
|
806
|
+
var Container2 = styled2.div`
|
|
884
807
|
display: flex;
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
808
|
+
flex-direction: column;
|
|
809
|
+
gap: 1rem;
|
|
810
|
+
`;
|
|
811
|
+
var RowContainer = styled2.div`
|
|
812
|
+
display: flex;
|
|
813
|
+
flex-direction: row;
|
|
814
|
+
align-items: stretch;
|
|
815
|
+
gap: 1rem;
|
|
816
|
+
flex-wrap: wrap;
|
|
817
|
+
`;
|
|
888
818
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
font-weight: 500;
|
|
892
|
-
height: 1.5rem;
|
|
893
|
-
padding: 0 .6rem;
|
|
894
|
-
border-radius: 1rem;
|
|
895
|
-
transition: ease .3s;
|
|
896
|
-
color: ${({ theme }) => theme.t6};
|
|
897
|
-
display: flex;
|
|
898
|
-
align-items: center;
|
|
899
|
-
justify-content: center;
|
|
900
|
-
cursor: pointer;
|
|
819
|
+
// components/index.tsx
|
|
820
|
+
import _17 from "lodash";
|
|
901
821
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
822
|
+
// components/types/index.tsx
|
|
823
|
+
var types_exports2 = {};
|
|
824
|
+
__export(types_exports2, {
|
|
825
|
+
Avatar: () => Avatar,
|
|
826
|
+
Badge: () => Badge,
|
|
827
|
+
Block: () => Block,
|
|
828
|
+
Button: () => Button,
|
|
829
|
+
Chart: () => Chart,
|
|
830
|
+
CreditCard: () => CreditCard,
|
|
831
|
+
Form: () => Form,
|
|
832
|
+
InputDateTime: () => InputDateTime,
|
|
833
|
+
InputFile: () => InputFile,
|
|
834
|
+
InputLabel: () => InputLabel,
|
|
835
|
+
InputSelect: () => InputSelect,
|
|
836
|
+
InputText: () => InputText,
|
|
837
|
+
InputTextarea: () => InputTextarea,
|
|
838
|
+
LoadingApp: () => LoadingApp,
|
|
839
|
+
LoadingBar: () => LoadingBar,
|
|
840
|
+
Logo: () => Logo,
|
|
841
|
+
Lottie: () => Lottie,
|
|
842
|
+
Modal: () => Modal,
|
|
843
|
+
Paginate: () => Paginate,
|
|
844
|
+
Table: () => Table
|
|
845
|
+
});
|
|
905
846
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
847
|
+
// components/types/loading/bar/styles.tsx
|
|
848
|
+
import styled3 from "styled-components";
|
|
849
|
+
var Container3 = styled3.div`
|
|
850
|
+
border-radius: ${(props) => props.borderRadius || "10px"};
|
|
851
|
+
height: ${(props) => props.height || "100%"};
|
|
852
|
+
width: ${(props) => props.width || "100%"};
|
|
853
|
+
animation: loading infinite 2s;
|
|
854
|
+
margin: ${(props) => props.margin || "0px"};
|
|
910
855
|
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
856
|
+
@keyframes loading {
|
|
857
|
+
0% {
|
|
858
|
+
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.05)" : "rgb(255, 255, 255, 0.05)"};
|
|
859
|
+
}
|
|
860
|
+
50% {
|
|
861
|
+
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.10)" : "rgb(255, 255, 255, 0.15)"};
|
|
862
|
+
}
|
|
863
|
+
100% {
|
|
864
|
+
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.05)" : "rgb(255, 255, 255, 0.05)"};
|
|
914
865
|
}
|
|
866
|
+
}
|
|
915
867
|
`;
|
|
916
868
|
|
|
917
|
-
// components/types/
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
const pages = () => {
|
|
922
|
-
const offset = Number(props.page.value) - 4;
|
|
923
|
-
let page = offset > 0 ? offset + 1 : 1;
|
|
924
|
-
let pages2 = [];
|
|
925
|
-
while (Number(props.total) >= page) {
|
|
926
|
-
pages2.push(page);
|
|
927
|
-
page++;
|
|
928
|
-
}
|
|
929
|
-
pages2 = import_lodash.default.slice(pages2, 0, 5);
|
|
930
|
-
if (Number(props.page.value) + 1 > 5) pages2 = import_lodash.default.concat(["1.."], pages2);
|
|
931
|
-
if (Number(props.total) > 6 && Number(props.page.value) + 1 < Number(props.total)) return import_lodash.default.concat(pages2, `..${props.total}`);
|
|
932
|
-
return pages2;
|
|
933
|
-
};
|
|
934
|
-
return Number(props.total) > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Container3, { children: [
|
|
935
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
936
|
-
"div",
|
|
937
|
-
{
|
|
938
|
-
className: "paginate back",
|
|
939
|
-
onClick: () => props.page.set ? props.page.set(
|
|
940
|
-
props.page.value ? props.page.value - 1 : props.page.value
|
|
941
|
-
) : null,
|
|
942
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-left" })
|
|
943
|
-
}
|
|
944
|
-
),
|
|
945
|
-
import_lodash.default.map(
|
|
946
|
-
pages(),
|
|
947
|
-
(page, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
948
|
-
"div",
|
|
949
|
-
{
|
|
950
|
-
className: "paginate page",
|
|
951
|
-
"data-current": String(props.page.value === Number(import_lodash.default.replace(page, /\D/g, "")) - 1),
|
|
952
|
-
onClick: () => props.page.set ? props.page.set(Number(import_lodash.default.replace(page, /\D/g, "")) - 1) : null,
|
|
953
|
-
children: page
|
|
954
|
-
},
|
|
955
|
-
index
|
|
956
|
-
)
|
|
957
|
-
),
|
|
958
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
959
|
-
"div",
|
|
960
|
-
{
|
|
961
|
-
className: "paginate next",
|
|
962
|
-
onClick: () => props.page.set ? props.page.set(
|
|
963
|
-
props.page.value !== props.total - 1 ? props.page.value + 1 : props.page.value
|
|
964
|
-
) : null,
|
|
965
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-right" })
|
|
966
|
-
}
|
|
967
|
-
)
|
|
968
|
-
] });
|
|
869
|
+
// components/types/loading/bar/index.tsx
|
|
870
|
+
import { jsx } from "react/jsx-runtime";
|
|
871
|
+
function LoadingBar(props) {
|
|
872
|
+
return /* @__PURE__ */ jsx(Container3, { ...props });
|
|
969
873
|
}
|
|
970
874
|
|
|
971
|
-
//
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
var import_styled_components6 = require("styled-components");
|
|
977
|
-
|
|
978
|
-
// contexts/theme/styles.tsx
|
|
979
|
-
var import_styled_components5 = __toESM(require("styled-components"));
|
|
980
|
-
var Switcher = import_styled_components5.default.div`
|
|
981
|
-
width: 3rem;
|
|
982
|
-
height: 1.5rem;
|
|
983
|
-
border-radius: 1rem;
|
|
984
|
-
border: 2px solid ${({ theme }) => theme.t05};
|
|
985
|
-
overflow: hidden;
|
|
875
|
+
// components/types/loading/app/styles.tsx
|
|
876
|
+
import styled4 from "styled-components";
|
|
877
|
+
var Container4 = styled4.div`
|
|
878
|
+
width: ${({ initialization }) => initialization ? "100vw" : "100%"};
|
|
879
|
+
height: ${({ initialization }) => initialization ? "100vh" : "calc(100vh - 15rem)"};
|
|
986
880
|
display: flex;
|
|
881
|
+
justify-content: center;
|
|
987
882
|
align-items: center;
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
position: absolute;
|
|
994
|
-
transform: translateY(-50%);
|
|
995
|
-
font-size: .9rem;
|
|
996
|
-
z-index: 0;
|
|
997
|
-
transition: ease .8s;
|
|
998
|
-
|
|
999
|
-
&:first-child {
|
|
1000
|
-
left: .2rem;
|
|
1001
|
-
top: 50%;
|
|
1002
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
&:last-child {
|
|
1006
|
-
right: .2rem;
|
|
1007
|
-
top: 50%;
|
|
1008
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
883
|
+
position: ${({ initialization }) => initialization ? "absolute" : "relative"};;
|
|
884
|
+
bottom: 0;
|
|
885
|
+
left: 0;
|
|
886
|
+
background: ${({ initialization, theme }) => initialization ? `${theme.maingrad}, ${theme.primary}` : "transparent"};
|
|
887
|
+
z-index: ${({ initialization }) => initialization ? "9" : "0"};
|
|
1011
888
|
|
|
1012
|
-
.
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
889
|
+
.iz-loading-logo {
|
|
890
|
+
font-size: 4rem;
|
|
891
|
+
opacity: 40%;
|
|
892
|
+
animation: loop 2s infinite;
|
|
1016
893
|
position: relative;
|
|
1017
|
-
transition: ease .3s;
|
|
1018
|
-
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
1019
|
-
z-index: 1;
|
|
1020
894
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
895
|
+
&::before {
|
|
896
|
+
content: "";
|
|
897
|
+
position: absolute;
|
|
898
|
+
width: 5rem;
|
|
899
|
+
height: 5rem;
|
|
900
|
+
animation: firstImpact 2s .5s infinite ease;
|
|
901
|
+
background: ${({ theme }) => theme.t05};
|
|
902
|
+
border-radius: 50%;
|
|
903
|
+
z-index: 0;
|
|
904
|
+
opacity: 0;
|
|
1028
905
|
}
|
|
1029
906
|
|
|
1030
|
-
|
|
1031
|
-
content: "";
|
|
1032
|
-
position: absolute;
|
|
1033
|
-
width: 100%;
|
|
1034
|
-
height: 100%;
|
|
1035
|
-
border-radius: 1rem;
|
|
1036
|
-
transform: scale(1.8);
|
|
1037
|
-
background: ${({ theme }) => theme.t05};
|
|
1038
|
-
top: 0;
|
|
1039
|
-
left: 0;
|
|
1040
|
-
z-index: 1;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
&:before {
|
|
1044
|
-
content: "";
|
|
1045
|
-
position: absolute;
|
|
1046
|
-
width: 100%;
|
|
1047
|
-
height: 100%;
|
|
1048
|
-
border-radius: 1rem;
|
|
1049
|
-
transform: scale(3);
|
|
1050
|
-
background: ${({ theme }) => theme.t05};
|
|
1051
|
-
top: 0;
|
|
1052
|
-
left: 0;
|
|
1053
|
-
z-index: 0;
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
`;
|
|
1057
|
-
|
|
1058
|
-
// contexts/theme/content.tsx
|
|
1059
|
-
var CommonTheme = {
|
|
1060
|
-
secondary: "#5869da",
|
|
1061
|
-
tertiary: "#629dfd33",
|
|
1062
|
-
positive: "#65c965",
|
|
1063
|
-
negative: "#FF334E",
|
|
1064
|
-
mobileMaxWidth: "650px",
|
|
1065
|
-
mobileMinWidth: "315px"
|
|
1066
|
-
};
|
|
1067
|
-
var Themes = {
|
|
1068
|
-
light: {
|
|
1069
|
-
primary: "#ffffff",
|
|
1070
|
-
reverse: "#353535",
|
|
1071
|
-
tooltip: "#f2f2f2",
|
|
1072
|
-
t8: "#000000cc",
|
|
1073
|
-
t7: "#000000b3",
|
|
1074
|
-
t6: "#00000099",
|
|
1075
|
-
t5: "#00000080",
|
|
1076
|
-
t4: "#00000066",
|
|
1077
|
-
t3: "#0000004d",
|
|
1078
|
-
t2: "#00000033",
|
|
1079
|
-
t1: "#0000001a",
|
|
1080
|
-
t08: "#00000014",
|
|
1081
|
-
t05: "#0000000d",
|
|
1082
|
-
t03: "#00000007",
|
|
1083
|
-
t02: "#00000005",
|
|
1084
|
-
t01: "#00000002",
|
|
1085
|
-
lgrad: `linear-gradient(
|
|
1086
|
-
to right,
|
|
1087
|
-
#dadef7 0%,
|
|
1088
|
-
#dee2f8 5%,
|
|
1089
|
-
#e2e5f9 10%,
|
|
1090
|
-
#e6e9fa 20%,
|
|
1091
|
-
#eaedfb 30%,
|
|
1092
|
-
#eff0fb 60%,
|
|
1093
|
-
#f3f4fc 80%,
|
|
1094
|
-
#f7f8fd 90%,
|
|
1095
|
-
#fbfbfe 100%
|
|
1096
|
-
)`,
|
|
1097
|
-
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
1098
|
-
...CommonTheme
|
|
1099
|
-
},
|
|
1100
|
-
dark: {
|
|
1101
|
-
primary: "#333333",
|
|
1102
|
-
reverse: "#b45252",
|
|
1103
|
-
tooltip: "#3d3d3d",
|
|
1104
|
-
t8: "#ffffffcc",
|
|
1105
|
-
t7: "#ffffffb3",
|
|
1106
|
-
t6: "#ffffff99",
|
|
1107
|
-
t5: "#ffffff80",
|
|
1108
|
-
t4: "#ffffff66",
|
|
1109
|
-
t3: "#ffffff4d",
|
|
1110
|
-
t2: "#ffffff33",
|
|
1111
|
-
t1: "#ffffff1a",
|
|
1112
|
-
t08: "#ffffff14",
|
|
1113
|
-
t05: "#ffffff0d",
|
|
1114
|
-
t03: "#ffffff07",
|
|
1115
|
-
t02: "#ffffff05",
|
|
1116
|
-
t01: "#ffffff02",
|
|
1117
|
-
lgrad: `linear-gradient(
|
|
1118
|
-
to right,
|
|
1119
|
-
#3d485c 0%,
|
|
1120
|
-
#3c4657 5%,
|
|
1121
|
-
#3b4353 10%,
|
|
1122
|
-
#3a414e 20%,
|
|
1123
|
-
#393f4a 30%,
|
|
1124
|
-
#373c45 60%,
|
|
1125
|
-
#363a41 80%,
|
|
1126
|
-
#35383c 90%,
|
|
1127
|
-
#343538 100%
|
|
1128
|
-
)`,
|
|
1129
|
-
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
1130
|
-
...CommonTheme
|
|
1131
|
-
}
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
// contexts/theme/index.tsx
|
|
1135
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1136
|
-
var ThemeContext = (0, import_react.createContext)({});
|
|
1137
|
-
var ThemeProviderContainer = (props) => {
|
|
1138
|
-
const [theme, setTheme] = (0, import_react.useState)("light");
|
|
1139
|
-
const [defaultTheme] = (0, import_react.useState)("light");
|
|
1140
|
-
const SwitcherComponent = () => {
|
|
1141
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1142
|
-
Switcher,
|
|
1143
|
-
{
|
|
1144
|
-
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
1145
|
-
"data-theme": theme || defaultTheme,
|
|
1146
|
-
children: [
|
|
1147
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-moon" }),
|
|
1148
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "switcher", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {}) }),
|
|
1149
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-sun" })
|
|
1150
|
-
]
|
|
1151
|
-
}
|
|
1152
|
-
);
|
|
1153
|
-
};
|
|
1154
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1155
|
-
ThemeContext.Provider,
|
|
1156
|
-
{
|
|
1157
|
-
value: {
|
|
1158
|
-
theme: props.theme || defaultTheme,
|
|
1159
|
-
setTheme,
|
|
1160
|
-
content: Themes[props.theme || defaultTheme],
|
|
1161
|
-
Switcher: SwitcherComponent
|
|
1162
|
-
},
|
|
1163
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_styled_components6.ThemeProvider, { theme: Themes[props.theme || defaultTheme], children: props.children })
|
|
1164
|
-
}
|
|
1165
|
-
);
|
|
1166
|
-
};
|
|
1167
|
-
var useTheme = () => (0, import_react.useContext)(ThemeContext);
|
|
1168
|
-
|
|
1169
|
-
// contexts/icon/index.tsx
|
|
1170
|
-
var import_lodash2 = __toESM(require("lodash"));
|
|
1171
|
-
|
|
1172
|
-
// contexts/icon/assets/brands/index.tsx
|
|
1173
|
-
var req = require.context("./", false, /\.svg$/);
|
|
1174
|
-
var brands = {};
|
|
1175
|
-
req.keys().forEach((key) => {
|
|
1176
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
1177
|
-
brands[name] = req(key).default;
|
|
1178
|
-
});
|
|
1179
|
-
var brands_default = brands;
|
|
1180
|
-
|
|
1181
|
-
// contexts/icon/assets/regular/index.tsx
|
|
1182
|
-
var req2 = require.context("./", false, /\.svg$/);
|
|
1183
|
-
var regular = {};
|
|
1184
|
-
req2.keys().forEach((key) => {
|
|
1185
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
1186
|
-
regular[name] = req2(key).default;
|
|
1187
|
-
});
|
|
1188
|
-
var regular_default = regular;
|
|
1189
|
-
|
|
1190
|
-
// contexts/icon/assets/solid/index.tsx
|
|
1191
|
-
var req3 = require.context("./", false, /\.svg$/);
|
|
1192
|
-
var solid = {};
|
|
1193
|
-
req3.keys().forEach((key) => {
|
|
1194
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
1195
|
-
solid[name] = req3(key).default;
|
|
1196
|
-
});
|
|
1197
|
-
var solid_default = solid;
|
|
1198
|
-
|
|
1199
|
-
// contexts/icon/assets/index.tsx
|
|
1200
|
-
var assets_default = {
|
|
1201
|
-
brands: brands_default,
|
|
1202
|
-
regular: regular_default,
|
|
1203
|
-
solid: solid_default
|
|
1204
|
-
};
|
|
1205
|
-
|
|
1206
|
-
// contexts/icon/index.tsx
|
|
1207
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1208
|
-
var IconContext = (0, import_react2.createContext)({});
|
|
1209
|
-
var IconProviderContainer = ({ children }) => {
|
|
1210
|
-
const { content } = useTheme();
|
|
1211
|
-
const [isClient, setIsClient] = (0, import_react2.useState)(false);
|
|
1212
|
-
const [matches, setMatches] = (0, import_react2.useState)(0);
|
|
1213
|
-
(0, import_react2.useEffect)(() => {
|
|
1214
|
-
setIsClient(true);
|
|
1215
|
-
}, []);
|
|
1216
|
-
(0, import_react2.useEffect)(() => {
|
|
1217
|
-
const firstMediaQuery = window.matchMedia(`(max-width: ${content.mobileMaxWidth})`);
|
|
1218
|
-
const secoundMediaQuery = window.matchMedia(`(max-width: ${content.mobileMinWidth})`);
|
|
1219
|
-
const firstHandler = (event) => setMatches(event.matches ? 1 : 0);
|
|
1220
|
-
const secoundHandler = (event) => setMatches(event.matches ? 2 : 1);
|
|
1221
|
-
if (firstMediaQuery.matches) setMatches(1);
|
|
1222
|
-
if (secoundMediaQuery.matches) setMatches(2);
|
|
1223
|
-
firstMediaQuery.addEventListener("change", firstHandler);
|
|
1224
|
-
secoundMediaQuery.addEventListener("change", secoundHandler);
|
|
1225
|
-
return () => {
|
|
1226
|
-
firstMediaQuery.removeEventListener("change", firstHandler);
|
|
1227
|
-
secoundMediaQuery.removeEventListener("change", secoundHandler);
|
|
1228
|
-
};
|
|
1229
|
-
}, []);
|
|
1230
|
-
(0, import_react2.useEffect)(() => {
|
|
1231
|
-
if (!isClient) return;
|
|
1232
|
-
const processElement = (element) => {
|
|
1233
|
-
var _a, _b, _c, _d, _e;
|
|
1234
|
-
const name = element.getAttribute("class");
|
|
1235
|
-
if (!name) return;
|
|
1236
|
-
const icon = import_lodash2.default.split(import_lodash2.default.replace(name, /fa-/g, ""), " ");
|
|
1237
|
-
if (!icon.length) return;
|
|
1238
|
-
let svg = (_d = (_c = (_a = assets_default[icon[0]]) == null ? void 0 : _a[icon[1]]) != null ? _c : (_b = assets_default["solid"]) == null ? void 0 : _b[icon[0]]) != null ? _d : "";
|
|
1239
|
-
if (!svg) return;
|
|
1240
|
-
svg = svg.replace(/fill=".*?"/g, 'fill="currentColor"');
|
|
1241
|
-
const styles = window.getComputedStyle(element);
|
|
1242
|
-
const size = Number((_e = import_lodash2.default.split(styles.fontSize, "px")) == null ? void 0 : _e[0]) + 2;
|
|
1243
|
-
element.style.width = `${size}px`;
|
|
1244
|
-
element.style.height = `${size}px`;
|
|
1245
|
-
element.textContent = "";
|
|
1246
|
-
element.innerHTML = svg;
|
|
1247
|
-
};
|
|
1248
|
-
document.querySelectorAll("i").forEach((el) => processElement(el));
|
|
1249
|
-
const observer = new MutationObserver((mutations) => {
|
|
1250
|
-
mutations.forEach((mutation) => {
|
|
1251
|
-
mutation.addedNodes.forEach((node) => {
|
|
1252
|
-
if (node.nodeType === 1) {
|
|
1253
|
-
const el = node;
|
|
1254
|
-
if (el.tagName.toLowerCase() === "i") processElement(el);
|
|
1255
|
-
el.querySelectorAll("i").forEach((child) => processElement(child));
|
|
1256
|
-
}
|
|
1257
|
-
});
|
|
1258
|
-
});
|
|
1259
|
-
});
|
|
1260
|
-
observer.observe(document.body, {
|
|
1261
|
-
childList: true,
|
|
1262
|
-
subtree: true
|
|
1263
|
-
});
|
|
1264
|
-
return () => observer.disconnect();
|
|
1265
|
-
}, [isClient, matches]);
|
|
1266
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconContext.Provider, { value: {}, children });
|
|
1267
|
-
};
|
|
1268
|
-
var useIcon = () => (0, import_react2.useContext)(IconContext);
|
|
1269
|
-
|
|
1270
|
-
// contexts/tooltip/index.tsx
|
|
1271
|
-
var import_react3 = require("react");
|
|
1272
|
-
|
|
1273
|
-
// contexts/tooltip/styles.tsx
|
|
1274
|
-
var import_styled_components7 = __toESM(require("styled-components"));
|
|
1275
|
-
var Tooltip = import_styled_components7.default.div`
|
|
1276
|
-
position: fixed;
|
|
1277
|
-
background: ${({ theme }) => theme.tooltip};
|
|
1278
|
-
color: ${({ theme }) => theme.t6};
|
|
1279
|
-
font-size: .8rem;
|
|
1280
|
-
font-weight: 500;
|
|
1281
|
-
text-align: center;
|
|
1282
|
-
padding: .3rem .8rem;
|
|
1283
|
-
border-radius: 5px;
|
|
1284
|
-
transform: translateX(-50%);
|
|
1285
|
-
z-index: 10;
|
|
1286
|
-
border: 1px solid ${({ theme }) => theme.t05};
|
|
1287
|
-
|
|
1288
|
-
&::before {
|
|
1289
|
-
content: "";
|
|
1290
|
-
position: absolute;
|
|
1291
|
-
bottom: -9px;
|
|
1292
|
-
left: 50%;
|
|
1293
|
-
transform: translateX(-50%);
|
|
1294
|
-
width: 0;
|
|
1295
|
-
height: 0;
|
|
1296
|
-
border-left: 8px solid transparent;
|
|
1297
|
-
border-right: 8px solid transparent;
|
|
1298
|
-
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
&::after {
|
|
1302
|
-
content: "";
|
|
1303
|
-
position: absolute;
|
|
1304
|
-
bottom: -8px;
|
|
1305
|
-
left: 50%;
|
|
1306
|
-
transform: translateX(-50%);
|
|
1307
|
-
width: 0;
|
|
1308
|
-
height: 0;
|
|
1309
|
-
border-left: 8px solid transparent;
|
|
1310
|
-
border-right: 8px solid transparent;
|
|
1311
|
-
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
1312
|
-
}
|
|
1313
|
-
`;
|
|
1314
|
-
|
|
1315
|
-
// contexts/tooltip/index.tsx
|
|
1316
|
-
var import_lodash3 = __toESM(require("lodash"));
|
|
1317
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1318
|
-
var TooltipContext = (0, import_react3.createContext)({});
|
|
1319
|
-
var TooltipProviderContainer = ({ children }) => {
|
|
1320
|
-
const [tooltips, setTooltips] = (0, import_react3.useState)([]);
|
|
1321
|
-
const getContent = (target) => {
|
|
1322
|
-
var _a;
|
|
1323
|
-
const rect = target.getBoundingClientRect();
|
|
1324
|
-
return {
|
|
1325
|
-
top: rect.top + window.scrollY - (target.offsetHeight + 8),
|
|
1326
|
-
left: rect.left + window.scrollX + target.offsetWidth / 2,
|
|
1327
|
-
content: ((_a = target.dataset) == null ? void 0 : _a.tooltip) || ""
|
|
1328
|
-
};
|
|
1329
|
-
};
|
|
1330
|
-
(0, import_react3.useEffect)(() => {
|
|
1331
|
-
const processElement = (element) => {
|
|
1332
|
-
element.addEventListener("mouseenter", (event) => {
|
|
1333
|
-
const target = event == null ? void 0 : event.target;
|
|
1334
|
-
if (!target) return;
|
|
1335
|
-
setTooltips(import_lodash3.default.concat(tooltips, [getContent(target)]));
|
|
1336
|
-
});
|
|
1337
|
-
element.addEventListener("mouseleave", (event) => {
|
|
1338
|
-
const target = event == null ? void 0 : event.target;
|
|
1339
|
-
if (!target) return;
|
|
1340
|
-
setTooltips(import_lodash3.default.filter(tooltips, (data) => JSON.stringify(data) === JSON.stringify(getContent(target))));
|
|
1341
|
-
});
|
|
1342
|
-
};
|
|
1343
|
-
document.querySelectorAll("[data-tooltip]").forEach((el) => processElement(el));
|
|
1344
|
-
const observer = new MutationObserver((mutations) => {
|
|
1345
|
-
mutations.forEach((mutation) => {
|
|
1346
|
-
mutation.addedNodes.forEach((node) => {
|
|
1347
|
-
if (node.nodeType === 1) {
|
|
1348
|
-
const el = node;
|
|
1349
|
-
if (el.getAttribute("data-tooltip")) processElement(el);
|
|
1350
|
-
el.querySelectorAll("[data-tooltip]").forEach((child) => processElement(child));
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
});
|
|
1354
|
-
});
|
|
1355
|
-
observer.observe(document.body, {
|
|
1356
|
-
childList: true,
|
|
1357
|
-
subtree: true
|
|
1358
|
-
});
|
|
1359
|
-
return () => observer.disconnect();
|
|
1360
|
-
}, []);
|
|
1361
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(TooltipContext.Provider, { value: {}, children: [
|
|
1362
|
-
import_lodash3.default.map(
|
|
1363
|
-
tooltips,
|
|
1364
|
-
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1365
|
-
Tooltip,
|
|
1366
|
-
{
|
|
1367
|
-
style: {
|
|
1368
|
-
top: data.top,
|
|
1369
|
-
left: data.left
|
|
1370
|
-
},
|
|
1371
|
-
children: data.content
|
|
1372
|
-
},
|
|
1373
|
-
index
|
|
1374
|
-
)
|
|
1375
|
-
),
|
|
1376
|
-
children
|
|
1377
|
-
] });
|
|
1378
|
-
};
|
|
1379
|
-
var useTooltip = () => (0, import_react3.useContext)(TooltipContext);
|
|
1380
|
-
|
|
1381
|
-
// contexts/modal/index.tsx
|
|
1382
|
-
var import_react4 = require("react");
|
|
1383
|
-
var import_navigation = require("next/navigation");
|
|
1384
|
-
|
|
1385
|
-
// contexts/modal/styles.tsx
|
|
1386
|
-
var import_styled_components8 = __toESM(require("styled-components"));
|
|
1387
|
-
var Container4 = import_styled_components8.default.div`
|
|
1388
|
-
|
|
1389
|
-
`;
|
|
1390
|
-
|
|
1391
|
-
// contexts/modal/index.tsx
|
|
1392
|
-
var import_lodash4 = __toESM(require("lodash"));
|
|
1393
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1394
|
-
var ModalContext = (0, import_react4.createContext)({});
|
|
1395
|
-
var memory = [];
|
|
1396
|
-
var ModalProviderContainer = ({ children }) => {
|
|
1397
|
-
const pathname = (0, import_navigation.usePathname)();
|
|
1398
|
-
const [modals, setModals] = (0, import_react4.useState)([]);
|
|
1399
|
-
(0, import_react4.useEffect)(() => {
|
|
1400
|
-
setModals(import_lodash4.default.filter(memory, (modal) => modal.type === "fixed"));
|
|
1401
|
-
}, [pathname]);
|
|
1402
|
-
const add = (modal) => {
|
|
1403
|
-
if (import_lodash4.default.some(memory, (data) => data.name === modal.name)) return;
|
|
1404
|
-
memory.push(modal);
|
|
1405
|
-
setModals(memory);
|
|
1406
|
-
};
|
|
1407
|
-
const remove = (modalName) => {
|
|
1408
|
-
const index = import_lodash4.default.findIndex(memory, (data) => data.name === modalName);
|
|
1409
|
-
memory.slice(index, 1);
|
|
1410
|
-
setModals(memory);
|
|
1411
|
-
};
|
|
1412
|
-
const setProps = (modalName, props) => {
|
|
1413
|
-
const index = import_lodash4.default.findIndex(modals, (modal) => modal.name === modalName);
|
|
1414
|
-
const content = import_lodash4.default.find(modals, (modal) => modal.name === modalName);
|
|
1415
|
-
if (!content) return;
|
|
1416
|
-
let settedModals = [...modals];
|
|
1417
|
-
settedModals.splice(index, 1, { ...content, props: { ...content.props, ...props } });
|
|
1418
|
-
setModals(settedModals);
|
|
1419
|
-
};
|
|
1420
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1421
|
-
ModalContext.Provider,
|
|
1422
|
-
{
|
|
1423
|
-
value: {
|
|
1424
|
-
value: modals,
|
|
1425
|
-
add,
|
|
1426
|
-
remove,
|
|
1427
|
-
setProps
|
|
1428
|
-
},
|
|
1429
|
-
children: [
|
|
1430
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Container4, { children: import_lodash4.default.map(modals, (modal, index) => {
|
|
1431
|
-
const ModalComponent = modal.component;
|
|
1432
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ModalComponent, { ...modal.props }, index);
|
|
1433
|
-
}) }),
|
|
1434
|
-
children
|
|
1435
|
-
]
|
|
1436
|
-
}
|
|
1437
|
-
);
|
|
1438
|
-
};
|
|
1439
|
-
var useModal = () => (0, import_react4.useContext)(ModalContext);
|
|
1440
|
-
|
|
1441
|
-
// components/types/table/index.tsx
|
|
1442
|
-
var import_lodash6 = __toESM(require("lodash"));
|
|
1443
|
-
|
|
1444
|
-
// components/types/table/modal/styles.tsx
|
|
1445
|
-
var import_styled_components9 = __toESM(require("styled-components"));
|
|
1446
|
-
var Content = import_styled_components9.default.div`
|
|
1447
|
-
padding: 1.5rem;
|
|
1448
|
-
display: flex;
|
|
1449
|
-
flex-direction: column;
|
|
1450
|
-
gap: 1.5rem;
|
|
1451
|
-
|
|
1452
|
-
.iz-table-modal-title {
|
|
1453
|
-
font-size: 1.2rem;
|
|
1454
|
-
font-weight: 500;
|
|
1455
|
-
width: 100%;
|
|
1456
|
-
display: flex;
|
|
1457
|
-
align-items: center;
|
|
1458
|
-
justify-content: center;
|
|
1459
|
-
color: ${({ theme }) => theme.t6};
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
.iz-table-modal-content {
|
|
1463
|
-
ul {
|
|
1464
|
-
li {
|
|
1465
|
-
border-bottom: solid 1px ${({ theme }) => theme.t05};
|
|
1466
|
-
padding: .8rem 0;
|
|
1467
|
-
display: flex;
|
|
1468
|
-
align-items: center;
|
|
1469
|
-
justify-content: space-between;
|
|
1470
|
-
gap: 1rem;
|
|
1471
|
-
font-size: .8rem;
|
|
1472
|
-
color: ${({ theme }) => theme.t6};
|
|
1473
|
-
|
|
1474
|
-
&:last-child {
|
|
1475
|
-
border-bottom: none;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
.iz-table-modal-column {
|
|
1479
|
-
background: ${({ theme }) => theme.t05};
|
|
1480
|
-
padding: .5rem .8rem;
|
|
1481
|
-
font-weight: 600;
|
|
1482
|
-
border-radius: 5px;
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
.iz-table-modal-row {
|
|
1486
|
-
text-align: right;
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
.iz-table-modal-actions {
|
|
1493
|
-
margin-top: 1rem;
|
|
1494
|
-
}
|
|
1495
|
-
`;
|
|
1496
|
-
|
|
1497
|
-
// components/types/table/modal/index.tsx
|
|
1498
|
-
var import_lodash5 = __toESM(require("lodash"));
|
|
1499
|
-
|
|
1500
|
-
// components/types/table/modal/actions.tsx
|
|
1501
|
-
var actionConfig = {
|
|
1502
|
-
"fa-solid fa-pen-to-square": { label: "editar" },
|
|
1503
|
-
"fa-solid fa-trash-can": { label: "remover", color: CommonTheme.negative }
|
|
1504
|
-
};
|
|
1505
|
-
var actions_default = actionConfig;
|
|
1506
|
-
|
|
1507
|
-
// components/types/table/modal/index.tsx
|
|
1508
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1509
|
-
function Modal(props) {
|
|
1510
|
-
const modal = useModal();
|
|
1511
|
-
const content = import_lodash5.default.omit(props.content, ["actions"]);
|
|
1512
|
-
const actions = Object.values(import_lodash5.default.pick(props.content, ["actions"]))[0];
|
|
1513
|
-
const onClose = () => {
|
|
1514
|
-
modal.setProps("table", { toggle: false });
|
|
1515
|
-
};
|
|
1516
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1517
|
-
Component,
|
|
1518
|
-
{
|
|
1519
|
-
content: [{
|
|
1520
|
-
type: "Modal",
|
|
1521
|
-
props: {
|
|
1522
|
-
toggle: props.toggle,
|
|
1523
|
-
onClose,
|
|
1524
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Container2, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Content, { children: [
|
|
1525
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "iz-table-modal-title", children: "Conte\xFAdo" }),
|
|
1526
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "iz-table-modal-content", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { children: import_lodash5.default.map(
|
|
1527
|
-
content,
|
|
1528
|
-
(value, key) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { children: [
|
|
1529
|
-
!!key && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "iz-table-modal-column", children: key }),
|
|
1530
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "iz-table-modal-row", children: value })
|
|
1531
|
-
] }, key)
|
|
1532
|
-
) }) }),
|
|
1533
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "iz-table-modal-actions", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1534
|
-
Component,
|
|
1535
|
-
{
|
|
1536
|
-
content: import_lodash5.default.concat(import_lodash5.default.map(actions, (data) => ({
|
|
1537
|
-
type: "Button",
|
|
1538
|
-
props: {
|
|
1539
|
-
...actions_default[data.icon] || {},
|
|
1540
|
-
onClick: data.function
|
|
1541
|
-
}
|
|
1542
|
-
})), {
|
|
1543
|
-
type: "Button",
|
|
1544
|
-
props: {
|
|
1545
|
-
label: "fechar",
|
|
1546
|
-
outline: true,
|
|
1547
|
-
onClick: onClose
|
|
1548
|
-
}
|
|
1549
|
-
})
|
|
1550
|
-
}
|
|
1551
|
-
) })
|
|
1552
|
-
] }) })
|
|
1553
|
-
}
|
|
1554
|
-
}]
|
|
1555
|
-
}
|
|
1556
|
-
);
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
// components/types/table/index.tsx
|
|
1560
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1561
|
-
function Table(props) {
|
|
1562
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1563
|
-
const theme = useTheme();
|
|
1564
|
-
const modal = useModal();
|
|
1565
|
-
const loading = ((_a = props.loading) == null ? void 0 : _a.is) || props.loading;
|
|
1566
|
-
(0, import_react5.useEffect)(() => {
|
|
1567
|
-
modal.add({ component: Modal, name: "table" });
|
|
1568
|
-
return () => modal.remove("table");
|
|
1569
|
-
}, []);
|
|
1570
|
-
const onShowLine = (key) => {
|
|
1571
|
-
if (window.innerWidth > Number(import_lodash6.default.replace(theme.content.mobileMaxWidth, "px", ""))) return;
|
|
1572
|
-
let content = {};
|
|
1573
|
-
import_lodash6.default.forEach(props.options, (data, index) => {
|
|
1574
|
-
var _a2, _b2;
|
|
1575
|
-
const column = ((_a2 = data.column) == null ? void 0 : _a2.name) || data.column;
|
|
1576
|
-
const columnName = !import_lodash6.default.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
|
|
1577
|
-
content[columnName] = columnName === "actions" ? (_b2 = data.row) == null ? void 0 : _b2.actions : renderRowContainer(props.content[key], data);
|
|
1578
|
-
});
|
|
1579
|
-
modal.setProps("table", { toggle: true, content });
|
|
1580
|
-
};
|
|
1581
|
-
const renderRowContainer = (data, option) => {
|
|
1582
|
-
var _a2, _b2, _c2, _d2;
|
|
1583
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1584
|
-
"div",
|
|
1585
|
-
{
|
|
1586
|
-
className: `
|
|
1587
|
-
iz-table-content
|
|
1588
|
-
${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "iz-table-action" : ""}
|
|
1589
|
-
${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "iz-table-identifier" : ""}
|
|
1590
|
-
`,
|
|
1591
|
-
style: import_lodash6.default.isFunction((_c2 = option.row) == null ? void 0 : _c2.style) ? option.row.style(data, option) : (_d2 = option.row) == null ? void 0 : _d2.style,
|
|
1592
|
-
children: renderRowContent(data, option)
|
|
1593
|
-
}
|
|
1594
|
-
);
|
|
1595
|
-
};
|
|
1596
|
-
const renderRowContent = (data, option) => {
|
|
1597
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
1598
|
-
if (!!((_a2 = option.row) == null ? void 0 : _a2.actions)) {
|
|
1599
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "iz-table-actions", children: import_lodash6.default.map(
|
|
1600
|
-
(_b2 = option.row) == null ? void 0 : _b2.actions,
|
|
1601
|
-
(action, index) => renderButton(action, data, index)
|
|
1602
|
-
) });
|
|
1603
|
-
}
|
|
1604
|
-
if ((_c2 = option.row) == null ? void 0 : _c2.icon) {
|
|
1605
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "iz-table-icon", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1606
|
-
"i",
|
|
1607
|
-
{
|
|
1608
|
-
"aria-hidden": true,
|
|
1609
|
-
className: import_lodash6.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"
|
|
1610
|
-
}
|
|
1611
|
-
) });
|
|
1612
|
-
}
|
|
1613
|
-
return renderRowText(data, option);
|
|
1614
|
-
};
|
|
1615
|
-
const renderButton = (action, data, index) => {
|
|
1616
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1617
|
-
"button",
|
|
1618
|
-
{
|
|
1619
|
-
className: `iz-table-button ${import_lodash6.default.includes(action.icon, "trash") ? "negative" : ""}`,
|
|
1620
|
-
onClick: () => action.function ? action.function(data) : null,
|
|
1621
|
-
disabled: action.disabled,
|
|
1622
|
-
"data-tooltip": action.tooltip,
|
|
1623
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" })
|
|
1624
|
-
},
|
|
1625
|
-
index
|
|
1626
|
-
);
|
|
1627
|
-
};
|
|
1628
|
-
const renderRowText = (data, option) => {
|
|
1629
|
-
const row = option.row || {};
|
|
1630
|
-
const content = data[row.name] || data;
|
|
1631
|
-
let body;
|
|
1632
|
-
while (!body) {
|
|
1633
|
-
if (import_lodash6.default.isString(row)) body = data[row];
|
|
1634
|
-
if (import_lodash6.default.isString(content)) body = content;
|
|
1635
|
-
if (import_lodash6.default.isFunction(row.mask)) body = row.mask(content);
|
|
1636
|
-
if (import_lodash6.default.isFunction(row.custom)) body = row.custom(content);
|
|
1637
|
-
body = body != null ? body : "---";
|
|
1638
|
-
}
|
|
1639
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1640
|
-
"div",
|
|
1641
|
-
{
|
|
1642
|
-
className: "iz-table-content-elipse",
|
|
1643
|
-
title: import_lodash6.default.isString(body) ? body : "",
|
|
1644
|
-
children: body
|
|
1645
|
-
}
|
|
1646
|
-
);
|
|
1647
|
-
};
|
|
1648
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Container2, { notFound: !((_b = props.content) == null ? void 0 : _b.length) && !props.loading, children: [
|
|
1649
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "iz-table-container", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("table", { children: [
|
|
1650
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: import_lodash6.default.map(
|
|
1651
|
-
props.options,
|
|
1652
|
-
(option, index) => {
|
|
1653
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
1654
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { style: (_a2 = option.column) == null ? void 0 : _a2.style, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1655
|
-
"div",
|
|
1656
|
-
{
|
|
1657
|
-
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 : ""}` : ""}`,
|
|
1658
|
-
children: !!((_g = option.column) == null ? void 0 : _g.action) ? renderButton(option.column.action) : import_lodash6.default.isString(((_h = option.column) == null ? void 0 : _h.name) || option.column) ? ((_i = option.column) == null ? void 0 : _i.name) || option.column : ""
|
|
1659
|
-
}
|
|
1660
|
-
) }, index);
|
|
1661
|
-
}
|
|
1662
|
-
) }) }),
|
|
1663
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tbody", { children: loading ? import_lodash6.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_runtime7.jsx)("tr", { children: import_lodash6.default.map(props.options, (data2, index) => {
|
|
1664
|
-
var _a2;
|
|
1665
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1666
|
-
LoadingBar,
|
|
1667
|
-
{
|
|
1668
|
-
height: "2.5rem",
|
|
1669
|
-
borderRadius: index === 0 ? "5px 0 0 5px" : ((_a2 = props.options) == null ? void 0 : _a2.length) - 1 === index ? "0 5px 5px 0" : "0",
|
|
1670
|
-
margin: key === 0 ? "1.5rem 0 0" : ".5rem 0 0"
|
|
1671
|
-
}
|
|
1672
|
-
) }, index);
|
|
1673
|
-
}) }, key)) : import_lodash6.default.map(props.content, (data, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: import_lodash6.default.map(props.options, (option, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { onClick: () => index < 2 ? onShowLine(key) : null, children: renderRowContainer(data, option) }, index)) }, key)) })
|
|
1674
|
-
] }) }),
|
|
1675
|
-
!((_d = props.content) == null ? void 0 : _d.length) && !props.loading && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "iz-table-not-found", children: [
|
|
1676
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: ((_e = props.notFound) == null ? void 0 : _e.title) || "Nenhuma campanha encontrado" }),
|
|
1677
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: ((_f = props.notFound) == null ? void 0 : _f.message) || "Envie uma campanha de marketing para aparecer algum registro" })
|
|
1678
|
-
] }),
|
|
1679
|
-
!!props.paginate && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Paginate, { ...props.paginate })
|
|
1680
|
-
] });
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
// components/types/loading/bar/styles.tsx
|
|
1684
|
-
var import_styled_components10 = __toESM(require("styled-components"));
|
|
1685
|
-
var Container5 = import_styled_components10.default.div`
|
|
1686
|
-
border-radius: ${(props) => props.borderRadius || "10px"};
|
|
1687
|
-
height: ${(props) => props.height || "100%"};
|
|
1688
|
-
width: ${(props) => props.width || "100%"};
|
|
1689
|
-
animation: loading infinite 2s;
|
|
1690
|
-
margin: ${(props) => props.margin || "0px"};
|
|
1691
|
-
|
|
1692
|
-
@keyframes loading {
|
|
1693
|
-
0% {
|
|
1694
|
-
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.05)" : "rgb(255, 255, 255, 0.05)"};
|
|
1695
|
-
}
|
|
1696
|
-
50% {
|
|
1697
|
-
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.10)" : "rgb(255, 255, 255, 0.15)"};
|
|
1698
|
-
}
|
|
1699
|
-
100% {
|
|
1700
|
-
background: ${(props) => !props.dark ? "rgb(0, 0, 0, 0.05)" : "rgb(255, 255, 255, 0.05)"};
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
`;
|
|
1704
|
-
|
|
1705
|
-
// components/types/loading/bar/index.tsx
|
|
1706
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1707
|
-
function LoadingBar(props) {
|
|
1708
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Container5, { ...props });
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
// components/types/loading/app/styles.tsx
|
|
1712
|
-
var import_styled_components11 = __toESM(require("styled-components"));
|
|
1713
|
-
var Container6 = import_styled_components11.default.div`
|
|
1714
|
-
width: ${({ initialization }) => initialization ? "100vw" : "100%"};
|
|
1715
|
-
height: ${({ initialization }) => initialization ? "100vh" : "calc(100vh - 15rem)"};
|
|
1716
|
-
display: flex;
|
|
1717
|
-
justify-content: center;
|
|
1718
|
-
align-items: center;
|
|
1719
|
-
position: ${({ initialization }) => initialization ? "absolute" : "relative"};;
|
|
1720
|
-
bottom: 0;
|
|
1721
|
-
left: 0;
|
|
1722
|
-
background: ${({ initialization, theme }) => initialization ? `${theme.maingrad}, ${theme.primary}` : "transparent"};
|
|
1723
|
-
z-index: ${({ initialization }) => initialization ? "9" : "0"};
|
|
1724
|
-
|
|
1725
|
-
.iz-loading-logo {
|
|
1726
|
-
font-size: 4rem;
|
|
1727
|
-
opacity: 40%;
|
|
1728
|
-
animation: loop 2s infinite;
|
|
1729
|
-
position: relative;
|
|
1730
|
-
|
|
1731
|
-
&::before {
|
|
1732
|
-
content: "";
|
|
1733
|
-
position: absolute;
|
|
1734
|
-
width: 5rem;
|
|
1735
|
-
height: 5rem;
|
|
1736
|
-
animation: firstImpact 2s .5s infinite ease;
|
|
1737
|
-
background: ${({ theme }) => theme.t05};
|
|
1738
|
-
border-radius: 50%;
|
|
1739
|
-
z-index: 0;
|
|
1740
|
-
opacity: 0;
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
&::after {
|
|
907
|
+
&::after {
|
|
1744
908
|
content: "";
|
|
1745
909
|
position: absolute;
|
|
1746
910
|
width: 5rem;
|
|
@@ -1797,8 +961,8 @@ var Container6 = import_styled_components11.default.div`
|
|
|
1797
961
|
`;
|
|
1798
962
|
|
|
1799
963
|
// components/types/logo/styles.tsx
|
|
1800
|
-
|
|
1801
|
-
var
|
|
964
|
+
import styled5 from "styled-components";
|
|
965
|
+
var Container5 = styled5.div`
|
|
1802
966
|
display: flex;
|
|
1803
967
|
align-items: center;
|
|
1804
968
|
justify-content: center;
|
|
@@ -1817,23 +981,23 @@ var Container7 = import_styled_components12.default.div`
|
|
|
1817
981
|
`;
|
|
1818
982
|
|
|
1819
983
|
// components/types/logo/index.tsx
|
|
1820
|
-
|
|
984
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
1821
985
|
function Logo(props) {
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */ (
|
|
1824
|
-
!props.onlyPrefix && /* @__PURE__ */ (
|
|
986
|
+
return /* @__PURE__ */ jsxs(Container5, { ...props, children: [
|
|
987
|
+
/* @__PURE__ */ jsx2("label", { children: "IZ" }),
|
|
988
|
+
!props.onlyPrefix && /* @__PURE__ */ jsx2("label", { children: "Way" })
|
|
1825
989
|
] });
|
|
1826
990
|
}
|
|
1827
991
|
|
|
1828
992
|
// components/types/loading/app/index.tsx
|
|
1829
|
-
|
|
993
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1830
994
|
function LoadingApp(props) {
|
|
1831
|
-
return /* @__PURE__ */ (
|
|
995
|
+
return /* @__PURE__ */ jsx3(Container4, { ...props, children: /* @__PURE__ */ jsx3(Logo, { className: "iz-loading-logo", onlyPrefix: true }) });
|
|
1832
996
|
}
|
|
1833
997
|
|
|
1834
998
|
// components/types/modal/styles.tsx
|
|
1835
|
-
|
|
1836
|
-
var
|
|
999
|
+
import styled6 from "styled-components";
|
|
1000
|
+
var Container6 = styled6.div`
|
|
1837
1001
|
width: 100%;
|
|
1838
1002
|
height: 100%;
|
|
1839
1003
|
top: 0;
|
|
@@ -1942,89 +1106,354 @@ var Container8 = import_styled_components13.default.div`
|
|
|
1942
1106
|
}
|
|
1943
1107
|
}
|
|
1944
1108
|
|
|
1945
|
-
.iz-modal-buttons {
|
|
1946
|
-
padding: 1rem 2rem;
|
|
1109
|
+
.iz-modal-buttons {
|
|
1110
|
+
padding: 1rem 2rem;
|
|
1111
|
+
|
|
1112
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
1113
|
+
padding: 1rem 2rem 2rem;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
button {
|
|
1117
|
+
width: 100%;
|
|
1118
|
+
margin-bottom: .5rem;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
button:last-child {
|
|
1122
|
+
margin-bottom: 0;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
`;
|
|
1127
|
+
|
|
1128
|
+
// components/types/modal/index.tsx
|
|
1129
|
+
import _ from "lodash";
|
|
1130
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1131
|
+
function Modal(props) {
|
|
1132
|
+
var _a, _b, _c;
|
|
1133
|
+
return /* @__PURE__ */ jsxs2(Container6, { ...props, position: props.position || "center", children: [
|
|
1134
|
+
/* @__PURE__ */ jsx4("div", { className: "iz-modal-back", onClick: props.onClose }),
|
|
1135
|
+
/* @__PURE__ */ jsxs2("div", { className: "iz-modal-container", children: [
|
|
1136
|
+
(!!props.title || !!props.header) && /* @__PURE__ */ jsxs2("div", { className: "iz-modal-header", children: [
|
|
1137
|
+
/* @__PURE__ */ jsxs2("div", { className: "iz-modal-title", children: [
|
|
1138
|
+
((_a = props.header) == null ? void 0 : _a.icon) && /* @__PURE__ */ jsx4("i", { "aria-hidden": true, className: (_b = props.header) == null ? void 0 : _b.icon }),
|
|
1139
|
+
/* @__PURE__ */ jsx4("span", { children: props.title || ((_c = props.header) == null ? void 0 : _c.title) })
|
|
1140
|
+
] }),
|
|
1141
|
+
/* @__PURE__ */ jsx4("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
1142
|
+
] }),
|
|
1143
|
+
/* @__PURE__ */ jsxs2("div", { className: "iz-modal-content", children: [
|
|
1144
|
+
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ jsx4("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ jsx4("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
1145
|
+
props.children
|
|
1146
|
+
] }),
|
|
1147
|
+
props.buttons && /* @__PURE__ */ jsx4("div", { className: "iz-modal-buttons", children: _.map(
|
|
1148
|
+
props.buttons,
|
|
1149
|
+
(button, index) => /* @__PURE__ */ jsx4(Button, { ...button }, index)
|
|
1150
|
+
) })
|
|
1151
|
+
] })
|
|
1152
|
+
] });
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
// components/types/badge/styles.tsx
|
|
1156
|
+
import styled7 from "styled-components";
|
|
1157
|
+
var Container7 = styled7.div`
|
|
1158
|
+
.content {
|
|
1159
|
+
display: inline-flex;
|
|
1160
|
+
align-items: center;
|
|
1161
|
+
justify-content: center;
|
|
1162
|
+
height: 1.8rem;
|
|
1163
|
+
padding: 0 2rem;
|
|
1164
|
+
position: relative;
|
|
1165
|
+
|
|
1166
|
+
div {
|
|
1167
|
+
position: relative;
|
|
1168
|
+
z-index: 1;
|
|
1169
|
+
color: ${({ theme, color }) => theme[color]};
|
|
1170
|
+
font-size: .8rem;
|
|
1171
|
+
font-weight: 500;
|
|
1172
|
+
text-transform: capitalize;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
&:before {
|
|
1176
|
+
content: "";
|
|
1177
|
+
position: absolute;
|
|
1178
|
+
top: 0;
|
|
1179
|
+
left: 0;
|
|
1180
|
+
width: 100%;
|
|
1181
|
+
height: 100%;
|
|
1182
|
+
border-radius: 5px;
|
|
1183
|
+
background: ${({ theme, color }) => theme[color]};
|
|
1184
|
+
opacity: .2;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
`;
|
|
1188
|
+
|
|
1189
|
+
// contexts/icon/index.tsx
|
|
1190
|
+
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect2, useState as useState2 } from "react";
|
|
1191
|
+
|
|
1192
|
+
// contexts/theme/index.tsx
|
|
1193
|
+
import { createContext, useContext, useState } from "react";
|
|
1194
|
+
import { ThemeProvider } from "styled-components";
|
|
1195
|
+
|
|
1196
|
+
// contexts/theme/styles.tsx
|
|
1197
|
+
import styled8 from "styled-components";
|
|
1198
|
+
var Switcher = styled8.div`
|
|
1199
|
+
width: 3rem;
|
|
1200
|
+
height: 1.5rem;
|
|
1201
|
+
border-radius: 1rem;
|
|
1202
|
+
border: 2px solid ${({ theme }) => theme.t05};
|
|
1203
|
+
overflow: hidden;
|
|
1204
|
+
display: flex;
|
|
1205
|
+
align-items: center;
|
|
1206
|
+
cursor: pointer;
|
|
1207
|
+
position: relative;
|
|
1208
|
+
|
|
1209
|
+
i {
|
|
1210
|
+
color: ${({ theme }) => theme.t6};
|
|
1211
|
+
position: absolute;
|
|
1212
|
+
transform: translateY(-50%);
|
|
1213
|
+
font-size: .9rem;
|
|
1214
|
+
z-index: 0;
|
|
1215
|
+
transition: ease .8s;
|
|
1216
|
+
|
|
1217
|
+
&:first-child {
|
|
1218
|
+
left: .2rem;
|
|
1219
|
+
top: 50%;
|
|
1220
|
+
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
&:last-child {
|
|
1224
|
+
right: .2rem;
|
|
1225
|
+
top: 50%;
|
|
1226
|
+
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
.switcher {
|
|
1231
|
+
width: 1rem;
|
|
1232
|
+
height: 1rem;
|
|
1233
|
+
border-radius: 1rem;
|
|
1234
|
+
position: relative;
|
|
1235
|
+
transition: ease .3s;
|
|
1236
|
+
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
1237
|
+
z-index: 1;
|
|
1238
|
+
|
|
1239
|
+
div {
|
|
1240
|
+
width: 100%;
|
|
1241
|
+
height: 100%;
|
|
1242
|
+
background: ${({ theme }) => theme.primary};
|
|
1243
|
+
border-radius: 1rem;
|
|
1244
|
+
position: relative;
|
|
1245
|
+
z-index: 2;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
&:after {
|
|
1249
|
+
content: "";
|
|
1250
|
+
position: absolute;
|
|
1251
|
+
width: 100%;
|
|
1252
|
+
height: 100%;
|
|
1253
|
+
border-radius: 1rem;
|
|
1254
|
+
transform: scale(1.8);
|
|
1255
|
+
background: ${({ theme }) => theme.t05};
|
|
1256
|
+
top: 0;
|
|
1257
|
+
left: 0;
|
|
1258
|
+
z-index: 1;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
&:before {
|
|
1262
|
+
content: "";
|
|
1263
|
+
position: absolute;
|
|
1264
|
+
width: 100%;
|
|
1265
|
+
height: 100%;
|
|
1266
|
+
border-radius: 1rem;
|
|
1267
|
+
transform: scale(3);
|
|
1268
|
+
background: ${({ theme }) => theme.t05};
|
|
1269
|
+
top: 0;
|
|
1270
|
+
left: 0;
|
|
1271
|
+
z-index: 0;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
`;
|
|
1275
|
+
|
|
1276
|
+
// contexts/theme/content.tsx
|
|
1277
|
+
var CommonTheme = {
|
|
1278
|
+
secondary: "#5869da",
|
|
1279
|
+
tertiary: "#629dfd33",
|
|
1280
|
+
positive: "#65c965",
|
|
1281
|
+
negative: "#FF334E",
|
|
1282
|
+
mobileMaxWidth: "650px",
|
|
1283
|
+
mobileMinWidth: "315px"
|
|
1284
|
+
};
|
|
1285
|
+
var Themes = {
|
|
1286
|
+
light: {
|
|
1287
|
+
primary: "#ffffff",
|
|
1288
|
+
reverse: "#353535",
|
|
1289
|
+
tooltip: "#f2f2f2",
|
|
1290
|
+
t8: "#000000cc",
|
|
1291
|
+
t7: "#000000b3",
|
|
1292
|
+
t6: "#00000099",
|
|
1293
|
+
t5: "#00000080",
|
|
1294
|
+
t4: "#00000066",
|
|
1295
|
+
t3: "#0000004d",
|
|
1296
|
+
t2: "#00000033",
|
|
1297
|
+
t1: "#0000001a",
|
|
1298
|
+
t08: "#00000014",
|
|
1299
|
+
t05: "#0000000d",
|
|
1300
|
+
t03: "#00000007",
|
|
1301
|
+
t02: "#00000005",
|
|
1302
|
+
t01: "#00000002",
|
|
1303
|
+
lgrad: `linear-gradient(
|
|
1304
|
+
to right,
|
|
1305
|
+
#dadef7 0%,
|
|
1306
|
+
#dee2f8 5%,
|
|
1307
|
+
#e2e5f9 10%,
|
|
1308
|
+
#e6e9fa 20%,
|
|
1309
|
+
#eaedfb 30%,
|
|
1310
|
+
#eff0fb 60%,
|
|
1311
|
+
#f3f4fc 80%,
|
|
1312
|
+
#f7f8fd 90%,
|
|
1313
|
+
#fbfbfe 100%
|
|
1314
|
+
)`,
|
|
1315
|
+
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
1316
|
+
...CommonTheme
|
|
1317
|
+
},
|
|
1318
|
+
dark: {
|
|
1319
|
+
primary: "#333333",
|
|
1320
|
+
reverse: "#b45252",
|
|
1321
|
+
tooltip: "#3d3d3d",
|
|
1322
|
+
t8: "#ffffffcc",
|
|
1323
|
+
t7: "#ffffffb3",
|
|
1324
|
+
t6: "#ffffff99",
|
|
1325
|
+
t5: "#ffffff80",
|
|
1326
|
+
t4: "#ffffff66",
|
|
1327
|
+
t3: "#ffffff4d",
|
|
1328
|
+
t2: "#ffffff33",
|
|
1329
|
+
t1: "#ffffff1a",
|
|
1330
|
+
t08: "#ffffff14",
|
|
1331
|
+
t05: "#ffffff0d",
|
|
1332
|
+
t03: "#ffffff07",
|
|
1333
|
+
t02: "#ffffff05",
|
|
1334
|
+
t01: "#ffffff02",
|
|
1335
|
+
lgrad: `linear-gradient(
|
|
1336
|
+
to right,
|
|
1337
|
+
#3d485c 0%,
|
|
1338
|
+
#3c4657 5%,
|
|
1339
|
+
#3b4353 10%,
|
|
1340
|
+
#3a414e 20%,
|
|
1341
|
+
#393f4a 30%,
|
|
1342
|
+
#373c45 60%,
|
|
1343
|
+
#363a41 80%,
|
|
1344
|
+
#35383c 90%,
|
|
1345
|
+
#343538 100%
|
|
1346
|
+
)`,
|
|
1347
|
+
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
1348
|
+
...CommonTheme
|
|
1349
|
+
}
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
// contexts/theme/index.tsx
|
|
1353
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1354
|
+
var ThemeContext = createContext({});
|
|
1355
|
+
var useTheme = () => useContext(ThemeContext);
|
|
1947
1356
|
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
}
|
|
1357
|
+
// contexts/icon/index.tsx
|
|
1358
|
+
import _2 from "lodash";
|
|
1951
1359
|
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1360
|
+
// contexts/icon/assets/brands/index.tsx
|
|
1361
|
+
var req = __require.context("./", false, /\.svg$/);
|
|
1362
|
+
var brands = {};
|
|
1363
|
+
req.keys().forEach((key) => {
|
|
1364
|
+
const name = key.replace("./", "").replace(".svg", "");
|
|
1365
|
+
brands[name] = req(key).default;
|
|
1366
|
+
});
|
|
1956
1367
|
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1368
|
+
// contexts/icon/assets/regular/index.tsx
|
|
1369
|
+
var req2 = __require.context("./", false, /\.svg$/);
|
|
1370
|
+
var regular = {};
|
|
1371
|
+
req2.keys().forEach((key) => {
|
|
1372
|
+
const name = key.replace("./", "").replace(".svg", "");
|
|
1373
|
+
regular[name] = req2(key).default;
|
|
1374
|
+
});
|
|
1963
1375
|
|
|
1964
|
-
//
|
|
1965
|
-
var
|
|
1966
|
-
var
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "iz-modal-container", children: [
|
|
1972
|
-
(!!props.title || !!props.header) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "iz-modal-header", children: [
|
|
1973
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "iz-modal-title", children: [
|
|
1974
|
-
((_a = props.header) == null ? void 0 : _a.icon) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("i", { "aria-hidden": true, className: (_b = props.header) == null ? void 0 : _b.icon }),
|
|
1975
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: props.title || ((_c = props.header) == null ? void 0 : _c.title) })
|
|
1976
|
-
] }),
|
|
1977
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
1978
|
-
] }),
|
|
1979
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "iz-modal-content", children: [
|
|
1980
|
-
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
1981
|
-
props.children
|
|
1982
|
-
] }),
|
|
1983
|
-
props.buttons && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "iz-modal-buttons", children: import_lodash7.default.map(
|
|
1984
|
-
props.buttons,
|
|
1985
|
-
(button, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ...button }, index)
|
|
1986
|
-
) })
|
|
1987
|
-
] })
|
|
1988
|
-
] });
|
|
1989
|
-
}
|
|
1376
|
+
// contexts/icon/assets/solid/index.tsx
|
|
1377
|
+
var req3 = __require.context("./", false, /\.svg$/);
|
|
1378
|
+
var solid = {};
|
|
1379
|
+
req3.keys().forEach((key) => {
|
|
1380
|
+
const name = key.replace("./", "").replace(".svg", "");
|
|
1381
|
+
solid[name] = req3(key).default;
|
|
1382
|
+
});
|
|
1990
1383
|
|
|
1991
|
-
//
|
|
1992
|
-
|
|
1993
|
-
var
|
|
1994
|
-
.content {
|
|
1995
|
-
display: inline-flex;
|
|
1996
|
-
align-items: center;
|
|
1997
|
-
justify-content: center;
|
|
1998
|
-
height: 1.8rem;
|
|
1999
|
-
padding: 0 2rem;
|
|
2000
|
-
position: relative;
|
|
1384
|
+
// contexts/icon/index.tsx
|
|
1385
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1386
|
+
var IconContext = createContext2({});
|
|
2001
1387
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1388
|
+
// contexts/tooltip/index.tsx
|
|
1389
|
+
import { createContext as createContext3, useContext as useContext3, useEffect as useEffect3, useState as useState3 } from "react";
|
|
1390
|
+
|
|
1391
|
+
// contexts/tooltip/styles.tsx
|
|
1392
|
+
import styled9 from "styled-components";
|
|
1393
|
+
var Tooltip = styled9.div`
|
|
1394
|
+
position: fixed;
|
|
1395
|
+
background: ${({ theme }) => theme.tooltip};
|
|
1396
|
+
color: ${({ theme }) => theme.t6};
|
|
1397
|
+
font-size: .8rem;
|
|
1398
|
+
font-weight: 500;
|
|
1399
|
+
text-align: center;
|
|
1400
|
+
padding: .3rem .8rem;
|
|
1401
|
+
border-radius: 5px;
|
|
1402
|
+
transform: translateX(-50%);
|
|
1403
|
+
z-index: 10;
|
|
1404
|
+
border: 1px solid ${({ theme }) => theme.t05};
|
|
1405
|
+
|
|
1406
|
+
&::before {
|
|
1407
|
+
content: "";
|
|
1408
|
+
position: absolute;
|
|
1409
|
+
bottom: -9px;
|
|
1410
|
+
left: 50%;
|
|
1411
|
+
transform: translateX(-50%);
|
|
1412
|
+
width: 0;
|
|
1413
|
+
height: 0;
|
|
1414
|
+
border-left: 8px solid transparent;
|
|
1415
|
+
border-right: 8px solid transparent;
|
|
1416
|
+
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
2009
1417
|
}
|
|
2010
1418
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
1419
|
+
&::after {
|
|
1420
|
+
content: "";
|
|
1421
|
+
position: absolute;
|
|
1422
|
+
bottom: -8px;
|
|
1423
|
+
left: 50%;
|
|
1424
|
+
transform: translateX(-50%);
|
|
1425
|
+
width: 0;
|
|
1426
|
+
height: 0;
|
|
1427
|
+
border-left: 8px solid transparent;
|
|
1428
|
+
border-right: 8px solid transparent;
|
|
1429
|
+
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
2021
1430
|
}
|
|
2022
|
-
}
|
|
2023
1431
|
`;
|
|
2024
1432
|
|
|
1433
|
+
// contexts/tooltip/index.tsx
|
|
1434
|
+
import _3 from "lodash";
|
|
1435
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1436
|
+
var TooltipContext = createContext3({});
|
|
1437
|
+
|
|
1438
|
+
// contexts/modal/index.tsx
|
|
1439
|
+
import { createContext as createContext4, useContext as useContext4, useEffect as useEffect4, useState as useState4 } from "react";
|
|
1440
|
+
import { usePathname } from "next/navigation";
|
|
1441
|
+
|
|
1442
|
+
// contexts/modal/styles.tsx
|
|
1443
|
+
import styled10 from "styled-components";
|
|
1444
|
+
var Container8 = styled10.div`
|
|
1445
|
+
|
|
1446
|
+
`;
|
|
1447
|
+
|
|
1448
|
+
// contexts/modal/index.tsx
|
|
1449
|
+
import _4 from "lodash";
|
|
1450
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1451
|
+
var ModalContext = createContext4({});
|
|
1452
|
+
var useModal = () => useContext4(ModalContext);
|
|
1453
|
+
|
|
2025
1454
|
// components/types/badge/index.tsx
|
|
2026
|
-
|
|
2027
|
-
|
|
1455
|
+
import _5 from "lodash";
|
|
1456
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2028
1457
|
function Badge(props) {
|
|
2029
1458
|
const { content } = useTheme();
|
|
2030
1459
|
const status = {
|
|
@@ -2034,15 +1463,15 @@ function Badge(props) {
|
|
|
2034
1463
|
INSTAVEL: "negative",
|
|
2035
1464
|
REGULAR: "negative"
|
|
2036
1465
|
};
|
|
2037
|
-
return /* @__PURE__ */ (
|
|
1466
|
+
return /* @__PURE__ */ jsx9(Container7, { color: status[props.value] || content.t3, children: /* @__PURE__ */ jsx9("div", { className: "content", children: /* @__PURE__ */ jsx9("div", { children: _5.lowerCase(props.value) }) }) });
|
|
2038
1467
|
}
|
|
2039
1468
|
|
|
2040
1469
|
// components/types/form/index.tsx
|
|
2041
|
-
|
|
1470
|
+
import React8, { useEffect as useEffect5, useRef as useRef2 } from "react";
|
|
2042
1471
|
|
|
2043
1472
|
// components/types/form/styles.tsx
|
|
2044
|
-
|
|
2045
|
-
var
|
|
1473
|
+
import styled11 from "styled-components";
|
|
1474
|
+
var Container9 = styled11.form`
|
|
2046
1475
|
width: 100%;
|
|
2047
1476
|
|
|
2048
1477
|
.form-buttons {
|
|
@@ -2057,10 +1486,10 @@ var Container10 = import_styled_components15.default.form`
|
|
|
2057
1486
|
`;
|
|
2058
1487
|
|
|
2059
1488
|
// components/types/form/index.tsx
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
1489
|
+
import { z } from "zod";
|
|
1490
|
+
import { useForm } from "react-hook-form";
|
|
1491
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
1492
|
+
import _11 from "lodash";
|
|
2064
1493
|
|
|
2065
1494
|
// components/types/form/types/index.tsx
|
|
2066
1495
|
var types_exports = {};
|
|
@@ -2075,11 +1504,11 @@ __export(types_exports, {
|
|
|
2075
1504
|
});
|
|
2076
1505
|
|
|
2077
1506
|
// components/types/form/types/file/index.tsx
|
|
2078
|
-
|
|
1507
|
+
import { useRef } from "react";
|
|
2079
1508
|
|
|
2080
1509
|
// components/types/form/types/file/styles.tsx
|
|
2081
|
-
|
|
2082
|
-
var
|
|
1510
|
+
import styled12 from "styled-components";
|
|
1511
|
+
var Container10 = styled12.div`
|
|
2083
1512
|
width: 100%;
|
|
2084
1513
|
padding-top: .3rem;
|
|
2085
1514
|
|
|
@@ -2106,31 +1535,31 @@ var Container11 = import_styled_components16.default.div`
|
|
|
2106
1535
|
`;
|
|
2107
1536
|
|
|
2108
1537
|
// components/types/form/types/label/styles.tsx
|
|
2109
|
-
|
|
2110
|
-
var
|
|
1538
|
+
import styled13 from "styled-components";
|
|
1539
|
+
var Container11 = styled13.label`
|
|
2111
1540
|
font-size: .8rem;
|
|
2112
1541
|
font-weight: 500;
|
|
2113
1542
|
color: ${({ theme }) => theme.t6};
|
|
2114
1543
|
`;
|
|
2115
1544
|
|
|
2116
1545
|
// components/types/form/types/label/index.tsx
|
|
2117
|
-
|
|
1546
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2118
1547
|
function InputLabel(props) {
|
|
2119
|
-
return /* @__PURE__ */ (
|
|
1548
|
+
return /* @__PURE__ */ jsx10(Container11, { className: props.className, children: props.children });
|
|
2120
1549
|
}
|
|
2121
1550
|
|
|
2122
1551
|
// components/types/form/types/file/index.tsx
|
|
2123
|
-
|
|
1552
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2124
1553
|
function InputFile(props) {
|
|
2125
1554
|
var _a;
|
|
2126
|
-
const inputRef =
|
|
1555
|
+
const inputRef = useRef({});
|
|
2127
1556
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
2128
1557
|
const readImage = (data) => {
|
|
2129
1558
|
if (props.onPreview) props.onPreview(URL.createObjectURL(data));
|
|
2130
1559
|
if (props.onChange) props.onChange(data);
|
|
2131
1560
|
};
|
|
2132
|
-
return /* @__PURE__ */ (
|
|
2133
|
-
/* @__PURE__ */ (
|
|
1561
|
+
return /* @__PURE__ */ jsxs6(Container10, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
1562
|
+
/* @__PURE__ */ jsx11(
|
|
2134
1563
|
"input",
|
|
2135
1564
|
{
|
|
2136
1565
|
hidden: true,
|
|
@@ -2151,21 +1580,21 @@ function InputFile(props) {
|
|
|
2151
1580
|
}
|
|
2152
1581
|
}
|
|
2153
1582
|
),
|
|
2154
|
-
!!props.label && /* @__PURE__ */ (
|
|
1583
|
+
!!props.label && /* @__PURE__ */ jsxs6(InputLabel, { children: [
|
|
2155
1584
|
props.label,
|
|
2156
1585
|
props.required ? "*" : ""
|
|
2157
1586
|
] }),
|
|
2158
|
-
/* @__PURE__ */ (
|
|
2159
|
-
!!props.error && /* @__PURE__ */ (
|
|
1587
|
+
/* @__PURE__ */ jsx11("div", { className: "iz-image-content", onClick: () => inputRef.current.click(), children: ((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) || "selecione uma imagem" }),
|
|
1588
|
+
!!props.error && /* @__PURE__ */ jsx11("div", { className: "iz-input-error", children: props.error })
|
|
2160
1589
|
] });
|
|
2161
1590
|
}
|
|
2162
1591
|
|
|
2163
1592
|
// components/types/form/types/input/index.tsx
|
|
2164
|
-
|
|
1593
|
+
import { useState as useState5 } from "react";
|
|
2165
1594
|
|
|
2166
1595
|
// components/types/form/types/input/styles.tsx
|
|
2167
|
-
|
|
2168
|
-
var
|
|
1596
|
+
import styled14 from "styled-components";
|
|
1597
|
+
var Container12 = styled14.div`
|
|
2169
1598
|
width: 100%;
|
|
2170
1599
|
padding-top: .3rem;
|
|
2171
1600
|
|
|
@@ -2211,10 +1640,10 @@ var Container13 = import_styled_components18.default.div`
|
|
|
2211
1640
|
`;
|
|
2212
1641
|
|
|
2213
1642
|
// components/types/form/types/input/index.tsx
|
|
2214
|
-
|
|
2215
|
-
|
|
1643
|
+
import _6 from "lodash";
|
|
1644
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2216
1645
|
function InputText(props) {
|
|
2217
|
-
const [showPassword, setShowPassword] = (
|
|
1646
|
+
const [showPassword, setShowPassword] = useState5(false);
|
|
2218
1647
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
2219
1648
|
const onChange = (event) => {
|
|
2220
1649
|
const value = event.target.value || "";
|
|
@@ -2222,16 +1651,16 @@ function InputText(props) {
|
|
|
2222
1651
|
if (register.onChange) register.onChange(event);
|
|
2223
1652
|
if (props.onChange) props.onChange(value);
|
|
2224
1653
|
};
|
|
2225
|
-
return /* @__PURE__ */ (
|
|
2226
|
-
!!props.label && /* @__PURE__ */ (
|
|
1654
|
+
return /* @__PURE__ */ jsxs7(Container12, { className: props.className, error: props.error, password: props.type === "password", children: [
|
|
1655
|
+
!!props.label && /* @__PURE__ */ jsxs7(InputLabel, { children: [
|
|
2227
1656
|
props.label,
|
|
2228
1657
|
props.required ? "*" : ""
|
|
2229
1658
|
] }),
|
|
2230
|
-
/* @__PURE__ */ (
|
|
2231
|
-
/* @__PURE__ */ (
|
|
1659
|
+
/* @__PURE__ */ jsxs7("div", { className: "iz-input-content", children: [
|
|
1660
|
+
/* @__PURE__ */ jsx12(
|
|
2232
1661
|
"input",
|
|
2233
1662
|
{
|
|
2234
|
-
...
|
|
1663
|
+
..._6.omit(props, ["className", "register", "mask"]),
|
|
2235
1664
|
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
2236
1665
|
maxLength: props.maxLength || 255,
|
|
2237
1666
|
onFocus: () => {
|
|
@@ -2241,7 +1670,7 @@ function InputText(props) {
|
|
|
2241
1670
|
onChange
|
|
2242
1671
|
}
|
|
2243
1672
|
),
|
|
2244
|
-
props.type === "password" && /* @__PURE__ */ (
|
|
1673
|
+
props.type === "password" && /* @__PURE__ */ jsx12(
|
|
2245
1674
|
"i",
|
|
2246
1675
|
{
|
|
2247
1676
|
"aria-hidden": true,
|
|
@@ -2250,16 +1679,16 @@ function InputText(props) {
|
|
|
2250
1679
|
}
|
|
2251
1680
|
)
|
|
2252
1681
|
] }),
|
|
2253
|
-
!!props.error && /* @__PURE__ */ (
|
|
1682
|
+
!!props.error && /* @__PURE__ */ jsx12("div", { className: "iz-input-error", children: props.error })
|
|
2254
1683
|
] });
|
|
2255
1684
|
}
|
|
2256
1685
|
|
|
2257
1686
|
// components/types/form/types/select/index.tsx
|
|
2258
|
-
|
|
1687
|
+
import { useState as useState6 } from "react";
|
|
2259
1688
|
|
|
2260
1689
|
// components/types/form/types/select/styles.tsx
|
|
2261
|
-
|
|
2262
|
-
var
|
|
1690
|
+
import styled15 from "styled-components";
|
|
1691
|
+
var Container13 = styled15.div`
|
|
2263
1692
|
width: 100%;
|
|
2264
1693
|
padding-top: .3rem;
|
|
2265
1694
|
|
|
@@ -2311,26 +1740,26 @@ var Container14 = import_styled_components19.default.div`
|
|
|
2311
1740
|
`;
|
|
2312
1741
|
|
|
2313
1742
|
// components/types/form/types/select/index.tsx
|
|
2314
|
-
|
|
2315
|
-
|
|
1743
|
+
import _7 from "lodash";
|
|
1744
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2316
1745
|
function InputSelect(props) {
|
|
2317
|
-
const [focus, setFocus] = (
|
|
1746
|
+
const [focus, setFocus] = useState6(false);
|
|
2318
1747
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
2319
1748
|
const onChange = (event) => {
|
|
2320
1749
|
const value = event.target.value || "";
|
|
2321
1750
|
if (register.onChange) register.onChange(event);
|
|
2322
1751
|
if (props.onChange) props.onChange(value);
|
|
2323
1752
|
};
|
|
2324
|
-
return /* @__PURE__ */ (
|
|
2325
|
-
!!props.label && /* @__PURE__ */ (
|
|
1753
|
+
return /* @__PURE__ */ jsxs8(Container13, { className: props.className, error: props.error, children: [
|
|
1754
|
+
!!props.label && /* @__PURE__ */ jsxs8(InputLabel, { children: [
|
|
2326
1755
|
props.label,
|
|
2327
1756
|
props.required ? "*" : ""
|
|
2328
1757
|
] }),
|
|
2329
|
-
/* @__PURE__ */ (
|
|
2330
|
-
/* @__PURE__ */ (
|
|
1758
|
+
/* @__PURE__ */ jsxs8("div", { className: "iz-input-content", children: [
|
|
1759
|
+
/* @__PURE__ */ jsx13(
|
|
2331
1760
|
"select",
|
|
2332
1761
|
{
|
|
2333
|
-
...
|
|
1762
|
+
..._7.omit(props, ["className", "onChange", "onFocus", "options", "onMouseDown", "onBlur", "maxLength", "required", "register"]),
|
|
2334
1763
|
onMouseDown: () => setFocus(!focus),
|
|
2335
1764
|
onFocus: () => {
|
|
2336
1765
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -2341,9 +1770,9 @@ function InputSelect(props) {
|
|
|
2341
1770
|
setFocus(false);
|
|
2342
1771
|
},
|
|
2343
1772
|
onChange,
|
|
2344
|
-
children:
|
|
1773
|
+
children: _7.map(
|
|
2345
1774
|
props.options,
|
|
2346
|
-
(data, index) => /* @__PURE__ */ (
|
|
1775
|
+
(data, index) => /* @__PURE__ */ jsx13(
|
|
2347
1776
|
"option",
|
|
2348
1777
|
{
|
|
2349
1778
|
value: Object.keys(data),
|
|
@@ -2354,15 +1783,15 @@ function InputSelect(props) {
|
|
|
2354
1783
|
)
|
|
2355
1784
|
}
|
|
2356
1785
|
),
|
|
2357
|
-
/* @__PURE__ */ (
|
|
1786
|
+
/* @__PURE__ */ jsx13("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" })
|
|
2358
1787
|
] }),
|
|
2359
|
-
!!props.error && /* @__PURE__ */ (
|
|
1788
|
+
!!props.error && /* @__PURE__ */ jsx13("div", { className: "iz-input-error", children: props.error })
|
|
2360
1789
|
] });
|
|
2361
1790
|
}
|
|
2362
1791
|
|
|
2363
1792
|
// components/types/form/types/button/styles.tsx
|
|
2364
|
-
|
|
2365
|
-
var
|
|
1793
|
+
import styled16 from "styled-components";
|
|
1794
|
+
var Container14 = styled16.button`
|
|
2366
1795
|
border-radius: 5px;
|
|
2367
1796
|
font-size: .8rem;
|
|
2368
1797
|
font-weight: 500;
|
|
@@ -2403,8 +1832,8 @@ var Container15 = import_styled_components20.default.button`
|
|
|
2403
1832
|
`;
|
|
2404
1833
|
|
|
2405
1834
|
// components/types/form/types/button/loading/styles.tsx
|
|
2406
|
-
|
|
2407
|
-
var
|
|
1835
|
+
import styled17 from "styled-components";
|
|
1836
|
+
var Container15 = styled17.div`
|
|
2408
1837
|
display: flex;
|
|
2409
1838
|
justify-content: space-between;
|
|
2410
1839
|
align-items: center;
|
|
@@ -2492,37 +1921,37 @@ var Container16 = import_styled_components21.default.div`
|
|
|
2492
1921
|
`;
|
|
2493
1922
|
|
|
2494
1923
|
// components/types/form/types/button/loading/index.tsx
|
|
2495
|
-
|
|
1924
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2496
1925
|
function Loading() {
|
|
2497
|
-
return /* @__PURE__ */ (
|
|
2498
|
-
/* @__PURE__ */ (
|
|
2499
|
-
/* @__PURE__ */ (
|
|
2500
|
-
/* @__PURE__ */ (
|
|
1926
|
+
return /* @__PURE__ */ jsxs9(Container15, { children: [
|
|
1927
|
+
/* @__PURE__ */ jsx14("div", {}),
|
|
1928
|
+
/* @__PURE__ */ jsx14("div", {}),
|
|
1929
|
+
/* @__PURE__ */ jsx14("div", {})
|
|
2501
1930
|
] });
|
|
2502
1931
|
}
|
|
2503
1932
|
|
|
2504
1933
|
// components/types/form/types/button/index.tsx
|
|
2505
|
-
|
|
2506
|
-
|
|
1934
|
+
import _8 from "lodash";
|
|
1935
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2507
1936
|
function Button(props) {
|
|
2508
|
-
return /* @__PURE__ */ (
|
|
2509
|
-
|
|
1937
|
+
return /* @__PURE__ */ jsxs10(
|
|
1938
|
+
Container14,
|
|
2510
1939
|
{
|
|
2511
1940
|
loading: String(!!props.loading),
|
|
2512
1941
|
disabled: props.disabled,
|
|
2513
1942
|
type: props.type || "button",
|
|
2514
|
-
...
|
|
1943
|
+
..._8.omit(props, ["loading", "type"]),
|
|
2515
1944
|
children: [
|
|
2516
|
-
!!props.loading && /* @__PURE__ */ (
|
|
2517
|
-
/* @__PURE__ */ (
|
|
1945
|
+
!!props.loading && /* @__PURE__ */ jsx15(Loading, {}),
|
|
1946
|
+
/* @__PURE__ */ jsx15("span", { children: props.label })
|
|
2518
1947
|
]
|
|
2519
1948
|
}
|
|
2520
1949
|
);
|
|
2521
1950
|
}
|
|
2522
1951
|
|
|
2523
1952
|
// components/types/form/types/datetime/styles.tsx
|
|
2524
|
-
|
|
2525
|
-
var
|
|
1953
|
+
import styled18 from "styled-components";
|
|
1954
|
+
var Container16 = styled18.div`
|
|
2526
1955
|
width: 100%;
|
|
2527
1956
|
padding-top: .3rem;
|
|
2528
1957
|
|
|
@@ -2562,8 +1991,8 @@ var Container17 = import_styled_components22.default.div`
|
|
|
2562
1991
|
`;
|
|
2563
1992
|
|
|
2564
1993
|
// components/types/form/types/datetime/index.tsx
|
|
2565
|
-
|
|
2566
|
-
|
|
1994
|
+
import _9 from "lodash";
|
|
1995
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2567
1996
|
function InputDateTime(props) {
|
|
2568
1997
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
2569
1998
|
const onChange = (event) => {
|
|
@@ -2572,15 +2001,15 @@ function InputDateTime(props) {
|
|
|
2572
2001
|
if (register.onChange) register.onChange(event);
|
|
2573
2002
|
if (props.onChange) props.onChange(event);
|
|
2574
2003
|
};
|
|
2575
|
-
return /* @__PURE__ */ (
|
|
2576
|
-
!!props.label && /* @__PURE__ */ (
|
|
2004
|
+
return /* @__PURE__ */ jsxs11(Container16, { className: props.className, error: props.error, children: [
|
|
2005
|
+
!!props.label && /* @__PURE__ */ jsxs11(InputLabel, { children: [
|
|
2577
2006
|
props.label,
|
|
2578
2007
|
props.required ? "*" : ""
|
|
2579
2008
|
] }),
|
|
2580
|
-
/* @__PURE__ */ (
|
|
2009
|
+
/* @__PURE__ */ jsx16("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx16(
|
|
2581
2010
|
"input",
|
|
2582
2011
|
{
|
|
2583
|
-
...
|
|
2012
|
+
..._9.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
2584
2013
|
type: "datetime-local",
|
|
2585
2014
|
onFocus: () => {
|
|
2586
2015
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -2590,13 +2019,13 @@ function InputDateTime(props) {
|
|
|
2590
2019
|
onChange
|
|
2591
2020
|
}
|
|
2592
2021
|
) }),
|
|
2593
|
-
!!props.error && /* @__PURE__ */ (
|
|
2022
|
+
!!props.error && /* @__PURE__ */ jsx16("div", { className: "iz-input-error", children: props.error })
|
|
2594
2023
|
] });
|
|
2595
2024
|
}
|
|
2596
2025
|
|
|
2597
2026
|
// components/types/form/types/textarea/styles.tsx
|
|
2598
|
-
|
|
2599
|
-
var
|
|
2027
|
+
import styled19 from "styled-components";
|
|
2028
|
+
var Container17 = styled19.div`
|
|
2600
2029
|
width: 100%;
|
|
2601
2030
|
padding-top: .3rem;
|
|
2602
2031
|
|
|
@@ -2635,8 +2064,8 @@ var Container18 = import_styled_components23.default.div`
|
|
|
2635
2064
|
`;
|
|
2636
2065
|
|
|
2637
2066
|
// components/types/form/types/textarea/index.tsx
|
|
2638
|
-
|
|
2639
|
-
|
|
2067
|
+
import _10 from "lodash";
|
|
2068
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2640
2069
|
function InputTextarea(props) {
|
|
2641
2070
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
2642
2071
|
const onChange = (event) => {
|
|
@@ -2645,15 +2074,15 @@ function InputTextarea(props) {
|
|
|
2645
2074
|
if (register.onChange) register.onChange(event);
|
|
2646
2075
|
if (props.onChange) props.onChange(value);
|
|
2647
2076
|
};
|
|
2648
|
-
return /* @__PURE__ */ (
|
|
2649
|
-
!!props.label && /* @__PURE__ */ (
|
|
2077
|
+
return /* @__PURE__ */ jsxs12(Container17, { className: props.className, error: props.error, children: [
|
|
2078
|
+
!!props.label && /* @__PURE__ */ jsxs12(InputLabel, { children: [
|
|
2650
2079
|
props.label,
|
|
2651
2080
|
props.required ? "*" : ""
|
|
2652
2081
|
] }),
|
|
2653
|
-
/* @__PURE__ */ (
|
|
2082
|
+
/* @__PURE__ */ jsx17("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx17(
|
|
2654
2083
|
"textarea",
|
|
2655
2084
|
{
|
|
2656
|
-
...
|
|
2085
|
+
..._10.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
|
|
2657
2086
|
maxLength: props.maxLength,
|
|
2658
2087
|
rows: props.rows || 5,
|
|
2659
2088
|
onFocus: () => {
|
|
@@ -2663,22 +2092,22 @@ function InputTextarea(props) {
|
|
|
2663
2092
|
onChange
|
|
2664
2093
|
}
|
|
2665
2094
|
) }),
|
|
2666
|
-
!!props.error && /* @__PURE__ */ (
|
|
2095
|
+
!!props.error && /* @__PURE__ */ jsx17("div", { className: "iz-input-error", children: props.error })
|
|
2667
2096
|
] });
|
|
2668
2097
|
}
|
|
2669
2098
|
|
|
2670
2099
|
// components/types/form/index.tsx
|
|
2671
|
-
|
|
2100
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2672
2101
|
function Form(props) {
|
|
2673
|
-
const formRef = props.formRef || (
|
|
2102
|
+
const formRef = props.formRef || useRef2({});
|
|
2674
2103
|
const setSchema = () => {
|
|
2675
2104
|
const schema2 = {};
|
|
2676
|
-
|
|
2105
|
+
_11.forEach(props.inputs, (data) => {
|
|
2677
2106
|
if (!data.validation) return;
|
|
2678
2107
|
schema2[data.name] = data.validation;
|
|
2679
2108
|
});
|
|
2680
|
-
if (props.validation) return props.validation(
|
|
2681
|
-
return
|
|
2109
|
+
if (props.validation) return props.validation(z.object(schema2));
|
|
2110
|
+
return z.object(schema2);
|
|
2682
2111
|
};
|
|
2683
2112
|
const schema = setSchema();
|
|
2684
2113
|
const {
|
|
@@ -2686,32 +2115,32 @@ function Form(props) {
|
|
|
2686
2115
|
handleSubmit,
|
|
2687
2116
|
reset,
|
|
2688
2117
|
formState: { errors }
|
|
2689
|
-
} =
|
|
2690
|
-
resolver:
|
|
2118
|
+
} = useForm({
|
|
2119
|
+
resolver: zodResolver(schema),
|
|
2691
2120
|
defaultValues: props.defaultValues,
|
|
2692
2121
|
mode: "all"
|
|
2693
2122
|
});
|
|
2694
|
-
(
|
|
2123
|
+
useEffect5(() => {
|
|
2695
2124
|
if (!props.clearWhen) return;
|
|
2696
2125
|
reset(void 0, { keepErrors: false });
|
|
2697
2126
|
}, [props.clearWhen]);
|
|
2698
|
-
(
|
|
2127
|
+
useEffect5(() => {
|
|
2699
2128
|
var _a;
|
|
2700
2129
|
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return;
|
|
2701
|
-
|
|
2702
|
-
const input =
|
|
2130
|
+
_11.forEach(props.defaultValues, (value, key) => {
|
|
2131
|
+
const input = _11.find(props.inputs, (data) => data.name === key);
|
|
2703
2132
|
props.defaultValues[key] = input.mask ? input.mask(value) : value;
|
|
2704
2133
|
});
|
|
2705
2134
|
reset(props.defaultValues, { keepErrors: false });
|
|
2706
2135
|
}, [props.defaultValues]);
|
|
2707
2136
|
const component = (data) => {
|
|
2708
2137
|
var _a;
|
|
2709
|
-
const component2 = types_exports[
|
|
2138
|
+
const component2 = types_exports[_11.camelCase(data.type)];
|
|
2710
2139
|
const TypeComponent = component2 || InputText;
|
|
2711
|
-
return /* @__PURE__ */ (
|
|
2140
|
+
return /* @__PURE__ */ jsx18(
|
|
2712
2141
|
TypeComponent,
|
|
2713
2142
|
{
|
|
2714
|
-
...
|
|
2143
|
+
..._11.omit(data, ["validation"]),
|
|
2715
2144
|
id: data.name,
|
|
2716
2145
|
type: component2 ? void 0 : data.type,
|
|
2717
2146
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
@@ -2719,38 +2148,38 @@ function Form(props) {
|
|
|
2719
2148
|
}
|
|
2720
2149
|
);
|
|
2721
2150
|
};
|
|
2722
|
-
return /* @__PURE__ */ (
|
|
2723
|
-
|
|
2151
|
+
return /* @__PURE__ */ jsxs13(Container9, { ref: formRef, onSubmit: handleSubmit(props.onSubmit), children: [
|
|
2152
|
+
_11.map(
|
|
2724
2153
|
props.inputs,
|
|
2725
|
-
(data, index) => /* @__PURE__ */ (
|
|
2154
|
+
(data, index) => /* @__PURE__ */ jsx18(React8.Fragment, { children: component(data) }, index)
|
|
2726
2155
|
),
|
|
2727
|
-
|
|
2156
|
+
_11.isArray(props.buttons) && /* @__PURE__ */ jsx18("div", { className: "form-buttons", children: _11.map(
|
|
2728
2157
|
props.buttons,
|
|
2729
|
-
(data, index) => /* @__PURE__ */ (
|
|
2158
|
+
(data, index) => /* @__PURE__ */ jsx18(Button, { ...data }, index)
|
|
2730
2159
|
) })
|
|
2731
2160
|
] });
|
|
2732
2161
|
}
|
|
2733
2162
|
|
|
2734
2163
|
// components/types/chart/styles.tsx
|
|
2735
|
-
|
|
2736
|
-
var
|
|
2164
|
+
import styled20 from "styled-components";
|
|
2165
|
+
var Container18 = styled20.div`
|
|
2737
2166
|
|
|
2738
2167
|
`;
|
|
2739
2168
|
|
|
2740
2169
|
// components/types/chart/index.tsx
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
var ApexChart = (
|
|
2170
|
+
import dynamic from "next/dynamic";
|
|
2171
|
+
import _12 from "lodash";
|
|
2172
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2173
|
+
var ApexChart = dynamic(() => import("react-apexcharts").then((mod) => mod.default), { ssr: false });
|
|
2745
2174
|
function Chart(props) {
|
|
2746
2175
|
const { content: themeContent } = useTheme();
|
|
2747
2176
|
const monitor = props.content || [];
|
|
2748
|
-
const series =
|
|
2177
|
+
const series = _12.map(props.yAxis, (value, key) => ({
|
|
2749
2178
|
name: key || "",
|
|
2750
|
-
data:
|
|
2179
|
+
data: _12.map(monitor, (data) => _12.isFunction(value) ? value(data) : 0)
|
|
2751
2180
|
}));
|
|
2752
2181
|
const options = {
|
|
2753
|
-
colors:
|
|
2182
|
+
colors: _12.map(props.colors || [], (value) => themeContent[value] || value || themeContent.secondary),
|
|
2754
2183
|
dataLabels: { enabled: false },
|
|
2755
2184
|
stroke: { curve: "smooth", width: 2 },
|
|
2756
2185
|
fill: { gradient: { opacityFrom: 0.9, opacityTo: 0.8 } },
|
|
@@ -2759,14 +2188,14 @@ function Chart(props) {
|
|
|
2759
2188
|
yaxis: {
|
|
2760
2189
|
min: props.min,
|
|
2761
2190
|
max: props.max,
|
|
2762
|
-
labels: { style: { colors:
|
|
2191
|
+
labels: { style: { colors: _12.map(monitor, () => themeContent.t6) } }
|
|
2763
2192
|
},
|
|
2764
2193
|
xaxis: {
|
|
2765
|
-
categories:
|
|
2766
|
-
labels: { style: { colors:
|
|
2194
|
+
categories: _12.map(monitor, (data) => _12.isFunction(props.xAxis) ? props.xAxis(data) : ""),
|
|
2195
|
+
labels: { style: { colors: _12.map(monitor, () => themeContent.t6) } }
|
|
2767
2196
|
}
|
|
2768
2197
|
};
|
|
2769
|
-
return /* @__PURE__ */ (
|
|
2198
|
+
return /* @__PURE__ */ jsx19(Container18, { children: /* @__PURE__ */ jsx19(
|
|
2770
2199
|
ApexChart,
|
|
2771
2200
|
{
|
|
2772
2201
|
options,
|
|
@@ -2779,11 +2208,11 @@ function Chart(props) {
|
|
|
2779
2208
|
}
|
|
2780
2209
|
|
|
2781
2210
|
// components/types/avatar/index.tsx
|
|
2782
|
-
|
|
2211
|
+
import { useRef as useRef3, useState as useState7 } from "react";
|
|
2783
2212
|
|
|
2784
2213
|
// components/types/avatar/styles.tsx
|
|
2785
|
-
|
|
2786
|
-
var
|
|
2214
|
+
import styled21 from "styled-components";
|
|
2215
|
+
var Container19 = styled21.div`
|
|
2787
2216
|
width: ${({ size }) => size || "2.3rem"};
|
|
2788
2217
|
height: ${({ size }) => size || "2.3rem"};
|
|
2789
2218
|
border-radius: ${({ size }) => size || "2.3rem"};
|
|
@@ -2838,32 +2267,32 @@ var Container20 = import_styled_components25.default.div`
|
|
|
2838
2267
|
`;
|
|
2839
2268
|
|
|
2840
2269
|
// components/types/avatar/index.tsx
|
|
2841
|
-
|
|
2842
|
-
|
|
2270
|
+
import _13 from "lodash";
|
|
2271
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2843
2272
|
function Avatar(props) {
|
|
2844
|
-
const containerRef = (
|
|
2845
|
-
const [color, setColor] = (
|
|
2273
|
+
const containerRef = useRef3({});
|
|
2274
|
+
const [color, setColor] = useState7("");
|
|
2846
2275
|
const name = () => {
|
|
2847
|
-
const [first, secound] =
|
|
2276
|
+
const [first, secound] = _13.split(props.name, " ") || [];
|
|
2848
2277
|
if (first && secound) return `${first} ${secound}`;
|
|
2849
2278
|
if (first) return first;
|
|
2850
2279
|
return "IZ";
|
|
2851
2280
|
};
|
|
2852
|
-
return /* @__PURE__ */ (
|
|
2853
|
-
|
|
2281
|
+
return /* @__PURE__ */ jsx20(
|
|
2282
|
+
Container19,
|
|
2854
2283
|
{
|
|
2855
2284
|
ref: containerRef,
|
|
2856
2285
|
color,
|
|
2857
2286
|
width: containerRef.current.offsetWidth,
|
|
2858
2287
|
...props,
|
|
2859
|
-
children: /* @__PURE__ */ (
|
|
2288
|
+
children: /* @__PURE__ */ jsx20("span", { children: _13.upperCase(name()) })
|
|
2860
2289
|
}
|
|
2861
2290
|
);
|
|
2862
2291
|
}
|
|
2863
2292
|
|
|
2864
2293
|
// components/types/lottie/styles.tsx
|
|
2865
|
-
|
|
2866
|
-
var
|
|
2294
|
+
import styled22 from "styled-components";
|
|
2295
|
+
var Container20 = styled22.div`
|
|
2867
2296
|
display: flex;
|
|
2868
2297
|
align-items: center;
|
|
2869
2298
|
justify-content: center;
|
|
@@ -2885,7 +2314,7 @@ var Container21 = import_styled_components26.default.div`
|
|
|
2885
2314
|
`;
|
|
2886
2315
|
|
|
2887
2316
|
// components/types/lottie/index.tsx
|
|
2888
|
-
|
|
2317
|
+
import LottieReact from "react-lottie";
|
|
2889
2318
|
|
|
2890
2319
|
// components/types/lottie/animations/loader.json
|
|
2891
2320
|
var loader_default = { v: "4.8.0", meta: { g: "LottieFiles AE 3.4.5", a: "", k: "", d: "", tc: "" }, fr: 60, ip: 0, op: 152, w: 1024, h: 1024, nm: "loader1", ddd: 0, assets: [], layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Shape Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10, x: "var $bm_rt;\n$bm_rt = thisComp.layer('Null 1').transform.rotation;" }, p: { a: 0, k: [512, 512, 0], ix: 2, x: "var $bm_rt;\n$bm_rt = thisComp.layer('Null 1').transform.position;" }, a: { a: 0, k: [83.27, 6, 0], ix: 1 }, s: { a: 0, k: [100, 100, 100], ix: 6 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.398, y: 1 }, o: { x: 0.573, y: 0 }, t: 14, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-85.127, 157.906], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [80.223, -148.809], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [50, 38], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-104.847, -79.448], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.836, y: 0 }, t: 41, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-119.289, 133.982], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [122.787, -137.911], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [-24.884, 23.246], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-196.288, -48.478], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 54, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [85.13, -251.636], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-122.897, 111.938], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-39.693, 119.128], [-66.383, 67.406], [-100.048, 0], [-67.415, -66.385], [309.312, -266.065], [67.028, -84.864]], v: [[0, -366], [275.144, -227.127], [159.077, -38.579], [215.016, 276.104], [0, 366], [-256.787, 260.799], [-150.256, -23.325], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 60, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [82.924, -246.192], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-55.859, 176.202], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-40.989, 124.23], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [24.59, -160.109], [67.028, -84.864]], v: [[0, -366], [276.613, -226.103], [-75.017, -73.301], [217.735, 274.957], [0, 366], [-256.787, 260.799], [-299.117, -9.604], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 65, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [81.086, -241.656], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [94.229, 285.418], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-42.068, 128.482], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-111.15, -238.582], [67.028, -84.864]], v: [[0, -366], [277.836, -225.251], [294.19, 46.954], [220.001, 274.001], [0, 366], [-256.787, 260.799], [123.521, -40.948], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 71, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [78.88, -236.212], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [82.272, 276.917], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-112.252, 217.097], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-98.391, -232.597], [67.028, -84.864]], v: [[0, -366], [279.305, -224.228], [2.74, -72.763], [222.719, 272.855], [0, 366], [-256.787, 260.799], [-234.073, 12.428], [-287.381, -226.67]], c: true }] }, { i: { x: 0.439, y: 1 }, o: { x: 0.333, y: 0 }, t: 81, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [73.366, -222.603], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [52.379, 255.665], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-103.19, 214.939], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-66.496, -217.635], [67.028, -84.864]], v: [[0, -366], [282.976, -221.67], [230.193, 16.947], [229.517, 269.988], [0, 366], [-256.787, 260.799], [-76.962, -15.009], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 94, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [70.093, -170.914], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-157.227, 316.209], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-52.439, 127.868], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [75.268, -151.376], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [250.126, 62.099], [260.784, 256.803], [0, 366], [-256.787, 260.799], [14.671, -55.458], [-287.381, -226.67]], c: true }] }, { i: { x: 0.368, y: 1 }, o: { x: 0.333, y: 0 }, t: 114, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160.001], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-114.582, 138.029], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.009], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [230.987, -278.253], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [338.14, 64.524], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-29.052, 9.798], [-287.381, -226.67]], c: true }] }, { i: { x: 0.439, y: 1 }, o: { x: 0.671, y: 0 }, t: 130, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-103.088, 145.785], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.01], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [172.152, -227.738], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [26.401, -124.412], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-231.181, 72.709], [-287.381, -226.67]], c: true }] }, { t: 155, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-85.127, 157.906], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [80.223, -148.809], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [50, 38], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-104.847, -79.448], [-287.381, -226.67]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "st", c: { a: 0, k: [0.8118, 0.8039, 0.8039, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0.7451, 0.7451, 0.7451, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [78, 6], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Ellipse 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 152, st: 0, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Shape Layer 4", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10, x: "var $bm_rt;\n$bm_rt = thisComp.layer('Null 1').transform.rotation;" }, p: { a: 0, k: [512, 512, 0], ix: 2, x: "var $bm_rt;\n$bm_rt = thisComp.layer('Null 1').transform.position;" }, a: { a: 0, k: [83.27, 6, 0], ix: 1 }, s: { a: 0, k: [100, 100, 100], ix: 6 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0.167 }, t: 0, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-93.22, 152.445], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [121.644, -184.373], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [39.367, -35.179], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-161.77, -10.89], [-287.381, -226.67]], c: true }] }, { i: { x: 0.398, y: 1 }, o: { x: 0.573, y: 0 }, t: 21, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-85.127, 157.906], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [80.223, -148.809], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [50, 38], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-104.847, -79.448], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.836, y: 0 }, t: 48, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-119.289, 133.982], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [122.787, -137.911], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [-24.884, 23.246], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-196.288, -48.478], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 61, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [85.13, -251.636], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-122.897, 111.938], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-39.693, 119.128], [-66.383, 67.406], [-100.048, 0], [-67.415, -66.385], [309.312, -266.065], [67.028, -84.864]], v: [[0, -366], [275.144, -227.127], [159.077, -38.579], [215.016, 276.104], [0, 366], [-256.787, 260.799], [-150.256, -23.325], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 67, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [82.924, -246.192], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-55.859, 176.202], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-40.989, 124.23], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [24.59, -160.109], [67.028, -84.864]], v: [[0, -366], [276.613, -226.103], [-75.017, -73.301], [217.735, 274.957], [0, 366], [-256.787, 260.799], [-299.117, -9.604], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 72, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [81.086, -241.656], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [94.229, 285.418], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-42.068, 128.482], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-111.15, -238.582], [67.028, -84.864]], v: [[0, -366], [277.836, -225.251], [294.19, 46.954], [220.001, 274.001], [0, 366], [-256.787, 260.799], [123.521, -40.948], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 78, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [78.88, -236.212], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [82.272, 276.917], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-112.252, 217.097], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-98.391, -232.597], [67.028, -84.864]], v: [[0, -366], [279.305, -224.228], [2.74, -72.763], [222.719, 272.855], [0, 366], [-256.787, 260.799], [-234.073, 12.428], [-287.381, -226.67]], c: true }] }, { i: { x: 0.439, y: 1 }, o: { x: 0.333, y: 0 }, t: 88, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [73.366, -222.603], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [52.379, 255.665], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-103.19, 214.939], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [-66.496, -217.635], [67.028, -84.864]], v: [[0, -366], [282.976, -221.67], [230.193, 16.947], [229.517, 269.988], [0, 366], [-256.787, 260.799], [-76.962, -15.009], [-287.381, -226.67]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 101, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [70.093, -170.914], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-157.227, 316.209], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-52.439, 127.868], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [75.268, -151.376], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [250.126, 62.099], [260.784, 256.803], [0, 366], [-256.787, 260.799], [14.671, -55.458], [-287.381, -226.67]], c: true }] }, { i: { x: 0.368, y: 1 }, o: { x: 0.333, y: 0 }, t: 121, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160.001], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-114.582, 138.029], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.009], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [230.987, -278.253], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [338.14, 64.524], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-29.052, 9.798], [-287.381, -226.67]], c: true }] }, { i: { x: 0.833, y: 0.833 }, o: { x: 0.671, y: 0 }, t: 137, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-103.088, 145.785], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.01], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [172.152, -227.738], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [26.401, -124.412], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-231.181, 72.709], [-287.381, -226.67]], c: true }] }, { i: { x: 0.439, y: 1 }, o: { x: 0.167, y: 0.167 }, t: 151, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-93.22, 152.445], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [121.644, -184.373], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [39.367, -35.179], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-161.77, -10.89], [-287.381, -226.67]], c: true }] }, { t: 162, s: [{ i: [[-116.537, 0], [-66.195, -94.389], [48, -160], [65.067, -66.069], [102.081, 0], [66.068, 65.058], [-85.127, 157.906], [-49.234, 62.335]], o: [[124.041, 0], [41.676, 59.427], [-61.503, 205.011], [-66.384, 67.406], [-100.048, 0], [-67.415, -66.385], [80.223, -148.809], [67.028, -84.864]], v: [[0, -366], [299.865, -209.905], [50, 38], [260.784, 256.803], [0, 366], [-256.787, 260.799], [-104.847, -79.448], [-287.381, -226.67]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "st", c: { a: 0, k: [0.8118, 0.8039, 0.8039, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0.3451, 0.4118, 0.8549, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [78, 6], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Ellipse 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }], ip: -19, op: 167, st: 7, bm: 0 }, { ddd: 0, ind: 3, ty: 3, nm: "Null 1", sr: 1, ks: { o: { a: 0, k: 0, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.39], y: [1] }, o: { x: [0.695], y: [0] }, t: 0, s: [0] }, { i: { x: [0.259], y: [1] }, o: { x: [0.557], y: [0] }, t: 38, s: [-32] }, { i: { x: [0.496], y: [1] }, o: { x: [0.769], y: [0] }, t: 90, s: [780] }, { i: { x: [0.417], y: [1] }, o: { x: [0.6], y: [0] }, t: 125, s: [702] }, { t: 152, s: [720] }], ix: 10 }, p: { a: 0, k: [512, 512, 0], ix: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1 }, s: { a: 0, k: [100, 100, 100], ix: 6 } }, ao: 0, ip: 0, op: 152, st: 0, bm: 0 }], markers: [] };
|
|
@@ -2894,8 +2323,8 @@ var loader_default = { v: "4.8.0", meta: { g: "LottieFiles AE 3.4.5", a: "", k:
|
|
|
2894
2323
|
var animations_default = { loader: loader_default };
|
|
2895
2324
|
|
|
2896
2325
|
// components/types/lottie/index.tsx
|
|
2897
|
-
|
|
2898
|
-
var LottieComponent =
|
|
2326
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2327
|
+
var LottieComponent = LottieReact;
|
|
2899
2328
|
function Lottie(props) {
|
|
2900
2329
|
const getAnimation = () => {
|
|
2901
2330
|
let animation;
|
|
@@ -2915,7 +2344,7 @@ function Lottie(props) {
|
|
|
2915
2344
|
path: props.src,
|
|
2916
2345
|
animationData: getAnimation()
|
|
2917
2346
|
};
|
|
2918
|
-
return /* @__PURE__ */ (
|
|
2347
|
+
return /* @__PURE__ */ jsx21(Container20, { ...props, children: /* @__PURE__ */ jsx21(
|
|
2919
2348
|
LottieComponent,
|
|
2920
2349
|
{
|
|
2921
2350
|
width: props.size || 180,
|
|
@@ -2926,8 +2355,8 @@ function Lottie(props) {
|
|
|
2926
2355
|
}
|
|
2927
2356
|
|
|
2928
2357
|
// components/types/credit-card/styles.tsx
|
|
2929
|
-
|
|
2930
|
-
var
|
|
2358
|
+
import styled23 from "styled-components";
|
|
2359
|
+
var Container21 = styled23.div`
|
|
2931
2360
|
border-radius: 8px 8px 0 0;
|
|
2932
2361
|
transition: .2s ease .2s background, .2s ease .2s padding;
|
|
2933
2362
|
position: relative;
|
|
@@ -2961,11 +2390,11 @@ var Container22 = import_styled_components27.default.div`
|
|
|
2961
2390
|
`;
|
|
2962
2391
|
|
|
2963
2392
|
// components/types/credit-card/card/index.tsx
|
|
2964
|
-
|
|
2393
|
+
import { useEffect as useEffect7, useRef as useRef4 } from "react";
|
|
2965
2394
|
|
|
2966
2395
|
// components/types/credit-card/card/styles.tsx
|
|
2967
|
-
|
|
2968
|
-
var
|
|
2396
|
+
import styled24 from "styled-components";
|
|
2397
|
+
var Container22 = styled24.div`
|
|
2969
2398
|
height: 11rem;
|
|
2970
2399
|
width: 20rem;
|
|
2971
2400
|
border-radius: 8px;
|
|
@@ -3120,7 +2549,7 @@ var assets_default2 = assets;
|
|
|
3120
2549
|
|
|
3121
2550
|
// components/types/credit-card/tools/index.tsx
|
|
3122
2551
|
var import_luhn = __toESM(require_luhn());
|
|
3123
|
-
|
|
2552
|
+
import _14 from "lodash";
|
|
3124
2553
|
var validateLuhn = import_luhn.default.validate;
|
|
3125
2554
|
var getCardContent = (cardNumber) => {
|
|
3126
2555
|
const content = { flag: "", logo: "" };
|
|
@@ -3130,19 +2559,19 @@ var getCardContent = (cardNumber) => {
|
|
|
3130
2559
|
const cardContent = potentialCardContents.shift();
|
|
3131
2560
|
const flag = cardContent == null ? void 0 : cardContent.type;
|
|
3132
2561
|
content.flag = flag || "";
|
|
3133
|
-
content.logo = assets_default2[
|
|
2562
|
+
content.logo = assets_default2[_14.upperFirst(_14.camelCase(flag))] || "";
|
|
3134
2563
|
return content;
|
|
3135
2564
|
}
|
|
3136
2565
|
return content;
|
|
3137
2566
|
};
|
|
3138
2567
|
|
|
3139
2568
|
// components/types/credit-card/card/index.tsx
|
|
3140
|
-
|
|
3141
|
-
|
|
2569
|
+
import _15 from "lodash";
|
|
2570
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3142
2571
|
function CreditCardComponent(props) {
|
|
3143
2572
|
var _a;
|
|
3144
|
-
const flagRef = (
|
|
3145
|
-
(
|
|
2573
|
+
const flagRef = useRef4({});
|
|
2574
|
+
useEffect7(() => {
|
|
3146
2575
|
const content = getCardContent(props.number);
|
|
3147
2576
|
if (!flagRef.current) return;
|
|
3148
2577
|
if (!content.logo) {
|
|
@@ -3151,24 +2580,24 @@ function CreditCardComponent(props) {
|
|
|
3151
2580
|
}
|
|
3152
2581
|
flagRef.current.style.backgroundImage = `url(${content.logo})`;
|
|
3153
2582
|
}, [flagRef, props.number]);
|
|
3154
|
-
return /* @__PURE__ */ (
|
|
3155
|
-
/* @__PURE__ */ (
|
|
3156
|
-
/* @__PURE__ */ (
|
|
3157
|
-
/* @__PURE__ */ (
|
|
3158
|
-
/* @__PURE__ */ (
|
|
3159
|
-
/* @__PURE__ */ (
|
|
2583
|
+
return /* @__PURE__ */ jsxs14(Container22, { children: [
|
|
2584
|
+
/* @__PURE__ */ jsxs14("div", { className: "iz-credit-card-left", children: [
|
|
2585
|
+
/* @__PURE__ */ jsx22("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ jsx22("div", { id: "iz-credit-card-chip", style: { backgroundImage: `url(${assets_default2.Chip})` } }) }),
|
|
2586
|
+
/* @__PURE__ */ jsxs14("div", { className: "iz-credit-card-bottom", children: [
|
|
2587
|
+
/* @__PURE__ */ jsx22("div", { className: "iz-credit-card-number", children: /* @__PURE__ */ jsx22("div", { className: "iz-credit-card-elipse" }) }),
|
|
2588
|
+
/* @__PURE__ */ jsx22("div", { className: "iz-credit-card-name", children: /* @__PURE__ */ jsx22("div", { className: "iz-credit-card-elipse", children: _15.deburr((_a = props.name) == null ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })
|
|
3160
2589
|
] })
|
|
3161
2590
|
] }),
|
|
3162
|
-
/* @__PURE__ */ (
|
|
3163
|
-
/* @__PURE__ */ (
|
|
3164
|
-
/* @__PURE__ */ (
|
|
2591
|
+
/* @__PURE__ */ jsxs14("div", { className: "iz-credit-card-right", children: [
|
|
2592
|
+
/* @__PURE__ */ jsx22("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ jsx22("div", { id: "iz-credit-card-flag", ref: flagRef }) }),
|
|
2593
|
+
/* @__PURE__ */ jsx22("div", { className: "iz-credit-card-bottom", children: /* @__PURE__ */ jsx22("span", { children: "validade" }) })
|
|
3165
2594
|
] })
|
|
3166
2595
|
] });
|
|
3167
2596
|
}
|
|
3168
2597
|
|
|
3169
2598
|
// components/types/credit-card/functions/styles.tsx
|
|
3170
|
-
|
|
3171
|
-
var
|
|
2599
|
+
import styled25 from "styled-components";
|
|
2600
|
+
var Container23 = styled25.div`
|
|
3172
2601
|
display: flex;
|
|
3173
2602
|
flex-direction: column;
|
|
3174
2603
|
gap: .5rem;
|
|
@@ -3205,141 +2634,446 @@ var Container24 = import_styled_components29.default.div`
|
|
|
3205
2634
|
`;
|
|
3206
2635
|
|
|
3207
2636
|
// components/types/credit-card/functions/index.tsx
|
|
3208
|
-
|
|
3209
|
-
|
|
2637
|
+
import _16 from "lodash";
|
|
2638
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3210
2639
|
function CreditCardFunctions(props) {
|
|
3211
|
-
return
|
|
2640
|
+
return _16.some(props.functions, (data) => !data.hide) && /* @__PURE__ */ jsx23(Container23, { className: "iz-credit-card-function-container", children: _16.map(
|
|
3212
2641
|
props.functions,
|
|
3213
|
-
(data, index) => !data.hide && /* @__PURE__ */ (
|
|
2642
|
+
(data, index) => !data.hide && /* @__PURE__ */ jsx23(
|
|
2643
|
+
"div",
|
|
2644
|
+
{
|
|
2645
|
+
className: "iz-credit-card-function",
|
|
2646
|
+
onClick: data.function,
|
|
2647
|
+
children: /* @__PURE__ */ jsx23("i", { "aria-hidden": true, className: data.icon })
|
|
2648
|
+
},
|
|
2649
|
+
index
|
|
2650
|
+
)
|
|
2651
|
+
) });
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
// components/types/credit-card/index.tsx
|
|
2655
|
+
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2656
|
+
function CreditCard(props) {
|
|
2657
|
+
const functions = [
|
|
2658
|
+
{
|
|
2659
|
+
icon: "fa-regular fa-pen-to-square",
|
|
2660
|
+
label: "Editar",
|
|
2661
|
+
function: props.onEdit,
|
|
2662
|
+
hide: !props.onEdit
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
icon: "fa-solid fa-gear",
|
|
2666
|
+
label: "Configura\xE7\xF5es",
|
|
2667
|
+
function: props.onConfig,
|
|
2668
|
+
hide: !props.onConfig
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
icon: "fa-solid fa-trash-can",
|
|
2672
|
+
label: "Remover",
|
|
2673
|
+
function: props.onRemove,
|
|
2674
|
+
hide: !props.onRemove
|
|
2675
|
+
},
|
|
2676
|
+
...props.functions || []
|
|
2677
|
+
];
|
|
2678
|
+
return /* @__PURE__ */ jsxs15(Container21, { children: [
|
|
2679
|
+
/* @__PURE__ */ jsx24(CreditCardComponent, { ...props }),
|
|
2680
|
+
/* @__PURE__ */ jsx24(CreditCardFunctions, { ...props, functions })
|
|
2681
|
+
] });
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
// components/types/block/styles.tsx
|
|
2685
|
+
import styled26 from "styled-components";
|
|
2686
|
+
var Container24 = styled26.div`
|
|
2687
|
+
display: flex;
|
|
2688
|
+
flex-direction: column;
|
|
2689
|
+
gap: 1rem;
|
|
2690
|
+
padding: 1.3rem 1.5rem;
|
|
2691
|
+
border-radius: 5px;
|
|
2692
|
+
background: ${({ theme }) => theme.t05};
|
|
2693
|
+
flex: 1 1 20rem;
|
|
2694
|
+
|
|
2695
|
+
header {
|
|
2696
|
+
display: flex;
|
|
2697
|
+
align-items: center;
|
|
2698
|
+
gap: .5rem;
|
|
2699
|
+
font-size: .9rem;
|
|
2700
|
+
font-weight: 600;
|
|
2701
|
+
color: ${({ theme }) => theme.t6};
|
|
2702
|
+
}
|
|
2703
|
+
`;
|
|
2704
|
+
var Content = styled26.div`
|
|
2705
|
+
font-size: 1.5rem;
|
|
2706
|
+
font-weight: 500;
|
|
2707
|
+
color: ${({ theme }) => theme.t7};
|
|
2708
|
+
`;
|
|
2709
|
+
|
|
2710
|
+
// components/types/block/index.tsx
|
|
2711
|
+
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2712
|
+
function Block(props) {
|
|
2713
|
+
return /* @__PURE__ */ jsxs16(Container24, { children: [
|
|
2714
|
+
(!!props.icon || !!props.label) && /* @__PURE__ */ jsxs16("header", { children: [
|
|
2715
|
+
!!props.icon && /* @__PURE__ */ jsx25("i", { "aria-hidden": true, className: props.icon }),
|
|
2716
|
+
!!props.label && /* @__PURE__ */ jsx25("span", { children: props.label })
|
|
2717
|
+
] }),
|
|
2718
|
+
/* @__PURE__ */ jsxs16(Content, { children: [
|
|
2719
|
+
!!props.component && /* @__PURE__ */ jsx25(Component, { content: props.component }),
|
|
2720
|
+
props.children
|
|
2721
|
+
] })
|
|
2722
|
+
] });
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
// components/index.tsx
|
|
2726
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2727
|
+
function Component(props) {
|
|
2728
|
+
const renderComponent = (config) => {
|
|
2729
|
+
const ComponentElement = types_exports2[config.type];
|
|
2730
|
+
return /* @__PURE__ */ jsx26(ComponentElement, { ...config.props });
|
|
2731
|
+
};
|
|
2732
|
+
const renderRow = (components) => {
|
|
2733
|
+
return /* @__PURE__ */ jsx26(RowContainer, { children: _17.map(
|
|
2734
|
+
components,
|
|
2735
|
+
(data, index) => /* @__PURE__ */ jsx26(Fragment, { children: renderComponent(data) }, index)
|
|
2736
|
+
) });
|
|
2737
|
+
};
|
|
2738
|
+
return /* @__PURE__ */ jsx26(Container2, { className: props.className, children: _17.map(
|
|
2739
|
+
props.content,
|
|
2740
|
+
(data, index) => /* @__PURE__ */ jsx26(Fragment, { children: _17.isArray(data) ? renderRow(data) : renderComponent(data) }, index)
|
|
2741
|
+
) });
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
// components/types/table/paginate/styles.tsx
|
|
2745
|
+
import styled27 from "styled-components";
|
|
2746
|
+
var Container25 = styled27.div`
|
|
2747
|
+
width: 100%;
|
|
2748
|
+
display: flex;
|
|
2749
|
+
align-items: center;
|
|
2750
|
+
justify-content: center;
|
|
2751
|
+
margin-top: 1.5rem;
|
|
2752
|
+
|
|
2753
|
+
.paginate {
|
|
2754
|
+
font-size: .8rem;
|
|
2755
|
+
font-weight: 500;
|
|
2756
|
+
height: 1.5rem;
|
|
2757
|
+
padding: 0 .6rem;
|
|
2758
|
+
border-radius: 1rem;
|
|
2759
|
+
transition: ease .3s;
|
|
2760
|
+
color: ${({ theme }) => theme.t6};
|
|
2761
|
+
display: flex;
|
|
2762
|
+
align-items: center;
|
|
2763
|
+
justify-content: center;
|
|
2764
|
+
cursor: pointer;
|
|
2765
|
+
|
|
2766
|
+
&[data-current="true"] {
|
|
2767
|
+
background: ${({ theme }) => theme.tertiary};
|
|
2768
|
+
color: ${({ theme }) => theme.secondary};
|
|
2769
|
+
|
|
2770
|
+
&:hover {
|
|
2771
|
+
background: ${({ theme }) => theme.tertiary};
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
&:hover {
|
|
2776
|
+
background: ${({ theme }) => theme.t05};
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
`;
|
|
2780
|
+
|
|
2781
|
+
// components/types/table/paginate/index.tsx
|
|
2782
|
+
import _18 from "lodash";
|
|
2783
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2784
|
+
function Paginate(props) {
|
|
2785
|
+
const pages = () => {
|
|
2786
|
+
const offset = Number(props.page.value) - 4;
|
|
2787
|
+
let page = offset > 0 ? offset + 1 : 1;
|
|
2788
|
+
let pages2 = [];
|
|
2789
|
+
while (Number(props.total) >= page) {
|
|
2790
|
+
pages2.push(page);
|
|
2791
|
+
page++;
|
|
2792
|
+
}
|
|
2793
|
+
pages2 = _18.slice(pages2, 0, 5);
|
|
2794
|
+
if (Number(props.page.value) + 1 > 5) pages2 = _18.concat(["1.."], pages2);
|
|
2795
|
+
if (Number(props.total) > 6 && Number(props.page.value) + 1 < Number(props.total)) return _18.concat(pages2, `..${props.total}`);
|
|
2796
|
+
return pages2;
|
|
2797
|
+
};
|
|
2798
|
+
return Number(props.total) > 1 && /* @__PURE__ */ jsxs17(Container25, { children: [
|
|
2799
|
+
/* @__PURE__ */ jsx27(
|
|
2800
|
+
"div",
|
|
2801
|
+
{
|
|
2802
|
+
className: "paginate back",
|
|
2803
|
+
onClick: () => props.page.set ? props.page.set(
|
|
2804
|
+
props.page.value ? props.page.value - 1 : props.page.value
|
|
2805
|
+
) : null,
|
|
2806
|
+
children: /* @__PURE__ */ jsx27("i", { "aria-hidden": true, className: "fa-solid fa-chevron-left" })
|
|
2807
|
+
}
|
|
2808
|
+
),
|
|
2809
|
+
_18.map(
|
|
2810
|
+
pages(),
|
|
2811
|
+
(page, index) => /* @__PURE__ */ jsx27(
|
|
2812
|
+
"div",
|
|
2813
|
+
{
|
|
2814
|
+
className: "paginate page",
|
|
2815
|
+
"data-current": String(props.page.value === Number(_18.replace(page, /\D/g, "")) - 1),
|
|
2816
|
+
onClick: () => props.page.set ? props.page.set(Number(_18.replace(page, /\D/g, "")) - 1) : null,
|
|
2817
|
+
children: page
|
|
2818
|
+
},
|
|
2819
|
+
index
|
|
2820
|
+
)
|
|
2821
|
+
),
|
|
2822
|
+
/* @__PURE__ */ jsx27(
|
|
3214
2823
|
"div",
|
|
3215
2824
|
{
|
|
3216
|
-
className: "
|
|
3217
|
-
onClick:
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
2825
|
+
className: "paginate next",
|
|
2826
|
+
onClick: () => props.page.set ? props.page.set(
|
|
2827
|
+
props.page.value !== props.total - 1 ? props.page.value + 1 : props.page.value
|
|
2828
|
+
) : null,
|
|
2829
|
+
children: /* @__PURE__ */ jsx27("i", { "aria-hidden": true, className: "fa-solid fa-chevron-right" })
|
|
2830
|
+
}
|
|
3221
2831
|
)
|
|
3222
|
-
) });
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
|
-
// components/types/credit-card/index.tsx
|
|
3226
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3227
|
-
function CreditCard(props) {
|
|
3228
|
-
const functions = [
|
|
3229
|
-
{
|
|
3230
|
-
icon: "fa-regular fa-pen-to-square",
|
|
3231
|
-
label: "Editar",
|
|
3232
|
-
function: props.onEdit,
|
|
3233
|
-
hide: !props.onEdit
|
|
3234
|
-
},
|
|
3235
|
-
{
|
|
3236
|
-
icon: "fa-solid fa-gear",
|
|
3237
|
-
label: "Configura\xE7\xF5es",
|
|
3238
|
-
function: props.onConfig,
|
|
3239
|
-
hide: !props.onConfig
|
|
3240
|
-
},
|
|
3241
|
-
{
|
|
3242
|
-
icon: "fa-solid fa-trash-can",
|
|
3243
|
-
label: "Remover",
|
|
3244
|
-
function: props.onRemove,
|
|
3245
|
-
hide: !props.onRemove
|
|
3246
|
-
},
|
|
3247
|
-
...props.functions || []
|
|
3248
|
-
];
|
|
3249
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Container22, { children: [
|
|
3250
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CreditCardComponent, { ...props }),
|
|
3251
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CreditCardFunctions, { ...props, functions })
|
|
3252
2832
|
] });
|
|
3253
2833
|
}
|
|
3254
2834
|
|
|
3255
|
-
// components/types/
|
|
3256
|
-
|
|
3257
|
-
|
|
2835
|
+
// components/types/table/index.tsx
|
|
2836
|
+
import _20 from "lodash";
|
|
2837
|
+
|
|
2838
|
+
// components/types/table/modal/styles.tsx
|
|
2839
|
+
import styled28 from "styled-components";
|
|
2840
|
+
var Content2 = styled28.div`
|
|
2841
|
+
padding: 1.5rem;
|
|
3258
2842
|
display: flex;
|
|
3259
2843
|
flex-direction: column;
|
|
3260
|
-
gap:
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
header {
|
|
2844
|
+
gap: 1.5rem;
|
|
2845
|
+
|
|
2846
|
+
.iz-table-modal-title {
|
|
2847
|
+
font-size: 1.2rem;
|
|
2848
|
+
font-weight: 500;
|
|
2849
|
+
width: 100%;
|
|
3267
2850
|
display: flex;
|
|
3268
2851
|
align-items: center;
|
|
3269
|
-
|
|
3270
|
-
font-size: .9rem;
|
|
3271
|
-
font-weight: 600;
|
|
2852
|
+
justify-content: center;
|
|
3272
2853
|
color: ${({ theme }) => theme.t6};
|
|
3273
2854
|
}
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
2855
|
+
|
|
2856
|
+
.iz-table-modal-content {
|
|
2857
|
+
ul {
|
|
2858
|
+
li {
|
|
2859
|
+
border-bottom: solid 1px ${({ theme }) => theme.t05};
|
|
2860
|
+
padding: .8rem 0;
|
|
2861
|
+
display: flex;
|
|
2862
|
+
align-items: center;
|
|
2863
|
+
justify-content: space-between;
|
|
2864
|
+
gap: 1rem;
|
|
2865
|
+
font-size: .8rem;
|
|
2866
|
+
color: ${({ theme }) => theme.t6};
|
|
2867
|
+
|
|
2868
|
+
&:last-child {
|
|
2869
|
+
border-bottom: none;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
.iz-table-modal-column {
|
|
2873
|
+
background: ${({ theme }) => theme.t05};
|
|
2874
|
+
padding: .5rem .8rem;
|
|
2875
|
+
font-weight: 600;
|
|
2876
|
+
border-radius: 5px;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
.iz-table-modal-row {
|
|
2880
|
+
text-align: right;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
.iz-table-modal-actions {
|
|
2887
|
+
margin-top: 1rem;
|
|
2888
|
+
}
|
|
3279
2889
|
`;
|
|
3280
2890
|
|
|
3281
|
-
// components/types/
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
2891
|
+
// components/types/table/modal/index.tsx
|
|
2892
|
+
import _19 from "lodash";
|
|
2893
|
+
|
|
2894
|
+
// components/types/table/modal/actions.tsx
|
|
2895
|
+
var actionConfig = {
|
|
2896
|
+
"fa-solid fa-pen-to-square": { label: "editar" },
|
|
2897
|
+
"fa-solid fa-trash-can": { label: "remover", color: CommonTheme.negative }
|
|
2898
|
+
};
|
|
2899
|
+
var actions_default = actionConfig;
|
|
2900
|
+
|
|
2901
|
+
// components/types/table/modal/index.tsx
|
|
2902
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2903
|
+
function Modal2(props) {
|
|
2904
|
+
const modal = useModal();
|
|
2905
|
+
const content = _19.omit(props.content, ["actions"]);
|
|
2906
|
+
const actions = Object.values(_19.pick(props.content, ["actions"]))[0];
|
|
2907
|
+
const onClose = () => {
|
|
2908
|
+
modal.setProps("table", { toggle: false });
|
|
2909
|
+
};
|
|
2910
|
+
return /* @__PURE__ */ jsx28(
|
|
2911
|
+
Component,
|
|
2912
|
+
{
|
|
2913
|
+
content: [{
|
|
2914
|
+
type: "Modal",
|
|
2915
|
+
props: {
|
|
2916
|
+
toggle: props.toggle,
|
|
2917
|
+
onClose,
|
|
2918
|
+
children: /* @__PURE__ */ jsx28(Container, { children: /* @__PURE__ */ jsxs18(Content2, { children: [
|
|
2919
|
+
/* @__PURE__ */ jsx28("div", { className: "iz-table-modal-title", children: "Conte\xFAdo" }),
|
|
2920
|
+
/* @__PURE__ */ jsx28("div", { className: "iz-table-modal-content", children: /* @__PURE__ */ jsx28("ul", { children: _19.map(
|
|
2921
|
+
content,
|
|
2922
|
+
(value, key) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
2923
|
+
!!key && /* @__PURE__ */ jsx28("div", { className: "iz-table-modal-column", children: key }),
|
|
2924
|
+
/* @__PURE__ */ jsx28("div", { className: "iz-table-modal-row", children: value })
|
|
2925
|
+
] }, key)
|
|
2926
|
+
) }) }),
|
|
2927
|
+
/* @__PURE__ */ jsx28("div", { className: "iz-table-modal-actions", children: /* @__PURE__ */ jsx28(
|
|
2928
|
+
Component,
|
|
2929
|
+
{
|
|
2930
|
+
content: _19.concat(_19.map(actions, (data) => ({
|
|
2931
|
+
type: "Button",
|
|
2932
|
+
props: {
|
|
2933
|
+
...actions_default[data.icon] || {},
|
|
2934
|
+
onClick: data.function
|
|
2935
|
+
}
|
|
2936
|
+
})), {
|
|
2937
|
+
type: "Button",
|
|
2938
|
+
props: {
|
|
2939
|
+
label: "fechar",
|
|
2940
|
+
outline: true,
|
|
2941
|
+
onClick: onClose
|
|
2942
|
+
}
|
|
2943
|
+
})
|
|
2944
|
+
}
|
|
2945
|
+
) })
|
|
2946
|
+
] }) })
|
|
2947
|
+
}
|
|
2948
|
+
}]
|
|
2949
|
+
}
|
|
2950
|
+
);
|
|
3294
2951
|
}
|
|
3295
2952
|
|
|
3296
|
-
// components/index.tsx
|
|
3297
|
-
|
|
3298
|
-
function
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
2953
|
+
// components/types/table/index.tsx
|
|
2954
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2955
|
+
function Table(props) {
|
|
2956
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2957
|
+
const theme = useTheme();
|
|
2958
|
+
const modal = useModal();
|
|
2959
|
+
const loading = ((_a = props.loading) == null ? void 0 : _a.is) || props.loading;
|
|
2960
|
+
useEffect8(() => {
|
|
2961
|
+
modal.add({ component: Modal2, name: "table" });
|
|
2962
|
+
return () => modal.remove("table");
|
|
2963
|
+
}, []);
|
|
2964
|
+
const onShowLine = (key) => {
|
|
2965
|
+
if (window.innerWidth > Number(_20.replace(theme.content.mobileMaxWidth, "px", ""))) return;
|
|
2966
|
+
let content = {};
|
|
2967
|
+
_20.forEach(props.options, (data, index) => {
|
|
2968
|
+
var _a2, _b2;
|
|
2969
|
+
const column = ((_a2 = data.column) == null ? void 0 : _a2.name) || data.column;
|
|
2970
|
+
const columnName = !_20.isString(column) ? props.options.length - 1 === index ? "actions" : "" : column;
|
|
2971
|
+
content[columnName] = columnName === "actions" ? (_b2 = data.row) == null ? void 0 : _b2.actions : renderRowContainer(props.content[key], data);
|
|
2972
|
+
});
|
|
2973
|
+
modal.setProps("table", { toggle: true, content });
|
|
3302
2974
|
};
|
|
3303
|
-
const
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
2975
|
+
const renderRowContainer = (data, option) => {
|
|
2976
|
+
var _a2, _b2, _c2, _d2;
|
|
2977
|
+
return /* @__PURE__ */ jsx29(
|
|
2978
|
+
"div",
|
|
2979
|
+
{
|
|
2980
|
+
className: `
|
|
2981
|
+
iz-table-content
|
|
2982
|
+
${((_a2 = option.row) == null ? void 0 : _a2.actions) ? "iz-table-action" : ""}
|
|
2983
|
+
${((_b2 = option.row) == null ? void 0 : _b2.icon) ? "iz-table-identifier" : ""}
|
|
2984
|
+
`,
|
|
2985
|
+
style: _20.isFunction((_c2 = option.row) == null ? void 0 : _c2.style) ? option.row.style(data, option) : (_d2 = option.row) == null ? void 0 : _d2.style,
|
|
2986
|
+
children: renderRowContent(data, option)
|
|
2987
|
+
}
|
|
2988
|
+
);
|
|
3308
2989
|
};
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
(
|
|
3312
|
-
|
|
2990
|
+
const renderRowContent = (data, option) => {
|
|
2991
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
2992
|
+
if (!!((_a2 = option.row) == null ? void 0 : _a2.actions)) {
|
|
2993
|
+
return /* @__PURE__ */ jsx29("div", { className: "iz-table-actions", children: _20.map(
|
|
2994
|
+
(_b2 = option.row) == null ? void 0 : _b2.actions,
|
|
2995
|
+
(action, index) => renderButton(action, data, index)
|
|
2996
|
+
) });
|
|
2997
|
+
}
|
|
2998
|
+
if ((_c2 = option.row) == null ? void 0 : _c2.icon) {
|
|
2999
|
+
return /* @__PURE__ */ jsx29("div", { className: "iz-table-icon", children: /* @__PURE__ */ jsx29(
|
|
3000
|
+
"i",
|
|
3001
|
+
{
|
|
3002
|
+
"aria-hidden": true,
|
|
3003
|
+
className: _20.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"
|
|
3004
|
+
}
|
|
3005
|
+
) });
|
|
3006
|
+
}
|
|
3007
|
+
return renderRowText(data, option);
|
|
3008
|
+
};
|
|
3009
|
+
const renderButton = (action, data, index) => {
|
|
3010
|
+
return /* @__PURE__ */ jsx29(
|
|
3011
|
+
"button",
|
|
3012
|
+
{
|
|
3013
|
+
className: `iz-table-button ${_20.includes(action.icon, "trash") ? "negative" : ""}`,
|
|
3014
|
+
onClick: () => action.function ? action.function(data) : null,
|
|
3015
|
+
disabled: action.disabled,
|
|
3016
|
+
"data-tooltip": action.tooltip,
|
|
3017
|
+
children: /* @__PURE__ */ jsx29("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" })
|
|
3018
|
+
},
|
|
3019
|
+
index
|
|
3020
|
+
);
|
|
3021
|
+
};
|
|
3022
|
+
const renderRowText = (data, option) => {
|
|
3023
|
+
const row = option.row || {};
|
|
3024
|
+
const content = data[row.name] || data;
|
|
3025
|
+
let body;
|
|
3026
|
+
while (!body) {
|
|
3027
|
+
if (_20.isString(row)) body = data[row];
|
|
3028
|
+
if (_20.isString(content)) body = content;
|
|
3029
|
+
if (_20.isFunction(row.mask)) body = row.mask(content);
|
|
3030
|
+
if (_20.isFunction(row.custom)) body = row.custom(content);
|
|
3031
|
+
body = body != null ? body : "---";
|
|
3032
|
+
}
|
|
3033
|
+
return /* @__PURE__ */ jsx29(
|
|
3034
|
+
"div",
|
|
3035
|
+
{
|
|
3036
|
+
className: "iz-table-content-elipse",
|
|
3037
|
+
title: _20.isString(body) ? body : "",
|
|
3038
|
+
children: body
|
|
3039
|
+
}
|
|
3040
|
+
);
|
|
3041
|
+
};
|
|
3042
|
+
return /* @__PURE__ */ jsxs19(Container, { notFound: !((_b = props.content) == null ? void 0 : _b.length) && !props.loading, children: [
|
|
3043
|
+
/* @__PURE__ */ jsx29("div", { className: "iz-table-container", children: /* @__PURE__ */ jsxs19("table", { children: [
|
|
3044
|
+
/* @__PURE__ */ jsx29("thead", { children: /* @__PURE__ */ jsx29("tr", { children: _20.map(
|
|
3045
|
+
props.options,
|
|
3046
|
+
(option, index) => {
|
|
3047
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
3048
|
+
return /* @__PURE__ */ jsx29("th", { style: (_a2 = option.column) == null ? void 0 : _a2.style, children: /* @__PURE__ */ jsx29(
|
|
3049
|
+
"div",
|
|
3050
|
+
{
|
|
3051
|
+
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 : ""}` : ""}`,
|
|
3052
|
+
children: !!((_g = option.column) == null ? void 0 : _g.action) ? renderButton(option.column.action) : _20.isString(((_h = option.column) == null ? void 0 : _h.name) || option.column) ? ((_i = option.column) == null ? void 0 : _i.name) || option.column : ""
|
|
3053
|
+
}
|
|
3054
|
+
) }, index);
|
|
3055
|
+
}
|
|
3056
|
+
) }) }),
|
|
3057
|
+
/* @__PURE__ */ jsx29("tbody", { children: loading ? _20.map(((_c = props.loading) == null ? void 0 : _c.items) || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], (data, key) => /* @__PURE__ */ jsx29("tr", { children: _20.map(props.options, (data2, index) => {
|
|
3058
|
+
var _a2;
|
|
3059
|
+
return /* @__PURE__ */ jsx29("td", { children: /* @__PURE__ */ jsx29(
|
|
3060
|
+
LoadingBar,
|
|
3061
|
+
{
|
|
3062
|
+
height: "2.5rem",
|
|
3063
|
+
borderRadius: index === 0 ? "5px 0 0 5px" : ((_a2 = props.options) == null ? void 0 : _a2.length) - 1 === index ? "0 5px 5px 0" : "0",
|
|
3064
|
+
margin: key === 0 ? "1.5rem 0 0" : ".5rem 0 0"
|
|
3065
|
+
}
|
|
3066
|
+
) }, index);
|
|
3067
|
+
}) }, key)) : _20.map(props.content, (data, key) => /* @__PURE__ */ jsx29("tr", { children: _20.map(props.options, (option, index) => /* @__PURE__ */ jsx29("td", { onClick: () => index < 2 ? onShowLine(key) : null, children: renderRowContainer(data, option) }, index)) }, key)) })
|
|
3068
|
+
] }) }),
|
|
3069
|
+
!((_d = props.content) == null ? void 0 : _d.length) && !props.loading && /* @__PURE__ */ jsxs19("div", { className: "iz-table-not-found", children: [
|
|
3070
|
+
/* @__PURE__ */ jsx29("p", { children: ((_e = props.notFound) == null ? void 0 : _e.title) || "Nenhuma campanha encontrado" }),
|
|
3071
|
+
/* @__PURE__ */ jsx29("p", { children: ((_f = props.notFound) == null ? void 0 : _f.message) || "Envie uma campanha de marketing para aparecer algum registro" })
|
|
3072
|
+
] }),
|
|
3073
|
+
!!props.paginate && /* @__PURE__ */ jsx29(Paginate, { ...props.paginate })
|
|
3074
|
+
] });
|
|
3313
3075
|
}
|
|
3314
|
-
|
|
3315
|
-
0 && (module.exports = {
|
|
3316
|
-
Avatar,
|
|
3317
|
-
Badge,
|
|
3318
|
-
Block,
|
|
3319
|
-
Button,
|
|
3320
|
-
Chart,
|
|
3321
|
-
Component,
|
|
3322
|
-
CreditCard,
|
|
3323
|
-
Form,
|
|
3324
|
-
IconProvider,
|
|
3325
|
-
InputDateTime,
|
|
3326
|
-
InputFile,
|
|
3327
|
-
InputLabel,
|
|
3328
|
-
InputSelect,
|
|
3329
|
-
InputText,
|
|
3330
|
-
InputTextarea,
|
|
3331
|
-
LoadingApp,
|
|
3332
|
-
LoadingBar,
|
|
3333
|
-
Logo,
|
|
3334
|
-
Lottie,
|
|
3335
|
-
Modal,
|
|
3336
|
-
ModalProvider,
|
|
3076
|
+
export {
|
|
3337
3077
|
Paginate,
|
|
3338
|
-
Table
|
|
3339
|
-
|
|
3340
|
-
TooltipProvider,
|
|
3341
|
-
useIcon,
|
|
3342
|
-
useModal,
|
|
3343
|
-
useTheme,
|
|
3344
|
-
useTooltip
|
|
3345
|
-
});
|
|
3078
|
+
Table
|
|
3079
|
+
};
|