naive-ui 2.35.0 → 2.36.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 (393) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +1 -0
  3. package/dist/index.js +2433 -667
  4. package/dist/index.prod.js +2 -2
  5. package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
  6. package/es/_internal/scrollbar/src/Scrollbar.js +11 -6
  7. package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -3
  8. package/es/_internal/select-menu/src/SelectMenu.js +1 -0
  9. package/es/_internal/select-menu/src/styles/index.cssr.js +8 -0
  10. package/es/_internal/selection/src/Selection.d.ts +3 -1
  11. package/es/_internal/selection/src/Selection.js +4 -2
  12. package/es/_styles/common/_common.js +1 -1
  13. package/es/_styles/common/light.js +2 -2
  14. package/es/_utils/composable/use-collection.d.ts +1 -1
  15. package/es/_utils/composable/use-collection.js +2 -0
  16. package/es/_utils/css/color-to-class.js +1 -1
  17. package/es/affix/src/Affix.d.ts +2 -2
  18. package/es/affix/src/Affix.js +4 -2
  19. package/es/alert/src/Alert.js +3 -1
  20. package/es/anchor/src/AnchorAdapter.d.ts +1 -1
  21. package/es/auto-complete/src/AutoComplete.d.ts +1 -1
  22. package/es/button/src/Button.d.ts +1 -1
  23. package/es/button/src/Button.js +1 -1
  24. package/es/card/src/Card.d.ts +17 -1
  25. package/es/card/src/Card.js +12 -5
  26. package/es/carousel/src/Carousel.d.ts +5 -5
  27. package/es/carousel/src/Carousel.js +2 -1
  28. package/es/checkbox/src/Checkbox.d.ts +6 -6
  29. package/es/color-picker/src/ColorPickerSwatches.js +4 -3
  30. package/es/components.d.ts +3 -0
  31. package/es/components.js +3 -0
  32. package/es/config-provider/src/config.js +5 -5
  33. package/es/config-provider/src/internal-interface.d.ts +4 -0
  34. package/es/data-table/src/DataTable.d.ts +3 -3
  35. package/es/data-table/src/DataTable.js +1 -0
  36. package/es/data-table/src/MainTable.js +1 -0
  37. package/es/data-table/src/TableParts/Body.d.ts +3 -3
  38. package/es/data-table/src/TableParts/Body.js +5 -3
  39. package/es/data-table/src/interface.d.ts +1 -1
  40. package/es/date-picker/src/panel/date.d.ts +2 -2
  41. package/es/date-picker/src/panel/daterange.d.ts +2 -2
  42. package/es/date-picker/src/panel/datetime.d.ts +2 -2
  43. package/es/date-picker/src/panel/datetimerange.d.ts +2 -2
  44. package/es/date-picker/src/panel/month.d.ts +2 -2
  45. package/es/date-picker/src/panel/monthrange.d.ts +2 -2
  46. package/es/date-picker/src/panel/panelHeader.d.ts +720 -773
  47. package/es/date-picker/src/panel/use-calendar.d.ts +2 -2
  48. package/es/date-picker/src/panel/use-calendar.js +2 -2
  49. package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
  50. package/es/date-picker/src/panel/use-dual-calendar.js +4 -4
  51. package/es/date-picker/src/utils.js +1 -6
  52. package/es/date-picker/styles/_common.js +1 -1
  53. package/es/descriptions/src/Descriptions.d.ts +6 -0
  54. package/es/descriptions/src/Descriptions.js +22 -7
  55. package/es/descriptions/src/DescriptionsItem.d.ts +6 -0
  56. package/es/descriptions/src/DescriptionsItem.js +2 -0
  57. package/es/dialog/src/Dialog.js +6 -2
  58. package/es/dialog/src/DialogEnvironment.d.ts +1 -1
  59. package/es/dialog/src/DialogProvider.d.ts +3 -3
  60. package/es/dialog/src/dialogProps.d.ts +1 -1
  61. package/es/dropdown/src/Dropdown.d.ts +18 -0
  62. package/es/dropdown/src/Dropdown.js +1 -1
  63. package/es/dropdown/src/DropdownMenu.js +4 -1
  64. package/es/dropdown/src/DropdownOption.d.ts +5 -4
  65. package/es/dropdown/src/DropdownOption.js +2 -4
  66. package/es/dynamic-input/src/DynamicInput.d.ts +3 -0
  67. package/es/dynamic-input/src/DynamicInput.js +3 -3
  68. package/es/dynamic-tags/src/DynamicTags.d.ts +6 -0
  69. package/es/dynamic-tags/src/DynamicTags.js +4 -4
  70. package/es/equation/index.d.ts +1 -0
  71. package/es/equation/src/Equation.d.ts +2 -0
  72. package/es/form/src/FormItem.d.ts +1 -1
  73. package/es/form/src/utils.d.ts +1 -1
  74. package/es/input/src/Input.d.ts +4 -4
  75. package/es/input/src/styles/input.cssr.js +1 -1
  76. package/es/layout/src/Layout.d.ts +6 -0
  77. package/es/layout/src/Layout.js +8 -1
  78. package/es/layout/src/LayoutContent.d.ts +2 -0
  79. package/es/layout/src/LayoutSider.d.ts +9 -0
  80. package/es/layout/src/LayoutSider.js +12 -3
  81. package/es/legacy-grid/src/styles/index.cssr.js +2 -3
  82. package/es/legacy-grid/src/styles/rtl.cssr.js +2 -3
  83. package/es/loading-bar/src/LoadingBar.d.ts +2 -0
  84. package/es/loading-bar/src/LoadingBar.js +3 -1
  85. package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -0
  86. package/es/loading-bar/src/LoadingBarProvider.js +2 -2
  87. package/es/locales/common/frFR.js +1 -1
  88. package/es/log/src/Log.d.ts +3 -3
  89. package/es/mention/src/Mention.d.ts +1 -1
  90. package/es/mention/src/utils.js +4 -4
  91. package/es/menu/src/Menu.d.ts +30 -13
  92. package/es/menu/src/Menu.js +101 -7
  93. package/es/menu/src/MenuOptionContent.d.ts +3 -0
  94. package/es/menu/src/MenuOptionContent.js +7 -2
  95. package/es/menu/src/Submenu.d.ts +23 -12
  96. package/es/menu/src/Submenu.js +9 -8
  97. package/es/menu/src/interface.d.ts +1 -0
  98. package/es/menu/src/styles/index.cssr.js +8 -4
  99. package/es/menu/src/use-menu-child.js +5 -5
  100. package/es/message/src/Message.d.ts +1 -1
  101. package/es/message/src/MessageProvider.d.ts +7 -4
  102. package/es/message/src/MessageProvider.js +3 -2
  103. package/es/modal/src/BodyWrapper.d.ts +12 -4
  104. package/es/modal/src/Modal.d.ts +16 -4
  105. package/es/modal/src/presetProps.d.ts +5 -1
  106. package/es/notification/src/NotificationEnvironment.js +1 -1
  107. package/es/notification/src/NotificationProvider.d.ts +3 -0
  108. package/es/notification/src/NotificationProvider.js +2 -2
  109. package/es/popconfirm/src/Popconfirm.d.ts +18 -0
  110. package/es/popover/src/Popover.d.ts +24 -0
  111. package/es/popover/src/Popover.js +7 -0
  112. package/es/popover/src/PopoverBody.d.ts +22 -1
  113. package/es/popover/src/PopoverBody.js +26 -10
  114. package/es/popover/src/interface.d.ts +1 -1
  115. package/es/popselect/src/Popselect.d.ts +18 -0
  116. package/es/popselect/src/Popselect.js +2 -1
  117. package/es/popselect/src/PopselectPanel.js +1 -0
  118. package/es/progress/src/Progress.d.ts +1 -1
  119. package/es/qr-code/index.d.ts +2 -0
  120. package/es/qr-code/index.js +1 -0
  121. package/es/qr-code/src/QrCode.d.ts +154 -0
  122. package/es/qr-code/src/QrCode.js +146 -0
  123. package/es/qr-code/src/qrcodegen.d.ts +94 -0
  124. package/es/qr-code/src/qrcodegen.js +948 -0
  125. package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
  126. package/es/qr-code/src/styles/index.cssr.js +8 -0
  127. package/es/qr-code/styles/dark.d.ts +3 -0
  128. package/es/qr-code/styles/dark.js +11 -0
  129. package/es/qr-code/styles/index.d.ts +3 -0
  130. package/es/qr-code/styles/index.js +2 -0
  131. package/es/qr-code/styles/light.d.ts +9 -0
  132. package/es/qr-code/styles/light.js +12 -0
  133. package/es/radio/src/RadioGroup.d.ts +1 -0
  134. package/es/radio/src/RadioGroup.js +2 -1
  135. package/es/radio/src/styles/radio-group.cssr.js +1 -0
  136. package/es/result/src/Result.d.ts +1 -1
  137. package/es/scrollbar/src/Scrollbar.js +2 -0
  138. package/es/select/src/Select.d.ts +1 -1
  139. package/es/skeleton/src/Skeleton.js +4 -7
  140. package/es/slider/src/Slider.d.ts +6 -0
  141. package/es/slider/src/Slider.js +10 -3
  142. package/es/slider/src/utils.d.ts +2 -2
  143. package/es/slider/src/utils.js +4 -4
  144. package/es/space/src/Space.d.ts +3 -0
  145. package/es/space/src/Space.js +3 -3
  146. package/es/spin/src/Spin.d.ts +7 -1
  147. package/es/spin/src/Spin.js +4 -3
  148. package/es/split/index.d.ts +2 -0
  149. package/es/split/index.js +1 -0
  150. package/es/split/src/Split.d.ts +135 -0
  151. package/es/split/src/Split.js +145 -0
  152. package/es/split/src/styles/index.cssr.d.ts +2 -0
  153. package/es/split/src/styles/index.cssr.js +25 -0
  154. package/es/split/styles/dark.d.ts +3 -0
  155. package/es/split/styles/dark.js +6 -0
  156. package/es/split/styles/index.d.ts +3 -0
  157. package/es/split/styles/index.js +2 -0
  158. package/es/split/styles/light.d.ts +9 -0
  159. package/es/split/styles/light.js +13 -0
  160. package/es/steps/src/Steps.d.ts +1 -1
  161. package/es/tabs/src/Tab.js +3 -1
  162. package/es/tabs/src/Tabs.d.ts +6 -6
  163. package/es/tabs/src/Tabs.js +2 -2
  164. package/es/tabs/src/styles/index.cssr.js +12 -2
  165. package/es/theme-editor/src/ThemeEditor.d.ts +2 -2
  166. package/es/themes/dark.js +5 -1
  167. package/es/themes/light.js +5 -1
  168. package/es/thing/src/Thing.d.ts +6 -0
  169. package/es/thing/src/Thing.js +13 -4
  170. package/es/tooltip/src/Tooltip.d.ts +18 -0
  171. package/es/tree/index.d.ts +1 -0
  172. package/es/tree/index.js +1 -0
  173. package/es/tree/src/Tree.d.ts +11 -0
  174. package/es/tree/src/Tree.js +6 -3
  175. package/es/tree/src/TreeNode.js +30 -19
  176. package/es/tree/src/TreeNodeCheckbox.d.ts +1 -0
  177. package/es/tree/src/TreeNodeSwitcher.d.ts +1 -1
  178. package/es/tree/src/styles/index.cssr.js +4 -3
  179. package/es/tree/src/utils.d.ts +1 -0
  180. package/es/tree/src/utils.js +12 -0
  181. package/es/tree/styles/light.d.ts +2 -0
  182. package/es/tree/styles/light.js +3 -2
  183. package/es/tree-select/src/TreeSelect.d.ts +17 -10
  184. package/es/tree-select/src/TreeSelect.js +2 -2
  185. package/es/tree-select/styles/light.d.ts +1 -0
  186. package/es/upload/src/Upload.d.ts +6 -0
  187. package/es/upload/src/Upload.js +8 -3
  188. package/es/upload/src/UploadFileList.js +3 -2
  189. package/es/upload/src/UploadTrigger.js +3 -2
  190. package/es/upload/src/interface.d.ts +2 -0
  191. package/es/version.d.ts +1 -1
  192. package/es/version.js +1 -1
  193. package/es/virtual-list/index.d.ts +2 -0
  194. package/es/virtual-list/index.js +1 -0
  195. package/es/virtual-list/src/VirtualList.d.ts +146 -0
  196. package/es/virtual-list/src/VirtualList.js +102 -0
  197. package/es/watermark/src/Watermark.js +7 -0
  198. package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
  199. package/lib/_internal/scrollbar/src/Scrollbar.js +11 -6
  200. package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -3
  201. package/lib/_internal/select-menu/src/SelectMenu.js +1 -0
  202. package/lib/_internal/select-menu/src/styles/index.cssr.js +8 -0
  203. package/lib/_internal/selection/src/Selection.d.ts +3 -1
  204. package/lib/_internal/selection/src/Selection.js +4 -2
  205. package/lib/_styles/common/_common.js +1 -1
  206. package/lib/_styles/common/light.js +2 -2
  207. package/lib/_utils/composable/use-collection.d.ts +1 -1
  208. package/lib/_utils/composable/use-collection.js +2 -0
  209. package/lib/_utils/css/color-to-class.js +1 -1
  210. package/lib/affix/src/Affix.d.ts +2 -2
  211. package/lib/affix/src/Affix.js +4 -2
  212. package/lib/alert/src/Alert.js +3 -1
  213. package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
  214. package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
  215. package/lib/button/src/Button.d.ts +1 -1
  216. package/lib/button/src/Button.js +1 -1
  217. package/lib/card/src/Card.d.ts +17 -1
  218. package/lib/card/src/Card.js +12 -5
  219. package/lib/carousel/src/Carousel.d.ts +5 -5
  220. package/lib/carousel/src/Carousel.js +2 -1
  221. package/lib/checkbox/src/Checkbox.d.ts +6 -6
  222. package/lib/color-picker/src/ColorPickerSwatches.js +4 -3
  223. package/lib/components.d.ts +3 -0
  224. package/lib/components.js +3 -0
  225. package/lib/config-provider/src/config.js +5 -5
  226. package/lib/config-provider/src/internal-interface.d.ts +4 -0
  227. package/lib/data-table/src/DataTable.d.ts +3 -3
  228. package/lib/data-table/src/DataTable.js +1 -0
  229. package/lib/data-table/src/MainTable.js +1 -0
  230. package/lib/data-table/src/TableParts/Body.d.ts +3 -3
  231. package/lib/data-table/src/TableParts/Body.js +5 -3
  232. package/lib/data-table/src/interface.d.ts +1 -1
  233. package/lib/date-picker/src/panel/date.d.ts +2 -2
  234. package/lib/date-picker/src/panel/daterange.d.ts +2 -2
  235. package/lib/date-picker/src/panel/datetime.d.ts +2 -2
  236. package/lib/date-picker/src/panel/datetimerange.d.ts +2 -2
  237. package/lib/date-picker/src/panel/month.d.ts +2 -2
  238. package/lib/date-picker/src/panel/monthrange.d.ts +2 -2
  239. package/lib/date-picker/src/panel/panelHeader.d.ts +720 -773
  240. package/lib/date-picker/src/panel/use-calendar.d.ts +2 -2
  241. package/lib/date-picker/src/panel/use-calendar.js +2 -2
  242. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
  243. package/lib/date-picker/src/panel/use-dual-calendar.js +4 -4
  244. package/lib/date-picker/src/utils.js +1 -6
  245. package/lib/date-picker/styles/_common.js +1 -1
  246. package/lib/descriptions/src/Descriptions.d.ts +6 -0
  247. package/lib/descriptions/src/Descriptions.js +22 -7
  248. package/lib/descriptions/src/DescriptionsItem.d.ts +6 -0
  249. package/lib/descriptions/src/DescriptionsItem.js +2 -0
  250. package/lib/dialog/src/Dialog.js +6 -2
  251. package/lib/dialog/src/DialogEnvironment.d.ts +1 -1
  252. package/lib/dialog/src/DialogProvider.d.ts +3 -3
  253. package/lib/dialog/src/dialogProps.d.ts +1 -1
  254. package/lib/dropdown/src/Dropdown.d.ts +18 -0
  255. package/lib/dropdown/src/Dropdown.js +1 -1
  256. package/lib/dropdown/src/DropdownMenu.js +4 -1
  257. package/lib/dropdown/src/DropdownOption.d.ts +5 -4
  258. package/lib/dropdown/src/DropdownOption.js +2 -4
  259. package/lib/dynamic-input/src/DynamicInput.d.ts +3 -0
  260. package/lib/dynamic-input/src/DynamicInput.js +3 -3
  261. package/lib/dynamic-tags/src/DynamicTags.d.ts +6 -0
  262. package/lib/dynamic-tags/src/DynamicTags.js +4 -4
  263. package/lib/equation/index.d.ts +1 -0
  264. package/lib/equation/src/Equation.d.ts +2 -0
  265. package/lib/form/src/FormItem.d.ts +1 -1
  266. package/lib/form/src/utils.d.ts +1 -1
  267. package/lib/input/src/Input.d.ts +4 -4
  268. package/lib/input/src/styles/input.cssr.js +1 -1
  269. package/lib/layout/src/Layout.d.ts +6 -0
  270. package/lib/layout/src/Layout.js +8 -1
  271. package/lib/layout/src/LayoutContent.d.ts +2 -0
  272. package/lib/layout/src/LayoutSider.d.ts +9 -0
  273. package/lib/layout/src/LayoutSider.js +12 -3
  274. package/lib/legacy-grid/src/styles/index.cssr.js +2 -3
  275. package/lib/legacy-grid/src/styles/rtl.cssr.js +2 -3
  276. package/lib/loading-bar/src/LoadingBar.d.ts +2 -0
  277. package/lib/loading-bar/src/LoadingBar.js +3 -1
  278. package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -0
  279. package/lib/loading-bar/src/LoadingBarProvider.js +2 -2
  280. package/lib/locales/common/frFR.js +1 -1
  281. package/lib/log/src/Log.d.ts +3 -3
  282. package/lib/mention/src/Mention.d.ts +1 -1
  283. package/lib/mention/src/utils.js +4 -4
  284. package/lib/menu/src/Menu.d.ts +30 -13
  285. package/lib/menu/src/Menu.js +101 -7
  286. package/lib/menu/src/MenuOptionContent.d.ts +3 -0
  287. package/lib/menu/src/MenuOptionContent.js +7 -2
  288. package/lib/menu/src/Submenu.d.ts +23 -12
  289. package/lib/menu/src/Submenu.js +9 -8
  290. package/lib/menu/src/interface.d.ts +1 -0
  291. package/lib/menu/src/styles/index.cssr.js +8 -4
  292. package/lib/menu/src/use-menu-child.js +5 -5
  293. package/lib/message/src/Message.d.ts +1 -1
  294. package/lib/message/src/MessageProvider.d.ts +7 -4
  295. package/lib/message/src/MessageProvider.js +3 -2
  296. package/lib/modal/src/BodyWrapper.d.ts +12 -4
  297. package/lib/modal/src/Modal.d.ts +16 -4
  298. package/lib/modal/src/presetProps.d.ts +5 -1
  299. package/lib/notification/src/NotificationEnvironment.js +1 -1
  300. package/lib/notification/src/NotificationProvider.d.ts +3 -0
  301. package/lib/notification/src/NotificationProvider.js +2 -2
  302. package/lib/popconfirm/src/Popconfirm.d.ts +18 -0
  303. package/lib/popover/src/Popover.d.ts +24 -0
  304. package/lib/popover/src/Popover.js +7 -0
  305. package/lib/popover/src/PopoverBody.d.ts +22 -1
  306. package/lib/popover/src/PopoverBody.js +26 -10
  307. package/lib/popover/src/interface.d.ts +1 -1
  308. package/lib/popselect/src/Popselect.d.ts +18 -0
  309. package/lib/popselect/src/Popselect.js +2 -1
  310. package/lib/popselect/src/PopselectPanel.js +1 -0
  311. package/lib/progress/src/Progress.d.ts +1 -1
  312. package/lib/qr-code/index.d.ts +2 -0
  313. package/lib/qr-code/index.js +9 -0
  314. package/lib/qr-code/src/QrCode.d.ts +154 -0
  315. package/lib/qr-code/src/QrCode.js +152 -0
  316. package/lib/qr-code/src/qrcodegen.d.ts +94 -0
  317. package/lib/qr-code/src/qrcodegen.js +949 -0
  318. package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
  319. package/lib/qr-code/src/styles/index.cssr.js +13 -0
  320. package/lib/qr-code/styles/dark.d.ts +3 -0
  321. package/lib/qr-code/styles/dark.js +13 -0
  322. package/lib/qr-code/styles/index.d.ts +3 -0
  323. package/lib/qr-code/styles/index.js +10 -0
  324. package/lib/qr-code/styles/light.d.ts +9 -0
  325. package/lib/qr-code/styles/light.js +14 -0
  326. package/lib/radio/src/RadioGroup.d.ts +1 -0
  327. package/lib/radio/src/RadioGroup.js +2 -1
  328. package/lib/radio/src/styles/radio-group.cssr.js +1 -0
  329. package/lib/result/src/Result.d.ts +1 -1
  330. package/lib/scrollbar/src/Scrollbar.js +2 -0
  331. package/lib/select/src/Select.d.ts +1 -1
  332. package/lib/skeleton/src/Skeleton.js +3 -6
  333. package/lib/slider/src/Slider.d.ts +6 -0
  334. package/lib/slider/src/Slider.js +10 -3
  335. package/lib/slider/src/utils.d.ts +2 -2
  336. package/lib/slider/src/utils.js +3 -3
  337. package/lib/space/src/Space.d.ts +3 -0
  338. package/lib/space/src/Space.js +3 -3
  339. package/lib/spin/src/Spin.d.ts +7 -1
  340. package/lib/spin/src/Spin.js +4 -3
  341. package/lib/split/index.d.ts +2 -0
  342. package/lib/split/index.js +9 -0
  343. package/lib/split/src/Split.d.ts +135 -0
  344. package/lib/split/src/Split.js +151 -0
  345. package/lib/split/src/styles/index.cssr.d.ts +2 -0
  346. package/lib/split/src/styles/index.cssr.js +30 -0
  347. package/lib/split/styles/dark.d.ts +3 -0
  348. package/lib/split/styles/dark.js +8 -0
  349. package/lib/split/styles/index.d.ts +3 -0
  350. package/lib/split/styles/index.js +10 -0
  351. package/lib/split/styles/light.d.ts +9 -0
  352. package/lib/split/styles/light.js +17 -0
  353. package/lib/steps/src/Steps.d.ts +1 -1
  354. package/lib/tabs/src/Tab.js +3 -1
  355. package/lib/tabs/src/Tabs.d.ts +6 -6
  356. package/lib/tabs/src/Tabs.js +2 -2
  357. package/lib/tabs/src/styles/index.cssr.js +12 -2
  358. package/lib/theme-editor/src/ThemeEditor.d.ts +2 -2
  359. package/lib/themes/dark.js +56 -52
  360. package/lib/themes/light.js +56 -52
  361. package/lib/thing/src/Thing.d.ts +6 -0
  362. package/lib/thing/src/Thing.js +13 -4
  363. package/lib/tooltip/src/Tooltip.d.ts +18 -0
  364. package/lib/tree/index.d.ts +1 -0
  365. package/lib/tree/index.js +3 -1
  366. package/lib/tree/src/Tree.d.ts +11 -0
  367. package/lib/tree/src/Tree.js +6 -3
  368. package/lib/tree/src/TreeNode.js +30 -19
  369. package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -0
  370. package/lib/tree/src/TreeNodeSwitcher.d.ts +1 -1
  371. package/lib/tree/src/styles/index.cssr.js +4 -3
  372. package/lib/tree/src/utils.d.ts +1 -0
  373. package/lib/tree/src/utils.js +14 -1
  374. package/lib/tree/styles/light.d.ts +2 -0
  375. package/lib/tree/styles/light.js +3 -2
  376. package/lib/tree-select/src/TreeSelect.d.ts +17 -10
  377. package/lib/tree-select/src/TreeSelect.js +2 -2
  378. package/lib/tree-select/styles/light.d.ts +1 -0
  379. package/lib/upload/src/Upload.d.ts +6 -0
  380. package/lib/upload/src/Upload.js +8 -3
  381. package/lib/upload/src/UploadFileList.js +3 -2
  382. package/lib/upload/src/UploadTrigger.js +3 -2
  383. package/lib/upload/src/interface.d.ts +2 -0
  384. package/lib/version.d.ts +1 -1
  385. package/lib/version.js +1 -1
  386. package/lib/virtual-list/index.d.ts +2 -0
  387. package/lib/virtual-list/index.js +9 -0
  388. package/lib/virtual-list/src/VirtualList.d.ts +146 -0
  389. package/lib/virtual-list/src/VirtualList.js +105 -0
  390. package/lib/watermark/src/Watermark.js +7 -0
  391. package/package.json +15 -15
  392. package/volar.d.ts +4 -0
  393. package/web-types.json +773 -18
@@ -59,32 +59,34 @@ const styles_52 = require("../popconfirm/styles");
59
59
  const styles_53 = require("../popover/styles");
60
60
  const styles_54 = require("../popselect/styles");
61
61
  const styles_55 = require("../progress/styles");
62
- const styles_56 = require("../radio/styles");
63
- const styles_57 = require("../rate/styles");
64
- const styles_58 = require("../result/styles");
65
- const styles_59 = require("../legacy-grid/styles");
66
- const styles_60 = require("../_internal/scrollbar/styles");
67
- const styles_61 = require("../select/styles");
68
- const styles_62 = require("../skeleton/styles");
69
- const styles_63 = require("../slider/styles");
70
- const styles_64 = require("../space/styles");
71
- const styles_65 = require("../spin/styles");
72
- const styles_66 = require("../statistic/styles");
73
- const styles_67 = require("../steps/styles");
74
- const styles_68 = require("../switch/styles");
75
- const styles_69 = require("../table/styles");
76
- const styles_70 = require("../tabs/styles");
77
- const styles_71 = require("../tag/styles");
78
- const styles_72 = require("../thing/styles");
79
- const styles_73 = require("../time-picker/styles");
80
- const styles_74 = require("../timeline/styles");
81
- const styles_75 = require("../tooltip/styles");
82
- const styles_76 = require("../transfer/styles");
83
- const styles_77 = require("../typography/styles");
84
- const styles_78 = require("../tree/styles");
85
- const styles_79 = require("../tree-select/styles");
86
- const styles_80 = require("../upload/styles");
87
- const styles_81 = require("../watermark/styles");
62
+ const styles_56 = require("../qr-code/styles");
63
+ const styles_57 = require("../radio/styles");
64
+ const styles_58 = require("../rate/styles");
65
+ const styles_59 = require("../result/styles");
66
+ const styles_60 = require("../legacy-grid/styles");
67
+ const styles_61 = require("../_internal/scrollbar/styles");
68
+ const styles_62 = require("../select/styles");
69
+ const styles_63 = require("../skeleton/styles");
70
+ const styles_64 = require("../slider/styles");
71
+ const styles_65 = require("../space/styles");
72
+ const styles_66 = require("../spin/styles");
73
+ const styles_67 = require("../statistic/styles");
74
+ const styles_68 = require("../steps/styles");
75
+ const styles_69 = require("../switch/styles");
76
+ const styles_70 = require("../table/styles");
77
+ const styles_71 = require("../tabs/styles");
78
+ const styles_72 = require("../tag/styles");
79
+ const styles_73 = require("../thing/styles");
80
+ const styles_74 = require("../time-picker/styles");
81
+ const styles_75 = require("../timeline/styles");
82
+ const styles_76 = require("../tooltip/styles");
83
+ const styles_77 = require("../transfer/styles");
84
+ const styles_78 = require("../typography/styles");
85
+ const styles_79 = require("../tree/styles");
86
+ const styles_80 = require("../tree-select/styles");
87
+ const styles_81 = require("../upload/styles");
88
+ const styles_82 = require("../watermark/styles");
89
+ const styles_83 = require("../split/styles");
88
90
  exports.lightTheme = {
89
91
  name: 'light',
90
92
  common: common_1.commonLight,
@@ -143,30 +145,32 @@ exports.lightTheme = {
143
145
  Popover: styles_53.popoverLight,
144
146
  Popselect: styles_54.popselectLight,
145
147
  Progress: styles_55.progressLight,
146
- Radio: styles_56.radioLight,
147
- Rate: styles_57.rateLight,
148
- Row: styles_59.rowLight,
149
- Result: styles_58.resultLight,
150
- Scrollbar: styles_60.scrollbarLight,
151
- Skeleton: styles_62.skeletonLight,
152
- Select: styles_61.selectLight,
153
- Slider: styles_63.sliderLight,
154
- Space: styles_64.spaceLight,
155
- Spin: styles_65.spinLight,
156
- Statistic: styles_66.statisticLight,
157
- Steps: styles_67.stepsLight,
158
- Switch: styles_68.switchLight,
159
- Table: styles_69.tableLight,
160
- Tabs: styles_70.tabsLight,
161
- Tag: styles_71.tagLight,
162
- Thing: styles_72.thingLight,
163
- TimePicker: styles_73.timePickerLight,
164
- Timeline: styles_74.timelineLight,
165
- Tooltip: styles_75.tooltipLight,
166
- Transfer: styles_76.transferLight,
167
- Tree: styles_78.treeLight,
168
- TreeSelect: styles_79.treeSelectLight,
169
- Typography: styles_77.typographyLight,
170
- Upload: styles_80.uploadLight,
171
- Watermark: styles_81.watermarkLight
148
+ QrCode: styles_56.qrcodeLight,
149
+ Radio: styles_57.radioLight,
150
+ Rate: styles_58.rateLight,
151
+ Row: styles_60.rowLight,
152
+ Result: styles_59.resultLight,
153
+ Scrollbar: styles_61.scrollbarLight,
154
+ Skeleton: styles_63.skeletonLight,
155
+ Select: styles_62.selectLight,
156
+ Slider: styles_64.sliderLight,
157
+ Space: styles_65.spaceLight,
158
+ Spin: styles_66.spinLight,
159
+ Statistic: styles_67.statisticLight,
160
+ Steps: styles_68.stepsLight,
161
+ Switch: styles_69.switchLight,
162
+ Table: styles_70.tableLight,
163
+ Tabs: styles_71.tabsLight,
164
+ Tag: styles_72.tagLight,
165
+ Thing: styles_73.thingLight,
166
+ TimePicker: styles_74.timePickerLight,
167
+ Timeline: styles_75.timelineLight,
168
+ Tooltip: styles_76.tooltipLight,
169
+ Transfer: styles_77.transferLight,
170
+ Tree: styles_79.treeLight,
171
+ TreeSelect: styles_80.treeSelectLight,
172
+ Typography: styles_78.typographyLight,
173
+ Upload: styles_81.uploadLight,
174
+ Watermark: styles_82.watermarkLight,
175
+ Split: styles_83.splitLight
172
176
  };
@@ -4,8 +4,10 @@ export declare const thingProps: {
4
4
  title: StringConstructor;
5
5
  titleExtra: StringConstructor;
6
6
  description: StringConstructor;
7
+ descriptionClass: StringConstructor;
7
8
  descriptionStyle: PropType<string | CSSProperties>;
8
9
  content: StringConstructor;
10
+ contentClass: StringConstructor;
9
11
  contentStyle: PropType<string | CSSProperties>;
10
12
  contentIndented: BooleanConstructor;
11
13
  theme: PropType<import("../../_mixins").Theme<"Thing", {
@@ -32,8 +34,10 @@ declare const _default: import("vue").DefineComponent<{
32
34
  title: StringConstructor;
33
35
  titleExtra: StringConstructor;
34
36
  description: StringConstructor;
37
+ descriptionClass: StringConstructor;
35
38
  descriptionStyle: PropType<string | CSSProperties>;
36
39
  content: StringConstructor;
40
+ contentClass: StringConstructor;
37
41
  contentStyle: PropType<string | CSSProperties>;
38
42
  contentIndented: BooleanConstructor;
39
43
  theme: PropType<import("../../_mixins").Theme<"Thing", {
@@ -58,8 +62,10 @@ declare const _default: import("vue").DefineComponent<{
58
62
  title: StringConstructor;
59
63
  titleExtra: StringConstructor;
60
64
  description: StringConstructor;
65
+ descriptionClass: StringConstructor;
61
66
  descriptionStyle: PropType<string | CSSProperties>;
62
67
  content: StringConstructor;
68
+ contentClass: StringConstructor;
63
69
  contentStyle: PropType<string | CSSProperties>;
64
70
  contentIndented: BooleanConstructor;
65
71
  theme: PropType<import("../../_mixins").Theme<"Thing", {
@@ -8,7 +8,7 @@ const vue_1 = require("vue");
8
8
  const _mixins_1 = require("../../_mixins");
9
9
  const styles_1 = require("../styles");
10
10
  const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
11
- exports.thingProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { title: String, titleExtra: String, description: String, descriptionStyle: [String, Object], content: String, contentStyle: [String, Object], contentIndented: Boolean });
11
+ exports.thingProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { title: String, titleExtra: String, description: String, descriptionClass: String, descriptionStyle: [String, Object], content: String, contentClass: String, contentStyle: [String, Object], contentIndented: Boolean });
12
12
  exports.default = (0, vue_1.defineComponent)({
13
13
  name: 'Thing',
14
14
  props: exports.thingProps,
@@ -59,7 +59,10 @@ exports.default = (0, vue_1.defineComponent)({
59
59
  slots['header-extra'] || props.titleExtra ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
60
60
  ? slots['header-extra']()
61
61
  : props.titleExtra)) : null),
62
- slots.description || props.description ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__description`, style: props.descriptionStyle }, slots.description
62
+ slots.description || props.description ? ((0, vue_1.h)("div", { class: [
63
+ `${mergedClsPrefix}-thing-main__description`,
64
+ props.descriptionClass
65
+ ], style: props.descriptionStyle }, slots.description
63
66
  ? slots.description()
64
67
  : props.description)) : null)) : null)) : ((0, vue_1.h)(vue_1.Fragment, null,
65
68
  slots.header ||
@@ -70,10 +73,16 @@ exports.default = (0, vue_1.defineComponent)({
70
73
  slots['header-extra'] || props.titleExtra ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-header__extra` }, slots['header-extra']
71
74
  ? slots['header-extra']()
72
75
  : props.titleExtra)) : null)) : null,
73
- slots.description || props.description ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__description`, style: props.descriptionStyle }, slots.description
76
+ slots.description || props.description ? ((0, vue_1.h)("div", { class: [
77
+ `${mergedClsPrefix}-thing-main__description`,
78
+ props.descriptionClass
79
+ ], style: props.descriptionStyle }, slots.description
74
80
  ? slots.description()
75
81
  : props.description)) : null)),
76
- slots.default || props.content ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__content`, style: props.contentStyle }, slots.default ? slots.default() : props.content)) : null,
82
+ slots.default || props.content ? ((0, vue_1.h)("div", { class: [
83
+ `${mergedClsPrefix}-thing-main__content`,
84
+ props.contentClass
85
+ ], style: props.contentStyle }, slots.default ? slots.default() : props.content)) : null,
77
86
  slots.footer ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__footer` }, slots.footer())) : null,
78
87
  slots.action ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main__action` }, slots.action())) : null)));
79
88
  };
@@ -103,7 +103,10 @@ export declare const tooltipProps: {
103
103
  type: import("vue").PropType<"show" | "if">;
104
104
  default: string;
105
105
  };
106
+ arrowClass: StringConstructor;
106
107
  arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
108
+ arrowWrapperClass: StringConstructor;
109
+ arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
107
110
  flip: {
108
111
  type: BooleanConstructor;
109
112
  default: boolean;
@@ -127,8 +130,11 @@ export declare const tooltipProps: {
127
130
  default: undefined;
128
131
  };
129
132
  scrollable: BooleanConstructor;
133
+ contentClass: StringConstructor;
130
134
  contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
135
+ headerClass: StringConstructor;
131
136
  headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
137
+ footerClass: StringConstructor;
132
138
  footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
133
139
  onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
134
140
  'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
@@ -256,7 +262,10 @@ declare const _default: import("vue").DefineComponent<{
256
262
  type: import("vue").PropType<"show" | "if">;
257
263
  default: string;
258
264
  };
265
+ arrowClass: StringConstructor;
259
266
  arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
267
+ arrowWrapperClass: StringConstructor;
268
+ arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
260
269
  flip: {
261
270
  type: BooleanConstructor;
262
271
  default: boolean;
@@ -280,8 +289,11 @@ declare const _default: import("vue").DefineComponent<{
280
289
  default: undefined;
281
290
  };
282
291
  scrollable: BooleanConstructor;
292
+ contentClass: StringConstructor;
283
293
  contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
294
+ headerClass: StringConstructor;
284
295
  headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
296
+ footerClass: StringConstructor;
285
297
  footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
286
298
  onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
287
299
  'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
@@ -558,7 +570,10 @@ declare const _default: import("vue").DefineComponent<{
558
570
  type: import("vue").PropType<"show" | "if">;
559
571
  default: string;
560
572
  };
573
+ arrowClass: StringConstructor;
561
574
  arrowStyle: import("vue").PropType<string | import("vue").CSSProperties>;
575
+ arrowWrapperClass: StringConstructor;
576
+ arrowWrapperStyle: import("vue").PropType<string | import("vue").CSSProperties>;
562
577
  flip: {
563
578
  type: BooleanConstructor;
564
579
  default: boolean;
@@ -582,8 +597,11 @@ declare const _default: import("vue").DefineComponent<{
582
597
  default: undefined;
583
598
  };
584
599
  scrollable: BooleanConstructor;
600
+ contentClass: StringConstructor;
585
601
  contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
602
+ headerClass: StringConstructor;
586
603
  headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
604
+ footerClass: StringConstructor;
587
605
  footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
588
606
  onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
589
607
  'onUpdate:show': import("vue").PropType<import("../../_utils").MaybeArray<(value: boolean) => void>>;
@@ -1,3 +1,4 @@
1
1
  export { default as NTree, treeProps } from './src/Tree';
2
2
  export type { TreeProps } from './src/Tree';
3
3
  export type { TreeOption, TreeDragInfo, TreeDropInfo, TreeInst } from './src/interface';
4
+ export { treeGetClickTarget } from './src/utils';
package/lib/tree/index.js CHANGED
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.treeProps = exports.NTree = void 0;
6
+ exports.treeGetClickTarget = exports.treeProps = exports.NTree = void 0;
7
7
  var Tree_1 = require("./src/Tree");
8
8
  Object.defineProperty(exports, "NTree", { enumerable: true, get: function () { return __importDefault(Tree_1).default; } });
9
9
  Object.defineProperty(exports, "treeProps", { enumerable: true, get: function () { return Tree_1.treeProps; } });
10
+ var utils_1 = require("./src/utils");
11
+ Object.defineProperty(exports, "treeGetClickTarget", { enumerable: true, get: function () { return utils_1.treeGetClickTarget; } });
@@ -223,6 +223,7 @@ export declare const treeProps: {
223
223
  nodeTextColorDisabled: string;
224
224
  loadingColor: string;
225
225
  dropMarkColor: string;
226
+ lineColor: string;
226
227
  }, {
227
228
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
228
229
  labelLineHeight: string;
@@ -286,6 +287,7 @@ export declare const treeProps: {
286
287
  nodeTextColorDisabled: string;
287
288
  loadingColor: string;
288
289
  dropMarkColor: string;
290
+ lineColor: string;
289
291
  }, {
290
292
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
291
293
  labelLineHeight: string;
@@ -349,6 +351,7 @@ export declare const treeProps: {
349
351
  nodeTextColorDisabled: string;
350
352
  loadingColor: string;
351
353
  dropMarkColor: string;
354
+ lineColor: string;
352
355
  }, {
353
356
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
354
357
  labelLineHeight: string;
@@ -554,6 +557,7 @@ declare const _default: import("vue").DefineComponent<{
554
557
  nodeTextColorDisabled: string;
555
558
  loadingColor: string;
556
559
  dropMarkColor: string;
560
+ lineColor: string;
557
561
  }, {
558
562
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
559
563
  labelLineHeight: string;
@@ -617,6 +621,7 @@ declare const _default: import("vue").DefineComponent<{
617
621
  nodeTextColorDisabled: string;
618
622
  loadingColor: string;
619
623
  dropMarkColor: string;
624
+ lineColor: string;
620
625
  }, {
621
626
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
622
627
  labelLineHeight: string;
@@ -680,6 +685,7 @@ declare const _default: import("vue").DefineComponent<{
680
685
  nodeTextColorDisabled: string;
681
686
  loadingColor: string;
682
687
  dropMarkColor: string;
688
+ lineColor: string;
683
689
  }, {
684
690
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
685
691
  labelLineHeight: string;
@@ -851,6 +857,7 @@ declare const _default: import("vue").DefineComponent<{
851
857
  nodeTextColorDisabled: string;
852
858
  loadingColor: string;
853
859
  dropMarkColor: string;
860
+ lineColor: string;
854
861
  };
855
862
  peers: {
856
863
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
@@ -1209,6 +1216,7 @@ declare const _default: import("vue").DefineComponent<{
1209
1216
  '--n-line-offset-bottom': string;
1210
1217
  '--n-node-content-height': string;
1211
1218
  '--n-line-height': string;
1219
+ '--n-line-color': string;
1212
1220
  }> | undefined;
1213
1221
  themeClass: import("vue").Ref<string> | undefined;
1214
1222
  onRender: (() => void) | undefined;
@@ -1378,6 +1386,7 @@ declare const _default: import("vue").DefineComponent<{
1378
1386
  nodeTextColorDisabled: string;
1379
1387
  loadingColor: string;
1380
1388
  dropMarkColor: string;
1389
+ lineColor: string;
1381
1390
  }, {
1382
1391
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
1383
1392
  labelLineHeight: string;
@@ -1441,6 +1450,7 @@ declare const _default: import("vue").DefineComponent<{
1441
1450
  nodeTextColorDisabled: string;
1442
1451
  loadingColor: string;
1443
1452
  dropMarkColor: string;
1453
+ lineColor: string;
1444
1454
  }, {
1445
1455
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
1446
1456
  labelLineHeight: string;
@@ -1504,6 +1514,7 @@ declare const _default: import("vue").DefineComponent<{
1504
1514
  nodeTextColorDisabled: string;
1505
1515
  loadingColor: string;
1506
1516
  dropMarkColor: string;
1517
+ lineColor: string;
1507
1518
  }, {
1508
1519
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
1509
1520
  labelLineHeight: string;
@@ -1178,7 +1178,7 @@ exports.default = (0, vue_1.defineComponent)({
1178
1178
  }
1179
1179
  };
1180
1180
  const cssVarsRef = (0, vue_1.computed)(() => {
1181
- const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor, nodeWrapperPadding, nodeHeight, lineHeight } } = themeRef.value;
1181
+ const { common: { cubicBezierEaseInOut }, self: { fontSize, nodeBorderRadius, nodeColorHover, nodeColorPressed, nodeColorActive, arrowColor, loadingColor, nodeTextColor, nodeTextColorDisabled, dropMarkColor, nodeWrapperPadding, nodeHeight, lineHeight, lineColor } } = themeRef.value;
1182
1182
  const lineOffsetTop = (0, seemly_1.getPadding)(nodeWrapperPadding, 'top');
1183
1183
  const lineOffsetBottom = (0, seemly_1.getPadding)(nodeWrapperPadding, 'bottom');
1184
1184
  const nodeContentHeight = (0, seemly_1.pxfy)((0, seemly_1.depx)(nodeHeight) - (0, seemly_1.depx)(lineOffsetTop) - (0, seemly_1.depx)(lineOffsetBottom));
@@ -1198,7 +1198,8 @@ exports.default = (0, vue_1.defineComponent)({
1198
1198
  '--n-line-offset-top': `-${lineOffsetTop}`,
1199
1199
  '--n-line-offset-bottom': `-${lineOffsetBottom}`,
1200
1200
  '--n-node-content-height': nodeContentHeight,
1201
- '--n-line-height': lineHeight
1201
+ '--n-line-height': lineHeight,
1202
+ '--n-line-color': lineColor
1202
1203
  };
1203
1204
  });
1204
1205
  const themeClassHandle = inlineThemeDisabled
@@ -1241,7 +1242,9 @@ exports.default = (0, vue_1.defineComponent)({
1241
1242
  default: () => {
1242
1243
  var _a;
1243
1244
  (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
1244
- return ((0, vue_1.h)(vueuc_1.VVirtualList, { ref: "virtualListInstRef", items: this.fNodes, itemSize: (0, seemly_1.depx)(mergedTheme.self.nodeHeight), ignoreItemResize: this.aip, paddingTop: padding.top, paddingBottom: padding.bottom, class: this.themeClass, style: [
1245
+ return !fNodes.length ? ((0, _utils_1.resolveSlot)(this.$slots.empty, () => [
1246
+ (0, vue_1.h)(empty_1.NEmpty, { class: `${mergedClsPrefix}-tree__empty`, theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
1247
+ ])) : ((0, vue_1.h)(vueuc_1.VVirtualList, { ref: "virtualListInstRef", items: this.fNodes, itemSize: (0, seemly_1.depx)(mergedTheme.self.nodeHeight), ignoreItemResize: this.aip, paddingTop: padding.top, paddingBottom: padding.bottom, class: this.themeClass, style: [
1245
1248
  this.cssVars,
1246
1249
  {
1247
1250
  paddingLeft: padding.left,
@@ -28,7 +28,7 @@ const TreeNode = (0, vue_1.defineComponent)({
28
28
  setup(props) {
29
29
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
30
30
  const NTree = (0, vue_1.inject)(interface_1.treeInjectionKey);
31
- const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef, showLineRef } = NTree;
31
+ const { droppingNodeParentRef, droppingMouseNodeRef, draggingNodeRef, droppingPositionRef, droppingOffsetLevelRef, nodePropsRef, indentRef, blockLineRef, checkboxPlacementRef, checkOnClickRef, disabledFieldRef, showLineRef, renderSwitcherIconRef } = NTree;
32
32
  const checkboxDisabledRef = (0, vooks_1.useMemo)(() => !!props.tmNode.rawNode.checkboxDisabled);
33
33
  const nodeIsDisabledRef = (0, vooks_1.useMemo)(() => {
34
34
  return (0, utils_1.isNodeDisabled)(props.tmNode, disabledFieldRef.value);
@@ -49,29 +49,40 @@ const TreeNode = (0, vue_1.defineComponent)({
49
49
  contentElRef.value = contentInstRef.value.$el;
50
50
  });
51
51
  function handleSwitcherClick() {
52
- const { tmNode } = props;
53
- if (!tmNode.isLeaf && !tmNode.shallowLoaded) {
54
- if (!NTree.loadingKeysRef.value.has(tmNode.key)) {
55
- NTree.loadingKeysRef.value.add(tmNode.key);
52
+ const callback = () => {
53
+ const { tmNode } = props;
54
+ if (!tmNode.isLeaf && !tmNode.shallowLoaded) {
55
+ if (!NTree.loadingKeysRef.value.has(tmNode.key)) {
56
+ NTree.loadingKeysRef.value.add(tmNode.key);
57
+ }
58
+ else {
59
+ return;
60
+ }
61
+ const { onLoadRef: { value: onLoad } } = NTree;
62
+ if (onLoad) {
63
+ void onLoad(tmNode.rawNode)
64
+ .then((value) => {
65
+ if (value !== false) {
66
+ NTree.handleSwitcherClick(tmNode);
67
+ }
68
+ })
69
+ .finally(() => {
70
+ NTree.loadingKeysRef.value.delete(tmNode.key);
71
+ });
72
+ }
56
73
  }
57
74
  else {
58
- return;
59
- }
60
- const { onLoadRef: { value: onLoad } } = NTree;
61
- if (onLoad) {
62
- void onLoad(tmNode.rawNode)
63
- .then((value) => {
64
- if (value !== false) {
65
- NTree.handleSwitcherClick(tmNode);
66
- }
67
- })
68
- .finally(() => {
69
- NTree.loadingKeysRef.value.delete(tmNode.key);
70
- });
75
+ NTree.handleSwitcherClick(tmNode);
71
76
  }
77
+ };
78
+ if (renderSwitcherIconRef.value) {
79
+ // if renderSwitcherIcon is set, icon dom may be altered before event
80
+ // bubbles to parent dom, so that target check fails. Call it in next
81
+ // event loop so that event bubble phase is finishes.
82
+ setTimeout(callback, 0);
72
83
  }
73
84
  else {
74
- NTree.handleSwitcherClick(tmNode);
85
+ callback();
75
86
  }
76
87
  }
77
88
  const selectableRef = (0, vooks_1.useMemo)(() => !nodeIsDisabledRef.value &&
@@ -136,6 +136,7 @@ declare const _default: import("vue").DefineComponent<{
136
136
  nodeTextColorDisabled: string;
137
137
  loadingColor: string;
138
138
  dropMarkColor: string;
139
+ lineColor: string;
139
140
  };
140
141
  peers: {
141
142
  Checkbox: import("../../_mixins").Theme<"Checkbox", {
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  }>>, {
40
40
  hide: boolean;
41
41
  expanded: boolean;
42
- selected: boolean;
43
42
  loading: boolean;
43
+ selected: boolean;
44
44
  }, {}>;
45
45
  export default _default;
@@ -22,6 +22,7 @@ const iconSwitchTransitionNode = (0, icon_switch_cssr_1.iconSwitchTransition)();
22
22
  // --n-line-offset-bottom
23
23
  // --n-node-content-height
24
24
  // --n-line-height
25
+ // --n-line-color
25
26
  exports.default = (0, cssr_1.cB)('tree', `
26
27
  font-size: var(--n-font-size);
27
28
  outline: none;
@@ -53,9 +54,9 @@ exports.default = (0, cssr_1.cB)('tree', `
53
54
  min-width: 0;
54
55
  `)]), (0, cssr_1.cNotM)('block-line', [(0, cssr_1.cB)('tree-node', [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.cB)('tree-node-content', [(0, cssr_1.c)('&:hover', 'background: var(--n-node-color-hover);')]), (0, cssr_1.cM)('selectable', [(0, cssr_1.cB)('tree-node-content', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('pending', [(0, cssr_1.cB)('tree-node-content', `
55
56
  background: var(--n-node-color-hover);
56
- `)]), (0, cssr_1.cM)('selected', [(0, cssr_1.cB)('tree-node-content', 'background: var(--n-node-color-active);')])])])]), (0, cssr_1.cM)('block-line', [(0, cssr_1.cB)('tree-node', [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', 'background: var(--n-node-color-hover);'), (0, cssr_1.cM)('pending', `
57
+ `)])]), (0, cssr_1.cM)('selected', [(0, cssr_1.cB)('tree-node-content', 'background: var(--n-node-color-active);')])])]), (0, cssr_1.cM)('block-line', [(0, cssr_1.cB)('tree-node', [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', 'background: var(--n-node-color-hover);'), (0, cssr_1.cM)('pending', `
57
58
  background: var(--n-node-color-hover);
58
- `), (0, cssr_1.cM)('selectable', [(0, cssr_1.cNotM)('selected', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);')]), (0, cssr_1.cM)('disabled', `
59
+ `), (0, cssr_1.cM)('selectable', [(0, cssr_1.cNotM)('selected', [(0, cssr_1.c)('&:active', 'background: var(--n-node-color-pressed);')])]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);')]), (0, cssr_1.cM)('selected', 'background: var(--n-node-color-active);'), (0, cssr_1.cM)('disabled', `
59
60
  cursor: not-allowed;
60
61
  `)])]), (0, cssr_1.cB)('tree-node-indent', `
61
62
  flex-grow: 0;
@@ -63,7 +64,7 @@ exports.default = (0, cssr_1.cB)('tree', `
63
64
  `, [(0, cssr_1.cM)('show-line', 'position: relative', [(0, cssr_1.c)('&::before', `
64
65
  position: absolute;
65
66
  left: 50%;
66
- border-left: 1px solid var(--n-border-color);
67
+ border-left: 1px solid var(--n-line-color);
67
68
  transition: border-color .3s var(--n-bezier);
68
69
  transform: translate(-50%);
69
70
  content: "";
@@ -17,3 +17,4 @@ export declare function filterTree(tree: TreeOption[], filter: (pattern: string,
17
17
  expandedKeys: Key[];
18
18
  highlightKeySet: Set<Key>;
19
19
  };
20
+ export declare function treeGetClickTarget(e: MouseEvent): 'checkbox' | 'switcher' | 'node';
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterTree = exports.emptyImage = exports.keysWithFilter = exports.isNodeDisabled = exports.useMergedCheckStrategy = void 0;
3
+ exports.treeGetClickTarget = exports.filterTree = exports.emptyImage = exports.keysWithFilter = exports.isNodeDisabled = exports.useMergedCheckStrategy = void 0;
4
4
  const vue_1 = require("vue");
5
5
  const _utils_1 = require("../../_utils");
6
+ const seemly_1 = require("seemly");
6
7
  function useMergedCheckStrategy(props) {
7
8
  return (0, vue_1.computed)(() => (props.leafOnly ? 'child' : props.checkStrategy));
8
9
  }
@@ -120,3 +121,15 @@ function filterTree(tree, filter, pattern, keyField, childrenField) {
120
121
  };
121
122
  }
122
123
  exports.filterTree = filterTree;
124
+ function treeGetClickTarget(e) {
125
+ if ((0, seemly_1.happensIn)(e, 'checkbox')) {
126
+ return 'checkbox';
127
+ }
128
+ else if ((0, seemly_1.happensIn)(e, 'switcher')) {
129
+ return 'switcher';
130
+ }
131
+ else {
132
+ return 'node';
133
+ }
134
+ }
135
+ exports.treeGetClickTarget = treeGetClickTarget;
@@ -13,6 +13,7 @@ export declare const self: (vars: ThemeCommonVars) => {
13
13
  nodeTextColorDisabled: string;
14
14
  loadingColor: string;
15
15
  dropMarkColor: string;
16
+ lineColor: string;
16
17
  };
17
18
  export type TreeThemeVars = ReturnType<typeof self>;
18
19
  declare const treeLight: import("../../_mixins/use-theme").Theme<"Tree", {
@@ -29,6 +30,7 @@ declare const treeLight: import("../../_mixins/use-theme").Theme<"Tree", {
29
30
  nodeTextColorDisabled: string;
30
31
  loadingColor: string;
31
32
  dropMarkColor: string;
33
+ lineColor: string;
32
34
  }, {
33
35
  Checkbox: import("../../_mixins/use-theme").Theme<"Checkbox", {
34
36
  labelLineHeight: string;
@@ -8,7 +8,7 @@ const styles_3 = require("../../_internal/scrollbar/styles");
8
8
  const common_1 = require("../../_styles/common");
9
9
  const use_theme_1 = require("../../_mixins/use-theme");
10
10
  const self = (vars) => {
11
- const { borderRadiusSmall, hoverColor, pressedColor, primaryColor, textColor3, textColor2, textColorDisabled, fontSize } = vars;
11
+ const { borderRadiusSmall, dividerColor, hoverColor, pressedColor, primaryColor, textColor3, textColor2, textColorDisabled, fontSize } = vars;
12
12
  return {
13
13
  fontSize,
14
14
  lineHeight: '1.5',
@@ -22,7 +22,8 @@ const self = (vars) => {
22
22
  nodeTextColor: textColor2,
23
23
  nodeTextColorDisabled: textColorDisabled,
24
24
  loadingColor: primaryColor,
25
- dropMarkColor: primaryColor
25
+ dropMarkColor: primaryColor,
26
+ lineColor: dividerColor
26
27
  };
27
28
  };
28
29
  exports.self = self;