dirk-cfx-react 1.1.2 → 1.1.6
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.cjs +1413 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +699 -0
- package/dist/components/index.d.ts +699 -0
- package/dist/components/index.js +1383 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.cjs +348 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +71 -0
- package/dist/hooks/index.d.ts +71 -0
- package/dist/hooks/index.js +340 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +178 -139
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -886
- package/dist/index.d.ts +10 -886
- package/dist/index.js +157 -119
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +315 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +9 -0
- package/dist/providers/index.d.ts +9 -0
- package/dist/providers/index.js +309 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/utils/index.cjs +844 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +120 -0
- package/dist/utils/index.d.ts +120 -0
- package/dist/utils/index.js +813 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,1383 @@
|
|
|
1
|
+
import { createContext, useRef, useState, useEffect, useContext } from 'react';
|
|
2
|
+
import { create, useStore } from 'zustand';
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
import { Flex, Text, Image, useMantineTheme, alpha, Progress, RingProgress, Button } from '@mantine/core';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
import { motion, AnimatePresence, useMotionValue } from 'framer-motion';
|
|
7
|
+
import clickSoundUrl from '../click_sound-PNCRRTM4.mp3';
|
|
8
|
+
import hoverSoundUrl from '../hover_sound-NBUA222C.mp3';
|
|
9
|
+
import { useClickOutside } from '@mantine/hooks';
|
|
10
|
+
|
|
11
|
+
// src/utils/colorWithAlpha.ts
|
|
12
|
+
var colorNames = {
|
|
13
|
+
AliceBlue: { r: 240, g: 248, b: 255 },
|
|
14
|
+
AntiqueWhite: { r: 250, g: 235, b: 215 },
|
|
15
|
+
Aqua: { r: 0, g: 255, b: 255 },
|
|
16
|
+
Aquamarine: { r: 127, g: 255, b: 212 },
|
|
17
|
+
Azure: { r: 240, g: 255, b: 255 },
|
|
18
|
+
Beige: { r: 245, g: 245, b: 220 },
|
|
19
|
+
Bisque: { r: 255, g: 228, b: 196 },
|
|
20
|
+
Black: { r: 0, g: 0, b: 0 },
|
|
21
|
+
BlanchedAlmond: { r: 255, g: 235, b: 205 },
|
|
22
|
+
Blue: { r: 0, g: 0, b: 255 },
|
|
23
|
+
BlueViolet: { r: 138, g: 43, b: 226 },
|
|
24
|
+
Brown: { r: 165, g: 42, b: 42 },
|
|
25
|
+
BurlyWood: { r: 222, g: 184, b: 135 },
|
|
26
|
+
CadetBlue: { r: 95, g: 158, b: 160 },
|
|
27
|
+
Chartreuse: { r: 127, g: 255, b: 0 },
|
|
28
|
+
Chocolate: { r: 210, g: 105, b: 30 },
|
|
29
|
+
Coral: { r: 255, g: 127, b: 80 },
|
|
30
|
+
CornflowerBlue: { r: 100, g: 149, b: 237 },
|
|
31
|
+
Cornsilk: { r: 255, g: 248, b: 220 },
|
|
32
|
+
Crimson: { r: 220, g: 20, b: 60 },
|
|
33
|
+
Cyan: { r: 0, g: 255, b: 255 },
|
|
34
|
+
DarkBlue: { r: 0, g: 0, b: 139 },
|
|
35
|
+
DarkCyan: { r: 0, g: 139, b: 139 },
|
|
36
|
+
DarkGoldenRod: { r: 184, g: 134, b: 11 },
|
|
37
|
+
DarkGray: { r: 169, g: 169, b: 169 },
|
|
38
|
+
DarkGreen: { r: 0, g: 100, b: 0 },
|
|
39
|
+
DarkKhaki: { r: 189, g: 183, b: 107 },
|
|
40
|
+
DarkMagenta: { r: 139, g: 0, b: 139 },
|
|
41
|
+
DarkOliveGreen: { r: 85, g: 107, b: 47 },
|
|
42
|
+
DarkOrange: { r: 255, g: 140, b: 0 },
|
|
43
|
+
DarkOrchid: { r: 153, g: 50, b: 204 },
|
|
44
|
+
DarkRed: { r: 139, g: 0, b: 0 },
|
|
45
|
+
DarkSalmon: { r: 233, g: 150, b: 122 },
|
|
46
|
+
DarkSeaGreen: { r: 143, g: 188, b: 143 },
|
|
47
|
+
DarkSlateBlue: { r: 72, g: 61, b: 139 },
|
|
48
|
+
DarkSlateGray: { r: 47, g: 79, b: 79 },
|
|
49
|
+
DarkTurquoise: { r: 0, g: 206, b: 209 },
|
|
50
|
+
DarkViolet: { r: 148, g: 0, b: 211 },
|
|
51
|
+
DeepPink: { r: 255, g: 20, b: 147 },
|
|
52
|
+
DeepSkyBlue: { r: 0, g: 191, b: 255 },
|
|
53
|
+
DimGray: { r: 105, g: 105, b: 105 },
|
|
54
|
+
DodgerBlue: { r: 30, g: 144, b: 255 },
|
|
55
|
+
FireBrick: { r: 178, g: 34, b: 34 },
|
|
56
|
+
FloralWhite: { r: 255, g: 250, b: 240 },
|
|
57
|
+
ForestGreen: { r: 34, g: 139, b: 34 },
|
|
58
|
+
Fuchsia: { r: 255, g: 0, b: 255 },
|
|
59
|
+
Gainsboro: { r: 220, g: 220, b: 220 },
|
|
60
|
+
GhostWhite: { r: 248, g: 248, b: 255 },
|
|
61
|
+
Gold: { r: 255, g: 215, b: 0 },
|
|
62
|
+
GoldenRod: { r: 218, g: 165, b: 32 },
|
|
63
|
+
Gray: { r: 128, g: 128, b: 128 },
|
|
64
|
+
Green: { r: 0, g: 128, b: 0 },
|
|
65
|
+
GreenYellow: { r: 173, g: 255, b: 47 },
|
|
66
|
+
HoneyDew: { r: 240, g: 255, b: 240 },
|
|
67
|
+
HotPink: { r: 255, g: 105, b: 180 },
|
|
68
|
+
IndianRed: { r: 205, g: 92, b: 92 },
|
|
69
|
+
Indigo: { r: 75, g: 0, b: 130 },
|
|
70
|
+
Ivory: { r: 255, g: 255, b: 240 },
|
|
71
|
+
Khaki: { r: 240, g: 230, b: 140 },
|
|
72
|
+
Lavender: { r: 230, g: 230, b: 250 },
|
|
73
|
+
LavenderBlush: { r: 255, g: 240, b: 245 },
|
|
74
|
+
LawnGreen: { r: 124, g: 252, b: 0 },
|
|
75
|
+
LemonChiffon: { r: 255, g: 250, b: 205 },
|
|
76
|
+
LightBlue: { r: 173, g: 216, b: 230 },
|
|
77
|
+
LightCoral: { r: 240, g: 128, b: 128 },
|
|
78
|
+
LightCyan: { r: 224, g: 255, b: 255 },
|
|
79
|
+
LightGoldenRodYellow: { r: 250, g: 250, b: 210 },
|
|
80
|
+
LightGray: { r: 211, g: 211, b: 211 },
|
|
81
|
+
LightGreen: { r: 144, g: 238, b: 144 },
|
|
82
|
+
LightPink: { r: 255, g: 182, b: 193 },
|
|
83
|
+
LightSalmon: { r: 255, g: 160, b: 122 },
|
|
84
|
+
LightSeaGreen: { r: 32, g: 178, b: 170 },
|
|
85
|
+
LightSkyBlue: { r: 135, g: 206, b: 250 },
|
|
86
|
+
LightSlateGray: { r: 119, g: 136, b: 153 },
|
|
87
|
+
LightSteelBlue: { r: 176, g: 196, b: 222 },
|
|
88
|
+
LightYellow: { r: 255, g: 255, b: 224 },
|
|
89
|
+
Lime: { r: 0, g: 255, b: 0 },
|
|
90
|
+
LimeGreen: { r: 50, g: 205, b: 50 },
|
|
91
|
+
Linen: { r: 250, g: 240, b: 230 },
|
|
92
|
+
Magenta: { r: 255, g: 0, b: 255 },
|
|
93
|
+
Maroon: { r: 128, g: 0, b: 0 },
|
|
94
|
+
// Maroon
|
|
95
|
+
MediumAquaMarine: { r: 102, g: 205, b: 170 },
|
|
96
|
+
MediumBlue: { r: 0, g: 0, b: 205 },
|
|
97
|
+
MediumOrchid: { r: 186, g: 85, b: 211 },
|
|
98
|
+
MediumPurple: { r: 147, g: 112, b: 219 },
|
|
99
|
+
MediumSeaGreen: { r: 60, g: 179, b: 113 },
|
|
100
|
+
MediumSlateBlue: { r: 123, g: 104, b: 238 },
|
|
101
|
+
MediumSpringGreen: { r: 0, g: 250, b: 154 },
|
|
102
|
+
MediumTurquoise: { r: 72, g: 209, b: 204 },
|
|
103
|
+
MediumVioletRed: { r: 199, g: 21, b: 133 },
|
|
104
|
+
MidnightBlue: { r: 25, g: 25, b: 112 },
|
|
105
|
+
MintCream: { r: 245, g: 255, b: 250 },
|
|
106
|
+
MistyRose: { r: 255, g: 228, b: 225 },
|
|
107
|
+
Moccasin: { r: 255, g: 228, b: 181 },
|
|
108
|
+
NavajoWhite: { r: 255, g: 222, b: 173 },
|
|
109
|
+
Navy: { r: 0, g: 0, b: 128 },
|
|
110
|
+
OldLace: { r: 253, g: 245, b: 230 },
|
|
111
|
+
Olive: { r: 128, g: 128, b: 0 },
|
|
112
|
+
OliveDrab: { r: 107, g: 142, b: 35 },
|
|
113
|
+
Orange: { r: 255, g: 165, b: 0 },
|
|
114
|
+
OrangeRed: { r: 255, g: 69, b: 0 },
|
|
115
|
+
Orchid: { r: 218, g: 112, b: 214 },
|
|
116
|
+
PaleGoldenRod: { r: 238, g: 232, b: 170 },
|
|
117
|
+
PaleGreen: { r: 152, g: 251, b: 152 },
|
|
118
|
+
PaleTurquoise: { r: 175, g: 238, b: 238 },
|
|
119
|
+
PaleVioletRed: { r: 219, g: 112, b: 147 },
|
|
120
|
+
PapayaWhip: { r: 255, g: 239, b: 213 },
|
|
121
|
+
PeachPuff: { r: 255, g: 218, b: 185 },
|
|
122
|
+
Peru: { r: 205, g: 133, b: 63 },
|
|
123
|
+
Pink: { r: 255, g: 192, b: 203 },
|
|
124
|
+
Plum: { r: 221, g: 160, b: 221 },
|
|
125
|
+
PowderBlue: { r: 176, g: 224, b: 230 },
|
|
126
|
+
Purple: { r: 128, g: 0, b: 128 },
|
|
127
|
+
RebeccaPurple: { r: 102, g: 51, b: 153 },
|
|
128
|
+
Red: { r: 255, g: 0, b: 0 },
|
|
129
|
+
RosyBrown: { r: 188, g: 143, b: 143 },
|
|
130
|
+
RoyalBlue: { r: 65, g: 105, b: 225 },
|
|
131
|
+
SaddleBrown: { r: 139, g: 69, b: 19 },
|
|
132
|
+
Salmon: { r: 250, g: 128, b: 114 },
|
|
133
|
+
SandyBrown: { r: 244, g: 164, b: 96 },
|
|
134
|
+
SeaGreen: { r: 46, g: 139, b: 87 },
|
|
135
|
+
SeaShell: { r: 255, g: 245, b: 238 },
|
|
136
|
+
Sienna: { r: 160, g: 82, b: 45 },
|
|
137
|
+
Silver: { r: 192, g: 192, b: 192 },
|
|
138
|
+
SkyBlue: { r: 135, g: 206, b: 235 },
|
|
139
|
+
SlateBlue: { r: 106, g: 90, b: 205 },
|
|
140
|
+
SlateGray: { r: 112, g: 128, b: 144 },
|
|
141
|
+
Snow: { r: 255, g: 250, b: 250 },
|
|
142
|
+
SpringGreen: { r: 0, g: 255, b: 127 },
|
|
143
|
+
SteelBlue: { r: 70, g: 130, b: 180 },
|
|
144
|
+
Tan: { r: 210, g: 180, b: 140 },
|
|
145
|
+
Teal: { r: 0, g: 128, b: 128 },
|
|
146
|
+
Thistle: { r: 216, g: 191, b: 216 },
|
|
147
|
+
Tomato: { r: 255, g: 99, b: 71 },
|
|
148
|
+
Turquoise: { r: 64, g: 224, b: 208 },
|
|
149
|
+
Violet: { r: 238, g: 130, b: 238 },
|
|
150
|
+
Wheat: { r: 245, g: 222, b: 179 },
|
|
151
|
+
White: { r: 255, g: 255, b: 255 },
|
|
152
|
+
WhiteSmoke: { r: 245, g: 245, b: 245 },
|
|
153
|
+
Yellow: { r: 255, g: 255, b: 0 },
|
|
154
|
+
YellowGreen: { r: 154, g: 205, b: 50 }
|
|
155
|
+
};
|
|
156
|
+
function colorWithAlpha(color, alpha4) {
|
|
157
|
+
const lowerCasedColor = color.toLowerCase();
|
|
158
|
+
if (colorNames[lowerCasedColor]) {
|
|
159
|
+
const rgb = colorNames[lowerCasedColor];
|
|
160
|
+
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha4})`;
|
|
161
|
+
}
|
|
162
|
+
if (/^#([A-Fa-f0-9]{6})$/.test(color)) {
|
|
163
|
+
const hex = color.slice(1);
|
|
164
|
+
const bigint = parseInt(hex, 16);
|
|
165
|
+
const r = bigint >> 16 & 255;
|
|
166
|
+
const g = bigint >> 8 & 255;
|
|
167
|
+
const b = bigint & 255;
|
|
168
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha4})`;
|
|
169
|
+
}
|
|
170
|
+
if (/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/.test(color)) {
|
|
171
|
+
const result = color.match(/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/);
|
|
172
|
+
if (result) {
|
|
173
|
+
return `rgba(${result[1]}, ${result[2]}, ${result[3]}, ${alpha4})`;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return color;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// src/utils/misc.ts
|
|
180
|
+
var isEnvBrowser = () => !window.invokeNative;
|
|
181
|
+
|
|
182
|
+
// src/utils/fetchNui.ts
|
|
183
|
+
async function fetchNui(eventName, data, mockData) {
|
|
184
|
+
const options = {
|
|
185
|
+
method: "post",
|
|
186
|
+
headers: {
|
|
187
|
+
"Content-Type": "application/json; charset=UTF-8"
|
|
188
|
+
},
|
|
189
|
+
body: JSON.stringify(data)
|
|
190
|
+
};
|
|
191
|
+
if (isEnvBrowser() && mockData === void 0) {
|
|
192
|
+
console.warn(
|
|
193
|
+
`[fetchNui] Called fetchNui for event "${eventName}" in browser environment without mockData. Returning empty object.`
|
|
194
|
+
);
|
|
195
|
+
return {};
|
|
196
|
+
}
|
|
197
|
+
const resourceName = window.GetParentResourceName ? window.GetParentResourceName() : "nui-frame-app";
|
|
198
|
+
const resp = await fetch(`https://${resourceName}/${eventName}`, options);
|
|
199
|
+
return await resp.json();
|
|
200
|
+
}
|
|
201
|
+
async function registerInitialFetch(eventName, data, mockData) {
|
|
202
|
+
const fetcher = () => fetchNui(eventName, data, mockData);
|
|
203
|
+
return fetcher();
|
|
204
|
+
}
|
|
205
|
+
var localeStore = create((set, get) => {
|
|
206
|
+
return {
|
|
207
|
+
locales: {
|
|
208
|
+
"OccupantsDesc": "Here you can view and manage the occupants of your traphouse. These occupants can be used mainly for selling drugs to the NPCs surrounding your traphouse. However they have other uses to so be careful who you add as an occupant."
|
|
209
|
+
},
|
|
210
|
+
locale: (key, ...args) => {
|
|
211
|
+
const exists = get().locales[key];
|
|
212
|
+
let translation = exists || key;
|
|
213
|
+
if (args.length) {
|
|
214
|
+
translation = translation.replace(/%s/g, () => String(args.shift() || ""));
|
|
215
|
+
}
|
|
216
|
+
return translation;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
var locale = localeStore.getState().locale;
|
|
221
|
+
registerInitialFetch("GET_LOCALES", void 0).then((data) => {
|
|
222
|
+
localeStore.setState({ locales: data });
|
|
223
|
+
});
|
|
224
|
+
var useSettings = create(() => ({
|
|
225
|
+
hydrated: false,
|
|
226
|
+
game: "fivem",
|
|
227
|
+
primaryColor: "dirk",
|
|
228
|
+
primaryShade: 9,
|
|
229
|
+
itemImgPath: "",
|
|
230
|
+
customTheme: [
|
|
231
|
+
"#f0f4ff",
|
|
232
|
+
"#d9e3ff",
|
|
233
|
+
"#bfcfff",
|
|
234
|
+
"#a6bbff",
|
|
235
|
+
"#8ca7ff",
|
|
236
|
+
"#7393ff",
|
|
237
|
+
"#5a7fff",
|
|
238
|
+
"#406bff",
|
|
239
|
+
"#2547ff",
|
|
240
|
+
"#0b33ff"
|
|
241
|
+
]
|
|
242
|
+
}));
|
|
243
|
+
registerInitialFetch("GET_SETTINGS").then((data) => {
|
|
244
|
+
useSettings.setState({
|
|
245
|
+
...data,
|
|
246
|
+
hydrated: true
|
|
247
|
+
});
|
|
248
|
+
}).catch(() => {
|
|
249
|
+
useSettings.setState({ hydrated: true });
|
|
250
|
+
});
|
|
251
|
+
function BorderedIcon(props) {
|
|
252
|
+
const theme = useMantineTheme();
|
|
253
|
+
return /* @__PURE__ */ jsx(
|
|
254
|
+
FontAwesomeIcon,
|
|
255
|
+
{
|
|
256
|
+
icon: props.icon,
|
|
257
|
+
color: colorWithAlpha(props.color ? props.color : theme.colors[theme.primaryColor][theme.primaryShade], props.hovered ? 0.9 : 0.9),
|
|
258
|
+
style: {
|
|
259
|
+
// backgroundColor: colorWithAlpha(props.color ? props.color : theme.colors[theme.primaryColor][7 as number], (props.hoverable ? (props.hovered ? 0.3 : 0.2) : 0.2)),
|
|
260
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
261
|
+
padding: props.p || theme.spacing.xs,
|
|
262
|
+
transition: "all 0.2s ease-in-out",
|
|
263
|
+
aspectRatio: "1/1",
|
|
264
|
+
fontSize: props.fontSize ? props.fontSize : "2.5vh",
|
|
265
|
+
borderRadius: theme.radius.xs,
|
|
266
|
+
// border: `2px solid var(--mantine-primary-color-9)`,
|
|
267
|
+
outline: `0.2vh solid ${colorWithAlpha(props.color ? props.color : theme.colors[theme.primaryColor][9], 0.8)}`,
|
|
268
|
+
boxShadow: `inset 0 0 2vh ${colorWithAlpha(props.color ? props.color : theme.colors[theme.primaryColor][7], 0.5)}`
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
var MotionFlex = motion.create(Flex);
|
|
274
|
+
var MotionText = motion.create(Text);
|
|
275
|
+
var MotionImage = motion.create(Image);
|
|
276
|
+
var MotionIcon = motion.create(FontAwesomeIcon);
|
|
277
|
+
function Counter(props) {
|
|
278
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: props.count > 0 && /* @__PURE__ */ jsx(
|
|
279
|
+
MotionFlex,
|
|
280
|
+
{
|
|
281
|
+
initial: { opacity: 0 },
|
|
282
|
+
animate: { opacity: 1 },
|
|
283
|
+
exit: { opacity: 0 },
|
|
284
|
+
fz: "1.25vh",
|
|
285
|
+
h: "1.75vh",
|
|
286
|
+
justify: "center",
|
|
287
|
+
align: "center",
|
|
288
|
+
bg: props.color || "rgba(0, 0, 0, 0.51)",
|
|
289
|
+
style: {
|
|
290
|
+
borderRadius: "50%",
|
|
291
|
+
aspectRatio: "1/1",
|
|
292
|
+
marginBottom: "0.3vh",
|
|
293
|
+
fontFamily: "Akrobat Bold",
|
|
294
|
+
boxShadow: "0 0 5px rgba(0, 0, 0, 0.3)",
|
|
295
|
+
...props.style
|
|
296
|
+
},
|
|
297
|
+
children: props.count
|
|
298
|
+
},
|
|
299
|
+
"counter"
|
|
300
|
+
) });
|
|
301
|
+
}
|
|
302
|
+
var FloatingParticles = ({
|
|
303
|
+
icons = [],
|
|
304
|
+
particleCount = 55,
|
|
305
|
+
color = "#00a552ff",
|
|
306
|
+
size = 32,
|
|
307
|
+
speed = "slow",
|
|
308
|
+
opacity = 0.3,
|
|
309
|
+
style = {},
|
|
310
|
+
mouseRepelDistance = 150,
|
|
311
|
+
mouseRepelStrength = 50,
|
|
312
|
+
backgroundColor = "transparent"
|
|
313
|
+
}) => {
|
|
314
|
+
const containerRef = useRef(null);
|
|
315
|
+
const [particles, setParticles] = useState([]);
|
|
316
|
+
const mouseX = useMotionValue(0);
|
|
317
|
+
const mouseY = useMotionValue(0);
|
|
318
|
+
const durationMap = {
|
|
319
|
+
slow: { base: 10, variance: 10 },
|
|
320
|
+
medium: { base: 2, variance: 2 },
|
|
321
|
+
fast: { base: 4, variance: 2 }
|
|
322
|
+
};
|
|
323
|
+
const duration = durationMap[speed];
|
|
324
|
+
const seededRandom = (seed) => {
|
|
325
|
+
const x = Math.sin(seed) * 1e4;
|
|
326
|
+
return x - Math.floor(x);
|
|
327
|
+
};
|
|
328
|
+
useEffect(() => {
|
|
329
|
+
if (!containerRef.current) return;
|
|
330
|
+
const bounds = containerRef.current.getBoundingClientRect();
|
|
331
|
+
const newParticles = [...Array(particleCount)].map((_, i) => {
|
|
332
|
+
const seedX = i * 123.456;
|
|
333
|
+
const seedY = i * 789.012;
|
|
334
|
+
const seedDuration = i * 345.678;
|
|
335
|
+
const baseX = seededRandom(seedX) * bounds.width;
|
|
336
|
+
const baseY = seededRandom(seedY) * bounds.height;
|
|
337
|
+
return {
|
|
338
|
+
id: i,
|
|
339
|
+
baseX,
|
|
340
|
+
baseY,
|
|
341
|
+
currentX: baseX,
|
|
342
|
+
currentY: baseY,
|
|
343
|
+
icon: icons.length > 0 ? icons[i % icons.length] : null,
|
|
344
|
+
animationDuration: duration.base + seededRandom(seedDuration) * duration.variance
|
|
345
|
+
};
|
|
346
|
+
});
|
|
347
|
+
setParticles(newParticles);
|
|
348
|
+
}, [particleCount, icons.length, duration.base, duration.variance]);
|
|
349
|
+
useEffect(() => {
|
|
350
|
+
if (!containerRef.current) return;
|
|
351
|
+
const handleMouseMove = (e) => {
|
|
352
|
+
const bounds = containerRef.current.getBoundingClientRect();
|
|
353
|
+
const x = e.clientX - bounds.left;
|
|
354
|
+
const y = e.clientY - bounds.top;
|
|
355
|
+
mouseX.set(x);
|
|
356
|
+
mouseY.set(y);
|
|
357
|
+
setParticles(
|
|
358
|
+
(prevParticles) => prevParticles.map((particle) => {
|
|
359
|
+
const dx = x - particle.baseX;
|
|
360
|
+
const dy = y - particle.baseY;
|
|
361
|
+
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
362
|
+
if (distance < mouseRepelDistance && distance > 0) {
|
|
363
|
+
const force = (mouseRepelDistance - distance) / mouseRepelDistance;
|
|
364
|
+
const repelX = dx / distance * force * mouseRepelStrength * -1;
|
|
365
|
+
const repelY = dy / distance * force * mouseRepelStrength * -1;
|
|
366
|
+
return {
|
|
367
|
+
...particle,
|
|
368
|
+
currentX: particle.baseX + repelX,
|
|
369
|
+
currentY: particle.baseY + repelY
|
|
370
|
+
};
|
|
371
|
+
} else {
|
|
372
|
+
return {
|
|
373
|
+
...particle,
|
|
374
|
+
currentX: particle.baseX,
|
|
375
|
+
currentY: particle.baseY
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
})
|
|
379
|
+
);
|
|
380
|
+
};
|
|
381
|
+
const handleMouseLeave = () => {
|
|
382
|
+
setParticles(
|
|
383
|
+
(prevParticles) => prevParticles.map((particle) => ({
|
|
384
|
+
...particle,
|
|
385
|
+
currentX: particle.baseX,
|
|
386
|
+
currentY: particle.baseY
|
|
387
|
+
}))
|
|
388
|
+
);
|
|
389
|
+
};
|
|
390
|
+
const container = containerRef.current;
|
|
391
|
+
container.addEventListener("mousemove", handleMouseMove);
|
|
392
|
+
container.addEventListener("mouseleave", handleMouseLeave);
|
|
393
|
+
return () => {
|
|
394
|
+
container.removeEventListener("mousemove", handleMouseMove);
|
|
395
|
+
container.removeEventListener("mouseleave", handleMouseLeave);
|
|
396
|
+
};
|
|
397
|
+
}, [mouseX, mouseY, mouseRepelDistance, mouseRepelStrength]);
|
|
398
|
+
useEffect(() => {
|
|
399
|
+
const handleResize = () => {
|
|
400
|
+
if (!containerRef.current) return;
|
|
401
|
+
const bounds = containerRef.current.getBoundingClientRect();
|
|
402
|
+
setParticles(
|
|
403
|
+
(prevParticles) => prevParticles.map((particle, i) => {
|
|
404
|
+
const seedX = i * 123.456 + bounds.width;
|
|
405
|
+
const seedY = i * 789.012 + bounds.height;
|
|
406
|
+
const newBaseX = seededRandom(seedX) * bounds.width;
|
|
407
|
+
const newBaseY = seededRandom(seedY) * bounds.height;
|
|
408
|
+
return {
|
|
409
|
+
...particle,
|
|
410
|
+
baseX: newBaseX,
|
|
411
|
+
baseY: newBaseY,
|
|
412
|
+
currentX: newBaseX,
|
|
413
|
+
currentY: newBaseY
|
|
414
|
+
};
|
|
415
|
+
})
|
|
416
|
+
);
|
|
417
|
+
};
|
|
418
|
+
window.addEventListener("resize", handleResize);
|
|
419
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
420
|
+
}, []);
|
|
421
|
+
return /* @__PURE__ */ jsx(
|
|
422
|
+
"div",
|
|
423
|
+
{
|
|
424
|
+
ref: containerRef,
|
|
425
|
+
style: {
|
|
426
|
+
position: "absolute",
|
|
427
|
+
overflow: "hidden",
|
|
428
|
+
width: "100%",
|
|
429
|
+
height: "100%",
|
|
430
|
+
zIndex: -1,
|
|
431
|
+
backgroundColor,
|
|
432
|
+
...style
|
|
433
|
+
},
|
|
434
|
+
children: /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: particles.map((particle) => /* @__PURE__ */ jsx(
|
|
435
|
+
motion.div,
|
|
436
|
+
{
|
|
437
|
+
style: {
|
|
438
|
+
position: "absolute",
|
|
439
|
+
width: size,
|
|
440
|
+
height: size,
|
|
441
|
+
color,
|
|
442
|
+
opacity,
|
|
443
|
+
left: 0,
|
|
444
|
+
top: 0
|
|
445
|
+
},
|
|
446
|
+
animate: {
|
|
447
|
+
x: particle.currentX,
|
|
448
|
+
y: particle.currentY,
|
|
449
|
+
scale: [0.8, 1.1, 0.8],
|
|
450
|
+
opacity: [opacity * 0.5, opacity, opacity * 0.5],
|
|
451
|
+
// random rotate between 0 and 360 so that not all particles rotate the same
|
|
452
|
+
rotate: particle.id % 2 === 0 ? [0, 360] : [360, 0]
|
|
453
|
+
},
|
|
454
|
+
transition: {
|
|
455
|
+
x: { type: "spring", stiffness: 150, damping: 20 },
|
|
456
|
+
y: { type: "spring", stiffness: 150, damping: 20 },
|
|
457
|
+
rotate: {
|
|
458
|
+
duration: particle.animationDuration,
|
|
459
|
+
repeat: Infinity,
|
|
460
|
+
ease: "linear"
|
|
461
|
+
},
|
|
462
|
+
scale: {
|
|
463
|
+
duration: particle.animationDuration,
|
|
464
|
+
repeat: Infinity,
|
|
465
|
+
delay: seededRandom(particle.id * 111.222) * 5,
|
|
466
|
+
ease: "easeInOut"
|
|
467
|
+
},
|
|
468
|
+
opacity: {
|
|
469
|
+
duration: particle.animationDuration,
|
|
470
|
+
repeat: Infinity,
|
|
471
|
+
delay: seededRandom(particle.id * 333.444) * 5,
|
|
472
|
+
ease: "easeInOut"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
children: particle.icon ? /* @__PURE__ */ jsx("div", { style: { width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: particle.icon, style: { width: "70%", height: "70%" } }) }) : /* @__PURE__ */ jsx(
|
|
476
|
+
"div",
|
|
477
|
+
{
|
|
478
|
+
style: {
|
|
479
|
+
width: "100%",
|
|
480
|
+
height: "100%",
|
|
481
|
+
borderRadius: "50%",
|
|
482
|
+
backgroundColor: color
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
},
|
|
487
|
+
particle.id
|
|
488
|
+
)) })
|
|
489
|
+
}
|
|
490
|
+
);
|
|
491
|
+
};
|
|
492
|
+
function InfoBox(props) {
|
|
493
|
+
const theme = useMantineTheme();
|
|
494
|
+
return /* @__PURE__ */ jsxs(
|
|
495
|
+
Flex,
|
|
496
|
+
{
|
|
497
|
+
w: "fit-content",
|
|
498
|
+
h: "fit-content",
|
|
499
|
+
style: {
|
|
500
|
+
borderRadius: theme.radius.xs,
|
|
501
|
+
overflow: "hidden",
|
|
502
|
+
border: `0.2vh solid rgba(77,77,77,0.3)`
|
|
503
|
+
},
|
|
504
|
+
align: "center",
|
|
505
|
+
children: [
|
|
506
|
+
/* @__PURE__ */ jsx(
|
|
507
|
+
Flex,
|
|
508
|
+
{
|
|
509
|
+
miw: "4vh",
|
|
510
|
+
p: "xxs",
|
|
511
|
+
bg: "rgba(77,77,77,0.2)",
|
|
512
|
+
direction: "column",
|
|
513
|
+
justify: "center",
|
|
514
|
+
align: "center",
|
|
515
|
+
children: /* @__PURE__ */ jsx(
|
|
516
|
+
Text,
|
|
517
|
+
{
|
|
518
|
+
c: "lightgrey",
|
|
519
|
+
size: "xxs",
|
|
520
|
+
style: {
|
|
521
|
+
fontFamily: "Akrobat Bold",
|
|
522
|
+
letterSpacing: "0.05em",
|
|
523
|
+
textTransform: "uppercase"
|
|
524
|
+
},
|
|
525
|
+
children: props.leftSide
|
|
526
|
+
}
|
|
527
|
+
)
|
|
528
|
+
}
|
|
529
|
+
),
|
|
530
|
+
/* @__PURE__ */ jsx(
|
|
531
|
+
Flex,
|
|
532
|
+
{
|
|
533
|
+
p: "xxs",
|
|
534
|
+
flex: 1,
|
|
535
|
+
miw: "4vh",
|
|
536
|
+
bg: "rgba(77,77,77,0.5)",
|
|
537
|
+
direction: "column",
|
|
538
|
+
align: "center",
|
|
539
|
+
justify: "center",
|
|
540
|
+
children: /* @__PURE__ */ jsx(
|
|
541
|
+
Text,
|
|
542
|
+
{
|
|
543
|
+
c: "lightgrey",
|
|
544
|
+
size: "xxs",
|
|
545
|
+
style: {
|
|
546
|
+
fontFamily: "Akrobat Bold",
|
|
547
|
+
letterSpacing: "0.05em",
|
|
548
|
+
textTransform: "uppercase"
|
|
549
|
+
},
|
|
550
|
+
children: props.rightSide
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
function InputContainer(props) {
|
|
560
|
+
const theme = useMantineTheme();
|
|
561
|
+
return /* @__PURE__ */ jsxs(
|
|
562
|
+
MotionFlex,
|
|
563
|
+
{
|
|
564
|
+
w: props.w || "100%",
|
|
565
|
+
flex: props.flex,
|
|
566
|
+
direction: "column",
|
|
567
|
+
h: props.h,
|
|
568
|
+
gap: props.title ? "xs" : 0,
|
|
569
|
+
bg: props.bg || alpha("var(--mantine-color-dark-9)", 0.65),
|
|
570
|
+
p: props.p || "sm",
|
|
571
|
+
style: {
|
|
572
|
+
borderRadius: theme.radius.xs,
|
|
573
|
+
boxShadow: theme.shadows.sm,
|
|
574
|
+
overflow: "hidden",
|
|
575
|
+
border: props.error ? `1px solid rgba(255, 100, 100, 0.8)` : "1px solid var(--mantine-color-dark-7)",
|
|
576
|
+
...props.style
|
|
577
|
+
},
|
|
578
|
+
variants: props.variants,
|
|
579
|
+
children: [
|
|
580
|
+
/* @__PURE__ */ jsxs(
|
|
581
|
+
Flex,
|
|
582
|
+
{
|
|
583
|
+
align: "center",
|
|
584
|
+
gap: "xs",
|
|
585
|
+
children: [
|
|
586
|
+
(props.title || props.description) && /* @__PURE__ */ jsxs(
|
|
587
|
+
Flex,
|
|
588
|
+
{
|
|
589
|
+
direction: "column",
|
|
590
|
+
gap: "xxs",
|
|
591
|
+
p: props.p == "0" ? "sm" : 0,
|
|
592
|
+
children: [
|
|
593
|
+
props.title && /* @__PURE__ */ jsx(
|
|
594
|
+
Text,
|
|
595
|
+
{
|
|
596
|
+
size: "sm",
|
|
597
|
+
style: {
|
|
598
|
+
lineHeight: "1.25vh",
|
|
599
|
+
fontFamily: "Akrobat Bold",
|
|
600
|
+
letterSpacing: "0.05em",
|
|
601
|
+
textTransform: "uppercase"
|
|
602
|
+
},
|
|
603
|
+
children: props.title
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
props.description && /* @__PURE__ */ jsx(
|
|
607
|
+
Text,
|
|
608
|
+
{
|
|
609
|
+
size: "xs",
|
|
610
|
+
c: "rgba(255, 255, 255, 0.8)",
|
|
611
|
+
fw: 400,
|
|
612
|
+
children: props.description
|
|
613
|
+
}
|
|
614
|
+
)
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
props.error && /* @__PURE__ */ jsx(
|
|
619
|
+
Text,
|
|
620
|
+
{
|
|
621
|
+
size: "xs",
|
|
622
|
+
c: theme.colors.red[9],
|
|
623
|
+
fw: 600,
|
|
624
|
+
mb: "auto",
|
|
625
|
+
lh: "0.8",
|
|
626
|
+
children: props.error
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
/* @__PURE__ */ jsx(
|
|
630
|
+
Flex,
|
|
631
|
+
{
|
|
632
|
+
ml: "auto",
|
|
633
|
+
children: props.rightSection
|
|
634
|
+
}
|
|
635
|
+
)
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
),
|
|
639
|
+
props.children
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
var useAudio = create(() => {
|
|
645
|
+
const audioRefs = {};
|
|
646
|
+
const sounds = {
|
|
647
|
+
click: clickSoundUrl,
|
|
648
|
+
hover: hoverSoundUrl
|
|
649
|
+
};
|
|
650
|
+
for (const [key, src] of Object.entries(sounds)) {
|
|
651
|
+
audioRefs[key] = new Audio(src);
|
|
652
|
+
}
|
|
653
|
+
return {
|
|
654
|
+
play: (sound) => {
|
|
655
|
+
const audio = audioRefs[sound];
|
|
656
|
+
if (!audio) return console.warn(`Sound '${sound}' not found.`);
|
|
657
|
+
audio.currentTime = 0;
|
|
658
|
+
audio.volume = 0.1;
|
|
659
|
+
audio.play();
|
|
660
|
+
},
|
|
661
|
+
stop: (sound) => {
|
|
662
|
+
const audio = audioRefs[sound];
|
|
663
|
+
if (!audio) return console.warn(`Sound '${sound}' not found.`);
|
|
664
|
+
audio.pause();
|
|
665
|
+
audio.currentTime = 0;
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
});
|
|
669
|
+
function SegmentedControl(props) {
|
|
670
|
+
const theme = useMantineTheme();
|
|
671
|
+
const play = useAudio((state) => state.play);
|
|
672
|
+
const handleChange = (newValue) => {
|
|
673
|
+
if (props.sounds) play("click");
|
|
674
|
+
if (props.onChange) {
|
|
675
|
+
props.onChange(newValue);
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
return /* @__PURE__ */ jsx(
|
|
679
|
+
Flex,
|
|
680
|
+
{
|
|
681
|
+
bg: "rgba(33, 33, 33, 0.6)",
|
|
682
|
+
w: props.w || "fit-content",
|
|
683
|
+
style: {
|
|
684
|
+
borderRadius: props.roundEdges !== false ? theme.radius.xs : 0,
|
|
685
|
+
overflow: "hidden"
|
|
686
|
+
},
|
|
687
|
+
...props,
|
|
688
|
+
children: props.items.map((item, index) => /* @__PURE__ */ jsx(
|
|
689
|
+
motion.div,
|
|
690
|
+
{
|
|
691
|
+
initial: { x: -100, opacity: 0 },
|
|
692
|
+
animate: { x: 0, opacity: 1 },
|
|
693
|
+
transition: { duration: 0.3, delay: index * 0.1, ease: "easeInOut" },
|
|
694
|
+
style: {
|
|
695
|
+
display: "flex",
|
|
696
|
+
flexDirection: "row",
|
|
697
|
+
alignItems: "center",
|
|
698
|
+
flex: 1
|
|
699
|
+
},
|
|
700
|
+
children: /* @__PURE__ */ jsx(
|
|
701
|
+
Segment,
|
|
702
|
+
{
|
|
703
|
+
label: item.label,
|
|
704
|
+
value: item.value,
|
|
705
|
+
icon: item.icon,
|
|
706
|
+
rightSection: item.rightSection,
|
|
707
|
+
fz: props.fz,
|
|
708
|
+
color: props.color,
|
|
709
|
+
selected: !props.multi ? props.value === item.value : Array.isArray(props.value) && props.value.includes(item.value),
|
|
710
|
+
onClick: () => {
|
|
711
|
+
if (props.multi) {
|
|
712
|
+
const newValue = Array.isArray(props.value) ? props.value.includes(item.value) ? props.value.filter((v) => v !== item.value) : [...props.value, item.value] : [item.value];
|
|
713
|
+
handleChange(newValue);
|
|
714
|
+
} else {
|
|
715
|
+
handleChange(item.value);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
item.value
|
|
720
|
+
)
|
|
721
|
+
},
|
|
722
|
+
index
|
|
723
|
+
))
|
|
724
|
+
}
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
function Segment(props) {
|
|
728
|
+
const theme = useMantineTheme();
|
|
729
|
+
return /* @__PURE__ */ jsxs(
|
|
730
|
+
MotionFlex,
|
|
731
|
+
{
|
|
732
|
+
onClick: props.onClick,
|
|
733
|
+
w: "100%",
|
|
734
|
+
direction: "column",
|
|
735
|
+
align: "center",
|
|
736
|
+
h: "100%",
|
|
737
|
+
bg: props.selected ? props.color ? alpha(props.color, 0.2) : colorWithAlpha(theme.colors[theme.primaryColor][theme.primaryShade], 0.2) : "transparent",
|
|
738
|
+
pos: "relative",
|
|
739
|
+
style: {
|
|
740
|
+
// position: "relative",
|
|
741
|
+
cursor: "pointer"
|
|
742
|
+
},
|
|
743
|
+
justify: "center",
|
|
744
|
+
whileHover: { scale: 1.05 },
|
|
745
|
+
whileTap: { scale: 0.95 },
|
|
746
|
+
children: [
|
|
747
|
+
/* @__PURE__ */ jsxs(
|
|
748
|
+
Flex,
|
|
749
|
+
{
|
|
750
|
+
align: "center",
|
|
751
|
+
gap: "xs",
|
|
752
|
+
p: "xs",
|
|
753
|
+
children: [
|
|
754
|
+
props.icon && /* @__PURE__ */ jsx(
|
|
755
|
+
MotionIcon,
|
|
756
|
+
{
|
|
757
|
+
icon: props.icon,
|
|
758
|
+
initial: {
|
|
759
|
+
color: props.selected ? props.color || theme.colors[theme.primaryColor][5] : "inherit"
|
|
760
|
+
},
|
|
761
|
+
animate: {
|
|
762
|
+
color: props.selected ? props.color || theme.colors[theme.primaryColor][5] : "inherit"
|
|
763
|
+
},
|
|
764
|
+
exit: {
|
|
765
|
+
color: "inherit"
|
|
766
|
+
},
|
|
767
|
+
style: {
|
|
768
|
+
fontSize: theme.fontSizes.xs,
|
|
769
|
+
marginBottom: "0.2vh"
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
/* @__PURE__ */ jsx(
|
|
774
|
+
MotionText,
|
|
775
|
+
{
|
|
776
|
+
size: props.fz || "xs",
|
|
777
|
+
initial: {
|
|
778
|
+
color: props.selected ? props.color || theme.colors[theme.primaryColor][5] : "rgba(255, 255, 255, 0.7)"
|
|
779
|
+
},
|
|
780
|
+
animate: {
|
|
781
|
+
color: props.selected ? props.color || theme.colors[theme.primaryColor][5] : "rgba(255, 255, 255, 0.7)"
|
|
782
|
+
},
|
|
783
|
+
exit: {
|
|
784
|
+
color: "rgba(255, 255, 255, 0.7)"
|
|
785
|
+
},
|
|
786
|
+
style: {
|
|
787
|
+
fontFamily: "Akrobat Bold",
|
|
788
|
+
letterSpacing: "0.1em",
|
|
789
|
+
textTransform: "uppercase"
|
|
790
|
+
},
|
|
791
|
+
children: props.label.toUpperCase()
|
|
792
|
+
}
|
|
793
|
+
),
|
|
794
|
+
props.rightSection
|
|
795
|
+
]
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
/* @__PURE__ */ jsx(
|
|
799
|
+
motion.div,
|
|
800
|
+
{
|
|
801
|
+
initial: false,
|
|
802
|
+
animate: {
|
|
803
|
+
scaleX: props.selected ? 1 : 0,
|
|
804
|
+
opacity: props.selected ? 1 : 0
|
|
805
|
+
},
|
|
806
|
+
transition: {
|
|
807
|
+
duration: 0.3,
|
|
808
|
+
ease: [0.4, 0, 0.2, 1]
|
|
809
|
+
// Custom easing curve for smooth feel
|
|
810
|
+
},
|
|
811
|
+
style: {
|
|
812
|
+
position: "absolute",
|
|
813
|
+
bottom: 0,
|
|
814
|
+
left: 0,
|
|
815
|
+
right: 0,
|
|
816
|
+
height: "0.2vh",
|
|
817
|
+
backgroundColor: props.color || theme.colors[theme.primaryColor][5],
|
|
818
|
+
transformOrigin: "center"
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
)
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
var NavigationContext = createContext(null);
|
|
827
|
+
function useNavigation(selector) {
|
|
828
|
+
const navigation = useContext(NavigationContext);
|
|
829
|
+
if (!navigation) {
|
|
830
|
+
throw new Error("useNavigation must be used within a NavigationProvider");
|
|
831
|
+
}
|
|
832
|
+
return useStore(navigation, selector);
|
|
833
|
+
}
|
|
834
|
+
function useNavigationStore() {
|
|
835
|
+
const navigation = useContext(NavigationContext);
|
|
836
|
+
if (!navigation) {
|
|
837
|
+
throw new Error("useNavigationStore must be used within a NavigationProvider");
|
|
838
|
+
}
|
|
839
|
+
return navigation;
|
|
840
|
+
}
|
|
841
|
+
function NavigationProvider({ children, defaultPage }) {
|
|
842
|
+
const storeRef = useRef(
|
|
843
|
+
create(() => ({
|
|
844
|
+
pageId: defaultPage || "home"
|
|
845
|
+
}))
|
|
846
|
+
);
|
|
847
|
+
return /* @__PURE__ */ jsx(NavigationContext.Provider, { value: storeRef.current, children });
|
|
848
|
+
}
|
|
849
|
+
function NavBar(props) {
|
|
850
|
+
const pageId = useNavigation((state) => state.pageId);
|
|
851
|
+
const store = useNavigationStore();
|
|
852
|
+
return /* @__PURE__ */ jsx(
|
|
853
|
+
SegmentedControl,
|
|
854
|
+
{
|
|
855
|
+
sounds: true,
|
|
856
|
+
w: "100%",
|
|
857
|
+
value: pageId,
|
|
858
|
+
items: props.items,
|
|
859
|
+
onChange: (value) => {
|
|
860
|
+
store.setState({ pageId: value });
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
);
|
|
864
|
+
}
|
|
865
|
+
var containerVariants = {
|
|
866
|
+
hidden: { opacity: 0 },
|
|
867
|
+
visible: {
|
|
868
|
+
opacity: 1,
|
|
869
|
+
transition: {
|
|
870
|
+
staggerChildren: 0.1,
|
|
871
|
+
delayChildren: 0.05
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
exit: {
|
|
875
|
+
opacity: 0,
|
|
876
|
+
transition: {
|
|
877
|
+
staggerChildren: 0.05,
|
|
878
|
+
staggerDirection: -1
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
var itemVariants = {
|
|
883
|
+
hidden: {
|
|
884
|
+
opacity: 0,
|
|
885
|
+
x: 20,
|
|
886
|
+
scale: 0.95
|
|
887
|
+
},
|
|
888
|
+
visible: {
|
|
889
|
+
opacity: 1,
|
|
890
|
+
x: 0,
|
|
891
|
+
scale: 1,
|
|
892
|
+
transition: {
|
|
893
|
+
type: "spring",
|
|
894
|
+
stiffness: 300,
|
|
895
|
+
damping: 24
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
exit: {
|
|
899
|
+
opacity: 0,
|
|
900
|
+
x: -10,
|
|
901
|
+
scale: 0.95,
|
|
902
|
+
transition: {
|
|
903
|
+
duration: 0.2
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
function SegmentedProgress(props) {
|
|
908
|
+
const progressPerSegment = 100 / props.segments;
|
|
909
|
+
const filledSegments = Math.floor(props.progress / progressPerSegment);
|
|
910
|
+
const partialFill = props.progress % progressPerSegment / progressPerSegment;
|
|
911
|
+
return /* @__PURE__ */ jsx(
|
|
912
|
+
MotionFlex,
|
|
913
|
+
{
|
|
914
|
+
w: "100%",
|
|
915
|
+
h: props.size || "1vh",
|
|
916
|
+
gap: "xs",
|
|
917
|
+
initial: "hidden",
|
|
918
|
+
animate: "visible",
|
|
919
|
+
variants: containerVariants,
|
|
920
|
+
children: [...Array(props.segments)].map((_, index) => {
|
|
921
|
+
const isFilled = index < filledSegments;
|
|
922
|
+
const isPartial = index === filledSegments;
|
|
923
|
+
return /* @__PURE__ */ jsx(
|
|
924
|
+
motion.div,
|
|
925
|
+
{
|
|
926
|
+
variants: itemVariants,
|
|
927
|
+
style: {
|
|
928
|
+
width: `${100 / props.segments}%`,
|
|
929
|
+
// Ensures equal width distribution
|
|
930
|
+
height: "100%",
|
|
931
|
+
background: isFilled ? "rgba(255, 255, 255, 0.8)" : isPartial ? `linear-gradient(to right, rgba(255, 255, 255, 0.8) ${partialFill * 100}%, rgba(255, 255, 255, 0.2) ${partialFill * 100}%)` : "rgba(255, 255, 255, 0.2)",
|
|
932
|
+
transition: "background 0.3s ease"
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
index
|
|
936
|
+
);
|
|
937
|
+
})
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
function Title(props) {
|
|
942
|
+
const game = useSettings((state) => state.game);
|
|
943
|
+
const theme = useMantineTheme();
|
|
944
|
+
return /* @__PURE__ */ jsx(
|
|
945
|
+
Flex,
|
|
946
|
+
{
|
|
947
|
+
direction: "column",
|
|
948
|
+
bg: props.bg || "transparent",
|
|
949
|
+
gap: "xs",
|
|
950
|
+
w: props.w || "100%",
|
|
951
|
+
p: props.p || "0",
|
|
952
|
+
style: {
|
|
953
|
+
userSelect: "none",
|
|
954
|
+
borderBottom: props.removeBorder ? "none" : `0.2vh solid ${props.borderColor || colorWithAlpha(theme.colors[theme.primaryColor][9], 0.5)}`
|
|
955
|
+
},
|
|
956
|
+
children: /* @__PURE__ */ jsxs(
|
|
957
|
+
Flex,
|
|
958
|
+
{
|
|
959
|
+
align: "center",
|
|
960
|
+
justify: "center",
|
|
961
|
+
children: [
|
|
962
|
+
/* @__PURE__ */ jsxs(
|
|
963
|
+
Flex,
|
|
964
|
+
{
|
|
965
|
+
align: "center",
|
|
966
|
+
gap: "sm",
|
|
967
|
+
pr: "xs",
|
|
968
|
+
children: [
|
|
969
|
+
/* @__PURE__ */ jsx(
|
|
970
|
+
BorderedIcon,
|
|
971
|
+
{
|
|
972
|
+
icon: props.icon,
|
|
973
|
+
fontSize: theme.fontSizes.md,
|
|
974
|
+
color: props.iconColor
|
|
975
|
+
}
|
|
976
|
+
),
|
|
977
|
+
/* @__PURE__ */ jsxs(
|
|
978
|
+
Flex,
|
|
979
|
+
{
|
|
980
|
+
direction: "column",
|
|
981
|
+
gap: "0.25vh",
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ jsx(Text, { p: "0", size: "sm", style: {
|
|
984
|
+
lineHeight: theme.fontSizes.md,
|
|
985
|
+
fontFamily: game == "fivem" ? "Akrobat Bold" : "Red Dead",
|
|
986
|
+
letterSpacing: "0.05em",
|
|
987
|
+
textTransform: "uppercase"
|
|
988
|
+
}, children: props.title }),
|
|
989
|
+
/* @__PURE__ */ jsx(
|
|
990
|
+
Text,
|
|
991
|
+
{
|
|
992
|
+
size: "xs",
|
|
993
|
+
c: "grey",
|
|
994
|
+
style: { whiteSpace: "normal", wordWrap: "break-word" },
|
|
995
|
+
children: props.description
|
|
996
|
+
}
|
|
997
|
+
)
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
)
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
),
|
|
1004
|
+
/* @__PURE__ */ jsx(
|
|
1005
|
+
Flex,
|
|
1006
|
+
{
|
|
1007
|
+
ml: "auto",
|
|
1008
|
+
align: "center",
|
|
1009
|
+
gap: "xs",
|
|
1010
|
+
children: props.rightSection
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
)
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
function LevelBanner(props) {
|
|
1020
|
+
return /* @__PURE__ */ jsxs(
|
|
1021
|
+
MotionFlex,
|
|
1022
|
+
{
|
|
1023
|
+
w: "35vh",
|
|
1024
|
+
pos: "absolute",
|
|
1025
|
+
left: "50%",
|
|
1026
|
+
align: "center",
|
|
1027
|
+
gap: "xs",
|
|
1028
|
+
style: {
|
|
1029
|
+
borderRadius: useMantineTheme().radius.xxs
|
|
1030
|
+
},
|
|
1031
|
+
initial: { opacity: 0, y: -10, transform: "translateX(-50%)" },
|
|
1032
|
+
animate: { opacity: 1, y: 0, transform: "translateX(-50%)" },
|
|
1033
|
+
exit: { opacity: 0, y: -10, transform: "translateX(-50%)" },
|
|
1034
|
+
transition: { duration: 0.3 },
|
|
1035
|
+
direction: "column",
|
|
1036
|
+
children: [
|
|
1037
|
+
/* @__PURE__ */ jsxs(
|
|
1038
|
+
Flex,
|
|
1039
|
+
{
|
|
1040
|
+
w: "100%",
|
|
1041
|
+
justify: "space-between",
|
|
1042
|
+
children: [
|
|
1043
|
+
/* @__PURE__ */ jsxs(
|
|
1044
|
+
Text,
|
|
1045
|
+
{
|
|
1046
|
+
size: "xxs",
|
|
1047
|
+
c: "rgba(255, 255, 255, 0.9)",
|
|
1048
|
+
style: {
|
|
1049
|
+
fontFamily: "Akrobat Bold",
|
|
1050
|
+
letterSpacing: "0.1em"
|
|
1051
|
+
},
|
|
1052
|
+
children: [
|
|
1053
|
+
"LVL ",
|
|
1054
|
+
props.level
|
|
1055
|
+
]
|
|
1056
|
+
}
|
|
1057
|
+
),
|
|
1058
|
+
/* @__PURE__ */ jsxs(
|
|
1059
|
+
Text,
|
|
1060
|
+
{
|
|
1061
|
+
size: "xxs",
|
|
1062
|
+
c: "rgba(255, 255, 255, 0.7)",
|
|
1063
|
+
style: {
|
|
1064
|
+
fontFamily: "Akrobat Bold",
|
|
1065
|
+
letterSpacing: "0.1em"
|
|
1066
|
+
},
|
|
1067
|
+
children: [
|
|
1068
|
+
props.exp,
|
|
1069
|
+
"/",
|
|
1070
|
+
props.nextLevelXP,
|
|
1071
|
+
" XP"
|
|
1072
|
+
]
|
|
1073
|
+
}
|
|
1074
|
+
),
|
|
1075
|
+
/* @__PURE__ */ jsxs(
|
|
1076
|
+
Text,
|
|
1077
|
+
{
|
|
1078
|
+
size: "xxs",
|
|
1079
|
+
c: "rgba(255, 255, 255, 0.7)",
|
|
1080
|
+
style: {
|
|
1081
|
+
fontFamily: "Akrobat Bold",
|
|
1082
|
+
letterSpacing: "0.1em"
|
|
1083
|
+
},
|
|
1084
|
+
children: [
|
|
1085
|
+
"LVL ",
|
|
1086
|
+
props.level + 1
|
|
1087
|
+
]
|
|
1088
|
+
}
|
|
1089
|
+
)
|
|
1090
|
+
]
|
|
1091
|
+
}
|
|
1092
|
+
),
|
|
1093
|
+
/* @__PURE__ */ jsx(
|
|
1094
|
+
Progress,
|
|
1095
|
+
{
|
|
1096
|
+
color: props.color,
|
|
1097
|
+
w: "100%",
|
|
1098
|
+
size: "sm",
|
|
1099
|
+
value: props.progressToLevel
|
|
1100
|
+
}
|
|
1101
|
+
)
|
|
1102
|
+
]
|
|
1103
|
+
}
|
|
1104
|
+
);
|
|
1105
|
+
}
|
|
1106
|
+
function LevelPanel(props) {
|
|
1107
|
+
const theme = useMantineTheme();
|
|
1108
|
+
return /* @__PURE__ */ jsxs(
|
|
1109
|
+
Flex,
|
|
1110
|
+
{
|
|
1111
|
+
w: "fit-content",
|
|
1112
|
+
pr: "8vh",
|
|
1113
|
+
pl: "8vh",
|
|
1114
|
+
bg: "linear-gradient(180deg, rgba(30, 30, 30, 0.82) 0%, rgba(30, 30, 30, 0.3) 50%, rgba(30, 30, 30, 0.6) 100%)",
|
|
1115
|
+
style: {
|
|
1116
|
+
borderRadius: theme.radius.xs,
|
|
1117
|
+
boxShadow: theme.shadows.sm,
|
|
1118
|
+
outline: "0.2vh solid rgba(255,255,255,0.1)"
|
|
1119
|
+
},
|
|
1120
|
+
justify: "center",
|
|
1121
|
+
align: "center",
|
|
1122
|
+
direction: "column",
|
|
1123
|
+
p: "sm",
|
|
1124
|
+
children: [
|
|
1125
|
+
/* @__PURE__ */ jsx(
|
|
1126
|
+
RingProgress,
|
|
1127
|
+
{
|
|
1128
|
+
size: 190,
|
|
1129
|
+
roundCaps: true,
|
|
1130
|
+
thickness: 10,
|
|
1131
|
+
sections: [{ value: props.progressToLevel, color: alpha(props.color || theme.colors[theme.primaryColor][theme.primaryShade], 0.9) }],
|
|
1132
|
+
label: /* @__PURE__ */ jsx(
|
|
1133
|
+
Flex,
|
|
1134
|
+
{
|
|
1135
|
+
justify: "center",
|
|
1136
|
+
align: "center",
|
|
1137
|
+
direction: "column",
|
|
1138
|
+
children: /* @__PURE__ */ jsx(
|
|
1139
|
+
Text,
|
|
1140
|
+
{
|
|
1141
|
+
size: "6vh",
|
|
1142
|
+
c: alpha(props.color || theme.colors[theme.primaryColor][theme.primaryShade], 0.9),
|
|
1143
|
+
style: {
|
|
1144
|
+
fontFamily: "Akrobat Black",
|
|
1145
|
+
textShadow: `0 0 10px ${alpha(props.color || theme.colors[theme.primaryColor][theme.primaryShade], 0.7)}`
|
|
1146
|
+
},
|
|
1147
|
+
children: props.level
|
|
1148
|
+
}
|
|
1149
|
+
)
|
|
1150
|
+
}
|
|
1151
|
+
)
|
|
1152
|
+
}
|
|
1153
|
+
),
|
|
1154
|
+
/* @__PURE__ */ jsx(
|
|
1155
|
+
Text,
|
|
1156
|
+
{
|
|
1157
|
+
size: "sm",
|
|
1158
|
+
style: {
|
|
1159
|
+
fontFamily: "Akrobat Black",
|
|
1160
|
+
letterSpacing: "0.05em",
|
|
1161
|
+
textTransform: "uppercase"
|
|
1162
|
+
},
|
|
1163
|
+
children: props.text || locale("Level")
|
|
1164
|
+
}
|
|
1165
|
+
),
|
|
1166
|
+
/* @__PURE__ */ jsxs(
|
|
1167
|
+
Text,
|
|
1168
|
+
{
|
|
1169
|
+
size: "xs",
|
|
1170
|
+
c: "rgba(255,255,255,0.6)",
|
|
1171
|
+
children: [
|
|
1172
|
+
props.exp,
|
|
1173
|
+
"/",
|
|
1174
|
+
props.nextLevelXP,
|
|
1175
|
+
" ",
|
|
1176
|
+
locale("EXP")
|
|
1177
|
+
]
|
|
1178
|
+
}
|
|
1179
|
+
)
|
|
1180
|
+
]
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
var ModalContext = createContext(null);
|
|
1185
|
+
function useModal(selector) {
|
|
1186
|
+
const modal = useContext(ModalContext);
|
|
1187
|
+
if (!modal) {
|
|
1188
|
+
throw new Error("useModal must be used within a ModalProvider");
|
|
1189
|
+
}
|
|
1190
|
+
return useStore(modal, selector);
|
|
1191
|
+
}
|
|
1192
|
+
function ModalProvider({ children, defaultPage }) {
|
|
1193
|
+
const storeRef = useRef(
|
|
1194
|
+
create(() => ({
|
|
1195
|
+
active: null
|
|
1196
|
+
}))
|
|
1197
|
+
);
|
|
1198
|
+
return /* @__PURE__ */ jsxs(ModalContext.Provider, { value: storeRef.current, children: [
|
|
1199
|
+
/* @__PURE__ */ jsx(Modal, {}),
|
|
1200
|
+
children
|
|
1201
|
+
] });
|
|
1202
|
+
}
|
|
1203
|
+
function useModalActions() {
|
|
1204
|
+
const modal = useContext(ModalContext);
|
|
1205
|
+
if (!modal) throw new Error("useModalActions must be used within a ModalProvider");
|
|
1206
|
+
const showModal = (openModal) => {
|
|
1207
|
+
modal.setState({ active: openModal });
|
|
1208
|
+
};
|
|
1209
|
+
const hideModal = () => {
|
|
1210
|
+
modal.setState({ active: null });
|
|
1211
|
+
};
|
|
1212
|
+
return { showModal, hideModal };
|
|
1213
|
+
}
|
|
1214
|
+
function Modal() {
|
|
1215
|
+
const active = useModal((state) => state.active);
|
|
1216
|
+
const { hideModal } = useModalActions();
|
|
1217
|
+
const ref = useClickOutside(() => {
|
|
1218
|
+
if (!active) return;
|
|
1219
|
+
if (active.clickOutside == false) return;
|
|
1220
|
+
if (active) {
|
|
1221
|
+
hideModal();
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
const theme = useMantineTheme();
|
|
1225
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: active && /* @__PURE__ */ jsx(
|
|
1226
|
+
MotionFlex,
|
|
1227
|
+
{
|
|
1228
|
+
h: "100%",
|
|
1229
|
+
w: "100%",
|
|
1230
|
+
bg: "rgba(0, 0, 0, 0.3)",
|
|
1231
|
+
pos: "absolute",
|
|
1232
|
+
style: {
|
|
1233
|
+
zIndex: 2e3,
|
|
1234
|
+
filter: "drop-shadow(0 0 2vh black)"
|
|
1235
|
+
},
|
|
1236
|
+
initial: { opacity: 0 },
|
|
1237
|
+
animate: { opacity: 1 },
|
|
1238
|
+
exit: { opacity: 0 },
|
|
1239
|
+
align: "center",
|
|
1240
|
+
justify: "center",
|
|
1241
|
+
children: /* @__PURE__ */ jsxs(
|
|
1242
|
+
MotionFlex,
|
|
1243
|
+
{
|
|
1244
|
+
pos: "absolute",
|
|
1245
|
+
top: "50%",
|
|
1246
|
+
left: "50%",
|
|
1247
|
+
ref,
|
|
1248
|
+
w: active.width || "40%",
|
|
1249
|
+
style: {
|
|
1250
|
+
transform: "translate(-50%, -50%)",
|
|
1251
|
+
borderRadius: theme.radius.xs,
|
|
1252
|
+
boxShadow: theme.shadows.xl,
|
|
1253
|
+
zIndex: 2100
|
|
1254
|
+
},
|
|
1255
|
+
bg: "rgba(48, 48, 48, 0.84)",
|
|
1256
|
+
initial: { scale: 0.8, opacity: 0, transform: "translate(-50%, -50%)" },
|
|
1257
|
+
animate: { scale: 1, opacity: 1, transform: "translate(-50%, -50%)" },
|
|
1258
|
+
exit: { scale: 0.8, opacity: 0, transform: "translate(-50%, -50%)" },
|
|
1259
|
+
p: "sm",
|
|
1260
|
+
direction: "column",
|
|
1261
|
+
maw: "70%",
|
|
1262
|
+
gap: "xs",
|
|
1263
|
+
children: [
|
|
1264
|
+
/* @__PURE__ */ jsxs(
|
|
1265
|
+
Flex,
|
|
1266
|
+
{
|
|
1267
|
+
direction: "column",
|
|
1268
|
+
w: "100%",
|
|
1269
|
+
children: [
|
|
1270
|
+
/* @__PURE__ */ jsxs(
|
|
1271
|
+
Flex,
|
|
1272
|
+
{
|
|
1273
|
+
w: "100%",
|
|
1274
|
+
align: "center",
|
|
1275
|
+
gap: "xs",
|
|
1276
|
+
children: [
|
|
1277
|
+
active.icon && /* @__PURE__ */ jsx(
|
|
1278
|
+
FontAwesomeIcon,
|
|
1279
|
+
{
|
|
1280
|
+
icon: active.icon,
|
|
1281
|
+
style: {
|
|
1282
|
+
fontSize: theme.fontSizes.xs
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
),
|
|
1286
|
+
/* @__PURE__ */ jsx(
|
|
1287
|
+
Text,
|
|
1288
|
+
{
|
|
1289
|
+
size: "sm",
|
|
1290
|
+
children: active.title
|
|
1291
|
+
}
|
|
1292
|
+
),
|
|
1293
|
+
/* @__PURE__ */ jsx(
|
|
1294
|
+
MotionIcon,
|
|
1295
|
+
{
|
|
1296
|
+
icon: "times",
|
|
1297
|
+
color: "rgba(255, 255, 255, 0.7)",
|
|
1298
|
+
whileHover: {
|
|
1299
|
+
scale: 1.1,
|
|
1300
|
+
filter: "brightness(1.2)"
|
|
1301
|
+
},
|
|
1302
|
+
style: {
|
|
1303
|
+
marginLeft: "auto",
|
|
1304
|
+
cursor: "pointer",
|
|
1305
|
+
fontSize: theme.fontSizes.sm
|
|
1306
|
+
},
|
|
1307
|
+
onClick: () => {
|
|
1308
|
+
hideModal();
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
)
|
|
1312
|
+
]
|
|
1313
|
+
}
|
|
1314
|
+
),
|
|
1315
|
+
active.description && /* @__PURE__ */ jsx(
|
|
1316
|
+
Text,
|
|
1317
|
+
{
|
|
1318
|
+
size: "xs",
|
|
1319
|
+
c: "rgba(255, 255, 255, 0.7)",
|
|
1320
|
+
children: active.description
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
),
|
|
1326
|
+
active.children
|
|
1327
|
+
]
|
|
1328
|
+
}
|
|
1329
|
+
)
|
|
1330
|
+
}
|
|
1331
|
+
) });
|
|
1332
|
+
}
|
|
1333
|
+
function PromptModal(props) {
|
|
1334
|
+
const theme = useMantineTheme();
|
|
1335
|
+
return /* @__PURE__ */ jsxs(
|
|
1336
|
+
MotionFlex,
|
|
1337
|
+
{
|
|
1338
|
+
gap: "sm",
|
|
1339
|
+
direction: "column",
|
|
1340
|
+
flex: 1,
|
|
1341
|
+
children: [
|
|
1342
|
+
/* @__PURE__ */ jsx(
|
|
1343
|
+
Text,
|
|
1344
|
+
{
|
|
1345
|
+
size: "xs",
|
|
1346
|
+
c: "rgba(255, 255, 255, 0.8)",
|
|
1347
|
+
children: props.message
|
|
1348
|
+
}
|
|
1349
|
+
),
|
|
1350
|
+
/* @__PURE__ */ jsx(
|
|
1351
|
+
Flex,
|
|
1352
|
+
{
|
|
1353
|
+
gap: "sm",
|
|
1354
|
+
children: props.buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
1355
|
+
Button,
|
|
1356
|
+
{
|
|
1357
|
+
variant: button.variant,
|
|
1358
|
+
color: button.color,
|
|
1359
|
+
flex: 0.5,
|
|
1360
|
+
onClick: button.onClick,
|
|
1361
|
+
leftSection: button.icon ? /* @__PURE__ */ jsx(
|
|
1362
|
+
FontAwesomeIcon,
|
|
1363
|
+
{
|
|
1364
|
+
icon: button.icon,
|
|
1365
|
+
style: {
|
|
1366
|
+
fontSize: theme.fontSizes.xs
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
) : void 0,
|
|
1370
|
+
children: button.text
|
|
1371
|
+
},
|
|
1372
|
+
index
|
|
1373
|
+
))
|
|
1374
|
+
}
|
|
1375
|
+
)
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export { BorderedIcon, Counter, FloatingParticles, InfoBox, InputContainer, LevelBanner, LevelPanel, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PromptModal, SegmentedControl, SegmentedProgress, Title, useModal, useModalActions, useNavigation, useNavigationStore };
|
|
1382
|
+
//# sourceMappingURL=index.js.map
|
|
1383
|
+
//# sourceMappingURL=index.js.map
|