@dcrackel/meyersquaredui 1.0.42 → 1.0.44
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 +634 -515
- package/dist/meyersquaredui.umd.js +1 -1
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/mocks/getAllClubs.js +106 -0
- package/src/mocks/getClubById.js +130 -0
- package/src/mocks/getFencersByWeapon.js +2167 -0
- package/src/mocks/getTouranmentDetailsMock.js +92 -0
- package/src/stories/Atoms/BaseButton/BaseButton.vue +5 -3
- package/src/stories/Atoms/BaseText/BaseText.vue +1 -1
- package/src/stories/Atoms/Icon/Icon.vue +4 -2
- package/src/stories/Atoms/InputField/InputField.stories.js +28 -9
- package/src/stories/Atoms/InputField/InputField.vue +20 -2
- package/src/stories/Molecules/Calendar/Calendar.stories.js +39 -0
- package/src/stories/Molecules/Calendar/Calendar.vue +110 -0
- package/src/stories/Molecules/DropDowns/BasicDropDown.stories.js +31 -0
- package/src/stories/Molecules/DropDowns/BasicDropDown.vue +78 -0
- package/src/stories/Molecules/MapBox/MapBox.stories.js +30 -0
- package/src/stories/Molecules/MapBox/MapBox.vue +67 -0
- package/src/stories/Molecules/SearchBox/SearchBox.vue +2 -1
- package/src/stories/Molecules/SearchBox/Searchbox.stories.js +1 -1
- package/src/stories/Organisms/Cards/ArticleCard/ArticleCard.vue +8 -3
- package/src/stories/Organisms/Cards/ClubListCard/CLubListCard.stories.js +31 -0
- package/src/stories/Organisms/Cards/ClubListCard/ClubListCard.vue +72 -0
- package/src/stories/Organisms/Cards/ClubMember/ClubMember.stories.js +40 -0
- package/src/stories/Organisms/Cards/ClubMember/ClubMember.vue +56 -0
- package/src/stories/Organisms/Cards/EventListCard/EventListCard.stories.js +38 -0
- package/src/stories/Organisms/Cards/EventListCard/EventListCard.vue +64 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +9 -10
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.stories.js +30 -0
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.vue +86 -0
- package/src/stories/Organisms/Cards/PhotoCard/PhotoCard.stories.js +28 -0
- package/src/stories/Organisms/Cards/PhotoCard/PhotoCard.vue +18 -0
- package/src/stories/Organisms/Cards/SocialMediaLinkCard/SocialMediaLinkCard.stories.js +40 -0
- package/src/stories/Organisms/Cards/SocialMediaLinkCard/SocialMediaLinkCard.vue +54 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.stories.js +1 -1
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.vue +9 -1
- package/src/stories/Organisms/Cards/TournamentDetails/TournamentDetails.stories.js +35 -0
- package/src/stories/Organisms/Cards/TournamentDetails/TournamentDetails.vue +59 -0
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.stories.js +26 -0
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.vue +103 -0
- package/src/stories/Organisms/Column/HostColumn.stories.js +39 -0
- package/src/stories/Organisms/Column/HostColumn.vue +105 -0
- package/src/stories/Organisms/GridLayout/GridLayout.vue +36 -6
- package/src/stories/Organisms/Headers/ClubHeader/ClubHeader.stories.js +21 -0
- package/src/stories/Organisms/Headers/ClubHeader/ClubHeader.vue +58 -0
- package/src/stories/Organisms/Headers/LeaderboardHeader/LeaderboardHeader.stories.js +29 -0
- package/src/stories/Organisms/Headers/LeaderboardHeader/LeaderboardHeader.vue +59 -0
- package/src/stories/Organisms/Headers/{Header.stories.js → PageHeader/PageHeader.stories.js} +2 -2
- package/src/stories/Organisms/Headers/PageHeader/PageHeader.vue +101 -0
- package/src/stories/Organisms/Headers/TournamentHeader/TournamentHeader.stories.js +34 -0
- package/src/stories/Organisms/Headers/TournamentHeader/TournamentHeader.vue +73 -0
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.stories.js +3 -3
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.vue +1 -1
- package/src/stories/Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.stories.js +39 -0
- package/src/stories/Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.vue +129 -0
- package/src/stories/Organisms/HeroBanners/Tournaments/TournamentBanner.stories.js +25 -0
- package/src/stories/Organisms/HeroBanners/Tournaments/TournamentBanner.vue +79 -0
- package/src/stories/Organisms/SectionBanners/DoubleButtonBanner/DoubleButtonBanner.vue +4 -0
- package/src/stories/Organisms/SectionBanners/SingleButtonBanner/SingleButtonBanner.vue +1 -1
- package/src/stories/Templates/ClubDetailPage/ClubDetailPage.stories.js +43 -0
- package/src/stories/Templates/ClubDetailPage/ClubDetailPage.vue +127 -0
- package/src/stories/Templates/ClubListPage/ClubListPage.stories.js +43 -0
- package/src/stories/Templates/ClubListPage/ClubListPage.vue +84 -0
- package/src/stories/Templates/HomePage/HomePage.stories.js +6 -6
- package/src/stories/Templates/HomePage/HomePage.vue +20 -13
- package/src/stories/Templates/Leaderboard/Leaderboard.stories.js +43 -0
- package/src/stories/Templates/Leaderboard/Leaderboard.vue +93 -0
- package/src/stories/Templates/TournamentDetailPage/TournamentDetail.stories.js +32 -0
- package/src/stories/Templates/TournamentDetailPage/TournamentDetailPage.vue +121 -0
- package/src/stories/Templates/TournamentListPage/TournamentListPage.stories.js +41 -0
- package/src/stories/Templates/TournamentListPage/TournamentListPage.vue +91 -0
- package/src/stories/Organisms/Headers/Header.vue +0 -62
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import TournamentDetails from './TournamentDetails.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Cards/Tournament/TournamentDetails',
|
|
5
|
+
component: TournamentDetails,
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageSrc: { control: 'text', description: 'URL of the tournament image' },
|
|
8
|
+
description: { control: 'text', description: 'HTML description of the tournament' },
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Template = (args, { argTypes }) => ({
|
|
13
|
+
props: Object.keys(argTypes),
|
|
14
|
+
components: { TournamentDetails },
|
|
15
|
+
template: `<TournamentDetails v-bind="$props" />`,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const Default = Template.bind({});
|
|
19
|
+
Default.args = {
|
|
20
|
+
imageSrc: 'https://via.placeholder.com/800x500',
|
|
21
|
+
description: `
|
|
22
|
+
<h2>Welcome to the Tournament!</h2>
|
|
23
|
+
<p>This is a sample description of the tournament. It can contain HTML elements like <strong>bold</strong>, <em>italic</em>, and even <a href="#">links</a>.</p>
|
|
24
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque. Subheac is the text that can go up to 500 characters or more.</p>
|
|
25
|
+
`,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const WithCustomImage = Template.bind({});
|
|
29
|
+
WithCustomImage.args = {
|
|
30
|
+
imageSrc: 'https://example.com/custom-image.jpg',
|
|
31
|
+
description: `
|
|
32
|
+
<h2>Special Event Details</h2>
|
|
33
|
+
<p>This tournament has a custom image and a unique description. Feel free to add more information here.</p>
|
|
34
|
+
`,
|
|
35
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="w-full max-w-4xl mx-auto md:p-4">
|
|
3
|
+
<div class="w-full h-96 md:mb-4">
|
|
4
|
+
<img :src="imageSrc" alt="Tournament Image" class="w-full h-full object-cover md:rounded-lg" />
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="flex justify-end items-center w-full md:h-10 rounded-md p-2">
|
|
8
|
+
<BaseText color="primary" size="md" weight="normal" class="mr-2">Share</BaseText>
|
|
9
|
+
<a
|
|
10
|
+
v-for="link in shareLinks"
|
|
11
|
+
:key="link.name"
|
|
12
|
+
:href="link.url"
|
|
13
|
+
target="_blank"
|
|
14
|
+
class="mx-2 hover:text-accent transition duration-200"
|
|
15
|
+
>
|
|
16
|
+
<Icon type="fa-brands" color="primary" :icon="link.icon" size="md" />
|
|
17
|
+
</a>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="w-full flex md:py-4 pb-4 md:pb-10">
|
|
21
|
+
<BaseText :color="'primary'" size="xl" tag="h3" weight="bold" class="pl-2">Details</BaseText>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="bg-white p-4 m-2 rounded-lg" >
|
|
24
|
+
<div v-html="description" class="text-base text-gray-800"></div>
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import Icon from '../../../Atoms/Icon/Icon.vue';
|
|
31
|
+
import BaseText from "../../../Atoms/BaseText/BaseText.vue";
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'TournamentDetails',
|
|
35
|
+
components: {
|
|
36
|
+
BaseText,
|
|
37
|
+
Icon
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
imageSrc: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'https://via.placeholder.com/800x500', // Placeholder image if no image is provided
|
|
43
|
+
},
|
|
44
|
+
description: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '<p>This is a sample tournament description. It can be long and may contain HTML.</p>',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
shareLinks: [
|
|
52
|
+
{ name: 'Facebook', url: 'https://facebook.com', icon: 'fa-facebook' },
|
|
53
|
+
{ name: 'Instagram', url: 'https://twitter.com', icon: 'fa-instagram' },
|
|
54
|
+
{ name: 'Discord', url: 'https://linkedin.com', icon: 'fa-discord' },
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TournamentListCard from './TournamentListCard.vue';
|
|
2
|
+
import mockTournaments from "../../../../mocks/getTournamentsMock.js";
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Cards/Tournament/TournamentListCard',
|
|
5
|
+
component: TournamentListCard,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => ({
|
|
9
|
+
components: { TournamentListCard },
|
|
10
|
+
setup() {
|
|
11
|
+
return { args };
|
|
12
|
+
},
|
|
13
|
+
template: '<TournamentListCard v-bind="args" />',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const Default = Template.bind({});
|
|
17
|
+
Default.args = {
|
|
18
|
+
data: mockTournaments[1],
|
|
19
|
+
isLoading: false
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Loading = Template.bind({});
|
|
23
|
+
Loading.args = {
|
|
24
|
+
data: mockTournaments[3],
|
|
25
|
+
isLoading: true
|
|
26
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="flex flex-col md:bg-white w-full border-b pb-2 mb-2 pt-1 cursor-pointer last:border-b-0">
|
|
3
|
+
<div class="flex">
|
|
4
|
+
<img :src="tournamentImage" :alt="imageAltText" class="w-24 h-16 md:w-32 md:h-20 object-cover rounded mr-2 md:mr-4 flex-shrink-0" />
|
|
5
|
+
<div class="flex flex-col">
|
|
6
|
+
<div class="flex items-center mb-2"><BaseText color="primary" tag="h2" size="2xl" weight="bold">{{ tournamentName }}</BaseText></div>
|
|
7
|
+
<div class="hidden md:flex items-center text-sm text-gray-600 mb-2"><BaseText color="primary" tag="p" size="lg" weight="bold">{{ addressName }}</BaseText></div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Participants and Date Section -->
|
|
12
|
+
<div class="hidden md:flex mt-3">
|
|
13
|
+
<div class="flex flex-row w-full">
|
|
14
|
+
<div class="flex items-center mr-10">
|
|
15
|
+
<Icon icon="fa-users" size="sm" color="accent" class="mr-4" />
|
|
16
|
+
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ participants }} signed up</BaseText>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="flex items-center">
|
|
19
|
+
<Icon icon="fa-calendar" size="sm" color="accent" class="mr-4" />
|
|
20
|
+
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ startDate }} | {{ startTime }}</BaseText>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- Mobile Participants and Date Section -->
|
|
26
|
+
<div class="flex flex-col md:hidden mt-2">
|
|
27
|
+
<div class="flex items-center pb-2">
|
|
28
|
+
<BaseText color="primary" tag="p" size="sm" weight="bold">{{ addressName }}</BaseText>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex flex-row">
|
|
31
|
+
<div class="flex items-center mr-4">
|
|
32
|
+
<Icon icon="fa-users" size="sm" color="accent" class="mr-2" />
|
|
33
|
+
<BaseText color="primary" tag="p" size="xs" weight="normal">{{ participants }} signed up</BaseText>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="flex items-center">
|
|
36
|
+
<Icon icon="fa-calendar" size="sm" color="accent" class="mr-2" />
|
|
37
|
+
<BaseText color="primary" tag="p" size="xs" weight="normal">{{ startDate }} | {{ startTime }}</BaseText>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
</section>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
47
|
+
import Icon from '../../../Atoms/Icon/Icon.vue';
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
name: 'TournamentListCard',
|
|
51
|
+
components: {
|
|
52
|
+
BaseText,
|
|
53
|
+
Icon,
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
data: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
isLoading: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
tournamentName() {
|
|
67
|
+
return this.data.Name || 'Tournament Name';
|
|
68
|
+
},
|
|
69
|
+
addressName() {
|
|
70
|
+
return this.data.Address ? `${this.data.Address.Name}, ${this.data.Address.City}, ${this.data.Address.State}` : 'Address Name';
|
|
71
|
+
},
|
|
72
|
+
startDate() {
|
|
73
|
+
return this.formatDate(this.data.StartDate);
|
|
74
|
+
},
|
|
75
|
+
startTime() {
|
|
76
|
+
return '00:00 AM'; // Replace with actual time if available in the data object
|
|
77
|
+
},
|
|
78
|
+
tournamentImage() {
|
|
79
|
+
return this.data.ImagesURLs || 'https://via.placeholder.com/150';
|
|
80
|
+
},
|
|
81
|
+
imageAltText() {
|
|
82
|
+
return this.data.ImagesAltTexts || 'Tournament Image';
|
|
83
|
+
},
|
|
84
|
+
isBookmarked() {
|
|
85
|
+
return false;
|
|
86
|
+
},
|
|
87
|
+
participants() {
|
|
88
|
+
return this.data.Participants || 0;
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
toggleBookmark() {
|
|
93
|
+
this.$emit('toggle-bookmark', !this.isBookmarked);
|
|
94
|
+
},
|
|
95
|
+
formatDate(dateString) {
|
|
96
|
+
// Convert the date from the format in your data object to a more readable format (e.g., MM/DD/YYYY)
|
|
97
|
+
const options = { year: 'numeric', month: 'short', day: 'numeric' };
|
|
98
|
+
const date = new Date(dateString);
|
|
99
|
+
return date.toLocaleDateString(undefined, options);
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import HostColumn from './HostColumn.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Columns/HostColumn',
|
|
5
|
+
component: HostColumn,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
components: { HostColumn },
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
template: '<HostColumn v-bind="$props" @rules-click="onRulesClick" />',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const Default = Template.bind({});
|
|
15
|
+
Default.args = {
|
|
16
|
+
organizerName: 'Bob Smith',
|
|
17
|
+
organizerPortrait: 'https://via.placeholder.com/150',
|
|
18
|
+
fencersGoing: 10,
|
|
19
|
+
bookmarksCount: 25,
|
|
20
|
+
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithFewFencers = Template.bind({});
|
|
24
|
+
WithFewFencers.args = {
|
|
25
|
+
organizerName: 'Jane Doe',
|
|
26
|
+
organizerPortrait: 'https://via.placeholder.com/150',
|
|
27
|
+
fencersGoing: 2,
|
|
28
|
+
bookmarksCount: 5,
|
|
29
|
+
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const NoFencersOrBookmarks = Template.bind({});
|
|
33
|
+
NoFencersOrBookmarks.args = {
|
|
34
|
+
organizerName: 'Mark Johnson',
|
|
35
|
+
organizerPortrait: 'https://via.placeholder.com/150',
|
|
36
|
+
fencersGoing: 0,
|
|
37
|
+
bookmarksCount: 0,
|
|
38
|
+
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q'
|
|
39
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<aside class="md:w-80 m-2 flex flex-col mb-20">
|
|
3
|
+
<section class="bg-white p-4 rounded-lg">
|
|
4
|
+
<div class="flex flex-col space-y-4">
|
|
5
|
+
<div class="flex items-center">
|
|
6
|
+
<img
|
|
7
|
+
:src="organizerPortrait"
|
|
8
|
+
alt="Event Organizer"
|
|
9
|
+
class="w-16 h-16 rounded-full object-cover"
|
|
10
|
+
/>
|
|
11
|
+
<div class="pl-2">
|
|
12
|
+
<BaseText color="primary" size="xs" weight="normal">Event Organizer:</BaseText>
|
|
13
|
+
<BaseText color="primary" size="md" weight="bold" class="mt-1">{{ organizerName }}</BaseText>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Icons for Fencers and Bookmarks -->
|
|
18
|
+
<div class="flex justify-between space-x-8 w-full px-4">
|
|
19
|
+
<div class="flex items-center space-x-2">
|
|
20
|
+
<Icon icon="fa-users" color="primary" size="sm" />
|
|
21
|
+
<BaseText color="primary" size="sm">{{ fencersGoing }} Going</BaseText>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="flex items-center space-x-2">
|
|
24
|
+
<Icon icon="fa-bookmark" color="primary" size="sm" />
|
|
25
|
+
<BaseText color="primary" size="sm">{{ bookmarksCount }} Bookmarked</BaseText>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="flex justify-center">
|
|
30
|
+
<BaseButton
|
|
31
|
+
backgroundColor="secondary"
|
|
32
|
+
color="primary"
|
|
33
|
+
border="primary"
|
|
34
|
+
size="sm"
|
|
35
|
+
label="Rules and Documents"
|
|
36
|
+
class="w-full"
|
|
37
|
+
@click="onRulesClick"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</section>
|
|
42
|
+
|
|
43
|
+
<section class="mt-10 bg-white p-4 rounded-lg">
|
|
44
|
+
<div class="flex mb-4">
|
|
45
|
+
<div class="mr-3">
|
|
46
|
+
<Icon icon="fa-map-marker-alt" color="accent" size="3xl" />
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<BaseText color="primary" size="sm" weight="normal" class="">{{ address.Name }}</BaseText>
|
|
50
|
+
<BaseText color="primary" size="sm" weight="bold" class="">{{ address.Address1 }}, {{ address.City }} {{ address.State }}</BaseText>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<Mapbox :apiKey="apiKey" :coordinates="getCordinates" />
|
|
54
|
+
</section>
|
|
55
|
+
</aside>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
60
|
+
import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
|
|
61
|
+
import Icon from "../../Atoms/Icon/Icon.vue";
|
|
62
|
+
import Mapbox from "../../Molecules/MapBox/MapBox.vue";
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: 'HostColumn',
|
|
66
|
+
components: {Mapbox, BaseText, BaseButton, Icon },
|
|
67
|
+
props: {
|
|
68
|
+
organizerName: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'Bob Smith',
|
|
71
|
+
},
|
|
72
|
+
address: {
|
|
73
|
+
type: [String,Object],
|
|
74
|
+
default: {"Name": "Test Location", "City": "Delaware", "State": "OH", "Address1": "123 Anywhere", "Zip": 43015, "Coordinates": "40.2828592,-83.1118049"},
|
|
75
|
+
},
|
|
76
|
+
organizerPortrait: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: 'https://via.placeholder.com/150',
|
|
79
|
+
},
|
|
80
|
+
fencersGoing: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 0,
|
|
83
|
+
},
|
|
84
|
+
bookmarksCount: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 0,
|
|
87
|
+
},
|
|
88
|
+
apiKey: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
computed: {
|
|
94
|
+
getCordinates() {
|
|
95
|
+
const [lat, lng] = this.address.Coordinates.split(',').map(Number);
|
|
96
|
+
return { lat, lng };
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
onRulesClick() {
|
|
101
|
+
this.$emit('rules-click');
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="
|
|
3
|
-
<div class="
|
|
4
|
-
<BaseText color="primary" size="
|
|
2
|
+
<section :class="topClasses">
|
|
3
|
+
<div :class="headerClasses">
|
|
4
|
+
<BaseText color="primary" size="xl" tag="h3" weight="bold">{{ title }}</BaseText>
|
|
5
5
|
</div>
|
|
6
6
|
<div :class="gridClasses">
|
|
7
7
|
<component
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
:data="item"
|
|
12
12
|
:index="index"
|
|
13
13
|
:isLoading="isLoading"
|
|
14
|
+
@grid-card-click="handleCardClick"
|
|
14
15
|
/>
|
|
15
16
|
</div>
|
|
16
17
|
</section>
|
|
17
|
-
<div class="w-full flex justify-center pb-28 pt-10 md:pt-14">
|
|
18
|
+
<div v-if="!whiteStyle && moreButtonLabel" class="w-full flex justify-center pb-28 pt-10 md:pt-14">
|
|
18
19
|
<BaseButton
|
|
19
20
|
backgroundColor="secondary"
|
|
20
21
|
border="primary"
|
|
@@ -22,13 +23,15 @@
|
|
|
22
23
|
color="primary"
|
|
23
24
|
hoverColor="secondary"
|
|
24
25
|
:label="moreButtonLabel"
|
|
26
|
+
@click="onClick"
|
|
25
27
|
/>
|
|
26
28
|
</div>
|
|
27
29
|
</template>
|
|
28
30
|
|
|
29
31
|
<script>
|
|
30
|
-
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
31
32
|
import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
|
|
33
|
+
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
34
|
+
import {markRaw} from "vue";
|
|
32
35
|
|
|
33
36
|
export default {
|
|
34
37
|
name: 'GridLayout',
|
|
@@ -48,6 +51,7 @@ export default {
|
|
|
48
51
|
cardComponent: {
|
|
49
52
|
type: [Object, String],
|
|
50
53
|
required: true,
|
|
54
|
+
default: () => markRaw({}),
|
|
51
55
|
},
|
|
52
56
|
items: {
|
|
53
57
|
type: Array,
|
|
@@ -62,16 +66,34 @@ export default {
|
|
|
62
66
|
type: Boolean,
|
|
63
67
|
default: false,
|
|
64
68
|
},
|
|
69
|
+
whiteStyle: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
65
73
|
isLoading: {
|
|
66
74
|
type: Boolean,
|
|
67
75
|
default: false,
|
|
68
76
|
},
|
|
69
77
|
},
|
|
78
|
+
emits: ['grid-click', 'grid-card-click'],
|
|
70
79
|
computed: {
|
|
80
|
+
topClasses() {
|
|
81
|
+
let retClass = "max-w-[1200px] mx-auto overflow-x-auto";
|
|
82
|
+
if (this.whiteStyle) retClass = `w-full md:mr-10 mt-10`;
|
|
83
|
+
return retClass;
|
|
84
|
+
},
|
|
85
|
+
headerClasses() {
|
|
86
|
+
let retClasses = "w-full flex py-4 md:pb-10 ml-2 md:ml-0";
|
|
87
|
+
if (!this.whiteStyle) retClasses = `${retClasses} justify-center`;
|
|
88
|
+
return retClasses;
|
|
89
|
+
},
|
|
71
90
|
gridClasses() {
|
|
72
91
|
let baseClasses = "md:grid md:gap-x-6 md:gap-y-4";
|
|
73
92
|
if (this.mobileHorizontal) {
|
|
74
|
-
baseClasses =
|
|
93
|
+
baseClasses = `flex space-x-4 md:grid md:gap-x-6 md:gap-y-4`;
|
|
94
|
+
}
|
|
95
|
+
if (this.whiteStyle) {
|
|
96
|
+
baseClasses = `bg-white p-2 mx-2 md:mx-0 rounded-lg`;
|
|
75
97
|
}
|
|
76
98
|
|
|
77
99
|
let columnClasses;
|
|
@@ -99,5 +121,13 @@ export default {
|
|
|
99
121
|
return `${baseClasses} ${columnClasses}`;
|
|
100
122
|
},
|
|
101
123
|
},
|
|
124
|
+
methods: {
|
|
125
|
+
onClick() {
|
|
126
|
+
this.$emit('grid-click');
|
|
127
|
+
},
|
|
128
|
+
handleCardClick(itemData) {
|
|
129
|
+
this.$emit('grid-card-click', itemData);
|
|
130
|
+
},
|
|
131
|
+
},
|
|
102
132
|
};
|
|
103
133
|
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import ClubHeader from './ClubHeader.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Headers/ClubHeader',
|
|
5
|
+
component: ClubHeader
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => ({
|
|
9
|
+
components: { ClubHeader },
|
|
10
|
+
setup() {
|
|
11
|
+
return { args };
|
|
12
|
+
},
|
|
13
|
+
template: '<ClubHeader v-bind="args" />',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const Default = Template.bind({});
|
|
17
|
+
Default.args = {
|
|
18
|
+
searchQuery: '',
|
|
19
|
+
selectedDistance: 'Any Distance',
|
|
20
|
+
selectedWeapon: 'Longsword',
|
|
21
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-center justify-center space-x-4 bg-white py-6">
|
|
3
|
+
<!-- Search Bar -->
|
|
4
|
+
<div class="flex items-center pb-1.5 mr-10">
|
|
5
|
+
<BaseText class="mr-2" color="primary" size="xs md" tag="p" weight="bold">
|
|
6
|
+
Search:
|
|
7
|
+
</BaseText>
|
|
8
|
+
<InputField type="text" placeholder="By Name" color="secondary" v-model="searchQuery" class="px-2 py-1 focus:outline-none" />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Distance Dropdown -->
|
|
12
|
+
<div class="flex items-center mr-10">
|
|
13
|
+
<BaseText class="mr-2 pb-1.5" color="primary" size="xs md" tag="p" weight="bold">
|
|
14
|
+
Within:
|
|
15
|
+
</BaseText>
|
|
16
|
+
<Dropdown :items="distances" :defaultSelectedItem="selectedDistance" @distance-select="selectDistance" />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<!-- Weapon Dropdown -->
|
|
20
|
+
<div class="flex items-center">
|
|
21
|
+
<BaseText class="mr-2 pb-1.5" color="primary" size="xs md" tag="p" weight="bold">
|
|
22
|
+
By Weapon:
|
|
23
|
+
</BaseText>
|
|
24
|
+
<Dropdown :items="weapons" :defaultSelectedItem="selectedWeapon" @weapon-select="selectWeapon" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
31
|
+
import Dropdown from '../../../Molecules/DropDowns/BasicDropDown.vue';
|
|
32
|
+
import InputField from "../../../Atoms/InputField/InputField.vue";
|
|
33
|
+
export default {
|
|
34
|
+
name: 'ClubHeader',
|
|
35
|
+
components: {
|
|
36
|
+
InputField,
|
|
37
|
+
BaseText,
|
|
38
|
+
Dropdown
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
searchQuery: '',
|
|
43
|
+
distances: ['Any Distance', '25 miles', '50 miles', '75 miles', '100 miles'],
|
|
44
|
+
selectedDistance: 'Any Distance',
|
|
45
|
+
weapons: ['Longsword', 'Saber', 'Rapier', 'Smallsword'],
|
|
46
|
+
selectedWeapon: 'Longsword'
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
selectDistance(distance) {
|
|
51
|
+
this.selectedDistance = distance;
|
|
52
|
+
},
|
|
53
|
+
selectWeapon(weapon) {
|
|
54
|
+
this.selectedWeapon = weapon;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import LeaderboardHeader from './LeaderboardHeader.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Headers/LeaderboardHeader',
|
|
5
|
+
component: LeaderboardHeader,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
components: { LeaderboardHeader },
|
|
10
|
+
setup() {
|
|
11
|
+
return { args };
|
|
12
|
+
},
|
|
13
|
+
template: `
|
|
14
|
+
<LeaderboardHeader
|
|
15
|
+
v-bind="args"
|
|
16
|
+
@weapon-selected="onWeaponSelected"
|
|
17
|
+
/>
|
|
18
|
+
`,
|
|
19
|
+
methods: {
|
|
20
|
+
onWeaponSelected(weapon) {
|
|
21
|
+
alert(`Weapon selected: ${weapon}`);
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const Default = Template.bind({});
|
|
27
|
+
Default.args = {
|
|
28
|
+
weapons: ['Longsword', 'Rapier', 'Saber', 'Sword & Buckler', 'Dagger'], // Sample weapons list
|
|
29
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="w-full bg-white py-4 flex justify-center h-24">
|
|
3
|
+
<section class="container flex justify-between items-center w-full md:w-3/4 overflow-x-auto md:overflow-x-visible">
|
|
4
|
+
<nav class="flex space-x-4 w-full justify-start md:justify-around whitespace-nowrap mx-4 md:mx-0">
|
|
5
|
+
<div v-for="weapon in weapons" :key="weapon" @click="onWeaponClick(weapon)" class="cursor-pointer">
|
|
6
|
+
<BaseText
|
|
7
|
+
color="primary"
|
|
8
|
+
size="md"
|
|
9
|
+
tag="p"
|
|
10
|
+
weight="normal"
|
|
11
|
+
@click="onWeaponClick(weapon)"
|
|
12
|
+
class="cursor-pointer border-b-2 pb-1 duration-300 ease-in-out px-4 md:p-0"
|
|
13
|
+
:class="{
|
|
14
|
+
'border-accent': selectedWeapon === weapon,
|
|
15
|
+
'hover:border-accent': selectedWeapon !== weapon,
|
|
16
|
+
'border-transparent px-4 md:p-0': selectedWeapon !== weapon
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
19
|
+
{{ weapon }}
|
|
20
|
+
</BaseText>
|
|
21
|
+
</div>
|
|
22
|
+
</nav>
|
|
23
|
+
|
|
24
|
+
</section>
|
|
25
|
+
</header>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import logo from '../../../../assets/images/m2.png';
|
|
30
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
31
|
+
import BaseButton from '../../../Atoms/BaseButton/BaseButton.vue';
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'LeaderboardHeader',
|
|
35
|
+
components: {
|
|
36
|
+
BaseText,
|
|
37
|
+
BaseButton,
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
weapons: {
|
|
41
|
+
type: Array,
|
|
42
|
+
required: true,
|
|
43
|
+
default: () => ['Longsword', 'Rapier', 'Saber'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
logo: logo,
|
|
49
|
+
selectedWeapon: 'Longsword',
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
onWeaponClick(weapon) {
|
|
54
|
+
this.selectedWeapon = weapon;
|
|
55
|
+
this.$emit('weapon-selected', weapon);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|