@farm-investimentos/front-mfe-components 14.2.0 → 14.2.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/dist/front-mfe-components.common.js +5280 -6611
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +2 -2
- package/dist/front-mfe-components.umd.js +5280 -6611
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +22 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +45 -12
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +1 -1
- package/src/components/Buttons/ExportButton/ExportButton.vue +2 -1
- package/src/components/ContextMenu/ContextMenu.stories.js +39 -26
- package/src/components/ContextMenu/ContextMenu.vue +8 -1
- package/src/components/DataTableHeader/DataTableHeader.scss +5 -3
- package/src/components/DataTableHeader/DataTableHeader.vue +2 -1
- package/src/components/DatePicker/DatePicker.vue +2 -3
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +1 -1
- package/src/components/ListItem/ListItem.stories.js +24 -13
- package/src/components/RangeDatePicker/RangeDatePicker.vue +0 -2
- package/src/components/Select/Select.vue +5 -1
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +35 -36
- package/src/components/TableContextMenu/TableContextMenu.vue +2 -1
- package/src/components/Tabs/Tabs.scss +58 -0
- package/src/components/Tabs/Tabs.stories.js +51 -4
- package/src/components/Tabs/Tabs.vue +30 -24
- package/src/components/Tabs/__tests__/Tabs.spec.js +54 -54
- package/src/components/Tabs/index.ts +1 -0
- package/src/main.ts +1 -2
- package/src/scss/Sticky-table.scss +20 -3
package/package.json
CHANGED
|
@@ -37,7 +37,8 @@ $butonSizes: (
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@each $size,
|
|
40
|
+
@each $size,
|
|
41
|
+
$value in $sizes {
|
|
41
42
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
42
43
|
font-size: $value;
|
|
43
44
|
height: map-get($butonSizes, $size);
|
|
@@ -125,7 +126,8 @@ $butonSizes: (
|
|
|
125
126
|
|
|
126
127
|
.farm-btn.farm-btn--icon {
|
|
127
128
|
border: none;
|
|
128
|
-
background: transparent;
|
|
129
|
+
background: transparent !important;
|
|
130
|
+
border: transparent !important;
|
|
129
131
|
transition: color 0.5s ease;
|
|
130
132
|
|
|
131
133
|
min-width: auto;
|
|
@@ -135,7 +137,8 @@ $butonSizes: (
|
|
|
135
137
|
color: gray;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
@each $size,
|
|
140
|
+
@each $size,
|
|
141
|
+
$value in $sizes {
|
|
139
142
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
140
143
|
font-size: $value;
|
|
141
144
|
}
|
|
@@ -157,26 +160,26 @@ $butonSizes: (
|
|
|
157
160
|
color: var(--farm-#{$color}-base);
|
|
158
161
|
}
|
|
159
162
|
|
|
160
|
-
|
|
163
|
+
.farm-btn__content :deep(i.mdi) {
|
|
161
164
|
color: var(--farm-#{$color}-base);
|
|
162
165
|
}
|
|
163
166
|
|
|
164
|
-
&.
|
|
167
|
+
&.farm-btn--variation-lighten {
|
|
165
168
|
&:hover {
|
|
166
169
|
color: var(--farm-#{$color}-lighten);
|
|
167
170
|
}
|
|
168
171
|
|
|
169
|
-
|
|
172
|
+
.farm-btn__content :deep(i.mdi) {
|
|
170
173
|
color: var(--farm-#{$color}-lighten);
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
|
|
174
|
-
&.
|
|
177
|
+
&.farm-btn--variation-darken {
|
|
175
178
|
&:hover {
|
|
176
179
|
color: var(--farm-#{$color}-darken);
|
|
177
180
|
}
|
|
178
181
|
|
|
179
|
-
|
|
182
|
+
.farm-btn__content :deep(i.mdi) {
|
|
180
183
|
color: var(--farm-#{$color}-darken);
|
|
181
184
|
}
|
|
182
185
|
}
|
|
@@ -207,6 +210,16 @@ $butonSizes: (
|
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
}
|
|
213
|
+
|
|
214
|
+
&.farm-btn--variation-lighten {
|
|
215
|
+
border: 1px solid var(--farm-#{$color}-lighten);
|
|
216
|
+
background-color: var(--farm-#{$color}-lighten);
|
|
217
|
+
color: var(--farm-text-primary);
|
|
218
|
+
}
|
|
219
|
+
&.farm-btn--variation-darken {
|
|
220
|
+
border: 1px solid var(--farm-#{$color}-darken);
|
|
221
|
+
background-color: var(--farm-#{$color}-darken);
|
|
222
|
+
}
|
|
210
223
|
}
|
|
211
224
|
|
|
212
225
|
.farm-btn--extra,
|
|
@@ -286,4 +299,4 @@ $butonSizes: (
|
|
|
286
299
|
width: 100%;
|
|
287
300
|
margin: 0;
|
|
288
301
|
}
|
|
289
|
-
}
|
|
302
|
+
}
|
|
@@ -92,11 +92,31 @@ export const ActiveButtons = () => ({
|
|
|
92
92
|
colors,
|
|
93
93
|
};
|
|
94
94
|
},
|
|
95
|
-
template: `<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
template: `<farm-box>
|
|
96
|
+
<farm-row>
|
|
97
|
+
|
|
98
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
99
|
+
Base
|
|
100
|
+
<farm-btn v-for="color of colors":key="'random_9_' + color" :color="color" class="mb-2">
|
|
101
|
+
{{ color }}
|
|
102
|
+
</farm-btn>
|
|
103
|
+
</farm-col>
|
|
104
|
+
|
|
105
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
106
|
+
Lighten
|
|
107
|
+
<farm-btn v-for="color of colors":key="'random_9_lighten_' + color" :color="color" variation="lighten" class="mb-2">
|
|
108
|
+
{{ color }}
|
|
109
|
+
</farm-btn>
|
|
110
|
+
</farm-col>
|
|
111
|
+
|
|
112
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
113
|
+
Darken
|
|
114
|
+
<farm-btn v-for="color of colors":key="'random_9_darken_' + color" :color="color" variation="darken" class="mb-2">
|
|
115
|
+
{{ color }}
|
|
116
|
+
</farm-btn>
|
|
117
|
+
</farm-col>
|
|
118
|
+
<farm-row>
|
|
119
|
+
</farm-box>`,
|
|
100
120
|
});
|
|
101
121
|
|
|
102
122
|
export const OutlinedButtons = () => ({
|
|
@@ -195,28 +215,41 @@ export const Iconed = () => ({
|
|
|
195
215
|
colors: [...colors, 'white'],
|
|
196
216
|
};
|
|
197
217
|
},
|
|
198
|
-
template: `<
|
|
199
|
-
|
|
218
|
+
template: `<farm-box>
|
|
219
|
+
<farm-row>
|
|
220
|
+
|
|
221
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
222
|
+
Base
|
|
200
223
|
<farm-btn icon v-for="color of colors" :key="'random_2_' + color" :color="color">
|
|
201
224
|
<farm-icon>book</farm-icon>
|
|
202
225
|
</farm-btn>
|
|
226
|
+
</farm-col>
|
|
227
|
+
|
|
228
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
203
229
|
|
|
204
|
-
<h4>Darken
|
|
230
|
+
<h4>Darken</h4>
|
|
205
231
|
<farm-btn icon v-for="color of colors" :key="'random_2_' + color" :color="color" variation="darken">
|
|
206
232
|
<farm-icon>book</farm-icon>
|
|
207
233
|
</farm-btn>
|
|
234
|
+
</farm-col>
|
|
235
|
+
|
|
236
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
208
237
|
|
|
209
|
-
<h4>Lighten
|
|
238
|
+
<h4>Lighten </h4>
|
|
210
239
|
<farm-btn icon v-for="color of colors" :key="'random_2_' + color" :color="color" variation="lighten">
|
|
211
240
|
<farm-icon>book</farm-icon>
|
|
212
241
|
</farm-btn>
|
|
242
|
+
</farm-col>
|
|
243
|
+
|
|
244
|
+
<farm-col cols="12" md="3" class="d-flex flex-column">
|
|
213
245
|
|
|
214
|
-
<h4>Disabled
|
|
246
|
+
<h4>Disabled</h4>
|
|
215
247
|
<farm-btn icon v-for="color of colors" :key="'disabled_random_2_' + color" :color="color" :disabled="true">
|
|
216
248
|
<farm-icon>book</farm-icon>
|
|
217
249
|
</farm-btn>
|
|
218
|
-
|
|
219
|
-
</
|
|
250
|
+
</farm-col>
|
|
251
|
+
</farm-row>
|
|
252
|
+
</farm-box>`,
|
|
220
253
|
});
|
|
221
254
|
|
|
222
255
|
export const Rounded = () => ({
|
|
@@ -112,7 +112,7 @@ export default Vue.extend({
|
|
|
112
112
|
'farm-btn--icon': this.icon,
|
|
113
113
|
'farm-btn--full': this.full,
|
|
114
114
|
['farm-btn--' + this.color]: true,
|
|
115
|
-
[
|
|
115
|
+
['farm-btn--variation-' + this.variation]: true,
|
|
116
116
|
...obj,
|
|
117
117
|
};
|
|
118
118
|
},
|
|
@@ -67,27 +67,6 @@ export const IconActivator = () => ({
|
|
|
67
67
|
</div>`,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
export const VModel = () => ({
|
|
71
|
-
data() {
|
|
72
|
-
return {
|
|
73
|
-
value: false,
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
methods: {
|
|
77
|
-
toggleValue() {
|
|
78
|
-
this.value = !this.value;
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex;">
|
|
82
|
-
<farm-contextmenu v-model="value">
|
|
83
|
-
some text
|
|
84
|
-
<template v-slot:activator="{ on, attrs }">
|
|
85
|
-
<farm-btn @click="toggleValue">toggle</farm-btn>
|
|
86
|
-
</template>
|
|
87
|
-
</farm-contextmenu>
|
|
88
|
-
</div>`,
|
|
89
|
-
});
|
|
90
|
-
|
|
91
70
|
export const LongContent = () => ({
|
|
92
71
|
data() {
|
|
93
72
|
return {
|
|
@@ -95,8 +74,9 @@ export const LongContent = () => ({
|
|
|
95
74
|
};
|
|
96
75
|
},
|
|
97
76
|
methods: {
|
|
98
|
-
toggleValue() {
|
|
77
|
+
toggleValue(event) {
|
|
99
78
|
this.value = !this.value;
|
|
79
|
+
event.stopPropagation();
|
|
100
80
|
},
|
|
101
81
|
},
|
|
102
82
|
template: `<div style="padding-left: 120px; padding-top: 80px;">
|
|
@@ -117,8 +97,9 @@ export const Bottom = () => ({
|
|
|
117
97
|
};
|
|
118
98
|
},
|
|
119
99
|
methods: {
|
|
120
|
-
toggleValue() {
|
|
100
|
+
toggleValue(event) {
|
|
121
101
|
this.value = !this.value;
|
|
102
|
+
event.stopPropagation();
|
|
122
103
|
},
|
|
123
104
|
},
|
|
124
105
|
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex;">
|
|
@@ -138,8 +119,9 @@ export const ComplexContent = () => ({
|
|
|
138
119
|
};
|
|
139
120
|
},
|
|
140
121
|
methods: {
|
|
141
|
-
toggleValue() {
|
|
122
|
+
toggleValue(event) {
|
|
142
123
|
this.value = !this.value;
|
|
124
|
+
event.stopPropagation();
|
|
143
125
|
},
|
|
144
126
|
},
|
|
145
127
|
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex;">
|
|
@@ -159,8 +141,9 @@ export const OverflowContent = () => ({
|
|
|
159
141
|
};
|
|
160
142
|
},
|
|
161
143
|
methods: {
|
|
162
|
-
toggleValue() {
|
|
144
|
+
toggleValue(event) {
|
|
163
145
|
this.value = !this.value;
|
|
146
|
+
event.stopPropagation();
|
|
164
147
|
},
|
|
165
148
|
},
|
|
166
149
|
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex; flex-direction: column">
|
|
@@ -190,8 +173,9 @@ export const MaxHeight = () => ({
|
|
|
190
173
|
};
|
|
191
174
|
},
|
|
192
175
|
methods: {
|
|
193
|
-
toggleValue() {
|
|
176
|
+
toggleValue(event) {
|
|
194
177
|
this.value = !this.value;
|
|
178
|
+
event.stopPropagation();
|
|
195
179
|
},
|
|
196
180
|
},
|
|
197
181
|
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex; flex-direction: column;">
|
|
@@ -210,3 +194,32 @@ export const MaxHeight = () => ({
|
|
|
210
194
|
</farm-contextmenu>
|
|
211
195
|
</div>`,
|
|
212
196
|
});
|
|
197
|
+
|
|
198
|
+
export const VModel = () => ({
|
|
199
|
+
data() {
|
|
200
|
+
return {
|
|
201
|
+
value: false,
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
methods: {
|
|
205
|
+
toggleValue(event) {
|
|
206
|
+
this.value = true;
|
|
207
|
+
|
|
208
|
+
setTimeout(() => {
|
|
209
|
+
this.value = false;
|
|
210
|
+
}, 2000);
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
event.stopPropagation();
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
template: `<div style="padding-left: 120px; padding-top: 80px; display: flex;">
|
|
216
|
+
<farm-contextmenu bottom v-model="value">
|
|
217
|
+
some text
|
|
218
|
+
<template v-slot:activator="{ on, attrs }">
|
|
219
|
+
<farm-btn :disabled="value" @click="toggleValue">
|
|
220
|
+
{{ !value ? 'Open' : 'Will close in 2s' }}
|
|
221
|
+
</farm-btn>
|
|
222
|
+
</template>
|
|
223
|
+
</farm-contextmenu>
|
|
224
|
+
</div>`,
|
|
225
|
+
});
|
|
@@ -74,7 +74,7 @@ export default Vue.extend({
|
|
|
74
74
|
} as any);
|
|
75
75
|
|
|
76
76
|
const inputValue = ref(props.value);
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
let hasBeenBoostrapped = false;
|
|
79
79
|
|
|
80
80
|
const outClick = event => {
|
|
@@ -97,6 +97,13 @@ export default Vue.extend({
|
|
|
97
97
|
calculatePosition();
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
watch(
|
|
101
|
+
() => props.value,
|
|
102
|
+
newValue => {
|
|
103
|
+
inputValue.value = newValue;
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
|
|
100
107
|
watch(
|
|
101
108
|
() => inputValue.value,
|
|
102
109
|
newValue => {
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
th.sortable {
|
|
21
21
|
cursor: pointer;
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
&:not(.active) {
|
|
25
23
|
&:hover {
|
|
26
24
|
.farm-icon::before {
|
|
@@ -38,7 +36,7 @@ th.sortable {
|
|
|
38
36
|
th span.span-checkbox {
|
|
39
37
|
display: flex;
|
|
40
38
|
justify-content: flex-start;
|
|
41
|
-
padding-left:
|
|
39
|
+
padding-left: 0;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
thead {
|
|
@@ -51,6 +49,10 @@ th {
|
|
|
51
49
|
font-weight: 700;
|
|
52
50
|
text-transform: uppercase;
|
|
53
51
|
box-shadow: 0px -1px 0px var(--farm-gray-lighten), 0px 1px 0px var(--farm-gray-lighten);
|
|
52
|
+
&.checkbox-container {
|
|
53
|
+
width: 60px !important;
|
|
54
|
+
min-width: 60px !important;
|
|
55
|
+
}
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
:deep(.mdi-sort-descending)::before {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
item.sortable ? 'sortable' : '',
|
|
9
9
|
sortClick[$index].clicked ? 'active' : '',
|
|
10
10
|
item.sortable ? (sortClick[$index].descending === 'DESC' ? 'DESC' : 'ASC') : '',
|
|
11
|
+
showCheckbox && $index == 0 ? 'checkbox-container' : ''
|
|
11
12
|
]"
|
|
12
13
|
v-bind:style="{
|
|
13
14
|
textAlign: item.align ? item.align : '',
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
|
|
37
38
|
<span v-if="isTHDataTableSelect(item) && showCheckbox" class="span-checkbox">
|
|
38
39
|
<farm-checkbox
|
|
39
|
-
size="
|
|
40
|
+
size="sm"
|
|
40
41
|
v-model="inputVal"
|
|
41
42
|
:value="true"
|
|
42
43
|
:indeterminate="headerProps.someItems && !headerProps.everyItem"
|
|
@@ -46,8 +46,6 @@
|
|
|
46
46
|
:id="inputId"
|
|
47
47
|
:rules="[checkMax, checkMin, checkRequire]"
|
|
48
48
|
@keyup="keyUpInput"
|
|
49
|
-
@click="openDatepicker"
|
|
50
|
-
@onClickIcon="openDatepicker"
|
|
51
49
|
/>
|
|
52
50
|
</template>
|
|
53
51
|
</farm-contextmenu>
|
|
@@ -192,8 +190,9 @@ export default Vue.extend({
|
|
|
192
190
|
const arr = onlyDMY.split('/');
|
|
193
191
|
return new Date(arr[2], arr[1] - 1, arr[0]);
|
|
194
192
|
},
|
|
195
|
-
openDatepicker() {
|
|
193
|
+
openDatepicker(event: MouseEvent) {
|
|
196
194
|
this.menuField = true;
|
|
195
|
+
event.stopPropagation();
|
|
197
196
|
},
|
|
198
197
|
closeDatepicker() {
|
|
199
198
|
this.menuField = false;
|
|
@@ -23,7 +23,9 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const Primary = () => ({
|
|
26
|
-
template:
|
|
26
|
+
template: `<farm-listitem>
|
|
27
|
+
Item
|
|
28
|
+
</farm-listitem>`,
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
export const HoverColors = () => ({
|
|
@@ -33,8 +35,16 @@ export const HoverColors = () => ({
|
|
|
33
35
|
variations,
|
|
34
36
|
};
|
|
35
37
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
methods: {
|
|
39
|
+
getIconVariation(variation) {
|
|
40
|
+
if (variation === 'base' || variation === 'lighten') {
|
|
41
|
+
return 'darken';
|
|
42
|
+
}
|
|
43
|
+
return 'base';
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
template: `<farm-row>
|
|
47
|
+
<farm-col v-for="color in colors" :key="color" cols="12" md="4" class="mb-4">
|
|
38
48
|
<h4>{{ color }}</h4>
|
|
39
49
|
<farm-listitem
|
|
40
50
|
v-for="variation in variations"
|
|
@@ -42,24 +52,25 @@ export const HoverColors = () => ({
|
|
|
42
52
|
:hoverColor="color"
|
|
43
53
|
:hoverColorVariation="variation"
|
|
44
54
|
>
|
|
55
|
+
<farm-icon
|
|
56
|
+
:color="color"
|
|
57
|
+
:variation="getIconVariation(variation)"
|
|
58
|
+
>
|
|
59
|
+
book
|
|
60
|
+
</farm-icon>
|
|
45
61
|
{{ color }} {{ variation }}
|
|
46
62
|
</farm-listitem>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
63
|
+
</farm-col>
|
|
64
|
+
</farm-row>`,
|
|
49
65
|
});
|
|
50
66
|
|
|
51
|
-
export const
|
|
52
|
-
template: '<farm-listitem clickable>Clickable cursor</farm-listitem>',
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export const ClickListener = () => ({
|
|
67
|
+
export const Clickable = () => ({
|
|
56
68
|
methods: {
|
|
57
69
|
onClick() {
|
|
58
70
|
alert('Clicked');
|
|
59
|
-
}
|
|
71
|
+
},
|
|
60
72
|
},
|
|
61
|
-
template:
|
|
62
|
-
`<farm-listitem
|
|
73
|
+
template: `<farm-listitem
|
|
63
74
|
clickable
|
|
64
75
|
hoverColor="error"
|
|
65
76
|
hoverColorVariation="lighten"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
83
|
<script lang="ts">
|
|
84
|
-
import Vue, { computed, onBeforeMount, PropType, toRefs, watch } from 'vue';
|
|
84
|
+
import Vue, { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
85
85
|
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
86
86
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
87
87
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
@@ -396,6 +396,9 @@ export default Vue.extend({
|
|
|
396
396
|
);
|
|
397
397
|
};
|
|
398
398
|
|
|
399
|
+
const contextmenu = ref(null);
|
|
400
|
+
|
|
401
|
+
|
|
399
402
|
return {
|
|
400
403
|
items,
|
|
401
404
|
innerValue,
|
|
@@ -410,6 +413,7 @@ export default Vue.extend({
|
|
|
410
413
|
isVisible,
|
|
411
414
|
customId,
|
|
412
415
|
showErrorText,
|
|
416
|
+
contextmenu,
|
|
413
417
|
validate,
|
|
414
418
|
reset,
|
|
415
419
|
selectItem,
|
|
@@ -64,42 +64,41 @@ export default Vue.extend({
|
|
|
64
64
|
*/
|
|
65
65
|
errorCurrentStepStatus: { type: Boolean, default: false },
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
isStepCurrent(index: number)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
67
|
+
setup(props) {
|
|
68
|
+
const isStepCurrent = (index: number) => props.currentStep === index + 1;
|
|
69
|
+
|
|
70
|
+
const isStepPrevious = (index: number) => props.currentStep > index + 1;
|
|
71
|
+
|
|
72
|
+
const isStepError = (index: number) =>
|
|
73
|
+
props.currentStep === index + 1 && props.errorCurrentStepStatus;
|
|
74
|
+
|
|
75
|
+
const hasDivider = (index: number) => index < props.steps.length - 1;
|
|
76
|
+
|
|
77
|
+
const isStepPreviousToCurrent = (index: number) =>
|
|
78
|
+
index + 2 === props.currentStep && isStepCurrent(index + 1) && !isStepError(index + 1);
|
|
79
|
+
|
|
80
|
+
const isStepPreviousToError = (index: number) =>
|
|
81
|
+
index + 2 === props.currentStep && isStepCurrent(index + 1) && isStepError(index + 1);
|
|
82
|
+
|
|
83
|
+
const isStepNext = (index: number) => index + 1 > props.currentStep;
|
|
84
|
+
|
|
85
|
+
const isStepErrorToNext = (index: number) =>
|
|
86
|
+
props.errorCurrentStepStatus && index + 1 === props.currentStep;
|
|
87
|
+
|
|
88
|
+
const isStepCurrentToNext = (index: number) =>
|
|
89
|
+
!props.errorCurrentStepStatus && index + 1 === props.currentStep;
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
isStepCurrent,
|
|
93
|
+
isStepPrevious,
|
|
94
|
+
isStepError,
|
|
95
|
+
isStepPreviousToCurrent,
|
|
96
|
+
isStepPreviousToError,
|
|
97
|
+
isStepNext,
|
|
98
|
+
isStepErrorToNext,
|
|
99
|
+
isStepCurrentToNext,
|
|
100
|
+
hasDivider,
|
|
101
|
+
};
|
|
103
102
|
},
|
|
104
103
|
});
|
|
105
104
|
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.tabs {
|
|
2
|
+
display: flex;
|
|
3
|
+
|
|
4
|
+
&__tab {
|
|
5
|
+
border-bottom: 1px solid var(--farm-gray-lighten);
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
padding: 16px 24px;
|
|
9
|
+
height: 54px;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background-color: var(--farm-neutral-lighten);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
span {
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&--selected {
|
|
20
|
+
border-bottom: 4px solid var(--farm-primary-base);
|
|
21
|
+
transition: border-bottom 0.2s ease-in-out;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
background-color: var(--farm-primary-lighten);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
span {
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--disabled {
|
|
34
|
+
.tabs__tab {
|
|
35
|
+
cursor: default;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--selected {
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
div.rounded-circle {
|
|
51
|
+
background-color: var(--farm-gray-lighten);
|
|
52
|
+
width: 24px;
|
|
53
|
+
height: 24px;
|
|
54
|
+
|
|
55
|
+
&.is-selected {
|
|
56
|
+
background-color: var(--farm-primary-base);
|
|
57
|
+
}
|
|
58
|
+
}
|