@farm-investimentos/front-mfe-components 10.1.3 → 10.1.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 +2576 -2575
- 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 +2576 -2575
- 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/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/IdCaption/IdCaption.vue +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
@@ -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')">
|