@gustavo-valsechi/client 1.3.24 → 1.3.25
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/components/index.d.ts +3 -10
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.mjs +21 -0
- package/dist/components/types/avatar/index.d.ts +2 -0
- package/dist/components/types/avatar/index.mjs +88 -0
- package/dist/components/types/avatar/styles.d.ts +1 -0
- package/dist/components/types/avatar/styles.mjs +61 -0
- package/dist/components/types/badge/index.d.ts +2 -0
- package/dist/components/types/badge/index.mjs +324 -0
- package/dist/components/types/badge/styles.d.ts +1 -0
- package/dist/components/types/badge/styles.mjs +39 -0
- package/dist/components/types/block/index.d.ts +2 -0
- package/dist/components/types/block/index.mjs +3078 -0
- package/dist/components/types/block/styles.d.ts +2 -0
- package/dist/components/types/block/styles.mjs +32 -0
- package/dist/components/types/chart/index.d.ts +2 -0
- package/dist/components/types/chart/index.mjs +322 -0
- package/dist/components/types/chart/styles.d.ts +1 -0
- package/dist/components/types/chart/styles.mjs +10 -0
- package/dist/components/types/credit-card/assets/index.d.ts +4 -0
- package/dist/components/types/credit-card/assets/index.mjs +23 -0
- package/dist/components/types/credit-card/card/index.d.ts +2 -0
- package/dist/components/types/credit-card/card/index.mjs +732 -0
- package/dist/components/types/credit-card/card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/card/styles.mjs +138 -0
- package/dist/components/types/credit-card/functions/index.d.ts +2 -0
- package/dist/components/types/credit-card/functions/index.mjs +61 -0
- package/dist/components/types/credit-card/functions/styles.d.ts +1 -0
- package/dist/components/types/credit-card/functions/styles.mjs +43 -0
- package/dist/components/types/credit-card/index.d.ts +2 -0
- package/dist/components/types/credit-card/index.mjs +853 -0
- package/dist/components/types/credit-card/styles.d.ts +1 -0
- package/dist/components/types/credit-card/styles.mjs +40 -0
- package/dist/components/types/credit-card/tools/index.d.ts +6 -0
- package/dist/components/types/credit-card/tools/index.mjs +566 -0
- package/dist/components/types/form/index.d.ts +3 -0
- package/dist/components/types/form/index.mjs +711 -0
- package/dist/components/types/form/styles.d.ts +1 -0
- package/dist/components/types/form/styles.mjs +21 -0
- package/dist/components/types/form/types/button/index.d.ts +2 -0
- package/dist/components/types/form/types/button/index.mjs +165 -0
- package/dist/components/types/form/types/button/loading/index.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/index.mjs +104 -0
- package/dist/components/types/form/types/button/loading/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/loading/styles.mjs +94 -0
- package/dist/components/types/form/types/button/styles.d.ts +1 -0
- package/dist/components/types/form/types/button/styles.mjs +47 -0
- package/dist/components/types/form/types/datetime/index.d.ts +2 -0
- package/dist/components/types/form/types/datetime/index.mjs +93 -0
- package/dist/components/types/form/types/datetime/styles.d.ts +1 -0
- package/dist/components/types/form/types/datetime/styles.mjs +46 -0
- package/dist/components/types/form/types/file/index.d.ts +2 -0
- package/dist/components/types/form/types/file/index.mjs +91 -0
- package/dist/components/types/form/types/file/styles.d.ts +1 -0
- package/dist/components/types/form/types/file/styles.mjs +33 -0
- package/dist/components/types/form/types/index.d.ts +7 -0
- package/dist/components/types/form/types/index.mjs +603 -0
- package/dist/components/types/form/types/input/index.d.ts +2 -0
- package/dist/components/types/form/types/input/index.mjs +113 -0
- package/dist/components/types/form/types/input/styles.d.ts +1 -0
- package/dist/components/types/form/types/input/styles.mjs +52 -0
- package/dist/components/types/form/types/label/index.d.ts +2 -0
- package/dist/components/types/form/types/label/index.mjs +19 -0
- package/dist/components/types/form/types/label/styles.d.ts +1 -0
- package/dist/components/types/form/types/label/styles.mjs +13 -0
- package/dist/components/types/form/types/select/index.d.ts +2 -0
- package/dist/components/types/form/types/select/index.mjs +125 -0
- package/dist/components/types/form/types/select/styles.d.ts +1 -0
- package/dist/components/types/form/types/select/styles.mjs +58 -0
- package/dist/components/types/form/types/textarea/index.d.ts +2 -0
- package/dist/components/types/form/types/textarea/index.mjs +92 -0
- package/dist/components/types/form/types/textarea/styles.d.ts +1 -0
- package/dist/components/types/form/types/textarea/styles.mjs +45 -0
- package/dist/components/types/index.d.ts +11 -0
- package/dist/components/{index.js → types/index.mjs} +379 -405
- package/dist/components/types/loading/app/index.d.ts +2 -0
- package/dist/components/types/loading/app/index.mjs +128 -0
- package/dist/components/types/loading/app/styles.d.ts +1 -0
- package/dist/components/types/loading/app/styles.mjs +93 -0
- package/dist/components/types/loading/bar/index.d.ts +2 -0
- package/dist/components/types/loading/bar/index.mjs +33 -0
- package/dist/components/types/loading/bar/styles.d.ts +1 -0
- package/dist/components/types/loading/bar/styles.mjs +27 -0
- package/dist/components/types/loading/index.d.ts +2 -0
- package/dist/components/types/loading/index.mjs +156 -0
- package/dist/components/types/logo/index.d.ts +2 -0
- package/dist/components/types/logo/index.mjs +34 -0
- package/dist/components/types/logo/styles.d.ts +1 -0
- package/dist/components/types/logo/styles.mjs +25 -0
- package/dist/components/types/lottie/animations/index.d.ts +293 -0
- package/dist/components/types/lottie/animations/index.mjs +10 -0
- package/dist/components/types/lottie/index.d.ts +2 -0
- package/dist/components/types/lottie/index.mjs +69 -0
- package/dist/components/types/lottie/styles.d.ts +1 -0
- package/dist/components/types/lottie/styles.mjs +28 -0
- package/dist/components/types/modal/index.d.ts +2 -0
- package/dist/components/types/modal/index.mjs +2324 -0
- package/dist/components/types/modal/styles.d.ts +1 -0
- package/dist/components/types/modal/styles.mjs +135 -0
- package/dist/components/types/table/index.d.ts +3 -0
- package/dist/{index.js → components/types/table/index.mjs} +1050 -1316
- package/dist/components/types/table/modal/actions.d.ts +10 -0
- package/dist/components/types/table/modal/actions.mjs +87 -0
- package/dist/components/types/table/modal/index.d.ts +2 -0
- package/dist/components/types/table/modal/index.mjs +3076 -0
- package/dist/components/types/table/modal/styles.d.ts +1 -0
- package/dist/components/types/table/modal/styles.mjs +58 -0
- package/dist/components/types/table/paginate/index.d.ts +2 -0
- package/dist/components/types/table/paginate/index.mjs +96 -0
- package/dist/components/types/table/paginate/styles.d.ts +1 -0
- package/dist/components/types/table/paginate/styles.mjs +42 -0
- package/dist/components/types/table/styles.d.ts +5 -0
- package/dist/components/types/table/styles.mjs +268 -0
- package/dist/contexts/icon/assets/brands/index.d.ts +2 -0
- package/dist/contexts/icon/assets/brands/index.mjs +19 -0
- package/dist/contexts/icon/assets/index.d.ts +6 -0
- package/dist/contexts/icon/assets/index.mjs +44 -0
- package/dist/contexts/icon/assets/regular/index.d.ts +2 -0
- package/dist/contexts/icon/assets/regular/index.mjs +19 -0
- package/dist/contexts/icon/assets/solid/index.d.ts +2 -0
- package/dist/contexts/icon/assets/solid/index.mjs +19 -0
- package/dist/contexts/icon/index.d.ts +4 -0
- package/dist/contexts/icon/index.mjs +281 -0
- package/dist/contexts/icon/styles.d.ts +1 -0
- package/dist/contexts/icon/styles.mjs +10 -0
- package/dist/contexts/index.d.ts +4 -20
- package/dist/contexts/modal/index.d.ts +4 -0
- package/dist/contexts/modal/index.mjs +66 -0
- package/dist/contexts/modal/styles.d.ts +1 -0
- package/dist/contexts/modal/styles.mjs +10 -0
- package/dist/contexts/theme/content.d.ts +3 -0
- package/dist/contexts/theme/content.mjs +81 -0
- package/dist/contexts/theme/index.d.ts +4 -0
- package/dist/contexts/theme/index.mjs +201 -0
- package/dist/contexts/theme/styles.d.ts +1 -0
- package/dist/contexts/theme/styles.mjs +84 -0
- package/dist/contexts/tooltip/index.d.ts +6 -0
- package/dist/contexts/tooltip/index.mjs +117 -0
- package/dist/contexts/tooltip/styles.d.ts +1 -0
- package/dist/contexts/tooltip/styles.mjs +46 -0
- package/dist/index.d.ts +4 -17
- package/dist/interfaces/components/avatar/index.d.ts +6 -0
- package/dist/interfaces/components/avatar/index.mjs +1 -0
- package/dist/interfaces/components/badge/index.d.ts +3 -0
- package/dist/interfaces/components/badge/index.mjs +1 -0
- package/dist/interfaces/components/block/index.d.ts +16 -0
- package/dist/interfaces/components/block/index.mjs +1 -0
- package/dist/interfaces/components/chart/index.d.ts +9 -0
- package/dist/interfaces/components/chart/index.mjs +1 -0
- package/dist/interfaces/components/credit-card/index.d.ts +16 -0
- package/dist/interfaces/components/credit-card/index.mjs +1 -0
- package/dist/interfaces/components/form/button/index.d.ts +7 -0
- package/dist/interfaces/components/form/button/index.mjs +1 -0
- package/dist/interfaces/components/form/datetime/index.d.ts +15 -0
- package/dist/interfaces/components/form/datetime/index.mjs +1 -0
- package/dist/interfaces/components/form/file/index.d.ts +14 -0
- package/dist/interfaces/components/form/file/index.mjs +1 -0
- package/dist/interfaces/components/form/index.d.ts +16 -0
- package/dist/interfaces/components/form/index.mjs +1 -0
- package/dist/interfaces/components/form/input/index.d.ts +17 -0
- package/dist/interfaces/components/form/input/index.mjs +1 -0
- package/dist/interfaces/components/form/label/index.d.ts +5 -0
- package/dist/interfaces/components/form/label/index.mjs +1 -0
- package/dist/interfaces/components/form/select/index.d.ts +14 -0
- package/dist/interfaces/components/form/select/index.mjs +1 -0
- package/dist/interfaces/components/form/textarea/index.d.ts +16 -0
- package/dist/interfaces/components/form/textarea/index.mjs +1 -0
- package/dist/interfaces/components/index.d.ts +26 -0
- package/dist/interfaces/components/index.mjs +1 -0
- package/dist/interfaces/components/loading/app/index.d.ts +3 -0
- package/dist/interfaces/components/loading/app/index.mjs +1 -0
- package/dist/interfaces/components/loading/bar/index.d.ts +7 -0
- package/dist/interfaces/components/loading/bar/index.mjs +1 -0
- package/dist/interfaces/components/loading/index.d.ts +2 -0
- package/dist/interfaces/components/loading/index.mjs +1 -0
- package/dist/interfaces/components/logo/index.d.ts +6 -0
- package/dist/interfaces/components/logo/index.mjs +1 -0
- package/dist/interfaces/components/lottie/index.d.ts +12 -0
- package/dist/interfaces/components/lottie/index.mjs +1 -0
- package/dist/interfaces/components/modal/index.d.ts +16 -0
- package/dist/interfaces/components/modal/index.mjs +1 -0
- package/dist/interfaces/components/table/index.d.ts +46 -0
- package/dist/interfaces/components/table/index.mjs +1 -0
- package/dist/interfaces/components/table/paginate/index.d.ts +7 -0
- package/dist/interfaces/components/table/paginate/index.mjs +1 -0
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/dist/interfaces/contexts/icon/index.mjs +1 -0
- package/dist/interfaces/contexts/index.d.ts +8 -0
- package/dist/interfaces/contexts/index.mjs +1 -0
- package/dist/interfaces/contexts/modal/index.d.ts +16 -0
- package/dist/interfaces/contexts/modal/index.mjs +2 -0
- package/dist/interfaces/contexts/theme/index.d.ts +42 -0
- package/dist/interfaces/contexts/theme/index.mjs +1 -0
- package/dist/interfaces/contexts/tooltip/index.d.ts +3 -0
- package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/styled.d.ts +6 -0
- package/dist/tsup.config.d.ts +2 -0
- package/package.json +13 -7
- package/dist/components/index.d.mts +0 -10
- package/dist/contexts/index.d.mts +0 -20
- package/dist/contexts/index.js +0 -525
- package/dist/index-BhaGW0O1.d.ts +0 -601
- package/dist/index-BxA8LyyD.d.mts +0 -68
- package/dist/index-DDi0w5pw.d.mts +0 -601
- package/dist/index-DT7VKE7H.d.ts +0 -68
- package/dist/index-Da-DtPS-.d.mts +0 -29
- package/dist/index-Da-DtPS-.d.ts +0 -29
- package/dist/index.d.mts +0 -17
- package/dist/interfaces/index.d.mts +0 -12
- package/dist/interfaces/index.js +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Switcher: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// contexts/theme/styles.tsx
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
var Switcher = styled.div`
|
|
6
|
+
width: 3rem;
|
|
7
|
+
height: 1.5rem;
|
|
8
|
+
border-radius: 1rem;
|
|
9
|
+
border: 2px solid ${({ theme }) => theme.t05};
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
i {
|
|
17
|
+
color: ${({ theme }) => theme.t6};
|
|
18
|
+
position: absolute;
|
|
19
|
+
transform: translateY(-50%);
|
|
20
|
+
font-size: .9rem;
|
|
21
|
+
z-index: 0;
|
|
22
|
+
transition: ease .8s;
|
|
23
|
+
|
|
24
|
+
&:first-child {
|
|
25
|
+
left: .2rem;
|
|
26
|
+
top: 50%;
|
|
27
|
+
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
right: .2rem;
|
|
32
|
+
top: 50%;
|
|
33
|
+
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.switcher {
|
|
38
|
+
width: 1rem;
|
|
39
|
+
height: 1rem;
|
|
40
|
+
border-radius: 1rem;
|
|
41
|
+
position: relative;
|
|
42
|
+
transition: ease .3s;
|
|
43
|
+
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
44
|
+
z-index: 1;
|
|
45
|
+
|
|
46
|
+
div {
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
background: ${({ theme }) => theme.primary};
|
|
50
|
+
border-radius: 1rem;
|
|
51
|
+
position: relative;
|
|
52
|
+
z-index: 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:after {
|
|
56
|
+
content: "";
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
border-radius: 1rem;
|
|
61
|
+
transform: scale(1.8);
|
|
62
|
+
background: ${({ theme }) => theme.t05};
|
|
63
|
+
top: 0;
|
|
64
|
+
left: 0;
|
|
65
|
+
z-index: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:before {
|
|
69
|
+
content: "";
|
|
70
|
+
position: absolute;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
border-radius: 1rem;
|
|
74
|
+
transform: scale(3);
|
|
75
|
+
background: ${({ theme }) => theme.t05};
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
z-index: 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
export {
|
|
83
|
+
Switcher
|
|
84
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const TooltipProviderContainer: ({ children }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const useTooltip: () => any;
|
|
6
|
+
export { TooltipProviderContainer as TooltipProvider, useTooltip };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
// contexts/tooltip/index.tsx
|
|
5
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
6
|
+
|
|
7
|
+
// contexts/tooltip/styles.tsx
|
|
8
|
+
import styled from "styled-components";
|
|
9
|
+
var Tooltip = styled.div`
|
|
10
|
+
position: fixed;
|
|
11
|
+
background: ${({ theme }) => theme.tooltip};
|
|
12
|
+
color: ${({ theme }) => theme.t6};
|
|
13
|
+
font-size: .8rem;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
text-align: center;
|
|
16
|
+
padding: .3rem .8rem;
|
|
17
|
+
border-radius: 5px;
|
|
18
|
+
transform: translateX(-50%);
|
|
19
|
+
z-index: 10;
|
|
20
|
+
border: 1px solid ${({ theme }) => theme.t05};
|
|
21
|
+
|
|
22
|
+
&::before {
|
|
23
|
+
content: "";
|
|
24
|
+
position: absolute;
|
|
25
|
+
bottom: -9px;
|
|
26
|
+
left: 50%;
|
|
27
|
+
transform: translateX(-50%);
|
|
28
|
+
width: 0;
|
|
29
|
+
height: 0;
|
|
30
|
+
border-left: 8px solid transparent;
|
|
31
|
+
border-right: 8px solid transparent;
|
|
32
|
+
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&::after {
|
|
36
|
+
content: "";
|
|
37
|
+
position: absolute;
|
|
38
|
+
bottom: -8px;
|
|
39
|
+
left: 50%;
|
|
40
|
+
transform: translateX(-50%);
|
|
41
|
+
width: 0;
|
|
42
|
+
height: 0;
|
|
43
|
+
border-left: 8px solid transparent;
|
|
44
|
+
border-right: 8px solid transparent;
|
|
45
|
+
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
// contexts/tooltip/index.tsx
|
|
50
|
+
import _ from "lodash";
|
|
51
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
52
|
+
var TooltipContext = createContext({});
|
|
53
|
+
var TooltipProviderContainer = ({ children }) => {
|
|
54
|
+
const [tooltips, setTooltips] = useState([]);
|
|
55
|
+
const getContent = (target) => {
|
|
56
|
+
var _a;
|
|
57
|
+
const rect = target.getBoundingClientRect();
|
|
58
|
+
return {
|
|
59
|
+
top: rect.top + window.scrollY - (target.offsetHeight + 8),
|
|
60
|
+
left: rect.left + window.scrollX + target.offsetWidth / 2,
|
|
61
|
+
content: ((_a = target.dataset) == null ? void 0 : _a.tooltip) || ""
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
const processElement = (element) => {
|
|
66
|
+
element.addEventListener("mouseenter", (event) => {
|
|
67
|
+
const target = event == null ? void 0 : event.target;
|
|
68
|
+
if (!target) return;
|
|
69
|
+
setTooltips(_.concat(tooltips, [getContent(target)]));
|
|
70
|
+
});
|
|
71
|
+
element.addEventListener("mouseleave", (event) => {
|
|
72
|
+
const target = event == null ? void 0 : event.target;
|
|
73
|
+
if (!target) return;
|
|
74
|
+
setTooltips(_.filter(tooltips, (data) => JSON.stringify(data) === JSON.stringify(getContent(target))));
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
document.querySelectorAll("[data-tooltip]").forEach((el) => processElement(el));
|
|
78
|
+
const observer = new MutationObserver((mutations) => {
|
|
79
|
+
mutations.forEach((mutation) => {
|
|
80
|
+
mutation.addedNodes.forEach((node) => {
|
|
81
|
+
if (node.nodeType === 1) {
|
|
82
|
+
const el = node;
|
|
83
|
+
if (el.getAttribute("data-tooltip")) processElement(el);
|
|
84
|
+
el.querySelectorAll("[data-tooltip]").forEach((child) => processElement(child));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
observer.observe(document.body, {
|
|
90
|
+
childList: true,
|
|
91
|
+
subtree: true
|
|
92
|
+
});
|
|
93
|
+
return () => observer.disconnect();
|
|
94
|
+
}, []);
|
|
95
|
+
return /* @__PURE__ */ jsxs(TooltipContext.Provider, { value: {}, children: [
|
|
96
|
+
_.map(
|
|
97
|
+
tooltips,
|
|
98
|
+
(data, index) => /* @__PURE__ */ jsx(
|
|
99
|
+
Tooltip,
|
|
100
|
+
{
|
|
101
|
+
style: {
|
|
102
|
+
top: data.top,
|
|
103
|
+
left: data.left
|
|
104
|
+
},
|
|
105
|
+
children: data.content
|
|
106
|
+
},
|
|
107
|
+
index
|
|
108
|
+
)
|
|
109
|
+
),
|
|
110
|
+
children
|
|
111
|
+
] });
|
|
112
|
+
};
|
|
113
|
+
var useTooltip = () => useContext(TooltipContext);
|
|
114
|
+
export {
|
|
115
|
+
TooltipProviderContainer as TooltipProvider,
|
|
116
|
+
useTooltip
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Tooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// contexts/tooltip/styles.tsx
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
var Tooltip = styled.div`
|
|
6
|
+
position: fixed;
|
|
7
|
+
background: ${({ theme }) => theme.tooltip};
|
|
8
|
+
color: ${({ theme }) => theme.t6};
|
|
9
|
+
font-size: .8rem;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
text-align: center;
|
|
12
|
+
padding: .3rem .8rem;
|
|
13
|
+
border-radius: 5px;
|
|
14
|
+
transform: translateX(-50%);
|
|
15
|
+
z-index: 10;
|
|
16
|
+
border: 1px solid ${({ theme }) => theme.t05};
|
|
17
|
+
|
|
18
|
+
&::before {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
bottom: -9px;
|
|
22
|
+
left: 50%;
|
|
23
|
+
transform: translateX(-50%);
|
|
24
|
+
width: 0;
|
|
25
|
+
height: 0;
|
|
26
|
+
border-left: 8px solid transparent;
|
|
27
|
+
border-right: 8px solid transparent;
|
|
28
|
+
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
content: "";
|
|
33
|
+
position: absolute;
|
|
34
|
+
bottom: -8px;
|
|
35
|
+
left: 50%;
|
|
36
|
+
transform: translateX(-50%);
|
|
37
|
+
width: 0;
|
|
38
|
+
height: 0;
|
|
39
|
+
border-left: 8px solid transparent;
|
|
40
|
+
border-right: 8px solid transparent;
|
|
41
|
+
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
export {
|
|
45
|
+
Tooltip
|
|
46
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export { A as Avatar, B as Badge, k as Block, f as Button, C as Chart, j as CreditCard, F as Form, N as IAvatar, x as IBadge, R as IBlock, M as IChart, p as IComponent, n as IComponentConfig, m as IComponentConfigMap, o as IComponentContent, l as IComponentMap, Q as ICreditCard, z as IForm, J as IInputDateTime, D as IInputFile, E as IInputLabel, H as IInputSelect, G as IInputText, K as IInputTextarea, w as ILoadingApp, v as ILoadingBar, y as ILogo, O as ILottie, u as IPaginate, t as ITable, q as ITableAction, r as ITableColumn, s as ITableRow, g as InputDateTime, I as InputFile, c as InputLabel, e as InputSelect, d as InputText, h as InputTextarea, a as LoadingApp, L as LoadingBar, b as Logo, i as Lottie, P as Paginate, T as Table } from './index-BhaGW0O1.js';
|
|
6
|
-
export { a as IButton, I as IModal, M as Modal } from './index-Da-DtPS-.js';
|
|
7
|
-
export { ITooltipProvider } from './interfaces/index.js';
|
|
8
|
-
import 'react';
|
|
9
|
-
import 'react/jsx-runtime';
|
|
10
|
-
import 'react-hook-form';
|
|
11
|
-
|
|
12
|
-
declare module "styled-components" {
|
|
13
|
-
interface DefaultTheme extends IThemeContent {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { IThemeContent };
|
|
1
|
+
import "./styled";
|
|
2
|
+
export * from "./components";
|
|
3
|
+
export * from "./contexts";
|
|
4
|
+
export * from "./interfaces";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IComponentContent } from "@interfaces";
|
|
3
|
+
interface IBase {
|
|
4
|
+
icon?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export type IBlock = (IBase & {
|
|
8
|
+
component: IComponentContent;
|
|
9
|
+
content?: never;
|
|
10
|
+
children?: never;
|
|
11
|
+
}) | (IBase & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
component?: never;
|
|
14
|
+
content?: never;
|
|
15
|
+
});
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ICreditCard {
|
|
2
|
+
cvc?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
number: string;
|
|
5
|
+
expiry: string;
|
|
6
|
+
onEdit?: () => any;
|
|
7
|
+
onConfig?: () => any;
|
|
8
|
+
onRemove?: () => any;
|
|
9
|
+
focused?: "name" | "number" | "expiry" | "cvc" | "" | undefined;
|
|
10
|
+
functions?: Array<{
|
|
11
|
+
icon: string;
|
|
12
|
+
label: string;
|
|
13
|
+
function?: () => any;
|
|
14
|
+
hide?: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UseFormRegister } from "react-hook-form";
|
|
2
|
+
export interface IInputDateTime {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
mask?: (value: string) => void;
|
|
8
|
+
onFocus: (value: any) => void;
|
|
9
|
+
onChange: (event: any) => void;
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
error: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
register?: UseFormRegister<any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UseFormRegister } from "react-hook-form";
|
|
2
|
+
export interface IInputFile {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onPreview?: (url: any) => void;
|
|
8
|
+
onChange: (event: any) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
error: string;
|
|
11
|
+
onFocus: (value: string) => void;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
register?: UseFormRegister<any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./file";
|
|
2
|
+
export * from "./label";
|
|
3
|
+
export * from "./input";
|
|
4
|
+
export * from "./select";
|
|
5
|
+
export * from "./button";
|
|
6
|
+
export * from "./datetime";
|
|
7
|
+
export * from "./textarea";
|
|
8
|
+
export interface IForm {
|
|
9
|
+
defaultValues?: any;
|
|
10
|
+
validation?: any;
|
|
11
|
+
formRef?: any;
|
|
12
|
+
onSubmit: (values: any, actions?: any) => void;
|
|
13
|
+
clearWhen?: boolean;
|
|
14
|
+
inputs: Array<any>;
|
|
15
|
+
buttons?: Array<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UseFormRegister } from "react-hook-form";
|
|
2
|
+
export interface IInputText {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
mask?: (value: string) => void;
|
|
10
|
+
onChange?: (event: any) => void;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
error?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onFocus?: (value: any) => void;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
register?: UseFormRegister<any>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UseFormRegister } from "react-hook-form";
|
|
2
|
+
export interface IInputSelect {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (event: any) => void;
|
|
8
|
+
options: Array<any>;
|
|
9
|
+
error: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onFocus: (value: any) => void;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
register?: UseFormRegister<any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UseFormRegister } from "react-hook-form";
|
|
2
|
+
export interface IInputTextarea {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
mask?: (value: string) => void;
|
|
8
|
+
onChange: (event: any) => void;
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
rows?: number;
|
|
11
|
+
error: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onFocus: (value: string) => void;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
register?: UseFormRegister<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as Types from "@components/types";
|
|
3
|
+
export * from "./table";
|
|
4
|
+
export * from "./loading";
|
|
5
|
+
export * from "./modal";
|
|
6
|
+
export * from "./badge";
|
|
7
|
+
export * from "./logo";
|
|
8
|
+
export * from "./form";
|
|
9
|
+
export * from "./chart";
|
|
10
|
+
export * from "./avatar";
|
|
11
|
+
export * from "./lottie";
|
|
12
|
+
export * from "./credit-card";
|
|
13
|
+
export * from "./block";
|
|
14
|
+
export type IComponentMap = typeof Types;
|
|
15
|
+
export type IComponentConfigMap = {
|
|
16
|
+
[K in keyof IComponentMap]: {
|
|
17
|
+
type: K;
|
|
18
|
+
props?: React.ComponentProps<IComponentMap[K]>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type IComponentConfig = IComponentConfigMap[keyof IComponentMap];
|
|
22
|
+
export type IComponentContent = Array<IComponentConfig | Array<IComponentConfig>>;
|
|
23
|
+
export interface IComponent {
|
|
24
|
+
className?: string;
|
|
25
|
+
content: IComponentContent;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import animations from "@components/types/lottie/animations";
|
|
2
|
+
interface IBase {
|
|
3
|
+
size?: number;
|
|
4
|
+
}
|
|
5
|
+
export type ILottie = (IBase & {
|
|
6
|
+
src: string;
|
|
7
|
+
animation?: never;
|
|
8
|
+
}) | (IBase & {
|
|
9
|
+
animation: keyof typeof animations;
|
|
10
|
+
src?: never;
|
|
11
|
+
});
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IButton } from "@interfaces";
|
|
3
|
+
export interface IModal {
|
|
4
|
+
toggle: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
header?: {
|
|
8
|
+
title: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
};
|
|
11
|
+
buttons?: Array<IButton>;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
position?: "center" | "right" | "left";
|
|
14
|
+
noCloseIcon?: boolean;
|
|
15
|
+
content?: any;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export * from "./paginate";
|
|
3
|
+
export interface ITableAction {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
position?: string;
|
|
6
|
+
function: (data?: any) => any;
|
|
7
|
+
icon?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ITableColumn {
|
|
12
|
+
name?: string;
|
|
13
|
+
style?: object;
|
|
14
|
+
action?: ITableAction;
|
|
15
|
+
}
|
|
16
|
+
export interface ITableRow {
|
|
17
|
+
actions?: Array<ITableAction>;
|
|
18
|
+
image?: any;
|
|
19
|
+
icon?: any;
|
|
20
|
+
style?: any;
|
|
21
|
+
mask?: any;
|
|
22
|
+
custom?: (data: any) => React.ReactNode;
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ITable {
|
|
26
|
+
content: Array<any>;
|
|
27
|
+
loading?: boolean | {
|
|
28
|
+
is?: boolean;
|
|
29
|
+
items?: Array<any>;
|
|
30
|
+
};
|
|
31
|
+
options: Array<{
|
|
32
|
+
column: ITableColumn | string;
|
|
33
|
+
row: ITableRow | string;
|
|
34
|
+
}>;
|
|
35
|
+
notFound?: {
|
|
36
|
+
title: string;
|
|
37
|
+
message: string;
|
|
38
|
+
};
|
|
39
|
+
paginate?: {
|
|
40
|
+
total: number;
|
|
41
|
+
page: {
|
|
42
|
+
value: number;
|
|
43
|
+
set: (value: number) => any;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|