@gustavo-valsechi/client 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +49 -0
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.js +20 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.js +39 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.js +61 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.js +22 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.js +39 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.js +11 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.js +31 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.js +39 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.js +10 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.js +19 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.js +29 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.js +138 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.js +14 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.js +43 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.js +35 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.js +40 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.js +26 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.js +85 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.js +21 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.js +14 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.js +9 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.js +94 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.js +61 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.js +26 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.js +46 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.js +27 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.js +33 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.js +23 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.js +28 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.js +52 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.js +9 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.js +13 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.js +31 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.js +58 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.js +26 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.js +45 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/types/index.js +27 -0
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.js +10 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.js +93 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.js +9 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.js +27 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.js +18 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.js +9 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.js +25 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.js +7 -0
- package/dist/components/types/lottie/animations/loader.json +1 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.js +34 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.js +28 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.js +18 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.js +159 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/components/types/table/index.js +113 -0
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.js +8 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.js +43 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.js +58 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.js +36 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.js +42 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.js +268 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.js +9 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.js +13 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.js +9 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.js +9 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.js +82 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.js +10 -0
- package/dist/contexts/index.d.ts +4 -0
- package/dist/contexts/index.js +21 -0
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.js +53 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.js +10 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.js +77 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.js +32 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.js +84 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.js +65 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.js +46 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/interfaces/components/avatar/index.d.ts +6 -0
- package/dist/interfaces/components/avatar/index.js +2 -0
- package/dist/interfaces/components/badge/index.d.ts +3 -0
- package/dist/interfaces/components/badge/index.js +2 -0
- package/dist/interfaces/components/block/index.d.ts +16 -0
- package/dist/interfaces/components/block/index.js +2 -0
- package/dist/interfaces/components/chart/index.d.ts +9 -0
- package/dist/interfaces/components/chart/index.js +2 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -0
- package/dist/interfaces/components/credit-card/index.js +2 -0
- package/dist/interfaces/components/form/button/index.d.ts +7 -0
- package/dist/interfaces/components/form/button/index.js +2 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
- package/dist/interfaces/components/form/datetime/index.js +2 -0
- package/dist/interfaces/components/form/file/index.d.ts +14 -0
- package/dist/interfaces/components/form/file/index.js +2 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.js +23 -0
- package/dist/interfaces/components/form/input/index.d.ts +17 -0
- package/dist/interfaces/components/form/input/index.js +2 -0
- package/dist/interfaces/components/form/label/index.d.ts +5 -0
- package/dist/interfaces/components/form/label/index.js +2 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -0
- package/dist/interfaces/components/form/select/index.js +2 -0
- package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
- package/dist/interfaces/components/form/textarea/index.js +2 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.js +27 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -0
- package/dist/interfaces/components/loading/app/index.js +2 -0
- package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
- package/dist/interfaces/components/loading/bar/index.js +2 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.js +18 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -0
- package/dist/interfaces/components/logo/index.js +2 -0
- package/dist/interfaces/components/lottie/index.d.ts +12 -0
- package/dist/interfaces/components/lottie/index.js +2 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -0
- package/dist/interfaces/components/modal/index.js +2 -0
- package/dist/interfaces/components/table/index.d.ts +46 -0
- package/dist/interfaces/components/table/index.js +17 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
- package/dist/interfaces/components/table/paginate/index.js +2 -0
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/dist/interfaces/contexts/icon/index.js +2 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.js +20 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -0
- package/dist/interfaces/contexts/modal/index.js +3 -0
- package/dist/interfaces/contexts/theme/index.d.ts +42 -0
- package/dist/interfaces/contexts/theme/index.js +2 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.js +2 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.js +18 -0
- package/dist/styled.d.ts +6 -0
- package/dist/styled.js +3 -0
- package/dist/tsup.config.d.ts +2 -0
- package/dist/tsup.config.js +21 -0
- package/package.json +69 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.div `
|
|
10
|
+
height: 11rem;
|
|
11
|
+
width: 20rem;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
background: ${({ theme }) => theme.t05};
|
|
14
|
+
padding: 1.5rem;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: 1rem;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
position: relative;
|
|
20
|
+
z-index: 0;
|
|
21
|
+
backdrop-filter: blur(5px);
|
|
22
|
+
|
|
23
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 10rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
|
|
29
|
+
height: 9rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.iz-credit-card-left {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
gap: 1rem;
|
|
37
|
+
width: 100%;
|
|
38
|
+
|
|
39
|
+
.iz-credit-card-top {
|
|
40
|
+
div {
|
|
41
|
+
width: 2.5rem;
|
|
42
|
+
height: 1.5rem;
|
|
43
|
+
background-size: contain;
|
|
44
|
+
background-repeat: no-repeat;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.iz-credit-card-bottom {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: .8rem;
|
|
52
|
+
|
|
53
|
+
.iz-credit-card-elipse {
|
|
54
|
+
position: absolute;
|
|
55
|
+
left: 0;
|
|
56
|
+
right: 0;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.iz-credit-card-number {
|
|
63
|
+
font-size: 1.1rem;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
color: ${({ theme }) => theme.t6};
|
|
66
|
+
position: relative;
|
|
67
|
+
height: 1.1rem;
|
|
68
|
+
|
|
69
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
70
|
+
font-size: .9rem;
|
|
71
|
+
height: .9rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
|
|
75
|
+
font-size: .7rem;
|
|
76
|
+
height: .7rem;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.iz-credit-card-name {
|
|
81
|
+
font-size: .9rem;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
position: relative;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
color: ${({ theme }) => theme.t5};
|
|
86
|
+
height: .9rem;
|
|
87
|
+
|
|
88
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
89
|
+
font-size: .7rem;
|
|
90
|
+
height: .7rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media(max-width: ${({ theme }) => theme.mobileMinWidth}) {
|
|
94
|
+
font-size: .5rem;
|
|
95
|
+
height: .5rem;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.iz-credit-card-right {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
align-items: flex-end;
|
|
106
|
+
gap: 1rem;
|
|
107
|
+
|
|
108
|
+
.iz-credit-card-top {
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: end;
|
|
111
|
+
|
|
112
|
+
div {
|
|
113
|
+
width: 2.5rem;
|
|
114
|
+
height: 2.5rem;
|
|
115
|
+
background-size: contain;
|
|
116
|
+
background-repeat: no-repeat;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.iz-credit-card-bottom {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
text-align: right;
|
|
124
|
+
|
|
125
|
+
span:first-child {
|
|
126
|
+
font-size: .6rem;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
color: ${({ theme }) => theme.t3};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
span:last-child {
|
|
132
|
+
font-size: .8rem;
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
color: ${({ theme }) => theme.t5};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = CreditCardFunctions;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
+
function CreditCardFunctions(props) {
|
|
12
|
+
return lodash_1.default.some(props.functions, (data) => !data.hide) && ((0, jsx_runtime_1.jsx)(styles_1.Container, { className: "iz-credit-card-function-container", children: lodash_1.default.map(props.functions, (data, index) => !data.hide &&
|
|
13
|
+
(0, jsx_runtime_1.jsx)("div", { className: "iz-credit-card-function", onClick: data.function, children: (0, jsx_runtime_1.jsx)("i", { "aria-hidden": true, className: data.icon }) }, index)) }));
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: .5rem;
|
|
13
|
+
margin-left: -2.5rem;
|
|
14
|
+
transition: ease .3s;
|
|
15
|
+
width: 2rem;
|
|
16
|
+
|
|
17
|
+
.iz-credit-card-function {
|
|
18
|
+
width: 2rem;
|
|
19
|
+
height: 2rem;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
background: ${({ theme }) => theme.t05};
|
|
25
|
+
color: ${({ theme }) => theme.t6};
|
|
26
|
+
font-size: .85rem;
|
|
27
|
+
transform: translateX(-2rem);
|
|
28
|
+
opacity: 0;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
color: ${({ theme }) => theme.t8};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.iz-credit-card-function:nth-child(1) {
|
|
37
|
+
transition: 5s ease transform, ease .2s opacity, ease .3s color;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.iz-credit-card-function:nth-child(2) {
|
|
41
|
+
transition: .3s ease .1s transform, ease .2s opacity, ease .3s color;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CreditCard = CreditCard;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const card_1 = __importDefault(require("./card"));
|
|
11
|
+
const functions_1 = __importDefault(require("./functions"));
|
|
12
|
+
function CreditCard(props) {
|
|
13
|
+
const functions = [
|
|
14
|
+
{
|
|
15
|
+
icon: "fa-regular fa-pen-to-square",
|
|
16
|
+
label: "Editar",
|
|
17
|
+
function: props.onEdit,
|
|
18
|
+
hide: !props.onEdit
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
icon: "fa-solid fa-gear",
|
|
22
|
+
label: "Configurações",
|
|
23
|
+
function: props.onConfig,
|
|
24
|
+
hide: !props.onConfig
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
icon: "fa-solid fa-trash-can",
|
|
28
|
+
label: "Remover",
|
|
29
|
+
function: props.onRemove,
|
|
30
|
+
hide: !props.onRemove
|
|
31
|
+
},
|
|
32
|
+
...(props.functions || [])
|
|
33
|
+
];
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Container, { children: [(0, jsx_runtime_1.jsx)(card_1.default, { ...props }), (0, jsx_runtime_1.jsx)(functions_1.default, { ...props, functions: functions })] }));
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.div `
|
|
10
|
+
border-radius: 8px 8px 0 0;
|
|
11
|
+
transition: .2s ease .2s background, .2s ease .2s padding;
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: .5rem;
|
|
15
|
+
height: 11rem;
|
|
16
|
+
pointer-events: all;
|
|
17
|
+
|
|
18
|
+
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
.iz-credit-card-function-container {
|
|
24
|
+
margin-left: 0;
|
|
25
|
+
|
|
26
|
+
.iz-credit-card-function {
|
|
27
|
+
transform: translateX(0);
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.iz-credit-card-function:nth-child(1) {
|
|
32
|
+
transition: .3s ease transform, .2s ease .1s opacity, ease .3s color;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.iz-credit-card-function:nth-child(2) {
|
|
36
|
+
transition: .3s ease .1s transform, .2s ease .2s opacity, ease .3s color;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getCardContent = exports.validateLuhn = void 0;
|
|
7
|
+
const credit_card_type_1 = __importDefault(require("credit-card-type"));
|
|
8
|
+
const assets_1 = __importDefault(require("../assets"));
|
|
9
|
+
const luhn_1 = __importDefault(require("luhn"));
|
|
10
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
+
exports.validateLuhn = luhn_1.default.validate;
|
|
12
|
+
const getCardContent = (cardNumber) => {
|
|
13
|
+
const content = { flag: "", logo: "" };
|
|
14
|
+
if (!cardNumber)
|
|
15
|
+
return content;
|
|
16
|
+
const potentialCardContents = (0, credit_card_type_1.default)(cardNumber);
|
|
17
|
+
if (potentialCardContents.length === 1) {
|
|
18
|
+
const cardContent = potentialCardContents.shift();
|
|
19
|
+
const flag = cardContent === null || cardContent === void 0 ? void 0 : cardContent.type;
|
|
20
|
+
content.flag = flag || "";
|
|
21
|
+
content.logo = assets_1.default[lodash_1.default.upperFirst(lodash_1.default.camelCase(flag))] || "";
|
|
22
|
+
return content;
|
|
23
|
+
}
|
|
24
|
+
return content;
|
|
25
|
+
};
|
|
26
|
+
exports.getCardContent = getCardContent;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.Form = Form;
|
|
34
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
35
|
+
const react_1 = __importStar(require("react"));
|
|
36
|
+
const styles_1 = require("./styles");
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
39
|
+
const zod_2 = require("@hookform/resolvers/zod");
|
|
40
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
41
|
+
const Types = __importStar(require("./types"));
|
|
42
|
+
__exportStar(require("./types"), exports);
|
|
43
|
+
function Form(props) {
|
|
44
|
+
const formRef = props.formRef || (0, react_1.useRef)({});
|
|
45
|
+
const setSchema = () => {
|
|
46
|
+
const schema = {};
|
|
47
|
+
lodash_1.default.forEach(props.inputs, (data) => {
|
|
48
|
+
if (!data.validation)
|
|
49
|
+
return;
|
|
50
|
+
schema[data.name] = data.validation;
|
|
51
|
+
});
|
|
52
|
+
if (props.validation)
|
|
53
|
+
return props.validation(zod_1.z.object(schema));
|
|
54
|
+
return zod_1.z.object(schema);
|
|
55
|
+
};
|
|
56
|
+
const schema = setSchema();
|
|
57
|
+
const { register, handleSubmit, reset, formState: { errors } } = (0, react_hook_form_1.useForm)({
|
|
58
|
+
resolver: (0, zod_2.zodResolver)(schema),
|
|
59
|
+
defaultValues: props.defaultValues,
|
|
60
|
+
mode: "all"
|
|
61
|
+
});
|
|
62
|
+
(0, react_1.useEffect)(() => {
|
|
63
|
+
if (!props.clearWhen)
|
|
64
|
+
return;
|
|
65
|
+
reset(undefined, { keepErrors: false });
|
|
66
|
+
}, [props.clearWhen]);
|
|
67
|
+
(0, react_1.useEffect)(() => {
|
|
68
|
+
var _a;
|
|
69
|
+
if (!props.defaultValues || !((_a = Object.keys(props.defaultValues || {})) === null || _a === void 0 ? void 0 : _a.length))
|
|
70
|
+
return;
|
|
71
|
+
lodash_1.default.forEach(props.defaultValues, (value, key) => {
|
|
72
|
+
const input = lodash_1.default.find(props.inputs, (data) => data.name === key);
|
|
73
|
+
props.defaultValues[key] = input.mask ? input.mask(value) : value;
|
|
74
|
+
});
|
|
75
|
+
reset(props.defaultValues, { keepErrors: false });
|
|
76
|
+
}, [props.defaultValues]);
|
|
77
|
+
const component = (data) => {
|
|
78
|
+
var _a;
|
|
79
|
+
const component = Types[lodash_1.default.camelCase(data.type)];
|
|
80
|
+
const TypeComponent = component || Types.InputText;
|
|
81
|
+
return (0, jsx_runtime_1.jsx)(TypeComponent, { ...lodash_1.default.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 });
|
|
82
|
+
};
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Container, { ref: formRef, onSubmit: handleSubmit(props.onSubmit), children: [lodash_1.default.map(props.inputs, (data, index) => (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: component(data) }, index)), lodash_1.default.isArray(props.buttons) &&
|
|
84
|
+
(0, jsx_runtime_1.jsx)("div", { className: "form-buttons", children: lodash_1.default.map(props.buttons, (data, index) => (0, jsx_runtime_1.jsx)(Types.Button, { ...data }, index)) })] }));
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.form `
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
.form-buttons {
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding-top: 1rem;
|
|
15
|
+
|
|
16
|
+
button {
|
|
17
|
+
width: 100%;
|
|
18
|
+
margin-top: 1rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Button = Button;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const loading_1 = require("./loading");
|
|
11
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
function Button(props) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Container, { loading: String(!!props.loading), disabled: props.disabled, type: props.type || "button", ...lodash_1.default.omit(props, ["loading", "type"]), children: [!!props.loading && (0, jsx_runtime_1.jsx)(loading_1.Loading, {}), (0, jsx_runtime_1.jsx)("span", { children: props.label })] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Loading(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Loading = Loading;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const styles_1 = require("./styles");
|
|
7
|
+
function Loading() {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Container, { children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {})] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
width: 2rem;
|
|
14
|
+
margin-right: .5rem;
|
|
15
|
+
|
|
16
|
+
div {
|
|
17
|
+
width: .5rem;
|
|
18
|
+
height: .5rem;
|
|
19
|
+
border-radius: 1rem;
|
|
20
|
+
background: rgb(255, 255, 255, 1);
|
|
21
|
+
|
|
22
|
+
&:nth-child(1) {
|
|
23
|
+
animation: blinkOne infinite ease 2s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:nth-child(2) {
|
|
27
|
+
animation: blinkTwo infinite ease 2s;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:nth-child(3) {
|
|
31
|
+
animation: blinkThree infinite ease 2s;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes blinkOne {
|
|
36
|
+
0% {
|
|
37
|
+
opacity: 0.8;
|
|
38
|
+
}
|
|
39
|
+
20% {
|
|
40
|
+
opacity: 0.2;
|
|
41
|
+
}
|
|
42
|
+
40% {
|
|
43
|
+
opacity: 0.2;
|
|
44
|
+
}
|
|
45
|
+
60% {
|
|
46
|
+
opacity: 0.2;
|
|
47
|
+
}
|
|
48
|
+
80% {
|
|
49
|
+
opacity: 0.2;
|
|
50
|
+
}
|
|
51
|
+
100% {
|
|
52
|
+
opacity: 0.8;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes blinkTwo {
|
|
57
|
+
0% {
|
|
58
|
+
opacity: 0.2;
|
|
59
|
+
}
|
|
60
|
+
20% {
|
|
61
|
+
opacity: 0.8;
|
|
62
|
+
}
|
|
63
|
+
40% {
|
|
64
|
+
opacity: 0.2;
|
|
65
|
+
}
|
|
66
|
+
60% {
|
|
67
|
+
opacity: 0.2;
|
|
68
|
+
}
|
|
69
|
+
80% {
|
|
70
|
+
opacity: 0.8;
|
|
71
|
+
}
|
|
72
|
+
100% {
|
|
73
|
+
opacity: 0.2;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes blinkThree {
|
|
78
|
+
0% {
|
|
79
|
+
opacity: 0.2;
|
|
80
|
+
}
|
|
81
|
+
25% {
|
|
82
|
+
opacity: 0.2;
|
|
83
|
+
}
|
|
84
|
+
50% {
|
|
85
|
+
opacity: 0.8;
|
|
86
|
+
}
|
|
87
|
+
75% {
|
|
88
|
+
opacity: 0.2;
|
|
89
|
+
}
|
|
90
|
+
100% {
|
|
91
|
+
opacity: 0.2;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Container = void 0;
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
exports.Container = styled_components_1.default.button `
|
|
10
|
+
border-radius: 5px;
|
|
11
|
+
font-size: .8rem;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
transition: ease .3s;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
color: ${(props) => props.transparent
|
|
18
|
+
? props.theme.t6
|
|
19
|
+
: props.outline
|
|
20
|
+
? props.color || props.theme.secondary
|
|
21
|
+
: "#fff !important"};
|
|
22
|
+
background: ${(props) => props.transparent
|
|
23
|
+
? "transparent"
|
|
24
|
+
: props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
25
|
+
border: 1px solid ${(props) => props.transparent
|
|
26
|
+
? "transparent"
|
|
27
|
+
: props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
28
|
+
pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
|
|
29
|
+
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
30
|
+
opacity: ${(props) => props.loading === "true" ? .6 : 1};
|
|
31
|
+
padding: .4rem 2.5rem;
|
|
32
|
+
transition: ease .3s;
|
|
33
|
+
|
|
34
|
+
span {
|
|
35
|
+
text-align: center;
|
|
36
|
+
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
|
|
42
|
+
&::before {
|
|
43
|
+
opacity: .6;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
opacity: .9;
|
|
49
|
+
color: ${(props) => props.transparent
|
|
50
|
+
? props.theme.t6
|
|
51
|
+
: props.outline
|
|
52
|
+
? props.color || props.theme.secondary
|
|
53
|
+
: "#fff"};
|
|
54
|
+
|
|
55
|
+
&::before {
|
|
56
|
+
background: ${(props) => props.transparent
|
|
57
|
+
? "transparent"
|
|
58
|
+
: props.color || props.theme.secondary};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.InputDateTime = InputDateTime;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const label_1 = require("../label");
|
|
11
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
function InputDateTime(props) {
|
|
13
|
+
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
14
|
+
const onChange = (event) => {
|
|
15
|
+
const value = event.target.value || "";
|
|
16
|
+
event.target.value = props.mask ? props.mask(value) : value;
|
|
17
|
+
if (register.onChange)
|
|
18
|
+
register.onChange(event);
|
|
19
|
+
if (props.onChange)
|
|
20
|
+
props.onChange(event);
|
|
21
|
+
};
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Container, { className: props.className, error: props.error, children: [!!props.label && (0, jsx_runtime_1.jsxs)(label_1.InputLabel, { children: [props.label, props.required ? "*" : ""] }), (0, jsx_runtime_1.jsx)("div", { className: "iz-input-content", children: (0, jsx_runtime_1.jsx)("input", { ...lodash_1.default.omit(props, ["className", "onChange", "mask", "type", "required", "register"]), type: "datetime-local", onFocus: () => {
|
|
23
|
+
if (props.onFocus)
|
|
24
|
+
props.onFocus(props.name);
|
|
25
|
+
}, maxLength: props.maxLength || 255, ...register, onChange: onChange }) }), !!props.error && ((0, jsx_runtime_1.jsx)("div", { className: "iz-input-error", children: props.error }))] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: any;
|