@farm-investimentos/front-mfe-components 11.8.0 → 11.8.2

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": "11.8.0",
3
+ "version": "11.8.2",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -3,255 +3,249 @@
3
3
  @import '../../../configurations/theme-colors';
4
4
 
5
5
  .farm-btn {
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,
33
- $value in $sizes {
34
- &#{'.farm-btn[size=' + $size +']'} {
35
- font-size: $value;
36
- }
37
- }
38
-
39
- &__content {
40
- font-weight: 700;
41
- display: flex;
42
- flex-direction: row;
43
- align-items: center;
44
- gap: 8px;
45
-
46
- ::v-deep i.mdi {
47
- font-size: 1rem;
48
- }
49
- }
50
-
51
- &--round {
52
- border-radius: 50%;
53
- }
54
-
55
- &.farm-btn--disabled {
56
- background-color: #DADADA;
57
- color: rgba(0, 0, 0, .26);
58
- cursor: default;
59
- border-color: #DADADA;
60
-
61
- &:before {
62
- display: none;
63
- }
64
-
65
- i.mdi.farm-icon {
66
- color: rgba(0, 0, 0, .26);
67
- }
68
- }
69
-
70
-
71
-
72
- &:before {
73
- transition: all 0.28s ease;
74
- background-color: currentColor;
75
- border-radius: inherit;
76
- bottom: 0;
77
- color: inherit;
78
- content: '';
79
- left: 0;
80
- opacity: 0;
81
- pointer-events: none;
82
- position: absolute;
83
- right: 0;
84
- top: 0;
85
- }
86
-
87
- &:not(.farm-btn--plain):hover {
88
- &:before {
89
- opacity: 0.08;
90
- }
91
- }
92
-
93
- &:not(.farm-btn--plain):not(.farm-btn--disabled):active {
94
-
95
- &:before {
96
- opacity: 0.16;
97
- }
98
- }
99
-
100
- &.farm-btn--plain {
101
- &:hover {
102
- .farm-btn__content {
103
- opacity: 0.68;
104
- }
105
- }
106
-
107
- &:active {
108
- &:before {
109
- opacity: 0.08;
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
- border: none;
121
- background: transparent;
122
- transition: color 0.5s ease;
123
-
124
- min-width: auto;
125
- width: 36px;
126
-
127
- .farm-btn__content i.mdi {
128
- color: gray;
129
- }
130
-
131
- @each $size,
132
- $value in $sizes {
133
- &#{'.farm-btn[size=' + $size +']'} {
134
- font-size: $value;
135
- }
136
- }
137
-
138
- &[size='lg'] {
139
- width: 48px;
140
- height: 48px;
141
- }
142
-
143
- &[size='xl'] {
144
- width: 64px;
145
- height: 64px;
146
- }
147
-
148
- @each $color in $theme-colors-list {
149
- &#{'.farm-btn--' + $color}:not(.farm-btn--disabled) {
150
- &:hover {
151
- color: var(--farm-#{$color}-base);
152
- }
153
-
154
- ::v-deep .farm-btn__content i.mdi {
155
- color: var(--farm-#{$color}-base);
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
- #{'.farm-btn--' + $color} {
163
- border: 1px solid var(--farm-#{$color}-base);
164
- background-color: var(--farm-#{$color}-base);
165
- color: white;
166
-
167
- ::v-deep .farm-btn__content {
168
- i.mdi {
169
- color: white;
170
- }
171
-
172
- .farm-btn__content i.mdi {
173
- color: black
174
- }
175
-
176
- }
177
- }
178
-
179
- .farm-btn--extra,
180
- .farm-btn--white {
181
- color: black;
182
- }
183
-
184
- :not(.farm-btn--disabled) {
185
- &.farm-btn--outlined#{'.farm-btn--' + $color} {
186
- border: 1px solid var(--farm-#{$color}-base);
187
- background: white;
188
- color: var(--farm-#{$color}-base);
189
-
190
- &.farm-btn--extra,
191
- &.farm-btn--white {
192
- color: black;
193
- border: 1px solid black;
194
- }
195
-
196
- .farm-btn__content i.mdi {
197
- color: var(--farm-#{$color}-base);
198
- }
199
- }
200
-
201
- &.farm-btn--plain#{'.farm-btn--' + $color} {
202
- border: none;
203
- background: white;
204
- color: var(--farm-#{$color}-base);
205
-
206
- &.farm-btn--extra,
207
- &.farm-btn--white {
208
- color: black;
209
-
210
- .farm-btn__content i.mdi {
211
- color: black
212
- }
213
- }
214
-
215
- .farm-btn__content i.mdi {
216
- color: var(--farm-#{$color}-base);
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
- border: 1px solid #D6D6D6;
226
- color: #D6D6D6;
227
- background-color: white;
218
+ border: 1px solid #d6d6d6;
219
+ color: #d6d6d6;
220
+ background-color: white;
228
221
 
229
- i.mdi.farm-icon {
230
- color: #D6D6D6;
231
- }
222
+ i.mdi.farm-icon {
223
+ color: #d6d6d6;
224
+ }
232
225
  }
233
226
 
234
227
  .farm-btn--plain.farm-btn--disabled {
235
- background-color: transparent;
236
- border: none;
228
+ background-color: transparent;
229
+ border: none;
237
230
  }
238
231
 
239
232
  .farm-btn--elevated {
240
- box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
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
- .farm-btn {
245
- padding: 0 12px;
246
- line-height: 12px;
247
- min-width: 48px;
248
- height: 32px;
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
- .farm-btn.farm-btn--responsive {
254
- width: 100%;
255
- margin: 0;
256
- }
257
- }
247
+ .farm-btn.farm-btn--responsive {
248
+ width: 100%;
249
+ margin: 0;
250
+ }
251
+ }
@@ -10,6 +10,7 @@
10
10
  <farm-btn
11
11
  v-if="hasCloseIcon"
12
12
  icon
13
+ color="secondary"
13
14
  class="farm-dialog-header__close"
14
15
  title="Fechar"
15
16
  @click="onClose"
@@ -1,6 +1,6 @@
1
1
  .idcaption {
2
2
  display: flex;
3
-
3
+
4
4
  .farm-icon-box {
5
5
  margin-right: 8px;
6
6
  }
@@ -17,11 +17,12 @@
17
17
  }
18
18
 
19
19
  .farm-typography {
20
-
20
+
21
21
  margin-bottom: 0;
22
22
  display: flex;
23
23
  flex: none;
24
- > span {
24
+
25
+ >span {
25
26
  position: relative;
26
27
  }
27
28
  }
@@ -33,4 +34,9 @@
33
34
  top: -8px;
34
35
  }
35
36
  }
37
+
38
+ .farm-btn--clickable {
39
+ position: absolute;
40
+ top: -50%;
41
+ }
36
42
  }
@@ -183,3 +183,21 @@ export const CustomTooltipColor = () => ({
183
183
  </farm-idcaption>
184
184
  `,
185
185
  });
186
+
187
+
188
+ export const Teste = () => ({
189
+ template: `
190
+ <farm-idcaption
191
+ icon="account-box-outline"
192
+ copy-text=""
193
+ :link="true"
194
+ >
195
+ <template v-slot:title>
196
+ Upper Line Text
197
+ </template>
198
+ <template v-slot:subtitle>
199
+ 0
200
+ </template>
201
+ </farm-idcaption>
202
+ `,
203
+ });
@@ -7,7 +7,13 @@
7
7
  <farm-caption variation="medium" v-if="hasTitle">
8
8
  <span>
9
9
  <slot name="title"></slot>
10
- <farm-btn icon color="gray" v-if="link" @click="$emit('onLinkClick')">
10
+ <farm-btn
11
+ v-if="link"
12
+ icon
13
+ color="primary"
14
+ class="farm-btn--clickable"
15
+ @click="$emit('onLinkClick')"
16
+ >
11
17
  <farm-icon size="xs">open-in-new</farm-icon>
12
18
  </farm-btn>
13
19
  </span>
@@ -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
  },
@@ -5,7 +5,7 @@
5
5
  :class="{ 'farm-modal': true, ['farm-modal--size-' + size]: true }"
6
6
  :style="styleObject"
7
7
  >
8
- <div class="farm-modal--container teste">
8
+ <div class="farm-modal--container">
9
9
  <div class="farm-modal--header">
10
10
  <!-- @slot header -->
11
11
  <slot name="header"></slot>
@@ -195,15 +195,19 @@ export default Vue.extend({
195
195
  this.$emit('onFileChange', newValue);
196
196
  return;
197
197
  }
198
- const invalidTypeArray = newValue.filter(
199
- file =>
198
+ const invalidTypeArray = newValue.filter(file => {
199
+ const type = file.type;
200
+
201
+ return (
200
202
  this.acceptedFileTypes !== '*' &&
201
- this.acceptedFileTypes.indexOf(file.type) === -1
202
- );
203
+ (this.acceptedFileTypes.indexOf(file.type) === -1 || !type)
204
+ );
205
+ });
203
206
 
204
207
  if (invalidTypeArray.length > 0) {
205
208
  const validTypeArray = newValue.filter(file => {
206
- if (this.acceptedFileTypes.indexOf(file.type) === -1) {
209
+ const type = file.type;
210
+ if (this.acceptedFileTypes.indexOf(file.type) === -1 || !type) {
207
211
  return false;
208
212
  }
209
213
  return true;
@@ -4,9 +4,14 @@
4
4
  background-color: var(--farm-neutral-lighten);
5
5
  }
6
6
 
7
+ .farm-contextmenu {
8
+ width: 100%;
9
+ }
10
+
7
11
  .farm-icon {
8
12
  transition: all ease 0.3s;
9
13
  cursor: pointer;
14
+
10
15
  &--rotate {
11
16
  transform: rotate(180deg);
12
17
  }
@@ -112,7 +112,6 @@ export const Validate = () => ({
112
112
  </div>`,
113
113
  });
114
114
 
115
-
116
115
  export const Reset = () => ({
117
116
  data() {
118
117
  return {
@@ -130,7 +129,7 @@ export const Reset = () => ({
130
129
  methods: {
131
130
  click() {
132
131
  this.$refs.select.reset();
133
- }
132
+ },
134
133
  },
135
134
  template: `<div style="width: 480px">
136
135
  <farm-select v-model="v" :items="items" ref="select" :rules="[rules.required]" />
@@ -139,4 +138,21 @@ export const Reset = () => ({
139
138
  reset
140
139
  </farm-btn>
141
140
  </div>`,
142
- });
141
+ });
142
+
143
+ export const CustomKeys = () => ({
144
+ data() {
145
+ return {
146
+ v: 1,
147
+ items: [
148
+ { id: 1, label: ' value 1' },
149
+ { id: 2, label: ' value 2' },
150
+ { id: 3, label: ' value 3' },
151
+ ],
152
+ };
153
+ },
154
+ template: `<div style="width: 480px">
155
+ <farm-select v-model="v" :items="items" item-text="label" item-value="id" />
156
+ v-model: {{ v }}
157
+ </div>`,
158
+ });