@magicgol/polyjuice 0.18.2 → 0.19.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.18.2",
3
+ "version": "0.19.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -6,6 +6,7 @@ require('./hand-down')
6
6
  require('./hand-up')
7
7
  require('./magic-coin')
8
8
  require('./message')
9
+ require('./plus')
9
10
  require('./soccer-ball')
10
11
  require('./star-c')
11
12
  require('./star-stroke-p')
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+ var icon = require('vue-svgicon')
3
+ icon.register({
4
+ 'plus': {
5
+ width: 16,
6
+ height: 16,
7
+ viewBox: '0 0 16 16',
8
+ data: '<path pid="0" d="M15 7H9V1a1 1 0 00-2 0v6H1a1 1 0 000 2h6v6a1 1 0 102 0V9h6a1 1 0 100-2z" _fill="#D81159"/>'
9
+ }
10
+ })
@@ -54,18 +54,13 @@ export default {
54
54
  @import '../../../assets/palette';
55
55
 
56
56
  .mg-v-card {
57
+ background: white;
57
58
  box-shadow: 0 8px 22px 0 rgba(0, 0, 0, 0.3);
58
59
 
59
- &-content {
60
- background: white;
61
- }
62
-
63
60
  &--theme {
64
61
  &-club {
65
- & .mg-v-card-body {
66
- background: linear-gradient(90deg, #D1EFFF 0%, #DDDAFC 99.65%) !important;
67
- color: #777;
68
- }
62
+ background: linear-gradient(90deg, #D1EFFF 0%, #DDDAFC 99.65%) !important;
63
+ color: #777;
69
64
  }
70
65
  }
71
66
 
@@ -3,7 +3,12 @@
3
3
  class="d-flex align-items-center rounded px-3"
4
4
  v-bind:class="classes"
5
5
  >
6
- <div class="flex-fill"><slot></slot></div>
6
+ <div class="flex-fill">
7
+ <div class="d-flex align-items-center">
8
+ <div class="flex-fill"><slot></slot></div>
9
+ <div><svgicon name="plus"></svgicon></div>
10
+ </div>
11
+ </div>
7
12
  </div>
8
13
  </template>
9
14
 
@@ -51,6 +56,11 @@ export default {
51
56
  font-weight: 500;
52
57
  height: 3.5rem;
53
58
 
59
+ svg {
60
+ fill: map-get($palette, 'brand');
61
+ width: 1rem;
62
+ }
63
+
54
64
  &--ownership {
55
65
  &-owned {
56
66
  border-color: rgba(map-get($palette, 'owned'), 0.5);
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div
3
3
  class="d-inline-flex rounded-circle align-items-center justify-content-center"
4
- v-bind:class="classes"
4
+ :class="classes"
5
+ @click="onClick"
5
6
  >
6
7
  <svgicon
7
8
  :name="icon"
@@ -51,6 +52,12 @@ export default {
51
52
  };
52
53
  },
53
54
  },
55
+
56
+ methods: {
57
+ onClick () {
58
+ this.$emit('click');
59
+ }
60
+ }
54
61
  };
55
62
  </script>
56
63
 
@@ -0,0 +1,42 @@
1
+ import MgLink from './Link.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Typography/Link',
6
+ component: MgLink,
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, { argTypes }) => ({
26
+ props: Object.keys(argTypes),
27
+ components: { MgLink },
28
+ template: `<mg-link @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-link>`,
29
+ });
30
+
31
+ export const Default = Template.bind({});
32
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
33
+ Default.args = {
34
+ default: 'testo libero'
35
+ };
36
+
37
+ export const Disabled = Template.bind({});
38
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
39
+ Disabled.args = {
40
+ default: 'testo libero',
41
+ disabled: true
42
+ };
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <span
3
+ :class="classes"
4
+ @click="onClick"
5
+ ><slot></slot></span>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ name: 'mg-link',
11
+
12
+ props: {
13
+ disabled: {
14
+ type: Boolean,
15
+ default: false,
16
+ },
17
+ },
18
+
19
+ computed: {
20
+ classes() {
21
+ return {
22
+ 'mg-link': true,
23
+ 'mg-link--disabled': this.disabled === true,
24
+ };
25
+ }
26
+ },
27
+
28
+ methods: {
29
+ onClick () {
30
+ if (!this.disabled) {
31
+ this.$emit('click');
32
+ }
33
+ }
34
+ }
35
+ };
36
+ </script>
37
+
38
+ <style lang="scss">
39
+ @import '../../../assets/palette';
40
+
41
+ .mg-link {
42
+ color: map-get($palette, 'brand');
43
+ cursor: pointer;
44
+ font-weight: 400;
45
+
46
+ &--disabled {
47
+ opacity: 0.6 !important;
48
+ cursor: not-allowed !important;
49
+ }
50
+ }
51
+ </style>
@@ -1,6 +1,6 @@
1
1
  import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
2
2
 
3
- <Meta title="Colors/Brand" />
3
+ <Meta title="Colors/Typography" />
4
4
 
5
5
  <ColorPalette>
6
6
  <ColorItem
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15 7H9V1C9 0.734784 8.89464 0.48043 8.70711 0.292893C8.51957 0.105357 8.26522 0 8 0C7.73478 0 7.48043 0.105357 7.29289 0.292893C7.10536 0.48043 7 0.734784 7 1V7H1C0.734784 7 0.48043 7.10536 0.292893 7.29289C0.105357 7.48043 0 7.73478 0 8C0 8.26522 0.105357 8.51957 0.292893 8.70711C0.48043 8.89464 0.734784 9 1 9H7V15C7 15.2652 7.10536 15.5196 7.29289 15.7071C7.48043 15.8946 7.73478 16 8 16C8.26522 16 8.51957 15.8946 8.70711 15.7071C8.89464 15.5196 9 15.2652 9 15V9H15C15.2652 9 15.5196 8.89464 15.7071 8.70711C15.8946 8.51957 16 8.26522 16 8C16 7.73478 15.8946 7.48043 15.7071 7.29289C15.5196 7.10536 15.2652 7 15 7Z" fill="#D81159"/>
3
+ </svg>