@farm-investimentos/front-mfe-components 15.0.2 → 15.0.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.
- package/dist/front-mfe-components.common.js +125 -142
- 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 +125 -142
- 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.scss +1 -1
- package/src/components/Buttons/ExportButton/ExportButton.stories.js +7 -0
- package/src/components/Buttons/ExportButton/ExportButton.vue +4 -3
- package/src/components/Buttons/ImportButton/ImportButton.stories.js +8 -0
- package/src/components/Buttons/ImportButton/ImportButton.vue +6 -1
- package/src/components/Buttons/MultiImportButton/MultiImportButton.stories.js +13 -0
- package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +3 -6
- package/src/components/Buttons/ToggleButton/ToggleButton.stories.js +5 -1
- package/src/components/Buttons/ToggleButton/ToggleButton.vue +7 -11
- package/src/components/CopyToClipboard/CopyToClipboard.vue +1 -1
- package/src/components/DatePicker/vDatePicker.scss +2 -2
- package/src/components/Loader/Loader.scss +2 -2
- package/src/components/Typography/Typography.stories.js +1 -1
- package/src/scss/VMenuOverrides.scss +1 -1
- package/src/components/Buttons/MultiImportButton/MultiImportButton.scss +0 -18
package/package.json
CHANGED
|
@@ -27,3 +27,10 @@ export const Disabled = () => ({
|
|
|
27
27
|
export const List = () => ({
|
|
28
28
|
template: `<farm-btn-export :optionsList="[{ key: 1, label: 'XLS teste'}, { key: 2, label: 'CSV teste novo'}]" />`,
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
export const CustomColor = () => ({
|
|
32
|
+
template: `<div>
|
|
33
|
+
<farm-btn-export color="info" />
|
|
34
|
+
<farm-btn-export color="info" :optionsList="[{ key: 1, label: 'XLS teste'}, { key: 2, label: 'CSV teste novo'}]" />
|
|
35
|
+
</div>`,
|
|
36
|
+
});
|
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
class="farm-btn--responsive"
|
|
6
6
|
outlined
|
|
7
7
|
title="Exportar"
|
|
8
|
-
color="
|
|
8
|
+
:color="$attrs.color"
|
|
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
15
|
<farm-contextmenu v-else v-model="value" :bottom="true">
|
|
15
16
|
<template v-slot:activator="{}">
|
|
16
|
-
<farm-btn outlined title="Exportar" color="
|
|
17
|
+
<farm-btn outlined title="Exportar" :color="$attrs.color" @click="toggleValue">
|
|
17
18
|
Exportar
|
|
18
19
|
<farm-icon class="ml-2"> chevron-{{ value ? 'up' : 'down' }} </farm-icon>
|
|
19
20
|
</farm-btn>
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
<farm-listitem
|
|
23
24
|
v-for="item in optionsList"
|
|
24
25
|
clickable
|
|
25
|
-
hoverColor="primary"
|
|
26
|
+
:hoverColor="$attrs.color || 'primary'"
|
|
26
27
|
hoverColorVariation="lighten"
|
|
27
28
|
:key="'exportbutton_key_' + item.label"
|
|
28
29
|
:title="item.label"
|
|
@@ -13,3 +13,11 @@ export const CustomLabel = () => ({
|
|
|
13
13
|
components: { ImportButton },
|
|
14
14
|
template: '<farm-btn-import label="Label custom" />',
|
|
15
15
|
});
|
|
16
|
+
|
|
17
|
+
export const CustomColors = () => ({
|
|
18
|
+
components: { ImportButton },
|
|
19
|
+
template: `<div>
|
|
20
|
+
<farm-btn-import color="info" variation="lighten" />
|
|
21
|
+
<farm-btn-import color="info" variation="darken" />
|
|
22
|
+
</div>`,
|
|
23
|
+
});
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<farm-btn
|
|
2
|
+
<farm-btn
|
|
3
|
+
class="farm-btn--responsive farm-btn--import"
|
|
4
|
+
title="Importar"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
@click="onClick"
|
|
7
|
+
>
|
|
3
8
|
<farm-icon>upload</farm-icon>
|
|
4
9
|
{{ label }}
|
|
5
10
|
</farm-btn>
|
|
@@ -20,3 +20,16 @@ export const List = () => ({
|
|
|
20
20
|
@onClick="listener"
|
|
21
21
|
/>`,
|
|
22
22
|
});
|
|
23
|
+
|
|
24
|
+
export const CustomColor = () => ({
|
|
25
|
+
methods: {
|
|
26
|
+
listener(key) {
|
|
27
|
+
alert('Handler for item ' + key);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
template: `<farm-btn-multipleimport
|
|
31
|
+
color="info"
|
|
32
|
+
:optionsList="[{ listenerKey: 1, title: 'XLS teste'}, { listenerKey: 2, title: 'CSV teste novo'}]"
|
|
33
|
+
@onClick="listener"
|
|
34
|
+
/>`,
|
|
35
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<farm-contextmenu v-model="value" :bottom="true">
|
|
3
3
|
<template v-slot:activator="{}">
|
|
4
|
-
<farm-btn outlined title="Importar"
|
|
4
|
+
<farm-btn outlined title="Importar" v-bind="$attrs">
|
|
5
5
|
Importar
|
|
6
6
|
<farm-icon class="ml-2"> chevron-{{ value ? 'up' : 'down' }} </farm-icon>
|
|
7
7
|
</farm-btn>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<farm-listitem
|
|
11
11
|
v-for="item in optionsList"
|
|
12
12
|
clickable
|
|
13
|
-
hoverColor="primary"
|
|
13
|
+
:hoverColor="$attrs.color || 'primary'"
|
|
14
14
|
hoverColorVariation="lighten"
|
|
15
15
|
:key="'importbutton_key_' + item.title"
|
|
16
16
|
:title="item.title"
|
|
@@ -49,9 +49,6 @@ export default Vue.extend({
|
|
|
49
49
|
onClick(key) {
|
|
50
50
|
this.$emit('onClick', key);
|
|
51
51
|
},
|
|
52
|
-
toggleValue() {
|
|
53
|
-
this.value = !this.value;
|
|
54
|
-
},
|
|
55
52
|
},
|
|
56
53
|
});
|
|
57
|
-
</script>
|
|
54
|
+
</script>
|
|
@@ -9,10 +9,14 @@ export const Primary = () => ({
|
|
|
9
9
|
template: '<farm-btn-toggle label="Botão" />',
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const PositionRight = () => ({
|
|
13
13
|
template: '<farm-btn-toggle label="Botão" position="right" />',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
export const Opened = () => ({
|
|
17
17
|
template: '<farm-btn-toggle label="Botão" :pressed="true" />',
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
export const CustomColor = () => ({
|
|
21
|
+
template: '<farm-btn-toggle color="info" label="Botão" />',
|
|
22
|
+
});
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<farm-btn
|
|
3
3
|
@click="onClick"
|
|
4
|
-
|
|
4
|
+
v-bind="$attrs"
|
|
5
5
|
class="farm-btn--responsive"
|
|
6
6
|
:class="{
|
|
7
7
|
'v-btn_icon--prepend': prepend,
|
|
8
8
|
'v-btn_icon--apppend': !prepend,
|
|
9
9
|
}"
|
|
10
|
-
:color="color"
|
|
11
10
|
:outlined="!open"
|
|
12
11
|
:title="label"
|
|
13
12
|
>
|
|
14
|
-
<farm-icon v-if="prepend" class="mr-3 ml-0">{{
|
|
13
|
+
<farm-icon v-if="prepend" class="mr-3 ml-0">{{
|
|
14
|
+
`chevron-${open ? 'up' : 'down'}`
|
|
15
|
+
}}</farm-icon>
|
|
15
16
|
{{ label }}
|
|
16
|
-
<farm-icon v-if="!prepend" class="ml-3 mr-0">{{
|
|
17
|
+
<farm-icon v-if="!prepend" class="ml-3 mr-0">{{
|
|
18
|
+
`chevron-${open ? 'up' : 'down'}`
|
|
19
|
+
}}</farm-icon>
|
|
17
20
|
</farm-btn>
|
|
18
21
|
</template>
|
|
19
22
|
<script lang="ts">
|
|
@@ -35,13 +38,6 @@ export default Vue.extend({
|
|
|
35
38
|
type: String,
|
|
36
39
|
default: '',
|
|
37
40
|
},
|
|
38
|
-
/**
|
|
39
|
-
* Cor do botão - usando as do tema do vuetify
|
|
40
|
-
*/
|
|
41
|
-
color: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: 'primary',
|
|
44
|
-
},
|
|
45
41
|
/**
|
|
46
42
|
* Pressionado ou não
|
|
47
43
|
*/
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
button:hover:after {
|
|
17
|
-
border-top-color: var(--
|
|
17
|
+
border-top-color: var(--farm-primary-base);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
button:after {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
content: '';
|
|
23
23
|
width: 0px;
|
|
24
24
|
height: 0px;
|
|
25
|
-
border-top: 0.25rem solid var(--
|
|
25
|
+
border-top: 0.25rem solid var(--farm-secondary-green-base);
|
|
26
26
|
border-right: 0.25rem solid transparent;
|
|
27
27
|
border-bottom: 0.25rem solid transparent;
|
|
28
28
|
border-left: 0.25rem solid transparent;
|
|
@@ -6,8 +6,8 @@ $loader-overlay-transition: all 0.6s ease-in-out !default;
|
|
|
6
6
|
.farm-loader {
|
|
7
7
|
width: 70px;
|
|
8
8
|
height: 70px;
|
|
9
|
-
color: var(--
|
|
10
|
-
caret-color: var(--
|
|
9
|
+
color: var(--farm-primary-base) !important;
|
|
10
|
+
caret-color: var(--farm-primary-base) !important;
|
|
11
11
|
position: relative;
|
|
12
12
|
display: inline-flex;
|
|
13
13
|
vertical-align: middle;
|
|
@@ -183,7 +183,7 @@ export const LineHeight = () => ({
|
|
|
183
183
|
tag="p"
|
|
184
184
|
:lineHeight="h"
|
|
185
185
|
:key="h"
|
|
186
|
-
style="border: 1px solid var(--
|
|
186
|
+
style="border: 1px solid var(--farm-gray-base); padding: 8px;"
|
|
187
187
|
>
|
|
188
188
|
Typography - height {{ h }}<br />
|
|
189
189
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.farm-btn.farm-btn--import {
|
|
2
|
-
background: var(--v-extra-lighten2);
|
|
3
|
-
color: var(--v-gray-lighten5);
|
|
4
|
-
.farm-btn__content i.mdi {
|
|
5
|
-
margin-right: 1rem;
|
|
6
|
-
color: var(--v-gray-lighten5);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.v-list-item {
|
|
11
|
-
border-bottom: 1px solid var(--v-gray-lighten2);
|
|
12
|
-
&:last-child {
|
|
13
|
-
border-bottom: none;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.v-list-item--link {
|
|
17
|
-
font-size: 0.875rem;
|
|
18
|
-
}
|