@gustavo-valsechi/client 1.3.28 → 1.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +3 -10
- package/dist/components/index.js +13 -3070
- package/dist/components/index.mjs +11 -3082
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.js +54 -0
- package/dist/components/styles.mjs +19 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.js +63 -0
- package/dist/components/types/avatar/index.mjs +29 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.js +93 -0
- package/dist/components/types/avatar/styles.mjs +59 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.js +54 -0
- package/dist/components/types/badge/index.mjs +20 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.js +71 -0
- package/dist/components/types/badge/styles.mjs +37 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.js +44 -0
- package/dist/components/types/block/index.mjs +20 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.js +65 -0
- package/dist/components/types/block/styles.mjs +30 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.js +80 -0
- package/dist/components/types/chart/index.mjs +46 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.js +42 -0
- package/dist/components/types/chart/styles.mjs +8 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.js +41 -0
- package/dist/components/types/credit-card/assets/index.mjs +21 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.js +67 -0
- package/dist/components/types/credit-card/card/index.mjs +37 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.js +170 -0
- package/dist/components/types/credit-card/card/styles.mjs +136 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.js +52 -0
- package/dist/components/types/credit-card/functions/index.mjs +22 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.js +75 -0
- package/dist/components/types/credit-card/functions/styles.mjs +41 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.js +70 -0
- package/dist/components/types/credit-card/index.mjs +36 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.js +72 -0
- package/dist/components/types/credit-card/styles.mjs +38 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.js +58 -0
- package/dist/components/types/credit-card/tools/index.mjs +23 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.js +111 -0
- package/dist/components/types/form/index.mjs +75 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.js +53 -0
- package/dist/components/types/form/styles.mjs +19 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.js +58 -0
- package/dist/components/types/form/types/button/index.mjs +24 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.js +38 -0
- package/dist/components/types/form/types/button/loading/index.mjs +14 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.js +126 -0
- package/dist/components/types/form/types/button/loading/styles.mjs +92 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.js +79 -0
- package/dist/components/types/form/types/button/styles.mjs +45 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.js +72 -0
- package/dist/components/types/form/types/datetime/index.mjs +38 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.js +78 -0
- package/dist/components/types/form/types/datetime/styles.mjs +44 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.js +71 -0
- package/dist/components/types/form/types/file/index.mjs +47 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.js +65 -0
- package/dist/components/types/form/types/file/styles.mjs +31 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.js +35 -0
- package/dist/components/types/form/types/index.mjs +8 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.js +84 -0
- package/dist/components/types/form/types/input/index.mjs +50 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.js +84 -0
- package/dist/components/types/form/types/input/styles.mjs +50 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.js +34 -0
- package/dist/components/types/form/types/label/index.mjs +10 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.js +45 -0
- package/dist/components/types/form/types/label/styles.mjs +11 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.js +90 -0
- package/dist/components/types/form/types/select/index.mjs +56 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.js +90 -0
- package/dist/components/types/form/types/select/styles.mjs +56 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.js +72 -0
- package/dist/components/types/form/types/textarea/index.mjs +38 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.js +77 -0
- package/dist/components/types/form/types/textarea/styles.mjs +43 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/types/index.js +43 -0
- package/dist/components/types/index.mjs +12 -0
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.js +35 -0
- package/dist/components/types/loading/app/index.mjs +11 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.js +125 -0
- package/dist/components/types/loading/app/styles.mjs +91 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.js +34 -0
- package/dist/components/types/loading/bar/index.mjs +10 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.js +59 -0
- package/dist/components/types/loading/bar/styles.mjs +25 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.js +25 -0
- package/dist/components/types/loading/index.mjs +3 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.js +37 -0
- package/dist/components/types/logo/index.mjs +13 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.js +57 -0
- package/dist/components/types/logo/styles.mjs +23 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.js +36 -0
- package/dist/components/types/lottie/animations/index.mjs +6 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.js +72 -0
- package/dist/components/types/lottie/index.mjs +38 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.js +60 -0
- package/dist/components/types/lottie/styles.mjs +26 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.js +66 -0
- package/dist/components/types/modal/index.mjs +32 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.js +167 -0
- package/dist/components/types/modal/styles.mjs +133 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/components/types/table/index.js +171 -0
- package/dist/components/types/table/index.mjs +135 -0
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.js +30 -0
- package/dist/components/types/table/modal/actions.mjs +10 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.js +91 -0
- package/dist/components/types/table/modal/index.mjs +61 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.js +90 -0
- package/dist/components/types/table/modal/styles.mjs +56 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.js +92 -0
- package/dist/components/types/table/paginate/index.mjs +58 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.js +74 -0
- package/dist/components/types/table/paginate/styles.mjs +40 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.js +300 -0
- package/dist/components/types/table/styles.mjs +266 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.js +31 -0
- package/dist/contexts/icon/assets/brands/index.mjs +11 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.js +42 -0
- package/dist/contexts/icon/assets/index.mjs +12 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.js +31 -0
- package/dist/contexts/icon/assets/regular/index.mjs +11 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.js +31 -0
- package/dist/contexts/icon/assets/solid/index.mjs +11 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.js +107 -0
- package/dist/contexts/icon/index.mjs +72 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.js +42 -0
- package/dist/contexts/icon/styles.mjs +8 -0
- package/dist/contexts/index.d.ts +4 -20
- package/dist/contexts/index.js +9 -504
- package/dist/contexts/index.mjs +4 -486
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.js +92 -0
- package/dist/contexts/modal/index.mjs +57 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.js +42 -0
- package/dist/contexts/modal/styles.mjs +8 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.js +104 -0
- package/dist/contexts/theme/content.mjs +79 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.js +68 -0
- package/dist/contexts/theme/index.mjs +43 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.js +116 -0
- package/dist/contexts/theme/styles.mjs +82 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.js +107 -0
- package/dist/contexts/tooltip/index.mjs +72 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.js +78 -0
- package/dist/contexts/tooltip/styles.mjs +44 -0
- package/dist/index.d.ts +4 -17
- package/dist/index.js +8 -3325
- package/dist/index.mjs +4 -3312
- package/dist/interfaces/components/avatar/index.d.ts +6 -0
- package/dist/interfaces/components/avatar/index.js +17 -0
- package/dist/interfaces/components/avatar/index.mjs +1 -0
- package/dist/interfaces/components/badge/index.d.ts +3 -0
- package/dist/interfaces/components/badge/index.js +17 -0
- package/dist/interfaces/components/badge/index.mjs +1 -0
- package/dist/interfaces/components/block/index.d.ts +16 -0
- package/dist/interfaces/components/block/index.js +17 -0
- package/dist/interfaces/components/block/index.mjs +1 -0
- package/dist/interfaces/components/chart/index.d.ts +9 -0
- package/dist/interfaces/components/chart/index.js +17 -0
- package/dist/interfaces/components/chart/index.mjs +1 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -0
- package/dist/interfaces/components/credit-card/index.js +17 -0
- package/dist/interfaces/components/credit-card/index.mjs +1 -0
- package/dist/interfaces/components/form/button/index.d.ts +7 -0
- package/dist/interfaces/components/form/button/index.js +17 -0
- package/dist/interfaces/components/form/button/index.mjs +1 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
- package/dist/interfaces/components/form/datetime/index.js +17 -0
- package/dist/interfaces/components/form/datetime/index.mjs +1 -0
- package/dist/interfaces/components/form/file/index.d.ts +14 -0
- package/dist/interfaces/components/form/file/index.js +17 -0
- package/dist/interfaces/components/form/file/index.mjs +1 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.js +35 -0
- package/dist/interfaces/components/form/index.mjs +8 -0
- package/dist/interfaces/components/form/input/index.d.ts +17 -0
- package/dist/interfaces/components/form/input/index.js +17 -0
- package/dist/interfaces/components/form/input/index.mjs +1 -0
- package/dist/interfaces/components/form/label/index.d.ts +5 -0
- package/dist/interfaces/components/form/label/index.js +17 -0
- package/dist/interfaces/components/form/label/index.mjs +1 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -0
- package/dist/interfaces/components/form/select/index.js +17 -0
- package/dist/interfaces/components/form/select/index.mjs +1 -0
- package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
- package/dist/interfaces/components/form/textarea/index.js +17 -0
- package/dist/interfaces/components/form/textarea/index.mjs +1 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.js +43 -0
- package/dist/interfaces/components/index.mjs +12 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -0
- package/dist/interfaces/components/loading/app/index.js +17 -0
- package/dist/interfaces/components/loading/app/index.mjs +1 -0
- package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
- package/dist/interfaces/components/loading/bar/index.js +17 -0
- package/dist/interfaces/components/loading/bar/index.mjs +1 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.js +25 -0
- package/dist/interfaces/components/loading/index.mjs +3 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -0
- package/dist/interfaces/components/logo/index.js +17 -0
- package/dist/interfaces/components/logo/index.mjs +1 -0
- package/dist/interfaces/components/lottie/index.d.ts +12 -0
- package/dist/interfaces/components/lottie/index.js +17 -0
- package/dist/interfaces/components/lottie/index.mjs +1 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -0
- package/dist/interfaces/components/modal/index.js +17 -0
- package/dist/interfaces/components/modal/index.mjs +1 -0
- package/dist/interfaces/components/table/index.d.ts +46 -0
- package/dist/interfaces/components/table/index.js +23 -0
- package/dist/interfaces/components/table/index.mjs +2 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
- package/dist/interfaces/components/table/paginate/index.js +17 -0
- package/dist/interfaces/components/table/paginate/index.mjs +1 -0
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/dist/interfaces/contexts/icon/index.js +17 -0
- package/dist/interfaces/contexts/icon/index.mjs +1 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.js +29 -0
- package/dist/interfaces/contexts/index.mjs +5 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -0
- package/dist/interfaces/contexts/modal/index.js +18 -0
- package/dist/interfaces/contexts/modal/index.mjs +2 -0
- package/dist/interfaces/contexts/theme/index.d.ts +42 -0
- package/dist/interfaces/contexts/theme/index.js +17 -0
- package/dist/interfaces/contexts/theme/index.mjs +1 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.js +17 -0
- package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/interfaces/index.js +8 -2
- package/dist/interfaces/index.mjs +2 -0
- package/dist/styled.d.ts +6 -0
- package/dist/tsup.config.d.ts +2 -0
- package/package.json +5 -5
- package/dist/components/index.d.mts +0 -10
- package/dist/contexts/index.d.mts +0 -20
- package/dist/index-BhaGW0O1.d.ts +0 -601
- package/dist/index-BxA8LyyD.d.mts +0 -68
- package/dist/index-DDi0w5pw.d.mts +0 -601
- package/dist/index-DT7VKE7H.d.ts +0 -68
- package/dist/index-Da-DtPS-.d.mts +0 -29
- package/dist/index-Da-DtPS-.d.ts +0 -29
- package/dist/index.d.mts +0 -17
- package/dist/interfaces/index.d.mts +0 -12
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var datetime_exports = {};
|
|
32
|
+
__export(datetime_exports, {
|
|
33
|
+
InputDateTime: () => InputDateTime
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(datetime_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_styles = require("./styles");
|
|
38
|
+
var import_label = require("../label");
|
|
39
|
+
var import_lodash = __toESM(require("lodash"));
|
|
40
|
+
function InputDateTime(props) {
|
|
41
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
42
|
+
const onChange = (event) => {
|
|
43
|
+
const value = event.target.value || "";
|
|
44
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
45
|
+
if (register.onChange) register.onChange(event);
|
|
46
|
+
if (props.onChange) props.onChange(event);
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, children: [
|
|
49
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
50
|
+
props.label,
|
|
51
|
+
props.required ? "*" : ""
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
"input",
|
|
55
|
+
{
|
|
56
|
+
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
57
|
+
type: "datetime-local",
|
|
58
|
+
onFocus: () => {
|
|
59
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
60
|
+
},
|
|
61
|
+
maxLength: props.maxLength || 255,
|
|
62
|
+
...register,
|
|
63
|
+
onChange
|
|
64
|
+
}
|
|
65
|
+
) }),
|
|
66
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
InputDateTime
|
|
72
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Container } from "./styles";
|
|
5
|
+
import { InputLabel } from "../label";
|
|
6
|
+
import _ from "lodash";
|
|
7
|
+
function InputDateTime(props) {
|
|
8
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
9
|
+
const onChange = (event) => {
|
|
10
|
+
const value = event.target.value || "";
|
|
11
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
12
|
+
if (register.onChange) register.onChange(event);
|
|
13
|
+
if (props.onChange) props.onChange(event);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, children: [
|
|
16
|
+
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
17
|
+
props.label,
|
|
18
|
+
props.required ? "*" : ""
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx(
|
|
21
|
+
"input",
|
|
22
|
+
{
|
|
23
|
+
..._.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
24
|
+
type: "datetime-local",
|
|
25
|
+
onFocus: () => {
|
|
26
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
27
|
+
},
|
|
28
|
+
maxLength: props.maxLength || 255,
|
|
29
|
+
...register,
|
|
30
|
+
onChange
|
|
31
|
+
}
|
|
32
|
+
) }),
|
|
33
|
+
!!props.error && /* @__PURE__ */ jsx("div", { className: "iz-input-error", children: props.error })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
InputDateTime
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var styles_exports = {};
|
|
32
|
+
__export(styles_exports, {
|
|
33
|
+
Container: () => Container
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(styles_exports);
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
const Container = import_styled_components.default.div`
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding-top: .3rem;
|
|
40
|
+
|
|
41
|
+
.iz-input-content {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
46
|
+
border-radius: 5px;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
|
|
49
|
+
input {
|
|
50
|
+
border: 0;
|
|
51
|
+
padding: .5rem 1rem;
|
|
52
|
+
width: 100%;
|
|
53
|
+
font-size: .8rem;
|
|
54
|
+
background-color: ${({ theme }) => theme.primary};
|
|
55
|
+
color: ${({ theme }) => theme.t6};
|
|
56
|
+
color-scheme: ${(props) => props.theme || "light"};
|
|
57
|
+
|
|
58
|
+
&:disabled {
|
|
59
|
+
background-color: ${({ theme }) => theme.t2};
|
|
60
|
+
color: ${({ theme }) => theme.t6};
|
|
61
|
+
opacity: .7;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.iz-input-error {
|
|
71
|
+
color: ${({ theme }) => theme.negative};
|
|
72
|
+
font-size: .7rem;
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
Container
|
|
78
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding-top: .3rem;
|
|
7
|
+
|
|
8
|
+
.iz-input-content {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
13
|
+
border-radius: 5px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
|
|
16
|
+
input {
|
|
17
|
+
border: 0;
|
|
18
|
+
padding: .5rem 1rem;
|
|
19
|
+
width: 100%;
|
|
20
|
+
font-size: .8rem;
|
|
21
|
+
background-color: ${({ theme }) => theme.primary};
|
|
22
|
+
color: ${({ theme }) => theme.t6};
|
|
23
|
+
color-scheme: ${(props) => props.theme || "light"};
|
|
24
|
+
|
|
25
|
+
&:disabled {
|
|
26
|
+
background-color: ${({ theme }) => theme.t2};
|
|
27
|
+
color: ${({ theme }) => theme.t6};
|
|
28
|
+
opacity: .7;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.iz-input-error {
|
|
38
|
+
color: ${({ theme }) => theme.negative};
|
|
39
|
+
font-size: .7rem;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
export {
|
|
43
|
+
Container
|
|
44
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var file_exports = {};
|
|
22
|
+
__export(file_exports, {
|
|
23
|
+
InputFile: () => InputFile
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(file_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_styles = require("./styles");
|
|
29
|
+
var import_label = require("../label");
|
|
30
|
+
function InputFile(props) {
|
|
31
|
+
var _a;
|
|
32
|
+
const inputRef = (0, import_react.useRef)({});
|
|
33
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
34
|
+
const readImage = (data) => {
|
|
35
|
+
if (props.onPreview) props.onPreview(URL.createObjectURL(data));
|
|
36
|
+
if (props.onChange) props.onChange(data);
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
"input",
|
|
41
|
+
{
|
|
42
|
+
hidden: true,
|
|
43
|
+
type: "file",
|
|
44
|
+
id: "file",
|
|
45
|
+
accept: "image/*",
|
|
46
|
+
ref: inputRef,
|
|
47
|
+
disabled: props.disabled,
|
|
48
|
+
name: props.name,
|
|
49
|
+
onFocus: () => {
|
|
50
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
51
|
+
},
|
|
52
|
+
...register,
|
|
53
|
+
onChange: (e) => {
|
|
54
|
+
var _a2;
|
|
55
|
+
register.onChange(e);
|
|
56
|
+
readImage((_a2 = e.target.files) == null ? void 0 : _a2[0]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
61
|
+
props.label,
|
|
62
|
+
props.required ? "*" : ""
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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" }),
|
|
65
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
InputFile
|
|
71
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useRef } from "react";
|
|
5
|
+
import { Container } from "./styles";
|
|
6
|
+
import { InputLabel } from "../label";
|
|
7
|
+
function InputFile(props) {
|
|
8
|
+
var _a;
|
|
9
|
+
const inputRef = useRef({});
|
|
10
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
11
|
+
const readImage = (data) => {
|
|
12
|
+
if (props.onPreview) props.onPreview(URL.createObjectURL(data));
|
|
13
|
+
if (props.onChange) props.onChange(data);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
"input",
|
|
18
|
+
{
|
|
19
|
+
hidden: true,
|
|
20
|
+
type: "file",
|
|
21
|
+
id: "file",
|
|
22
|
+
accept: "image/*",
|
|
23
|
+
ref: inputRef,
|
|
24
|
+
disabled: props.disabled,
|
|
25
|
+
name: props.name,
|
|
26
|
+
onFocus: () => {
|
|
27
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
28
|
+
},
|
|
29
|
+
...register,
|
|
30
|
+
onChange: (e) => {
|
|
31
|
+
var _a2;
|
|
32
|
+
register.onChange(e);
|
|
33
|
+
readImage((_a2 = e.target.files) == null ? void 0 : _a2[0]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
38
|
+
props.label,
|
|
39
|
+
props.required ? "*" : ""
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ 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" }),
|
|
42
|
+
!!props.error && /* @__PURE__ */ jsx("div", { className: "iz-input-error", children: props.error })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
InputFile
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var styles_exports = {};
|
|
32
|
+
__export(styles_exports, {
|
|
33
|
+
Container: () => Container
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(styles_exports);
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
const Container = import_styled_components.default.div`
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding-top: .3rem;
|
|
40
|
+
|
|
41
|
+
.iz-image-content {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
46
|
+
border-radius: 5px;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
padding: .5rem 1rem;
|
|
49
|
+
width: 100%;
|
|
50
|
+
font-size: .8rem;
|
|
51
|
+
background: ${(props) => props.disabled ? "${({ theme }) => theme.t2}" : "${({ theme }) => theme.primary}"};
|
|
52
|
+
opacity: ${(props) => props.disabled ? ".7" : "1"};
|
|
53
|
+
color: ${({ theme }) => theme.t6};
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.iz-input-error {
|
|
58
|
+
color: ${({ theme }) => theme.negative};
|
|
59
|
+
font-size: .7rem;
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
Container
|
|
65
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding-top: .3rem;
|
|
7
|
+
|
|
8
|
+
.iz-image-content {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
13
|
+
border-radius: 5px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: .5rem 1rem;
|
|
16
|
+
width: 100%;
|
|
17
|
+
font-size: .8rem;
|
|
18
|
+
background: ${(props) => props.disabled ? "${({ theme }) => theme.t2}" : "${({ theme }) => theme.primary}"};
|
|
19
|
+
opacity: ${(props) => props.disabled ? ".7" : "1"};
|
|
20
|
+
color: ${({ theme }) => theme.t6};
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.iz-input-error {
|
|
25
|
+
color: ${({ theme }) => theme.negative};
|
|
26
|
+
font-size: .7rem;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
export {
|
|
30
|
+
Container
|
|
31
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
__reExport(types_exports, require("./file"), module.exports);
|
|
20
|
+
__reExport(types_exports, require("./label"), module.exports);
|
|
21
|
+
__reExport(types_exports, require("./input"), module.exports);
|
|
22
|
+
__reExport(types_exports, require("./select"), module.exports);
|
|
23
|
+
__reExport(types_exports, require("./button"), module.exports);
|
|
24
|
+
__reExport(types_exports, require("./datetime"), module.exports);
|
|
25
|
+
__reExport(types_exports, require("./textarea"), module.exports);
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
...require("./file"),
|
|
29
|
+
...require("./label"),
|
|
30
|
+
...require("./input"),
|
|
31
|
+
...require("./select"),
|
|
32
|
+
...require("./button"),
|
|
33
|
+
...require("./datetime"),
|
|
34
|
+
...require("./textarea")
|
|
35
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var input_exports = {};
|
|
32
|
+
__export(input_exports, {
|
|
33
|
+
InputText: () => InputText
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(input_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_styles = require("./styles");
|
|
39
|
+
var import_label = require("../label");
|
|
40
|
+
var import_lodash = __toESM(require("lodash"));
|
|
41
|
+
function InputText(props) {
|
|
42
|
+
const [showPassword, setShowPassword] = (0, import_react.useState)(false);
|
|
43
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
44
|
+
const onChange = (event) => {
|
|
45
|
+
const value = event.target.value || "";
|
|
46
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
47
|
+
if (register.onChange) register.onChange(event);
|
|
48
|
+
if (props.onChange) props.onChange(value);
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, password: props.type === "password", children: [
|
|
51
|
+
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
52
|
+
props.label,
|
|
53
|
+
props.required ? "*" : ""
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-input-content", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
...import_lodash.default.omit(props, ["className", "register", "mask"]),
|
|
60
|
+
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
61
|
+
maxLength: props.maxLength || 255,
|
|
62
|
+
onFocus: () => {
|
|
63
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
64
|
+
},
|
|
65
|
+
...register,
|
|
66
|
+
onChange
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
props.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"i",
|
|
71
|
+
{
|
|
72
|
+
"aria-hidden": true,
|
|
73
|
+
className: showPassword ? "fa-solid fa-eye-slash" : "fa-solid fa-eye",
|
|
74
|
+
onClick: () => setShowPassword(!showPassword)
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] }),
|
|
78
|
+
!!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-error", children: props.error })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
InputText
|
|
84
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Container } from "./styles";
|
|
6
|
+
import { InputLabel } from "../label";
|
|
7
|
+
import _ from "lodash";
|
|
8
|
+
function InputText(props) {
|
|
9
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
10
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
11
|
+
const onChange = (event) => {
|
|
12
|
+
const value = event.target.value || "";
|
|
13
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
14
|
+
if (register.onChange) register.onChange(event);
|
|
15
|
+
if (props.onChange) props.onChange(value);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, password: props.type === "password", children: [
|
|
18
|
+
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
19
|
+
props.label,
|
|
20
|
+
props.required ? "*" : ""
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "iz-input-content", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"input",
|
|
25
|
+
{
|
|
26
|
+
..._.omit(props, ["className", "register", "mask"]),
|
|
27
|
+
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
28
|
+
maxLength: props.maxLength || 255,
|
|
29
|
+
onFocus: () => {
|
|
30
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
31
|
+
},
|
|
32
|
+
...register,
|
|
33
|
+
onChange
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
props.type === "password" && /* @__PURE__ */ jsx(
|
|
37
|
+
"i",
|
|
38
|
+
{
|
|
39
|
+
"aria-hidden": true,
|
|
40
|
+
className: showPassword ? "fa-solid fa-eye-slash" : "fa-solid fa-eye",
|
|
41
|
+
onClick: () => setShowPassword(!showPassword)
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }),
|
|
45
|
+
!!props.error && /* @__PURE__ */ jsx("div", { className: "iz-input-error", children: props.error })
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
InputText
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|