@weni/unnnic-system 2.30.1 → 2.31.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/CHANGELOG.md +6 -0
- package/dist/{es-59bc8f20.mjs → es-90631300.mjs} +1 -1
- package/dist/{index-f6d820c8.mjs → index-ffb4ef53.mjs} +1048 -1035
- package/dist/{pt-br-d63797cf.mjs → pt-br-faa0458b.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +31 -31
- package/package.json +1 -1
- package/src/components/ChatsContact/ChatsContact.vue +39 -13
- package/src/components/ChatsContact/__tests__/__snapshots__/ChatsContact.spec.js.snap +4 -1
- package/src/stories/ChatsContact.stories.js +20 -2
package/package.json
CHANGED
|
@@ -36,13 +36,22 @@
|
|
|
36
36
|
/>
|
|
37
37
|
|
|
38
38
|
<div class="chats-contact__infos">
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
<section class="chats-contact__infos__title-container">
|
|
40
|
+
<h1
|
|
41
|
+
class="chats-contact__infos__title ellipsis"
|
|
42
|
+
:title="title"
|
|
43
|
+
:class="{ bold: unreadMessages }"
|
|
44
|
+
>
|
|
45
|
+
{{ title }}
|
|
46
|
+
</h1>
|
|
47
|
+
|
|
48
|
+
<UnnnicTag
|
|
49
|
+
v-if="projectName"
|
|
50
|
+
class="chats-contact__infos__project-tag"
|
|
51
|
+
:text="projectName"
|
|
52
|
+
scheme="neutral-white"
|
|
53
|
+
/>
|
|
54
|
+
</section>
|
|
46
55
|
<div
|
|
47
56
|
class="chats-contact__infos__additional-information"
|
|
48
57
|
:class="{ bold: unreadMessages || (checkboxWhenSelect && selected) }"
|
|
@@ -77,7 +86,6 @@
|
|
|
77
86
|
</p>
|
|
78
87
|
</div>
|
|
79
88
|
</div>
|
|
80
|
-
|
|
81
89
|
<section
|
|
82
90
|
v-if="!checkboxWhenSelect"
|
|
83
91
|
class="chats-contact__infos__unread-messages-container"
|
|
@@ -100,7 +108,6 @@
|
|
|
100
108
|
{{ unreadMessages }}
|
|
101
109
|
</p>
|
|
102
110
|
</section>
|
|
103
|
-
|
|
104
111
|
<Checkbox
|
|
105
112
|
v-else-if="selected && checkboxWhenSelect"
|
|
106
113
|
class="chats-contact__infos__checkbox"
|
|
@@ -119,6 +126,7 @@ import UnnnicIcon from '../Icon.vue';
|
|
|
119
126
|
import TransitionRipple from '../TransitionRipple/TransitionRipple.vue';
|
|
120
127
|
import UnnnicI18n from '../../mixins/i18n';
|
|
121
128
|
import Checkbox from '../Checkbox/Checkbox.vue';
|
|
129
|
+
import UnnnicTag from '../Tag/Tag.vue';
|
|
122
130
|
|
|
123
131
|
import('moment/dist/locale/es.js');
|
|
124
132
|
import('moment/dist/locale/pt-br.js');
|
|
@@ -133,6 +141,7 @@ export default {
|
|
|
133
141
|
UnnnicIcon,
|
|
134
142
|
TransitionRipple,
|
|
135
143
|
Checkbox,
|
|
144
|
+
UnnnicTag,
|
|
136
145
|
},
|
|
137
146
|
|
|
138
147
|
mixins: [UnnnicI18n],
|
|
@@ -148,8 +157,8 @@ export default {
|
|
|
148
157
|
required: true,
|
|
149
158
|
},
|
|
150
159
|
lastMessage: {
|
|
151
|
-
type:
|
|
152
|
-
default:
|
|
160
|
+
type: Object,
|
|
161
|
+
default: () => ({}),
|
|
153
162
|
},
|
|
154
163
|
lastInteractionTime: {
|
|
155
164
|
type: String,
|
|
@@ -183,6 +192,10 @@ export default {
|
|
|
183
192
|
type: String,
|
|
184
193
|
default: '',
|
|
185
194
|
},
|
|
195
|
+
projectName: {
|
|
196
|
+
type: String,
|
|
197
|
+
default: '',
|
|
198
|
+
},
|
|
186
199
|
},
|
|
187
200
|
|
|
188
201
|
emits: ['click'],
|
|
@@ -414,6 +427,21 @@ export default {
|
|
|
414
427
|
overflow: hidden;
|
|
415
428
|
gap: $unnnic-spacing-nano;
|
|
416
429
|
|
|
430
|
+
&__title-container {
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
gap: $unnnic-spacing-xs;
|
|
434
|
+
justify-content: flex-start;
|
|
435
|
+
white-space: nowrap;
|
|
436
|
+
width: 100%;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
&__project-tag {
|
|
440
|
+
display: block;
|
|
441
|
+
flex-shrink: 1;
|
|
442
|
+
border: 1px solid $unnnic-color-neutral-cleanest;
|
|
443
|
+
}
|
|
444
|
+
|
|
417
445
|
&__media {
|
|
418
446
|
display: flex;
|
|
419
447
|
align-items: center;
|
|
@@ -479,8 +507,6 @@ export default {
|
|
|
479
507
|
}
|
|
480
508
|
|
|
481
509
|
.ellipsis {
|
|
482
|
-
width: 100%;
|
|
483
|
-
|
|
484
510
|
overflow: hidden;
|
|
485
511
|
text-overflow: ellipsis;
|
|
486
512
|
white-space: nowrap;
|
|
@@ -4,7 +4,10 @@ exports[`UnnnicChatsContact > should match snapshot 1`] = `
|
|
|
4
4
|
"<div data-v-8ce6efd5="" class="chats-contact" tabindex="0" style="position: relative; overflow: hidden;">
|
|
5
5
|
<section data-v-c735998e="" data-v-8ce6efd5="" class="user-avatar user-avatar--xl"><span data-v-c735998e="">C</span></section>
|
|
6
6
|
<div data-v-8ce6efd5="" class="chats-contact__infos">
|
|
7
|
-
<
|
|
7
|
+
<section data-v-8ce6efd5="" class="chats-contact__infos__title-container">
|
|
8
|
+
<h1 data-v-8ce6efd5="" class="chats-contact__infos__title ellipsis" title="Contact Name">Contact Name</h1>
|
|
9
|
+
<!--v-if-->
|
|
10
|
+
</section>
|
|
8
11
|
<div data-v-8ce6efd5="" class="chats-contact__infos__additional-information">
|
|
9
12
|
<!--v-if-->
|
|
10
13
|
</div>
|
|
@@ -68,8 +68,9 @@ export default {
|
|
|
68
68
|
|
|
69
69
|
const defaultArgs = {
|
|
70
70
|
title: 'John Doe',
|
|
71
|
-
lastMessage:
|
|
72
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vel.',
|
|
71
|
+
lastMessage: {
|
|
72
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vel.',
|
|
73
|
+
},
|
|
73
74
|
};
|
|
74
75
|
const unreadMessages = 5;
|
|
75
76
|
const waitingTime = 10;
|
|
@@ -147,6 +148,23 @@ export const ContactList = {
|
|
|
147
148
|
}),
|
|
148
149
|
};
|
|
149
150
|
|
|
151
|
+
export const WithProjectInfo = {
|
|
152
|
+
args: {
|
|
153
|
+
...defaultArgs,
|
|
154
|
+
},
|
|
155
|
+
render: (args) => ({
|
|
156
|
+
setup() {
|
|
157
|
+
return { args };
|
|
158
|
+
},
|
|
159
|
+
components: { unnnicChatsContact },
|
|
160
|
+
template: `
|
|
161
|
+
<div style="display: grid;">
|
|
162
|
+
<unnnic-chats-contact v-for="(project, index) in ['Project A', 'Project B', 'Project C']" v-bind="args" :projectName="project" />
|
|
163
|
+
</div>
|
|
164
|
+
`,
|
|
165
|
+
}),
|
|
166
|
+
};
|
|
167
|
+
|
|
150
168
|
export const MediaLastMessage = {
|
|
151
169
|
args: {
|
|
152
170
|
...defaultArgs,
|