@farm-investimentos/front-mfe-components 12.1.3 → 12.1.4

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": "12.1.3",
3
+ "version": "12.1.4",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -26,5 +26,8 @@ header {
26
26
  align-items: center;
27
27
  width: 100%;
28
28
  margin-bottom: 0;
29
+ white-space: nowrap;
30
+ overflow: hidden;
31
+ text-overflow: ellipsis;
29
32
  }
30
33
  }
@@ -61,3 +61,9 @@ export const TemplateSlot = () => ({
61
61
  </farm-dialog-header>
62
62
  </div>`,
63
63
  });
64
+
65
+ export const VeryLongTitle = () => ({
66
+ template: `<div style="max-width: 480px; position: relative;">
67
+ <farm-dialog-header title="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt leo nec orci hendrerit, in sagittis magna tincidunt." />
68
+ </div>`,
69
+ });
@@ -1,16 +1,23 @@
1
1
  .idcaption {
2
2
  display: flex;
3
3
  min-height: 48px;
4
+ max-width: 100%;
5
+
4
6
  .farm-icon-box {
5
7
  margin-right: 8px;
6
8
  }
7
9
 
10
+ &.farm-idcaption--noicon .idcaption__body {
11
+ max-width: 100%;
12
+ }
13
+
8
14
  &__body {
9
15
 
10
16
  display: flex;
11
17
  flex-direction: column;
12
18
  justify-content: space-between;
13
19
  align-content: flex-start;
20
+ max-width: calc(100% - 48px);
14
21
 
15
22
  &--single {
16
23
  justify-content: center;
@@ -21,22 +28,21 @@
21
28
  margin-bottom: 0;
22
29
  display: flex;
23
30
  flex: none;
31
+ position: relative;
32
+ align-items: center;
33
+ height: 18px;
24
34
 
25
35
  >span {
26
- position: relative;
36
+ max-width: 100%;
37
+ white-space: nowrap;
38
+ overflow: hidden;
39
+ text-overflow: ellipsis;
27
40
  }
28
41
  }
29
42
 
30
- .farm-btn,
31
43
  .farm-tooltip {
32
- position: absolute;
33
- right: -30px;
34
- top: -8px;
44
+ padding-right: 1px;
35
45
  }
36
46
  }
37
47
 
38
- .farm-btn--clickable {
39
- position: absolute;
40
- top: -50%;
41
- }
42
48
  }
@@ -23,11 +23,17 @@ export default {
23
23
  };
24
24
 
25
25
  export const Primary = () => ({
26
+ methods: {
27
+ onLinkClick() {
28
+ alert('onLinkClick');
29
+ }
30
+ },
26
31
  template: `
27
32
  <farm-idcaption
28
33
  icon="account-box-outline"
29
34
  copyText="texto a copiar"
30
35
  :link="true"
36
+ @onLinkClick="onLinkClick"
31
37
  >
32
38
  <template v-slot:title>
33
39
  Upper Line Text
@@ -77,7 +83,6 @@ export const NoUpperText = () => ({
77
83
  <farm-idcaption
78
84
  icon="account-box-outline"
79
85
  copyText="texto a copiar"
80
- :link="true"
81
86
  >
82
87
  <template v-slot:subtitle>
83
88
  Lower:Line Text
@@ -90,7 +95,6 @@ export const NoBottomText = () => ({
90
95
  template: `
91
96
  <farm-idcaption
92
97
  icon="account-box-outline"
93
- copyText="texto a copiar"
94
98
  :link="true"
95
99
  >
96
100
  <template v-slot:title>
@@ -100,10 +104,11 @@ export const NoBottomText = () => ({
100
104
  `,
101
105
  });
102
106
 
103
- export const NoTextToClip = () => ({
107
+ export const NoTextToCopy = () => ({
104
108
  template: `
105
109
  <farm-idcaption
106
- icon="account-box-outline"
110
+ icon="account-box-outline"
111
+ copyText=""
107
112
  :link="true"
108
113
  >
109
114
  <template v-slot:title>
@@ -185,20 +190,20 @@ export const CustomTooltipColor = () => ({
185
190
  `,
186
191
  });
187
192
 
188
-
189
- export const Teste = () => ({
193
+ export const LongTitles = () => ({
190
194
  template: `
195
+ <farm-col sm="3">
191
196
  <farm-idcaption
192
197
  icon="account-box-outline"
193
- copy-text=""
198
+ copyText="texto a copiar"
194
199
  :link="true"
195
200
  >
196
201
  <template v-slot:title>
197
- Upper Line Text
202
+ Upper Line Text Upper Line Text
198
203
  </template>
199
204
  <template v-slot:subtitle>
200
- 0
205
+ Lower: Line Text Line Text Line Text Line
201
206
  </template>
202
207
  </farm-idcaption>
203
- `,
208
+ </farm-col>`,
204
209
  });
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="idcaption farm-idcaption">
2
+ <div :class="{ idcaption: true, 'farm-idcaption': true, 'farm-idcaption--noicon': !icon }">
3
3
  <farm-icon-box v-if="icon" :icon="icon" :color="iconBoxColor" size="md" />
4
4
  <div
5
5
  :class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
@@ -7,28 +7,28 @@
7
7
  <farm-caption variation="medium" v-if="hasTitle">
8
8
  <span>
9
9
  <slot name="title"></slot>
10
- <farm-btn
11
- v-if="link"
12
- icon
13
- color="primary"
14
- class="farm-btn--clickable"
15
- @click="$emit('onLinkClick')"
16
- >
17
- <farm-icon size="xs">open-in-new</farm-icon>
18
- </farm-btn>
19
10
  </span>
11
+ <farm-btn
12
+ v-if="link"
13
+ icon
14
+ color="primary"
15
+ class="farm-btn--clickable"
16
+ @click="$emit('onLinkClick')"
17
+ >
18
+ <farm-icon size="xs">open-in-new</farm-icon>
19
+ </farm-btn>
20
20
  </farm-caption>
21
21
 
22
22
  <farm-caption variation="regular" color="gray" v-if="hasSubtitle">
23
23
  <span>
24
24
  <slot name="subtitle"></slot>
25
- <farm-copytoclipboard
26
- v-if="copyText"
27
- :toCopy="copyText"
28
- :successMessage="successMessage"
29
- :tooltipColor="tooltipColor"
30
- />
31
25
  </span>
26
+ <farm-copytoclipboard
27
+ v-if="copyText"
28
+ :toCopy="copyText"
29
+ :successMessage="successMessage"
30
+ :tooltipColor="tooltipColor"
31
+ />
32
32
  </farm-caption>
33
33
  </div>
34
34
  </div>
@@ -71,4 +71,25 @@ export const ButtonLabels = () => ({
71
71
  reabrir
72
72
  </farm-btn>
73
73
  </div>`,
74
+ });
75
+
76
+ export const Slot = () => ({
77
+ data() {
78
+ return {
79
+ showPrompt: false,
80
+ };
81
+ },
82
+ template: `<div>
83
+ <farm-prompt-user match="CONFIRMAR" title="Título" subtitle="" v-model="showPrompt">
84
+ <template v-slot:subtitle>
85
+ <farm-caption>Using caption and <farm-chip dense>chip</farm-chip></farm-caption>
86
+ <br />
87
+ Digite <strong>CONFIRMAR</strong> para habilitar
88
+ </template>
89
+ </farm-prompt-user>
90
+ click:
91
+ <farm-btn color="primary" @click="showPrompt = true;">
92
+ reabrir
93
+ </farm-btn>
94
+ </div>`,
74
95
  });
@@ -5,6 +5,7 @@
5
5
  </template>
6
6
  <template v-slot:content>
7
7
  <section class="modal-content">
8
+ <slot name="subtitle"></slot>
8
9
  <farm-promptusertoconfirm
9
10
  v-if="inputVal"
10
11
  v-model="canConfirm"