@dcrackel/meyersquaredui 1.0.38 → 1.0.40

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.
@@ -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,6 +10,7 @@
10
10
  :key="index"
11
11
  :data="item"
12
12
  :index="index"
13
+ :isLoading="isLoading"
13
14
  />
14
15
  </div>
15
16
  </section>
@@ -19,7 +20,7 @@
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() {
@@ -1,10 +1,10 @@
1
- import TestLayoutPage from './TestPage.vue';
1
+ import HomePage from './HomePage.vue';
2
2
  import mockTournaments from "../../../mocks/getTournamentsMock.js";
3
3
  import mockTopFencers from "../../../mocks/getTopFencers.js";
4
4
  import mockArticles from "../../../mocks/getArticles.js";
5
5
  export default {
6
6
  title: 'Templates/TestLayoutPage',
7
- component: TestLayoutPage,
7
+ component: HomePage,
8
8
  argTypes: {
9
9
  'button-click': { action: 'button-click' },
10
10
  title: { control: 'text', description: 'Title for the HeroBanner' },
@@ -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
  />
@@ -48,7 +51,7 @@ import DoubleButtonBanner from "../../Organisms/SectionBanners/DoubleButtonBanne
48
51
  import Footer from "../../Organisms/Footer/Footer.vue";
49
52
 
50
53
  export default {
51
- name: 'TestLayoutPage',
54
+ name: 'HomePage',
52
55
  components: {
53
56
  Footer,
54
57
  DoubleButtonBanner,
@@ -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() {