@uzum-tech/ui 2.2.1 → 2.3.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.
Files changed (79) hide show
  1. package/dist/index.js +1423 -721
  2. package/dist/index.mjs +1416 -722
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/chat/index.d.ts +2 -0
  6. package/es/chat/index.mjs +1 -0
  7. package/es/chat/src/Chat.d.ts +20800 -24
  8. package/es/chat/src/Chat.mjs +1 -1
  9. package/es/chat/src/ChatMainArea.d.ts +9749 -0
  10. package/es/chat/src/{ChatParts/MainArea.mjs → ChatMainArea.mjs} +409 -75
  11. package/es/chat/src/ChatMessages.d.ts +1 -33
  12. package/es/chat/src/ChatMessages.mjs +79 -167
  13. package/es/chat/src/interface.d.ts +16 -12
  14. package/es/chat/src/interface.mjs +7 -1
  15. package/es/chat/src/styles/index.cssr.mjs +4 -1
  16. package/es/components.d.ts +28778 -256
  17. package/es/components.mjs +6 -1
  18. package/es/config-provider/src/internal-interface.d.ts +4 -0
  19. package/es/message-bubble/index.d.ts +3 -0
  20. package/es/message-bubble/index.mjs +2 -0
  21. package/es/message-bubble/src/MessageBubble.d.ts +304 -0
  22. package/es/message-bubble/src/MessageBubble.mjs +336 -0
  23. package/es/message-bubble/src/interface.d.ts +204 -0
  24. package/es/message-bubble/src/interface.mjs +92 -0
  25. package/es/message-bubble/src/styles/index.cssr.d.ts +2 -0
  26. package/es/message-bubble/src/styles/index.cssr.mjs +133 -0
  27. package/es/message-bubble/styles/dark.d.ts +29 -0
  28. package/es/message-bubble/styles/dark.mjs +13 -0
  29. package/es/message-bubble/styles/index.d.ts +3 -0
  30. package/es/message-bubble/styles/index.mjs +2 -0
  31. package/es/message-bubble/styles/light.d.ts +49 -0
  32. package/es/message-bubble/styles/light.mjs +44 -0
  33. package/es/styles.d.ts +1 -0
  34. package/es/styles.mjs +1 -0
  35. package/es/themes/dark.mjs +2 -0
  36. package/es/themes/light.mjs +2 -0
  37. package/es/upload/src/Upload.d.ts +1 -1
  38. package/es/version.d.ts +1 -1
  39. package/es/version.mjs +1 -1
  40. package/lib/chat/index.d.ts +2 -0
  41. package/lib/chat/index.js +3 -1
  42. package/lib/chat/src/Chat.d.ts +20800 -24
  43. package/lib/chat/src/Chat.js +2 -2
  44. package/lib/chat/src/ChatMainArea.d.ts +9749 -0
  45. package/lib/chat/src/{ChatParts/MainArea.js → ChatMainArea.js} +299 -30
  46. package/lib/chat/src/ChatMessages.d.ts +1 -33
  47. package/lib/chat/src/ChatMessages.js +61 -158
  48. package/lib/chat/src/interface.d.ts +16 -12
  49. package/lib/chat/src/interface.js +7 -1
  50. package/lib/chat/src/styles/index.cssr.js +4 -1
  51. package/lib/components.d.ts +28778 -256
  52. package/lib/components.js +18 -8
  53. package/lib/config-provider/src/internal-interface.d.ts +4 -0
  54. package/lib/message-bubble/index.d.ts +3 -0
  55. package/lib/message-bubble/index.js +14 -0
  56. package/lib/message-bubble/src/MessageBubble.d.ts +304 -0
  57. package/lib/message-bubble/src/MessageBubble.js +276 -0
  58. package/lib/message-bubble/src/interface.d.ts +204 -0
  59. package/lib/message-bubble/src/interface.js +80 -0
  60. package/lib/message-bubble/src/styles/index.cssr.d.ts +2 -0
  61. package/lib/message-bubble/src/styles/index.cssr.js +138 -0
  62. package/lib/message-bubble/styles/dark.d.ts +29 -0
  63. package/lib/message-bubble/styles/dark.js +15 -0
  64. package/lib/message-bubble/styles/index.d.ts +3 -0
  65. package/lib/message-bubble/styles/index.js +10 -0
  66. package/lib/message-bubble/styles/light.d.ts +49 -0
  67. package/lib/message-bubble/styles/light.js +36 -0
  68. package/lib/styles.d.ts +1 -0
  69. package/lib/styles.js +84 -82
  70. package/lib/themes/dark.js +78 -76
  71. package/lib/themes/light.js +76 -74
  72. package/lib/upload/src/Upload.d.ts +1 -1
  73. package/lib/version.d.ts +1 -1
  74. package/lib/version.js +1 -1
  75. package/package.json +2 -2
  76. package/volar.d.ts +2 -0
  77. package/web-types.json +168 -1
  78. package/es/chat/src/ChatParts/MainArea.d.ts +0 -20
  79. package/lib/chat/src/ChatParts/MainArea.d.ts +0 -20
@@ -0,0 +1,133 @@
1
+ import { c, cB, cE, cM } from "../../../_utils/cssr/index.mjs";
2
+ // vars:
3
+ // --u-bezier
4
+ // --u-message-bubble-background-color-own
5
+ // --u-message-bubble-background-color-other
6
+ // --u-message-bubble-text-color-own
7
+ // --u-message-bubble-text-color-other
8
+ // --u-message-bubble-time-color
9
+ // --u-message-bubble-status-read-color
10
+ // --u-message-bubble-status-success-color
11
+ // --u-message-bubble-attachment-background-color-own
12
+ // --u-message-bubble-attachment-background-color-other
13
+ // --u-message-bubble-error-color
14
+ // --u-message-bubble-border-radius
15
+ // --u-message-bubble-unread-background-color
16
+ // --u-message-bubble-unread-text-color
17
+ // --u-message-bubble-service-text-color
18
+ // --u-message-bubble-service-background-color
19
+ // --u-message-bubble-title-color
20
+ export default cB('message-bubble', `
21
+ box-sizing: border-box;
22
+ width: 100%;
23
+ `, [cE('message', `
24
+ display: flex;
25
+ margin-bottom: 8px;
26
+ flex-shrink: 0;
27
+ width: 100%;
28
+ `, [cM('own', `
29
+ justify-content: flex-end;
30
+ `), cM('other', `
31
+ justify-content: flex-start;
32
+ `)]), cE('message-wrapper', `
33
+ max-width: 70%;
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 4px;
37
+ flex-shrink: 0;
38
+ `, [cM('own', `
39
+ align-items: flex-end;
40
+ `), cM('other', `
41
+ align-items: flex-start;
42
+ `)]), cE('bubble', `
43
+ border-radius: var(--u-message-bubble-border-radius);
44
+ font-size: 14px;
45
+ line-height: 20px;
46
+ word-wrap: break-word;
47
+ background-color: var(--u-message-bubble-background-color-other);
48
+ color: var(--u-message-bubble-text-color-other);
49
+ border-bottom-left-radius: 6px;
50
+ width: fit-content;
51
+ display: flex;
52
+ flex-direction: column;
53
+ `, [cM('own', `
54
+ background-color: var(--u-message-bubble-background-color-own);
55
+ color: var(--u-message-bubble-text-color-own);
56
+ border-bottom-left-radius: var(--u-message-bubble-border-radius);
57
+ border-bottom-right-radius: 6px;
58
+ `)]), cE('title', `
59
+ color: var(--u-message-bubble-title-color);
60
+ padding: 12px 16px 0;
61
+ white-space: pre-wrap;
62
+ `), cE('text', `
63
+ padding: 12px 16px;
64
+ white-space: pre-wrap;
65
+ `), cE('text', `
66
+ padding-top: 8px;
67
+ `, [c('&&:first-child', `
68
+ padding-top: 12px;
69
+ `)]), cE('meta', `
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 4px;
73
+ font-size: 11px;
74
+ color: var(--u-message-bubble-time-color);
75
+ margin-top: 2px;
76
+ `, [cM('own', `
77
+ justify-content: flex-end;
78
+ `), cM('other', `
79
+ justify-content: flex-start;
80
+ `)]), cE('time', `
81
+ font-size: 11px;
82
+ color: var(--u-message-bubble-time-color);
83
+ `), cE('status', `
84
+ color: var(--u-message-bubble-status-success-color);
85
+ display: flex;
86
+ align-items: center;
87
+ `), cE('status-icon', `
88
+ color: var(--u-message-bubble-time-color);
89
+ `, [cM('read', `
90
+ color: var(--u-message-bubble-status-read-color);
91
+ `), cM('retry', `
92
+ color: var(--u-message-bubble-error-color);
93
+ `)]), cE('retry', `
94
+ display: flex;
95
+ align-items: center;
96
+ gap: 4px;
97
+ cursor: pointer;
98
+ `), cE('retry-icon', `
99
+ color: var(--u-message-bubble-error-color);
100
+ `), cE('retry-text', `
101
+ color: var(--u-message-bubble-error-color);
102
+ font-size: 11px;
103
+ font-weight: 500;
104
+ `), cE('service', `
105
+ display: flex;
106
+ justify-content: center;
107
+ width: 100%;
108
+ margin: 12px 0;
109
+ `, [c('span', `
110
+ padding: 6px 12px;
111
+ border-radius: 8px;
112
+ color: var(--u-message-bubble-service-text-color);
113
+ background-color: var(--u-message-bubble-service-background-color);
114
+ text-align: center;
115
+ `), cM('unread', `
116
+ background-color: var(--u-message-bubble-unread-background-color);
117
+ color: var(--u-message-bubble-unread-text-color);
118
+ padding: 6px 12px;
119
+ margin: 8px 0;
120
+ `, [c('span', `
121
+ display: inline-block;
122
+ white-space: nowrap;
123
+ padding: 0;
124
+ border-radius: 0;
125
+ background-color: transparent;
126
+ color: inherit;
127
+ `)])]), c('.u-message-bubble__bubble--own .u-upload-file', `
128
+ background-color: var(--u-message-bubble-attachment-background-color-own);
129
+ `), c('.u-message-bubble__bubble--other .u-upload-file', `
130
+ background-color: var(--u-message-bubble-attachment-background-color-other);
131
+ `), c('.u-upload-file-list .u-upload-file.u-upload-file--text-type', `
132
+ margin-bottom: 0px;
133
+ `)]);
@@ -0,0 +1,29 @@
1
+ declare const messageBubbleDark: import("../../_mixins").Theme<"MessageBubble", {
2
+ messageBubbleBackgroundColorOwn: string;
3
+ messageBubbleBackgroundColorOther: string;
4
+ messageBubbleTextColorOwn: string;
5
+ messageBubbleTextColorOther: string;
6
+ messageTimeColor: string;
7
+ messageStatusReadColor: string;
8
+ messageStatusSuccessColor: string;
9
+ attachmentBackgroundColorOwn: string;
10
+ attachmentBackgroundColorOther: string;
11
+ messageErrorColor: string;
12
+ messageBorderRadius: string;
13
+ unreadNotificationBackgroundColor: string;
14
+ unreadNotificationTextColor: string;
15
+ serviceMessageTextColor: string;
16
+ serviceMessageBackgroundColor: string;
17
+ messageTitleColor: string;
18
+ }, {
19
+ StatusIcon: import("../../_mixins").Theme<"Icon", {
20
+ color: string;
21
+ opacity1Depth: string;
22
+ opacity2Depth: string;
23
+ opacity3Depth: string;
24
+ opacity4Depth: string;
25
+ opacity5Depth: string;
26
+ }, any>;
27
+ }>;
28
+ export default messageBubbleDark;
29
+ export type MessageBubbleTheme = typeof messageBubbleDark;
@@ -0,0 +1,13 @@
1
+ import { createTheme } from "../../_mixins/index.mjs";
2
+ import { commonDark } from "../../_styles/common/index.mjs";
3
+ import { iconDark } from "../../icon/styles/index.mjs";
4
+ import { self } from "./light.mjs";
5
+ const messageBubbleDark = createTheme({
6
+ name: 'MessageBubble',
7
+ common: commonDark,
8
+ peers: {
9
+ StatusIcon: iconDark
10
+ },
11
+ self: vars => Object.assign({}, self(vars))
12
+ });
13
+ export default messageBubbleDark;
@@ -0,0 +1,3 @@
1
+ export { default as messageBubbleDark } from './dark';
2
+ export { default as messageBubbleLight } from './light';
3
+ export type { MessageBubbleTheme, MessageBubbleThemeVars } from './light';
@@ -0,0 +1,2 @@
1
+ export { default as messageBubbleDark } from "./dark.mjs";
2
+ export { default as messageBubbleLight } from "./light.mjs";
@@ -0,0 +1,49 @@
1
+ import type { ThemeCommonVars } from '../../_styles/common';
2
+ export declare function self(vars: ThemeCommonVars): {
3
+ messageBubbleBackgroundColorOwn: string;
4
+ messageBubbleBackgroundColorOther: string;
5
+ messageBubbleTextColorOwn: string;
6
+ messageBubbleTextColorOther: string;
7
+ messageTimeColor: string;
8
+ messageStatusReadColor: string;
9
+ messageStatusSuccessColor: string;
10
+ attachmentBackgroundColorOwn: string;
11
+ attachmentBackgroundColorOther: string;
12
+ messageErrorColor: string;
13
+ messageBorderRadius: string;
14
+ unreadNotificationBackgroundColor: string;
15
+ unreadNotificationTextColor: string;
16
+ serviceMessageTextColor: string;
17
+ serviceMessageBackgroundColor: string;
18
+ messageTitleColor: string;
19
+ };
20
+ declare const messageBubbleLight: import("../../_mixins").Theme<"MessageBubble", {
21
+ messageBubbleBackgroundColorOwn: string;
22
+ messageBubbleBackgroundColorOther: string;
23
+ messageBubbleTextColorOwn: string;
24
+ messageBubbleTextColorOther: string;
25
+ messageTimeColor: string;
26
+ messageStatusReadColor: string;
27
+ messageStatusSuccessColor: string;
28
+ attachmentBackgroundColorOwn: string;
29
+ attachmentBackgroundColorOther: string;
30
+ messageErrorColor: string;
31
+ messageBorderRadius: string;
32
+ unreadNotificationBackgroundColor: string;
33
+ unreadNotificationTextColor: string;
34
+ serviceMessageTextColor: string;
35
+ serviceMessageBackgroundColor: string;
36
+ messageTitleColor: string;
37
+ }, {
38
+ StatusIcon: import("../../_mixins").Theme<"Icon", {
39
+ color: string;
40
+ opacity1Depth: string;
41
+ opacity2Depth: string;
42
+ opacity3Depth: string;
43
+ opacity4Depth: string;
44
+ opacity5Depth: string;
45
+ }, any>;
46
+ }>;
47
+ export default messageBubbleLight;
48
+ export type MessageBubbleThemeVars = ReturnType<typeof self>;
49
+ export type MessageBubbleTheme = typeof messageBubbleLight;
@@ -0,0 +1,44 @@
1
+ import { createTheme } from "../../_mixins/index.mjs";
2
+ import { commonLight } from "../../_styles/common/index.mjs";
3
+ import { iconLight } from "../../icon/styles/index.mjs";
4
+ export function self(vars) {
5
+ const {
6
+ borderRadiusLarge,
7
+ elementsSecondary,
8
+ elementsTertiary,
9
+ textPrimary,
10
+ textSecondary,
11
+ textTertiary,
12
+ brandPrimary400,
13
+ staticGreen,
14
+ staticRed,
15
+ staticWhite
16
+ } = vars;
17
+ return {
18
+ messageBubbleBackgroundColorOwn: elementsTertiary,
19
+ messageBubbleBackgroundColorOther: elementsTertiary,
20
+ messageBubbleTextColorOwn: textPrimary,
21
+ messageBubbleTextColorOther: textPrimary,
22
+ messageTimeColor: textTertiary,
23
+ messageStatusReadColor: brandPrimary400,
24
+ messageStatusSuccessColor: staticGreen,
25
+ attachmentBackgroundColorOwn: staticWhite,
26
+ attachmentBackgroundColorOther: staticWhite,
27
+ messageErrorColor: staticRed,
28
+ messageBorderRadius: borderRadiusLarge,
29
+ unreadNotificationBackgroundColor: brandPrimary400,
30
+ unreadNotificationTextColor: elementsSecondary,
31
+ serviceMessageTextColor: textSecondary,
32
+ serviceMessageBackgroundColor: 'transparent',
33
+ messageTitleColor: textPrimary
34
+ };
35
+ }
36
+ const messageBubbleLight = createTheme({
37
+ name: 'MessageBubble',
38
+ common: commonLight,
39
+ peers: {
40
+ StatusIcon: iconLight
41
+ },
42
+ self
43
+ });
44
+ export default messageBubbleLight;
package/es/styles.d.ts CHANGED
@@ -47,6 +47,7 @@ export { logDark } from './log/styles';
47
47
  export { marqueeDark } from './marquee/styles';
48
48
  export { mentionDark } from './mention/styles';
49
49
  export { menuDark } from './menu/styles';
50
+ export { messageBubbleDark } from './message-bubble/styles';
50
51
  export { messageRtl as unstableMessageRtl } from './message/styles';
51
52
  export { messageDark } from './message/styles';
52
53
  export { modalDark } from './modal/styles';
package/es/styles.mjs CHANGED
@@ -48,6 +48,7 @@ export { logDark } from "./log/styles/index.mjs";
48
48
  export { marqueeDark } from "./marquee/styles/index.mjs";
49
49
  export { mentionDark } from "./mention/styles/index.mjs";
50
50
  export { menuDark } from "./menu/styles/index.mjs";
51
+ export { messageBubbleDark } from "./message-bubble/styles/index.mjs";
51
52
  export { messageRtl as unstableMessageRtl } from "./message/styles/index.mjs";
52
53
  export { messageDark } from "./message/styles/index.mjs";
53
54
  export { modalDark } from "./modal/styles/index.mjs";
@@ -63,6 +63,7 @@ import { mappingCardDark } from "../mapping-card/styles/index.mjs";
63
63
  import { marqueeDark } from "../marquee/styles/index.mjs";
64
64
  import { mentionDark } from "../mention/styles/index.mjs";
65
65
  import { menuDark } from "../menu/styles/index.mjs";
66
+ import { messageBubbleDark } from "../message-bubble/styles/index.mjs";
66
67
  import { messageDark } from "../message/styles/index.mjs";
67
68
  import { modalFullscreenDark } from "../modal-fullscreen/styles/index.mjs";
68
69
  import { modalDark } from "../modal/styles/index.mjs";
@@ -160,6 +161,7 @@ export const darkTheme = {
160
161
  Marquee: marqueeDark,
161
162
  Menu: menuDark,
162
163
  Mention: mentionDark,
164
+ MessageBubble: messageBubbleDark,
163
165
  Message: messageDark,
164
166
  Modal: modalDark,
165
167
  Notification: notificationDark,
@@ -66,6 +66,7 @@ import { mappingCardLight } from "../mapping-card/styles/index.mjs";
66
66
  import { marqueeLight } from "../marquee/styles/index.mjs";
67
67
  import { mentionLight } from "../mention/styles/index.mjs";
68
68
  import { menuLight } from "../menu/styles/index.mjs";
69
+ import { messageBubbleLight } from "../message-bubble/styles/index.mjs";
69
70
  import { messageLight } from "../message/styles/index.mjs";
70
71
  import { modalFullscreenLight } from "../modal-fullscreen/styles/index.mjs";
71
72
  import { modalLight } from "../modal/styles/index.mjs";
@@ -162,6 +163,7 @@ export const lightTheme = {
162
163
  Marquee: marqueeLight,
163
164
  Menu: menuLight,
164
165
  Mention: mentionLight,
166
+ MessageBubble: messageBubbleLight,
165
167
  Message: messageLight,
166
168
  Modal: modalLight,
167
169
  Notification: notificationLight,
@@ -3112,7 +3112,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3112
3112
  readonly name: string;
3113
3113
  readonly abstract: boolean;
3114
3114
  readonly multiple: boolean;
3115
- readonly noIcon: boolean;
3116
3115
  readonly directory: boolean;
3117
3116
  readonly directoryDnd: boolean;
3118
3117
  readonly method: string;
@@ -3129,5 +3128,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3129
3128
  readonly listType: ListType;
3130
3129
  readonly shouldUseThumbnailUrl: ShouldUseThumbnailUrl;
3131
3130
  readonly showTrigger: boolean;
3131
+ readonly noIcon: boolean;
3132
3132
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3133
3133
  export default _default;
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.2.1";
1
+ declare const _default: "2.3.0";
2
2
  export default _default;
package/es/version.mjs CHANGED
@@ -1 +1 @@
1
- export default '2.2.1';
1
+ export default '2.3.0';
@@ -1,6 +1,8 @@
1
1
  export { default as UChat } from './src/Chat';
2
2
  export { default as UChatListItems } from './src/ChatListItems';
3
3
  export type { ChatListItemsProps } from './src/ChatListItems';
4
+ export { default as UChatMainArea } from './src/ChatMainArea';
5
+ export type { ChatMainAreaProps } from './src/ChatMainArea';
4
6
  export { default as UChatMessages } from './src/ChatMessages';
5
7
  export type { ChatMessagesProps } from './src/ChatMessages';
6
8
  export type { ChatAttachment, ChatFooterProps, ChatFooterSlots, ChatHeaderProps, ChatHeaderSlots, ChatId, chatInjectionKey, ChatInst, ChatListHeaderProps, ChatListInst, ChatListItemData, ChatListItemProps, ChatListItemSlots, ChatMarkProps, ChatMarkSlots, ChatMessageData, ChatMessageProps, ChatMessageSlots, ChatProps, ChatSlots, OnAttachmentUpload, OnChatSelect, OnFilterChange, OnMessageSend, OnNetworkError, OnSendError, OnUploadError } from './src/interface';
package/lib/chat/index.js CHANGED
@@ -3,11 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MessageStatus = exports.ChatMessageType = exports.ChatMarkType = exports.ChatAttachmentStatus = exports.UChatMessages = exports.UChatListItems = exports.UChat = void 0;
6
+ exports.MessageStatus = exports.ChatMessageType = exports.ChatMarkType = exports.ChatAttachmentStatus = exports.UChatMessages = exports.UChatMainArea = exports.UChatListItems = exports.UChat = void 0;
7
7
  var Chat_1 = require("./src/Chat");
8
8
  Object.defineProperty(exports, "UChat", { enumerable: true, get: function () { return __importDefault(Chat_1).default; } });
9
9
  var ChatListItems_1 = require("./src/ChatListItems");
10
10
  Object.defineProperty(exports, "UChatListItems", { enumerable: true, get: function () { return __importDefault(ChatListItems_1).default; } });
11
+ var ChatMainArea_1 = require("./src/ChatMainArea");
12
+ Object.defineProperty(exports, "UChatMainArea", { enumerable: true, get: function () { return __importDefault(ChatMainArea_1).default; } });
11
13
  var ChatMessages_1 = require("./src/ChatMessages");
12
14
  Object.defineProperty(exports, "UChatMessages", { enumerable: true, get: function () { return __importDefault(ChatMessages_1).default; } });
13
15
  var interface_1 = require("./src/interface");