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

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.1",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -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="gray"
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>
@@ -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
  }
@@ -31,5 +31,10 @@ describe('Select component', () => {
31
31
  component.onBlur();
32
32
  expect(component.isBlured).toBeTruthy();
33
33
  });
34
+
35
+ it('clickInput', () => {
36
+ component.clickInput();
37
+ expect(component.isTouched).toBeTruthy();
38
+ });
34
39
  });
35
40
  });
@@ -1,17 +1,7 @@
1
- .v-list-item.v-list-item--link {
2
- border-bottom: 1px solid var(--farm-stroke-base);
3
- }
4
-
5
- .v-list-item__title {
6
- display: flex;
7
- align-items: center;
8
-
9
-
10
- }
11
-
12
- ::v-deep .v-application--wrap {
13
- min-height: auto;
14
- font-family: 'Montserrat', sans-serif !important;
1
+ .farm-context-menu {
2
+ &--disabled {
3
+ pointer-events: none;
4
+ }
15
5
  }
16
6
 
17
7
  .farm-listitem {
@@ -21,4 +11,4 @@
21
11
  vertical-align: sub;
22
12
  margin-right: 8px;
23
13
  }
24
- }
14
+ }
@@ -28,6 +28,12 @@ export const Primary = () => ({
28
28
  </div>`,
29
29
  });
30
30
 
31
+ export const Disabled = () => ({
32
+ template: `<div style="padding-left: 80px">
33
+ <farm-context-menu disabled :items="[{ label: 'Remover', icon: { color: 'error', type: 'open-in-new' } }]" />
34
+ </div>`,
35
+ });
36
+
31
37
  export const Icons = () => ({
32
38
  template: `<div style="padding-left: 80px">
33
39
  <farm-context-menu
@@ -70,7 +76,10 @@ export const OnRightSide = () => ({
70
76
  return {
71
77
  items: [
72
78
  { label: 'Novo', icon: { type: 'open-in-new' } },
73
- { label: 'Nome bem longo sem quebrar linha', icon: { color: 'secondary', type: 'open-in-new' } },
79
+ {
80
+ label: 'Nome bem longo sem quebrar linha',
81
+ icon: { color: 'secondary', type: 'open-in-new' },
82
+ },
74
83
  { label: 'Remover', icon: { color: 'error', type: 'delete' } },
75
84
  ],
76
85
  };
@@ -78,4 +87,4 @@ export const OnRightSide = () => ({
78
87
  template: `<div style="padding-left: 80px; display: flex; justify-content: end;">
79
88
  <farm-context-menu ref="multi" :items="items" />
80
89
  </div>`,
81
- });
90
+ });
@@ -1,7 +1,16 @@
1
1
  <template>
2
- <farm-contextmenu v-model="value">
3
- <template v-slot:activator="{}">
4
- <farm-btn icon @click="toggleValue" title="Abrir opções" color="secondary">
2
+ <farm-contextmenu
3
+ :class="{ 'farm-context-menu': true, 'farm-context-menu--disabled': disabled }"
4
+ v-model="value"
5
+ >
6
+ <template v-slot:activator>
7
+ <farm-btn
8
+ icon
9
+ title="Abrir opções"
10
+ color="secondary"
11
+ :disabled="disabled"
12
+ @click="toggleValue"
13
+ >
5
14
  <farm-icon size="md">dots-horizontal</farm-icon>
6
15
  </farm-btn>
7
16
  </template>
@@ -47,6 +56,13 @@ export default Vue.extend({
47
56
  type: Array as PropType<Array<IContextMenuOption>>,
48
57
  required: true,
49
58
  },
59
+ /**
60
+ * Is disabled?
61
+ */
62
+ disabled: {
63
+ type: Boolean,
64
+ default: false,
65
+ },
50
66
  },
51
67
  data() {
52
68
  return {