@magicgol/polyjuice 0.20.0 → 0.21.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.20.0",
3
+ "version": "0.21.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,6 +1,7 @@
1
1
  import MgSelectionBox from './SelectionBox.vue';
2
2
  import MgPrimaryButton from "../../form/button/primary-button/PrimaryButton";
3
3
  import MgMagicCoinButton from "../../magic-coin/button/MagicCoinButton";
4
+ import MgTertiaryButton from "../../form/button/tertiary-button/TertiaryButton";
4
5
 
5
6
  // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
6
7
  export default {
@@ -26,10 +27,12 @@ export default {
26
27
  // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
27
28
  const Template = (args, { argTypes }) => ({
28
29
  props: Object.keys(argTypes),
29
- components: { MgSelectionBox, MgPrimaryButton },
30
+ components: { MgSelectionBox, MgPrimaryButton, MgTertiaryButton },
30
31
  template: `<mg-selection-box v-bind="$props">
31
32
  <template v-if="${'default' in args}" v-slot>${args.default}</template>
32
- <template v-slot:cancel>Annulla</template>
33
+ <template v-slot:cancel>
34
+ <mg-tertiary-button>Annulla</mg-tertiary-button>
35
+ </template>
33
36
  <template v-slot:confirm>
34
37
  <mg-primary-button>Conferma</mg-primary-button>
35
38
  </template>
@@ -44,10 +47,12 @@ Default.args = {
44
47
 
45
48
  const PaymentTemplate = (args, { argTypes }) => ({
46
49
  props: Object.keys(argTypes),
47
- components: { MgSelectionBox, MgMagicCoinButton },
50
+ components: { MgSelectionBox, MgMagicCoinButton, MgTertiaryButton },
48
51
  template: `<mg-selection-box v-bind="$props">
49
52
  <template v-if="${'default' in args}" v-slot>${args.default}</template>
50
- <template v-slot:cancel>Annulla</template>
53
+ <template v-slot:cancel>
54
+ <mg-tertiary-button>Annulla</mg-tertiary-button>
55
+ </template>
51
56
  <template v-slot:confirm>
52
57
  <mg-magic-coin-button>Conferma</mg-magic-coin-button>
53
58
  </template>
@@ -7,9 +7,7 @@
7
7
  <div class="text-center text-uppercase"><slot></slot></div>
8
8
  <div class="d-flex align-items-center mt-2">
9
9
  <div class="w-50 text-center">
10
- <mg-tertiary-button
11
- v-on:click="$emit('cancel')"
12
- ><slot name="cancel"></slot></mg-tertiary-button>
10
+ <slot name="cancel"></slot>
13
11
  </div>
14
12
  <div class="w-50">
15
13
  <slot name="confirm"></slot>
@@ -22,8 +20,6 @@
22
20
  </template>
23
21
 
24
22
  <script>
25
- import MgTertiaryButton from "../../form/button/tertiary-button/TertiaryButton";
26
-
27
23
  export default {
28
24
  name: 'mg-selection-box',
29
25
 
@@ -34,10 +30,6 @@ export default {
34
30
  };
35
31
  },
36
32
  },
37
-
38
- components: {
39
- MgTertiaryButton
40
- },
41
33
  };
42
34
  </script>
43
35
 
@@ -20,7 +20,7 @@ export default {
20
20
  .mg-h2 {
21
21
  color: #343434;
22
22
  font-family: 'Ubuntu', sans-serif;
23
- font-size: 1rem;
23
+ font-size: 1.125rem;
24
24
  font-weight: 500;
25
25
  }
26
26
  </style>
@@ -21,6 +21,7 @@ export default {
21
21
  color: #343434;
22
22
  font-family: 'Ubuntu', sans-serif;
23
23
  font-size: 1rem;
24
- font-weight: 400;
24
+ font-weight: 500;
25
+ line-height: 1.17;
25
26
  }
26
27
  </style>
@@ -6,11 +6,6 @@ export default {
6
6
  component: MgHeadingFour,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
9
- level: {
10
- control: { type: 'select' },
11
- options: [null, 'club'],
12
- defaultValue: null
13
- },
14
9
  default: {
15
10
  description: "The default Vue slot",
16
11
  control: {
@@ -27,10 +22,9 @@ export default {
27
22
  };
28
23
 
29
24
  // 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),
25
+ const Template = args => ({
32
26
  components: { MgHeadingFour },
33
- template: `<mg-heading-four v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-four>`,
27
+ template: `<mg-heading-four><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-four>`,
34
28
  });
35
29
 
36
30
  export const Default = Template.bind({});
@@ -6,21 +6,10 @@
6
6
  export default {
7
7
  name: 'mg-heading-four',
8
8
 
9
- props: {
10
- level: {
11
- type: String,
12
- default: null,
13
- validator: function (value) {
14
- return ['club'].indexOf(value) !== -1;
15
- },
16
- }
17
- },
18
-
19
9
  computed: {
20
10
  classes() {
21
11
  return {
22
12
  'mg-h4': true,
23
- 'mg-h4--level-club': this.level === 'club',
24
13
  };
25
14
  }
26
15
  },
@@ -28,18 +17,10 @@ export default {
28
17
  </script>
29
18
 
30
19
  <style lang="scss">
31
- @import '../../../assets/palette';
32
-
33
20
  .mg-h4 {
34
21
  color: #343434;
35
22
  font-family: 'Ubuntu', sans-serif;
36
- font-size: 0.875rem;
37
- font-weight: 700;
38
-
39
- &--level {
40
- &-club {
41
- color: map-get($palette, 'expertClub') !important;
42
- }
43
- }
23
+ font-size: 1rem;
24
+ font-weight: 400;
44
25
  }
45
26
  </style>
@@ -0,0 +1,40 @@
1
+ import MgHeadingFive from './HeadingFive.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/H5',
6
+ component: MgHeadingFive,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ level: {
10
+ control: { type: 'select' },
11
+ options: [null, 'club'],
12
+ defaultValue: null
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: { MgHeadingFive },
33
+ template: `<mg-heading-five v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-five>`,
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
+ default: 'heading 5'
40
+ };
@@ -0,0 +1,45 @@
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
+ props: {
10
+ level: {
11
+ type: String,
12
+ default: null,
13
+ validator: function (value) {
14
+ return ['club'].indexOf(value) !== -1;
15
+ },
16
+ }
17
+ },
18
+
19
+ computed: {
20
+ classes() {
21
+ return {
22
+ 'mg-h5': true,
23
+ 'mg-h5--level-club': this.level === 'club',
24
+ };
25
+ }
26
+ },
27
+ };
28
+ </script>
29
+
30
+ <style lang="scss">
31
+ @import '../../../assets/palette';
32
+
33
+ .mg-h5 {
34
+ color: #343434;
35
+ font-family: 'Ubuntu', sans-serif;
36
+ font-size: 0.875rem;
37
+ font-weight: 700;
38
+
39
+ &--level {
40
+ &-club {
41
+ color: map-get($palette, 'expertClub') !important;
42
+ }
43
+ }
44
+ }
45
+ </style>