@magicgol/polyjuice 0.32.2 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/package.json +5 -5
  2. package/src/assets/palette.scss +1 -0
  3. package/src/assets/svg/index.js +1 -0
  4. package/src/assets/svg/x.js +10 -0
  5. package/src/components/{label → components}/anchor/Anchor.stories.js +1 -1
  6. package/src/components/{label → components}/anchor/Anchor.vue +0 -0
  7. package/src/components/{label/badge/LabelBadge.stories.js → components/badge/Badge.stories.js} +5 -5
  8. package/src/components/{label/badge/LabelBadge.vue → components/badge/Badge.vue} +3 -3
  9. package/src/components/{label → components}/dot/Dot.stories.js +1 -1
  10. package/src/components/{label → components}/dot/Dot.vue +0 -0
  11. package/src/components/components/filter-option/FilterOption.stories.js +35 -0
  12. package/src/components/components/filter-option/FilterOption.vue +51 -0
  13. package/src/components/{icon/badge → components/icon-badge}/IconBadge.stories.js +1 -1
  14. package/src/components/{icon/badge → components/icon-badge}/IconBadge.vue +0 -0
  15. package/src/components/{label → components}/label/Label.stories.js +1 -1
  16. package/src/components/{label → components}/label/Label.vue +0 -0
  17. package/src/components/{label → components}/traffic-light/TrafficLight.stories.js +1 -1
  18. package/src/components/{label → components}/traffic-light/TrafficLight.vue +0 -0
  19. package/src/components/{card → content/card}/horizontal-card/HCard.stories.js +1 -1
  20. package/src/components/{card → content/card}/horizontal-card/HCard.vue +0 -0
  21. package/src/components/{card → content/card}/vertical-card/VCard.stories.js +1 -1
  22. package/src/components/{card → content/card}/vertical-card/VCard.vue +1 -1
  23. package/src/components/{list → content/list}/head/ListHead.stories.js +1 -1
  24. package/src/components/{list → content/list}/head/ListHead.vue +1 -1
  25. package/src/components/{loader → content/loader}/soccer-ball/SoccerBall.stories.js +1 -1
  26. package/src/components/{loader → content/loader}/soccer-ball/SoccerBall.vue +0 -0
  27. package/src/components/{form/advanced → context/actions}/filter-button/FilterButton.stories.js +1 -1
  28. package/src/components/{form/advanced → context/actions}/filter-button/FilterButton.vue +1 -1
  29. package/src/components/{form/advanced → context/actions}/remove-button/RemoveButton.stories.js +7 -1
  30. package/src/components/{form/advanced → context/actions}/remove-button/RemoveButton.vue +11 -3
  31. package/src/components/{club → context/club}/button/primary-club-button/PrimaryClubButton.stories.js +1 -1
  32. package/src/components/{club → context/club}/button/primary-club-button/PrimaryClubButton.vue +1 -1
  33. package/src/components/{club → context/club}/button/secondary-club-button/SecondaryClubButton.stories.js +1 -1
  34. package/src/components/{club → context/club}/button/secondary-club-button/SecondaryClubButton.vue +1 -1
  35. package/src/components/{club → context/club}/plate/ClubPlate.stories.js +1 -1
  36. package/src/components/{club → context/club}/plate/ClubPlate.vue +1 -1
  37. package/src/components/{footballer → context/footballer}/footballer-box/FootballerBox.stories.js +1 -1
  38. package/src/components/{footballer → context/footballer}/footballer-box/FootballerBox.vue +1 -1
  39. package/src/components/{footballer → context/footballer}/horizontal-footballer/HFootballer.stories.js +1 -1
  40. package/src/components/{footballer → context/footballer}/horizontal-footballer/HFootballer.vue +2 -2
  41. package/src/components/{footballer → context/footballer}/horizontal-footballer-card/HFootballerCard.stories.js +1 -1
  42. package/src/components/{footballer → context/footballer}/horizontal-footballer-card/HFootballerCard.vue +1 -1
  43. package/src/components/{footballer → context/footballer}/horizontal-footballer-placeholder/HFootballerPlaceholder.stories.js +1 -1
  44. package/src/components/{footballer → context/footballer}/horizontal-footballer-placeholder/HFootballerPlaceholder.vue +1 -1
  45. package/src/components/context/footballer/list/footballer-list-body/FootballerListBody.stories.js +53 -0
  46. package/src/components/context/footballer/list/footballer-list-body/FootballerListBody.vue +156 -0
  47. package/src/components/context/footballer/list/footballer-list-head/FootballerListHead.stories.js +42 -0
  48. package/src/components/context/footballer/list/footballer-list-head/FootballerListHead.vue +96 -0
  49. package/src/components/{footballer → context/footballer/role}/role-badge/RoleBadge.stories.js +1 -1
  50. package/src/components/{footballer → context/footballer/role}/role-badge/RoleBadge.vue +2 -2
  51. package/src/components/context/footballer/role/role-counter/RoleCounter.stories.js +30 -0
  52. package/src/components/context/footballer/role/role-counter/RoleCounter.vue +57 -0
  53. package/src/components/{magic-coin → context/magic-coin}/button/MagicCoinButton.stories.js +1 -1
  54. package/src/components/{magic-coin → context/magic-coin}/button/MagicCoinButton.vue +1 -1
  55. package/src/components/{magic-coin → context/magic-coin}/credits/Credits.stories.js +1 -1
  56. package/src/components/{magic-coin → context/magic-coin}/credits/Credits.vue +1 -1
  57. package/src/components/{image → context/user}/profile-image/ProfileImage.stories.js +1 -1
  58. package/src/components/{image → context/user}/profile-image/ProfileImage.vue +1 -1
  59. package/src/components/{box → modal}/selection-box/SelectionBox.stories.js +2 -2
  60. package/src/components/{box → modal}/selection-box/SelectionBox.vue +0 -0
  61. package/src/components/{box → navigation/tab}/filing-cabinet/FilingCabinet.stories.js +1 -1
  62. package/src/components/{box → navigation/tab}/filing-cabinet/FilingCabinet.vue +0 -0
  63. package/src/components/{box → navigation/tab}/filing-cabinet/FilingCabinetTab.stories.js +1 -1
  64. package/src/components/{box → navigation/tab}/filing-cabinet/FilingCabinetTab.vue +1 -1
  65. package/src/components/navigation/{tab-button → tab/tab-button}/TabButton.stories.js +1 -1
  66. package/src/components/navigation/{tab-button → tab/tab-button}/TabButton.vue +1 -1
  67. package/src/documentation/Footballer.stories.mdx +4 -0
  68. package/src/svg/x.svg +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.32.2",
3
+ "version": "0.33.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -19,11 +19,11 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@babel/core": "^7.17.9",
22
- "@storybook/addon-actions": "^6.5.6",
23
- "@storybook/addon-essentials": "^6.5.6",
24
- "@storybook/addon-links": "^6.5.6",
22
+ "@storybook/addon-actions": "^6.5.10",
23
+ "@storybook/addon-essentials": "^6.5.10",
24
+ "@storybook/addon-links": "^6.5.10",
25
25
  "@storybook/preset-scss": "^1.0.3",
26
- "@storybook/vue": "^6.5.6",
26
+ "@storybook/vue": "^6.5.10",
27
27
  "@vue/cli-plugin-babel": "~4.5.15",
28
28
  "@vue/cli-plugin-eslint": "~4.5.15",
29
29
  "@vue/cli-service": "~4.5.15",
@@ -16,6 +16,7 @@ $palette: (
16
16
  'midfielder': #8fc6f9,
17
17
  'forward': #f58383,
18
18
  'bench': #bbb,
19
+ 'noRole': #c2c2c2,
19
20
  // LIVE
20
21
  'online': #00b669,
21
22
  'offline': #ea7203,
@@ -15,3 +15,4 @@ require('./soccer-ball')
15
15
  require('./star-c')
16
16
  require('./star-stroke-p')
17
17
  require('./timer')
18
+ require('./x')
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+ var icon = require('vue-svgicon')
3
+ icon.register({
4
+ 'x': {
5
+ width: 12,
6
+ height: 12,
7
+ viewBox: '0 0 12 12',
8
+ data: '<path pid="0" d="M7.292 6l3.942-3.932A.92.92 0 009.932.766L6 4.708 2.067.766A.92.92 0 10.766 2.068L4.707 6 .766 9.933a.917.917 0 000 1.301.916.916 0 001.301 0L6 7.293l3.932 3.941a.917.917 0 001.302 0 .919.919 0 000-1.301L7.292 6z" _fill="#D81159"/>'
9
+ }
10
+ })
@@ -2,7 +2,7 @@ import MgAnchor from './Anchor.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: 'Label/Anchor',
5
+ title: 'Components/Anchor',
6
6
  component: MgAnchor,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -1,9 +1,9 @@
1
- import MgLabelBadge from './LabelBadge.vue';
1
+ import MgBadge from './Badge.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: 'Label/Badge',
6
- component: MgLabelBadge,
5
+ title: 'Components/Badge',
6
+ component: MgBadge,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {},
9
9
  };
@@ -11,8 +11,8 @@ export default {
11
11
  // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
12
12
  const Template = (args, { argTypes }) => ({
13
13
  props: Object.keys(argTypes),
14
- components: { MgLabelBadge },
15
- template: `<mg-label-badge v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-label-badge>`,
14
+ components: { MgBadge },
15
+ template: `<mg-badge v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-badge>`,
16
16
  });
17
17
 
18
18
  export const Default = Template.bind({});
@@ -7,12 +7,12 @@
7
7
 
8
8
  <script>
9
9
  export default {
10
- name: 'mg-label-badge',
10
+ name: 'mg-badge',
11
11
 
12
12
  computed: {
13
13
  classes() {
14
14
  return {
15
- 'mg-label-badge': true,
15
+ 'mg-badge': true,
16
16
  };
17
17
  },
18
18
  },
@@ -22,7 +22,7 @@ export default {
22
22
  <style lang="scss">
23
23
  @import '../../../assets/palette';
24
24
 
25
- .mg-label-badge {
25
+ .mg-badge {
26
26
  background-color: #84485E;
27
27
  font-family: 'Ubuntu', sans-serif;
28
28
  font-weight: 500;
@@ -2,7 +2,7 @@ import MgDot from './Dot.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: 'Label/Dot',
5
+ title: 'Components/Dot',
6
6
  component: MgDot,
7
7
  };
8
8
 
File without changes
@@ -0,0 +1,35 @@
1
+ import MgOptionLabel from './FilterOption.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Components/Filter Option',
6
+ component: MgOptionLabel,
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: { MgOptionLabel },
28
+ template: `<mg-option-label v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-option-label>`,
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: 'etichetta'
35
+ };
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <div
3
+ class="d-inline-flex align-items-center text-white p-1"
4
+ :class="classes"
5
+ >
6
+ <div class="p-2">
7
+ <slot></slot>
8
+ </div>
9
+ <div class="mg-filter-option-circle d-flex align-items-center justify-content-center bg-white rounded-circle">
10
+ <svgicon name="x"></svgicon>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'mg-filter-option',
18
+
19
+ computed: {
20
+ classes() {
21
+ return {
22
+ 'mg-filter-option': true,
23
+ };
24
+ }
25
+ },
26
+ };
27
+ </script>
28
+
29
+ <style lang="scss">
30
+ @import '../../../assets/palette';
31
+
32
+ .mg-filter-option {
33
+ background-color: map-get($palette, 'brand');
34
+ border-radius: 30px;
35
+ cursor: pointer;
36
+ font-family: 'Ubuntu', sans-serif;
37
+ font-size: 0.875rem;
38
+ font-weight: 500;
39
+ height: 2rem;
40
+
41
+ &-circle {
42
+ height: 1.5rem;
43
+ width: 1.5rem;
44
+
45
+ svg {
46
+ fill: map-get($palette, 'brand');
47
+ height: 0.75rem;
48
+ }
49
+ }
50
+ }
51
+ </style>
@@ -2,7 +2,7 @@ import MgIconBadge from './IconBadge.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: 'Icon/Badge',
5
+ title: 'Components/Icon Badge',
6
6
  component: MgIconBadge,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -2,7 +2,7 @@ import MgLabel from './Label.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: 'Label/Label',
5
+ title: 'Components/Label',
6
6
  component: MgLabel,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -2,7 +2,7 @@ import MgTrafficLight from './TrafficLight.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: 'Label/Traffic Light',
5
+ title: 'Components/Traffic Light',
6
6
  component: MgTrafficLight,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -2,7 +2,7 @@ import MgHCard from './HCard.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: 'Card/HCard',
5
+ title: 'Content/Card/HCard',
6
6
  component: MgHCard,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -2,7 +2,7 @@ import MgVCard from './VCard.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: 'Card/VCard',
5
+ title: 'Content/Card/VCard',
6
6
  component: MgVCard,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -67,7 +67,7 @@ export default {
67
67
  </script>
68
68
 
69
69
  <style lang="scss">
70
- @import '../../../assets/palette';
70
+ @import '../../../../assets/palette';
71
71
 
72
72
  .mg-v-card {
73
73
  background: white;
@@ -2,7 +2,7 @@ import MgListHead from './ListHead.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: 'List/Head',
5
+ title: 'Content/List/Head',
6
6
  component: MgListHead,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -42,7 +42,7 @@ export default {
42
42
  </script>
43
43
 
44
44
  <style lang="scss">
45
- @import '../../../assets/palette';
45
+ @import '../../../../assets/palette';
46
46
 
47
47
  .mg-list-head {
48
48
  border-bottom: 1px solid #dee2e6;
@@ -2,7 +2,7 @@ import MgSoccerBall from './SoccerBall.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: 'Loader/Soccer Ball',
5
+ title: 'Content/Loader/Soccer Ball',
6
6
  component: MgSoccerBall,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  };
@@ -2,7 +2,7 @@ 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/FilterButton',
5
+ title: 'Context/Actions/Filter Button',
6
6
  component: MgFilterButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script>
20
- import MgTertiaryButton from "../../button/tertiary-button/TertiaryButton";
20
+ import MgTertiaryButton from "../../../form/button/tertiary-button/TertiaryButton";
21
21
 
22
22
  export default {
23
23
  name: 'mg-filter-button',
@@ -2,7 +2,7 @@ import MgRemoveButton from './RemoveButton.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/RemoveButton',
5
+ title: 'Context/Actions/Remove Button',
6
6
  component: MgRemoveButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -20,3 +20,9 @@ export const Default = Template.bind({});
20
20
  // More on args: https://storybook.js.org/docs/vue/writing-stories/args
21
21
  Default.args = {
22
22
  };
23
+
24
+ export const Disabled = Template.bind({});
25
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
26
+ Disabled.args = {
27
+ disabled: true
28
+ };
@@ -1,19 +1,27 @@
1
1
  <template>
2
2
  <mg-tertiary-button
3
- @click="onClick"
4
- :class="classes"
5
3
  class="p-0"
4
+ :disabled="disabled"
5
+ :class="classes"
6
+ @click="onClick"
6
7
  >
7
8
  <svgicon name="circle-with-minus"></svgicon>
8
9
  </mg-tertiary-button>
9
10
  </template>
10
11
 
11
12
  <script>
12
- import MgTertiaryButton from "../../button/tertiary-button/TertiaryButton";
13
+ import MgTertiaryButton from "../../../form/button/tertiary-button/TertiaryButton";
13
14
 
14
15
  export default {
15
16
  name: 'mg-remove-button',
16
17
 
18
+ props: {
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false,
22
+ }
23
+ },
24
+
17
25
  computed: {
18
26
  classes() {
19
27
  return {
@@ -2,7 +2,7 @@ import MgPrimaryClubButton from './PrimaryClubButton.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: 'Club/Button/Primary Button',
5
+ title: 'Context/Club/Button/Primary Club Button',
6
6
  component: MgPrimaryClubButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -42,7 +42,7 @@ export default {
42
42
  </script>
43
43
 
44
44
  <style lang="scss">
45
- @import '../../../../assets/palette';
45
+ @import '../../../../../assets/palette';
46
46
 
47
47
  .mg-primary-club-button {
48
48
  appearance: none;
@@ -2,7 +2,7 @@ import MgSecondaryClubButton from './SecondaryClubButton.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: 'Club/Button/Secondary Button',
5
+ title: 'Context/Club/Button/Secondary Club Button',
6
6
  component: MgSecondaryClubButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -42,7 +42,7 @@ export default {
42
42
  </script>
43
43
 
44
44
  <style lang="scss">
45
- @import '../../../../assets/palette';
45
+ @import '../../../../../assets/palette';
46
46
 
47
47
  .mg-secondary-club-button {
48
48
  appearance: none;
@@ -2,7 +2,7 @@ import MgClubPlate from './ClubPlate.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: 'Club/Plate',
5
+ title: 'Context/Club/Button/Club Plate',
6
6
  component: MgClubPlate,
7
7
  };
8
8
 
@@ -39,7 +39,7 @@ export default {
39
39
  </script>
40
40
 
41
41
  <style lang="scss">
42
- @import '../../../assets/palette';
42
+ @import '../../../../assets/palette';
43
43
 
44
44
  .mg-club-plate {
45
45
  color: map-get($palette, 'expertClub');
@@ -2,7 +2,7 @@ import MgFootballerBox from './FootballerBox.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: 'Footballer/Box',
5
+ title: 'Context/Footballer/Footballer Box',
6
6
  component: MgFootballerBox,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -70,7 +70,7 @@ export default {
70
70
  </script>
71
71
 
72
72
  <style lang="scss">
73
- @import '../../../assets/palette';
73
+ @import '../../../../assets/palette';
74
74
 
75
75
  .mg-footballer-box {
76
76
  border-style: solid;
@@ -2,7 +2,7 @@ import MgHFootballer from './HFootballer.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: 'Footballer/HFootballer',
5
+ title: 'Context/Footballer/HFootballer',
6
6
  component: MgHFootballer,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -40,7 +40,7 @@
40
40
  </template>
41
41
 
42
42
  <script>
43
- import MgRoleBadge from "../role-badge/RoleBadge";
43
+ import MgRoleBadge from "../role/role-badge/RoleBadge";
44
44
 
45
45
  export default {
46
46
  name: 'mg-h-footballer',
@@ -121,7 +121,7 @@ export default {
121
121
  </script>
122
122
 
123
123
  <style lang="scss">
124
- @import '../../../assets/palette';
124
+ @import '../../../../assets/palette';
125
125
 
126
126
  .mg-h-footballer {
127
127
  color: map-get($palette, 'text');
@@ -2,7 +2,7 @@ import MgHFootballerCard from './HFootballerCard.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: 'Footballer/HFootballerCard',
5
+ title: 'Context/Footballer/HFootballerCard',
6
6
  component: MgHFootballerCard,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -16,7 +16,7 @@
16
16
 
17
17
  <script>
18
18
  import MgHFootballer from "../horizontal-footballer/HFootballer";
19
- import MgHCard from "../../card/horizontal-card/HCard";
19
+ import MgHCard from "../../../content/card/horizontal-card/HCard";
20
20
 
21
21
  export default {
22
22
  name: 'mg-h-footballer-card',
@@ -2,7 +2,7 @@ import MgHFootballerPlaceholder from './HFootballerPlaceholder.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: 'Footballer/HPlaceholder',
5
+ title: 'Context/Footballer/HFootballerPlaceholder',
6
6
  component: MgHFootballerPlaceholder,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -56,7 +56,7 @@ export default {
56
56
  </script>
57
57
 
58
58
  <style lang="scss">
59
- @import '../../../assets/palette';
59
+ @import '../../../../assets/palette';
60
60
 
61
61
  .mg-footballer-h-placeholder {
62
62
  background: white;
@@ -0,0 +1,53 @@
1
+ import MgFootballerListBody from './FootballerListBody.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Context/Footballer/List/Footballer List Body',
6
+ component: MgFootballerListBody,
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: { MgFootballerListBody },
28
+ template: `<mg-footballer-list-body v-bind="$props">
29
+ <template v-if="${'first-col' in args}" v-slot:first-col>${args['first-col']}</template>
30
+ <template v-if="${'second-col' in args}" v-slot:second-col>${args['second-col']}</template>
31
+ <template v-if="${'third-col' in args}" v-slot:third-col>${args['third-col']}</template>
32
+ <template v-if="${'actions' in args}" v-slot:actions>${args.actions}</template>
33
+ </mg-footballer-list-body>`,
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
+ 'first-col': 'calciatore',
40
+ 'second-col': 'valore',
41
+ 'third-col': 'quotazione',
42
+ 'actions': '->',
43
+ };
44
+
45
+ export const Disabled = Template.bind({});
46
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
47
+ Disabled.args = {
48
+ 'first-col': 'calciatore',
49
+ 'second-col': 'valore',
50
+ 'third-col': 'quotazione',
51
+ 'actions': '->',
52
+ disabled: true,
53
+ };
@@ -0,0 +1,156 @@
1
+ <template>
2
+ <div
3
+ class="mt-2"
4
+ :class="classes"
5
+ @click="onClick"
6
+ >
7
+ <div class="d-flex align-items-center h-100 rounded">
8
+ <div
9
+ class="p-0 pl-3 py-2"
10
+ :class="firstColClass"
11
+ >
12
+ <slot name="first-col"></slot>
13
+ </div>
14
+ <div
15
+ v-if="secondColVisibility"
16
+ class="col-2 p-0 text-center"
17
+ >
18
+ <slot name="second-col"></slot>
19
+ </div>
20
+ <div
21
+ v-if="thirdColVisibility"
22
+ class="p-0 text-center"
23
+ :class="thirdColClass"
24
+ >
25
+ <slot name="third-col"></slot>
26
+ </div>
27
+ <div
28
+ v-if="actionsColVisibility"
29
+ class="p-0 pr-3 text-center"
30
+ :class="actionsColClass"
31
+ >
32
+ <slot name="actions"></slot>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script>
39
+ export default {
40
+ name: 'mg-footballer-list-body',
41
+
42
+ props: {
43
+ actionsCol: {
44
+ type: Number,
45
+ default: 1
46
+ },
47
+ disabled: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ selected: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ role: {
56
+ type: String,
57
+ default: null,
58
+ validator: function (value) {
59
+ return ['P', 'D', 'C', 'A'].indexOf(value) !== -1;
60
+ },
61
+ },
62
+ },
63
+
64
+ computed: {
65
+ classes () {
66
+ return {
67
+ 'mg-footballer-list-body': true,
68
+ 'mg-footballer-list-body--disabled': this.disabled === true,
69
+ 'mg-footballer-list-body--selected': this.selected === true,
70
+ 'mg-footballer-list-body--goalkeeper': this.role === 'P',
71
+ 'mg-footballer-list-body--defender': this.role === 'D',
72
+ 'mg-footballer-list-body--midfielder': this.role === 'C',
73
+ 'mg-footballer-list-body--forward': this.role === 'A'
74
+ };
75
+ },
76
+ secondColVisibility () {
77
+ return 'second-col' in this.$slots && !!this.$slots['second-col'];
78
+ },
79
+ thirdColVisibility () {
80
+ return 'third-col' in this.$slots && !!this.$slots['third-col'];
81
+ },
82
+ actionsColVisibility () {
83
+ return 'actions' in this.$slots && !!this.$slots.actions;
84
+ },
85
+ actionsColClass () {
86
+ return 'col-' + this.actionsCol;
87
+ },
88
+ firstColClass () {
89
+ return 'col-' + ((this.secondColVisibility ? 8 : 10) - this.actionsCol);
90
+ },
91
+ thirdColClass () {
92
+ return this.actionsColVisibility ? 'col-2' : 'col-3 pr-3'
93
+ }
94
+ },
95
+
96
+ methods: {
97
+ onClick () {
98
+ if (!this.disabled) {
99
+ this.$emit('click');
100
+ }
101
+ }
102
+ }
103
+ };
104
+ </script>
105
+
106
+ <style lang="scss">
107
+ @import '../../../../../assets/palette';
108
+
109
+ .mg-footballer-list-body {
110
+ height: 3.75rem;
111
+
112
+ > div {
113
+ border: 1px solid #f6f6f6;
114
+ background: #f6f6f6;
115
+ }
116
+
117
+ &--disabled {
118
+ opacity: 0.6;
119
+ cursor: not-allowed !important;
120
+ }
121
+
122
+ &--selected {
123
+ > div {
124
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
125
+ }
126
+
127
+ &.mg-footballer-list-body--goalkeeper {
128
+ > div {
129
+ background-color: map-get($palette, 'goalkeeper');
130
+ border-color: darken(map-get($palette, 'goalkeeper'), 25%);
131
+ }
132
+ }
133
+
134
+ &.mg-footballer-list-body--defender {
135
+ > div {
136
+ background-color: map-get($palette, 'defender');
137
+ border-color: darken(map-get($palette, 'defender'), 25%);
138
+ }
139
+ }
140
+
141
+ &.mg-footballer-list-body--midfielder {
142
+ > div {
143
+ background-color: map-get($palette, 'midfielder');
144
+ border-color: darken(map-get($palette, 'midfielder'), 25%);
145
+ }
146
+ }
147
+
148
+ &.mg-footballer-list-body--forward {
149
+ > div {
150
+ background-color: map-get($palette, 'forward');
151
+ border-color: darken(map-get($palette, 'forward'), 25%);
152
+ }
153
+ }
154
+ }
155
+ }
156
+ </style>
@@ -0,0 +1,42 @@
1
+ import MgFootballerListHead from './FootballerListHead.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Context/Footballer/List/Footballer List Head',
6
+ component: MgFootballerListHead,
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: { MgFootballerListHead },
28
+ template: `<mg-footballer-list-head v-bind="$props">
29
+ <template v-if="${'first-col' in args}" v-slot:first-col>${args['first-col']}</template>
30
+ <template v-if="${'second-col' in args}" v-slot:second-col>${args['second-col']}</template>
31
+ <template v-if="${'third-col' in args}" v-slot:third-col>${args['third-col']}</template>
32
+ <template v-if="${'default' in args}" v-slot>${args.default}</template>
33
+ </mg-footballer-list-head>`,
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
+ 'first-col': 'calciatore',
40
+ 'second-col': 'valore',
41
+ 'third-col': 'quotazione',
42
+ };
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div
3
+ :class="classes"
4
+ >
5
+ <div
6
+ class="p-0"
7
+ :class="firstColClass"
8
+ >
9
+ <mg-list-head
10
+ :active="firstColActive"
11
+ ><slot name="first-col"></slot></mg-list-head>
12
+ </div>
13
+ <div
14
+ class="p-0 text-truncate"
15
+ :class="secondColClass"
16
+ >
17
+ <mg-list-head
18
+ :active="secondColActive"
19
+ class="text-truncate"
20
+ align-center
21
+ ><slot name="second-col"></slot></mg-list-head>
22
+ </div>
23
+ <div
24
+ class="p-0 text-truncate"
25
+ :class="thirdColClass"
26
+ >
27
+ <mg-list-head
28
+ :active="thirdColActive"
29
+ class="text-truncate"
30
+ align-center
31
+ ><slot name="third-col"></slot></mg-list-head>
32
+ </div>
33
+ <div
34
+ v-if="actions"
35
+ class="col-1 p-0"
36
+ :class="actionsColClass"
37
+ >
38
+ <mg-list-head>&nbsp;</mg-list-head>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script>
44
+ import MgListHead from "../../../../content/list/head/ListHead";
45
+
46
+ export default {
47
+ name: 'mg-footballer-list-head',
48
+
49
+ props: {
50
+ firstColActive: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ secondColActive: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ thirdColActive: {
59
+ type: Boolean,
60
+ default: false
61
+ },
62
+ actions: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ actionsCol: {
67
+ type: Number,
68
+ default: 1
69
+ }
70
+ },
71
+
72
+ computed: {
73
+ classes() {
74
+ return {
75
+ 'mg-footballer-list-head': true,
76
+ };
77
+ },
78
+ actionsColClass () {
79
+ return 'col-' + this.actionsCol;
80
+ },
81
+ firstColClass () {
82
+ return 'col-' + (8 - this.actionsCol);
83
+ },
84
+ secondColClass () {
85
+ return 'col-2';
86
+ },
87
+ thirdColClass () {
88
+ return this.actions ? 'col-2' : 'col-3';
89
+ }
90
+ },
91
+
92
+ components: {
93
+ MgListHead,
94
+ },
95
+ };
96
+ </script>
@@ -2,7 +2,7 @@ import MgRoleBadge from './RoleBadge.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: 'Footballer/Role Badge',
5
+ title: 'Context/Footballer/Role/Role Badge',
6
6
  component: MgRoleBadge,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -53,10 +53,10 @@ export default {
53
53
  </script>
54
54
 
55
55
  <style lang="scss">
56
- @import '../../../assets/palette';
56
+ @import '../../../../../assets/palette';
57
57
 
58
58
  .mg-role-badge {
59
- background-color: #c2c2c2;
59
+ background-color: map-get($palette, 'noRole');
60
60
  color: map-get($palette, 'text');
61
61
  font-family: 'Ubuntu', sans-serif;
62
62
  font-weight: 500;
@@ -0,0 +1,30 @@
1
+ import MgRoleCounter from './RoleCounter.vue';
2
+
3
+ // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
+ export default {
5
+ title: 'Context/Footballer/Role/Role Counter',
6
+ component: MgRoleCounter,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ role: {
10
+ control: { type: 'select' },
11
+ options: ['P', 'D', 'C', 'A'],
12
+ defaultValue: null
13
+ },
14
+ },
15
+ };
16
+
17
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
18
+ const Template = (args, { argTypes }) => ({
19
+ props: Object.keys(argTypes),
20
+ components: { MgRoleCounter },
21
+ template: `<mg-role-counter v-bind="$props"></mg-role-counter>`,
22
+ });
23
+
24
+ export const Default = Template.bind({});
25
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
26
+ Default.args = {
27
+ count: 4,
28
+ role: 'P'
29
+ };
30
+
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div
3
+ class="d-flex align-items-center"
4
+ :class="classes"
5
+ >
6
+ <div>{{ count }}</div>
7
+ <mg-role-badge
8
+ class="ml-1"
9
+ :role="role"
10
+ ></mg-role-badge>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import MgRoleBadge from "../role-badge/RoleBadge";
16
+
17
+ export default {
18
+ name: 'mg-role-counter',
19
+
20
+ props: {
21
+ count: {
22
+ type: Number,
23
+ default: 0
24
+ },
25
+
26
+ role: {
27
+ type: String,
28
+ default: null,
29
+ validator: function (value) {
30
+ return ['P', 'D', 'C', 'A'].indexOf(value) !== -1;
31
+ },
32
+ }
33
+ },
34
+
35
+ computed: {
36
+ classes() {
37
+ return {
38
+ 'mg-role-counter': true,
39
+ };
40
+ }
41
+ },
42
+
43
+ components: {
44
+ MgRoleBadge,
45
+ },
46
+ };
47
+ </script>
48
+
49
+ <style lang="scss">
50
+ @import '../../../../../assets/palette';
51
+
52
+ .mg-role-counter {
53
+ font-family: 'Ubuntu', sans-serif;
54
+ font-weight: 500;
55
+ font-size: 1rem;
56
+ }
57
+ </style>
@@ -2,7 +2,7 @@ import MgMagicCoinButton from './MagicCoinButton.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: 'MagicCoin/Button/Magic Coin Button',
5
+ title: 'Context/MagicCoin/Button/Magic Coin Button',
6
6
  component: MgMagicCoinButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -62,7 +62,7 @@ export default {
62
62
  </script>
63
63
 
64
64
  <style lang="scss">
65
- @import '../../../assets/palette';
65
+ @import '../../../../assets/palette';
66
66
 
67
67
  .mg-magic-coin-button {
68
68
  appearance: none;
@@ -2,7 +2,7 @@ import MgCredits from './Credits.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: 'MagicCoin/Credits/Credits',
5
+ title: 'Context/MagicCoin/Credits/Credits',
6
6
  component: MgCredits,
7
7
  };
8
8
 
@@ -34,7 +34,7 @@ export default {
34
34
  </script>
35
35
 
36
36
  <style lang="scss">
37
- @import '../../../assets/palette';
37
+ @import '../../../../assets/palette';
38
38
 
39
39
  .mg-credits {
40
40
  svg {
@@ -2,7 +2,7 @@ import MgProfileImage from './ProfileImage.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: 'Image/Profile',
5
+ title: 'Context/User/Profile Image',
6
6
  component: MgProfileImage,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -77,7 +77,7 @@ export default {
77
77
  </script>
78
78
 
79
79
  <style lang="scss">
80
- @import '../../../assets/palette';
80
+ @import '../../../../assets/palette';
81
81
 
82
82
  .mg-profile-image {
83
83
  border-radius: 50%;
@@ -1,11 +1,11 @@
1
1
  import MgSelectionBox from './SelectionBox.vue';
2
2
  import MgPrimaryButton from "../../form/button/primary-button/PrimaryButton";
3
- import MgMagicCoinButton from "../../magic-coin/button/MagicCoinButton";
3
+ import MgMagicCoinButton from "../../context/magic-coin/button/MagicCoinButton";
4
4
  import MgTertiaryButton from "../../form/button/tertiary-button/TertiaryButton";
5
5
 
6
6
  // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
7
7
  export default {
8
- title: 'Box/Selection Box',
8
+ title: 'Modal/Selection Box',
9
9
  component: MgSelectionBox,
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {
@@ -3,7 +3,7 @@ import MgFilingCabinetTab from './FilingCabinetTab.vue';
3
3
 
4
4
  // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
5
5
  export default {
6
- title: 'Box/Filing Cabinet',
6
+ title: 'Navigation/Tab/Filing Cabinet',
7
7
  component: MgFilingCabinet,
8
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
9
9
  argTypes: {
@@ -2,7 +2,7 @@ import MgFilingCabinetTab from './FilingCabinetTab.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: 'Box/Filing Cabinet/Tab',
5
+ title: 'Navigation/Tab/FilingCabinetTab',
6
6
  component: MgFilingCabinetTab,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -31,7 +31,7 @@ export default {
31
31
  </script>
32
32
 
33
33
  <style lang="scss">
34
- @import '../../../assets/palette';
34
+ @import '../../../../assets/palette';
35
35
 
36
36
  .mg-filing-cabinet-tab {
37
37
  background-color: #f3f3f3;
@@ -2,7 +2,7 @@ import MgTabButton from './TabButton.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: 'Navigation/Tab Button',
5
+ title: 'Navigation/Tab/Tab Button',
6
6
  component: MgTabButton,
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
@@ -40,7 +40,7 @@ export default {
40
40
  </script>
41
41
 
42
42
  <style lang="scss">
43
- @import '../../../assets/palette';
43
+ @import '../../../../assets/palette';
44
44
 
45
45
  .mg-tab-button {
46
46
  appearance: none;
@@ -23,4 +23,8 @@ import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
23
23
  title="Bench"
24
24
  colors={{'Silver': '#bbb'}}
25
25
  />
26
+ <ColorItem
27
+ title="No Role"
28
+ colors={{'Silver': '#c2c2c2'}}
29
+ />
26
30
  </ColorPalette>
package/src/svg/x.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.29244 6.00009L11.2341 2.06759C11.4067 1.89498 11.5037 1.66087 11.5037 1.41676C11.5037 1.17265 11.4067 0.938534 11.2341 0.765922C11.0615 0.59331 10.8274 0.496338 10.5833 0.496338C10.3392 0.496338 10.1051 0.59331 9.93244 0.765922L5.99994 4.70759L2.06744 0.765922C1.89483 0.59331 1.66072 0.496338 1.41661 0.496338C1.1725 0.496338 0.938389 0.59331 0.765777 0.765922C0.593166 0.938534 0.496193 1.17265 0.496193 1.41676C0.496193 1.66087 0.593166 1.89498 0.765777 2.06759L4.70744 6.00009L0.765777 9.93259C0.67986 10.0178 0.611665 10.1192 0.565127 10.2309C0.518589 10.3426 0.494629 10.4624 0.494629 10.5834C0.494629 10.7044 0.518589 10.8242 0.565127 10.936C0.611665 11.0477 0.67986 11.149 0.765777 11.2343C0.850993 11.3202 0.952378 11.3884 1.06408 11.4349C1.17579 11.4814 1.2956 11.5054 1.41661 11.5054C1.53762 11.5054 1.65744 11.4814 1.76914 11.4349C1.88084 11.3884 1.98223 11.3202 2.06744 11.2343L5.99994 7.29259L9.93244 11.2343C10.0177 11.3202 10.119 11.3884 10.2307 11.4349C10.3425 11.4814 10.4623 11.5054 10.5833 11.5054C10.7043 11.5054 10.8241 11.4814 10.9358 11.4349C11.0475 11.3884 11.1489 11.3202 11.2341 11.2343C11.32 11.149 11.3882 11.0477 11.4348 10.936C11.4813 10.8242 11.5053 10.7044 11.5053 10.5834C11.5053 10.4624 11.4813 10.3426 11.4348 10.2309C11.3882 10.1192 11.32 10.0178 11.2341 9.93259L7.29244 6.00009Z" fill="#D81159"/>
3
+ </svg>