@magicgol/polyjuice 0.30.0 → 0.32.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.30.0",
3
+ "version": "0.32.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+ var icon = require('vue-svgicon')
3
+ icon.register({
4
+ 'circle-with-minus': {
5
+ width: 16,
6
+ height: 16,
7
+ viewBox: '0 0 18 18',
8
+ data: '<path pid="0" d="M9 0a9 9 0 100 18A9 9 0 009 0zm0 16.2A7.2 7.2 0 119 1.8a7.2 7.2 0 010 14.4zm3.6-8.1H5.4a.9.9 0 000 1.8h7.2a.9.9 0 000-1.8z" _fill="#D81159"/>'
9
+ }
10
+ })
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable */
2
2
  require('./arrow-down')
3
3
  require('./check-with-circle')
4
+ require('./circle-with-minus')
4
5
  require('./facebook')
5
6
  require('./funnel-full')
6
7
  require('./funnel')
@@ -1,5 +1,4 @@
1
1
  import MgHCard from './HCard.vue';
2
- import SvgIcon from "vue-svgicon";
3
2
 
4
3
  // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
5
4
  export default {
@@ -37,7 +36,7 @@ export default {
37
36
  // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
38
37
  const Template = (args, { argTypes }) => ({
39
38
  props: Object.keys(argTypes),
40
- components: { MgHCard, SvgIcon },
39
+ components: { MgHCard },
41
40
  template: `<mg-h-card @click="$emit('click')" v-bind="$props">
42
41
  <template v-if="${'default' in args}" v-slot>${args.default}</template>
43
42
  <template v-if="${'actions' in args}" v-slot:actions>${args.actions}</template>
@@ -47,12 +46,12 @@ const Template = (args, { argTypes }) => ({
47
46
  export const Default = Template.bind({});
48
47
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
49
48
  Default.args = {
50
- default: '<div>This is a vertical card.</div><div>What do you think about?</div>'
49
+ default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
51
50
  };
52
51
 
53
52
  export const Actions = Template.bind({});
54
53
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
55
54
  Actions.args = {
56
55
  default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
57
- actions: '<div>+</div>'
56
+ actions: '<div>+</div>',
58
57
  };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="d-flex justify-content-between align-items-center rounded px-3 bg-white"
3
+ class="d-flex text-truncate justify-content-between align-items-center rounded px-3"
4
4
  v-bind:class="classes"
5
5
  >
6
6
  <div
@@ -36,6 +36,7 @@ export default {
36
36
 
37
37
  <style lang="scss">
38
38
  .mg-h-card {
39
+ background: #fff;
39
40
  box-shadow: 0 8px 12px 0 rgba(0, 0, 0, 0.25);
40
41
  height: 3.75rem;
41
42
  }
@@ -25,7 +25,7 @@
25
25
  <div
26
26
  v-if="slotVisibility"
27
27
  class="mg-h-footballer-subtext text-uppercase"
28
- ><span v-if="!isLarge" class="mx-2">-</span><slot></slot></div>
28
+ ><span v-if="!isLarge" class="mx-1">-</span><slot></slot></div>
29
29
  </div>
30
30
  <!-- end of FOOTBALLER NAME -->
31
31
  <!-- ROLE BADGE -->
@@ -132,6 +132,7 @@ export default {
132
132
  }
133
133
 
134
134
  &-subtext {
135
+ color: #979797;
135
136
  font-size: 0.875rem;
136
137
  }
137
138
 
@@ -0,0 +1,75 @@
1
+ import MgHFootballerCard from './HFootballerCard.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Footballer/HFootballerCard',
6
+ component: MgHFootballerCard,
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
+ actions: {
22
+ description: "The actions Vue slot",
23
+ control: {
24
+ type: 'text',
25
+ },
26
+ table: {
27
+ category: 'Slots',
28
+ type: {
29
+ summary: 'html',
30
+ },
31
+ }
32
+ }
33
+ },
34
+ };
35
+
36
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
37
+ const Template = (args, { argTypes }) => ({
38
+ props: Object.keys(argTypes),
39
+ components: { MgHFootballerCard },
40
+ template: `<mg-h-footballer-card @click="$emit('click')" v-bind="$props">
41
+ <template v-if="${'default' in args}" v-slot>${args.default}</template>
42
+ <template v-if="${'actions' in args}" v-slot:actions>${args.actions}</template>
43
+ </mg-h-footballer-card>`,
44
+ });
45
+
46
+ export const Default = Template.bind({});
47
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
48
+ Default.args = {
49
+ firstname: 'P',
50
+ lastname: 'Dybala',
51
+ role: 'A',
52
+ default: '<span><b>MIL</b></span> - <span>JUV</span>',
53
+ pressed: false
54
+ };
55
+
56
+ export const Actions = Template.bind({});
57
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
58
+ Actions.args = {
59
+ firstname: 'P',
60
+ lastname: 'Dybala',
61
+ role: 'A',
62
+ default: '<span><b>MIL</b></span> - <span>JUV</span>',
63
+ actions: '<div>+</div>',
64
+ pressed: false
65
+ };
66
+
67
+ export const Pressed = Template.bind({});
68
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
69
+ Pressed.args = {
70
+ firstname: 'P',
71
+ lastname: 'Dybala',
72
+ role: 'A',
73
+ default: '<span><b>MIL</b></span> - <span>JUV</span>',
74
+ pressed: true
75
+ };
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <mg-h-card
3
+ :class="classes"
4
+ >
5
+ <template v-slot:default>
6
+ <mg-h-footballer
7
+ size="large"
8
+ :firstname="firstname"
9
+ :lastname="lastname"
10
+ :role="role"
11
+ ><slot></slot></mg-h-footballer>
12
+ </template>
13
+ <template v-slot:actions><slot name="actions"></slot></template>
14
+ </mg-h-card>
15
+ </template>
16
+
17
+ <script>
18
+ import MgHFootballer from "../horizontal-footballer/HFootballer";
19
+ import MgHCard from "../../card/horizontal-card/HCard";
20
+
21
+ export default {
22
+ name: 'mg-h-footballer-card',
23
+
24
+ props: {
25
+ firstname: {
26
+ type: String,
27
+ default: null
28
+ },
29
+ lastname: {
30
+ type: String,
31
+ default: null
32
+ },
33
+ role: {
34
+ type: String,
35
+ default: null,
36
+ validator: function (value) {
37
+ return ['P', 'D', 'C', 'A'].indexOf(value) !== -1;
38
+ },
39
+ },
40
+ pressed: {
41
+ props: {
42
+ type: Boolean,
43
+ default: false
44
+ }
45
+ }
46
+ },
47
+
48
+ computed: {
49
+ classes() {
50
+ return {
51
+ 'mg-h-footballer-card': true,
52
+ 'mg-h-footballer-card--pressed': this.pressed === true,
53
+ };
54
+ },
55
+ actionsSlotVisibility() {
56
+ return 'actions' in this.$slots && !!this.$slots.actions;
57
+ }
58
+ },
59
+
60
+ components: {
61
+ MgHFootballer,
62
+ MgHCard,
63
+ },
64
+ };
65
+ </script>
66
+
67
+ <style lang="scss">
68
+ .mg-h-footballer-card {
69
+ &--pressed {
70
+ background: #daf0d9 !important;
71
+ box-shadow: inset 0 4px 9px rgba(0, 0, 0, 0.1) !important;
72
+ }
73
+ }
74
+ </style>
@@ -65,7 +65,7 @@ export default {
65
65
  font-family: 'Ubuntu', sans-serif;
66
66
  font-size: 1rem;
67
67
  font-weight: 500;
68
- height: 3.5rem;
68
+ height: 3.75rem;
69
69
 
70
70
  svg {
71
71
  fill: map-get($palette, 'brand');
@@ -1,9 +1,9 @@
1
- import MgFilter from './Filter.vue';
1
+ import MgFilterButton from './FilterButton.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: 'Form/Advanced/Filter',
6
- component: MgFilter,
5
+ title: 'Form/Advanced/FilterButton',
6
+ component: MgFilterButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
9
9
  },
@@ -12,8 +12,8 @@ export default {
12
12
  // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
13
13
  const Template = (args, { argTypes }) => ({
14
14
  props: Object.keys(argTypes),
15
- components: { MgFilter },
16
- template: `<mg-filter @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-filter>`,
15
+ components: { MgFilterButton },
16
+ template: `<mg-filter-button @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-filter-button>`,
17
17
  });
18
18
 
19
19
  export const Default = Template.bind({});
@@ -21,16 +21,3 @@ export const Default = Template.bind({});
21
21
  Default.args = {
22
22
  default: 'test'
23
23
  };
24
- //
25
- // export const Disabled = Template.bind({});
26
- // Disabled.args = {
27
- // disabled: true,
28
- // value: 'given input',
29
- // };
30
- //
31
- // export const Error = Template.bind({});
32
- // Error.args = {
33
- // disabled: false,
34
- // value: 'given input',
35
- // error: true
36
- // };
@@ -20,7 +20,7 @@
20
20
  import MgTertiaryButton from "../../button/tertiary-button/TertiaryButton";
21
21
 
22
22
  export default {
23
- name: 'mg-filter',
23
+ name: 'mg-filter-button',
24
24
 
25
25
  props: {
26
26
  enabledFiltersCount: {
@@ -32,7 +32,7 @@ export default {
32
32
  computed: {
33
33
  classes() {
34
34
  return {
35
- 'mg-filter': true,
35
+ 'mg-filter-button': true,
36
36
  };
37
37
  },
38
38
 
@@ -56,7 +56,7 @@ export default {
56
56
  <style lang="scss">
57
57
  @import '../../../../assets/palette';
58
58
 
59
- .mg-filter {
59
+ .mg-filter-button {
60
60
  svg {
61
61
  fill: map-get($palette, 'brand');
62
62
  width: 1.25rem;
@@ -0,0 +1,22 @@
1
+ import MgRemoveButton from './RemoveButton.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Form/Advanced/RemoveButton',
6
+ component: MgRemoveButton,
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: { MgRemoveButton },
16
+ template: `<mg-remove-button @click="$emit('click')" v-bind="$props"></mg-remove-button>`,
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
+ };
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <mg-tertiary-button
3
+ @click="onClick"
4
+ :class="classes"
5
+ >
6
+ <svgicon name="circle-with-minus"></svgicon>
7
+ </mg-tertiary-button>
8
+ </template>
9
+
10
+ <script>
11
+ import MgTertiaryButton from "../../button/tertiary-button/TertiaryButton";
12
+
13
+ export default {
14
+ name: 'mg-remove-button',
15
+
16
+ computed: {
17
+ classes() {
18
+ return {
19
+ 'mg-remove-button': true,
20
+ };
21
+ }
22
+ },
23
+
24
+ components: {
25
+ MgTertiaryButton,
26
+ },
27
+
28
+ methods: {
29
+ onClick() {
30
+ this.$emit('click');
31
+ },
32
+ }
33
+ };
34
+ </script>
35
+
36
+ <style lang="scss">
37
+ @import '../../../../assets/palette';
38
+
39
+ .mg-remove-button {
40
+ svg {
41
+ fill: map-get($palette, 'brand');
42
+ width: 1.125rem;
43
+ }
44
+ }
45
+ </style>
@@ -28,10 +28,10 @@ const Template = (args, { argTypes }) => ({
28
28
  template: `
29
29
  <div class="row">
30
30
  <div class="col-6 p-0">
31
- <mg-list-head @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-list-head>
31
+ <mg-list-head>Another head</mg-list-head>
32
32
  </div>
33
33
  <div class="col-6 p-0">
34
- <mg-list-head>Another head</mg-list-head>
34
+ <mg-list-head @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-list-head>
35
35
  </div>
36
36
  </div>`,
37
37
  });
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div
3
- class="d-flex align-items-center text-uppercase pb-2 px-2"
4
- :class="classes"
3
+ class="text-uppercase pb-2 px-2"
4
+ :class="[classes, {'d-flex align-items-center': active, 'justify-content-center text-center': alignCenter}]"
5
5
  >
6
6
  <div><slot></slot></div>
7
7
  <svgicon
8
8
  v-if="active"
9
9
  name="arrow-down"
10
- class="ml-2"
10
+ class="ml-1"
11
11
  ></svgicon>
12
12
  </div>
13
13
  </template>
@@ -20,7 +20,11 @@ export default {
20
20
  active: {
21
21
  type: Boolean,
22
22
  default: false
23
- }
23
+ },
24
+ alignCenter: {
25
+ type: Boolean,
26
+ default: false
27
+ },
24
28
  },
25
29
 
26
30
  computed: {
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 0C7.21997 0 5.47991 0.527841 3.99987 1.51677C2.51983 2.50571 1.36628 3.91131 0.685088 5.55585C0.00389956 7.20038 -0.17433 9.00998 0.172937 10.7558C0.520203 12.5016 1.37737 14.1053 2.63604 15.364C3.89472 16.6226 5.49836 17.4798 7.24419 17.8271C8.99002 18.1743 10.7996 17.9961 12.4442 17.3149C14.0887 16.6337 15.4943 15.4802 16.4832 14.0001C17.4722 12.5201 18 10.78 18 9C18 7.8181 17.7672 6.64778 17.3149 5.55585C16.8626 4.46392 16.1997 3.47177 15.364 2.63604C14.5282 1.80031 13.5361 1.13738 12.4442 0.685084C11.3522 0.232792 10.1819 0 9 0ZM9 16.2C7.57598 16.2 6.18393 15.7777 4.9999 14.9866C3.81586 14.1954 2.89302 13.0709 2.34807 11.7553C1.80312 10.4397 1.66054 8.99201 1.93835 7.59535C2.21616 6.19868 2.9019 4.91577 3.90883 3.90883C4.91577 2.90189 6.19869 2.21616 7.59535 1.93835C8.99202 1.66053 10.4397 1.80312 11.7553 2.34807C13.071 2.89302 14.1954 3.81586 14.9866 4.99989C15.7777 6.18393 16.2 7.57597 16.2 9C16.2 10.9096 15.4414 12.7409 14.0912 14.0912C12.7409 15.4414 10.9096 16.2 9 16.2ZM12.6 8.1H5.4C5.16131 8.1 4.93239 8.19482 4.76361 8.3636C4.59482 8.53238 4.5 8.7613 4.5 9C4.5 9.23869 4.59482 9.46761 4.76361 9.63639C4.93239 9.80518 5.16131 9.9 5.4 9.9H12.6C12.8387 9.9 13.0676 9.80518 13.2364 9.63639C13.4052 9.46761 13.5 9.23869 13.5 9C13.5 8.7613 13.4052 8.53238 13.2364 8.3636C13.0676 8.19482 12.8387 8.1 12.6 8.1Z" fill="#D81159"/>
3
+ </svg>