@magicgol/polyjuice 0.15.0 → 0.16.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -5,6 +5,7 @@ $palette: (
5
5
  'coin': #ffcf73,
6
6
  'expertClub': #075169,
7
7
  // ALERT
8
+ 'error': #ed4949,
8
9
  'warning': #ff614c,
9
10
  'success': #349B50,
10
11
  'info': #004781,
@@ -8,45 +8,16 @@
8
8
  <slot name="tab-right"></slot>
9
9
  </div>
10
10
  </div>
11
- <div class="py-4 px-3">
12
- <slot></slot>
11
+ <div class="p-4">
12
+ <div class="px-2">
13
+ <slot></slot>
14
+ </div>
13
15
  </div>
14
16
  </div>
15
17
  </template>
16
18
 
17
19
  <script>
18
20
  export default {
19
- name: 'mg-filing-cabinet',
20
-
21
- props: {
22
- // icon: {
23
- // type: String
24
- // },
25
- // level: {
26
- // type: String,
27
- // default: 'normal',
28
- // validator: function (value) {
29
- // return ['normal', 'club'].indexOf(value) !== -1;
30
- // },
31
- // }
32
- },
33
-
34
- computed: {
35
- classes() {
36
- return {
37
- 'mg-filing-cabinet': true,
38
- // 'mg-icon-badge--club': this.level === 'club',
39
- // 'mg-icon-badge--normal': this.level === 'normal',
40
- };
41
- },
42
- },
21
+ name: 'mg-filing-cabinet'
43
22
  };
44
23
  </script>
45
-
46
- <style lang="scss">
47
- @import '../../../assets/palette';
48
-
49
- .mg-filing-cabinet {
50
-
51
- }
52
- </style>
@@ -18,6 +18,11 @@ export default {
18
18
  },
19
19
  }
20
20
  },
21
+ theme: {
22
+ control: { type: 'select' },
23
+ options: [null, 'club'],
24
+ defaultValue: null
25
+ },
21
26
  footer: {
22
27
  description: "The footer content goes here",
23
28
  control: {
@@ -4,9 +4,9 @@
4
4
  :class="classes"
5
5
  @click="onClick"
6
6
  >
7
- <div class="p-3 bg-white"><slot></slot></div>
7
+ <div class="mg-v-card-content p-3"><slot></slot></div>
8
8
  <div
9
- class="mg-footer p-3"
9
+ class="mg-v-card-footer p-3"
10
10
  v-if="footerVisibility"
11
11
  ><slot name="footer"></slot></div>
12
12
  </div>
@@ -16,10 +16,21 @@
16
16
  export default {
17
17
  name: 'mg-v-card',
18
18
 
19
+ props: {
20
+ theme: {
21
+ type: String,
22
+ default: null,
23
+ validator: function (value) {
24
+ return ['club'].indexOf(value) !== -1;
25
+ },
26
+ }
27
+ },
28
+
19
29
  computed: {
20
30
  classes() {
21
31
  return {
22
32
  'mg-v-card': true,
33
+ 'mg-v-card--theme-club': this.theme === 'club',
23
34
  };
24
35
  },
25
36
  footerVisibility() {
@@ -41,7 +52,20 @@ export default {
41
52
  .mg-v-card {
42
53
  box-shadow: 0 8px 22px 0 rgba(0, 0, 0, 0.3);
43
54
 
44
- .mg-footer {
55
+ &-content {
56
+ background: white;
57
+ }
58
+
59
+ &--theme {
60
+ &-club {
61
+ & .mg-v-card-content {
62
+ background: linear-gradient(90deg, #D1EFFF 0%, #DDDAFC 99.65%) !important;
63
+ color: #777;
64
+ }
65
+ }
66
+ }
67
+
68
+ &-footer {
45
69
  background-color: rgba(map-get($palette, 'brand'), 0.04);
46
70
  }
47
71
  }
@@ -71,10 +71,11 @@ export default {
71
71
  }
72
72
 
73
73
  &--huge {
74
+ border: 2px solid #fff;
74
75
  font-size: 1.25rem;
75
- height: 2.5rem;
76
- width: 2.5rem;
77
- min-width: 2.5rem;
76
+ height: 2.75rem;
77
+ width: 2.75rem;
78
+ min-width: 2.75rem;
78
79
  }
79
80
 
80
81
  &--goalkeeper {
@@ -0,0 +1,41 @@
1
+ import MgTrafficLight from './TrafficLight.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Label/Traffic Light',
6
+ component: MgTrafficLight,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ light: {
10
+ control: { type: 'select' },
11
+ options: ['red', 'yellow', 'green'],
12
+ defaultValue: 'green'
13
+ },
14
+ default: {
15
+ description: "The default Vue slot",
16
+ control: {
17
+ type: 'text',
18
+ },
19
+ table: {
20
+ category: 'Slots',
21
+ type: {
22
+ summary: 'html',
23
+ },
24
+ }
25
+ }
26
+ },
27
+ };
28
+
29
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
30
+ const Template = (args, { argTypes }) => ({
31
+ props: Object.keys(argTypes),
32
+ components: { MgTrafficLight },
33
+ template: `<mg-traffic-light v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-traffic-light>`,
34
+ });
35
+
36
+ export const Default = Template.bind({});
37
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
38
+ Default.args = {
39
+ light: 'green',
40
+ default: '300',
41
+ };
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div
3
+ class="d-inline-flex bg-white align-items-center px-3"
4
+ :class="classes"
5
+ >
6
+ <div><slot></slot></div>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'mg-traffic-light',
13
+
14
+ props: {
15
+ light: {
16
+ type: String,
17
+ default: 'green',
18
+ validator: function (value) {
19
+ return ['red', 'yellow', 'green'].indexOf(value) !== -1;
20
+ },
21
+ },
22
+ },
23
+
24
+ computed: {
25
+ classes() {
26
+ return {
27
+ 'mg-traffic-light': true,
28
+ 'mg-traffic-light--error': this.light === 'red',
29
+ 'mg-traffic-light--warning': this.light === 'yellow',
30
+ 'mg-traffic-light--success': this.light === 'green',
31
+ };
32
+ }
33
+ },
34
+ };
35
+ </script>
36
+
37
+ <style lang="scss">
38
+ @import '../../../assets/palette';
39
+
40
+ .mg-traffic-light {
41
+ border: 2px solid;
42
+ border-radius: 50px;
43
+ font-family: 'Ubuntu', sans-serif;
44
+ font-size: 1.3125rem;
45
+ font-weight: 500;
46
+ height: 2.25rem;
47
+
48
+ &--error {
49
+ border-color: map-get($palette, 'error');
50
+ }
51
+
52
+ &--warning {
53
+ border-color: map-get($palette, 'warning');
54
+ }
55
+
56
+ &--success {
57
+ border-color: map-get($palette, 'success');
58
+ }
59
+ }
60
+ </style>
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <a
2
+ <button
3
+ type="button"
3
4
  class="p-3 d-flex align-items-center w-100 text-white border-0"
4
5
  :class="classes"
5
- :href="href"
6
6
  :disabled="disabled"
7
7
  @click="$emit('click')"
8
8
  >
9
9
  <span class="flex-grow-0"><svgicon :name="channel"></svgicon></span>
10
10
  <span class="flex-grow-1 text-center"><slot></slot></span>
11
- </a>
11
+ </button>
12
12
  </template>
13
13
 
14
14
  <script>
@@ -26,9 +26,6 @@ export default {
26
26
  validator: function (value) {
27
27
  return ['facebook', 'google'].indexOf(value) !== -1;
28
28
  },
29
- },
30
- href: {
31
- type: String
32
29
  }
33
30
  },
34
31
 
@@ -61,6 +58,7 @@ export default {
61
58
  font-size: 0.8125rem;
62
59
  font-weight: 700;
63
60
  outline: none;
61
+ text-decoration: none;
64
62
 
65
63
  svg {
66
64
  fill: white;
@@ -30,5 +30,5 @@ const Template = args => ({
30
30
  export const Default = Template.bind({});
31
31
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
32
  Default.args = {
33
- default: 'heading one'
33
+ default: 'heading 1'
34
34
  };
@@ -0,0 +1,34 @@
1
+ import MgHeadingThree from './HeadingThree.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/H3',
6
+ component: MgHeadingThree,
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: { MgHeadingThree },
27
+ template: `<mg-heading-three><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-three>`,
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 3'
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-three',
8
+
9
+ computed: {
10
+ classes() {
11
+ return {
12
+ 'mg-h3': true,
13
+ };
14
+ }
15
+ },
16
+ };
17
+ </script>
18
+
19
+ <style lang="scss">
20
+ .mg-h3 {
21
+ font-family: 'Ubuntu', sans-serif;
22
+ font-size: 1rem;
23
+ font-weight: 500;
24
+ }
25
+ </style>
@@ -30,5 +30,5 @@ const Template = args => ({
30
30
  export const Default = Template.bind({});
31
31
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
32
  Default.args = {
33
- default: 'heading four'
33
+ default: 'heading 4'
34
34
  };
@@ -30,5 +30,5 @@ const Template = args => ({
30
30
  export const Default = Template.bind({});
31
31
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
32
  Default.args = {
33
- default: 'heading six'
33
+ default: 'heading 6'
34
34
  };