@dcrackel/meyersquaredui 1.0.81 → 1.0.82

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/style.css CHANGED
@@ -1 +1 @@
1
- .border-gradient-rounded-1{border:1px solid transparent;background:linear-gradient(to right,#000,#000),linear-gradient(to right,#ff7a00,#a3412a);background-clip:padding-box,border-box;background-origin:padding-box,border-box;transition:background-size .5s ease-in-out,color .5s ease-in-out}.border-gradient-rounded-1:hover{background:linear-gradient(to right,#ff7a00,#ffa238);color:#fff}.border-gradient-rounded-2{border:1px solid transparent;background:linear-gradient(to right,#000,#000),linear-gradient(to right,#009dff,#25e07c);background-clip:padding-box,border-box;background-origin:padding-box,border-box}.border-gradient-rounded-2:hover{background:linear-gradient(to right,#009dff,#25e07c);color:#fff}section[data-v-bae6ab08]{max-width:150px}
1
+ .border-gradient-rounded-1{border:1px solid transparent;background:linear-gradient(to right,#000,#000),linear-gradient(to right,#ff7a00,#a3412a);background-clip:padding-box,border-box;background-origin:padding-box,border-box;transition:background-size .5s ease-in-out,color .5s ease-in-out}.border-gradient-rounded-1:hover{background:linear-gradient(to right,#ff7a00,#ffa238);color:#fff}.border-gradient-rounded-2{border:1px solid transparent;background:linear-gradient(to right,#000,#000),linear-gradient(to right,#009dff,#25e07c);background-clip:padding-box,border-box;background-origin:padding-box,border-box}.border-gradient-rounded-2:hover{background:linear-gradient(to right,#009dff,#25e07c);color:#fff}@keyframes slideDown-eb116240{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideUp-eb116240{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.animate-slideDown[data-v-eb116240]{animation:slideDown-eb116240 .5s ease forwards}.animate-slideUp[data-v-eb116240]{animation:slideUp-eb116240 .5s ease forwards}section[data-v-bae6ab08]{max-width:150px}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/meyersquaredui",
3
3
  "private": false,
4
- "version": "1.0.81",
4
+ "version": "1.0.82",
5
5
  "type": "module",
6
6
  "main": "dist/meyersquaredui.cjs.js",
7
7
  "module": "dist/meyersquaredui.esm.js",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "dev": "vite",
20
- "build": "npm version patch && vite build",
20
+ "build": "npm version patch && vite build && build:tailwind",
21
21
  "publish:package": "npm publish",
22
22
  "preview": "vite preview",
23
23
  "build-storybook": "npm run build:tailwind && storybook build",
@@ -104,7 +104,7 @@ export default {
104
104
  primary: 'bg-primary hover:bg-accent text-secondary hover:text-secondary',
105
105
  secondary: 'bg-secondary hover:bg-primary text-primary hover:text-secondary',
106
106
  accent: 'bg-accent hover:bg-accent hover:text-secondary',
107
- white: 'bg-white hover:bg-primary text-primary hover:text-secondary',
107
+ white: 'bg-white hover:bg-accent text-primary hover:text-secondary',
108
108
  };
109
109
  return colorMap[this.backgroundColor] || 'bg-primary';
110
110
  },
@@ -9,7 +9,7 @@
9
9
  <!-- Ratings -->
10
10
  <div class="flex flex-col md:flex-row justify-center md:justify-around -mt-2 border-b border-borderGray z-10 pb-2 mb-2">
11
11
  <div class="flex items-center justify-center">
12
- <BaseText tag="p" size="xs md:sm" weight="semibold" class="primary mr-1 block z-50">M2: </BaseText>
12
+ <BaseText tag="p" size="xs md:sm" weight="semibold" class="primary mr-1 block">M2: </BaseText>
13
13
  <BaseText tag="p" size="sm md:md" weight="bold" class="text-accent">{{ m2Rating }}</BaseText>
14
14
  </div>
15
15
  </div>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <nav
3
- v-show="showNav"
4
- class="fixed top-0 left-0 w-full bg-white shadow-md transition-opacity duration-1000 z-50"
5
- :class="{ 'opacity-0': !showNav, 'opacity-100': showNav }"
3
+ v-show="navVisible"
4
+ class="fixed top-0 left-0 w-full bg-white shadow-md z-50"
5
+ :class="[showNav ? 'animate-slideDown' : 'animate-slideUp']"
6
6
  >
7
7
  <div class="max-w-7xl mx-auto px-4 py-2">
8
8
  <section class="w-full hidden md:flex">
@@ -19,7 +19,7 @@
19
19
  <BaseText color="primary" size="sm" tag="p" weight="normal" class="border-b-2 border-white hover:border-accent pb-2 duration-300 ease-in-out" @click="handlePageChange('ClubList')">Clubs</BaseText>
20
20
  <BaseText color="primary" size="sm" tag="p" weight="normal" class="border-b-2 border-white hover:border-accent pb-2 duration-300 ease-in-out" @click="handlePageChange('Leaderboard')">Leaderboard</BaseText>
21
21
  <BaseText color="primary" size="sm" tag="p" weight="normal" class="border-b-2 border-white hover:border-accent pb-2 duration-300 ease-in-out" @click="handlePageChange('ContactUs')">Contact</BaseText>
22
- <BaseText color="primary" size="sm" tag="p" weight="normal" class="border-b-2 border-white hover:border-accent pb-2 duration-300 ease-in-out" @click="handlePageChange('ContactUs')">Login</BaseText>
22
+ <BaseText color="primary" size="sm" tag="p" weight="normal" class="border-b-2 border-white hover:border-accent pb-2 duration-300 ease-in-out" @click="handlePageChange('Login')">Login</BaseText>
23
23
  </nav>
24
24
  </section>
25
25
  </section>
@@ -41,14 +41,15 @@ export default {
41
41
  props: {
42
42
  buffer: {
43
43
  type: Number,
44
- default: 0,
44
+ default: 100,
45
45
  },
46
46
  },
47
47
  data() {
48
48
  return {
49
49
  logo: logo,
50
- showNav: false,
51
- heroHeight: 0,
50
+ showNav: false, // This controls the animation class
51
+ navVisible: false, // This controls v-show and visibility
52
+ heroHeight: 650,
52
53
  };
53
54
  },
54
55
  mounted() {
@@ -61,8 +62,58 @@ export default {
61
62
  methods: {
62
63
  handleScroll() {
63
64
  const scrollPos = window.scrollY;
64
- this.showNav = scrollPos > (this.heroHeight + this.buffer);
65
+
66
+ // If the scroll position is beyond the hero, show the navbar
67
+ if (scrollPos > (this.heroHeight + this.buffer)) {
68
+ if (!this.navVisible) {
69
+ this.navVisible = true; // Immediately make the navbar visible
70
+ this.showNav = true; // Start the slide-down animation
71
+ }
72
+ } else {
73
+ if (this.navVisible) {
74
+ this.showNav = false; // Start the slide-up animation
75
+
76
+ // Delay hiding the navbar until the animation completes (adjust delay to match animation duration)
77
+ setTimeout(() => {
78
+ this.navVisible = false;
79
+ }, 500); // Duration of the slide-up animation (0.5s)
80
+ }
81
+ }
82
+ },
83
+ handlePageChange(page) {
84
+ this.$emit('changePage', page);
85
+ },
86
+ onSearch(searchQuery) {
87
+ this.$emit('search', searchQuery);
65
88
  },
66
89
  },
67
90
  };
68
91
  </script>
92
+
93
+ <style scoped>
94
+ @keyframes slideDown {
95
+ 0% {
96
+ transform: translateY(-100%);
97
+ }
98
+ 100% {
99
+ transform: translateY(0);
100
+ }
101
+ }
102
+
103
+ @keyframes slideUp {
104
+ 0% {
105
+ transform: translateY(0);
106
+ }
107
+ 100% {
108
+ transform: translateY(-100%);
109
+ }
110
+ }
111
+
112
+ .animate-slideDown {
113
+ animation: slideDown 0.5s ease forwards;
114
+ }
115
+
116
+ .animate-slideUp {
117
+ animation: slideUp 0.5s ease forwards;
118
+ }
119
+ </style>
@@ -2,7 +2,7 @@
2
2
  <div class="m-0 w-full bg-secondary">
3
3
  <PageHeader @changePage="changePage"/>
4
4
  <HeroBanner :title="title" :buttonLabel="buttonLabel" :description="description" :imageSrc="imageSrc"/>
5
- <ScrollNav buffer=100 />
5
+ <ScrollNav :buffer="1000" />
6
6
  <GridLayout
7
7
  :cardComponent="TournamentCard"
8
8
  :items="limitedTournaments"