naive-ui 2.32.0 → 2.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/README.zh-CN.md +1 -1
  2. package/dist/index.js +46388 -42920
  3. package/dist/index.prod.js +2 -2
  4. package/es/_internal/scrollbar/src/Scrollbar.js +2 -1
  5. package/es/_internal/select-menu/styles/light.js +1 -1
  6. package/es/_internal/selection/src/Selection.js +1 -1
  7. package/es/_utils/cssr/index.js +4 -4
  8. package/es/alert/src/Alert.d.ts +14 -0
  9. package/es/alert/src/Alert.js +11 -2
  10. package/es/alert/src/styles/index.cssr.js +11 -2
  11. package/es/alert/styles/dark.js +5 -1
  12. package/es/anchor/styles/light.js +2 -1
  13. package/es/auto-complete/src/AutoComplete.d.ts +14 -1
  14. package/es/auto-complete/src/AutoComplete.js +22 -16
  15. package/es/auto-complete/styles/light.d.ts +1 -0
  16. package/es/breadcrumb/styles/light.js +1 -1
  17. package/es/button/styles/light.js +5 -1
  18. package/es/card/styles/light.js +1 -1
  19. package/es/carousel/src/Carousel.js +7 -5
  20. package/es/cascader/src/Cascader.d.ts +13 -0
  21. package/es/cascader/src/Cascader.js +12 -4
  22. package/es/checkbox/src/CheckboxGroup.js +2 -2
  23. package/es/checkbox/styles/light.js +1 -1
  24. package/es/collapse/src/Collapse.d.ts +22 -0
  25. package/es/collapse/src/Collapse.js +4 -2
  26. package/es/collapse/src/CollapseItem.d.ts +6 -1
  27. package/es/collapse/src/CollapseItem.js +4 -2
  28. package/es/collapse/src/styles/index.cssr.js +10 -21
  29. package/es/collapse/styles/light.d.ts +2 -0
  30. package/es/collapse/styles/light.js +5 -3
  31. package/es/color-picker/src/ColorInputUnit.d.ts +1 -0
  32. package/es/color-picker/src/ColorPicker.d.ts +9 -0
  33. package/es/color-picker/src/ColorPicker.js +3 -2
  34. package/es/color-picker/styles/light.d.ts +1 -0
  35. package/es/countdown/src/Countdown.js +1 -1
  36. package/es/data-table/src/DataTable.d.ts +18 -0
  37. package/es/data-table/src/DataTable.js +6 -3
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +4 -2
  40. package/es/data-table/src/TableParts/Body.d.ts +6 -0
  41. package/es/data-table/src/TableParts/Body.js +22 -14
  42. package/es/data-table/src/TableParts/Cell.d.ts +4 -0
  43. package/es/data-table/src/TableParts/ExpandTrigger.d.ts +7 -1
  44. package/es/data-table/src/TableParts/ExpandTrigger.js +15 -9
  45. package/es/data-table/src/TableParts/Header.d.ts +3 -1
  46. package/es/data-table/src/interface.d.ts +6 -3
  47. package/es/data-table/src/styles/index.cssr.js +25 -7
  48. package/es/data-table/src/use-expand.d.ts +3 -1
  49. package/es/data-table/src/use-expand.js +15 -8
  50. package/es/data-table/src/use-group-header.js +1 -1
  51. package/es/data-table/src/use-sorter.js +1 -1
  52. package/es/data-table/src/use-table-data.js +1 -1
  53. package/es/data-table/styles/light.d.ts +1 -0
  54. package/es/date-picker/src/DatePicker.d.ts +23 -2
  55. package/es/date-picker/src/DatePicker.js +4 -4
  56. package/es/date-picker/src/panel/date.d.ts +6 -3
  57. package/es/date-picker/src/panel/daterange.d.ts +3 -0
  58. package/es/date-picker/src/panel/datetime.d.ts +3 -0
  59. package/es/date-picker/src/panel/datetimerange.d.ts +3 -0
  60. package/es/date-picker/src/panel/month.d.ts +3 -0
  61. package/es/date-picker/src/panel/monthrange.d.ts +3 -0
  62. package/es/date-picker/src/panel/panelHeader.d.ts +6 -0
  63. package/es/date-picker/src/panel/panelHeader.js +3 -1
  64. package/es/date-picker/src/panel/use-calendar.d.ts +3 -0
  65. package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -0
  66. package/es/date-picker/src/panel/use-panel-common.d.ts +3 -0
  67. package/es/date-picker/src/styles/index.cssr.js +6 -6
  68. package/es/date-picker/styles/light.d.ts +2 -0
  69. package/es/descriptions/styles/light.js +1 -1
  70. package/es/drawer/src/Drawer.d.ts +8 -8
  71. package/es/drawer/src/Drawer.js +3 -3
  72. package/es/drawer/src/DrawerBodyWrapper.d.ts +1 -0
  73. package/es/drawer/src/DrawerBodyWrapper.js +6 -0
  74. package/es/drawer/src/styles/rtl.cssr.d.ts +2 -0
  75. package/es/drawer/src/styles/rtl.cssr.js +8 -0
  76. package/es/drawer/styles/index.d.ts +1 -0
  77. package/es/drawer/styles/index.js +1 -0
  78. package/es/drawer/styles/rtl.d.ts +3 -0
  79. package/es/drawer/styles/rtl.js +8 -0
  80. package/es/dropdown/src/Dropdown.js +6 -6
  81. package/es/dropdown/src/styles/index.cssr.js +35 -33
  82. package/es/dynamic-input/src/DynamicInput.d.ts +10 -0
  83. package/es/dynamic-input/src/InputPreset.d.ts +1 -0
  84. package/es/dynamic-input/src/PairPreset.d.ts +1 -0
  85. package/es/dynamic-input/styles/light.d.ts +1 -0
  86. package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
  87. package/es/dynamic-tags/styles/light.d.ts +1 -0
  88. package/es/empty/styles/light.js +1 -1
  89. package/es/grid/src/Grid.d.ts +5 -0
  90. package/es/grid/src/Grid.js +18 -0
  91. package/es/grid/src/GridItem.d.ts +2 -0
  92. package/es/grid/src/GridItem.js +15 -2
  93. package/es/input/src/Input.d.ts +21 -1
  94. package/es/input/src/Input.js +23 -6
  95. package/es/input/src/InputGroupLabel.d.ts +9 -0
  96. package/es/input/src/styles/input.cssr.d.ts +1 -0
  97. package/es/input/src/styles/input.cssr.js +12 -4
  98. package/es/input/styles/dark.js +1 -1
  99. package/es/input/styles/light.d.ts +1 -0
  100. package/es/input/styles/light.js +1 -1
  101. package/es/input-number/src/InputNumber.d.ts +15 -5
  102. package/es/input-number/src/InputNumber.js +6 -8
  103. package/es/input-number/src/interface.d.ts +1 -0
  104. package/es/input-number/styles/light.d.ts +1 -0
  105. package/es/layout/src/Layout.js +3 -1
  106. package/es/legacy-grid/src/Row.js +2 -2
  107. package/es/legacy-transfer/src/Transfer.d.ts +10 -0
  108. package/es/legacy-transfer/src/TransferFilter.d.ts +1 -0
  109. package/es/legacy-transfer/src/TransferList.d.ts +1 -0
  110. package/es/legacy-transfer/src/TransferListItem.d.ts +1 -0
  111. package/es/legacy-transfer/styles/light.d.ts +1 -0
  112. package/es/list/src/List.d.ts +47 -3
  113. package/es/list/src/List.js +17 -7
  114. package/es/list/src/ListItem.d.ts +1 -0
  115. package/es/list/src/ListItem.js +3 -1
  116. package/es/list/src/styles/index.cssr.js +35 -12
  117. package/es/list/src/styles/rtl.cssr.d.ts +2 -0
  118. package/es/list/src/styles/rtl.cssr.js +11 -0
  119. package/es/list/styles/index.d.ts +1 -0
  120. package/es/list/styles/index.js +1 -0
  121. package/es/list/styles/light.d.ts +3 -0
  122. package/es/list/styles/light.js +4 -1
  123. package/es/list/styles/rtl.d.ts +2 -0
  124. package/es/list/styles/rtl.js +5 -0
  125. package/es/locales/common/viVN.js +7 -9
  126. package/es/mention/src/Mention.d.ts +10 -0
  127. package/es/mention/styles/light.d.ts +1 -0
  128. package/es/menu/src/Menu.d.ts +13 -0
  129. package/es/menu/src/Menu.js +4 -1
  130. package/es/menu/src/Submenu.js +1 -1
  131. package/es/menu/src/utils.d.ts +1 -1
  132. package/es/menu/src/utils.js +5 -1
  133. package/es/message/src/Message.d.ts +1 -0
  134. package/es/message/src/Message.js +8 -3
  135. package/es/message/src/styles/rtl.cssr.d.ts +2 -0
  136. package/es/message/src/styles/rtl.cssr.js +8 -0
  137. package/es/message/styles/index.d.ts +1 -0
  138. package/es/message/styles/index.js +1 -0
  139. package/es/message/styles/light.js +4 -1
  140. package/es/message/styles/rtl.d.ts +2 -0
  141. package/es/message/styles/rtl.js +5 -0
  142. package/es/modal/src/Modal.js +2 -1
  143. package/es/notification/styles/light.js +3 -1
  144. package/es/number-animation/src/NumberAnimation.js +1 -1
  145. package/es/pagination/src/Pagination.d.ts +31 -26
  146. package/es/pagination/src/Pagination.js +207 -164
  147. package/es/pagination/src/styles/index.cssr.js +7 -1
  148. package/es/pagination/styles/light.d.ts +1 -0
  149. package/es/popover/src/Popover.js +2 -2
  150. package/es/popover/src/PopoverBody.js +3 -2
  151. package/es/popselect/src/Popselect.d.ts +3 -3
  152. package/es/radio/styles/dark.js +1 -1
  153. package/es/radio/styles/light.js +1 -1
  154. package/es/select/index.d.ts +1 -1
  155. package/es/select/src/Select.d.ts +4 -1
  156. package/es/select/src/Select.js +4 -4
  157. package/es/skeleton/src/Skeleton.js +1 -1
  158. package/es/slider/styles/dark.js +2 -1
  159. package/es/slider/styles/light.js +2 -1
  160. package/es/statistic/src/Statistic.d.ts +10 -0
  161. package/es/statistic/src/Statistic.js +2 -1
  162. package/es/statistic/src/styles/index.cssr.js +4 -3
  163. package/es/statistic/styles/light.d.ts +1 -0
  164. package/es/statistic/styles/light.js +1 -0
  165. package/es/steps/src/Steps.d.ts +1 -0
  166. package/es/steps/src/Steps.js +6 -3
  167. package/es/steps/src/styles/rtl.cssr.d.ts +2 -0
  168. package/es/steps/src/styles/rtl.cssr.js +14 -0
  169. package/es/steps/styles/index.d.ts +1 -0
  170. package/es/steps/styles/index.js +1 -0
  171. package/es/steps/styles/rtl.d.ts +2 -0
  172. package/es/steps/styles/rtl.js +5 -0
  173. package/es/styles.d.ts +4 -3
  174. package/es/styles.js +4 -3
  175. package/es/switch/src/Switch.js +32 -5
  176. package/es/switch/src/styles/index.cssr.js +2 -2
  177. package/es/tag/src/Tag.d.ts +4 -4
  178. package/es/tag/src/Tag.js +3 -3
  179. package/es/tag/src/styles/index.cssr.js +0 -1
  180. package/es/tag/styles/light.js +4 -1
  181. package/es/thing/src/Thing.d.ts +19 -21
  182. package/es/thing/src/Thing.js +4 -7
  183. package/es/time-picker/src/Panel.d.ts +1 -0
  184. package/es/time-picker/src/TimePicker.d.ts +12 -2
  185. package/es/time-picker/src/TimePicker.js +4 -4
  186. package/es/time-picker/src/styles/index.cssr.js +12 -12
  187. package/es/time-picker/styles/light.d.ts +1 -0
  188. package/es/timeline/src/TimelineItem.js +1 -1
  189. package/es/tooltip/styles/dark.js +1 -1
  190. package/es/tooltip/styles/light.js +1 -1
  191. package/es/transfer/src/Transfer.d.ts +37 -6
  192. package/es/transfer/src/Transfer.js +32 -23
  193. package/es/transfer/src/TransferFilter.d.ts +1 -0
  194. package/es/transfer/src/TransferList.d.ts +1 -0
  195. package/es/transfer/src/TransferList.js +1 -1
  196. package/es/transfer/src/TransferListItem.d.ts +1 -0
  197. package/es/transfer/src/interface.d.ts +1 -1
  198. package/es/transfer/src/use-transfer-data.d.ts +11 -4
  199. package/es/transfer/src/use-transfer-data.js +59 -16
  200. package/es/transfer/styles/light.d.ts +1 -0
  201. package/es/tree/index.d.ts +1 -1
  202. package/es/tree/src/Tree.d.ts +34 -1
  203. package/es/tree/src/Tree.js +25 -11
  204. package/es/tree/src/interface.d.ts +5 -0
  205. package/es/tree/src/keyboard.d.ts +4 -1
  206. package/es/tree/src/keyboard.js +3 -1
  207. package/es/tree-select/src/TreeSelect.d.ts +13 -0
  208. package/es/tree-select/src/TreeSelect.js +4 -4
  209. package/es/typography/styles/light.js +1 -1
  210. package/es/upload/src/Upload.d.ts +10 -0
  211. package/es/upload/src/Upload.js +1 -1
  212. package/es/upload/src/UploadFile.js +4 -2
  213. package/es/upload/src/utils.d.ts +1 -0
  214. package/es/upload/src/utils.js +12 -0
  215. package/es/version.d.ts +1 -1
  216. package/es/version.js +1 -1
  217. package/lib/_internal/scrollbar/src/Scrollbar.js +2 -1
  218. package/lib/_internal/select-menu/styles/light.js +1 -1
  219. package/lib/_internal/selection/src/Selection.js +1 -1
  220. package/lib/_utils/cssr/index.js +2 -2
  221. package/lib/alert/src/Alert.d.ts +14 -0
  222. package/lib/alert/src/Alert.js +11 -2
  223. package/lib/alert/src/styles/index.cssr.js +11 -2
  224. package/lib/alert/styles/dark.js +5 -1
  225. package/lib/anchor/styles/light.js +2 -1
  226. package/lib/auto-complete/src/AutoComplete.d.ts +14 -1
  227. package/lib/auto-complete/src/AutoComplete.js +22 -16
  228. package/lib/auto-complete/styles/light.d.ts +1 -0
  229. package/lib/breadcrumb/styles/light.js +1 -1
  230. package/lib/button/styles/light.js +5 -1
  231. package/lib/card/styles/light.js +1 -1
  232. package/lib/carousel/src/Carousel.js +7 -5
  233. package/lib/cascader/src/Cascader.d.ts +13 -0
  234. package/lib/cascader/src/Cascader.js +11 -3
  235. package/lib/checkbox/src/CheckboxGroup.js +2 -2
  236. package/lib/checkbox/styles/light.js +1 -1
  237. package/lib/collapse/src/Collapse.d.ts +22 -0
  238. package/lib/collapse/src/Collapse.js +4 -2
  239. package/lib/collapse/src/CollapseItem.d.ts +6 -1
  240. package/lib/collapse/src/CollapseItem.js +4 -2
  241. package/lib/collapse/src/styles/index.cssr.js +10 -21
  242. package/lib/collapse/styles/light.d.ts +2 -0
  243. package/lib/collapse/styles/light.js +5 -3
  244. package/lib/color-picker/src/ColorInputUnit.d.ts +1 -0
  245. package/lib/color-picker/src/ColorPicker.d.ts +9 -0
  246. package/lib/color-picker/src/ColorPicker.js +2 -1
  247. package/lib/color-picker/styles/light.d.ts +1 -0
  248. package/lib/countdown/src/Countdown.js +1 -1
  249. package/lib/data-table/src/DataTable.d.ts +18 -0
  250. package/lib/data-table/src/DataTable.js +6 -3
  251. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  252. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +4 -2
  253. package/lib/data-table/src/TableParts/Body.d.ts +6 -0
  254. package/lib/data-table/src/TableParts/Body.js +22 -14
  255. package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
  256. package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +7 -1
  257. package/lib/data-table/src/TableParts/ExpandTrigger.js +15 -9
  258. package/lib/data-table/src/TableParts/Header.d.ts +3 -1
  259. package/lib/data-table/src/interface.d.ts +6 -3
  260. package/lib/data-table/src/styles/index.cssr.js +25 -7
  261. package/lib/data-table/src/use-expand.d.ts +3 -1
  262. package/lib/data-table/src/use-expand.js +15 -8
  263. package/lib/data-table/src/use-group-header.js +1 -1
  264. package/lib/data-table/src/use-sorter.js +1 -1
  265. package/lib/data-table/src/use-table-data.js +1 -1
  266. package/lib/data-table/styles/light.d.ts +1 -0
  267. package/lib/date-picker/src/DatePicker.d.ts +23 -2
  268. package/lib/date-picker/src/DatePicker.js +3 -3
  269. package/lib/date-picker/src/panel/date.d.ts +6 -3
  270. package/lib/date-picker/src/panel/daterange.d.ts +3 -0
  271. package/lib/date-picker/src/panel/datetime.d.ts +3 -0
  272. package/lib/date-picker/src/panel/datetimerange.d.ts +3 -0
  273. package/lib/date-picker/src/panel/month.d.ts +3 -0
  274. package/lib/date-picker/src/panel/monthrange.d.ts +3 -0
  275. package/lib/date-picker/src/panel/panelHeader.d.ts +6 -0
  276. package/lib/date-picker/src/panel/panelHeader.js +3 -1
  277. package/lib/date-picker/src/panel/use-calendar.d.ts +3 -0
  278. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -0
  279. package/lib/date-picker/src/panel/use-panel-common.d.ts +3 -0
  280. package/lib/date-picker/src/styles/index.cssr.js +6 -6
  281. package/lib/date-picker/styles/light.d.ts +2 -0
  282. package/lib/descriptions/styles/light.js +1 -1
  283. package/lib/drawer/src/Drawer.d.ts +8 -8
  284. package/lib/drawer/src/Drawer.js +3 -3
  285. package/lib/drawer/src/DrawerBodyWrapper.d.ts +1 -0
  286. package/lib/drawer/src/DrawerBodyWrapper.js +6 -0
  287. package/lib/drawer/src/styles/rtl.cssr.d.ts +2 -0
  288. package/lib/drawer/src/styles/rtl.cssr.js +15 -0
  289. package/lib/drawer/styles/index.d.ts +1 -0
  290. package/lib/drawer/styles/index.js +3 -1
  291. package/lib/drawer/styles/rtl.d.ts +3 -0
  292. package/lib/drawer/styles/rtl.js +14 -0
  293. package/lib/dropdown/src/Dropdown.js +6 -6
  294. package/lib/dropdown/src/styles/index.cssr.js +35 -33
  295. package/lib/dynamic-input/src/DynamicInput.d.ts +10 -0
  296. package/lib/dynamic-input/src/InputPreset.d.ts +1 -0
  297. package/lib/dynamic-input/src/PairPreset.d.ts +1 -0
  298. package/lib/dynamic-input/styles/light.d.ts +1 -0
  299. package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
  300. package/lib/dynamic-tags/styles/light.d.ts +1 -0
  301. package/lib/empty/styles/light.js +1 -1
  302. package/lib/grid/src/Grid.d.ts +5 -0
  303. package/lib/grid/src/Grid.js +18 -0
  304. package/lib/grid/src/GridItem.d.ts +2 -0
  305. package/lib/grid/src/GridItem.js +14 -1
  306. package/lib/input/src/Input.d.ts +21 -1
  307. package/lib/input/src/Input.js +45 -5
  308. package/lib/input/src/InputGroupLabel.d.ts +9 -0
  309. package/lib/input/src/styles/input.cssr.d.ts +1 -0
  310. package/lib/input/src/styles/input.cssr.js +13 -4
  311. package/lib/input/styles/dark.js +1 -1
  312. package/lib/input/styles/light.d.ts +1 -0
  313. package/lib/input/styles/light.js +1 -1
  314. package/lib/input-number/src/InputNumber.d.ts +15 -5
  315. package/lib/input-number/src/InputNumber.js +6 -8
  316. package/lib/input-number/src/interface.d.ts +1 -0
  317. package/lib/input-number/styles/light.d.ts +1 -0
  318. package/lib/layout/src/Layout.js +3 -1
  319. package/lib/legacy-grid/src/Row.js +2 -2
  320. package/lib/legacy-transfer/src/Transfer.d.ts +10 -0
  321. package/lib/legacy-transfer/src/TransferFilter.d.ts +1 -0
  322. package/lib/legacy-transfer/src/TransferList.d.ts +1 -0
  323. package/lib/legacy-transfer/src/TransferListItem.d.ts +1 -0
  324. package/lib/legacy-transfer/styles/light.d.ts +1 -0
  325. package/lib/list/src/List.d.ts +47 -3
  326. package/lib/list/src/List.js +15 -5
  327. package/lib/list/src/ListItem.d.ts +1 -0
  328. package/lib/list/src/ListItem.js +3 -1
  329. package/lib/list/src/styles/index.cssr.js +35 -12
  330. package/lib/list/src/styles/rtl.cssr.d.ts +2 -0
  331. package/lib/list/src/styles/rtl.cssr.js +18 -0
  332. package/lib/list/styles/index.d.ts +1 -0
  333. package/lib/list/styles/index.js +3 -1
  334. package/lib/list/styles/light.d.ts +3 -0
  335. package/lib/list/styles/light.js +4 -1
  336. package/lib/list/styles/rtl.d.ts +2 -0
  337. package/lib/list/styles/rtl.js +11 -0
  338. package/lib/locales/common/viVN.js +7 -9
  339. package/lib/mention/src/Mention.d.ts +10 -0
  340. package/lib/mention/styles/light.d.ts +1 -0
  341. package/lib/menu/src/Menu.d.ts +13 -0
  342. package/lib/menu/src/Menu.js +4 -1
  343. package/lib/menu/src/Submenu.js +1 -1
  344. package/lib/menu/src/utils.d.ts +1 -1
  345. package/lib/menu/src/utils.js +5 -1
  346. package/lib/message/src/Message.d.ts +1 -0
  347. package/lib/message/src/Message.js +7 -2
  348. package/lib/message/src/styles/rtl.cssr.d.ts +2 -0
  349. package/lib/message/src/styles/rtl.cssr.js +15 -0
  350. package/lib/message/styles/index.d.ts +1 -0
  351. package/lib/message/styles/index.js +3 -1
  352. package/lib/message/styles/light.js +4 -1
  353. package/lib/message/styles/rtl.d.ts +2 -0
  354. package/lib/message/styles/rtl.js +11 -0
  355. package/lib/modal/src/Modal.js +2 -1
  356. package/lib/notification/styles/light.js +3 -1
  357. package/lib/number-animation/src/NumberAnimation.js +1 -1
  358. package/lib/pagination/src/Pagination.d.ts +31 -26
  359. package/lib/pagination/src/Pagination.js +206 -163
  360. package/lib/pagination/src/styles/index.cssr.js +7 -1
  361. package/lib/pagination/styles/light.d.ts +1 -0
  362. package/lib/popover/src/Popover.js +2 -2
  363. package/lib/popover/src/PopoverBody.js +3 -2
  364. package/lib/popselect/src/Popselect.d.ts +3 -3
  365. package/lib/radio/styles/dark.js +1 -1
  366. package/lib/radio/styles/light.js +1 -1
  367. package/lib/select/index.d.ts +1 -1
  368. package/lib/select/src/Select.d.ts +4 -1
  369. package/lib/select/src/Select.js +3 -3
  370. package/lib/skeleton/src/Skeleton.js +1 -1
  371. package/lib/slider/styles/dark.js +2 -1
  372. package/lib/slider/styles/light.js +2 -1
  373. package/lib/statistic/src/Statistic.d.ts +10 -0
  374. package/lib/statistic/src/Statistic.js +2 -1
  375. package/lib/statistic/src/styles/index.cssr.js +4 -3
  376. package/lib/statistic/styles/light.d.ts +1 -0
  377. package/lib/statistic/styles/light.js +1 -0
  378. package/lib/steps/src/Steps.d.ts +1 -0
  379. package/lib/steps/src/Steps.js +5 -2
  380. package/lib/steps/src/styles/rtl.cssr.d.ts +2 -0
  381. package/lib/steps/src/styles/rtl.cssr.js +21 -0
  382. package/lib/steps/styles/index.d.ts +1 -0
  383. package/lib/steps/styles/index.js +3 -1
  384. package/lib/steps/styles/rtl.d.ts +2 -0
  385. package/lib/steps/styles/rtl.js +11 -0
  386. package/lib/styles.d.ts +4 -3
  387. package/lib/styles.js +154 -149
  388. package/lib/switch/src/Switch.js +32 -5
  389. package/lib/switch/src/styles/index.cssr.js +2 -2
  390. package/lib/tag/src/Tag.d.ts +4 -4
  391. package/lib/tag/src/Tag.js +3 -3
  392. package/lib/tag/src/styles/index.cssr.js +0 -1
  393. package/lib/tag/styles/light.js +4 -1
  394. package/lib/thing/src/Thing.d.ts +19 -21
  395. package/lib/thing/src/Thing.js +4 -7
  396. package/lib/time-picker/src/Panel.d.ts +1 -0
  397. package/lib/time-picker/src/TimePicker.d.ts +12 -2
  398. package/lib/time-picker/src/TimePicker.js +3 -3
  399. package/lib/time-picker/src/styles/index.cssr.js +12 -12
  400. package/lib/time-picker/styles/light.d.ts +1 -0
  401. package/lib/timeline/src/TimelineItem.js +1 -1
  402. package/lib/tooltip/styles/dark.js +1 -1
  403. package/lib/tooltip/styles/light.js +1 -1
  404. package/lib/transfer/src/Transfer.d.ts +37 -6
  405. package/lib/transfer/src/Transfer.js +32 -23
  406. package/lib/transfer/src/TransferFilter.d.ts +1 -0
  407. package/lib/transfer/src/TransferList.d.ts +1 -0
  408. package/lib/transfer/src/TransferList.js +1 -1
  409. package/lib/transfer/src/TransferListItem.d.ts +1 -0
  410. package/lib/transfer/src/interface.d.ts +1 -1
  411. package/lib/transfer/src/use-transfer-data.d.ts +11 -4
  412. package/lib/transfer/src/use-transfer-data.js +59 -16
  413. package/lib/transfer/styles/light.d.ts +1 -0
  414. package/lib/tree/index.d.ts +1 -1
  415. package/lib/tree/src/Tree.d.ts +34 -1
  416. package/lib/tree/src/Tree.js +25 -11
  417. package/lib/tree/src/interface.d.ts +5 -0
  418. package/lib/tree/src/keyboard.d.ts +4 -1
  419. package/lib/tree/src/keyboard.js +3 -1
  420. package/lib/tree-select/src/TreeSelect.d.ts +13 -0
  421. package/lib/tree-select/src/TreeSelect.js +3 -3
  422. package/lib/typography/styles/light.js +1 -1
  423. package/lib/upload/src/Upload.d.ts +10 -0
  424. package/lib/upload/src/Upload.js +1 -1
  425. package/lib/upload/src/UploadFile.js +3 -1
  426. package/lib/upload/src/utils.d.ts +1 -0
  427. package/lib/upload/src/utils.js +14 -1
  428. package/lib/version.d.ts +1 -1
  429. package/lib/version.js +1 -1
  430. package/package.json +25 -19
  431. package/volar.d.ts +1 -1
  432. package/web-types.json +210 -3
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<{
9
9
  }, {
10
10
  getScrollContainer: () => HTMLElement | null;
11
11
  scrollTo: import("../../../scrollbar/src/Scrollbar").ScrollTo;
12
+ bodyWidth: import("vue").Ref<number | null>;
12
13
  dataTableSlots: Readonly<{
13
14
  [name: string]: import("vue").Slot | undefined;
14
15
  }>;
@@ -658,6 +659,7 @@ declare const _default: import("vue").DefineComponent<{
658
659
  }>;
659
660
  }>;
660
661
  Input: import("../../../_mixins").Theme<"Input", {
662
+ countTextColorDisabled: string;
661
663
  countTextColor: string;
662
664
  heightTiny: string;
663
665
  heightSmall: string;
@@ -990,6 +992,7 @@ declare const _default: import("vue").DefineComponent<{
990
992
  }>;
991
993
  }>> | undefined;
992
994
  Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
995
+ countTextColorDisabled: string;
993
996
  countTextColor: string;
994
997
  heightTiny: string;
995
998
  heightSmall: string;
@@ -1202,6 +1205,9 @@ declare const _default: import("vue").DefineComponent<{
1202
1205
  rowProps: import("vue").Ref<import("../interface").CreateRowProps<import("../interface").InternalRowData> | undefined>;
1203
1206
  maxHeight: import("vue").Ref<string | number | undefined>;
1204
1207
  loadingKeySet: import("vue").Ref<Set<RowKey>>;
1208
+ expandable: import("vue").Ref<import("../interface").Expandable<any> | undefined>;
1209
+ stickyExpandedRows: import("vue").Ref<boolean>;
1210
+ renderExpandIcon: import("vue").Ref<(() => import("vue").VNodeChild) | undefined>;
1205
1211
  setHeaderScrollLeft: (scrollLeft: number) => void;
1206
1212
  handleMouseenterTable: () => void;
1207
1213
  handleVirtualListScroll: (e: Event) => void;
@@ -85,7 +85,7 @@ exports.default = (0, vue_1.defineComponent)({
85
85
  bodyStyle: Object
86
86
  },
87
87
  setup(props) {
88
- const { slots: dataTableSlots, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, onLoadRef, loadingKeySetRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell
88
+ const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell
89
89
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
90
90
  } = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
91
91
  const scrollbarInstRef = (0, vue_1.ref)(null);
@@ -280,7 +280,7 @@ exports.default = (0, vue_1.defineComponent)({
280
280
  id: `n-${componentId}`
281
281
  });
282
282
  });
283
- return Object.assign({ dataTableSlots,
283
+ return Object.assign({ bodyWidth: bodyWidthRef, dataTableSlots,
284
284
  componentId,
285
285
  scrollbarInstRef,
286
286
  virtualListRef,
@@ -312,7 +312,7 @@ exports.default = (0, vue_1.defineComponent)({
312
312
  data,
313
313
  hasChildren
314
314
  };
315
- }), rawPaginatedData: rawPaginatedDataRef, fixedColumnLeftMap: fixedColumnLeftMapRef, fixedColumnRightMap: fixedColumnRightMapRef, currentPage: mergedCurrentPageRef, rowClassName: rowClassNameRef, renderExpand: renderExpandRef, mergedExpandedRowKeySet: mergedExpandedRowKeySetRef, hoverKey: hoverKeyRef, mergedSortState: mergedSortStateRef, virtualScroll: virtualScrollRef, mergedTableLayout: mergedTableLayoutRef, childTriggerColIndex: childTriggerColIndexRef, indent: indentRef, rowProps: rowPropsRef, maxHeight: maxHeightRef, loadingKeySet: loadingKeySetRef, setHeaderScrollLeft,
315
+ }), rawPaginatedData: rawPaginatedDataRef, fixedColumnLeftMap: fixedColumnLeftMapRef, fixedColumnRightMap: fixedColumnRightMapRef, currentPage: mergedCurrentPageRef, rowClassName: rowClassNameRef, renderExpand: renderExpandRef, mergedExpandedRowKeySet: mergedExpandedRowKeySetRef, hoverKey: hoverKeyRef, mergedSortState: mergedSortStateRef, virtualScroll: virtualScrollRef, mergedTableLayout: mergedTableLayoutRef, childTriggerColIndex: childTriggerColIndexRef, indent: indentRef, rowProps: rowPropsRef, maxHeight: maxHeightRef, loadingKeySet: loadingKeySetRef, expandable: expandableRef, stickyExpandedRows: stickyExpandedRowsRef, renderExpandIcon: renderExpandIconRef, setHeaderScrollLeft,
316
316
  handleMouseenterTable,
317
317
  handleVirtualListScroll,
318
318
  handleVirtualListResize,
@@ -345,7 +345,7 @@ exports.default = (0, vue_1.defineComponent)({
345
345
  const cordToPass = {};
346
346
  // coordinate to related hover keys
347
347
  const cordKey = {};
348
- const { cols, paginatedDataAndInfo, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId, childTriggerColIndex, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleRadioUpdateChecked, handleUpdateExpanded } = this;
348
+ const { cols, paginatedDataAndInfo, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, stickyExpandedRows, componentId, childTriggerColIndex, expandable, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleRadioUpdateChecked, handleUpdateExpanded } = this;
349
349
  const { length: colCount } = cols;
350
350
  let mergedData;
351
351
  // if there is children in data, we should expand mergedData first
@@ -393,7 +393,9 @@ exports.default = (0, vue_1.defineComponent)({
393
393
  // Tile the data of the expanded row
394
394
  const displayedData = [];
395
395
  mergedData.forEach((rowInfo) => {
396
- if (renderExpand && mergedExpandedRowKeySet.has(rowInfo.key)) {
396
+ if (renderExpand &&
397
+ mergedExpandedRowKeySet.has(rowInfo.key) &&
398
+ (!expandable || expandable(rowInfo.tmNode.rawNode))) {
397
399
  displayedData.push(rowInfo, {
398
400
  isExpandedRow: true,
399
401
  key: `${rowInfo.key}-expand`,
@@ -410,6 +412,8 @@ exports.default = (0, vue_1.defineComponent)({
410
412
  paginatedData.forEach(({ tmNode }, rowIndex) => {
411
413
  rowIndexToKey[rowIndex] = tmNode.key;
412
414
  });
415
+ const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
416
+ const bodyWidthPx = bodyWidth === null ? undefined : `${bodyWidth}px`;
413
417
  const renderRow = (rowInfo, displayedRowIndex, isVirtual) => {
414
418
  const { index: actualRowIndex } = rowInfo;
415
419
  if ('isExpandedRow' in rowInfo) {
@@ -420,7 +424,9 @@ exports.default = (0, vue_1.defineComponent)({
420
424
  `${mergedClsPrefix}-data-table-td--last-col`,
421
425
  displayedRowIndex + 1 === rowCount &&
422
426
  `${mergedClsPrefix}-data-table-td--last-row`
423
- ], colspan: colCount }, renderExpand(rawNode, actualRowIndex))));
427
+ ], colspan: colCount }, stickyExpandedRows ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-expand`, style: {
428
+ width: bodyWidthPx
429
+ } }, renderExpand(rawNode, actualRowIndex))) : (renderExpand(rawNode, actualRowIndex)))));
424
430
  }
425
431
  const isSummary = 'isSummaryRow' in rowInfo;
426
432
  const striped = !isSummary && rowInfo.striped;
@@ -514,23 +520,25 @@ exports.default = (0, vue_1.defineComponent)({
514
520
  `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
515
521
  column.align &&
516
522
  `${mergedClsPrefix}-data-table-td--${column.align}-align`,
517
- {
518
- [`${mergedClsPrefix}-data-table-td--selection`]: column.type === 'selection',
519
- [`${mergedClsPrefix}-data-table-td--expand`]: column.type === 'expand',
520
- [`${mergedClsPrefix}-data-table-td--last-col`]: isLastCol,
521
- [`${mergedClsPrefix}-data-table-td--last-row`]: isLastRow
522
- }
523
+ column.type === 'selection' &&
524
+ `${mergedClsPrefix}-data-table-td--selection`,
525
+ column.type === 'expand' &&
526
+ `${mergedClsPrefix}-data-table-td--expand`,
527
+ isLastCol &&
528
+ `${mergedClsPrefix}-data-table-td--last-col`,
529
+ isLastRow &&
530
+ `${mergedClsPrefix}-data-table-td--last-row`
523
531
  ] }),
524
532
  hasChildren && colIndex === childTriggerColIndex
525
533
  ? [
526
534
  (0, seemly_1.repeat)(isSummary ? 0 : rowInfo.tmNode.level, (0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-indent`, style: indentStyle })),
527
- isSummary || rowInfo.tmNode.isLeaf ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-expand-placeholder` })) : ((0, vue_1.h)(ExpandTrigger_1.default, { class: `${mergedClsPrefix}-data-table-expand-trigger`, clsPrefix: mergedClsPrefix, expanded: expanded, loading: loadingKeySet.has(rowInfo.key), onClick: () => {
535
+ isSummary || rowInfo.tmNode.isLeaf ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-expand-placeholder` })) : ((0, vue_1.h)(ExpandTrigger_1.default, { class: `${mergedClsPrefix}-data-table-expand-trigger`, clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, loading: loadingKeySet.has(rowInfo.key), onClick: () => {
528
536
  handleUpdateExpanded(rowKey, rowInfo.tmNode);
529
537
  } }))
530
538
  ]
531
539
  : null,
532
540
  column.type === 'selection' ? (!isSummary ? (column.multiple === false ? ((0, vue_1.h)(BodyRadio_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: () => handleRadioUpdateChecked(rowInfo.tmNode) })) : ((0, vue_1.h)(BodyCheckbox_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: (checked, e) => handleCheckboxUpdateChecked(rowInfo.tmNode, checked, e.shiftKey) }))) : null) : column.type === 'expand' ? (!isSummary ? (!column.expandable ||
533
- ((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? ((0, vue_1.h)(ExpandTrigger_1.default, { clsPrefix: mergedClsPrefix, expanded: expanded, onClick: () => handleUpdateExpanded(rowKey, null) })) : null) : null) : ((0, vue_1.h)(Cell_1.default, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell }))));
541
+ ((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? ((0, vue_1.h)(ExpandTrigger_1.default, { clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, onClick: () => handleUpdateExpanded(rowKey, null) })) : null) : null) : ((0, vue_1.h)(Cell_1.default, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell }))));
534
542
  })));
535
543
  return row;
536
544
  };
@@ -644,6 +644,7 @@ declare const _default: import("vue").DefineComponent<{
644
644
  }>;
645
645
  }>;
646
646
  Input: import("../../../_mixins").Theme<"Input", {
647
+ countTextColorDisabled: string;
647
648
  countTextColor: string;
648
649
  heightTiny: string;
649
650
  heightSmall: string;
@@ -976,6 +977,7 @@ declare const _default: import("vue").DefineComponent<{
976
977
  }>;
977
978
  }>> | undefined;
978
979
  Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
980
+ countTextColorDisabled: string;
979
981
  countTextColor: string;
980
982
  heightTiny: string;
981
983
  heightSmall: string;
@@ -1798,6 +1800,7 @@ declare const _default: import("vue").DefineComponent<{
1798
1800
  }>;
1799
1801
  }>;
1800
1802
  Input: import("../../../_mixins").Theme<"Input", {
1803
+ countTextColorDisabled: string;
1801
1804
  countTextColor: string;
1802
1805
  heightTiny: string;
1803
1806
  heightSmall: string;
@@ -2130,6 +2133,7 @@ declare const _default: import("vue").DefineComponent<{
2130
2133
  }>;
2131
2134
  }>> | undefined;
2132
2135
  Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
2136
+ countTextColorDisabled: string;
2133
2137
  countTextColor: string;
2134
2138
  heightTiny: string;
2135
2139
  heightSmall: string;
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, VNodeChild } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  clsPrefix: {
4
4
  type: StringConstructor;
@@ -10,6 +10,9 @@ declare const _default: import("vue").DefineComponent<{
10
10
  type: PropType<() => void>;
11
11
  required: true;
12
12
  };
13
+ renderExpandIcon: {
14
+ type: PropType<() => VNodeChild>;
15
+ };
13
16
  }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
17
  clsPrefix: {
15
18
  type: StringConstructor;
@@ -21,6 +24,9 @@ declare const _default: import("vue").DefineComponent<{
21
24
  type: PropType<() => void>;
22
25
  required: true;
23
26
  };
27
+ renderExpandIcon: {
28
+ type: PropType<() => VNodeChild>;
29
+ };
24
30
  }>>, {
25
31
  expanded: boolean;
26
32
  loading: boolean;
@@ -15,17 +15,23 @@ exports.default = (0, vue_1.defineComponent)({
15
15
  onClick: {
16
16
  type: Function,
17
17
  required: true
18
+ },
19
+ renderExpandIcon: {
20
+ type: Function
18
21
  }
19
22
  },
20
23
  render() {
21
- return ((0, vue_1.h)(_internal_1.NBaseIcon, { class: `${this.clsPrefix}-data-table-expand-trigger`, clsPrefix: this.clsPrefix, onClick: this.onClick }, {
22
- default: () => {
23
- return ((0, vue_1.h)(_internal_1.NIconSwitchTransition, null, {
24
- default: () => this.loading ? ((0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: this.clsPrefix, radius: 85, strokeWidth: 15, scale: 0.88 })) : ((0, vue_1.h)(icons_1.ChevronRightIcon, { class: `${this.clsPrefix}-data-table-expand-trigger__icon`, style: this.expanded
25
- ? 'transform: rotate(90deg);'
26
- : undefined }))
27
- }));
28
- }
29
- }));
24
+ const { clsPrefix } = this;
25
+ return ((0, vue_1.h)("div", { class: [
26
+ `${clsPrefix}-data-table-expand-trigger`,
27
+ this.expanded && `${clsPrefix}-data-table-expand-trigger--expanded`
28
+ ], onClick: this.onClick },
29
+ (0, vue_1.h)(_internal_1.NIconSwitchTransition, null, {
30
+ default: () => {
31
+ return this.loading ? ((0, vue_1.h)(_internal_1.NBaseLoading, { key: "loading", clsPrefix: this.clsPrefix, radius: 85, strokeWidth: 15, scale: 0.88 })) : this.renderExpandIcon ? (this.renderExpandIcon()) : ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix, key: "base-icon" }, {
32
+ default: () => (0, vue_1.h)(icons_1.ChevronRightIcon, null)
33
+ }));
34
+ }
35
+ })));
30
36
  }
31
37
  });
@@ -647,6 +647,7 @@ declare const _default: import("vue").DefineComponent<{
647
647
  }>;
648
648
  }>;
649
649
  Input: import("../../../_mixins").Theme<"Input", {
650
+ countTextColorDisabled: string;
650
651
  countTextColor: string;
651
652
  heightTiny: string;
652
653
  heightSmall: string;
@@ -979,6 +980,7 @@ declare const _default: import("vue").DefineComponent<{
979
980
  }>;
980
981
  }>> | undefined;
981
982
  Input?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Input", {
983
+ countTextColorDisabled: string;
982
984
  countTextColor: string;
983
985
  heightTiny: string;
984
986
  heightSmall: string;
@@ -1154,7 +1156,7 @@ declare const _default: import("vue").DefineComponent<{
1154
1156
  } | undefined;
1155
1157
  };
1156
1158
  }>;
1157
- checkOptions: import("vue").Ref<import("../interface").DataTableSelectionOptions | undefined>;
1159
+ checkOptions: import("vue").Ref<import("../interface").DataTableSelectionOptions<import("../interface").InternalRowData> | undefined>;
1158
1160
  mergedTableLayout: import("vue").Ref<"fixed" | "auto">;
1159
1161
  headerCheckboxDisabled: import("vue").Ref<boolean>;
1160
1162
  handleMouseenter: () => void;
@@ -84,7 +84,7 @@ export declare type TableSelectionColumn<T = InternalRowData> = {
84
84
  type: 'selection';
85
85
  multiple?: boolean;
86
86
  disabled?: (row: T) => boolean;
87
- options?: DataTableSelectionOptions;
87
+ options?: DataTableSelectionOptions<T>;
88
88
  sorter?: never;
89
89
  filter?: never;
90
90
  filterOptions?: never;
@@ -103,10 +103,10 @@ export interface TableExpandColumn<T = InternalRowData> extends Omit<TableSelect
103
103
  }
104
104
  export declare type TableColumn<T = InternalRowData> = TableColumnGroup<T> | TableBaseColumn<T> | TableSelectionColumn<T> | TableExpandColumn<T>;
105
105
  export declare type TableColumns<T = InternalRowData> = Array<TableColumn<T>>;
106
- export declare type DataTableSelectionOptions = Array<DataTableSelectionOption | {
106
+ export declare type DataTableSelectionOptions<T = InternalRowData> = Array<DataTableSelectionOption | {
107
107
  label: string;
108
108
  key: string | number;
109
- onSelect: () => void;
109
+ onSelect: (pageData: T[]) => void;
110
110
  }>;
111
111
  export interface DataTableInjection {
112
112
  slots: Slots;
@@ -164,6 +164,9 @@ export interface DataTableInjection {
164
164
  onLoadRef: Ref<DataTableOnLoad | undefined>;
165
165
  loadingKeySetRef: Ref<Set<RowKey>>;
166
166
  paginationBehaviorOnFilterRef: Ref<'current' | 'first'>;
167
+ expandableRef: Ref<Expandable<any> | undefined>;
168
+ stickyExpandedRowsRef: Ref<boolean>;
169
+ renderExpandIconRef: Ref<undefined | (() => VNodeChild)>;
167
170
  doUpdatePage: (page: number) => void;
168
171
  doUpdateExpandedRowKeys: (keys: RowKey[]) => void;
169
172
  doUpdateFilters: (filters: FilterState, sourceColumn: TableBaseColumn) => void;
@@ -92,6 +92,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
92
92
  display: inline-block;
93
93
  height: 1px;
94
94
  `), (0, cssr_1.cB)('data-table-expand-trigger', `
95
+ display: inline-flex;
95
96
  margin-right: 8px;
96
97
  cursor: pointer;
97
98
  font-size: 16px;
@@ -101,7 +102,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
101
102
  height: 16px;
102
103
  color: var(--n-td-text-color);
103
104
  transition: color .3s var(--n-bezier);
104
- `, [(0, cssr_1.cB)('base-loading', `
105
+ `, [(0, cssr_1.cM)('expanded', [(0, cssr_1.cB)('icon', 'transform: rotate(90deg);', [(0, icon_switch_cssr_1.iconSwitchTransition)({
106
+ originalTransform: 'rotate(90deg)'
107
+ })]), (0, cssr_1.cB)('base-icon', 'transform: rotate(90deg);', [(0, icon_switch_cssr_1.iconSwitchTransition)({
108
+ originalTransform: 'rotate(90deg)'
109
+ })])]), (0, cssr_1.cB)('base-loading', `
105
110
  color: var(--n-loading-color);
106
111
  transition: color .3s var(--n-bezier);
107
112
  position: absolute;
@@ -109,20 +114,33 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
109
114
  right: 0;
110
115
  top: 0;
111
116
  bottom: 0;
112
- `, [(0, icon_switch_cssr_1.iconSwitchTransition)()]), (0, cssr_1.cE)('icon', `
117
+ `, [(0, icon_switch_cssr_1.iconSwitchTransition)()]), (0, cssr_1.cB)('icon', `
113
118
  position: absolute;
114
119
  left: 0;
115
120
  right: 0;
116
121
  top: 0;
117
122
  bottom: 0;
118
- `, [(0, icon_switch_cssr_1.iconSwitchTransition)()])]), (0, cssr_1.cB)('data-table-thead', {
119
- transition: 'background-color .3s var(--n-bezier)',
120
- backgroundColor: 'var(--n-merged-th-color)'
121
- }), (0, cssr_1.cB)('data-table-tr', `
123
+ `, [(0, icon_switch_cssr_1.iconSwitchTransition)()]), (0, cssr_1.cB)('base-icon', `
124
+ position: absolute;
125
+ left: 0;
126
+ right: 0;
127
+ top: 0;
128
+ bottom: 0;
129
+ `, [(0, icon_switch_cssr_1.iconSwitchTransition)()])]), (0, cssr_1.cB)('data-table-thead', `
130
+ transition: background-color .3s var(--n-bezier);
131
+ background-color: var(--n-merged-th-color);
132
+ `), (0, cssr_1.cB)('data-table-tr', `
122
133
  box-sizing: border-box;
123
134
  background-clip: padding-box;
124
135
  transition: background-color .3s var(--n-bezier);
125
- `, [(0, cssr_1.cM)('striped', 'background-color: var(--n-merged-td-color-striped);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--n-merged-td-color-striped);')]), (0, cssr_1.cNotM)('summary', [(0, cssr_1.c)('&:hover', 'background-color: var(--n-merged-td-color-hover);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--n-merged-td-color-hover);')])])]), (0, cssr_1.cB)('data-table-th', `
136
+ `, [(0, cssr_1.cB)('data-table-expand', `
137
+ position: sticky;
138
+ left: 0;
139
+ overflow: hidden;
140
+ margin: calc(var(--n-th-padding) * -1);
141
+ padding: var(--n-th-padding);
142
+ box-sizing: border-box;
143
+ `), (0, cssr_1.cM)('striped', 'background-color: var(--n-merged-td-color-striped);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--n-merged-td-color-striped);')]), (0, cssr_1.cNotM)('summary', [(0, cssr_1.c)('&:hover', 'background-color: var(--n-merged-td-color-hover);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--n-merged-td-color-hover);')])])]), (0, cssr_1.cB)('data-table-th', `
126
144
  padding: var(--n-th-padding);
127
145
  position: relative;
128
146
  text-align: start;
@@ -1,9 +1,11 @@
1
1
  import { Ref } from 'vue';
2
2
  import { TreeMate } from 'treemate';
3
3
  import type { DataTableSetupProps } from './DataTable';
4
- import type { InternalRowData, RowKey } from './interface';
4
+ import type { Expandable, InternalRowData, RowKey } from './interface';
5
5
  export declare function useExpand(props: DataTableSetupProps, treeMateRef: Ref<TreeMate<InternalRowData, InternalRowData, InternalRowData>>): {
6
+ stickyExpandedRowsRef: Ref<boolean>;
6
7
  mergedExpandedRowKeysRef: import("vue").ComputedRef<import("treemate").Key[]>;
7
8
  renderExpandRef: import("vue").ComputedRef<import("./interface").RenderExpand<any> | undefined>;
9
+ expandableRef: import("vue").ComputedRef<Expandable<any> | undefined>;
8
10
  doUpdateExpandedRowKeys: (expandedKeys: RowKey[]) => void;
9
11
  };
@@ -16,20 +16,24 @@ function useExpand(props, treeMateRef) {
16
16
  }
17
17
  }
18
18
  });
19
- // It's not reactive
20
- let expandable;
21
- for (const col of props.columns) {
22
- if (col.type === 'expand') {
23
- expandable = col.expandable;
24
- break;
19
+ const expandableRef = (0, vooks_1.useMemo)(() => {
20
+ // It's not reactive
21
+ let expandable;
22
+ for (const col of props.columns) {
23
+ if (col.type === 'expand') {
24
+ expandable = col.expandable;
25
+ break;
26
+ }
25
27
  }
26
- }
28
+ return expandable;
29
+ });
27
30
  const uncontrolledExpandedRowKeysRef = (0, vue_1.ref)(props.defaultExpandAll
28
31
  ? (renderExpandRef === null || renderExpandRef === void 0 ? void 0 : renderExpandRef.value)
29
32
  ? (() => {
30
33
  const expandedKeys = [];
31
34
  treeMateRef.value.treeNodes.forEach((tmNode) => {
32
- if (expandable === null || expandable === void 0 ? void 0 : expandable(tmNode.rawNode)) {
35
+ var _a;
36
+ if ((_a = expandableRef.value) === null || _a === void 0 ? void 0 : _a.call(expandableRef, tmNode.rawNode)) {
33
37
  expandedKeys.push(tmNode.key);
34
38
  }
35
39
  });
@@ -38,6 +42,7 @@ function useExpand(props, treeMateRef) {
38
42
  : treeMateRef.value.getNonLeafKeys()
39
43
  : props.defaultExpandedRowKeys);
40
44
  const controlledExpandedRowKeysRef = (0, vue_1.toRef)(props, 'expandedRowKeys');
45
+ const stickyExpandedRowsRef = (0, vue_1.toRef)(props, 'stickyExpandedRows');
41
46
  const mergedExpandedRowKeysRef = (0, vooks_1.useMergedState)(controlledExpandedRowKeysRef, uncontrolledExpandedRowKeysRef);
42
47
  function doUpdateExpandedRowKeys(expandedKeys) {
43
48
  const { onUpdateExpandedRowKeys, 'onUpdate:expandedRowKeys': _onUpdateExpandedRowKeys } = props;
@@ -50,8 +55,10 @@ function useExpand(props, treeMateRef) {
50
55
  uncontrolledExpandedRowKeysRef.value = expandedKeys;
51
56
  }
52
57
  return {
58
+ stickyExpandedRowsRef,
53
59
  mergedExpandedRowKeysRef,
54
60
  renderExpandRef,
61
+ expandableRef,
55
62
  doUpdateExpandedRowKeys
56
63
  };
57
64
  }
@@ -76,7 +76,7 @@ function getRowsAndCols(columns) {
76
76
  const isLast = currentLeafIndex + colSpan === totalRowSpan;
77
77
  const rowItem = {
78
78
  column,
79
- colSpan: colSpan,
79
+ colSpan,
80
80
  rowSpan: maxDepth - currentDepth + 1,
81
81
  isLast
82
82
  };
@@ -168,7 +168,7 @@ function useSorter(props, { dataRelatedColsRef, filteredDataRef }) {
168
168
  deriveNextSorter({
169
169
  columnKey,
170
170
  sorter,
171
- order: order
171
+ order
172
172
  });
173
173
  }
174
174
  }
@@ -305,7 +305,7 @@ function useTableData(props, { dataRelatedColsRef }) {
305
305
  paginatedDataRef,
306
306
  rawPaginatedDataRef,
307
307
  mergedFilterStateRef,
308
- mergedSortStateRef: mergedSortStateRef,
308
+ mergedSortStateRef,
309
309
  hoverKeyRef: (0, vue_1.ref)(null),
310
310
  selectionColumnRef,
311
311
  childTriggerColIndexRef,
@@ -567,6 +567,7 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
567
567
  }>;
568
568
  }>;
569
569
  Input: import("../../_mixins").Theme<"Input", {
570
+ countTextColorDisabled: string;
570
571
  countTextColor: string;
571
572
  heightTiny: string;
572
573
  heightSmall: string;
@@ -135,6 +135,7 @@ export declare const datePickerProps: {
135
135
  calendarRightPaddingYearrange: string;
136
136
  }, {
137
137
  Input: import("../../_mixins").Theme<"Input", {
138
+ countTextColorDisabled: string;
138
139
  countTextColor: string;
139
140
  heightTiny: string;
140
141
  heightSmall: string;
@@ -624,6 +625,7 @@ export declare const datePickerProps: {
624
625
  rippleDuration: string;
625
626
  }, any>;
626
627
  Input: import("../../_mixins").Theme<"Input", {
628
+ countTextColorDisabled: string;
627
629
  countTextColor: string;
628
630
  heightTiny: string;
629
631
  heightSmall: string;
@@ -753,6 +755,7 @@ export declare const datePickerProps: {
753
755
  calendarRightPaddingYearrange: string;
754
756
  }, {
755
757
  Input: import("../../_mixins").Theme<"Input", {
758
+ countTextColorDisabled: string;
756
759
  countTextColor: string;
757
760
  heightTiny: string;
758
761
  heightSmall: string;
@@ -1242,6 +1245,7 @@ export declare const datePickerProps: {
1242
1245
  rippleDuration: string;
1243
1246
  }, any>;
1244
1247
  Input: import("../../_mixins").Theme<"Input", {
1248
+ countTextColorDisabled: string;
1245
1249
  countTextColor: string;
1246
1250
  heightTiny: string;
1247
1251
  heightSmall: string;
@@ -1371,6 +1375,7 @@ export declare const datePickerProps: {
1371
1375
  calendarRightPaddingYearrange: string;
1372
1376
  }, {
1373
1377
  Input: import("../../_mixins").Theme<"Input", {
1378
+ countTextColorDisabled: string;
1374
1379
  countTextColor: string;
1375
1380
  heightTiny: string;
1376
1381
  heightSmall: string;
@@ -1860,6 +1865,7 @@ export declare const datePickerProps: {
1860
1865
  rippleDuration: string;
1861
1866
  }, any>;
1862
1867
  Input: import("../../_mixins").Theme<"Input", {
1868
+ countTextColorDisabled: string;
1863
1869
  countTextColor: string;
1864
1870
  heightTiny: string;
1865
1871
  heightSmall: string;
@@ -2058,6 +2064,7 @@ declare const _default: import("vue").DefineComponent<{
2058
2064
  calendarRightPaddingYearrange: string;
2059
2065
  }, {
2060
2066
  Input: import("../../_mixins").Theme<"Input", {
2067
+ countTextColorDisabled: string;
2061
2068
  countTextColor: string;
2062
2069
  heightTiny: string;
2063
2070
  heightSmall: string;
@@ -2547,6 +2554,7 @@ declare const _default: import("vue").DefineComponent<{
2547
2554
  rippleDuration: string;
2548
2555
  }, any>;
2549
2556
  Input: import("../../_mixins").Theme<"Input", {
2557
+ countTextColorDisabled: string;
2550
2558
  countTextColor: string;
2551
2559
  heightTiny: string;
2552
2560
  heightSmall: string;
@@ -2676,6 +2684,7 @@ declare const _default: import("vue").DefineComponent<{
2676
2684
  calendarRightPaddingYearrange: string;
2677
2685
  }, {
2678
2686
  Input: import("../../_mixins").Theme<"Input", {
2687
+ countTextColorDisabled: string;
2679
2688
  countTextColor: string;
2680
2689
  heightTiny: string;
2681
2690
  heightSmall: string;
@@ -3165,6 +3174,7 @@ declare const _default: import("vue").DefineComponent<{
3165
3174
  rippleDuration: string;
3166
3175
  }, any>;
3167
3176
  Input: import("../../_mixins").Theme<"Input", {
3177
+ countTextColorDisabled: string;
3168
3178
  countTextColor: string;
3169
3179
  heightTiny: string;
3170
3180
  heightSmall: string;
@@ -3294,6 +3304,7 @@ declare const _default: import("vue").DefineComponent<{
3294
3304
  calendarRightPaddingYearrange: string;
3295
3305
  }, {
3296
3306
  Input: import("../../_mixins").Theme<"Input", {
3307
+ countTextColorDisabled: string;
3297
3308
  countTextColor: string;
3298
3309
  heightTiny: string;
3299
3310
  heightSmall: string;
@@ -3783,6 +3794,7 @@ declare const _default: import("vue").DefineComponent<{
3783
3794
  rippleDuration: string;
3784
3795
  }, any>;
3785
3796
  Input: import("../../_mixins").Theme<"Input", {
3797
+ countTextColorDisabled: string;
3786
3798
  countTextColor: string;
3787
3799
  heightTiny: string;
3788
3800
  heightSmall: string;
@@ -4160,6 +4172,7 @@ declare const _default: import("vue").DefineComponent<{
4160
4172
  };
4161
4173
  peers: {
4162
4174
  Input: import("../../_mixins").Theme<"Input", {
4175
+ countTextColorDisabled: string;
4163
4176
  countTextColor: string;
4164
4177
  heightTiny: string;
4165
4178
  heightSmall: string;
@@ -4649,6 +4662,7 @@ declare const _default: import("vue").DefineComponent<{
4649
4662
  rippleDuration: string;
4650
4663
  }, any>;
4651
4664
  Input: import("../../_mixins").Theme<"Input", {
4665
+ countTextColorDisabled: string;
4652
4666
  countTextColor: string;
4653
4667
  heightTiny: string;
4654
4668
  heightSmall: string;
@@ -4936,6 +4950,7 @@ declare const _default: import("vue").DefineComponent<{
4936
4950
  rippleDuration: string;
4937
4951
  }, any>> | undefined;
4938
4952
  Input?: import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
4953
+ countTextColorDisabled: string;
4939
4954
  countTextColor: string;
4940
4955
  heightTiny: string;
4941
4956
  heightSmall: string;
@@ -5007,8 +5022,8 @@ declare const _default: import("vue").DefineComponent<{
5007
5022
  actions: import("vue").ComputedRef<string[] | undefined>;
5008
5023
  triggerCssVars: import("vue").ComputedRef<{
5009
5024
  '--n-bezier': string;
5010
- '--n-icon-color': string;
5011
- '--n-icon-color-disabled': string;
5025
+ '--n-icon-color-override': string;
5026
+ '--n-icon-color-disabled-override': string;
5012
5027
  }> | undefined;
5013
5028
  triggerThemeClass: Ref<string> | undefined;
5014
5029
  triggerOnRender: (() => void) | undefined;
@@ -5191,6 +5206,7 @@ declare const _default: import("vue").DefineComponent<{
5191
5206
  calendarRightPaddingYearrange: string;
5192
5207
  }, {
5193
5208
  Input: import("../../_mixins").Theme<"Input", {
5209
+ countTextColorDisabled: string;
5194
5210
  countTextColor: string;
5195
5211
  heightTiny: string;
5196
5212
  heightSmall: string;
@@ -5680,6 +5696,7 @@ declare const _default: import("vue").DefineComponent<{
5680
5696
  rippleDuration: string;
5681
5697
  }, any>;
5682
5698
  Input: import("../../_mixins").Theme<"Input", {
5699
+ countTextColorDisabled: string;
5683
5700
  countTextColor: string;
5684
5701
  heightTiny: string;
5685
5702
  heightSmall: string;
@@ -5809,6 +5826,7 @@ declare const _default: import("vue").DefineComponent<{
5809
5826
  calendarRightPaddingYearrange: string;
5810
5827
  }, {
5811
5828
  Input: import("../../_mixins").Theme<"Input", {
5829
+ countTextColorDisabled: string;
5812
5830
  countTextColor: string;
5813
5831
  heightTiny: string;
5814
5832
  heightSmall: string;
@@ -6298,6 +6316,7 @@ declare const _default: import("vue").DefineComponent<{
6298
6316
  rippleDuration: string;
6299
6317
  }, any>;
6300
6318
  Input: import("../../_mixins").Theme<"Input", {
6319
+ countTextColorDisabled: string;
6301
6320
  countTextColor: string;
6302
6321
  heightTiny: string;
6303
6322
  heightSmall: string;
@@ -6427,6 +6446,7 @@ declare const _default: import("vue").DefineComponent<{
6427
6446
  calendarRightPaddingYearrange: string;
6428
6447
  }, {
6429
6448
  Input: import("../../_mixins").Theme<"Input", {
6449
+ countTextColorDisabled: string;
6430
6450
  countTextColor: string;
6431
6451
  heightTiny: string;
6432
6452
  heightSmall: string;
@@ -6916,6 +6936,7 @@ declare const _default: import("vue").DefineComponent<{
6916
6936
  rippleDuration: string;
6917
6937
  }, any>;
6918
6938
  Input: import("../../_mixins").Theme<"Input", {
6939
+ countTextColorDisabled: string;
6919
6940
  countTextColor: string;
6920
6941
  heightTiny: string;
6921
6942
  heightSmall: string;