@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,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
"use client";
|
|
3
4
|
var __create = Object.create;
|
|
@@ -27,229 +28,26 @@ 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/icon/index.tsx
|
|
32
31
|
var icon_exports = {};
|
|
33
32
|
__export(icon_exports, {
|
|
34
33
|
IconProvider: () => IconProviderContainer,
|
|
35
34
|
useIcon: () => useIcon
|
|
36
35
|
});
|
|
37
36
|
module.exports = __toCommonJS(icon_exports);
|
|
38
|
-
var import_react2 = require("react");
|
|
39
|
-
|
|
40
|
-
// contexts/theme/index.tsx
|
|
41
|
-
var import_react = require("react");
|
|
42
|
-
var import_styled_components2 = require("styled-components");
|
|
43
|
-
|
|
44
|
-
// contexts/theme/styles.tsx
|
|
45
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
46
|
-
var Switcher = import_styled_components.default.div`
|
|
47
|
-
width: 3rem;
|
|
48
|
-
height: 1.5rem;
|
|
49
|
-
border-radius: 1rem;
|
|
50
|
-
border: 2px solid ${({ theme }) => theme.t05};
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
position: relative;
|
|
56
|
-
|
|
57
|
-
i {
|
|
58
|
-
color: ${({ theme }) => theme.t6};
|
|
59
|
-
position: absolute;
|
|
60
|
-
transform: translateY(-50%);
|
|
61
|
-
font-size: .9rem;
|
|
62
|
-
z-index: 0;
|
|
63
|
-
transition: ease .8s;
|
|
64
|
-
|
|
65
|
-
&:first-child {
|
|
66
|
-
left: .2rem;
|
|
67
|
-
top: 50%;
|
|
68
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:last-child {
|
|
72
|
-
right: .2rem;
|
|
73
|
-
top: 50%;
|
|
74
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.switcher {
|
|
79
|
-
width: 1rem;
|
|
80
|
-
height: 1rem;
|
|
81
|
-
border-radius: 1rem;
|
|
82
|
-
position: relative;
|
|
83
|
-
transition: ease .3s;
|
|
84
|
-
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
85
|
-
z-index: 1;
|
|
86
|
-
|
|
87
|
-
div {
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 100%;
|
|
90
|
-
background: ${({ theme }) => theme.primary};
|
|
91
|
-
border-radius: 1rem;
|
|
92
|
-
position: relative;
|
|
93
|
-
z-index: 2;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:after {
|
|
97
|
-
content: "";
|
|
98
|
-
position: absolute;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
|
-
border-radius: 1rem;
|
|
102
|
-
transform: scale(1.8);
|
|
103
|
-
background: ${({ theme }) => theme.t05};
|
|
104
|
-
top: 0;
|
|
105
|
-
left: 0;
|
|
106
|
-
z-index: 1;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:before {
|
|
110
|
-
content: "";
|
|
111
|
-
position: absolute;
|
|
112
|
-
width: 100%;
|
|
113
|
-
height: 100%;
|
|
114
|
-
border-radius: 1rem;
|
|
115
|
-
transform: scale(3);
|
|
116
|
-
background: ${({ theme }) => theme.t05};
|
|
117
|
-
top: 0;
|
|
118
|
-
left: 0;
|
|
119
|
-
z-index: 0;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
`;
|
|
123
|
-
|
|
124
|
-
// contexts/theme/content.tsx
|
|
125
|
-
var CommonTheme = {
|
|
126
|
-
secondary: "#5869da",
|
|
127
|
-
tertiary: "#629dfd33",
|
|
128
|
-
positive: "#65c965",
|
|
129
|
-
negative: "#FF334E",
|
|
130
|
-
mobileMaxWidth: "650px",
|
|
131
|
-
mobileMinWidth: "315px"
|
|
132
|
-
};
|
|
133
|
-
var Themes = {
|
|
134
|
-
light: {
|
|
135
|
-
primary: "#ffffff",
|
|
136
|
-
reverse: "#353535",
|
|
137
|
-
tooltip: "#f2f2f2",
|
|
138
|
-
t8: "#000000cc",
|
|
139
|
-
t7: "#000000b3",
|
|
140
|
-
t6: "#00000099",
|
|
141
|
-
t5: "#00000080",
|
|
142
|
-
t4: "#00000066",
|
|
143
|
-
t3: "#0000004d",
|
|
144
|
-
t2: "#00000033",
|
|
145
|
-
t1: "#0000001a",
|
|
146
|
-
t08: "#00000014",
|
|
147
|
-
t05: "#0000000d",
|
|
148
|
-
t03: "#00000007",
|
|
149
|
-
t02: "#00000005",
|
|
150
|
-
t01: "#00000002",
|
|
151
|
-
lgrad: `linear-gradient(
|
|
152
|
-
to right,
|
|
153
|
-
#dadef7 0%,
|
|
154
|
-
#dee2f8 5%,
|
|
155
|
-
#e2e5f9 10%,
|
|
156
|
-
#e6e9fa 20%,
|
|
157
|
-
#eaedfb 30%,
|
|
158
|
-
#eff0fb 60%,
|
|
159
|
-
#f3f4fc 80%,
|
|
160
|
-
#f7f8fd 90%,
|
|
161
|
-
#fbfbfe 100%
|
|
162
|
-
)`,
|
|
163
|
-
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
164
|
-
...CommonTheme
|
|
165
|
-
},
|
|
166
|
-
dark: {
|
|
167
|
-
primary: "#333333",
|
|
168
|
-
reverse: "#b45252",
|
|
169
|
-
tooltip: "#3d3d3d",
|
|
170
|
-
t8: "#ffffffcc",
|
|
171
|
-
t7: "#ffffffb3",
|
|
172
|
-
t6: "#ffffff99",
|
|
173
|
-
t5: "#ffffff80",
|
|
174
|
-
t4: "#ffffff66",
|
|
175
|
-
t3: "#ffffff4d",
|
|
176
|
-
t2: "#ffffff33",
|
|
177
|
-
t1: "#ffffff1a",
|
|
178
|
-
t08: "#ffffff14",
|
|
179
|
-
t05: "#ffffff0d",
|
|
180
|
-
t03: "#ffffff07",
|
|
181
|
-
t02: "#ffffff05",
|
|
182
|
-
t01: "#ffffff02",
|
|
183
|
-
lgrad: `linear-gradient(
|
|
184
|
-
to right,
|
|
185
|
-
#3d485c 0%,
|
|
186
|
-
#3c4657 5%,
|
|
187
|
-
#3b4353 10%,
|
|
188
|
-
#3a414e 20%,
|
|
189
|
-
#393f4a 30%,
|
|
190
|
-
#373c45 60%,
|
|
191
|
-
#363a41 80%,
|
|
192
|
-
#35383c 90%,
|
|
193
|
-
#343538 100%
|
|
194
|
-
)`,
|
|
195
|
-
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
196
|
-
...CommonTheme
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
// contexts/theme/index.tsx
|
|
201
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
202
|
-
var
|
|
203
|
-
var
|
|
204
|
-
|
|
205
|
-
// contexts/icon/index.tsx
|
|
38
|
+
var import_react = require("react");
|
|
39
|
+
var import_theme = require("../theme");
|
|
206
40
|
var import_lodash = __toESM(require("lodash"));
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
});
|
|
215
|
-
var brands_default = brands;
|
|
216
|
-
|
|
217
|
-
// contexts/icon/assets/regular/index.tsx
|
|
218
|
-
var req2 = require.context("./", false, /\.svg$/);
|
|
219
|
-
var regular = {};
|
|
220
|
-
req2.keys().forEach((key) => {
|
|
221
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
222
|
-
regular[name] = req2(key).default;
|
|
223
|
-
});
|
|
224
|
-
var regular_default = regular;
|
|
225
|
-
|
|
226
|
-
// contexts/icon/assets/solid/index.tsx
|
|
227
|
-
var req3 = require.context("./", false, /\.svg$/);
|
|
228
|
-
var solid = {};
|
|
229
|
-
req3.keys().forEach((key) => {
|
|
230
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
231
|
-
solid[name] = req3(key).default;
|
|
232
|
-
});
|
|
233
|
-
var solid_default = solid;
|
|
234
|
-
|
|
235
|
-
// contexts/icon/assets/index.tsx
|
|
236
|
-
var assets_default = {
|
|
237
|
-
brands: brands_default,
|
|
238
|
-
regular: regular_default,
|
|
239
|
-
solid: solid_default
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
// contexts/icon/index.tsx
|
|
243
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
244
|
-
var IconContext = (0, import_react2.createContext)({});
|
|
245
|
-
var IconProviderContainer = ({ children }) => {
|
|
246
|
-
const { content } = useTheme();
|
|
247
|
-
const [isClient, setIsClient] = (0, import_react2.useState)(false);
|
|
248
|
-
const [matches, setMatches] = (0, import_react2.useState)(0);
|
|
249
|
-
(0, import_react2.useEffect)(() => {
|
|
41
|
+
var import_assets = __toESM(require("./assets"));
|
|
42
|
+
const IconContext = (0, import_react.createContext)({});
|
|
43
|
+
const IconProviderContainer = ({ children }) => {
|
|
44
|
+
const { content } = (0, import_theme.useTheme)();
|
|
45
|
+
const [isClient, setIsClient] = (0, import_react.useState)(false);
|
|
46
|
+
const [matches, setMatches] = (0, import_react.useState)(0);
|
|
47
|
+
(0, import_react.useEffect)(() => {
|
|
250
48
|
setIsClient(true);
|
|
251
49
|
}, []);
|
|
252
|
-
(0,
|
|
50
|
+
(0, import_react.useEffect)(() => {
|
|
253
51
|
const firstMediaQuery = window.matchMedia(`(max-width: ${content.mobileMaxWidth})`);
|
|
254
52
|
const secoundMediaQuery = window.matchMedia(`(max-width: ${content.mobileMinWidth})`);
|
|
255
53
|
const firstHandler = (event) => setMatches(event.matches ? 1 : 0);
|
|
@@ -263,7 +61,7 @@ var IconProviderContainer = ({ children }) => {
|
|
|
263
61
|
secoundMediaQuery.removeEventListener("change", secoundHandler);
|
|
264
62
|
};
|
|
265
63
|
}, []);
|
|
266
|
-
(0,
|
|
64
|
+
(0, import_react.useEffect)(() => {
|
|
267
65
|
if (!isClient) return;
|
|
268
66
|
const processElement = (element) => {
|
|
269
67
|
var _a, _b, _c, _d, _e;
|
|
@@ -271,7 +69,7 @@ var IconProviderContainer = ({ children }) => {
|
|
|
271
69
|
if (!name) return;
|
|
272
70
|
const icon = import_lodash.default.split(import_lodash.default.replace(name, /fa-/g, ""), " ");
|
|
273
71
|
if (!icon.length) return;
|
|
274
|
-
let svg = (_d = (_c = (_a =
|
|
72
|
+
let svg = (_d = (_c = (_a = import_assets.default[icon[0]]) == null ? void 0 : _a[icon[1]]) != null ? _c : (_b = import_assets.default["solid"]) == null ? void 0 : _b[icon[0]]) != null ? _d : "";
|
|
275
73
|
if (!svg) return;
|
|
276
74
|
svg = svg.replace(/fill=".*?"/g, 'fill="currentColor"');
|
|
277
75
|
const styles = window.getComputedStyle(element);
|
|
@@ -299,9 +97,9 @@ var IconProviderContainer = ({ children }) => {
|
|
|
299
97
|
});
|
|
300
98
|
return () => observer.disconnect();
|
|
301
99
|
}, [isClient, matches]);
|
|
302
|
-
return /* @__PURE__ */ (0,
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconContext.Provider, { value: {}, children });
|
|
303
101
|
};
|
|
304
|
-
|
|
102
|
+
const useIcon = () => (0, import_react.useContext)(IconContext);
|
|
305
103
|
// Annotate the CommonJS export names for ESM import in node:
|
|
306
104
|
0 && (module.exports = {
|
|
307
105
|
IconProvider,
|
|
@@ -1,227 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// contexts/icon/index.tsx
|
|
10
|
-
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect2, useState as useState2 } from "react";
|
|
11
|
-
|
|
12
|
-
// contexts/theme/index.tsx
|
|
13
|
-
import { createContext, useContext, useState } from "react";
|
|
14
|
-
import { ThemeProvider } from "styled-components";
|
|
15
|
-
|
|
16
|
-
// contexts/theme/styles.tsx
|
|
17
|
-
import styled from "styled-components";
|
|
18
|
-
var Switcher = styled.div`
|
|
19
|
-
width: 3rem;
|
|
20
|
-
height: 1.5rem;
|
|
21
|
-
border-radius: 1rem;
|
|
22
|
-
border: 2px solid ${({ theme }) => theme.t05};
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
position: relative;
|
|
28
|
-
|
|
29
|
-
i {
|
|
30
|
-
color: ${({ theme }) => theme.t6};
|
|
31
|
-
position: absolute;
|
|
32
|
-
transform: translateY(-50%);
|
|
33
|
-
font-size: .9rem;
|
|
34
|
-
z-index: 0;
|
|
35
|
-
transition: ease .8s;
|
|
36
|
-
|
|
37
|
-
&:first-child {
|
|
38
|
-
left: .2rem;
|
|
39
|
-
top: 50%;
|
|
40
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:last-child {
|
|
44
|
-
right: .2rem;
|
|
45
|
-
top: 50%;
|
|
46
|
-
opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.switcher {
|
|
51
|
-
width: 1rem;
|
|
52
|
-
height: 1rem;
|
|
53
|
-
border-radius: 1rem;
|
|
54
|
-
position: relative;
|
|
55
|
-
transition: ease .3s;
|
|
56
|
-
transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
|
|
57
|
-
z-index: 1;
|
|
58
|
-
|
|
59
|
-
div {
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 100%;
|
|
62
|
-
background: ${({ theme }) => theme.primary};
|
|
63
|
-
border-radius: 1rem;
|
|
64
|
-
position: relative;
|
|
65
|
-
z-index: 2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:after {
|
|
69
|
-
content: "";
|
|
70
|
-
position: absolute;
|
|
71
|
-
width: 100%;
|
|
72
|
-
height: 100%;
|
|
73
|
-
border-radius: 1rem;
|
|
74
|
-
transform: scale(1.8);
|
|
75
|
-
background: ${({ theme }) => theme.t05};
|
|
76
|
-
top: 0;
|
|
77
|
-
left: 0;
|
|
78
|
-
z-index: 1;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:before {
|
|
82
|
-
content: "";
|
|
83
|
-
position: absolute;
|
|
84
|
-
width: 100%;
|
|
85
|
-
height: 100%;
|
|
86
|
-
border-radius: 1rem;
|
|
87
|
-
transform: scale(3);
|
|
88
|
-
background: ${({ theme }) => theme.t05};
|
|
89
|
-
top: 0;
|
|
90
|
-
left: 0;
|
|
91
|
-
z-index: 0;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
// contexts/theme/content.tsx
|
|
97
|
-
var CommonTheme = {
|
|
98
|
-
secondary: "#5869da",
|
|
99
|
-
tertiary: "#629dfd33",
|
|
100
|
-
positive: "#65c965",
|
|
101
|
-
negative: "#FF334E",
|
|
102
|
-
mobileMaxWidth: "650px",
|
|
103
|
-
mobileMinWidth: "315px"
|
|
104
|
-
};
|
|
105
|
-
var Themes = {
|
|
106
|
-
light: {
|
|
107
|
-
primary: "#ffffff",
|
|
108
|
-
reverse: "#353535",
|
|
109
|
-
tooltip: "#f2f2f2",
|
|
110
|
-
t8: "#000000cc",
|
|
111
|
-
t7: "#000000b3",
|
|
112
|
-
t6: "#00000099",
|
|
113
|
-
t5: "#00000080",
|
|
114
|
-
t4: "#00000066",
|
|
115
|
-
t3: "#0000004d",
|
|
116
|
-
t2: "#00000033",
|
|
117
|
-
t1: "#0000001a",
|
|
118
|
-
t08: "#00000014",
|
|
119
|
-
t05: "#0000000d",
|
|
120
|
-
t03: "#00000007",
|
|
121
|
-
t02: "#00000005",
|
|
122
|
-
t01: "#00000002",
|
|
123
|
-
lgrad: `linear-gradient(
|
|
124
|
-
to right,
|
|
125
|
-
#dadef7 0%,
|
|
126
|
-
#dee2f8 5%,
|
|
127
|
-
#e2e5f9 10%,
|
|
128
|
-
#e6e9fa 20%,
|
|
129
|
-
#eaedfb 30%,
|
|
130
|
-
#eff0fb 60%,
|
|
131
|
-
#f3f4fc 80%,
|
|
132
|
-
#f7f8fd 90%,
|
|
133
|
-
#fbfbfe 100%
|
|
134
|
-
)`,
|
|
135
|
-
maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
|
|
136
|
-
...CommonTheme
|
|
137
|
-
},
|
|
138
|
-
dark: {
|
|
139
|
-
primary: "#333333",
|
|
140
|
-
reverse: "#b45252",
|
|
141
|
-
tooltip: "#3d3d3d",
|
|
142
|
-
t8: "#ffffffcc",
|
|
143
|
-
t7: "#ffffffb3",
|
|
144
|
-
t6: "#ffffff99",
|
|
145
|
-
t5: "#ffffff80",
|
|
146
|
-
t4: "#ffffff66",
|
|
147
|
-
t3: "#ffffff4d",
|
|
148
|
-
t2: "#ffffff33",
|
|
149
|
-
t1: "#ffffff1a",
|
|
150
|
-
t08: "#ffffff14",
|
|
151
|
-
t05: "#ffffff0d",
|
|
152
|
-
t03: "#ffffff07",
|
|
153
|
-
t02: "#ffffff05",
|
|
154
|
-
t01: "#ffffff02",
|
|
155
|
-
lgrad: `linear-gradient(
|
|
156
|
-
to right,
|
|
157
|
-
#3d485c 0%,
|
|
158
|
-
#3c4657 5%,
|
|
159
|
-
#3b4353 10%,
|
|
160
|
-
#3a414e 20%,
|
|
161
|
-
#393f4a 30%,
|
|
162
|
-
#373c45 60%,
|
|
163
|
-
#363a41 80%,
|
|
164
|
-
#35383c 90%,
|
|
165
|
-
#343538 100%
|
|
166
|
-
)`,
|
|
167
|
-
maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
|
|
168
|
-
...CommonTheme
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// contexts/theme/index.tsx
|
|
173
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
174
|
-
var ThemeContext = createContext({});
|
|
175
|
-
var useTheme = () => useContext(ThemeContext);
|
|
176
|
-
|
|
177
|
-
// contexts/icon/index.tsx
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
5
|
+
import { useTheme } from "../theme";
|
|
178
6
|
import _ from "lodash";
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
var brands = {};
|
|
183
|
-
req.keys().forEach((key) => {
|
|
184
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
185
|
-
brands[name] = req(key).default;
|
|
186
|
-
});
|
|
187
|
-
var brands_default = brands;
|
|
188
|
-
|
|
189
|
-
// contexts/icon/assets/regular/index.tsx
|
|
190
|
-
var req2 = __require.context("./", false, /\.svg$/);
|
|
191
|
-
var regular = {};
|
|
192
|
-
req2.keys().forEach((key) => {
|
|
193
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
194
|
-
regular[name] = req2(key).default;
|
|
195
|
-
});
|
|
196
|
-
var regular_default = regular;
|
|
197
|
-
|
|
198
|
-
// contexts/icon/assets/solid/index.tsx
|
|
199
|
-
var req3 = __require.context("./", false, /\.svg$/);
|
|
200
|
-
var solid = {};
|
|
201
|
-
req3.keys().forEach((key) => {
|
|
202
|
-
const name = key.replace("./", "").replace(".svg", "");
|
|
203
|
-
solid[name] = req3(key).default;
|
|
204
|
-
});
|
|
205
|
-
var solid_default = solid;
|
|
206
|
-
|
|
207
|
-
// contexts/icon/assets/index.tsx
|
|
208
|
-
var assets_default = {
|
|
209
|
-
brands: brands_default,
|
|
210
|
-
regular: regular_default,
|
|
211
|
-
solid: solid_default
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// contexts/icon/index.tsx
|
|
215
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
216
|
-
var IconContext = createContext2({});
|
|
217
|
-
var IconProviderContainer = ({ children }) => {
|
|
7
|
+
import assets from "./assets";
|
|
8
|
+
const IconContext = createContext({});
|
|
9
|
+
const IconProviderContainer = ({ children }) => {
|
|
218
10
|
const { content } = useTheme();
|
|
219
|
-
const [isClient, setIsClient] =
|
|
220
|
-
const [matches, setMatches] =
|
|
221
|
-
|
|
11
|
+
const [isClient, setIsClient] = useState(false);
|
|
12
|
+
const [matches, setMatches] = useState(0);
|
|
13
|
+
useEffect(() => {
|
|
222
14
|
setIsClient(true);
|
|
223
15
|
}, []);
|
|
224
|
-
|
|
16
|
+
useEffect(() => {
|
|
225
17
|
const firstMediaQuery = window.matchMedia(`(max-width: ${content.mobileMaxWidth})`);
|
|
226
18
|
const secoundMediaQuery = window.matchMedia(`(max-width: ${content.mobileMinWidth})`);
|
|
227
19
|
const firstHandler = (event) => setMatches(event.matches ? 1 : 0);
|
|
@@ -235,7 +27,7 @@ var IconProviderContainer = ({ children }) => {
|
|
|
235
27
|
secoundMediaQuery.removeEventListener("change", secoundHandler);
|
|
236
28
|
};
|
|
237
29
|
}, []);
|
|
238
|
-
|
|
30
|
+
useEffect(() => {
|
|
239
31
|
if (!isClient) return;
|
|
240
32
|
const processElement = (element) => {
|
|
241
33
|
var _a, _b, _c, _d, _e;
|
|
@@ -243,7 +35,7 @@ var IconProviderContainer = ({ children }) => {
|
|
|
243
35
|
if (!name) return;
|
|
244
36
|
const icon = _.split(_.replace(name, /fa-/g, ""), " ");
|
|
245
37
|
if (!icon.length) return;
|
|
246
|
-
let svg = (_d = (_c = (_a =
|
|
38
|
+
let svg = (_d = (_c = (_a = assets[icon[0]]) == null ? void 0 : _a[icon[1]]) != null ? _c : (_b = assets["solid"]) == null ? void 0 : _b[icon[0]]) != null ? _d : "";
|
|
247
39
|
if (!svg) return;
|
|
248
40
|
svg = svg.replace(/fill=".*?"/g, 'fill="currentColor"');
|
|
249
41
|
const styles = window.getComputedStyle(element);
|
|
@@ -271,9 +63,9 @@ var IconProviderContainer = ({ children }) => {
|
|
|
271
63
|
});
|
|
272
64
|
return () => observer.disconnect();
|
|
273
65
|
}, [isClient, matches]);
|
|
274
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ jsx(IconContext.Provider, { value: {}, children });
|
|
275
67
|
};
|
|
276
|
-
|
|
68
|
+
const useIcon = () => useContext(IconContext);
|
|
277
69
|
export {
|
|
278
70
|
IconProviderContainer as IconProvider,
|
|
279
71
|
useIcon
|
|
@@ -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/icon/styles.tsx
|
|
31
30
|
var styles_exports = {};
|
|
32
31
|
__export(styles_exports, {
|
|
33
32
|
Container: () => Container
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(styles_exports);
|
|
36
35
|
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
-
|
|
36
|
+
const Container = import_styled_components.default.div`
|
|
38
37
|
|
|
39
38
|
`;
|
|
40
39
|
// Annotate the CommonJS export names for ESM import in node:
|