@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.
- package/dist/chunk-7KA3WXTD.mjs +1252 -0
- package/dist/chunk-7KA3WXTD.mjs.map +1 -0
- package/dist/chunk-IF6P6NOG.mjs +141 -0
- package/dist/chunk-IF6P6NOG.mjs.map +1 -0
- package/dist/chunk-RWFXFZB5.mjs +2 -0
- package/dist/chunk-RWFXFZB5.mjs.map +1 -0
- package/dist/components.d.mts +10 -0
- package/dist/components.d.ts +10 -0
- package/dist/components.js +1390 -0
- package/dist/components.js.map +1 -0
- package/dist/components.mjs +3 -0
- package/dist/components.mjs.map +1 -0
- package/dist/contexts.d.mts +20 -0
- package/dist/contexts.d.ts +20 -0
- package/dist/contexts.js +141 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.mjs +3 -0
- package/dist/contexts.mjs.map +1 -0
- package/dist/index-BhaGW0O1.d.ts +601 -0
- package/dist/index-BxA8LyyD.d.mts +68 -0
- package/dist/index-DDi0w5pw.d.mts +601 -0
- package/dist/index-DT7VKE7H.d.ts +68 -0
- package/dist/index-Da-DtPS-.d.mts +29 -0
- package/dist/index-Da-DtPS-.d.ts +29 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1390 -4
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces.d.mts +12 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +3 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/interfaces.mjs +3 -0
- package/dist/interfaces.mjs.map +1 -0
- package/package.json +8 -15
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +0 -17
- package/dist/components/styles.d.ts +0 -2
- package/dist/components/styles.js +0 -14
- package/dist/components/types/avatar/index.d.ts +0 -2
- package/dist/components/types/avatar/index.js +0 -34
- package/dist/components/types/avatar/styles.d.ts +0 -1
- package/dist/components/types/avatar/styles.js +0 -55
- package/dist/components/types/badge/index.d.ts +0 -2
- package/dist/components/types/badge/index.js +0 -16
- package/dist/components/types/badge/styles.d.ts +0 -1
- package/dist/components/types/badge/styles.js +0 -33
- package/dist/components/types/block/index.d.ts +0 -2
- package/dist/components/types/block/index.js +0 -8
- package/dist/components/types/block/styles.d.ts +0 -2
- package/dist/components/types/block/styles.js +0 -25
- package/dist/components/types/chart/index.d.ts +0 -2
- package/dist/components/types/chart/index.js +0 -33
- package/dist/components/types/chart/styles.d.ts +0 -1
- package/dist/components/types/chart/styles.js +0 -4
- package/dist/components/types/credit-card/assets/index.d.ts +0 -4
- package/dist/components/types/credit-card/assets/index.js +0 -17
- package/dist/components/types/credit-card/card/index.d.ts +0 -2
- package/dist/components/types/credit-card/card/index.js +0 -23
- package/dist/components/types/credit-card/card/styles.d.ts +0 -1
- package/dist/components/types/credit-card/card/styles.js +0 -132
- package/dist/components/types/credit-card/functions/index.d.ts +0 -2
- package/dist/components/types/credit-card/functions/index.js +0 -8
- package/dist/components/types/credit-card/functions/styles.d.ts +0 -1
- package/dist/components/types/credit-card/functions/styles.js +0 -37
- package/dist/components/types/credit-card/index.d.ts +0 -2
- package/dist/components/types/credit-card/index.js +0 -29
- package/dist/components/types/credit-card/styles.d.ts +0 -1
- package/dist/components/types/credit-card/styles.js +0 -34
- package/dist/components/types/credit-card/tools/index.d.ts +0 -6
- package/dist/components/types/credit-card/tools/index.js +0 -19
- package/dist/components/types/form/index.d.ts +0 -3
- package/dist/components/types/form/index.js +0 -53
- package/dist/components/types/form/styles.d.ts +0 -1
- package/dist/components/types/form/styles.js +0 -15
- package/dist/components/types/form/types/button/index.d.ts +0 -2
- package/dist/components/types/form/types/button/index.js +0 -8
- package/dist/components/types/form/types/button/loading/index.d.ts +0 -1
- package/dist/components/types/form/types/button/loading/index.js +0 -6
- package/dist/components/types/form/types/button/loading/styles.d.ts +0 -1
- package/dist/components/types/form/types/button/loading/styles.js +0 -88
- package/dist/components/types/form/types/button/styles.d.ts +0 -1
- package/dist/components/types/form/types/button/styles.js +0 -55
- package/dist/components/types/form/types/datetime/index.d.ts +0 -2
- package/dist/components/types/form/types/datetime/index.js +0 -20
- package/dist/components/types/form/types/datetime/styles.d.ts +0 -1
- package/dist/components/types/form/types/datetime/styles.js +0 -40
- package/dist/components/types/form/types/file/index.d.ts +0 -2
- package/dist/components/types/form/types/file/index.js +0 -24
- package/dist/components/types/form/types/file/styles.d.ts +0 -1
- package/dist/components/types/form/types/file/styles.js +0 -27
- package/dist/components/types/form/types/index.d.ts +0 -7
- package/dist/components/types/form/types/index.js +0 -7
- package/dist/components/types/form/types/input/index.d.ts +0 -2
- package/dist/components/types/form/types/input/index.js +0 -22
- package/dist/components/types/form/types/input/styles.d.ts +0 -1
- package/dist/components/types/form/types/input/styles.js +0 -46
- package/dist/components/types/form/types/label/index.d.ts +0 -2
- package/dist/components/types/form/types/label/index.js +0 -6
- package/dist/components/types/form/types/label/styles.d.ts +0 -1
- package/dist/components/types/form/types/label/styles.js +0 -7
- package/dist/components/types/form/types/select/index.d.ts +0 -2
- package/dist/components/types/form/types/select/index.js +0 -25
- package/dist/components/types/form/types/select/styles.d.ts +0 -1
- package/dist/components/types/form/types/select/styles.js +0 -52
- package/dist/components/types/form/types/textarea/index.d.ts +0 -2
- package/dist/components/types/form/types/textarea/index.js +0 -20
- package/dist/components/types/form/types/textarea/styles.d.ts +0 -1
- package/dist/components/types/form/types/textarea/styles.js +0 -39
- package/dist/components/types/index.d.ts +0 -11
- package/dist/components/types/index.js +0 -11
- package/dist/components/types/loading/app/index.d.ts +0 -2
- package/dist/components/types/loading/app/index.js +0 -7
- package/dist/components/types/loading/app/styles.d.ts +0 -1
- package/dist/components/types/loading/app/styles.js +0 -87
- package/dist/components/types/loading/bar/index.d.ts +0 -2
- package/dist/components/types/loading/bar/index.js +0 -6
- package/dist/components/types/loading/bar/styles.d.ts +0 -1
- package/dist/components/types/loading/bar/styles.js +0 -21
- package/dist/components/types/loading/index.d.ts +0 -2
- package/dist/components/types/loading/index.js +0 -2
- package/dist/components/types/logo/index.d.ts +0 -2
- package/dist/components/types/logo/index.js +0 -6
- package/dist/components/types/logo/styles.d.ts +0 -1
- package/dist/components/types/logo/styles.js +0 -19
- package/dist/components/types/lottie/animations/index.d.ts +0 -293
- package/dist/components/types/lottie/animations/index.js +0 -2
- package/dist/components/types/lottie/animations/loader.json +0 -1
- package/dist/components/types/lottie/index.d.ts +0 -2
- package/dist/components/types/lottie/index.js +0 -28
- package/dist/components/types/lottie/styles.d.ts +0 -1
- package/dist/components/types/lottie/styles.js +0 -22
- package/dist/components/types/modal/index.d.ts +0 -2
- package/dist/components/types/modal/index.js +0 -12
- package/dist/components/types/modal/styles.d.ts +0 -1
- package/dist/components/types/modal/styles.js +0 -153
- package/dist/components/types/table/index.d.ts +0 -3
- package/dist/components/types/table/index.js +0 -93
- package/dist/components/types/table/modal/actions.d.ts +0 -10
- package/dist/components/types/table/modal/actions.js +0 -6
- package/dist/components/types/table/modal/index.d.ts +0 -2
- package/dist/components/types/table/modal/index.js +0 -37
- package/dist/components/types/table/modal/styles.d.ts +0 -1
- package/dist/components/types/table/modal/styles.js +0 -52
- package/dist/components/types/table/paginate/index.d.ts +0 -2
- package/dist/components/types/table/paginate/index.js +0 -30
- package/dist/components/types/table/paginate/styles.d.ts +0 -1
- package/dist/components/types/table/paginate/styles.js +0 -36
- package/dist/components/types/table/styles.d.ts +0 -5
- package/dist/components/types/table/styles.js +0 -262
- package/dist/contexts/icon/assets/brands/index.d.ts +0 -2
- package/dist/contexts/icon/assets/brands/index.js +0 -7
- package/dist/contexts/icon/assets/index.d.ts +0 -6
- package/dist/contexts/icon/assets/index.js +0 -8
- package/dist/contexts/icon/assets/regular/index.d.ts +0 -2
- package/dist/contexts/icon/assets/regular/index.js +0 -7
- package/dist/contexts/icon/assets/solid/index.d.ts +0 -2
- package/dist/contexts/icon/assets/solid/index.js +0 -7
- package/dist/contexts/icon/index.d.ts +0 -4
- package/dist/contexts/icon/index.js +0 -75
- package/dist/contexts/icon/styles.d.ts +0 -1
- package/dist/contexts/icon/styles.js +0 -4
- package/dist/contexts/index.d.ts +0 -4
- package/dist/contexts/index.js +0 -5
- package/dist/contexts/modal/index.d.ts +0 -4
- package/dist/contexts/modal/index.js +0 -46
- package/dist/contexts/modal/styles.d.ts +0 -1
- package/dist/contexts/modal/styles.js +0 -4
- package/dist/contexts/theme/content.d.ts +0 -3
- package/dist/contexts/theme/content.js +0 -74
- package/dist/contexts/theme/index.d.ts +0 -4
- package/dist/contexts/theme/index.js +0 -26
- package/dist/contexts/theme/styles.d.ts +0 -1
- package/dist/contexts/theme/styles.js +0 -78
- package/dist/contexts/tooltip/index.d.ts +0 -6
- package/dist/contexts/tooltip/index.js +0 -58
- package/dist/contexts/tooltip/styles.d.ts +0 -1
- package/dist/contexts/tooltip/styles.js +0 -40
- package/dist/interfaces/components/avatar/index.d.ts +0 -6
- package/dist/interfaces/components/avatar/index.js +0 -1
- package/dist/interfaces/components/badge/index.d.ts +0 -3
- package/dist/interfaces/components/badge/index.js +0 -1
- package/dist/interfaces/components/block/index.d.ts +0 -16
- package/dist/interfaces/components/block/index.js +0 -1
- package/dist/interfaces/components/chart/index.d.ts +0 -9
- package/dist/interfaces/components/chart/index.js +0 -1
- package/dist/interfaces/components/credit-card/index.d.ts +0 -16
- package/dist/interfaces/components/credit-card/index.js +0 -1
- package/dist/interfaces/components/form/button/index.d.ts +0 -7
- package/dist/interfaces/components/form/button/index.js +0 -1
- package/dist/interfaces/components/form/datetime/index.d.ts +0 -15
- package/dist/interfaces/components/form/datetime/index.js +0 -1
- package/dist/interfaces/components/form/file/index.d.ts +0 -14
- package/dist/interfaces/components/form/file/index.js +0 -1
- package/dist/interfaces/components/form/index.d.ts +0 -16
- package/dist/interfaces/components/form/index.js +0 -7
- package/dist/interfaces/components/form/input/index.d.ts +0 -17
- package/dist/interfaces/components/form/input/index.js +0 -1
- package/dist/interfaces/components/form/label/index.d.ts +0 -5
- package/dist/interfaces/components/form/label/index.js +0 -1
- package/dist/interfaces/components/form/select/index.d.ts +0 -14
- package/dist/interfaces/components/form/select/index.js +0 -1
- package/dist/interfaces/components/form/textarea/index.d.ts +0 -16
- package/dist/interfaces/components/form/textarea/index.js +0 -1
- package/dist/interfaces/components/index.d.ts +0 -26
- package/dist/interfaces/components/index.js +0 -11
- package/dist/interfaces/components/loading/app/index.d.ts +0 -3
- package/dist/interfaces/components/loading/app/index.js +0 -1
- package/dist/interfaces/components/loading/bar/index.d.ts +0 -7
- package/dist/interfaces/components/loading/bar/index.js +0 -1
- package/dist/interfaces/components/loading/index.d.ts +0 -2
- package/dist/interfaces/components/loading/index.js +0 -2
- package/dist/interfaces/components/logo/index.d.ts +0 -6
- package/dist/interfaces/components/logo/index.js +0 -1
- package/dist/interfaces/components/lottie/index.d.ts +0 -12
- package/dist/interfaces/components/lottie/index.js +0 -1
- package/dist/interfaces/components/modal/index.d.ts +0 -16
- package/dist/interfaces/components/modal/index.js +0 -1
- package/dist/interfaces/components/table/index.d.ts +0 -46
- package/dist/interfaces/components/table/index.js +0 -1
- package/dist/interfaces/components/table/paginate/index.d.ts +0 -7
- package/dist/interfaces/components/table/paginate/index.js +0 -1
- package/dist/interfaces/contexts/icon/index.d.ts +0 -3
- package/dist/interfaces/contexts/icon/index.js +0 -1
- package/dist/interfaces/contexts/index.d.ts +0 -8
- package/dist/interfaces/contexts/index.js +0 -4
- package/dist/interfaces/contexts/modal/index.d.ts +0 -16
- package/dist/interfaces/contexts/modal/index.js +0 -2
- package/dist/interfaces/contexts/theme/index.d.ts +0 -42
- package/dist/interfaces/contexts/theme/index.js +0 -1
- package/dist/interfaces/contexts/tooltip/index.d.ts +0 -3
- package/dist/interfaces/contexts/tooltip/index.js +0 -1
- package/dist/interfaces/index.d.ts +0 -2
- package/dist/interfaces/index.js +0 -2
- package/dist/styled.d.ts +0 -6
- package/dist/styled.js +0 -1
- package/dist/tsup.config.d.ts +0 -2
- 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,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,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,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,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,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 +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,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,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
|
-
}
|