@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
@@ -15,6 +15,7 @@ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
15
15
  const styles_1 = require("../styles");
16
16
  const _mixins_1 = require("../../_mixins");
17
17
  const icons_1 = require("../../_internal/icons");
18
+ const flex_1 = require("../../flex");
18
19
  const statusIconMapper = {
19
20
  [interface_1.MessageStatus.READ]: icons_1.CheckmarkDoneSharp,
20
21
  [interface_1.MessageStatus.PENDING]: icons_1.MdTime,
@@ -58,10 +59,11 @@ exports.chatListItemsProps = Object.assign(Object.assign({}, _mixins_1.useTheme.
58
59
  exports.default = (0, vue_1.defineComponent)({
59
60
  name: 'ChatListItems',
60
61
  props: exports.chatListItemsProps,
61
- emits: ['chat-select'],
62
- setup(props, { slots, emit }) {
62
+ setup(props, { slots }) {
63
+ var _a;
64
+ const UChat = (0, vue_1.inject)(interface_1.chatInjectionKey, null);
63
65
  const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
64
- 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);
65
67
  const { localeRef } = (0, _mixins_1.useLocale)('Chat');
66
68
  const cssVarsRef = (0, vue_1.computed)(() => {
67
69
  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;
@@ -92,7 +94,6 @@ exports.default = (0, vue_1.defineComponent)({
92
94
  const mergedTypingTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
93
95
  const handleChatSelect = (chatId) => {
94
96
  var _a;
95
- emit('chat-select', chatId);
96
97
  (_a = props.onChatSelect) === null || _a === void 0 ? void 0 : _a.call(props, chatId);
97
98
  };
98
99
  const renderChatItem = (item) => {
@@ -107,7 +108,7 @@ exports.default = (0, vue_1.defineComponent)({
107
108
  `${mergedClsPrefixRef.value}-chat-sidebar__item--selected`,
108
109
  isTyping && `${mergedClsPrefixRef.value}-chat-sidebar__item--typing`
109
110
  ] }, {
110
- prefix: () => ((0, vue_1.h)(avatar_1.UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps), {
111
+ prefix: () => ((0, vue_1.h)(avatar_1.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 }), {
111
112
  default: () => {
112
113
  var _a;
113
114
  return typeof item.avatar === 'function'
@@ -147,13 +148,14 @@ exports.default = (0, vue_1.defineComponent)({
147
148
  statusIconMapper[item.messageStatus] ? ((0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[item.messageStatus], class: [
148
149
  `${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon`,
149
150
  `${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon--${item.messageStatus}`
150
- ] })) : null),
151
- !lastMessageIsOwn && hasUnreadIncoming && ((0, vue_1.h)(badge_1.UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps))))));
151
+ ], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon })) : null),
152
+ !lastMessageIsOwn && hasUnreadIncoming && ((0, vue_1.h)(badge_1.UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps, { theme: themeRef.value.peers.Badge, themeOverrides: themeRef.value.peerOverrides.Badge }))))));
152
153
  }
153
154
  }));
154
155
  };
155
156
  return {
156
157
  mergedClsPrefixRef,
158
+ mergedTheme: themeRef,
157
159
  renderChatItem,
158
160
  cssVars: cssVarsRef,
159
161
  themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
@@ -167,16 +169,18 @@ exports.default = (0, vue_1.defineComponent)({
167
169
  const content = (() => {
168
170
  var _a;
169
171
  if (this.loading) {
170
- return ((0, vue_1.h)(list_1.UList, { loading: true }, {
172
+ return ((0, vue_1.h)(list_1.UList, { loading: true, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
171
173
  default: () => Array.from({ length: this.loadingCount || 10 }).map((_, index) => ((0, vue_1.h)(list_1.UListItem, { key: index, avatar: { icon: icons_1.PersonOutline }, description: { text: 'Loading...' }, header: { text: 'Loading...' } })))
172
174
  }));
173
175
  }
174
176
  if ((_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.length) {
175
- return ((0, vue_1.h)(list_1.UList, { showIcon: false }, {
177
+ return ((0, vue_1.h)(list_1.UList, { showIcon: false, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
176
178
  default: () => { var _a; return (_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.map((item) => renderChatItem(item)); }
177
179
  }));
178
180
  }
179
- return (0, vue_1.h)(empty_1.UEmpty, Object.assign({}, this.emptyProps));
181
+ return ((0, vue_1.h)(flex_1.UFlex, { justify: "center", align: "center", vertical: true }, {
182
+ default: () => ((0, vue_1.h)(empty_1.UEmpty, Object.assign({}, this.emptyProps, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })))
183
+ }));
180
184
  })();
181
185
  return ((0, vue_1.h)("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
182
186
  (0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-sidebar`, style: {