@dcrackel/meyersquaredui 1.0.111 → 1.0.113

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}@keyframes slideDown-07413d1f{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideUp-07413d1f{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.animate-slideDown[data-v-07413d1f]{animation:slideDown-07413d1f .5s ease forwards}.animate-slideUp[data-v-07413d1f]{animation:slideUp-07413d1f .5s ease forwards}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-07413d1f{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideUp-07413d1f{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.animate-slideDown[data-v-07413d1f]{animation:slideDown-07413d1f .5s ease forwards}.animate-slideUp[data-v-07413d1f]{animation:slideUp-07413d1f .5s ease forwards}.tooltip[data-v-22381b4e]{transition:opacity .3s ease-in-out,transform .3s ease-in-out}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.111",
4
+ "version": "1.0.113",
5
5
  "type": "module",
6
6
  "main": "dist/meyersquaredui.cjs.js",
7
7
  "module": "dist/meyersquaredui.esm.js",
@@ -1,6 +1,8 @@
1
1
  const getPoolsWithPeople =
2
2
  {
3
3
  "message": "Pools retrieved",
4
+ "tournamentId": 63,
5
+ "eventStatus": "planning",
4
6
  "pools": [
5
7
  {
6
8
  "PoolId": 180,
@@ -54,17 +56,17 @@ const getPoolsWithPeople =
54
56
  "DEPosition": null,
55
57
  "Status": "Absent",
56
58
  "Person": {
57
- "PersonId": 49,
58
- "DisplayName": "Jack Seyler",
59
- "ClubId": 43,
59
+ "PersonId": 37,
60
+ "DisplayName": "Brian Thiessen",
61
+ "ClubId": 38,
60
62
  "ShowData": true,
61
63
  "Images": [],
62
64
  "Club": {
63
- "Name": "Ars Gladii"
65
+ "Name": "Steelhead Western Martial Arts"
64
66
  },
65
67
  "HEMARatings": [
66
68
  {
67
- "Rating": 1282.1
69
+ "Rating": 1114.2
68
70
  }
69
71
  ],
70
72
  "M2Ratings": []
@@ -88,7 +90,9 @@ const getPoolsWithPeople =
88
90
  "M2Ratings": []
89
91
  }
90
92
  }
91
- ]
93
+ ],
94
+ "poolStrength": 0,
95
+ "poolStrengthInd": 0
92
96
  },
93
97
  {
94
98
  "PoolId": 181,
@@ -100,6 +104,28 @@ const getPoolsWithPeople =
100
104
  "Status": "planning",
101
105
  "Updated": "2024-10-16T13:38:51.000Z",
102
106
  "EventPersons": [
107
+ {
108
+ "EventId": 26,
109
+ "PoolPosition": 2,
110
+ "DEPosition": null,
111
+ "Status": "Absent",
112
+ "Person": {
113
+ "PersonId": 49,
114
+ "DisplayName": "Jack Seyler",
115
+ "ClubId": 43,
116
+ "ShowData": true,
117
+ "Images": [],
118
+ "Club": {
119
+ "Name": "Ars Gladii"
120
+ },
121
+ "HEMARatings": [
122
+ {
123
+ "Rating": 1282.1
124
+ }
125
+ ],
126
+ "M2Ratings": []
127
+ }
128
+ },
103
129
  {
104
130
  "EventId": 26,
105
131
  "PoolPosition": 6,
@@ -157,30 +183,10 @@ const getPoolsWithPeople =
157
183
  "HEMARatings": [],
158
184
  "M2Ratings": []
159
185
  }
160
- },
161
- {
162
- "EventId": 26,
163
- "PoolPosition": 2,
164
- "DEPosition": null,
165
- "Status": "Absent",
166
- "Person": {
167
- "PersonId": 37,
168
- "DisplayName": "Brian Thiessen",
169
- "ClubId": 38,
170
- "ShowData": true,
171
- "Images": [],
172
- "Club": {
173
- "Name": "Steelhead Western Martial Arts"
174
- },
175
- "HEMARatings": [
176
- {
177
- "Rating": 1114.2
178
- }
179
- ],
180
- "M2Ratings": []
181
- }
182
186
  }
183
- ]
187
+ ],
188
+ "poolStrength": 0,
189
+ "poolStrengthInd": 0
184
190
  }
185
191
  ],
186
192
  "eventRules": [
@@ -3,6 +3,11 @@ import ProgressTracker from './ProgressTracker.vue';
3
3
  export default {
4
4
  title: 'Molecules/ProgressTracker/ProgressTracker',
5
5
  component: ProgressTracker,
6
+ argTypes: {
7
+ currentPhase: { control: { type: 'number', min: 0, max: 4 } },
8
+ highlightPhase: { control: { type: 'number', min: 0, max: 4 } },
9
+ isEventComplete: { control: 'boolean' },
10
+ },
6
11
  };
7
12
 
8
13
  const Template = (args) => ({
@@ -13,21 +18,44 @@ const Template = (args) => ({
13
18
  template: '<ProgressTracker v-bind="args" />',
14
19
  });
15
20
 
16
- export const ActiveEvent = Template.bind({});
17
- ActiveEvent.args = {
18
- currentPhase: 2, // Example: "Bracket" phase
21
+ export const Default = Template.bind({});
22
+ Default.args = {
23
+ currentPhase: 2, // Example: Pool Results
24
+ highlightPhase: 1, // Example: Pools (User viewing Pools page)
19
25
  isEventComplete: false,
26
+ phases: [
27
+ { label: 'Registration', icon: 'fa-solid fa-file-alt' },
28
+ { label: 'Pools', icon: 'fa-kit fa-longsword' },
29
+ { label: 'Pool Results', icon: 'fa-solid fa-clipboard-check' },
30
+ { label: 'Bracket', icon: 'fa-solid fa-sitemap' },
31
+ { label: 'Final Result', icon: 'fa-solid fa-trophy' },
32
+ ],
20
33
  };
21
34
 
22
- export const CompletedEvent = Template.bind({});
23
- CompletedEvent.args = {
24
- currentPhase: 3,
35
+ export const EventComplete = Template.bind({});
36
+ EventComplete.args = {
37
+ currentPhase: 4, // Event is complete
38
+ highlightPhase: 4, // User is viewing the final results
39
+ isEventComplete: true,
25
40
  phases: [
26
41
  { label: 'Registration', icon: 'fa-solid fa-file-alt' },
27
- { label: 'Demo Pools', icon: 'fa-kit fa-longsword' },
42
+ { label: 'Pools', icon: 'fa-kit fa-longsword' },
43
+ { label: 'Pool Results', icon: 'fa-solid fa-clipboard-check' },
44
+ { label: 'Bracket', icon: 'fa-solid fa-sitemap' },
45
+ { label: 'Final Result', icon: 'fa-solid fa-trophy' },
46
+ ],
47
+ };
48
+
49
+ export const EarlyPhase = Template.bind({});
50
+ EarlyPhase.args = {
51
+ currentPhase: 0, // Event hasn't started yet
52
+ highlightPhase: 0, // Viewing registration page
53
+ isEventComplete: false,
54
+ phases: [
55
+ { label: 'Registration', icon: 'fa-solid fa-file-alt' },
56
+ { label: 'Pools', icon: 'fa-kit fa-longsword' },
28
57
  { label: 'Pool Results', icon: 'fa-solid fa-clipboard-check' },
29
58
  { label: 'Bracket', icon: 'fa-solid fa-sitemap' },
30
59
  { label: 'Final Result', icon: 'fa-solid fa-trophy' },
31
60
  ],
32
- isEventComplete: true,
33
61
  };
@@ -29,11 +29,11 @@
29
29
  <BaseText
30
30
  tag="p"
31
31
  size="sm"
32
- :weight="currentPhase === index ? 'bold' : 'normal'"
32
+ :weight="highlightPhase === index ? 'bold' : 'normal'"
33
33
  class="mt-2 transition-all duration-300"
34
34
  :class="{
35
- 'font-bold text-accent': isPhaseActive(index),
36
- 'text-gray-600': !isPhaseActive(index),
35
+ 'font-bold text-accent': isPhaseActive(index) || highlightPhase === index,
36
+ 'text-gray-600': !isPhaseActive(index) && highlightPhase !== index,
37
37
  'hover:text-accent': hoveredPhase === index && index <= currentPhase,
38
38
  }"
39
39
  >
@@ -68,6 +68,10 @@ export default {
68
68
  required: true,
69
69
  default: 0,
70
70
  },
71
+ highlightPhase: {
72
+ type: Number,
73
+ default: null,
74
+ },
71
75
  isEventComplete: {
72
76
  type: Boolean,
73
77
  default: false,
@@ -0,0 +1,55 @@
1
+ import Tooltip from './Tooltip.vue';
2
+
3
+
4
+ export default {
5
+ title: 'Molecules/Tooltip/Tooltip',
6
+ component: Tooltip,
7
+ argTypes: {
8
+ text: { control: 'text', description: 'The text shown inside the tooltip.' },
9
+ position: {
10
+ control: {
11
+ type: 'select',
12
+ options: ['top', 'bottom', 'left', 'right'],
13
+ },
14
+ description: 'Position of the tooltip relative to the element.',
15
+ },
16
+ },
17
+ };
18
+
19
+ const Template = (args) => ({
20
+ components: { Tooltip },
21
+ setup() {
22
+ return { args };
23
+ },
24
+ template: `
25
+ <div class="flex flex-col items-center space-y-8 p-8">
26
+ <Tooltip v-bind="args">
27
+ Hover over me!
28
+ </Tooltip>
29
+ </div>
30
+ `,
31
+ });
32
+
33
+ export const Default = Template.bind({});
34
+ Default.args = {
35
+ text: 'This is a tooltip!',
36
+ position: 'top',
37
+ };
38
+
39
+ export const BottomTooltip = Template.bind({});
40
+ BottomTooltip.args = {
41
+ text: 'Tooltip on the bottom!',
42
+ position: 'bottom',
43
+ };
44
+
45
+ export const LeftTooltip = Template.bind({});
46
+ LeftTooltip.args = {
47
+ text: 'Tooltip on the left!',
48
+ position: 'left',
49
+ };
50
+
51
+ export const RightTooltip = Template.bind({});
52
+ RightTooltip.args = {
53
+ text: 'Tooltip on the right!',
54
+ position: 'right',
55
+ };
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <div class="relative inline-block" @mouseover="showTooltip" @mouseleave="hideTooltip" @click="toggleTooltip" @touchstart="toggleTooltip">
3
+ <slot></slot>
4
+ <div
5
+ v-if="visible"
6
+ class="absolute bg-black text-white p-2 rounded-md text-xs z-50 transition-opacity duration-300 ease-in-out opacity-80"
7
+ :class="[positionClass, width]"
8
+ >
9
+ <span v-html="text"></span>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'Tooltip',
17
+ props: {
18
+ text: {
19
+ type: String,
20
+ required: true,
21
+ },
22
+ width: {
23
+ type: String,
24
+ default: 'w-full',
25
+ },
26
+ position: {
27
+ type: String,
28
+ default: 'top',
29
+ validator: (value) => ['top', 'bottom', 'left', 'right'].includes(value),
30
+ }
31
+ },
32
+ data() {
33
+ return {
34
+ visible: false,
35
+ };
36
+ },
37
+ computed: {
38
+ positionClass() {
39
+ switch (this.position) {
40
+ case 'top':
41
+ return 'bottom-full left-1/2 transform -translate-x-1/2 mb-2';
42
+ case 'bottom':
43
+ return 'top-full left-1/2 transform -translate-x-1/2 mt-2';
44
+ case 'left':
45
+ return 'right-full top-1/2 transform -translate-y-1/2 mr-2';
46
+ case 'right':
47
+ return 'left-full top-1/2 transform -translate-y-1/2 ml-2';
48
+ default:
49
+ return 'bottom-full left-1/2 transform -translate-x-1/2 mb-2';
50
+ }
51
+ }
52
+ },
53
+ methods: {
54
+ showTooltip() {
55
+ this.visible = true;
56
+ },
57
+ hideTooltip() {
58
+ this.visible = false;
59
+ },
60
+ toggleTooltip() {
61
+ this.visible = !this.visible;
62
+ },
63
+ },
64
+ };
65
+ </script>
66
+
67
+ <style scoped>
68
+ .tooltip {
69
+ transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
70
+ }
71
+ </style>
@@ -1,6 +1,5 @@
1
1
  import TabGrid from './GridTabs.vue';
2
2
  import mockGetPoolsWithPeople from '../../../mocks/getPoolsWithPeople.js';
3
-
4
3
  export default {
5
4
  title: 'Organisms/GridTabs/GridTabs',
6
5
  component: TabGrid,
@@ -8,8 +7,6 @@ export default {
8
7
  pools: { control: 'array' }
9
8
  }
10
9
  };
11
-
12
- // Template for the story
13
10
  const Template = (args) => ({
14
11
  components: { TabGrid },
15
12
  setup() {
@@ -17,7 +14,6 @@ const Template = (args) => ({
17
14
  },
18
15
  template: '<TabGrid v-bind="args" />'
19
16
  });
20
-
21
17
  export const Default = Template.bind({});
22
18
  Default.args = {
23
19
  pools: mockGetPoolsWithPeople.pools
@@ -1,8 +1,14 @@
1
1
  <template>
2
2
  <div class="w-full rounded-lg">
3
3
  <!-- Grid Title -->
4
- <div class="max-w-[1200px] w-full flex pt-6 ml-4 mb-6">
4
+ <div class="max-w-[1200px] w-full flex justify-between mx-auto py-8 pl-4 rounded-tr-lg rounded-tl-lg">
5
5
  <BaseText color="primary" size="xl" tag="h3" weight="bold">{{ `Fencers in ${pools[selectedTab].Name}` }}</BaseText>
6
+ <div class="flex">
7
+ <BaseText color="primary" size="xl" tag="h3" weight="bold">{{ `${pools[selectedTab].poolStrengthInd} Strength Indicator` }}</BaseText>
8
+ <Tooltip :text="tooltipContent" width="w-[500px]" position="left">
9
+ <Icon icon="fa-circle-info" color="primary" size="md" class="hidden md:block ml-2" />
10
+ </Tooltip>
11
+ </div>
6
12
  </div>
7
13
 
8
14
  <!-- Tabs for Pools -->
@@ -40,10 +46,14 @@ import GridLayout from "../GridLayout/GridLayout.vue";
40
46
  import FencerListCard from "../Cards/FencerListCard/FencerListCard.vue";
41
47
  import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
42
48
  import BaseText from "../../Atoms/BaseText/BaseText.vue";
49
+ import Icon from "../../Atoms/Icon/Icon.vue";
50
+ import Tooltip from "../../Molecules/ToolTip/ToolTip.vue";
43
51
 
44
52
  export default {
45
53
  name: 'GridTabs',
46
54
  components: {
55
+ Tooltip,
56
+ Icon,
47
57
  BaseText,
48
58
  BaseButton,
49
59
  GridLayout,
@@ -65,7 +75,13 @@ export default {
65
75
  },
66
76
  data() {
67
77
  return {
68
- selectedTab: 0
78
+ selectedTab: 0,
79
+ tooltipContent: `
80
+ <strong>Strength Indicator Explanation:</strong><br/>
81
+ - A negative score means this pool is weaker than the average.<br/>
82
+ - A positive score means this pool is stronger than the average.<br/><br/>
83
+ <em>Note:</em> A small difference is expected, as tournament organizers aim to separate club members for balanced competition.
84
+ `
69
85
  };
70
86
  },
71
87
  methods: {