@farm-investimentos/front-mfe-components 12.1.2 → 12.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 +139 -135
- 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 +139 -135
- 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/DialogHeader/DialogHeader.scss +26 -22
- package/src/components/DialogHeader/DialogHeader.stories.js +6 -0
- package/src/components/IdCaption/IdCaption.scss +15 -9
- package/src/components/IdCaption/IdCaption.stories.js +15 -10
- package/src/components/IdCaption/IdCaption.vue +16 -16
- package/src/components/ModalPromptUser/ModalPromptUser.stories.js +21 -0
- package/src/components/ModalPromptUser/ModalPromptUser.vue +1 -0
- package/src/components/Tooltip/Tooltip.scss +8 -12
- package/src/components/Tooltip/Tooltip.stories.js +1 -1
package/package.json
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
.farm-dialog-header__close {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
position: absolute;
|
|
3
|
+
margin-top: 0;
|
|
4
|
+
font-size: 16px;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
transition: all 0.4s;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
&:hover {
|
|
9
|
+
opacity: 0.8;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
header {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
padding: 6px 16px;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
color: var(--farm-primary-base);
|
|
19
|
+
border-bottom: 1px solid var(--farm-stroke-divider);
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: flex-start;
|
|
22
|
+
align-items: center;
|
|
23
|
+
height: 48px;
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
> .farm-typography.farm-caption {
|
|
26
|
+
align-items: center;
|
|
27
|
+
width: 100%;
|
|
28
|
+
margin-bottom: 0;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -61,3 +61,9 @@ export const TemplateSlot = () => ({
|
|
|
61
61
|
</farm-dialog-header>
|
|
62
62
|
</div>`,
|
|
63
63
|
});
|
|
64
|
+
|
|
65
|
+
export const VeryLongTitle = () => ({
|
|
66
|
+
template: `<div style="max-width: 480px; position: relative;">
|
|
67
|
+
<farm-dialog-header title="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt leo nec orci hendrerit, in sagittis magna tincidunt." />
|
|
68
|
+
</div>`,
|
|
69
|
+
});
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
.idcaption {
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 48px;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
|
|
4
6
|
.farm-icon-box {
|
|
5
7
|
margin-right: 8px;
|
|
6
8
|
}
|
|
7
9
|
|
|
10
|
+
&.farm-idcaption--noicon .idcaption__body {
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
&__body {
|
|
9
15
|
|
|
10
16
|
display: flex;
|
|
11
17
|
flex-direction: column;
|
|
12
18
|
justify-content: space-between;
|
|
13
19
|
align-content: flex-start;
|
|
20
|
+
max-width: calc(100% - 48px);
|
|
14
21
|
|
|
15
22
|
&--single {
|
|
16
23
|
justify-content: center;
|
|
@@ -21,22 +28,21 @@
|
|
|
21
28
|
margin-bottom: 0;
|
|
22
29
|
display: flex;
|
|
23
30
|
flex: none;
|
|
31
|
+
position: relative;
|
|
32
|
+
align-items: center;
|
|
33
|
+
height: 18px;
|
|
24
34
|
|
|
25
35
|
>span {
|
|
26
|
-
|
|
36
|
+
max-width: 100%;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
27
40
|
}
|
|
28
41
|
}
|
|
29
42
|
|
|
30
|
-
.farm-btn,
|
|
31
43
|
.farm-tooltip {
|
|
32
|
-
|
|
33
|
-
right: -30px;
|
|
34
|
-
top: -8px;
|
|
44
|
+
padding-right: 1px;
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
.farm-btn--clickable {
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: -50%;
|
|
41
|
-
}
|
|
42
48
|
}
|
|
@@ -23,11 +23,17 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const Primary = () => ({
|
|
26
|
+
methods: {
|
|
27
|
+
onLinkClick() {
|
|
28
|
+
alert('onLinkClick');
|
|
29
|
+
}
|
|
30
|
+
},
|
|
26
31
|
template: `
|
|
27
32
|
<farm-idcaption
|
|
28
33
|
icon="account-box-outline"
|
|
29
34
|
copyText="texto a copiar"
|
|
30
35
|
:link="true"
|
|
36
|
+
@onLinkClick="onLinkClick"
|
|
31
37
|
>
|
|
32
38
|
<template v-slot:title>
|
|
33
39
|
Upper Line Text
|
|
@@ -77,7 +83,6 @@ export const NoUpperText = () => ({
|
|
|
77
83
|
<farm-idcaption
|
|
78
84
|
icon="account-box-outline"
|
|
79
85
|
copyText="texto a copiar"
|
|
80
|
-
:link="true"
|
|
81
86
|
>
|
|
82
87
|
<template v-slot:subtitle>
|
|
83
88
|
Lower:Line Text
|
|
@@ -90,7 +95,6 @@ export const NoBottomText = () => ({
|
|
|
90
95
|
template: `
|
|
91
96
|
<farm-idcaption
|
|
92
97
|
icon="account-box-outline"
|
|
93
|
-
copyText="texto a copiar"
|
|
94
98
|
:link="true"
|
|
95
99
|
>
|
|
96
100
|
<template v-slot:title>
|
|
@@ -100,10 +104,11 @@ export const NoBottomText = () => ({
|
|
|
100
104
|
`,
|
|
101
105
|
});
|
|
102
106
|
|
|
103
|
-
export const
|
|
107
|
+
export const NoTextToCopy = () => ({
|
|
104
108
|
template: `
|
|
105
109
|
<farm-idcaption
|
|
106
|
-
icon="account-box-outline"
|
|
110
|
+
icon="account-box-outline"
|
|
111
|
+
copyText=""
|
|
107
112
|
:link="true"
|
|
108
113
|
>
|
|
109
114
|
<template v-slot:title>
|
|
@@ -185,20 +190,20 @@ export const CustomTooltipColor = () => ({
|
|
|
185
190
|
`,
|
|
186
191
|
});
|
|
187
192
|
|
|
188
|
-
|
|
189
|
-
export const Teste = () => ({
|
|
193
|
+
export const LongTitles = () => ({
|
|
190
194
|
template: `
|
|
195
|
+
<farm-col sm="3">
|
|
191
196
|
<farm-idcaption
|
|
192
197
|
icon="account-box-outline"
|
|
193
|
-
|
|
198
|
+
copyText="texto a copiar"
|
|
194
199
|
:link="true"
|
|
195
200
|
>
|
|
196
201
|
<template v-slot:title>
|
|
197
|
-
Upper Line Text
|
|
202
|
+
Upper Line Text Upper Line Text
|
|
198
203
|
</template>
|
|
199
204
|
<template v-slot:subtitle>
|
|
200
|
-
|
|
205
|
+
Lower: Line Text Line Text Line Text Line
|
|
201
206
|
</template>
|
|
202
207
|
</farm-idcaption>
|
|
203
|
-
|
|
208
|
+
</farm-col>`,
|
|
204
209
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="idcaption farm-idcaption">
|
|
2
|
+
<div :class="{ idcaption: true, 'farm-idcaption': true, 'farm-idcaption--noicon': !icon }">
|
|
3
3
|
<farm-icon-box v-if="icon" :icon="icon" :color="iconBoxColor" size="md" />
|
|
4
4
|
<div
|
|
5
5
|
:class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
|
|
@@ -7,28 +7,28 @@
|
|
|
7
7
|
<farm-caption variation="medium" v-if="hasTitle">
|
|
8
8
|
<span>
|
|
9
9
|
<slot name="title"></slot>
|
|
10
|
-
<farm-btn
|
|
11
|
-
v-if="link"
|
|
12
|
-
icon
|
|
13
|
-
color="primary"
|
|
14
|
-
class="farm-btn--clickable"
|
|
15
|
-
@click="$emit('onLinkClick')"
|
|
16
|
-
>
|
|
17
|
-
<farm-icon size="xs">open-in-new</farm-icon>
|
|
18
|
-
</farm-btn>
|
|
19
10
|
</span>
|
|
11
|
+
<farm-btn
|
|
12
|
+
v-if="link"
|
|
13
|
+
icon
|
|
14
|
+
color="primary"
|
|
15
|
+
class="farm-btn--clickable"
|
|
16
|
+
@click="$emit('onLinkClick')"
|
|
17
|
+
>
|
|
18
|
+
<farm-icon size="xs">open-in-new</farm-icon>
|
|
19
|
+
</farm-btn>
|
|
20
20
|
</farm-caption>
|
|
21
21
|
|
|
22
22
|
<farm-caption variation="regular" color="gray" v-if="hasSubtitle">
|
|
23
23
|
<span>
|
|
24
24
|
<slot name="subtitle"></slot>
|
|
25
|
-
<farm-copytoclipboard
|
|
26
|
-
v-if="copyText"
|
|
27
|
-
:toCopy="copyText"
|
|
28
|
-
:successMessage="successMessage"
|
|
29
|
-
:tooltipColor="tooltipColor"
|
|
30
|
-
/>
|
|
31
25
|
</span>
|
|
26
|
+
<farm-copytoclipboard
|
|
27
|
+
v-if="copyText"
|
|
28
|
+
:toCopy="copyText"
|
|
29
|
+
:successMessage="successMessage"
|
|
30
|
+
:tooltipColor="tooltipColor"
|
|
31
|
+
/>
|
|
32
32
|
</farm-caption>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
@@ -71,4 +71,25 @@ export const ButtonLabels = () => ({
|
|
|
71
71
|
reabrir
|
|
72
72
|
</farm-btn>
|
|
73
73
|
</div>`,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export const Slot = () => ({
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
showPrompt: false,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
template: `<div>
|
|
83
|
+
<farm-prompt-user match="CONFIRMAR" title="Título" subtitle="" v-model="showPrompt">
|
|
84
|
+
<template v-slot:subtitle>
|
|
85
|
+
<farm-caption>Using caption and <farm-chip dense>chip</farm-chip></farm-caption>
|
|
86
|
+
<br />
|
|
87
|
+
Digite <strong>CONFIRMAR</strong> para habilitar
|
|
88
|
+
</template>
|
|
89
|
+
</farm-prompt-user>
|
|
90
|
+
click:
|
|
91
|
+
<farm-btn color="primary" @click="showPrompt = true;">
|
|
92
|
+
reabrir
|
|
93
|
+
</farm-btn>
|
|
94
|
+
</div>`,
|
|
74
95
|
});
|
|
@@ -7,15 +7,12 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.farm-tooltip__popup {
|
|
10
|
-
background-color: themeColor('primary');
|
|
10
|
+
background-color: rgba(themeColor('primary'), 0.95);
|
|
11
11
|
|
|
12
12
|
@each $color in $colors {
|
|
13
13
|
@each $color in $theme-colors-list {
|
|
14
|
-
|
|
15
14
|
&.farm-tooltip--#{$color} {
|
|
16
|
-
|
|
17
|
-
background-color: themeColor($color);
|
|
18
|
-
|
|
15
|
+
background-color: rgba(themeColor($color), 0.95);
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
18
|
}
|
|
@@ -25,17 +22,16 @@
|
|
|
25
22
|
visibility: hidden;
|
|
26
23
|
opacity: 0;
|
|
27
24
|
transition: visibility 0.3s linear, opacity 0.3s linear;
|
|
28
|
-
color: white;
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
border-radius: 4px;
|
|
31
|
-
padding: 8px 12px;
|
|
32
25
|
position: absolute;
|
|
33
26
|
width: 160px;
|
|
34
|
-
background-color: themeColor('primary');
|
|
35
27
|
contain: content;
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
color: white;
|
|
29
|
+
background-color: themeColor('primary');
|
|
30
|
+
border-radius: 4px;
|
|
38
31
|
font-family: 'Montserrat', sans-serif !important;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
padding: 8px 12px;
|
|
34
|
+
display: block;
|
|
39
35
|
|
|
40
36
|
&--visible {
|
|
41
37
|
opacity: 1;
|