@farm-investimentos/front-mfe-components 15.12.1 → 15.13.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "15.12.1",
3
+ "version": "15.13.0",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -23,6 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "core-js": "^3.6.5",
26
+ "date-fns": "2.29.3",
26
27
  "vue": "2.7.10",
27
28
  "vuetify": "^2.4.5"
28
29
  },
@@ -0,0 +1,246 @@
1
+ @import '../../configurations/mixins';
2
+ @import '../../configurations/variables';
3
+ @import '../../configurations/functions';
4
+ @import '../../configurations/_theme-colors';
5
+ @import '../Tooltip/Tooltip.scss';
6
+
7
+ .farm-gantt-chart {
8
+ width: 100%;
9
+ height: 100%;
10
+ min-height: 500px;
11
+ position: relative;
12
+ overflow-x: auto;
13
+ overflow-y: auto;
14
+
15
+ &__header {
16
+ display: flex;
17
+ width: fit-content; /* Allow header to expand with timeline */
18
+ min-width: 100%; /* Ensure header is at least as wide as the container */
19
+ margin-bottom: gutter('sm');
20
+ position: relative;
21
+ z-index: 2;
22
+ }
23
+
24
+ &__row-label-space {
25
+ width: 180px;
26
+ min-width: 180px;
27
+ flex-shrink: 0;
28
+ }
29
+
30
+ &__timeline {
31
+ display: grid;
32
+ flex-grow: 1;
33
+ gap: 0;
34
+ min-height: 40px;
35
+ }
36
+
37
+ &__month-header {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: flex-start; /* Keep label to the start */
41
+ padding-right: 8px;
42
+ height: fit-content;
43
+ position: relative;
44
+ min-width: 0; /* Allow month header to shrink if text is too long, relying on parent scroll */
45
+
46
+ .farm-typography {
47
+ white-space: nowrap; /* Prevent label text from wrapping */
48
+ }
49
+
50
+ &::after {
51
+ content: '';
52
+ position: absolute;
53
+ left: 0;
54
+ top: 100%;
55
+ width: 1px;
56
+ height: calc(var(--gantt-content-height, 300px) + 30px);
57
+ border-left: 1px dashed var(--farm-stroke-base);
58
+ pointer-events: none;
59
+ z-index: 1;
60
+ }
61
+
62
+ &--current {
63
+ &::after {
64
+ border-left-color: var(--farm-primary-base);
65
+ }
66
+ }
67
+ }
68
+
69
+ &__content {
70
+ position: relative;
71
+ width: fit-content; /* Allow content to expand with timeline */
72
+ min-width: 100%; /* Ensure content is at least as wide as the container */
73
+ display: flex;
74
+ flex-direction: column;
75
+ /* overflow: hidden; // Remove this to allow content to scroll with parent */
76
+ }
77
+
78
+ &__group {
79
+ display: flex;
80
+ width: 100%;
81
+ margin-bottom: gutter('lg');
82
+ min-height: 60px;
83
+ position: relative;
84
+ border-bottom: 1px dashed var(--farm-stroke-base);
85
+ padding-bottom: gutter('sm');
86
+ }
87
+
88
+ &__group-label {
89
+ width: 180px;
90
+ min-width: 180px;
91
+ flex-shrink: 0;
92
+ padding: gutter('sm') gutter('sm') gutter('sm') 0;
93
+ font-weight: 500;
94
+ color: var(--farm-text-base);
95
+ align-self: center;
96
+ overflow-wrap: break-word;
97
+ }
98
+
99
+ &__group-timeline {
100
+ flex-grow: 1;
101
+ display: grid;
102
+ position: relative;
103
+ min-height: 60px;
104
+ gap: 0;
105
+ grid-auto-rows: 35px;
106
+ align-content: start;
107
+ padding: gutter('xs') 0;
108
+ }
109
+
110
+
111
+
112
+ &__bar {
113
+ height: 30px;
114
+ z-index: 2;
115
+ border-radius: 4px;
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: start;
119
+ color: white;
120
+ font-size: fontSize('sm');
121
+ padding: 0 gutter('sm');
122
+ @include ellipsis;
123
+ cursor: pointer;
124
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
125
+ transition: box-shadow 0.2s ease, transform 0.2s ease;
126
+ margin: gutter('xs') / 2;
127
+
128
+ &:hover {
129
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
130
+ transform: translateY(-2px);
131
+ }
132
+
133
+ // Bar types using library theme colors blended with white (matching Figma approach)
134
+ &--campaign {
135
+ background-color: #7BC4F7; // Info blended with white (73% + 27% white) - Vigência da Campanha
136
+ }
137
+
138
+ &--product {
139
+ background-color: #8BB455; // Primary blended with white (73% + 27% white) - Vigência do Produto Comercial
140
+ }
141
+
142
+ &--disbursement {
143
+ background-color: #FFB84D; // Warning blended with white (73% + 27% white) - Período de Desembolso
144
+ }
145
+
146
+ &--maturity {
147
+ background-color: #F7857F; // Error blended with white (73% + 27% white) - Intervalo Vencimento
148
+ }
149
+ }
150
+
151
+ &__legend {
152
+ display: flex;
153
+ align-items: center;
154
+ margin-top: gutter('lg');
155
+ padding-top: gutter('sm');
156
+ flex-wrap: wrap;
157
+ }
158
+
159
+ &__legend-title {
160
+ margin-right: gutter('md');
161
+ display: flex;
162
+ align-items: center;
163
+ position: relative;
164
+ }
165
+
166
+ &__legend-item {
167
+ display: flex;
168
+ align-items: center;
169
+ margin-bottom: gutter('xs');
170
+ position: relative;
171
+ padding: 0 12px;
172
+ flex-shrink: 0; /* Prevent items from shrinking */
173
+ white-space: nowrap; /* Prevent text from wrapping */
174
+
175
+ &:not(:last-child)::after {
176
+ content: '';
177
+ position: absolute;
178
+ right: 0;
179
+ top: 50%;
180
+ transform: translateY(-50%);
181
+ height: 12px;
182
+ width: 1px;
183
+ background-color: var(--farm-stroke-base);
184
+ }
185
+ }
186
+
187
+ &__legend-color {
188
+ width: 8px;
189
+ height: 8px;
190
+ border-radius: 50%;
191
+ margin-right: gutter('sm');
192
+ flex-shrink: 0;
193
+ }
194
+
195
+ &__legend-label {
196
+ display: flex;
197
+ align-items: center;
198
+ }
199
+
200
+ // NEW: Tooltip container styles - specific to GanttChart positioning
201
+ &__tooltip-container {
202
+ position: absolute;
203
+ z-index: 999;
204
+ pointer-events: none;
205
+ top: 0;
206
+ left: 0;
207
+ }
208
+
209
+ &__tooltip {
210
+ // Reutiliza estilos base do farm-tooltip__popup mas com customizações específicas
211
+ @extend .farm-tooltip__popup;
212
+ @extend .farm-tooltip__popup--visible;
213
+ @extend .farm-tooltip__popup--fluid;
214
+
215
+ // Customizações específicas para GanttChart
216
+ pointer-events: auto;
217
+ position: relative;
218
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); // Shadow mais forte para destacar sobre o chart
219
+
220
+ // NEW: Structured tooltip data styling - específico para dados estruturados
221
+ .tooltip-data-row {
222
+ display: flex;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ margin-bottom: 4px;
226
+
227
+ &:last-child {
228
+ margin-bottom: 0;
229
+ }
230
+ }
231
+
232
+ .tooltip-label {
233
+ font-weight: 500;
234
+ margin-right: 8px;
235
+ color: #f5f5f5;
236
+ opacity: 0.9;
237
+ }
238
+
239
+ .tooltip-value {
240
+ font-weight: 600;
241
+ color: #ffffff;
242
+ text-align: right;
243
+ flex-shrink: 0;
244
+ }
245
+ }
246
+ }