dirk-cfx-react 1.1.0 → 1.1.2

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