@farm-investimentos/front-mfe-components 6.1.2 → 6.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 +518 -453
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +518 -453
- 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 +8 -10
- package/src/components/Buttons/ConfirmButton/ConfirmButton.stories.js +1 -1
- package/src/components/Buttons/ConfirmButton/ConfirmButton.vue +10 -9
- package/src/components/Buttons/DangerButton/DangerButton.vue +5 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +153 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +4 -3
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +55 -9
- package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +22 -0
- package/src/components/Buttons/ExportButton/ExportButton.vue +18 -12
- package/src/components/Buttons/ImportButton/ImportButton.vue +9 -9
- package/src/components/Buttons/MultiImportButton/MultiImportButton.scss +3 -2
- package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +16 -16
- package/src/components/Buttons/RemoveButton/RemoveButton.vue +6 -5
- package/src/components/Buttons/ToggleButton/ToggleButton.vue +6 -16
- package/src/components/DatePicker/DatePicker.vue +25 -17
- package/src/components/DialogFooter/DialogFooter.vue +13 -15
- package/src/components/FilePicker/FilePicker.vue +5 -5
- package/src/components/MainFilter/MainFilter.scss +6 -3
- package/src/components/MainFilter/MainFilter.vue +5 -5
- package/src/components/RadioButton/RadioButton.stories.js +1 -1
- package/src/components/RadioButton/RadioButton.vue +1 -1
- package/src/components/RangeDatePicker/RangeDatePicker.vue +7 -7
- package/src/components/ResetTableRowSelection/ResetTableRowSelection.vue +5 -4
- package/src/components/TableContextMenu/TableContextMenu.scss +3 -0
- package/src/components/TableContextMenu/TableContextMenu.vue +5 -5
- package/src/examples/Buttons.stories.js +65 -12
- package/src/scss/ButtonOverrides.scss +7 -0
package/package.json
CHANGED
|
@@ -5,28 +5,26 @@
|
|
|
5
5
|
{{ label }}
|
|
6
6
|
</v-col>
|
|
7
7
|
<v-col class="shrink">
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
Recarregar
|
|
11
|
-
>
|
|
8
|
+
<farm-btn color="secondary" class="ml-3" alt="Recarregar" @click="$emit('onClick')">
|
|
9
|
+
<i class="mdi mdi-refresh farm-icon"></i>
|
|
10
|
+
Recarregar
|
|
11
|
+
</farm-btn>
|
|
12
12
|
</v-col>
|
|
13
13
|
</v-row>
|
|
14
14
|
</v-alert>
|
|
15
15
|
</template>
|
|
16
16
|
<script>
|
|
17
|
-
import VBtn from 'vuetify/lib/components/VBtn';
|
|
18
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
19
17
|
import VAlert from 'vuetify/lib/components/VAlert';
|
|
20
18
|
import { VRow, VCol } from 'vuetify/lib/components/VGrid';
|
|
19
|
+
import DefaultButton from '../Buttons/DefaultButton';
|
|
21
20
|
|
|
22
21
|
export default {
|
|
23
22
|
name: 'farm-alert-reload',
|
|
24
23
|
components: {
|
|
25
|
-
VBtn,
|
|
26
|
-
VIcon,
|
|
27
24
|
VAlert,
|
|
28
25
|
VRow,
|
|
29
26
|
VCol,
|
|
27
|
+
'farm-btn': DefaultButton,
|
|
30
28
|
},
|
|
31
29
|
props: {
|
|
32
30
|
/**
|
|
@@ -41,8 +39,8 @@ export default {
|
|
|
41
39
|
</script>
|
|
42
40
|
|
|
43
41
|
<style lang="scss" scoped>
|
|
44
|
-
.
|
|
45
|
-
.
|
|
42
|
+
.farm-btn {
|
|
43
|
+
.farm-icon {
|
|
46
44
|
margin-right: 1rem;
|
|
47
45
|
}
|
|
48
46
|
}
|
|
@@ -38,7 +38,7 @@ export const Listener = () => ({
|
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
template: `
|
|
41
|
-
<ConfirmButton color="error" @click="x =
|
|
41
|
+
<ConfirmButton color="error" @click="x = x + 1">click me to change: {{ x }}</ConfirmButton>
|
|
42
42
|
`,
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
{{ iconPath }}
|
|
5
|
-
</v-icon>
|
|
2
|
+
<farm-btn v-bind="$attrs" v-on="$listeners" color="secondary">
|
|
3
|
+
<i :class="{ mdi: true, [iconPath]: true, 'mr-3': true }" v-if="icon"></i>
|
|
6
4
|
<slot></slot>
|
|
7
|
-
</
|
|
5
|
+
</farm-btn>
|
|
8
6
|
</template>
|
|
9
7
|
<script>
|
|
10
8
|
import Vue from 'vue';
|
|
11
|
-
import
|
|
12
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
9
|
+
import DefaultButton from '../DefaultButton';
|
|
13
10
|
|
|
14
11
|
export default Vue.extend({
|
|
15
12
|
name: 'farm-btn-confirm',
|
|
16
13
|
components: {
|
|
17
|
-
|
|
18
|
-
VIcon,
|
|
14
|
+
'farm-btn': DefaultButton,
|
|
19
15
|
},
|
|
20
16
|
inheritAttrs: true,
|
|
21
17
|
props: {
|
|
@@ -44,3 +40,8 @@ export default Vue.extend({
|
|
|
44
40
|
},
|
|
45
41
|
});
|
|
46
42
|
</script>
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
i.mdi {
|
|
45
|
+
font-size: 1rem;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
{{ iconPath }}
|
|
5
|
-
</v-icon>
|
|
2
|
+
<farm-btn v-bind="$attrs" v-on="$listeners" color="error">
|
|
3
|
+
<i v-if="icon" :class="{mdi: true, [iconPath]: true, 'mr-3': true}"></i>
|
|
6
4
|
<slot></slot>
|
|
7
|
-
</
|
|
5
|
+
</farm-btn>
|
|
8
6
|
</template>
|
|
9
7
|
<script>
|
|
10
8
|
import Vue from 'vue';
|
|
11
|
-
import
|
|
12
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
9
|
+
import DefaultButton from '../DefaultButton';
|
|
13
10
|
|
|
14
11
|
export default Vue.extend({
|
|
15
12
|
name: 'farm-btn-danger',
|
|
16
13
|
components: {
|
|
17
|
-
|
|
18
|
-
VIcon,
|
|
14
|
+
'farm-btn': DefaultButton,
|
|
19
15
|
},
|
|
20
16
|
inheritAttrs: true,
|
|
21
17
|
props: {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
$colors: primary, secondary, error, extra, accent, info, success, gray, yellow;
|
|
2
|
+
|
|
3
|
+
.farm-btn {
|
|
4
|
+
font-size: 0.75rem;
|
|
5
|
+
align-items: center;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex: 0 0 auto;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
outline: 0;
|
|
12
|
+
position: relative;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
transition-duration: 0.28s;
|
|
15
|
+
transition-property: box-shadow, transform, opacity;
|
|
16
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
17
|
+
user-select: none;
|
|
18
|
+
vertical-align: middle;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
line-height: 1rem;
|
|
21
|
+
height: 36px;
|
|
22
|
+
min-width: 64px;
|
|
23
|
+
padding: 0 16px;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
&.farm-btn--disabled {
|
|
27
|
+
background-color: #DADADA;
|
|
28
|
+
color: rgba(0, 0, 0, .26);
|
|
29
|
+
cursor: default;
|
|
30
|
+
border-color: #DADADA;
|
|
31
|
+
|
|
32
|
+
&:before {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:before {
|
|
38
|
+
transition: all 0.28s ease;
|
|
39
|
+
background-color: currentColor;
|
|
40
|
+
border-radius: inherit;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
color: inherit;
|
|
43
|
+
content: '';
|
|
44
|
+
left: 0;
|
|
45
|
+
opacity: 0;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
position: absolute;
|
|
48
|
+
right: 0;
|
|
49
|
+
top: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:not(.farm-btn--plain):hover {
|
|
53
|
+
&:before {
|
|
54
|
+
opacity: 0.08;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:not(.farm-btn--plain):active {
|
|
59
|
+
box-shadow: 0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);
|
|
60
|
+
|
|
61
|
+
&:before {
|
|
62
|
+
opacity: 0.16;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.farm-btn--plain {
|
|
67
|
+
&:hover {
|
|
68
|
+
.farm-btn__content {
|
|
69
|
+
opacity: 0.68;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:active {
|
|
74
|
+
&:before {
|
|
75
|
+
opacity: 0.08;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.farm-btn--round {
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.farm-btn.farm-btn--icon {
|
|
86
|
+
border: none;
|
|
87
|
+
background: transparent;
|
|
88
|
+
transition: color 0.5s ease;
|
|
89
|
+
|
|
90
|
+
min-width: auto;
|
|
91
|
+
width: 36px;
|
|
92
|
+
|
|
93
|
+
.farm-btn__content i.mdi {
|
|
94
|
+
color: gray;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@each $color in $colors {
|
|
98
|
+
&#{'.farm-btn--' + $color} {
|
|
99
|
+
&:hover {
|
|
100
|
+
color: var(--v-#{$color}-base);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.farm-btn__content {
|
|
107
|
+
font-weight: 700;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: row;
|
|
110
|
+
align-items: center;
|
|
111
|
+
|
|
112
|
+
i.mdi {
|
|
113
|
+
font-size: 1rem;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@each $color in $colors {
|
|
118
|
+
#{'.farm-btn--' + $color} {
|
|
119
|
+
border: 1px solid var(--v-#{$color}-base);
|
|
120
|
+
background-color: var(--v-#{$color}-base);
|
|
121
|
+
color: white;
|
|
122
|
+
|
|
123
|
+
.farm-btn__content i.mdi {
|
|
124
|
+
color: white;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.farm-btn--outlined#{'.farm-btn--' + $color} {
|
|
129
|
+
border: 1px solid var(--v-#{$color}-base);
|
|
130
|
+
background: white;
|
|
131
|
+
color: var(--v-#{$color}-base);
|
|
132
|
+
|
|
133
|
+
.farm-btn__content i.mdi {
|
|
134
|
+
color: var(--v-#{$color}-base);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.farm-btn--plain#{'.farm-btn--' + $color} {
|
|
140
|
+
border: none;
|
|
141
|
+
background: white;
|
|
142
|
+
color: var(--v-#{$color}-base);
|
|
143
|
+
|
|
144
|
+
.farm-btn__content i.mdi {
|
|
145
|
+
color: var(--v-#{$color}-base);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.farm-btn--elevated {
|
|
152
|
+
box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
|
|
153
|
+
}
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
export const Primary = () => ({
|
|
19
19
|
components: { DefaultButton },
|
|
20
|
-
template: '<DefaultButton>Pass text as slot</DefaultButton>',
|
|
20
|
+
template: '<DefaultButton title="Pass text as slot">Pass text as slot</DefaultButton>',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
export const HtmlMarkup = () => ({
|
|
@@ -26,10 +26,11 @@ export const HtmlMarkup = () => ({
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
export const Props = () => ({
|
|
29
|
-
components: { DefaultButton },
|
|
30
|
-
template: '<
|
|
29
|
+
components: { 'farm-btn': DefaultButton },
|
|
30
|
+
template: '<farm-btn color="secondary" outlined>props</farm-btn>',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
export const Listener = () => ({
|
|
34
35
|
components: { DefaultButton },
|
|
35
36
|
data() {
|
|
@@ -1,19 +1,65 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-
|
|
3
|
-
<
|
|
4
|
-
|
|
2
|
+
<button v-on="$listeners" v-bind="$attrs" :type="type" :class="classes">
|
|
3
|
+
<span class="farm-btn__content">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</span>
|
|
6
|
+
</button>
|
|
5
7
|
</template>
|
|
6
|
-
<script>
|
|
8
|
+
<script lang="ts">
|
|
7
9
|
import Vue from 'vue';
|
|
8
|
-
import VBtn from 'vuetify/lib/components/VBtn';
|
|
9
10
|
|
|
10
11
|
export default Vue.extend({
|
|
11
12
|
name: 'farm-btn',
|
|
12
|
-
inheritAttrs: true,
|
|
13
|
-
props: ['props'],
|
|
13
|
+
inheritAttrs: true,
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
props: {
|
|
16
|
+
color: { type: String, default: 'primary' },
|
|
17
|
+
outlined: Boolean,
|
|
18
|
+
plain: Boolean,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
rounded: Boolean,
|
|
21
|
+
icon: Boolean,
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'button',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
computed: {
|
|
29
|
+
classes() {
|
|
30
|
+
const obj = {};
|
|
31
|
+
['outlined', 'plain', 'disabled']
|
|
32
|
+
.filter(key => this[key])
|
|
33
|
+
.forEach(key => {
|
|
34
|
+
obj['farm-btn--' + key] = this[key];
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
'farm-btn': true,
|
|
38
|
+
'farm-btn--elevated': this.isElevated,
|
|
39
|
+
'farm-btn--round': this.isRound,
|
|
40
|
+
'farm-btn--rounded': this.rounded,
|
|
41
|
+
'farm-btn--icon': this.icon,
|
|
42
|
+
['farm-btn--' + this.color]: true,
|
|
43
|
+
...obj,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
isRound(): boolean {
|
|
47
|
+
return Boolean(this.icon || this.fab);
|
|
48
|
+
},
|
|
49
|
+
isElevated(): boolean {
|
|
50
|
+
return Boolean(
|
|
51
|
+
!this.icon &&
|
|
52
|
+
!this.text &&
|
|
53
|
+
!this.outlined &&
|
|
54
|
+
!this.depressed &&
|
|
55
|
+
!this.disabled &&
|
|
56
|
+
!this.plain &&
|
|
57
|
+
(this.elevation == null || Number(this.elevation) > 0)
|
|
58
|
+
);
|
|
59
|
+
},
|
|
17
60
|
},
|
|
18
61
|
});
|
|
19
62
|
</script>
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
@import 'DefaultButton.scss';
|
|
65
|
+
</style>
|
|
@@ -3,12 +3,34 @@ import DefaultButton from '../DefaultButton';
|
|
|
3
3
|
|
|
4
4
|
describe('DefaultButton component', () => {
|
|
5
5
|
let wrapper;
|
|
6
|
+
let component;
|
|
6
7
|
|
|
7
8
|
beforeEach(() => {
|
|
8
9
|
wrapper = shallowMount(DefaultButton);
|
|
10
|
+
component = wrapper.vm;
|
|
9
11
|
});
|
|
10
12
|
|
|
11
13
|
test('Created hook', () => {
|
|
12
14
|
expect(wrapper).toBeDefined();
|
|
13
15
|
});
|
|
16
|
+
|
|
17
|
+
describe('computed properties', () => {
|
|
18
|
+
it('get isRound false', () => {
|
|
19
|
+
expect(component.isRound).toBeFalsy();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('get isRound false', async () => {
|
|
23
|
+
await wrapper.setProps({ icon: true });
|
|
24
|
+
expect(component.isRound).toBeTruthy();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('get isElevated false', () => {
|
|
28
|
+
expect(component.isElevated).toBeTruthy();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('get classes', () => {
|
|
32
|
+
expect(component.classes).toBeDefined();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
});
|
|
14
36
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<farm-btn
|
|
3
3
|
v-if="optionsList.length == 0"
|
|
4
4
|
@click="onClick"
|
|
5
5
|
dense
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
title="Exportar"
|
|
9
9
|
:disabled="disabled"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
11
|
+
<i :class="{ 'mr-2': true, 'mdi-file-export-outline': true, mdi: true }"></i>
|
|
12
12
|
Exportar
|
|
13
|
-
</
|
|
13
|
+
</farm-btn>
|
|
14
14
|
<v-menu
|
|
15
15
|
v-else
|
|
16
16
|
content-class="elevation-1"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:rounded="'b t-0'"
|
|
20
20
|
>
|
|
21
21
|
<template v-slot:activator="{ on, attrs }">
|
|
22
|
-
<
|
|
22
|
+
<farm-btn
|
|
23
23
|
v-bind="attrs"
|
|
24
24
|
v-on="on"
|
|
25
25
|
dense
|
|
@@ -30,10 +30,17 @@
|
|
|
30
30
|
:disabled="disabled"
|
|
31
31
|
>
|
|
32
32
|
Exportar
|
|
33
|
-
<
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
<i
|
|
34
|
+
:class="{
|
|
35
|
+
'ml-2': true,
|
|
36
|
+
'mr-0': true,
|
|
37
|
+
'mdi': true,
|
|
38
|
+
'mdi-chevron-up': togglePopover,
|
|
39
|
+
'mdi-chevron-down': !togglePopover,
|
|
40
|
+
}"
|
|
41
|
+
>
|
|
42
|
+
</i>
|
|
43
|
+
</farm-btn>
|
|
37
44
|
</template>
|
|
38
45
|
|
|
39
46
|
<v-list dense class="pa-0">
|
|
@@ -53,12 +60,12 @@
|
|
|
53
60
|
</template>
|
|
54
61
|
<script>
|
|
55
62
|
import Vue from 'vue';
|
|
56
|
-
import VBtn from 'vuetify/lib/components/VBtn';
|
|
57
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
58
63
|
import VList from 'vuetify/lib/components/VList/VList';
|
|
59
64
|
import VMenu from 'vuetify/lib/components/VMenu';
|
|
60
65
|
import VListItem from 'vuetify/lib/components/VList/VListItem';
|
|
61
66
|
import { VListItemContent, VListItemTitle } from 'vuetify/lib';
|
|
67
|
+
import DefaultButton from '../DefaultButton';
|
|
68
|
+
|
|
62
69
|
/**
|
|
63
70
|
* Botão de Exportação, com opção de gerar menu dropdown
|
|
64
71
|
*/
|
|
@@ -87,13 +94,12 @@ export default Vue.extend({
|
|
|
87
94
|
};
|
|
88
95
|
},
|
|
89
96
|
components: {
|
|
90
|
-
VBtn,
|
|
91
|
-
VIcon,
|
|
92
97
|
VList,
|
|
93
98
|
VListItem,
|
|
94
99
|
VMenu,
|
|
95
100
|
VListItemContent,
|
|
96
101
|
VListItemTitle,
|
|
102
|
+
'farm-btn': DefaultButton,
|
|
97
103
|
},
|
|
98
104
|
methods: {
|
|
99
105
|
onClick(key) {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
2
|
+
<farm-btn @click="onClick" dense class="v-btn--responsive farm-btn--import" outlined title="Importar">
|
|
3
|
+
<i class="mdi mdi-upload"></i>
|
|
4
4
|
{{ label }}
|
|
5
|
-
</
|
|
5
|
+
</farm-btn>
|
|
6
6
|
</template>
|
|
7
7
|
<script>
|
|
8
8
|
import Vue from 'vue';
|
|
9
|
-
import
|
|
10
|
-
|
|
9
|
+
import DefaultButton from '../DefaultButton';
|
|
10
|
+
|
|
11
11
|
export default Vue.extend({
|
|
12
12
|
name: 'farm-btn-import',
|
|
13
13
|
components: {
|
|
14
|
-
|
|
15
|
-
VIcon,
|
|
14
|
+
'farm-btn': DefaultButton,
|
|
16
15
|
},
|
|
17
16
|
props: {
|
|
18
17
|
/**
|
|
@@ -31,10 +30,11 @@ export default Vue.extend({
|
|
|
31
30
|
});
|
|
32
31
|
</script>
|
|
33
32
|
<style scoped lang="scss">
|
|
34
|
-
.
|
|
33
|
+
.farm-btn.farm-btn--import {
|
|
35
34
|
background: var(--v-extra-lighten2);
|
|
36
35
|
color: var(--v-gray-lighten5);
|
|
37
|
-
.
|
|
36
|
+
.farm-btn__content i.mdi {
|
|
37
|
+
color: white;
|
|
38
38
|
margin-right: 1rem;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-menu
|
|
3
|
-
content-class="elevation-1"
|
|
4
|
-
v-model="togglePopover"
|
|
5
|
-
:offset-y="true"
|
|
6
|
-
:rounded="'b t-0'"
|
|
7
|
-
>
|
|
2
|
+
<v-menu content-class="elevation-1" v-model="togglePopover" :offset-y="true" :rounded="'b t-0'">
|
|
8
3
|
<template v-slot:activator="{ on, attrs }">
|
|
9
|
-
<
|
|
4
|
+
<farm-btn
|
|
10
5
|
v-bind="attrs"
|
|
11
6
|
v-on="on"
|
|
12
7
|
dense
|
|
13
8
|
@onClick="togglePopover = true"
|
|
14
|
-
class="v-btn--responsive
|
|
9
|
+
class="v-btn--responsive farm-btn--import"
|
|
15
10
|
outlined
|
|
16
11
|
title="Importar"
|
|
17
12
|
>
|
|
18
13
|
Importar
|
|
19
|
-
<
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
<i
|
|
15
|
+
:class="{
|
|
16
|
+
'ml-2': true,
|
|
17
|
+
'mr-0': true,
|
|
18
|
+
mdi: true,
|
|
19
|
+
'mdi-chevron-up': togglePopover,
|
|
20
|
+
'mdi-chevron-down': !togglePopover,
|
|
21
|
+
}"
|
|
22
|
+
>
|
|
23
|
+
</i>
|
|
24
|
+
</farm-btn>
|
|
23
25
|
</template>
|
|
24
26
|
|
|
25
27
|
<v-list dense class="pa-0">
|
|
@@ -39,23 +41,21 @@
|
|
|
39
41
|
</template>
|
|
40
42
|
<script>
|
|
41
43
|
import Vue from 'vue';
|
|
42
|
-
import VBtn from 'vuetify/lib/components/VBtn';
|
|
43
|
-
import VIcon from 'vuetify/lib/components/VIcon';
|
|
44
44
|
import VList from 'vuetify/lib/components/VList/VList';
|
|
45
45
|
import VMenu from 'vuetify/lib/components/VMenu';
|
|
46
46
|
import VListItem from 'vuetify/lib/components/VList/VListItem';
|
|
47
47
|
import { VListItemContent, VListItemTitle } from 'vuetify/lib';
|
|
48
|
+
import DefaultButton from '../DefaultButton';
|
|
48
49
|
|
|
49
50
|
export default Vue.extend({
|
|
50
51
|
name: 'farm-btn-multipleimport',
|
|
51
52
|
components: {
|
|
52
|
-
VBtn,
|
|
53
|
-
VIcon,
|
|
54
53
|
VList,
|
|
55
54
|
VListItem,
|
|
56
55
|
VMenu,
|
|
57
56
|
VListItemContent,
|
|
58
57
|
VListItemTitle,
|
|
58
|
+
'farm-btn': DefaultButton,
|
|
59
59
|
},
|
|
60
60
|
props: {
|
|
61
61
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<farm-btn
|
|
3
3
|
@click="onClick"
|
|
4
4
|
dense
|
|
5
5
|
class="v-btn--responsive"
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
>
|
|
10
10
|
<v-icon>mdi-trash-can-outline</v-icon>
|
|
11
11
|
{{ label }}
|
|
12
|
-
</
|
|
12
|
+
</farm-btn>
|
|
13
13
|
</template>
|
|
14
14
|
<script>
|
|
15
15
|
import Vue from 'vue';
|
|
16
|
-
import VBtn from 'vuetify/lib/components/VBtn';
|
|
17
16
|
import VIcon from 'vuetify/lib/components/VIcon';
|
|
17
|
+
import DefaultButton from '../DefaultButton';
|
|
18
|
+
|
|
18
19
|
export default Vue.extend({
|
|
19
20
|
name: 'farm-btn-remove',
|
|
20
21
|
props: {
|
|
@@ -34,8 +35,8 @@ export default Vue.extend({
|
|
|
34
35
|
},
|
|
35
36
|
},
|
|
36
37
|
components: {
|
|
37
|
-
VBtn,
|
|
38
38
|
VIcon,
|
|
39
|
+
'farm-btn': DefaultButton,
|
|
39
40
|
},
|
|
40
41
|
methods: {
|
|
41
42
|
onClick() {
|
|
@@ -45,7 +46,7 @@ export default Vue.extend({
|
|
|
45
46
|
});
|
|
46
47
|
</script>
|
|
47
48
|
<style scoped lang="scss">
|
|
48
|
-
.
|
|
49
|
+
.farm-btn {
|
|
49
50
|
.v-icon {
|
|
50
51
|
margin-right: 1rem;
|
|
51
52
|
}
|