@farm-investimentos/front-mfe-components-vue3 1.2.0 → 1.4.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-vue3",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,8 +42,8 @@
42
42
  "webpack": "5.94.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@babel/core": "7.17.9",
46
- "@babel/generator": "7.17.9",
45
+ "@babel/core": "^7.22.0",
46
+ "@babel/generator": "^7.22.0",
47
47
  "@farm-investimentos/front-mfe-libs-ts": "3.0.5",
48
48
  "@storybook/addon-essentials": "^8.2.9",
49
49
  "@storybook/addon-interactions": "^8.2.9",
@@ -15,5 +15,21 @@
15
15
  width: 100%;
16
16
  }
17
17
 
18
+ .dp__main dp__theme_light {
19
+ width: 200px;
20
+ }
21
+
22
+ .picker__actions {
23
+ padding: 24px;
24
+ border-top: 1px solid var(--farm-stroke-base);
25
+ margin-bottom: 16px;
26
+ margin-top: 24px;
27
+ }
28
+
29
+ :deep(.dp__month_year_row){
30
+ margin: 24px 0;
31
+ margin-top: 20px
32
+ }
33
+
18
34
  @import './customDatePicker.scss';
19
35
 
@@ -24,19 +24,20 @@
24
24
  :fixedCentered="position === 'fixed-centered'"
25
25
  >
26
26
  <VueDatePicker
27
- calendar-class-name="dp-custom-calendar"
28
- inline
29
- auto-apply
30
- model-type="yyyy-MM-dd"
31
- locale="pt-BR"
32
27
  v-model="dateField"
33
- :min-date="minDate"
34
- :max-date="maxDate"
28
+ calendar-class-name="dp-custom-calendar"
29
+ :day-names="['S', 'T', 'Q', 'Q', 'S', 'S', 'D']"
35
30
  :allowed-dates="allowedDates"
36
31
  :disabled-dates="disabledDates"
37
- :day-names="['S', 'T', 'Q', 'Q', 'S', 'S', 'D']"
38
32
  :start-date="internalPickerDate"
33
+ :min-date="minDate"
34
+ :max-date="maxDate"
39
35
  :multi-dates="multiple"
36
+ month-name-format="long"
37
+ inline
38
+ auto-apply
39
+ locale="pt"
40
+ model-type="yyyy-MM-dd"
40
41
  />
41
42
  <div class="picker__actions">
42
43
  <farm-btn
@@ -16,7 +16,7 @@
16
16
  }
17
17
 
18
18
  :deep(.dp__cell_inner) {
19
- font-size: 12px;
19
+ font-size: 14px;
20
20
  font-weight: 500;
21
21
  font-family: 'Manrope', sans-serif !important;
22
22
  color: var(--farm-neutral-darken);
@@ -82,9 +82,11 @@
82
82
  }
83
83
 
84
84
  .picker__actions {
85
- padding: 16px 8px 0;
85
+ padding: 24px;
86
86
  border-top: 1px solid var(--farm-stroke-base);
87
87
  margin-bottom: 16px;
88
- margin-left: -4px;
89
- margin-right: -4px;
88
+ }
89
+
90
+ .dp__menu_inner {
91
+ padding: 0 !important;
90
92
  }
@@ -63,6 +63,7 @@
63
63
  import { formatDatePickerHeader } from '../../helpers';
64
64
  import { defaultFormat as dateDefaultFormatter } from '../../helpers/date';
65
65
 
66
+
66
67
  /**
67
68
  * Componente de input com datepicker para range de data
68
69
  */
@@ -1,41 +1,214 @@
1
- @import '../../configurations/theme-colors';
2
- @import '../../configurations/variables';
1
+ /*
2
+ * CSS simplificado para Tooltip - Abordagem simples e direta
3
+ * SEMPRE usa position: fixed via JavaScript
4
+ */
3
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
+ }
16
+
17
+ /*
18
+ * COMPATIBILIDADE: Classes antigas mantidas para outros componentes
19
+ * que fazem @extend .farm-tooltip__popup
20
+ */
4
21
  .farm-tooltip {
5
22
  display: inline-block;
6
23
  position: relative;
24
+ }
7
25
 
8
- &__activator {
9
- display: inline-block;
10
- }
26
+ .farm-tooltip__activator {
27
+ display: inline-block;
11
28
  }
12
29
 
13
30
  .farm-tooltip__popup {
14
- background-color: rgba(themeColor('primary'), 0.95);
15
- @each $color in $theme-colors-list {
16
- &.farm-tooltip--#{$color} {
17
- background-color: rgba(themeColor($color), 0.95);
18
- }
31
+ /* Estilos base mantidos para compatibilidade */
32
+ background-color: #333333;
33
+ color: #f5f5f5;
34
+ border-radius: 5px;
35
+ font-family: 'Manrope', sans-serif;
36
+ font-size: 12px;
37
+ font-weight: 500;
38
+ padding: 16px;
39
+ position: fixed;
40
+ z-index: 10001;
41
+ transform: translateZ(0);
42
+ pointer-events: auto;
43
+
44
+ /* Estados */
45
+ opacity: 0;
46
+ visibility: hidden;
47
+ transition: opacity 0.3s linear, visibility 0.3s linear;
48
+
49
+ /* Variantes */
50
+ &--visible {
51
+ opacity: 1;
52
+ visibility: visible;
53
+ }
54
+
55
+ &--fluid {
56
+ width: auto;
57
+ max-width: 300px;
58
+ }
59
+
60
+ /* Header */
61
+ .farm-tooltip__header {
62
+ display: flex;
63
+ justify-content: space-between;
64
+ align-items: center;
65
+ margin-bottom: 8px;
66
+ }
67
+
68
+ .farm-tooltip__title {
69
+ font-weight: 600;
70
+ font-size: 13px;
71
+ margin-right: 16px;
72
+ }
73
+
74
+ .farm-tooltip__content {
75
+ font-weight: 500;
76
+ }
77
+
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;
19
86
  }
20
87
  }
21
88
 
22
- .farm-tooltip__popup {
23
- visibility: hidden;
24
- opacity: 0;
25
- transition: visibility 0.3s linear, opacity 0.3s linear;
26
- position: absolute;
27
- width: 160px;
28
- contain: content;
29
- color: white;
89
+ /* Estilos globais para tooltip criado dinamicamente */
90
+ .tooltip-popup {
91
+ background-color: #333333;
92
+ color: #f5f5f5;
30
93
  border-radius: 5px;
31
- font-family: 'Manrope', sans-serif !important;
94
+ font-family: 'Manrope', sans-serif;
32
95
  font-size: 12px;
33
- font-weight: 500px;
34
- padding: 8px 12px;
35
- display: block;
96
+ font-weight: 500;
97
+ padding: 16px;
98
+ position: fixed;
99
+ z-index: 10001;
100
+ transform: translateZ(0);
101
+ pointer-events: auto;
102
+
103
+ /* Estados */
104
+ opacity: 0;
105
+ visibility: hidden;
106
+ transition: opacity 0.3s linear, visibility 0.3s linear;
36
107
 
37
108
  &--visible {
38
109
  opacity: 1;
39
110
  visibility: visible;
40
111
  }
112
+
113
+ /* Variantes */
114
+ &--dark {
115
+ background-color: #333333;
116
+ color: #f5f5f5;
117
+
118
+ .tooltip-arrow {
119
+ border-color: #333333 transparent transparent transparent !important;
120
+ }
121
+
122
+ &.tooltip-popup--bottom-left,
123
+ &.tooltip-popup--bottom-center,
124
+ &.tooltip-popup--bottom-right {
125
+ .tooltip-arrow {
126
+ border-color: transparent transparent #333333 transparent !important;
127
+ }
128
+ }
129
+ }
130
+
131
+ &--light {
132
+ background-color: #ffffff;
133
+ color: #333333;
134
+ border: 1px solid #e0e0e0;
135
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
136
+
137
+ .tooltip-arrow {
138
+ border-color: #ffffff transparent transparent transparent !important;
139
+ }
140
+
141
+ &.tooltip-popup--bottom-left,
142
+ &.tooltip-popup--bottom-center,
143
+ &.tooltip-popup--bottom-right {
144
+ .tooltip-arrow {
145
+ border-color: transparent transparent #ffffff transparent !important;
146
+ }
147
+ }
148
+ }
149
+
150
+ /* Tamanhos */
151
+ &--sm {
152
+ font-size: 11px;
153
+ padding: 12px;
154
+ }
155
+
156
+ &--md {
157
+ font-size: 12px;
158
+ padding: 16px;
159
+ }
160
+
161
+ &--lg {
162
+ font-size: 14px;
163
+ padding: 20px;
164
+ }
165
+
166
+ /* Header */
167
+ .tooltip-header {
168
+ display: flex;
169
+ justify-content: space-between;
170
+ align-items: center;
171
+ margin-bottom: 8px;
172
+ }
173
+
174
+ .tooltip-title {
175
+ font-weight: 600;
176
+ font-size: 13px;
177
+ margin-right: 16px;
178
+ }
179
+
180
+ .tooltip-content {
181
+ font-weight: 500;
182
+ }
183
+
184
+ .tooltip-close {
185
+ width: 16px;
186
+ height: 16px;
187
+ line-height: 16px;
188
+ text-align: center;
189
+ cursor: pointer;
190
+ font-size: 16px;
191
+ color: inherit;
192
+ transition: opacity 0.2s ease;
193
+
194
+ &:hover {
195
+ opacity: 0.7;
196
+ }
197
+ }
198
+
199
+ .tooltip-arrow {
200
+ position: absolute;
201
+ width: 0;
202
+ height: 0;
203
+ border-style: solid;
204
+ z-index: inherit;
205
+ pointer-events: none;
206
+ }
207
+
208
+ /* Posicionamento específico */
209
+ &--has-title {
210
+ .tooltip-content {
211
+ margin-top: 4px;
212
+ }
213
+ }
41
214
  }