@tencentcloud/chat-uikit-react 2.2.4 → 2.2.6

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 (343) hide show
  1. package/.babelrc +2 -2
  2. package/.eslintrc.js +141 -31
  3. package/.lintstagedrc.json +1 -1
  4. package/.stylelintrc.js +17 -18
  5. package/CHANGELOG.md +19 -2
  6. package/README.md +8 -8
  7. package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
  8. package/dist/cjs/assets/fonts/iconfont.woff +0 -0
  9. package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
  10. package/dist/cjs/components/Avatar/Avatar.d.ts +4 -4
  11. package/dist/cjs/components/Checkbox/index.d.ts +2 -2
  12. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  13. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  14. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  15. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  16. package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  17. package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  18. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  19. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  20. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  21. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  22. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  23. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  24. package/dist/cjs/components/Icon/Icon.d.ts +3 -3
  25. package/dist/cjs/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  26. package/dist/cjs/components/Input/Input.d.ts +4 -4
  27. package/dist/cjs/components/Model/index.d.ts +2 -2
  28. package/dist/cjs/components/Plugins/index.d.ts +4 -4
  29. package/dist/cjs/components/Popup/index.d.ts +2 -2
  30. package/dist/cjs/components/Switch/Switch.d.ts +2 -2
  31. package/dist/cjs/components/TUIChat/TUIChat.d.ts +12 -12
  32. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  33. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
  34. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
  35. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -5
  36. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  37. package/dist/cjs/components/TUIContact/TUIContact.d.ts +3 -3
  38. package/dist/cjs/components/TUIContact/TUIContact.js +1 -1
  39. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  40. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  41. package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  42. package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  43. package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  44. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  45. package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  46. package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  47. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  48. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  49. package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
  50. package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -1
  51. package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  52. package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +2 -2
  53. package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  54. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  55. package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  56. package/dist/cjs/components/TUIManage/TUIManage.d.ts +2 -2
  57. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  58. package/dist/cjs/components/TUIMessage/MessageAudio.js +1 -1
  59. package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
  60. package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
  61. package/dist/cjs/components/TUIMessage/MessageContext.d.ts +2 -2
  62. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  63. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  64. package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
  65. package/dist/cjs/components/TUIMessage/MessagePlugins.d.ts +4 -4
  66. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  67. package/dist/cjs/components/TUIMessage/MessageProgress.js +1 -1
  68. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  69. package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
  70. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  71. package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
  72. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  73. package/dist/cjs/components/TUIMessage/TUIMessage.d.ts +19 -19
  74. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  75. package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +1 -1
  76. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  77. package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
  78. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  79. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  80. package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  81. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  82. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  83. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  84. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  85. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  86. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  87. package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  88. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  89. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  90. package/dist/cjs/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  91. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  92. package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  93. package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +3 -3
  94. package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
  95. package/dist/cjs/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  96. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  97. package/dist/cjs/components/Toast/index.d.ts +2 -2
  98. package/dist/cjs/context/ComponentContext.d.ts +12 -12
  99. package/dist/cjs/context/LanguageContext.js +1 -0
  100. package/dist/cjs/context/TUIChatActionContext.d.ts +3 -3
  101. package/dist/cjs/context/TUIChatStateContext.d.ts +5 -5
  102. package/dist/cjs/context/TUIContactContext.d.ts +4 -4
  103. package/dist/cjs/context/TUIConversationContext.js +1 -1
  104. package/dist/cjs/context/TUIMessageContext.d.ts +17 -17
  105. package/dist/cjs/context/TUIMessageInputContext.d.ts +4 -4
  106. package/dist/cjs/context/ThemeContext.js +1 -0
  107. package/dist/cjs/context/UIKitContext.d.ts +25 -0
  108. package/dist/cjs/context/UIKitContext.js +1 -0
  109. package/dist/cjs/context/UIManagerContext.d.ts +46 -0
  110. package/dist/cjs/context/UIManagerContext.js +1 -0
  111. package/dist/cjs/hooks/useConversation.d.ts +2 -2
  112. package/dist/cjs/index.css +1 -1
  113. package/dist/cjs/index.d.css +984 -1039
  114. package/dist/cjs/index.d.ts +2 -4
  115. package/dist/cjs/index.js +1 -1
  116. package/dist/cjs/locales/en-US/TUIGlobal.js +1 -0
  117. package/dist/cjs/locales/en-US/index.js +1 -1
  118. package/dist/cjs/locales/ja-JP/TUIGlobal.js +1 -0
  119. package/dist/cjs/locales/ja-JP/index.js +1 -1
  120. package/dist/cjs/locales/ko-KR/TUIGlobal.js +1 -0
  121. package/dist/cjs/locales/ko-KR/index.js +1 -1
  122. package/dist/cjs/locales/zh-CN/TUIGlobal.js +1 -0
  123. package/dist/cjs/locales/zh-CN/index.js +1 -1
  124. package/dist/esm/assets/fonts/iconfont.ttf +0 -0
  125. package/dist/esm/assets/fonts/iconfont.woff +0 -0
  126. package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
  127. package/dist/esm/components/Avatar/Avatar.d.ts +4 -4
  128. package/dist/esm/components/Checkbox/index.d.ts +2 -2
  129. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  130. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  131. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  132. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  133. package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  134. package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  135. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  136. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  137. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  138. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  139. package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  140. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  141. package/dist/esm/components/Icon/Icon.d.ts +3 -3
  142. package/dist/esm/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  143. package/dist/esm/components/Input/Input.d.ts +4 -4
  144. package/dist/esm/components/Model/index.d.ts +2 -2
  145. package/dist/esm/components/Plugins/index.d.ts +4 -4
  146. package/dist/esm/components/Popup/index.d.ts +2 -2
  147. package/dist/esm/components/Switch/Switch.d.ts +2 -2
  148. package/dist/esm/components/TUIChat/TUIChat.d.ts +12 -12
  149. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  150. package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
  151. package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
  152. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -5
  153. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  154. package/dist/esm/components/TUIContact/TUIContact.d.ts +3 -3
  155. package/dist/esm/components/TUIContact/TUIContact.js +1 -1
  156. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  157. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  158. package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  159. package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  160. package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  161. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  162. package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  163. package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  164. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  165. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  166. package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
  167. package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -1
  168. package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  169. package/dist/esm/components/TUIConversation/TUIConversation.d.ts +2 -2
  170. package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  171. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  172. package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  173. package/dist/esm/components/TUIManage/TUIManage.d.ts +2 -2
  174. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  175. package/dist/esm/components/TUIMessage/MessageAudio.js +1 -1
  176. package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
  177. package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
  178. package/dist/esm/components/TUIMessage/MessageContext.d.ts +2 -2
  179. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  180. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  181. package/dist/esm/components/TUIMessage/MessageName.js +1 -1
  182. package/dist/esm/components/TUIMessage/MessagePlugins.d.ts +4 -4
  183. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  184. package/dist/esm/components/TUIMessage/MessageProgress.js +1 -1
  185. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  186. package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
  187. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  188. package/dist/esm/components/TUIMessage/MessageText.js +1 -1
  189. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  190. package/dist/esm/components/TUIMessage/TUIMessage.d.ts +19 -19
  191. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  192. package/dist/esm/components/TUIMessage/TUIMessageDefault.js +1 -1
  193. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  194. package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
  195. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  196. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  197. package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  198. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  199. package/dist/esm/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  200. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  201. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  202. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  203. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  204. package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  205. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  206. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  207. package/dist/esm/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  208. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  209. package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  210. package/dist/esm/components/TUIProfile/TUIProfile.d.ts +3 -3
  211. package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
  212. package/dist/esm/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  213. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  214. package/dist/esm/components/Toast/index.d.ts +2 -2
  215. package/dist/esm/context/ComponentContext.d.ts +12 -12
  216. package/dist/esm/context/LanguageContext.js +1 -0
  217. package/dist/esm/context/TUIChatActionContext.d.ts +3 -3
  218. package/dist/esm/context/TUIChatStateContext.d.ts +5 -5
  219. package/dist/esm/context/TUIContactContext.d.ts +4 -4
  220. package/dist/esm/context/TUIConversationContext.js +1 -1
  221. package/dist/esm/context/TUIMessageContext.d.ts +17 -17
  222. package/dist/esm/context/TUIMessageInputContext.d.ts +4 -4
  223. package/dist/esm/context/ThemeContext.js +1 -0
  224. package/dist/esm/context/UIKitContext.d.ts +25 -0
  225. package/dist/esm/context/UIKitContext.js +1 -0
  226. package/dist/esm/context/UIManagerContext.d.ts +46 -0
  227. package/dist/esm/context/UIManagerContext.js +1 -0
  228. package/dist/esm/hooks/useConversation.d.ts +2 -2
  229. package/dist/esm/index.css +1 -1
  230. package/dist/esm/index.d.css +984 -1039
  231. package/dist/esm/index.d.ts +2 -4
  232. package/dist/esm/index.js +1 -1
  233. package/dist/esm/locales/en-US/TUIGlobal.js +1 -0
  234. package/dist/esm/locales/en-US/index.js +1 -1
  235. package/dist/esm/locales/ja-JP/TUIGlobal.js +1 -0
  236. package/dist/esm/locales/ja-JP/index.js +1 -1
  237. package/dist/esm/locales/ko-KR/TUIGlobal.js +1 -0
  238. package/dist/esm/locales/ko-KR/index.js +1 -1
  239. package/dist/esm/locales/zh-CN/TUIGlobal.js +1 -0
  240. package/dist/esm/locales/zh-CN/index.js +1 -1
  241. package/package.json +9 -7
  242. package/rollup.config.js +13 -2
  243. package/src/assets/fonts/iconfont.ttf +0 -0
  244. package/src/assets/fonts/iconfont.woff +0 -0
  245. package/src/assets/fonts/iconfont.woff2 +0 -0
  246. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +4 -4
  247. package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
  248. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +3 -2
  249. package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +16 -7
  250. package/src/components/ConversationCreate/styles/index.scss +23 -13
  251. package/src/components/ConversationPreview/ConversationPreview.tsx +21 -21
  252. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -4
  253. package/src/components/ConversationPreview/styles/index.scss +44 -14
  254. package/src/components/ConversationPreview/utils.tsx +36 -28
  255. package/src/components/Input/styles/index.scss +7 -5
  256. package/src/components/Model/styles/layout.scss +3 -3
  257. package/src/components/Plugins/styles/color.scss +17 -3
  258. package/src/components/Popup/styles/layout.scss +2 -1
  259. package/src/components/TUIChat/TUIChat.tsx +4 -3
  260. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +3 -3
  261. package/src/components/TUIChatHeader/styles/layout.scss +13 -2
  262. package/src/components/TUIContact/TUIContact.tsx +2 -2
  263. package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +2 -2
  264. package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +2 -2
  265. package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +2 -2
  266. package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +2 -2
  267. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -3
  268. package/src/components/TUIContact/TUIContactInfo/groupInfo.tsx +3 -3
  269. package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +2 -2
  270. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +5 -5
  271. package/src/components/TUIContact/hooks/useTUIContact.tsx +2 -2
  272. package/src/components/TUIContactSearch/TUIContactSearch.tsx +2 -2
  273. package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +2 -2
  274. package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
  275. package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +2 -2
  276. package/src/components/TUIConversationList/index.scss +25 -7
  277. package/src/components/TUIManage/TUIManage.tsx +3 -3
  278. package/src/components/TUIManage/styles/index.scss +16 -6
  279. package/src/components/TUIMessage/MessageStatus.tsx +2 -2
  280. package/src/components/TUIMessage/MessageText.tsx +16 -15
  281. package/src/components/TUIMessage/hooks/useMessageHandler.ts +2 -2
  282. package/src/components/TUIMessage/hooks/useMessageReply.ts +2 -2
  283. package/src/components/TUIMessage/styles/color.scss +20 -9
  284. package/src/components/TUIMessage/styles/layout.scss +44 -11
  285. package/src/components/TUIMessageInput/TUIMessageInput.tsx +1 -1
  286. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +2 -2
  287. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +2 -2
  288. package/src/components/TUIMessageInput/styles/color.scss +25 -6
  289. package/src/components/TUIMessageInput/styles/layout.scss +58 -16
  290. package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +2 -2
  291. package/src/components/TUIMessageList/styles/layout.scss +16 -2
  292. package/src/components/TUIProfile/TUIProfile.tsx +3 -3
  293. package/src/components/TUIProfile/TUIProfileDefault.tsx +2 -2
  294. package/src/components/TUIProfile/styles/layout.scss +33 -16
  295. package/src/components/index.ts +0 -1
  296. package/src/context/LanguageContext.tsx +59 -0
  297. package/src/context/ThemeContext.tsx +61 -0
  298. package/src/context/UIKitContext.tsx +67 -0
  299. package/src/context/UIManagerContext.tsx +163 -0
  300. package/src/context/index.ts +3 -2
  301. package/src/locales/en-US/index.ts +1 -1
  302. package/src/locales/ja-JP/index.ts +2 -0
  303. package/src/locales/ko-KR/TUIGlobal.ts +2 -2
  304. package/src/locales/ko-KR/index.ts +2 -0
  305. package/src/locales/zh-CN/index.ts +2 -2
  306. package/src/styles/colors/_color-dark.scss +35 -0
  307. package/src/styles/colors/_color-light.scss +35 -0
  308. package/src/styles/colors/_color-theme.scss +54 -0
  309. package/src/styles/fonts/icon-font.scss +18 -0
  310. package/src/styles/index.scss +4 -0
  311. package/src/styles/normalize.scss +355 -0
  312. package/dist/cjs/components/Icon/images/chats-selected.svg.js +0 -1
  313. package/dist/cjs/components/Icon/images/chats.svg.js +0 -1
  314. package/dist/cjs/components/Icon/images/contacts-selected.svg.js +0 -1
  315. package/dist/cjs/components/Icon/images/contacts.svg.js +0 -1
  316. package/dist/cjs/components/TUIKit/TUIKit.d.ts +0 -12
  317. package/dist/cjs/components/TUIKit/TUIKit.js +0 -1
  318. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  319. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  320. package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  321. package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +0 -1
  322. package/dist/cjs/context/TUIKitContext.d.ts +0 -25
  323. package/dist/cjs/context/TUIKitContext.js +0 -1
  324. package/dist/esm/components/Icon/images/chats-selected.svg.js +0 -1
  325. package/dist/esm/components/Icon/images/chats.svg.js +0 -1
  326. package/dist/esm/components/Icon/images/contacts-selected.svg.js +0 -1
  327. package/dist/esm/components/Icon/images/contacts.svg.js +0 -1
  328. package/dist/esm/components/TUIKit/TUIKit.d.ts +0 -12
  329. package/dist/esm/components/TUIKit/TUIKit.js +0 -1
  330. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  331. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  332. package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  333. package/dist/esm/components/TUIKit/hooks/useTUIKit.js +0 -1
  334. package/dist/esm/context/TUIKitContext.d.ts +0 -25
  335. package/dist/esm/context/TUIKitContext.js +0 -1
  336. package/src/components/TUIKit/TUIKit.tsx +0 -228
  337. package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +0 -48
  338. package/src/components/TUIKit/hooks/useTUIKit.tsx +0 -99
  339. package/src/components/TUIKit/index.ts +0 -3
  340. package/src/components/TUIKit/styles/h5.scss +0 -34
  341. package/src/components/TUIKit/styles/index.scss +0 -112
  342. package/src/components/TUIKit/styles/reset.scss +0 -67
  343. package/src/context/TUIKitContext.tsx +0 -39
@@ -1,24 +1,29 @@
1
+ @use "../../../styles/colors/color-theme" as *;
2
+
1
3
  // message input styles
2
4
  .tui-message-input {
3
5
  display: flex;
4
6
  flex-direction: column;
7
+
5
8
  &-main {
6
9
  flex: 1;
7
10
  display: flex;
8
11
  align-items: center;
9
12
  padding: 14px 12px;
10
13
  gap: 12px;
14
+
11
15
  .input-box {
12
16
  flex: 1;
13
17
  display: flex;
14
- padding: 0 8px;
15
18
  position: relative;
16
19
  min-height: 20px;
17
20
  max-height: 200px;
18
21
  border-radius: 15px;
19
22
  overflow: hidden;
20
23
  padding: 10px;
24
+
21
25
  .input-visibility-content {
26
+ min-height: 20px;
22
27
  word-break: break-all;
23
28
  visibility: hidden;
24
29
  max-width: -webkit-fill-available;
@@ -29,6 +34,7 @@
29
34
  line-height: 17px;
30
35
  padding: 1px 2px;
31
36
  }
37
+
32
38
  textarea {
33
39
  position: absolute;
34
40
  top: 0;
@@ -45,17 +51,24 @@
45
51
  resize: none;
46
52
  border: none;
47
53
  background: none;
48
- &:focus, &:active{
54
+
55
+ @include theme() {
56
+ color: get(text-primary);
57
+ }
58
+
59
+ &:focus,
60
+ &:active {
49
61
  border: none;
50
62
  outline: none;
51
63
  }
52
64
  }
53
65
  }
54
-
66
+
55
67
  .disabled {
56
68
  display: none;
57
69
  }
58
70
  }
71
+
59
72
  &-box {
60
73
  flex: 1;
61
74
  display: flex;
@@ -69,12 +82,14 @@ ul li {
69
82
 
70
83
  .input-plugin-popup {
71
84
  position: relative;
85
+
72
86
  &-box {
73
87
  position: absolute;
74
88
  z-index: 2;
75
89
  bottom: 30px;
76
90
  }
77
91
  }
92
+
78
93
  .input-plugin-item {
79
94
  font-style: normal;
80
95
  font-weight: 500;
@@ -82,12 +97,12 @@ ul li {
82
97
  font-family: PingFangSC-Medium;
83
98
  line-height: 19px;
84
99
  display: flex;
100
+
85
101
  span {
86
102
  padding: 0 17px;
87
103
  }
88
104
  }
89
105
 
90
-
91
106
  // emoji picker styles
92
107
  .emoji-picker {
93
108
  .face-list {
@@ -97,44 +112,53 @@ ul li {
97
112
  display: flex;
98
113
  flex-wrap: wrap;
99
114
  overflow-y: auto;
115
+
100
116
  &-item {
101
117
  padding: 5px;
102
118
  cursor: pointer;
119
+ user-select: none;
120
+
103
121
  img {
104
122
  width: 20px;
105
123
  }
124
+
106
125
  .face-img {
107
126
  width: 38px;
108
127
  }
109
128
  }
110
129
  }
130
+
111
131
  .face-tab {
112
132
  display: flex;
113
133
  align-items: center;
114
134
  min-width: 265px;
135
+
115
136
  &-item {
116
137
  cursor: pointer;
117
138
  width: 24px;
118
139
  padding: 10px;
140
+
119
141
  img {
120
142
  width: 100%;
121
143
  }
122
144
  }
123
145
  }
146
+
124
147
  .emoji-plugin-right {
125
148
  right: 0;
126
149
  }
127
150
  }
128
151
 
129
-
130
152
  // upload styles
131
153
  .upload-picker {
132
154
  position: relative;
133
155
  padding: 10px 16px;
134
156
  min-width: 180px;
157
+
135
158
  &:hover {
136
159
  color: #147aff;
137
160
  }
161
+
138
162
  input {
139
163
  position: absolute;
140
164
  cursor: pointer;
@@ -148,12 +172,13 @@ ul li {
148
172
 
149
173
  .input-quote {
150
174
  padding: 7px 16px;
151
- background: #F9F9F9;
175
+ background: #f9f9f9;
152
176
  display: flex;
153
177
  align-items: center;
178
+
154
179
  &-content {
155
180
  flex: 1;
156
- background: #FFFFFF;
181
+ background: #fff;
157
182
  padding: 2px 14px;
158
183
  position: relative;
159
184
  display: flex;
@@ -162,21 +187,24 @@ ul li {
162
187
  font-size: 14px;
163
188
  font-family: PingFangSC-Medium;
164
189
  line-height: 17px;
165
- color: #000000;
190
+ color: #000;
191
+
166
192
  &::before {
167
193
  content: "";
168
194
  position: absolute;
169
195
  width: 6px;
170
196
  height: 100%;
171
- background: #999999;
197
+ background: #999;
172
198
  top: 0;
173
199
  left: 0;
174
200
  }
201
+
175
202
  span {
176
203
  padding-top: 8px;
177
204
  opacity: 0.6;
178
205
  }
179
206
  }
207
+
180
208
  .icon {
181
209
  margin: 0 5px 0 16px;
182
210
  }
@@ -184,18 +212,20 @@ ul li {
184
212
 
185
213
  // TUIForward
186
214
  .tui-forward {
187
- background: #FFFFFF;
215
+ background: #fff;
188
216
  border-radius: 16px;
189
217
  display: flex;
190
218
  flex-direction: column;
191
219
  overflow: hidden;
192
220
  width: 300px;
193
221
  max-height: 90%;
222
+
194
223
  &-header {
195
224
  display: flex;
196
225
  align-items: center;
197
226
  padding: 24px 20px;
198
227
  }
228
+
199
229
  &-title {
200
230
  padding: 0 16px;
201
231
  font-family: PingFangSC-Medium;
@@ -204,10 +234,12 @@ ul li {
204
234
  font-size: 14px;
205
235
  line-height: 17px;
206
236
  }
237
+
207
238
  &-main {
208
239
  padding: 0 20px;
209
240
  max-height: calc(100vh - 200px);
210
241
  overflow-y: auto;
242
+
211
243
  .no-result {
212
244
  font-family: PingFangSC-Medium;
213
245
  font-size: 14px;
@@ -215,14 +247,17 @@ ul li {
215
247
  line-height: 20px;
216
248
  padding: 10px;
217
249
  text-align: center;
218
- color: #999999;
250
+ color: #999;
219
251
  }
220
252
  }
253
+
221
254
  &-search {
222
255
  padding: 10px 15px;
223
256
  }
257
+
224
258
  &-list {
225
259
  padding: 13px 0;
260
+
226
261
  &-title {
227
262
  font-family: PingFangSC-Medium;
228
263
  font-style: normal;
@@ -230,6 +265,7 @@ ul li {
230
265
  font-size: 14px;
231
266
  line-height: 20px;
232
267
  }
268
+
233
269
  &-item {
234
270
  padding: 6px 0;
235
271
  font-family: PingFangSC-Medium;
@@ -241,11 +277,13 @@ ul li {
241
277
  justify-content: space-between;
242
278
  align-items: center;
243
279
  width: 100%;
280
+
244
281
  .info {
245
282
  display: flex;
246
283
  align-items: center;
247
284
  flex-shrink: 0;
248
285
  width: 100%;
286
+
249
287
  &-nick {
250
288
  padding: 0 13px;
251
289
  font-family: PingFangSC-Medium;
@@ -263,15 +301,17 @@ ul li {
263
301
  }
264
302
  }
265
303
  }
304
+
266
305
  &-footer {
267
- background: rgba(249, 249, 249, 0.94);
306
+ background: rgba(249, 249, 249, 94%);
268
307
  padding: 13px 10px;
269
308
  display: flex;
270
309
  justify-content: space-between;
271
310
  align-items: center;
311
+
272
312
  .button {
273
313
  cursor: pointer;
274
- background: #0365F9;
314
+ background: #0365f9;
275
315
  border-radius: 31px;
276
316
  padding: 10px 21px;
277
317
  font-family: PingFangSC-Medium;
@@ -279,12 +319,13 @@ ul li {
279
319
  font-weight: 400;
280
320
  font-size: 14px;
281
321
  line-height: 20px;
282
- color: #FFFFFF;
322
+ color: #fff;
283
323
  border: none;
284
324
  }
325
+
285
326
  &-name {
286
327
  flex: 1;
287
- overflow : hidden;
328
+ overflow: hidden;
288
329
  word-break: break-all;
289
330
  text-overflow: ellipsis;
290
331
  display: -webkit-box;
@@ -296,7 +337,8 @@ ul li {
296
337
 
297
338
  .transmitter {
298
339
  padding: 0 10px;
340
+
299
341
  .icon-send {
300
342
  transform: rotate(90deg);
301
343
  }
302
- }
344
+ }
@@ -2,7 +2,7 @@ import React, {
2
2
  PropsWithChildren, useMemo,
3
3
  } from 'react';
4
4
  import { Message } from '@tencentcloud/chat';
5
- import { UnknowPorps, useTUIKitContext } from '../../../context';
5
+ import { UnknowPorps, useUIKit } from '../../../context';
6
6
  import { TUIMessageProps } from '../../TUIMessage/TUIMessage';
7
7
  import { getTimeStamp } from '../../untils';
8
8
 
@@ -20,7 +20,7 @@ function useMessageListElement <T extends MessageListElementProps>(
20
20
  TUIMessage,
21
21
  intervalsTimer,
22
22
  } = props;
23
- const { language } = useTUIKitContext('TUIConversation');
23
+ const { language } = useUIKit('TUIConversation');
24
24
 
25
25
  return useMemo(() => enrichedMessageList?.map((item: Message, index:number) => {
26
26
  const key = `${item.ID}-${index}`;
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/colors/color-theme" as *;
2
+
1
3
  ul,li,div,p,label,span {
2
4
  margin: 0;
3
5
  padding: 0;
@@ -12,6 +14,11 @@ ul li {
12
14
  overflow-y: auto;
13
15
  position: relative;
14
16
  padding: 0 20px;
17
+
18
+ @include theme() {
19
+ background-color: get(bg-primary);
20
+ }
21
+
15
22
  &.hide {
16
23
  opacity: 0;
17
24
  }
@@ -26,15 +33,22 @@ ul li {
26
33
  font-style: normal;
27
34
  font-weight: 500;
28
35
  line-height: 17px;
29
- color: #999999;
36
+
37
+ @include theme() {
38
+ color: get(text-secondary);
39
+ }
40
+
30
41
  }
31
42
  &-time {
32
- color: #7a7a7a;
33
43
  font-family: PingFangSC-Medium;
34
44
  font-size: 12px;
35
45
  font-weight: 400;
36
46
  line-height: 14px;
37
47
  padding: 10px;
38
48
  text-align: center;
49
+
50
+ @include theme() {
51
+ color: get(text-secondary);
52
+ }
39
53
  }
40
54
  }
@@ -4,7 +4,7 @@ import { Profile } from '../Profile';
4
4
  import './styles/index.scss';
5
5
  import { useMyProfile } from './hooks';
6
6
  import { TUIProfileDefault } from './TUIProfileDefault';
7
- import { useTUIKitContext } from '../../context';
7
+ import { useUIManager } from '../../context';
8
8
 
9
9
  interface TUIProfileProps {
10
10
  className?: string,
@@ -21,13 +21,13 @@ function UnMemoizedTUIProfile<T extends TUIProfileProps>(
21
21
 
22
22
  const { myProfile, updateMyProfile } = useMyProfile();
23
23
 
24
- const { setTUIProfileShow, TUIProfileShow } = useTUIKitContext('TUIProfile');
24
+ const { setTUIProfileShow, TUIProfileShow } = useUIManager('TUIProfile');
25
25
 
26
26
  const TUIProfileUIComponent = PropTUIProfile || TUIProfileDefault;
27
27
 
28
28
  return (
29
29
  <>
30
- {/* //eslint-disable-next-line
30
+ {/* //eslint-disable-next-line
31
31
  @ts-ignore */}
32
32
  <Profile
33
33
  profile={myProfile}
@@ -4,7 +4,7 @@ import DatePicker from 'react-date-picker';
4
4
  import TencentCloudChat, { Profile } from '@tencentcloud/chat';
5
5
  import { UpdateMyProfileParams } from "@tencentcloud/chat-uikit-engine";
6
6
  import { isH5 } from '../../utils/env';
7
- import { useTUIKitContext } from '../../context';
7
+ import { useUIManager } from '../../context';
8
8
 
9
9
  import { Avatar } from '../Avatar';
10
10
  import { DivWithEdit } from '../DivWithEdit';
@@ -73,7 +73,7 @@ function TUIProfileDefaultWithContext<T extends TUIProfileDefaultProps>(
73
73
  } = props;
74
74
 
75
75
  const { t } = useTranslation();
76
- const { setTUIProfileShow } = useTUIKitContext('TUIProfileDefault');
76
+ const { setTUIProfileShow } = useUIManager('TUIProfileDefault');
77
77
 
78
78
  const [isEditName, setIsEditName] = useState('');
79
79
 
@@ -2,99 +2,116 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
5
- width: 30%;
6
- max-width: 360px;
7
- min-width: 360px;
8
- height: 100%;
5
+
9
6
  &-header {
10
7
  box-sizing: border-box;
11
8
  width: 100%;
12
- padding: 16px 20px;
9
+ padding: 15px;
13
10
  display: flex;
14
11
  align-items: center;
15
- line-height: 32px;
12
+
16
13
  h1 {
14
+ font-size: 16px;
17
15
  font-weight: 600;
18
16
  padding: 0 11px;
19
17
  }
20
18
  }
19
+
21
20
  &-main {
22
21
  max-width: 100%;
23
22
  box-sizing: border-box;
24
- padding: 20px;
23
+ padding: 10px 10px 0;
25
24
  display: flex;
26
25
  flex-direction: column;
27
26
  align-items: center;
28
27
  }
28
+
29
29
  &-avatar {
30
30
  margin: 13px 0;
31
31
  position: relative;
32
32
  }
33
+
33
34
  .displayFlex {
34
35
  display: flex;
35
36
  }
37
+
36
38
  &-nick {
37
39
  font-weight: 700;
38
40
  font-size: 24px;
39
41
  font-family: PingFangSC-Medium;
40
42
  line-height: 29px;
41
43
  text-align: center;
44
+
42
45
  .show {
43
46
  padding-left: 25px;
44
47
  }
45
48
  }
46
- &-ID{
49
+
50
+ &-ID {
47
51
  padding: 6px 0;
52
+ margin: 0;
48
53
  display: flex;
49
54
  align-items: center;
50
55
  font-weight: 400;
51
56
  font-size: 12px;
52
57
  font-family: PingFangSC-Medium;
53
58
  line-height: 14px;
54
- color: #666666;
59
+ color: #666;
60
+
61
+ h5 {
62
+ margin: 0;
63
+ }
55
64
  }
65
+
56
66
  &-list {
57
67
  box-sizing: border-box;
58
68
  width: 100%;
59
- padding: 0 20px;
69
+ padding: 0 15px;
60
70
  display: flex;
61
71
  flex-direction: column;
62
72
  user-select: none;
73
+
63
74
  &-item {
64
- padding: 20px 0 0;
75
+ padding: 0;
65
76
  cursor: pointer;
77
+
66
78
  h4 {
67
79
  padding-bottom: 3px;
68
80
  font-weight: 400;
69
81
  font-size: 16px;
70
82
  font-family: PingFangSC-Medium;
71
83
  line-height: 22px;
72
- color: rgba(0, 0, 0, 0.6);
84
+ margin: 10px 0;
85
+ color: rgba(0, 0, 0, 60%);
73
86
  }
74
87
  }
75
88
  }
89
+
76
90
  &-div-with-edit {
77
91
  padding: 4px 0;
78
- border-bottom: 1px solid #EEEEEE;
92
+ border-bottom: 1px solid #eee;
79
93
  }
94
+
80
95
  &-edit {
81
96
  border-bottom: none !important;
82
97
  }
83
98
  }
84
99
 
85
100
  .tui-profile-birthday {
86
- .react-date-picker__wrapper{
101
+ .react-date-picker__wrapper {
87
102
  display: none !important;
88
103
  }
104
+
89
105
  .react-date-picker__calendar {
90
106
  position: static !important;
107
+
91
108
  .react-calendar__navigation {
92
109
  height: 20px !important;
93
- margin-bottom: 0px;
110
+ margin-bottom: 0;
94
111
  }
95
112
  }
113
+
96
114
  &-calendar {
97
115
  border: none !important;
98
116
  }
99
117
  }
100
-
@@ -1,4 +1,3 @@
1
- export * from './TUIKit';
2
1
  export * from './TUIConversation';
3
2
  export * from './TUIConversationList';
4
3
  export * from './TUIChat';
@@ -0,0 +1,59 @@
1
+ import {
2
+ useState,
3
+ useContext,
4
+ createContext,
5
+ useLayoutEffect,
6
+ PropsWithChildren,
7
+ } from 'react';
8
+ import { useTranslation } from 'react-i18next';
9
+
10
+ interface LanguageContextType {
11
+ language: string;
12
+ setLanguage: React.Dispatch<React.SetStateAction<string>>;
13
+ }
14
+
15
+ interface LanguageProviderProps {
16
+ language: string;
17
+ }
18
+
19
+ const LanguageContext = createContext<LanguageContextType | null>(null);
20
+
21
+ function LanguageProvider(props: PropsWithChildren<Partial<LanguageProviderProps>>) {
22
+ const {
23
+ language: _language = 'en-US',
24
+ children,
25
+ } = props;
26
+
27
+ const { i18n } = useTranslation();
28
+
29
+ const [language, setLanguage] = useState(_language);
30
+
31
+ useLayoutEffect(() => {
32
+ i18n.changeLanguage(language);
33
+ }, [language, i18n]);
34
+
35
+ useLayoutEffect(() => {
36
+ document.documentElement.lang = language;
37
+ }, [language]);
38
+
39
+ const value = {
40
+ language,
41
+ setLanguage,
42
+ };
43
+
44
+ return (
45
+ <LanguageContext.Provider value={value}>
46
+ {children}
47
+ </LanguageContext.Provider>
48
+ );
49
+ }
50
+
51
+ function useLanguage() {
52
+ const context = useContext(LanguageContext);
53
+ if (!context) {
54
+ throw new Error('useLanguage must be used within a LanguageProvider');
55
+ }
56
+ return context;
57
+ }
58
+
59
+ export { LanguageProvider, useLanguage, LanguageContextType };
@@ -0,0 +1,61 @@
1
+ import {
2
+ useState,
3
+ useContext,
4
+ createContext,
5
+ useLayoutEffect,
6
+ PropsWithChildren,
7
+ } from 'react';
8
+
9
+ import '../styles/index.scss';
10
+
11
+ interface ThemeContextType {
12
+ theme: string;
13
+ colors: Record<string, string> | undefined;
14
+ setTheme: (theme: string) => void;
15
+ setColors: (colors: Record<string, string>) => void;
16
+ }
17
+
18
+ interface ThemeProviderProps {
19
+ theme: string;
20
+ colors: Record<string, string> | undefined;
21
+ }
22
+
23
+ const ThemeContext = createContext<ThemeContextType | null>(null);
24
+
25
+ function ThemeProvider(props: PropsWithChildren<Partial<ThemeProviderProps>>) {
26
+ const {
27
+ theme: _theme = 'light',
28
+ colors: _colors,
29
+ children,
30
+ } = props;
31
+
32
+ const [theme, setTheme] = useState(_theme);
33
+ const [colors, setColors] = useState(_colors);
34
+
35
+ useLayoutEffect(() => {
36
+ document.documentElement.dataset.uikitTheme = theme;
37
+ }, [theme]);
38
+
39
+ const value = {
40
+ theme,
41
+ colors,
42
+ setTheme,
43
+ setColors,
44
+ };
45
+
46
+ return (
47
+ <ThemeContext.Provider value={value}>
48
+ {children}
49
+ </ThemeContext.Provider>
50
+ );
51
+ }
52
+
53
+ function useTheme() {
54
+ const context = useContext(ThemeContext);
55
+ if (!context) {
56
+ throw new Error('useTheme must be used within a ThemeProvider');
57
+ }
58
+ return context;
59
+ }
60
+
61
+ export { ThemeProvider, useTheme, ThemeContextType };