@uzum-tech/ui 1.8.0 → 1.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/dist/index.js +198 -71
- package/dist/index.prod.js +2 -2
- package/es/chat/index.d.ts +2 -1
- package/es/chat/index.js +1 -0
- package/es/chat/src/Chat.js +1 -0
- package/es/chat/src/ChatListItems.d.ts +1759 -4
- package/es/chat/src/ChatListItems.js +13 -12
- package/es/chat/src/ChatMessages.d.ts +1760 -4
- package/es/chat/src/ChatMessages.js +27 -10
- package/es/chat/src/ChatParts/MainArea.js +10 -10
- package/es/chat/src/ChatParts/Sidebar.js +2 -2
- package/es/chat/src/interface.d.ts +4 -0
- package/es/chat/src/styles/index.cssr.js +13 -14
- package/es/chat/styles/light.d.ts +1 -1
- package/es/chat/styles/light.js +15 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/chat/index.d.ts +2 -1
- package/lib/chat/index.js +5 -1
- package/lib/chat/src/Chat.js +1 -0
- package/lib/chat/src/ChatListItems.d.ts +1759 -4
- package/lib/chat/src/ChatListItems.js +11 -10
- package/lib/chat/src/ChatMessages.d.ts +1760 -4
- package/lib/chat/src/ChatMessages.js +25 -8
- package/lib/chat/src/ChatParts/MainArea.js +10 -10
- package/lib/chat/src/ChatParts/Sidebar.js +2 -2
- package/lib/chat/src/interface.d.ts +4 -0
- package/lib/chat/src/styles/index.cssr.js +13 -14
- package/lib/chat/styles/light.d.ts +1 -1
- package/lib/chat/styles/light.js +15 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -59,10 +59,11 @@ exports.chatMessagesProps = Object.assign(Object.assign({}, _mixins_1.useTheme.p
|
|
|
59
59
|
exports.default = (0, vue_1.defineComponent)({
|
|
60
60
|
name: 'ChatMessages',
|
|
61
61
|
props: exports.chatMessagesProps,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
setup(props, { slots }) {
|
|
63
|
+
var _a;
|
|
64
|
+
const UChat = (0, vue_1.inject)(interface_1.chatInjectionKey, null);
|
|
64
65
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
65
|
-
const themeRef = (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
66
|
+
const themeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
66
67
|
const { localeRef } = (0, _mixins_1.useLocale)('Chat');
|
|
67
68
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
68
69
|
const { common: { cubicBezierEaseInOut, brandPrimary500, staticGreen, staticRed, textPrimary, textSecondary, textTertiary }, self: { backgroundColor, borderColor, mainBackgroundColor, headerBackgroundColor, headerBorderColor, headerTitleColor, messageBubbleBackgroundColorOwn, messageBubbleBackgroundColorOther, messageBubbleTextColorOwn, messageBubbleTextColorOther, messageTimeColor, messageStatusColor, attachmentBackgroundColorOwn, attachmentBackgroundColorOther, unreadNotificationBackgroundColor, unreadNotificationTextColor, typingIndicatorColor, dateSeparatorColor, dateSeparatorBackgroundColor, borderRadius, errorColor } } = themeRef.value;
|
|
@@ -107,7 +108,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
107
108
|
});
|
|
108
109
|
const handleMessageRetry = (message) => {
|
|
109
110
|
var _a;
|
|
110
|
-
emit('message-retry', message);
|
|
111
111
|
(_a = props.onMessageRetry) === null || _a === void 0 ? void 0 : _a.call(props, message);
|
|
112
112
|
};
|
|
113
113
|
const renderDateSeparator = (date) => {
|
|
@@ -123,6 +123,17 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
123
123
|
" ",
|
|
124
124
|
mergedUnreadNotificationTextRef.value)));
|
|
125
125
|
};
|
|
126
|
+
const renderMarkMessage = (message) => {
|
|
127
|
+
const markTypeClass = message.markType === interface_1.ChatMarkType.SYSTEM
|
|
128
|
+
? 'system'
|
|
129
|
+
: message.markType === interface_1.ChatMarkType.EVENT
|
|
130
|
+
? 'event'
|
|
131
|
+
: 'divider';
|
|
132
|
+
return ((0, vue_1.h)("div", { key: message.id, class: [
|
|
133
|
+
`${mergedClsPrefixRef.value}-chat-main__mark`,
|
|
134
|
+
`${mergedClsPrefixRef.value}-chat-main__mark--${markTypeClass}`
|
|
135
|
+
] }, message.content && (0, vue_1.h)("span", null, message.content)));
|
|
136
|
+
};
|
|
126
137
|
const renderMessage = (message) => {
|
|
127
138
|
const isOwn = message.isOwn;
|
|
128
139
|
const attachments = message.attachment
|
|
@@ -163,7 +174,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
163
174
|
] }, message.status === interface_1.MessageStatus.RETRY ? ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-retry`, onClick: () => {
|
|
164
175
|
handleMessageRetry(message);
|
|
165
176
|
}, style: { cursor: 'pointer' } },
|
|
166
|
-
(0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[interface_1.MessageStatus.RETRY], class: `${mergedClsPrefixRef.value}-chat-main__message-retry-icon
|
|
177
|
+
(0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[interface_1.MessageStatus.RETRY], class: `${mergedClsPrefixRef.value}-chat-main__message-retry-icon`, theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon }),
|
|
167
178
|
(0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-chat-main__message-retry-text` }, mergedRetryTextRef.value))) : ((0, vue_1.h)(vue_1.Fragment, null,
|
|
168
179
|
(0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-chat-main__message-time` }, message.timestamp),
|
|
169
180
|
isOwn && message.status && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-status` }, slots.messageStatus
|
|
@@ -171,7 +182,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
171
182
|
: statusIconMapper[message.status] && ((0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[message.status], class: [
|
|
172
183
|
`${mergedClsPrefixRef.value}-chat-main__message-status-icon`,
|
|
173
184
|
`${mergedClsPrefixRef.value}-chat-main__message-status-icon--${String(message.status)}`
|
|
174
|
-
] }))))))))));
|
|
185
|
+
], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon }))))))))));
|
|
175
186
|
};
|
|
176
187
|
const renderTypingIndicator = () => {
|
|
177
188
|
return ((0, vue_1.h)("div", { class: [
|
|
@@ -216,7 +227,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
216
227
|
};
|
|
217
228
|
return {
|
|
218
229
|
mergedClsPrefixRef,
|
|
230
|
+
mergedTheme: themeRef,
|
|
219
231
|
renderMessage,
|
|
232
|
+
renderMarkMessage,
|
|
220
233
|
renderTypingIndicator,
|
|
221
234
|
renderSkeletonMessage,
|
|
222
235
|
renderDateSeparator,
|
|
@@ -229,7 +242,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
229
242
|
render() {
|
|
230
243
|
var _a, _b, _c;
|
|
231
244
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
232
|
-
const { mergedClsPrefixRef, renderMessage, renderTypingIndicator, renderSkeletonMessage, renderDateSeparator, renderUnreadNotification } = this;
|
|
245
|
+
const { mergedClsPrefixRef, renderMessage, renderMarkMessage, renderTypingIndicator, renderSkeletonMessage, renderDateSeparator, renderUnreadNotification } = this;
|
|
233
246
|
if (this.loading) {
|
|
234
247
|
return ((0, vue_1.h)("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
|
|
235
248
|
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-main`, style: {
|
|
@@ -307,7 +320,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
307
320
|
if (item.type === 'unread-notification') {
|
|
308
321
|
return renderUnreadNotification();
|
|
309
322
|
}
|
|
310
|
-
|
|
323
|
+
const message = item;
|
|
324
|
+
if (message.type === interface_1.ChatMessageType.MARK) {
|
|
325
|
+
return renderMarkMessage(message);
|
|
326
|
+
}
|
|
327
|
+
return renderMessage(message);
|
|
311
328
|
}),
|
|
312
329
|
isTyping && renderTypingIndicator()))));
|
|
313
330
|
}
|
|
@@ -29,7 +29,7 @@ const SENDING_DELAY = 100;
|
|
|
29
29
|
exports.default = (0, vue_1.defineComponent)({
|
|
30
30
|
name: 'ChatMainArea',
|
|
31
31
|
setup(_, { slots }) {
|
|
32
|
-
const { mergedClsPrefixRef, selectedChatRef, messagesRef, typingChatIdsRef, messagesLoadingRef, messagesLoadingCountRef, headerButtonPropsRef, headerIconPropsRef, messageUploadPropsRef, footerInputPropsRef, footerButtonPropsRef, footerUploadPropsRef, footerIconPropsRef, inputPlaceholderRef, retryTextRef, typingTextRef, closeButtonTextRef, unreadNotificationTextRef, notificationsShownSetRef, unreadCountsBeforeReadRef, markNotificationShown, handleMessageSend, handleMessageRetry, onChatClose, onChatShare, onUserProfile
|
|
32
|
+
const { mergedClsPrefixRef, mergedThemeRef, selectedChatRef, messagesRef, typingChatIdsRef, messagesLoadingRef, messagesLoadingCountRef, headerButtonPropsRef, headerIconPropsRef, messageUploadPropsRef, footerInputPropsRef, footerButtonPropsRef, footerUploadPropsRef, footerIconPropsRef, inputPlaceholderRef, retryTextRef, typingTextRef, closeButtonTextRef, unreadNotificationTextRef, notificationsShownSetRef, unreadCountsBeforeReadRef, markNotificationShown, handleMessageSend, handleMessageRetry, onChatClose, onChatShare, onUserProfile
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
34
34
|
} = (0, vue_1.inject)(interface_1.chatInjectionKey);
|
|
35
35
|
const messagesBodyRef = (0, vue_1.ref)();
|
|
@@ -136,22 +136,22 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
136
136
|
return ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` },
|
|
137
137
|
(0, vue_1.h)(flex_1.UFlex, { justify: "space-between", align: "flex-start" }, {
|
|
138
138
|
default: () => ((0, vue_1.h)(vue_1.Fragment, null,
|
|
139
|
-
(0, vue_1.h)(typography_1.UText, { variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title
|
|
139
|
+
(0, vue_1.h)(typography_1.UText, { variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title`, theme: mergedThemeRef.value.peers.Typography, themeOverrides: mergedThemeRef.value.peerOverrides.Typography }, {
|
|
140
140
|
default: () => { var _a; return ((_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.title) || 'Select a chat'; }
|
|
141
141
|
}),
|
|
142
142
|
(0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__header-actions` }, {
|
|
143
143
|
default: () => (0, _utils_1.resolveSlot)(slots.headerActions, () => [
|
|
144
|
-
(0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, headerButtonPropsRef.value, { onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
|
|
145
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, headerIconPropsRef.value), {
|
|
144
|
+
(0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, headerButtonPropsRef.value, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
|
|
145
|
+
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, headerIconPropsRef.value, { theme: mergedThemeRef.value.peers.Icon, themeOverrides: mergedThemeRef.value.peerOverrides.Icon }), {
|
|
146
146
|
default: () => (0, vue_1.h)(icons_1.ArrowHookUpRight, null)
|
|
147
147
|
}))
|
|
148
148
|
}),
|
|
149
|
-
(0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, headerButtonPropsRef.value, { onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
|
|
150
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, headerIconPropsRef.value), {
|
|
149
|
+
(0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, headerButtonPropsRef.value, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
|
|
150
|
+
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, headerIconPropsRef.value, { theme: mergedThemeRef.value.peers.Icon, themeOverrides: mergedThemeRef.value.peerOverrides.Icon }), {
|
|
151
151
|
default: () => (0, vue_1.h)(icons_1.PersonNote, null)
|
|
152
152
|
}))
|
|
153
153
|
}),
|
|
154
|
-
(0, vue_1.h)(button_1.UButton, Object.assign({ type: "primary", size: "large", round: true }, headerButtonPropsRef.value, { onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
|
|
154
|
+
(0, vue_1.h)(button_1.UButton, Object.assign({ type: "primary", size: "large", round: true }, headerButtonPropsRef.value, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
|
|
155
155
|
default: () => closeButtonTextRef.value
|
|
156
156
|
})
|
|
157
157
|
])
|
|
@@ -262,13 +262,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
262
262
|
default: () => ((0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__input-container` }, {
|
|
263
263
|
default: () => ((0, vue_1.h)(vue_1.Fragment, null,
|
|
264
264
|
(0, vue_1.h)(upload_1.UUploadTrigger, { abstract: true }, {
|
|
265
|
-
default: ({ handleClick }) => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, size: "large", class: `${mergedClsPrefixRef.value}-chat-main__attach-btn` }, footerButtonPropsRef.value, { onClick: handleClick }), {
|
|
266
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 24 }, footerIconPropsRef.value), {
|
|
265
|
+
default: ({ handleClick }) => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, size: "large", class: `${mergedClsPrefixRef.value}-chat-main__attach-btn` }, footerButtonPropsRef.value, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: handleClick }), {
|
|
266
|
+
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 24 }, footerIconPropsRef.value, { theme: mergedThemeRef.value.peers.Icon, themeOverrides: mergedThemeRef.value.peerOverrides.Icon }), {
|
|
267
267
|
default: () => (0, vue_1.h)(icons_1.AttachIcon, null)
|
|
268
268
|
}))
|
|
269
269
|
}))
|
|
270
270
|
}),
|
|
271
|
-
(0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputRef", value: inputValue.value, placeholder: inputPlaceholderRef.value, class: `${mergedClsPrefixRef.value}-chat-main__input` }, footerInputPropsRef.value, { onUpdateValue: (value) => {
|
|
271
|
+
(0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputRef", value: inputValue.value, placeholder: inputPlaceholderRef.value, class: `${mergedClsPrefixRef.value}-chat-main__input` }, footerInputPropsRef.value, { theme: mergedThemeRef.value.peers.Input, themeOverrides: mergedThemeRef.value.peerOverrides.Input, onUpdateValue: (value) => {
|
|
272
272
|
inputValue.value = value;
|
|
273
273
|
if (selectedChatRef.value) {
|
|
274
274
|
chatInputs.value[selectedChatRef.value.id] = value;
|
|
@@ -15,7 +15,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
15
15
|
},
|
|
16
16
|
render() {
|
|
17
17
|
const { slots } = this;
|
|
18
|
-
const { mergedClsPrefixRef, chatItemsRef, chatItemsLoadingRef, chatItemsLoadingCountRef, listEmptyPropsRef, selectedChatIdRef, typingChatIdsRef, typingTextRef, listItemAvatarPropsRef, listItemBadgePropsRef, notificationsShownSetRef, handleChatSelect
|
|
18
|
+
const { mergedClsPrefixRef, mergedThemeRef, chatItemsRef, chatItemsLoadingRef, chatItemsLoadingCountRef, listEmptyPropsRef, selectedChatIdRef, typingChatIdsRef, typingTextRef, listItemAvatarPropsRef, listItemBadgePropsRef, notificationsShownSetRef, handleChatSelect
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
20
|
} = (0, vue_1.inject)(interface_1.chatInjectionKey);
|
|
21
21
|
const renderListHeader = () => {
|
|
@@ -24,7 +24,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
24
24
|
default: () => {
|
|
25
25
|
var _a, _b;
|
|
26
26
|
return ((0, vue_1.h)(vue_1.Fragment, null,
|
|
27
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar__header-main` }, ((_a = slots.sidebarHeaderMain) === null || _a === void 0 ? void 0 : _a.call(slots)) || ((0, vue_1.h)(select_1.USelect, { round: true, size: "
|
|
27
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar__header-main` }, ((_a = slots.sidebarHeaderMain) === null || _a === void 0 ? void 0 : _a.call(slots)) || ((0, vue_1.h)(select_1.USelect, { round: true, size: "tiny", theme: mergedThemeRef.value.peers.Select, themeOverrides: mergedThemeRef.value.peerOverrides.Select }))),
|
|
28
28
|
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar__header-actions` }, (_b = slots.sidebarHeaderActions) === null || _b === void 0 ? void 0 : _b.call(slots))));
|
|
29
29
|
}
|
|
30
30
|
})));
|
|
@@ -6,6 +6,8 @@ import type { IconProps } from '../../icon';
|
|
|
6
6
|
import type { BadgeProps } from '../../badge';
|
|
7
7
|
import { EmptyProps } from '../../empty';
|
|
8
8
|
import { InputProps } from '../../input';
|
|
9
|
+
import type { ChatTheme } from '../styles';
|
|
10
|
+
import type { MergedTheme } from '../../_mixins';
|
|
9
11
|
export declare enum MessageStatus {
|
|
10
12
|
READ = "read",
|
|
11
13
|
UNREAD = "unread",
|
|
@@ -69,6 +71,7 @@ export interface ChatMessageData {
|
|
|
69
71
|
uploadProps?: Partial<UploadProps>;
|
|
70
72
|
senderAvatar?: string | (() => VNodeChild);
|
|
71
73
|
senderName?: string | (() => VNodeChild);
|
|
74
|
+
markType?: ChatMarkType;
|
|
72
75
|
}
|
|
73
76
|
export interface ChatMessageProps {
|
|
74
77
|
id: ChatId;
|
|
@@ -241,6 +244,7 @@ export interface ChatListInst {
|
|
|
241
244
|
}
|
|
242
245
|
export declare const chatInjectionKey: InjectionKey<{
|
|
243
246
|
mergedClsPrefixRef: Ref<string>;
|
|
247
|
+
mergedThemeRef: Ref<MergedTheme<ChatTheme>>;
|
|
244
248
|
chatItemsRef: Ref<ChatListItemData[] | undefined>;
|
|
245
249
|
selectedChatIdRef: Ref<ChatId | undefined>;
|
|
246
250
|
selectedChatRef: Ref<ChatListItemData | undefined>;
|
|
@@ -9,7 +9,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
9
9
|
max-height: 100%;
|
|
10
10
|
min-height: 0;
|
|
11
11
|
display: flex;
|
|
12
|
-
overflow: hidden;
|
|
13
12
|
box-sizing: border-box;
|
|
14
13
|
.u-list-item__text {
|
|
15
14
|
grid-template-columns: 1fr !important;
|
|
@@ -18,7 +17,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
18
17
|
height: 100%;
|
|
19
18
|
max-height: 100%;
|
|
20
19
|
min-height: 0;
|
|
21
|
-
overflow: hidden;
|
|
22
20
|
}
|
|
23
21
|
`, [(0, cssr_1.cB)('chat-sidebar', `
|
|
24
22
|
max-width: 388px;
|
|
@@ -29,7 +27,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
29
27
|
background-color: var(--u-sidebar-background-color);
|
|
30
28
|
border: 1px solid var(--u-sidebar-border-color);
|
|
31
29
|
border-radius: 20px;
|
|
32
|
-
overflow: hidden;
|
|
33
30
|
`, [(0, cssr_1.cE)('header', `
|
|
34
31
|
flex-shrink: 0;
|
|
35
32
|
`), (0, cssr_1.cE)('header-container', `
|
|
@@ -143,7 +140,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
143
140
|
`), (0, cssr_1.cE)('item-status sup', `
|
|
144
141
|
padding: 2px 6px 2px 5px;
|
|
145
142
|
height: 22px;
|
|
146
|
-
--u-color: var(--u-unread-notification-background-color);
|
|
147
143
|
`), (0, cssr_1.cE)('item-status-icon', `
|
|
148
144
|
color: var(--u-sidebar-item-time-color);
|
|
149
145
|
`, [(0, cssr_1.cM)('read', `
|
|
@@ -165,7 +161,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
165
161
|
height: 100%;
|
|
166
162
|
max-height: 100%;
|
|
167
163
|
min-height: 0;
|
|
168
|
-
overflow: hidden;
|
|
169
164
|
`, [(0, cssr_1.cE)('header', `
|
|
170
165
|
border-bottom: 1px solid var(--u-border-color);
|
|
171
166
|
width: 100%;
|
|
@@ -181,7 +176,7 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
181
176
|
color: var(--u-unread-notification-text-color);
|
|
182
177
|
padding: 6px 12px;
|
|
183
178
|
text-align: center;
|
|
184
|
-
font-size:
|
|
179
|
+
font-size: 14px;
|
|
185
180
|
font-weight: 500;
|
|
186
181
|
margin: 8px 0;
|
|
187
182
|
display: flex;
|
|
@@ -215,8 +210,19 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
215
210
|
color: var(--u-date-separator-color);
|
|
216
211
|
padding: 4px 12px;
|
|
217
212
|
border-radius: 12px;
|
|
218
|
-
font-size:
|
|
213
|
+
font-size: 14px;
|
|
219
214
|
font-weight: 500;
|
|
215
|
+
`)]), (0, cssr_1.cE)('mark', `
|
|
216
|
+
display: flex;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
margin: 12px 0;
|
|
219
|
+
width: 100%;
|
|
220
|
+
`, [(0, cssr_1.c)('span', `
|
|
221
|
+
padding: 6px 12px;
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
color: var(--u-text-color-secondary);
|
|
224
|
+
background-color: var(--u-date-separator-background-color);
|
|
225
|
+
text-align: center;
|
|
220
226
|
`)]), (0, cssr_1.cE)('message', `
|
|
221
227
|
display: flex;
|
|
222
228
|
margin-bottom: 8px;
|
|
@@ -332,13 +338,6 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
332
338
|
`), (0, cssr_1.cE)('input', `
|
|
333
339
|
flex: 1;
|
|
334
340
|
margin-right: 4px;
|
|
335
|
-
--u-color: #F3F4F6 !important;
|
|
336
|
-
--u-color-focus: #F3F4F6 !important;
|
|
337
|
-
--u-border: none !important;
|
|
338
|
-
--u-border-focus: none !important;
|
|
339
|
-
--u-border-hover: none !important;
|
|
340
|
-
--u-box-shadow: none !important;
|
|
341
|
-
--u-box-shadow-focus: none !important;
|
|
342
341
|
`), (0, cssr_1.cE)('attach-btn', `
|
|
343
342
|
margin-left: 4px;
|
|
344
343
|
flex-shrink: 0;
|
|
@@ -35,7 +35,6 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
35
35
|
borderRadius: string;
|
|
36
36
|
errorColor: string;
|
|
37
37
|
};
|
|
38
|
-
export type ChatThemeVars = ReturnType<typeof self>;
|
|
39
38
|
declare const chatLight: import("../../_mixins").Theme<"Chat", {
|
|
40
39
|
backgroundColor: string;
|
|
41
40
|
borderColor: string;
|
|
@@ -686,4 +685,5 @@ declare const chatLight: import("../../_mixins").Theme<"Chat", {
|
|
|
686
685
|
}, any>;
|
|
687
686
|
}>;
|
|
688
687
|
export default chatLight;
|
|
688
|
+
export type ChatThemeVars = ReturnType<typeof self>;
|
|
689
689
|
export type ChatTheme = typeof chatLight;
|
package/lib/chat/styles/light.js
CHANGED
|
@@ -2,16 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.self = void 0;
|
|
4
4
|
const styles_1 = require("../../input/styles");
|
|
5
|
+
const light_1 = require("../../input/styles/light");
|
|
5
6
|
const styles_2 = require("../../empty/styles");
|
|
6
7
|
const styles_3 = require("../../select/styles");
|
|
7
8
|
const styles_4 = require("../../avatar/styles");
|
|
8
9
|
const styles_5 = require("../../badge/styles");
|
|
10
|
+
const light_2 = require("../../badge/styles/light");
|
|
9
11
|
const styles_6 = require("../../button/styles");
|
|
10
12
|
const styles_7 = require("../../icon/styles");
|
|
11
13
|
const styles_8 = require("../../list/styles");
|
|
12
14
|
const styles_9 = require("../../typography/styles");
|
|
13
15
|
const common_1 = require("../../_styles/common");
|
|
14
16
|
const _mixins_1 = require("../../_mixins");
|
|
17
|
+
const chatInputLight = Object.assign(Object.assign({}, styles_1.inputLight), { self(vars) {
|
|
18
|
+
const originalInputSelf = (0, light_1.self)(vars);
|
|
19
|
+
const { elementsTertiary } = vars;
|
|
20
|
+
return Object.assign(Object.assign({}, originalInputSelf), { color: elementsTertiary, colorFocus: elementsTertiary, border: 'none', borderFocus: 'none', borderHover: 'none', boxShadow: 'none', boxShadowFocus: 'none' });
|
|
21
|
+
} });
|
|
22
|
+
const chatBadgeLight = Object.assign(Object.assign({}, styles_5.badgeLight), { self(vars) {
|
|
23
|
+
const originalBadgeSelf = (0, light_2.self)(vars);
|
|
24
|
+
const { brandPrimary400, elementsSecondary } = vars;
|
|
25
|
+
return Object.assign(Object.assign({}, originalBadgeSelf), { color: brandPrimary400, textColor: elementsSecondary });
|
|
26
|
+
} });
|
|
15
27
|
const self = (vars) => {
|
|
16
28
|
const { borderRadiusLarge, elementsQuaternary, elementsTertiary, textTertiary, textPrimary, textSecondary, surfacePrimary, brandPrimary500, brandPrimary400, transparencySecondary, elementsSecondary, elementsDarkQuinary, staticRed, staticWhite } = vars;
|
|
17
29
|
return {
|
|
@@ -46,7 +58,7 @@ const self = (vars) => {
|
|
|
46
58
|
unreadNotificationTextColor: elementsSecondary,
|
|
47
59
|
typingIndicatorColor: textSecondary,
|
|
48
60
|
dateSeparatorColor: textTertiary,
|
|
49
|
-
dateSeparatorBackgroundColor:
|
|
61
|
+
dateSeparatorBackgroundColor: 'transparent',
|
|
50
62
|
borderRadius: borderRadiusLarge,
|
|
51
63
|
errorColor: staticRed
|
|
52
64
|
};
|
|
@@ -56,11 +68,11 @@ const chatLight = (0, _mixins_1.createTheme)({
|
|
|
56
68
|
name: 'Chat',
|
|
57
69
|
common: common_1.commonLight,
|
|
58
70
|
peers: {
|
|
59
|
-
Input:
|
|
71
|
+
Input: chatInputLight,
|
|
60
72
|
Empty: styles_2.emptyLight,
|
|
61
73
|
Select: styles_3.selectLight,
|
|
62
74
|
Avatar: styles_4.avatarLight,
|
|
63
|
-
Badge:
|
|
75
|
+
Badge: chatBadgeLight,
|
|
64
76
|
Button: styles_6.buttonLight,
|
|
65
77
|
Icon: styles_7.iconLight,
|
|
66
78
|
List: styles_8.listLight,
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.8.
|
|
1
|
+
declare const _default: "1.8.1";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED