@farm-investimentos/front-mfe-components 11.0.0 → 11.0.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 +146 -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 +146 -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/Buttons/DefaultButton/DefaultButton.scss +1 -1
- package/src/components/CardContext/CardContext.stories.js +9 -0
- package/src/components/CardContext/CardContext.vue +23 -3
- package/src/components/layout/Box/Box.scss +0 -21
- package/src/components/layout/Box/Box.stories.js +0 -37
- package/src/components/layout/Box/Box.vue +0 -16
package/package.json
CHANGED
|
@@ -64,3 +64,12 @@ export const NoIcon = () => ({
|
|
|
64
64
|
</farm-card-context>
|
|
65
65
|
`,
|
|
66
66
|
});
|
|
67
|
+
|
|
68
|
+
export const TooltipText = () => ({
|
|
69
|
+
template: `
|
|
70
|
+
<farm-card-context tooltipText="Lorem Ipsum is simply dummy text of the printing and typesetting industry" icon="mdi-currency-usd" title="Titulo do Card">
|
|
71
|
+
<p>Conteúdo do Card</p>
|
|
72
|
+
</farm-card-context>
|
|
73
|
+
`,
|
|
74
|
+
});
|
|
75
|
+
|
|
@@ -9,9 +9,22 @@
|
|
|
9
9
|
<div class="card-context-header" v-if="isSuccess && title">
|
|
10
10
|
<farm-icon-box v-if="icon" :icon="icon" />
|
|
11
11
|
<div class="card-context-content">
|
|
12
|
-
<
|
|
13
|
-
{
|
|
14
|
-
|
|
12
|
+
<div class="d-flex align-center">
|
|
13
|
+
<p :class="{
|
|
14
|
+
'mr-2': true,
|
|
15
|
+
'mb-1': true,
|
|
16
|
+
'card-context-title': true,
|
|
17
|
+
'card-context-content--bold': bold }"
|
|
18
|
+
>
|
|
19
|
+
{{ title }}
|
|
20
|
+
</p>
|
|
21
|
+
<farm-tooltip v-if="tooltipText !== null">
|
|
22
|
+
{{ tooltipText }}
|
|
23
|
+
<template v-slot:activator="{}">
|
|
24
|
+
<farm-icon size="sm" color="gray">help-circle</farm-icon>
|
|
25
|
+
</template>
|
|
26
|
+
</farm-tooltip>
|
|
27
|
+
</div>
|
|
15
28
|
</div>
|
|
16
29
|
</div>
|
|
17
30
|
<div class="card-context-body" v-if="isSuccess">
|
|
@@ -93,6 +106,13 @@ export default Vue.extend({
|
|
|
93
106
|
type: Boolean,
|
|
94
107
|
default: false,
|
|
95
108
|
},
|
|
109
|
+
/**
|
|
110
|
+
* Show Tooltip and help text
|
|
111
|
+
*/
|
|
112
|
+
tooltipText: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: null,
|
|
115
|
+
}
|
|
96
116
|
},
|
|
97
117
|
computed: {
|
|
98
118
|
isSuccess() {
|
|
@@ -12,25 +12,4 @@
|
|
|
12
12
|
position: relative;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
@each $k in $justifications {
|
|
16
|
-
&#{'--justify-' + $k} {
|
|
17
|
-
>div {
|
|
18
|
-
justify-content: $k;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@each $k in $directions {
|
|
24
|
-
&#{'--direction-' + $k} {
|
|
25
|
-
>div {
|
|
26
|
-
flex-direction: $k;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@each $k in map-keys($gutters) {
|
|
32
|
-
&#{'[gutter=' + $k + ']'} {
|
|
33
|
-
padding: map-get($gutters, $k);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
15
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Box from './Box.vue';
|
|
2
|
-
import { directions, justifications } from '../../../configurations/flexVariables';
|
|
3
2
|
import gutters from '../../../configurations/gutters';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
@@ -30,42 +29,6 @@ export const Tag = () => ({
|
|
|
30
29
|
</div>`,
|
|
31
30
|
});
|
|
32
31
|
|
|
33
|
-
export const Justify = () => ({
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
justifications,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
template: `<div>
|
|
40
|
-
<farm-box :justify="k" v-for="k in justifications" :key="'justify-_' + k" style="border:1px solid var(--farm-stroke-base); margin-bottom: 16px;">
|
|
41
|
-
<div>
|
|
42
|
-
justify {{ k }}
|
|
43
|
-
</div>
|
|
44
|
-
<div>
|
|
45
|
-
another div
|
|
46
|
-
</div>
|
|
47
|
-
</farm-box>
|
|
48
|
-
</div>`,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const Directions = () => ({
|
|
52
|
-
data() {
|
|
53
|
-
return {
|
|
54
|
-
directions,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
template: `<div>
|
|
58
|
-
<farm-box :direction="k" v-for="k in directions" :key="'direction-_' + k" style="border:1px solid var(--farm-stroke-base); margin-bottom: 16px;">
|
|
59
|
-
<div>
|
|
60
|
-
direction {{ k }}
|
|
61
|
-
</div>
|
|
62
|
-
<div>
|
|
63
|
-
another div
|
|
64
|
-
</div>
|
|
65
|
-
</farm-box>
|
|
66
|
-
</div>`,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
32
|
export const Gutters = () => ({
|
|
70
33
|
data() {
|
|
71
34
|
return { gutters };
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
:is="tag"
|
|
4
4
|
:class="{
|
|
5
5
|
'farm-box': true,
|
|
6
|
-
[`farm-box--justify-${justify}`]: justify,
|
|
7
|
-
[`farm-box--direction-${direction}`]: direction,
|
|
8
6
|
}"
|
|
9
7
|
:gutter="gutter"
|
|
10
8
|
>
|
|
@@ -23,20 +21,6 @@ export default Vue.extend({
|
|
|
23
21
|
* Html tag
|
|
24
22
|
*/
|
|
25
23
|
tag: { type: String, default: 'div' },
|
|
26
|
-
/**
|
|
27
|
-
* Applies the flex-direction css property
|
|
28
|
-
*/
|
|
29
|
-
direction: {
|
|
30
|
-
type: String as PropType<'row' | 'row-reverse' | 'column' | 'column-reverse'>,
|
|
31
|
-
default: 'row',
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* Applies the justify-content css property
|
|
35
|
-
*/
|
|
36
|
-
justify: {
|
|
37
|
-
type: String as PropType<'start' | 'center' | 'end' | 'space-between' | 'space-around'>,
|
|
38
|
-
default: '',
|
|
39
|
-
},
|
|
40
24
|
/**
|
|
41
25
|
* Add gutter
|
|
42
26
|
*/
|