@farm-investimentos/front-mfe-components 13.0.6 → 13.1.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 +111 -103
- 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 +111 -103
- 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 +4 -4
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +7 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +1 -1
- package/src/components/Icon/Icon.scss +4 -0
- package/src/components/Icon/Icon.stories.js +1 -1
- package/src/components/IdCaption/IdCaption.scss +3 -0
- package/src/components/IdCaption/IdCaption.stories.js +14 -0
- package/src/components/IdCaption/IdCaption.vue +13 -1
- package/src/examples/VuetifyDialog.stories.js +68 -58
- package/src/scss/VuejsDialog.scss +79 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.1",
|
|
4
4
|
"author": "farm investimentos",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/front-mfe-components.common.js",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"core-js": "^3.8.3",
|
|
26
26
|
"vue": "2.7.10",
|
|
27
|
-
"vuetify": "^2.4.5"
|
|
28
|
-
"vuetify-dialog": "^2.0.17"
|
|
27
|
+
"vuetify": "^2.4.5"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@farm-investimentos/front-mfe-libs-ts": "^1.0.9",
|
|
@@ -47,6 +46,7 @@
|
|
|
47
46
|
"babel-eslint": "^10.1.0",
|
|
48
47
|
"eslint": "^6.7.2",
|
|
49
48
|
"eslint-plugin-vue": "^6.2.2",
|
|
49
|
+
"husky": "^8.0.0",
|
|
50
50
|
"sass": "~1.32.0",
|
|
51
51
|
"sass-loader": "^10.0.0",
|
|
52
52
|
"storybook-addon-designs": "^6.2.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "~4.1.5",
|
|
55
55
|
"v-mask": "2.3.0",
|
|
56
56
|
"vue-template-compiler": "2.7.10",
|
|
57
|
-
"
|
|
57
|
+
"vuejs-dialog": "^1.4.2"
|
|
58
58
|
},
|
|
59
59
|
"browserslist": [
|
|
60
60
|
"> 1%",
|
|
@@ -206,4 +206,18 @@ export const LongTitles = () => ({
|
|
|
206
206
|
</template>
|
|
207
207
|
</farm-idcaption>
|
|
208
208
|
</farm-col>`,
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
export const NoHeight = () => ({
|
|
212
|
+
template: `
|
|
213
|
+
<farm-col sm="3">
|
|
214
|
+
<farm-idcaption
|
|
215
|
+
copyText=""
|
|
216
|
+
:noHeight="true"
|
|
217
|
+
>
|
|
218
|
+
<template v-slot:subtitle>
|
|
219
|
+
Lower: Line Text Line Text Line Text Line
|
|
220
|
+
</template>
|
|
221
|
+
</farm-idcaption>
|
|
222
|
+
</farm-col>`,
|
|
209
223
|
});
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="{
|
|
2
|
+
<div :class="{
|
|
3
|
+
idcaption: true,
|
|
4
|
+
'farm-idcaption': true,
|
|
5
|
+
'farm-idcaption--noicon': !icon,
|
|
6
|
+
'farm-idcaption--noheight': noHeight }"
|
|
7
|
+
>
|
|
3
8
|
<farm-icon-box v-if="icon" :icon="icon" :color="iconBoxColor" size="md" />
|
|
4
9
|
<div
|
|
5
10
|
:class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
|
|
@@ -104,6 +109,13 @@ export default Vue.extend({
|
|
|
104
109
|
>,
|
|
105
110
|
default: 'secondary',
|
|
106
111
|
},
|
|
112
|
+
/**
|
|
113
|
+
* noHeight remove min-height of 48px
|
|
114
|
+
*/
|
|
115
|
+
noHeight: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
107
119
|
},
|
|
108
120
|
|
|
109
121
|
setup(_, { slots }) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { withDesign } from 'storybook-addon-designs';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Display/Dialog/
|
|
4
|
+
title: 'Display/Dialog/Vuejs-dialog',
|
|
5
5
|
decorators: [withDesign],
|
|
6
6
|
parameters: {
|
|
7
7
|
viewMode: 'docs',
|
|
8
8
|
docs: {
|
|
9
9
|
description: {
|
|
10
|
-
component: `Dialog created by
|
|
10
|
+
component: `Dialog created by vuejs-dialog`,
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
},
|
|
@@ -16,19 +16,24 @@ export default {
|
|
|
16
16
|
export const Primary = () => ({
|
|
17
17
|
methods: {
|
|
18
18
|
openDialog() {
|
|
19
|
-
this.$dialog
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
text: 'Sim',
|
|
25
|
-
color: 'secondary',
|
|
26
|
-
handle: () => {
|
|
27
|
-
alert('Clicked: Sim');
|
|
28
|
-
},
|
|
19
|
+
this.$dialog
|
|
20
|
+
.confirm(
|
|
21
|
+
{
|
|
22
|
+
title: 'Dialog title',
|
|
23
|
+
body: 'Dialog content',
|
|
29
24
|
},
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
{
|
|
26
|
+
html: true,
|
|
27
|
+
okText: 'OK',
|
|
28
|
+
cancelText: 'Cancel',
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
.then(() => {
|
|
32
|
+
alert('OK Clicked');
|
|
33
|
+
})
|
|
34
|
+
.catch(() => {
|
|
35
|
+
alert('Cancel clicked');
|
|
36
|
+
});
|
|
32
37
|
},
|
|
33
38
|
},
|
|
34
39
|
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
@@ -38,29 +43,25 @@ export const Primary = () => ({
|
|
|
38
43
|
</div>`,
|
|
39
44
|
});
|
|
40
45
|
|
|
41
|
-
export const
|
|
46
|
+
export const ErrorColor = () => ({
|
|
42
47
|
methods: {
|
|
43
48
|
openDialog() {
|
|
44
|
-
this.$dialog
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
text: 'Cancelar',
|
|
50
|
-
color: 'secondary-outlined',
|
|
51
|
-
handle: () => {
|
|
52
|
-
alert('Clicked: Cancelar');
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
true: {
|
|
56
|
-
text: 'Sim',
|
|
57
|
-
color: 'secondary',
|
|
58
|
-
handle: () => {
|
|
59
|
-
alert('Clicked: Sim');
|
|
60
|
-
},
|
|
49
|
+
this.$dialog
|
|
50
|
+
.alert(
|
|
51
|
+
{
|
|
52
|
+
title: 'Dialog title - Error',
|
|
53
|
+
body: 'Dialog content with error layout',
|
|
61
54
|
},
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
{
|
|
56
|
+
html: true,
|
|
57
|
+
okText: 'OK',
|
|
58
|
+
customClass: 'dg-parent-error',
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
.then(() => {
|
|
62
|
+
alert('OK Clicked');
|
|
63
|
+
})
|
|
64
|
+
.catch(() => {});
|
|
64
65
|
},
|
|
65
66
|
},
|
|
66
67
|
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
@@ -70,22 +71,27 @@ export const Default = () => ({
|
|
|
70
71
|
</div>`,
|
|
71
72
|
});
|
|
72
73
|
|
|
73
|
-
export const
|
|
74
|
+
export const NoFooter = () => ({
|
|
74
75
|
methods: {
|
|
75
76
|
openDialog() {
|
|
76
|
-
this.$dialog
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
text: 'Sair',
|
|
82
|
-
color: 'error',
|
|
83
|
-
handle: () => {
|
|
84
|
-
alert('Clicked: Sair');
|
|
85
|
-
},
|
|
77
|
+
this.$dialog
|
|
78
|
+
.confirm(
|
|
79
|
+
{
|
|
80
|
+
title: 'Dialog title - No footer',
|
|
81
|
+
body: 'Dialog content for notifications without footer (must be closed programmatically)',
|
|
86
82
|
},
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
{
|
|
84
|
+
html: true,
|
|
85
|
+
okText: '',
|
|
86
|
+
customClass: 'dg-parent-nofooter',
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
.then(() => {})
|
|
90
|
+
.catch(() => {});
|
|
91
|
+
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
this.$dialog.destroy();
|
|
94
|
+
}, 2000);
|
|
89
95
|
},
|
|
90
96
|
},
|
|
91
97
|
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
@@ -95,20 +101,24 @@ export const ErrorColor = () => ({
|
|
|
95
101
|
</div>`,
|
|
96
102
|
});
|
|
97
103
|
|
|
98
|
-
|
|
99
|
-
export const CustomContent = () => ({
|
|
104
|
+
export const CustomHtml = () => ({
|
|
100
105
|
methods: {
|
|
101
106
|
openDialog() {
|
|
102
|
-
this.$dialog
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
color:
|
|
107
|
+
this.$dialog
|
|
108
|
+
.alert(
|
|
109
|
+
{
|
|
110
|
+
title: 'Dialog title',
|
|
111
|
+
body: `This is a text with <strong>html markup</strong> and<br />break line!<br />
|
|
112
|
+
Also with an <i class="mdi mdi-book"></i>book icon<br />
|
|
113
|
+
and some <span style="color: var(--farm-warning-base)">color</span>`,
|
|
109
114
|
},
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
{
|
|
116
|
+
html: true,
|
|
117
|
+
okText: 'Button with icon <i class="mdi mdi-book"></i>',
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
.then(() => {})
|
|
121
|
+
.catch(() => {});
|
|
112
122
|
},
|
|
113
123
|
},
|
|
114
124
|
template: `<div style="display: flex; flex-direction: column; max-width: 160px; width: 100%;">
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@import 'vuejs-dialog/dist/vuejs-dialog.min';
|
|
2
|
+
@import '../components/Buttons/DefaultButton/DefaultButton.scss';
|
|
3
|
+
|
|
4
|
+
.dg-main-content {
|
|
5
|
+
font-family: Montserrat, sans-serif !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dg-content-body {
|
|
9
|
+
border-bottom: 1px solid var(--farm-stroke-base);
|
|
10
|
+
margin: 0 -15px;
|
|
11
|
+
padding: 0 16px;
|
|
12
|
+
color: var(--farm-text-base);
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dg-title {
|
|
17
|
+
margin: 0 -15px;
|
|
18
|
+
border-bottom: 1px solid var(--farm-stroke-base);
|
|
19
|
+
padding: 0 16px;
|
|
20
|
+
color: var(--farm-primary-base);
|
|
21
|
+
height: 32px;
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dg-content-body--has-title .dg-content,
|
|
26
|
+
.dg-content {
|
|
27
|
+
margin: 24px 0;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
line-height: 20px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dg-content-footer {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dg-btn {
|
|
39
|
+
@extend .farm-btn;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dg-btn--ok {
|
|
43
|
+
@extend .farm-btn--primary;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dg-btn--cancel {
|
|
47
|
+
@extend .farm-btn--primary;
|
|
48
|
+
@extend .farm-btn--outlined;
|
|
49
|
+
margin-right: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dg-backdrop {
|
|
53
|
+
background-color: rgba(0, 0, 0, .46);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dg-parent-nofooter{
|
|
57
|
+
.dg-content-footer {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dg-content-body {
|
|
62
|
+
border-bottom: none;
|
|
63
|
+
padding-bottom: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dg-content-body--has-title .dg-content,
|
|
67
|
+
.dg-content {
|
|
68
|
+
margin-bottom: 8px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dg-parent-error {
|
|
73
|
+
.dg-btn--ok {
|
|
74
|
+
@extend .farm-btn--error;
|
|
75
|
+
}
|
|
76
|
+
.dg-title {
|
|
77
|
+
color: var(--farm-error-base);
|
|
78
|
+
}
|
|
79
|
+
}
|