@farm-investimentos/front-mfe-components 6.3.1 → 6.3.4

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.
Files changed (33) hide show
  1. package/dist/front-mfe-components.common.js +390 -301
  2. package/dist/front-mfe-components.common.js.map +1 -1
  3. package/dist/front-mfe-components.css +1 -1
  4. package/dist/front-mfe-components.umd.js +390 -301
  5. package/dist/front-mfe-components.umd.js.map +1 -1
  6. package/dist/front-mfe-components.umd.min.js +1 -1
  7. package/dist/front-mfe-components.umd.min.js.map +1 -1
  8. package/package.json +3 -3
  9. package/src/components/Buttons/DefaultButton/DefaultButton.scss +18 -15
  10. package/src/components/Collapsible/Collapsible.scss +4 -17
  11. package/src/components/Collapsible/Collapsible.vue +16 -13
  12. package/src/components/DialogFooter/DialogFooter.scss +30 -0
  13. package/src/components/DialogFooter/DialogFooter.vue +14 -11
  14. package/src/components/DialogFooter/IExtraButton.ts +9 -0
  15. package/src/components/Icon/Icon.vue +24 -6
  16. package/src/components/Icon/__tests__/Icon.spec.js +8 -0
  17. package/src/components/Logger/Logger.scss +22 -14
  18. package/src/components/Logger/Logger.stories.js +2 -4
  19. package/src/components/Logger/Logger.vue +37 -3
  20. package/src/components/Logger/LoggerItem/LoggerItem.stories.js +2 -2
  21. package/src/components/Logger/LoggerItem/LoggerItem.vue +12 -10
  22. package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +3 -3
  23. package/src/components/Logger/__tests__/Logger.spec.js +96 -0
  24. package/src/components/Stepper/StepperHeader/StepperHeader.scss +10 -8
  25. package/src/components/Stepper/StepperHeader/StepperHeader.stories.js +2 -4
  26. package/src/components/Stepper/StepperHeader/StepperHeader.vue +10 -8
  27. package/src/configurations/_functions.scss +5 -0
  28. package/src/configurations/_mixins.scss +5 -0
  29. package/src/configurations/_variables.scss +14 -1
  30. package/src/examples/Buttons.stories.js +10 -0
  31. package/src/examples/Icon.stories.js +6 -0
  32. package/src/examples/Logger/Logger.stories.js +12 -0
  33. package/src/examples/Stepper/StepperHeader.stories.js +10 -10
@@ -1,12 +1,12 @@
1
1
  $step-height: 64px;
2
2
 
3
3
  @mixin stepperHeaderStepColor($color) {
4
- i.mdi {
4
+ .farm-icon, .farm-icon__number {
5
5
  background-color: $color;
6
6
  border-color: $color;
7
7
  }
8
8
 
9
- i.mdi:before {
9
+ .farm-icon:before, .farm-icon__number {
10
10
  color: white;
11
11
  }
12
12
  }
@@ -43,12 +43,12 @@ $step-height: 64px;
43
43
  }
44
44
 
45
45
  &.stepper__header-step--next {
46
- i.mdi {
46
+ .farm-icon, .farm-icon__number {
47
47
  color: var(--v-gray-lighten1);
48
48
  }
49
49
  }
50
50
 
51
- span {
51
+ span:not(.farm-icon__number) {
52
52
  margin-top: 8px;
53
53
  text-align: center;
54
54
  }
@@ -78,7 +78,8 @@ $step-height: 64px;
78
78
  }
79
79
 
80
80
  &.stepper__header--vertical {
81
- display: block;
81
+ display: flex;
82
+ flex-direction: column;
82
83
 
83
84
  div.stepper__header-step {
84
85
  width: 100%;
@@ -86,11 +87,11 @@ $step-height: 64px;
86
87
  clear: both;
87
88
  height: 64px;
88
89
 
89
- i.mdi {
90
+ .farm-icon {
90
91
  float: left;
91
92
  }
92
93
 
93
- span {
94
+ span:not(.farm-icon__number) {
94
95
  display: flex;
95
96
  align-items: center;
96
97
  width: calc(100% - 40px);
@@ -130,7 +131,8 @@ $step-height: 64px;
130
131
  }
131
132
  }
132
133
 
133
- i.mdi {
134
+ .farm-icon,
135
+ .farm-icon__number {
134
136
  border: 1px solid var(--v-gray-lighten2);
135
137
  border-radius: 50%;
136
138
  width: 32px;
@@ -20,7 +20,7 @@ export default {
20
20
  };
21
21
 
22
22
  export const Primary = () => ({
23
- components: { StepperHeader },
23
+ components: { 'farm-stepper-header': StepperHeader },
24
24
  data() {
25
25
  return {
26
26
  steps: [
@@ -32,9 +32,7 @@ export const Primary = () => ({
32
32
  currentStep: 3,
33
33
  };
34
34
  },
35
- template: '<StepperHeader :steps="steps" :currentStep="currentStep" />',
35
+ template: '<farm-stepper-header :steps="steps" :currentStep="currentStep" />',
36
36
  });
37
37
 
38
38
  Primary.storyName = 'Básico';
39
-
40
- //
@@ -12,14 +12,12 @@
12
12
  }"
13
13
  :key="step.label"
14
14
  >
15
- <i
16
- :class="{
17
- mdi: true,
18
- ['mdi-' + step.icon]: true,
19
- }"
20
- >
21
- {{ step.icon ? '' : index + 1 }}
22
- </i>
15
+ <farm-icon v-if="step.icon">
16
+ {{ step.icon }}
17
+ </farm-icon>
18
+ <span v-else class="farm-icon__number">
19
+ {{ index + 1 }}
20
+ </span>
23
21
  <span>
24
22
  {{ step.label }}
25
23
  </span>
@@ -42,9 +40,13 @@
42
40
  <script lang="ts">
43
41
  import Vue, { PropType } from 'vue';
44
42
  import IStep from './IStep';
43
+ import Icon from '../../Icon';
45
44
 
46
45
  export default Vue.extend({
47
46
  name: 'farm-stepper-header',
47
+ components: {
48
+ 'farm-icon': Icon,
49
+ },
48
50
  props: {
49
51
  /**
50
52
  * Steps
@@ -0,0 +1,5 @@
1
+ @import './variables';
2
+
3
+ @function gutter($key: 'default') {
4
+ @return map-get($gutters, $key)
5
+ }
@@ -0,0 +1,5 @@
1
+ @mixin for-sm-breakpoint {
2
+ @media (max-width: 599px) {
3
+ @content;
4
+ }
5
+ }
@@ -1,2 +1,15 @@
1
1
  $colors: primary, secondary, error, extra, accent, info, success, gray, yellow, white;
2
- $sizes: ("xs": 12px, "sm": 16px , "md": 24px, "lg": 36px, "xl": 40px);
2
+ $sizes: (
3
+ "xs": 12px,
4
+ "sm": 16px,
5
+ "md": 24px,
6
+ "lg": 36px,
7
+ "xl": 40px
8
+ );
9
+ $gutters: (
10
+ "xs": 4px,
11
+ 'sm': 8px,
12
+ "default": 12px,
13
+ 'md': 16px,
14
+ "lg": 36px,
15
+ "xl": 40px);
@@ -43,6 +43,7 @@ export const OutlinedButtons = () => ({
43
43
  };
44
44
  },
45
45
  template: `<div class="buttons-container">
46
+ <h4>Outlined</h4>
46
47
  <farm-btn v-for="color of colors":key="color" :color="color" outlined>
47
48
  {{ color }}
48
49
  </farm-btn>
@@ -60,8 +61,17 @@ export const DisabledButtons = () => ({
60
61
  };
61
62
  },
62
63
  template: `<div class="buttons-container">
64
+ <h4>Default</h4>
63
65
  <farm-btn v-for="color of colors":key="color" :color="color" disabled>
64
66
  {{ color }}
67
+ </farm-btn>
68
+ <h4>Outlined</h4>
69
+ <farm-btn v-for="color of colors":key="color" :color="color" outlined disabled>
70
+ {{ color }}
71
+ </farm-btn>
72
+ <h4>Plain</h4>
73
+ <farm-btn v-for="color of colors":key="color" :color="color" plain disabled>
74
+ {{ color }}
65
75
  </farm-btn>
66
76
  </div>`,
67
77
  });
@@ -66,6 +66,12 @@ export const Sizes = () => ({
66
66
  book
67
67
  </farm-icon>
68
68
  Custom: 14px
69
+ </div>
70
+ <div>
71
+ <farm-icon size="14">
72
+ book
73
+ </farm-icon>
74
+ Custom: 14 (no unit, use px)
69
75
  </div>
70
76
  </div>`,
71
77
  });
@@ -38,6 +38,18 @@ export const Primary = () => ({
38
38
  formattedDate: '13/06/2022 20:40',
39
39
  status: 'success',
40
40
  },
41
+ {
42
+ message: 'Recusado entre as pré elegíveis',
43
+ userName: 'Cleyton Rasta',
44
+ formattedDate: '13/06/2022 20:40',
45
+ status: 'error',
46
+ },
47
+ {
48
+ message: 'Recusado entre as pré elegíveis',
49
+ userName: 'Cleyton Rasta',
50
+ formattedDate: '13/06/2022 20:40',
51
+ status: 'error',
52
+ },
41
53
  ],
42
54
  };
43
55
  },
@@ -21,18 +21,18 @@ export default {
21
21
  };
22
22
 
23
23
  export const Primary = () => ({
24
- components: { StepperHeader },
24
+ components: { 'farm-stepper-header': StepperHeader },
25
25
  data() {
26
26
  return {
27
27
  steps,
28
28
  currentStep: 3,
29
29
  };
30
30
  },
31
- template: '<StepperHeader :steps="steps" :currentStep="currentStep" />',
31
+ template: '<farm-stepper-header :steps="steps" :currentStep="currentStep" />',
32
32
  });
33
33
 
34
34
  export const Error = () => ({
35
- components: { StepperHeader },
35
+ components: { 'farm-stepper-header': StepperHeader },
36
36
  data() {
37
37
  return {
38
38
  steps,
@@ -40,22 +40,22 @@ export const Error = () => ({
40
40
  };
41
41
  },
42
42
  template:
43
- '<StepperHeader :steps="steps" :currentStep="currentStep" :errorCurrentStepStatus="true" />',
43
+ '<farm-stepper-header :steps="steps" :currentStep="currentStep" :errorCurrentStepStatus="true" />',
44
44
  });
45
45
 
46
46
  export const Vertical = () => ({
47
- components: { StepperHeader },
47
+ components: { 'farm-stepper-header': StepperHeader },
48
48
  data() {
49
49
  return {
50
50
  steps,
51
51
  currentStep: 3,
52
52
  };
53
53
  },
54
- template: '<StepperHeader :steps="steps" :currentStep="currentStep" vertical />',
54
+ template: '<farm-stepper-header :steps="steps" :currentStep="currentStep" vertical />',
55
55
  });
56
56
 
57
57
  export const VerticalError = () => ({
58
- components: { StepperHeader },
58
+ components: { 'farm-stepper-header': StepperHeader },
59
59
  data() {
60
60
  return {
61
61
  steps,
@@ -63,11 +63,11 @@ export const VerticalError = () => ({
63
63
  };
64
64
  },
65
65
  template:
66
- '<StepperHeader :steps="steps" :currentStep="currentStep" vertical :errorCurrentStepStatus="true" />',
66
+ '<farm-stepper-header :steps="steps" :currentStep="currentStep" vertical :errorCurrentStepStatus="true" />',
67
67
  });
68
68
 
69
69
  export const Numbers = () => ({
70
- components: { StepperHeader },
70
+ components: { 'farm-stepper-header': StepperHeader },
71
71
  data() {
72
72
  return {
73
73
  steps: [
@@ -79,7 +79,7 @@ export const Numbers = () => ({
79
79
  currentStep: 2,
80
80
  };
81
81
  },
82
- template: '<StepperHeader :steps="steps" :currentStep="currentStep" />',
82
+ template: '<farm-stepper-header :steps="steps" :currentStep="currentStep" />',
83
83
  });
84
84
 
85
85
  Primary.story = {