@gustavo-valsechi/client 1.3.25 → 1.3.26

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 (215) hide show
  1. package/dist/components/index.d.mts +10 -0
  2. package/dist/components/index.d.ts +10 -3
  3. package/dist/components/{types/index.mjs → index.js} +404 -379
  4. package/dist/components/index.mjs +0 -1
  5. package/dist/contexts/index.d.mts +20 -0
  6. package/dist/contexts/index.d.ts +20 -4
  7. package/dist/contexts/index.js +524 -0
  8. package/dist/contexts/index.mjs +0 -1
  9. package/dist/index-BhaGW0O1.d.ts +601 -0
  10. package/dist/index-BxA8LyyD.d.mts +68 -0
  11. package/dist/index-DDi0w5pw.d.mts +601 -0
  12. package/dist/index-DT7VKE7H.d.ts +68 -0
  13. package/dist/index-Da-DtPS-.d.mts +29 -0
  14. package/dist/index-Da-DtPS-.d.ts +29 -0
  15. package/dist/index.d.mts +17 -0
  16. package/dist/index.d.ts +17 -4
  17. package/dist/{components/types/table/index.mjs → index.js} +1476 -1211
  18. package/dist/index.mjs +0 -1
  19. package/dist/interfaces/index.d.mts +12 -0
  20. package/dist/interfaces/index.d.ts +12 -2
  21. package/dist/interfaces/index.js +18 -0
  22. package/dist/interfaces/index.mjs +0 -1
  23. package/package.json +6 -8
  24. package/dist/components/styles.d.ts +0 -2
  25. package/dist/components/styles.mjs +0 -21
  26. package/dist/components/types/avatar/index.d.ts +0 -2
  27. package/dist/components/types/avatar/index.mjs +0 -88
  28. package/dist/components/types/avatar/styles.d.ts +0 -1
  29. package/dist/components/types/avatar/styles.mjs +0 -61
  30. package/dist/components/types/badge/index.d.ts +0 -2
  31. package/dist/components/types/badge/index.mjs +0 -324
  32. package/dist/components/types/badge/styles.d.ts +0 -1
  33. package/dist/components/types/badge/styles.mjs +0 -39
  34. package/dist/components/types/block/index.d.ts +0 -2
  35. package/dist/components/types/block/index.mjs +0 -3078
  36. package/dist/components/types/block/styles.d.ts +0 -2
  37. package/dist/components/types/block/styles.mjs +0 -32
  38. package/dist/components/types/chart/index.d.ts +0 -2
  39. package/dist/components/types/chart/index.mjs +0 -322
  40. package/dist/components/types/chart/styles.d.ts +0 -1
  41. package/dist/components/types/chart/styles.mjs +0 -10
  42. package/dist/components/types/credit-card/assets/index.d.ts +0 -4
  43. package/dist/components/types/credit-card/assets/index.mjs +0 -23
  44. package/dist/components/types/credit-card/card/index.d.ts +0 -2
  45. package/dist/components/types/credit-card/card/index.mjs +0 -732
  46. package/dist/components/types/credit-card/card/styles.d.ts +0 -1
  47. package/dist/components/types/credit-card/card/styles.mjs +0 -138
  48. package/dist/components/types/credit-card/functions/index.d.ts +0 -2
  49. package/dist/components/types/credit-card/functions/index.mjs +0 -61
  50. package/dist/components/types/credit-card/functions/styles.d.ts +0 -1
  51. package/dist/components/types/credit-card/functions/styles.mjs +0 -43
  52. package/dist/components/types/credit-card/index.d.ts +0 -2
  53. package/dist/components/types/credit-card/index.mjs +0 -853
  54. package/dist/components/types/credit-card/styles.d.ts +0 -1
  55. package/dist/components/types/credit-card/styles.mjs +0 -40
  56. package/dist/components/types/credit-card/tools/index.d.ts +0 -6
  57. package/dist/components/types/credit-card/tools/index.mjs +0 -566
  58. package/dist/components/types/form/index.d.ts +0 -3
  59. package/dist/components/types/form/index.mjs +0 -711
  60. package/dist/components/types/form/styles.d.ts +0 -1
  61. package/dist/components/types/form/styles.mjs +0 -21
  62. package/dist/components/types/form/types/button/index.d.ts +0 -2
  63. package/dist/components/types/form/types/button/index.mjs +0 -165
  64. package/dist/components/types/form/types/button/loading/index.d.ts +0 -1
  65. package/dist/components/types/form/types/button/loading/index.mjs +0 -104
  66. package/dist/components/types/form/types/button/loading/styles.d.ts +0 -1
  67. package/dist/components/types/form/types/button/loading/styles.mjs +0 -94
  68. package/dist/components/types/form/types/button/styles.d.ts +0 -1
  69. package/dist/components/types/form/types/button/styles.mjs +0 -47
  70. package/dist/components/types/form/types/datetime/index.d.ts +0 -2
  71. package/dist/components/types/form/types/datetime/index.mjs +0 -93
  72. package/dist/components/types/form/types/datetime/styles.d.ts +0 -1
  73. package/dist/components/types/form/types/datetime/styles.mjs +0 -46
  74. package/dist/components/types/form/types/file/index.d.ts +0 -2
  75. package/dist/components/types/form/types/file/index.mjs +0 -91
  76. package/dist/components/types/form/types/file/styles.d.ts +0 -1
  77. package/dist/components/types/form/types/file/styles.mjs +0 -33
  78. package/dist/components/types/form/types/index.d.ts +0 -7
  79. package/dist/components/types/form/types/index.mjs +0 -603
  80. package/dist/components/types/form/types/input/index.d.ts +0 -2
  81. package/dist/components/types/form/types/input/index.mjs +0 -113
  82. package/dist/components/types/form/types/input/styles.d.ts +0 -1
  83. package/dist/components/types/form/types/input/styles.mjs +0 -52
  84. package/dist/components/types/form/types/label/index.d.ts +0 -2
  85. package/dist/components/types/form/types/label/index.mjs +0 -19
  86. package/dist/components/types/form/types/label/styles.d.ts +0 -1
  87. package/dist/components/types/form/types/label/styles.mjs +0 -13
  88. package/dist/components/types/form/types/select/index.d.ts +0 -2
  89. package/dist/components/types/form/types/select/index.mjs +0 -125
  90. package/dist/components/types/form/types/select/styles.d.ts +0 -1
  91. package/dist/components/types/form/types/select/styles.mjs +0 -58
  92. package/dist/components/types/form/types/textarea/index.d.ts +0 -2
  93. package/dist/components/types/form/types/textarea/index.mjs +0 -92
  94. package/dist/components/types/form/types/textarea/styles.d.ts +0 -1
  95. package/dist/components/types/form/types/textarea/styles.mjs +0 -45
  96. package/dist/components/types/index.d.ts +0 -11
  97. package/dist/components/types/loading/app/index.d.ts +0 -2
  98. package/dist/components/types/loading/app/index.mjs +0 -128
  99. package/dist/components/types/loading/app/styles.d.ts +0 -1
  100. package/dist/components/types/loading/app/styles.mjs +0 -93
  101. package/dist/components/types/loading/bar/index.d.ts +0 -2
  102. package/dist/components/types/loading/bar/index.mjs +0 -33
  103. package/dist/components/types/loading/bar/styles.d.ts +0 -1
  104. package/dist/components/types/loading/bar/styles.mjs +0 -27
  105. package/dist/components/types/loading/index.d.ts +0 -2
  106. package/dist/components/types/loading/index.mjs +0 -156
  107. package/dist/components/types/logo/index.d.ts +0 -2
  108. package/dist/components/types/logo/index.mjs +0 -34
  109. package/dist/components/types/logo/styles.d.ts +0 -1
  110. package/dist/components/types/logo/styles.mjs +0 -25
  111. package/dist/components/types/lottie/animations/index.d.ts +0 -293
  112. package/dist/components/types/lottie/animations/index.mjs +0 -10
  113. package/dist/components/types/lottie/index.d.ts +0 -2
  114. package/dist/components/types/lottie/index.mjs +0 -69
  115. package/dist/components/types/lottie/styles.d.ts +0 -1
  116. package/dist/components/types/lottie/styles.mjs +0 -28
  117. package/dist/components/types/modal/index.d.ts +0 -2
  118. package/dist/components/types/modal/index.mjs +0 -2324
  119. package/dist/components/types/modal/styles.d.ts +0 -1
  120. package/dist/components/types/modal/styles.mjs +0 -135
  121. package/dist/components/types/table/index.d.ts +0 -3
  122. package/dist/components/types/table/modal/actions.d.ts +0 -10
  123. package/dist/components/types/table/modal/actions.mjs +0 -87
  124. package/dist/components/types/table/modal/index.d.ts +0 -2
  125. package/dist/components/types/table/modal/index.mjs +0 -3076
  126. package/dist/components/types/table/modal/styles.d.ts +0 -1
  127. package/dist/components/types/table/modal/styles.mjs +0 -58
  128. package/dist/components/types/table/paginate/index.d.ts +0 -2
  129. package/dist/components/types/table/paginate/index.mjs +0 -96
  130. package/dist/components/types/table/paginate/styles.d.ts +0 -1
  131. package/dist/components/types/table/paginate/styles.mjs +0 -42
  132. package/dist/components/types/table/styles.d.ts +0 -5
  133. package/dist/components/types/table/styles.mjs +0 -268
  134. package/dist/contexts/icon/assets/brands/index.d.ts +0 -2
  135. package/dist/contexts/icon/assets/brands/index.mjs +0 -19
  136. package/dist/contexts/icon/assets/index.d.ts +0 -6
  137. package/dist/contexts/icon/assets/index.mjs +0 -44
  138. package/dist/contexts/icon/assets/regular/index.d.ts +0 -2
  139. package/dist/contexts/icon/assets/regular/index.mjs +0 -19
  140. package/dist/contexts/icon/assets/solid/index.d.ts +0 -2
  141. package/dist/contexts/icon/assets/solid/index.mjs +0 -19
  142. package/dist/contexts/icon/index.d.ts +0 -4
  143. package/dist/contexts/icon/index.mjs +0 -281
  144. package/dist/contexts/icon/styles.d.ts +0 -1
  145. package/dist/contexts/icon/styles.mjs +0 -10
  146. package/dist/contexts/modal/index.d.ts +0 -4
  147. package/dist/contexts/modal/index.mjs +0 -66
  148. package/dist/contexts/modal/styles.d.ts +0 -1
  149. package/dist/contexts/modal/styles.mjs +0 -10
  150. package/dist/contexts/theme/content.d.ts +0 -3
  151. package/dist/contexts/theme/content.mjs +0 -81
  152. package/dist/contexts/theme/index.d.ts +0 -4
  153. package/dist/contexts/theme/index.mjs +0 -201
  154. package/dist/contexts/theme/styles.d.ts +0 -1
  155. package/dist/contexts/theme/styles.mjs +0 -84
  156. package/dist/contexts/tooltip/index.d.ts +0 -6
  157. package/dist/contexts/tooltip/index.mjs +0 -117
  158. package/dist/contexts/tooltip/styles.d.ts +0 -1
  159. package/dist/contexts/tooltip/styles.mjs +0 -46
  160. package/dist/interfaces/components/avatar/index.d.ts +0 -6
  161. package/dist/interfaces/components/avatar/index.mjs +0 -1
  162. package/dist/interfaces/components/badge/index.d.ts +0 -3
  163. package/dist/interfaces/components/badge/index.mjs +0 -1
  164. package/dist/interfaces/components/block/index.d.ts +0 -16
  165. package/dist/interfaces/components/block/index.mjs +0 -1
  166. package/dist/interfaces/components/chart/index.d.ts +0 -9
  167. package/dist/interfaces/components/chart/index.mjs +0 -1
  168. package/dist/interfaces/components/credit-card/index.d.ts +0 -16
  169. package/dist/interfaces/components/credit-card/index.mjs +0 -1
  170. package/dist/interfaces/components/form/button/index.d.ts +0 -7
  171. package/dist/interfaces/components/form/button/index.mjs +0 -1
  172. package/dist/interfaces/components/form/datetime/index.d.ts +0 -15
  173. package/dist/interfaces/components/form/datetime/index.mjs +0 -1
  174. package/dist/interfaces/components/form/file/index.d.ts +0 -14
  175. package/dist/interfaces/components/form/file/index.mjs +0 -1
  176. package/dist/interfaces/components/form/index.d.ts +0 -16
  177. package/dist/interfaces/components/form/index.mjs +0 -1
  178. package/dist/interfaces/components/form/input/index.d.ts +0 -17
  179. package/dist/interfaces/components/form/input/index.mjs +0 -1
  180. package/dist/interfaces/components/form/label/index.d.ts +0 -5
  181. package/dist/interfaces/components/form/label/index.mjs +0 -1
  182. package/dist/interfaces/components/form/select/index.d.ts +0 -14
  183. package/dist/interfaces/components/form/select/index.mjs +0 -1
  184. package/dist/interfaces/components/form/textarea/index.d.ts +0 -16
  185. package/dist/interfaces/components/form/textarea/index.mjs +0 -1
  186. package/dist/interfaces/components/index.d.ts +0 -26
  187. package/dist/interfaces/components/index.mjs +0 -1
  188. package/dist/interfaces/components/loading/app/index.d.ts +0 -3
  189. package/dist/interfaces/components/loading/app/index.mjs +0 -1
  190. package/dist/interfaces/components/loading/bar/index.d.ts +0 -7
  191. package/dist/interfaces/components/loading/bar/index.mjs +0 -1
  192. package/dist/interfaces/components/loading/index.d.ts +0 -2
  193. package/dist/interfaces/components/loading/index.mjs +0 -1
  194. package/dist/interfaces/components/logo/index.d.ts +0 -6
  195. package/dist/interfaces/components/logo/index.mjs +0 -1
  196. package/dist/interfaces/components/lottie/index.d.ts +0 -12
  197. package/dist/interfaces/components/lottie/index.mjs +0 -1
  198. package/dist/interfaces/components/modal/index.d.ts +0 -16
  199. package/dist/interfaces/components/modal/index.mjs +0 -1
  200. package/dist/interfaces/components/table/index.d.ts +0 -46
  201. package/dist/interfaces/components/table/index.mjs +0 -1
  202. package/dist/interfaces/components/table/paginate/index.d.ts +0 -7
  203. package/dist/interfaces/components/table/paginate/index.mjs +0 -1
  204. package/dist/interfaces/contexts/icon/index.d.ts +0 -3
  205. package/dist/interfaces/contexts/icon/index.mjs +0 -1
  206. package/dist/interfaces/contexts/index.d.ts +0 -8
  207. package/dist/interfaces/contexts/index.mjs +0 -1
  208. package/dist/interfaces/contexts/modal/index.d.ts +0 -16
  209. package/dist/interfaces/contexts/modal/index.mjs +0 -2
  210. package/dist/interfaces/contexts/theme/index.d.ts +0 -42
  211. package/dist/interfaces/contexts/theme/index.mjs +0 -1
  212. package/dist/interfaces/contexts/tooltip/index.d.ts +0 -3
  213. package/dist/interfaces/contexts/tooltip/index.mjs +0 -1
  214. package/dist/styled.d.ts +0 -6
  215. package/dist/tsup.config.d.ts +0 -2
@@ -1,33 +0,0 @@
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
- };
@@ -1,7 +0,0 @@
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";
@@ -1,603 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import { IInputText } from "@interfaces";
2
- export declare function InputText(props: IInputText): import("react/jsx-runtime").JSX.Element;