@magicgol/polyjuice 0.20.1 → 0.21.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.20.1",
3
+ "version": "0.21.2",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -9,7 +9,7 @@ export default {
9
9
  role: {
10
10
  control: { type: 'select' },
11
11
  options: ['P', 'D', 'C', 'A'],
12
- defaultValue: 'A'
12
+ defaultValue: null
13
13
  },
14
14
  size: {
15
15
  control: { type: 'select' },
@@ -4,7 +4,10 @@
4
4
  :class="classes"
5
5
  >
6
6
  <slot v-if="slotVisibility"></slot>
7
- <template v-else>{{ role }}</template>
7
+ <template v-else>
8
+ <template v-if="role">{{ role }}</template>
9
+ <template v-else>-</template>
10
+ </template>
8
11
  </div>
9
12
  </template>
10
13
 
@@ -15,7 +18,7 @@ export default {
15
18
  props: {
16
19
  role: {
17
20
  type: String,
18
- default: 'A',
21
+ default: null,
19
22
  validator: function (value) {
20
23
  return ['P', 'D', 'C', 'A'].indexOf(value) !== -1;
21
24
  },
@@ -53,6 +56,7 @@ export default {
53
56
  @import '../../../assets/palette';
54
57
 
55
58
  .mg-role-badge {
59
+ background-color: #c2c2c2;
56
60
  font-family: 'Ubuntu', sans-serif;
57
61
  font-weight: 600;
58
62
 
@@ -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>