@farm-investimentos/front-mfe-components 5.2.2 → 5.2.3

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": "@farm-investimentos/front-mfe-components",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -42,6 +42,12 @@ $step-height: 64px;
42
42
  @include stepperHeaderStepColor(var(--v-error-base));
43
43
  }
44
44
 
45
+ &.stepper__header-step--next {
46
+ i.mdi {
47
+ color: var(--v-gray-lighten1);
48
+ }
49
+ }
50
+
45
51
  span {
46
52
  margin-top: 8px;
47
53
  text-align: center;
@@ -110,19 +116,15 @@ $step-height: 64px;
110
116
  }
111
117
 
112
118
  &.stepper__divider--previous-to-current {
113
- background: linear-gradient(
114
- to bottom,
115
- var(--v-secondary-base),
116
- var(--v-accent-base)
117
- );
119
+ background: linear-gradient(to bottom,
120
+ var(--v-secondary-base),
121
+ var(--v-accent-base));
118
122
  }
119
123
 
120
124
  &.stepper__divider--previous-to-error {
121
- background: linear-gradient(
122
- to bottom,
123
- var(--v-secondary-base),
124
- var(--v-error-base)
125
- );
125
+ background: linear-gradient(to bottom,
126
+ var(--v-secondary-base),
127
+ var(--v-error-base));
126
128
  }
127
129
  }
128
130
  }
@@ -133,14 +135,15 @@ i.mdi {
133
135
  border-radius: 50%;
134
136
  width: 32px;
135
137
  height: 32px;
136
- display: block;
137
138
 
138
139
  display: flex;
139
140
  align-items: center;
140
141
  justify-content: center;
142
+ color: white;
143
+ font-style: normal;
141
144
 
142
145
  &:before {
143
146
  font-size: 16px;
144
147
  color: var(--v-gray-lighten1);
145
148
  }
146
- }
149
+ }
@@ -8,6 +8,7 @@
8
8
  'stepper__header-step--current': isStepCurrent(index),
9
9
  'stepper__header-step--previous': isStepPrevious(index),
10
10
  'stepper__header-step--error': isStepError(index),
11
+ 'stepper__header-step--next': isStepNext(index),
11
12
  }"
12
13
  :key="step.label"
13
14
  >
@@ -16,8 +17,9 @@
16
17
  mdi: true,
17
18
  ['mdi-' + step.icon]: true,
18
19
  }"
19
- v-if="step.icon"
20
- />
20
+ >
21
+ {{ step.icon ? '' : index + 1 }}
22
+ </i>
21
23
  <span>
22
24
  {{ step.label }}
23
25
  </span>
@@ -89,6 +91,9 @@ export default Vue.extend({
89
91
  this.isStepError(index + 1)
90
92
  );
91
93
  },
94
+ isStepNext(index: number): boolean {
95
+ return index + 1 > this.currentStep;
96
+ },
92
97
  },
93
98
  });
94
99
  </script>
@@ -43,5 +43,12 @@ describe('StepperHeader component', () => {
43
43
  expect(component.hasDivider(4)).toBeFalsy();
44
44
  expect(component.hasDivider(1)).toBeTruthy();
45
45
  });
46
+
47
+ it('Should check if step is next', () => {
48
+ expect(component.isStepNext(4)).toBeTruthy();
49
+ expect(component.isStepNext(1)).toBeFalsy();
50
+ });
51
+
52
+
46
53
  });
47
54
  });
@@ -62,7 +62,24 @@ export const VerticalError = () => ({
62
62
  currentStep: 3,
63
63
  };
64
64
  },
65
- template: '<StepperHeader :steps="steps" :currentStep="currentStep" vertical :errorCurrentStepStatus="true" />',
65
+ template:
66
+ '<StepperHeader :steps="steps" :currentStep="currentStep" vertical :errorCurrentStepStatus="true" />',
67
+ });
68
+
69
+ export const Numbers = () => ({
70
+ components: { StepperHeader },
71
+ data() {
72
+ return {
73
+ steps: [
74
+ { label: 'Solicitação de limite' },
75
+ { label: 'Lista impeditiva' },
76
+ { label: 'Lista pré-elegíveis' },
77
+ { label: 'Fila de compliance' },
78
+ ],
79
+ currentStep: 2,
80
+ };
81
+ },
82
+ template: '<StepperHeader :steps="steps" :currentStep="currentStep" />',
66
83
  });
67
84
 
68
85
  Primary.story = {
@@ -77,3 +94,6 @@ Error.story = {
77
94
  VerticalError.story = {
78
95
  name: 'Vertical Error',
79
96
  };
97
+ Numbers.story = {
98
+ name: 'Numbers',
99
+ };