@gustavo-valsechi/client 1.3.28 → 1.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +3 -10
- package/dist/components/index.js +0 -1
- package/dist/components/index.mjs +0 -1
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.js +55 -0
- package/dist/components/styles.mjs +20 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.js +121 -0
- package/dist/components/types/avatar/index.mjs +87 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.js +94 -0
- package/dist/components/types/avatar/styles.mjs +60 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.js +353 -0
- package/dist/components/types/badge/index.mjs +323 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.js +72 -0
- package/dist/components/types/badge/styles.mjs +38 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.js +3081 -0
- package/dist/components/types/block/index.mjs +3077 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.js +66 -0
- package/dist/components/types/block/styles.mjs +31 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.js +351 -0
- package/dist/components/types/chart/index.mjs +321 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.js +43 -0
- package/dist/components/types/chart/styles.mjs +8 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.js +42 -0
- package/dist/components/types/credit-card/assets/index.mjs +21 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.js +739 -0
- package/dist/components/types/credit-card/card/index.mjs +731 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.js +171 -0
- package/dist/components/types/credit-card/card/styles.mjs +137 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.js +92 -0
- package/dist/components/types/credit-card/functions/index.mjs +60 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.js +76 -0
- package/dist/components/types/credit-card/functions/styles.mjs +42 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.js +866 -0
- package/dist/components/types/credit-card/index.mjs +852 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.js +73 -0
- package/dist/components/types/credit-card/styles.mjs +39 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.js +578 -0
- package/dist/components/types/credit-card/tools/index.mjs +565 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.js +746 -0
- package/dist/components/types/form/index.mjs +710 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.js +54 -0
- package/dist/components/types/form/styles.mjs +20 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.js +200 -0
- package/dist/components/types/form/types/button/index.mjs +164 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.js +139 -0
- package/dist/components/types/form/types/button/loading/index.mjs +103 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.js +127 -0
- package/dist/components/types/form/types/button/loading/styles.mjs +93 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.js +80 -0
- package/dist/components/types/form/types/button/styles.mjs +46 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.js +128 -0
- package/dist/components/types/form/types/datetime/index.mjs +92 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.js +79 -0
- package/dist/components/types/form/types/datetime/styles.mjs +45 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.js +124 -0
- package/dist/components/types/form/types/file/index.mjs +90 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.js +66 -0
- package/dist/components/types/form/types/file/styles.mjs +32 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.js +644 -0
- package/dist/components/types/form/types/index.mjs +601 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.js +146 -0
- package/dist/components/types/form/types/input/index.mjs +112 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.js +85 -0
- package/dist/components/types/form/types/input/styles.mjs +51 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.js +54 -0
- package/dist/components/types/form/types/label/index.mjs +18 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.js +46 -0
- package/dist/components/types/form/types/label/styles.mjs +12 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.js +158 -0
- package/dist/components/types/form/types/select/index.mjs +124 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.js +91 -0
- package/dist/components/types/form/types/select/styles.mjs +57 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.js +127 -0
- package/dist/components/types/form/types/textarea/index.mjs +91 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.js +78 -0
- package/dist/components/types/form/types/textarea/styles.mjs +44 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/types/index.js +3091 -0
- package/dist/components/types/index.mjs +3093 -0
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.js +163 -0
- package/dist/components/types/loading/app/index.mjs +127 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.js +126 -0
- package/dist/components/types/loading/app/styles.mjs +92 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.js +68 -0
- package/dist/components/types/loading/bar/index.mjs +32 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.js +60 -0
- package/dist/components/types/loading/bar/styles.mjs +26 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.js +192 -0
- package/dist/components/types/loading/index.mjs +154 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.js +69 -0
- package/dist/components/types/logo/index.mjs +33 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.js +58 -0
- package/dist/components/types/logo/styles.mjs +24 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.js +31 -0
- package/dist/components/types/lottie/animations/index.mjs +8 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.js +104 -0
- package/dist/components/types/lottie/index.mjs +68 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.js +61 -0
- package/dist/components/types/lottie/styles.mjs +27 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.js +2331 -0
- package/dist/components/types/modal/index.mjs +2323 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.js +168 -0
- package/dist/components/types/modal/styles.mjs +134 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/components/types/table/index.js +3081 -0
- package/dist/components/types/table/index.mjs +3078 -0
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.js +108 -0
- package/dist/components/types/table/modal/actions.mjs +85 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.js +3075 -0
- package/dist/components/types/table/modal/index.mjs +3075 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.js +91 -0
- package/dist/components/types/table/modal/styles.mjs +57 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.js +131 -0
- package/dist/components/types/table/paginate/index.mjs +95 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.js +75 -0
- package/dist/components/types/table/paginate/styles.mjs +41 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.js +301 -0
- package/dist/components/types/table/styles.mjs +267 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.js +32 -0
- package/dist/contexts/icon/assets/brands/index.mjs +18 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.js +59 -0
- package/dist/contexts/icon/assets/index.mjs +43 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.js +32 -0
- package/dist/contexts/icon/assets/regular/index.mjs +18 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.js +32 -0
- package/dist/contexts/icon/assets/solid/index.mjs +18 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.js +309 -0
- package/dist/contexts/icon/index.mjs +280 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.js +43 -0
- package/dist/contexts/icon/styles.mjs +8 -0
- package/dist/contexts/index.d.ts +4 -20
- package/dist/contexts/index.js +0 -1
- package/dist/contexts/index.mjs +0 -1
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.js +100 -0
- package/dist/contexts/modal/index.mjs +65 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.js +43 -0
- package/dist/contexts/modal/styles.mjs +8 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.js +105 -0
- package/dist/contexts/theme/content.mjs +79 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.js +235 -0
- package/dist/contexts/theme/index.mjs +200 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.js +117 -0
- package/dist/contexts/theme/styles.mjs +82 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.js +151 -0
- package/dist/contexts/tooltip/index.mjs +116 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.js +79 -0
- package/dist/contexts/tooltip/styles.mjs +44 -0
- package/dist/index.d.ts +4 -17
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/dist/interfaces/components/avatar/index.d.ts +6 -0
- package/dist/interfaces/components/avatar/index.js +18 -0
- package/dist/interfaces/components/avatar/index.mjs +0 -0
- package/dist/interfaces/components/badge/index.d.ts +3 -0
- package/dist/interfaces/components/badge/index.js +18 -0
- package/dist/interfaces/components/badge/index.mjs +0 -0
- package/dist/interfaces/components/block/index.d.ts +16 -0
- package/dist/interfaces/components/block/index.js +18 -0
- package/dist/interfaces/components/block/index.mjs +0 -0
- package/dist/interfaces/components/chart/index.d.ts +9 -0
- package/dist/interfaces/components/chart/index.js +18 -0
- package/dist/interfaces/components/chart/index.mjs +0 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -0
- package/dist/interfaces/components/credit-card/index.js +18 -0
- package/dist/interfaces/components/credit-card/index.mjs +0 -0
- package/dist/interfaces/components/form/button/index.d.ts +7 -0
- package/dist/interfaces/components/form/button/index.js +18 -0
- package/dist/interfaces/components/form/button/index.mjs +0 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
- package/dist/interfaces/components/form/datetime/index.js +18 -0
- package/dist/interfaces/components/form/datetime/index.mjs +0 -0
- package/dist/interfaces/components/form/file/index.d.ts +14 -0
- package/dist/interfaces/components/form/file/index.js +18 -0
- package/dist/interfaces/components/form/file/index.mjs +0 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.js +18 -0
- package/dist/interfaces/components/form/index.mjs +0 -0
- package/dist/interfaces/components/form/input/index.d.ts +17 -0
- package/dist/interfaces/components/form/input/index.js +18 -0
- package/dist/interfaces/components/form/input/index.mjs +0 -0
- package/dist/interfaces/components/form/label/index.d.ts +5 -0
- package/dist/interfaces/components/form/label/index.js +18 -0
- package/dist/interfaces/components/form/label/index.mjs +0 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -0
- package/dist/interfaces/components/form/select/index.js +18 -0
- package/dist/interfaces/components/form/select/index.mjs +0 -0
- package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
- package/dist/interfaces/components/form/textarea/index.js +18 -0
- package/dist/interfaces/components/form/textarea/index.mjs +0 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.js +18 -0
- package/dist/interfaces/components/index.mjs +0 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -0
- package/dist/interfaces/components/loading/app/index.js +18 -0
- package/dist/interfaces/components/loading/app/index.mjs +0 -0
- package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
- package/dist/interfaces/components/loading/bar/index.js +18 -0
- package/dist/interfaces/components/loading/bar/index.mjs +0 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.js +18 -0
- package/dist/interfaces/components/loading/index.mjs +0 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -0
- package/dist/interfaces/components/logo/index.js +18 -0
- package/dist/interfaces/components/logo/index.mjs +0 -0
- package/dist/interfaces/components/lottie/index.d.ts +12 -0
- package/dist/interfaces/components/lottie/index.js +18 -0
- package/dist/interfaces/components/lottie/index.mjs +0 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -0
- package/dist/interfaces/components/modal/index.js +18 -0
- package/dist/interfaces/components/modal/index.mjs +0 -0
- package/dist/interfaces/components/table/index.d.ts +46 -0
- package/dist/interfaces/components/table/index.js +18 -0
- package/dist/interfaces/components/table/index.mjs +0 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
- package/dist/interfaces/components/table/paginate/index.js +18 -0
- package/dist/interfaces/components/table/paginate/index.mjs +0 -0
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/dist/interfaces/contexts/icon/index.js +18 -0
- package/dist/interfaces/contexts/icon/index.mjs +0 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.js +18 -0
- package/dist/interfaces/contexts/index.mjs +0 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -0
- package/dist/interfaces/contexts/modal/index.js +19 -0
- package/dist/interfaces/contexts/modal/index.mjs +1 -0
- package/dist/interfaces/contexts/theme/index.d.ts +42 -0
- package/dist/interfaces/contexts/theme/index.js +18 -0
- package/dist/interfaces/contexts/theme/index.mjs +0 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.js +18 -0
- package/dist/interfaces/contexts/tooltip/index.mjs +0 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/interfaces/index.js +0 -1
- package/dist/interfaces/index.mjs +0 -1
- package/dist/styled.d.ts +6 -0
- package/dist/tsup.config.d.ts +2 -0
- package/package.json +5 -5
- package/dist/components/index.d.mts +0 -10
- package/dist/contexts/index.d.mts +0 -20
- package/dist/index-BhaGW0O1.d.ts +0 -601
- package/dist/index-BxA8LyyD.d.mts +0 -68
- package/dist/index-DDi0w5pw.d.mts +0 -601
- package/dist/index-DT7VKE7H.d.ts +0 -68
- package/dist/index-Da-DtPS-.d.mts +0 -29
- package/dist/index-Da-DtPS-.d.ts +0 -29
- package/dist/index.d.mts +0 -17
- package/dist/interfaces/index.d.mts +0 -12
|
@@ -0,0 +1,746 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// components/types/form/index.tsx
|
|
32
|
+
var form_exports = {};
|
|
33
|
+
__export(form_exports, {
|
|
34
|
+
Button: () => Button,
|
|
35
|
+
Form: () => Form,
|
|
36
|
+
InputDateTime: () => InputDateTime,
|
|
37
|
+
InputFile: () => InputFile,
|
|
38
|
+
InputLabel: () => InputLabel,
|
|
39
|
+
InputSelect: () => InputSelect,
|
|
40
|
+
InputText: () => InputText,
|
|
41
|
+
InputTextarea: () => InputTextarea
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(form_exports);
|
|
44
|
+
var import_react4 = __toESM(require("react"));
|
|
45
|
+
|
|
46
|
+
// components/types/form/styles.tsx
|
|
47
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
48
|
+
var Container = import_styled_components.default.form`
|
|
49
|
+
width: 100%;
|
|
50
|
+
|
|
51
|
+
.form-buttons {
|
|
52
|
+
width: 100%;
|
|
53
|
+
padding-top: 1rem;
|
|
54
|
+
|
|
55
|
+
button {
|
|
56
|
+
width: 100%;
|
|
57
|
+
margin-top: 1rem;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
// components/types/form/index.tsx
|
|
63
|
+
var import_zod = require("zod");
|
|
64
|
+
var import_react_hook_form = require("react-hook-form");
|
|
65
|
+
var import_zod2 = require("@hookform/resolvers/zod");
|
|
66
|
+
var import_lodash6 = __toESM(require("lodash"));
|
|
67
|
+
|
|
68
|
+
// components/types/form/types/index.tsx
|
|
69
|
+
var types_exports = {};
|
|
70
|
+
__export(types_exports, {
|
|
71
|
+
Button: () => Button,
|
|
72
|
+
InputDateTime: () => InputDateTime,
|
|
73
|
+
InputFile: () => InputFile,
|
|
74
|
+
InputLabel: () => InputLabel,
|
|
75
|
+
InputSelect: () => InputSelect,
|
|
76
|
+
InputText: () => InputText,
|
|
77
|
+
InputTextarea: () => InputTextarea
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// components/types/form/types/file/index.tsx
|
|
81
|
+
var import_react = require("react");
|
|
82
|
+
|
|
83
|
+
// components/types/form/types/file/styles.tsx
|
|
84
|
+
var import_styled_components2 = __toESM(require("styled-components"));
|
|
85
|
+
var Container2 = import_styled_components2.default.div`
|
|
86
|
+
width: 100%;
|
|
87
|
+
padding-top: .3rem;
|
|
88
|
+
|
|
89
|
+
.iz-image-content {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
94
|
+
border-radius: 5px;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
padding: .5rem 1rem;
|
|
97
|
+
width: 100%;
|
|
98
|
+
font-size: .8rem;
|
|
99
|
+
background: ${(props) => props.disabled ? "${({ theme }) => theme.t2}" : "${({ theme }) => theme.primary}"};
|
|
100
|
+
opacity: ${(props) => props.disabled ? ".7" : "1"};
|
|
101
|
+
color: ${({ theme }) => theme.t6};
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.iz-input-error {
|
|
106
|
+
color: ${({ theme }) => theme.negative};
|
|
107
|
+
font-size: .7rem;
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
|
|
111
|
+
// components/types/form/types/label/styles.tsx
|
|
112
|
+
var import_styled_components3 = __toESM(require("styled-components"));
|
|
113
|
+
var Container3 = import_styled_components3.default.label`
|
|
114
|
+
font-size: .8rem;
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
color: ${({ theme }) => theme.t6};
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
// components/types/form/types/label/index.tsx
|
|
120
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
121
|
+
function InputLabel(props) {
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Container3, { className: props.className, children: props.children });
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// components/types/form/types/file/index.tsx
|
|
126
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
127
|
+
function InputFile(props) {
|
|
128
|
+
var _a;
|
|
129
|
+
const inputRef = (0, import_react.useRef)({});
|
|
130
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
131
|
+
const readImage = (data) => {
|
|
132
|
+
if (props.onPreview) props.onPreview(URL.createObjectURL(data));
|
|
133
|
+
if (props.onChange) props.onChange(data);
|
|
134
|
+
};
|
|
135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Container2, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
137
|
+
"input",
|
|
138
|
+
{
|
|
139
|
+
hidden: true,
|
|
140
|
+
type: "file",
|
|
141
|
+
id: "file",
|
|
142
|
+
accept: "image/*",
|
|
143
|
+
ref: inputRef,
|
|
144
|
+
disabled: props.disabled,
|
|
145
|
+
name: props.name,
|
|
146
|
+
onFocus: () => {
|
|
147
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
148
|
+
},
|
|
149
|
+
...register,
|
|
150
|
+
onChange: (e) => {
|
|
151
|
+
var _a2;
|
|
152
|
+
register.onChange(e);
|
|
153
|
+
readImage((_a2 = e.target.files) == null ? void 0 : _a2[0]);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(InputLabel, { children: [
|
|
158
|
+
props.label,
|
|
159
|
+
props.required ? "*" : ""
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
|
|
162
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
163
|
+
] });
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// components/types/form/types/input/index.tsx
|
|
167
|
+
var import_react2 = require("react");
|
|
168
|
+
|
|
169
|
+
// components/types/form/types/input/styles.tsx
|
|
170
|
+
var import_styled_components4 = __toESM(require("styled-components"));
|
|
171
|
+
var Container4 = import_styled_components4.default.div`
|
|
172
|
+
width: 100%;
|
|
173
|
+
padding-top: .3rem;
|
|
174
|
+
|
|
175
|
+
.iz-input-content {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
180
|
+
border-radius: 5px;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
padding-right: ${({ password }) => password ? ".6rem" : "0rem"};
|
|
183
|
+
background-color: ${({ theme }) => theme.primary};
|
|
184
|
+
|
|
185
|
+
input {
|
|
186
|
+
border: 0;
|
|
187
|
+
padding: .5rem 1rem;
|
|
188
|
+
width: 100%;
|
|
189
|
+
font-size: .8rem;
|
|
190
|
+
background-color: ${({ theme }) => theme.primary};
|
|
191
|
+
color: ${({ theme }) => theme.t6};
|
|
192
|
+
|
|
193
|
+
&:disabled {
|
|
194
|
+
background-color: ${({ theme }) => theme.t2};
|
|
195
|
+
color: ${({ theme }) => theme.t6};
|
|
196
|
+
opacity: .7;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&:focus-visible {
|
|
200
|
+
outline: none;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
i {
|
|
205
|
+
color: ${({ theme }) => theme.t3};
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.iz-input-error {
|
|
211
|
+
color: ${({ theme }) => theme.negative};
|
|
212
|
+
font-size: .7rem;
|
|
213
|
+
}
|
|
214
|
+
`;
|
|
215
|
+
|
|
216
|
+
// components/types/form/types/input/index.tsx
|
|
217
|
+
var import_lodash = __toESM(require("lodash"));
|
|
218
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
219
|
+
function InputText(props) {
|
|
220
|
+
const [showPassword, setShowPassword] = (0, import_react2.useState)(false);
|
|
221
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
222
|
+
const onChange = (event) => {
|
|
223
|
+
const value = event.target.value || "";
|
|
224
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
225
|
+
if (register.onChange) register.onChange(event);
|
|
226
|
+
if (props.onChange) props.onChange(value);
|
|
227
|
+
};
|
|
228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Container4, { className: props.className, error: props.error, password: props.type === "password", children: [
|
|
229
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(InputLabel, { children: [
|
|
230
|
+
props.label,
|
|
231
|
+
props.required ? "*" : ""
|
|
232
|
+
] }),
|
|
233
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "iz-input-content", children: [
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
235
|
+
"input",
|
|
236
|
+
{
|
|
237
|
+
...import_lodash.default.omit(props, ["className", "register", "mask"]),
|
|
238
|
+
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
239
|
+
maxLength: props.maxLength || 255,
|
|
240
|
+
onFocus: () => {
|
|
241
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
242
|
+
},
|
|
243
|
+
...register,
|
|
244
|
+
onChange
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
props.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
248
|
+
"i",
|
|
249
|
+
{
|
|
250
|
+
"aria-hidden": true,
|
|
251
|
+
className: showPassword ? "fa-solid fa-eye-slash" : "fa-solid fa-eye",
|
|
252
|
+
onClick: () => setShowPassword(!showPassword)
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] }),
|
|
256
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
257
|
+
] });
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// components/types/form/types/select/index.tsx
|
|
261
|
+
var import_react3 = require("react");
|
|
262
|
+
|
|
263
|
+
// components/types/form/types/select/styles.tsx
|
|
264
|
+
var import_styled_components5 = __toESM(require("styled-components"));
|
|
265
|
+
var Container5 = import_styled_components5.default.div`
|
|
266
|
+
width: 100%;
|
|
267
|
+
padding-top: .3rem;
|
|
268
|
+
|
|
269
|
+
.iz-input-content {
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
274
|
+
border-radius: 5px;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
position: relative;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
|
|
279
|
+
select {
|
|
280
|
+
border: 0;
|
|
281
|
+
padding: .5rem 2.3rem .5rem 1rem;
|
|
282
|
+
width: 100%;
|
|
283
|
+
font-size: .8rem;
|
|
284
|
+
appearance: none;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
background-color: ${({ theme }) => theme.primary};
|
|
287
|
+
color: ${({ theme }) => theme.t6};
|
|
288
|
+
|
|
289
|
+
&:disabled {
|
|
290
|
+
background-color: ${({ theme }) => theme.t2};
|
|
291
|
+
color: ${({ theme }) => theme.t6};
|
|
292
|
+
opacity: .7;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&:focus-visible {
|
|
296
|
+
outline: none;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
i {
|
|
301
|
+
position: absolute;
|
|
302
|
+
top: 50%;
|
|
303
|
+
right: .8rem;
|
|
304
|
+
transform: translateY(-50%);
|
|
305
|
+
font-size: .8rem;
|
|
306
|
+
color: ${({ theme }) => theme.t6};
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.iz-input-error {
|
|
311
|
+
color: ${({ theme }) => theme.negative};
|
|
312
|
+
font-size: .7rem;
|
|
313
|
+
}
|
|
314
|
+
`;
|
|
315
|
+
|
|
316
|
+
// components/types/form/types/select/index.tsx
|
|
317
|
+
var import_lodash2 = __toESM(require("lodash"));
|
|
318
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
319
|
+
function InputSelect(props) {
|
|
320
|
+
const [focus, setFocus] = (0, import_react3.useState)(false);
|
|
321
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
322
|
+
const onChange = (event) => {
|
|
323
|
+
const value = event.target.value || "";
|
|
324
|
+
if (register.onChange) register.onChange(event);
|
|
325
|
+
if (props.onChange) props.onChange(value);
|
|
326
|
+
};
|
|
327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Container5, { className: props.className, error: props.error, children: [
|
|
328
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(InputLabel, { children: [
|
|
329
|
+
props.label,
|
|
330
|
+
props.required ? "*" : ""
|
|
331
|
+
] }),
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "iz-input-content", children: [
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
334
|
+
"select",
|
|
335
|
+
{
|
|
336
|
+
...import_lodash2.default.omit(props, ["className", "onChange", "onFocus", "options", "onMouseDown", "onBlur", "maxLength", "required", "register"]),
|
|
337
|
+
onMouseDown: () => setFocus(!focus),
|
|
338
|
+
onFocus: () => {
|
|
339
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
340
|
+
},
|
|
341
|
+
...register,
|
|
342
|
+
onBlur: (event) => {
|
|
343
|
+
if (register.onBlur) register.onBlur(event);
|
|
344
|
+
setFocus(false);
|
|
345
|
+
},
|
|
346
|
+
onChange,
|
|
347
|
+
children: import_lodash2.default.map(
|
|
348
|
+
props.options,
|
|
349
|
+
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
350
|
+
"option",
|
|
351
|
+
{
|
|
352
|
+
value: Object.keys(data),
|
|
353
|
+
children: Object.values(data)
|
|
354
|
+
},
|
|
355
|
+
index
|
|
356
|
+
)
|
|
357
|
+
)
|
|
358
|
+
}
|
|
359
|
+
),
|
|
360
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" })
|
|
361
|
+
] }),
|
|
362
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// components/types/form/types/button/styles.tsx
|
|
367
|
+
var import_styled_components6 = __toESM(require("styled-components"));
|
|
368
|
+
var Container6 = import_styled_components6.default.button`
|
|
369
|
+
border-radius: 5px;
|
|
370
|
+
font-size: .8rem;
|
|
371
|
+
font-weight: 500;
|
|
372
|
+
transition: ease .3s;
|
|
373
|
+
display: flex;
|
|
374
|
+
align-items: center;
|
|
375
|
+
justify-content: center;
|
|
376
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff !important"};
|
|
377
|
+
background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
378
|
+
border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
379
|
+
pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
|
|
380
|
+
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
381
|
+
opacity: ${(props) => props.loading === "true" ? 0.6 : 1};
|
|
382
|
+
padding: .4rem 2.5rem;
|
|
383
|
+
transition: ease .3s;
|
|
384
|
+
|
|
385
|
+
span {
|
|
386
|
+
text-align: center;
|
|
387
|
+
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&:disabled {
|
|
391
|
+
pointer-events: none;
|
|
392
|
+
|
|
393
|
+
&::before {
|
|
394
|
+
opacity: .6;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
&:hover {
|
|
399
|
+
opacity: .9;
|
|
400
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff"};
|
|
401
|
+
|
|
402
|
+
&::before {
|
|
403
|
+
background: ${(props) => props.transparent ? "transparent" : props.color || props.theme.secondary};
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
`;
|
|
407
|
+
|
|
408
|
+
// components/types/form/types/button/loading/styles.tsx
|
|
409
|
+
var import_styled_components7 = __toESM(require("styled-components"));
|
|
410
|
+
var Container7 = import_styled_components7.default.div`
|
|
411
|
+
display: flex;
|
|
412
|
+
justify-content: space-between;
|
|
413
|
+
align-items: center;
|
|
414
|
+
width: 2rem;
|
|
415
|
+
margin-right: .5rem;
|
|
416
|
+
|
|
417
|
+
div {
|
|
418
|
+
width: .5rem;
|
|
419
|
+
height: .5rem;
|
|
420
|
+
border-radius: 1rem;
|
|
421
|
+
background: rgb(255, 255, 255, 1);
|
|
422
|
+
|
|
423
|
+
&:nth-child(1) {
|
|
424
|
+
animation: blinkOne infinite ease 2s;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
&:nth-child(2) {
|
|
428
|
+
animation: blinkTwo infinite ease 2s;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
&:nth-child(3) {
|
|
432
|
+
animation: blinkThree infinite ease 2s;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@keyframes blinkOne {
|
|
437
|
+
0% {
|
|
438
|
+
opacity: 0.8;
|
|
439
|
+
}
|
|
440
|
+
20% {
|
|
441
|
+
opacity: 0.2;
|
|
442
|
+
}
|
|
443
|
+
40% {
|
|
444
|
+
opacity: 0.2;
|
|
445
|
+
}
|
|
446
|
+
60% {
|
|
447
|
+
opacity: 0.2;
|
|
448
|
+
}
|
|
449
|
+
80% {
|
|
450
|
+
opacity: 0.2;
|
|
451
|
+
}
|
|
452
|
+
100% {
|
|
453
|
+
opacity: 0.8;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@keyframes blinkTwo {
|
|
458
|
+
0% {
|
|
459
|
+
opacity: 0.2;
|
|
460
|
+
}
|
|
461
|
+
20% {
|
|
462
|
+
opacity: 0.8;
|
|
463
|
+
}
|
|
464
|
+
40% {
|
|
465
|
+
opacity: 0.2;
|
|
466
|
+
}
|
|
467
|
+
60% {
|
|
468
|
+
opacity: 0.2;
|
|
469
|
+
}
|
|
470
|
+
80% {
|
|
471
|
+
opacity: 0.8;
|
|
472
|
+
}
|
|
473
|
+
100% {
|
|
474
|
+
opacity: 0.2;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
@keyframes blinkThree {
|
|
479
|
+
0% {
|
|
480
|
+
opacity: 0.2;
|
|
481
|
+
}
|
|
482
|
+
25% {
|
|
483
|
+
opacity: 0.2;
|
|
484
|
+
}
|
|
485
|
+
50% {
|
|
486
|
+
opacity: 0.8;
|
|
487
|
+
}
|
|
488
|
+
75% {
|
|
489
|
+
opacity: 0.2;
|
|
490
|
+
}
|
|
491
|
+
100% {
|
|
492
|
+
opacity: 0.2;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
`;
|
|
496
|
+
|
|
497
|
+
// components/types/form/types/button/loading/index.tsx
|
|
498
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
499
|
+
function Loading() {
|
|
500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Container7, { children: [
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {}),
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {}),
|
|
503
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {})
|
|
504
|
+
] });
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// components/types/form/types/button/index.tsx
|
|
508
|
+
var import_lodash3 = __toESM(require("lodash"));
|
|
509
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
510
|
+
function Button(props) {
|
|
511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
512
|
+
Container6,
|
|
513
|
+
{
|
|
514
|
+
loading: String(!!props.loading),
|
|
515
|
+
disabled: props.disabled,
|
|
516
|
+
type: props.type || "button",
|
|
517
|
+
...import_lodash3.default.omit(props, ["loading", "type"]),
|
|
518
|
+
children: [
|
|
519
|
+
!!props.loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Loading, {}),
|
|
520
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: props.label })
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// components/types/form/types/datetime/styles.tsx
|
|
527
|
+
var import_styled_components8 = __toESM(require("styled-components"));
|
|
528
|
+
var Container8 = import_styled_components8.default.div`
|
|
529
|
+
width: 100%;
|
|
530
|
+
padding-top: .3rem;
|
|
531
|
+
|
|
532
|
+
.iz-input-content {
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
justify-content: center;
|
|
536
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
537
|
+
border-radius: 5px;
|
|
538
|
+
overflow: hidden;
|
|
539
|
+
|
|
540
|
+
input {
|
|
541
|
+
border: 0;
|
|
542
|
+
padding: .5rem 1rem;
|
|
543
|
+
width: 100%;
|
|
544
|
+
font-size: .8rem;
|
|
545
|
+
background-color: ${({ theme }) => theme.primary};
|
|
546
|
+
color: ${({ theme }) => theme.t6};
|
|
547
|
+
color-scheme: ${(props) => props.theme || "light"};
|
|
548
|
+
|
|
549
|
+
&:disabled {
|
|
550
|
+
background-color: ${({ theme }) => theme.t2};
|
|
551
|
+
color: ${({ theme }) => theme.t6};
|
|
552
|
+
opacity: .7;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
&:focus-visible {
|
|
556
|
+
outline: none;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.iz-input-error {
|
|
562
|
+
color: ${({ theme }) => theme.negative};
|
|
563
|
+
font-size: .7rem;
|
|
564
|
+
}
|
|
565
|
+
`;
|
|
566
|
+
|
|
567
|
+
// components/types/form/types/datetime/index.tsx
|
|
568
|
+
var import_lodash4 = __toESM(require("lodash"));
|
|
569
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
570
|
+
function InputDateTime(props) {
|
|
571
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
572
|
+
const onChange = (event) => {
|
|
573
|
+
const value = event.target.value || "";
|
|
574
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
575
|
+
if (register.onChange) register.onChange(event);
|
|
576
|
+
if (props.onChange) props.onChange(event);
|
|
577
|
+
};
|
|
578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Container8, { className: props.className, error: props.error, children: [
|
|
579
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(InputLabel, { children: [
|
|
580
|
+
props.label,
|
|
581
|
+
props.required ? "*" : ""
|
|
582
|
+
] }),
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
584
|
+
"input",
|
|
585
|
+
{
|
|
586
|
+
...import_lodash4.default.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
587
|
+
type: "datetime-local",
|
|
588
|
+
onFocus: () => {
|
|
589
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
590
|
+
},
|
|
591
|
+
maxLength: props.maxLength || 255,
|
|
592
|
+
...register,
|
|
593
|
+
onChange
|
|
594
|
+
}
|
|
595
|
+
) }),
|
|
596
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
597
|
+
] });
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// components/types/form/types/textarea/styles.tsx
|
|
601
|
+
var import_styled_components9 = __toESM(require("styled-components"));
|
|
602
|
+
var Container9 = import_styled_components9.default.div`
|
|
603
|
+
width: 100%;
|
|
604
|
+
padding-top: .3rem;
|
|
605
|
+
|
|
606
|
+
.iz-input-content {
|
|
607
|
+
display: flex;
|
|
608
|
+
align-items: center;
|
|
609
|
+
justify-content: center;
|
|
610
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
611
|
+
border-radius: 5px;
|
|
612
|
+
overflow: hidden;
|
|
613
|
+
|
|
614
|
+
textarea {
|
|
615
|
+
border: 0;
|
|
616
|
+
padding: .5rem 1rem;
|
|
617
|
+
width: 100%;
|
|
618
|
+
font-size: .8rem;
|
|
619
|
+
background-color: ${({ theme }) => theme.primary};
|
|
620
|
+
color: ${({ theme }) => theme.t6};
|
|
621
|
+
|
|
622
|
+
&:disabled {
|
|
623
|
+
background-color: ${({ theme }) => theme.t2};
|
|
624
|
+
color: ${({ theme }) => theme.t6};
|
|
625
|
+
opacity: .7;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
&:focus-visible {
|
|
629
|
+
outline: none;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.iz-input-error {
|
|
635
|
+
color: ${({ theme }) => theme.negative};
|
|
636
|
+
font-size: .7rem;
|
|
637
|
+
}
|
|
638
|
+
`;
|
|
639
|
+
|
|
640
|
+
// components/types/form/types/textarea/index.tsx
|
|
641
|
+
var import_lodash5 = __toESM(require("lodash"));
|
|
642
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
643
|
+
function InputTextarea(props) {
|
|
644
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
645
|
+
const onChange = (event) => {
|
|
646
|
+
const value = event.target.value || "";
|
|
647
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
648
|
+
if (register.onChange) register.onChange(event);
|
|
649
|
+
if (props.onChange) props.onChange(value);
|
|
650
|
+
};
|
|
651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Container9, { className: props.className, error: props.error, children: [
|
|
652
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(InputLabel, { children: [
|
|
653
|
+
props.label,
|
|
654
|
+
props.required ? "*" : ""
|
|
655
|
+
] }),
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
657
|
+
"textarea",
|
|
658
|
+
{
|
|
659
|
+
...import_lodash5.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
|
|
660
|
+
maxLength: props.maxLength,
|
|
661
|
+
rows: props.rows || 5,
|
|
662
|
+
onFocus: () => {
|
|
663
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
664
|
+
},
|
|
665
|
+
...register,
|
|
666
|
+
onChange
|
|
667
|
+
}
|
|
668
|
+
) }),
|
|
669
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
670
|
+
] });
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// components/types/form/index.tsx
|
|
674
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
675
|
+
function Form(props) {
|
|
676
|
+
const formRef = props.formRef || (0, import_react4.useRef)({});
|
|
677
|
+
const setSchema = () => {
|
|
678
|
+
const schema2 = {};
|
|
679
|
+
import_lodash6.default.forEach(props.inputs, (data) => {
|
|
680
|
+
if (!data.validation) return;
|
|
681
|
+
schema2[data.name] = data.validation;
|
|
682
|
+
});
|
|
683
|
+
if (props.validation) return props.validation(import_zod.z.object(schema2));
|
|
684
|
+
return import_zod.z.object(schema2);
|
|
685
|
+
};
|
|
686
|
+
const schema = setSchema();
|
|
687
|
+
const {
|
|
688
|
+
register,
|
|
689
|
+
handleSubmit,
|
|
690
|
+
reset,
|
|
691
|
+
formState: { errors }
|
|
692
|
+
} = (0, import_react_hook_form.useForm)({
|
|
693
|
+
resolver: (0, import_zod2.zodResolver)(schema),
|
|
694
|
+
defaultValues: props.defaultValues,
|
|
695
|
+
mode: "all"
|
|
696
|
+
});
|
|
697
|
+
(0, import_react4.useEffect)(() => {
|
|
698
|
+
if (!props.clearWhen) return;
|
|
699
|
+
reset(void 0, { keepErrors: false });
|
|
700
|
+
}, [props.clearWhen]);
|
|
701
|
+
(0, import_react4.useEffect)(() => {
|
|
702
|
+
var _a;
|
|
703
|
+
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) == null ? void 0 : _a.length)) return;
|
|
704
|
+
import_lodash6.default.forEach(props.defaultValues, (value, key) => {
|
|
705
|
+
const input = import_lodash6.default.find(props.inputs, (data) => data.name === key);
|
|
706
|
+
props.defaultValues[key] = input.mask ? input.mask(value) : value;
|
|
707
|
+
});
|
|
708
|
+
reset(props.defaultValues, { keepErrors: false });
|
|
709
|
+
}, [props.defaultValues]);
|
|
710
|
+
const component = (data) => {
|
|
711
|
+
var _a;
|
|
712
|
+
const component2 = types_exports[import_lodash6.default.camelCase(data.type)];
|
|
713
|
+
const TypeComponent = component2 || InputText;
|
|
714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
715
|
+
TypeComponent,
|
|
716
|
+
{
|
|
717
|
+
...import_lodash6.default.omit(data, ["validation"]),
|
|
718
|
+
id: data.name,
|
|
719
|
+
type: component2 ? void 0 : data.type,
|
|
720
|
+
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
721
|
+
register
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
};
|
|
725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Container, { ref: formRef, onSubmit: handleSubmit(props.onSubmit), children: [
|
|
726
|
+
import_lodash6.default.map(
|
|
727
|
+
props.inputs,
|
|
728
|
+
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react4.default.Fragment, { children: component(data) }, index)
|
|
729
|
+
),
|
|
730
|
+
import_lodash6.default.isArray(props.buttons) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "form-buttons", children: import_lodash6.default.map(
|
|
731
|
+
props.buttons,
|
|
732
|
+
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { ...data }, index)
|
|
733
|
+
) })
|
|
734
|
+
] });
|
|
735
|
+
}
|
|
736
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
737
|
+
0 && (module.exports = {
|
|
738
|
+
Button,
|
|
739
|
+
Form,
|
|
740
|
+
InputDateTime,
|
|
741
|
+
InputFile,
|
|
742
|
+
InputLabel,
|
|
743
|
+
InputSelect,
|
|
744
|
+
InputText,
|
|
745
|
+
InputTextarea
|
|
746
|
+
});
|