@uzum-tech/ui 2.4.0 → 2.4.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/dist/index.js +173 -76
- package/dist/index.mjs +174 -77
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.mjs +1 -1
- package/es/_utils/markdown/constants.d.ts +1 -0
- package/es/_utils/markdown/constants.mjs +1 -0
- package/es/_utils/markdown/index.d.ts +1 -1
- package/es/_utils/markdown/index.mjs +1 -1
- package/es/_utils/markdown/render-markdown.d.ts +3 -0
- package/es/_utils/markdown/render-markdown.mjs +18 -3
- package/es/_utils/vue/index.d.ts +1 -0
- package/es/_utils/vue/index.mjs +1 -0
- package/es/_utils/vue/resolve-reactive.d.ts +3 -0
- package/es/_utils/vue/resolve-reactive.mjs +9 -0
- package/es/chat/src/ChatListItems.mjs +16 -11
- package/es/chat/src/ChatMainArea.mjs +2 -1
- package/es/chat/src/ChatMessages.d.ts +1 -1
- package/es/chat/src/ChatMessages.mjs +6 -5
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.mjs +1 -2
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +2 -1
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +3 -6
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.mjs +2 -1
- package/es/chat/src/interface.d.ts +17 -34
- package/es/chat/src/styles/index.cssr.mjs +11 -12
- package/es/chat/styles/light.mjs +2 -1
- package/es/chat/tests/utils/constants.d.ts +12 -0
- package/es/chat/tests/utils/constants.mjs +12 -0
- package/es/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-item-mock.mjs +9 -0
- package/es/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-message-mock.mjs +13 -0
- package/es/components.d.ts +87 -4
- package/es/config-provider/src/ConfigProvider.mjs +6 -2
- package/es/editor/index.d.ts +1 -1
- package/es/editor/src/Editor.d.ts +26 -0
- package/es/editor/src/Editor.mjs +25 -3
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +24 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +12 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +24 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.mjs +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +12 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.mjs +3 -1
- package/es/editor/src/composables/use-editor-css-vars.mjs +8 -0
- package/es/editor/src/extensions.d.ts +1 -1
- package/es/editor/src/extensions.mjs +8 -2
- package/es/editor/src/interface.d.ts +19 -1
- package/es/editor/src/interface.mjs +1 -0
- package/es/editor/src/styles/index.cssr.mjs +14 -2
- package/es/editor/styles/dark.d.ts +4 -0
- package/es/editor/styles/light.d.ts +8 -0
- package/es/editor/styles/light.mjs +4 -0
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.mjs +1 -0
- package/es/locales/common/ruRU.mjs +6 -7
- package/es/locales/common/uzUZ.mjs +1 -0
- package/es/locales/common/zhCN.mjs +1 -0
- package/es/locales/utils/date-locale.d.ts +2 -0
- package/es/locales/utils/date-locale.mjs +8 -0
- package/es/message-bubble/src/MessageBubble.d.ts +19 -10
- package/es/message-bubble/src/MessageBubble.mjs +21 -24
- package/es/message-bubble/src/interface.d.ts +9 -5
- package/es/message-bubble/src/interface.mjs +7 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +3 -1
- package/lib/_utils/markdown/constants.d.ts +1 -0
- package/lib/_utils/markdown/constants.js +2 -1
- package/lib/_utils/markdown/index.d.ts +1 -1
- package/lib/_utils/markdown/index.js +4 -1
- package/lib/_utils/markdown/render-markdown.d.ts +3 -0
- package/lib/_utils/markdown/render-markdown.js +20 -2
- package/lib/_utils/vue/index.d.ts +1 -0
- package/lib/_utils/vue/index.js +4 -1
- package/lib/_utils/vue/resolve-reactive.d.ts +3 -0
- package/lib/_utils/vue/resolve-reactive.js +17 -0
- package/lib/chat/src/ChatListItems.js +20 -17
- package/lib/chat/src/ChatMainArea.js +2 -2
- package/lib/chat/src/ChatMessages.d.ts +1 -1
- package/lib/chat/src/ChatMessages.js +6 -5
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.js +2 -2
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +4 -1
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +2 -2
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.js +2 -2
- package/lib/chat/src/interface.d.ts +17 -34
- package/lib/chat/src/styles/index.cssr.js +11 -12
- package/lib/chat/styles/light.js +3 -1
- package/lib/chat/tests/utils/constants.d.ts +12 -0
- package/lib/chat/tests/utils/constants.js +15 -0
- package/lib/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-item-mock.js +10 -0
- package/lib/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-message-mock.js +14 -0
- package/lib/components.d.ts +87 -4
- package/lib/config-provider/src/ConfigProvider.js +7 -4
- package/lib/editor/index.d.ts +1 -1
- package/lib/editor/src/Editor.d.ts +28 -2
- package/lib/editor/src/Editor.js +22 -2
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +24 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +12 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +24 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.js +1 -1
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +12 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.js +1 -1
- package/lib/editor/src/composables/use-editor-css-vars.js +5 -1
- package/lib/editor/src/extensions.d.ts +1 -1
- package/lib/editor/src/extensions.js +8 -3
- package/lib/editor/src/interface.d.ts +19 -1
- package/lib/editor/src/interface.js +1 -1
- package/lib/editor/src/styles/index.cssr.js +14 -2
- package/lib/editor/styles/dark.d.ts +4 -0
- package/lib/editor/styles/light.d.ts +8 -0
- package/lib/editor/styles/light.js +4 -0
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +1 -0
- package/lib/locales/common/ruRU.js +6 -7
- package/lib/locales/common/uzUZ.js +1 -0
- package/lib/locales/common/zhCN.js +1 -0
- package/lib/locales/utils/date-locale.d.ts +2 -0
- package/lib/locales/utils/date-locale.js +14 -0
- package/lib/message-bubble/src/MessageBubble.d.ts +19 -10
- package/lib/message-bubble/src/MessageBubble.js +26 -25
- package/lib/message-bubble/src/interface.d.ts +9 -5
- package/lib/message-bubble/src/interface.js +6 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +26 -9
|
@@ -42,8 +42,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
42
42
|
return null;
|
|
43
43
|
const { mergedClsPrefix, mergedTheme } = this;
|
|
44
44
|
return ((0, vue_1.h)(upload_1.UUploadTrigger, { abstract: true }, {
|
|
45
|
-
default: ({ handleClick }) => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true,
|
|
46
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size:
|
|
45
|
+
default: ({ handleClick }) => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, class: `${mergedClsPrefix}-chat-main__attach-btn`, disabled: this.mergedDisabled, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: handleClick }, this.mergedButtonProps), {
|
|
46
|
+
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20, theme: mergedTheme.peers.FooterAttachIcon, themeOverrides: mergedTheme.peerOverrides.FooterAttachIcon }, this.mergedIconProps), {
|
|
47
47
|
default: () => (0, _utils_1.resolveSlot)(this.$slots.icon, () => [(0, vue_1.h)(icons_1.AttachIcon, null)])
|
|
48
48
|
}))
|
|
49
49
|
}))
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const vue_1 = require("vue");
|
|
7
7
|
const icons_1 = require("../../../../_internal/icons");
|
|
8
8
|
const _mixins_1 = require("../../../../_mixins");
|
|
9
|
+
const _utils_1 = require("../../../../_utils");
|
|
9
10
|
const button_1 = require("../../../../button");
|
|
10
11
|
const icon_1 = require("../../../../icon");
|
|
11
12
|
const list_1 = require("../../../../list");
|
|
@@ -42,7 +43,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
42
43
|
(0, vue_1.h)(list_1.UList, { bordered: true }, {
|
|
43
44
|
default: () => {
|
|
44
45
|
var _a;
|
|
45
|
-
return ((0, vue_1.h)(list_1.UListItem, { header: { text: this.mergedTitle }, description: {
|
|
46
|
+
return ((0, vue_1.h)(list_1.UListItem, { header: { text: this.mergedTitle }, description: {
|
|
47
|
+
text: (0, _utils_1.resolveReactiveText)((_a = this.message) === null || _a === void 0 ? void 0 : _a.content)
|
|
48
|
+
} }, {
|
|
46
49
|
suffix: () => ((0, vue_1.h)(button_1.UButton, { text: true, circle: true, size: "small", onClick: this.handleCancel, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button }, {
|
|
47
50
|
icon: () => ((0, vue_1.h)(icon_1.UIcon, { size: 16 }, {
|
|
48
51
|
default: () => (0, vue_1.h)(icons_1.CloseIcon, null)
|
|
@@ -123,7 +123,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
123
123
|
render() {
|
|
124
124
|
const { mergedClsPrefix, mergedTheme, selectedChat } = this;
|
|
125
125
|
const keyId = this.toKeyString(selectedChat === null || selectedChat === void 0 ? void 0 : selectedChat.id);
|
|
126
|
-
const keyTitle =
|
|
126
|
+
const keyTitle = (0, _utils_1.resolveReactiveText)(selectedChat === null || selectedChat === void 0 ? void 0 : selectedChat.title);
|
|
127
127
|
const renderDefaultActions = () => [
|
|
128
128
|
(0, vue_1.h)(tooltip_1.UTooltip, null, {
|
|
129
129
|
trigger: () => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, this.mergedShareButtonProps, { theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: this.handleChatShare }), {
|
|
@@ -149,7 +149,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
149
149
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-chat-main__header-inner` },
|
|
150
150
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-chat-main__header-title-wrap` },
|
|
151
151
|
(0, vue_1.h)(typography_1.UText, { key: `${keyId}-${keyTitle}`, variant: "heading-s-bold", class: `${mergedClsPrefix}-chat-main__header-title`, theme: mergedTheme.peers.Typography, themeOverrides: mergedTheme.peerOverrides.Typography }, {
|
|
152
|
-
default: () =>
|
|
152
|
+
default: () => (0, _utils_1.resolveReactiveContent)(selectedChat === null || selectedChat === void 0 ? void 0 : selectedChat.title)
|
|
153
153
|
}),
|
|
154
154
|
this.typing && ((0, vue_1.h)(typography_1.UText, { class: [
|
|
155
155
|
`${mergedClsPrefix}-chat-main__header-subtitle`,
|
|
@@ -85,12 +85,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
85
85
|
},
|
|
86
86
|
render() {
|
|
87
87
|
const { mergedClsPrefix, mergedTheme } = this;
|
|
88
|
-
return ((0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputInstRef", value: this.value, placeholder: this.mergedPlaceholder, class: `${mergedClsPrefix}-chat-main__input`, theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, type: "textarea", autosize: {
|
|
88
|
+
return ((0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputInstRef", size: "small", value: this.value, placeholder: this.mergedPlaceholder, class: `${mergedClsPrefix}-chat-main__input`, theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, type: "textarea", autosize: {
|
|
89
89
|
minRows: 1,
|
|
90
90
|
maxRows: 5
|
|
91
91
|
}, onUpdateValue: this.handleUpdateValue, onKeydown: this.handleKeydown }, this.safeInputProps), {
|
|
92
92
|
prefix: this.$slots.prefix,
|
|
93
|
-
suffix: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size:
|
|
93
|
+
suffix: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20, class: `${mergedClsPrefix}-chat-main__input-suffix`, theme: mergedTheme.peers.FooterSuffixIcon, themeOverrides: mergedTheme.peerOverrides.FooterSuffixIcon, onClick: this.handleSend }, this.mergedSuffixIconProps), {
|
|
94
94
|
default: () => (0, _utils_1.resolveSlot)(this.$slots.suffixIcon, () => [(0, vue_1.h)(icons_1.SendFilled, null)])
|
|
95
95
|
}))
|
|
96
96
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNodeChild } from 'vue';
|
|
1
|
+
import type { ExtractPublicPropTypes, InjectionKey, MaybeRefOrGetter, PropType, Ref, VNodeChild } from 'vue';
|
|
2
2
|
import type { MergedTheme } from '../../_mixins';
|
|
3
3
|
import type { MarkdownOptions } from '../../_utils/markdown';
|
|
4
4
|
import type { AvatarProps } from '../../avatar';
|
|
@@ -43,9 +43,9 @@ export type ChatId = string | number | symbol;
|
|
|
43
43
|
export interface ChatListItemData {
|
|
44
44
|
id: ChatId;
|
|
45
45
|
disabled?: boolean;
|
|
46
|
-
title?: string | (() => VNodeChild);
|
|
47
|
-
subtitle?: string | (() => VNodeChild);
|
|
48
|
-
datetime?: string | number | Date | (() => VNodeChild);
|
|
46
|
+
title?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
47
|
+
subtitle?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
48
|
+
datetime?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild);
|
|
49
49
|
unreadCount?: number;
|
|
50
50
|
messageStatus?: MessageStatus;
|
|
51
51
|
lastMessageIsOwn?: boolean;
|
|
@@ -56,59 +56,42 @@ export interface ChatMessageMark {
|
|
|
56
56
|
id: ChatId;
|
|
57
57
|
type: ChatMessageType.MARK;
|
|
58
58
|
}
|
|
59
|
-
export interface ChatMessageText {
|
|
60
|
-
id: ChatId;
|
|
61
|
-
type: ChatMessageType.TEXT;
|
|
62
|
-
isOwn: boolean;
|
|
63
|
-
content: string | (() => VNodeChild);
|
|
64
|
-
timestamp?: string | number | Date | (() => VNodeChild);
|
|
65
|
-
status?: MessageStatus;
|
|
66
|
-
}
|
|
67
|
-
export interface ChatMessageFile {
|
|
68
|
-
id: ChatId;
|
|
69
|
-
type: ChatMessageType.FILE;
|
|
70
|
-
isOwn: boolean;
|
|
71
|
-
content?: string | (() => VNodeChild);
|
|
72
|
-
timestamp?: string | number | Date | (() => VNodeChild);
|
|
73
|
-
status?: MessageStatus;
|
|
74
|
-
attachments: ChatAttachment[];
|
|
75
|
-
}
|
|
76
59
|
export interface ChatMessageData {
|
|
77
60
|
id: ChatId;
|
|
78
61
|
type?: ChatMessageType;
|
|
79
62
|
isOwn?: boolean;
|
|
80
|
-
content?: string;
|
|
81
|
-
timestamp?: string | number | Date | (() => VNodeChild);
|
|
63
|
+
content?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
64
|
+
timestamp?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild);
|
|
82
65
|
status?: MessageStatus;
|
|
83
|
-
date?: string;
|
|
66
|
+
date?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
84
67
|
attachment?: ChatAttachment[];
|
|
85
68
|
uploadProps?: Partial<UploadProps>;
|
|
86
69
|
senderAvatar?: string | (() => VNodeChild);
|
|
87
|
-
senderName?: string | (() => VNodeChild);
|
|
70
|
+
senderName?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
88
71
|
markType?: ChatMarkType;
|
|
89
|
-
title?: string | (() => VNodeChild);
|
|
72
|
+
title?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
90
73
|
markdown?: boolean;
|
|
91
74
|
}
|
|
92
75
|
export interface ChatMessageProps {
|
|
93
76
|
id: ChatId;
|
|
94
77
|
type?: ChatMessageType;
|
|
95
78
|
isOwn?: boolean;
|
|
96
|
-
content?: string;
|
|
97
|
-
timestamp?: string | number | Date | (() => VNodeChild);
|
|
79
|
+
content?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
80
|
+
timestamp?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild);
|
|
98
81
|
status?: MessageStatus;
|
|
99
82
|
attachment?: ChatAttachment[];
|
|
100
83
|
uploadProps?: Partial<UploadProps>;
|
|
101
84
|
senderAvatar?: string | (() => VNodeChild);
|
|
102
|
-
senderName?: string | (() => VNodeChild);
|
|
85
|
+
senderName?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
103
86
|
disabled?: boolean;
|
|
104
|
-
title?: string | (() => VNodeChild);
|
|
87
|
+
title?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
105
88
|
}
|
|
106
89
|
export interface ChatListItemProps {
|
|
107
90
|
id: ChatId;
|
|
108
91
|
disabled?: boolean;
|
|
109
|
-
title?: string | (() => VNodeChild);
|
|
110
|
-
subtitle?: string | (() => VNodeChild);
|
|
111
|
-
datetime?: string | number | Date | (() => VNodeChild);
|
|
92
|
+
title?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
93
|
+
subtitle?: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
94
|
+
datetime?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild);
|
|
112
95
|
unreadCount?: number;
|
|
113
96
|
messageStatus?: MessageStatus;
|
|
114
97
|
lastMessageIsOwn?: boolean;
|
|
@@ -232,7 +215,7 @@ export interface ChatMessageSlots {
|
|
|
232
215
|
}
|
|
233
216
|
export interface ChatBubbleAction {
|
|
234
217
|
key: ChatBubbleActionKey | string;
|
|
235
|
-
label: string | (() => VNodeChild);
|
|
218
|
+
label: MaybeRefOrGetter<string> | (() => VNodeChild);
|
|
236
219
|
handler: (message: ChatMessageData) => void;
|
|
237
220
|
visible?: (message: ChatMessageData) => boolean;
|
|
238
221
|
}
|
|
@@ -340,6 +340,7 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
340
340
|
padding: 16px 0px;
|
|
341
341
|
`), (0, cssr_1.cE)('input', `
|
|
342
342
|
flex: 1;
|
|
343
|
+
--u-chat-input-padding-vertical: calc((var(--u-height) - var(--u-line-height-textarea)) / 2);
|
|
343
344
|
`, [(0, cssr_1.c)('.u-input-wrapper', `
|
|
344
345
|
flex-wrap: wrap;
|
|
345
346
|
padding: 0 4px;
|
|
@@ -347,34 +348,32 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
347
348
|
`, [(0, cssr_1.c)('.u-input__prefix', `
|
|
348
349
|
width: 100%;
|
|
349
350
|
margin: 0;
|
|
350
|
-
margin-top: 4px;
|
|
351
351
|
white-space: wrap;
|
|
352
|
-
`, [(0, cssr_1.c)('
|
|
352
|
+
`, [(0, cssr_1.c)('&:has(*)', `
|
|
353
|
+
margin-top: 4px;
|
|
354
|
+
`), (0, cssr_1.c)('ul', `
|
|
353
355
|
border-top-left-radius: 12px;
|
|
354
356
|
border-top-right-radius: 12px;
|
|
355
357
|
`), (0, cssr_1.c)('li', `
|
|
356
358
|
padding: 12px;
|
|
357
|
-
`)]), (0, cssr_1.c)('.u-input__textarea-el', `
|
|
358
|
-
padding-top:
|
|
359
|
-
padding-
|
|
360
|
-
|
|
361
|
-
`), (0, cssr_1.c)('.u-input__placeholder', `
|
|
362
|
-
padding-top: 12px;
|
|
359
|
+
`)]), (0, cssr_1.c)('.u-input__textarea-el, .u-input__textarea-mirror, .u-input__placeholder', `
|
|
360
|
+
padding-top: var(--u-chat-input-padding-vertical);
|
|
361
|
+
padding-bottom: var(--u-chat-input-padding-vertical);
|
|
362
|
+
`), (0, cssr_1.c)('.u-input__textarea-el, .u-input__placeholder', `
|
|
363
363
|
padding-left: 12px;
|
|
364
364
|
padding-right: 48px;
|
|
365
365
|
`)])]), (0, cssr_1.cE)('editing-block', `
|
|
366
366
|
width: 100%;
|
|
367
367
|
`), (0, cssr_1.cE)('input-suffix', `
|
|
368
368
|
position: absolute;
|
|
369
|
-
right:
|
|
370
|
-
bottom:
|
|
369
|
+
right: 8px;
|
|
370
|
+
bottom: 10px;
|
|
371
371
|
color: var(--u-input-suffix-color) !important;
|
|
372
372
|
cursor: pointer;
|
|
373
|
-
margin-right: 4px;
|
|
374
373
|
`), (0, cssr_1.cE)('attach-btn', `
|
|
375
374
|
margin-left: 4px;
|
|
376
375
|
flex-shrink: 0;
|
|
377
|
-
padding: 0
|
|
376
|
+
padding: 0 10px;
|
|
378
377
|
`)]), (0, cssr_1.c)('*', `
|
|
379
378
|
box-sizing: border-box;
|
|
380
379
|
`), (0, cssr_1.c)('.u-list-item .u-list-item__text', `
|
package/lib/chat/styles/light.js
CHANGED
|
@@ -19,7 +19,7 @@ const styles_10 = require("../../typography/styles");
|
|
|
19
19
|
const chatInputLight = Object.assign(Object.assign({}, styles_6.inputLight), { self(vars) {
|
|
20
20
|
const originalInputSelf = (0, light_2.self)(vars);
|
|
21
21
|
const { elementsTertiary } = vars;
|
|
22
|
-
return Object.assign(Object.assign({}, originalInputSelf), { color: elementsTertiary, colorFocus: elementsTertiary,
|
|
22
|
+
return Object.assign(Object.assign({}, originalInputSelf), { color: elementsTertiary, colorFocus: elementsTertiary, border: 'none', borderFocus: 'none', borderHover: 'none', boxShadow: 'none', boxShadowFocus: 'none' });
|
|
23
23
|
} });
|
|
24
24
|
const chatBadgeLight = Object.assign(Object.assign({}, styles_2.badgeLight), { self(vars) {
|
|
25
25
|
const originalBadgeSelf = (0, light_1.self)(vars);
|
|
@@ -84,6 +84,8 @@ function createSendButtonThemeOverrides(themeVars) {
|
|
|
84
84
|
colorPressed: 'transparent',
|
|
85
85
|
colorFocus: 'transparent',
|
|
86
86
|
colorDisabled: 'transparent',
|
|
87
|
+
rippleColor: themeVars.sendButtonRippleColor,
|
|
88
|
+
waveOpacity: themeVars.sendButtonWaveOpacity,
|
|
87
89
|
textColor: themeVars.sendButtonColor,
|
|
88
90
|
textColorHover: themeVars.sendButtonColor,
|
|
89
91
|
textColorPressed: themeVars.sendButtonColor,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const manyChatsTest: {
|
|
2
|
+
readonly chatCount: 15;
|
|
3
|
+
readonly messagesPerChat: 8;
|
|
4
|
+
readonly runCount: 2;
|
|
5
|
+
};
|
|
6
|
+
export declare const messageBubbleTest: {
|
|
7
|
+
readonly messageCount: 20;
|
|
8
|
+
};
|
|
9
|
+
export declare const sendMessageTest: {
|
|
10
|
+
readonly messageToSendCount: 20;
|
|
11
|
+
readonly sendingDelayMs: 150;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMessageTest = exports.messageBubbleTest = exports.manyChatsTest = void 0;
|
|
4
|
+
exports.manyChatsTest = {
|
|
5
|
+
chatCount: 15,
|
|
6
|
+
messagesPerChat: 8,
|
|
7
|
+
runCount: 2
|
|
8
|
+
};
|
|
9
|
+
exports.messageBubbleTest = {
|
|
10
|
+
messageCount: 20
|
|
11
|
+
};
|
|
12
|
+
exports.sendMessageTest = {
|
|
13
|
+
messageToSendCount: 20,
|
|
14
|
+
sendingDelayMs: 150
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = createChatItemMock;
|
|
4
|
+
function createChatItemMock(length) {
|
|
5
|
+
return Array.from({ length }, (_, index) => ({
|
|
6
|
+
id: index + 1,
|
|
7
|
+
title: `**Чат ${index + 1}**`,
|
|
8
|
+
subtitle: `*последнее сообщение ${index + 1}*`
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = createChatMessageMock;
|
|
4
|
+
const ui_1 = require("@uzum-tech/ui");
|
|
5
|
+
function createChatMessageMock(chatId, length) {
|
|
6
|
+
return Array.from({ length }, (_, index) => ({
|
|
7
|
+
id: `${chatId}-${index}`,
|
|
8
|
+
type: ui_1.ChatMessageType.TEXT,
|
|
9
|
+
isOwn: index % 2 === 1,
|
|
10
|
+
content: `Сообщение **${index}** в чате ${chatId}\n\n- пункт\n- пункт`,
|
|
11
|
+
timestamp: '10:00',
|
|
12
|
+
status: ui_1.MessageStatus.READ
|
|
13
|
+
}));
|
|
14
|
+
}
|