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;
@@ -15,7 +15,7 @@ import { warn, call, throwError } from '../../_utils';
15
15
  import { uploadLight } from '../styles';
16
16
  import { uploadDraggerKey } from './UploadDragger';
17
17
  import { uploadInjectionKey } from './interface';
18
- import { createImageDataUrl, createSettledFileInfo, matchType } from './utils';
18
+ import { createImageDataUrl, createSettledFileInfo, environmentSupportFile, isImageFile, matchType } from './utils';
19
19
  import NUploadTrigger from './UploadTrigger';
20
20
  import NUploadFileList from './UploadFileList';
21
21
  import style from './styles/index.cssr';
@@ -213,10 +213,17 @@ export const uploadProps = Object.assign(Object.assign({}, useTheme.props), { na
213
213
  }, listType: {
214
214
  type: String,
215
215
  default: 'text'
216
- }, onPreview: Function, createThumbnailUrl: Function, abstract: Boolean, max: Number, showTrigger: {
216
+ }, onPreview: Function, shouldUseThumbnailUrl: {
217
+ type: Function,
218
+ default: (file) => {
219
+ if (!environmentSupportFile)
220
+ return false;
221
+ return isImageFile(file);
222
+ }
223
+ }, createThumbnailUrl: Function, abstract: Boolean, max: Number, showTrigger: {
217
224
  type: Boolean,
218
225
  default: true
219
- }, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object] });
226
+ }, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object], renderIcon: Object });
220
227
  export default defineComponent({
221
228
  name: 'Upload',
222
229
  props: uploadProps,
@@ -405,13 +412,21 @@ export default defineComponent({
405
412
  warn('upload', 'File has no corresponding id in current file list.');
406
413
  }
407
414
  };
408
- function getFileThumbnailUrl(file) {
409
- return __awaiter(this, void 0, void 0, function* () {
410
- const { createThumbnailUrl } = props;
411
- return createThumbnailUrl
412
- ? yield createThumbnailUrl(file.file)
413
- : yield createImageDataUrl(file.file);
414
- });
415
+ function getFileThumbnailUrlResolver(file) {
416
+ var _a;
417
+ if (file.thumbnailUrl)
418
+ return file.thumbnailUrl;
419
+ const { createThumbnailUrl } = props;
420
+ if (createThumbnailUrl) {
421
+ return (_a = createThumbnailUrl(file.file, file)) !== null && _a !== void 0 ? _a : (file.url || '');
422
+ }
423
+ if (file.url) {
424
+ return file.url;
425
+ }
426
+ else if (file.file) {
427
+ return createImageDataUrl(file.file);
428
+ }
429
+ return '';
415
430
  }
416
431
  const cssVarsRef = computed(() => {
417
432
  const { common: { cubicBezierEaseInOut }, self: { draggerColor, draggerBorder, draggerBorderHover, itemColorHover, itemColorHoverError, itemTextColorError, itemTextColorSuccess, itemTextColor, itemIconColor, itemDisabledOpacity, lineHeight, borderRadius, fontSize, itemBorderImageCardError, itemBorderImageCard } } = themeRef.value;
@@ -448,12 +463,14 @@ export default defineComponent({
448
463
  onDownloadRef: toRef(props, 'onDownload'),
449
464
  mergedFileListRef,
450
465
  triggerStyleRef: toRef(props, 'triggerStyle'),
466
+ shouldUseThumbnailUrlRef: toRef(props, 'shouldUseThumbnailUrl'),
467
+ renderIconRef: toRef(props, 'renderIcon'),
451
468
  xhrMap,
452
469
  submit,
453
470
  doChange,
454
471
  showPreviewButtonRef: toRef(props, 'showPreviewButton'),
455
472
  onPreviewRef: toRef(props, 'onPreview'),
456
- getFileThumbnailUrl,
473
+ getFileThumbnailUrlResolver,
457
474
  listTypeRef: toRef(props, 'listType'),
458
475
  dragOverRef,
459
476
  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>;
@@ -17,7 +17,7 @@ import { warn } from '../../_utils';
17
17
  import NUploadProgress from './UploadProgress';
18
18
  import { uploadInjectionKey } from './interface';
19
19
  import { imageIcon, documentIcon } from './icons';
20
- import { download, environmentSupportFile, isImageFile } from './utils';
20
+ import { download, isImageFile } from './utils';
21
21
  const buttonThemeOverrides = {
22
22
  paddingMedium: '0 3px',
23
23
  heightMedium: '24px',
@@ -167,10 +167,9 @@ export default defineComponent({
167
167
  if (listType !== 'image' && listType !== 'image-card') {
168
168
  return;
169
169
  }
170
- if (!environmentSupportFile || !(props.file.file instanceof File)) {
171
- return;
170
+ if (NUpload.shouldUseThumbnailUrlRef.value(props.file)) {
171
+ thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrlResolver(props.file);
172
172
  }
173
- thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrl(props.file);
174
173
  });
175
174
  watchEffect(() => {
176
175
  void deriveFileThumbnailUrl();
@@ -187,6 +186,8 @@ export default defineComponent({
187
186
  showRetryButton: showRetryButtonRef,
188
187
  showPreviewButton: showPreviewButtonRef,
189
188
  mergedThumbnailUrl: mergedThumbnailUrlRef,
189
+ shouldUseThumbnailUrl: NUpload.shouldUseThumbnailUrlRef,
190
+ renderIcon: NUpload.renderIconRef,
190
191
  imageRef,
191
192
  handleRemoveOrCancelClick,
192
193
  handleDownloadClick,
@@ -195,19 +196,17 @@ export default defineComponent({
195
196
  };
196
197
  },
197
198
  render() {
198
- const { clsPrefix, mergedTheme, listType, file } = this;
199
+ const { clsPrefix, mergedTheme, listType, file, renderIcon } = this;
199
200
  // if there is text list type, show file icon
200
201
  let icon;
201
202
  const isImageType = listType === 'image';
202
203
  const isImageCardType = listType === 'image-card';
203
204
  if (isImageType || isImageCardType) {
204
- icon = !isImageFile(file) ? (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
205
- h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => documentIcon }))) : this.mergedThumbnailUrl && file.status !== 'error' ? (h("a", { rel: "noopener noreferer", target: "_blank", href: file.url || undefined, class: `${clsPrefix}-upload-file-info__thumbnail`, onClick: this.handlePreviewClick }, listType === 'image-card' ? (h(NImage, { src: this.mergedThumbnailUrl || undefined, previewSrc: file.url || undefined, alt: file.name, ref: "imageRef" })) : (h("img", { src: this.mergedThumbnailUrl || undefined, alt: file.name })))) : (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
206
- h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => imageIcon })));
205
+ icon =
206
+ !this.shouldUseThumbnailUrl(file) || !this.mergedThumbnailUrl ? (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : isImageFile(file) ? (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => imageIcon })) : (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => documentIcon })))) : (h("a", { rel: "noopener noreferer", target: "_blank", href: file.url || undefined, class: `${clsPrefix}-upload-file-info__thumbnail`, onClick: this.handlePreviewClick }, listType === 'image-card' ? (h(NImage, { src: this.mergedThumbnailUrl || undefined, previewSrc: file.url || undefined, alt: file.name, ref: "imageRef" })) : (h("img", { src: this.mergedThumbnailUrl || undefined, alt: file.name }))));
207
207
  }
208
208
  else {
209
- icon = (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
210
- h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => h(AttachIcon, null) })));
209
+ icon = (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => h(AttachIcon, null) }))));
211
210
  }
212
211
  const progress = (h(NUploadProgress, { show: this.showProgress, percentage: file.percentage || 0, status: this.progressStatus }));
213
212
  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;
@@ -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;
@@ -15,6 +15,7 @@ const getExtname = (url = '') => {
15
15
  const filenameWithoutSuffix = filename.split(/#|\?/)[0];
16
16
  return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
17
17
  };
18
+ // Do not need File object
18
19
  export const isImageFile = (file) => {
19
20
  if (file.type) {
20
21
  return isImageFileType(file.type);
@@ -31,7 +32,7 @@ export const isImageFile = (file) => {
31
32
  if (extension) {
32
33
  return false;
33
34
  }
34
- return true;
35
+ return false;
35
36
  };
36
37
  export function createImageDataUrl(file) {
37
38
  return __awaiter(this, void 0, void 0, function* () {
package/es/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/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '2.33.4';
1
+ export default '2.34.0';
@@ -3,17 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const cssr_1 = require("../../../../_utils/cssr");
8
-
9
- const icon_switch_cssr_1 = require("../../../../_styles/transitions/icon-switch.cssr"); // vars:
7
+ const icon_switch_cssr_1 = require("../../../../_styles/transitions/icon-switch.cssr");
8
+ // vars:
10
9
  // --n-bezier
11
10
  // --n-clear-color
12
11
  // --n-clear-size
13
12
  // --n-clear-color-hover
14
13
  // --n-clear-color-pressed
15
-
16
-
17
14
  exports.default = (0, cssr_1.cB)('base-clear', `
18
15
  flex-shrink: 0;
19
16
  height: 1em;
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
- const cssr_1 = require("../../../../_utils/cssr"); // vars:
6
+ const cssr_1 = require("../../../../_utils/cssr");
7
+ // vars:
8
8
  // --n-close-border-radius
9
9
  // --n-close-color-hover
10
10
  // --n-close-color-pressed
@@ -12,8 +12,6 @@ const cssr_1 = require("../../../../_utils/cssr"); // vars:
12
12
  // --n-close-icon-color-hover
13
13
  // --n-close-icon-color-pressed
14
14
  // --n-close-icon-color-disabled
15
-
16
-
17
15
  exports.default = (0, cssr_1.cB)('base-close', `
18
16
  display: flex;
19
17
  align-items: center;
@@ -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.cB)('base-icon', `
10
8
  height: 1em;
11
9
  width: 1em;
@@ -4,6 +4,7 @@ export { NBaseClose } from './close';
4
4
  export { NBaseIcon } from './icon';
5
5
  export { default as NBaseFocusDetector } from './focus-detector';
6
6
  export { default as NBaseLoading } from './loading';
7
+ export type { BaseLoadingExposedProps } from './loading';
7
8
  export { default as NInternalSelectMenu } from './select-menu';
8
9
  export type { InternalSelectMenuRef } from './select-menu';
9
10
  export { default as NBaseWave } from './wave';
@@ -1 +1,2 @@
1
1
  export { default } from './src/Loading';
2
+ export type { BaseLoadingExposedProps } from './src/Loading';
@@ -1,16 +1,16 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- clsPrefix: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- scale: {
1
+ import { ExtractPublicPropTypes } from '../../../_utils';
2
+ declare const exposedLoadingProps: {
3
+ strokeWidth: {
7
4
  type: NumberConstructor;
8
5
  default: number;
9
6
  };
10
- radius: {
11
- type: NumberConstructor;
12
- default: number;
7
+ stroke: {
8
+ type: StringConstructor;
9
+ default: undefined;
13
10
  };
11
+ };
12
+ export declare type BaseLoadingExposedProps = ExtractPublicPropTypes<typeof exposedLoadingProps>;
13
+ declare const _default: import("vue").DefineComponent<{
14
14
  strokeWidth: {
15
15
  type: NumberConstructor;
16
16
  default: number;
@@ -19,15 +19,14 @@ declare const _default: import("vue").DefineComponent<{
19
19
  type: StringConstructor;
20
20
  default: undefined;
21
21
  };
22
- show: {
23
- type: BooleanConstructor;
24
- default: boolean;
25
- };
26
- }, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
22
  clsPrefix: {
28
23
  type: StringConstructor;
29
24
  required: true;
30
25
  };
26
+ show: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
31
30
  scale: {
32
31
  type: NumberConstructor;
33
32
  default: number;
@@ -36,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
36
35
  type: NumberConstructor;
37
36
  default: number;
38
37
  };
38
+ }, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
39
39
  strokeWidth: {
40
40
  type: NumberConstructor;
41
41
  default: number;
@@ -44,10 +44,22 @@ declare const _default: import("vue").DefineComponent<{
44
44
  type: StringConstructor;
45
45
  default: undefined;
46
46
  };
47
+ clsPrefix: {
48
+ type: StringConstructor;
49
+ required: true;
50
+ };
47
51
  show: {
48
52
  type: BooleanConstructor;
49
53
  default: boolean;
50
54
  };
55
+ scale: {
56
+ type: NumberConstructor;
57
+ default: number;
58
+ };
59
+ radius: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
51
63
  }>>, {
52
64
  show: boolean;
53
65
  stroke: string;