@dcrackel/meyersquaredui 1.0.36
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/README.md +5 -0
- package/dist/meyersquaredui.cjs.js +1 -0
- package/dist/meyersquaredui.es.js +471 -0
- package/dist/style.css +1 -0
- package/package.json +61 -0
- package/src/assets/fonts/Raleway-Bold.ttf +0 -0
- package/src/assets/fonts/Raleway-Light.ttf +0 -0
- package/src/assets/fonts/Raleway-Regular.ttf +0 -0
- package/src/assets/fonts/Raleway-SemiBold.ttf +0 -0
- package/src/assets/images/m2.png +0 -0
- package/src/components/HelloWorld.vue +43 -0
- package/src/index.js +10 -0
- package/src/main.js +1 -0
- package/src/stories/Atoms/BaseButton/BaseButton.stories.js +83 -0
- package/src/stories/Atoms/BaseButton/BaseButton.vue +110 -0
- package/src/stories/Atoms/BaseText/BaseText.stories.js +55 -0
- package/src/stories/Atoms/BaseText/BaseText.vue +56 -0
- package/src/stories/Atoms/Icon/Icon.stories.js +44 -0
- package/src/stories/Atoms/Icon/Icon.vue +47 -0
- package/src/stories/Atoms/InputField/InputField.stories.js +26 -0
- package/src/stories/Atoms/InputField/InputField.vue +29 -0
- package/src/stories/Configure.mdx +7 -0
- package/src/stories/Molecules/SearchBox/SearchBox.vue +29 -0
- package/src/stories/Molecules/SearchBox/Searchbox.stories.js +30 -0
- package/src/stories/Organisms/Headers/Header.stories.js +17 -0
- package/src/stories/Organisms/Headers/Header.vue +63 -0
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.stories.js +29 -0
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.vue +86 -0
- package/src/stories/Templates/HomePage/TestPage.stories.js +22 -0
- package/src/stories/Templates/HomePage/TestPage.vue +39 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import BaseButton from './BaseButton.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/BaseButton',
|
|
5
|
+
component: BaseButton,
|
|
6
|
+
args: {
|
|
7
|
+
label: 'Click Me',
|
|
8
|
+
color: 'primary',
|
|
9
|
+
border: 'none',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
label: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'The text inside the button',
|
|
15
|
+
},
|
|
16
|
+
color: {
|
|
17
|
+
control: {
|
|
18
|
+
type: 'select',
|
|
19
|
+
options: ['primary', 'secondary', 'accent'],
|
|
20
|
+
},
|
|
21
|
+
description: 'The background color of the button',
|
|
22
|
+
},
|
|
23
|
+
border: {
|
|
24
|
+
control: {
|
|
25
|
+
type: 'select',
|
|
26
|
+
options: ['none', 'primary', 'secondary', 'gradient', 'gradient2'],
|
|
27
|
+
},
|
|
28
|
+
description: 'The border style of the button',
|
|
29
|
+
},
|
|
30
|
+
altText: {
|
|
31
|
+
control: 'text',
|
|
32
|
+
description: 'Optional alt text for accessibility (aria-label)',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const Template = (args) => ({
|
|
38
|
+
components: { BaseButton },
|
|
39
|
+
setup() {
|
|
40
|
+
return { args };
|
|
41
|
+
},
|
|
42
|
+
template: '<BaseButton v-bind="args" />',
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const Default = Template.bind({});
|
|
46
|
+
Default.args = {
|
|
47
|
+
label: 'Click Me',
|
|
48
|
+
color: 'secondary',
|
|
49
|
+
backgroundColor: 'primary',
|
|
50
|
+
border: 'none',
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const PrimaryWithGradientBorder = Template.bind({});
|
|
54
|
+
PrimaryWithGradientBorder.args = {
|
|
55
|
+
label: 'Primary Button',
|
|
56
|
+
color: 'secondary',
|
|
57
|
+
backgroundColor: 'primary',
|
|
58
|
+
border: 'gradient1',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const PrimaryWithGradientBorderTwo = Template.bind({});
|
|
62
|
+
PrimaryWithGradientBorderTwo.args = {
|
|
63
|
+
label: 'Primary Button',
|
|
64
|
+
color: 'secondary',
|
|
65
|
+
backgroundColor: 'primary',
|
|
66
|
+
border: 'gradient2',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const SecondaryWithAccentBorder = Template.bind({});
|
|
70
|
+
SecondaryWithAccentBorder.args = {
|
|
71
|
+
label: 'Secondary Button',
|
|
72
|
+
color: 'secondary',
|
|
73
|
+
backgroundColor: 'primary',
|
|
74
|
+
border: 'accent',
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const BlackBorderWithWhiteBackground = Template.bind({});
|
|
78
|
+
BlackBorderWithWhiteBackground.args = {
|
|
79
|
+
label: 'Secondary Button',
|
|
80
|
+
color: 'primary',
|
|
81
|
+
backgroundColor: 'secondary',
|
|
82
|
+
border: 'primary',
|
|
83
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:class="[
|
|
4
|
+
'px-4 py-2 rounded-md transition duration-300 ease-in-out',
|
|
5
|
+
textColorClass,
|
|
6
|
+
backgroundClass,
|
|
7
|
+
borderClass,
|
|
8
|
+
]"
|
|
9
|
+
:title="altText || label"
|
|
10
|
+
:aria-label="altText || label"
|
|
11
|
+
@click="$emit('click')"
|
|
12
|
+
>
|
|
13
|
+
{{ label }}
|
|
14
|
+
</button>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'BaseButton',
|
|
20
|
+
props: {
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
altText: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: null,
|
|
28
|
+
},
|
|
29
|
+
color: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: 'primary',
|
|
32
|
+
validator: (value) => ['primary', 'secondary', 'accent'].includes(value),
|
|
33
|
+
},
|
|
34
|
+
backgroundColor: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'primary',
|
|
37
|
+
validator: (value) => ['primary', 'secondary', 'accent'].includes(value),
|
|
38
|
+
},
|
|
39
|
+
border: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'none',
|
|
42
|
+
validator: (value) =>
|
|
43
|
+
['none', 'primary', 'secondary', 'accent', 'gradient1', 'gradient2'].includes(value),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
computed: {
|
|
47
|
+
textColorClass() {
|
|
48
|
+
const textColor = {
|
|
49
|
+
primary: 'text-primary',
|
|
50
|
+
secondary: 'text-secondary',
|
|
51
|
+
accent: 'text-accent',
|
|
52
|
+
};
|
|
53
|
+
return textColor[this.color] || 'text-primary';
|
|
54
|
+
},
|
|
55
|
+
backgroundClass() {
|
|
56
|
+
const colorMap = {
|
|
57
|
+
primary: 'bg-primary hover:bg-accent',
|
|
58
|
+
secondary: 'bg-secondary hover:bg-accent',
|
|
59
|
+
accent: 'bg-accent hover:bg-accent',
|
|
60
|
+
};
|
|
61
|
+
return colorMap[this.backgroundColor] || 'bg-primary';
|
|
62
|
+
},
|
|
63
|
+
borderClass() {
|
|
64
|
+
const borderMap = {
|
|
65
|
+
none: '',
|
|
66
|
+
primary: 'border border-primary',
|
|
67
|
+
secondary: 'border border-secondary',
|
|
68
|
+
accent: 'border border-accent',
|
|
69
|
+
gradient1: 'border-gradient-rounded-1',
|
|
70
|
+
gradient2: 'border-gradient-rounded-2',
|
|
71
|
+
};
|
|
72
|
+
return borderMap[this.border] || '';
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style scoped>
|
|
79
|
+
/* Gradient Border 1 */
|
|
80
|
+
.border-gradient-rounded-1 {
|
|
81
|
+
border: 1px solid transparent;
|
|
82
|
+
background:
|
|
83
|
+
linear-gradient(to right, black, black),
|
|
84
|
+
linear-gradient(to right, #FF7A00, #A3412A);
|
|
85
|
+
background-clip: padding-box, border-box;
|
|
86
|
+
background-origin: padding-box, border-box;
|
|
87
|
+
transition: background-size 0.5s ease-in-out, color 0.5s ease-in-out;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.border-gradient-rounded-1:hover {
|
|
91
|
+
background: linear-gradient(to right, #FF7A00, #FFA238);
|
|
92
|
+
color: white;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Gradient Border 2 */
|
|
96
|
+
.border-gradient-rounded-2 {
|
|
97
|
+
border: 1px solid transparent;
|
|
98
|
+
background:
|
|
99
|
+
linear-gradient(to right, black, black),
|
|
100
|
+
linear-gradient(to right, #009DFF, #25E07C);
|
|
101
|
+
background-clip: padding-box, border-box;
|
|
102
|
+
background-origin: padding-box, border-box;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.border-gradient-rounded-2:hover {
|
|
106
|
+
background: linear-gradient(to right, #009DFF, #25E07C);
|
|
107
|
+
color: white; /* Optional: You can change the text color on hover as well */
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import BaseText from './BaseText.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/BaseText',
|
|
5
|
+
component: BaseText,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
tag: 'p',
|
|
9
|
+
size: 'md',
|
|
10
|
+
color: 'primary',
|
|
11
|
+
weight: 'normal',
|
|
12
|
+
content: 'This is a text component'
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
tag: {
|
|
16
|
+
control: { type: 'select', options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'span', 'div'] }
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
control: { type: 'select', options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] }
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
control: { type: 'select', options: ['primary', 'secondary', 'danger', 'success', 'warning', 'info'] }
|
|
23
|
+
},
|
|
24
|
+
weight: {
|
|
25
|
+
control: { type: 'select', options: ['light', 'normal', 'semibold', 'bold'] }
|
|
26
|
+
},
|
|
27
|
+
content: { control: 'text' }
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Template = (args) => ({
|
|
32
|
+
components: { BaseText },
|
|
33
|
+
setup() {
|
|
34
|
+
return { args };
|
|
35
|
+
},
|
|
36
|
+
template: '<BaseText v-bind="args">{{ args.content }}</BaseText>',
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const Default = Template.bind({});
|
|
40
|
+
Default.args = {
|
|
41
|
+
tag: 'p',
|
|
42
|
+
size: 'md',
|
|
43
|
+
color: 'primary',
|
|
44
|
+
weight: 'normal',
|
|
45
|
+
content: 'This is a paragraph'
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const BoldText = Template.bind({});
|
|
49
|
+
BoldText.args = {
|
|
50
|
+
tag: 'h1',
|
|
51
|
+
size: '2xl',
|
|
52
|
+
color: 'primary',
|
|
53
|
+
weight: 'bold',
|
|
54
|
+
content: 'This is bold text'
|
|
55
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" :class="textClasses">
|
|
3
|
+
<slot />
|
|
4
|
+
</component>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'BaseText',
|
|
10
|
+
props: {
|
|
11
|
+
tag: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'p',
|
|
14
|
+
validator: (value) => ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'span', 'div'].includes(value),
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: 'md',
|
|
19
|
+
validator: (value) => ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl'].includes(value),
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'primary',
|
|
24
|
+
},
|
|
25
|
+
weight: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'normal',
|
|
28
|
+
validator: (value) => ['light', 'normal', 'semibold', 'bold'].includes(value),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
textClasses() {
|
|
33
|
+
const sizeClasses = {
|
|
34
|
+
xs: 'text-xs',
|
|
35
|
+
sm: 'text-sm',
|
|
36
|
+
md: 'lg:text-base',
|
|
37
|
+
lg: 'text-lg',
|
|
38
|
+
xl: 'text-xl',
|
|
39
|
+
'2xl': 'text-2xl',
|
|
40
|
+
'3xl': 'text-3xl',
|
|
41
|
+
'4xl': 'text-4xl',
|
|
42
|
+
'5xl': 'text-5xl'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const weightClasses = {
|
|
46
|
+
light: 'font-light',
|
|
47
|
+
normal: 'font-normal',
|
|
48
|
+
semibold: 'font-semibold',
|
|
49
|
+
bold: 'font-bold',
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return `${sizeClasses[this.size]} ${weightClasses[this.weight]} text-${this.color}`;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Icon from './Icon.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/Icon',
|
|
5
|
+
component: Icon,
|
|
6
|
+
args: {
|
|
7
|
+
icon: 'fa-search',
|
|
8
|
+
color: 'primary',
|
|
9
|
+
size: 'md',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
icon: { control: 'text', description: 'Font Awesome icon class' },
|
|
13
|
+
color: {
|
|
14
|
+
control: { type: 'select', options: ['primary', 'secondary', 'accent'] },
|
|
15
|
+
description: 'Icon color',
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
control: { type: 'select', options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] },
|
|
19
|
+
description: 'Icon size',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const Template = (args) => ({
|
|
25
|
+
components: { Icon },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: '<Icon v-bind="args" />',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const Default = Template.bind({});
|
|
33
|
+
Default.args = {
|
|
34
|
+
icon: 'fa-search',
|
|
35
|
+
color: 'primary',
|
|
36
|
+
size: 'md',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const LargeAccent = Template.bind({});
|
|
40
|
+
LargeAccent.args = {
|
|
41
|
+
icon: 'fa-search',
|
|
42
|
+
color: 'accent',
|
|
43
|
+
size: '3xl',
|
|
44
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<i :class="[ 'fas', icon, colorClasses, sizeClasses ]" @click="$emit('click')" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: 'Icon',
|
|
8
|
+
props: {
|
|
9
|
+
icon: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
color: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'primary',
|
|
16
|
+
validator: (value) => ['primary', 'secondary', 'accent'].includes(value),
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'md',
|
|
21
|
+
validator: (value) => ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'].includes(value),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
colorClasses() {
|
|
26
|
+
const colorMap = {
|
|
27
|
+
primary: 'text-primary',
|
|
28
|
+
secondary: 'text-secondary',
|
|
29
|
+
accent: 'text-accent',
|
|
30
|
+
};
|
|
31
|
+
return colorMap[this.color] || 'text-primary';
|
|
32
|
+
},
|
|
33
|
+
sizeClasses() {
|
|
34
|
+
const sizeMap = {
|
|
35
|
+
xs: 'text-xs',
|
|
36
|
+
sm: 'text-sm',
|
|
37
|
+
md: 'text-base',
|
|
38
|
+
lg: 'text-lg',
|
|
39
|
+
xl: 'text-xl',
|
|
40
|
+
'2xl': 'text-2xl',
|
|
41
|
+
'3xl': 'text-3xl',
|
|
42
|
+
};
|
|
43
|
+
return sizeMap[this.size] || 'text-base';
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import InputField from './InputField.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/InputField',
|
|
5
|
+
component: InputField,
|
|
6
|
+
args: {
|
|
7
|
+
type: 'text',
|
|
8
|
+
placeholder: 'Search',
|
|
9
|
+
modelValue: '',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
type: { control: 'text' },
|
|
13
|
+
placeholder: { control: 'text' },
|
|
14
|
+
modelValue: { control: 'text' },
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Template = (args) => ({
|
|
19
|
+
components: { InputField },
|
|
20
|
+
setup() {
|
|
21
|
+
return { args };
|
|
22
|
+
},
|
|
23
|
+
template: '<InputField v-bind="args" />',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<input
|
|
3
|
+
:type="type"
|
|
4
|
+
:placeholder="placeholder"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
class="bg-black text-secondary border-b-2 border-secondary focus:outline-none focus:border-accent w-full placeholder-secondary px-2 hover:border-accent duration-300 ease-in-out"
|
|
7
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'InputField',
|
|
14
|
+
props: {
|
|
15
|
+
type: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'text',
|
|
18
|
+
},
|
|
19
|
+
placeholder: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'Search',
|
|
22
|
+
},
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative flex items-center w-full max-w-md">
|
|
3
|
+
<InputField v-model="searchQuery" placeholder="Search" />
|
|
4
|
+
<Icon icon="fa-search" color="secondary" size="sm" class="absolute right-2" @click="onSearch" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import InputField from '../../Atoms/InputField/InputField.vue';
|
|
10
|
+
import Icon from '../../Atoms/Icon/Icon.vue';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'SearchBox',
|
|
14
|
+
components: {
|
|
15
|
+
InputField,
|
|
16
|
+
Icon,
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
searchQuery: '',
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
onSearch() {
|
|
25
|
+
console.log('Search Query:', this.searchQuery);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import SearchBox from './SearchBox.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/SearchBox',
|
|
5
|
+
component: SearchBox,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
searchQuery: { control: 'text', description: 'Search input value' },
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Template = (args) => ({
|
|
13
|
+
components: { SearchBox },
|
|
14
|
+
setup() {
|
|
15
|
+
return { args };
|
|
16
|
+
},
|
|
17
|
+
template: '<SearchBox v-bind="args" />',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Ensure that the Default export is initialized AFTER the Template function is declared
|
|
21
|
+
export const Default = Template.bind({});
|
|
22
|
+
Default.args = {
|
|
23
|
+
searchQuery: '',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Another example story
|
|
27
|
+
export const FilledSearch = Template.bind({});
|
|
28
|
+
FilledSearch.args = {
|
|
29
|
+
searchQuery: 'Search Term',
|
|
30
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Header from './Header.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => ({
|
|
9
|
+
components: { Header },
|
|
10
|
+
setup() {
|
|
11
|
+
return { args };
|
|
12
|
+
},
|
|
13
|
+
template: '<Header v-bind="args" />',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const Default = Template.bind({});
|
|
17
|
+
Default.args = {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="border-b border-lineGrey w-full bg-primary m-0">
|
|
3
|
+
<section class="w-full hidden md:flex ">
|
|
4
|
+
<div class="flex items-center justify-center w-36 h-36">
|
|
5
|
+
<img :src="logo" alt="Logo" class="h-14 w-18 bg-accent" />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<section class="flex w-full items-center border-r border-l border-lineGrey">
|
|
9
|
+
<div class="hidden lg:flex w-1/3 pl-20">
|
|
10
|
+
<SearchBox class="w-24 md:w-32 lg:w-52 xl:w-64 bg-primary" />
|
|
11
|
+
</div>
|
|
12
|
+
<nav class="ml-8 w-2/3 flex justify-around">
|
|
13
|
+
<BaseText color="secondary" size="md" tag="p" weight="normal" class="border-b-2 border-primary hover:border-accent pb-2 duration-300 ease-in-out">Tournaments</BaseText>
|
|
14
|
+
<BaseText color="secondary" size="md" tag="p" weight="normal" class="border-b-2 border-primary hover:border-accent pb-2 duration-300 ease-in-out">Clubs</BaseText>
|
|
15
|
+
<BaseText color="secondary" size="md" tag="p" weight="normal" class="border-b-2 border-primary hover:border-accent pb-2 duration-300 ease-in-out">Leaderboard</BaseText>
|
|
16
|
+
<BaseText color="secondary" size="md" tag="p" weight="normal" class="border-b-2 border-primary hover:border-accent pb-2 duration-300 ease-in-out">Contact</BaseText>
|
|
17
|
+
</nav>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<div class="flex items-center justify-center w-36 h-36">
|
|
21
|
+
<BaseButton
|
|
22
|
+
backgroundColor="primary"
|
|
23
|
+
border="secondary"
|
|
24
|
+
color="secondary"
|
|
25
|
+
label="Login"
|
|
26
|
+
size="xs"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</section>
|
|
30
|
+
|
|
31
|
+
<!-- mobile header -->
|
|
32
|
+
<section class="w-full flex md:hidden">
|
|
33
|
+
<div class="m-4 flex justify-between">
|
|
34
|
+
<img :src="logo" alt="Logo" class="h-10 w-14" />
|
|
35
|
+
<Icon icon="fa-bars" color="secondary" size="xl" class="absolute right-2" @click="onSearch" />
|
|
36
|
+
</div>
|
|
37
|
+
</section>
|
|
38
|
+
</header>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import logo from '../../../assets/images/m2.png';
|
|
43
|
+
|
|
44
|
+
import SearchBox from '../../Molecules/SearchBox/SearchBox.vue';
|
|
45
|
+
import BaseText from '../../Atoms/BaseText/BaseText.vue';
|
|
46
|
+
import Icon from '../../Atoms/Icon/Icon.vue';
|
|
47
|
+
import BaseButton from '../../Atoms/BaseButton/BaseButton.vue';
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
name: 'Header',
|
|
51
|
+
components: {
|
|
52
|
+
SearchBox,
|
|
53
|
+
BaseText,
|
|
54
|
+
BaseButton,
|
|
55
|
+
Icon
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
logo: logo,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import HeroBanner from './HeroBanner.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/HeroBanners/HomePage/HeroBanner',
|
|
5
|
+
component: HeroBanner,
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageSrc: { control: 'text', description: 'The image displayed in the hero banner' },
|
|
8
|
+
title: { control: 'text', description: 'Main title text' },
|
|
9
|
+
description: { control: 'text', description: 'Subtitle or description text' },
|
|
10
|
+
buttonLabel: { control: 'text', description: 'Label for the button' },
|
|
11
|
+
'button-click': { action: 'button-click' },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = (args) => ({
|
|
16
|
+
components: { HeroBanner },
|
|
17
|
+
setup() {
|
|
18
|
+
return { args };
|
|
19
|
+
},
|
|
20
|
+
template: '<HeroBanner v-bind="args" @button-click="args[\'button-click\']" />',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const DefaultHeroBanner = Template.bind({});
|
|
24
|
+
DefaultHeroBanner.args = {
|
|
25
|
+
imageSrc: 'https://via.placeholder.com/1920x1080',
|
|
26
|
+
title: 'Welcome to Our Website',
|
|
27
|
+
description: 'Explore our features and discover more.',
|
|
28
|
+
buttonLabel: 'Get Started',
|
|
29
|
+
};
|