@farm-investimentos/front-mfe-components 15.14.4 → 15.14.6
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 +365 -1042
- 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 +365 -1042
- 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/Modal/Modal.scss +86 -85
- package/src/components/Tooltip/Tooltip.scss +90 -62
- package/src/components/Tooltip/Tooltip.stories.js +322 -158
- package/src/components/Tooltip/Tooltip.vue +265 -302
- 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,110 +1,111 @@
|
|
|
1
1
|
@import '../../configurations/mixins';
|
|
2
2
|
|
|
3
3
|
.farm-modal {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
width: 100vw;
|
|
8
|
+
height: 100vh;
|
|
9
|
+
align-items: center;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
transition: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), z-index 1ms;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
&--overlay {
|
|
15
|
+
position: fixed;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
width: 100vw;
|
|
19
|
+
height: 100vh;
|
|
20
|
+
opacity: 0.36;
|
|
21
|
+
background-color: var(--farm-gray-darken);
|
|
22
|
+
z-index: 101;
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
&--container {
|
|
26
|
+
background-color: white;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
max-height: calc(100vh - 48px);
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
z-index: 102;
|
|
32
|
+
@include addShadow;
|
|
33
|
+
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
&--content {
|
|
36
|
+
max-height: calc(100vh - 48px);
|
|
37
|
+
width: 100%;
|
|
38
|
+
padding: 0;
|
|
39
|
+
> div {
|
|
40
|
+
overflow-y: auto;
|
|
41
|
+
padding: 0 16px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
&--footer {
|
|
53
|
-
position: absolute;
|
|
54
|
-
bottom: 0;
|
|
55
|
-
background: white;
|
|
56
|
-
width: 100%;
|
|
57
|
-
}
|
|
45
|
+
&--header {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
background: white;
|
|
49
|
+
width: 100%;
|
|
50
|
+
z-index: 103; /* z-index maior que o container (102) para ficar sobre o conteúdo */
|
|
51
|
+
}
|
|
58
52
|
|
|
53
|
+
&--footer {
|
|
54
|
+
position: absolute;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
background: white;
|
|
57
|
+
width: 100%;
|
|
58
|
+
z-index: 103; /* z-index maior que o container (102) para ficar sobre o conteúdo */
|
|
59
|
+
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
.fade-enter-active,
|
|
62
63
|
.fade-leave-active {
|
|
63
|
-
|
|
64
|
+
transition: opacity 0.25s;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
.fade-enter,
|
|
67
68
|
.fade-leave-to {
|
|
68
|
-
|
|
69
|
+
opacity: 0;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
@include upToSm {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
.farm-modal {
|
|
74
|
+
&--container {
|
|
75
|
+
width: calc(100vw - 32px);
|
|
76
|
+
max-width: calc(100vw - 32px);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
@include fromSm {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
.farm-modal {
|
|
83
|
+
&--size-default {
|
|
84
|
+
.farm-modal--container {
|
|
85
|
+
width: 960px;
|
|
86
|
+
max-width: 960px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
&--size-md {
|
|
91
|
+
.farm-modal--container {
|
|
92
|
+
width: 568px;
|
|
93
|
+
max-width: 568px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
&--size-sm {
|
|
98
|
+
.farm-modal--container {
|
|
99
|
+
width: 448px;
|
|
100
|
+
max-width: 448px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
104
|
+
&--size-xs {
|
|
105
|
+
.farm-modal--container {
|
|
106
|
+
width: 360px;
|
|
107
|
+
max-width: 360px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -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
|
-
|
|
30
|
-
z-index:
|
|
39
|
+
position: fixed; /* SEMPRE fixed agora */
|
|
40
|
+
z-index: 10004; /* z-index alto para aparecer sobre modais (modal usa z-index 102, header/footer 103) */
|
|
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: 10004; /* z-index alto para aparecer sobre modais (modal usa z-index 102, header/footer 103) */
|
|
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: 10005; /* z-index ainda maior para a seta */
|
|
148
|
+
pointer-events: none;
|
|
121
149
|
}
|
|
122
150
|
}
|