@magicgol/polyjuice 0.10.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/.storybook/preview-head.html +1 -1
  2. package/package.json +1 -1
  3. package/src/assets/palette.scss +4 -0
  4. package/src/components/card/horizontal-card/HCard.vue +0 -6
  5. package/src/components/card/vertical-card/VCard.stories.js +24 -2
  6. package/src/components/card/vertical-card/VCard.vue +13 -2
  7. package/src/components/club/button/primary-club-button/PrimaryClubButton.vue +1 -1
  8. package/src/components/club/button/secondary-club-button/SecondaryClubButton.vue +1 -1
  9. package/src/components/club/plate/ClubPlate.stories.js +20 -0
  10. package/src/components/club/plate/ClubPlate.vue +55 -0
  11. package/src/components/footballer/role-badge/RoleBadge.stories.js +56 -0
  12. package/src/components/footballer/role-badge/RoleBadge.vue +84 -0
  13. package/src/components/form/button/toggle-button/ToggleButton.vue +4 -10
  14. package/src/components/form/checkbox/checkbox/Checkbox.vue +0 -6
  15. package/src/components/form/checkbox/switch/Switch.vue +1 -19
  16. package/src/components/form/input/input/Input.stories.js +37 -0
  17. package/src/components/form/input/input/Input.vue +150 -0
  18. package/src/components/image/profile-image/ProfileImage.stories.js +14 -2
  19. package/src/components/image/profile-image/ProfileImage.vue +28 -8
  20. package/src/components/typography/h1/HeadingOne.stories.js +1 -1
  21. package/src/components/typography/h4/HeadingFour.stories.js +34 -0
  22. package/src/components/typography/h4/HeadingFour.vue +25 -0
  23. package/src/components/typography/h6/HeadingSix.stories.js +34 -0
  24. package/src/components/typography/h6/HeadingSix.vue +26 -0
  25. package/src/components/typography/paragraph/Paragraph.stories.js +34 -0
  26. package/src/components/typography/paragraph/Paragraph.vue +25 -0
  27. package/src/documentation/Community.stories.mdx +1 -1
  28. package/src/main.js +0 -24
@@ -1,4 +1,4 @@
1
1
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
2
2
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
3
3
 
4
- <link href="https://fonts.googleapis.com/css?family=Ubuntu:500,600" rel="stylesheet" />
4
+ <link href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,600,700" rel="stylesheet" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.10.1",
3
+ "version": "0.13.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,15 +1,19 @@
1
1
  $palette: (
2
+ // BRAND
2
3
  'brand': #d81159,
3
4
  'freemium' :#004781,
4
5
  'coin': #ffcf73,
5
6
  'expertClub': #075169,
7
+ // ALERT
6
8
  'warning': #ff614c,
7
9
  'success': #349B50,
8
10
  'info': #004781,
11
+ // FOOTBALLERS
9
12
  'goalkeeper': #ffc700,
10
13
  'defender': #3de000,
11
14
  'midfielder': #116dd8,
12
15
  'forward': #f30026,
16
+ // LIVE
13
17
  'online': #00b669,
14
18
  'offline': #ea7203,
15
19
  );
@@ -30,12 +30,6 @@ export default {
30
30
  };
31
31
  }
32
32
  },
33
-
34
- methods: {
35
- onClick() {
36
- this.$emit('click');
37
- },
38
- },
39
33
  };
40
34
  </script>
41
35
 
@@ -17,6 +17,18 @@ export default {
17
17
  summary: 'html',
18
18
  },
19
19
  }
20
+ },
21
+ footer: {
22
+ description: "The footer content goes here",
23
+ control: {
24
+ type: 'text',
25
+ },
26
+ table: {
27
+ category: 'Slots',
28
+ type: {
29
+ summary: 'html',
30
+ },
31
+ }
20
32
  }
21
33
  },
22
34
  };
@@ -25,11 +37,21 @@ export default {
25
37
  const Template = (args, { argTypes }) => ({
26
38
  props: Object.keys(argTypes),
27
39
  components: { MgVCard },
28
- template: `<mg-v-card @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-v-card>`,
40
+ template: `<mg-v-card @click="$emit('click')" v-bind="$props">
41
+ <template v-if="${'default' in args}" v-slot>${args.default}</template>
42
+ <template v-if="${'footer' in args}" v-slot:footer>${args.footer}</template>
43
+ </mg-v-card>`,
29
44
  });
30
45
 
31
46
  export const Default = Template.bind({});
32
47
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
33
48
  Default.args = {
34
- default: '<p>This is a vertical card.</p><div>What do you think about?</div>'
49
+ default: '<div>This is a vertical card.</div><div>What do you think about?</div>'
50
+ };
51
+
52
+ export const Footer = Template.bind({});
53
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
54
+ Footer.args = {
55
+ default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
56
+ footer: '<div>The footer content goes here</div>'
35
57
  };
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <div
3
- class="p-3 bg-white rounded"
3
+ class="rounded overflow-hidden"
4
4
  :class="classes"
5
5
  @click="onClick"
6
6
  >
7
- <slot></slot>
7
+ <div class="p-3 bg-white"><slot></slot></div>
8
+ <div
9
+ class="mg-footer p-3"
10
+ v-if="footerVisibility"
11
+ ><slot name="footer"></slot></div>
8
12
  </div>
9
13
  </template>
10
14
 
@@ -17,6 +21,9 @@ export default {
17
21
  return {
18
22
  'mg-v-card': true,
19
23
  };
24
+ },
25
+ footerVisibility() {
26
+ return 'footer' in this.$slots;
20
27
  }
21
28
  },
22
29
 
@@ -33,5 +40,9 @@ export default {
33
40
 
34
41
  .mg-v-card {
35
42
  box-shadow: 0 8px 22px 0 rgba(0, 0, 0, 0.3);
43
+
44
+ .mg-footer {
45
+ background-color: rgba(map-get($palette, 'brand'), 0.04);
46
+ }
36
47
  }
37
48
  </style>
@@ -4,7 +4,7 @@
4
4
  class="w-100 rounded justify-content-center align-items-center p-2 border-0 text-white text-uppercase d-flex"
5
5
  :class="classes"
6
6
  :disabled="disabled"
7
- @click="$emit('click')"
7
+ @click="onClick"
8
8
  >
9
9
  <svgicon name="star-c"></svgicon>
10
10
  <div class="ml-2">
@@ -4,7 +4,7 @@
4
4
  type="button"
5
5
  :class="classes"
6
6
  :disabled="disabled"
7
- @click="$emit('click')"
7
+ @click="onClick"
8
8
  >
9
9
  <div class="d-flex justify-content-center align-items-center">
10
10
  <svgicon name="star-stroke-p"></svgicon>
@@ -0,0 +1,20 @@
1
+ import MgClubPlate from './ClubPlate.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Club/Plate',
6
+ component: MgClubPlate,
7
+ };
8
+
9
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
10
+ const Template = (args, { argTypes }) => ({
11
+ props: Object.keys(argTypes),
12
+ components: { MgClubPlate },
13
+ template: `<mg-club-plate v-bind="$props"></mg-club-plate>`,
14
+ });
15
+
16
+ export const Default = Template.bind({});
17
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
18
+ Default.args = {
19
+ achievement: '2.2k'
20
+ };
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div
3
+ class="d-inline-flex flex-column text-center"
4
+ :class="classes"
5
+ @click="$emit('click')"
6
+ >
7
+ <svgicon
8
+ name="star-c"
9
+ ></svgicon>
10
+ <div class="mt-1">{{ achievement }}</div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'mg-club-plate',
17
+
18
+ props: {
19
+ achievement: {
20
+ type: String,
21
+ default: null,
22
+ },
23
+ },
24
+
25
+ computed: {
26
+ classes() {
27
+ return {
28
+ 'mg-club-plate': true,
29
+ };
30
+ }
31
+ },
32
+
33
+ methods: {
34
+ onClick() {
35
+ this.$emit('click');
36
+ },
37
+ },
38
+ };
39
+ </script>
40
+
41
+ <style lang="scss">
42
+ @import '../../../assets/palette';
43
+
44
+ .mg-club-plate {
45
+ color: map-get($palette, 'expertClub');
46
+ font-family: 'Ubuntu', sans-serif;
47
+ font-size: 0.75rem;
48
+ font-weight: 700;
49
+
50
+ svg {
51
+ fill: map-get($palette, 'expertClub');
52
+ height: 1.5rem;
53
+ }
54
+ }
55
+ </style>
@@ -0,0 +1,56 @@
1
+ import MgRoleBadge from './RoleBadge.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Footballer/Role Badge',
6
+ component: MgRoleBadge,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ role: {
10
+ control: { type: 'select' },
11
+ options: ['P', 'D', 'C', 'A'],
12
+ defaultValue: 'A'
13
+ },
14
+ size: {
15
+ control: { type: 'select' },
16
+ options: ['large', 'normal'],
17
+ defaultValue: 'normal'
18
+ },
19
+ },
20
+ };
21
+
22
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
23
+ const Template = (args, { argTypes }) => ({
24
+ props: Object.keys(argTypes),
25
+ components: { MgRoleBadge },
26
+ template: `<mg-role-badge v-bind="$props"></mg-role-badge>`,
27
+ });
28
+
29
+ export const Default = Template.bind({});
30
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
31
+ Default.args = {
32
+ };
33
+
34
+ export const Goalkeeper = Template.bind({});
35
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
36
+ Goalkeeper.args = {
37
+ role: 'P',
38
+ };
39
+
40
+ export const Defender = Template.bind({});
41
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
42
+ Defender.args = {
43
+ role: 'D',
44
+ };
45
+
46
+ export const Midfielder = Template.bind({});
47
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
48
+ Midfielder.args = {
49
+ role: 'C',
50
+ };
51
+
52
+ export const Forward = Template.bind({});
53
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
54
+ Forward.args = {
55
+ role: 'A',
56
+ };
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div
3
+ class="d-inline-flex text-center text-white rounded-circle justify-content-center align-items-center"
4
+ :class="classes"
5
+ >
6
+ {{ role }}
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'mg-role-badge',
13
+
14
+ props: {
15
+ role: {
16
+ type: String,
17
+ default: 'A',
18
+ validator: function (value) {
19
+ return ['P', 'D', 'C', 'A'].indexOf(value) !== -1;
20
+ },
21
+ },
22
+ size: {
23
+ type: String,
24
+ default: 'normal',
25
+ validator: function (value) {
26
+ return ['normal', 'large'].indexOf(value) !== -1;
27
+ },
28
+ }
29
+ },
30
+
31
+ computed: {
32
+ classes() {
33
+ return {
34
+ 'mg-role-badge': true,
35
+ 'mg-role-badge--goalkeeper': this.role === 'P',
36
+ 'mg-role-badge--defender': this.role === 'D',
37
+ 'mg-role-badge--midfielder': this.role === 'C',
38
+ 'mg-role-badge--forward': this.role === 'A',
39
+ 'mg-role-badge--normal': this.size === 'normal',
40
+ 'mg-role-badge--large': this.size === 'large',
41
+ };
42
+ }
43
+ },
44
+ };
45
+ </script>
46
+
47
+ <style lang="scss">
48
+ @import '../../../assets/palette';
49
+
50
+ .mg-role-badge {
51
+ font-family: 'Ubuntu', sans-serif;
52
+ font-weight: 600;
53
+
54
+ &--normal {
55
+ font-size: 0.75rem;
56
+ height: 1.125rem;
57
+ width: 1.125rem;
58
+ min-width: 1.125rem;
59
+ }
60
+
61
+ &--large {
62
+ font-size: 0.875rem;
63
+ height: 1.5rem;
64
+ width: 1.5rem;
65
+ min-width: 1.5rem;
66
+ }
67
+
68
+ &--goalkeeper {
69
+ background-color: map-get($palette, 'goalkeeper');
70
+ }
71
+
72
+ &--defender {
73
+ background-color: map-get($palette, 'defender');
74
+ }
75
+
76
+ &--midfielder {
77
+ background-color: map-get($palette, 'midfielder');
78
+ }
79
+
80
+ &--forward {
81
+ background-color: map-get($palette, 'forward');
82
+ }
83
+ }
84
+ </style>
@@ -16,7 +16,7 @@
16
16
  <span><slot></slot></span>
17
17
  </label>
18
18
  <div
19
- v-if="contentSlotVisibility"
19
+ v-if="contentVisibility"
20
20
  class="p-2"
21
21
  ><slot name="content"></slot></div>
22
22
  </div>
@@ -40,19 +40,13 @@ export default {
40
40
  classes() {
41
41
  return {
42
42
  'mg-toggle-button': true,
43
- 'mg-toggle-button--on': this.value === true
43
+ 'mg-toggle-button--on': this.value === true,
44
44
  };
45
45
  },
46
- contentSlotVisibility() {
47
- return this.$slots['content'] && this.value === true
46
+ contentVisibility() {
47
+ return 'content' in this.$slots && this.value === true;
48
48
  }
49
49
  },
50
-
51
- methods: {
52
- onClick() {
53
- this.$emit('click');
54
- },
55
- },
56
50
  };
57
51
  </script>
58
52
 
@@ -50,12 +50,6 @@ export default {
50
50
  };
51
51
  }
52
52
  },
53
-
54
- methods: {
55
- onClick() {
56
- this.$emit('click');
57
- },
58
- },
59
53
  };
60
54
  </script>
61
55
 
@@ -11,9 +11,7 @@
11
11
  >
12
12
  <span class="mg-switch-slider"></span>
13
13
  <span class="mg-switch-icon">
14
- <svgicon
15
- name="check-with-circle"
16
- ></svgicon>
14
+ <svgicon name="check-with-circle"></svgicon>
17
15
  </span>
18
16
  </label>
19
17
  </template>
@@ -147,21 +145,5 @@ export default {
147
145
  opacity: 0.6 !important;
148
146
  cursor: not-allowed !important;
149
147
  }
150
- //
151
-
152
- //
153
- // &--blocked {
154
- // .mg-switch-slider {
155
- // background-color: map-get($palette, 'success');
156
- //
157
- // &:before {
158
- // content: none;
159
- // }
160
- // }
161
- //
162
- // .mg-switch-check {
163
- // display: block !important;
164
- // }
165
- // }
166
148
  }
167
149
  </style>
@@ -0,0 +1,37 @@
1
+ import MgInput from './Input.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Form/Input/Input',
6
+ component: MgInput,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ },
10
+ };
11
+
12
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
13
+ const Template = (args, { argTypes }) => ({
14
+ props: Object.keys(argTypes),
15
+ components: { MgInput },
16
+ template: `<mg-input @click="$emit('click')" v-bind="$props"></mg-input>`,
17
+ });
18
+
19
+ export const Default = Template.bind({});
20
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
21
+ Default.args = {
22
+ disabled: false,
23
+ value: 'given input'
24
+ };
25
+
26
+ export const Disabled = Template.bind({});
27
+ Disabled.args = {
28
+ disabled: true,
29
+ value: 'given input',
30
+ };
31
+
32
+ export const Error = Template.bind({});
33
+ Error.args = {
34
+ disabled: false,
35
+ value: 'given input',
36
+ error: true
37
+ };
@@ -0,0 +1,150 @@
1
+ <template>
2
+ <div
3
+ class="d-flex align-items-center"
4
+ :class="classes"
5
+ >
6
+ <input
7
+ ref="input"
8
+ class="border-0 w-100 bg-transparent"
9
+ :autocapitalize="autocapitalize"
10
+ :autocomplete="autocomplete"
11
+ :disabled="disabled"
12
+ :name="name"
13
+ :id="id"
14
+ :min="min"
15
+ :step="step"
16
+ :placeholder="placeholder"
17
+ :type="type"
18
+ :value="value"
19
+ @input="onInput"
20
+ @focus="onFocus"
21
+ @blur="onBlur"
22
+ />
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ export default {
28
+ name: 'mg-input',
29
+
30
+ data () {
31
+ return {
32
+ focus: false,
33
+ };
34
+ },
35
+
36
+ props: {
37
+ autocapitalize: {
38
+ type: String,
39
+ default: 'on'
40
+ },
41
+ autocomplete: {
42
+ type: String,
43
+ default: 'off'
44
+ },
45
+ disabled: {
46
+ type: Boolean,
47
+ default: false,
48
+ },
49
+ error: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ id: {
54
+ type: String,
55
+ default: null
56
+ },
57
+ name: {
58
+ type: String
59
+ },
60
+ placeholder: {
61
+ type: String
62
+ },
63
+ type: {
64
+ type: String,
65
+ default: 'text'
66
+ },
67
+ value: {
68
+ type: [String, Number],
69
+ default: null
70
+ },
71
+ min: {
72
+ default: null
73
+ },
74
+ step: {
75
+ default: null
76
+ },
77
+ },
78
+
79
+ computed: {
80
+ classes() {
81
+ return {
82
+ 'mg-input': true,
83
+ 'mg-input--disabled': this.disabled,
84
+ 'mg-input--errored': this.error === true,
85
+ 'mg-input--focused': this.focus === true,
86
+ };
87
+ }
88
+ },
89
+
90
+ methods: {
91
+ onInput($event) {
92
+ this.$emit('input', $event.target.value);
93
+ },
94
+ onFocus() {
95
+ this.focus = true;
96
+ this.$emit('focus');
97
+ },
98
+ onBlur() {
99
+ this.focus = false;
100
+ this.$emit('blur');
101
+ },
102
+ }
103
+ };
104
+ </script>
105
+
106
+ <style lang="scss">
107
+ @import '../../../../assets/palette';
108
+
109
+ .mg-input {
110
+ border-bottom: 1px solid #d8d8d8;
111
+
112
+ input {
113
+ color: #666666;
114
+ font-family: 'Raleway', sans-serif;
115
+ font-size: 1rem;
116
+ font-weight: 600;
117
+ letter-spacing: 0.54px;
118
+ padding: 0.5rem;
119
+
120
+ &:-webkit-autofill {
121
+ -webkit-box-shadow: 0 0 0 30px white inset;
122
+ -webkit-text-fill-color: #666666;
123
+ caret-color: #666666;
124
+ }
125
+
126
+ &:focus {
127
+ outline: 0;
128
+ }
129
+
130
+ &::placeholder {
131
+ color: #ccc;
132
+ font-size: 0.8125rem;
133
+ font-weight: 600;
134
+ }
135
+ }
136
+
137
+ &--disabled {
138
+ opacity: 0.6 !important;
139
+ cursor: not-allowed !important;
140
+ }
141
+
142
+ &--errored {
143
+ border-bottom-color: map-get($palette, 'warning') !important;
144
+ }
145
+
146
+ &--focused {
147
+ border-bottom-color: #414141;
148
+ }
149
+ }
150
+ </style>
@@ -8,9 +8,14 @@ export default {
8
8
  argTypes: {
9
9
  size: {
10
10
  control: { type: 'select' },
11
- options: ['large', 'normal'],
11
+ options: ['large', 'normal', 'small', 'x-small'],
12
12
  defaultValue: 'normal'
13
13
  },
14
+ liveBadge: {
15
+ control: { type: 'select' },
16
+ options: [true, false],
17
+ defaultValue: false
18
+ },
14
19
  online: {
15
20
  control: { type: 'select' },
16
21
  options: [true, false],
@@ -29,7 +34,14 @@ const Template = (args, { argTypes }) => ({
29
34
  export const Default = Template.bind({});
30
35
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
31
36
  Default.args = {
32
- // active: false,
37
+ name: 'Mg',
38
+ };
39
+
40
+ export const Image = Template.bind({});
41
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
42
+ Image.args = {
43
+ name: 'VdF',
44
+ imageUrl: 'https://magicgol.it/wp-content/uploads/2021/09/EspertoFantacalcio_DanteGregorio_MagicGol.jpg'
33
45
  };
34
46
 
35
47
  export const Large = Template.bind({});
@@ -20,13 +20,14 @@
20
20
  v-bind:style="{ backgroundImage: 'url(' + imageUrl + ')' }"
21
21
  ></div>
22
22
  <!-- end of PROFILE IMAGE LAYER -->
23
- <!-- ONLINE BADGE -->
23
+ <!-- LIVE BADGE -->
24
24
  <div
25
+ v-if="liveBadge"
25
26
  class="mg-live-badge position-absolute w-100"
26
27
  >
27
28
  <div class="w-100"></div>
28
29
  </div>
29
- <!-- end of ONLINE BADGE -->
30
+ <!-- end of LIVE BADGE -->
30
31
  </div>
31
32
  </template>
32
33
 
@@ -45,9 +46,13 @@ export default {
45
46
  type: String,
46
47
  default: 'normal',
47
48
  validator: function (value) {
48
- return ['large', 'normal'].indexOf(value) !== -1;
49
+ return ['large', 'normal', 'small', 'x-small'].indexOf(value) !== -1;
49
50
  },
50
51
  },
52
+ liveBadge: {
53
+ type: Boolean,
54
+ default: true
55
+ },
51
56
  online: {
52
57
  type: Boolean,
53
58
  default: false
@@ -58,15 +63,14 @@ export default {
58
63
  classes() {
59
64
  return {
60
65
  'mg-profile-image': true,
66
+ 'mg-profile-image--x-small': this.size === 'x-small',
67
+ 'mg-profile-image--small': this.size === 'small',
61
68
  'mg-profile-image--normal': this.size === 'normal',
62
69
  'mg-profile-image--large': this.size === 'large',
63
70
  'mg-profile-image--online': this.online === true,
64
71
  'mg-profile-image--offline': this.online === false,
65
72
  };
66
73
  },
67
- acronym() {
68
- return '';
69
- }
70
74
  },
71
75
  };
72
76
  </script>
@@ -79,14 +83,30 @@ export default {
79
83
  font-family: 'Ubuntu', sans-serif;
80
84
  font-weight: 600;
81
85
 
82
- &--normal {
86
+ &--x-small {
87
+ height: 2rem;
88
+ min-width: 2rem;
89
+ font-size: 0.6875rem;
90
+ width: 2rem;
91
+ }
92
+
93
+ &--small {
83
94
  height: 2.5rem;
84
- font-size: 1rem;
95
+ min-width: 2.5rem;
96
+ font-size: 0.8125rem;
85
97
  width: 2.5rem;
86
98
  }
87
99
 
100
+ &--normal {
101
+ height: 3rem;
102
+ min-width: 3rem;
103
+ font-size: 1.125rem;
104
+ width: 3rem;
105
+ }
106
+
88
107
  &--large {
89
108
  height: 5rem;
109
+ min-width: 5rem;
90
110
  font-size: 2rem;
91
111
  width: 5rem;
92
112
  }
@@ -2,7 +2,7 @@ import MgHeadingOne from './HeadingOne.vue';
2
2
 
3
3
  // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
4
  export default {
5
- title: 'Typography/H1/H1',
5
+ title: 'Typography/Heading/H1',
6
6
  component: MgHeadingOne,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -0,0 +1,34 @@
1
+ import MgHeadingFour from './HeadingFour.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Typography/Heading/H4',
6
+ component: MgHeadingFour,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ default: {
10
+ description: "The default Vue slot",
11
+ control: {
12
+ type: 'text',
13
+ },
14
+ table: {
15
+ category: 'Slots',
16
+ type: {
17
+ summary: 'html',
18
+ },
19
+ }
20
+ }
21
+ },
22
+ };
23
+
24
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
25
+ const Template = args => ({
26
+ components: { MgHeadingFour },
27
+ template: `<mg-heading-four><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-four>`,
28
+ });
29
+
30
+ export const Default = Template.bind({});
31
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
+ Default.args = {
33
+ default: 'heading four'
34
+ };
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div v-bind:class="classes"><slot></slot></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'mg-heading-four',
8
+
9
+ computed: {
10
+ classes() {
11
+ return {
12
+ 'mg-h4': true,
13
+ };
14
+ }
15
+ },
16
+ };
17
+ </script>
18
+
19
+ <style lang="scss">
20
+ .mg-h4 {
21
+ font-family: 'Ubuntu', sans-serif;
22
+ font-size: 0.875rem;
23
+ font-weight: 700;
24
+ }
25
+ </style>
@@ -0,0 +1,34 @@
1
+ import MgHeadingSix from './HeadingSix.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Typography/Heading/H6',
6
+ component: MgHeadingSix,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ default: {
10
+ description: "The default Vue slot",
11
+ control: {
12
+ type: 'text',
13
+ },
14
+ table: {
15
+ category: 'Slots',
16
+ type: {
17
+ summary: 'html',
18
+ },
19
+ }
20
+ }
21
+ },
22
+ };
23
+
24
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
25
+ const Template = args => ({
26
+ components: { MgHeadingSix },
27
+ template: `<mg-heading-six><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-six>`,
28
+ });
29
+
30
+ export const Default = Template.bind({});
31
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
+ Default.args = {
33
+ default: 'heading six'
34
+ };
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div v-bind:class="classes"><slot></slot></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'mg-heading-five',
8
+
9
+ computed: {
10
+ classes() {
11
+ return {
12
+ 'mg-h6': true,
13
+ };
14
+ }
15
+ },
16
+ };
17
+ </script>
18
+
19
+ <style lang="scss">
20
+ .mg-h6 {
21
+ color: #666666;
22
+ font-family: 'Ubuntu', sans-serif;
23
+ font-size: 0.75rem;
24
+ font-weight: 400;
25
+ }
26
+ </style>
@@ -0,0 +1,34 @@
1
+ import MgParagraph from './Paragraph.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Typography/Paragraph',
6
+ component: MgParagraph,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ default: {
10
+ description: "The default Vue slot",
11
+ control: {
12
+ type: 'text',
13
+ },
14
+ table: {
15
+ category: 'Slots',
16
+ type: {
17
+ summary: 'html',
18
+ },
19
+ }
20
+ }
21
+ },
22
+ };
23
+
24
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
25
+ const Template = args => ({
26
+ components: { MgParagraph },
27
+ template: `<mg-paragraph><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-paragraph>`,
28
+ });
29
+
30
+ export const Default = Template.bind({});
31
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
+ Default.args = {
33
+ default: 'testo libero'
34
+ };
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div v-bind:class="classes"><slot></slot></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'mg-paragraph',
8
+
9
+ computed: {
10
+ classes() {
11
+ return {
12
+ 'mg-paragraph': true,
13
+ };
14
+ }
15
+ },
16
+ };
17
+ </script>
18
+
19
+ <style lang="scss">
20
+ .mg-paragraph {
21
+ font-family: 'Ubuntu', sans-serif;
22
+ font-size: 0.75rem;
23
+ font-weight: 400;
24
+ }
25
+ </style>
@@ -1,6 +1,6 @@
1
1
  import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
2
2
 
3
- <Meta title="Colors/Alert" />
3
+ <Meta title="Colors/Community" />
4
4
 
5
5
  <ColorPalette>
6
6
  <ColorItem
package/src/main.js CHANGED
@@ -17,27 +17,3 @@ Vue.config.productionTip = false;
17
17
  new Vue({
18
18
  render: h => h(App),
19
19
  }).$mount('#app')
20
-
21
- export MgHCard from './components/card/horizontal-card/HCard';
22
- export MgVCard from './components/card/vertical-card/VCard';
23
-
24
- export MgPrimaryClubButton from './components/club/button/primary-club-button/PrimaryClubButton';
25
- export MgSecondaryClubButton from './components/club/button/secondary-club-button/SecondaryClubButton';
26
-
27
- export MgPrimaryButton from './components/form/button/primary-button/PrimaryButton';
28
- export MgSecondaryButton from './components/form/button/secondary-button/SecondaryButton';
29
- export MgTertiaryButton from './components/form/button/tertiary-button/TertiaryButton';
30
- export MgToggleButton from './components/form/button/toggle-button/ToggleButton';
31
- export MgCheckbox from './components/form/checkbox/checkbox/Checkbox';
32
- export MgSwitch from './components/form/checkbox/switch/Switch';
33
-
34
- export MgProfileImage from './components/image/profile-image/ProfileImage';
35
-
36
- export MgMagicCoinButton from './components/magic-coin/button/MagicCoinButton';
37
- export MgCredits from './components/magic-coin/credits/Credits';
38
-
39
- export MgSoccerBallLoader from './components/loader/soccer-ball/SoccerBall';
40
-
41
- export MgTabButton from './components/navigation/tab-button/TabButton';
42
-
43
- export MgHeadingOne from './components/typography/h1/HeadingOne';