@dcrackel/hematournamentui 1.0.59 → 1.0.61
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/.storybook/main.js +1 -3
- package/.storybook/preview.js +1 -1
- package/package.json +13 -13
- package/src/mocks/personsMock.js +353 -36
- package/src/mocks/tournamentMock.js +1 -1
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.stories.js +29 -0
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +67 -0
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.stories.js +40 -0
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.vue +35 -0
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +9 -9
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +5 -4
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +5 -19
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +171 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +129 -0
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +18 -6
- package/src/stories/Organisms/Containers/PoolSummary/PoolSummary.stories.js +28 -0
- package/src/stories/Organisms/Containers/PoolSummary/PoolSummary.vue +55 -0
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +29 -0
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +118 -0
- package/src/stories/Templates/{TournamentManagement/EditTournament → EventManagement}/ListEvents/ListEvents.stories.js +2 -2
- package/src/stories/Templates/{TournamentManagement/EditTournament → EventManagement}/ListEvents/ListEvents.vue +14 -6
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +20 -0
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +51 -0
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.stories.js +14 -2
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.vue +14 -39
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageOne/EditTournamentPageOne.vue +9 -2
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageTwo/EditTournamentPageTwo.vue +8 -1
- package/tailwind.config.js +7 -6
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.js +0 -29
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.vue +0 -67
- package/src/stories/Organisms/Containers/Container.stories.js +0 -13
- package/src/stories/Organisms/Containers/Container.vue +0 -6
package/.storybook/main.js
CHANGED
package/.storybook/preview.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcrackel/hematournamentui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.61",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/HemaTouranmentUI-lib.umd.js",
|
|
7
7
|
"module": "dist/HemaTouranmentUI-lib.es.js",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@chromatic-com/storybook": "^1.4.0",
|
|
43
|
-
"@storybook/addon-actions": "^8.1.
|
|
44
|
-
"@storybook/addon-docs": "^8.1.
|
|
45
|
-
"@storybook/addon-essentials": "^8.1.
|
|
46
|
-
"@storybook/addon-interactions": "^8.1.
|
|
47
|
-
"@storybook/addon-links": "^8.1.
|
|
48
|
-
"@storybook/addon-mdx-gfm": "^8.1.
|
|
49
|
-
"@storybook/blocks": "^8.1.
|
|
50
|
-
"@storybook/react": "^8.1.
|
|
51
|
-
"@storybook/test": "^8.1.
|
|
52
|
-
"@storybook/vue3": "^8.1.
|
|
53
|
-
"@storybook/vue3-vite": "^8.1.
|
|
43
|
+
"@storybook/addon-actions": "^8.1.5",
|
|
44
|
+
"@storybook/addon-docs": "^8.1.5",
|
|
45
|
+
"@storybook/addon-essentials": "^8.1.5",
|
|
46
|
+
"@storybook/addon-interactions": "^8.1.5",
|
|
47
|
+
"@storybook/addon-links": "^8.1.5",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "^8.1.5",
|
|
49
|
+
"@storybook/blocks": "^8.1.5",
|
|
50
|
+
"@storybook/react": "^8.1.5",
|
|
51
|
+
"@storybook/test": "^8.1.5",
|
|
52
|
+
"@storybook/vue3": "^8.1.5",
|
|
53
|
+
"@storybook/vue3-vite": "^8.1.5",
|
|
54
54
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
55
55
|
"@vitest/coverage-v8": "^1.1.0",
|
|
56
56
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"eslint": "^8.56.0",
|
|
60
60
|
"eslint-plugin-storybook": "^0.8.0",
|
|
61
61
|
"eslint-plugin-vue": "^9.20.1",
|
|
62
|
-
"storybook": "^8.1.
|
|
62
|
+
"storybook": "^8.1.5",
|
|
63
63
|
"storybook-vue3-router": "^5.0.0",
|
|
64
64
|
"tailwindcss": "^3.4.3",
|
|
65
65
|
"vite": "^5.0.10",
|
package/src/mocks/personsMock.js
CHANGED
|
@@ -1,46 +1,363 @@
|
|
|
1
1
|
const personsMock = [
|
|
2
2
|
{
|
|
3
|
+
"Id": 72,
|
|
4
|
+
"EventId": 1,
|
|
5
|
+
"PersonId": 4,
|
|
6
|
+
"Seed": 8,
|
|
7
|
+
"Status": "Absent",
|
|
8
|
+
"Person": {
|
|
9
|
+
"PersonId": 4,
|
|
10
|
+
"FirstName": "Kim",
|
|
11
|
+
"LastName": "Bullock",
|
|
12
|
+
"Images": [
|
|
13
|
+
{
|
|
14
|
+
"ImageId": 8,
|
|
15
|
+
"URL": "https://randomuser.me/api/portraits/women/9.jpg",
|
|
16
|
+
"AltText": null,
|
|
17
|
+
"Type": "Portrait",
|
|
18
|
+
"EntityId": 4,
|
|
19
|
+
"EntityType": "Person"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"Club": {
|
|
23
|
+
"ClubId": 1,
|
|
24
|
+
"Name": "Test Club",
|
|
25
|
+
"Description": "This is a test",
|
|
26
|
+
"AddressId": 1,
|
|
27
|
+
"SocialMediaId": null
|
|
28
|
+
},
|
|
29
|
+
"HEMARatings": [
|
|
30
|
+
{
|
|
31
|
+
"Id": 6,
|
|
32
|
+
"PersonId": 4,
|
|
33
|
+
"Rank": 1234,
|
|
34
|
+
"Rating": 1235.6,
|
|
35
|
+
"WeaponId": 1,
|
|
36
|
+
"Updated": "2024-05-30T17:42:12.000Z"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"M2Ratings": []
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"Id": 73,
|
|
44
|
+
"EventId": 1,
|
|
3
45
|
"PersonId": 1,
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
46
|
+
"Seed": 1,
|
|
47
|
+
"Status": "Absent",
|
|
48
|
+
"Person": {
|
|
49
|
+
"PersonId": 1,
|
|
50
|
+
"FirstName": "Dwain",
|
|
51
|
+
"LastName": "Crackel",
|
|
52
|
+
"Images": [
|
|
53
|
+
{
|
|
54
|
+
"ImageId": 7,
|
|
55
|
+
"URL": "https://randomuser.me/api/portraits/men/22.jpg",
|
|
56
|
+
"AltText": null,
|
|
57
|
+
"Type": "Portrait",
|
|
58
|
+
"EntityId": 1,
|
|
59
|
+
"EntityType": "Person"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"Club": {
|
|
63
|
+
"ClubId": 1,
|
|
64
|
+
"Name": "Test Club",
|
|
65
|
+
"Description": "This is a test",
|
|
66
|
+
"AddressId": 1,
|
|
67
|
+
"SocialMediaId": null
|
|
68
|
+
},
|
|
69
|
+
"HEMARatings": [
|
|
70
|
+
{
|
|
71
|
+
"Id": 1,
|
|
72
|
+
"PersonId": 1,
|
|
73
|
+
"Rank": 1700,
|
|
74
|
+
"Rating": 1200.2,
|
|
75
|
+
"WeaponId": 1,
|
|
76
|
+
"Updated": "2024-05-30T17:39:47.000Z"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"M2Ratings": [
|
|
80
|
+
{
|
|
81
|
+
"id": 1,
|
|
82
|
+
"PersonId": 1,
|
|
83
|
+
"EventId": 1,
|
|
84
|
+
"WeaponId": 1,
|
|
85
|
+
"Rating": "E24",
|
|
86
|
+
"DateEarned": "2024-05-30"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
19
90
|
},
|
|
20
91
|
{
|
|
92
|
+
"Id": 74,
|
|
93
|
+
"EventId": 1,
|
|
21
94
|
"PersonId": 2,
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
95
|
+
"Seed": 6,
|
|
96
|
+
"Status": "Absent",
|
|
97
|
+
"Person": {
|
|
98
|
+
"PersonId": 2,
|
|
99
|
+
"FirstName": "Kyle",
|
|
100
|
+
"LastName": "Edwards",
|
|
101
|
+
"Images": [],
|
|
102
|
+
"Club": {
|
|
103
|
+
"ClubId": 1,
|
|
104
|
+
"Name": "Test Club",
|
|
105
|
+
"Description": "This is a test",
|
|
106
|
+
"AddressId": 1,
|
|
107
|
+
"SocialMediaId": null
|
|
108
|
+
},
|
|
109
|
+
"HEMARatings": [
|
|
110
|
+
{
|
|
111
|
+
"Id": 2,
|
|
112
|
+
"PersonId": 2,
|
|
113
|
+
"Rank": 1756,
|
|
114
|
+
"Rating": 1223.8,
|
|
115
|
+
"WeaponId": 1,
|
|
116
|
+
"Updated": "2024-05-30T17:39:47.000Z"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"M2Ratings": [
|
|
120
|
+
{
|
|
121
|
+
"id": 2,
|
|
122
|
+
"PersonId": 2,
|
|
123
|
+
"EventId": 1,
|
|
124
|
+
"WeaponId": 1,
|
|
125
|
+
"Rating": "D24",
|
|
126
|
+
"DateEarned": "2024-05-22"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"Id": 77,
|
|
133
|
+
"EventId": 1,
|
|
134
|
+
"PersonId": 3,
|
|
135
|
+
"Seed": 3,
|
|
136
|
+
"Status": "Absent",
|
|
137
|
+
"Person": {
|
|
138
|
+
"PersonId": 3,
|
|
139
|
+
"FirstName": "Dave",
|
|
140
|
+
"LastName": "Larabee",
|
|
141
|
+
"Images": [],
|
|
142
|
+
"Club": {
|
|
143
|
+
"ClubId": 1,
|
|
144
|
+
"Name": "Test Club",
|
|
145
|
+
"Description": "This is a test",
|
|
146
|
+
"AddressId": 1,
|
|
147
|
+
"SocialMediaId": null
|
|
148
|
+
},
|
|
149
|
+
"HEMARatings": [],
|
|
150
|
+
"M2Ratings": [
|
|
151
|
+
{
|
|
152
|
+
"id": 3,
|
|
153
|
+
"PersonId": 3,
|
|
154
|
+
"EventId": 1,
|
|
155
|
+
"WeaponId": 1,
|
|
156
|
+
"Rating": "C24",
|
|
157
|
+
"DateEarned": "2024-05-30"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"Id": 78,
|
|
164
|
+
"EventId": 1,
|
|
165
|
+
"PersonId": 5,
|
|
166
|
+
"Seed": 10,
|
|
167
|
+
"Status": "Absent",
|
|
168
|
+
"Person": {
|
|
169
|
+
"PersonId": 5,
|
|
170
|
+
"FirstName": "Darlene",
|
|
171
|
+
"LastName": "Acevedo",
|
|
172
|
+
"Images": [],
|
|
173
|
+
"Club": {
|
|
174
|
+
"ClubId": 1,
|
|
175
|
+
"Name": "Test Club",
|
|
176
|
+
"Description": "This is a test",
|
|
177
|
+
"AddressId": 1,
|
|
178
|
+
"SocialMediaId": null
|
|
179
|
+
},
|
|
180
|
+
"HEMARatings": [],
|
|
181
|
+
"M2Ratings": []
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"Id": 79,
|
|
186
|
+
"EventId": 1,
|
|
187
|
+
"PersonId": 6,
|
|
188
|
+
"Seed": 11,
|
|
189
|
+
"Status": "Absent",
|
|
190
|
+
"Person": {
|
|
191
|
+
"PersonId": 6,
|
|
192
|
+
"FirstName": "Courtney",
|
|
193
|
+
"LastName": "Medina",
|
|
194
|
+
"Images": [],
|
|
195
|
+
"Club": {
|
|
196
|
+
"ClubId": 1,
|
|
197
|
+
"Name": "Test Club",
|
|
198
|
+
"Description": "This is a test",
|
|
199
|
+
"AddressId": 1,
|
|
200
|
+
"SocialMediaId": null
|
|
201
|
+
},
|
|
202
|
+
"HEMARatings": [],
|
|
203
|
+
"M2Ratings": []
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"Id": 80,
|
|
208
|
+
"EventId": 1,
|
|
209
|
+
"PersonId": 7,
|
|
210
|
+
"Seed": 5,
|
|
211
|
+
"Status": "Absent",
|
|
212
|
+
"Person": {
|
|
213
|
+
"PersonId": 7,
|
|
214
|
+
"FirstName": "Emily",
|
|
215
|
+
"LastName": "Carlson",
|
|
216
|
+
"Images": [],
|
|
217
|
+
"Club": {
|
|
218
|
+
"ClubId": 1,
|
|
219
|
+
"Name": "Test Club",
|
|
220
|
+
"Description": "This is a test",
|
|
221
|
+
"AddressId": 1,
|
|
222
|
+
"SocialMediaId": null
|
|
223
|
+
},
|
|
224
|
+
"HEMARatings": [],
|
|
225
|
+
"M2Ratings": []
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"Id": 81,
|
|
230
|
+
"EventId": 1,
|
|
231
|
+
"PersonId": 8,
|
|
232
|
+
"Seed": 12,
|
|
233
|
+
"Status": "Absent",
|
|
234
|
+
"Person": {
|
|
235
|
+
"PersonId": 8,
|
|
236
|
+
"FirstName": "Julie",
|
|
237
|
+
"LastName": "Riddle",
|
|
238
|
+
"Images": [],
|
|
239
|
+
"Club": {
|
|
240
|
+
"ClubId": 1,
|
|
241
|
+
"Name": "Test Club",
|
|
242
|
+
"Description": "This is a test",
|
|
243
|
+
"AddressId": 1,
|
|
244
|
+
"SocialMediaId": null
|
|
245
|
+
},
|
|
246
|
+
"HEMARatings": [],
|
|
247
|
+
"M2Ratings": []
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"Id": 82,
|
|
252
|
+
"EventId": 1,
|
|
253
|
+
"PersonId": 9,
|
|
254
|
+
"Seed": 4,
|
|
255
|
+
"Status": "Absent",
|
|
256
|
+
"Person": {
|
|
257
|
+
"PersonId": 9,
|
|
258
|
+
"FirstName": "Sean",
|
|
259
|
+
"LastName": "McCoy",
|
|
260
|
+
"Images": [],
|
|
261
|
+
"Club": {
|
|
262
|
+
"ClubId": 1,
|
|
263
|
+
"Name": "Test Club",
|
|
264
|
+
"Description": "This is a test",
|
|
265
|
+
"AddressId": 1,
|
|
266
|
+
"SocialMediaId": null
|
|
267
|
+
},
|
|
268
|
+
"HEMARatings": [],
|
|
269
|
+
"M2Ratings": []
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"Id": 83,
|
|
274
|
+
"EventId": 1,
|
|
275
|
+
"PersonId": 10,
|
|
276
|
+
"Seed": 13,
|
|
277
|
+
"Status": "Absent",
|
|
278
|
+
"Person": {
|
|
279
|
+
"PersonId": 10,
|
|
280
|
+
"FirstName": "Melissa",
|
|
281
|
+
"LastName": "Jones",
|
|
282
|
+
"Images": [],
|
|
283
|
+
"Club": {
|
|
284
|
+
"ClubId": 1,
|
|
285
|
+
"Name": "Test Club",
|
|
286
|
+
"Description": "This is a test",
|
|
287
|
+
"AddressId": 1,
|
|
288
|
+
"SocialMediaId": null
|
|
289
|
+
},
|
|
290
|
+
"HEMARatings": [],
|
|
291
|
+
"M2Ratings": []
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"Id": 84,
|
|
296
|
+
"EventId": 1,
|
|
297
|
+
"PersonId": 11,
|
|
298
|
+
"Seed": 9,
|
|
299
|
+
"Status": "Absent",
|
|
300
|
+
"Person": {
|
|
301
|
+
"PersonId": 11,
|
|
302
|
+
"FirstName": "Sylvia",
|
|
303
|
+
"LastName": "Lee",
|
|
304
|
+
"Images": [],
|
|
305
|
+
"Club": {
|
|
306
|
+
"ClubId": 1,
|
|
307
|
+
"Name": "Test Club",
|
|
308
|
+
"Description": "This is a test",
|
|
309
|
+
"AddressId": 1,
|
|
310
|
+
"SocialMediaId": null
|
|
311
|
+
},
|
|
312
|
+
"HEMARatings": [],
|
|
313
|
+
"M2Ratings": []
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"Id": 85,
|
|
318
|
+
"EventId": 1,
|
|
319
|
+
"PersonId": 12,
|
|
320
|
+
"Seed": 2,
|
|
321
|
+
"Status": "Absent",
|
|
322
|
+
"Person": {
|
|
323
|
+
"PersonId": 12,
|
|
324
|
+
"FirstName": "Lindsey",
|
|
325
|
+
"LastName": "Mitchell",
|
|
326
|
+
"Images": [],
|
|
327
|
+
"Club": {
|
|
328
|
+
"ClubId": 1,
|
|
329
|
+
"Name": "Test Club",
|
|
330
|
+
"Description": "This is a test",
|
|
331
|
+
"AddressId": 1,
|
|
332
|
+
"SocialMediaId": null
|
|
333
|
+
},
|
|
334
|
+
"HEMARatings": [],
|
|
335
|
+
"M2Ratings": []
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"Id": 86,
|
|
340
|
+
"EventId": 1,
|
|
341
|
+
"PersonId": 13,
|
|
342
|
+
"Seed": 7,
|
|
343
|
+
"Status": "Absent",
|
|
344
|
+
"Person": {
|
|
345
|
+
"PersonId": 13,
|
|
346
|
+
"FirstName": "Jarrett",
|
|
347
|
+
"LastName": "Anderson",
|
|
348
|
+
"Images": [],
|
|
349
|
+
"Club": {
|
|
350
|
+
"ClubId": 1,
|
|
351
|
+
"Name": "Test Club",
|
|
352
|
+
"Description": "This is a test",
|
|
353
|
+
"AddressId": 1,
|
|
354
|
+
"SocialMediaId": null
|
|
355
|
+
},
|
|
356
|
+
"HEMARatings": [],
|
|
357
|
+
"M2Ratings": []
|
|
358
|
+
}
|
|
43
359
|
}
|
|
44
360
|
]
|
|
45
361
|
|
|
362
|
+
|
|
46
363
|
export default personsMock;
|
|
@@ -4,7 +4,7 @@ const mockTournaments = [
|
|
|
4
4
|
"Name": "Tournament Test",
|
|
5
5
|
"StartDate": "2023-09-09",
|
|
6
6
|
"EndDate": "2023-09-10",
|
|
7
|
-
"Description": "This
|
|
7
|
+
"Description": "combat with the joy of spending time with furry feline friends! This event celebrates the art of Historical European Martial Arts (HEMA) while offering a purrfect opportunity to interact with adorable cats, some of whom are looking for their forever homes. Whether you're a seasoned swordsman or new to the sport, Cats & Swords promises an unforgettable day of exciting bouts, heartwarming moments, and the chance to adopt a loving companion. Come for the swords, stay for the cats, and leave with memories (and maybe a new furry friend) that will last a lifetime.",
|
|
8
8
|
"ClubId": 1,
|
|
9
9
|
"AddressId": 1,
|
|
10
10
|
"Club.Name": "Test Club",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import CounterBox from './CounterBox.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/Boxes/CounterBox',
|
|
5
|
+
component: CounterBox,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
count: 0,
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
count: { control: { type: 'number' } },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {
|
|
17
|
+
count: 0,
|
|
18
|
+
label: 'Counter',
|
|
19
|
+
recommended: 3
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithInitialCount = {
|
|
24
|
+
args: {
|
|
25
|
+
count: 2,
|
|
26
|
+
label: 'Pool num',
|
|
27
|
+
recommended: 4
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col items-center">
|
|
3
|
+
<section class="flex justify-center">
|
|
4
|
+
<BaseText :text="label" size="sm" color="primaryHighlight" />
|
|
5
|
+
</section>
|
|
6
|
+
<section :class="boxClass">
|
|
7
|
+
<div class="flex flex-row items-center justify-between h-14 py-2 px-2">
|
|
8
|
+
<button @click="increase" class="py-1"><BaseIcon icon-name="fa-caret-up" size="xl" color="primaryHighlight" /></button>
|
|
9
|
+
<span class="px-1"><BaseText :text="counter" size="xl" color="primary"/></span>
|
|
10
|
+
<button @click="decrease" class="py-1"><BaseIcon icon-name="fa-caret-down" size="xl" color="primaryHighlight" /></button>
|
|
11
|
+
</div>
|
|
12
|
+
</section>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
|
|
18
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'CounterBox',
|
|
22
|
+
components: {BaseText, BaseIcon},
|
|
23
|
+
props: {
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'Counter',
|
|
27
|
+
},
|
|
28
|
+
count: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0,
|
|
31
|
+
},
|
|
32
|
+
recommended: {
|
|
33
|
+
type: Number,
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
counter: this.count
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
isRecommended() {
|
|
44
|
+
return this.counter === this.recommended;
|
|
45
|
+
},
|
|
46
|
+
boxClass() {
|
|
47
|
+
return {
|
|
48
|
+
'w-20 h-14 rounded-xl m-1 border bg-neutral': true,
|
|
49
|
+
'border-dropdownSelect': !this.isRecommended,
|
|
50
|
+
'border-bright': this.isRecommended,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
increase() {
|
|
56
|
+
this.counter++;
|
|
57
|
+
this.$emit('update:count', this.counter);
|
|
58
|
+
},
|
|
59
|
+
decrease() {
|
|
60
|
+
if (this.counter > 0) {
|
|
61
|
+
this.counter--;
|
|
62
|
+
this.$emit('update:count', this.counter);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import EventStatusBox from './EventStatusBox.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/Boxes/EventStatusBox',
|
|
5
|
+
component: EventStatusBox,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
statusCount: 10,
|
|
9
|
+
statusLabel: 'PRESENT',
|
|
10
|
+
boxColor: 'bg-eventBoxBlue',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: {
|
|
19
|
+
statusCount: 10,
|
|
20
|
+
statusLabel: 'PRESENT',
|
|
21
|
+
boxColor: 'bg-eventBoxBlue',
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Absent = {
|
|
26
|
+
args: {
|
|
27
|
+
statusCount: 5,
|
|
28
|
+
statusLabel: 'ABSENT',
|
|
29
|
+
boxColor: 'bg-eventBoxGreen',
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export const Removed = {
|
|
35
|
+
args: {
|
|
36
|
+
statusCount: 3,
|
|
37
|
+
statusLabel: 'REMOVED',
|
|
38
|
+
boxColor: 'bg-eventBoxRed',
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section :class="['w-20 h-14 rounded-xl m-1', boxColor]">
|
|
3
|
+
<div class="flex flex-col justify-between h-14 py-2 pl-1">
|
|
4
|
+
<p class="flex flex-row justify-center w-full pb-1">
|
|
5
|
+
<BaseText :text="statusCount" size="sm" color="quinary" weight="bold" />
|
|
6
|
+
</p>
|
|
7
|
+
<p class="flex flex-row justify-center w-full">
|
|
8
|
+
<BaseText :text="statusLabel" size="xs" color="quinary" />
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
</section>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'EventStatusBox',
|
|
19
|
+
components: {BaseText},
|
|
20
|
+
props: {
|
|
21
|
+
statusCount: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
statusLabel: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
boxColor: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|