@farm-investimentos/front-mfe-components 10.1.3 → 11.0.0
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 +2924 -2929
- 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 +2924 -2929
- 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/AlertReload/AlertReload.vue +1 -1
- package/src/components/ButtonToggle/ButtonToggle.vue +1 -1
- package/src/components/Buttons/ConfirmButton/ConfirmButton.vue +1 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +12 -11
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +10 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +7 -7
- package/src/components/Buttons/ExportButton/ExportButton.vue +2 -0
- package/src/components/Buttons/ImportButton/ImportButton.scss +1 -2
- package/src/components/Buttons/ImportButton/ImportButton.vue +1 -1
- package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +1 -0
- package/src/components/Buttons/ToggleButton/ToggleButton.vue +1 -1
- package/src/components/CopyToClipboard/CopyToClipboard.vue +1 -1
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.scss +20 -0
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +13 -2
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.vue +14 -39
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +4 -32
- package/src/components/DatePicker/DatePicker.vue +7 -11
- package/src/components/DialogFooter/DialogFooter.vue +2 -2
- package/src/components/IdCaption/IdCaption.vue +1 -1
- package/src/components/Logger/Logger.scss +4 -4
- package/src/components/Logger/LoggerItem/LoggerItem.scss +5 -5
- package/src/components/Logger/LoggerItem/LoggerItem.vue +6 -5
- package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +2 -2
- package/src/components/MainFilter/MainFilter.vue +0 -1
- package/src/components/ModalPromptUser/ModalPromptUser.vue +1 -1
- package/src/components/RangeDatePicker/RangeDatePicker.vue +3 -3
- package/src/components/TableContextMenu/TableContextMenu.scss +2 -1
- package/src/components/TableContextMenu/TableContextMenu.vue +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import '../../../configurations/variables';
|
|
2
2
|
@import '../../../configurations/mixins';
|
|
3
|
+
@import '../../../configurations/theme-colors';
|
|
3
4
|
|
|
4
5
|
.farm-btn {
|
|
5
6
|
font-size: 14px;
|
|
@@ -137,23 +138,23 @@
|
|
|
137
138
|
height: 64px;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
@each $color in $colors {
|
|
141
|
+
@each $color in $theme-colors-list {
|
|
141
142
|
&#{'.farm-btn--' + $color}:not(.farm-btn--disabled) {
|
|
142
143
|
&:hover {
|
|
143
|
-
color: var(--
|
|
144
|
+
color: var(--farm-#{$color}-base);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
i.mdi {
|
|
147
|
-
color: var(--
|
|
148
|
+
color: var(--farm-#{$color}-base);
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
|
|
153
|
-
@each $color in $colors {
|
|
154
|
+
@each $color in $theme-colors-list {
|
|
154
155
|
#{'.farm-btn--' + $color} {
|
|
155
|
-
border: 1px solid var(--
|
|
156
|
-
background-color: var(--
|
|
156
|
+
border: 1px solid var(--farm-#{$color}-base);
|
|
157
|
+
background-color: var(--farm-#{$color}-base);
|
|
157
158
|
color: white;
|
|
158
159
|
|
|
159
160
|
::v-deep .farm-btn__content {
|
|
@@ -175,9 +176,9 @@
|
|
|
175
176
|
|
|
176
177
|
:not(.farm-btn--disabled) {
|
|
177
178
|
&.farm-btn--outlined#{'.farm-btn--' + $color} {
|
|
178
|
-
border: 1px solid var(--
|
|
179
|
+
border: 1px solid var(--farm-#{$color}-base);
|
|
179
180
|
background: white;
|
|
180
|
-
color: var(--
|
|
181
|
+
color: var(--farm-#{$color}-base);
|
|
181
182
|
|
|
182
183
|
&.farm-btn--extra,
|
|
183
184
|
&.farm-btn--white {
|
|
@@ -186,14 +187,14 @@
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
.farm-btn__content i.mdi {
|
|
189
|
-
color: var(--
|
|
190
|
+
color: var(--farm-#{$color}-base);
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
&.farm-btn--plain#{'.farm-btn--' + $color} {
|
|
194
195
|
border: none;
|
|
195
196
|
background: white;
|
|
196
|
-
color: var(--
|
|
197
|
+
color: var(--farm-#{$color}-base);
|
|
197
198
|
|
|
198
199
|
&.farm-btn--extra,
|
|
199
200
|
&.farm-btn--white {
|
|
@@ -205,7 +206,7 @@
|
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
.farm-btn__content i.mdi {
|
|
208
|
-
color: var(--
|
|
209
|
+
color: var(--farm-#{$color}-base);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import DefaultButton from './DefaultButton.vue';
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
3
|
+
import baseThemeColors from '../../../configurations/_theme-colors-base.scss';
|
|
4
|
+
const colors = Object.keys(baseThemeColors);
|
|
4
5
|
import './Buttons.stories.scss';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: 'Buttons/Default',
|
|
8
9
|
component: DefaultButton,
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
decorators: [withDesign],
|
|
11
12
|
parameters: {
|
|
12
13
|
docs: {
|
|
13
14
|
description: {
|
|
@@ -198,31 +199,31 @@ export const Sizes = () => ({
|
|
|
198
199
|
template: `<div>
|
|
199
200
|
<h4>Default</h4>
|
|
200
201
|
<div :style="styles">
|
|
201
|
-
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'default_' + size" :size="size"
|
|
202
|
+
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'default_' + size" :size="size">
|
|
202
203
|
{{ size }}
|
|
203
204
|
</farm-btn>
|
|
204
205
|
</div>
|
|
205
206
|
<h4>Outlined</h4>
|
|
206
207
|
<div :style="styles">
|
|
207
|
-
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'outlined_' + size" :size="size"
|
|
208
|
+
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'outlined_' + size" :size="size" outlined>
|
|
208
209
|
{{ size }}
|
|
209
210
|
</farm-btn>
|
|
210
211
|
</div>
|
|
211
212
|
<h4>Plain</h4>
|
|
212
213
|
<div :style="styles">
|
|
213
|
-
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'plain_' + size" :size="size"
|
|
214
|
+
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'plain_' + size" :size="size" plain>
|
|
214
215
|
{{ size }}
|
|
215
216
|
</farm-btn>
|
|
216
217
|
</div>
|
|
217
218
|
<h4>Rounded</h4>
|
|
218
219
|
<div :style="styles">
|
|
219
|
-
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'rouned_' + size" :size="size"
|
|
220
|
+
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'rouned_' + size" :size="size" rounded>
|
|
220
221
|
{{ size }}
|
|
221
222
|
</farm-btn>
|
|
222
223
|
</div>
|
|
223
224
|
<h4>Icon</h4>
|
|
224
225
|
<div :style="styles">
|
|
225
|
-
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'icon_' + size"
|
|
226
|
+
<farm-btn v-for="size of sizes" :style="styles.farmBtn" :key="'icon_' + size" :size="size" icon>
|
|
226
227
|
<farm-icon :size="size">book</farm-icon>
|
|
227
228
|
</farm-btn>
|
|
228
229
|
</div>
|
|
@@ -231,4 +232,4 @@ export const Sizes = () => ({
|
|
|
231
232
|
|
|
232
233
|
export const Elevated = () => ({
|
|
233
234
|
template: '<farm-btn :elevated="true">Elevated</farm-btn>',
|
|
234
|
-
});
|
|
235
|
+
});
|
|
@@ -33,14 +33,14 @@ export default Vue.extend({
|
|
|
33
33
|
type: String as PropType<
|
|
34
34
|
| 'primary'
|
|
35
35
|
| 'secondary'
|
|
36
|
-
| '
|
|
37
|
-
| 'extra'
|
|
38
|
-
| 'accent'
|
|
36
|
+
| 'neutral'
|
|
39
37
|
| 'info'
|
|
40
38
|
| 'success'
|
|
41
|
-
| '
|
|
42
|
-
| '
|
|
43
|
-
| '
|
|
39
|
+
| 'error'
|
|
40
|
+
| 'warning'
|
|
41
|
+
| 'success'
|
|
42
|
+
| 'extra-1'
|
|
43
|
+
| 'extra-2'
|
|
44
44
|
>,
|
|
45
45
|
default: 'primary',
|
|
46
46
|
},
|
|
@@ -104,5 +104,5 @@ export default Vue.extend({
|
|
|
104
104
|
});
|
|
105
105
|
</script>
|
|
106
106
|
<style lang="scss" scoped>
|
|
107
|
-
@import 'DefaultButton
|
|
107
|
+
@import 'DefaultButton';
|
|
108
108
|
</style>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
class="farm-btn--responsive"
|
|
7
7
|
outlined
|
|
8
8
|
title="Exportar"
|
|
9
|
+
color="secondary"
|
|
9
10
|
:disabled="disabled"
|
|
10
11
|
>
|
|
11
12
|
<i :class="{ 'mr-2': true, 'mdi-file-export-outline': true, mdi: true }"></i>
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
class="farm-btn--responsive"
|
|
27
28
|
outlined
|
|
28
29
|
title="Exportar"
|
|
30
|
+
color="secondary"
|
|
29
31
|
@onClick="togglePopover = true"
|
|
30
32
|
:disabled="disabled"
|
|
31
33
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<farm-btn class="farm-btn--responsive farm-btn--import" title="Importar" @click="onClick">
|
|
2
|
+
<farm-btn class="farm-btn--responsive farm-btn--import" color="secondary" title="Importar" @click="onClick">
|
|
3
3
|
<farm-icon>upload</farm-icon>
|
|
4
4
|
{{ label }}
|
|
5
5
|
</farm-btn>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<farm-tooltip v-model="show">
|
|
3
3
|
{{ feedbackMessage }}
|
|
4
4
|
<template v-slot:activator="{}">
|
|
5
|
-
<farm-btn icon
|
|
5
|
+
<farm-btn icon :disabled="disabled" @click="onClick">
|
|
6
6
|
<farm-icon size="xs">content-copy</farm-icon>
|
|
7
7
|
</farm-btn>
|
|
8
8
|
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
div {
|
|
2
|
+
border-top: 1px solid var(--farm-stroke-divider);
|
|
3
|
+
padding: 64px 24px 32px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
text-align: center;
|
|
8
|
+
|
|
9
|
+
p:first-of-type {
|
|
10
|
+
margin: 24px auto 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
p:last-child {
|
|
14
|
+
color: var(--farm-text-secondary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.farm-icon.farm-icon--primary {
|
|
18
|
+
color: var(--farm-text-disabled);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -3,13 +3,24 @@ import DataTableEmptyWrapper from './DataTableEmptyWrapper.vue';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Display/Table/DataTableEmptyWrapper',
|
|
5
5
|
component: DataTableEmptyWrapper,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Message for empty list/data<br />
|
|
10
|
+
selector: <em>farm-emptywrapper</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
12
|
+
`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
viewMode: 'docs',
|
|
16
|
+
},
|
|
6
17
|
};
|
|
7
18
|
|
|
8
19
|
export const Primary = () => ({
|
|
9
|
-
template: '<
|
|
20
|
+
template: '<farm-emptywrapper />',
|
|
10
21
|
});
|
|
11
22
|
|
|
12
23
|
export const CustomTitles = () => ({
|
|
13
24
|
template:
|
|
14
|
-
'<
|
|
25
|
+
'<farm-emptywrapper title="Título customizado" subtitle="Subtítulo customizado" />',
|
|
15
26
|
});
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
2
|
+
<div>
|
|
3
|
+
<farm-icon size="lg">magnify</farm-icon>
|
|
4
|
+
<farm-caption bold>{{ title }}</farm-caption>
|
|
5
|
+
<farm-caption variation="regular" v-if="subtitle">{{ subtitle }}</farm-caption>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
|
-
<script>
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'DataTableEmptyWrapper',
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import Vue from 'vue';
|
|
10
|
+
|
|
11
|
+
export default Vue.extend({
|
|
12
|
+
name: 'farm-emptywrapper',
|
|
15
13
|
props: {
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
15
|
+
* Title
|
|
18
16
|
*/
|
|
19
17
|
title: {
|
|
20
18
|
type: String,
|
|
21
19
|
default: 'Nenhuma informação para exibir aqui',
|
|
22
20
|
},
|
|
23
|
-
|
|
24
|
-
*
|
|
21
|
+
/**
|
|
22
|
+
* Subtitle
|
|
25
23
|
*/
|
|
26
24
|
subtitle: {
|
|
27
25
|
type: String,
|
|
@@ -29,31 +27,8 @@ export default {
|
|
|
29
27
|
'Tente filtrar novamente sua pesquisa ou faça uma importação para ver mais resultados',
|
|
30
28
|
},
|
|
31
29
|
},
|
|
32
|
-
|
|
33
|
-
VIcon,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
30
|
+
});
|
|
36
31
|
</script>
|
|
37
32
|
<style scoped lang="scss">
|
|
38
|
-
|
|
39
|
-
border-top: 1px solid var(--v-gray-lighten2);
|
|
40
|
-
padding: 3rem 1rem;
|
|
41
|
-
.v-icon {
|
|
42
|
-
margin-top: 1rem;
|
|
43
|
-
font-size: 2.625rem;
|
|
44
|
-
color: var(--v-gray-lighten2);
|
|
45
|
-
}
|
|
46
|
-
p:nth-child(2) {
|
|
47
|
-
color: var(--v-primary-base);
|
|
48
|
-
font-weight: 700;
|
|
49
|
-
font-size: 0.75rem;
|
|
50
|
-
margin-top: 1rem;
|
|
51
|
-
}
|
|
52
|
-
p:nth-child(3) {
|
|
53
|
-
color: var(--v-gray-base);
|
|
54
|
-
font-weight: 400;
|
|
55
|
-
font-size: 0.625rem;
|
|
56
|
-
margin-bottom: 1rem;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
33
|
+
@import './DataTableEmptyWrapper';
|
|
59
34
|
</style>
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
docs: {
|
|
10
10
|
description: {
|
|
11
11
|
component: `Paginator with items per page select<br />
|
|
12
|
-
selector: <em>farm-datatable-paginator</em
|
|
12
|
+
selector: <em>farm-datatable-paginator</em><br />
|
|
13
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
13
14
|
`,
|
|
14
15
|
},
|
|
15
16
|
},
|
|
@@ -22,10 +23,9 @@ export default {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export const Primary = () => ({
|
|
25
|
-
components: { DataTablePaginator },
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
28
|
-
totalPages: 8
|
|
28
|
+
totalPages: 8,
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
31
|
template: '<DataTablePaginator :totalPages="totalPages" :page="1" />',
|
|
@@ -33,46 +33,18 @@ export const Primary = () => ({
|
|
|
33
33
|
setTimeout(() => {
|
|
34
34
|
this.totalPages = 0;
|
|
35
35
|
}, 1000);
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const Secondary = () => ({
|
|
40
|
-
components: { DataTablePaginator },
|
|
41
40
|
template: '<DataTablePaginator :hidePerPageOptions="true" :totalPages="190000" :page="1" />',
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
export const Disabled = () => ({
|
|
45
|
-
components: { DataTablePaginator },
|
|
46
44
|
template: '<DataTablePaginator :disabled="true":totalPages="19" :page="1" />',
|
|
47
45
|
});
|
|
48
46
|
|
|
49
47
|
export const CustomPerPage = () => ({
|
|
50
|
-
components: { DataTablePaginator },
|
|
51
48
|
template:
|
|
52
49
|
'<DataTablePaginator :perPageOptions="[1, 2, 4, 12, 27]" :totalPages="19" :page="1" />',
|
|
53
50
|
});
|
|
54
|
-
|
|
55
|
-
const parameters = {
|
|
56
|
-
design: {
|
|
57
|
-
type: 'figma',
|
|
58
|
-
url: 'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1503%3A921',
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
Primary.story = {
|
|
63
|
-
name: 'Básico',
|
|
64
|
-
parameters,
|
|
65
|
-
};
|
|
66
|
-
Secondary.story = {
|
|
67
|
-
name: 'Sem limite por páginas',
|
|
68
|
-
parameters,
|
|
69
|
-
};
|
|
70
|
-
Disabled.story = {
|
|
71
|
-
name: 'Desabilitado',
|
|
72
|
-
parameters,
|
|
73
|
-
};
|
|
74
|
-
CustomPerPage.story = {
|
|
75
|
-
name: 'Lista de registros por página customizada',
|
|
76
|
-
parameters,
|
|
77
|
-
};
|
|
78
|
-
|
|
@@ -35,17 +35,11 @@
|
|
|
35
35
|
:max="max"
|
|
36
36
|
:min="min"
|
|
37
37
|
>
|
|
38
|
-
<farm-btn outlined color="
|
|
38
|
+
<farm-btn outlined color="secondary" @click="menuField = false" title="Fechar">
|
|
39
39
|
Fechar
|
|
40
40
|
</farm-btn>
|
|
41
|
-
<farm-btn outlined
|
|
42
|
-
<farm-btn
|
|
43
|
-
color="secondary"
|
|
44
|
-
class="ml-2"
|
|
45
|
-
title="Confirmar"
|
|
46
|
-
:disabled="!dateField.length"
|
|
47
|
-
@click="save()"
|
|
48
|
-
>
|
|
41
|
+
<farm-btn outlined class="ml-2" @click="clear"> Limpar </farm-btn>
|
|
42
|
+
<farm-btn class="ml-2" title="Confirmar" :disabled="!dateField.length" @click="save()">
|
|
49
43
|
Confirmar
|
|
50
44
|
</farm-btn>
|
|
51
45
|
</v-date-picker>
|
|
@@ -136,7 +130,9 @@ export default Vue.extend({
|
|
|
136
130
|
timeZone: 'America/Sao_Paulo',
|
|
137
131
|
});
|
|
138
132
|
|
|
139
|
-
return this.min &&
|
|
133
|
+
return this.min &&
|
|
134
|
+
this.getUniversalDate(locatedSelectedDate) <
|
|
135
|
+
this.getUniversalDate(locatedMinDate)
|
|
140
136
|
? 'A data está fora do período permitido'
|
|
141
137
|
: true;
|
|
142
138
|
},
|
|
@@ -177,7 +173,7 @@ export default Vue.extend({
|
|
|
177
173
|
getUniversalDate(d) {
|
|
178
174
|
const onlyDMY = d.split(' ')[0];
|
|
179
175
|
const arr = onlyDMY.split('/');
|
|
180
|
-
return new Date(arr[2], arr[1] -1, arr[0]);
|
|
176
|
+
return new Date(arr[2], arr[1] - 1, arr[0]);
|
|
181
177
|
},
|
|
182
178
|
},
|
|
183
179
|
computed: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="farm-dialog__footer">
|
|
3
|
-
<farm-btn v-if="hasCancel" color="
|
|
3
|
+
<farm-btn v-if="hasCancel" color="primary" outlined @click="$emit('onClose')">
|
|
4
4
|
{{ closeLabel }}
|
|
5
5
|
</farm-btn>
|
|
6
6
|
<farm-btn
|
|
@@ -74,7 +74,7 @@ export default Vue.extend({
|
|
|
74
74
|
*/
|
|
75
75
|
confirmColor: {
|
|
76
76
|
type: String,
|
|
77
|
-
default: '
|
|
77
|
+
default: 'primary',
|
|
78
78
|
},
|
|
79
79
|
/**
|
|
80
80
|
* Ícone no botão Confirmar
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div
|
|
5
5
|
:class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
|
|
6
6
|
>
|
|
7
|
-
<farm-caption
|
|
7
|
+
<farm-caption variation="medium" v-if="hasTitle">
|
|
8
8
|
<span>
|
|
9
9
|
{{ $slots.title ? $slots.title[0].text : null }}
|
|
10
10
|
<farm-btn icon color="gray" v-if="link" @click="$emit('onLinkClick')">
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
width: 1px;
|
|
9
9
|
|
|
10
10
|
&.logger__divider--success {
|
|
11
|
-
background: var(--
|
|
11
|
+
background: var(--farm-primary-base);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&.logger__divider--error {
|
|
15
|
-
background: var(--
|
|
15
|
+
background: var(--farm-error-base);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&.logger__divider--error-to-success {
|
|
19
|
-
background: linear-gradient(to bottom, var(--
|
|
19
|
+
background: linear-gradient(to bottom, var(--farm-error-base), var(--farm-primary-base));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&.logger__divider--success-to-error {
|
|
23
|
-
background: linear-gradient(to bottom, var(--
|
|
23
|
+
background: linear-gradient(to bottom, var(--farm-primary-base), var(--farm-error-base));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&.logger__item--error {
|
|
25
|
-
@include loggerMessage(var(--
|
|
25
|
+
@include loggerMessage(var(--farm-error-base));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&.logger__item--success {
|
|
29
|
-
@include loggerMessage(var(--
|
|
29
|
+
@include loggerMessage(var(--farm-primary-base));
|
|
30
30
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
.logger__item>i.mdi {
|
|
36
|
-
border: 1px solid var(--
|
|
36
|
+
border: 1px solid var(--farm-stroke-base);
|
|
37
37
|
border-radius: 50%;
|
|
38
38
|
width: 32px;
|
|
39
39
|
height: 32px;
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
align-items: center;
|
|
44
44
|
justify-content: center;
|
|
45
45
|
|
|
46
|
-
border-color: var(--
|
|
47
|
-
background-color: var(--
|
|
46
|
+
border-color: var(--farm-neutral-base);
|
|
47
|
+
background-color: var(--farm-neutral-base);
|
|
48
48
|
|
|
49
49
|
&:before {
|
|
50
50
|
font-size: 16px;
|
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<farm-btn
|
|
23
23
|
v-if="hasDetails"
|
|
24
|
-
:color="buttonColor"
|
|
25
24
|
plain
|
|
26
25
|
title="Ver Detalhes"
|
|
26
|
+
:color="buttonColor"
|
|
27
27
|
@click="callDetails"
|
|
28
|
-
>
|
|
29
|
-
|
|
28
|
+
>
|
|
29
|
+
Ver Detalhes
|
|
30
|
+
</farm-btn>
|
|
30
31
|
</section>
|
|
31
32
|
</template>
|
|
32
33
|
<script lang="ts">
|
|
@@ -58,12 +59,12 @@ export default Vue.extend({
|
|
|
58
59
|
},
|
|
59
60
|
buttonColor(): string {
|
|
60
61
|
if (this.item.status === 'success') {
|
|
61
|
-
return '
|
|
62
|
+
return 'primary';
|
|
62
63
|
} else if (this.item.status === 'error') {
|
|
63
64
|
return 'error';
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
return '
|
|
67
|
+
return 'secondary';
|
|
67
68
|
},
|
|
68
69
|
hasDetails(): boolean {
|
|
69
70
|
return !!this.item.details;
|
|
@@ -55,7 +55,7 @@ describe('LoggerItem component', () => {
|
|
|
55
55
|
status: 'success',
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
|
-
expect(component.buttonColor).toEqual('
|
|
58
|
+
expect(component.buttonColor).toEqual('primary');
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
it('Should return error button color', async () => {
|
|
@@ -73,7 +73,7 @@ describe('LoggerItem component', () => {
|
|
|
73
73
|
status: 'primary',
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
|
-
expect(component.buttonColor).toEqual('
|
|
76
|
+
expect(component.buttonColor).toEqual('secondary');
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('Should not have a detail button', async () => {
|