@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.cjs
CHANGED
|
@@ -4,20 +4,17 @@
|
|
|
4
4
|
var material = require('@mui/material');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var react = require('react');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var CardHeader = require('@mui/material/CardHeader');
|
|
10
|
-
var CardContent4 = require('@mui/material/CardContent');
|
|
7
|
+
var Autocomplete = require('@mui/material/Autocomplete');
|
|
8
|
+
var Popper = require('@mui/material/Popper');
|
|
11
9
|
|
|
12
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
11
|
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var CardHeader__default = /*#__PURE__*/_interopDefault(CardHeader);
|
|
17
|
-
var CardContent4__default = /*#__PURE__*/_interopDefault(CardContent4);
|
|
12
|
+
var Autocomplete__default = /*#__PURE__*/_interopDefault(Autocomplete);
|
|
13
|
+
var Popper__default = /*#__PURE__*/_interopDefault(Popper);
|
|
18
14
|
|
|
19
15
|
// src/components/PlayerPage/PlayerDetailsCard.tsx
|
|
20
|
-
var
|
|
16
|
+
var PlayerDetailsCard = ({
|
|
17
|
+
preferredPronouns,
|
|
21
18
|
age,
|
|
22
19
|
yearsPlaying,
|
|
23
20
|
discordUsername,
|
|
@@ -67,6 +64,23 @@ var PlayerDetails = ({
|
|
|
67
64
|
}
|
|
68
65
|
),
|
|
69
66
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
67
|
+
preferredPronouns && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
68
|
+
material.Typography,
|
|
69
|
+
{
|
|
70
|
+
variant: "body2",
|
|
71
|
+
className: "text-sm font-medium",
|
|
72
|
+
sx: {
|
|
73
|
+
color: "#FFFFFF",
|
|
74
|
+
textShadow: "0px 2px 6px rgba(0, 0, 0, 0.5)",
|
|
75
|
+
fontWeight: "bold"
|
|
76
|
+
},
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-extrabold text-cyan-300", children: "Preferred Pronouns:" }),
|
|
79
|
+
" ",
|
|
80
|
+
preferredPronouns
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
),
|
|
70
84
|
age !== null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
71
85
|
material.Typography,
|
|
72
86
|
{
|
|
@@ -118,7 +132,7 @@ var PlayerDetails = ({
|
|
|
118
132
|
]
|
|
119
133
|
}
|
|
120
134
|
),
|
|
121
|
-
preferredGames &&
|
|
135
|
+
preferredGames && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
122
136
|
material.Typography,
|
|
123
137
|
{
|
|
124
138
|
variant: "body2",
|
|
@@ -131,7 +145,7 @@ var PlayerDetails = ({
|
|
|
131
145
|
children: [
|
|
132
146
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-extrabold text-cyan-300", children: "Preferred Games:" }),
|
|
133
147
|
" ",
|
|
134
|
-
preferredGames.join(", ")
|
|
148
|
+
Array.isArray(preferredGames) ? preferredGames.join(", ") : preferredGames
|
|
135
149
|
]
|
|
136
150
|
}
|
|
137
151
|
)
|
|
@@ -154,24 +168,20 @@ var PlayerDetails = ({
|
|
|
154
168
|
}
|
|
155
169
|
);
|
|
156
170
|
};
|
|
157
|
-
var PlayerDetailsCard_default =
|
|
171
|
+
var PlayerDetailsCard_default = PlayerDetailsCard;
|
|
158
172
|
|
|
159
173
|
// src/data/values.tsx
|
|
160
174
|
var ProfilePictureSettings = {
|
|
161
175
|
aspectRatio: 4 / 5};
|
|
162
|
-
var {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
bio,
|
|
167
|
-
preferredPronouns
|
|
168
|
-
}) => {
|
|
169
|
-
const [imageSrc, setImageSrc] = react.useState("/man-walking-silhouette-clipart.jpg");
|
|
176
|
+
var PlayerDisplayCard = ({ profilePicture, username, bio, preferredPronouns }) => {
|
|
177
|
+
const defaultImg = "/man-walking-silhouette-clipart.jpg";
|
|
178
|
+
const [imageSrc, setImageSrc] = react.useState(defaultImg);
|
|
179
|
+
const { aspectRatio } = ProfilePictureSettings;
|
|
170
180
|
react.useEffect(() => {
|
|
171
181
|
async function validateImage() {
|
|
172
|
-
const newImage = profilePicture ||
|
|
182
|
+
const newImage = profilePicture || defaultImg;
|
|
173
183
|
if (!profilePicture) {
|
|
174
|
-
setImageSrc(
|
|
184
|
+
setImageSrc(defaultImg);
|
|
175
185
|
return;
|
|
176
186
|
}
|
|
177
187
|
const img = new Image();
|
|
@@ -180,7 +190,7 @@ var PlayerDisplayCard = ({
|
|
|
180
190
|
setImageSrc(newImage);
|
|
181
191
|
};
|
|
182
192
|
img.onerror = () => {
|
|
183
|
-
setImageSrc(
|
|
193
|
+
setImageSrc(defaultImg);
|
|
184
194
|
};
|
|
185
195
|
}
|
|
186
196
|
validateImage();
|
|
@@ -214,7 +224,7 @@ var PlayerDisplayCard = ({
|
|
|
214
224
|
height: "auto",
|
|
215
225
|
// Updates to maintain aspect ratio and fill space nicely
|
|
216
226
|
width: "100%",
|
|
217
|
-
objectFit: "
|
|
227
|
+
objectFit: "cover"
|
|
218
228
|
}
|
|
219
229
|
}
|
|
220
230
|
),
|
|
@@ -273,98 +283,300 @@ var PlayerDisplayCard = ({
|
|
|
273
283
|
);
|
|
274
284
|
};
|
|
275
285
|
var PlayerDisplayCard_default = PlayerDisplayCard;
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
286
|
+
function Chip({ tag, removeCallback }) {
|
|
287
|
+
var _a;
|
|
288
|
+
const color = (_a = tag.color) != null ? _a : "#bfbcbb";
|
|
289
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
290
|
+
"span",
|
|
279
291
|
{
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
borderRadius: "12px",
|
|
287
|
-
// Rounded corners
|
|
288
|
-
color: "#FFFFFF",
|
|
289
|
-
// Text contrast with the background
|
|
290
|
-
overflow: "hidden"
|
|
291
|
-
// Keeps consistent and clean card shape
|
|
292
|
+
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",
|
|
293
|
+
style: {
|
|
294
|
+
borderColor: `color-mix(in srgb, ${color}, black 50%)`,
|
|
295
|
+
background: `linear-gradient(160deg, color-mix(in srgb, ${color}, white 10%) 0%, color-mix(in srgb, ${color}, black 60%) 100%)`,
|
|
296
|
+
textShadow: "black 1.5px 1px 1.5px",
|
|
297
|
+
filter: `drop-shadow(2px 2px 1.5px color-mix(in srgb, ${color}, black 80%))`
|
|
292
298
|
},
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
{
|
|
298
|
-
variant: "h5",
|
|
299
|
-
className: "font-bold text-lg uppercase text-center tracking-wide mb-4",
|
|
300
|
-
sx: {
|
|
301
|
-
color: "#FFFFFF",
|
|
302
|
-
// Bright white for high visibility
|
|
303
|
-
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
304
|
-
// Strong text shadow for contrast
|
|
305
|
-
fontSize: "1.5rem"
|
|
306
|
-
},
|
|
307
|
-
children: title
|
|
308
|
-
}
|
|
309
|
-
),
|
|
310
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
311
|
-
material.Typography,
|
|
299
|
+
children: [
|
|
300
|
+
tag.label,
|
|
301
|
+
removeCallback && /* @__PURE__ */ jsxRuntime.jsx(
|
|
302
|
+
"button",
|
|
312
303
|
{
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
319
|
-
// Subtle shadow
|
|
320
|
-
lineHeight: 1.6,
|
|
321
|
-
marginTop: "1rem"
|
|
304
|
+
type: "button",
|
|
305
|
+
onClick: () => removeCallback(tag.id),
|
|
306
|
+
className: "ml-2 text-white hover:text-red-700 focus:outline-none pl-0.5 pr-1 cursor-pointer hover:bg-white rounded-full",
|
|
307
|
+
style: {
|
|
308
|
+
textShadow: "black 1px 1px 1px"
|
|
322
309
|
},
|
|
323
|
-
children:
|
|
310
|
+
children: "X"
|
|
324
311
|
}
|
|
325
312
|
)
|
|
326
|
-
]
|
|
327
|
-
}
|
|
328
|
-
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
tag.id
|
|
316
|
+
) });
|
|
317
|
+
}
|
|
318
|
+
var PlayerTagsCard = ({ tags = [] }) => {
|
|
319
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.Card, { sx: {
|
|
320
|
+
margin: "1rem",
|
|
321
|
+
borderRadius: "12px",
|
|
322
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
323
|
+
overflow: "hidden"
|
|
324
|
+
}, className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl", children: [
|
|
325
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
326
|
+
material.CardHeader,
|
|
327
|
+
{
|
|
328
|
+
title: "Player Tags",
|
|
329
|
+
sx: {
|
|
330
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
331
|
+
color: "#FFFFFF",
|
|
332
|
+
fontSize: "1.5rem",
|
|
333
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
334
|
+
"& .MuiCardHeader-title": {
|
|
335
|
+
fontWeight: "bold",
|
|
336
|
+
fontSize: "1.5rem",
|
|
337
|
+
textAlign: "center",
|
|
338
|
+
textTransform: "uppercase",
|
|
339
|
+
letterSpacing: "0.05em"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
),
|
|
344
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.CardContent, { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(Chip, { tag }, tag.id)) }) })
|
|
345
|
+
] });
|
|
329
346
|
};
|
|
330
|
-
var
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
347
|
+
var PlayerTagsCard_default = PlayerTagsCard;
|
|
348
|
+
var PlayerPromptCard = ({ title, description }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
349
|
+
material.Card,
|
|
350
|
+
{
|
|
351
|
+
sx: {
|
|
352
|
+
margin: "1rem",
|
|
334
353
|
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
354
|
+
// Gradient color scheme
|
|
355
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
356
|
+
// Card shadow
|
|
357
|
+
borderRadius: "12px",
|
|
358
|
+
// Rounded corners
|
|
335
359
|
color: "#FFFFFF",
|
|
336
|
-
//
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
/* @__PURE__ */ jsxRuntime.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
360
|
+
// Text contrast with the background
|
|
361
|
+
overflow: "hidden"
|
|
362
|
+
// Keeps consistent and clean card shape
|
|
363
|
+
},
|
|
364
|
+
className: "transition duration-300 transform hover:scale-105 hover:shadow-2xl",
|
|
365
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(material.CardContent, { className: "p-6", children: [
|
|
366
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
367
|
+
material.Typography,
|
|
368
|
+
{
|
|
369
|
+
variant: "h5",
|
|
370
|
+
className: "font-bold text-lg uppercase text-center tracking-wide mb-4",
|
|
371
|
+
sx: {
|
|
372
|
+
color: "#FFFFFF",
|
|
373
|
+
// Bright white for high visibility
|
|
374
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
375
|
+
// Strong text shadow for contrast
|
|
376
|
+
fontSize: "1.5rem"
|
|
377
|
+
},
|
|
378
|
+
children: title
|
|
379
|
+
}
|
|
380
|
+
),
|
|
381
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
+
material.Typography,
|
|
383
|
+
{
|
|
384
|
+
variant: "body2",
|
|
385
|
+
className: "text-sm font-medium text-center",
|
|
386
|
+
sx: {
|
|
387
|
+
color: "#E3F2FD",
|
|
388
|
+
// Softer light blue for description
|
|
389
|
+
textShadow: "0px 2px 4px rgba(0, 0, 0, 0.3)",
|
|
390
|
+
// Subtle shadow
|
|
391
|
+
lineHeight: 1.6,
|
|
392
|
+
marginTop: "1rem"
|
|
393
|
+
},
|
|
394
|
+
children: description
|
|
395
|
+
}
|
|
396
|
+
)
|
|
397
|
+
] })
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
var PlayerPromptCard_default = PlayerPromptCard;
|
|
401
|
+
var PlayerTagsEdit = ({
|
|
402
|
+
selectedTags = [],
|
|
403
|
+
possibleTags = [],
|
|
404
|
+
onToggleTag
|
|
405
|
+
}) => {
|
|
406
|
+
const [inputValue, setInputValue] = react.useState("");
|
|
407
|
+
const selectedIds = react.useMemo(() => selectedTags.map((tag) => tag.id), [selectedTags]);
|
|
408
|
+
const options = react.useMemo(
|
|
409
|
+
() => possibleTags.map((tag) => ({ value: tag.id, label: tag.label, alternate_title: tag.alternate_title })),
|
|
410
|
+
[possibleTags]
|
|
411
|
+
);
|
|
412
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.Card, { sx: {
|
|
413
|
+
margin: "1rem",
|
|
414
|
+
borderRadius: "12px",
|
|
415
|
+
boxShadow: "0px 8px 15px rgba(25, 118, 210, 0.3)",
|
|
416
|
+
overflow: "hidden"
|
|
417
|
+
}, children: [
|
|
418
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
419
|
+
material.CardHeader,
|
|
420
|
+
{
|
|
421
|
+
title: "Player Tags",
|
|
422
|
+
sx: {
|
|
423
|
+
background: "linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 1))",
|
|
424
|
+
color: "#FFFFFF",
|
|
425
|
+
fontSize: "1.5rem",
|
|
426
|
+
textShadow: "0px 3px 6px rgba(0, 0, 0, 0.5)",
|
|
427
|
+
"& .MuiCardHeader-title": {
|
|
428
|
+
fontWeight: "bold",
|
|
429
|
+
fontSize: "1.5rem",
|
|
430
|
+
textAlign: "center",
|
|
431
|
+
textTransform: "uppercase",
|
|
432
|
+
letterSpacing: "0.05em"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
),
|
|
437
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.CardContent, { className: "p-6", children: [
|
|
438
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 mb-4", children: selectedTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
|
+
Chip,
|
|
440
|
+
{
|
|
441
|
+
tag,
|
|
442
|
+
removeCallback: () => onToggleTag(tag.id)
|
|
443
|
+
},
|
|
444
|
+
tag.id
|
|
445
|
+
)) }),
|
|
446
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
|
+
Autocomplete__default.default,
|
|
448
|
+
{
|
|
449
|
+
options,
|
|
450
|
+
filterOptions: (availableOptions, state) => {
|
|
451
|
+
const query = state.inputValue.toLowerCase();
|
|
452
|
+
return availableOptions.filter(
|
|
453
|
+
(option) => {
|
|
454
|
+
var _a;
|
|
455
|
+
return !selectedIds.includes(option.value) && (option.label.toLowerCase().includes(query) || ((_a = option.alternate_title) == null ? void 0 : _a.some((title) => title.toLowerCase().includes(query))));
|
|
456
|
+
}
|
|
457
|
+
).slice(0, 5);
|
|
458
|
+
},
|
|
459
|
+
value: null,
|
|
460
|
+
inputValue,
|
|
461
|
+
onInputChange: (event, newInputValue) => {
|
|
462
|
+
if (event && event.type === "change") {
|
|
463
|
+
setInputValue(newInputValue);
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
onChange: (event, newValue) => {
|
|
467
|
+
if (newValue) {
|
|
468
|
+
onToggleTag(newValue.value);
|
|
469
|
+
}
|
|
470
|
+
setInputValue("");
|
|
471
|
+
},
|
|
472
|
+
slots: { popper: CustomPopper },
|
|
473
|
+
renderInput: (params) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
474
|
+
material.TextField,
|
|
475
|
+
{
|
|
476
|
+
...params,
|
|
477
|
+
label: "Select Tags",
|
|
478
|
+
variant: "outlined"
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
},
|
|
482
|
+
selectedIds.join("-")
|
|
483
|
+
)
|
|
484
|
+
] })
|
|
485
|
+
] });
|
|
346
486
|
};
|
|
347
|
-
var
|
|
348
|
-
let color = "#bfbcbb";
|
|
349
|
-
if (tag.color) color = tag.color;
|
|
487
|
+
var CustomPopper = (props) => {
|
|
350
488
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
-
|
|
489
|
+
Popper__default.default,
|
|
352
490
|
{
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
491
|
+
...props,
|
|
492
|
+
modifiers: [
|
|
493
|
+
{
|
|
494
|
+
name: "preventOverflow",
|
|
495
|
+
options: {
|
|
496
|
+
boundary: "viewport"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: "offset",
|
|
501
|
+
options: {
|
|
502
|
+
offset: [0, -10]
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
placement: "top-start"
|
|
507
|
+
}
|
|
362
508
|
);
|
|
363
509
|
};
|
|
510
|
+
var PlayerTagsEdit_default = PlayerTagsEdit;
|
|
511
|
+
function PlayerPageLayout({
|
|
512
|
+
playerData,
|
|
513
|
+
tags = [],
|
|
514
|
+
blurbs = [],
|
|
515
|
+
isOwner = false,
|
|
516
|
+
possibleTags = [],
|
|
517
|
+
onToggleTag = () => {
|
|
518
|
+
}
|
|
519
|
+
}) {
|
|
520
|
+
const theme = material.useTheme();
|
|
521
|
+
const isSmallScreen = material.useMediaQuery(theme.breakpoints.down("lg"));
|
|
522
|
+
const tagsElement = isOwner ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
+
PlayerTagsEdit_default,
|
|
524
|
+
{
|
|
525
|
+
selectedTags: tags,
|
|
526
|
+
possibleTags,
|
|
527
|
+
onToggleTag
|
|
528
|
+
}
|
|
529
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(PlayerTagsCard_default, { tags });
|
|
530
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.NoSsr, { children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { padding: "2rem", marginRight: "auto", marginLeft: "auto" }, justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 3, justifyContent: "center", sx: { marginRight: "auto", marginLeft: "auto" }, children: [
|
|
531
|
+
!isSmallScreen && /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { size: { xs: 12, lg: 3 }, children: [
|
|
532
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
533
|
+
PlayerDetailsCard_default,
|
|
534
|
+
{
|
|
535
|
+
preferredPronouns: playerData.preferredPronouns,
|
|
536
|
+
age: playerData.age,
|
|
537
|
+
yearsPlaying: playerData.yearsPlaying,
|
|
538
|
+
discordUsername: playerData.discordUsername,
|
|
539
|
+
preferredGames: playerData.preferredGames
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
tagsElement
|
|
543
|
+
] }),
|
|
544
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Grid, { size: { xs: 12, lg: 6 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 3, children: [
|
|
545
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Grid, { size: { xs: 12, lg: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
546
|
+
PlayerDisplayCard_default,
|
|
547
|
+
{
|
|
548
|
+
profilePicture: playerData.profilePicture,
|
|
549
|
+
username: playerData.username,
|
|
550
|
+
bio: playerData.bio,
|
|
551
|
+
preferredPronouns: playerData.preferredPronouns
|
|
552
|
+
}
|
|
553
|
+
) }),
|
|
554
|
+
isSmallScreen && /* @__PURE__ */ jsxRuntime.jsx(material.Grid, { size: { xs: 12, lg: 3 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
555
|
+
PlayerDetailsCard_default,
|
|
556
|
+
{
|
|
557
|
+
preferredPronouns: playerData.preferredPronouns,
|
|
558
|
+
age: playerData.age,
|
|
559
|
+
yearsPlaying: playerData.yearsPlaying,
|
|
560
|
+
discordUsername: playerData.discordUsername,
|
|
561
|
+
preferredGames: playerData.preferredGames
|
|
562
|
+
}
|
|
563
|
+
) }),
|
|
564
|
+
blurbs.map((blurb, index) => /* @__PURE__ */ jsxRuntime.jsx(material.Grid, { size: { xs: 12, lg: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
565
|
+
PlayerPromptCard_default,
|
|
566
|
+
{
|
|
567
|
+
title: blurb.title,
|
|
568
|
+
description: blurb.description
|
|
569
|
+
}
|
|
570
|
+
) }, index))
|
|
571
|
+
] }) })
|
|
572
|
+
] }) }) });
|
|
573
|
+
}
|
|
364
574
|
|
|
365
575
|
exports.PlayerDetailsCard = PlayerDetailsCard_default;
|
|
366
576
|
exports.PlayerDisplayCard = PlayerDisplayCard_default;
|
|
577
|
+
exports.PlayerPageLayout = PlayerPageLayout;
|
|
367
578
|
exports.PlayerPromptCard = PlayerPromptCard_default;
|
|
368
|
-
exports.PlayerTagsCard =
|
|
579
|
+
exports.PlayerTagsCard = PlayerTagsCard_default;
|
|
580
|
+
exports.PlayerTagsEdit = PlayerTagsEdit_default;
|
|
369
581
|
//# sourceMappingURL=PlayerPage.cjs.map
|
|
370
582
|
//# sourceMappingURL=PlayerPage.cjs.map
|