@farm-investimentos/front-mfe-components 9.2.2 → 9.2.3
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 +147 -140
- 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 +147 -140
- 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/Chip/Chip.scss +6 -0
- package/src/components/Chip/Chip.stories.js +9 -2
- package/src/components/Chip/Chip.stories.scss +1 -1
- package/src/components/Chip/Chip.vue +11 -4
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +2 -2
- package/src/components/DataTablePaginator/DataTablePaginator.vue +7 -4
package/package.json
CHANGED
|
@@ -10,8 +10,15 @@ export default {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export const Primary = () => ({
|
|
13
|
-
template: `<div>
|
|
14
|
-
<farm-chip color="info">Chip</farm-chip>
|
|
13
|
+
template: `<div class="chips-container">
|
|
14
|
+
<farm-chip color="info">Chip (100% width)</farm-chip>
|
|
15
|
+
</div>`,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const Dense = () => ({
|
|
19
|
+
template: `<div class="chips-container">
|
|
20
|
+
<farm-chip color="info" :dense="true">prop</farm-chip>
|
|
21
|
+
<farm-chip color="secondary" dense>attribute</farm-chip>
|
|
15
22
|
</div>`,
|
|
16
23
|
});
|
|
17
24
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class="{ 'farm-chip': true }">
|
|
3
|
-
<farm-typography tag="span" size="sm">
|
|
4
|
-
<slot></slot>
|
|
5
|
-
</farm-typography>
|
|
2
|
+
<span :class="{ 'farm-chip': true, 'farm-chip--dense': dense }">
|
|
3
|
+
<farm-typography tag="span" size="sm"> <slot></slot> </farm-typography>
|
|
6
4
|
</span>
|
|
7
5
|
</template>
|
|
8
6
|
<script lang="ts">
|
|
@@ -11,6 +9,15 @@ import Vue from 'vue';
|
|
|
11
9
|
export default Vue.extend({
|
|
12
10
|
name: 'farm-chip',
|
|
13
11
|
inheritAttrs: true,
|
|
12
|
+
props: {
|
|
13
|
+
/**
|
|
14
|
+
* Is dense (not 100% width)?
|
|
15
|
+
*/
|
|
16
|
+
dense: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
14
21
|
});
|
|
15
22
|
</script>
|
|
16
23
|
<style lang="scss" scoped>
|
|
@@ -25,13 +25,13 @@ export const Primary = () => ({
|
|
|
25
25
|
components: { DataTablePaginator },
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
28
|
-
totalPages:
|
|
28
|
+
totalPages: 8
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
31
|
template: '<DataTablePaginator :totalPages="totalPages" :page="1" />',
|
|
32
32
|
mounted() {
|
|
33
33
|
setTimeout(() => {
|
|
34
|
-
this.totalPages =
|
|
34
|
+
this.totalPages = 0;
|
|
35
35
|
}, 1000);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
></v-select>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<ul :class="{ 'farm-paginator': true, 'farm-paginator--disabled': disabled }">
|
|
19
|
+
<ul :class="{ 'farm-paginator': true, 'farm-paginator--disabled': disabled || totalPages == null }">
|
|
20
20
|
<li>
|
|
21
|
-
<button :disabled="currentPage === 1 || disabled" @click="previousPage">
|
|
21
|
+
<button :disabled="currentPage === 1 || disabled || totalPages == null" @click="previousPage">
|
|
22
22
|
<farm-icon color="gray" size="sm">chevron-left</farm-icon>
|
|
23
23
|
</button>
|
|
24
24
|
</li>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</li>
|
|
38
38
|
|
|
39
39
|
<li>
|
|
40
|
-
<button :disabled="currentPage === totalPages || disabled" @click="nextPage">
|
|
40
|
+
<button :disabled="currentPage === totalPages || disabled || totalPages == null || totalPages === 0" @click="nextPage">
|
|
41
41
|
<farm-icon color="gray" size="sm">chevron-right</farm-icon>
|
|
42
42
|
</button>
|
|
43
43
|
</li>
|
|
@@ -70,7 +70,10 @@ export default Vue.extend({
|
|
|
70
70
|
/**
|
|
71
71
|
* Total de páginas
|
|
72
72
|
*/
|
|
73
|
-
totalPages:
|
|
73
|
+
totalPages: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: null,
|
|
76
|
+
},
|
|
74
77
|
/**
|
|
75
78
|
* Desabilita controles
|
|
76
79
|
*/
|