@dcrackel/hematournamentui 1.0.35 → 1.0.37
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/HemaTouranmentUI-lib.es.js +1685 -1617
- package/dist/HemaTouranmentUI-lib.umd.js +17 -17
- package/package.json +1 -1
- package/src/stories/Atoms/Icon/BaseIcon.vue +1 -1
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +0 -1
- package/src/stories/Molecules/Menus/EditTournamentMenu/EditTournamentMenu.stories.js +18 -0
- package/src/stories/Molecules/Menus/EditTournamentMenu/EditTournamentMenu.vue +29 -0
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.stories.js +47 -4
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.vue +46 -5
- package/src/stories/Templates/TournamentManagement/AddTournament/PageOne/AddTournamentPageOne.vue +1 -1
- package/src/stories/Templates/TournamentManagement/AddTournament/PageTwo/AddTournamentPageTwo.vue +1 -1
- package/tailwind.config.js +15 -8
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
size: {
|
|
23
23
|
type: String,
|
|
24
24
|
validator: function (value) {
|
|
25
|
-
return ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl'].indexOf(value) !== -1;
|
|
25
|
+
return ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl'].indexOf(value) !== -1;
|
|
26
26
|
},
|
|
27
27
|
default: 'sm'
|
|
28
28
|
},
|
|
@@ -49,7 +49,6 @@ export default {
|
|
|
49
49
|
const typeClasses = {
|
|
50
50
|
primary: 'mx-1 p-2 items-center gap-2.5 text-center rounded-md shadow border border-dropdownSelect justify-center hover:bg-tertiary ' +
|
|
51
51
|
(props.selected ? 'bg-dropdownSelect' : 'bg-neutral'),
|
|
52
|
-
|
|
53
52
|
secondary: 'px-2.5 items-center gap-2.5 text-center my-1 p-3 border-b border-secondary hover:border-b hover:border-neutral w-full rounded-lg flex flex-row justify-center ' +
|
|
54
53
|
(props.selected ? 'bg-secondary' : 'bg-primary'),
|
|
55
54
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import EditTournamentMenu from './EditTournamentMenu.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/Menus/EditTournamentMenu/EditTournamentMenu',
|
|
5
|
+
component: EditTournamentMenu,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
onClick: {},
|
|
9
|
+
size: {}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Primary = {
|
|
14
|
+
args: {
|
|
15
|
+
label: 'Menu 1',
|
|
16
|
+
selected: true
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="flex flex-row w-full">
|
|
3
|
+
<BaseText :text="label" class="mx-3" color="secondary"/>
|
|
4
|
+
</nav>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'edit-tournament-menu',
|
|
12
|
+
components: {BaseText},
|
|
13
|
+
props: {
|
|
14
|
+
label: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ''
|
|
17
|
+
},
|
|
18
|
+
selected: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
//
|
|
23
|
+
// onLinkClick: {
|
|
24
|
+
// type: Function,
|
|
25
|
+
// default: () => {}
|
|
26
|
+
// }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
@@ -1,20 +1,63 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseModal from './BaseModal.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Molecules/Modals/BaseModal',
|
|
5
|
-
component:
|
|
5
|
+
component: BaseModal,
|
|
6
6
|
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
show: {
|
|
9
|
+
control: 'boolean',
|
|
10
|
+
description: 'Controls the visibility of the modal'
|
|
11
|
+
},
|
|
12
|
+
iconName: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Icon name for the modal icon'
|
|
15
|
+
},
|
|
16
|
+
iconColor: {
|
|
17
|
+
control: 'text',
|
|
18
|
+
description: 'Color for the modal icon'
|
|
19
|
+
},
|
|
20
|
+
iconBackgroundColor: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'Background color for the modal icon'
|
|
23
|
+
},
|
|
24
|
+
iconBorderColor: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'Border color for the modal icon'
|
|
27
|
+
},
|
|
28
|
+
headerText: {
|
|
29
|
+
control: 'text',
|
|
30
|
+
description: 'Header text of the modal'
|
|
31
|
+
},
|
|
32
|
+
bodyText: {
|
|
33
|
+
control: 'text',
|
|
34
|
+
description: 'Body text of the modal'
|
|
35
|
+
},
|
|
36
|
+
buttonText: {
|
|
37
|
+
control: 'text',
|
|
38
|
+
description: 'Button Text Next'
|
|
39
|
+
},
|
|
40
|
+
}
|
|
7
41
|
};
|
|
8
42
|
|
|
9
43
|
const Template = (args) => ({
|
|
10
|
-
components: {
|
|
44
|
+
components: { BaseModal },
|
|
11
45
|
setup() {
|
|
12
46
|
return { args };
|
|
13
47
|
},
|
|
14
|
-
template: '<
|
|
48
|
+
template: '<BaseModal v-bind="args" />',
|
|
15
49
|
});
|
|
16
50
|
|
|
17
51
|
export const Default = Template.bind({});
|
|
18
52
|
Default.args = {
|
|
19
53
|
show: true,
|
|
54
|
+
iconName: 'fa-check-circle',
|
|
55
|
+
iconColor: 'accepted',
|
|
56
|
+
iconBackgroundColor: 'acceptedHighlight',
|
|
57
|
+
iconBorderColor: 'acceptedBorder',
|
|
58
|
+
headerText: 'Congratulations!',
|
|
59
|
+
bodyText: "Your tournament's been created. Now you can start editing events, setup up staff and start inviting members.",
|
|
60
|
+
buttonText: "Get Started!"
|
|
20
61
|
};
|
|
62
|
+
|
|
63
|
+
|
|
@@ -1,29 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="show" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full" @click="close">
|
|
3
3
|
<div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
|
|
4
|
-
<div class="mt-3 text-center">
|
|
5
|
-
<
|
|
4
|
+
<div class="mt-3 text-center w-full">
|
|
5
|
+
<div class="w-full flex flex-row justify-center">
|
|
6
|
+
<p :class="['bg-' + iconBackgroundColor, 'flex flex-row justify-center h-20 w-20 rounded-full', 'border border-' + iconBorderColor]">
|
|
7
|
+
<BaseIcon :icon-name="iconName" iconStyle="fa-solid" size="4xl" :color="iconColor" class="mb-3 mt-5" data-testid="base-icon" />
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
<BaseText :text="headerText" size="2xl" weight="bold" color="secondary" class="m-3" data-testid="text-title"/>
|
|
11
|
+
<BaseText :text="bodyText" size="sm" weight="normal" color="primaryHighlight" class="mb-3" data-testid="text-title"/>
|
|
6
12
|
<div class="mt-4">
|
|
7
|
-
<
|
|
13
|
+
<BaseButton :label="buttonText" size="sm" type="secondary" :selected="true" @click="close" color="neutral" class="w-full" data-testid="base-button"/>
|
|
8
14
|
</div>
|
|
9
15
|
</div>
|
|
10
16
|
</div>
|
|
11
17
|
</div>
|
|
12
18
|
</template>
|
|
13
19
|
|
|
20
|
+
|
|
14
21
|
<script>
|
|
22
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
23
|
+
import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
|
|
24
|
+
import BaseButton from "../../Buttons/BaseButton/BaseButton.vue";
|
|
25
|
+
|
|
15
26
|
export default {
|
|
27
|
+
name: "BaseModal",
|
|
28
|
+
components: {BaseButton, BaseIcon, BaseText},
|
|
16
29
|
props: {
|
|
17
30
|
show: {
|
|
18
31
|
type: Boolean,
|
|
19
32
|
default: false
|
|
33
|
+
},
|
|
34
|
+
iconName: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'fa-check-circle'
|
|
37
|
+
},
|
|
38
|
+
iconColor: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'accepted'
|
|
41
|
+
},
|
|
42
|
+
iconBackgroundColor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'acceptedHighlight'
|
|
45
|
+
},
|
|
46
|
+
iconBorderColor: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'acceptedBorder'
|
|
49
|
+
},
|
|
50
|
+
headerText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'Default Header'
|
|
53
|
+
},
|
|
54
|
+
bodyText: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'Default Body Text'
|
|
57
|
+
},
|
|
58
|
+
buttonText: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'Button Text'
|
|
20
61
|
}
|
|
21
62
|
},
|
|
22
63
|
emits: ['update:show'],
|
|
23
64
|
methods: {
|
|
24
65
|
close() {
|
|
25
|
-
this.$emit('update:show', false)
|
|
66
|
+
this.$emit('update:show', false)
|
|
26
67
|
}
|
|
27
68
|
}
|
|
28
69
|
};
|
|
29
|
-
</script>
|
|
70
|
+
</script>
|
package/src/stories/Templates/TournamentManagement/AddTournament/PageOne/AddTournamentPageOne.vue
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="flex flex-col mb-3">
|
|
18
18
|
<BaseText :invalid="validation.name" :size="'sm'" :text="'Tournament Name'" :weight="'normal'"
|
|
19
19
|
class="mb-1" color="primary" data-testid="text-tournament-name"/>
|
|
20
|
-
<BaseInput :invalid="validation.name" :value="tournament.name" placeholder="Enter Tournament Name"
|
|
20
|
+
<BaseInput :addBorder="true" :invalid="validation.name" :value="tournament.name" placeholder="Enter Tournament Name"
|
|
21
21
|
type="formInput" @update:value="value => tournament.name = value"/>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="flex flex-col mb-3">
|
package/src/stories/Templates/TournamentManagement/AddTournament/PageTwo/AddTournamentPageTwo.vue
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<BaseText :color="'quaternary'" :size="'sm'" :text="'Add links to external sites such as Facebook events'"
|
|
37
37
|
:weight="'normal'" class="mb-1" data-testid="text-need-help"/>
|
|
38
38
|
<div v-for="(newLink, index) in localTournament.externalLinks" :key="index" class="flex flex-row w-full">
|
|
39
|
-
<BaseInput :invalid="!newLink.valid" :value="newLink.url" class="pb-2 w-full"
|
|
39
|
+
<BaseInput :addBorder="true" :invalid="!newLink.valid" :value="newLink.url" class="pb-2 w-full"
|
|
40
40
|
icon-name="fa-dash"
|
|
41
41
|
placeholder="https://link1.com/yourevent" @input="updateLink(index, $event)"/>
|
|
42
42
|
<BaseIcon class="mt-1.5 -ml-7 hover:text-primaryHighlight" color="primary" data-testid="base-icon"
|
package/tailwind.config.js
CHANGED
|
@@ -4,6 +4,10 @@ export default {
|
|
|
4
4
|
"./index.html",
|
|
5
5
|
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
|
6
6
|
],
|
|
7
|
+
safelist: [
|
|
8
|
+
'text-accepted',
|
|
9
|
+
'bg-acceptedHighlight'
|
|
10
|
+
],
|
|
7
11
|
theme: {
|
|
8
12
|
extend: {
|
|
9
13
|
fontFamily: {
|
|
@@ -15,17 +19,20 @@ export default {
|
|
|
15
19
|
'h3': '1.75'
|
|
16
20
|
},
|
|
17
21
|
colors: {
|
|
22
|
+
accepted: '#1D7E64',
|
|
23
|
+
acceptedBorder: '#ADCFC6',
|
|
24
|
+
acceptedHighlight: '#E5F6F1',
|
|
25
|
+
alarm: '#FD546F',
|
|
26
|
+
alarmText: '#F90229',
|
|
27
|
+
alert: '#FFD255',
|
|
28
|
+
bright: '#6190f2',
|
|
29
|
+
dropdownSelect: '#D5E4EE',
|
|
30
|
+
neutral: '#FFFFFF',
|
|
18
31
|
primary: '#141B33',
|
|
19
32
|
primaryHighlight: '#52586C',
|
|
20
|
-
secondary: '#2B324B',
|
|
21
33
|
quaternary: '#8991AC',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
neutral: '#FFFFFF',
|
|
25
|
-
bright: '#6190f2',
|
|
26
|
-
alarm: '#FD546F',
|
|
27
|
-
alarmText: '#F90229',
|
|
28
|
-
alert: '#FFD255'
|
|
34
|
+
secondary: '#2B324B',
|
|
35
|
+
tertiary: '#F6FAFD'
|
|
29
36
|
}
|
|
30
37
|
},
|
|
31
38
|
},
|