@dcrackel/meyersquaredui 1.0.88 → 1.0.91
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/meyersquaredui.es.js +1279 -1097
- package/dist/meyersquaredui.umd.js +4 -4
- package/package.json +1 -1
- package/src/mocks/getTournamentsMock.js +5 -5
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.stories.js +32 -1
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.vue +32 -7
- package/src/stories/Organisms/Cards/RatingSystem/RatingSystemAnnouncement.vue +2 -2
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.vue +12 -2
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.vue +23 -7
- package/src/stories/Templates/Leaderboard/Leaderboard.stories.js +0 -1
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@ const mockTournaments =
|
|
|
6
6
|
"StartDate": "2024-11-10",
|
|
7
7
|
"EndDate": "2024-11-10",
|
|
8
8
|
"Description": "Join us for a purr-fect day of sword fighting where justice is served with a scratch!",
|
|
9
|
-
"HostedOnM2":
|
|
10
|
-
"ImagesURLs": "https://
|
|
9
|
+
"HostedOnM2": true,
|
|
10
|
+
"ImagesURLs": "https://meyersquaredimages.com/images/ClawandOrder.png",
|
|
11
11
|
"ImagesAltTexts": "Catnip Fencing image",
|
|
12
12
|
"Club": {
|
|
13
13
|
"Name": "Acme Fencing Club"
|
|
@@ -24,8 +24,8 @@ const mockTournaments =
|
|
|
24
24
|
"StartDate": "2024-11-24",
|
|
25
25
|
"EndDate": "2024-11-24",
|
|
26
26
|
"Description": "Compete in a fur-ocious HEMA tournament where only the most fur-midable fighters will prevail.",
|
|
27
|
-
"HostedOnM2":
|
|
28
|
-
"ImagesURLs": "https://
|
|
27
|
+
"HostedOnM2": true,
|
|
28
|
+
"ImagesURLs": "https://meyersquaredimages.com/uploads/t-90dc6fe8.png",
|
|
29
29
|
"ImagesAltTexts": "Catnip Paradise image",
|
|
30
30
|
"Club": {
|
|
31
31
|
"Name": "Acme Fencing Club"
|
|
@@ -61,7 +61,7 @@ const mockTournaments =
|
|
|
61
61
|
"EndDate": "2024-12-15",
|
|
62
62
|
"Description": "A one-day event where warriors paw-se to engage in intense bouts of skill and strategy.",
|
|
63
63
|
"HostedOnM2": false,
|
|
64
|
-
"ImagesURLs": "https://
|
|
64
|
+
"ImagesURLs": "https://meyersquaredimages.com/images/pawsandblades.png",
|
|
65
65
|
"ImagesAltTexts": "alt text",
|
|
66
66
|
"Club": {
|
|
67
67
|
"Name": "Acme Fencing Club"
|
|
@@ -24,7 +24,38 @@ Default.args = {
|
|
|
24
24
|
DisplayName: 'John Doe',
|
|
25
25
|
Club: { Name: 'Awesome Fencing Club' },
|
|
26
26
|
M2Ratings: [{ WeaponId: 1, FormattedRating: 'A23' }],
|
|
27
|
-
|
|
27
|
+
HEMARatings: [{ WeaponId: 1, Rating: '1436.7' }],
|
|
28
|
+
ProfileImage: { URL: 'https://randomuser.me/api/portraits/men/14.jpg' },
|
|
28
29
|
},
|
|
30
|
+
index: 1,
|
|
29
31
|
isLoading: false,
|
|
32
|
+
showHRRatings: true,
|
|
30
33
|
};
|
|
34
|
+
|
|
35
|
+
export const NoHR = Template.bind({});
|
|
36
|
+
NoHR.args = {
|
|
37
|
+
data: {
|
|
38
|
+
DisplayName: 'John Doe',
|
|
39
|
+
Club: { Name: 'Awesome Fencing Club' },
|
|
40
|
+
M2Ratings: [{ WeaponId: 1, FormattedRating: 'A23' }],
|
|
41
|
+
HEMARatings: [{ WeaponId: 1, Rating: '1436.7' }],
|
|
42
|
+
ProfileImage: { URL: 'https://randomuser.me/api/portraits/men/14.jpg' },
|
|
43
|
+
},
|
|
44
|
+
index: 1,
|
|
45
|
+
isLoading: false,
|
|
46
|
+
showHRRatings: false,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const NoProfileImage = Template.bind({});
|
|
50
|
+
NoProfileImage.args = {
|
|
51
|
+
data: {
|
|
52
|
+
DisplayName: 'John Doe',
|
|
53
|
+
Club: { Name: 'Awesome Fencing Club' },
|
|
54
|
+
M2Ratings: [{ WeaponId: 1, FormattedRating: 'A23' }],
|
|
55
|
+
HEMARatings: [{ WeaponId: 1, Rating: '1436.7' }],
|
|
56
|
+
ProfileImage: { },
|
|
57
|
+
},
|
|
58
|
+
index: 1,
|
|
59
|
+
isLoading: false,
|
|
60
|
+
showHRRatings: false,
|
|
61
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section v-if="!isLoading" class="flex items-center p-4 hover:cursor-pointer border-b" @click="handleCardClicked">
|
|
3
3
|
<img :src="portrait" alt="Fencer Portrait" class="w-[50px] h-[50px] md:w-[70px] md:h-[70px] rounded-full object-cover z-1 flex-shrink-0 mr-4" />
|
|
4
|
-
|
|
4
|
+
<div class="rounded-full bg-accent h-5 w-5 absolute flex justify-center ml-9 mt-9 md:ml-12 md:mt-12">
|
|
5
|
+
<BaseText tag="p" size="sm" weight="bold" class="text-white">{{ index + 1 }}</BaseText>
|
|
6
|
+
</div>
|
|
5
7
|
<div class="flex flex-col justify-center flex-grow">
|
|
6
8
|
<section class="hidden md:flex flex-col">
|
|
7
9
|
<BaseText tag="h3" size="2xl" weight="bold">{{ displayName }}</BaseText>
|
|
@@ -14,13 +16,25 @@
|
|
|
14
16
|
</div>
|
|
15
17
|
|
|
16
18
|
<div class="flex items-center">
|
|
17
|
-
<section class="hidden md:flex">
|
|
18
|
-
<
|
|
19
|
-
|
|
19
|
+
<section class="hidden md:flex flex-col">
|
|
20
|
+
<div class="flex">
|
|
21
|
+
<BaseText tag="p" size="sm" weight="normal" class="text-accent">M² Rating:</BaseText>
|
|
22
|
+
<BaseText tag="p" size="sm" weight="bold" class="text-accent ml-2"> {{ m2Rating }}</BaseText>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-if="showHRRating" class="flex">
|
|
25
|
+
<BaseText tag="p" size="sm" weight="normal" class="text-accent">HR Rating:</BaseText>
|
|
26
|
+
<BaseText tag="p" size="sm" weight="bold" class="text-accent ml-2"> {{ HEMARating }}</BaseText>
|
|
27
|
+
</div>
|
|
20
28
|
</section>
|
|
21
|
-
<section class="flex md:hidden">
|
|
22
|
-
<
|
|
23
|
-
|
|
29
|
+
<section class="flex flex-col md:hidden">
|
|
30
|
+
<div class="flex">
|
|
31
|
+
<BaseText tag="p" size="xs" weight="normal" class="text-accent">M²:</BaseText>
|
|
32
|
+
<BaseText tag="p" size="xs" weight="bold" class="text-accent ml-2"> {{ m2Rating}}</BaseText>
|
|
33
|
+
</div>
|
|
34
|
+
<div v-if="showHRRating" class="flex">
|
|
35
|
+
<BaseText tag="p" size="xs" weight="normal" class="text-accent">HR:</BaseText>
|
|
36
|
+
<BaseText tag="p" size="xs" weight="bold" class="text-accent ml-2"> {{ HEMARating}}</BaseText>
|
|
37
|
+
</div>
|
|
24
38
|
</section>
|
|
25
39
|
</div>
|
|
26
40
|
</section>
|
|
@@ -59,6 +73,14 @@ export default {
|
|
|
59
73
|
type: Boolean,
|
|
60
74
|
default: false,
|
|
61
75
|
},
|
|
76
|
+
showIndex: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false,
|
|
79
|
+
},
|
|
80
|
+
showHRRating: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false,
|
|
83
|
+
},
|
|
62
84
|
},
|
|
63
85
|
emits: ['grid-card-click'],
|
|
64
86
|
computed: {
|
|
@@ -76,6 +98,9 @@ export default {
|
|
|
76
98
|
m2Rating() {
|
|
77
99
|
return this.data.M2Ratings[0] ? this.data.M2Ratings[0].FormattedRating : 'U';
|
|
78
100
|
},
|
|
101
|
+
HEMARating() {
|
|
102
|
+
return this.data.HEMARatings[0] ? this.data.HEMARatings[0].Rating : '0';
|
|
103
|
+
}
|
|
79
104
|
},
|
|
80
105
|
methods: {
|
|
81
106
|
handleCardClicked() {
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
</BaseText>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="flex">
|
|
11
|
-
<div class="w-1/2 flex justify-end mr-10">
|
|
11
|
+
<div class="w-1/2 hidden md:flex justify-end mr-10">
|
|
12
12
|
<img src="https://meyersquaredimages.com/images/trophy.png" alt="Rating System Announcement" class="w-96 h-96 rounded-lg" />
|
|
13
13
|
</div>
|
|
14
|
-
<div class="w-1/2">
|
|
14
|
+
<div class="md:w-1/2 flex justify-center">
|
|
15
15
|
<BaseText color="primary" size="md" tag="p" weight="normal" class="w-3/4">
|
|
16
16
|
Our new M² Rating System will give you deeper insights into your performance, track your progress,
|
|
17
17
|
and help you see how you measure up against competitors nationwide.<br><br>
|
|
@@ -12,20 +12,30 @@
|
|
|
12
12
|
@error="imageError"
|
|
13
13
|
:style="fallbackStyle"
|
|
14
14
|
/>
|
|
15
|
+
<img v-if="data.HostedOnM2"
|
|
16
|
+
src="https://meyersquaredimages.com/images/banners/m2-white.png"
|
|
17
|
+
alt="Bookmark Icon"
|
|
18
|
+
class="w-8 absolute top-4 right-4 m-2 p-1 bg-white rounded" />
|
|
15
19
|
<BaseText tag="h3" size="xl" weight="semibold" class="mb-1">{{ title }}</BaseText>
|
|
16
20
|
<BaseText tag="p" size="sm" weight="semibold" class="mb-2">{{ location }}</BaseText>
|
|
17
21
|
<div class="flex items-center mb-1">
|
|
18
22
|
<span class="flex w-6 justify-center">
|
|
19
|
-
<Icon icon="fa-calendar" color="accent" size="sm" class="mr-3 w-4"/>
|
|
23
|
+
<Icon icon="fa-calendar" :type="data.HostedOnM2 ? 'fa-solid' : 'fa-regular'" color="accent" size="sm" class="mr-3 w-4"/>
|
|
20
24
|
</span>
|
|
21
25
|
<BaseText tag="p" size="sm" class="">{{ startDate }} to {{ endDate }}</BaseText>
|
|
22
26
|
</div>
|
|
23
|
-
<div class="flex items-center">
|
|
27
|
+
<div v-if="data.HostedOnM2" class="flex items-center">
|
|
24
28
|
<span class="flex w-6 justify-center">
|
|
25
29
|
<Icon icon="fa-user-friends" color="accent" size="sm" class="mr-3"/>
|
|
26
30
|
</span>
|
|
27
31
|
<BaseText tag="p" size="sm" class="">{{ numberOfFencers }} Registered Fencers</BaseText>
|
|
28
32
|
</div>
|
|
33
|
+
<div v-if="!data.HostedOnM2" class="flex items-center">
|
|
34
|
+
<span class="flex w-6 justify-center">
|
|
35
|
+
<Icon icon="fa-bookmark" type="fa-regular" color="accent" size="sm" class="mr-3"/>
|
|
36
|
+
</span>
|
|
37
|
+
<BaseText tag="p" size="sm" class="">{{ numberOfFencers }} Bookmarked</BaseText>
|
|
38
|
+
</div>
|
|
29
39
|
</section>
|
|
30
40
|
|
|
31
41
|
<!-- Mobile Version -->
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="flex flex-col md:bg-white w-full border-b pb-2 mb-2 pl-1 pt-1 cursor-pointer last:border-b-0" @click="handleCardClick">
|
|
3
3
|
<div class="flex pt-1">
|
|
4
|
-
<
|
|
4
|
+
<div class="relative w-24 h-16 md:w-32 md:h-20 mr-3">
|
|
5
|
+
<img :src="tournamentImage" :alt="imageAltText" class="w-full h-full object-cover rounded-lg" />
|
|
6
|
+
<img v-if="data.HostedOnM2"
|
|
7
|
+
src="https://meyersquaredimages.com/images/banners/m2-white.png"
|
|
8
|
+
alt="Hosted M²"
|
|
9
|
+
class="w-6 absolute top-2 left-16 md:left-24 p-1 bg-white rounded" />
|
|
10
|
+
</div>
|
|
5
11
|
<div class="flex flex-col">
|
|
6
12
|
<div class="flex items-center mb-0"><BaseText color="primary" tag="h2" size="2xl" weight="bold">{{ tournamentName }}</BaseText></div>
|
|
7
13
|
<div class="hidden md:flex items-center text-sm text-gray-600 mb-2"><BaseText color="primary" tag="p" size="md" weight="normal">{{ addressName }}</BaseText></div>
|
|
@@ -11,12 +17,18 @@
|
|
|
11
17
|
<!-- Participants and Date Section -->
|
|
12
18
|
<div class="hidden md:flex mt-3 mb-1">
|
|
13
19
|
<div class="flex flex-row w-full">
|
|
14
|
-
<div class="flex items-center mr-10">
|
|
15
|
-
<Icon icon="fa-
|
|
20
|
+
<div v-if="data.HostedOnM2" class="flex items-center mr-10">
|
|
21
|
+
<Icon :type="data.HostedOnM2 ? 'fa-solid' : 'fa-regular'" icon="fa-user-friends" size="sm" color="accent" class="mr-4" />
|
|
16
22
|
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ participants }} signed up</BaseText>
|
|
17
23
|
</div>
|
|
24
|
+
<div v-if="!data.HostedOnM2" class="flex items-center mr-4">
|
|
25
|
+
<span class="flex w-6 justify-center">
|
|
26
|
+
<Icon icon="fa-bookmark" type="fa-regular" color="accent" size="sm" class="mr-3"/>
|
|
27
|
+
</span>
|
|
28
|
+
<BaseText tag="p" size="sm" class="">{{ participants }} Bookmarked</BaseText>
|
|
29
|
+
</div>
|
|
18
30
|
<div class="flex items-center">
|
|
19
|
-
<Icon icon="fa-calendar" size="sm" color="accent" class="mr-4" />
|
|
31
|
+
<Icon :type="data.HostedOnM2 ? 'fa-solid' : 'fa-regular'" icon="fa-calendar" size="sm" color="accent" class="mr-4" />
|
|
20
32
|
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ startDate }} | {{ startTime }}</BaseText>
|
|
21
33
|
</div>
|
|
22
34
|
</div>
|
|
@@ -28,12 +40,16 @@
|
|
|
28
40
|
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ addressName }}</BaseText>
|
|
29
41
|
</div>
|
|
30
42
|
<div class="flex flex-row">
|
|
31
|
-
<div class="flex items-center mr-4">
|
|
32
|
-
<Icon icon="fa-
|
|
43
|
+
<div v-if="data.HostedOnM2" class="flex items-center mr-4">
|
|
44
|
+
<Icon :type="data.HostedOnM2 ? 'fa-solid' : 'fa-regular'" icon="fa-user-friends" size="sm" color="accent" class="mr-2" />
|
|
33
45
|
<BaseText color="primary" tag="p" size="xs" weight="normal">{{ participants }} signed up</BaseText>
|
|
34
46
|
</div>
|
|
47
|
+
<div v-if="!data.HostedOnM2" class="flex items-center mr-4">
|
|
48
|
+
<span class="flex w-6 justify-center mr-2"><Icon icon="fa-bookmark" type="fa-regular" color="accent" size="sm" class="mr-3"/></span>
|
|
49
|
+
<BaseText tag="p" size="sm" class="">{{ participants }} Bookmarked</BaseText>
|
|
50
|
+
</div>
|
|
35
51
|
<div class="flex items-center">
|
|
36
|
-
<Icon icon="fa-calendar" size="sm" color="accent" class="mr-2" />
|
|
52
|
+
<Icon :type="data.HostedOnM2 ? 'fa-solid' : 'fa-regular'" icon="fa-calendar" size="sm" color="accent" class="mr-2" />
|
|
37
53
|
<BaseText color="primary" tag="p" size="xs" weight="normal">{{ startDate }} | {{ startTime }}</BaseText>
|
|
38
54
|
</div>
|
|
39
55
|
</div>
|