@gustavo-valsechi/client 1.3.29 → 1.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +14 -3070
- package/dist/components/index.mjs +12 -3082
- package/dist/components/styles.js +3 -4
- package/dist/components/styles.mjs +3 -4
- package/dist/components/types/avatar/index.js +4 -62
- package/dist/components/types/avatar/index.mjs +3 -61
- package/dist/components/types/avatar/styles.js +2 -3
- package/dist/components/types/avatar/styles.mjs +2 -3
- package/dist/components/types/badge/index.js +5 -304
- package/dist/components/types/badge/index.mjs +5 -308
- package/dist/components/types/badge/styles.js +2 -3
- package/dist/components/types/badge/styles.mjs +2 -3
- package/dist/components/types/block/index.js +9 -3046
- package/dist/components/types/block/index.mjs +9 -3066
- package/dist/components/types/block/styles.js +3 -4
- package/dist/components/types/block/styles.mjs +3 -4
- package/dist/components/types/chart/index.js +13 -284
- package/dist/components/types/chart/index.mjs +13 -288
- package/dist/components/types/chart/styles.js +2 -3
- package/dist/components/types/chart/styles.mjs +2 -2
- package/dist/components/types/credit-card/assets/index.js +2 -3
- package/dist/components/types/credit-card/assets/index.mjs +2 -2
- package/dist/components/types/credit-card/card/index.js +9 -681
- package/dist/components/types/credit-card/card/index.mjs +7 -701
- package/dist/components/types/credit-card/card/styles.js +2 -3
- package/dist/components/types/credit-card/card/styles.mjs +2 -3
- package/dist/components/types/credit-card/functions/index.js +4 -44
- package/dist/components/types/credit-card/functions/index.mjs +3 -41
- package/dist/components/types/credit-card/functions/styles.js +2 -3
- package/dist/components/types/credit-card/functions/styles.mjs +2 -3
- package/dist/components/types/credit-card/index.js +7 -803
- package/dist/components/types/credit-card/index.mjs +7 -823
- package/dist/components/types/credit-card/styles.js +2 -3
- package/dist/components/types/credit-card/styles.mjs +2 -3
- package/dist/components/types/credit-card/tools/index.js +7 -527
- package/dist/components/types/credit-card/tools/index.mjs +8 -550
- package/dist/components/types/form/index.js +24 -659
- package/dist/components/types/form/index.mjs +20 -655
- package/dist/components/types/form/styles.js +2 -3
- package/dist/components/types/form/styles.mjs +2 -3
- package/dist/components/types/form/types/button/index.js +7 -149
- package/dist/components/types/form/types/button/index.mjs +6 -146
- package/dist/components/types/form/types/button/loading/index.js +3 -104
- package/dist/components/types/form/types/button/loading/index.mjs +2 -91
- package/dist/components/types/form/types/button/loading/styles.js +2 -3
- package/dist/components/types/form/types/button/loading/styles.mjs +2 -3
- package/dist/components/types/form/types/button/styles.js +2 -3
- package/dist/components/types/form/types/button/styles.mjs +2 -3
- package/dist/components/types/form/types/datetime/index.js +7 -63
- package/dist/components/types/form/types/datetime/index.mjs +6 -60
- package/dist/components/types/form/types/datetime/styles.js +2 -3
- package/dist/components/types/form/types/datetime/styles.mjs +2 -3
- package/dist/components/types/form/types/file/index.js +9 -62
- package/dist/components/types/form/types/file/index.mjs +7 -50
- package/dist/components/types/form/types/file/styles.js +2 -3
- package/dist/components/types/form/types/file/styles.mjs +2 -3
- package/dist/components/types/form/types/index.js +16 -625
- package/dist/components/types/form/types/index.mjs +8 -601
- package/dist/components/types/form/types/input/index.js +10 -72
- package/dist/components/types/form/types/input/index.mjs +7 -69
- package/dist/components/types/form/types/input/styles.js +2 -3
- package/dist/components/types/form/types/input/styles.mjs +2 -3
- package/dist/components/types/form/types/label/index.js +3 -23
- package/dist/components/types/form/types/label/index.mjs +2 -10
- package/dist/components/types/form/types/label/styles.js +2 -3
- package/dist/components/types/form/types/label/styles.mjs +2 -3
- package/dist/components/types/form/types/select/index.js +11 -79
- package/dist/components/types/form/types/select/index.mjs +8 -76
- package/dist/components/types/form/types/select/styles.js +2 -3
- package/dist/components/types/form/types/select/styles.mjs +2 -3
- package/dist/components/types/form/types/textarea/index.js +7 -62
- package/dist/components/types/form/types/textarea/index.mjs +6 -59
- package/dist/components/types/form/types/textarea/styles.js +2 -3
- package/dist/components/types/form/types/textarea/styles.mjs +2 -3
- package/dist/components/types/index.js +24 -3072
- package/dist/components/types/index.mjs +12 -3093
- package/dist/components/types/loading/app/index.js +4 -132
- package/dist/components/types/loading/app/index.mjs +5 -121
- package/dist/components/types/loading/app/styles.js +2 -3
- package/dist/components/types/loading/app/styles.mjs +2 -3
- package/dist/components/types/loading/bar/index.js +3 -37
- package/dist/components/types/loading/bar/index.mjs +2 -24
- package/dist/components/types/loading/bar/styles.js +2 -3
- package/dist/components/types/loading/bar/styles.mjs +2 -3
- package/dist/components/types/loading/index.js +6 -173
- package/dist/components/types/loading/index.mjs +3 -154
- package/dist/components/types/logo/index.js +3 -35
- package/dist/components/types/logo/index.mjs +2 -22
- package/dist/components/types/logo/styles.js +2 -3
- package/dist/components/types/logo/styles.mjs +2 -3
- package/dist/components/types/lottie/animations/index.js +13 -8
- package/dist/components/types/lottie/animations/index.mjs +3 -5
- package/dist/components/types/lottie/index.js +7 -39
- package/dist/components/types/lottie/index.mjs +6 -36
- package/dist/components/types/lottie/styles.js +2 -3
- package/dist/components/types/lottie/styles.mjs +2 -3
- package/dist/components/types/modal/index.js +18 -2283
- package/dist/components/types/modal/index.mjs +18 -2309
- package/dist/components/types/modal/styles.js +2 -3
- package/dist/components/types/modal/styles.mjs +2 -3
- package/dist/components/types/table/index.js +45 -2955
- package/dist/components/types/table/index.mjs +40 -2983
- package/dist/components/types/table/modal/actions.js +4 -82
- package/dist/components/types/table/modal/actions.mjs +3 -78
- package/dist/components/types/table/modal/index.js +22 -3006
- package/dist/components/types/table/modal/index.mjs +19 -3033
- package/dist/components/types/table/modal/styles.js +2 -3
- package/dist/components/types/table/modal/styles.mjs +2 -3
- package/dist/components/types/table/paginate/index.js +4 -43
- package/dist/components/types/table/paginate/index.mjs +3 -40
- package/dist/components/types/table/paginate/styles.js +2 -3
- package/dist/components/types/table/paginate/styles.mjs +2 -3
- package/dist/components/types/table/styles.js +2 -3
- package/dist/components/types/table/styles.mjs +2 -3
- package/dist/contexts/icon/assets/brands/index.js +3 -4
- package/dist/contexts/icon/assets/brands/index.mjs +3 -10
- package/dist/contexts/icon/assets/index.js +17 -34
- package/dist/contexts/icon/assets/index.mjs +7 -38
- package/dist/contexts/icon/assets/regular/index.js +3 -4
- package/dist/contexts/icon/assets/regular/index.mjs +3 -10
- package/dist/contexts/icon/assets/solid/index.js +3 -4
- package/dist/contexts/icon/assets/solid/index.mjs +3 -10
- package/dist/contexts/icon/index.js +15 -217
- package/dist/contexts/icon/index.mjs +15 -223
- package/dist/contexts/icon/styles.js +2 -3
- package/dist/contexts/icon/styles.mjs +2 -2
- package/dist/contexts/index.js +10 -504
- package/dist/contexts/index.mjs +5 -486
- package/dist/contexts/modal/index.js +8 -16
- package/dist/contexts/modal/index.mjs +7 -15
- package/dist/contexts/modal/styles.js +2 -3
- package/dist/contexts/modal/styles.mjs +2 -2
- package/dist/contexts/theme/content.js +3 -4
- package/dist/contexts/theme/content.mjs +3 -3
- package/dist/contexts/theme/index.js +11 -178
- package/dist/contexts/theme/index.mjs +7 -164
- package/dist/contexts/theme/styles.js +2 -3
- package/dist/contexts/theme/styles.mjs +2 -2
- package/dist/contexts/tooltip/index.js +7 -51
- package/dist/contexts/tooltip/index.mjs +6 -50
- package/dist/contexts/tooltip/styles.js +2 -3
- package/dist/contexts/tooltip/styles.mjs +2 -2
- package/dist/index.js +9 -3325
- package/dist/index.mjs +5 -3312
- package/dist/interfaces/components/avatar/index.js +1 -2
- package/dist/interfaces/components/avatar/index.mjs +1 -0
- package/dist/interfaces/components/badge/index.js +1 -2
- package/dist/interfaces/components/badge/index.mjs +1 -0
- package/dist/interfaces/components/block/index.js +1 -2
- package/dist/interfaces/components/block/index.mjs +1 -0
- package/dist/interfaces/components/chart/index.js +1 -2
- package/dist/interfaces/components/chart/index.mjs +1 -0
- package/dist/interfaces/components/credit-card/index.js +1 -2
- package/dist/interfaces/components/credit-card/index.mjs +1 -0
- package/dist/interfaces/components/form/button/index.js +1 -2
- package/dist/interfaces/components/form/button/index.mjs +1 -0
- package/dist/interfaces/components/form/datetime/index.js +1 -2
- package/dist/interfaces/components/form/datetime/index.mjs +1 -0
- package/dist/interfaces/components/form/file/index.js +1 -2
- package/dist/interfaces/components/form/file/index.mjs +1 -0
- package/dist/interfaces/components/form/index.js +19 -2
- package/dist/interfaces/components/form/index.mjs +8 -0
- package/dist/interfaces/components/form/input/index.js +1 -2
- package/dist/interfaces/components/form/input/index.mjs +1 -0
- package/dist/interfaces/components/form/label/index.js +1 -2
- package/dist/interfaces/components/form/label/index.mjs +1 -0
- package/dist/interfaces/components/form/select/index.js +1 -2
- package/dist/interfaces/components/form/select/index.mjs +1 -0
- package/dist/interfaces/components/form/textarea/index.js +1 -2
- package/dist/interfaces/components/form/textarea/index.mjs +1 -0
- package/dist/interfaces/components/index.js +27 -2
- package/dist/interfaces/components/index.mjs +12 -0
- package/dist/interfaces/components/loading/app/index.js +1 -2
- package/dist/interfaces/components/loading/app/index.mjs +1 -0
- package/dist/interfaces/components/loading/bar/index.js +1 -2
- package/dist/interfaces/components/loading/bar/index.mjs +1 -0
- package/dist/interfaces/components/loading/index.js +9 -2
- package/dist/interfaces/components/loading/index.mjs +3 -0
- package/dist/interfaces/components/logo/index.js +1 -2
- package/dist/interfaces/components/logo/index.mjs +1 -0
- package/dist/interfaces/components/lottie/index.js +1 -2
- package/dist/interfaces/components/lottie/index.mjs +1 -0
- package/dist/interfaces/components/modal/index.js +1 -2
- package/dist/interfaces/components/modal/index.mjs +1 -0
- package/dist/interfaces/components/table/index.js +7 -2
- package/dist/interfaces/components/table/index.mjs +2 -0
- package/dist/interfaces/components/table/paginate/index.js +1 -2
- package/dist/interfaces/components/table/paginate/index.mjs +1 -0
- package/dist/interfaces/contexts/icon/index.js +1 -2
- package/dist/interfaces/contexts/icon/index.mjs +1 -0
- package/dist/interfaces/contexts/index.js +13 -2
- package/dist/interfaces/contexts/index.mjs +5 -0
- package/dist/interfaces/contexts/modal/index.js +1 -2
- package/dist/interfaces/contexts/modal/index.mjs +1 -0
- package/dist/interfaces/contexts/theme/index.js +1 -2
- package/dist/interfaces/contexts/theme/index.mjs +1 -0
- package/dist/interfaces/contexts/tooltip/index.js +1 -2
- package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
- package/dist/interfaces/index.js +9 -2
- package/dist/interfaces/index.mjs +3 -0
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
8
|
var __export = (target, all) => {
|
|
10
9
|
for (var name in all)
|
|
@@ -18,191 +17,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
17
|
}
|
|
19
18
|
return to;
|
|
20
19
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// contexts/theme/index.tsx
|
|
32
21
|
var theme_exports = {};
|
|
33
22
|
__export(theme_exports, {
|
|
34
23
|
ThemeProvider: () => ThemeProviderContainer,
|
|
35
24
|
useTheme: () => useTheme
|
|
36
25
|
});
|
|
37
26
|
module.exports = __toCommonJS(theme_exports);
|
|
38
|
-
var import_react = require("react");
|
|
39
|
-
var import_styled_components2 = require("styled-components");
|
|
40
|
-
|
|
41
|
-
// contexts/theme/styles.tsx
|
|
42
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
43
|
-
var Switcher = import_styled_components.default.div`
|
|
44
|
-
width: 3rem;
|
|
45
|
-
height: 1.5rem;
|
|
46
|
-
border-radius: 1rem;
|
|
47
|
-
border: 2px solid ${({ theme }) => theme.t05};
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
position: relative;
|
|
53
|
-
|
|
54
|
-
i {
|
|
55
|
-
color: ${({ theme }) => theme.t6};
|
|
56
|
-
position: absolute;
|
|
57
|
-
transform: translateY(-50%);
|
|
58
|
-
font-size: .9rem;
|
|
59
|
-
z-index: 0;
|
|
60
|
-
transition: ease .8s;
|
|
61
|
-
|
|
62
|
-
&:first-child {
|
|
63
|
-
left: .2rem;
|
|
64
|
-
top: 50%;
|
|
65
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:last-child {
|
|
69
|
-
right: .2rem;
|
|
70
|
-
top: 50%;
|
|
71
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.switcher {
|
|
76
|
-
width: 1rem;
|
|
77
|
-
height: 1rem;
|
|
78
|
-
border-radius: 1rem;
|
|
79
|
-
position: relative;
|
|
80
|
-
transition: ease .3s;
|
|
81
|
-
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
82
|
-
z-index: 1;
|
|
83
|
-
|
|
84
|
-
div {
|
|
85
|
-
width: 100%;
|
|
86
|
-
height: 100%;
|
|
87
|
-
background: ${({ theme }) => theme.primary};
|
|
88
|
-
border-radius: 1rem;
|
|
89
|
-
position: relative;
|
|
90
|
-
z-index: 2;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&:after {
|
|
94
|
-
content: "";
|
|
95
|
-
position: absolute;
|
|
96
|
-
width: 100%;
|
|
97
|
-
height: 100%;
|
|
98
|
-
border-radius: 1rem;
|
|
99
|
-
transform: scale(1.8);
|
|
100
|
-
background: ${({ theme }) => theme.t05};
|
|
101
|
-
top: 0;
|
|
102
|
-
left: 0;
|
|
103
|
-
z-index: 1;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&:before {
|
|
107
|
-
content: "";
|
|
108
|
-
position: absolute;
|
|
109
|
-
width: 100%;
|
|
110
|
-
height: 100%;
|
|
111
|
-
border-radius: 1rem;
|
|
112
|
-
transform: scale(3);
|
|
113
|
-
background: ${({ theme }) => theme.t05};
|
|
114
|
-
top: 0;
|
|
115
|
-
left: 0;
|
|
116
|
-
z-index: 0;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`;
|
|
120
|
-
|
|
121
|
-
// contexts/theme/content.tsx
|
|
122
|
-
var CommonTheme = {
|
|
123
|
-
secondary: "#5869da",
|
|
124
|
-
tertiary: "#629dfd33",
|
|
125
|
-
positive: "#65c965",
|
|
126
|
-
negative: "#FF334E",
|
|
127
|
-
mobileMaxWidth: "650px",
|
|
128
|
-
mobileMinWidth: "315px"
|
|
129
|
-
};
|
|
130
|
-
var Themes = {
|
|
131
|
-
light: {
|
|
132
|
-
primary: "#ffffff",
|
|
133
|
-
reverse: "#353535",
|
|
134
|
-
tooltip: "#f2f2f2",
|
|
135
|
-
t8: "#000000cc",
|
|
136
|
-
t7: "#000000b3",
|
|
137
|
-
t6: "#00000099",
|
|
138
|
-
t5: "#00000080",
|
|
139
|
-
t4: "#00000066",
|
|
140
|
-
t3: "#0000004d",
|
|
141
|
-
t2: "#00000033",
|
|
142
|
-
t1: "#0000001a",
|
|
143
|
-
t08: "#00000014",
|
|
144
|
-
t05: "#0000000d",
|
|
145
|
-
t03: "#00000007",
|
|
146
|
-
t02: "#00000005",
|
|
147
|
-
t01: "#00000002",
|
|
148
|
-
lgrad: `linear-gradient(
|
|
149
|
-
to right,
|
|
150
|
-
#dadef7 0%,
|
|
151
|
-
#dee2f8 5%,
|
|
152
|
-
#e2e5f9 10%,
|
|
153
|
-
#e6e9fa 20%,
|
|
154
|
-
#eaedfb 30%,
|
|
155
|
-
#eff0fb 60%,
|
|
156
|
-
#f3f4fc 80%,
|
|
157
|
-
#f7f8fd 90%,
|
|
158
|
-
#fbfbfe 100%
|
|
159
|
-
)`,
|
|
160
|
-
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
161
|
-
...CommonTheme
|
|
162
|
-
},
|
|
163
|
-
dark: {
|
|
164
|
-
primary: "#333333",
|
|
165
|
-
reverse: "#b45252",
|
|
166
|
-
tooltip: "#3d3d3d",
|
|
167
|
-
t8: "#ffffffcc",
|
|
168
|
-
t7: "#ffffffb3",
|
|
169
|
-
t6: "#ffffff99",
|
|
170
|
-
t5: "#ffffff80",
|
|
171
|
-
t4: "#ffffff66",
|
|
172
|
-
t3: "#ffffff4d",
|
|
173
|
-
t2: "#ffffff33",
|
|
174
|
-
t1: "#ffffff1a",
|
|
175
|
-
t08: "#ffffff14",
|
|
176
|
-
t05: "#ffffff0d",
|
|
177
|
-
t03: "#ffffff07",
|
|
178
|
-
t02: "#ffffff05",
|
|
179
|
-
t01: "#ffffff02",
|
|
180
|
-
lgrad: `linear-gradient(
|
|
181
|
-
to right,
|
|
182
|
-
#3d485c 0%,
|
|
183
|
-
#3c4657 5%,
|
|
184
|
-
#3b4353 10%,
|
|
185
|
-
#3a414e 20%,
|
|
186
|
-
#393f4a 30%,
|
|
187
|
-
#373c45 60%,
|
|
188
|
-
#363a41 80%,
|
|
189
|
-
#35383c 90%,
|
|
190
|
-
#343538 100%
|
|
191
|
-
)`,
|
|
192
|
-
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
193
|
-
...CommonTheme
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
// contexts/theme/index.tsx
|
|
198
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
199
|
-
var
|
|
200
|
-
var
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_styled_components = require("styled-components");
|
|
30
|
+
var import_styles = require("./styles");
|
|
31
|
+
var import_content = require("./content");
|
|
32
|
+
const ThemeContext = (0, import_react.createContext)({});
|
|
33
|
+
const ThemeProviderContainer = (props) => {
|
|
201
34
|
const [theme, setTheme] = (0, import_react.useState)("light");
|
|
202
35
|
const [defaultTheme] = (0, import_react.useState)("light");
|
|
203
36
|
const SwitcherComponent = () => {
|
|
204
37
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
205
|
-
Switcher,
|
|
38
|
+
import_styles.Switcher,
|
|
206
39
|
{
|
|
207
40
|
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
208
41
|
"data-theme": theme || defaultTheme,
|
|
@@ -220,14 +53,14 @@ var ThemeProviderContainer = (props) => {
|
|
|
220
53
|
value: {
|
|
221
54
|
theme: props.theme || defaultTheme,
|
|
222
55
|
setTheme,
|
|
223
|
-
content: Themes[props.theme || defaultTheme],
|
|
56
|
+
content: import_content.Themes[props.theme || defaultTheme],
|
|
224
57
|
Switcher: SwitcherComponent
|
|
225
58
|
},
|
|
226
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, { theme: import_content.Themes[props.theme || defaultTheme], children: props.children })
|
|
227
60
|
}
|
|
228
61
|
);
|
|
229
62
|
};
|
|
230
|
-
|
|
63
|
+
const useTheme = () => (0, import_react.useContext)(ThemeContext);
|
|
231
64
|
// Annotate the CommonJS export names for ESM import in node:
|
|
232
65
|
0 && (module.exports = {
|
|
233
66
|
ThemeProvider,
|
|
@@ -1,169 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { createContext, useContext, useState } from "react";
|
|
5
5
|
import { ThemeProvider } from "styled-components";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
width: 3rem;
|
|
11
|
-
height: 1.5rem;
|
|
12
|
-
border-radius: 1rem;
|
|
13
|
-
border: 2px solid ${({ theme }) => theme.t05};
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
position: relative;
|
|
19
|
-
|
|
20
|
-
i {
|
|
21
|
-
color: ${({ theme }) => theme.t6};
|
|
22
|
-
position: absolute;
|
|
23
|
-
transform: translateY(-50%);
|
|
24
|
-
font-size: .9rem;
|
|
25
|
-
z-index: 0;
|
|
26
|
-
transition: ease .8s;
|
|
27
|
-
|
|
28
|
-
&:first-child {
|
|
29
|
-
left: .2rem;
|
|
30
|
-
top: 50%;
|
|
31
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:last-child {
|
|
35
|
-
right: .2rem;
|
|
36
|
-
top: 50%;
|
|
37
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.switcher {
|
|
42
|
-
width: 1rem;
|
|
43
|
-
height: 1rem;
|
|
44
|
-
border-radius: 1rem;
|
|
45
|
-
position: relative;
|
|
46
|
-
transition: ease .3s;
|
|
47
|
-
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
48
|
-
z-index: 1;
|
|
49
|
-
|
|
50
|
-
div {
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 100%;
|
|
53
|
-
background: ${({ theme }) => theme.primary};
|
|
54
|
-
border-radius: 1rem;
|
|
55
|
-
position: relative;
|
|
56
|
-
z-index: 2;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:after {
|
|
60
|
-
content: "";
|
|
61
|
-
position: absolute;
|
|
62
|
-
width: 100%;
|
|
63
|
-
height: 100%;
|
|
64
|
-
border-radius: 1rem;
|
|
65
|
-
transform: scale(1.8);
|
|
66
|
-
background: ${({ theme }) => theme.t05};
|
|
67
|
-
top: 0;
|
|
68
|
-
left: 0;
|
|
69
|
-
z-index: 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&:before {
|
|
73
|
-
content: "";
|
|
74
|
-
position: absolute;
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 100%;
|
|
77
|
-
border-radius: 1rem;
|
|
78
|
-
transform: scale(3);
|
|
79
|
-
background: ${({ theme }) => theme.t05};
|
|
80
|
-
top: 0;
|
|
81
|
-
left: 0;
|
|
82
|
-
z-index: 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
// contexts/theme/content.tsx
|
|
88
|
-
var CommonTheme = {
|
|
89
|
-
secondary: "#5869da",
|
|
90
|
-
tertiary: "#629dfd33",
|
|
91
|
-
positive: "#65c965",
|
|
92
|
-
negative: "#FF334E",
|
|
93
|
-
mobileMaxWidth: "650px",
|
|
94
|
-
mobileMinWidth: "315px"
|
|
95
|
-
};
|
|
96
|
-
var Themes = {
|
|
97
|
-
light: {
|
|
98
|
-
primary: "#ffffff",
|
|
99
|
-
reverse: "#353535",
|
|
100
|
-
tooltip: "#f2f2f2",
|
|
101
|
-
t8: "#000000cc",
|
|
102
|
-
t7: "#000000b3",
|
|
103
|
-
t6: "#00000099",
|
|
104
|
-
t5: "#00000080",
|
|
105
|
-
t4: "#00000066",
|
|
106
|
-
t3: "#0000004d",
|
|
107
|
-
t2: "#00000033",
|
|
108
|
-
t1: "#0000001a",
|
|
109
|
-
t08: "#00000014",
|
|
110
|
-
t05: "#0000000d",
|
|
111
|
-
t03: "#00000007",
|
|
112
|
-
t02: "#00000005",
|
|
113
|
-
t01: "#00000002",
|
|
114
|
-
lgrad: `linear-gradient(
|
|
115
|
-
to right,
|
|
116
|
-
#dadef7 0%,
|
|
117
|
-
#dee2f8 5%,
|
|
118
|
-
#e2e5f9 10%,
|
|
119
|
-
#e6e9fa 20%,
|
|
120
|
-
#eaedfb 30%,
|
|
121
|
-
#eff0fb 60%,
|
|
122
|
-
#f3f4fc 80%,
|
|
123
|
-
#f7f8fd 90%,
|
|
124
|
-
#fbfbfe 100%
|
|
125
|
-
)`,
|
|
126
|
-
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
127
|
-
...CommonTheme
|
|
128
|
-
},
|
|
129
|
-
dark: {
|
|
130
|
-
primary: "#333333",
|
|
131
|
-
reverse: "#b45252",
|
|
132
|
-
tooltip: "#3d3d3d",
|
|
133
|
-
t8: "#ffffffcc",
|
|
134
|
-
t7: "#ffffffb3",
|
|
135
|
-
t6: "#ffffff99",
|
|
136
|
-
t5: "#ffffff80",
|
|
137
|
-
t4: "#ffffff66",
|
|
138
|
-
t3: "#ffffff4d",
|
|
139
|
-
t2: "#ffffff33",
|
|
140
|
-
t1: "#ffffff1a",
|
|
141
|
-
t08: "#ffffff14",
|
|
142
|
-
t05: "#ffffff0d",
|
|
143
|
-
t03: "#ffffff07",
|
|
144
|
-
t02: "#ffffff05",
|
|
145
|
-
t01: "#ffffff02",
|
|
146
|
-
lgrad: `linear-gradient(
|
|
147
|
-
to right,
|
|
148
|
-
#3d485c 0%,
|
|
149
|
-
#3c4657 5%,
|
|
150
|
-
#3b4353 10%,
|
|
151
|
-
#3a414e 20%,
|
|
152
|
-
#393f4a 30%,
|
|
153
|
-
#373c45 60%,
|
|
154
|
-
#363a41 80%,
|
|
155
|
-
#35383c 90%,
|
|
156
|
-
#343538 100%
|
|
157
|
-
)`,
|
|
158
|
-
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
159
|
-
...CommonTheme
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
// contexts/theme/index.tsx
|
|
164
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
165
|
-
var ThemeContext = createContext({});
|
|
166
|
-
var ThemeProviderContainer = (props) => {
|
|
6
|
+
import { Switcher } from "./styles";
|
|
7
|
+
import { Themes } from "./content";
|
|
8
|
+
const ThemeContext = createContext({});
|
|
9
|
+
const ThemeProviderContainer = (props) => {
|
|
167
10
|
const [theme, setTheme] = useState("light");
|
|
168
11
|
const [defaultTheme] = useState("light");
|
|
169
12
|
const SwitcherComponent = () => {
|
|
@@ -193,7 +36,7 @@ var ThemeProviderContainer = (props) => {
|
|
|
193
36
|
}
|
|
194
37
|
);
|
|
195
38
|
};
|
|
196
|
-
|
|
39
|
+
const useTheme = () => useContext(ThemeContext);
|
|
197
40
|
export {
|
|
198
41
|
ThemeProviderContainer as ThemeProvider,
|
|
199
42
|
useTheme
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -26,15 +27,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
27
|
mod
|
|
27
28
|
));
|
|
28
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// contexts/theme/styles.tsx
|
|
31
30
|
var styles_exports = {};
|
|
32
31
|
__export(styles_exports, {
|
|
33
32
|
Switcher: () => Switcher
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(styles_exports);
|
|
36
35
|
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
-
|
|
36
|
+
const Switcher = import_styled_components.default.div`
|
|
38
37
|
width: 3rem;
|
|
39
38
|
height: 1.5rem;
|
|
40
39
|
border-radius: 1rem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
"use client";
|
|
3
4
|
var __create = Object.create;
|
|
@@ -27,63 +28,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
28
|
mod
|
|
28
29
|
));
|
|
29
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// contexts/tooltip/index.tsx
|
|
32
31
|
var tooltip_exports = {};
|
|
33
32
|
__export(tooltip_exports, {
|
|
34
33
|
TooltipProvider: () => TooltipProviderContainer,
|
|
35
34
|
useTooltip: () => useTooltip
|
|
36
35
|
});
|
|
37
36
|
module.exports = __toCommonJS(tooltip_exports);
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
38
|
var import_react = require("react");
|
|
39
|
-
|
|
40
|
-
// contexts/tooltip/styles.tsx
|
|
41
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
42
|
-
var Tooltip = import_styled_components.default.div`
|
|
43
|
-
position: fixed;
|
|
44
|
-
background: ${({ theme }) => theme.tooltip};
|
|
45
|
-
color: ${({ theme }) => theme.t6};
|
|
46
|
-
font-size: .8rem;
|
|
47
|
-
font-weight: 500;
|
|
48
|
-
text-align: center;
|
|
49
|
-
padding: .3rem .8rem;
|
|
50
|
-
border-radius: 5px;
|
|
51
|
-
transform: translateX(-50%);
|
|
52
|
-
z-index: 10;
|
|
53
|
-
border: 1px solid ${({ theme }) => theme.t05};
|
|
54
|
-
|
|
55
|
-
&::before {
|
|
56
|
-
content: "";
|
|
57
|
-
position: absolute;
|
|
58
|
-
bottom: -9px;
|
|
59
|
-
left: 50%;
|
|
60
|
-
transform: translateX(-50%);
|
|
61
|
-
width: 0;
|
|
62
|
-
height: 0;
|
|
63
|
-
border-left: 8px solid transparent;
|
|
64
|
-
border-right: 8px solid transparent;
|
|
65
|
-
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&::after {
|
|
69
|
-
content: "";
|
|
70
|
-
position: absolute;
|
|
71
|
-
bottom: -8px;
|
|
72
|
-
left: 50%;
|
|
73
|
-
transform: translateX(-50%);
|
|
74
|
-
width: 0;
|
|
75
|
-
height: 0;
|
|
76
|
-
border-left: 8px solid transparent;
|
|
77
|
-
border-right: 8px solid transparent;
|
|
78
|
-
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
79
|
-
}
|
|
80
|
-
`;
|
|
81
|
-
|
|
82
|
-
// contexts/tooltip/index.tsx
|
|
39
|
+
var import_styles = require("./styles");
|
|
83
40
|
var import_lodash = __toESM(require("lodash"));
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var TooltipProviderContainer = ({ children }) => {
|
|
41
|
+
const TooltipContext = (0, import_react.createContext)({});
|
|
42
|
+
const TooltipProviderContainer = ({ children }) => {
|
|
87
43
|
const [tooltips, setTooltips] = (0, import_react.useState)([]);
|
|
88
44
|
const getContent = (target) => {
|
|
89
45
|
var _a;
|
|
@@ -129,7 +85,7 @@ var TooltipProviderContainer = ({ children }) => {
|
|
|
129
85
|
import_lodash.default.map(
|
|
130
86
|
tooltips,
|
|
131
87
|
(data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
-
Tooltip,
|
|
88
|
+
import_styles.Tooltip,
|
|
133
89
|
{
|
|
134
90
|
style: {
|
|
135
91
|
top: data.top,
|
|
@@ -143,7 +99,7 @@ var TooltipProviderContainer = ({ children }) => {
|
|
|
143
99
|
children
|
|
144
100
|
] });
|
|
145
101
|
};
|
|
146
|
-
|
|
102
|
+
const useTooltip = () => (0, import_react.useContext)(TooltipContext);
|
|
147
103
|
// Annotate the CommonJS export names for ESM import in node:
|
|
148
104
|
0 && (module.exports = {
|
|
149
105
|
TooltipProvider,
|
|
@@ -1,55 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { createContext, useContext, useEffect, useState } from "react";
|
|
5
|
-
|
|
6
|
-
// contexts/tooltip/styles.tsx
|
|
7
|
-
import styled from "styled-components";
|
|
8
|
-
var Tooltip = styled.div`
|
|
9
|
-
position: fixed;
|
|
10
|
-
background: ${({ theme }) => theme.tooltip};
|
|
11
|
-
color: ${({ theme }) => theme.t6};
|
|
12
|
-
font-size: .8rem;
|
|
13
|
-
font-weight: 500;
|
|
14
|
-
text-align: center;
|
|
15
|
-
padding: .3rem .8rem;
|
|
16
|
-
border-radius: 5px;
|
|
17
|
-
transform: translateX(-50%);
|
|
18
|
-
z-index: 10;
|
|
19
|
-
border: 1px solid ${({ theme }) => theme.t05};
|
|
20
|
-
|
|
21
|
-
&::before {
|
|
22
|
-
content: "";
|
|
23
|
-
position: absolute;
|
|
24
|
-
bottom: -9px;
|
|
25
|
-
left: 50%;
|
|
26
|
-
transform: translateX(-50%);
|
|
27
|
-
width: 0;
|
|
28
|
-
height: 0;
|
|
29
|
-
border-left: 8px solid transparent;
|
|
30
|
-
border-right: 8px solid transparent;
|
|
31
|
-
border-top: 8px solid ${({ theme }) => theme.t05};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::after {
|
|
35
|
-
content: "";
|
|
36
|
-
position: absolute;
|
|
37
|
-
bottom: -8px;
|
|
38
|
-
left: 50%;
|
|
39
|
-
transform: translateX(-50%);
|
|
40
|
-
width: 0;
|
|
41
|
-
height: 0;
|
|
42
|
-
border-left: 8px solid transparent;
|
|
43
|
-
border-right: 8px solid transparent;
|
|
44
|
-
border-top: 8px solid ${({ theme }) => theme.tooltip};
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
// contexts/tooltip/index.tsx
|
|
5
|
+
import { Tooltip } from "./styles";
|
|
49
6
|
import _ from "lodash";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var TooltipProviderContainer = ({ children }) => {
|
|
7
|
+
const TooltipContext = createContext({});
|
|
8
|
+
const TooltipProviderContainer = ({ children }) => {
|
|
53
9
|
const [tooltips, setTooltips] = useState([]);
|
|
54
10
|
const getContent = (target) => {
|
|
55
11
|
var _a;
|
|
@@ -109,7 +65,7 @@ var TooltipProviderContainer = ({ children }) => {
|
|
|
109
65
|
children
|
|
110
66
|
] });
|
|
111
67
|
};
|
|
112
|
-
|
|
68
|
+
const useTooltip = () => useContext(TooltipContext);
|
|
113
69
|
export {
|
|
114
70
|
TooltipProviderContainer as TooltipProvider,
|
|
115
71
|
useTooltip
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -26,15 +27,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
27
|
mod
|
|
27
28
|
));
|
|
28
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// contexts/tooltip/styles.tsx
|
|
31
30
|
var styles_exports = {};
|
|
32
31
|
__export(styles_exports, {
|
|
33
32
|
Tooltip: () => Tooltip
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(styles_exports);
|
|
36
35
|
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
-
|
|
36
|
+
const Tooltip = import_styled_components.default.div`
|
|
38
37
|
position: fixed;
|
|
39
38
|
background: ${({ theme }) => theme.tooltip};
|
|
40
39
|
color: ${({ theme }) => theme.t6};
|