@dcrackel/meyersquaredui 1.0.100 → 1.0.102
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/package.json
CHANGED
|
@@ -21,6 +21,13 @@ ActiveEvent.args = {
|
|
|
21
21
|
|
|
22
22
|
export const CompletedEvent = Template.bind({});
|
|
23
23
|
CompletedEvent.args = {
|
|
24
|
-
currentPhase: 3,
|
|
24
|
+
currentPhase: 3,
|
|
25
|
+
phases: [
|
|
26
|
+
{ label: 'Registration', icon: 'fa-solid fa-file-alt' },
|
|
27
|
+
{ label: 'Demo Pools', icon: 'fa-kit fa-longsword' },
|
|
28
|
+
{ label: 'Pool Results', icon: 'fa-solid fa-clipboard-check' },
|
|
29
|
+
{ label: 'Bracket', icon: 'fa-solid fa-sitemap' },
|
|
30
|
+
{ label: 'Final Result', icon: 'fa-solid fa-trophy' },
|
|
31
|
+
],
|
|
25
32
|
isEventComplete: true,
|
|
26
33
|
};
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex items-center justify-between">
|
|
2
|
+
<div class="flex items-center justify-between w-full">
|
|
3
3
|
<div
|
|
4
4
|
v-for="(phase, index) in phases"
|
|
5
5
|
:key="index"
|
|
6
|
-
class="flex items-center flex-grow"
|
|
6
|
+
class="flex w-full items-center flex-grow"
|
|
7
7
|
@mouseover="handleMouseOver(index)"
|
|
8
8
|
@mouseout="handleMouseOut"
|
|
9
9
|
@click="handlePhaseClick(index)"
|
|
10
|
+
:class="{
|
|
11
|
+
'cursor-pointer': index <= currentPhase,
|
|
12
|
+
'cursor-not-allowed': index > currentPhase,
|
|
13
|
+
}"
|
|
10
14
|
>
|
|
11
15
|
<!-- Clickable Icon and Label -->
|
|
12
|
-
<div class="flex flex-col items-center
|
|
16
|
+
<div class="flex flex-col items-center"
|
|
17
|
+
:class="{'hover:cursor-pointer': index <= currentPhase, 'hover:cursor-default': index > currentPhase}">
|
|
13
18
|
<div
|
|
14
|
-
class="w-8 h-8 flex items-center justify-center rounded-full transition-all duration-300 border-2
|
|
19
|
+
class="w-8 h-8 flex items-center justify-center rounded-full transition-all duration-300 border-2"
|
|
15
20
|
:class="{
|
|
16
21
|
'border-accent': isPhaseActive(index),
|
|
17
22
|
'border-gray-300': !isPhaseActive(index),
|
|
18
|
-
'hover:bg-accent': hoveredPhase === index,
|
|
19
|
-
'hover:bg-gray-200': hoveredPhase === index && !isPhaseActive(index),
|
|
23
|
+
'hover:bg-accent': hoveredPhase === index && index <= currentPhase,
|
|
24
|
+
'hover:bg-gray-200': hoveredPhase === index && !isPhaseActive(index) && index <= currentPhase,
|
|
20
25
|
}"
|
|
21
26
|
>
|
|
22
27
|
<i :class="phase.icon"></i>
|
|
@@ -29,7 +34,7 @@
|
|
|
29
34
|
:class="{
|
|
30
35
|
'font-bold text-accent': isPhaseActive(index),
|
|
31
36
|
'text-gray-600': !isPhaseActive(index),
|
|
32
|
-
'hover:text-accent': hoveredPhase === index,
|
|
37
|
+
'hover:text-accent': hoveredPhase === index && index <= currentPhase,
|
|
33
38
|
}"
|
|
34
39
|
>
|
|
35
40
|
{{ phase.label }}
|
|
@@ -66,24 +71,24 @@ export default {
|
|
|
66
71
|
isEventComplete: {
|
|
67
72
|
type: Boolean,
|
|
68
73
|
default: false,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
computed: {
|
|
77
|
-
phases() {
|
|
78
|
-
return [
|
|
74
|
+
},
|
|
75
|
+
phases: {
|
|
76
|
+
type: Array,
|
|
77
|
+
required: true,
|
|
78
|
+
default: () => [
|
|
79
79
|
{ label: 'Registration', icon: 'fa-solid fa-file-alt' },
|
|
80
80
|
{ label: 'Pools', icon: 'fa-kit fa-longsword' },
|
|
81
81
|
{ label: 'Pool Results', icon: 'fa-solid fa-clipboard-check' },
|
|
82
82
|
{ label: 'Bracket', icon: 'fa-solid fa-sitemap' },
|
|
83
83
|
{ label: 'Final Result', icon: 'fa-solid fa-trophy' },
|
|
84
|
-
]
|
|
84
|
+
],
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
|
+
data() {
|
|
88
|
+
return {
|
|
89
|
+
hoveredPhase: null, // Variable to store which phase is hovered over
|
|
90
|
+
};
|
|
91
|
+
},
|
|
87
92
|
methods: {
|
|
88
93
|
isPhaseActive(index) {
|
|
89
94
|
return this.isEventComplete || index <= this.currentPhase;
|
|
@@ -95,8 +100,10 @@ export default {
|
|
|
95
100
|
this.hoveredPhase = null;
|
|
96
101
|
},
|
|
97
102
|
handlePhaseClick(index) {
|
|
98
|
-
// Emit the clicked phase to the parent
|
|
99
|
-
|
|
103
|
+
// Emit the clicked phase to the parent only if the phase is active or previous
|
|
104
|
+
if (index <= this.currentPhase) {
|
|
105
|
+
this.$emit('phase-clicked', index);
|
|
106
|
+
}
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
};
|