@dcrackel/meyersquaredui 1.0.101 → 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
|
@@ -7,16 +7,21 @@
|
|
|
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 }}
|
|
@@ -84,8 +89,6 @@ export default {
|
|
|
84
89
|
hoveredPhase: null, // Variable to store which phase is hovered over
|
|
85
90
|
};
|
|
86
91
|
},
|
|
87
|
-
computed: {
|
|
88
|
-
},
|
|
89
92
|
methods: {
|
|
90
93
|
isPhaseActive(index) {
|
|
91
94
|
return this.isEventComplete || index <= this.currentPhase;
|
|
@@ -97,8 +100,10 @@ export default {
|
|
|
97
100
|
this.hoveredPhase = null;
|
|
98
101
|
},
|
|
99
102
|
handlePhaseClick(index) {
|
|
100
|
-
// Emit the clicked phase to the parent
|
|
101
|
-
|
|
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
|
+
}
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
};
|