@farm-investimentos/front-mfe-components 11.8.1 → 11.8.3
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 +308 -187
- 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 +308 -187
- 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/Buttons/DefaultButton/DefaultButton.scss +224 -230
- package/src/components/IdCaption/IdCaption.vue +1 -1
- package/src/components/MainFilter/MainFilter.vue +2 -3
- package/src/components/Radio/Radio.scss +51 -0
- package/src/components/Radio/Radio.stories.js +79 -0
- package/src/components/Radio/Radio.vue +50 -0
- package/src/components/Radio/__tests__/Radio.spec.js +17 -0
- package/src/components/Radio/index.ts +4 -0
- package/src/components/Select/Select.stories.js +20 -4
- package/src/components/Select/Select.vue +3 -2
- package/src/components/TextFieldV2/TextFieldV2.scss +5 -0
- package/src/components/TextFieldV2/TextFieldV2.vue +4 -1
- package/src/main.ts +1 -0
package/package.json
CHANGED
|
@@ -3,255 +3,249 @@
|
|
|
3
3
|
@import '../../../configurations/theme-colors';
|
|
4
4
|
|
|
5
5
|
.farm-btn {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
&.farm-btn--rounded {
|
|
115
|
-
border-radius: 1rem;
|
|
116
|
-
}
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-radius: 6px;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex: 0 0 auto;
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
letter-spacing: 1.25px;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
outline: 0;
|
|
15
|
+
position: relative;
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
transition-duration: 0.28s;
|
|
18
|
+
transition-property: box-shadow, transform, opacity;
|
|
19
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
20
|
+
user-select: none;
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
line-height: 16px;
|
|
24
|
+
height: 36px;
|
|
25
|
+
min-width: 64px;
|
|
26
|
+
padding: 0 16px;
|
|
27
|
+
|
|
28
|
+
&.farm-btn--full {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@each $size, $value in $sizes {
|
|
33
|
+
&#{'.farm-btn[size=' + $size + ']'} {
|
|
34
|
+
font-size: $value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__content {
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 8px;
|
|
44
|
+
|
|
45
|
+
::v-deep i.mdi {
|
|
46
|
+
font-size: 1rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--round {
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.farm-btn--disabled {
|
|
55
|
+
background-color: #dadada;
|
|
56
|
+
color: rgba(0, 0, 0, 0.26);
|
|
57
|
+
cursor: default;
|
|
58
|
+
border-color: #dadada;
|
|
59
|
+
|
|
60
|
+
&:before {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
i.mdi.farm-icon {
|
|
65
|
+
color: rgba(0, 0, 0, 0.26);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:before {
|
|
70
|
+
transition: all 0.28s ease;
|
|
71
|
+
background-color: currentColor;
|
|
72
|
+
border-radius: inherit;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
color: inherit;
|
|
75
|
+
content: '';
|
|
76
|
+
left: 0;
|
|
77
|
+
opacity: 0;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
position: absolute;
|
|
80
|
+
right: 0;
|
|
81
|
+
top: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:not(.farm-btn--plain):hover {
|
|
85
|
+
&:before {
|
|
86
|
+
opacity: 0.08;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:not(.farm-btn--plain):not(.farm-btn--disabled):active {
|
|
91
|
+
&:before {
|
|
92
|
+
opacity: 0.16;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.farm-btn--plain {
|
|
97
|
+
background-color: transparent !important;
|
|
98
|
+
&:hover {
|
|
99
|
+
.farm-btn__content {
|
|
100
|
+
opacity: 0.68;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:active {
|
|
105
|
+
&:before {
|
|
106
|
+
opacity: 0.08;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.farm-btn--rounded {
|
|
112
|
+
border-radius: 1rem;
|
|
113
|
+
}
|
|
117
114
|
}
|
|
118
115
|
|
|
119
116
|
.farm-btn.farm-btn--icon {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
117
|
+
border: none;
|
|
118
|
+
background: transparent;
|
|
119
|
+
transition: color 0.5s ease;
|
|
120
|
+
|
|
121
|
+
min-width: auto;
|
|
122
|
+
width: 36px;
|
|
123
|
+
|
|
124
|
+
.farm-btn__content i.mdi {
|
|
125
|
+
color: gray;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@each $size, $value in $sizes {
|
|
129
|
+
&#{'.farm-btn[size=' + $size + ']'} {
|
|
130
|
+
font-size: $value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&[size='lg'] {
|
|
135
|
+
width: 48px;
|
|
136
|
+
height: 48px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&[size='xl'] {
|
|
140
|
+
width: 64px;
|
|
141
|
+
height: 64px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@each $color in $theme-colors-list {
|
|
145
|
+
&#{'.farm-btn--' + $color}:not(.farm-btn--disabled) {
|
|
146
|
+
&:hover {
|
|
147
|
+
color: var(--farm-#{$color}-base);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
::v-deep .farm-btn__content i.mdi {
|
|
151
|
+
color: var(--farm-#{$color}-base);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
159
155
|
}
|
|
160
156
|
|
|
161
157
|
@each $color in $theme-colors-list {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
|
|
158
|
+
#{'.farm-btn--' + $color} {
|
|
159
|
+
border: 1px solid var(--farm-#{$color}-base);
|
|
160
|
+
background-color: var(--farm-#{$color}-base);
|
|
161
|
+
color: white;
|
|
162
|
+
|
|
163
|
+
::v-deep .farm-btn__content {
|
|
164
|
+
i.mdi {
|
|
165
|
+
color: white;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.farm-btn__content i.mdi {
|
|
169
|
+
color: black;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.farm-btn--extra,
|
|
175
|
+
.farm-btn--white {
|
|
176
|
+
color: black;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:not(.farm-btn--disabled) {
|
|
180
|
+
&.farm-btn--outlined#{'.farm-btn--' + $color} {
|
|
181
|
+
border: 1px solid var(--farm-#{$color}-base);
|
|
182
|
+
background: white;
|
|
183
|
+
color: var(--farm-#{$color}-base);
|
|
184
|
+
|
|
185
|
+
&.farm-btn--extra,
|
|
186
|
+
&.farm-btn--white {
|
|
187
|
+
color: black;
|
|
188
|
+
border: 1px solid black;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.farm-btn__content i.mdi {
|
|
192
|
+
color: var(--farm-#{$color}-base);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.farm-btn--plain#{'.farm-btn--' + $color} {
|
|
197
|
+
border: none;
|
|
198
|
+
background: white;
|
|
199
|
+
color: var(--farm-#{$color}-base);
|
|
200
|
+
|
|
201
|
+
&.farm-btn--extra,
|
|
202
|
+
&.farm-btn--white {
|
|
203
|
+
color: black;
|
|
204
|
+
|
|
205
|
+
.farm-btn__content i.mdi {
|
|
206
|
+
color: black;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.farm-btn__content i.mdi {
|
|
211
|
+
color: var(--farm-#{$color}-base);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
222
215
|
}
|
|
223
216
|
|
|
224
217
|
.farm-btn--outlined.farm-btn--disabled {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
218
|
+
border: 1px solid #d6d6d6;
|
|
219
|
+
color: #d6d6d6;
|
|
220
|
+
background-color: white;
|
|
228
221
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
222
|
+
i.mdi.farm-icon {
|
|
223
|
+
color: #d6d6d6;
|
|
224
|
+
}
|
|
232
225
|
}
|
|
233
226
|
|
|
234
227
|
.farm-btn--plain.farm-btn--disabled {
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
background-color: transparent;
|
|
229
|
+
border: none;
|
|
237
230
|
}
|
|
238
231
|
|
|
239
232
|
.farm-btn--elevated {
|
|
240
|
-
|
|
233
|
+
box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
|
|
234
|
+
0px 1px 5px 0px rgb(0 0 0 / 12%);
|
|
241
235
|
}
|
|
242
236
|
|
|
243
237
|
@include upToSm {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
238
|
+
.farm-btn {
|
|
239
|
+
padding: 0 12px;
|
|
240
|
+
line-height: 12px;
|
|
241
|
+
min-width: 48px;
|
|
242
|
+
height: 32px;
|
|
243
|
+
}
|
|
250
244
|
}
|
|
251
245
|
|
|
252
246
|
@include forXsOnly {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
247
|
+
.farm-btn.farm-btn--responsive {
|
|
248
|
+
width: 100%;
|
|
249
|
+
margin: 0;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<farm-label :for="elementId">
|
|
5
5
|
{{ label }}
|
|
6
6
|
<farm-tooltip v-if="tooltip">
|
|
7
|
-
<farm-caption>
|
|
7
|
+
<farm-caption color="white">
|
|
8
8
|
{{ tooltip }}
|
|
9
9
|
</farm-caption>
|
|
10
|
-
<template v-slot:activator
|
|
10
|
+
<template v-slot:activator>
|
|
11
11
|
<farm-icon size="sm" color="gray">help-circle</farm-icon>
|
|
12
12
|
</template>
|
|
13
13
|
</farm-tooltip>
|
|
@@ -124,7 +124,6 @@ export default Vue.extend({
|
|
|
124
124
|
this.timer = null;
|
|
125
125
|
}
|
|
126
126
|
this.timer = setTimeout(() => {
|
|
127
|
-
console.log(this.inputValue);
|
|
128
127
|
this.$emit('onInputChange', this.inputValue);
|
|
129
128
|
}, 750);
|
|
130
129
|
},
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
input[type="radio"] {
|
|
2
|
+
-webkit-appearance: none;
|
|
3
|
+
appearance: none;
|
|
4
|
+
background-color: #ffffff;
|
|
5
|
+
margin: 0;
|
|
6
|
+
font: inherit;
|
|
7
|
+
color: rgba(0, 0, 0, .6);
|
|
8
|
+
width: 18px;
|
|
9
|
+
height: 18px;
|
|
10
|
+
border: 1.5px solid rgba(0, 0, 0, .6);
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
transform: translate(-12px);
|
|
13
|
+
display: grid;
|
|
14
|
+
place-content: center;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
|
|
17
|
+
&::before {
|
|
18
|
+
content: "";
|
|
19
|
+
width: 10px;
|
|
20
|
+
height: 10px;
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
transform: scale(0);
|
|
23
|
+
transition: 120ms transform ease-in-out;
|
|
24
|
+
background-color: CanvasText;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.farm-radio--checked::before {
|
|
28
|
+
transform: scale(1);
|
|
29
|
+
box-shadow: inset 16px 16px var(--farm-primary-base);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.farm-radio--checked {
|
|
33
|
+
border-color: var(--farm-primary-base);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:focus {
|
|
37
|
+
outline: none;
|
|
38
|
+
outline-offset: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
box-shadow: 0px 0px 0px 8px rgba(0, 0, 0, 0.1);
|
|
43
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:active {
|
|
49
|
+
animation: pulse 0.2s 1 ease-out;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import Radio from './Radio.vue';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Form/Radio',
|
|
6
|
+
component: Radio,
|
|
7
|
+
decorators: [withDesign],
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `Radio<br />
|
|
12
|
+
selector: <em>farm-radio</em><br />
|
|
13
|
+
<span style="color: var(--farm-extra-1-base);">development</span>
|
|
14
|
+
`,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
viewMode: 'docs',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Primary = () => ({
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
v: null,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
template: `<div style="width: 480px">
|
|
28
|
+
<farm-radio v-model="v" value="1" />
|
|
29
|
+
v-model: {{ v }}
|
|
30
|
+
</div>`,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const Group = () => ({
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
v: null,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
template: `<div style="width: 480px">
|
|
40
|
+
<farm-radio v-model="v" value="1" />
|
|
41
|
+
<farm-radio v-model="v" value="2" />
|
|
42
|
+
<farm-radio v-model="v" value="3" />
|
|
43
|
+
v-model: {{ v }}
|
|
44
|
+
</div>`,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const Reset = () => ({
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
v: null,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
reset() {
|
|
55
|
+
this.$refs.form.reset();
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
template: `<div style="width: 480px">
|
|
59
|
+
<farm-form ref="form">
|
|
60
|
+
<farm-radio v-model="v" value="1" />
|
|
61
|
+
<farm-radio v-model="v" value="2" />
|
|
62
|
+
<farm-radio v-model="v" value="3" />
|
|
63
|
+
v-model: {{ v }}
|
|
64
|
+
<farm-btn @click="reset">reset</farm-btn>
|
|
65
|
+
</farm-form>
|
|
66
|
+
</div>`,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const Checked = () => ({
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
v: 1,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
template: `<div style="width: 480px">
|
|
76
|
+
<farm-radio v-model="v" value="1" />
|
|
77
|
+
v-model: {{ v }}
|
|
78
|
+
</div>`,
|
|
79
|
+
});
|