@magicgol/polyjuice 0.40.0 → 0.40.2

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.40.0",
3
+ "version": "0.40.2",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -13,7 +13,7 @@ export default {
13
13
  },
14
14
  theme: {
15
15
  control: { type: 'select' },
16
- options: ['light', 'dark', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'],
16
+ options: ['light', 'dark', 'tag', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'],
17
17
  defaultValue: 'light'
18
18
  },
19
19
  default: {
@@ -2,6 +2,7 @@
2
2
  <div
3
3
  class="d-inline-flex align-items-center text-uppercase"
4
4
  :class="classes"
5
+ @click="$emit('click')"
5
6
  >
6
7
  <div class="px-2">
7
8
  <span><slot></slot></span>
@@ -25,7 +26,7 @@ export default {
25
26
  type: String,
26
27
  default: 'light',
27
28
  validator: function (value) {
28
- return ['light', 'dark', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'].indexOf(value) !== -1;
29
+ return ['light', 'dark', 'tag', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'].indexOf(value) !== -1;
29
30
  },
30
31
  },
31
32
  },
@@ -38,6 +39,7 @@ export default {
38
39
  'mg-label--size-normal': this.size === 'normal',
39
40
  'mg-label--theme-light': this.theme === 'light',
40
41
  'mg-label--theme-dark': this.theme === 'dark',
42
+ 'mg-label--theme-tag': this.theme === 'tag',
41
43
  'mg-label--theme-club': this.theme === 'club',
42
44
  'mg-label--theme-trial': this.theme === 'trial',
43
45
  'mg-label--theme-goalkeeper': this.theme === 'goalkeeper',
@@ -97,6 +99,14 @@ export default {
97
99
  color: #fff;
98
100
  }
99
101
 
102
+ &-tag {
103
+ background-color: lighten(map-get($palette, 'brand'), 50%);
104
+ > div {
105
+ background: lighten(map-get($palette, 'brand'), 50%);
106
+ }
107
+ color: map-get($palette, 'brand');
108
+ }
109
+
100
110
  &-club {
101
111
  background: map-get($palette, 'club');
102
112
  > div {
@@ -33,6 +33,18 @@ export default {
33
33
  ],
34
34
  defaultValue: null
35
35
  },
36
+ header: {
37
+ description: "The header content goes here",
38
+ control: {
39
+ type: 'text',
40
+ },
41
+ table: {
42
+ category: 'Slots',
43
+ type: {
44
+ summary: 'html',
45
+ },
46
+ }
47
+ },
36
48
  footer: {
37
49
  description: "The footer content goes here",
38
50
  control: {
@@ -53,6 +65,7 @@ const Template = (args, { argTypes }) => ({
53
65
  props: Object.keys(argTypes),
54
66
  components: { MgVCard },
55
67
  template: `<mg-v-card @click="$emit('click')" v-bind="$props">
68
+ <template v-if="${'header' in args}" v-slot:header>${args.header}</template>
56
69
  <template v-if="${'default' in args}" v-slot>${args.default}</template>
57
70
  <template v-if="${'footer' in args}" v-slot:footer>${args.footer}</template>
58
71
  </mg-v-card>`,
@@ -64,6 +77,13 @@ Default.args = {
64
77
  default: '<div>This is a vertical card.</div><div>What do you think about?</div>'
65
78
  };
66
79
 
80
+ export const Header = Template.bind({});
81
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
82
+ Header.args = {
83
+ default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
84
+ header: '<div>The header content goes here</div>'
85
+ };
86
+
67
87
  export const Footer = Template.bind({});
68
88
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
69
89
  Footer.args = {
@@ -4,12 +4,18 @@
4
4
  :class="classes"
5
5
  @click="onClick"
6
6
  >
7
+ <div
8
+ class="mg-v-card-header"
9
+ v-if="headerVisibility"
10
+ >
11
+ <slot name="header"></slot>
12
+ </div>
7
13
  <div class="mg-v-card-body p-3"><slot></slot></div>
8
14
  <div
9
15
  class="mg-v-card-footer px-3 pb-3"
10
16
  v-if="footerVisibility"
11
17
  >
12
- <div class="mg-v-card-content pt-3">
18
+ <div class="pt-3">
13
19
  <slot name="footer"></slot>
14
20
  </div>
15
21
  </div>
@@ -53,6 +59,9 @@ export default {
53
59
  'mg-v-card--theme-transparent': this.theme === 'transparent',
54
60
  };
55
61
  },
62
+ headerVisibility() {
63
+ return 'header' in this.$slots && !!this.$slots.header;
64
+ },
56
65
  footerVisibility() {
57
66
  return 'footer' in this.$slots && !!this.$slots.footer;
58
67
  }
@@ -75,8 +84,8 @@ export default {
75
84
 
76
85
  &--theme {
77
86
  &-club {
78
- background: map-get($palette, 'club');
79
- color: #fff;
87
+ background: linear-gradient(90deg, #d1efff 0%, #dddafc 99.65%);;
88
+ color: #777;
80
89
  }
81
90
 
82
91
  &-rating {
@@ -111,7 +120,7 @@ export default {
111
120
  }
112
121
 
113
122
  &-footer {
114
- .mg-v-card-content {
123
+ > div {
115
124
  border-top: 1px solid #cecece;
116
125
  }
117
126
  }