naive-ui 2.33.4 → 2.34.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 (492) hide show
  1. package/dist/index.js +3517 -6061
  2. package/dist/index.prod.js +2 -2
  3. package/es/_internal/clear/src/styles/index.cssr.js +2 -2
  4. package/es/_internal/close/src/styles/index.cssr.js +2 -2
  5. package/es/_internal/index.d.ts +1 -0
  6. package/es/_internal/loading/index.d.ts +1 -0
  7. package/es/_internal/loading/src/Loading.d.ts +26 -14
  8. package/es/_internal/loading/src/Loading.js +17 -20
  9. package/es/_internal/scrollbar/src/styles/index.cssr.js +2 -2
  10. package/es/_internal/select-menu/src/styles/index.cssr.js +2 -2
  11. package/es/_internal/selection/src/Selection.js +5 -5
  12. package/es/_internal/selection/src/styles/index.cssr.js +2 -2
  13. package/es/_internal/slot-machine/src/styles/index.cssr.js +4 -3
  14. package/es/_styles/global/index.cssr.js +2 -2
  15. package/es/alert/src/styles/index.cssr.js +2 -2
  16. package/es/anchor/src/styles/index.cssr.js +2 -2
  17. package/es/auto-complete/src/styles/index.cssr.js +2 -2
  18. package/es/avatar/src/Avatar.d.ts +4 -1
  19. package/es/avatar/src/Avatar.js +12 -13
  20. package/es/avatar/src/styles/index.cssr.js +2 -2
  21. package/es/avatar-group/index.d.ts +1 -1
  22. package/es/avatar-group/src/AvatarGroup.d.ts +7 -7
  23. package/es/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -2
  24. package/es/avatar-group/src/styles/avatar-group.cssr.js +2 -2
  25. package/es/back-top/src/styles/index.cssr.js +2 -2
  26. package/es/badge/src/styles/index.cssr.js +2 -2
  27. package/es/breadcrumb/src/styles/index.cssr.js +2 -2
  28. package/es/button/src/Button.d.ts +4 -1
  29. package/es/button/src/Button.js +3 -3
  30. package/es/button/src/styles/index.cssr.js +2 -2
  31. package/es/button-group/src/styles/index.cssr.js +0 -3
  32. package/es/button-group/src/styles/rtl.cssr.js +0 -2
  33. package/es/calendar/src/styles/index.cssr.js +2 -2
  34. package/es/card/src/styles/index.cssr.js +4 -3
  35. package/es/carousel/src/styles/index.cssr.js +2 -2
  36. package/es/cascader/src/Cascader.d.ts +8 -0
  37. package/es/cascader/src/Cascader.js +41 -2
  38. package/es/cascader/src/CascaderOption.d.ts +1 -1
  39. package/es/cascader/src/CascaderOption.js +1 -7
  40. package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
  41. package/es/cascader/src/CascaderSelectMenu.js +8 -4
  42. package/es/cascader/src/interface.d.ts +11 -1
  43. package/es/cascader/src/styles/index.cssr.js +2 -2
  44. package/es/checkbox/src/styles/index.cssr.js +8 -5
  45. package/es/code/src/Code.d.ts +1 -1
  46. package/es/code/src/styles/index.cssr.js +2 -2
  47. package/es/collapse/src/styles/index.cssr.js +2 -2
  48. package/es/color-picker/src/ColorPicker.d.ts +5 -5
  49. package/es/color-picker/src/ColorPicker.js +7 -1
  50. package/es/color-picker/src/styles/index.cssr.js +2 -2
  51. package/es/color-picker/src/utils.d.ts +1 -1
  52. package/es/components.d.ts +1 -0
  53. package/es/components.js +1 -0
  54. package/es/config-provider/src/ConfigProvider.d.ts +6 -0
  55. package/es/config-provider/src/ConfigProvider.js +7 -0
  56. package/es/config-provider/src/internal-interface.d.ts +4 -0
  57. package/es/data-table/src/DataTable.d.ts +11 -0
  58. package/es/data-table/src/DataTable.js +7 -3
  59. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  60. package/es/data-table/src/TableParts/Body.js +14 -6
  61. package/es/data-table/src/TableParts/Header.js +7 -5
  62. package/es/data-table/src/interface.d.ts +10 -2
  63. package/es/data-table/src/interface.js +1 -1
  64. package/es/data-table/src/styles/index.cssr.js +21 -9
  65. package/es/date-picker/src/DatePicker.js +5 -0
  66. package/es/date-picker/src/panel/panelHeader.d.ts +6 -6
  67. package/es/date-picker/src/styles/index.cssr.js +2 -2
  68. package/es/descriptions/src/styles/index.cssr.js +2 -2
  69. package/es/dialog/src/DialogEnvironment.d.ts +3 -0
  70. package/es/dialog/src/DialogEnvironment.js +2 -2
  71. package/es/dialog/src/DialogProvider.d.ts +3 -0
  72. package/es/dialog/src/styles/index.cssr.js +2 -2
  73. package/es/divider/src/styles/index.cssr.js +2 -2
  74. package/es/drawer/src/styles/index.cssr.js +2 -2
  75. package/es/dropdown/src/styles/index.cssr.js +2 -2
  76. package/es/dynamic-input/src/styles/index.cssr.js +2 -2
  77. package/es/dynamic-tags/src/styles/index.cssr.js +2 -2
  78. package/es/empty/src/styles/index.cssr.js +2 -2
  79. package/es/equation/index.d.ts +1 -0
  80. package/es/equation/index.js +1 -0
  81. package/es/equation/src/Equation.d.ts +18 -0
  82. package/es/equation/src/Equation.js +29 -0
  83. package/es/equation/styles/dark.d.ts +3 -0
  84. package/es/equation/styles/dark.js +8 -0
  85. package/es/equation/styles/index.d.ts +3 -0
  86. package/es/equation/styles/index.js +2 -0
  87. package/es/equation/styles/light.d.ts +6 -0
  88. package/es/equation/styles/light.js +8 -0
  89. package/es/form/src/FormItem.d.ts +3 -2
  90. package/es/form/src/FormItem.js +24 -7
  91. package/es/form/src/styles/form-item.cssr.js +5 -3
  92. package/es/gradient-text/src/styles/index.cssr.js +2 -2
  93. package/es/icon/src/styles/index.cssr.js +2 -2
  94. package/es/icon-wrapper/src/styles/index.cssr.js +2 -2
  95. package/es/image/src/Image.d.ts +4 -1
  96. package/es/image/src/Image.js +13 -7
  97. package/es/image/src/ImagePreview.d.ts +3 -2
  98. package/es/image/src/ImagePreview.js +41 -8
  99. package/es/image/src/interface.d.ts +5 -0
  100. package/es/image/src/interface.js +2 -0
  101. package/es/image/src/styles/index.cssr.js +2 -2
  102. package/es/input/src/Input.d.ts +3 -0
  103. package/es/input/src/Input.js +25 -6
  104. package/es/input/src/WordCount.js +2 -2
  105. package/es/input/src/interface.d.ts +1 -0
  106. package/es/input/src/styles/input-group-label.cssr.js +2 -2
  107. package/es/input/src/styles/input.cssr.js +11 -7
  108. package/es/layout/src/styles/layout-footer.cssr.js +2 -2
  109. package/es/layout/src/styles/layout-header.cssr.js +2 -2
  110. package/es/layout/src/styles/layout-sider.cssr.js +2 -2
  111. package/es/layout/src/styles/layout.cssr.js +2 -2
  112. package/es/list/src/styles/index.cssr.js +2 -2
  113. package/es/loading-bar/src/styles/index.cssr.js +2 -2
  114. package/es/locales/common/arDZ.d.ts +3 -0
  115. package/es/locales/common/arDZ.js +120 -0
  116. package/es/locales/common/deDE.js +2 -1
  117. package/es/locales/common/enGB.js +2 -1
  118. package/es/locales/common/enUS.d.ts +1 -0
  119. package/es/locales/common/enUS.js +2 -1
  120. package/es/locales/common/eo.js +2 -1
  121. package/es/locales/common/esAR.js +2 -1
  122. package/es/locales/common/frFR.js +2 -1
  123. package/es/locales/common/idID.js +2 -1
  124. package/es/locales/common/itIT.js +2 -1
  125. package/es/locales/common/jaJP.js +2 -1
  126. package/es/locales/common/koKR.js +2 -1
  127. package/es/locales/common/nbNO.js +2 -1
  128. package/es/locales/common/nlNL.js +2 -1
  129. package/es/locales/common/plPL.js +2 -1
  130. package/es/locales/common/ptBR.js +2 -1
  131. package/es/locales/common/ruRU.js +2 -1
  132. package/es/locales/common/skSK.js +2 -1
  133. package/es/locales/common/thTH.js +2 -1
  134. package/es/locales/common/trTR.d.ts +3 -0
  135. package/es/locales/common/trTR.js +121 -0
  136. package/es/locales/common/ukUA.js +2 -1
  137. package/es/locales/common/viVN.js +2 -1
  138. package/es/locales/common/zhCN.js +2 -1
  139. package/es/locales/common/zhTW.js +2 -1
  140. package/es/locales/date/arDZ.d.ts +3 -0
  141. package/es/locales/date/arDZ.js +6 -0
  142. package/es/locales/date/trTR.d.ts +3 -0
  143. package/es/locales/date/trTR.js +6 -0
  144. package/es/locales/index.d.ts +4 -0
  145. package/es/locales/index.js +4 -0
  146. package/es/log/src/styles/index.cssr.js +2 -2
  147. package/es/mention/src/Mention.d.ts +6 -0
  148. package/es/mention/src/Mention.js +6 -1
  149. package/es/mention/src/styles/index.cssr.js +2 -2
  150. package/es/menu/src/styles/index.cssr.js +2 -3
  151. package/es/message/src/styles/index.cssr.js +2 -2
  152. package/es/modal/src/BodyWrapper.d.ts +1 -1
  153. package/es/modal/src/styles/index.cssr.js +2 -2
  154. package/es/notification/src/styles/index.cssr.js +2 -3
  155. package/es/page-header/src/styles/index.cssr.js +2 -2
  156. package/es/pagination/src/Pagination.js +1 -1
  157. package/es/pagination/src/styles/index.cssr.js +2 -2
  158. package/es/popconfirm/src/styles/index.cssr.js +2 -2
  159. package/es/popover/src/styles/index.cssr.js +5 -5
  160. package/es/popselect/src/styles/index.cssr.js +2 -2
  161. package/es/progress/src/styles/index.cssr.js +2 -2
  162. package/es/radio/src/styles/radio-group.cssr.js +2 -2
  163. package/es/radio/src/styles/radio.cssr.js +2 -2
  164. package/es/rate/src/styles/index.cssr.js +2 -2
  165. package/es/result/src/styles/index.cssr.js +2 -2
  166. package/es/select/src/Select.js +1 -0
  167. package/es/select/src/styles/index.cssr.js +2 -2
  168. package/es/skeleton/src/styles/index.cssr.js +2 -2
  169. package/es/slider/src/styles/index.cssr.js +2 -2
  170. package/es/spin/src/styles/index.cssr.js +2 -2
  171. package/es/statistic/src/styles/index.cssr.js +2 -2
  172. package/es/steps/src/styles/index.cssr.js +2 -2
  173. package/es/switch/src/styles/index.cssr.js +2 -2
  174. package/es/table/src/styles/index.cssr.js +2 -2
  175. package/es/tabs/src/Tabs.d.ts +7 -7
  176. package/es/tabs/src/styles/index.cssr.js +2 -2
  177. package/es/tag/src/styles/index.cssr.js +2 -2
  178. package/es/themes/dark.js +2 -0
  179. package/es/themes/light.js +2 -0
  180. package/es/thing/src/styles/index.cssr.js +2 -2
  181. package/es/time-picker/src/styles/index.cssr.js +2 -2
  182. package/es/timeline/src/styles/index.cssr.js +6 -3
  183. package/es/transfer/src/Transfer.d.ts +13 -0
  184. package/es/transfer/src/Transfer.js +6 -2
  185. package/es/transfer/src/TransferListItem.d.ts +2 -1
  186. package/es/transfer/src/TransferListItem.js +5 -4
  187. package/es/transfer/src/interface.d.ts +1 -0
  188. package/es/transfer/src/styles/index.cssr.js +2 -2
  189. package/es/transfer/src/use-transfer-data.d.ts +1 -0
  190. package/es/transfer/src/use-transfer-data.js +13 -4
  191. package/es/tree/src/Tree.d.ts +60 -30
  192. package/es/tree/src/Tree.js +70 -24
  193. package/es/tree/src/TreeNode.d.ts +1 -1
  194. package/es/tree/src/TreeNode.js +1 -1
  195. package/es/tree/src/TreeNodeSwitcher.d.ts +3 -0
  196. package/es/tree/src/TreeNodeSwitcher.js +7 -5
  197. package/es/tree/src/interface.d.ts +12 -1
  198. package/es/tree/src/styles/index.cssr.js +3 -2
  199. package/es/tree/src/utils.d.ts +6 -0
  200. package/es/tree/src/utils.js +4 -0
  201. package/es/tree-select/index.d.ts +1 -1
  202. package/es/tree-select/src/TreeSelect.d.ts +38 -19
  203. package/es/tree-select/src/TreeSelect.js +75 -48
  204. package/es/tree-select/src/interface.d.ts +33 -2
  205. package/es/tree-select/src/styles/index.cssr.js +2 -2
  206. package/es/typography/src/styles/a.cssr.js +2 -2
  207. package/es/typography/src/styles/blockquote.cssr.js +2 -2
  208. package/es/typography/src/styles/header.cssr.js +2 -2
  209. package/es/typography/src/styles/hr.cssr.js +2 -2
  210. package/es/typography/src/styles/list.cssr.js +2 -2
  211. package/es/typography/src/styles/p.cssr.js +2 -2
  212. package/es/typography/src/styles/text.cssr.js +2 -2
  213. package/es/upload/index.d.ts +1 -1
  214. package/es/upload/src/Upload.d.ts +77 -1
  215. package/es/upload/src/Upload.js +28 -11
  216. package/es/upload/src/UploadFile.d.ts +2 -0
  217. package/es/upload/src/UploadFile.js +9 -10
  218. package/es/upload/src/interface.d.ts +7 -3
  219. package/es/upload/src/utils.d.ts +2 -2
  220. package/es/upload/src/utils.js +2 -1
  221. package/es/version.d.ts +1 -1
  222. package/es/version.js +1 -1
  223. package/lib/_internal/clear/src/styles/index.cssr.js +2 -5
  224. package/lib/_internal/close/src/styles/index.cssr.js +2 -4
  225. package/lib/_internal/icon/src/styles/index.cssr.js +0 -2
  226. package/lib/_internal/index.d.ts +1 -0
  227. package/lib/_internal/loading/index.d.ts +1 -0
  228. package/lib/_internal/loading/src/Loading.d.ts +26 -14
  229. package/lib/_internal/loading/src/Loading.js +17 -20
  230. package/lib/_internal/loading/src/styles/index.cssr.js +0 -3
  231. package/lib/_internal/menu-mask/src/styles/index.cssr.js +0 -3
  232. package/lib/_internal/scrollbar/src/styles/index.cssr.js +2 -5
  233. package/lib/_internal/scrollbar/src/styles/rtl.cssr.js +0 -2
  234. package/lib/_internal/select-menu/src/styles/index.cssr.js +2 -5
  235. package/lib/_internal/selection/src/Selection.js +5 -5
  236. package/lib/_internal/selection/src/styles/index.cssr.js +2 -4
  237. package/lib/_internal/slot-machine/src/styles/index.cssr.js +4 -7
  238. package/lib/_internal/wave/src/styles/index.cssr.js +0 -2
  239. package/lib/_styles/global/index.cssr.js +2 -6
  240. package/lib/_styles/transitions/fade-down.cssr.js +0 -6
  241. package/lib/_styles/transitions/fade-in-height-expand.cssr.js +0 -6
  242. package/lib/_styles/transitions/fade-in-scale-up.cssr.js +0 -6
  243. package/lib/_styles/transitions/fade-in-width-expand.cssr.js +0 -6
  244. package/lib/_styles/transitions/fade-in.cssr.js +0 -6
  245. package/lib/_styles/transitions/fade-up-width-expand.cssr.js +0 -6
  246. package/lib/_styles/transitions/icon-switch.cssr.js +0 -6
  247. package/lib/affix/src/styles/index.cssr.js +0 -2
  248. package/lib/alert/src/styles/index.cssr.js +2 -5
  249. package/lib/alert/src/styles/rtl.cssr.js +0 -2
  250. package/lib/anchor/src/styles/index.cssr.js +2 -4
  251. package/lib/auto-complete/src/styles/index.cssr.js +2 -5
  252. package/lib/avatar/src/Avatar.d.ts +4 -1
  253. package/lib/avatar/src/Avatar.js +12 -13
  254. package/lib/avatar/src/styles/index.cssr.js +2 -4
  255. package/lib/avatar-group/index.d.ts +1 -1
  256. package/lib/avatar-group/src/AvatarGroup.d.ts +7 -7
  257. package/lib/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -4
  258. package/lib/avatar-group/src/styles/avatar-group.cssr.js +2 -4
  259. package/lib/back-top/src/styles/index.cssr.js +2 -5
  260. package/lib/badge/src/styles/index.cssr.js +2 -5
  261. package/lib/badge/src/styles/rtl.cssr.js +0 -2
  262. package/lib/breadcrumb/src/styles/index.cssr.js +2 -4
  263. package/lib/button/src/Button.d.ts +4 -1
  264. package/lib/button/src/Button.js +3 -3
  265. package/lib/button/src/styles/index.cssr.js +2 -7
  266. package/lib/button/src/styles/rtl.cssr.js +0 -2
  267. package/lib/button-group/src/styles/index.cssr.js +0 -5
  268. package/lib/button-group/src/styles/rtl.cssr.js +0 -4
  269. package/lib/calendar/src/styles/index.cssr.js +2 -4
  270. package/lib/card/src/styles/index.cssr.js +4 -5
  271. package/lib/card/src/styles/rtl.cssr.js +0 -2
  272. package/lib/carousel/src/styles/index.cssr.js +2 -4
  273. package/lib/cascader/src/Cascader.d.ts +8 -0
  274. package/lib/cascader/src/Cascader.js +41 -2
  275. package/lib/cascader/src/CascaderOption.d.ts +1 -1
  276. package/lib/cascader/src/CascaderOption.js +1 -7
  277. package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
  278. package/lib/cascader/src/CascaderSelectMenu.js +8 -4
  279. package/lib/cascader/src/interface.d.ts +11 -1
  280. package/lib/cascader/src/styles/index.cssr.js +2 -5
  281. package/lib/checkbox/src/styles/index.cssr.js +8 -8
  282. package/lib/checkbox/src/styles/rtl.cssr.js +0 -2
  283. package/lib/code/src/Code.d.ts +1 -1
  284. package/lib/code/src/styles/index.cssr.js +2 -4
  285. package/lib/collapse/src/styles/index.cssr.js +2 -5
  286. package/lib/collapse/src/styles/rtl.cssr.js +0 -2
  287. package/lib/collapse-transition/src/styles/index.cssr.js +0 -3
  288. package/lib/collapse-transition/src/styles/rtl.cssr.js +0 -2
  289. package/lib/color-picker/src/ColorPicker.d.ts +5 -5
  290. package/lib/color-picker/src/ColorPicker.js +7 -1
  291. package/lib/color-picker/src/styles/index.cssr.js +2 -5
  292. package/lib/color-picker/src/utils.d.ts +1 -1
  293. package/lib/components.d.ts +1 -0
  294. package/lib/components.js +1 -0
  295. package/lib/config-provider/src/ConfigProvider.d.ts +6 -0
  296. package/lib/config-provider/src/ConfigProvider.js +7 -0
  297. package/lib/config-provider/src/internal-interface.d.ts +4 -0
  298. package/lib/data-table/src/DataTable.d.ts +11 -0
  299. package/lib/data-table/src/DataTable.js +6 -2
  300. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  301. package/lib/data-table/src/TableParts/Body.js +13 -5
  302. package/lib/data-table/src/TableParts/Header.js +7 -5
  303. package/lib/data-table/src/interface.d.ts +10 -2
  304. package/lib/data-table/src/interface.js +1 -1
  305. package/lib/data-table/src/styles/index.cssr.js +21 -13
  306. package/lib/date-picker/src/DatePicker.js +5 -0
  307. package/lib/date-picker/src/panel/panelHeader.d.ts +6 -6
  308. package/lib/date-picker/src/styles/index.cssr.js +2 -5
  309. package/lib/descriptions/src/styles/index.cssr.js +2 -4
  310. package/lib/dialog/src/DialogEnvironment.d.ts +3 -0
  311. package/lib/dialog/src/DialogEnvironment.js +2 -2
  312. package/lib/dialog/src/DialogProvider.d.ts +3 -0
  313. package/lib/dialog/src/styles/index.cssr.js +2 -4
  314. package/lib/divider/src/styles/index.cssr.js +2 -4
  315. package/lib/drawer/src/styles/index.cssr.js +2 -9
  316. package/lib/drawer/src/styles/rtl.cssr.js +0 -2
  317. package/lib/dropdown/src/styles/index.cssr.js +2 -5
  318. package/lib/dynamic-input/src/styles/index.cssr.js +2 -4
  319. package/lib/dynamic-input/src/styles/rtl.cssr.js +0 -2
  320. package/lib/dynamic-tags/src/styles/index.cssr.js +2 -4
  321. package/lib/ellipsis/src/styles/index.cssr.js +0 -2
  322. package/lib/empty/src/styles/index.cssr.js +2 -4
  323. package/lib/equation/index.d.ts +1 -0
  324. package/lib/equation/index.js +6 -0
  325. package/lib/equation/src/Equation.d.ts +18 -0
  326. package/lib/equation/src/Equation.js +32 -0
  327. package/lib/equation/styles/dark.d.ts +3 -0
  328. package/lib/equation/styles/dark.js +10 -0
  329. package/lib/equation/styles/index.d.ts +3 -0
  330. package/lib/equation/styles/index.js +10 -0
  331. package/lib/equation/styles/light.d.ts +6 -0
  332. package/lib/equation/styles/light.js +12 -0
  333. package/lib/form/src/FormItem.d.ts +3 -2
  334. package/lib/form/src/FormItem.js +24 -7
  335. package/lib/form/src/styles/form-item.cssr.js +5 -6
  336. package/lib/form/src/styles/form.cssr.js +0 -2
  337. package/lib/gradient-text/src/styles/index.cssr.js +2 -4
  338. package/lib/icon/src/styles/index.cssr.js +2 -4
  339. package/lib/icon-wrapper/src/styles/index.cssr.js +2 -4
  340. package/lib/image/src/Image.d.ts +4 -1
  341. package/lib/image/src/Image.js +11 -5
  342. package/lib/image/src/ImagePreview.d.ts +3 -2
  343. package/lib/image/src/ImagePreview.js +39 -6
  344. package/lib/image/src/interface.d.ts +5 -0
  345. package/lib/image/src/interface.js +3 -1
  346. package/lib/image/src/styles/index.cssr.js +2 -6
  347. package/lib/input/src/Input.d.ts +3 -0
  348. package/lib/input/src/Input.js +25 -6
  349. package/lib/input/src/WordCount.js +2 -2
  350. package/lib/input/src/interface.d.ts +1 -0
  351. package/lib/input/src/styles/input-group-label.cssr.js +2 -4
  352. package/lib/input/src/styles/input-group.cssr.js +0 -2
  353. package/lib/input/src/styles/input.cssr.js +11 -9
  354. package/lib/input/src/styles/rtl.cssr.js +0 -2
  355. package/lib/input-number/src/styles/input-number.cssr.js +0 -2
  356. package/lib/input-number/src/styles/rtl.cssr.js +0 -2
  357. package/lib/layout/src/styles/layout-footer.cssr.js +2 -4
  358. package/lib/layout/src/styles/layout-header.cssr.js +2 -4
  359. package/lib/layout/src/styles/layout-sider.cssr.js +2 -4
  360. package/lib/layout/src/styles/layout.cssr.js +2 -4
  361. package/lib/legacy-grid/src/styles/index.cssr.js +0 -2
  362. package/lib/legacy-grid/src/styles/rtl.cssr.js +0 -2
  363. package/lib/legacy-transfer/src/styles/index.cssr.js +0 -3
  364. package/lib/list/src/styles/index.cssr.js +2 -4
  365. package/lib/list/src/styles/rtl.cssr.js +0 -2
  366. package/lib/loading-bar/src/styles/index.cssr.js +2 -5
  367. package/lib/locales/common/arDZ.d.ts +3 -0
  368. package/lib/locales/common/arDZ.js +122 -0
  369. package/lib/locales/common/deDE.js +2 -1
  370. package/lib/locales/common/enGB.js +2 -1
  371. package/lib/locales/common/enUS.d.ts +1 -0
  372. package/lib/locales/common/enUS.js +2 -1
  373. package/lib/locales/common/eo.js +2 -1
  374. package/lib/locales/common/esAR.js +2 -1
  375. package/lib/locales/common/frFR.js +2 -1
  376. package/lib/locales/common/idID.js +2 -1
  377. package/lib/locales/common/itIT.js +2 -1
  378. package/lib/locales/common/jaJP.js +2 -1
  379. package/lib/locales/common/koKR.js +2 -1
  380. package/lib/locales/common/nbNO.js +2 -1
  381. package/lib/locales/common/nlNL.js +2 -1
  382. package/lib/locales/common/plPL.js +2 -1
  383. package/lib/locales/common/ptBR.js +2 -1
  384. package/lib/locales/common/ruRU.js +2 -1
  385. package/lib/locales/common/skSK.js +2 -1
  386. package/lib/locales/common/thTH.js +2 -1
  387. package/lib/locales/common/trTR.d.ts +3 -0
  388. package/lib/locales/common/trTR.js +123 -0
  389. package/lib/locales/common/ukUA.js +2 -1
  390. package/lib/locales/common/viVN.js +2 -1
  391. package/lib/locales/common/zhCN.js +2 -1
  392. package/lib/locales/common/zhTW.js +2 -1
  393. package/lib/locales/date/arDZ.d.ts +3 -0
  394. package/lib/locales/date/arDZ.js +11 -0
  395. package/lib/locales/date/trTR.d.ts +3 -0
  396. package/lib/locales/date/trTR.js +11 -0
  397. package/lib/locales/index.d.ts +4 -0
  398. package/lib/locales/index.js +9 -1
  399. package/lib/log/src/styles/index.cssr.js +2 -5
  400. package/lib/mention/src/Mention.d.ts +6 -0
  401. package/lib/mention/src/Mention.js +6 -1
  402. package/lib/mention/src/styles/index.cssr.js +2 -5
  403. package/lib/menu/src/styles/index.cssr.js +2 -6
  404. package/lib/message/src/styles/index.cssr.js +2 -6
  405. package/lib/message/src/styles/rtl.cssr.js +0 -2
  406. package/lib/modal/src/BodyWrapper.d.ts +1 -1
  407. package/lib/modal/src/styles/index.cssr.js +2 -6
  408. package/lib/notification/src/styles/index.cssr.js +2 -5
  409. package/lib/notification/src/styles/rtl.cssr.js +0 -2
  410. package/lib/page-header/src/styles/index.cssr.js +2 -4
  411. package/lib/page-header/src/styles/rtl.cssr.js +0 -2
  412. package/lib/pagination/src/Pagination.js +1 -1
  413. package/lib/pagination/src/styles/index.cssr.js +2 -4
  414. package/lib/pagination/src/styles/rtl.cssr.js +0 -2
  415. package/lib/popconfirm/src/styles/index.cssr.js +2 -4
  416. package/lib/popover/src/styles/index.cssr.js +5 -8
  417. package/lib/popselect/src/styles/index.cssr.js +2 -4
  418. package/lib/progress/src/styles/index.cssr.js +2 -4
  419. package/lib/radio/src/styles/radio-group.cssr.js +2 -4
  420. package/lib/radio/src/styles/radio.cssr.js +2 -4
  421. package/lib/radio/src/styles/rtl.cssr.js +0 -2
  422. package/lib/rate/src/styles/index.cssr.js +2 -4
  423. package/lib/result/src/styles/index.cssr.js +2 -4
  424. package/lib/select/src/Select.js +1 -0
  425. package/lib/select/src/styles/index.cssr.js +2 -5
  426. package/lib/skeleton/src/styles/index.cssr.js +2 -4
  427. package/lib/slider/src/styles/index.cssr.js +2 -5
  428. package/lib/space/src/styles/rtl.cssr.js +0 -2
  429. package/lib/spin/src/styles/index.cssr.js +2 -5
  430. package/lib/statistic/src/styles/index.cssr.js +2 -4
  431. package/lib/statistic/src/styles/rtl.cssr.js +0 -2
  432. package/lib/steps/src/styles/index.cssr.js +2 -5
  433. package/lib/steps/src/styles/rtl.cssr.js +0 -2
  434. package/lib/switch/src/styles/index.cssr.js +2 -5
  435. package/lib/table/src/styles/index.cssr.js +2 -4
  436. package/lib/table/src/styles/rtl.cssr.js +0 -2
  437. package/lib/tabs/src/Tabs.d.ts +7 -7
  438. package/lib/tabs/src/styles/index.cssr.js +2 -4
  439. package/lib/tag/src/styles/index.cssr.js +2 -4
  440. package/lib/tag/src/styles/rtl.cssr.js +0 -2
  441. package/lib/themes/dark.js +100 -98
  442. package/lib/themes/light.js +100 -98
  443. package/lib/thing/src/styles/index.cssr.js +2 -4
  444. package/lib/thing/src/styles/rtl.cssr.js +0 -2
  445. package/lib/time-picker/src/styles/index.cssr.js +2 -5
  446. package/lib/timeline/src/styles/index.cssr.js +6 -5
  447. package/lib/transfer/src/Transfer.d.ts +13 -0
  448. package/lib/transfer/src/Transfer.js +6 -2
  449. package/lib/transfer/src/TransferListItem.d.ts +2 -1
  450. package/lib/transfer/src/TransferListItem.js +5 -4
  451. package/lib/transfer/src/interface.d.ts +1 -0
  452. package/lib/transfer/src/styles/index.cssr.js +2 -4
  453. package/lib/transfer/src/use-transfer-data.d.ts +1 -0
  454. package/lib/transfer/src/use-transfer-data.js +13 -4
  455. package/lib/tree/src/Tree.d.ts +60 -30
  456. package/lib/tree/src/Tree.js +69 -23
  457. package/lib/tree/src/TreeNode.d.ts +1 -1
  458. package/lib/tree/src/TreeNode.js +1 -1
  459. package/lib/tree/src/TreeNodeSwitcher.d.ts +3 -0
  460. package/lib/tree/src/TreeNodeSwitcher.js +7 -5
  461. package/lib/tree/src/interface.d.ts +12 -1
  462. package/lib/tree/src/styles/index.cssr.js +3 -6
  463. package/lib/tree/src/styles/rtl.cssr.js +0 -2
  464. package/lib/tree/src/utils.d.ts +6 -0
  465. package/lib/tree/src/utils.js +6 -1
  466. package/lib/tree-select/index.d.ts +1 -1
  467. package/lib/tree-select/src/TreeSelect.d.ts +38 -19
  468. package/lib/tree-select/src/TreeSelect.js +75 -48
  469. package/lib/tree-select/src/interface.d.ts +33 -2
  470. package/lib/tree-select/src/styles/index.cssr.js +2 -5
  471. package/lib/typography/src/styles/a.cssr.js +2 -4
  472. package/lib/typography/src/styles/blockquote.cssr.js +2 -4
  473. package/lib/typography/src/styles/header.cssr.js +2 -4
  474. package/lib/typography/src/styles/hr.cssr.js +2 -4
  475. package/lib/typography/src/styles/list.cssr.js +2 -4
  476. package/lib/typography/src/styles/p.cssr.js +2 -4
  477. package/lib/typography/src/styles/text.cssr.js +2 -4
  478. package/lib/upload/index.d.ts +1 -1
  479. package/lib/upload/src/Upload.d.ts +77 -1
  480. package/lib/upload/src/Upload.js +27 -10
  481. package/lib/upload/src/UploadFile.d.ts +2 -0
  482. package/lib/upload/src/UploadFile.js +8 -9
  483. package/lib/upload/src/interface.d.ts +7 -3
  484. package/lib/upload/src/styles/index.cssr.js +0 -4
  485. package/lib/upload/src/utils.d.ts +2 -2
  486. package/lib/upload/src/utils.js +2 -1
  487. package/lib/version.d.ts +1 -1
  488. package/lib/version.js +1 -1
  489. package/lib/watermark/src/styles/index.cssr.js +0 -2
  490. package/package.json +13 -10
  491. package/volar.d.ts +1 -0
  492. package/web-types.json +236 -57
@@ -1,7 +1,7 @@
1
1
  import { PropType, CSSProperties, InputHTMLAttributes } from 'vue';
2
2
  import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
3
3
  import type { ImageGroupProps } from '../../image';
4
- import type { FileInfo, FuncOrRecordOrUndef, OnFinish, OnRemove, OnDownload, OnChange, OnUpdateFileList, OnBeforeUpload, ListType, OnPreview, CreateThumbnailUrl, CustomRequest, OnError } from './interface';
4
+ import type { FileInfo, FuncOrRecordOrUndef, OnFinish, OnRemove, OnDownload, OnChange, OnUpdateFileList, OnBeforeUpload, ListType, OnPreview, CreateThumbnailUrl, CustomRequest, OnError, SettledFileInfo, ShouldUseThumbnailUrl, RenderIcon } from './interface';
5
5
  export declare const uploadProps: {
6
6
  readonly name: {
7
7
  readonly type: StringConstructor;
@@ -77,6 +77,10 @@ export declare const uploadProps: {
77
77
  readonly default: "text";
78
78
  };
79
79
  readonly onPreview: PropType<OnPreview>;
80
+ readonly shouldUseThumbnailUrl: {
81
+ readonly type: PropType<ShouldUseThumbnailUrl>;
82
+ readonly default: (file: SettledFileInfo) => boolean;
83
+ };
80
84
  readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
81
85
  readonly abstract: BooleanConstructor;
82
86
  readonly max: NumberConstructor;
@@ -87,6 +91,7 @@ export declare const uploadProps: {
87
91
  readonly imageGroupProps: PropType<ImageGroupProps>;
88
92
  readonly inputProps: PropType<InputHTMLAttributes>;
89
93
  readonly triggerStyle: PropType<string | CSSProperties>;
94
+ readonly renderIcon: PropType<RenderIcon>;
90
95
  readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
91
96
  fontSize: string;
92
97
  lineHeight: string;
@@ -119,6 +124,9 @@ export declare const uploadProps: {
119
124
  fontSizeLarge: string;
120
125
  opacityDisabled: string;
121
126
  colorOpacitySecondary: string;
127
+ /**
128
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
129
+ */
122
130
  colorOpacitySecondaryHover: string;
123
131
  colorOpacitySecondaryPressed: string;
124
132
  colorSecondary: string;
@@ -308,6 +316,9 @@ export declare const uploadProps: {
308
316
  iconSizeLarge: string;
309
317
  rippleDuration: string;
310
318
  }, any>;
319
+ /**
320
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
321
+ */
311
322
  Progress: import("../../_mixins").Theme<"Progress", {
312
323
  fontSize: string;
313
324
  fontSizeCircle: string;
@@ -364,6 +375,9 @@ export declare const uploadProps: {
364
375
  fontSizeLarge: string;
365
376
  opacityDisabled: string;
366
377
  colorOpacitySecondary: string;
378
+ /**
379
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
380
+ */
367
381
  colorOpacitySecondaryHover: string;
368
382
  colorOpacitySecondaryPressed: string;
369
383
  colorSecondary: string;
@@ -553,6 +567,9 @@ export declare const uploadProps: {
553
567
  iconSizeLarge: string;
554
568
  rippleDuration: string;
555
569
  }, any>;
570
+ /**
571
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
572
+ */
556
573
  Progress: import("../../_mixins").Theme<"Progress", {
557
574
  fontSize: string;
558
575
  fontSizeCircle: string;
@@ -609,6 +626,9 @@ export declare const uploadProps: {
609
626
  fontSizeLarge: string;
610
627
  opacityDisabled: string;
611
628
  colorOpacitySecondary: string;
629
+ /**
630
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
631
+ */
612
632
  colorOpacitySecondaryHover: string;
613
633
  colorOpacitySecondaryPressed: string;
614
634
  colorSecondary: string;
@@ -798,6 +818,9 @@ export declare const uploadProps: {
798
818
  iconSizeLarge: string;
799
819
  rippleDuration: string;
800
820
  }, any>;
821
+ /**
822
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
823
+ */
801
824
  Progress: import("../../_mixins").Theme<"Progress", {
802
825
  fontSize: string;
803
826
  fontSizeCircle: string;
@@ -899,6 +922,10 @@ declare const _default: import("vue").DefineComponent<{
899
922
  readonly default: "text";
900
923
  };
901
924
  readonly onPreview: PropType<OnPreview>;
925
+ readonly shouldUseThumbnailUrl: {
926
+ readonly type: PropType<ShouldUseThumbnailUrl>;
927
+ readonly default: (file: Required<FileInfo>) => boolean;
928
+ };
902
929
  readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
903
930
  readonly abstract: BooleanConstructor;
904
931
  readonly max: NumberConstructor;
@@ -909,6 +936,7 @@ declare const _default: import("vue").DefineComponent<{
909
936
  readonly imageGroupProps: PropType<ImageGroupProps>;
910
937
  readonly inputProps: PropType<InputHTMLAttributes>;
911
938
  readonly triggerStyle: PropType<string | CSSProperties>;
939
+ readonly renderIcon: PropType<RenderIcon>;
912
940
  readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
913
941
  fontSize: string;
914
942
  lineHeight: string;
@@ -941,6 +969,9 @@ declare const _default: import("vue").DefineComponent<{
941
969
  fontSizeLarge: string;
942
970
  opacityDisabled: string;
943
971
  colorOpacitySecondary: string;
972
+ /**
973
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
974
+ */
944
975
  colorOpacitySecondaryHover: string;
945
976
  colorOpacitySecondaryPressed: string;
946
977
  colorSecondary: string;
@@ -1130,6 +1161,9 @@ declare const _default: import("vue").DefineComponent<{
1130
1161
  iconSizeLarge: string;
1131
1162
  rippleDuration: string;
1132
1163
  }, any>;
1164
+ /**
1165
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1166
+ */
1133
1167
  Progress: import("../../_mixins").Theme<"Progress", {
1134
1168
  fontSize: string;
1135
1169
  fontSizeCircle: string;
@@ -1186,6 +1220,9 @@ declare const _default: import("vue").DefineComponent<{
1186
1220
  fontSizeLarge: string;
1187
1221
  opacityDisabled: string;
1188
1222
  colorOpacitySecondary: string;
1223
+ /**
1224
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1225
+ */
1189
1226
  colorOpacitySecondaryHover: string;
1190
1227
  colorOpacitySecondaryPressed: string;
1191
1228
  colorSecondary: string;
@@ -1375,6 +1412,9 @@ declare const _default: import("vue").DefineComponent<{
1375
1412
  iconSizeLarge: string;
1376
1413
  rippleDuration: string;
1377
1414
  }, any>;
1415
+ /**
1416
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1417
+ */
1378
1418
  Progress: import("../../_mixins").Theme<"Progress", {
1379
1419
  fontSize: string;
1380
1420
  fontSizeCircle: string;
@@ -1431,6 +1471,9 @@ declare const _default: import("vue").DefineComponent<{
1431
1471
  fontSizeLarge: string;
1432
1472
  opacityDisabled: string;
1433
1473
  colorOpacitySecondary: string;
1474
+ /**
1475
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1476
+ */
1434
1477
  colorOpacitySecondaryHover: string;
1435
1478
  colorOpacitySecondaryPressed: string;
1436
1479
  colorSecondary: string;
@@ -1620,6 +1663,9 @@ declare const _default: import("vue").DefineComponent<{
1620
1663
  iconSizeLarge: string;
1621
1664
  rippleDuration: string;
1622
1665
  }, any>;
1666
+ /**
1667
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1668
+ */
1623
1669
  Progress: import("../../_mixins").Theme<"Progress", {
1624
1670
  fontSize: string;
1625
1671
  fontSizeCircle: string;
@@ -1792,6 +1838,9 @@ declare const _default: import("vue").DefineComponent<{
1792
1838
  fontSizeLarge: string;
1793
1839
  opacityDisabled: string;
1794
1840
  colorOpacitySecondary: string;
1841
+ /**
1842
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
1843
+ */
1795
1844
  colorOpacitySecondaryHover: string;
1796
1845
  colorOpacitySecondaryPressed: string;
1797
1846
  colorSecondary: string;
@@ -1981,6 +2030,9 @@ declare const _default: import("vue").DefineComponent<{
1981
2030
  iconSizeLarge: string;
1982
2031
  rippleDuration: string;
1983
2032
  }, any>;
2033
+ /**
2034
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2035
+ */
1984
2036
  Progress: import("../../_mixins").Theme<"Progress", {
1985
2037
  fontSize: string;
1986
2038
  fontSizeCircle: string;
@@ -2099,6 +2151,10 @@ declare const _default: import("vue").DefineComponent<{
2099
2151
  readonly default: "text";
2100
2152
  };
2101
2153
  readonly onPreview: PropType<OnPreview>;
2154
+ readonly shouldUseThumbnailUrl: {
2155
+ readonly type: PropType<ShouldUseThumbnailUrl>;
2156
+ readonly default: (file: Required<FileInfo>) => boolean;
2157
+ };
2102
2158
  readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
2103
2159
  readonly abstract: BooleanConstructor;
2104
2160
  readonly max: NumberConstructor;
@@ -2109,6 +2165,7 @@ declare const _default: import("vue").DefineComponent<{
2109
2165
  readonly imageGroupProps: PropType<ImageGroupProps>;
2110
2166
  readonly inputProps: PropType<InputHTMLAttributes>;
2111
2167
  readonly triggerStyle: PropType<string | CSSProperties>;
2168
+ readonly renderIcon: PropType<RenderIcon>;
2112
2169
  readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
2113
2170
  fontSize: string;
2114
2171
  lineHeight: string;
@@ -2141,6 +2198,9 @@ declare const _default: import("vue").DefineComponent<{
2141
2198
  fontSizeLarge: string;
2142
2199
  opacityDisabled: string;
2143
2200
  colorOpacitySecondary: string;
2201
+ /**
2202
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2203
+ */
2144
2204
  colorOpacitySecondaryHover: string;
2145
2205
  colorOpacitySecondaryPressed: string;
2146
2206
  colorSecondary: string;
@@ -2330,6 +2390,9 @@ declare const _default: import("vue").DefineComponent<{
2330
2390
  iconSizeLarge: string;
2331
2391
  rippleDuration: string;
2332
2392
  }, any>;
2393
+ /**
2394
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2395
+ */
2333
2396
  Progress: import("../../_mixins").Theme<"Progress", {
2334
2397
  fontSize: string;
2335
2398
  fontSizeCircle: string;
@@ -2386,6 +2449,9 @@ declare const _default: import("vue").DefineComponent<{
2386
2449
  fontSizeLarge: string;
2387
2450
  opacityDisabled: string;
2388
2451
  colorOpacitySecondary: string;
2452
+ /**
2453
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2454
+ */
2389
2455
  colorOpacitySecondaryHover: string;
2390
2456
  colorOpacitySecondaryPressed: string;
2391
2457
  colorSecondary: string;
@@ -2575,6 +2641,9 @@ declare const _default: import("vue").DefineComponent<{
2575
2641
  iconSizeLarge: string;
2576
2642
  rippleDuration: string;
2577
2643
  }, any>;
2644
+ /**
2645
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2646
+ */
2578
2647
  Progress: import("../../_mixins").Theme<"Progress", {
2579
2648
  fontSize: string;
2580
2649
  fontSizeCircle: string;
@@ -2631,6 +2700,9 @@ declare const _default: import("vue").DefineComponent<{
2631
2700
  fontSizeLarge: string;
2632
2701
  opacityDisabled: string;
2633
2702
  colorOpacitySecondary: string;
2703
+ /**
2704
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2705
+ */
2634
2706
  colorOpacitySecondaryHover: string;
2635
2707
  colorOpacitySecondaryPressed: string;
2636
2708
  colorSecondary: string;
@@ -2820,6 +2892,9 @@ declare const _default: import("vue").DefineComponent<{
2820
2892
  iconSizeLarge: string;
2821
2893
  rippleDuration: string;
2822
2894
  }, any>;
2895
+ /**
2896
+ * fils status ['pending', 'uploading', 'finished', 'removed', 'error']
2897
+ */
2823
2898
  Progress: import("../../_mixins").Theme<"Progress", {
2824
2899
  fontSize: string;
2825
2900
  fontSizeCircle: string;
@@ -2857,6 +2932,7 @@ declare const _default: import("vue").DefineComponent<{
2857
2932
  readonly showDownloadButton: boolean;
2858
2933
  readonly showRetryButton: boolean;
2859
2934
  readonly showPreviewButton: boolean;
2935
+ readonly shouldUseThumbnailUrl: ShouldUseThumbnailUrl;
2860
2936
  readonly withCredentials: boolean;
2861
2937
  readonly responseType: XMLHttpRequestResponseType;
2862
2938
  readonly directory: boolean;
@@ -219,10 +219,17 @@ exports.uploadProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
219
219
  }, listType: {
220
220
  type: String,
221
221
  default: 'text'
222
- }, onPreview: Function, createThumbnailUrl: Function, abstract: Boolean, max: Number, showTrigger: {
222
+ }, onPreview: Function, shouldUseThumbnailUrl: {
223
+ type: Function,
224
+ default: (file) => {
225
+ if (!utils_1.environmentSupportFile)
226
+ return false;
227
+ return (0, utils_1.isImageFile)(file);
228
+ }
229
+ }, createThumbnailUrl: Function, abstract: Boolean, max: Number, showTrigger: {
223
230
  type: Boolean,
224
231
  default: true
225
- }, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object] });
232
+ }, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object], renderIcon: Object });
226
233
  exports.default = (0, vue_1.defineComponent)({
227
234
  name: 'Upload',
228
235
  props: exports.uploadProps,
@@ -411,13 +418,21 @@ exports.default = (0, vue_1.defineComponent)({
411
418
  (0, _utils_1.warn)('upload', 'File has no corresponding id in current file list.');
412
419
  }
413
420
  };
414
- function getFileThumbnailUrl(file) {
415
- return __awaiter(this, void 0, void 0, function* () {
416
- const { createThumbnailUrl } = props;
417
- return createThumbnailUrl
418
- ? yield createThumbnailUrl(file.file)
419
- : yield (0, utils_1.createImageDataUrl)(file.file);
420
- });
421
+ function getFileThumbnailUrlResolver(file) {
422
+ var _a;
423
+ if (file.thumbnailUrl)
424
+ return file.thumbnailUrl;
425
+ const { createThumbnailUrl } = props;
426
+ if (createThumbnailUrl) {
427
+ return (_a = createThumbnailUrl(file.file, file)) !== null && _a !== void 0 ? _a : (file.url || '');
428
+ }
429
+ if (file.url) {
430
+ return file.url;
431
+ }
432
+ else if (file.file) {
433
+ return (0, utils_1.createImageDataUrl)(file.file);
434
+ }
435
+ return '';
421
436
  }
422
437
  const cssVarsRef = (0, vue_1.computed)(() => {
423
438
  const { common: { cubicBezierEaseInOut }, self: { draggerColor, draggerBorder, draggerBorderHover, itemColorHover, itemColorHoverError, itemTextColorError, itemTextColorSuccess, itemTextColor, itemIconColor, itemDisabledOpacity, lineHeight, borderRadius, fontSize, itemBorderImageCardError, itemBorderImageCard } } = themeRef.value;
@@ -454,12 +469,14 @@ exports.default = (0, vue_1.defineComponent)({
454
469
  onDownloadRef: (0, vue_1.toRef)(props, 'onDownload'),
455
470
  mergedFileListRef,
456
471
  triggerStyleRef: (0, vue_1.toRef)(props, 'triggerStyle'),
472
+ shouldUseThumbnailUrlRef: (0, vue_1.toRef)(props, 'shouldUseThumbnailUrl'),
473
+ renderIconRef: (0, vue_1.toRef)(props, 'renderIcon'),
457
474
  xhrMap,
458
475
  submit,
459
476
  doChange,
460
477
  showPreviewButtonRef: (0, vue_1.toRef)(props, 'showPreviewButton'),
461
478
  onPreviewRef: (0, vue_1.toRef)(props, 'onPreview'),
462
- getFileThumbnailUrl,
479
+ getFileThumbnailUrlResolver,
463
480
  listTypeRef: (0, vue_1.toRef)(props, 'listType'),
464
481
  dragOverRef,
465
482
  openOpenFileDialog,
@@ -389,6 +389,8 @@ declare const _default: import("vue").DefineComponent<{
389
389
  showRetryButton: import("vue").ComputedRef<boolean>;
390
390
  showPreviewButton: import("vue").ComputedRef<boolean | "" | null>;
391
391
  mergedThumbnailUrl: import("vue").ComputedRef<string | null>;
392
+ shouldUseThumbnailUrl: import("vue").Ref<import("./interface").ShouldUseThumbnailUrl>;
393
+ renderIcon: import("vue").Ref<import("./interface").RenderIcon | undefined>;
392
394
  imageRef: import("vue").Ref<{
393
395
  click: () => void;
394
396
  } | null>;
@@ -172,10 +172,9 @@ exports.default = (0, vue_1.defineComponent)({
172
172
  if (listType !== 'image' && listType !== 'image-card') {
173
173
  return;
174
174
  }
175
- if (!utils_1.environmentSupportFile || !(props.file.file instanceof File)) {
176
- return;
175
+ if (NUpload.shouldUseThumbnailUrlRef.value(props.file)) {
176
+ thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrlResolver(props.file);
177
177
  }
178
- thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrl(props.file);
179
178
  });
180
179
  (0, vue_1.watchEffect)(() => {
181
180
  void deriveFileThumbnailUrl();
@@ -192,6 +191,8 @@ exports.default = (0, vue_1.defineComponent)({
192
191
  showRetryButton: showRetryButtonRef,
193
192
  showPreviewButton: showPreviewButtonRef,
194
193
  mergedThumbnailUrl: mergedThumbnailUrlRef,
194
+ shouldUseThumbnailUrl: NUpload.shouldUseThumbnailUrlRef,
195
+ renderIcon: NUpload.renderIconRef,
195
196
  imageRef,
196
197
  handleRemoveOrCancelClick,
197
198
  handleDownloadClick,
@@ -200,19 +201,17 @@ exports.default = (0, vue_1.defineComponent)({
200
201
  };
201
202
  },
202
203
  render() {
203
- const { clsPrefix, mergedTheme, listType, file } = this;
204
+ const { clsPrefix, mergedTheme, listType, file, renderIcon } = this;
204
205
  // if there is text list type, show file icon
205
206
  let icon;
206
207
  const isImageType = listType === 'image';
207
208
  const isImageCardType = listType === 'image-card';
208
209
  if (isImageType || isImageCardType) {
209
- icon = !(0, utils_1.isImageFile)(file) ? ((0, vue_1.h)("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
210
- (0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => icons_2.documentIcon }))) : this.mergedThumbnailUrl && file.status !== 'error' ? ((0, vue_1.h)("a", { rel: "noopener noreferer", target: "_blank", href: file.url || undefined, class: `${clsPrefix}-upload-file-info__thumbnail`, onClick: this.handlePreviewClick }, listType === 'image-card' ? ((0, vue_1.h)(image_1.NImage, { src: this.mergedThumbnailUrl || undefined, previewSrc: file.url || undefined, alt: file.name, ref: "imageRef" })) : ((0, vue_1.h)("img", { src: this.mergedThumbnailUrl || undefined, alt: file.name })))) : ((0, vue_1.h)("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
211
- (0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => icons_2.imageIcon })));
210
+ icon =
211
+ !this.shouldUseThumbnailUrl(file) || !this.mergedThumbnailUrl ? ((0, vue_1.h)("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : (0, utils_1.isImageFile)(file) ? ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => icons_2.imageIcon })) : ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => icons_2.documentIcon })))) : ((0, vue_1.h)("a", { rel: "noopener noreferer", target: "_blank", href: file.url || undefined, class: `${clsPrefix}-upload-file-info__thumbnail`, onClick: this.handlePreviewClick }, listType === 'image-card' ? ((0, vue_1.h)(image_1.NImage, { src: this.mergedThumbnailUrl || undefined, previewSrc: file.url || undefined, alt: file.name, ref: "imageRef" })) : ((0, vue_1.h)("img", { src: this.mergedThumbnailUrl || undefined, alt: file.name }))));
212
212
  }
213
213
  else {
214
- icon = ((0, vue_1.h)("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
215
- (0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => (0, vue_1.h)(icons_1.AttachIcon, null) })));
214
+ icon = ((0, vue_1.h)("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix }, { default: () => (0, vue_1.h)(icons_1.AttachIcon, null) }))));
216
215
  }
217
216
  const progress = ((0, vue_1.h)(UploadProgress_1.default, { show: this.showProgress, percentage: file.percentage || 0, status: this.progressStatus }));
218
217
  const showName = listType === 'text' || listType === 'image';
@@ -1,4 +1,4 @@
1
- import { Ref, CSSProperties } from 'vue';
1
+ import { Ref, CSSProperties, VNodeChild } from 'vue';
2
2
  import { ImageGroupProps } from '../../image';
3
3
  import type { MergedTheme } from '../../_mixins';
4
4
  import type { UploadTheme } from '../styles';
@@ -15,6 +15,7 @@ export interface FileInfo {
15
15
  fullPath?: string | null;
16
16
  }
17
17
  export declare type SettledFileInfo = Required<FileInfo>;
18
+ export declare type ShouldUseThumbnailUrl = (file: SettledFileInfo) => boolean;
18
19
  export declare type FuncOrRecordOrUndef = Record<string, string> | (({ file }: {
19
20
  file: SettledFileInfo;
20
21
  }) => Record<string, string>) | undefined;
@@ -44,6 +45,7 @@ export declare type DoChange = (fileAfterChange: SettledFileInfo, event?: Progre
44
45
  remove?: boolean;
45
46
  }) => void;
46
47
  export declare type OnUpdateFileList = (fileList: SettledFileInfo[]) => void;
48
+ export declare type RenderIcon = (file: SettledFileInfo) => VNodeChild;
47
49
  export interface UploadInjection {
48
50
  mergedClsPrefixRef: Ref<string>;
49
51
  mergedThemeRef: Ref<MergedTheme<UploadTheme>>;
@@ -76,7 +78,9 @@ export interface UploadInjection {
76
78
  doChange: DoChange;
77
79
  onRender: undefined | (() => void);
78
80
  submit: (fileId?: string) => void;
79
- getFileThumbnailUrl: (file: SettledFileInfo) => Promise<string>;
81
+ shouldUseThumbnailUrlRef: Ref<ShouldUseThumbnailUrl>;
82
+ getFileThumbnailUrlResolver: (file: SettledFileInfo) => Promise<string> | string;
83
+ renderIconRef: Ref<RenderIcon | undefined>;
80
84
  handleFileAddition: (files: FileAndEntry[] | null, e?: Event) => void;
81
85
  openOpenFileDialog: () => void;
82
86
  }
@@ -98,7 +102,7 @@ export declare type OnBeforeUpload = (data: {
98
102
  }) => Promise<boolean | void> | boolean | void;
99
103
  export declare type ListType = 'text' | 'image' | 'image-card';
100
104
  export declare type OnPreview = (file: SettledFileInfo) => void;
101
- export declare type CreateThumbnailUrl = (file: File) => Promise<string>;
105
+ export declare type CreateThumbnailUrl = (file: File | null, fileInfo: SettledFileInfo) => Promise<string> | string | undefined;
102
106
  export interface CustomRequestOptions {
103
107
  file: SettledFileInfo;
104
108
  action?: string;
@@ -3,13 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const cssr_1 = require("../../../_utils/cssr");
8
-
9
7
  const fade_in_height_expand_cssr_1 = require("../../../_styles/transitions/fade-in-height-expand.cssr");
10
-
11
8
  const icon_switch_cssr_1 = require("../../../_styles/transitions/icon-switch.cssr");
12
-
13
9
  exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('upload', 'width: 100%;', [(0, cssr_1.cM)('dragger-inside', [(0, cssr_1.cB)('upload-trigger', `
14
10
  display: block;
15
11
  `)]), (0, cssr_1.cM)('drag-over', [(0, cssr_1.cB)('upload-dragger', `
@@ -1,6 +1,6 @@
1
- import type { FileAndEntry, FileInfo, SettledFileInfo } from './interface';
1
+ import type { FileAndEntry, FileInfo, SettledFileInfo, ShouldUseThumbnailUrl } from './interface';
2
2
  export declare const isImageFileType: (type: string) => boolean;
3
- export declare const isImageFile: (file: FileInfo) => boolean;
3
+ export declare const isImageFile: ShouldUseThumbnailUrl;
4
4
  export declare function createImageDataUrl(file: File): Promise<string>;
5
5
  export declare const environmentSupportFile: false | {
6
6
  new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag | undefined): File;
@@ -19,6 +19,7 @@ const getExtname = (url = '') => {
19
19
  const filenameWithoutSuffix = filename.split(/#|\?/)[0];
20
20
  return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
21
21
  };
22
+ // Do not need File object
22
23
  const isImageFile = (file) => {
23
24
  if (file.type) {
24
25
  return (0, exports.isImageFileType)(file.type);
@@ -35,7 +36,7 @@ const isImageFile = (file) => {
35
36
  if (extension) {
36
37
  return false;
37
38
  }
38
- return true;
39
+ return false;
39
40
  };
40
41
  exports.isImageFile = isImageFile;
41
42
  function createImageDataUrl(file) {
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.33.4";
1
+ declare const _default: "2.34.0";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '2.33.4';
3
+ exports.default = '2.34.0';
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const cssr_1 = require("../../../_utils/cssr");
8
-
9
7
  exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('watermark-container', `
10
8
  position: relative;
11
9
  `, [(0, cssr_1.cNotM)('selectable', `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naive-ui",
3
- "version": "2.33.4",
3
+ "version": "2.34.0",
4
4
  "description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -50,9 +50,9 @@
50
50
  "@babel/parser": "^7.17.9",
51
51
  "@babel/preset-env": "^7.16.11",
52
52
  "@babel/traverse": "^7.17.9",
53
- "@rollup/plugin-babel": "^5.3.1",
54
- "@rollup/plugin-commonjs": "^22.0.0",
55
- "@rollup/plugin-node-resolve": "^14.0.1",
53
+ "@rollup/plugin-babel": "^6.0.2",
54
+ "@rollup/plugin-commonjs": "^23.0.1",
55
+ "@rollup/plugin-node-resolve": "^15.0.1",
56
56
  "@rollup/plugin-replace": "^4.0.0",
57
57
  "@types/estree": "^1.0.0",
58
58
  "@types/jest": "^29.0.2",
@@ -68,11 +68,11 @@
68
68
  "@vue/server-renderer": "^3.2.39",
69
69
  "@vue/test-utils": "^2.0.2",
70
70
  "autoprefixer": "^10.4.4",
71
- "babel-jest": "^28.1.3",
71
+ "babel-jest": "^29.3.1",
72
72
  "codesandbox": "^2.2.3",
73
73
  "cssnano": "^5.1.7",
74
74
  "deepmerge": "^4.2.2",
75
- "esbuild": "0.15.7",
75
+ "esbuild": "0.15.12",
76
76
  "eslint": "^8.13.0",
77
77
  "eslint-config-prettier": "^8.5.0",
78
78
  "eslint-config-standard": "^17.0.0",
@@ -86,11 +86,13 @@
86
86
  "express": "^4.17.3",
87
87
  "fast-glob": "^3.2.11",
88
88
  "fs-extra": "^10.0.1",
89
+ "grapheme-splitter": "^1.0.4",
89
90
  "husky": "^8.0.1",
90
91
  "inquirer": "^9.1.0",
91
- "jest": "^28.0.3",
92
+ "jest": "^29.3.1",
92
93
  "jest-canvas-mock": "^2.3.1",
93
94
  "jest-environment-jsdom": "^29.0.0",
95
+ "katex": "^0.16.3",
94
96
  "lint-staged": "^13.0.3",
95
97
  "lyla": "^0.6.8",
96
98
  "marked": "^4.0.13",
@@ -100,13 +102,13 @@
100
102
  "rollup-plugin-esbuild": "^4.9.1",
101
103
  "rollup-plugin-terser": "^7.0.2",
102
104
  "superagent": "^8.0.0",
103
- "ts-jest": "^28.0.1",
105
+ "ts-jest": "^29.0.3",
104
106
  "typescript": "~4.8.3",
105
107
  "vfonts": "^0.1.0",
106
- "vite": "3.1.1",
108
+ "vite": "3.2.3",
107
109
  "vue": "^3.2.39",
108
110
  "vue-router": "^4.0.14",
109
- "vue-tsc": "^0.40.5"
111
+ "vue-tsc": "^1.0.9"
110
112
  },
111
113
  "peerDependencies": {
112
114
  "vue": "^3.0.0"
@@ -114,6 +116,7 @@
114
116
  "dependencies": {
115
117
  "@css-render/plugin-bem": "^0.15.10",
116
118
  "@css-render/vue3-ssr": "^0.15.10",
119
+ "@types/katex": "^0.14.0",
117
120
  "@types/lodash": "^4.14.181",
118
121
  "@types/lodash-es": "^4.17.6",
119
122
  "async-validator": "^4.0.7",
package/volar.d.ts CHANGED
@@ -140,6 +140,7 @@ declare module 'vue' {
140
140
  NUploadFileList: typeof import('naive-ui')['NUploadFileList']
141
141
  NUploadTrigger: typeof import('naive-ui')['NUploadTrigger']
142
142
  NWatermark: typeof import('naive-ui')['NWatermark']
143
+ NEquation: typeof import('naive-ui')['NEquation']
143
144
  }
144
145
  }
145
146
  export {}