@farm-investimentos/front-mfe-components 15.14.3 → 15.14.5
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 +385 -335
- 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 +385 -335
- 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/Tooltip/Tooltip.scss +89 -61
- package/src/components/Tooltip/Tooltip.stories.js +228 -152
- package/src/components/Tooltip/Tooltip.vue +265 -249
- package/src/components/Tooltip/docs/README.md +304 -0
- package/src/components/Tooltip/docs/SPECIFICATION.md +374 -0
- package/src/components/Tooltip/index.ts +16 -0
- package/src/components/Tooltip/types/tooltip.types.ts +49 -0
- package/src/components/Tooltip/utils/tooltip.utils.ts +70 -0
package/package.json
CHANGED
|
@@ -1,44 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* CSS simplificado para Tooltip - Abordagem simples e direta
|
|
3
|
+
* SEMPRE usa position: fixed via JavaScript
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
/* Container principal */
|
|
7
|
+
.tooltip-container {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Activator */
|
|
13
|
+
.tooltip-activator {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
}
|
|
6
16
|
|
|
17
|
+
/*
|
|
18
|
+
* COMPATIBILIDADE: Classes antigas mantidas para outros componentes
|
|
19
|
+
* que fazem @extend .farm-tooltip__popup
|
|
20
|
+
*/
|
|
7
21
|
.farm-tooltip {
|
|
8
22
|
display: inline-block;
|
|
9
23
|
position: relative;
|
|
24
|
+
}
|
|
10
25
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
26
|
+
.farm-tooltip__activator {
|
|
27
|
+
display: inline-block;
|
|
14
28
|
}
|
|
15
29
|
|
|
16
30
|
.farm-tooltip__popup {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
opacity: 0;
|
|
20
|
-
transition: visibility 0.3s linear, opacity 0.3s linear;
|
|
21
|
-
position: absolute;
|
|
22
|
-
width: 160px;
|
|
31
|
+
/* Estilos base mantidos para compatibilidade */
|
|
32
|
+
background-color: #333333;
|
|
23
33
|
color: #f5f5f5;
|
|
24
34
|
border-radius: 5px;
|
|
25
|
-
font-family: 'Manrope', sans-serif
|
|
35
|
+
font-family: 'Manrope', sans-serif;
|
|
26
36
|
font-size: 12px;
|
|
27
|
-
font-weight:
|
|
37
|
+
font-weight: 500;
|
|
28
38
|
padding: 16px;
|
|
29
|
-
|
|
39
|
+
position: fixed; /* SEMPRE fixed agora */
|
|
30
40
|
z-index: 9999;
|
|
41
|
+
transform: translateZ(0);
|
|
42
|
+
pointer-events: auto;
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
/* Estados */
|
|
45
|
+
opacity: 0;
|
|
46
|
+
visibility: hidden;
|
|
47
|
+
transition: opacity 0.3s linear, visibility 0.3s linear;
|
|
36
48
|
|
|
49
|
+
/* Variantes */
|
|
37
50
|
&--visible {
|
|
38
51
|
opacity: 1;
|
|
39
52
|
visibility: visible;
|
|
40
53
|
}
|
|
41
54
|
|
|
55
|
+
&--fluid {
|
|
56
|
+
width: auto;
|
|
57
|
+
max-width: 300px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Header */
|
|
42
61
|
.farm-tooltip__header {
|
|
43
62
|
display: flex;
|
|
44
63
|
justify-content: space-between;
|
|
@@ -56,55 +75,60 @@ $arrow-margin: 12px;
|
|
|
56
75
|
font-weight: 500;
|
|
57
76
|
}
|
|
58
77
|
|
|
59
|
-
.farm-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
height:
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
.farm-tooltip__close {
|
|
79
|
+
width: 16px;
|
|
80
|
+
height: 16px;
|
|
81
|
+
line-height: 16px;
|
|
82
|
+
text-align: center;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
color: #f5f5f5;
|
|
65
86
|
}
|
|
87
|
+
}
|
|
66
88
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
/* Estilos globais para tooltip criado dinamicamente */
|
|
90
|
+
.tooltip-popup {
|
|
91
|
+
background-color: #333333;
|
|
92
|
+
color: #f5f5f5;
|
|
93
|
+
border-radius: 5px;
|
|
94
|
+
font-family: 'Manrope', sans-serif;
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
font-weight: 500;
|
|
97
|
+
padding: 16px;
|
|
98
|
+
position: fixed;
|
|
99
|
+
z-index: 9999;
|
|
100
|
+
transform: translateZ(0);
|
|
101
|
+
pointer-events: auto;
|
|
76
102
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
103
|
+
/* Estados */
|
|
104
|
+
opacity: 0;
|
|
105
|
+
visibility: hidden;
|
|
106
|
+
transition: opacity 0.3s linear, visibility 0.3s linear;
|
|
107
|
+
|
|
108
|
+
&--visible {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
visibility: visible;
|
|
85
111
|
}
|
|
86
112
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
113
|
+
/* Header */
|
|
114
|
+
.tooltip-header {
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: space-between;
|
|
117
|
+
align-items: center;
|
|
118
|
+
margin-bottom: 8px;
|
|
91
119
|
}
|
|
92
120
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
right:
|
|
121
|
+
.tooltip-title {
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
font-size: 13px;
|
|
124
|
+
margin-right: 16px;
|
|
97
125
|
}
|
|
98
126
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
&--bottom-center .farm-tooltip__arrow {
|
|
102
|
-
left: 50%;
|
|
103
|
-
transform: translateX(-50%);
|
|
127
|
+
.tooltip-content {
|
|
128
|
+
font-weight: 500;
|
|
104
129
|
}
|
|
105
130
|
|
|
106
|
-
.
|
|
107
|
-
position: relative;
|
|
131
|
+
.tooltip-close {
|
|
108
132
|
width: 16px;
|
|
109
133
|
height: 16px;
|
|
110
134
|
line-height: 16px;
|
|
@@ -114,9 +138,13 @@ $arrow-margin: 12px;
|
|
|
114
138
|
color: #f5f5f5;
|
|
115
139
|
}
|
|
116
140
|
|
|
117
|
-
|
|
141
|
+
/* Seta presa ao tooltip */
|
|
142
|
+
.tooltip-arrow {
|
|
118
143
|
position: absolute;
|
|
119
|
-
|
|
120
|
-
|
|
144
|
+
width: 0;
|
|
145
|
+
height: 0;
|
|
146
|
+
border-style: solid;
|
|
147
|
+
z-index: 10000;
|
|
148
|
+
pointer-events: none;
|
|
121
149
|
}
|
|
122
150
|
}
|
|
@@ -1,205 +1,281 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Tooltip from './Tooltip.vue';
|
|
2
|
+
import Modal from '../Modal/Modal.vue';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: '
|
|
5
|
+
title: 'Display/Tooltip',
|
|
6
6
|
component: Tooltip,
|
|
7
|
-
decorators: [withDesign],
|
|
8
7
|
parameters: {
|
|
9
8
|
docs: {
|
|
10
9
|
description: {
|
|
11
10
|
component: `Tooltip<br />
|
|
12
11
|
selector: <em>farm-tooltip</em><br />
|
|
13
12
|
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
14
|
-
<br /><br />
|
|
15
|
-
<h3>Important notes:</h3>
|
|
16
|
-
<ul>
|
|
17
|
-
<li><strong>Do not add margin to the activator element</strong> - This can confuse the tooltip display watcher and prevent the arrow from being positioned correctly</li>
|
|
18
|
-
<li>Prefer to add margin to the parent element or sibling elements of the tooltip</li>
|
|
19
|
-
<li>Arrow positioning is calculated based on the activator element position</li>
|
|
20
|
-
<li>The close button (X) is automatically displayed only in tooltips controlled by v-model</li>
|
|
21
|
-
<li>The arrow is only displayed when a position is explicitly defined (position property). If no position is defined, the tooltip will not have an arrow</li>
|
|
22
|
-
<li>You can add a title to the tooltip using the "title" slot. When used in a controlled tooltip, the close button will be aligned with the title</li>
|
|
23
|
-
</ul>
|
|
24
13
|
`,
|
|
25
14
|
},
|
|
26
15
|
},
|
|
27
|
-
design: {
|
|
28
|
-
type: 'figma',
|
|
29
|
-
url: 'https://www.figma.com/file/p62YDSTfWg0Mcnf5APfdvI/%E2%9C%8D-Design-System-%7C-v2?node-id=3779%3A6131',
|
|
30
|
-
},
|
|
31
16
|
viewMode: 'docs',
|
|
32
17
|
},
|
|
33
18
|
};
|
|
34
19
|
|
|
35
|
-
export const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<farm-tooltip>
|
|
40
|
-
<span>
|
|
41
|
-
This is a simple tooltip
|
|
42
|
-
</span>
|
|
43
|
-
<template v-slot:activator>
|
|
44
|
-
<farm-icon size="sm" color="gray" style="margin-left: 8px; cursor: help;">help-circle</farm-icon>
|
|
45
|
-
</template>
|
|
46
|
-
</farm-tooltip>
|
|
47
|
-
</span>
|
|
48
|
-
</div>`,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const InsideCard = () => ({
|
|
52
|
-
template: `<div style="padding-left: 80px; padding-top: 80px;">
|
|
53
|
-
<farm-card style="padding: 32px">
|
|
20
|
+
export const Primary = () => ({
|
|
21
|
+
components: { Tooltip },
|
|
22
|
+
template: `
|
|
23
|
+
<div style="padding-left: 80px; padding-top: 80px;">
|
|
54
24
|
<span style="display: flex; align-items: center;">
|
|
55
|
-
|
|
56
|
-
<farm-tooltip>
|
|
57
|
-
this is the tooltip!
|
|
25
|
+
Hover over the icon
|
|
26
|
+
<farm-tooltip placement="top-center">
|
|
58
27
|
<template v-slot:activator>
|
|
59
|
-
<farm-icon size="sm" color="gray"
|
|
28
|
+
<farm-icon size="sm" color="gray">help-circle</farm-icon>
|
|
60
29
|
</template>
|
|
30
|
+
This is a simple tooltip
|
|
61
31
|
</farm-tooltip>
|
|
62
32
|
</span>
|
|
63
|
-
</
|
|
64
|
-
|
|
33
|
+
</div>
|
|
34
|
+
`,
|
|
65
35
|
});
|
|
66
36
|
|
|
67
|
-
export const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
37
|
+
export const AllPositions = () => ({
|
|
38
|
+
components: { Tooltip },
|
|
39
|
+
template: `
|
|
40
|
+
<div style="padding: 100px; display: flex; flex-direction: column; align-items: center; gap: 50px;">
|
|
41
|
+
<div style="display: flex; gap: 30px; margin-bottom: 50px;">
|
|
42
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
43
|
+
<p style="margin-bottom: 10px;">Top Left</p>
|
|
44
|
+
<farm-tooltip placement="top-left">
|
|
45
|
+
<template v-slot:activator>
|
|
46
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
47
|
+
</template>
|
|
48
|
+
Top-Left Position
|
|
49
|
+
</farm-tooltip>
|
|
50
|
+
</div>
|
|
81
51
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</template>
|
|
92
|
-
</farm-tooltip>
|
|
93
|
-
</div>
|
|
52
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
53
|
+
<p style="margin-bottom: 10px;">Top Center</p>
|
|
54
|
+
<farm-tooltip placement="top-center">
|
|
55
|
+
<template v-slot:activator>
|
|
56
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
57
|
+
</template>
|
|
58
|
+
Top-Center Position (Default)
|
|
59
|
+
</farm-tooltip>
|
|
60
|
+
</div>
|
|
94
61
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
62
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
63
|
+
<p style="margin-bottom: 10px;">Top Right</p>
|
|
64
|
+
<farm-tooltip placement="top-right">
|
|
65
|
+
<template v-slot:activator>
|
|
66
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
67
|
+
</template>
|
|
68
|
+
Top-Right Position
|
|
69
|
+
</farm-tooltip>
|
|
70
|
+
</div>
|
|
103
71
|
</div>
|
|
104
72
|
|
|
105
|
-
<div style="display: flex;
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
73
|
+
<div style="display: flex; gap: 30px;">
|
|
74
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
75
|
+
<p style="margin-bottom: 10px;">Bottom Left</p>
|
|
76
|
+
<farm-tooltip placement="bottom-left">
|
|
77
|
+
<template v-slot:activator>
|
|
78
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
79
|
+
</template>
|
|
80
|
+
Bottom-Left Position
|
|
81
|
+
</farm-tooltip>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
85
|
+
<p style="margin-bottom: 10px;">Bottom Center</p>
|
|
86
|
+
<farm-tooltip placement="bottom-center">
|
|
87
|
+
<template v-slot:activator>
|
|
88
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
89
|
+
</template>
|
|
90
|
+
Bottom-Center Position
|
|
91
|
+
</farm-tooltip>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
95
|
+
<p style="margin-bottom: 10px;">Bottom Right</p>
|
|
96
|
+
<farm-tooltip placement="bottom-right">
|
|
97
|
+
<template v-slot:activator>
|
|
98
|
+
<farm-icon size="md" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
99
|
+
</template>
|
|
100
|
+
Bottom-Right Position
|
|
101
|
+
</farm-tooltip>
|
|
102
|
+
</div>
|
|
113
103
|
</div>
|
|
114
104
|
</div>
|
|
105
|
+
`,
|
|
106
|
+
});
|
|
115
107
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
108
|
+
export const ControlledTooltip = () => ({
|
|
109
|
+
components: { Tooltip },
|
|
110
|
+
data() {
|
|
111
|
+
return {
|
|
112
|
+
showTooltip: false,
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
template: `
|
|
116
|
+
<div style="padding: 80px;">
|
|
117
|
+
<span style="display: flex; align-items: center;">
|
|
118
|
+
<span >Click to open:</span>
|
|
119
|
+
<farm-tooltip v-model="showTooltip" placement="top-right">
|
|
121
120
|
<template v-slot:activator>
|
|
122
|
-
<farm-icon size="md" color="
|
|
121
|
+
<farm-icon @click="showTooltip = !showTooltip" size="md" color="blue" style="cursor: pointer;">help-circle</farm-icon>
|
|
123
122
|
</template>
|
|
123
|
+
<template v-slot:title>Controlled Tooltip</template>
|
|
124
|
+
This tooltip is controlled by v-model
|
|
124
125
|
</farm-tooltip>
|
|
125
|
-
</
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
128
|
+
`,
|
|
129
|
+
});
|
|
126
130
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
export const FluidTooltip = () => ({
|
|
132
|
+
components: { Tooltip },
|
|
133
|
+
template: `
|
|
134
|
+
<div style="padding-left: 80px; padding-top: 80px;">
|
|
135
|
+
<span style="display: flex; align-items: center;">
|
|
136
|
+
<span style="margin-right: 8px;">Fluid width tooltip</span>
|
|
137
|
+
<farm-tooltip placement="top-center" :fluid="true">
|
|
131
138
|
<template v-slot:activator>
|
|
132
|
-
<farm-icon size="
|
|
139
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
133
140
|
</template>
|
|
141
|
+
This is a fluid tooltip that will grow based on its content.
|
|
142
|
+
It contains a longer text to demonstrate how it expands horizontally.
|
|
134
143
|
</farm-tooltip>
|
|
135
|
-
</
|
|
144
|
+
</span>
|
|
145
|
+
</div>
|
|
146
|
+
`,
|
|
147
|
+
});
|
|
136
148
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
export const WithModal = () => ({
|
|
150
|
+
components: { Tooltip, Modal },
|
|
151
|
+
data() {
|
|
152
|
+
return {
|
|
153
|
+
showModal: false,
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
template: `
|
|
157
|
+
<div>
|
|
158
|
+
<button
|
|
159
|
+
@click="showModal = true"
|
|
160
|
+
style="background: #007bff; color: white; padding: 12px 24px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500;"
|
|
161
|
+
>
|
|
162
|
+
Abrir Modal com Tooltip
|
|
163
|
+
</button>
|
|
164
|
+
|
|
165
|
+
<farm-modal v-model="showModal" size="md">
|
|
166
|
+
<template v-slot:header>
|
|
167
|
+
<h3>Modal com Tooltip e Scroll</h3>
|
|
168
|
+
</template>
|
|
169
|
+
<template v-slot:content>
|
|
170
|
+
<div style="height: 400px; overflow-y: auto; padding: 20px;">
|
|
171
|
+
<p>Conteúdo inicial do modal...</p>
|
|
172
|
+
|
|
173
|
+
<div style="margin: 50px 0;">
|
|
174
|
+
<span style="display: flex; align-items: center;">
|
|
175
|
+
<span style="margin-right: 8px;">Tooltip no Modal:</span>
|
|
176
|
+
<farm-tooltip placement="top-left">
|
|
177
|
+
<template v-slot:activator>
|
|
178
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
179
|
+
</template>
|
|
180
|
+
<template v-slot:title>Tooltip no Modal</template>
|
|
181
|
+
Este tooltip está dentro de um modal com scroll!
|
|
182
|
+
</farm-tooltip>
|
|
183
|
+
</span>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<p>Mais conteúdo para gerar scroll...</p>
|
|
187
|
+
<p>Linha 1</p>
|
|
188
|
+
<p>Linha 2</p>
|
|
189
|
+
<p>Linha 3</p>
|
|
190
|
+
<p>Linha 4</p>
|
|
191
|
+
<p>Linha 5</p>
|
|
192
|
+
<p>Linha 6</p>
|
|
193
|
+
<p>Linha 7</p>
|
|
194
|
+
<p>Linha 8</p>
|
|
195
|
+
<p>Linha 9</p>
|
|
196
|
+
<p>Linha 10</p>
|
|
197
|
+
|
|
198
|
+
<div style="margin: 50px 0;">
|
|
199
|
+
<span style="display: flex; align-items: center;">
|
|
200
|
+
<span style="margin-right: 8px;">Outro Tooltip:</span>
|
|
201
|
+
<farm-tooltip placement="bottom-right">
|
|
202
|
+
<template v-slot:activator>
|
|
203
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
204
|
+
</template>
|
|
205
|
+
<template v-slot:title>Outro Tooltip</template>
|
|
206
|
+
Este tooltip está no final do conteúdo com scroll!
|
|
207
|
+
</farm-tooltip>
|
|
208
|
+
</span>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<p>Linha 11</p>
|
|
212
|
+
<p>Linha 12</p>
|
|
213
|
+
<p>Linha 13</p>
|
|
214
|
+
<p>Linha 14</p>
|
|
215
|
+
<p>Linha 15</p>
|
|
216
|
+
<p>Linha 16</p>
|
|
217
|
+
<p>Linha 17</p>
|
|
218
|
+
<p>Linha 18</p>
|
|
219
|
+
<p>Linha 19</p>
|
|
220
|
+
<p>Linha 20</p>
|
|
221
|
+
<p>Fim do conteúdo!</p>
|
|
222
|
+
</div>
|
|
223
|
+
</template>
|
|
224
|
+
<template v-slot:footer>
|
|
225
|
+
<button @click="showModal = false" style="background: #6c757d; color: white; padding: 8px 16px; border: none; border-radius: 4px;">
|
|
226
|
+
Fechar Modal
|
|
227
|
+
</button>
|
|
228
|
+
</template>
|
|
229
|
+
</farm-modal>
|
|
146
230
|
</div>
|
|
147
|
-
|
|
231
|
+
`,
|
|
148
232
|
});
|
|
149
233
|
|
|
150
|
-
export const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<farm-tooltip
|
|
155
|
-
This is a fluid tooltip with Bottom-Left position.
|
|
156
|
-
Notice how it grows based on content and has the arrow in the correct position.
|
|
234
|
+
export const MultipleTooltips = () => ({
|
|
235
|
+
components: { Tooltip },
|
|
236
|
+
template: `
|
|
237
|
+
<div style="display: flex; gap: 20px; padding: 50px;">
|
|
238
|
+
<farm-tooltip placement="top-left">
|
|
157
239
|
<template v-slot:activator>
|
|
158
|
-
<farm-icon size="
|
|
240
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
159
241
|
</template>
|
|
242
|
+
Tooltip Top-Left
|
|
160
243
|
</farm-tooltip>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
export const TooltipWithTitle = () => ({
|
|
166
|
-
template: `<div style="padding-left: 80px; padding-top: 80px;">
|
|
167
|
-
<span style="display: flex; align-items: center;">
|
|
168
|
-
<span style="margin-right: 8px;">Tooltip with title</span>
|
|
169
|
-
<farm-tooltip fluid position="top-left">
|
|
170
|
-
<template v-slot:title>
|
|
171
|
-
<farm-icon size="sm" color="white">alert</farm-icon>
|
|
172
|
-
<span class="ml-10">Important Information</span>
|
|
244
|
+
|
|
245
|
+
<farm-tooltip placement="top-center">
|
|
246
|
+
<template v-slot:activator>
|
|
247
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
173
248
|
</template>
|
|
174
|
-
|
|
249
|
+
Tooltip Top-Center
|
|
250
|
+
</farm-tooltip>
|
|
251
|
+
|
|
252
|
+
<farm-tooltip placement="top-right">
|
|
175
253
|
<template v-slot:activator>
|
|
176
|
-
<farm-icon size="
|
|
254
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
177
255
|
</template>
|
|
256
|
+
Tooltip Top-Right
|
|
178
257
|
</farm-tooltip>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
export const ControlledTooltipWithTitle = () => ({
|
|
184
|
-
data() {
|
|
185
|
-
return {
|
|
186
|
-
showTooltip: false,
|
|
187
|
-
};
|
|
188
|
-
},
|
|
189
|
-
template: `<div style="padding: 80px;">
|
|
190
|
-
<span style="display: flex; align-items: center;">
|
|
191
|
-
<span style="margin-right: 8px;">Click to open:</span>
|
|
192
|
-
<farm-tooltip fluid v-model="showTooltip" position="top-right">
|
|
193
|
-
<template v-slot:title>
|
|
194
|
-
Tooltip Title
|
|
258
|
+
|
|
259
|
+
<farm-tooltip placement="bottom-left">
|
|
260
|
+
<template v-slot:activator>
|
|
261
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
195
262
|
</template>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
263
|
+
Tooltip Bottom-Left
|
|
264
|
+
</farm-tooltip>
|
|
265
|
+
|
|
266
|
+
<farm-tooltip placement="bottom-center">
|
|
199
267
|
<template v-slot:activator>
|
|
200
|
-
<farm-icon
|
|
268
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
201
269
|
</template>
|
|
270
|
+
Tooltip Bottom-Center
|
|
202
271
|
</farm-tooltip>
|
|
203
|
-
|
|
204
|
-
|
|
272
|
+
|
|
273
|
+
<farm-tooltip placement="bottom-right">
|
|
274
|
+
<template v-slot:activator>
|
|
275
|
+
<farm-icon size="sm" color="gray" style="cursor: help;">help-circle</farm-icon>
|
|
276
|
+
</template>
|
|
277
|
+
Tooltip Bottom-Right
|
|
278
|
+
</farm-tooltip>
|
|
279
|
+
</div>
|
|
280
|
+
`,
|
|
205
281
|
});
|