@dcrackel/meyersquaredui 1.0.39 → 1.0.41

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.
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div class="md:w-full mb-8 animate-pulse">
3
+ <!-- Desktop Version Skeleton -->
4
+ <section class="hidden md:block">
5
+ <div class="w-full h-52 bg-gray-300 mb-2 rounded-md"></div>
6
+ <div class="w-3/4 h-6 bg-gray-300 mb-1 rounded"></div>
7
+ <div class="w-2/3 h-4 bg-gray-300 mb-2 rounded"></div>
8
+ <div class="flex items-center mb-1">
9
+ <div class="w-6 h-6 bg-gray-300 rounded-full mr-3"></div>
10
+ <div class="w-2/3 h-4 bg-gray-300 rounded"></div>
11
+ </div>
12
+ <div class="flex items-center">
13
+ <div class="w-6 h-6 bg-gray-300 rounded-full mr-3"></div>
14
+ <div class="w-2/3 h-4 bg-gray-300 rounded"></div>
15
+ </div>
16
+ </section>
17
+
18
+ <!-- Mobile Version Skeleton -->
19
+ <section class="md:hidden flex-col items-start gap-2 border-b border-borderGray">
20
+ <div class="flex flex-row">
21
+ <div class="w-28 h-16 bg-gray-300 rounded-md"></div>
22
+ <div class="flex flex-col h-16 justify-center pl-2">
23
+ <div class="w-3/4 h-6 bg-gray-300 rounded mb-1"></div>
24
+ <div class="w-1/2 h-4 bg-gray-300 rounded"></div>
25
+ </div>
26
+ </div>
27
+ <div class="flex justify-between pt-4 pb-2">
28
+ <div class="flex justify-start w-5/12">
29
+ <div class="w-2 h-2 bg-gray-300 rounded-full mr-1"></div>
30
+ <div class="w-2/3 h-4 bg-gray-300 rounded"></div>
31
+ </div>
32
+ <div class="flex justify-start mb-1 w-7/12">
33
+ <div class="w-2 h-2 bg-gray-300 rounded-full mr-1"></div>
34
+ <div class="w-2/3 h-4 bg-gray-300 rounded"></div>
35
+ </div>
36
+ </div>
37
+ </section>
38
+ </div>
39
+ </template>
40
+
41
+ <script>
42
+ export default {
43
+ name: 'TournamentCardSkeleton',
44
+ };
45
+ </script>
@@ -1,5 +1,5 @@
1
1
  import TournamentCard from './TournamentCard.vue';
2
-
2
+ import mockTournaments from "../../../../mocks/getTournamentsMock.js";
3
3
  export default {
4
4
  title: 'Organisms/Cards/TournamentCard',
5
5
  component: TournamentCard,
@@ -15,10 +15,12 @@ const Template = (args) => ({
15
15
 
16
16
  export const Default = Template.bind({});
17
17
  Default.args = {
18
- image: 'https://assets.simpleviewinc.com/simpleview/image/upload/c_fill,f_avif,h_800,q_65,w_1920/v1/clients/wausauwi/download_5__d27db8e0-a64a-4db5-8126-17033dab6712.jpg',
19
- title: 'National Fencing Tournament',
20
- location: 'New York City, NY',
21
- startDate: 'Jan 1, 2024',
22
- endDate: 'Jan 3, 2024',
23
- numberOfFencers: 120,
18
+ data: mockTournaments[0],
19
+ isLoading: false
20
+ };
21
+
22
+ export const Loading = Template.bind({});
23
+ Loading.args = {
24
+ data: mockTournaments[0],
25
+ isLoading: true
24
26
  };
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div class="md:w-full mb-8">
2
+ <div v-if="isLoading" class="max-w-80 md:w-full mb-8">
3
+ <TournamentCardSkeleton />
4
+ </div>
5
+ <div v-if="!isLoading" class="max-w-80 md:w-full mb-8">
3
6
  <!-- Desktop Version -->
4
7
  <section class="hidden md:block">
5
8
  <img
@@ -57,10 +60,12 @@
57
60
  <script>
58
61
  import BaseText from "../../../Atoms/BaseText/BaseText.vue";
59
62
  import Icon from "../../../Atoms/Icon/Icon.vue";
63
+ import TournamentCardSkeleton from "../Skeletons/TournamentCardSkeleton.vue";
60
64
 
61
65
  export default {
62
66
  name: 'TournamentCard',
63
67
  components: {
68
+ TournamentCardSkeleton,
64
69
  BaseText,
65
70
  Icon
66
71
  },
@@ -68,6 +73,10 @@ export default {
68
73
  data: {
69
74
  type: Object,
70
75
  required: true,
76
+ },
77
+ isLoading: {
78
+ type: Boolean,
79
+ default: false,
71
80
  }
72
81
  },
73
82
  data() {
@@ -75,13 +84,10 @@ export default {
75
84
  isImageError: false
76
85
  };
77
86
  },
78
- mounted() {
79
- console.log(this.data);
80
- },
81
87
  computed: {
82
88
  image() {
83
- return !this.isImageError && this.data.Images && this.data.Images.length > 0
84
- ? this.data.Images[0].URL
89
+ return !this.isImageError && this.data.ImagesURLs && this.data.ImagesURLs.length > 0
90
+ ? this.data.ImagesURLs
85
91
  : 'https://via.placeholder.com/300x200';
86
92
  },
87
93
  fallbackStyle() {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <section class="flex flex-col bg-primary">
2
+ <section class="hidden md:flex flex-col bg-primary">
3
3
  <div class="h-20"></div>
4
4
 
5
5
  <section class="w-full hidden md:flex">
@@ -65,13 +65,50 @@
65
65
  </div>
66
66
  </div>
67
67
  </div>
68
-
69
68
  </section>
70
69
 
71
70
  <div class="h-32 border border-t mt-10 pb-10 border-lineGrey flex flex-col justify-center items-center">
72
71
  <BaseText color="secondary" size="sm" tag="p" weight="normal" class="text-center pt-4">© Copyright Meyer Squared 2024. All rights reserved.</BaseText>
73
72
  </div>
74
73
  </section>
74
+ <!-- mobile footer -->
75
+ <section class="flex flex-col items-center bg-primary pb-10">
76
+ <div class="h-8"></div>
77
+ <div class="w-full flex flex-col items-center">
78
+ <div class="w-full max-w-xs flex justify-between items-center">
79
+ <!-- Logo Container -->
80
+ <div class="flex justify-center w-1/2">
81
+ <img :src="logo" alt="Logo" class="w-[94px] h-[74px]" />
82
+ </div>
83
+ <!-- Links Container -->
84
+ <div class="flex flex-col w-1/2">
85
+ <BaseText color="secondary" size="md" tag="p" weight="normal" class="mb-2">Tournaments</BaseText>
86
+ <BaseText color="secondary" size="sm" tag="p" weight="normal" class="mb-2">Upcoming</BaseText>
87
+ <BaseText color="secondary" size="sm" tag="p" weight="normal" class="mb-2">Past</BaseText>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="w-full flex flex-col items-center ">
93
+ <!-- Subscribe Section -->
94
+ <div class="w-full max-w-xs flex flex-col items-center pt-8">
95
+ <BaseText color="secondary" size="md" tag="p" weight="thin" class="pb-4 w-full">Subscribe for Updates</BaseText>
96
+ <InputField placeholder="Email" type="email" class="w-full" />
97
+ </div>
98
+
99
+ <!-- Follow Us Section -->
100
+ <div class="w-full max-w-xs flex flex-col items-center pt-8">
101
+ <BaseText color="secondary" size="md" tag="p" weight="thin" class="pb-2">Follow Us</BaseText>
102
+ <div class="flex justify-center">
103
+ <Icon type="fa-brands" icon="fa-facebook" color="secondary" size="lg" class="mr-4" />
104
+ <Icon type="fa-brands" icon="fa-discord" color="secondary" size="lg" class="mr-4" />
105
+ <Icon type="fa-brands" icon="fa-instagram" color="secondary" size="lg" class="mr-4" />
106
+ <Icon type="fa-brands" icon="fa-youtube" color="secondary" size="lg" class="mr-4" />
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </section>
111
+
75
112
  </template>
76
113
 
77
114
  <script>
@@ -1,6 +1,10 @@
1
1
  import GridLayout from './GridLayout.vue';
2
2
  import TournamentCard from '../../Organisms/Cards/TournamentCard/TournamentCard.vue';
3
3
  import FencerCard from '../../Organisms/Cards/FencerCard/FencerCard.vue';
4
+ import ArticleCard from '../../Organisms/Cards/ArticleCard/ArticleCard.vue';
5
+ import mockTournaments from "../../../mocks/getTournamentsMock.js";
6
+ import mockTopFencers from "../../../mocks/getTopFencers.js";
7
+ import mockArticles from "../../../mocks/getArticles.js";
4
8
 
5
9
  export default {
6
10
  title: 'Organisms/Grids/GridLayout',
@@ -11,103 +15,6 @@ export default {
11
15
  },
12
16
  };
13
17
 
14
- // Mock Data for Tournaments
15
- const mockTournaments = [
16
- {
17
- image: 'https://meyersquared.com/images/Club1.jpg',
18
- title: 'Catnip Cutlass',
19
- location: 'Held at: Catnasioum Complex',
20
- numberOfFencers: 120,
21
- startDate: 'Jan 1, 2024',
22
- endDate: 'Jan 3, 2024',
23
- },
24
- {
25
- image: 'https://meyersquared.com/images/Club2.jpg',
26
- title: 'Regional Qualifiers',
27
- location: 'Los Angeles, CA',
28
- numberOfFencers: 80,
29
- startDate: 'Feb 10, 2024',
30
- endDate: 'Feb 12, 2024',
31
- },
32
- {
33
- image: 'https://meyersquared.com/images/Club9.png',
34
- title: 'Open Tournament',
35
- location: 'Chicago, IL',
36
- numberOfFencers: 150,
37
- startDate: 'Mar 5, 2024',
38
- endDate: 'Mar 7, 2024',
39
- },
40
- {
41
- image: 'https://meyersquared.com/images/Club4.jpg',
42
- title: 'Fencing Championship',
43
- location: 'Miami, FL',
44
- numberOfFencers: 200,
45
- startDate: 'Apr 15, 2024',
46
- endDate: 'Apr 18, 2024',
47
- },
48
- {
49
- image: 'https://meyersquared.com/images/Club8.png',
50
- title: 'State Finals',
51
- location: 'Houston, TX',
52
- numberOfFencers: 95,
53
- startDate: 'May 1, 2024',
54
- endDate: 'May 3, 2024',
55
- },
56
- {
57
- image: 'https://meyersquared.com/images/Club7.png',
58
- title: 'International Cup',
59
- location: 'San Francisco, CA',
60
- numberOfFencers: 250,
61
- startDate: 'Jun 20, 2024',
62
- endDate: 'Jun 22, 2024',
63
- },
64
- ];
65
-
66
- // Mock Data for Fencers
67
- const mockFencers = [
68
- {
69
- portrait: 'https://via.placeholder.com/150',
70
- displayName: 'John Doe',
71
- clubName: 'Awesome Fencing Club',
72
- m2Rating: 1250,
73
- hrRating: 1100,
74
- },
75
- {
76
- portrait: 'https://via.placeholder.com/150',
77
- displayName: 'Jane Smith',
78
- clubName: 'Elite Fencing Academy',
79
- m2Rating: 1350,
80
- hrRating: 1200,
81
- },
82
- {
83
- portrait: 'https://via.placeholder.com/150',
84
- displayName: 'Sam Johnson',
85
- clubName: 'Fencing United',
86
- m2Rating: 1150,
87
- hrRating: 1050,
88
- },
89
- {
90
- portrait: 'https://via.placeholder.com/150',
91
- displayName: 'Alice Brown',
92
- clubName: 'Warriors of Steel',
93
- m2Rating: 1300,
94
- hrRating: 1180,
95
- },
96
- {
97
- portrait: 'https://via.placeholder.com/150',
98
- displayName: 'Bob Davis',
99
- clubName: 'Iron Swordsmen',
100
- m2Rating: 1100,
101
- hrRating: 980,
102
- },
103
- {
104
- portrait: 'https://via.placeholder.com/150',
105
- displayName: 'Emily Wilson',
106
- clubName: 'Dragon Blades',
107
- m2Rating: 1400,
108
- hrRating: 1250,
109
- },
110
- ];
111
18
 
112
19
  // Template for Tournament Grid
113
20
  const Template = (args) => ({
@@ -144,5 +51,34 @@ FencerGrid.args = {
144
51
  moreButtonLabel: 'See All Fencers',
145
52
  maxColumns: 5,
146
53
  cardComponent: FencerCard,
147
- items: mockFencers,
54
+ items: mockTopFencers,
55
+ };
56
+
57
+ export const FencerGridLoading = FencerTemplate.bind({});
58
+ FencerGridLoading.args = {
59
+ title: 'Fencers',
60
+ moreButtonLabel: 'See All Fencers',
61
+ maxColumns: 5,
62
+ cardComponent: FencerCard,
63
+ items: mockTopFencers,
64
+ isLoading: true
65
+ };
66
+
67
+ export const ArticleGrid = FencerTemplate.bind({});
68
+ ArticleGrid.args = {
69
+ title: 'Interesting Articles',
70
+ moreButtonLabel: 'See More',
71
+ maxColumns: 3,
72
+ cardComponent: ArticleCard,
73
+ items: mockArticles,
148
74
  };
75
+
76
+ export const ArticleGridLoading = FencerTemplate.bind({});
77
+ ArticleGridLoading.args = {
78
+ title: 'Interesting Articles',
79
+ moreButtonLabel: 'See More',
80
+ maxColumns: 3,
81
+ cardComponent: ArticleCard,
82
+ items: mockArticles,
83
+ isLoading: true
84
+ };
@@ -10,16 +10,17 @@
10
10
  :key="index"
11
11
  :data="item"
12
12
  :index="index"
13
+ :isLoading="isLoading"
13
14
  />
14
15
  </div>
15
16
  </section>
16
- <div class="w-full flex justify-center pb-10 pt-10 md:pt-14">
17
+ <div class="w-full flex justify-center pb-28 pt-10 md:pt-14">
17
18
  <BaseButton
18
19
  backgroundColor="secondary"
19
20
  border="primary"
20
21
  size="xs"
21
22
  color="primary"
22
- hoverColor="accent"
23
+ hoverColor="secondary"
23
24
  :label="moreButtonLabel"
24
25
  />
25
26
  </div>
@@ -61,6 +62,10 @@ export default {
61
62
  type: Boolean,
62
63
  default: false,
63
64
  },
65
+ isLoading: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
64
69
  },
65
70
  computed: {
66
71
  gridClasses() {
@@ -7,7 +7,6 @@
7
7
  </section>
8
8
 
9
9
  <section class="relative w-full h-3/4 flex justify-center bg-primary m-0">
10
- <!-- Spacer -->
11
10
  <div class="w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
12
11
 
13
12
  <!-- Image -->
@@ -62,16 +61,36 @@
62
61
 
63
62
  <!-- Mobile Overlay -->
64
63
  <section class="flex justify-center md:hidden text-left bg-primary w-full">
65
- <div class="w-full px-6 py-8 text-center">
64
+ <div class="w-full px-6 py-8 text-center flex flex-col justify-center items-center">
66
65
  <BaseText color="secondary" tag="h1" size="2xl" weight="bold" class="mb-2">{{ title }}</BaseText>
67
66
  <BaseText color="secondary" tag="p" size="sm" weight="normal" class="mb-6">{{ description }}</BaseText>
68
67
  <BaseButton
69
- :label="buttonLabel"
68
+ :label="buttonLabelOne"
70
69
  size="xs"
71
70
  color="secondary"
72
71
  border="gradient1"
73
- class="w-1/2 m-auto"
74
- @click="onClick"
72
+ weight="normal"
73
+ align="between"
74
+ class="mb-4 w-full h-16 pl-8"
75
+ iconName="fa-arrow-right-long"
76
+ iconColor="secondary"
77
+ iconSize="lg"
78
+ iconType="fa-thin"
79
+ @click="onClickOne"
80
+ />
81
+ <BaseButton
82
+ :label="buttonLabelTwo"
83
+ size="xs"
84
+ color="secondary"
85
+ border="gradient2"
86
+ weight="normal"
87
+ class="w-full h-16 pl-8"
88
+ iconName="fa-arrow-right-long"
89
+ iconColor="secondary"
90
+ iconSize="lg"
91
+ iconType="fa-thin"
92
+ align="between"
93
+ @click="onClickOne"
75
94
  />
76
95
  </div>
77
96
  </section>
@@ -25,3 +25,18 @@ export const Default = {
25
25
  articles: mockArticles,
26
26
  },
27
27
  };
28
+
29
+ export const AllLoading = {
30
+ args: {
31
+ title: 'Discover, Compete, Connect',
32
+ description: 'Find tournaments, explore clubs, and track your progress.',
33
+ buttonLabel: 'Find Out More',
34
+ imageSrc: 'https://meyersquared.com/images/Banner2.png',
35
+ tournaments: mockTournaments,
36
+ topFencers: mockTopFencers,
37
+ articles: mockArticles,
38
+ tournamentsIsLoading: true,
39
+ topFencersIsLoading: true,
40
+ articlesIsLoading: true,
41
+ },
42
+ };
@@ -6,6 +6,7 @@
6
6
  :cardComponent="TournamentCard"
7
7
  :items="limitedTournaments"
8
8
  :maxColumns="3"
9
+ :isLoading="articlesIsLoading"
9
10
  moreButtonLabel="See All Tournaments"
10
11
  title="Upcoming"
11
12
  />
@@ -19,6 +20,7 @@
19
20
  :items="topFencers"
20
21
  :maxColumns="5"
21
22
  :mobileHorizontal="true"
23
+ :isLoading="topFencersIsLoading"
22
24
  moreButtonLabel="Leaderboards"
23
25
  title="Top Fencers"
24
26
  />
@@ -28,6 +30,7 @@
28
30
  :items="articles"
29
31
  :maxColumns="3"
30
32
  :mobileHorizontal="true"
33
+ :isLoading="articlesIsLoading"
31
34
  moreButtonLabel="See More"
32
35
  title="Interesting Articles"
33
36
  />
@@ -81,14 +84,26 @@ export default {
81
84
  type: Array,
82
85
  default: () => []
83
86
  },
87
+ tournamentsIsLoading: {
88
+ type: Boolean,
89
+ default: false
90
+ },
84
91
  articles: {
85
92
  type: Array,
86
93
  default: () => []
87
94
  },
95
+ articlesIsLoading: {
96
+ type: Boolean,
97
+ default: false
98
+ },
88
99
  topFencers: {
89
100
  type: Array,
90
101
  default: () => []
91
- }
102
+ },
103
+ topFencersIsLoading: {
104
+ type: Boolean,
105
+ default: false
106
+ },
92
107
  },
93
108
  computed: {
94
109
  ArticleCard() {