@gustavo-valsechi/client 1.3.23 → 1.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/components/index.d.ts +3 -10
  2. package/dist/components/index.mjs +3082 -11
  3. package/dist/components/styles.d.ts +2 -0
  4. package/dist/components/styles.mjs +21 -0
  5. package/dist/components/types/avatar/index.d.ts +2 -0
  6. package/dist/components/types/avatar/index.mjs +88 -0
  7. package/dist/components/types/avatar/styles.d.ts +1 -0
  8. package/dist/components/types/avatar/styles.mjs +61 -0
  9. package/dist/components/types/badge/index.d.ts +2 -0
  10. package/dist/components/types/badge/index.mjs +324 -0
  11. package/dist/components/types/badge/styles.d.ts +1 -0
  12. package/dist/components/types/badge/styles.mjs +39 -0
  13. package/dist/components/types/block/index.d.ts +2 -0
  14. package/dist/components/types/block/index.mjs +3078 -0
  15. package/dist/components/types/block/styles.d.ts +2 -0
  16. package/dist/components/types/block/styles.mjs +32 -0
  17. package/dist/components/types/chart/index.d.ts +2 -0
  18. package/dist/components/types/chart/index.mjs +322 -0
  19. package/dist/components/types/chart/styles.d.ts +1 -0
  20. package/dist/components/types/chart/styles.mjs +10 -0
  21. package/dist/components/types/credit-card/assets/index.d.ts +4 -0
  22. package/dist/components/types/credit-card/assets/index.mjs +23 -0
  23. package/dist/components/types/credit-card/card/index.d.ts +2 -0
  24. package/dist/components/types/credit-card/card/index.mjs +732 -0
  25. package/dist/components/types/credit-card/card/styles.d.ts +1 -0
  26. package/dist/components/types/credit-card/card/styles.mjs +138 -0
  27. package/dist/components/types/credit-card/functions/index.d.ts +2 -0
  28. package/dist/components/types/credit-card/functions/index.mjs +61 -0
  29. package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
  30. package/dist/components/types/credit-card/functions/styles.mjs +43 -0
  31. package/dist/components/types/credit-card/index.d.ts +2 -0
  32. package/dist/components/types/credit-card/index.mjs +853 -0
  33. package/dist/components/types/credit-card/styles.d.ts +1 -0
  34. package/dist/components/types/credit-card/styles.mjs +40 -0
  35. package/dist/components/types/credit-card/tools/index.d.ts +6 -0
  36. package/dist/components/types/credit-card/tools/index.mjs +566 -0
  37. package/dist/components/types/form/index.d.ts +3 -0
  38. package/dist/components/types/form/index.mjs +711 -0
  39. package/dist/components/types/form/styles.d.ts +1 -0
  40. package/dist/components/types/form/styles.mjs +21 -0
  41. package/dist/components/types/form/types/button/index.d.ts +2 -0
  42. package/dist/components/types/form/types/button/index.mjs +165 -0
  43. package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
  44. package/dist/components/types/form/types/button/loading/index.mjs +104 -0
  45. package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
  46. package/dist/components/types/form/types/button/loading/styles.mjs +94 -0
  47. package/dist/components/types/form/types/button/styles.d.ts +1 -0
  48. package/dist/components/types/form/types/button/styles.mjs +47 -0
  49. package/dist/components/types/form/types/datetime/index.d.ts +2 -0
  50. package/dist/components/types/form/types/datetime/index.mjs +93 -0
  51. package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
  52. package/dist/components/types/form/types/datetime/styles.mjs +46 -0
  53. package/dist/components/types/form/types/file/index.d.ts +2 -0
  54. package/dist/components/types/form/types/file/index.mjs +91 -0
  55. package/dist/components/types/form/types/file/styles.d.ts +1 -0
  56. package/dist/components/types/form/types/file/styles.mjs +33 -0
  57. package/dist/components/types/form/types/index.d.ts +7 -0
  58. package/dist/components/types/form/types/index.mjs +603 -0
  59. package/dist/components/types/form/types/input/index.d.ts +2 -0
  60. package/dist/components/types/form/types/input/index.mjs +113 -0
  61. package/dist/components/types/form/types/input/styles.d.ts +1 -0
  62. package/dist/components/types/form/types/input/styles.mjs +52 -0
  63. package/dist/components/types/form/types/label/index.d.ts +2 -0
  64. package/dist/components/types/form/types/label/index.mjs +19 -0
  65. package/dist/components/types/form/types/label/styles.d.ts +1 -0
  66. package/dist/components/types/form/types/label/styles.mjs +13 -0
  67. package/dist/components/types/form/types/select/index.d.ts +2 -0
  68. package/dist/components/types/form/types/select/index.mjs +125 -0
  69. package/dist/components/types/form/types/select/styles.d.ts +1 -0
  70. package/dist/components/types/form/types/select/styles.mjs +58 -0
  71. package/dist/components/types/form/types/textarea/index.d.ts +2 -0
  72. package/dist/components/types/form/types/textarea/index.mjs +92 -0
  73. package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
  74. package/dist/components/types/form/types/textarea/styles.mjs +45 -0
  75. package/dist/components/types/index.d.ts +11 -0
  76. package/dist/components/types/index.mjs +3094 -0
  77. package/dist/components/types/loading/app/index.d.ts +2 -0
  78. package/dist/components/types/loading/app/index.mjs +128 -0
  79. package/dist/components/types/loading/app/styles.d.ts +1 -0
  80. package/dist/components/types/loading/app/styles.mjs +93 -0
  81. package/dist/components/types/loading/bar/index.d.ts +2 -0
  82. package/dist/components/types/loading/bar/index.mjs +33 -0
  83. package/dist/components/types/loading/bar/styles.d.ts +1 -0
  84. package/dist/components/types/loading/bar/styles.mjs +27 -0
  85. package/dist/components/types/loading/index.d.ts +2 -0
  86. package/dist/components/types/loading/index.mjs +156 -0
  87. package/dist/components/types/logo/index.d.ts +2 -0
  88. package/dist/components/types/logo/index.mjs +34 -0
  89. package/dist/components/types/logo/styles.d.ts +1 -0
  90. package/dist/components/types/logo/styles.mjs +25 -0
  91. package/dist/components/types/lottie/animations/index.d.ts +293 -0
  92. package/dist/components/types/lottie/animations/index.mjs +10 -0
  93. package/dist/components/types/lottie/index.d.ts +2 -0
  94. package/dist/components/types/lottie/index.mjs +69 -0
  95. package/dist/components/types/lottie/styles.d.ts +1 -0
  96. package/dist/components/types/lottie/styles.mjs +28 -0
  97. package/dist/components/types/modal/index.d.ts +2 -0
  98. package/dist/components/types/modal/index.mjs +2324 -0
  99. package/dist/components/types/modal/styles.d.ts +1 -0
  100. package/dist/components/types/modal/styles.mjs +135 -0
  101. package/dist/components/types/table/index.d.ts +3 -0
  102. package/dist/components/types/table/index.mjs +3079 -0
  103. package/dist/components/types/table/modal/actions.d.ts +10 -0
  104. package/dist/components/types/table/modal/actions.mjs +87 -0
  105. package/dist/components/types/table/modal/index.d.ts +2 -0
  106. package/dist/components/types/table/modal/index.mjs +3076 -0
  107. package/dist/components/types/table/modal/styles.d.ts +1 -0
  108. package/dist/components/types/table/modal/styles.mjs +58 -0
  109. package/dist/components/types/table/paginate/index.d.ts +2 -0
  110. package/dist/components/types/table/paginate/index.mjs +96 -0
  111. package/dist/components/types/table/paginate/styles.d.ts +1 -0
  112. package/dist/components/types/table/paginate/styles.mjs +42 -0
  113. package/dist/components/types/table/styles.d.ts +5 -0
  114. package/dist/components/types/table/styles.mjs +268 -0
  115. package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
  116. package/dist/contexts/icon/assets/brands/index.mjs +19 -0
  117. package/dist/contexts/icon/assets/index.d.ts +6 -0
  118. package/dist/contexts/icon/assets/index.mjs +44 -0
  119. package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
  120. package/dist/contexts/icon/assets/regular/index.mjs +19 -0
  121. package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
  122. package/dist/contexts/icon/assets/solid/index.mjs +19 -0
  123. package/dist/contexts/icon/index.d.ts +4 -0
  124. package/dist/contexts/icon/index.mjs +281 -0
  125. package/dist/contexts/icon/styles.d.ts +1 -0
  126. package/dist/contexts/icon/styles.mjs +10 -0
  127. package/dist/contexts/index.d.ts +4 -20
  128. package/dist/contexts/index.mjs +486 -4
  129. package/dist/contexts/modal/index.d.ts +4 -0
  130. package/dist/contexts/modal/index.mjs +66 -0
  131. package/dist/contexts/modal/styles.d.ts +1 -0
  132. package/dist/contexts/modal/styles.mjs +10 -0
  133. package/dist/contexts/theme/content.d.ts +3 -0
  134. package/dist/contexts/theme/content.mjs +81 -0
  135. package/dist/contexts/theme/index.d.ts +4 -0
  136. package/dist/contexts/theme/index.mjs +201 -0
  137. package/dist/contexts/theme/styles.d.ts +1 -0
  138. package/dist/contexts/theme/styles.mjs +84 -0
  139. package/dist/contexts/tooltip/index.d.ts +6 -0
  140. package/dist/contexts/tooltip/index.mjs +117 -0
  141. package/dist/contexts/tooltip/styles.d.ts +1 -0
  142. package/dist/contexts/tooltip/styles.mjs +46 -0
  143. package/dist/index.d.ts +4 -17
  144. package/dist/index.mjs +3312 -4
  145. package/dist/interfaces/components/avatar/index.d.ts +6 -0
  146. package/dist/interfaces/components/avatar/index.mjs +1 -0
  147. package/dist/interfaces/components/badge/index.d.ts +3 -0
  148. package/dist/interfaces/components/badge/index.mjs +1 -0
  149. package/dist/interfaces/components/block/index.d.ts +16 -0
  150. package/dist/interfaces/components/block/index.mjs +1 -0
  151. package/dist/interfaces/components/chart/index.d.ts +9 -0
  152. package/dist/interfaces/components/chart/index.mjs +1 -0
  153. package/dist/interfaces/components/credit-card/index.d.ts +16 -0
  154. package/dist/interfaces/components/credit-card/index.mjs +1 -0
  155. package/dist/interfaces/components/form/button/index.d.ts +7 -0
  156. package/dist/interfaces/components/form/button/index.mjs +1 -0
  157. package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
  158. package/dist/interfaces/components/form/datetime/index.mjs +1 -0
  159. package/dist/interfaces/components/form/file/index.d.ts +14 -0
  160. package/dist/interfaces/components/form/file/index.mjs +1 -0
  161. package/dist/interfaces/components/form/index.d.ts +16 -0
  162. package/dist/interfaces/components/form/index.mjs +1 -0
  163. package/dist/interfaces/components/form/input/index.d.ts +17 -0
  164. package/dist/interfaces/components/form/input/index.mjs +1 -0
  165. package/dist/interfaces/components/form/label/index.d.ts +5 -0
  166. package/dist/interfaces/components/form/label/index.mjs +1 -0
  167. package/dist/interfaces/components/form/select/index.d.ts +14 -0
  168. package/dist/interfaces/components/form/select/index.mjs +1 -0
  169. package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
  170. package/dist/interfaces/components/form/textarea/index.mjs +1 -0
  171. package/dist/interfaces/components/index.d.ts +26 -0
  172. package/dist/interfaces/components/index.mjs +1 -0
  173. package/dist/interfaces/components/loading/app/index.d.ts +3 -0
  174. package/dist/interfaces/components/loading/app/index.mjs +1 -0
  175. package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
  176. package/dist/interfaces/components/loading/bar/index.mjs +1 -0
  177. package/dist/interfaces/components/loading/index.d.ts +2 -0
  178. package/dist/interfaces/components/loading/index.mjs +1 -0
  179. package/dist/interfaces/components/logo/index.d.ts +6 -0
  180. package/dist/interfaces/components/logo/index.mjs +1 -0
  181. package/dist/interfaces/components/lottie/index.d.ts +12 -0
  182. package/dist/interfaces/components/lottie/index.mjs +1 -0
  183. package/dist/interfaces/components/modal/index.d.ts +16 -0
  184. package/dist/interfaces/components/modal/index.mjs +1 -0
  185. package/dist/interfaces/components/table/index.d.ts +46 -0
  186. package/dist/interfaces/components/table/index.mjs +1 -0
  187. package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
  188. package/dist/interfaces/components/table/paginate/index.mjs +1 -0
  189. package/dist/interfaces/contexts/icon/index.d.ts +3 -0
  190. package/dist/interfaces/contexts/icon/index.mjs +1 -0
  191. package/dist/interfaces/contexts/index.d.ts +8 -0
  192. package/dist/interfaces/contexts/index.mjs +1 -0
  193. package/dist/interfaces/contexts/modal/index.d.ts +16 -0
  194. package/dist/interfaces/contexts/modal/index.mjs +2 -0
  195. package/dist/interfaces/contexts/theme/index.d.ts +42 -0
  196. package/dist/interfaces/contexts/theme/index.mjs +1 -0
  197. package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
  198. package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
  199. package/dist/interfaces/index.d.ts +2 -12
  200. package/dist/interfaces/index.mjs +0 -2
  201. package/dist/styled.d.ts +6 -0
  202. package/dist/tsup.config.d.ts +2 -0
  203. package/package.json +13 -7
  204. package/dist/components/index.d.mts +0 -10
  205. package/dist/components/index.js +0 -63
  206. package/dist/contexts/index.d.mts +0 -20
  207. package/dist/contexts/index.js +0 -30
  208. package/dist/index-BhaGW0O1.d.ts +0 -601
  209. package/dist/index-BxA8LyyD.d.mts +0 -68
  210. package/dist/index-DDi0w5pw.d.mts +0 -601
  211. package/dist/index-DT7VKE7H.d.ts +0 -68
  212. package/dist/index-Da-DtPS-.d.mts +0 -29
  213. package/dist/index-Da-DtPS-.d.ts +0 -29
  214. package/dist/index.d.mts +0 -17
  215. package/dist/index.js +0 -28
  216. package/dist/interfaces/index.d.mts +0 -12
  217. package/dist/interfaces/index.js +0 -25
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // components/types/form/types/file/styles.tsx
5
+ import styled from "styled-components";
6
+ var Container = styled.div`
7
+ width: 100%;
8
+ padding-top: .3rem;
9
+
10
+ .iz-image-content {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
15
+ border-radius: 5px;
16
+ overflow: hidden;
17
+ padding: .5rem 1rem;
18
+ width: 100%;
19
+ font-size: .8rem;
20
+ background: ${(props) => props.disabled ? "${({ theme }) => theme.t2}" : "${({ theme }) => theme.primary}"};
21
+ opacity: ${(props) => props.disabled ? ".7" : "1"};
22
+ color: ${({ theme }) => theme.t6};
23
+ cursor: pointer;
24
+ }
25
+
26
+ .iz-input-error {
27
+ color: ${({ theme }) => theme.negative};
28
+ font-size: .7rem;
29
+ }
30
+ `;
31
+ export {
32
+ Container
33
+ };
@@ -0,0 +1,7 @@
1
+ export * from "./file";
2
+ export * from "./label";
3
+ export * from "./input";
4
+ export * from "./select";
5
+ export * from "./button";
6
+ export * from "./datetime";
7
+ export * from "./textarea";
@@ -0,0 +1,603 @@
1
+ "use client";
2
+
3
+ // components/types/form/types/file/index.tsx
4
+ import { useRef } from "react";
5
+
6
+ // components/types/form/types/file/styles.tsx
7
+ import styled from "styled-components";
8
+ var Container = styled.div`
9
+ width: 100%;
10
+ padding-top: .3rem;
11
+
12
+ .iz-image-content {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
17
+ border-radius: 5px;
18
+ overflow: hidden;
19
+ padding: .5rem 1rem;
20
+ width: 100%;
21
+ font-size: .8rem;
22
+ background: ${(props) => props.disabled ? "${({ theme }) => theme.t2}" : "${({ theme }) => theme.primary}"};
23
+ opacity: ${(props) => props.disabled ? ".7" : "1"};
24
+ color: ${({ theme }) => theme.t6};
25
+ cursor: pointer;
26
+ }
27
+
28
+ .iz-input-error {
29
+ color: ${({ theme }) => theme.negative};
30
+ font-size: .7rem;
31
+ }
32
+ `;
33
+
34
+ // components/types/form/types/label/styles.tsx
35
+ import styled2 from "styled-components";
36
+ var Container2 = styled2.label`
37
+ font-size: .8rem;
38
+ font-weight: 500;
39
+ color: ${({ theme }) => theme.t6};
40
+ `;
41
+
42
+ // components/types/form/types/label/index.tsx
43
+ import { jsx } from "react/jsx-runtime";
44
+ function InputLabel(props) {
45
+ return /* @__PURE__ */ jsx(Container2, { className: props.className, children: props.children });
46
+ }
47
+
48
+ // components/types/form/types/file/index.tsx
49
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
50
+ function InputFile(props) {
51
+ var _a;
52
+ const inputRef = useRef({});
53
+ const register = (props.register || ((name) => ({})))(props.name || "");
54
+ const readImage = (data) => {
55
+ if (props.onPreview) props.onPreview(URL.createObjectURL(data));
56
+ if (props.onChange) props.onChange(data);
57
+ };
58
+ return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
59
+ /* @__PURE__ */ jsx2(
60
+ "input",
61
+ {
62
+ hidden: true,
63
+ type: "file",
64
+ id: "file",
65
+ accept: "image/*",
66
+ ref: inputRef,
67
+ disabled: props.disabled,
68
+ name: props.name,
69
+ onFocus: () => {
70
+ if (props.onFocus) props.onFocus(props.name);
71
+ },
72
+ ...register,
73
+ onChange: (e) => {
74
+ var _a2;
75
+ register.onChange(e);
76
+ readImage((_a2 = e.target.files) == null ? void 0 : _a2[0]);
77
+ }
78
+ }
79
+ ),
80
+ !!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
81
+ props.label,
82
+ props.required ? "*" : ""
83
+ ] }),
84
+ /* @__PURE__ */ jsx2("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" }),
85
+ !!props.error && /* @__PURE__ */ jsx2("div", { className: "iz-input-error", children: props.error })
86
+ ] });
87
+ }
88
+
89
+ // components/types/form/types/input/index.tsx
90
+ import { useState } from "react";
91
+
92
+ // components/types/form/types/input/styles.tsx
93
+ import styled3 from "styled-components";
94
+ var Container3 = styled3.div`
95
+ width: 100%;
96
+ padding-top: .3rem;
97
+
98
+ .iz-input-content {
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
103
+ border-radius: 5px;
104
+ overflow: hidden;
105
+ padding-right: ${({ password }) => password ? ".6rem" : "0rem"};
106
+ background-color: ${({ theme }) => theme.primary};
107
+
108
+ input {
109
+ border: 0;
110
+ padding: .5rem 1rem;
111
+ width: 100%;
112
+ font-size: .8rem;
113
+ background-color: ${({ theme }) => theme.primary};
114
+ color: ${({ theme }) => theme.t6};
115
+
116
+ &:disabled {
117
+ background-color: ${({ theme }) => theme.t2};
118
+ color: ${({ theme }) => theme.t6};
119
+ opacity: .7;
120
+ }
121
+
122
+ &:focus-visible {
123
+ outline: none;
124
+ }
125
+ }
126
+
127
+ i {
128
+ color: ${({ theme }) => theme.t3};
129
+ cursor: pointer;
130
+ }
131
+ }
132
+
133
+ .iz-input-error {
134
+ color: ${({ theme }) => theme.negative};
135
+ font-size: .7rem;
136
+ }
137
+ `;
138
+
139
+ // components/types/form/types/input/index.tsx
140
+ import _ from "lodash";
141
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
142
+ function InputText(props) {
143
+ const [showPassword, setShowPassword] = useState(false);
144
+ const register = (props.register || ((name) => ({})))(props.name || "");
145
+ const onChange = (event) => {
146
+ const value = event.target.value || "";
147
+ event.target.value = props.mask ? props.mask(value) : value;
148
+ if (register.onChange) register.onChange(event);
149
+ if (props.onChange) props.onChange(value);
150
+ };
151
+ return /* @__PURE__ */ jsxs2(Container3, { className: props.className, error: props.error, password: props.type === "password", children: [
152
+ !!props.label && /* @__PURE__ */ jsxs2(InputLabel, { children: [
153
+ props.label,
154
+ props.required ? "*" : ""
155
+ ] }),
156
+ /* @__PURE__ */ jsxs2("div", { className: "iz-input-content", children: [
157
+ /* @__PURE__ */ jsx3(
158
+ "input",
159
+ {
160
+ ..._.omit(props, ["className", "register", "mask"]),
161
+ type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
162
+ maxLength: props.maxLength || 255,
163
+ onFocus: () => {
164
+ if (props.onFocus) props.onFocus(props.name);
165
+ },
166
+ ...register,
167
+ onChange
168
+ }
169
+ ),
170
+ props.type === "password" && /* @__PURE__ */ jsx3(
171
+ "i",
172
+ {
173
+ "aria-hidden": true,
174
+ className: showPassword ? "fa-solid fa-eye-slash" : "fa-solid fa-eye",
175
+ onClick: () => setShowPassword(!showPassword)
176
+ }
177
+ )
178
+ ] }),
179
+ !!props.error && /* @__PURE__ */ jsx3("div", { className: "iz-input-error", children: props.error })
180
+ ] });
181
+ }
182
+
183
+ // components/types/form/types/select/index.tsx
184
+ import { useState as useState2 } from "react";
185
+
186
+ // components/types/form/types/select/styles.tsx
187
+ import styled4 from "styled-components";
188
+ var Container4 = styled4.div`
189
+ width: 100%;
190
+ padding-top: .3rem;
191
+
192
+ .iz-input-content {
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
197
+ border-radius: 5px;
198
+ overflow: hidden;
199
+ position: relative;
200
+ cursor: pointer;
201
+
202
+ select {
203
+ border: 0;
204
+ padding: .5rem 2.3rem .5rem 1rem;
205
+ width: 100%;
206
+ font-size: .8rem;
207
+ appearance: none;
208
+ cursor: pointer;
209
+ background-color: ${({ theme }) => theme.primary};
210
+ color: ${({ theme }) => theme.t6};
211
+
212
+ &:disabled {
213
+ background-color: ${({ theme }) => theme.t2};
214
+ color: ${({ theme }) => theme.t6};
215
+ opacity: .7;
216
+ }
217
+
218
+ &:focus-visible {
219
+ outline: none;
220
+ }
221
+ }
222
+
223
+ i {
224
+ position: absolute;
225
+ top: 50%;
226
+ right: .8rem;
227
+ transform: translateY(-50%);
228
+ font-size: .8rem;
229
+ color: ${({ theme }) => theme.t6};
230
+ }
231
+ }
232
+
233
+ .iz-input-error {
234
+ color: ${({ theme }) => theme.negative};
235
+ font-size: .7rem;
236
+ }
237
+ `;
238
+
239
+ // components/types/form/types/select/index.tsx
240
+ import _2 from "lodash";
241
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
242
+ function InputSelect(props) {
243
+ const [focus, setFocus] = useState2(false);
244
+ const register = (props.register || ((name) => ({})))(props.name || "");
245
+ const onChange = (event) => {
246
+ const value = event.target.value || "";
247
+ if (register.onChange) register.onChange(event);
248
+ if (props.onChange) props.onChange(value);
249
+ };
250
+ return /* @__PURE__ */ jsxs3(Container4, { className: props.className, error: props.error, children: [
251
+ !!props.label && /* @__PURE__ */ jsxs3(InputLabel, { children: [
252
+ props.label,
253
+ props.required ? "*" : ""
254
+ ] }),
255
+ /* @__PURE__ */ jsxs3("div", { className: "iz-input-content", children: [
256
+ /* @__PURE__ */ jsx4(
257
+ "select",
258
+ {
259
+ ..._2.omit(props, ["className", "onChange", "onFocus", "options", "onMouseDown", "onBlur", "maxLength", "required", "register"]),
260
+ onMouseDown: () => setFocus(!focus),
261
+ onFocus: () => {
262
+ if (props.onFocus) props.onFocus(props.name);
263
+ },
264
+ ...register,
265
+ onBlur: (event) => {
266
+ if (register.onBlur) register.onBlur(event);
267
+ setFocus(false);
268
+ },
269
+ onChange,
270
+ children: _2.map(
271
+ props.options,
272
+ (data, index) => /* @__PURE__ */ jsx4(
273
+ "option",
274
+ {
275
+ value: Object.keys(data),
276
+ children: Object.values(data)
277
+ },
278
+ index
279
+ )
280
+ )
281
+ }
282
+ ),
283
+ /* @__PURE__ */ jsx4("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" })
284
+ ] }),
285
+ !!props.error && /* @__PURE__ */ jsx4("div", { className: "iz-input-error", children: props.error })
286
+ ] });
287
+ }
288
+
289
+ // components/types/form/types/button/styles.tsx
290
+ import styled5 from "styled-components";
291
+ var Container5 = styled5.button`
292
+ border-radius: 5px;
293
+ font-size: .8rem;
294
+ font-weight: 500;
295
+ transition: ease .3s;
296
+ display: flex;
297
+ align-items: center;
298
+ justify-content: center;
299
+ color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff !important"};
300
+ background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
301
+ border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
302
+ pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
303
+ cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
304
+ opacity: ${(props) => props.loading === "true" ? 0.6 : 1};
305
+ padding: .4rem 2.5rem;
306
+ transition: ease .3s;
307
+
308
+ span {
309
+ text-align: center;
310
+ cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
311
+ }
312
+
313
+ &:disabled {
314
+ pointer-events: none;
315
+
316
+ &::before {
317
+ opacity: .6;
318
+ }
319
+ }
320
+
321
+ &:hover {
322
+ opacity: .9;
323
+ color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff"};
324
+
325
+ &::before {
326
+ background: ${(props) => props.transparent ? "transparent" : props.color || props.theme.secondary};
327
+ }
328
+ }
329
+ `;
330
+
331
+ // components/types/form/types/button/loading/styles.tsx
332
+ import styled6 from "styled-components";
333
+ var Container6 = styled6.div`
334
+ display: flex;
335
+ justify-content: space-between;
336
+ align-items: center;
337
+ width: 2rem;
338
+ margin-right: .5rem;
339
+
340
+ div {
341
+ width: .5rem;
342
+ height: .5rem;
343
+ border-radius: 1rem;
344
+ background: rgb(255, 255, 255, 1);
345
+
346
+ &:nth-child(1) {
347
+ animation: blinkOne infinite ease 2s;
348
+ }
349
+
350
+ &:nth-child(2) {
351
+ animation: blinkTwo infinite ease 2s;
352
+ }
353
+
354
+ &:nth-child(3) {
355
+ animation: blinkThree infinite ease 2s;
356
+ }
357
+ }
358
+
359
+ @keyframes blinkOne {
360
+ 0% {
361
+ opacity: 0.8;
362
+ }
363
+ 20% {
364
+ opacity: 0.2;
365
+ }
366
+ 40% {
367
+ opacity: 0.2;
368
+ }
369
+ 60% {
370
+ opacity: 0.2;
371
+ }
372
+ 80% {
373
+ opacity: 0.2;
374
+ }
375
+ 100% {
376
+ opacity: 0.8;
377
+ }
378
+ }
379
+
380
+ @keyframes blinkTwo {
381
+ 0% {
382
+ opacity: 0.2;
383
+ }
384
+ 20% {
385
+ opacity: 0.8;
386
+ }
387
+ 40% {
388
+ opacity: 0.2;
389
+ }
390
+ 60% {
391
+ opacity: 0.2;
392
+ }
393
+ 80% {
394
+ opacity: 0.8;
395
+ }
396
+ 100% {
397
+ opacity: 0.2;
398
+ }
399
+ }
400
+
401
+ @keyframes blinkThree {
402
+ 0% {
403
+ opacity: 0.2;
404
+ }
405
+ 25% {
406
+ opacity: 0.2;
407
+ }
408
+ 50% {
409
+ opacity: 0.8;
410
+ }
411
+ 75% {
412
+ opacity: 0.2;
413
+ }
414
+ 100% {
415
+ opacity: 0.2;
416
+ }
417
+ }
418
+ `;
419
+
420
+ // components/types/form/types/button/loading/index.tsx
421
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
422
+ function Loading() {
423
+ return /* @__PURE__ */ jsxs4(Container6, { children: [
424
+ /* @__PURE__ */ jsx5("div", {}),
425
+ /* @__PURE__ */ jsx5("div", {}),
426
+ /* @__PURE__ */ jsx5("div", {})
427
+ ] });
428
+ }
429
+
430
+ // components/types/form/types/button/index.tsx
431
+ import _3 from "lodash";
432
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
433
+ function Button(props) {
434
+ return /* @__PURE__ */ jsxs5(
435
+ Container5,
436
+ {
437
+ loading: String(!!props.loading),
438
+ disabled: props.disabled,
439
+ type: props.type || "button",
440
+ ..._3.omit(props, ["loading", "type"]),
441
+ children: [
442
+ !!props.loading && /* @__PURE__ */ jsx6(Loading, {}),
443
+ /* @__PURE__ */ jsx6("span", { children: props.label })
444
+ ]
445
+ }
446
+ );
447
+ }
448
+
449
+ // components/types/form/types/datetime/styles.tsx
450
+ import styled7 from "styled-components";
451
+ var Container7 = styled7.div`
452
+ width: 100%;
453
+ padding-top: .3rem;
454
+
455
+ .iz-input-content {
456
+ display: flex;
457
+ align-items: center;
458
+ justify-content: center;
459
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
460
+ border-radius: 5px;
461
+ overflow: hidden;
462
+
463
+ input {
464
+ border: 0;
465
+ padding: .5rem 1rem;
466
+ width: 100%;
467
+ font-size: .8rem;
468
+ background-color: ${({ theme }) => theme.primary};
469
+ color: ${({ theme }) => theme.t6};
470
+ color-scheme: ${(props) => props.theme || "light"};
471
+
472
+ &:disabled {
473
+ background-color: ${({ theme }) => theme.t2};
474
+ color: ${({ theme }) => theme.t6};
475
+ opacity: .7;
476
+ }
477
+
478
+ &:focus-visible {
479
+ outline: none;
480
+ }
481
+ }
482
+ }
483
+
484
+ .iz-input-error {
485
+ color: ${({ theme }) => theme.negative};
486
+ font-size: .7rem;
487
+ }
488
+ `;
489
+
490
+ // components/types/form/types/datetime/index.tsx
491
+ import _4 from "lodash";
492
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
493
+ function InputDateTime(props) {
494
+ const register = (props.register || ((name) => ({})))(props.name || "");
495
+ const onChange = (event) => {
496
+ const value = event.target.value || "";
497
+ event.target.value = props.mask ? props.mask(value) : value;
498
+ if (register.onChange) register.onChange(event);
499
+ if (props.onChange) props.onChange(event);
500
+ };
501
+ return /* @__PURE__ */ jsxs6(Container7, { className: props.className, error: props.error, children: [
502
+ !!props.label && /* @__PURE__ */ jsxs6(InputLabel, { children: [
503
+ props.label,
504
+ props.required ? "*" : ""
505
+ ] }),
506
+ /* @__PURE__ */ jsx7("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx7(
507
+ "input",
508
+ {
509
+ ..._4.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
510
+ type: "datetime-local",
511
+ onFocus: () => {
512
+ if (props.onFocus) props.onFocus(props.name);
513
+ },
514
+ maxLength: props.maxLength || 255,
515
+ ...register,
516
+ onChange
517
+ }
518
+ ) }),
519
+ !!props.error && /* @__PURE__ */ jsx7("div", { className: "iz-input-error", children: props.error })
520
+ ] });
521
+ }
522
+
523
+ // components/types/form/types/textarea/styles.tsx
524
+ import styled8 from "styled-components";
525
+ var Container8 = styled8.div`
526
+ width: 100%;
527
+ padding-top: .3rem;
528
+
529
+ .iz-input-content {
530
+ display: flex;
531
+ align-items: center;
532
+ justify-content: center;
533
+ border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
534
+ border-radius: 5px;
535
+ overflow: hidden;
536
+
537
+ textarea {
538
+ border: 0;
539
+ padding: .5rem 1rem;
540
+ width: 100%;
541
+ font-size: .8rem;
542
+ background-color: ${({ theme }) => theme.primary};
543
+ color: ${({ theme }) => theme.t6};
544
+
545
+ &:disabled {
546
+ background-color: ${({ theme }) => theme.t2};
547
+ color: ${({ theme }) => theme.t6};
548
+ opacity: .7;
549
+ }
550
+
551
+ &:focus-visible {
552
+ outline: none;
553
+ }
554
+ }
555
+ }
556
+
557
+ .iz-input-error {
558
+ color: ${({ theme }) => theme.negative};
559
+ font-size: .7rem;
560
+ }
561
+ `;
562
+
563
+ // components/types/form/types/textarea/index.tsx
564
+ import _5 from "lodash";
565
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
566
+ function InputTextarea(props) {
567
+ const register = (props.register || ((name) => ({})))(props.name || "");
568
+ const onChange = (event) => {
569
+ const value = event.target.value || "";
570
+ event.target.value = props.mask ? props.mask(value) : value;
571
+ if (register.onChange) register.onChange(event);
572
+ if (props.onChange) props.onChange(value);
573
+ };
574
+ return /* @__PURE__ */ jsxs7(Container8, { className: props.className, error: props.error, children: [
575
+ !!props.label && /* @__PURE__ */ jsxs7(InputLabel, { children: [
576
+ props.label,
577
+ props.required ? "*" : ""
578
+ ] }),
579
+ /* @__PURE__ */ jsx8("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx8(
580
+ "textarea",
581
+ {
582
+ ..._5.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
583
+ maxLength: props.maxLength,
584
+ rows: props.rows || 5,
585
+ onFocus: () => {
586
+ if (props.onFocus) props.onFocus(props.name);
587
+ },
588
+ ...register,
589
+ onChange
590
+ }
591
+ ) }),
592
+ !!props.error && /* @__PURE__ */ jsx8("div", { className: "iz-input-error", children: props.error })
593
+ ] });
594
+ }
595
+ export {
596
+ Button,
597
+ InputDateTime,
598
+ InputFile,
599
+ InputLabel,
600
+ InputSelect,
601
+ InputText,
602
+ InputTextarea
603
+ };
@@ -0,0 +1,2 @@
1
+ import { IInputText } from "@interfaces";
2
+ export declare function InputText(props: IInputText): import("react/jsx-runtime").JSX.Element;