@farm-investimentos/front-mfe-components 11.1.1 → 11.2.0
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 +497 -475
- 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 +497 -475
- 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/Buttons/ExportButton/ExportButton.stories.js +11 -4
- package/src/components/Buttons/ExportButton/ExportButton.vue +29 -70
- package/src/components/Card/Card.scss +2 -2
- package/src/components/Card/Card.stories.js +0 -1
- package/src/components/Card/Card.vue +4 -1
- package/src/components/Card/CardComposition.stories.ts +1 -2
- package/src/components/Card/CardContent/CardContent.stories.js +13 -2
- package/src/components/Card/CardContent/CardContent.vue +6 -3
- package/src/components/ContextMenu/ContextMenu.vue +18 -8
- package/src/components/DataTableHeader/DataTableHeader.scss +1 -1
- package/src/components/DataTablePaginator/DataTablePaginator.scss +24 -7
- package/src/components/DataTablePaginator/DataTablePaginator.vue +45 -11
- package/src/components/Form/Form.stories.js +11 -0
- package/src/components/IconBox/IconBox.scss +8 -0
- package/src/components/Loader/Loader.stories.ts +1 -1
- package/src/components/Loader/Loader.vue +50 -58
- package/src/components/Modal/Modal.scss +0 -1
- package/src/components/Modal/Modal.vue +13 -4
- package/src/components/TableContextMenu/TableContextMenu.stories.js +15 -0
- package/src/components/Typography/Typography.scss +2 -1
- package/src/helpers/calculateMainZindex.js +10 -0
- package/src/helpers/date.js +1 -1
- package/src/helpers/index.js +1 -0
|
@@ -1,60 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<div class="farm-loader__overlay" v-if="mode === 'overlay'" :style="styleObject">
|
|
3
|
+
<div
|
|
4
|
+
role="progressbar"
|
|
5
|
+
aria-valuemin="0"
|
|
6
|
+
aria-valuemax="100"
|
|
7
|
+
class="farm-loader farm-loader--big farm-loader--visible farm-loader--indeterminate"
|
|
8
|
+
>
|
|
9
|
+
<svg
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
viewBox="22.857142857142858 22.857142857142858 45.714285714285715 45.714285714285715"
|
|
12
|
+
style="transform: rotate(0deg)"
|
|
9
13
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
stroke-dashoffset="125.66370614359172px"
|
|
22
|
-
class="farm-loader__overlay"
|
|
23
|
-
></circle>
|
|
24
|
-
</svg>
|
|
25
|
-
<div class="farm-loader__info"></div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div v-else>
|
|
29
|
-
<div
|
|
30
|
-
role="progressbar"
|
|
31
|
-
aria-valuemin="0"
|
|
32
|
-
aria-valuemax="100"
|
|
33
|
-
class="farm-loader farm-loader--visible farm-loader--indeterminate"
|
|
34
|
-
:class="calculateSize"
|
|
35
|
-
>
|
|
36
|
-
<svg
|
|
37
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
38
|
-
viewBox="22.857142857142858 22.857142857142858 45.714285714285715 45.714285714285715"
|
|
39
|
-
style="transform: rotate(0deg)"
|
|
40
|
-
>
|
|
41
|
-
<circle
|
|
42
|
-
fill="transparent"
|
|
43
|
-
cx="45.714285714285715"
|
|
44
|
-
cy="45.714285714285715"
|
|
45
|
-
r="20"
|
|
46
|
-
stroke-dasharray="125.664"
|
|
47
|
-
stroke-dashoffset="125.66370614359172px"
|
|
48
|
-
class="farm-loader__overlay"
|
|
49
|
-
></circle>
|
|
50
|
-
</svg>
|
|
51
|
-
<div class="farm-loader__info"></div>
|
|
52
|
-
</div>
|
|
14
|
+
<circle
|
|
15
|
+
fill="transparent"
|
|
16
|
+
cx="45.714285714285715"
|
|
17
|
+
cy="45.714285714285715"
|
|
18
|
+
r="20"
|
|
19
|
+
stroke-dasharray="125.664"
|
|
20
|
+
stroke-dashoffset="125.66370614359172px"
|
|
21
|
+
class="farm-loader__overlay"
|
|
22
|
+
></circle>
|
|
23
|
+
</svg>
|
|
24
|
+
<div class="farm-loader__info"></div>
|
|
53
25
|
</div>
|
|
54
26
|
</div>
|
|
27
|
+
<div
|
|
28
|
+
v-else
|
|
29
|
+
role="progressbar"
|
|
30
|
+
aria-valuemin="0"
|
|
31
|
+
aria-valuemax="100"
|
|
32
|
+
class="farm-loader farm-loader--visible farm-loader--indeterminate"
|
|
33
|
+
:class="calculateSize"
|
|
34
|
+
>
|
|
35
|
+
<svg
|
|
36
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
+
viewBox="22.857142857142858 22.857142857142858 45.714285714285715 45.714285714285715"
|
|
38
|
+
style="transform: rotate(0deg)"
|
|
39
|
+
>
|
|
40
|
+
<circle
|
|
41
|
+
fill="transparent"
|
|
42
|
+
cx="45.714285714285715"
|
|
43
|
+
cy="45.714285714285715"
|
|
44
|
+
r="20"
|
|
45
|
+
stroke-dasharray="125.664"
|
|
46
|
+
stroke-dashoffset="125.66370614359172px"
|
|
47
|
+
class="farm-loader__overlay"
|
|
48
|
+
></circle>
|
|
49
|
+
</svg>
|
|
50
|
+
<div class="farm-loader__info"></div>
|
|
51
|
+
</div>
|
|
55
52
|
</template>
|
|
56
53
|
<script lang="ts">
|
|
57
54
|
import Vue from 'vue';
|
|
55
|
+
import { calculateMainZindex } from '../../helpers';
|
|
58
56
|
|
|
59
57
|
export default Vue.extend({
|
|
60
58
|
name: 'farm-loader',
|
|
@@ -69,15 +67,9 @@ export default Vue.extend({
|
|
|
69
67
|
},
|
|
70
68
|
},
|
|
71
69
|
data() {
|
|
72
|
-
const zIndex = Math.max(
|
|
73
|
-
...Array.from(document.querySelectorAll('body *'), el =>
|
|
74
|
-
parseFloat(window.getComputedStyle(el).zIndex)
|
|
75
|
-
).filter(zIndex => !Number.isNaN(zIndex)),
|
|
76
|
-
0
|
|
77
|
-
);
|
|
78
70
|
return {
|
|
79
71
|
styleObject: {
|
|
80
|
-
zIndex,
|
|
72
|
+
zIndex: calculateMainZindex(),
|
|
81
73
|
},
|
|
82
74
|
};
|
|
83
75
|
},
|
|
@@ -90,5 +82,5 @@ export default Vue.extend({
|
|
|
90
82
|
});
|
|
91
83
|
</script>
|
|
92
84
|
<style lang="scss" scoped>
|
|
93
|
-
@import 'Loader
|
|
85
|
+
@import 'Loader';
|
|
94
86
|
</style>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="fade">
|
|
3
|
-
<div
|
|
4
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="inputValue"
|
|
5
|
+
:class="{ 'farm-modal': true, ['farm-modal--size-' + size]: true }"
|
|
6
|
+
:style="styleObject"
|
|
7
|
+
>
|
|
8
|
+
<div class="farm-modal--container teste">
|
|
5
9
|
<div class="farm-modal--header">
|
|
6
10
|
<!-- @slot header -->
|
|
7
11
|
<slot name="header"></slot>
|
|
@@ -21,8 +25,10 @@
|
|
|
21
25
|
</div>
|
|
22
26
|
</transition>
|
|
23
27
|
</template>
|
|
28
|
+
|
|
24
29
|
<script lang="ts">
|
|
25
|
-
import Vue, { PropType, ref, toRefs, watch } from 'vue';
|
|
30
|
+
import Vue, { PropType, reactive, ref, toRefs, watch } from 'vue';
|
|
31
|
+
import { calculateMainZindex } from '../../helpers';
|
|
26
32
|
|
|
27
33
|
export default Vue.extend({
|
|
28
34
|
name: 'farm-modal',
|
|
@@ -57,6 +63,7 @@ export default Vue.extend({
|
|
|
57
63
|
setup(props, { emit }) {
|
|
58
64
|
const { offsetTop, offsetBottom, persistent, size } = toRefs(props);
|
|
59
65
|
const inputValue = ref(props.value);
|
|
66
|
+
const styleObject = reactive({ zIndex: 1 });
|
|
60
67
|
const styles = {
|
|
61
68
|
marginTop: offsetTop.value + 'px',
|
|
62
69
|
marginBottom: offsetBottom.value + 'px',
|
|
@@ -77,7 +84,8 @@ export default Vue.extend({
|
|
|
77
84
|
newValue => {
|
|
78
85
|
inputValue.value = newValue;
|
|
79
86
|
if (newValue) {
|
|
80
|
-
|
|
87
|
+
(styleObject.zIndex = calculateMainZindex()),
|
|
88
|
+
window.addEventListener('keyup', escHandler);
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
);
|
|
@@ -91,6 +99,7 @@ export default Vue.extend({
|
|
|
91
99
|
return {
|
|
92
100
|
inputValue,
|
|
93
101
|
styles,
|
|
102
|
+
styleObject,
|
|
94
103
|
size,
|
|
95
104
|
close,
|
|
96
105
|
};
|
|
@@ -64,3 +64,18 @@ export const ClickHandler = () => ({
|
|
|
64
64
|
<farm-context-menu :items="[{ label: 'Click me', icon: { type: 'open-in-new' }, handler: 'edit' }]" @edit="editItem()" />
|
|
65
65
|
</div>`,
|
|
66
66
|
});
|
|
67
|
+
|
|
68
|
+
export const OnRightSide = () => ({
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
items: [
|
|
72
|
+
{ label: 'Novo', icon: { type: 'open-in-new' } },
|
|
73
|
+
{ label: 'Nome bem longo sem quebrar linha', icon: { color: 'secondary', type: 'open-in-new' } },
|
|
74
|
+
{ label: 'Remover', icon: { color: 'error', type: 'delete' } },
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
template: `<div style="padding-left: 80px; display: flex; justify-content: end;">
|
|
79
|
+
<farm-context-menu ref="multi" :items="items" />
|
|
80
|
+
</div>`,
|
|
81
|
+
});
|
package/src/helpers/date.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as calculateMainZindex } from './calculateMainZindex';
|