@farm-investimentos/front-mfe-components 11.8.0 → 11.8.1
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 +237 -234
- 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 +237 -234
- 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/DialogHeader/DialogHeader.vue +1 -0
- package/src/components/IdCaption/IdCaption.scss +9 -3
- package/src/components/IdCaption/IdCaption.stories.js +18 -0
- package/src/components/IdCaption/IdCaption.vue +7 -1
- package/src/components/Modal/Modal.vue +1 -1
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +9 -5
- package/src/components/Select/Select.scss +5 -0
- package/src/components/Select/__tests__/Select.spec.js +5 -0
- package/src/components/TableContextMenu/TableContextMenu.scss +5 -15
- package/src/components/TableContextMenu/TableContextMenu.stories.js +11 -2
- package/src/components/TableContextMenu/TableContextMenu.vue +19 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.idcaption {
|
|
2
2
|
display: flex;
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
.farm-icon-box {
|
|
5
5
|
margin-right: 8px;
|
|
6
6
|
}
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.farm-typography {
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
margin-bottom: 0;
|
|
22
22
|
display: flex;
|
|
23
23
|
flex: none;
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
>span {
|
|
25
26
|
position: relative;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -33,4 +34,9 @@
|
|
|
33
34
|
top: -8px;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
37
|
+
|
|
38
|
+
.farm-btn--clickable {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: -50%;
|
|
41
|
+
}
|
|
36
42
|
}
|
|
@@ -183,3 +183,21 @@ export const CustomTooltipColor = () => ({
|
|
|
183
183
|
</farm-idcaption>
|
|
184
184
|
`,
|
|
185
185
|
});
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
export const Teste = () => ({
|
|
189
|
+
template: `
|
|
190
|
+
<farm-idcaption
|
|
191
|
+
icon="account-box-outline"
|
|
192
|
+
copy-text=""
|
|
193
|
+
:link="true"
|
|
194
|
+
>
|
|
195
|
+
<template v-slot:title>
|
|
196
|
+
Upper Line Text
|
|
197
|
+
</template>
|
|
198
|
+
<template v-slot:subtitle>
|
|
199
|
+
0
|
|
200
|
+
</template>
|
|
201
|
+
</farm-idcaption>
|
|
202
|
+
`,
|
|
203
|
+
});
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
<farm-caption variation="medium" v-if="hasTitle">
|
|
8
8
|
<span>
|
|
9
9
|
<slot name="title"></slot>
|
|
10
|
-
<farm-btn
|
|
10
|
+
<farm-btn
|
|
11
|
+
v-if="link"
|
|
12
|
+
icon
|
|
13
|
+
color="gray"
|
|
14
|
+
class="farm-btn--clickable"
|
|
15
|
+
@click="$emit('onLinkClick')"
|
|
16
|
+
>
|
|
11
17
|
<farm-icon size="xs">open-in-new</farm-icon>
|
|
12
18
|
</farm-btn>
|
|
13
19
|
</span>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:class="{ 'farm-modal': true, ['farm-modal--size-' + size]: true }"
|
|
6
6
|
:style="styleObject"
|
|
7
7
|
>
|
|
8
|
-
<div class="farm-modal--container
|
|
8
|
+
<div class="farm-modal--container">
|
|
9
9
|
<div class="farm-modal--header">
|
|
10
10
|
<!-- @slot header -->
|
|
11
11
|
<slot name="header"></slot>
|
|
@@ -195,15 +195,19 @@ export default Vue.extend({
|
|
|
195
195
|
this.$emit('onFileChange', newValue);
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
const invalidTypeArray = newValue.filter(
|
|
199
|
-
file
|
|
198
|
+
const invalidTypeArray = newValue.filter(file => {
|
|
199
|
+
const type = file.type;
|
|
200
|
+
|
|
201
|
+
return (
|
|
200
202
|
this.acceptedFileTypes !== '*' &&
|
|
201
|
-
this.acceptedFileTypes.indexOf(file.type) === -1
|
|
202
|
-
|
|
203
|
+
(this.acceptedFileTypes.indexOf(file.type) === -1 || !type)
|
|
204
|
+
);
|
|
205
|
+
});
|
|
203
206
|
|
|
204
207
|
if (invalidTypeArray.length > 0) {
|
|
205
208
|
const validTypeArray = newValue.filter(file => {
|
|
206
|
-
|
|
209
|
+
const type = file.type;
|
|
210
|
+
if (this.acceptedFileTypes.indexOf(file.type) === -1 || !type) {
|
|
207
211
|
return false;
|
|
208
212
|
}
|
|
209
213
|
return true;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.v-list-item__title {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
::v-deep .v-application--wrap {
|
|
13
|
-
min-height: auto;
|
|
14
|
-
font-family: 'Montserrat', sans-serif !important;
|
|
1
|
+
.farm-context-menu {
|
|
2
|
+
&--disabled {
|
|
3
|
+
pointer-events: none;
|
|
4
|
+
}
|
|
15
5
|
}
|
|
16
6
|
|
|
17
7
|
.farm-listitem {
|
|
@@ -21,4 +11,4 @@
|
|
|
21
11
|
vertical-align: sub;
|
|
22
12
|
margin-right: 8px;
|
|
23
13
|
}
|
|
24
|
-
}
|
|
14
|
+
}
|
|
@@ -28,6 +28,12 @@ export const Primary = () => ({
|
|
|
28
28
|
</div>`,
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
export const Disabled = () => ({
|
|
32
|
+
template: `<div style="padding-left: 80px">
|
|
33
|
+
<farm-context-menu disabled :items="[{ label: 'Remover', icon: { color: 'error', type: 'open-in-new' } }]" />
|
|
34
|
+
</div>`,
|
|
35
|
+
});
|
|
36
|
+
|
|
31
37
|
export const Icons = () => ({
|
|
32
38
|
template: `<div style="padding-left: 80px">
|
|
33
39
|
<farm-context-menu
|
|
@@ -70,7 +76,10 @@ export const OnRightSide = () => ({
|
|
|
70
76
|
return {
|
|
71
77
|
items: [
|
|
72
78
|
{ label: 'Novo', icon: { type: 'open-in-new' } },
|
|
73
|
-
{
|
|
79
|
+
{
|
|
80
|
+
label: 'Nome bem longo sem quebrar linha',
|
|
81
|
+
icon: { color: 'secondary', type: 'open-in-new' },
|
|
82
|
+
},
|
|
74
83
|
{ label: 'Remover', icon: { color: 'error', type: 'delete' } },
|
|
75
84
|
],
|
|
76
85
|
};
|
|
@@ -78,4 +87,4 @@ export const OnRightSide = () => ({
|
|
|
78
87
|
template: `<div style="padding-left: 80px; display: flex; justify-content: end;">
|
|
79
88
|
<farm-context-menu ref="multi" :items="items" />
|
|
80
89
|
</div>`,
|
|
81
|
-
});
|
|
90
|
+
});
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<farm-contextmenu
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<farm-contextmenu
|
|
3
|
+
:class="{ 'farm-context-menu': true, 'farm-context-menu--disabled': disabled }"
|
|
4
|
+
v-model="value"
|
|
5
|
+
>
|
|
6
|
+
<template v-slot:activator>
|
|
7
|
+
<farm-btn
|
|
8
|
+
icon
|
|
9
|
+
title="Abrir opções"
|
|
10
|
+
color="secondary"
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
@click="toggleValue"
|
|
13
|
+
>
|
|
5
14
|
<farm-icon size="md">dots-horizontal</farm-icon>
|
|
6
15
|
</farm-btn>
|
|
7
16
|
</template>
|
|
@@ -47,6 +56,13 @@ export default Vue.extend({
|
|
|
47
56
|
type: Array as PropType<Array<IContextMenuOption>>,
|
|
48
57
|
required: true,
|
|
49
58
|
},
|
|
59
|
+
/**
|
|
60
|
+
* Is disabled?
|
|
61
|
+
*/
|
|
62
|
+
disabled: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false,
|
|
65
|
+
},
|
|
50
66
|
},
|
|
51
67
|
data() {
|
|
52
68
|
return {
|