@mbpockets/shared-ui 0.1.18 → 0.1.20
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/EventPage/editMode/index.cjs +28 -11
- package/dist/EventPage/editMode/index.cjs.map +1 -1
- package/dist/EventPage/editMode/index.mjs +29 -12
- package/dist/EventPage/editMode/index.mjs.map +1 -1
- package/dist/EventPage/editMode.cjs +28 -11
- package/dist/EventPage/editMode.cjs.map +1 -1
- package/dist/EventPage/editMode.mjs +29 -12
- package/dist/EventPage/editMode.mjs.map +1 -1
- package/dist/EventPage/index.cjs +28 -11
- package/dist/EventPage/index.cjs.map +1 -1
- package/dist/EventPage/index.mjs +30 -13
- package/dist/EventPage/index.mjs.map +1 -1
- package/dist/EventPage.cjs +28 -11
- package/dist/EventPage.cjs.map +1 -1
- package/dist/EventPage.mjs +30 -13
- package/dist/EventPage.mjs.map +1 -1
- package/dist/PlayerPage/index.cjs +311 -99
- package/dist/PlayerPage/index.cjs.map +1 -1
- package/dist/PlayerPage/index.d.cts +1 -1
- package/dist/PlayerPage/index.d.ts +1 -1
- package/dist/PlayerPage/index.mjs +310 -98
- package/dist/PlayerPage/index.mjs.map +1 -1
- package/dist/PlayerPage.cjs +311 -99
- package/dist/PlayerPage.cjs.map +1 -1
- package/dist/PlayerPage.d.cts +24 -6
- package/dist/PlayerPage.d.ts +24 -6
- package/dist/PlayerPage.mjs +310 -98
- package/dist/PlayerPage.mjs.map +1 -1
- package/dist/ProfilePage/index.cjs +509 -63
- package/dist/ProfilePage/index.cjs.map +1 -1
- package/dist/ProfilePage/index.d.cts +2 -1
- package/dist/ProfilePage/index.d.ts +2 -1
- package/dist/ProfilePage/index.mjs +504 -58
- package/dist/ProfilePage/index.mjs.map +1 -1
- package/dist/ProfilePage.cjs +509 -63
- package/dist/ProfilePage.cjs.map +1 -1
- package/dist/ProfilePage.d.cts +4 -10
- package/dist/ProfilePage.d.ts +4 -10
- package/dist/ProfilePage.mjs +504 -58
- package/dist/ProfilePage.mjs.map +1 -1
- package/dist/SearchPage/Results/index.cjs +28 -11
- package/dist/SearchPage/Results/index.cjs.map +1 -1
- package/dist/SearchPage/Results/index.mjs +30 -13
- package/dist/SearchPage/Results/index.mjs.map +1 -1
- package/dist/SearchPage/Results.cjs +28 -11
- package/dist/SearchPage/Results.cjs.map +1 -1
- package/dist/SearchPage/Results.mjs +30 -13
- package/dist/SearchPage/Results.mjs.map +1 -1
- package/dist/SearchPage/index.cjs +28 -11
- package/dist/SearchPage/index.cjs.map +1 -1
- package/dist/SearchPage/index.mjs +30 -13
- package/dist/SearchPage/index.mjs.map +1 -1
- package/dist/SearchPage.cjs +28 -11
- package/dist/SearchPage.cjs.map +1 -1
- package/dist/SearchPage.mjs +30 -13
- package/dist/SearchPage.mjs.map +1 -1
- package/dist/TablePage/index.cjs +32 -31
- package/dist/TablePage/index.cjs.map +1 -1
- package/dist/TablePage/index.mjs +32 -31
- package/dist/TablePage/index.mjs.map +1 -1
- package/dist/TablePage/players/index.cjs +28 -11
- package/dist/TablePage/players/index.cjs.map +1 -1
- package/dist/TablePage/players/index.mjs +28 -11
- package/dist/TablePage/players/index.mjs.map +1 -1
- package/dist/TablePage/players.cjs +28 -11
- package/dist/TablePage/players.cjs.map +1 -1
- package/dist/TablePage/players.mjs +28 -11
- package/dist/TablePage/players.mjs.map +1 -1
- package/dist/TablePage.cjs +32 -31
- package/dist/TablePage.cjs.map +1 -1
- package/dist/TablePage.mjs +32 -31
- package/dist/TablePage.mjs.map +1 -1
- package/dist/common/index.cjs +38 -36
- package/dist/common/index.cjs.map +1 -1
- package/dist/common/index.d.cts +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.mjs +39 -38
- package/dist/common/index.mjs.map +1 -1
- package/dist/common.cjs +38 -36
- package/dist/common.cjs.map +1 -1
- package/dist/common.d.cts +6 -1
- package/dist/common.d.ts +6 -1
- package/dist/common.mjs +39 -38
- package/dist/common.mjs.map +1 -1
- package/dist/index.cjs +373 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +370 -198
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -1,72 +1,454 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Card, CardContent, Typography, CardMedia, CardHeader, TextField, useTheme, useMediaQuery, NoSsr, Box, Grid } from '@mui/material';
|
|
3
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
3
5
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
4
|
-
import Card from '@mui/material/Card';
|
|
5
|
-
import CardContent from '@mui/material/CardContent';
|
|
6
|
-
import CardHeader from '@mui/material/CardHeader';
|
|
7
|
-
import Grid from '@mui/material/Grid';
|
|
8
6
|
import Popper from '@mui/material/Popper';
|
|
9
|
-
import TextField from '@mui/material/TextField';
|
|
10
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
7
|
|
|
12
|
-
// src/components/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
// src/components/PlayerPage/PlayerDetailsCard.tsx
|
|
9
|
+
var PlayerDetailsCard = ({
|
|
10
|
+
preferredPronouns,
|
|
11
|
+
age,
|
|
12
|
+
yearsPlaying,
|
|
13
|
+
discordUsername,
|
|
14
|
+
preferredGames
|
|
15
|
+
}) => {
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
Card,
|
|
18
|
+
{
|
|
19
|
+
sx: {
|
|
20
|
+
margin: "1rem",
|
|
21
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
22
|
+
// Primary Blue Gradient
|
|
23
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
24
|
+
// Deep shadow based on the color
|
|
25
|
+
borderRadius: "12px",
|
|
26
|
+
// Rounded corners
|
|
27
|
+
color: "#FFFFFF",
|
|
28
|
+
// White as the base text color for contrast
|
|
29
|
+
position: "relative",
|
|
30
|
+
overflow: "hidden"
|
|
31
|
+
// Ensures clean edges
|
|
32
|
+
},
|
|
33
|
+
className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: "absolute inset-0 bg-gradient-to-t from-white/10 to-transparent opacity-60",
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "relative p-6", children: [
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
Typography,
|
|
45
|
+
{
|
|
46
|
+
variant: "h5",
|
|
47
|
+
className: "font-bold uppercase text-center tracking-wide mb-4",
|
|
48
|
+
sx: {
|
|
49
|
+
color: "#FFFFFF",
|
|
50
|
+
// Bright white for high contrast
|
|
51
|
+
textShadow: "0px 4px 8px rgba(0, 0, 0, 0.5)",
|
|
52
|
+
// Stronger shadow for bold presence
|
|
53
|
+
fontSize: "1.5rem"
|
|
54
|
+
// Slightly larger title size
|
|
55
|
+
},
|
|
56
|
+
children: "Player Details"
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
60
|
+
preferredPronouns && /* @__PURE__ */ jsxs(
|
|
61
|
+
Typography,
|
|
62
|
+
{
|
|
63
|
+
variant: "body2",
|
|
64
|
+
className: "text-sm font-medium",
|
|
65
|
+
sx: {
|
|
66
|
+
color: "#FFFFFF",
|
|
67
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
68
|
+
fontWeight: "bold"
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Preferred Pronouns:" }),
|
|
72
|
+
" ",
|
|
73
|
+
preferredPronouns
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
age !== null && /* @__PURE__ */ jsxs(
|
|
78
|
+
Typography,
|
|
79
|
+
{
|
|
80
|
+
variant: "body2",
|
|
81
|
+
className: "text-sm font-medium",
|
|
82
|
+
sx: {
|
|
83
|
+
color: "#FFFFFF",
|
|
84
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
85
|
+
fontWeight: "bold"
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Age:" }),
|
|
89
|
+
" ",
|
|
90
|
+
age
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
yearsPlaying !== null && /* @__PURE__ */ jsxs(
|
|
95
|
+
Typography,
|
|
96
|
+
{
|
|
97
|
+
variant: "body2",
|
|
98
|
+
className: "text-sm font-medium",
|
|
99
|
+
sx: {
|
|
100
|
+
color: "#FFFFFF",
|
|
101
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
102
|
+
fontWeight: "bold"
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Years Playing:" }),
|
|
106
|
+
" ",
|
|
107
|
+
yearsPlaying
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
discordUsername && /* @__PURE__ */ jsxs(
|
|
112
|
+
Typography,
|
|
113
|
+
{
|
|
114
|
+
variant: "body2",
|
|
115
|
+
className: "text-sm font-medium",
|
|
116
|
+
sx: {
|
|
117
|
+
color: "#FFFFFF",
|
|
118
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
119
|
+
fontWeight: "bold"
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Discord Username:" }),
|
|
123
|
+
" ",
|
|
124
|
+
discordUsername
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
preferredGames && /* @__PURE__ */ jsxs(
|
|
129
|
+
Typography,
|
|
130
|
+
{
|
|
131
|
+
variant: "body2",
|
|
132
|
+
className: "text-sm font-medium",
|
|
133
|
+
sx: {
|
|
134
|
+
color: "#FFFFFF",
|
|
135
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
136
|
+
fontWeight: "bold"
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Preferred Games:" }),
|
|
140
|
+
" ",
|
|
141
|
+
Array.isArray(preferredGames) ? preferredGames.join(", ") : preferredGames
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] }),
|
|
146
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsx(
|
|
147
|
+
Typography,
|
|
148
|
+
{
|
|
149
|
+
variant: "caption",
|
|
150
|
+
className: "text-xs italic",
|
|
151
|
+
sx: {
|
|
152
|
+
color: "#BBDEFB",
|
|
153
|
+
// Subtle light blue for footer text
|
|
154
|
+
textShadow: "0px 1px 3px rgba(0, 0, 0, 0.2)"
|
|
155
|
+
},
|
|
156
|
+
children: "All information is player-submitted."
|
|
157
|
+
}
|
|
158
|
+
) })
|
|
159
|
+
] })
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
var PlayerDetailsCard_default = PlayerDetailsCard;
|
|
165
|
+
|
|
166
|
+
// src/data/values.tsx
|
|
167
|
+
var ProfilePictureSettings = {
|
|
168
|
+
aspectRatio: 4 / 5};
|
|
169
|
+
var PlayerDisplayCard = ({ profilePicture, username, bio, preferredPronouns }) => {
|
|
170
|
+
const defaultImg = "/man-walking-silhouette-clipart.jpg";
|
|
171
|
+
const [imageSrc, setImageSrc] = useState(defaultImg);
|
|
172
|
+
const { aspectRatio } = ProfilePictureSettings;
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
async function validateImage() {
|
|
175
|
+
const newImage = profilePicture || defaultImg;
|
|
176
|
+
if (!profilePicture) {
|
|
177
|
+
setImageSrc(defaultImg);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const img = new Image();
|
|
181
|
+
img.src = newImage;
|
|
182
|
+
img.onload = () => {
|
|
183
|
+
setImageSrc(newImage);
|
|
184
|
+
};
|
|
185
|
+
img.onerror = () => {
|
|
186
|
+
setImageSrc(defaultImg);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
validateImage();
|
|
190
|
+
}, [profilePicture]);
|
|
191
|
+
return /* @__PURE__ */ jsxs(
|
|
192
|
+
Card,
|
|
193
|
+
{
|
|
194
|
+
sx: {
|
|
195
|
+
margin: "1rem",
|
|
196
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
197
|
+
// Vibrant blue gradient
|
|
198
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
199
|
+
// Blue shadow to add depth
|
|
200
|
+
borderRadius: "12px",
|
|
201
|
+
// Smooth rounded corners
|
|
202
|
+
color: "#FFFFFF",
|
|
203
|
+
// White text for high contrast
|
|
204
|
+
overflow: "hidden"
|
|
205
|
+
// Clean edges
|
|
206
|
+
},
|
|
207
|
+
className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl",
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ jsx(
|
|
210
|
+
CardMedia,
|
|
211
|
+
{
|
|
212
|
+
component: "img",
|
|
213
|
+
image: imageSrc,
|
|
214
|
+
alt: `${username}'s Profile Picture`,
|
|
215
|
+
sx: {
|
|
216
|
+
aspectRatio,
|
|
217
|
+
height: "auto",
|
|
218
|
+
// Updates to maintain aspect ratio and fill space nicely
|
|
219
|
+
width: "100%",
|
|
220
|
+
objectFit: "cover"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "relative p-6", children: [
|
|
225
|
+
/* @__PURE__ */ jsx(
|
|
226
|
+
Typography,
|
|
227
|
+
{
|
|
228
|
+
variant: "h5",
|
|
229
|
+
component: "div",
|
|
230
|
+
className: "font-bold text-lg uppercase text-center tracking-wide mb-2",
|
|
231
|
+
sx: {
|
|
232
|
+
color: "#FFFFFF",
|
|
233
|
+
// Pure white for username
|
|
234
|
+
fontSize: "1.5rem",
|
|
235
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)"
|
|
236
|
+
// Strong shadow for visibility
|
|
237
|
+
},
|
|
238
|
+
children: username
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
preferredPronouns && /* @__PURE__ */ jsx(
|
|
242
|
+
Typography,
|
|
243
|
+
{
|
|
244
|
+
variant: "body2",
|
|
245
|
+
className: "text-sm font-medium",
|
|
246
|
+
sx: {
|
|
247
|
+
color: "#E3F2FD",
|
|
248
|
+
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
249
|
+
// Subtle shadow for readability
|
|
250
|
+
fontWeight: "bold",
|
|
251
|
+
// Emphasize key details
|
|
252
|
+
marginBottom: "1rem"
|
|
253
|
+
},
|
|
254
|
+
children: preferredPronouns
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
bio && /* @__PURE__ */ jsx(
|
|
258
|
+
Typography,
|
|
259
|
+
{
|
|
260
|
+
variant: "body2",
|
|
261
|
+
className: "text-sm font-light",
|
|
262
|
+
sx: {
|
|
263
|
+
color: "#E3F2FD",
|
|
264
|
+
// Softer muted tone for secondary text
|
|
265
|
+
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
266
|
+
// Subtle shadow for readability
|
|
267
|
+
fontStyle: "italic"
|
|
268
|
+
// Distinguish bio visually
|
|
269
|
+
},
|
|
270
|
+
children: bio
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] })
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
};
|
|
278
|
+
var PlayerDisplayCard_default = PlayerDisplayCard;
|
|
279
|
+
function Chip({ tag, removeCallback }) {
|
|
280
|
+
var _a;
|
|
281
|
+
const color = (_a = tag.color) != null ? _a : "#bfbcbb";
|
|
282
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
283
|
+
"span",
|
|
284
|
+
{
|
|
285
|
+
className: "inline-block text-sm px-3 py-1 rounded-full border-2 font-outlined text-white m-0.5 font-stretch-105% font-sans",
|
|
286
|
+
style: {
|
|
287
|
+
borderColor: `color-mix(in srgb, ${color}, black 50%)`,
|
|
288
|
+
background: `linear-gradient(160deg, color-mix(in srgb, ${color}, white 10%) 0%, color-mix(in srgb, ${color}, black 60%) 100%)`,
|
|
289
|
+
textShadow: "black 1.5px 1px 1.5px",
|
|
290
|
+
filter: `drop-shadow(2px 2px 1.5px color-mix(in srgb, ${color}, black 80%))`
|
|
291
|
+
},
|
|
292
|
+
children: [
|
|
293
|
+
tag.label,
|
|
294
|
+
removeCallback && /* @__PURE__ */ jsx(
|
|
295
|
+
"button",
|
|
296
|
+
{
|
|
297
|
+
type: "button",
|
|
298
|
+
onClick: () => removeCallback(tag.id),
|
|
299
|
+
className: "ml-2 text-white hover:text-red-700 focus:outline-none pl-0.5 pr-1 cursor-pointer hover:bg-white rounded-full",
|
|
300
|
+
style: {
|
|
301
|
+
textShadow: "black 1px 1px 1px"
|
|
302
|
+
},
|
|
303
|
+
children: "X"
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
tag.id
|
|
309
|
+
) });
|
|
310
|
+
}
|
|
311
|
+
var PlayerTagsCard = ({ tags = [] }) => {
|
|
312
|
+
return /* @__PURE__ */ jsxs(Card, { sx: {
|
|
313
|
+
margin: "1rem",
|
|
314
|
+
borderRadius: "12px",
|
|
315
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
316
|
+
overflow: "hidden"
|
|
317
|
+
}, className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl", children: [
|
|
318
|
+
/* @__PURE__ */ jsx(
|
|
319
|
+
CardHeader,
|
|
320
|
+
{
|
|
321
|
+
title: "Player Tags",
|
|
322
|
+
sx: {
|
|
323
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
324
|
+
color: "#FFFFFF",
|
|
325
|
+
fontSize: "1.5rem",
|
|
326
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
327
|
+
"& .MuiCardHeader-title": {
|
|
328
|
+
fontWeight: "bold",
|
|
329
|
+
fontSize: "1.5rem",
|
|
330
|
+
textAlign: "center",
|
|
331
|
+
textTransform: "uppercase",
|
|
332
|
+
letterSpacing: "0.05em"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
),
|
|
337
|
+
/* @__PURE__ */ jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: tags.map((tag) => /* @__PURE__ */ jsx(Chip, { tag }, tag.id)) }) })
|
|
338
|
+
] });
|
|
339
|
+
};
|
|
340
|
+
var PlayerTagsCard_default = PlayerTagsCard;
|
|
341
|
+
var PlayerPromptCard = ({ title, description }) => /* @__PURE__ */ jsx(
|
|
342
|
+
Card,
|
|
343
|
+
{
|
|
344
|
+
sx: {
|
|
345
|
+
margin: "1rem",
|
|
346
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
347
|
+
// Gradient color scheme
|
|
348
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
349
|
+
// Card shadow
|
|
350
|
+
borderRadius: "12px",
|
|
351
|
+
// Rounded corners
|
|
352
|
+
color: "#FFFFFF",
|
|
353
|
+
// Text contrast with the background
|
|
354
|
+
overflow: "hidden"
|
|
355
|
+
// Keeps consistent and clean card shape
|
|
356
|
+
},
|
|
357
|
+
className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl",
|
|
358
|
+
children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6", children: [
|
|
359
|
+
title && /* @__PURE__ */ jsx(
|
|
360
|
+
Typography,
|
|
361
|
+
{
|
|
362
|
+
variant: "h5",
|
|
363
|
+
className: "font-bold text-lg uppercase text-center tracking-wide mb-4",
|
|
364
|
+
sx: {
|
|
365
|
+
color: "#FFFFFF",
|
|
366
|
+
// Bright white for high visibility
|
|
367
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
368
|
+
// Strong text shadow for contrast
|
|
369
|
+
fontSize: "1.5rem"
|
|
370
|
+
},
|
|
371
|
+
children: title
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
description && /* @__PURE__ */ jsx(
|
|
375
|
+
Typography,
|
|
376
|
+
{
|
|
377
|
+
variant: "body2",
|
|
378
|
+
className: "text-sm font-medium text-center",
|
|
379
|
+
sx: {
|
|
380
|
+
color: "#E3F2FD",
|
|
381
|
+
// Softer light blue for description
|
|
382
|
+
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
383
|
+
// Subtle shadow
|
|
384
|
+
lineHeight: 1.6,
|
|
385
|
+
marginTop: "1rem"
|
|
386
|
+
},
|
|
387
|
+
children: description
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
] })
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
var PlayerPromptCard_default = PlayerPromptCard;
|
|
394
|
+
var PlayerTagsEdit = ({
|
|
395
|
+
selectedTags = [],
|
|
396
|
+
possibleTags = [],
|
|
17
397
|
onToggleTag
|
|
18
|
-
}) {
|
|
398
|
+
}) => {
|
|
19
399
|
const [inputValue, setInputValue] = useState("");
|
|
20
400
|
const selectedIds = useMemo(() => selectedTags.map((tag) => tag.id), [selectedTags]);
|
|
21
401
|
const options = useMemo(
|
|
22
|
-
() => possibleTags.map((tag) => ({ value: tag.id, label: tag.label })),
|
|
402
|
+
() => possibleTags.map((tag) => ({ value: tag.id, label: tag.label, alternate_title: tag.alternate_title })),
|
|
23
403
|
[possibleTags]
|
|
24
404
|
);
|
|
25
|
-
return /* @__PURE__ */
|
|
405
|
+
return /* @__PURE__ */ jsxs(Card, { sx: {
|
|
406
|
+
margin: "1rem",
|
|
407
|
+
borderRadius: "12px",
|
|
408
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
409
|
+
overflow: "hidden"
|
|
410
|
+
}, children: [
|
|
26
411
|
/* @__PURE__ */ jsx(
|
|
27
412
|
CardHeader,
|
|
28
413
|
{
|
|
29
|
-
title,
|
|
30
|
-
|
|
414
|
+
title: "Player Tags",
|
|
415
|
+
sx: {
|
|
31
416
|
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
32
417
|
color: "#FFFFFF",
|
|
33
418
|
fontSize: "1.5rem",
|
|
34
|
-
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)"
|
|
419
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
420
|
+
"& .MuiCardHeader-title": {
|
|
421
|
+
fontWeight: "bold",
|
|
422
|
+
fontSize: "1.5rem",
|
|
423
|
+
textAlign: "center",
|
|
424
|
+
textTransform: "uppercase",
|
|
425
|
+
letterSpacing: "0.05em"
|
|
426
|
+
}
|
|
35
427
|
}
|
|
36
428
|
}
|
|
37
429
|
),
|
|
38
|
-
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
39
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
40
|
-
|
|
430
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "p-6", children: [
|
|
431
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 mb-4", children: selectedTags.map((tag) => /* @__PURE__ */ jsx(
|
|
432
|
+
Chip,
|
|
41
433
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
background: tag.color || "#bfbcbb",
|
|
45
|
-
color: "white",
|
|
46
|
-
textShadow: "black 0.2em 0.2em 0.4em"
|
|
47
|
-
},
|
|
48
|
-
children: [
|
|
49
|
-
tag.label,
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
51
|
-
"button",
|
|
52
|
-
{
|
|
53
|
-
type: "button",
|
|
54
|
-
onClick: () => onToggleTag(tag.id),
|
|
55
|
-
className: "ml-2 text-red-500 bg-white bg-opacity-50 rounded-full outline-black outline-2 font-outlined",
|
|
56
|
-
children: "\xD7"
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
]
|
|
434
|
+
tag,
|
|
435
|
+
removeCallback: () => onToggleTag(tag.id)
|
|
60
436
|
},
|
|
61
437
|
tag.id
|
|
62
438
|
)) }),
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
439
|
+
/* @__PURE__ */ jsx(
|
|
64
440
|
Autocomplete,
|
|
65
441
|
{
|
|
66
442
|
options,
|
|
67
|
-
filterOptions: (availableOptions, state) =>
|
|
68
|
-
|
|
69
|
-
|
|
443
|
+
filterOptions: (availableOptions, state) => {
|
|
444
|
+
const query = state.inputValue.toLowerCase();
|
|
445
|
+
return availableOptions.filter(
|
|
446
|
+
(option) => {
|
|
447
|
+
var _a;
|
|
448
|
+
return !selectedIds.includes(option.value) && (option.label.toLowerCase().includes(query) || ((_a = option.alternate_title) == null ? void 0 : _a.some((title) => title.toLowerCase().includes(query))));
|
|
449
|
+
}
|
|
450
|
+
).slice(0, 5);
|
|
451
|
+
},
|
|
70
452
|
value: null,
|
|
71
453
|
inputValue,
|
|
72
454
|
onInputChange: (event, newInputValue) => {
|
|
@@ -81,13 +463,20 @@ function TagEditor({
|
|
|
81
463
|
setInputValue("");
|
|
82
464
|
},
|
|
83
465
|
slots: { popper: CustomPopper },
|
|
84
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
466
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
467
|
+
TextField,
|
|
468
|
+
{
|
|
469
|
+
...params,
|
|
470
|
+
label: "Select Tags",
|
|
471
|
+
variant: "outlined"
|
|
472
|
+
}
|
|
473
|
+
)
|
|
85
474
|
},
|
|
86
475
|
selectedIds.join("-")
|
|
87
|
-
)
|
|
476
|
+
)
|
|
88
477
|
] })
|
|
89
|
-
] })
|
|
90
|
-
}
|
|
478
|
+
] });
|
|
479
|
+
};
|
|
91
480
|
var CustomPopper = (props) => {
|
|
92
481
|
return /* @__PURE__ */ jsx(
|
|
93
482
|
Popper,
|
|
@@ -96,29 +485,86 @@ var CustomPopper = (props) => {
|
|
|
96
485
|
modifiers: [
|
|
97
486
|
{
|
|
98
487
|
name: "preventOverflow",
|
|
99
|
-
options: {
|
|
488
|
+
options: {
|
|
489
|
+
boundary: "viewport"
|
|
490
|
+
}
|
|
100
491
|
},
|
|
101
492
|
{
|
|
102
493
|
name: "offset",
|
|
103
|
-
options: {
|
|
494
|
+
options: {
|
|
495
|
+
offset: [0, -10]
|
|
496
|
+
}
|
|
104
497
|
}
|
|
105
498
|
],
|
|
106
499
|
placement: "top-start"
|
|
107
500
|
}
|
|
108
501
|
);
|
|
109
502
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
503
|
+
var PlayerTagsEdit_default = PlayerTagsEdit;
|
|
504
|
+
function PlayerPageLayout({
|
|
505
|
+
playerData,
|
|
506
|
+
tags = [],
|
|
507
|
+
blurbs = [],
|
|
508
|
+
isOwner = false,
|
|
509
|
+
possibleTags = [],
|
|
510
|
+
onToggleTag = () => {
|
|
511
|
+
}
|
|
512
|
+
}) {
|
|
513
|
+
const theme = useTheme();
|
|
514
|
+
const isSmallScreen = useMediaQuery(theme.breakpoints.down("lg"));
|
|
515
|
+
const tagsElement = isOwner ? /* @__PURE__ */ jsx(
|
|
516
|
+
PlayerTagsEdit_default,
|
|
113
517
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
onToggleTag: props.updatePlayerTags
|
|
518
|
+
selectedTags: tags,
|
|
519
|
+
possibleTags,
|
|
520
|
+
onToggleTag
|
|
118
521
|
}
|
|
119
|
-
);
|
|
522
|
+
) : /* @__PURE__ */ jsx(PlayerTagsCard_default, { tags });
|
|
523
|
+
return /* @__PURE__ */ jsx(NoSsr, { children: /* @__PURE__ */ jsx(Box, { sx: { padding: "2rem", marginRight: "auto", marginLeft: "auto" }, justifyContent: "center", children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, justifyContent: "center", sx: { marginRight: "auto", marginLeft: "auto" }, children: [
|
|
524
|
+
!isSmallScreen && /* @__PURE__ */ jsxs(Grid, { size: { xs: 12, lg: 3 }, children: [
|
|
525
|
+
/* @__PURE__ */ jsx(
|
|
526
|
+
PlayerDetailsCard_default,
|
|
527
|
+
{
|
|
528
|
+
preferredPronouns: playerData.preferredPronouns,
|
|
529
|
+
age: playerData.age,
|
|
530
|
+
yearsPlaying: playerData.yearsPlaying,
|
|
531
|
+
discordUsername: playerData.discordUsername,
|
|
532
|
+
preferredGames: playerData.preferredGames
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
tagsElement
|
|
536
|
+
] }),
|
|
537
|
+
/* @__PURE__ */ jsx(Grid, { size: { xs: 12, lg: 6 }, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, children: [
|
|
538
|
+
/* @__PURE__ */ jsx(Grid, { size: { xs: 12, lg: 8 }, children: /* @__PURE__ */ jsx(
|
|
539
|
+
PlayerDisplayCard_default,
|
|
540
|
+
{
|
|
541
|
+
profilePicture: playerData.profilePicture,
|
|
542
|
+
username: playerData.username,
|
|
543
|
+
bio: playerData.bio,
|
|
544
|
+
preferredPronouns: playerData.preferredPronouns
|
|
545
|
+
}
|
|
546
|
+
) }),
|
|
547
|
+
isSmallScreen && /* @__PURE__ */ jsx(Grid, { size: { xs: 12, lg: 3 }, children: /* @__PURE__ */ jsx(
|
|
548
|
+
PlayerDetailsCard_default,
|
|
549
|
+
{
|
|
550
|
+
preferredPronouns: playerData.preferredPronouns,
|
|
551
|
+
age: playerData.age,
|
|
552
|
+
yearsPlaying: playerData.yearsPlaying,
|
|
553
|
+
discordUsername: playerData.discordUsername,
|
|
554
|
+
preferredGames: playerData.preferredGames
|
|
555
|
+
}
|
|
556
|
+
) }),
|
|
557
|
+
blurbs.map((blurb, index) => /* @__PURE__ */ jsx(Grid, { size: { xs: 12, lg: 8 }, children: /* @__PURE__ */ jsx(
|
|
558
|
+
PlayerPromptCard_default,
|
|
559
|
+
{
|
|
560
|
+
title: blurb.title,
|
|
561
|
+
description: blurb.description
|
|
562
|
+
}
|
|
563
|
+
) }, index))
|
|
564
|
+
] }) })
|
|
565
|
+
] }) }) });
|
|
120
566
|
}
|
|
121
567
|
|
|
122
|
-
export { PlayerTagsEdit };
|
|
568
|
+
export { PlayerDetailsCard_default as PlayerDetailsCard, PlayerDisplayCard_default as PlayerDisplayCard, PlayerPageLayout, PlayerPromptCard_default as PlayerPromptCard, PlayerTagsCard_default as PlayerTagsCard, PlayerTagsEdit_default as PlayerTagsEdit };
|
|
123
569
|
//# sourceMappingURL=index.mjs.map
|
|
124
570
|
//# sourceMappingURL=index.mjs.map
|