@dcrackel/hematournamentui 1.0.0
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/.storybook/main.js +17 -0
- package/.storybook/preview-head.html +1 -0
- package/.storybook/preview.js +17 -0
- package/HemaTournamentUI/.gitattributes +2 -0
- package/HemaTournamentUI/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/my-library.es.js +723 -0
- package/dist/my-library.umd.js +1 -0
- package/index.html +12 -0
- package/package.json +42 -0
- package/postcss.config.js +6 -0
- package/src/assets/default-tournament.png +0 -0
- package/src/index.js +15 -0
- package/src/main.js +2 -0
- package/src/mocks/fileMock.js +1 -0
- package/src/mocks/tournamentMock.js +34 -0
- package/src/stories/Base/Button/BaseButton.stories.js +69 -0
- package/src/stories/Base/Button/BaseButton.vue +141 -0
- package/src/stories/Base/Input/BaseInput.stories.js +28 -0
- package/src/stories/Base/Input/BaseInput.vue +44 -0
- package/src/stories/Base/Tag/BaseTag.stories.js +29 -0
- package/src/stories/Base/Tag/BaseTag.vue +57 -0
- package/src/stories/Base/Text/BaseText.stories.js +77 -0
- package/src/stories/Base/Text/BaseText.vue +162 -0
- package/src/stories/Cards/TournamentCard/Detail/TournamentCardDetail.stories.js +33 -0
- package/src/stories/Cards/TournamentCard/Detail/TournamentCardDetail.vue +38 -0
- package/src/stories/Cards/TournamentCard/Header/TournamentCardHeader.stories.js +48 -0
- package/src/stories/Cards/TournamentCard/Header/TournamentCardHeader.vue +40 -0
- package/src/stories/Cards/TournamentCard/TournamentCard.stories.js +37 -0
- package/src/stories/Cards/TournamentCard/TournamentCard.vue +35 -0
- package/src/stories/Configure.mdx +320 -0
- package/src/stories/Containers/Grid/GridContainer.stories.js +27 -0
- package/src/stories/Containers/Grid/GridContainer.vue +36 -0
- package/src/stories/Filters/FilterAndSortBar/FilterAndSortBar.stories.js +36 -0
- package/src/stories/Filters/FilterAndSortBar/FilterAndSortBar.vue +39 -0
- package/src/stories/Menu/Admin/AdminLeftMenu.stories.js +23 -0
- package/src/stories/Menu/Admin/AdminLeftMenu.vue +57 -0
- package/src/stories/Menu/DropDown/DropDownMenu.stories.js +34 -0
- package/src/stories/Menu/DropDown/DropDownMenu.vue +49 -0
- package/tailwind/output.css +1047 -0
- package/tailwind/tailwind.css +4 -0
- package/tailwind.config.js +25 -0
- package/vite.config.js +20 -0
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
import { withDirectives as Q, openBlock as l, createElementBlock as o, vModelText as I, reactive as b, computed as m, normalizeClass as y, toDisplayString as C, resolveComponent as A, createCommentVNode as k, createVNode as d, createElementVNode as s, normalizeStyle as D, Fragment as x, renderList as B, createBlock as p, resolveDynamicComponent as E } from "vue";
|
|
2
|
+
const g = (t, e) => {
|
|
3
|
+
const r = t.__vccOpts || t;
|
|
4
|
+
for (const [c, u] of e)
|
|
5
|
+
r[c] = u;
|
|
6
|
+
return r;
|
|
7
|
+
}, Y = {
|
|
8
|
+
name: "BaseInput",
|
|
9
|
+
props: {
|
|
10
|
+
placeholder: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
value: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
internalValue: this.value,
|
|
22
|
+
timeout: null
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
watch: {
|
|
26
|
+
value(t) {
|
|
27
|
+
this.internalValue = t;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
onInput() {
|
|
32
|
+
clearTimeout(this.timeout), this.timeout = setTimeout(() => {
|
|
33
|
+
this.$emit("update:value", this.internalValue);
|
|
34
|
+
}, 300);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, M = ["placeholder"];
|
|
38
|
+
function v(t, e, r, c, u, i) {
|
|
39
|
+
return Q((l(), o("input", {
|
|
40
|
+
class: "appearance-none focus:outline-none w-full",
|
|
41
|
+
placeholder: r.placeholder,
|
|
42
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => u.internalValue = a),
|
|
43
|
+
onInput: e[1] || (e[1] = (...a) => i.onInput && i.onInput(...a))
|
|
44
|
+
}, null, 40, M)), [
|
|
45
|
+
[I, u.internalValue]
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
const G = /* @__PURE__ */ g(Y, [["render", v]]), S = {
|
|
49
|
+
name: "BaseText",
|
|
50
|
+
props: {
|
|
51
|
+
text: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: !0
|
|
54
|
+
},
|
|
55
|
+
weight: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "normal",
|
|
58
|
+
validator: function(t) {
|
|
59
|
+
return ["light", "normal", "medium", "semi-bold", "bold", "extra-bold"].indexOf(t) !== -1;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
size: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: "small",
|
|
65
|
+
validator: function(t) {
|
|
66
|
+
return ["xs", "small", "medium", "large", "xl", "2xl", "3xl"].indexOf(t) !== -1;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
color: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: "primary",
|
|
72
|
+
validator: function(t) {
|
|
73
|
+
return ["neutral", "quaternary", "tertiary", "secondary", "primary", "bright"].indexOf(t) !== -1;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
hoverColor: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "none",
|
|
79
|
+
validator: function(t) {
|
|
80
|
+
return [
|
|
81
|
+
"primary",
|
|
82
|
+
"secondary",
|
|
83
|
+
"tertiary",
|
|
84
|
+
"quaternary",
|
|
85
|
+
"neutral",
|
|
86
|
+
"bright",
|
|
87
|
+
"none"
|
|
88
|
+
].indexOf(t) !== -1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
setup(t) {
|
|
93
|
+
return t = b(t), {
|
|
94
|
+
classes: m(() => {
|
|
95
|
+
let e = "inline-block font-sans";
|
|
96
|
+
switch (t.color) {
|
|
97
|
+
case "neutral":
|
|
98
|
+
e += " text-neutral";
|
|
99
|
+
break;
|
|
100
|
+
case "tertiary":
|
|
101
|
+
e += " text-tertiary";
|
|
102
|
+
break;
|
|
103
|
+
case "secondary":
|
|
104
|
+
e += " text-secondary";
|
|
105
|
+
break;
|
|
106
|
+
case "quaternary":
|
|
107
|
+
e += " text-quaternary";
|
|
108
|
+
break;
|
|
109
|
+
case "primary":
|
|
110
|
+
e += " text-primary";
|
|
111
|
+
break;
|
|
112
|
+
case "bright":
|
|
113
|
+
e += " text-bright";
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
switch (t.hoverColor) {
|
|
117
|
+
case "neutral":
|
|
118
|
+
e += " hover:text-neutral";
|
|
119
|
+
break;
|
|
120
|
+
case "tertiary":
|
|
121
|
+
e += " hover:text-tertiary";
|
|
122
|
+
break;
|
|
123
|
+
case "secondary":
|
|
124
|
+
e += " hover:text-secondary";
|
|
125
|
+
break;
|
|
126
|
+
case "quaternary":
|
|
127
|
+
e += " hover:text-quaternary";
|
|
128
|
+
break;
|
|
129
|
+
case "primary":
|
|
130
|
+
e += " hover:text-primary";
|
|
131
|
+
break;
|
|
132
|
+
case "bright":
|
|
133
|
+
e += " hover:text-bright";
|
|
134
|
+
break;
|
|
135
|
+
case "none":
|
|
136
|
+
e += "";
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
switch (t.weight) {
|
|
140
|
+
case "light":
|
|
141
|
+
e += " font-light";
|
|
142
|
+
break;
|
|
143
|
+
case "normal":
|
|
144
|
+
e += " font-normal";
|
|
145
|
+
break;
|
|
146
|
+
case "medium":
|
|
147
|
+
e += " font-medium";
|
|
148
|
+
break;
|
|
149
|
+
case "semi-bold":
|
|
150
|
+
e += " font-semibold";
|
|
151
|
+
break;
|
|
152
|
+
case "bold":
|
|
153
|
+
e += " font-bold";
|
|
154
|
+
break;
|
|
155
|
+
case "extra-bold":
|
|
156
|
+
e += " font-extrabold";
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
e += " font-normal";
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
switch (t.size) {
|
|
163
|
+
case "xs":
|
|
164
|
+
e += " text-xs";
|
|
165
|
+
break;
|
|
166
|
+
case "small":
|
|
167
|
+
e += " text-sm";
|
|
168
|
+
break;
|
|
169
|
+
case "medium":
|
|
170
|
+
e += " text-md";
|
|
171
|
+
break;
|
|
172
|
+
case "large":
|
|
173
|
+
e += " text-lg";
|
|
174
|
+
break;
|
|
175
|
+
case "xl":
|
|
176
|
+
e += " text-xl";
|
|
177
|
+
break;
|
|
178
|
+
case "2xl":
|
|
179
|
+
e += " text-2xl";
|
|
180
|
+
break;
|
|
181
|
+
case "3xl":
|
|
182
|
+
e += " text-3xl";
|
|
183
|
+
break;
|
|
184
|
+
default:
|
|
185
|
+
e += " text-sm";
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
return e;
|
|
189
|
+
})
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
function q(t, e, r, c, u, i) {
|
|
194
|
+
return l(), o("div", {
|
|
195
|
+
class: y(c.classes)
|
|
196
|
+
}, C(r.text), 3);
|
|
197
|
+
}
|
|
198
|
+
const h = /* @__PURE__ */ g(S, [["render", q]]), U = {
|
|
199
|
+
name: "base-button",
|
|
200
|
+
components: { DefaultText: h },
|
|
201
|
+
props: {
|
|
202
|
+
label: {
|
|
203
|
+
type: String,
|
|
204
|
+
required: !0
|
|
205
|
+
},
|
|
206
|
+
iconClass: {
|
|
207
|
+
type: String,
|
|
208
|
+
default: null
|
|
209
|
+
},
|
|
210
|
+
size: {
|
|
211
|
+
type: String,
|
|
212
|
+
validator: function(t) {
|
|
213
|
+
return ["xs", "small", "medium", "large", "xl"].indexOf(t) !== -1;
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
type: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: "primary",
|
|
219
|
+
validator: function(t) {
|
|
220
|
+
return ["primary", "secondary", "tertiary", "bright", "admin", "adminSecondary"].indexOf(t) !== -1;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
emits: ["click"],
|
|
225
|
+
setup(t, { emit: e }) {
|
|
226
|
+
return t = b(t), {
|
|
227
|
+
textColor: m(() => {
|
|
228
|
+
switch (t.type) {
|
|
229
|
+
case "primary":
|
|
230
|
+
return "text-primary";
|
|
231
|
+
case "secondary":
|
|
232
|
+
return "text-secondary";
|
|
233
|
+
case "tertiary":
|
|
234
|
+
return "text-tertiary";
|
|
235
|
+
case "bright":
|
|
236
|
+
return "text-bright";
|
|
237
|
+
case "admin":
|
|
238
|
+
return "text-neutral";
|
|
239
|
+
case "adminSecondary":
|
|
240
|
+
return "text-secondary";
|
|
241
|
+
default:
|
|
242
|
+
return "text-primary";
|
|
243
|
+
}
|
|
244
|
+
}),
|
|
245
|
+
hoverClass: m(() => {
|
|
246
|
+
switch (t.type) {
|
|
247
|
+
case "admin":
|
|
248
|
+
return "hover:text-secondary";
|
|
249
|
+
case "adminSecondary":
|
|
250
|
+
return "hover:text-tertiary";
|
|
251
|
+
default:
|
|
252
|
+
return "";
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
hoverColor: m(() => {
|
|
256
|
+
switch (t.type) {
|
|
257
|
+
case "admin":
|
|
258
|
+
return "text-secondary";
|
|
259
|
+
case "adminSecondary":
|
|
260
|
+
return "text-tertiary";
|
|
261
|
+
default:
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
}),
|
|
265
|
+
classes: m(() => {
|
|
266
|
+
let r = "py-2 px-2.5 mx-2 inline-flex ";
|
|
267
|
+
switch (t.type) {
|
|
268
|
+
case "primary":
|
|
269
|
+
r += " items-center gap-2.5 rounded-md text-center shadow border border-skeleton justify-center bg-neutral hover:bg-tertiary";
|
|
270
|
+
break;
|
|
271
|
+
case "secondary":
|
|
272
|
+
r += " items-center gap-2.5 rounded-md text-center shadow bg-secondary justify-center hover:bg-primary text-neutral";
|
|
273
|
+
break;
|
|
274
|
+
case "tertiary":
|
|
275
|
+
r += " items-center gap-2.5 rounded-md text-center justify-center bg-tertiary hover:bg-primary text-primary";
|
|
276
|
+
break;
|
|
277
|
+
case "bright":
|
|
278
|
+
r += " items-center gap-2.5 rounded-md text-center justify-center bg-bright hover:bg-primary text-neutral";
|
|
279
|
+
break;
|
|
280
|
+
case "admin":
|
|
281
|
+
r += " items-center rounded-md gap-2.5 text-center bg-primary hover:bg-primary my-1 text-neutral hover:bg-primaryHighlight";
|
|
282
|
+
break;
|
|
283
|
+
case "adminSecondary":
|
|
284
|
+
r += " items-center gap-2.5 text-center my-1 border-b border-secondary hover:border-b hover:border-neutral w-11/12 text-neutral";
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
switch (t.size) {
|
|
288
|
+
case "xs":
|
|
289
|
+
r += " text-xs";
|
|
290
|
+
break;
|
|
291
|
+
case "small":
|
|
292
|
+
r += " text-sm";
|
|
293
|
+
break;
|
|
294
|
+
case "medium":
|
|
295
|
+
r += " text-md";
|
|
296
|
+
break;
|
|
297
|
+
case "large":
|
|
298
|
+
r += " text-lg";
|
|
299
|
+
break;
|
|
300
|
+
case "xl":
|
|
301
|
+
r += " text-xl";
|
|
302
|
+
break;
|
|
303
|
+
default:
|
|
304
|
+
r += "";
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
return r;
|
|
308
|
+
}),
|
|
309
|
+
onClick() {
|
|
310
|
+
console.log("Click!"), e("click");
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
function $(t, e, r, c, u, i) {
|
|
316
|
+
const a = A("DefaultText");
|
|
317
|
+
return l(), o("button", {
|
|
318
|
+
class: y(c.classes),
|
|
319
|
+
type: "button",
|
|
320
|
+
onClick: e[0] || (e[0] = (...n) => c.onClick && c.onClick(...n))
|
|
321
|
+
}, [
|
|
322
|
+
r.iconClass ? (l(), o("i", {
|
|
323
|
+
key: 0,
|
|
324
|
+
class: y([r.iconClass, "mr-2 hover:text-highlightedClass"])
|
|
325
|
+
}, null, 2)) : k("", !0),
|
|
326
|
+
d(a, {
|
|
327
|
+
color: c.textColor,
|
|
328
|
+
size: r.size,
|
|
329
|
+
text: r.label,
|
|
330
|
+
weight: "normal"
|
|
331
|
+
}, null, 8, ["color", "size", "text"])
|
|
332
|
+
], 2);
|
|
333
|
+
}
|
|
334
|
+
const _ = /* @__PURE__ */ g(U, [["render", $]]), V = {
|
|
335
|
+
name: "base-tag",
|
|
336
|
+
props: {
|
|
337
|
+
label: {
|
|
338
|
+
type: String,
|
|
339
|
+
required: !0
|
|
340
|
+
},
|
|
341
|
+
backgroundColor: {
|
|
342
|
+
type: String,
|
|
343
|
+
validator: function(t) {
|
|
344
|
+
return ["primary", "secondary", "tertiary", "neutral", "bright"].indexOf(t) !== -1;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
setup(t) {
|
|
349
|
+
return t = b(t), {
|
|
350
|
+
classes: m(() => {
|
|
351
|
+
let e = "cursor-pointer inline-block py-1 px-3 my-2 ml-3 text-xs font-normal rounded-full text-neutral";
|
|
352
|
+
switch (t.backgroundColor) {
|
|
353
|
+
case "primary":
|
|
354
|
+
e += " bg-primary";
|
|
355
|
+
break;
|
|
356
|
+
case "secondary":
|
|
357
|
+
e += " bg-secondary";
|
|
358
|
+
break;
|
|
359
|
+
case "tertiary":
|
|
360
|
+
e += " bg-tertiary";
|
|
361
|
+
break;
|
|
362
|
+
case "neutral":
|
|
363
|
+
e += " bg-neutral";
|
|
364
|
+
break;
|
|
365
|
+
case "bright":
|
|
366
|
+
e += " bg-bright";
|
|
367
|
+
break;
|
|
368
|
+
default:
|
|
369
|
+
e += " bg-primary";
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
return e;
|
|
373
|
+
})
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
function T(t, e, r, c, u, i) {
|
|
378
|
+
return l(), o("div", {
|
|
379
|
+
class: y(c.classes)
|
|
380
|
+
}, C(r.label), 3);
|
|
381
|
+
}
|
|
382
|
+
const W = /* @__PURE__ */ g(V, [["render", T]]), f = "data:image/png;base64,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", K = {
|
|
383
|
+
name: "tournament-card-header",
|
|
384
|
+
components: {
|
|
385
|
+
BaseTag: W
|
|
386
|
+
},
|
|
387
|
+
props: {
|
|
388
|
+
artwork: {
|
|
389
|
+
type: String,
|
|
390
|
+
required: !0,
|
|
391
|
+
default: f
|
|
392
|
+
},
|
|
393
|
+
tags: {
|
|
394
|
+
type: Array,
|
|
395
|
+
default: () => []
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
computed: {
|
|
399
|
+
backgroundStyle() {
|
|
400
|
+
return `background-image: url('${this.artwork || f}');`;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}, H = { class: "rounded-t-xl w-full" }, P = { class: "flex flex-row" };
|
|
404
|
+
function J(t, e, r, c, u, i) {
|
|
405
|
+
const a = A("BaseTag");
|
|
406
|
+
return l(), o("div", H, [
|
|
407
|
+
s("div", {
|
|
408
|
+
style: D(i.backgroundStyle),
|
|
409
|
+
class: "h-36 w-full flex flex-col justify-end rounded-t-xl bg-cover bg-no-repeat bg-center"
|
|
410
|
+
}, [
|
|
411
|
+
s("div", P, [
|
|
412
|
+
(l(!0), o(x, null, B(r.tags, (n) => (l(), p(a, {
|
|
413
|
+
key: n,
|
|
414
|
+
label: n
|
|
415
|
+
}, null, 8, ["label"]))), 128))
|
|
416
|
+
])
|
|
417
|
+
], 4)
|
|
418
|
+
]);
|
|
419
|
+
}
|
|
420
|
+
const j = /* @__PURE__ */ g(K, [["render", J]]), z = {
|
|
421
|
+
name: "tournament-card-details",
|
|
422
|
+
components: {
|
|
423
|
+
BaseButton: _,
|
|
424
|
+
BaseText: h
|
|
425
|
+
},
|
|
426
|
+
props: {
|
|
427
|
+
detail: {
|
|
428
|
+
type: Object,
|
|
429
|
+
required: !0,
|
|
430
|
+
default: () => ({
|
|
431
|
+
name: "",
|
|
432
|
+
date: "",
|
|
433
|
+
closes: "",
|
|
434
|
+
location: ""
|
|
435
|
+
})
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}, F = { class: "flex flex-col w-full pt-4 pb-3 px-3" }, N = { class: "mt-4 flex flex-col" }, L = { class: "flex flex-row w-full justify-end" };
|
|
439
|
+
function O(t, e, r, c, u, i) {
|
|
440
|
+
const a = A("BaseText"), n = A("BaseButton");
|
|
441
|
+
return l(), o("div", F, [
|
|
442
|
+
d(a, {
|
|
443
|
+
text: r.detail.name,
|
|
444
|
+
color: "textPrimary",
|
|
445
|
+
size: "xl",
|
|
446
|
+
weight: "semi-bold"
|
|
447
|
+
}, null, 8, ["text"]),
|
|
448
|
+
d(a, {
|
|
449
|
+
text: r.detail.location,
|
|
450
|
+
color: "textPrimary",
|
|
451
|
+
size: "small",
|
|
452
|
+
weight: "normal"
|
|
453
|
+
}, null, 8, ["text"]),
|
|
454
|
+
s("div", N, [
|
|
455
|
+
d(a, {
|
|
456
|
+
text: `${r.detail.date}`,
|
|
457
|
+
color: "textPrimary",
|
|
458
|
+
size: "small",
|
|
459
|
+
weight: "light"
|
|
460
|
+
}, null, 8, ["text"]),
|
|
461
|
+
d(a, {
|
|
462
|
+
text: `${r.detail.closes}`,
|
|
463
|
+
color: "textPrimary",
|
|
464
|
+
size: "small",
|
|
465
|
+
weight: "light"
|
|
466
|
+
}, null, 8, ["text"])
|
|
467
|
+
]),
|
|
468
|
+
s("div", L, [
|
|
469
|
+
d(n, {
|
|
470
|
+
label: "Edit",
|
|
471
|
+
class: "mt-2",
|
|
472
|
+
primary: ""
|
|
473
|
+
})
|
|
474
|
+
])
|
|
475
|
+
]);
|
|
476
|
+
}
|
|
477
|
+
const Z = /* @__PURE__ */ g(z, [["render", O]]), R = {
|
|
478
|
+
name: "TournamentCard",
|
|
479
|
+
components: {
|
|
480
|
+
TournamentHeader: j,
|
|
481
|
+
TournamentDetail: Z
|
|
482
|
+
},
|
|
483
|
+
props: {
|
|
484
|
+
detail: {
|
|
485
|
+
type: Object,
|
|
486
|
+
required: !0,
|
|
487
|
+
default: () => ({
|
|
488
|
+
artwork: "",
|
|
489
|
+
tags: [],
|
|
490
|
+
name: "",
|
|
491
|
+
description: "",
|
|
492
|
+
date: "",
|
|
493
|
+
closes: "",
|
|
494
|
+
location: ""
|
|
495
|
+
})
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}, X = { class: "rounded-xl w-72 shadow" };
|
|
499
|
+
function ee(t, e, r, c, u, i) {
|
|
500
|
+
const a = A("TournamentHeader"), n = A("TournamentDetail");
|
|
501
|
+
return l(), o("div", X, [
|
|
502
|
+
d(a, {
|
|
503
|
+
artwork: r.detail.artwork,
|
|
504
|
+
tags: r.detail.tags
|
|
505
|
+
}, null, 8, ["artwork", "tags"]),
|
|
506
|
+
d(n, { detail: r.detail }, null, 8, ["detail"])
|
|
507
|
+
]);
|
|
508
|
+
}
|
|
509
|
+
const te = /* @__PURE__ */ g(R, [["render", ee]]), re = {
|
|
510
|
+
name: "GridContainer",
|
|
511
|
+
components: {
|
|
512
|
+
BaseText: h,
|
|
513
|
+
TournamentCard: te
|
|
514
|
+
},
|
|
515
|
+
props: {
|
|
516
|
+
items: {
|
|
517
|
+
type: Array,
|
|
518
|
+
default: () => []
|
|
519
|
+
},
|
|
520
|
+
component: {
|
|
521
|
+
type: String,
|
|
522
|
+
required: !0
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}, ae = { class: "border border-cloudy rounded-lg p-9 bg-white" }, ne = { class: "w-full text-center mb-9" }, le = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-6 w-full" };
|
|
526
|
+
function se(t, e, r, c, u, i) {
|
|
527
|
+
const a = A("BaseText");
|
|
528
|
+
return l(), o("div", ae, [
|
|
529
|
+
s("h1", ne, [
|
|
530
|
+
d(a, {
|
|
531
|
+
color: "primary",
|
|
532
|
+
size: "2xl",
|
|
533
|
+
text: "Upcoming Tournaments",
|
|
534
|
+
weight: "normal"
|
|
535
|
+
})
|
|
536
|
+
]),
|
|
537
|
+
s("div", le, [
|
|
538
|
+
(l(!0), o(x, null, B(r.items, (n) => (l(), o("div", {
|
|
539
|
+
key: n.id
|
|
540
|
+
}, [
|
|
541
|
+
(l(), p(E(r.component), { detail: n }, null, 8, ["detail"]))
|
|
542
|
+
]))), 128))
|
|
543
|
+
])
|
|
544
|
+
]);
|
|
545
|
+
}
|
|
546
|
+
const De = /* @__PURE__ */ g(re, [["render", se]]), oe = {
|
|
547
|
+
name: "DropDownMenu",
|
|
548
|
+
components: { BaseText: h },
|
|
549
|
+
props: {
|
|
550
|
+
label: {
|
|
551
|
+
type: String
|
|
552
|
+
},
|
|
553
|
+
items: {
|
|
554
|
+
type: Array
|
|
555
|
+
},
|
|
556
|
+
selectedItem: null
|
|
557
|
+
},
|
|
558
|
+
data: () => ({
|
|
559
|
+
isDropDownOpen: !1
|
|
560
|
+
}),
|
|
561
|
+
methods: {
|
|
562
|
+
handleClick(t) {
|
|
563
|
+
this.isDropDownOpen = !1, console.log(`menu item clicked ${t}`);
|
|
564
|
+
},
|
|
565
|
+
handleDropDown() {
|
|
566
|
+
this.isDropDownOpen = !this.isDropDownOpen;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}, ce = { class: "flex flex-row" }, ie = { class: "mr-2 pt-1" }, de = /* @__PURE__ */ s("i", { class: "fa-solid fa-chevron-down text-xs" }, null, -1), ue = {
|
|
570
|
+
key: 0,
|
|
571
|
+
class: "flex flex-col w-32 shadow mt-2 z-10 rounded-xl py-1 absolute"
|
|
572
|
+
}, Ae = ["onClick"];
|
|
573
|
+
function ge(t, e, r, c, u, i) {
|
|
574
|
+
const a = A("BaseText");
|
|
575
|
+
return l(), o("div", ce, [
|
|
576
|
+
s("span", ie, [
|
|
577
|
+
d(a, {
|
|
578
|
+
text: r.label,
|
|
579
|
+
color: "quaternary",
|
|
580
|
+
size: "small",
|
|
581
|
+
weight: "normal"
|
|
582
|
+
}, null, 8, ["text"])
|
|
583
|
+
]),
|
|
584
|
+
s("span", null, [
|
|
585
|
+
s("div", {
|
|
586
|
+
class: "z-10 rounded-lg shadow px-2 py-2 w-32 flex flex-row justify-between",
|
|
587
|
+
onClick: e[0] || (e[0] = (n) => i.handleDropDown())
|
|
588
|
+
}, [
|
|
589
|
+
d(a, {
|
|
590
|
+
text: r.selectedItem.text,
|
|
591
|
+
color: "secondary",
|
|
592
|
+
size: "xs",
|
|
593
|
+
weight: "normal"
|
|
594
|
+
}, null, 8, ["text"]),
|
|
595
|
+
de
|
|
596
|
+
]),
|
|
597
|
+
t.isDropDownOpen ? (l(), o("div", ue, [
|
|
598
|
+
(l(!0), o(x, null, B(r.items, (n) => (l(), o("a", {
|
|
599
|
+
key: n.id,
|
|
600
|
+
onClick: (w) => i.handleClick(n),
|
|
601
|
+
class: "hover:bg-dropdownSelect py-1 px-2 border-b border-dropdownSelect last:border-0"
|
|
602
|
+
}, [
|
|
603
|
+
d(a, {
|
|
604
|
+
text: n.text,
|
|
605
|
+
color: "primary",
|
|
606
|
+
size: "xs",
|
|
607
|
+
weight: "normal"
|
|
608
|
+
}, null, 8, ["text"])
|
|
609
|
+
], 8, Ae))), 128))
|
|
610
|
+
])) : k("", !0)
|
|
611
|
+
])
|
|
612
|
+
]);
|
|
613
|
+
}
|
|
614
|
+
const me = /* @__PURE__ */ g(oe, [["render", ge]]), ye = {
|
|
615
|
+
name: "FilterAndSortBar",
|
|
616
|
+
components: {
|
|
617
|
+
DropDownMenu: me,
|
|
618
|
+
BaseInput: G
|
|
619
|
+
},
|
|
620
|
+
props: {
|
|
621
|
+
label: {
|
|
622
|
+
type: String
|
|
623
|
+
},
|
|
624
|
+
items: {
|
|
625
|
+
type: Array,
|
|
626
|
+
default: () => []
|
|
627
|
+
},
|
|
628
|
+
selectedItem: null
|
|
629
|
+
},
|
|
630
|
+
methods: {
|
|
631
|
+
handleButtonClick(t) {
|
|
632
|
+
this.$emit("button-click", t);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}, xe = { class: "flex flex-row w-full justify-between" }, Be = { class: "rounded-lg shadow px-2 py-1 w-1/2 flex flex-row mt-0.5" }, he = /* @__PURE__ */ s("i", { class: "fa-solid fa-magnifying-glass text-primaryHighlight w-6 mt-1" }, null, -1);
|
|
636
|
+
function be(t, e, r, c, u, i) {
|
|
637
|
+
const a = A("BaseInput"), n = A("DropDownMenu");
|
|
638
|
+
return l(), o("section", xe, [
|
|
639
|
+
s("div", Be, [
|
|
640
|
+
he,
|
|
641
|
+
d(a, {
|
|
642
|
+
placeholder: "Search on Name, Location, or Date",
|
|
643
|
+
class: "text-quaternary"
|
|
644
|
+
})
|
|
645
|
+
]),
|
|
646
|
+
s("div", null, [
|
|
647
|
+
d(n, {
|
|
648
|
+
label: r.label,
|
|
649
|
+
items: r.items,
|
|
650
|
+
selectedItem: r.selectedItem
|
|
651
|
+
}, null, 8, ["label", "items", "selectedItem"])
|
|
652
|
+
])
|
|
653
|
+
]);
|
|
654
|
+
}
|
|
655
|
+
const Ee = /* @__PURE__ */ g(ye, [["render", be]]), pe = {
|
|
656
|
+
name: "AdminLeftMenu",
|
|
657
|
+
components: { BaseButton: _ },
|
|
658
|
+
props: {
|
|
659
|
+
buttons: {
|
|
660
|
+
type: Array,
|
|
661
|
+
default: () => []
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
methods: {
|
|
665
|
+
handleButtonClick(t) {
|
|
666
|
+
this.$emit("button-click", t);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}, fe = { class: "bg-backgroundSecondary w-64 h-screen flex flex-col justify-between bg-secondary" }, Ce = /* @__PURE__ */ s("section", { class: "h-28 border-b-2 border-borderPrimary" }, [
|
|
670
|
+
/* @__PURE__ */ s("div", { class: "flex flex-col justify-center h-28" }, [
|
|
671
|
+
/* @__PURE__ */ s("div", { class: "ml-8" }, [
|
|
672
|
+
/* @__PURE__ */ s("img", {
|
|
673
|
+
class: "w-32",
|
|
674
|
+
src: "https://ferrotas.com/assets/ferrotas-white-small-720502db.png"
|
|
675
|
+
})
|
|
676
|
+
])
|
|
677
|
+
])
|
|
678
|
+
], -1), ke = { class: "flex flex-col p-2 h-full" }, _e = { class: "flex flex-col justify-end p-2 h-full" }, we = { class: "border-t-2 border-borderPrimary pt-2" };
|
|
679
|
+
function Qe(t, e, r, c, u, i) {
|
|
680
|
+
const a = A("BaseButton");
|
|
681
|
+
return l(), o("div", fe, [
|
|
682
|
+
Ce,
|
|
683
|
+
s("section", ke, [
|
|
684
|
+
(l(!0), o(x, null, B(r.buttons, (n) => (l(), p(a, {
|
|
685
|
+
label: n.label,
|
|
686
|
+
iconClass: "fa-solid fa-trophy text-white",
|
|
687
|
+
type: "admin",
|
|
688
|
+
hover: "admin",
|
|
689
|
+
onClick: (w) => i.handleButtonClick(n)
|
|
690
|
+
}, null, 8, ["label", "onClick"]))), 256))
|
|
691
|
+
]),
|
|
692
|
+
s("section", _e, [
|
|
693
|
+
s("div", we, [
|
|
694
|
+
d(a, {
|
|
695
|
+
iconClass: "fa-solid fa-circle-user text-textSecondary",
|
|
696
|
+
label: "Account",
|
|
697
|
+
type: "adminSecondary",
|
|
698
|
+
onClick: e[0] || (e[0] = (n) => i.handleButtonClick(t.button))
|
|
699
|
+
}),
|
|
700
|
+
d(a, {
|
|
701
|
+
iconClass: "fa-solid fa-right-to-bracket fa-rotate-180 text-textSecondary",
|
|
702
|
+
label: "Log Out",
|
|
703
|
+
type: "adminSecondary",
|
|
704
|
+
onClick: e[1] || (e[1] = (n) => i.handleButtonClick(t.button))
|
|
705
|
+
})
|
|
706
|
+
])
|
|
707
|
+
])
|
|
708
|
+
]);
|
|
709
|
+
}
|
|
710
|
+
const Ye = /* @__PURE__ */ g(pe, [["render", Qe]]);
|
|
711
|
+
export {
|
|
712
|
+
Ye as AdminLeftMenu,
|
|
713
|
+
_ as BaseButton,
|
|
714
|
+
G as BaseInput,
|
|
715
|
+
W as BaseTag,
|
|
716
|
+
h as BaseText,
|
|
717
|
+
me as DropDownMenu,
|
|
718
|
+
Ee as FilterAndSortBar,
|
|
719
|
+
De as GridContainer,
|
|
720
|
+
te as TournamentCard,
|
|
721
|
+
Z as TournamentCardDetails,
|
|
722
|
+
j as TournamentCardHeader
|
|
723
|
+
};
|