naive-ui 2.21.2 → 2.22.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 (348) hide show
  1. package/es/_internal/close/src/styles/index.cssr.js +6 -5
  2. package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  3. package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
  4. package/es/_internal/selection/src/Selection.js +11 -9
  5. package/es/_internal/selection/src/styles/index.cssr.js +6 -2
  6. package/es/alert/src/Alert.d.ts +20 -20
  7. package/es/alert/src/Alert.js +22 -22
  8. package/es/alert/src/styles/index.cssr.js +45 -45
  9. package/es/anchor/src/AnchorAdapter.js +12 -12
  10. package/es/anchor/src/styles/index.cssr.js +41 -41
  11. package/es/avatar/src/Avatar.d.ts +5 -3
  12. package/es/avatar/src/Avatar.js +7 -5
  13. package/es/avatar/src/styles/index.cssr.js +3 -5
  14. package/es/button/src/Button.d.ts +60 -60
  15. package/es/button/src/Button.js +107 -106
  16. package/es/button/src/styles/button.cssr.js +83 -80
  17. package/es/button/styles/dark.js +3 -3
  18. package/es/button/styles/light.d.ts +3 -3
  19. package/es/button/styles/light.js +1 -1
  20. package/es/calendar/src/Calendar.d.ts +37 -30
  21. package/es/calendar/styles/light.d.ts +3 -3
  22. package/es/cascader/src/Cascader.d.ts +135 -0
  23. package/es/cascader/src/Cascader.js +2 -4
  24. package/es/cascader/src/CascaderMenu.d.ts +345 -0
  25. package/es/cascader/src/CascaderMenu.js +6 -5
  26. package/es/cascader/src/CascaderOption.d.ts +18 -0
  27. package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
  28. package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
  29. package/es/cascader/styles/dark.js +3 -1
  30. package/es/cascader/styles/light.d.ts +13 -0
  31. package/es/cascader/styles/light.js +3 -1
  32. package/es/color-picker/src/ColorInputUnit.d.ts +3 -3
  33. package/es/color-picker/src/ColorPicker.d.ts +27 -27
  34. package/es/color-picker/styles/light.d.ts +3 -3
  35. package/es/config-provider/src/ConfigProvider.d.ts +21 -0
  36. package/es/data-table/src/DataTable.d.ts +30 -30
  37. package/es/data-table/src/DataTable.js +7 -14
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
  40. package/es/data-table/src/MainTable.js +2 -3
  41. package/es/data-table/src/TableParts/Body.d.ts +18 -7
  42. package/es/data-table/src/TableParts/Body.js +80 -28
  43. package/es/data-table/src/TableParts/Cell.d.ts +6 -6
  44. package/es/data-table/src/TableParts/Header.d.ts +3 -3
  45. package/es/data-table/src/TableParts/Header.js +1 -1
  46. package/es/data-table/src/interface.d.ts +4 -1
  47. package/es/data-table/src/styles/index.cssr.js +9 -12
  48. package/es/data-table/src/use-check.js +6 -2
  49. package/es/data-table/src/use-scroll.d.ts +2 -0
  50. package/es/data-table/src/use-scroll.js +34 -4
  51. package/es/data-table/src/use-table-data.js +4 -1
  52. package/es/data-table/styles/_common.js +1 -1
  53. package/es/data-table/styles/light.d.ts +3 -3
  54. package/es/date-picker/src/DatePicker.d.ts +94 -69
  55. package/es/date-picker/src/DatePicker.js +47 -20
  56. package/es/date-picker/src/config.d.ts +1 -9
  57. package/es/date-picker/src/config.js +0 -8
  58. package/es/date-picker/src/interface.d.ts +2 -1
  59. package/es/date-picker/src/panel/date.d.ts +23 -10
  60. package/es/date-picker/src/panel/date.js +2 -2
  61. package/es/date-picker/src/panel/daterange.d.ts +21 -9
  62. package/es/date-picker/src/panel/daterange.js +2 -2
  63. package/es/date-picker/src/panel/datetime.d.ts +23 -16
  64. package/es/date-picker/src/panel/datetime.js +2 -2
  65. package/es/date-picker/src/panel/datetimerange.d.ts +21 -9
  66. package/es/date-picker/src/panel/datetimerange.js +2 -2
  67. package/es/date-picker/src/panel/month.d.ts +27 -20
  68. package/es/date-picker/src/panel/month.js +23 -12
  69. package/es/date-picker/src/panel/use-calendar.d.ts +25 -43
  70. package/es/date-picker/src/panel/use-calendar.js +35 -18
  71. package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
  72. package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
  73. package/es/date-picker/src/panel/use-panel-common.d.ts +21 -36
  74. package/es/date-picker/src/panel/use-panel-common.js +2 -2
  75. package/es/date-picker/src/utils.d.ts +19 -3
  76. package/es/date-picker/src/utils.js +40 -5
  77. package/es/date-picker/styles/_common.d.ts +2 -0
  78. package/es/date-picker/styles/_common.js +3 -1
  79. package/es/date-picker/styles/light.d.ts +10 -6
  80. package/es/dialog/src/Dialog.d.ts +21 -21
  81. package/es/dialog/src/styles/index.cssr.js +1 -0
  82. package/es/dialog/styles/light.d.ts +3 -3
  83. package/es/dynamic-input/src/DynamicInput.d.ts +30 -30
  84. package/es/dynamic-input/src/InputPreset.d.ts +3 -3
  85. package/es/dynamic-input/src/PairPreset.d.ts +3 -3
  86. package/es/dynamic-input/styles/light.d.ts +3 -3
  87. package/es/dynamic-tags/src/DynamicTags.d.ts +30 -30
  88. package/es/dynamic-tags/styles/light.d.ts +3 -3
  89. package/es/element/index.d.ts +1 -0
  90. package/es/element/index.js +1 -0
  91. package/es/form/src/interface.d.ts +5 -4
  92. package/es/image/src/Image.d.ts +25 -16
  93. package/es/image/src/Image.js +35 -11
  94. package/es/image/src/ImageGroup.js +2 -2
  95. package/es/image/src/styles/index.cssr.js +4 -3
  96. package/es/input/src/Input.js +2 -0
  97. package/es/input/src/styles/input.cssr.js +2 -1
  98. package/es/input-number/src/InputNumber.d.ts +30 -30
  99. package/es/input-number/src/InputNumber.js +10 -5
  100. package/es/input-number/src/utils.d.ts +1 -0
  101. package/es/input-number/src/utils.js +4 -0
  102. package/es/input-number/styles/light.d.ts +3 -3
  103. package/es/locales/common/deDE.js +8 -0
  104. package/es/locales/common/enUS.d.ts +7 -0
  105. package/es/locales/common/enUS.js +8 -1
  106. package/es/locales/common/frFR.d.ts +3 -0
  107. package/es/locales/common/frFR.js +101 -0
  108. package/es/locales/common/idID.d.ts +2 -93
  109. package/es/locales/common/idID.js +8 -0
  110. package/es/locales/common/jaJP.js +8 -0
  111. package/es/locales/common/nbNO.js +8 -0
  112. package/es/locales/common/ruRU.js +8 -0
  113. package/es/locales/common/ukUA.js +8 -0
  114. package/es/locales/common/zhCN.js +7 -0
  115. package/es/locales/common/zhTW.d.ts +3 -0
  116. package/es/locales/common/zhTW.js +100 -0
  117. package/es/locales/date/frFR.d.ts +3 -0
  118. package/es/locales/date/frFR.js +6 -0
  119. package/es/locales/date/idID.d.ts +1 -6
  120. package/es/locales/date/zhTW.d.ts +3 -0
  121. package/es/locales/date/zhTW.js +6 -0
  122. package/es/locales/index.d.ts +4 -0
  123. package/es/locales/index.js +4 -0
  124. package/es/modal/src/BodyWrapper.d.ts +6 -6
  125. package/es/modal/src/Modal.d.ts +36 -36
  126. package/es/modal/styles/light.d.ts +3 -3
  127. package/es/page-header/src/PageHeader.js +3 -3
  128. package/es/page-header/src/styles/index.cssr.js +2 -4
  129. package/es/popconfirm/src/Popconfirm.d.ts +30 -30
  130. package/es/popconfirm/styles/light.d.ts +3 -3
  131. package/es/popover/src/Popover.js +4 -1
  132. package/es/popover/src/PopoverBody.js +3 -3
  133. package/es/popselect/src/Popselect.d.ts +2 -11
  134. package/es/popselect/src/Popselect.js +2 -2
  135. package/es/popselect/src/PopselectPanel.d.ts +3 -11
  136. package/es/popselect/src/PopselectPanel.js +17 -11
  137. package/es/radio/src/Radio.js +3 -3
  138. package/es/radio/src/RadioButton.js +4 -5
  139. package/es/radio/src/styles/radio-group.cssr.js +8 -4
  140. package/es/radio/src/styles/radio.cssr.js +8 -4
  141. package/es/radio/src/use-radio.d.ts +0 -3
  142. package/es/radio/src/use-radio.js +1 -26
  143. package/es/switch/src/Switch.d.ts +16 -1
  144. package/es/switch/src/Switch.js +17 -4
  145. package/es/switch/src/styles/index.cssr.js +1 -1
  146. package/es/tabs/src/styles/index.cssr.js +1 -0
  147. package/es/tag/src/styles/index.cssr.js +1 -1
  148. package/es/theme-editor/src/ThemeEditor.js +9 -2
  149. package/es/time-picker/src/Panel.d.ts +3 -3
  150. package/es/time-picker/src/TimePicker.d.ts +30 -30
  151. package/es/time-picker/styles/light.d.ts +3 -3
  152. package/es/transfer/src/Transfer.d.ts +30 -30
  153. package/es/transfer/src/TransferFilter.d.ts +3 -3
  154. package/es/transfer/src/TransferList.d.ts +3 -3
  155. package/es/transfer/src/TransferListItem.d.ts +3 -3
  156. package/es/transfer/styles/light.d.ts +3 -3
  157. package/es/tree/src/Tree.d.ts +8 -4
  158. package/es/tree/src/Tree.js +32 -6
  159. package/es/tree-select/src/TreeSelect.d.ts +38 -1
  160. package/es/tree-select/src/TreeSelect.js +25 -10
  161. package/es/tree-select/src/styles/index.cssr.js +11 -2
  162. package/es/tree-select/styles/light.d.ts +6 -0
  163. package/es/tree-select/styles/light.js +5 -2
  164. package/es/upload/src/Upload.d.ts +41 -30
  165. package/es/upload/src/Upload.js +33 -23
  166. package/es/upload/src/UploadFile.d.ts +4 -4
  167. package/es/upload/src/UploadFileList.js +4 -2
  168. package/es/upload/src/UploadProgress.d.ts +3 -3
  169. package/es/upload/src/interface.d.ts +1 -0
  170. package/es/upload/src/styles/index.cssr.js +2 -3
  171. package/es/upload/styles/light.d.ts +3 -3
  172. package/es/version.d.ts +1 -1
  173. package/es/version.js +1 -1
  174. package/lib/_internal/close/src/styles/index.cssr.js +6 -5
  175. package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  176. package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
  177. package/lib/_internal/selection/src/Selection.js +11 -9
  178. package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
  179. package/lib/alert/src/Alert.d.ts +20 -20
  180. package/lib/alert/src/Alert.js +22 -22
  181. package/lib/alert/src/styles/index.cssr.js +45 -45
  182. package/lib/anchor/src/AnchorAdapter.js +12 -12
  183. package/lib/anchor/src/styles/index.cssr.js +41 -41
  184. package/lib/avatar/src/Avatar.d.ts +5 -3
  185. package/lib/avatar/src/Avatar.js +7 -5
  186. package/lib/avatar/src/styles/index.cssr.js +3 -5
  187. package/lib/button/src/Button.d.ts +60 -60
  188. package/lib/button/src/Button.js +107 -106
  189. package/lib/button/src/styles/button.cssr.js +83 -80
  190. package/lib/button/styles/dark.js +3 -3
  191. package/lib/button/styles/light.d.ts +3 -3
  192. package/lib/button/styles/light.js +1 -1
  193. package/lib/calendar/src/Calendar.d.ts +37 -30
  194. package/lib/calendar/styles/light.d.ts +3 -3
  195. package/lib/cascader/src/Cascader.d.ts +135 -0
  196. package/lib/cascader/src/Cascader.js +2 -4
  197. package/lib/cascader/src/CascaderMenu.d.ts +345 -0
  198. package/lib/cascader/src/CascaderMenu.js +6 -5
  199. package/lib/cascader/src/CascaderOption.d.ts +18 -0
  200. package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
  201. package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
  202. package/lib/cascader/styles/dark.js +3 -1
  203. package/lib/cascader/styles/light.d.ts +13 -0
  204. package/lib/cascader/styles/light.js +3 -1
  205. package/lib/color-picker/src/ColorInputUnit.d.ts +3 -3
  206. package/lib/color-picker/src/ColorPicker.d.ts +27 -27
  207. package/lib/color-picker/styles/light.d.ts +3 -3
  208. package/lib/config-provider/src/ConfigProvider.d.ts +21 -0
  209. package/lib/data-table/src/DataTable.d.ts +30 -30
  210. package/lib/data-table/src/DataTable.js +6 -13
  211. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
  212. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
  213. package/lib/data-table/src/MainTable.js +1 -2
  214. package/lib/data-table/src/TableParts/Body.d.ts +18 -7
  215. package/lib/data-table/src/TableParts/Body.js +78 -26
  216. package/lib/data-table/src/TableParts/Cell.d.ts +6 -6
  217. package/lib/data-table/src/TableParts/Header.d.ts +3 -3
  218. package/lib/data-table/src/TableParts/Header.js +1 -1
  219. package/lib/data-table/src/interface.d.ts +4 -1
  220. package/lib/data-table/src/styles/index.cssr.js +9 -12
  221. package/lib/data-table/src/use-check.js +6 -2
  222. package/lib/data-table/src/use-scroll.d.ts +2 -0
  223. package/lib/data-table/src/use-scroll.js +34 -4
  224. package/lib/data-table/src/use-table-data.js +4 -1
  225. package/lib/data-table/styles/_common.js +1 -1
  226. package/lib/data-table/styles/light.d.ts +3 -3
  227. package/lib/date-picker/src/DatePicker.d.ts +94 -69
  228. package/lib/date-picker/src/DatePicker.js +46 -19
  229. package/lib/date-picker/src/config.d.ts +1 -9
  230. package/lib/date-picker/src/config.js +1 -9
  231. package/lib/date-picker/src/interface.d.ts +2 -1
  232. package/lib/date-picker/src/panel/date.d.ts +23 -10
  233. package/lib/date-picker/src/panel/date.js +1 -1
  234. package/lib/date-picker/src/panel/daterange.d.ts +21 -9
  235. package/lib/date-picker/src/panel/daterange.js +1 -1
  236. package/lib/date-picker/src/panel/datetime.d.ts +23 -16
  237. package/lib/date-picker/src/panel/datetime.js +1 -1
  238. package/lib/date-picker/src/panel/datetimerange.d.ts +21 -9
  239. package/lib/date-picker/src/panel/datetimerange.js +2 -2
  240. package/lib/date-picker/src/panel/month.d.ts +27 -20
  241. package/lib/date-picker/src/panel/month.js +23 -12
  242. package/lib/date-picker/src/panel/use-calendar.d.ts +25 -43
  243. package/lib/date-picker/src/panel/use-calendar.js +34 -16
  244. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
  245. package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
  246. package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -36
  247. package/lib/date-picker/src/panel/use-panel-common.js +3 -2
  248. package/lib/date-picker/src/utils.d.ts +19 -3
  249. package/lib/date-picker/src/utils.js +41 -4
  250. package/lib/date-picker/styles/_common.d.ts +2 -0
  251. package/lib/date-picker/styles/_common.js +3 -1
  252. package/lib/date-picker/styles/light.d.ts +10 -6
  253. package/lib/dialog/src/Dialog.d.ts +21 -21
  254. package/lib/dialog/src/styles/index.cssr.js +1 -0
  255. package/lib/dialog/styles/light.d.ts +3 -3
  256. package/lib/dynamic-input/src/DynamicInput.d.ts +30 -30
  257. package/lib/dynamic-input/src/InputPreset.d.ts +3 -3
  258. package/lib/dynamic-input/src/PairPreset.d.ts +3 -3
  259. package/lib/dynamic-input/styles/light.d.ts +3 -3
  260. package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -30
  261. package/lib/dynamic-tags/styles/light.d.ts +3 -3
  262. package/lib/element/index.d.ts +1 -0
  263. package/lib/element/index.js +3 -1
  264. package/lib/form/src/interface.d.ts +5 -4
  265. package/lib/image/src/Image.d.ts +25 -16
  266. package/lib/image/src/Image.js +34 -10
  267. package/lib/image/src/ImageGroup.js +2 -2
  268. package/lib/image/src/styles/index.cssr.js +3 -2
  269. package/lib/input/src/Input.js +2 -0
  270. package/lib/input/src/styles/input.cssr.js +2 -1
  271. package/lib/input-number/src/InputNumber.d.ts +30 -30
  272. package/lib/input-number/src/InputNumber.js +9 -4
  273. package/lib/input-number/src/utils.d.ts +1 -0
  274. package/lib/input-number/src/utils.js +6 -1
  275. package/lib/input-number/styles/light.d.ts +3 -3
  276. package/lib/locales/common/deDE.js +8 -0
  277. package/lib/locales/common/enUS.d.ts +7 -0
  278. package/lib/locales/common/enUS.js +8 -1
  279. package/lib/locales/common/frFR.d.ts +3 -0
  280. package/lib/locales/common/frFR.js +103 -0
  281. package/lib/locales/common/idID.d.ts +2 -93
  282. package/lib/locales/common/idID.js +8 -0
  283. package/lib/locales/common/jaJP.js +8 -0
  284. package/lib/locales/common/nbNO.js +8 -0
  285. package/lib/locales/common/ruRU.js +8 -0
  286. package/lib/locales/common/ukUA.js +8 -0
  287. package/lib/locales/common/zhCN.js +7 -0
  288. package/lib/locales/common/zhTW.d.ts +3 -0
  289. package/lib/locales/common/zhTW.js +102 -0
  290. package/lib/locales/date/frFR.d.ts +3 -0
  291. package/lib/locales/date/frFR.js +11 -0
  292. package/lib/locales/date/idID.d.ts +1 -6
  293. package/lib/locales/date/zhTW.d.ts +3 -0
  294. package/lib/locales/date/zhTW.js +11 -0
  295. package/lib/locales/index.d.ts +4 -0
  296. package/lib/locales/index.js +9 -1
  297. package/lib/modal/src/BodyWrapper.d.ts +6 -6
  298. package/lib/modal/src/Modal.d.ts +36 -36
  299. package/lib/modal/styles/light.d.ts +3 -3
  300. package/lib/page-header/src/PageHeader.js +3 -3
  301. package/lib/page-header/src/styles/index.cssr.js +2 -4
  302. package/lib/popconfirm/src/Popconfirm.d.ts +30 -30
  303. package/lib/popconfirm/styles/light.d.ts +3 -3
  304. package/lib/popover/src/Popover.js +4 -1
  305. package/lib/popover/src/PopoverBody.js +3 -3
  306. package/lib/popselect/src/Popselect.d.ts +2 -11
  307. package/lib/popselect/src/Popselect.js +2 -2
  308. package/lib/popselect/src/PopselectPanel.d.ts +3 -11
  309. package/lib/popselect/src/PopselectPanel.js +16 -10
  310. package/lib/radio/src/Radio.js +3 -3
  311. package/lib/radio/src/RadioButton.js +4 -5
  312. package/lib/radio/src/styles/radio-group.cssr.js +8 -4
  313. package/lib/radio/src/styles/radio.cssr.js +8 -4
  314. package/lib/radio/src/use-radio.d.ts +0 -3
  315. package/lib/radio/src/use-radio.js +1 -26
  316. package/lib/switch/src/Switch.d.ts +16 -1
  317. package/lib/switch/src/Switch.js +17 -4
  318. package/lib/switch/src/styles/index.cssr.js +1 -1
  319. package/lib/tabs/src/styles/index.cssr.js +1 -0
  320. package/lib/tag/src/styles/index.cssr.js +1 -1
  321. package/lib/theme-editor/src/ThemeEditor.js +9 -2
  322. package/lib/time-picker/src/Panel.d.ts +3 -3
  323. package/lib/time-picker/src/TimePicker.d.ts +30 -30
  324. package/lib/time-picker/styles/light.d.ts +3 -3
  325. package/lib/transfer/src/Transfer.d.ts +30 -30
  326. package/lib/transfer/src/TransferFilter.d.ts +3 -3
  327. package/lib/transfer/src/TransferList.d.ts +3 -3
  328. package/lib/transfer/src/TransferListItem.d.ts +3 -3
  329. package/lib/transfer/styles/light.d.ts +3 -3
  330. package/lib/tree/src/Tree.d.ts +8 -4
  331. package/lib/tree/src/Tree.js +32 -6
  332. package/lib/tree-select/src/TreeSelect.d.ts +38 -1
  333. package/lib/tree-select/src/TreeSelect.js +24 -9
  334. package/lib/tree-select/src/styles/index.cssr.js +11 -2
  335. package/lib/tree-select/styles/light.d.ts +6 -0
  336. package/lib/tree-select/styles/light.js +5 -2
  337. package/lib/upload/src/Upload.d.ts +41 -30
  338. package/lib/upload/src/Upload.js +33 -23
  339. package/lib/upload/src/UploadFile.d.ts +4 -4
  340. package/lib/upload/src/UploadFileList.js +4 -2
  341. package/lib/upload/src/UploadProgress.d.ts +3 -3
  342. package/lib/upload/src/interface.d.ts +1 -0
  343. package/lib/upload/src/styles/index.cssr.js +2 -3
  344. package/lib/upload/styles/light.d.ts +3 -3
  345. package/lib/version.d.ts +1 -1
  346. package/lib/version.js +1 -1
  347. package/package.json +5 -4
  348. package/web-types.json +99 -7
@@ -1,5 +1,5 @@
1
1
  import { TreeNode } from 'treemate';
2
- import { CSSProperties, InjectionKey, Ref, VNodeChild, HTMLAttributes } from 'vue';
2
+ import { CSSProperties, InjectionKey, Ref, VNodeChild, HTMLAttributes, Slots } from 'vue';
3
3
  import { EllipsisProps } from '../../ellipsis/src/Ellipsis';
4
4
  import { NLocale } from '../../locales';
5
5
  import { MergedTheme } from '../../_mixins';
@@ -100,6 +100,7 @@ export declare type DataTableSelectionOptions = Array<DataTableSelectionOption |
100
100
  onSelect: () => void;
101
101
  }>;
102
102
  export interface DataTableInjection {
103
+ slots: Slots;
103
104
  indentRef: Ref<number>;
104
105
  hasChildrenRef: Ref<boolean>;
105
106
  firstContentfulColIndexRef: Ref<number>;
@@ -115,7 +116,9 @@ export interface DataTableInjection {
115
116
  leftFixedColumnsRef: Ref<TableColumns>;
116
117
  rightFixedColumnsRef: Ref<TableColumns>;
117
118
  leftActiveFixedColKeyRef: Ref<ColumnKey | null>;
119
+ leftActiveFixedChildrenColKeysRef: Ref<ColumnKey[]>;
118
120
  rightActiveFixedColKeyRef: Ref<ColumnKey | null>;
121
+ rightActiveFixedChildrenColKeysRef: Ref<ColumnKey[]>;
119
122
  fixedColumnLeftMapRef: Ref<Record<ColumnKey, {
120
123
  start: number;
121
124
  end: number;
@@ -67,11 +67,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
67
67
  --merged-th-color-hover: var(--th-color-hover);
68
68
  --merged-td-color-hover: var(--td-color-hover);
69
69
  --merged-td-color-striped: var(--td-color-striped);
70
- `, [(0, cssr_1.cM)('flex-height', [(0, cssr_1.c)('>', [(0, cssr_1.cB)('data-table-wrapper', `
70
+ `, [(0, cssr_1.cB)('data-table-wrapper', `
71
71
  flex-grow: 1;
72
72
  display: flex;
73
73
  flex-direction: column;
74
- `, [(0, cssr_1.c)('>', [(0, cssr_1.cB)('data-table-base-table', `
74
+ `), (0, cssr_1.cM)('flex-height', [(0, cssr_1.c)('>', [(0, cssr_1.cB)('data-table-wrapper', [(0, cssr_1.c)('>', [(0, cssr_1.cB)('data-table-base-table', `
75
75
  display: flex;
76
76
  flex-direction: column;
77
77
  flex-grow: 1;
@@ -107,7 +107,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
107
107
  box-sizing: border-box;
108
108
  background-clip: padding-box;
109
109
  transition: background-color .3s var(--bezier);
110
- `, [(0, cssr_1.cM)('striped', 'background-color: var(--merged-td-color-striped);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--merged-td-color-striped);')]), (0, cssr_1.c)('&:hover', 'background-color: var(--merged-td-color-hover);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--merged-td-color-hover);')])]), (0, cssr_1.cB)('data-table-th', `
110
+ `, [(0, cssr_1.cM)('striped', 'background-color: var(--merged-td-color-striped);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--merged-td-color-striped);')]), (0, cssr_1.cNotM)('summary', [(0, cssr_1.c)('&:hover', 'background-color: var(--merged-td-color-hover);', [(0, cssr_1.cB)('data-table-td', 'background-color: var(--merged-td-color-hover);')])])]), (0, cssr_1.cB)('data-table-th', `
111
111
  padding: var(--th-padding);
112
112
  position: relative;
113
113
  text-align: start;
@@ -217,6 +217,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
217
217
  padding: 0;
218
218
  line-height: 0;
219
219
  `), fixedColumnStyle]), (0, cssr_1.cB)('data-table-empty', `
220
+ box-sizing: border-box;
220
221
  padding: var(--empty-padding);
221
222
  flex-grow: 1;
222
223
  flex-shrink: 0;
@@ -250,15 +251,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
250
251
  borderRight: '1px solid var(--merged-border-color)'
251
252
  }, [(0, cssr_1.cM)('last-col', {
252
253
  borderRight: '0 solid var(--merged-border-color)'
253
- })])]), (0, cssr_1.cM)('bordered', [(0, cssr_1.cB)('data-table-wrapper', {
254
- border: '1px solid var(--merged-border-color)',
255
- borderBottomLeftRadius: 'var(--border-radius)',
256
- borderBottomRightRadius: 'var(--border-radius)'
257
- }), (0, cssr_1.cB)('data-table-td', [(0, cssr_1.cM)('last-row', {
258
- borderBottom: '0 solid var(--merged-border-color)'
259
- })]), (0, cssr_1.cB)('data-table-base-table-body', `
260
- border-bottom-left-radius: calc(var(--border-radius) - 1px);
261
- border-bottom-right-radius: calc(var(--border-radius) - 1px);
254
+ })])]), (0, cssr_1.cM)('bordered', [(0, cssr_1.cB)('data-table-wrapper', `
255
+ border: 1px solid var(--merged-border-color);
256
+ border-bottom-left-radius: var(--border-radius);
257
+ border-bottom-right-radius: var(--border-radius);
258
+ overflow: hidden;
262
259
  `)]), (0, cssr_1.cB)('data-table-base-table', [(0, cssr_1.cM)('transition-disabled', [(0, cssr_1.cB)('data-table-th', [(0, cssr_1.c)('&::after, &::before', {
263
260
  transition: 'none'
264
261
  })]), (0, cssr_1.cB)('data-table-td', [(0, cssr_1.c)('&::after, &::before', {
@@ -61,18 +61,22 @@ function useCheck(props, data) {
61
61
  uncontrolledCheckedRowKeysRef.value = keys;
62
62
  }
63
63
  function doCheck(rowKey) {
64
+ if (props.loading)
65
+ return;
64
66
  doUpdateCheckedRowKeys(treeMateRef.value.check(rowKey, mergedCheckedRowKeysRef.value, {
65
67
  cascade: props.cascade
66
68
  }).checkedKeys);
67
69
  }
68
70
  function doUncheck(rowKey) {
71
+ if (props.loading)
72
+ return;
69
73
  doUpdateCheckedRowKeys(treeMateRef.value.uncheck(rowKey, mergedCheckedRowKeysRef.value, {
70
74
  cascade: props.cascade
71
75
  }).checkedKeys);
72
76
  }
73
77
  function doCheckAll(checkWholeTable = false) {
74
78
  const { value: column } = selectionColumnRef;
75
- if (!column)
79
+ if (!column || props.loading)
76
80
  return;
77
81
  const rowKeysToCheck = [];
78
82
  (checkWholeTable
@@ -89,7 +93,7 @@ function useCheck(props, data) {
89
93
  }
90
94
  function doUncheckAll(checkWholeTable = false) {
91
95
  const { value: column } = selectionColumnRef;
92
- if (!column)
96
+ if (!column || props.loading)
93
97
  return;
94
98
  const rowKeysToUncheck = [];
95
99
  (checkWholeTable
@@ -19,7 +19,9 @@ export declare function useScroll(props: DataTableSetupProps, { mainTableInstRef
19
19
  leftFixedColumnsRef: ComputedRef<TableColumn<any>[]>;
20
20
  rightFixedColumnsRef: ComputedRef<TableColumn<any>[]>;
21
21
  leftActiveFixedColKeyRef: Ref<ColumnKey | null>;
22
+ leftActiveFixedChildrenColKeysRef: Ref<ColumnKey[]>;
22
23
  rightActiveFixedColKeyRef: Ref<ColumnKey | null>;
24
+ rightActiveFixedChildrenColKeysRef: Ref<ColumnKey[]>;
23
25
  syncScrollState: () => void;
24
26
  handleTableBodyScroll: () => void;
25
27
  handleTableHeaderScroll: () => void;
@@ -9,7 +9,9 @@ const utils_1 = require("./utils");
9
9
  function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef, scrollPartRef }) {
10
10
  let scrollLeft = 0;
11
11
  const leftActiveFixedColKeyRef = (0, vue_1.ref)(null);
12
+ const leftActiveFixedChildrenColKeysRef = (0, vue_1.ref)([]);
12
13
  const rightActiveFixedColKeyRef = (0, vue_1.ref)(null);
14
+ const rightActiveFixedChildrenColKeysRef = (0, vue_1.ref)([]);
13
15
  const styleScrollXRef = (0, vue_1.computed)(() => {
14
16
  return (0, _utils_1.formatLength)(props.scrollX);
15
17
  });
@@ -43,7 +45,8 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
43
45
  const columns = {};
44
46
  let right = 0;
45
47
  function traverse(cols) {
46
- cols.forEach((col) => {
48
+ for (let i = cols.length - 1; i >= 0; --i) {
49
+ const col = cols[i];
47
50
  const positionInfo = { start: right, end: 0 };
48
51
  columns[(0, utils_1.getColKey)(col)] = positionInfo;
49
52
  if ('children' in col) {
@@ -54,9 +57,9 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
54
57
  right += (0, utils_1.getColWidth)(col) || 0;
55
58
  positionInfo.end = right;
56
59
  }
57
- });
60
+ }
58
61
  }
59
- traverse(rightFixedColumnsRef.value.reverse());
62
+ traverse(rightFixedColumnsRef.value);
60
63
  return columns;
61
64
  });
62
65
  function deriveActiveLeftFixedColumn() {
@@ -78,6 +81,18 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
78
81
  }
79
82
  leftActiveFixedColKeyRef.value = leftActiveFixedColKey;
80
83
  }
84
+ function deriveActiveLeftFixedChildrenColumns() {
85
+ leftActiveFixedChildrenColKeysRef.value = [];
86
+ let activeLeftFixedColumn = props.columns.find((col) => (0, utils_1.getColKey)(col) === leftActiveFixedColKeyRef.value);
87
+ while (activeLeftFixedColumn && 'children' in activeLeftFixedColumn) {
88
+ const length = activeLeftFixedColumn.children.length;
89
+ if (length === 0)
90
+ break;
91
+ const nextActiveLeftFixedColumn = activeLeftFixedColumn.children[length - 1];
92
+ leftActiveFixedChildrenColKeysRef.value.push((0, utils_1.getColKey)(nextActiveLeftFixedColumn));
93
+ activeLeftFixedColumn = nextActiveLeftFixedColumn;
94
+ }
95
+ }
81
96
  function deriveActiveRightFixedColumn() {
82
97
  var _a, _b;
83
98
  // target is header element
@@ -89,7 +104,7 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
89
104
  let rightWidth = 0;
90
105
  let rightActiveFixedColKey = null;
91
106
  const { value: fixedColumnRightMap } = fixedColumnRightMapRef;
92
- for (let i = 0; i < rightFixedColumns.length; ++i) {
107
+ for (let i = rightFixedColumns.length - 1; i >= 0; --i) {
93
108
  const key = (0, utils_1.getColKey)(rightFixedColumns[i]);
94
109
  if (Math.round(scrollLeft +
95
110
  (((_a = fixedColumnRightMap[key]) === null || _a === void 0 ? void 0 : _a.start) || 0) +
@@ -104,6 +119,17 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
104
119
  }
105
120
  rightActiveFixedColKeyRef.value = rightActiveFixedColKey;
106
121
  }
122
+ function deriveActiveRightFixedChildrenColumns() {
123
+ rightActiveFixedChildrenColKeysRef.value = [];
124
+ let activeRightFixedColumn = props.columns.find((col) => (0, utils_1.getColKey)(col) === rightActiveFixedColKeyRef.value);
125
+ while (activeRightFixedColumn &&
126
+ 'children' in activeRightFixedColumn &&
127
+ activeRightFixedColumn.children.length) {
128
+ const nextActiveRightFixedColumn = activeRightFixedColumn.children[0];
129
+ rightActiveFixedChildrenColKeysRef.value.push((0, utils_1.getColKey)(nextActiveRightFixedColumn));
130
+ activeRightFixedColumn = nextActiveRightFixedColumn;
131
+ }
132
+ }
107
133
  function getScrollElements() {
108
134
  const header = mainTableInstRef.value
109
135
  ? mainTableInstRef.value.getHeaderElement()
@@ -160,7 +186,9 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
160
186
  scrollLeft = body.scrollLeft;
161
187
  }
162
188
  deriveActiveLeftFixedColumn();
189
+ deriveActiveLeftFixedChildrenColumns();
163
190
  deriveActiveRightFixedColumn();
191
+ deriveActiveRightFixedChildrenColumns();
164
192
  }
165
193
  function setHeaderScrollLeft(left) {
166
194
  const { header } = getScrollElements();
@@ -179,7 +207,9 @@ function useScroll(props, { mainTableInstRef, mergedCurrentPageRef, bodyWidthRef
179
207
  leftFixedColumnsRef,
180
208
  rightFixedColumnsRef,
181
209
  leftActiveFixedColKeyRef,
210
+ leftActiveFixedChildrenColKeysRef,
182
211
  rightActiveFixedColKeyRef,
212
+ rightActiveFixedChildrenColKeysRef,
183
213
  syncScrollState,
184
214
  handleTableBodyScroll,
185
215
  handleTableHeaderScroll,
@@ -21,6 +21,7 @@ function useTableData(props, { dataRelatedColsRef }) {
21
21
  const treeMateRef = (0, vue_1.computed)(() => {
22
22
  const { childrenKey } = props;
23
23
  return (0, treemate_1.createTreeMate)(props.data, {
24
+ ignoreEmptyChildren: true,
24
25
  getKey: props.rowKey,
25
26
  getChildren: (rowData) => rowData[childrenKey],
26
27
  getDisabled: (rowData) => {
@@ -188,11 +189,13 @@ function useTableData(props, { dataRelatedColsRef }) {
188
189
  function mergedOnUpdatePageSize(pageSize) {
189
190
  const { pagination } = props;
190
191
  if (pagination) {
191
- const { onPageSizeChange, 'onUpdate:pageSize': onUpdatePageSize } = pagination;
192
+ const { onPageSizeChange, 'onUpdate:pageSize': _onUpdatePageSize, onUpdatePageSize } = pagination;
192
193
  if (onPageSizeChange)
193
194
  (0, _utils_1.call)(onPageSizeChange, pageSize);
194
195
  if (onUpdatePageSize)
195
196
  (0, _utils_1.call)(onUpdatePageSize, pageSize);
197
+ if (_onUpdatePageSize)
198
+ (0, _utils_1.call)(_onUpdatePageSize, pageSize);
196
199
  doUpdatePageSize(pageSize);
197
200
  }
198
201
  }
@@ -10,7 +10,7 @@ exports.default = {
10
10
  sorterSize: '15px',
11
11
  filterSize: '15px',
12
12
  paginationMargin: '12px 0 0 0',
13
- emptyPadding: '16px 0',
13
+ emptyPadding: '48px 0',
14
14
  actionPadding: '8px 12px',
15
15
  actionButtonMargin: '0 8px 0 0'
16
16
  };
@@ -112,9 +112,9 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
112
112
  fontSizeMedium: string;
113
113
  fontSizeLarge: string;
114
114
  opacityDisabled: string;
115
- colorOpacitySecondary: number;
116
- colorOpacitySecondaryHover: number;
117
- colorOpacitySecondaryPressed: number;
115
+ colorOpacitySecondary: string;
116
+ colorOpacitySecondaryHover: string;
117
+ colorOpacitySecondaryPressed: string;
118
118
  colorSecondary: string;
119
119
  colorSecondaryHover: string;
120
120
  colorSecondaryPressed: string;