@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
package/dist/PlayerPage.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Card, CardContent, Typography, CardMedia } from '@mui/material';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useState, useEffect } from 'react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import CardHeader from '@mui/material/CardHeader';
|
|
8
|
-
import CardContent4 from '@mui/material/CardContent';
|
|
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';
|
|
5
|
+
import Autocomplete from '@mui/material/Autocomplete';
|
|
6
|
+
import Popper from '@mui/material/Popper';
|
|
9
7
|
|
|
10
8
|
// src/components/PlayerPage/PlayerDetailsCard.tsx
|
|
11
|
-
var
|
|
9
|
+
var PlayerDetailsCard = ({
|
|
10
|
+
preferredPronouns,
|
|
12
11
|
age,
|
|
13
12
|
yearsPlaying,
|
|
14
13
|
discordUsername,
|
|
@@ -58,6 +57,23 @@ var PlayerDetails = ({
|
|
|
58
57
|
}
|
|
59
58
|
),
|
|
60
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
|
+
),
|
|
61
77
|
age !== null && /* @__PURE__ */ jsxs(
|
|
62
78
|
Typography,
|
|
63
79
|
{
|
|
@@ -109,7 +125,7 @@ var PlayerDetails = ({
|
|
|
109
125
|
]
|
|
110
126
|
}
|
|
111
127
|
),
|
|
112
|
-
preferredGames &&
|
|
128
|
+
preferredGames && /* @__PURE__ */ jsxs(
|
|
113
129
|
Typography,
|
|
114
130
|
{
|
|
115
131
|
variant: "body2",
|
|
@@ -122,7 +138,7 @@ var PlayerDetails = ({
|
|
|
122
138
|
children: [
|
|
123
139
|
/* @__PURE__ */ jsx("span", { className: "font-extrabold text-cyan-300", children: "Preferred Games:" }),
|
|
124
140
|
" ",
|
|
125
|
-
preferredGames.join(", ")
|
|
141
|
+
Array.isArray(preferredGames) ? preferredGames.join(", ") : preferredGames
|
|
126
142
|
]
|
|
127
143
|
}
|
|
128
144
|
)
|
|
@@ -145,24 +161,20 @@ var PlayerDetails = ({
|
|
|
145
161
|
}
|
|
146
162
|
);
|
|
147
163
|
};
|
|
148
|
-
var PlayerDetailsCard_default =
|
|
164
|
+
var PlayerDetailsCard_default = PlayerDetailsCard;
|
|
149
165
|
|
|
150
166
|
// src/data/values.tsx
|
|
151
167
|
var ProfilePictureSettings = {
|
|
152
168
|
aspectRatio: 4 / 5};
|
|
153
|
-
var {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
bio,
|
|
158
|
-
preferredPronouns
|
|
159
|
-
}) => {
|
|
160
|
-
const [imageSrc, setImageSrc] = useState("/man-walking-silhouette-clipart.jpg");
|
|
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;
|
|
161
173
|
useEffect(() => {
|
|
162
174
|
async function validateImage() {
|
|
163
|
-
const newImage = profilePicture ||
|
|
175
|
+
const newImage = profilePicture || defaultImg;
|
|
164
176
|
if (!profilePicture) {
|
|
165
|
-
setImageSrc(
|
|
177
|
+
setImageSrc(defaultImg);
|
|
166
178
|
return;
|
|
167
179
|
}
|
|
168
180
|
const img = new Image();
|
|
@@ -171,7 +183,7 @@ var PlayerDisplayCard = ({
|
|
|
171
183
|
setImageSrc(newImage);
|
|
172
184
|
};
|
|
173
185
|
img.onerror = () => {
|
|
174
|
-
setImageSrc(
|
|
186
|
+
setImageSrc(defaultImg);
|
|
175
187
|
};
|
|
176
188
|
}
|
|
177
189
|
validateImage();
|
|
@@ -205,7 +217,7 @@ var PlayerDisplayCard = ({
|
|
|
205
217
|
height: "auto",
|
|
206
218
|
// Updates to maintain aspect ratio and fill space nicely
|
|
207
219
|
width: "100%",
|
|
208
|
-
objectFit: "
|
|
220
|
+
objectFit: "cover"
|
|
209
221
|
}
|
|
210
222
|
}
|
|
211
223
|
),
|
|
@@ -264,95 +276,295 @@ var PlayerDisplayCard = ({
|
|
|
264
276
|
);
|
|
265
277
|
};
|
|
266
278
|
var PlayerDisplayCard_default = PlayerDisplayCard;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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",
|
|
270
284
|
{
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
borderRadius: "12px",
|
|
278
|
-
// Rounded corners
|
|
279
|
-
color: "#FFFFFF",
|
|
280
|
-
// Text contrast with the background
|
|
281
|
-
overflow: "hidden"
|
|
282
|
-
// Keeps consistent and clean card shape
|
|
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%))`
|
|
283
291
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
{
|
|
289
|
-
variant: "h5",
|
|
290
|
-
className: "font-bold text-lg uppercase text-center tracking-wide mb-4",
|
|
291
|
-
sx: {
|
|
292
|
-
color: "#FFFFFF",
|
|
293
|
-
// Bright white for high visibility
|
|
294
|
-
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
295
|
-
// Strong text shadow for contrast
|
|
296
|
-
fontSize: "1.5rem"
|
|
297
|
-
},
|
|
298
|
-
children: title
|
|
299
|
-
}
|
|
300
|
-
),
|
|
301
|
-
description && /* @__PURE__ */ jsx(
|
|
302
|
-
Typography,
|
|
292
|
+
children: [
|
|
293
|
+
tag.label,
|
|
294
|
+
removeCallback && /* @__PURE__ */ jsx(
|
|
295
|
+
"button",
|
|
303
296
|
{
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
310
|
-
// Subtle shadow
|
|
311
|
-
lineHeight: 1.6,
|
|
312
|
-
marginTop: "1rem"
|
|
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"
|
|
313
302
|
},
|
|
314
|
-
children:
|
|
303
|
+
children: "X"
|
|
315
304
|
}
|
|
316
305
|
)
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
|
|
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
|
+
] });
|
|
320
339
|
};
|
|
321
|
-
var
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
340
|
+
var PlayerTagsCard_default = PlayerTagsCard;
|
|
341
|
+
var PlayerPromptCard = ({ title, description }) => /* @__PURE__ */ jsx(
|
|
342
|
+
Card,
|
|
343
|
+
{
|
|
344
|
+
sx: {
|
|
345
|
+
margin: "1rem",
|
|
325
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
|
|
326
352
|
color: "#FFFFFF",
|
|
327
|
-
//
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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 = [],
|
|
397
|
+
onToggleTag
|
|
398
|
+
}) => {
|
|
399
|
+
const [inputValue, setInputValue] = useState("");
|
|
400
|
+
const selectedIds = useMemo(() => selectedTags.map((tag) => tag.id), [selectedTags]);
|
|
401
|
+
const options = useMemo(
|
|
402
|
+
() => possibleTags.map((tag) => ({ value: tag.id, label: tag.label, alternate_title: tag.alternate_title })),
|
|
403
|
+
[possibleTags]
|
|
404
|
+
);
|
|
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: [
|
|
411
|
+
/* @__PURE__ */ jsx(
|
|
412
|
+
CardHeader,
|
|
413
|
+
{
|
|
414
|
+
title: "Player Tags",
|
|
415
|
+
sx: {
|
|
416
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
417
|
+
color: "#FFFFFF",
|
|
418
|
+
fontSize: "1.5rem",
|
|
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
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
),
|
|
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,
|
|
433
|
+
{
|
|
434
|
+
tag,
|
|
435
|
+
removeCallback: () => onToggleTag(tag.id)
|
|
436
|
+
},
|
|
437
|
+
tag.id
|
|
438
|
+
)) }),
|
|
439
|
+
/* @__PURE__ */ jsx(
|
|
440
|
+
Autocomplete,
|
|
441
|
+
{
|
|
442
|
+
options,
|
|
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
|
+
},
|
|
452
|
+
value: null,
|
|
453
|
+
inputValue,
|
|
454
|
+
onInputChange: (event, newInputValue) => {
|
|
455
|
+
if (event && event.type === "change") {
|
|
456
|
+
setInputValue(newInputValue);
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
onChange: (event, newValue) => {
|
|
460
|
+
if (newValue) {
|
|
461
|
+
onToggleTag(newValue.value);
|
|
462
|
+
}
|
|
463
|
+
setInputValue("");
|
|
464
|
+
},
|
|
465
|
+
slots: { popper: CustomPopper },
|
|
466
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
467
|
+
TextField,
|
|
468
|
+
{
|
|
469
|
+
...params,
|
|
470
|
+
label: "Select Tags",
|
|
471
|
+
variant: "outlined"
|
|
472
|
+
}
|
|
473
|
+
)
|
|
474
|
+
},
|
|
475
|
+
selectedIds.join("-")
|
|
476
|
+
)
|
|
477
|
+
] })
|
|
478
|
+
] });
|
|
337
479
|
};
|
|
338
|
-
var
|
|
339
|
-
let color = "#bfbcbb";
|
|
340
|
-
if (tag.color) color = tag.color;
|
|
480
|
+
var CustomPopper = (props) => {
|
|
341
481
|
return /* @__PURE__ */ jsx(
|
|
342
|
-
|
|
482
|
+
Popper,
|
|
343
483
|
{
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
484
|
+
...props,
|
|
485
|
+
modifiers: [
|
|
486
|
+
{
|
|
487
|
+
name: "preventOverflow",
|
|
488
|
+
options: {
|
|
489
|
+
boundary: "viewport"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: "offset",
|
|
494
|
+
options: {
|
|
495
|
+
offset: [0, -10]
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
placement: "top-start"
|
|
500
|
+
}
|
|
353
501
|
);
|
|
354
502
|
};
|
|
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,
|
|
517
|
+
{
|
|
518
|
+
selectedTags: tags,
|
|
519
|
+
possibleTags,
|
|
520
|
+
onToggleTag
|
|
521
|
+
}
|
|
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
|
+
] }) }) });
|
|
566
|
+
}
|
|
355
567
|
|
|
356
|
-
export { PlayerDetailsCard_default as PlayerDetailsCard, PlayerDisplayCard_default as PlayerDisplayCard, PlayerPromptCard_default as PlayerPromptCard, PlayerTagsCard };
|
|
568
|
+
export { PlayerDetailsCard_default as PlayerDetailsCard, PlayerDisplayCard_default as PlayerDisplayCard, PlayerPageLayout, PlayerPromptCard_default as PlayerPromptCard, PlayerTagsCard_default as PlayerTagsCard, PlayerTagsEdit_default as PlayerTagsEdit };
|
|
357
569
|
//# sourceMappingURL=PlayerPage.mjs.map
|
|
358
570
|
//# sourceMappingURL=PlayerPage.mjs.map
|