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