@magicgol/polyjuice 0.6.2 → 0.7.0

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.6.2",
3
+ "version": "0.7.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable */
2
2
  require('./star-c')
3
+ require('./star-stroke-p')
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+ var icon = require('vue-svgicon')
3
+ icon.register({
4
+ 'star-stroke-p': {
5
+ width: 16,
6
+ height: 16,
7
+ viewBox: '0 0 22 22',
8
+ data: '<path pid="0" fill-rule="evenodd" clip-rule="evenodd" d="M9.153 1.836c.684-1.643 3.01-1.643 3.694 0l2.016 4.847 5.233.42c1.773.142 2.492 2.355 1.141 3.512l-3.987 3.416 1.218 5.106c.413 1.731-1.47 3.099-2.988 2.171L11 18.572l-4.48 2.736c-1.519.928-3.401-.44-2.988-2.17L4.75 14.03.763 10.615C-.588 9.458.13 7.245 1.904 7.103l5.233-.42 2.016-4.847zM11 2.604L8.984 7.451a2 2 0 01-1.687 1.226l-5.233.42 3.987 3.415a2 2 0 01.644 1.983l-1.218 5.107 4.48-2.737a2 2 0 012.085 0l4.48 2.737-1.217-5.107a2 2 0 01.644-1.983l3.987-3.416-5.233-.42a2 2 0 01-1.687-1.225L11 2.604z" _fill="#075169"/><path pid="1" d="M8.55 15.4V9.01h2.753c.312 0 .6.063.864.189s.492.297.684.513c.192.21.34.447.441.711a2.1 2.1 0 01.162.801c0 .378-.09.735-.27 1.071-.174.336-.42.612-.738.828a1.92 1.92 0 01-1.098.315h-1.044V15.4H8.55zm1.754-3.492h.927a.38.38 0 00.207-.063.447.447 0 00.162-.216.96.96 0 00.072-.405c0-.18-.027-.318-.08-.414a.403.403 0 00-.19-.207.425.425 0 00-.216-.063h-.882v1.368z" _fill="#075169"/>'
9
+ }
10
+ })
@@ -0,0 +1,41 @@
1
+ import MgSecondaryClubButton from './SecondaryClubButton.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Club/Button/Secondary Button',
6
+ component: MgSecondaryClubButton,
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: { MgSecondaryClubButton },
28
+ template: `<mg-secondary-club-button @click="$emit('click')" v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-secondary-club-button>`,
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: 'secondary club button'
35
+ };
36
+
37
+ export const Disabled = Template.bind({});
38
+ Disabled.args = {
39
+ disabled: true,
40
+ default: 'secondary club button'
41
+ };
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <button
3
+ class="d-block bg-white w-100 p-2 rounded text-uppercase text-center text-decoration-none"
4
+ type="button"
5
+ :class="classes"
6
+ :disabled="disabled"
7
+ @click="$emit('click')"
8
+ >
9
+ <div class="d-inline-flex align-items-center">
10
+ <svgicon
11
+ name="star-stroke-p"
12
+ style="height: 20px"
13
+ ></svgicon>
14
+ <div class="ml-2"><slot></slot></div>
15
+ </div>
16
+ </button>
17
+ </template>
18
+
19
+ <script>
20
+ export default {
21
+ name: 'mg-secondary-club-button',
22
+
23
+ props: {
24
+ disabled: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ },
29
+
30
+ computed: {
31
+ classes() {
32
+ return {
33
+ 'mg-secondary-club-button': true,
34
+ 'mg-secondary-club-button--disabled': this.disabled,
35
+ };
36
+ }
37
+ },
38
+
39
+ methods: {
40
+ onClick() {
41
+ this.$emit('click');
42
+ },
43
+ },
44
+ };
45
+ </script>
46
+
47
+ <style lang="scss">
48
+ @import '../../../../assets/palette';
49
+
50
+ .mg-secondary-club-button {
51
+ appearance: none;
52
+ border: 2px solid map-get($palette, 'expertClub');
53
+ box-shadow: 0 5px 22px rgba(0, 0, 0, 0.3);
54
+ color: map-get($palette, 'expertClub');
55
+ cursor: pointer;
56
+ font-size: 1rem;
57
+ font-family: 'Ubuntu', sans-serif;
58
+ font-weight: 500;
59
+ outline: none;
60
+
61
+ svg {
62
+ fill: map-get($palette, 'expertClub');
63
+ }
64
+
65
+ &--disabled {
66
+ opacity: 0.6 !important;
67
+ cursor: not-allowed !important;
68
+ }
69
+ }
70
+ </style>
@@ -31,7 +31,9 @@ export default {
31
31
 
32
32
  methods: {
33
33
  onClick() {
34
- this.$emit('click');
34
+ if (!this.active) {
35
+ this.$emit('click');
36
+ }
35
37
  },
36
38
  },
37
39
  };
package/src/main.js CHANGED
@@ -21,6 +21,7 @@ new Vue({
21
21
  export MgHCard from './components/card/horizontal-card/HCard';
22
22
  export MgVCard from './components/card/vertical-card/VCard';
23
23
  export MgPrimaryClubButton from './components/club/button/primary-club-button/PrimaryClubButton';
24
+ export MgSecondaryClubButton from './components/club/button/secondary-club-button/SecondaryClubButton';
24
25
  export MgPrimaryButton from './components/form/primary-button/PrimaryButton';
25
26
  export MgSecondaryButton from './components/form/secondary-button/SecondaryButton';
26
27
  export MgTertiaryButton from './components/form/tertiary-button/TertiaryButton';
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.15339 1.83591C9.83658 0.193323 12.1635 0.193331 12.8467 1.83591L14.8628 6.68333L20.096 7.10287C21.8693 7.24504 22.5884 9.45806 21.2373 10.6154L17.2502 14.0308L18.4683 19.1375C18.8811 20.868 16.9986 22.2357 15.4804 21.3084L11 18.5718L6.51969 21.3084C5.00148 22.2357 3.11899 20.868 3.53176 19.1375L4.7499 14.0308L0.762753 10.6154C-0.588324 9.45805 0.130736 7.24504 1.90404 7.10287L7.13724 6.68333L9.15339 1.83591ZM11 2.60397L8.98388 7.45139C8.69586 8.14386 8.04464 8.617 7.29706 8.67694L2.06387 9.09648L6.05101 12.5119C6.62059 12.9998 6.86933 13.7653 6.69532 14.4949L5.47718 19.6016L9.95752 16.865C10.5976 16.4741 11.4025 16.4741 12.0425 16.865L16.5229 19.6016L15.3047 14.4949C15.1307 13.7653 15.3795 12.9998 15.9491 12.5119L19.9362 9.09648L14.703 8.67694C13.9554 8.617 13.3042 8.14386 13.0162 7.45139L11 2.60397Z" fill="#075169"/>
3
+ <path d="M8.54907 15.4V9.01004H11.3031C11.6151 9.01004 11.9031 9.07304 12.1671 9.19904C12.4311 9.32504 12.6591 9.49604 12.8511 9.71204C13.0431 9.92204 13.1901 10.159 13.2921 10.423C13.4001 10.687 13.4541 10.954 13.4541 11.224C13.4541 11.602 13.3641 11.959 13.1841 12.295C13.0101 12.631 12.7641 12.907 12.4461 13.123C12.1341 13.333 11.7681 13.438 11.3481 13.438H10.3041V15.4H8.54907ZM10.3041 11.908H11.2311C11.3031 11.908 11.3721 11.887 11.4381 11.845C11.5041 11.803 11.5581 11.731 11.6001 11.629C11.6481 11.527 11.6721 11.392 11.6721 11.224C11.6721 11.044 11.6451 10.906 11.5911 10.81C11.5431 10.708 11.4801 10.639 11.4021 10.603C11.3301 10.561 11.2581 10.54 11.1861 10.54H10.3041V11.908Z" fill="#075169"/>
4
+ </svg>