@uzum-tech/ui 1.8.0 → 1.8.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.
Files changed (188) hide show
  1. package/dist/index.js +378 -197
  2. package/dist/index.prod.js +3 -3
  3. package/es/_internal/scrollbar/src/Scrollbar.js +1 -1
  4. package/es/button/src/Button.d.ts +72 -0
  5. package/es/button/src/Button.js +13 -7
  6. package/es/button/src/styles/index.cssr.js +1 -2
  7. package/es/button/styles/light.d.ts +8 -0
  8. package/es/button/styles/light.js +7 -7
  9. package/es/calendar/src/Calendar.d.ts +80 -0
  10. package/es/calendar/styles/light.d.ts +8 -0
  11. package/es/chat/index.d.ts +2 -1
  12. package/es/chat/index.js +1 -0
  13. package/es/chat/src/Chat.d.ts +87 -7
  14. package/es/chat/src/Chat.js +12 -12
  15. package/es/chat/src/ChatListItems.d.ts +1847 -4
  16. package/es/chat/src/ChatListItems.js +16 -12
  17. package/es/chat/src/ChatMessages.d.ts +1848 -4
  18. package/es/chat/src/ChatMessages.js +27 -10
  19. package/es/chat/src/ChatParts/MainArea.js +10 -10
  20. package/es/chat/src/ChatParts/Sidebar.js +2 -2
  21. package/es/chat/src/interface.d.ts +4 -0
  22. package/es/chat/src/styles/index.cssr.js +14 -17
  23. package/es/chat/styles/dark.d.ts +8 -0
  24. package/es/chat/styles/light.d.ts +9 -1
  25. package/es/chat/styles/light.js +15 -3
  26. package/es/color-picker/src/ColorInputUnit.d.ts +8 -0
  27. package/es/color-picker/src/ColorPicker.d.ts +72 -0
  28. package/es/color-picker/styles/light.d.ts +8 -0
  29. package/es/data-table/src/DataTable.d.ts +56 -0
  30. package/es/data-table/src/HeaderButton/FilterButton.d.ts +8 -0
  31. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +8 -0
  32. package/es/data-table/src/TableParts/Body.d.ts +8 -0
  33. package/es/data-table/src/TableParts/Header.d.ts +8 -0
  34. package/es/data-table/src/interface.d.ts +24 -0
  35. package/es/data-table/styles/light.d.ts +8 -0
  36. package/es/date-picker/src/DatePicker.d.ts +168 -0
  37. package/es/date-picker/src/panel/date.d.ts +24 -0
  38. package/es/date-picker/src/panel/daterange.d.ts +24 -0
  39. package/es/date-picker/src/panel/datetime.d.ts +24 -0
  40. package/es/date-picker/src/panel/datetimerange.d.ts +24 -0
  41. package/es/date-picker/src/panel/panelMonth.d.ts +48 -0
  42. package/es/date-picker/src/panel/panelMonthContent.d.ts +24 -0
  43. package/es/date-picker/src/panel/panelYear.d.ts +48 -0
  44. package/es/date-picker/src/panel/panelYearContent.d.ts +24 -0
  45. package/es/date-picker/src/panel/use-calendar.d.ts +24 -0
  46. package/es/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
  47. package/es/date-picker/src/panel/use-panel-common.d.ts +24 -0
  48. package/es/date-picker/styles/light.d.ts +16 -0
  49. package/es/dialog/src/Dialog.d.ts +56 -0
  50. package/es/dialog/src/DialogProvider.d.ts +16 -0
  51. package/es/dialog/styles/light.d.ts +8 -0
  52. package/es/dynamic-input/src/DynamicInput.d.ts +80 -0
  53. package/es/dynamic-input/src/InputPreset.d.ts +8 -0
  54. package/es/dynamic-input/src/PairPreset.d.ts +8 -0
  55. package/es/dynamic-input/styles/light.d.ts +8 -0
  56. package/es/dynamic-tags/src/DynamicTags.d.ts +80 -0
  57. package/es/dynamic-tags/styles/light.d.ts +8 -0
  58. package/es/input-number/src/InputNumber.d.ts +80 -0
  59. package/es/input-number/styles/light.d.ts +8 -0
  60. package/es/legacy-transfer/src/Transfer.d.ts +80 -0
  61. package/es/legacy-transfer/src/TransferFilter.d.ts +8 -0
  62. package/es/legacy-transfer/src/TransferList.d.ts +8 -0
  63. package/es/legacy-transfer/src/TransferListItem.d.ts +8 -0
  64. package/es/legacy-transfer/styles/light.d.ts +8 -0
  65. package/es/modal/src/BodyWrapper.d.ts +16 -0
  66. package/es/modal/src/Modal.d.ts +72 -0
  67. package/es/modal/styles/light.d.ts +8 -0
  68. package/es/notification/src/Notification.d.ts +5 -0
  69. package/es/notification/src/Notification.js +16 -6
  70. package/es/notification/src/NotificationContainer.d.ts +12 -0
  71. package/es/notification/src/NotificationProvider.d.ts +108 -0
  72. package/es/notification/src/styles/index.cssr.js +12 -8
  73. package/es/notification/styles/light.d.ts +24 -0
  74. package/es/notification/styles/light.js +9 -8
  75. package/es/popconfirm/src/Popconfirm.d.ts +80 -0
  76. package/es/popconfirm/styles/light.d.ts +8 -0
  77. package/es/time-picker/src/Panel.d.ts +8 -0
  78. package/es/time-picker/src/TimePicker.d.ts +80 -0
  79. package/es/time-picker/styles/light.d.ts +8 -0
  80. package/es/transfer/src/Transfer.d.ts +80 -0
  81. package/es/transfer/src/TransferFilter.d.ts +8 -0
  82. package/es/transfer/src/TransferList.d.ts +8 -0
  83. package/es/transfer/src/TransferListItem.d.ts +8 -0
  84. package/es/transfer/styles/light.d.ts +8 -0
  85. package/es/upload/src/Upload.d.ts +90 -0
  86. package/es/upload/src/Upload.js +2 -1
  87. package/es/upload/src/UploadFile.d.ts +9 -0
  88. package/es/upload/src/UploadProgress.d.ts +9 -0
  89. package/es/upload/src/styles/index.cssr.js +1 -0
  90. package/es/upload/src/useUploadActionsRender.js +5 -1
  91. package/es/upload/styles/light.d.ts +10 -0
  92. package/es/upload/styles/light.js +6 -5
  93. package/es/version.d.ts +1 -1
  94. package/es/version.js +1 -1
  95. package/lib/_internal/scrollbar/src/Scrollbar.js +1 -1
  96. package/lib/button/src/Button.d.ts +72 -0
  97. package/lib/button/src/Button.js +13 -7
  98. package/lib/button/src/styles/index.cssr.js +1 -2
  99. package/lib/button/styles/light.d.ts +8 -0
  100. package/lib/button/styles/light.js +7 -7
  101. package/lib/calendar/src/Calendar.d.ts +80 -0
  102. package/lib/calendar/styles/light.d.ts +8 -0
  103. package/lib/chat/index.d.ts +2 -1
  104. package/lib/chat/index.js +5 -1
  105. package/lib/chat/src/Chat.d.ts +87 -7
  106. package/lib/chat/src/Chat.js +12 -12
  107. package/lib/chat/src/ChatListItems.d.ts +1847 -4
  108. package/lib/chat/src/ChatListItems.js +14 -10
  109. package/lib/chat/src/ChatMessages.d.ts +1848 -4
  110. package/lib/chat/src/ChatMessages.js +25 -8
  111. package/lib/chat/src/ChatParts/MainArea.js +10 -10
  112. package/lib/chat/src/ChatParts/Sidebar.js +2 -2
  113. package/lib/chat/src/interface.d.ts +4 -0
  114. package/lib/chat/src/styles/index.cssr.js +14 -17
  115. package/lib/chat/styles/dark.d.ts +8 -0
  116. package/lib/chat/styles/light.d.ts +9 -1
  117. package/lib/chat/styles/light.js +15 -3
  118. package/lib/color-picker/src/ColorInputUnit.d.ts +8 -0
  119. package/lib/color-picker/src/ColorPicker.d.ts +72 -0
  120. package/lib/color-picker/styles/light.d.ts +8 -0
  121. package/lib/data-table/src/DataTable.d.ts +56 -0
  122. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +8 -0
  123. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +8 -0
  124. package/lib/data-table/src/TableParts/Body.d.ts +8 -0
  125. package/lib/data-table/src/TableParts/Header.d.ts +8 -0
  126. package/lib/data-table/src/interface.d.ts +24 -0
  127. package/lib/data-table/styles/light.d.ts +8 -0
  128. package/lib/date-picker/src/DatePicker.d.ts +168 -0
  129. package/lib/date-picker/src/panel/date.d.ts +24 -0
  130. package/lib/date-picker/src/panel/daterange.d.ts +24 -0
  131. package/lib/date-picker/src/panel/datetime.d.ts +24 -0
  132. package/lib/date-picker/src/panel/datetimerange.d.ts +24 -0
  133. package/lib/date-picker/src/panel/panelMonth.d.ts +48 -0
  134. package/lib/date-picker/src/panel/panelMonthContent.d.ts +24 -0
  135. package/lib/date-picker/src/panel/panelYear.d.ts +48 -0
  136. package/lib/date-picker/src/panel/panelYearContent.d.ts +24 -0
  137. package/lib/date-picker/src/panel/use-calendar.d.ts +24 -0
  138. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
  139. package/lib/date-picker/src/panel/use-panel-common.d.ts +24 -0
  140. package/lib/date-picker/styles/light.d.ts +16 -0
  141. package/lib/dialog/src/Dialog.d.ts +56 -0
  142. package/lib/dialog/src/DialogProvider.d.ts +16 -0
  143. package/lib/dialog/styles/light.d.ts +8 -0
  144. package/lib/dynamic-input/src/DynamicInput.d.ts +80 -0
  145. package/lib/dynamic-input/src/InputPreset.d.ts +8 -0
  146. package/lib/dynamic-input/src/PairPreset.d.ts +8 -0
  147. package/lib/dynamic-input/styles/light.d.ts +8 -0
  148. package/lib/dynamic-tags/src/DynamicTags.d.ts +80 -0
  149. package/lib/dynamic-tags/styles/light.d.ts +8 -0
  150. package/lib/input-number/src/InputNumber.d.ts +80 -0
  151. package/lib/input-number/styles/light.d.ts +8 -0
  152. package/lib/legacy-transfer/src/Transfer.d.ts +80 -0
  153. package/lib/legacy-transfer/src/TransferFilter.d.ts +8 -0
  154. package/lib/legacy-transfer/src/TransferList.d.ts +8 -0
  155. package/lib/legacy-transfer/src/TransferListItem.d.ts +8 -0
  156. package/lib/legacy-transfer/styles/light.d.ts +8 -0
  157. package/lib/modal/src/BodyWrapper.d.ts +16 -0
  158. package/lib/modal/src/Modal.d.ts +72 -0
  159. package/lib/modal/styles/light.d.ts +8 -0
  160. package/lib/notification/src/Notification.d.ts +5 -0
  161. package/lib/notification/src/Notification.js +14 -4
  162. package/lib/notification/src/NotificationContainer.d.ts +12 -0
  163. package/lib/notification/src/NotificationProvider.d.ts +108 -0
  164. package/lib/notification/src/styles/index.cssr.js +12 -8
  165. package/lib/notification/styles/light.d.ts +24 -0
  166. package/lib/notification/styles/light.js +9 -8
  167. package/lib/popconfirm/src/Popconfirm.d.ts +80 -0
  168. package/lib/popconfirm/styles/light.d.ts +8 -0
  169. package/lib/time-picker/src/Panel.d.ts +8 -0
  170. package/lib/time-picker/src/TimePicker.d.ts +80 -0
  171. package/lib/time-picker/styles/light.d.ts +8 -0
  172. package/lib/transfer/src/Transfer.d.ts +80 -0
  173. package/lib/transfer/src/TransferFilter.d.ts +8 -0
  174. package/lib/transfer/src/TransferList.d.ts +8 -0
  175. package/lib/transfer/src/TransferListItem.d.ts +8 -0
  176. package/lib/transfer/styles/light.d.ts +8 -0
  177. package/lib/upload/src/Upload.d.ts +90 -0
  178. package/lib/upload/src/Upload.js +2 -1
  179. package/lib/upload/src/UploadFile.d.ts +9 -0
  180. package/lib/upload/src/UploadProgress.d.ts +9 -0
  181. package/lib/upload/src/styles/index.cssr.js +1 -0
  182. package/lib/upload/src/useUploadActionsRender.js +5 -1
  183. package/lib/upload/styles/light.d.ts +10 -0
  184. package/lib/upload/styles/light.js +6 -5
  185. package/lib/version.d.ts +1 -1
  186. package/lib/version.js +1 -1
  187. package/package.json +1 -1
  188. package/web-types.json +4 -4
@@ -1,5 +1,5 @@
1
- import { h, defineComponent, computed } from 'vue';
2
- import { MessageStatus } from './interface';
1
+ import { h, defineComponent, computed, inject } from 'vue';
2
+ import { MessageStatus, chatInjectionKey } from './interface';
3
3
  import { UEmpty } from '../../empty';
4
4
  import { UAvatar } from '../../avatar';
5
5
  import { UListItem, UList } from '../../list';
@@ -9,6 +9,7 @@ import style from './styles/index.cssr';
9
9
  import { chatLight } from '../styles';
10
10
  import { useConfig, useTheme, useThemeClass, useLocale } from '../../_mixins';
11
11
  import { CheckmarkDoneSharp, MdTime, PersonOutline, Refresh } from '../../_internal/icons';
12
+ import { UFlex } from '../../flex';
12
13
  const statusIconMapper = {
13
14
  [MessageStatus.READ]: CheckmarkDoneSharp,
14
15
  [MessageStatus.PENDING]: MdTime,
@@ -52,10 +53,11 @@ export const chatListItemsProps = Object.assign(Object.assign({}, useTheme.props
52
53
  export default defineComponent({
53
54
  name: 'ChatListItems',
54
55
  props: chatListItemsProps,
55
- emits: ['chat-select'],
56
- setup(props, { slots, emit }) {
56
+ setup(props, { slots }) {
57
+ var _a;
58
+ const UChat = inject(chatInjectionKey, null);
57
59
  const { mergedClsPrefixRef } = useConfig(props);
58
- const themeRef = useTheme('Chat', '-chat', style, chatLight, props, mergedClsPrefixRef);
60
+ const themeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : useTheme('Chat', '-chat', style, chatLight, props, mergedClsPrefixRef);
59
61
  const { localeRef } = useLocale('Chat');
60
62
  const cssVarsRef = computed(() => {
61
63
  const { common: { cubicBezierEaseInOut, brandPrimary500, staticGreen, staticRed, textPrimary, textSecondary, textTertiary }, self: { backgroundColor, borderColor, sidebarBackgroundColor, sidebarBorderColor, sidebarItemBackgroundColor, sidebarItemBackgroundColorHover, sidebarItemBackgroundColorSelected, sidebarItemTextColor, sidebarItemTextColorSelected, sidebarItemSubtitleColor, sidebarItemTimeColor, unreadNotificationBackgroundColor, borderRadius } } = themeRef.value;
@@ -86,7 +88,6 @@ export default defineComponent({
86
88
  const mergedTypingTextRef = computed(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
87
89
  const handleChatSelect = (chatId) => {
88
90
  var _a;
89
- emit('chat-select', chatId);
90
91
  (_a = props.onChatSelect) === null || _a === void 0 ? void 0 : _a.call(props, chatId);
91
92
  };
92
93
  const renderChatItem = (item) => {
@@ -101,7 +102,7 @@ export default defineComponent({
101
102
  `${mergedClsPrefixRef.value}-chat-sidebar__item--selected`,
102
103
  isTyping && `${mergedClsPrefixRef.value}-chat-sidebar__item--typing`
103
104
  ] }, {
104
- prefix: () => (h(UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps), {
105
+ prefix: () => (h(UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps, { theme: themeRef.value.peers.Avatar, themeOverrides: themeRef.value.peerOverrides.Avatar }), {
105
106
  default: () => {
106
107
  var _a;
107
108
  return typeof item.avatar === 'function'
@@ -141,13 +142,14 @@ export default defineComponent({
141
142
  statusIconMapper[item.messageStatus] ? (h(UIcon, { size: 16, component: statusIconMapper[item.messageStatus], class: [
142
143
  `${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon`,
143
144
  `${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon--${item.messageStatus}`
144
- ] })) : null),
145
- !lastMessageIsOwn && hasUnreadIncoming && (h(UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps))))));
145
+ ], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon })) : null),
146
+ !lastMessageIsOwn && hasUnreadIncoming && (h(UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps, { theme: themeRef.value.peers.Badge, themeOverrides: themeRef.value.peerOverrides.Badge }))))));
146
147
  }
147
148
  }));
148
149
  };
149
150
  return {
150
151
  mergedClsPrefixRef,
152
+ mergedTheme: themeRef,
151
153
  renderChatItem,
152
154
  cssVars: cssVarsRef,
153
155
  themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
@@ -161,16 +163,18 @@ export default defineComponent({
161
163
  const content = (() => {
162
164
  var _a;
163
165
  if (this.loading) {
164
- return (h(UList, { loading: true }, {
166
+ return (h(UList, { loading: true, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
165
167
  default: () => Array.from({ length: this.loadingCount || 10 }).map((_, index) => (h(UListItem, { key: index, avatar: { icon: PersonOutline }, description: { text: 'Loading...' }, header: { text: 'Loading...' } })))
166
168
  }));
167
169
  }
168
170
  if ((_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.length) {
169
- return (h(UList, { showIcon: false }, {
171
+ return (h(UList, { showIcon: false, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
170
172
  default: () => { var _a; return (_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.map((item) => renderChatItem(item)); }
171
173
  }));
172
174
  }
173
- return h(UEmpty, Object.assign({}, this.emptyProps));
175
+ return (h(UFlex, { justify: "center", align: "center", vertical: true }, {
176
+ default: () => (h(UEmpty, Object.assign({}, this.emptyProps, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })))
177
+ }));
174
178
  })();
175
179
  return (h("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
176
180
  h("div", { class: `${mergedClsPrefixRef}-chat-sidebar`, style: {