@gustavo-valsechi/client 1.3.14 → 1.3.16

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 (240) hide show
  1. package/dist/chunk-7KA3WXTD.mjs +1252 -0
  2. package/dist/chunk-7KA3WXTD.mjs.map +1 -0
  3. package/dist/chunk-IF6P6NOG.mjs +141 -0
  4. package/dist/chunk-IF6P6NOG.mjs.map +1 -0
  5. package/dist/chunk-RWFXFZB5.mjs +2 -0
  6. package/dist/chunk-RWFXFZB5.mjs.map +1 -0
  7. package/dist/components.d.mts +10 -0
  8. package/dist/components.d.ts +10 -0
  9. package/dist/components.js +1390 -0
  10. package/dist/components.js.map +1 -0
  11. package/dist/components.mjs +3 -0
  12. package/dist/components.mjs.map +1 -0
  13. package/dist/contexts.d.mts +20 -0
  14. package/dist/contexts.d.ts +20 -0
  15. package/dist/contexts.js +141 -0
  16. package/dist/contexts.js.map +1 -0
  17. package/dist/contexts.mjs +3 -0
  18. package/dist/contexts.mjs.map +1 -0
  19. package/dist/index-BhaGW0O1.d.ts +601 -0
  20. package/dist/index-BxA8LyyD.d.mts +68 -0
  21. package/dist/index-DDi0w5pw.d.mts +601 -0
  22. package/dist/index-DT7VKE7H.d.ts +68 -0
  23. package/dist/index-Da-DtPS-.d.mts +29 -0
  24. package/dist/index-Da-DtPS-.d.ts +29 -0
  25. package/dist/index.d.mts +17 -0
  26. package/dist/index.d.ts +17 -4
  27. package/dist/index.js +1390 -4
  28. package/dist/index.js.map +1 -0
  29. package/dist/index.mjs +3 -0
  30. package/dist/index.mjs.map +1 -0
  31. package/dist/interfaces.d.mts +12 -0
  32. package/dist/interfaces.d.ts +12 -0
  33. package/dist/interfaces.js +3 -0
  34. package/dist/interfaces.js.map +1 -0
  35. package/dist/interfaces.mjs +3 -0
  36. package/dist/interfaces.mjs.map +1 -0
  37. package/package.json +8 -15
  38. package/dist/components/index.d.ts +0 -3
  39. package/dist/components/index.js +0 -17
  40. package/dist/components/styles.d.ts +0 -2
  41. package/dist/components/styles.js +0 -14
  42. package/dist/components/types/avatar/index.d.ts +0 -2
  43. package/dist/components/types/avatar/index.js +0 -34
  44. package/dist/components/types/avatar/styles.d.ts +0 -1
  45. package/dist/components/types/avatar/styles.js +0 -55
  46. package/dist/components/types/badge/index.d.ts +0 -2
  47. package/dist/components/types/badge/index.js +0 -16
  48. package/dist/components/types/badge/styles.d.ts +0 -1
  49. package/dist/components/types/badge/styles.js +0 -33
  50. package/dist/components/types/block/index.d.ts +0 -2
  51. package/dist/components/types/block/index.js +0 -8
  52. package/dist/components/types/block/styles.d.ts +0 -2
  53. package/dist/components/types/block/styles.js +0 -25
  54. package/dist/components/types/chart/index.d.ts +0 -2
  55. package/dist/components/types/chart/index.js +0 -33
  56. package/dist/components/types/chart/styles.d.ts +0 -1
  57. package/dist/components/types/chart/styles.js +0 -4
  58. package/dist/components/types/credit-card/assets/index.d.ts +0 -4
  59. package/dist/components/types/credit-card/assets/index.js +0 -17
  60. package/dist/components/types/credit-card/card/index.d.ts +0 -2
  61. package/dist/components/types/credit-card/card/index.js +0 -23
  62. package/dist/components/types/credit-card/card/styles.d.ts +0 -1
  63. package/dist/components/types/credit-card/card/styles.js +0 -132
  64. package/dist/components/types/credit-card/functions/index.d.ts +0 -2
  65. package/dist/components/types/credit-card/functions/index.js +0 -8
  66. package/dist/components/types/credit-card/functions/styles.d.ts +0 -1
  67. package/dist/components/types/credit-card/functions/styles.js +0 -37
  68. package/dist/components/types/credit-card/index.d.ts +0 -2
  69. package/dist/components/types/credit-card/index.js +0 -29
  70. package/dist/components/types/credit-card/styles.d.ts +0 -1
  71. package/dist/components/types/credit-card/styles.js +0 -34
  72. package/dist/components/types/credit-card/tools/index.d.ts +0 -6
  73. package/dist/components/types/credit-card/tools/index.js +0 -19
  74. package/dist/components/types/form/index.d.ts +0 -3
  75. package/dist/components/types/form/index.js +0 -53
  76. package/dist/components/types/form/styles.d.ts +0 -1
  77. package/dist/components/types/form/styles.js +0 -15
  78. package/dist/components/types/form/types/button/index.d.ts +0 -2
  79. package/dist/components/types/form/types/button/index.js +0 -8
  80. package/dist/components/types/form/types/button/loading/index.d.ts +0 -1
  81. package/dist/components/types/form/types/button/loading/index.js +0 -6
  82. package/dist/components/types/form/types/button/loading/styles.d.ts +0 -1
  83. package/dist/components/types/form/types/button/loading/styles.js +0 -88
  84. package/dist/components/types/form/types/button/styles.d.ts +0 -1
  85. package/dist/components/types/form/types/button/styles.js +0 -55
  86. package/dist/components/types/form/types/datetime/index.d.ts +0 -2
  87. package/dist/components/types/form/types/datetime/index.js +0 -20
  88. package/dist/components/types/form/types/datetime/styles.d.ts +0 -1
  89. package/dist/components/types/form/types/datetime/styles.js +0 -40
  90. package/dist/components/types/form/types/file/index.d.ts +0 -2
  91. package/dist/components/types/form/types/file/index.js +0 -24
  92. package/dist/components/types/form/types/file/styles.d.ts +0 -1
  93. package/dist/components/types/form/types/file/styles.js +0 -27
  94. package/dist/components/types/form/types/index.d.ts +0 -7
  95. package/dist/components/types/form/types/index.js +0 -7
  96. package/dist/components/types/form/types/input/index.d.ts +0 -2
  97. package/dist/components/types/form/types/input/index.js +0 -22
  98. package/dist/components/types/form/types/input/styles.d.ts +0 -1
  99. package/dist/components/types/form/types/input/styles.js +0 -46
  100. package/dist/components/types/form/types/label/index.d.ts +0 -2
  101. package/dist/components/types/form/types/label/index.js +0 -6
  102. package/dist/components/types/form/types/label/styles.d.ts +0 -1
  103. package/dist/components/types/form/types/label/styles.js +0 -7
  104. package/dist/components/types/form/types/select/index.d.ts +0 -2
  105. package/dist/components/types/form/types/select/index.js +0 -25
  106. package/dist/components/types/form/types/select/styles.d.ts +0 -1
  107. package/dist/components/types/form/types/select/styles.js +0 -52
  108. package/dist/components/types/form/types/textarea/index.d.ts +0 -2
  109. package/dist/components/types/form/types/textarea/index.js +0 -20
  110. package/dist/components/types/form/types/textarea/styles.d.ts +0 -1
  111. package/dist/components/types/form/types/textarea/styles.js +0 -39
  112. package/dist/components/types/index.d.ts +0 -11
  113. package/dist/components/types/index.js +0 -11
  114. package/dist/components/types/loading/app/index.d.ts +0 -2
  115. package/dist/components/types/loading/app/index.js +0 -7
  116. package/dist/components/types/loading/app/styles.d.ts +0 -1
  117. package/dist/components/types/loading/app/styles.js +0 -87
  118. package/dist/components/types/loading/bar/index.d.ts +0 -2
  119. package/dist/components/types/loading/bar/index.js +0 -6
  120. package/dist/components/types/loading/bar/styles.d.ts +0 -1
  121. package/dist/components/types/loading/bar/styles.js +0 -21
  122. package/dist/components/types/loading/index.d.ts +0 -2
  123. package/dist/components/types/loading/index.js +0 -2
  124. package/dist/components/types/logo/index.d.ts +0 -2
  125. package/dist/components/types/logo/index.js +0 -6
  126. package/dist/components/types/logo/styles.d.ts +0 -1
  127. package/dist/components/types/logo/styles.js +0 -19
  128. package/dist/components/types/lottie/animations/index.d.ts +0 -293
  129. package/dist/components/types/lottie/animations/index.js +0 -2
  130. package/dist/components/types/lottie/animations/loader.json +0 -1
  131. package/dist/components/types/lottie/index.d.ts +0 -2
  132. package/dist/components/types/lottie/index.js +0 -28
  133. package/dist/components/types/lottie/styles.d.ts +0 -1
  134. package/dist/components/types/lottie/styles.js +0 -22
  135. package/dist/components/types/modal/index.d.ts +0 -2
  136. package/dist/components/types/modal/index.js +0 -12
  137. package/dist/components/types/modal/styles.d.ts +0 -1
  138. package/dist/components/types/modal/styles.js +0 -153
  139. package/dist/components/types/table/index.d.ts +0 -3
  140. package/dist/components/types/table/index.js +0 -93
  141. package/dist/components/types/table/modal/actions.d.ts +0 -10
  142. package/dist/components/types/table/modal/actions.js +0 -6
  143. package/dist/components/types/table/modal/index.d.ts +0 -2
  144. package/dist/components/types/table/modal/index.js +0 -37
  145. package/dist/components/types/table/modal/styles.d.ts +0 -1
  146. package/dist/components/types/table/modal/styles.js +0 -52
  147. package/dist/components/types/table/paginate/index.d.ts +0 -2
  148. package/dist/components/types/table/paginate/index.js +0 -30
  149. package/dist/components/types/table/paginate/styles.d.ts +0 -1
  150. package/dist/components/types/table/paginate/styles.js +0 -36
  151. package/dist/components/types/table/styles.d.ts +0 -5
  152. package/dist/components/types/table/styles.js +0 -262
  153. package/dist/contexts/icon/assets/brands/index.d.ts +0 -2
  154. package/dist/contexts/icon/assets/brands/index.js +0 -7
  155. package/dist/contexts/icon/assets/index.d.ts +0 -6
  156. package/dist/contexts/icon/assets/index.js +0 -8
  157. package/dist/contexts/icon/assets/regular/index.d.ts +0 -2
  158. package/dist/contexts/icon/assets/regular/index.js +0 -7
  159. package/dist/contexts/icon/assets/solid/index.d.ts +0 -2
  160. package/dist/contexts/icon/assets/solid/index.js +0 -7
  161. package/dist/contexts/icon/index.d.ts +0 -4
  162. package/dist/contexts/icon/index.js +0 -75
  163. package/dist/contexts/icon/styles.d.ts +0 -1
  164. package/dist/contexts/icon/styles.js +0 -4
  165. package/dist/contexts/index.d.ts +0 -4
  166. package/dist/contexts/index.js +0 -5
  167. package/dist/contexts/modal/index.d.ts +0 -4
  168. package/dist/contexts/modal/index.js +0 -46
  169. package/dist/contexts/modal/styles.d.ts +0 -1
  170. package/dist/contexts/modal/styles.js +0 -4
  171. package/dist/contexts/theme/content.d.ts +0 -3
  172. package/dist/contexts/theme/content.js +0 -74
  173. package/dist/contexts/theme/index.d.ts +0 -4
  174. package/dist/contexts/theme/index.js +0 -26
  175. package/dist/contexts/theme/styles.d.ts +0 -1
  176. package/dist/contexts/theme/styles.js +0 -78
  177. package/dist/contexts/tooltip/index.d.ts +0 -6
  178. package/dist/contexts/tooltip/index.js +0 -58
  179. package/dist/contexts/tooltip/styles.d.ts +0 -1
  180. package/dist/contexts/tooltip/styles.js +0 -40
  181. package/dist/interfaces/components/avatar/index.d.ts +0 -6
  182. package/dist/interfaces/components/avatar/index.js +0 -1
  183. package/dist/interfaces/components/badge/index.d.ts +0 -3
  184. package/dist/interfaces/components/badge/index.js +0 -1
  185. package/dist/interfaces/components/block/index.d.ts +0 -16
  186. package/dist/interfaces/components/block/index.js +0 -1
  187. package/dist/interfaces/components/chart/index.d.ts +0 -9
  188. package/dist/interfaces/components/chart/index.js +0 -1
  189. package/dist/interfaces/components/credit-card/index.d.ts +0 -16
  190. package/dist/interfaces/components/credit-card/index.js +0 -1
  191. package/dist/interfaces/components/form/button/index.d.ts +0 -7
  192. package/dist/interfaces/components/form/button/index.js +0 -1
  193. package/dist/interfaces/components/form/datetime/index.d.ts +0 -15
  194. package/dist/interfaces/components/form/datetime/index.js +0 -1
  195. package/dist/interfaces/components/form/file/index.d.ts +0 -14
  196. package/dist/interfaces/components/form/file/index.js +0 -1
  197. package/dist/interfaces/components/form/index.d.ts +0 -16
  198. package/dist/interfaces/components/form/index.js +0 -7
  199. package/dist/interfaces/components/form/input/index.d.ts +0 -17
  200. package/dist/interfaces/components/form/input/index.js +0 -1
  201. package/dist/interfaces/components/form/label/index.d.ts +0 -5
  202. package/dist/interfaces/components/form/label/index.js +0 -1
  203. package/dist/interfaces/components/form/select/index.d.ts +0 -14
  204. package/dist/interfaces/components/form/select/index.js +0 -1
  205. package/dist/interfaces/components/form/textarea/index.d.ts +0 -16
  206. package/dist/interfaces/components/form/textarea/index.js +0 -1
  207. package/dist/interfaces/components/index.d.ts +0 -26
  208. package/dist/interfaces/components/index.js +0 -11
  209. package/dist/interfaces/components/loading/app/index.d.ts +0 -3
  210. package/dist/interfaces/components/loading/app/index.js +0 -1
  211. package/dist/interfaces/components/loading/bar/index.d.ts +0 -7
  212. package/dist/interfaces/components/loading/bar/index.js +0 -1
  213. package/dist/interfaces/components/loading/index.d.ts +0 -2
  214. package/dist/interfaces/components/loading/index.js +0 -2
  215. package/dist/interfaces/components/logo/index.d.ts +0 -6
  216. package/dist/interfaces/components/logo/index.js +0 -1
  217. package/dist/interfaces/components/lottie/index.d.ts +0 -12
  218. package/dist/interfaces/components/lottie/index.js +0 -1
  219. package/dist/interfaces/components/modal/index.d.ts +0 -16
  220. package/dist/interfaces/components/modal/index.js +0 -1
  221. package/dist/interfaces/components/table/index.d.ts +0 -46
  222. package/dist/interfaces/components/table/index.js +0 -1
  223. package/dist/interfaces/components/table/paginate/index.d.ts +0 -7
  224. package/dist/interfaces/components/table/paginate/index.js +0 -1
  225. package/dist/interfaces/contexts/icon/index.d.ts +0 -3
  226. package/dist/interfaces/contexts/icon/index.js +0 -1
  227. package/dist/interfaces/contexts/index.d.ts +0 -8
  228. package/dist/interfaces/contexts/index.js +0 -4
  229. package/dist/interfaces/contexts/modal/index.d.ts +0 -16
  230. package/dist/interfaces/contexts/modal/index.js +0 -2
  231. package/dist/interfaces/contexts/theme/index.d.ts +0 -42
  232. package/dist/interfaces/contexts/theme/index.js +0 -1
  233. package/dist/interfaces/contexts/tooltip/index.d.ts +0 -3
  234. package/dist/interfaces/contexts/tooltip/index.js +0 -1
  235. package/dist/interfaces/index.d.ts +0 -2
  236. package/dist/interfaces/index.js +0 -2
  237. package/dist/styled.d.ts +0 -6
  238. package/dist/styled.js +0 -1
  239. package/dist/tsup.config.d.ts +0 -2
  240. package/dist/tsup.config.js +0 -20
@@ -1,23 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useRef } from "react";
4
- import { Container } from "./styles";
5
- import { getCardContent } from "../tools";
6
- // import { Utils } from "@gustavo-valsechi/server"
7
- import assets from "../assets";
8
- import _ from "lodash";
9
- export default function CreditCardComponent(props) {
10
- var _a;
11
- const flagRef = useRef({});
12
- useEffect(() => {
13
- const content = getCardContent(props.number);
14
- if (!flagRef.current)
15
- return;
16
- if (!content.logo) {
17
- flagRef.current.style.backgroundImage = "";
18
- return;
19
- }
20
- flagRef.current.style.backgroundImage = `url(${content.logo})`;
21
- }, [flagRef, props.number]);
22
- return (_jsxs(Container, { children: [_jsxs("div", { className: "iz-credit-card-left", children: [_jsx("div", { className: "iz-credit-card-top", children: _jsx("div", { id: "iz-credit-card-chip", style: { backgroundImage: `url(${assets.Chip})` } }) }), _jsxs("div", { className: "iz-credit-card-bottom", children: [_jsx("div", { className: "iz-credit-card-number", children: _jsx("div", { className: "iz-credit-card-elipse" }) }), _jsx("div", { className: "iz-credit-card-name", children: _jsx("div", { className: "iz-credit-card-elipse", children: _.deburr((_a = props.name) === null || _a === void 0 ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })] })] }), _jsxs("div", { className: "iz-credit-card-right", children: [_jsx("div", { className: "iz-credit-card-top", children: _jsx("div", { id: "iz-credit-card-flag", ref: flagRef }) }), _jsx("div", { className: "iz-credit-card-bottom", children: _jsx("span", { children: "validade" }) })] })] }));
23
- }
@@ -1 +0,0 @@
1
- export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
@@ -1,132 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.div `
4
- height: 11rem;
5
- width: 20rem;
6
- border-radius: 8px;
7
- background: ${({ theme }) => theme.t05};
8
- padding: 1.5rem;
9
- display: inline-flex;
10
- justify-content: space-between;
11
- gap: 1rem;
12
- white-space: nowrap;
13
- position: relative;
14
- z-index: 0;
15
- backdrop-filter: blur(5px);
16
-
17
- @media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
18
- width: 100%;
19
- height: 10rem;
20
- }
21
-
22
- @media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
23
- height: 9rem;
24
- }
25
-
26
- .iz-credit-card-left {
27
- display: flex;
28
- flex-direction: column;
29
- justify-content: space-between;
30
- gap: 1rem;
31
- width: 100%;
32
-
33
- .iz-credit-card-top {
34
- div {
35
- width: 2.5rem;
36
- height: 1.5rem;
37
- background-size: contain;
38
- background-repeat: no-repeat;
39
- }
40
- }
41
-
42
- .iz-credit-card-bottom {
43
- display: flex;
44
- flex-direction: column;
45
- gap: .8rem;
46
-
47
- .iz-credit-card-elipse {
48
- position: absolute;
49
- left: 0;
50
- right: 0;
51
- white-space: nowrap;
52
- overflow: hidden;
53
- text-overflow: ellipsis;
54
- }
55
-
56
- .iz-credit-card-number {
57
- font-size: 1.1rem;
58
- font-weight: 600;
59
- color: ${({ theme }) => theme.t6};
60
- position: relative;
61
- height: 1.1rem;
62
-
63
- @media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
64
- font-size: .9rem;
65
- height: .9rem;
66
- }
67
-
68
- @media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
69
- font-size: .7rem;
70
- height: .7rem;
71
- }
72
- }
73
-
74
- .iz-credit-card-name {
75
- font-size: .9rem;
76
- font-weight: 500;
77
- position: relative;
78
- text-transform: uppercase;
79
- color: ${({ theme }) => theme.t5};
80
- height: .9rem;
81
-
82
- @media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
83
- font-size: .7rem;
84
- height: .7rem;
85
- }
86
-
87
- @media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
88
- font-size: .5rem;
89
- height: .5rem;
90
- }
91
- }
92
- }
93
- }
94
-
95
- .iz-credit-card-right {
96
- display: flex;
97
- flex-direction: column;
98
- justify-content: space-between;
99
- align-items: flex-end;
100
- gap: 1rem;
101
-
102
- .iz-credit-card-top {
103
- display: flex;
104
- justify-content: end;
105
-
106
- div {
107
- width: 2.5rem;
108
- height: 2.5rem;
109
- background-size: contain;
110
- background-repeat: no-repeat;
111
- }
112
- }
113
-
114
- .iz-credit-card-bottom {
115
- display: flex;
116
- flex-direction: column;
117
- text-align: right;
118
-
119
- span:first-child {
120
- font-size: .6rem;
121
- font-weight: 600;
122
- color: ${({ theme }) => theme.t3};
123
- }
124
-
125
- span:last-child {
126
- font-size: .8rem;
127
- font-weight: 600;
128
- color: ${({ theme }) => theme.t5};
129
- }
130
- }
131
- }
132
- `;
@@ -1,2 +0,0 @@
1
- import { ICreditCard } from "../../../../interfaces";
2
- export default function CreditCardFunctions(props: ICreditCard): false | import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Container } from "./styles";
4
- import _ from "lodash";
5
- export default function CreditCardFunctions(props) {
6
- return _.some(props.functions, (data) => !data.hide) && (_jsx(Container, { className: "iz-credit-card-function-container", children: _.map(props.functions, (data, index) => !data.hide &&
7
- _jsx("div", { className: "iz-credit-card-function", onClick: data.function, children: _jsx("i", { "aria-hidden": true, className: data.icon }) }, index)) }));
8
- }
@@ -1 +0,0 @@
1
- export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
@@ -1,37 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.div `
4
- display: flex;
5
- flex-direction: column;
6
- gap: .5rem;
7
- margin-left: -2.5rem;
8
- transition: ease .3s;
9
- width: 2rem;
10
-
11
- .iz-credit-card-function {
12
- width: 2rem;
13
- height: 2rem;
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- border-radius: 5px;
18
- background: ${({ theme }) => theme.t05};
19
- color: ${({ theme }) => theme.t6};
20
- font-size: .85rem;
21
- transform: translateX(-2rem);
22
- opacity: 0;
23
- cursor: pointer;
24
-
25
- &:hover {
26
- color: ${({ theme }) => theme.t8};
27
- }
28
- }
29
-
30
- .iz-credit-card-function:nth-child(1) {
31
- transition: 5s ease transform, ease .2s opacity, ease .3s color;
32
- }
33
-
34
- .iz-credit-card-function:nth-child(2) {
35
- transition: .3s ease .1s transform, ease .2s opacity, ease .3s color;
36
- }
37
- `;
@@ -1,2 +0,0 @@
1
- import { ICreditCard } from "../../../interfaces";
2
- export declare function CreditCard(props: ICreditCard): import("react/jsx-runtime").JSX.Element;
@@ -1,29 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Container } from "./styles";
4
- import Card from "./card";
5
- import Functions from "./functions";
6
- export function CreditCard(props) {
7
- const functions = [
8
- {
9
- icon: "fa-regular fa-pen-to-square",
10
- label: "Editar",
11
- function: props.onEdit,
12
- hide: !props.onEdit
13
- },
14
- {
15
- icon: "fa-solid fa-gear",
16
- label: "Configurações",
17
- function: props.onConfig,
18
- hide: !props.onConfig
19
- },
20
- {
21
- icon: "fa-solid fa-trash-can",
22
- label: "Remover",
23
- function: props.onRemove,
24
- hide: !props.onRemove
25
- },
26
- ...(props.functions || [])
27
- ];
28
- return (_jsxs(Container, { children: [_jsx(Card, { ...props }), _jsx(Functions, { ...props, functions: functions })] }));
29
- }
@@ -1 +0,0 @@
1
- export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
@@ -1,34 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.div `
4
- border-radius: 8px 8px 0 0;
5
- transition: .2s ease .2s background, .2s ease .2s padding;
6
- position: relative;
7
- display: flex;
8
- gap: .5rem;
9
- height: 11rem;
10
- pointer-events: all;
11
-
12
- @media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
13
- width: 100%;
14
- }
15
-
16
- &:hover {
17
- .iz-credit-card-function-container {
18
- margin-left: 0;
19
-
20
- .iz-credit-card-function {
21
- transform: translateX(0);
22
- opacity: 1;
23
- }
24
-
25
- .iz-credit-card-function:nth-child(1) {
26
- transition: .3s ease transform, .2s ease .1s opacity, ease .3s color;
27
- }
28
-
29
- .iz-credit-card-function:nth-child(2) {
30
- transition: .3s ease .1s transform, .2s ease .2s opacity, ease .3s color;
31
- }
32
- }
33
- }
34
- `;
@@ -1,6 +0,0 @@
1
- import luhn from "luhn";
2
- export declare const validateLuhn: typeof luhn.validate;
3
- export declare const getCardContent: (cardNumber: string) => {
4
- flag: string;
5
- logo: string;
6
- };
@@ -1,19 +0,0 @@
1
- import creditCardType from "credit-card-type";
2
- import assets from "../assets";
3
- import luhn from "luhn";
4
- import _ from "lodash";
5
- export const validateLuhn = luhn.validate;
6
- export const getCardContent = (cardNumber) => {
7
- const content = { flag: "", logo: "" };
8
- if (!cardNumber)
9
- return content;
10
- const potentialCardContents = creditCardType(cardNumber);
11
- if (potentialCardContents.length === 1) {
12
- const cardContent = potentialCardContents.shift();
13
- const flag = cardContent === null || cardContent === void 0 ? void 0 : cardContent.type;
14
- content.flag = flag || "";
15
- content.logo = assets[_.upperFirst(_.camelCase(flag))] || "";
16
- return content;
17
- }
18
- return content;
19
- };
@@ -1,3 +0,0 @@
1
- import { IForm } from "../../../interfaces";
2
- export * from "./types";
3
- export declare function Form(props: IForm): import("react/jsx-runtime").JSX.Element;
@@ -1,53 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React, { useEffect, useRef } from "react";
4
- import { Container } from "./styles";
5
- import { z } from "zod";
6
- import { useForm } from "react-hook-form";
7
- import { zodResolver } from "@hookform/resolvers/zod";
8
- import _ from "lodash";
9
- import * as Types from "./types";
10
- export * from "./types";
11
- export function Form(props) {
12
- const formRef = props.formRef || useRef({});
13
- const setSchema = () => {
14
- const schema = {};
15
- _.forEach(props.inputs, (data) => {
16
- if (!data.validation)
17
- return;
18
- schema[data.name] = data.validation;
19
- });
20
- if (props.validation)
21
- return props.validation(z.object(schema));
22
- return z.object(schema);
23
- };
24
- const schema = setSchema();
25
- const { register, handleSubmit, reset, formState: { errors } } = useForm({
26
- resolver: zodResolver(schema),
27
- defaultValues: props.defaultValues,
28
- mode: "all"
29
- });
30
- useEffect(() => {
31
- if (!props.clearWhen)
32
- return;
33
- reset(undefined, { keepErrors: false });
34
- }, [props.clearWhen]);
35
- useEffect(() => {
36
- var _a;
37
- if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) === null || _a === void 0 ? void 0 : _a.length))
38
- return;
39
- _.forEach(props.defaultValues, (value, key) => {
40
- const input = _.find(props.inputs, (data) => data.name === key);
41
- props.defaultValues[key] = input.mask ? input.mask(value) : value;
42
- });
43
- reset(props.defaultValues, { keepErrors: false });
44
- }, [props.defaultValues]);
45
- const component = (data) => {
46
- var _a;
47
- const component = Types[_.camelCase(data.type)];
48
- const TypeComponent = component || Types.InputText;
49
- return _jsx(TypeComponent, { ..._.omit(data, ["validation"]), id: data.name, type: component ? undefined : data.type, error: (_a = errors[data.name]) === null || _a === void 0 ? void 0 : _a.message, register: register });
50
- };
51
- return (_jsxs(Container, { ref: formRef, onSubmit: handleSubmit(props.onSubmit), children: [_.map(props.inputs, (data, index) => _jsx(React.Fragment, { children: component(data) }, index)), _.isArray(props.buttons) &&
52
- _jsx("div", { className: "form-buttons", children: _.map(props.buttons, (data, index) => _jsx(Types.Button, { ...data }, index)) })] }));
53
- }
@@ -1 +0,0 @@
1
- export declare const Container: any;
@@ -1,15 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.form `
4
- width: 100%;
5
-
6
- .form-buttons {
7
- width: 100%;
8
- padding-top: 1rem;
9
-
10
- button {
11
- width: 100%;
12
- margin-top: 1rem;
13
- }
14
- }
15
- `;
@@ -1,2 +0,0 @@
1
- import { IButton } from "../../../../../interfaces";
2
- export declare function Button(props: IButton): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Container } from "./styles";
4
- import { Loading } from "./loading";
5
- import _ from "lodash";
6
- export function Button(props) {
7
- return (_jsxs(Container, { loading: String(!!props.loading), disabled: props.disabled, type: props.type || "button", ..._.omit(props, ["loading", "type"]), children: [!!props.loading && _jsx(Loading, {}), _jsx("span", { children: props.label })] }));
8
- }
@@ -1 +0,0 @@
1
- export declare function Loading(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Container } from "./styles";
4
- export function Loading() {
5
- return (_jsxs(Container, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {})] }));
6
- }
@@ -1 +0,0 @@
1
- export declare const Container: any;
@@ -1,88 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.div `
4
- display: flex;
5
- justify-content: space-between;
6
- align-items: center;
7
- width: 2rem;
8
- margin-right: .5rem;
9
-
10
- div {
11
- width: .5rem;
12
- height: .5rem;
13
- border-radius: 1rem;
14
- background: rgb(255, 255, 255, 1);
15
-
16
- &:nth-child(1) {
17
- animation: blinkOne infinite ease 2s;
18
- }
19
-
20
- &:nth-child(2) {
21
- animation: blinkTwo infinite ease 2s;
22
- }
23
-
24
- &:nth-child(3) {
25
- animation: blinkThree infinite ease 2s;
26
- }
27
- }
28
-
29
- @keyframes blinkOne {
30
- 0% {
31
- opacity: 0.8;
32
- }
33
- 20% {
34
- opacity: 0.2;
35
- }
36
- 40% {
37
- opacity: 0.2;
38
- }
39
- 60% {
40
- opacity: 0.2;
41
- }
42
- 80% {
43
- opacity: 0.2;
44
- }
45
- 100% {
46
- opacity: 0.8;
47
- }
48
- }
49
-
50
- @keyframes blinkTwo {
51
- 0% {
52
- opacity: 0.2;
53
- }
54
- 20% {
55
- opacity: 0.8;
56
- }
57
- 40% {
58
- opacity: 0.2;
59
- }
60
- 60% {
61
- opacity: 0.2;
62
- }
63
- 80% {
64
- opacity: 0.8;
65
- }
66
- 100% {
67
- opacity: 0.2;
68
- }
69
- }
70
-
71
- @keyframes blinkThree {
72
- 0% {
73
- opacity: 0.2;
74
- }
75
- 25% {
76
- opacity: 0.2;
77
- }
78
- 50% {
79
- opacity: 0.8;
80
- }
81
- 75% {
82
- opacity: 0.2;
83
- }
84
- 100% {
85
- opacity: 0.2;
86
- }
87
- }
88
- `;
@@ -1 +0,0 @@
1
- export declare const Container: any;
@@ -1,55 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.button `
4
- border-radius: 5px;
5
- font-size: .8rem;
6
- font-weight: 500;
7
- transition: ease .3s;
8
- display: flex;
9
- align-items: center;
10
- justify-content: center;
11
- color: ${(props) => props.transparent
12
- ? props.theme.t6
13
- : props.outline
14
- ? props.color || props.theme.secondary
15
- : "#fff !important"};
16
- background: ${(props) => props.transparent
17
- ? "transparent"
18
- : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
19
- border: 1px solid ${(props) => props.transparent
20
- ? "transparent"
21
- : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
22
- pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
23
- cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
24
- opacity: ${(props) => props.loading === "true" ? .6 : 1};
25
- padding: .4rem 2.5rem;
26
- transition: ease .3s;
27
-
28
- span {
29
- text-align: center;
30
- cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
31
- }
32
-
33
- &:disabled {
34
- pointer-events: none;
35
-
36
- &::before {
37
- opacity: .6;
38
- }
39
- }
40
-
41
- &:hover {
42
- opacity: .9;
43
- color: ${(props) => props.transparent
44
- ? props.theme.t6
45
- : props.outline
46
- ? props.color || props.theme.secondary
47
- : "#fff"};
48
-
49
- &::before {
50
- background: ${(props) => props.transparent
51
- ? "transparent"
52
- : props.color || props.theme.secondary};
53
- }
54
- }
55
- `;
@@ -1,2 +0,0 @@
1
- import { IInputDateTime } from "../../../../../interfaces";
2
- export declare function InputDateTime(props: IInputDateTime): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +0,0 @@
1
- "use client";
2
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { Container } from "./styles";
4
- import { InputLabel } from "../label";
5
- import _ from "lodash";
6
- export function InputDateTime(props) {
7
- const register = (props.register || ((name) => ({})))(props.name || "");
8
- const onChange = (event) => {
9
- const value = event.target.value || "";
10
- event.target.value = props.mask ? props.mask(value) : value;
11
- if (register.onChange)
12
- register.onChange(event);
13
- if (props.onChange)
14
- props.onChange(event);
15
- };
16
- return (_jsxs(Container, { className: props.className, error: props.error, children: [!!props.label && _jsxs(InputLabel, { children: [props.label, props.required ? "*" : ""] }), _jsx("div", { className: "iz-input-content", children: _jsx("input", { ..._.omit(props, ["className", "onChange", "mask", "type", "required", "register"]), type: "datetime-local", onFocus: () => {
17
- if (props.onFocus)
18
- props.onFocus(props.name);
19
- }, maxLength: props.maxLength || 255, ...register, onChange: onChange }) }), !!props.error && (_jsx("div", { className: "iz-input-error", children: props.error }))] }));
20
- }
@@ -1 +0,0 @@
1
- export declare const Container: any;
@@ -1,40 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- export const Container = styled.div `
4
- width: 100%;
5
- padding-top: .3rem;
6
-
7
- .iz-input-content {
8
- display: flex;
9
- align-items: center;
10
- justify-content: center;
11
- border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
12
- border-radius: 5px;
13
- overflow: hidden;
14
-
15
- input {
16
- border: 0;
17
- padding: .5rem 1rem;
18
- width: 100%;
19
- font-size: .8rem;
20
- background-color: ${({ theme }) => theme.primary};
21
- color: ${({ theme }) => theme.t6};
22
- color-scheme: ${(props) => props.theme || "light"};
23
-
24
- &:disabled {
25
- background-color: ${({ theme }) => theme.t2};
26
- color: ${({ theme }) => theme.t6};
27
- opacity: .7;
28
- }
29
-
30
- &:focus-visible {
31
- outline: none;
32
- }
33
- }
34
- }
35
-
36
- .iz-input-error {
37
- color: ${({ theme }) => theme.negative};
38
- font-size: .7rem;
39
- }
40
- `;
@@ -1,2 +0,0 @@
1
- import { IInputFile } from "../../../../../interfaces";
2
- export declare function InputFile(props: IInputFile): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useRef } from "react";
4
- import { Container } from "./styles";
5
- import { InputLabel } from "../label";
6
- export function InputFile(props) {
7
- var _a;
8
- const inputRef = useRef({});
9
- const register = (props.register || ((name) => ({})))(props.name || "");
10
- const readImage = (data) => {
11
- if (props.onPreview)
12
- props.onPreview(URL.createObjectURL(data));
13
- if (props.onChange)
14
- props.onChange(data);
15
- };
16
- return (_jsxs(Container, { className: props.className, error: props.error, disabled: props.disabled, children: [_jsx("input", { hidden: true, type: "file", id: "file", accept: "image/*", ref: inputRef, disabled: props.disabled, name: props.name, onFocus: () => {
17
- if (props.onFocus)
18
- props.onFocus(props.name);
19
- }, ...register, onChange: (e) => {
20
- var _a;
21
- register.onChange(e);
22
- readImage((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]);
23
- } }), !!props.label && _jsxs(InputLabel, { children: [props.label, props.required ? "*" : ""] }), _jsx("div", { className: "iz-image-content", onClick: () => inputRef.current.click(), children: ((_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.value) || "selecione uma imagem" }), !!props.error && (_jsx("div", { className: "iz-input-error", children: props.error }))] }));
24
- }