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
@@ -104,9 +104,9 @@ declare const colorPickerLight: import("../../_mixins/use-theme").Theme<"ColorPi
104
104
  fontSizeMedium: string;
105
105
  fontSizeLarge: string;
106
106
  opacityDisabled: string;
107
- colorOpacitySecondary: number;
108
- colorOpacitySecondaryHover: number;
109
- colorOpacitySecondaryPressed: number;
107
+ colorOpacitySecondary: string;
108
+ colorOpacitySecondaryHover: string;
109
+ colorOpacitySecondaryPressed: string;
110
110
  colorSecondary: string;
111
111
  colorSecondaryHover: string;
112
112
  colorSecondaryPressed: string;
@@ -36,6 +36,11 @@ export declare const configProviderProps: {
36
36
  yearFormat: string;
37
37
  monthFormat: string;
38
38
  dayFormat: string;
39
+ yearTypeFormat: string;
40
+ monthTypeFormat: string;
41
+ dateFormat: string;
42
+ dateTimeFormat: string;
43
+ quarterFormat: string;
39
44
  clear: string;
40
45
  now: string;
41
46
  confirm: string;
@@ -44,6 +49,8 @@ export declare const configProviderProps: {
44
49
  datePlaceholder: string;
45
50
  datetimePlaceholder: string;
46
51
  monthPlaceholder: string;
52
+ yearPlaceholder: string;
53
+ quarterPlaceholder: string;
47
54
  startDatePlaceholder: string;
48
55
  endDatePlaceholder: string;
49
56
  startDatetimePlaceholder: string;
@@ -155,6 +162,11 @@ declare const _default: import("vue").DefineComponent<{
155
162
  yearFormat: string;
156
163
  monthFormat: string;
157
164
  dayFormat: string;
165
+ yearTypeFormat: string;
166
+ monthTypeFormat: string;
167
+ dateFormat: string;
168
+ dateTimeFormat: string;
169
+ quarterFormat: string;
158
170
  clear: string;
159
171
  now: string;
160
172
  confirm: string;
@@ -163,6 +175,8 @@ declare const _default: import("vue").DefineComponent<{
163
175
  datePlaceholder: string;
164
176
  datetimePlaceholder: string;
165
177
  monthPlaceholder: string;
178
+ yearPlaceholder: string;
179
+ quarterPlaceholder: string;
166
180
  startDatePlaceholder: string;
167
181
  endDatePlaceholder: string;
168
182
  startDatetimePlaceholder: string;
@@ -298,6 +312,11 @@ declare const _default: import("vue").DefineComponent<{
298
312
  yearFormat: string;
299
313
  monthFormat: string;
300
314
  dayFormat: string;
315
+ yearTypeFormat: string;
316
+ monthTypeFormat: string;
317
+ dateFormat: string;
318
+ dateTimeFormat: string;
319
+ quarterFormat: string;
301
320
  clear: string;
302
321
  now: string;
303
322
  confirm: string;
@@ -306,6 +325,8 @@ declare const _default: import("vue").DefineComponent<{
306
325
  datePlaceholder: string;
307
326
  datetimePlaceholder: string;
308
327
  monthPlaceholder: string;
328
+ yearPlaceholder: string;
329
+ quarterPlaceholder: string;
309
330
  startDatePlaceholder: string;
310
331
  endDatePlaceholder: string;
311
332
  startDatetimePlaceholder: string;
@@ -170,9 +170,9 @@ export declare const dataTableProps: {
170
170
  fontSizeMedium: string;
171
171
  fontSizeLarge: string;
172
172
  opacityDisabled: string;
173
- colorOpacitySecondary: number;
174
- colorOpacitySecondaryHover: number;
175
- colorOpacitySecondaryPressed: number;
173
+ colorOpacitySecondary: string;
174
+ colorOpacitySecondaryHover: string;
175
+ colorOpacitySecondaryPressed: string;
176
176
  colorSecondary: string;
177
177
  colorSecondaryHover: string;
178
178
  colorSecondaryPressed: string;
@@ -770,9 +770,9 @@ export declare const dataTableProps: {
770
770
  fontSizeMedium: string;
771
771
  fontSizeLarge: string;
772
772
  opacityDisabled: string;
773
- colorOpacitySecondary: number;
774
- colorOpacitySecondaryHover: number;
775
- colorOpacitySecondaryPressed: number;
773
+ colorOpacitySecondary: string;
774
+ colorOpacitySecondaryHover: string;
775
+ colorOpacitySecondaryPressed: string;
776
776
  colorSecondary: string;
777
777
  colorSecondaryHover: string;
778
778
  colorSecondaryPressed: string;
@@ -1370,9 +1370,9 @@ export declare const dataTableProps: {
1370
1370
  fontSizeMedium: string;
1371
1371
  fontSizeLarge: string;
1372
1372
  opacityDisabled: string;
1373
- colorOpacitySecondary: number;
1374
- colorOpacitySecondaryHover: number;
1375
- colorOpacitySecondaryPressed: number;
1373
+ colorOpacitySecondary: string;
1374
+ colorOpacitySecondaryHover: string;
1375
+ colorOpacitySecondaryPressed: string;
1376
1376
  colorSecondary: string;
1377
1377
  colorSecondaryHover: string;
1378
1378
  colorSecondaryPressed: string;
@@ -2078,9 +2078,9 @@ declare const _default: import("vue").DefineComponent<{
2078
2078
  fontSizeMedium: string;
2079
2079
  fontSizeLarge: string;
2080
2080
  opacityDisabled: string;
2081
- colorOpacitySecondary: number;
2082
- colorOpacitySecondaryHover: number;
2083
- colorOpacitySecondaryPressed: number;
2081
+ colorOpacitySecondary: string;
2082
+ colorOpacitySecondaryHover: string;
2083
+ colorOpacitySecondaryPressed: string;
2084
2084
  colorSecondary: string;
2085
2085
  colorSecondaryHover: string;
2086
2086
  colorSecondaryPressed: string;
@@ -2678,9 +2678,9 @@ declare const _default: import("vue").DefineComponent<{
2678
2678
  fontSizeMedium: string;
2679
2679
  fontSizeLarge: string;
2680
2680
  opacityDisabled: string;
2681
- colorOpacitySecondary: number;
2682
- colorOpacitySecondaryHover: number;
2683
- colorOpacitySecondaryPressed: number;
2681
+ colorOpacitySecondary: string;
2682
+ colorOpacitySecondaryHover: string;
2683
+ colorOpacitySecondaryPressed: string;
2684
2684
  colorSecondary: string;
2685
2685
  colorSecondaryHover: string;
2686
2686
  colorSecondaryPressed: string;
@@ -3278,9 +3278,9 @@ declare const _default: import("vue").DefineComponent<{
3278
3278
  fontSizeMedium: string;
3279
3279
  fontSizeLarge: string;
3280
3280
  opacityDisabled: string;
3281
- colorOpacitySecondary: number;
3282
- colorOpacitySecondaryHover: number;
3283
- colorOpacitySecondaryPressed: number;
3281
+ colorOpacitySecondary: string;
3282
+ colorOpacitySecondaryHover: string;
3283
+ colorOpacitySecondaryPressed: string;
3284
3284
  colorSecondary: string;
3285
3285
  colorSecondaryHover: string;
3286
3286
  colorSecondaryPressed: string;
@@ -4037,9 +4037,9 @@ declare const _default: import("vue").DefineComponent<{
4037
4037
  fontSizeMedium: string;
4038
4038
  fontSizeLarge: string;
4039
4039
  opacityDisabled: string;
4040
- colorOpacitySecondary: number;
4041
- colorOpacitySecondaryHover: number;
4042
- colorOpacitySecondaryPressed: number;
4040
+ colorOpacitySecondary: string;
4041
+ colorOpacitySecondaryHover: string;
4042
+ colorOpacitySecondaryPressed: string;
4043
4043
  colorSecondary: string;
4044
4044
  colorSecondaryHover: string;
4045
4045
  colorSecondaryPressed: string;
@@ -4959,9 +4959,9 @@ declare const _default: import("vue").DefineComponent<{
4959
4959
  fontSizeMedium: string;
4960
4960
  fontSizeLarge: string;
4961
4961
  opacityDisabled: string;
4962
- colorOpacitySecondary: number;
4963
- colorOpacitySecondaryHover: number;
4964
- colorOpacitySecondaryPressed: number;
4962
+ colorOpacitySecondary: string;
4963
+ colorOpacitySecondaryHover: string;
4964
+ colorOpacitySecondaryPressed: string;
4965
4965
  colorSecondary: string;
4966
4966
  colorSecondaryHover: string;
4967
4967
  colorSecondaryPressed: string;
@@ -5559,9 +5559,9 @@ declare const _default: import("vue").DefineComponent<{
5559
5559
  fontSizeMedium: string;
5560
5560
  fontSizeLarge: string;
5561
5561
  opacityDisabled: string;
5562
- colorOpacitySecondary: number;
5563
- colorOpacitySecondaryHover: number;
5564
- colorOpacitySecondaryPressed: number;
5562
+ colorOpacitySecondary: string;
5563
+ colorOpacitySecondaryHover: string;
5564
+ colorOpacitySecondaryPressed: string;
5565
5565
  colorSecondary: string;
5566
5566
  colorSecondaryHover: string;
5567
5567
  colorSecondaryPressed: string;
@@ -6159,9 +6159,9 @@ declare const _default: import("vue").DefineComponent<{
6159
6159
  fontSizeMedium: string;
6160
6160
  fontSizeLarge: string;
6161
6161
  opacityDisabled: string;
6162
- colorOpacitySecondary: number;
6163
- colorOpacitySecondaryHover: number;
6164
- colorOpacitySecondaryPressed: number;
6162
+ colorOpacitySecondary: string;
6163
+ colorOpacitySecondaryHover: string;
6164
+ colorOpacitySecondaryPressed: string;
6165
6165
  colorSecondary: string;
6166
6166
  colorSecondaryHover: string;
6167
6167
  colorSecondaryPressed: string;
@@ -8,7 +8,6 @@ const vue_1 = require("vue");
8
8
  const seemly_1 = require("seemly");
9
9
  const _mixins_1 = require("../../_mixins");
10
10
  const _internal_1 = require("../../_internal");
11
- const empty_1 = require("../../empty");
12
11
  const pagination_1 = require("../../pagination");
13
12
  const _utils_1 = require("../../_utils");
14
13
  const styles_1 = require("../styles");
@@ -113,7 +112,7 @@ exports.default = (0, vue_1.defineComponent)({
113
112
  name: 'DataTable',
114
113
  alias: ['AdvancedTable'],
115
114
  props: exports.dataTableProps,
116
- setup(props) {
115
+ setup(props, { slots }) {
117
116
  const { mergedBorderedRef, mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
118
117
  const mergedBottomBorderedRef = (0, vue_1.computed)(() => {
119
118
  const { bottomBordered } = props;
@@ -137,7 +136,7 @@ exports.default = (0, vue_1.defineComponent)({
137
136
  paginatedDataRef
138
137
  });
139
138
  const { mergedExpandedRowKeysRef, renderExpandRef, doUpdateExpandedRowKeys } = (0, use_expand_1.useExpand)(props);
140
- const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, leftActiveFixedColKeyRef, rightActiveFixedColKeyRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(props, {
139
+ const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(props, {
141
140
  scrollPartRef,
142
141
  bodyWidthRef,
143
142
  mainTableInstRef,
@@ -157,6 +156,7 @@ exports.default = (0, vue_1.defineComponent)({
157
156
  return props.tableLayout;
158
157
  });
159
158
  (0, vue_1.provide)(interface_1.dataTableInjectionKey, {
159
+ slots,
160
160
  indentRef: (0, vue_1.toRef)(props, 'indent'),
161
161
  firstContentfulColIndexRef,
162
162
  bodyWidthRef,
@@ -169,7 +169,9 @@ exports.default = (0, vue_1.defineComponent)({
169
169
  colsRef,
170
170
  paginatedDataRef,
171
171
  leftActiveFixedColKeyRef,
172
+ leftActiveFixedChildrenColKeysRef,
172
173
  rightActiveFixedColKeyRef,
174
+ rightActiveFixedChildrenColKeysRef,
173
175
  leftFixedColumnsRef,
174
176
  rightFixedColumnsRef,
175
177
  fixedColumnLeftMapRef,
@@ -295,16 +297,7 @@ exports.default = (0, vue_1.defineComponent)({
295
297
  }
296
298
  ], style: this.cssVars },
297
299
  (0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-wrapper` },
298
- (0, vue_1.h)(MainTable_1.default, { ref: "mainTableInstRef" }, {
299
- default: () => this.paginatedData.length === 0 ? ((0, vue_1.h)("div", { class: [
300
- `${mergedClsPrefix}-data-table-empty`,
301
- {
302
- [`${mergedClsPrefix}-data-table-empty--hide`]: this.loading
303
- }
304
- ] }, (0, vue_1.renderSlot)(this.$slots, 'empty', undefined, () => [
305
- (0, vue_1.h)(empty_1.NEmpty, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
306
- ]))) : null
307
- })),
300
+ (0, vue_1.h)(MainTable_1.default, { ref: "mainTableInstRef" })),
308
301
  this.pagination ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table__pagination` },
309
302
  (0, vue_1.h)(pagination_1.NPagination, Object.assign({ theme: this.mergedTheme.peers.Pagination, themeOverrides: this.mergedTheme.peerOverrides.Pagination, disabled: this.loading }, this.mergedPagination)))) : null,
310
303
  (0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
@@ -178,9 +178,9 @@ declare const _default: import("vue").DefineComponent<{
178
178
  fontSizeMedium: string;
179
179
  fontSizeLarge: string;
180
180
  opacityDisabled: string;
181
- colorOpacitySecondary: number;
182
- colorOpacitySecondaryHover: number;
183
- colorOpacitySecondaryPressed: number;
181
+ colorOpacitySecondary: string;
182
+ colorOpacitySecondaryHover: string;
183
+ colorOpacitySecondaryPressed: string;
184
184
  colorSecondary: string;
185
185
  colorSecondaryHover: string;
186
186
  colorSecondaryPressed: string;
@@ -203,9 +203,9 @@ declare const _default: import("vue").DefineComponent<{
203
203
  fontSizeMedium: string;
204
204
  fontSizeLarge: string;
205
205
  opacityDisabled: string;
206
- colorOpacitySecondary: number;
207
- colorOpacitySecondaryHover: number;
208
- colorOpacitySecondaryPressed: number;
206
+ colorOpacitySecondary: string;
207
+ colorOpacitySecondaryHover: string;
208
+ colorOpacitySecondaryPressed: string;
209
209
  colorSecondary: string;
210
210
  colorSecondaryHover: string;
211
211
  colorSecondaryPressed: string;
@@ -72,7 +72,6 @@ exports.default = (0, vue_1.defineComponent)({
72
72
  const headerInBody = maxHeight === undefined && !flexHeight;
73
73
  return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-base-table`, ref: "selfElRef" },
74
74
  headerInBody ? null : (0, vue_1.h)(Header_1.default, { ref: "headerInstRef" }),
75
- (0, vue_1.h)(Body_1.default, { ref: "bodyInstRef", style: this.bodyStyle, showHeader: headerInBody, flexHeight: flexHeight, onResize: this.handleBodyResize }),
76
- (0, vue_1.renderSlot)(this.$slots, 'default')));
75
+ (0, vue_1.h)(Body_1.default, { ref: "bodyInstRef", bodyStyle: this.bodyStyle, showHeader: headerInBody, flexHeight: flexHeight, onResize: this.handleBodyResize })));
77
76
  }
78
77
  });
@@ -1,12 +1,16 @@
1
- import { PropType } from 'vue';
2
- import { RowKey, TmNode } from '../interface';
1
+ import { PropType, CSSProperties } from 'vue';
2
+ import { RowKey, ColumnKey, TmNode } from '../interface';
3
3
  import type { ColItem } from '../use-group-header';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  onResize: PropType<(e: ResizeObserverEntry) => void>;
6
6
  showHeader: BooleanConstructor;
7
7
  flexHeight: BooleanConstructor;
8
+ bodyStyle: PropType<CSSProperties>;
8
9
  }, {
9
10
  getScrollContainer: () => HTMLElement | null;
11
+ dataTableSlots: Readonly<{
12
+ [name: string]: import("vue").Slot | undefined;
13
+ }>;
10
14
  componentId: string;
11
15
  scrollbarInstRef: import("vue").Ref<{
12
16
  scrollTo: import("../../../_internal/scrollbar/src/ScrollBar").ScrollTo;
@@ -20,6 +24,7 @@ declare const _default: import("vue").DefineComponent<{
20
24
  itemsElRef: HTMLElement | null;
21
25
  scrollTo: import("vueuc/lib/virtual-list/src/VirtualList").ScrollTo;
22
26
  } | null>;
27
+ emptyElRef: import("vue").Ref<HTMLElement | null>;
23
28
  summary: import("vue").Ref<import("../interface").CreateSummary<import("../interface").InternalRowData> | undefined>;
24
29
  mergedClsPrefix: import("vue").Ref<string>;
25
30
  mergedTheme: import("vue").Ref<{
@@ -190,9 +195,9 @@ declare const _default: import("vue").DefineComponent<{
190
195
  fontSizeMedium: string;
191
196
  fontSizeLarge: string;
192
197
  opacityDisabled: string;
193
- colorOpacitySecondary: number;
194
- colorOpacitySecondaryHover: number;
195
- colorOpacitySecondaryPressed: number;
198
+ colorOpacitySecondary: string;
199
+ colorOpacitySecondaryHover: string;
200
+ colorOpacitySecondaryPressed: string;
196
201
  colorSecondary: string;
197
202
  colorSecondaryHover: string;
198
203
  colorSecondaryPressed: string;
@@ -976,17 +981,21 @@ declare const _default: import("vue").DefineComponent<{
976
981
  }>;
977
982
  scrollX: import("vue").Ref<string | number | undefined>;
978
983
  cols: import("vue").Ref<ColItem[]>;
984
+ loading: import("vue").Ref<boolean>;
985
+ bodyShowHeaderOnly: import("vue").ComputedRef<boolean>;
986
+ shouldDisplaySomeTablePart: import("vue").ComputedRef<boolean>;
987
+ empty: import("vue").ComputedRef<boolean>;
979
988
  paginatedData: import("vue").ComputedRef<{
980
989
  tmNode: TmNode;
981
990
  key: import("treemate").Key;
982
991
  striped: boolean;
983
992
  }[]>;
984
993
  rawPaginatedData: import("vue").Ref<import("../interface").InternalRowData[]>;
985
- fixedColumnLeftMap: import("vue").Ref<Record<import("../interface").ColumnKey, {
994
+ fixedColumnLeftMap: import("vue").Ref<Record<ColumnKey, {
986
995
  start: number;
987
996
  end: number;
988
997
  } | undefined>>;
989
- fixedColumnRightMap: import("vue").Ref<Record<import("../interface").ColumnKey, {
998
+ fixedColumnRightMap: import("vue").Ref<Record<ColumnKey, {
990
999
  start: number;
991
1000
  end: number;
992
1001
  } | undefined>>;
@@ -1019,11 +1028,13 @@ declare const _default: import("vue").DefineComponent<{
1019
1028
  onResize?: unknown;
1020
1029
  showHeader?: unknown;
1021
1030
  flexHeight?: unknown;
1031
+ bodyStyle?: unknown;
1022
1032
  } & {
1023
1033
  flexHeight: boolean;
1024
1034
  showHeader: boolean;
1025
1035
  } & {
1026
1036
  onResize?: ((e: ResizeObserverEntry) => void) | undefined;
1037
+ bodyStyle?: CSSProperties | undefined;
1027
1038
  }>, {
1028
1039
  flexHeight: boolean;
1029
1040
  showHeader: boolean;
@@ -10,12 +10,14 @@ const vueuc_1 = require("vueuc");
10
10
  const cssr_1 = require("../../../_utils/cssr");
11
11
  const _internal_1 = require("../../../_internal");
12
12
  const _utils_1 = require("../../../_utils");
13
+ const empty_1 = require("../../../empty");
13
14
  const interface_1 = require("../interface");
14
15
  const utils_1 = require("../utils");
15
16
  const Cell_1 = __importDefault(require("./Cell"));
16
17
  const ExpandTrigger_1 = __importDefault(require("./ExpandTrigger"));
17
18
  const BodyCheckbox_1 = __importDefault(require("./BodyCheckbox"));
18
19
  const Header_1 = __importDefault(require("./Header"));
20
+ const vooks_1 = require("vooks");
19
21
  function flatten(rowInfos, expandedRowKeys) {
20
22
  const fRows = [];
21
23
  function traverse(rs) {
@@ -75,14 +77,24 @@ exports.default = (0, vue_1.defineComponent)({
75
77
  props: {
76
78
  onResize: Function,
77
79
  showHeader: Boolean,
78
- flexHeight: Boolean
80
+ flexHeight: Boolean,
81
+ bodyStyle: Object
79
82
  },
80
83
  setup(props) {
81
- const { mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, rightActiveFixedColKeyRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, hasChildrenRef, firstContentfulColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck
84
+ 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, hasChildrenRef, firstContentfulColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck
82
85
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
83
86
  } = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
84
87
  const scrollbarInstRef = (0, vue_1.ref)(null);
85
88
  const virtualListRef = (0, vue_1.ref)(null);
89
+ const emptyElRef = (0, vue_1.ref)(null);
90
+ const emptyRef = (0, vooks_1.useMemo)(() => paginatedDataRef.value.length === 0);
91
+ // If header is not inside & empty is displayed, no table part would be
92
+ // shown. So to collect a body width, we need to put a ref on empty element
93
+ const shouldDisplaySomeTablePartRef = (0, vooks_1.useMemo)(() => props.showHeader || !emptyRef.value);
94
+ // If no body is shown, we shouldn't show scrollbar
95
+ const bodyShowHeaderOnlyRef = (0, vooks_1.useMemo)(() => {
96
+ return props.showHeader || emptyRef.value;
97
+ });
86
98
  let lastSelectedKey = '';
87
99
  const mergedExpandedRowKeySetRef = (0, vue_1.computed)(() => {
88
100
  return new Set(mergedExpandedRowKeysRef.value);
@@ -119,6 +131,15 @@ exports.default = (0, vue_1.defineComponent)({
119
131
  lastSelectedKey = tmNode.key;
120
132
  }
121
133
  function getScrollContainer() {
134
+ if (!shouldDisplaySomeTablePartRef.value) {
135
+ const { value: emptyEl } = emptyElRef;
136
+ if (emptyEl) {
137
+ return emptyEl;
138
+ }
139
+ else {
140
+ return null;
141
+ }
142
+ }
122
143
  if (virtualScrollRef.value) {
123
144
  return virtualListContainer();
124
145
  }
@@ -170,36 +191,47 @@ exports.default = (0, vue_1.defineComponent)({
170
191
  };
171
192
  // manually control shadow style to avoid rerender
172
193
  const style = (0, cssr_1.c)([
173
- ({ props: cProps }) => (0, cssr_1.c)([
174
- cProps.leftActiveFixedColKey === null
175
- ? null
176
- : (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${cProps.leftActiveFixedColKey}"]::after`, {
177
- boxShadow: 'var(--box-shadow-after)'
178
- }),
179
- cProps.rightActiveFixedColKey === null
180
- ? null
181
- : (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${cProps.rightActiveFixedColKey}"]::before`, {
182
- boxShadow: 'var(--box-shadow-before)'
183
- })
184
- ])
194
+ ({ props: cProps }) => {
195
+ const createActiveLeftFixedStyle = (leftActiveFixedColKey) => {
196
+ if (leftActiveFixedColKey === null)
197
+ return null;
198
+ return (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${leftActiveFixedColKey}"]::after`, { boxShadow: 'var(--box-shadow-after)' });
199
+ };
200
+ const createActiveRightFixedStyle = (rightActiveFixedColKey) => {
201
+ if (rightActiveFixedColKey === null)
202
+ return null;
203
+ return (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${rightActiveFixedColKey}"]::before`, { boxShadow: 'var(--box-shadow-before)' });
204
+ };
205
+ return (0, cssr_1.c)([
206
+ createActiveLeftFixedStyle(cProps.leftActiveFixedColKey),
207
+ createActiveRightFixedStyle(cProps.rightActiveFixedColKey),
208
+ cProps.leftActiveFixedChildrenColKeys.map((leftActiveFixedColKey) => createActiveLeftFixedStyle(leftActiveFixedColKey)),
209
+ cProps.rightActiveFixedChildrenColKeys.map((rightActiveFixedColKey) => createActiveRightFixedStyle(rightActiveFixedColKey))
210
+ ]);
211
+ }
185
212
  ]);
186
213
  let fixedStyleMounted = false;
187
214
  (0, vue_1.watchEffect)(() => {
188
215
  const { value: leftActiveFixedColKey } = leftActiveFixedColKeyRef;
216
+ const { value: leftActiveFixedChildrenColKeys } = leftActiveFixedChildrenColKeysRef;
189
217
  const { value: rightActiveFixedColKey } = rightActiveFixedColKeyRef;
218
+ const { value: rightActiveFixedChildrenColKeys } = rightActiveFixedChildrenColKeysRef;
190
219
  if (!fixedStyleMounted &&
191
220
  leftActiveFixedColKey === null &&
192
221
  rightActiveFixedColKey === null) {
193
222
  return;
194
223
  }
224
+ const cProps = {
225
+ leftActiveFixedColKey,
226
+ leftActiveFixedChildrenColKeys,
227
+ rightActiveFixedColKey,
228
+ rightActiveFixedChildrenColKeys,
229
+ componentId
230
+ };
195
231
  style.mount({
196
232
  id: `n-${componentId}`,
197
233
  force: true,
198
- props: {
199
- leftActiveFixedColKey,
200
- rightActiveFixedColKey,
201
- componentId
202
- }
234
+ props: cProps
203
235
  });
204
236
  fixedStyleMounted = true;
205
237
  });
@@ -208,9 +240,11 @@ exports.default = (0, vue_1.defineComponent)({
208
240
  id: `n-${componentId}`
209
241
  });
210
242
  });
211
- return Object.assign({ componentId,
243
+ return Object.assign({ dataTableSlots,
244
+ componentId,
212
245
  scrollbarInstRef,
213
- virtualListRef, summary: summaryRef, mergedClsPrefix: mergedClsPrefixRef, mergedTheme: mergedThemeRef, scrollX: scrollXRef, cols: colsRef, paginatedData: (0, vue_1.computed)(() => {
246
+ virtualListRef,
247
+ emptyElRef, summary: summaryRef, mergedClsPrefix: mergedClsPrefixRef, mergedTheme: mergedThemeRef, scrollX: scrollXRef, cols: colsRef, loading: loadingRef, bodyShowHeaderOnly: bodyShowHeaderOnlyRef, shouldDisplaySomeTablePart: shouldDisplaySomeTablePartRef, empty: emptyRef, paginatedData: (0, vue_1.computed)(() => {
214
248
  const { value: striped } = stripedRef;
215
249
  return paginatedDataRef.value.map(striped
216
250
  ? (tmNode, index) => {
@@ -252,13 +286,13 @@ exports.default = (0, vue_1.defineComponent)({
252
286
  };
253
287
  if (scrollX)
254
288
  contentStyle.width = '100%';
255
- return ((0, vue_1.h)(_internal_1.NScrollbar, { ref: "scrollbarInstRef", scrollable: scrollable || isBasicAutoLayout, class: `${mergedClsPrefix}-data-table-base-table-body`, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, contentStyle: contentStyle, container: virtualScroll ? this.virtualListContainer : undefined, content: virtualScroll ? this.virtualListContent : undefined, horizontalRailStyle: { zIndex: 3 }, verticalRailStyle: { zIndex: 3 }, xScrollable: xScrollable, onScroll: virtualScroll ? undefined : this.handleTableBodyScroll, internalOnUpdateScrollLeft: setHeaderScrollLeft, onResize: onResize }, {
289
+ const tableNode = ((0, vue_1.h)(_internal_1.NScrollbar, { ref: "scrollbarInstRef", scrollable: scrollable || isBasicAutoLayout, showScrollbar: !this.bodyShowHeaderOnly, class: `${mergedClsPrefix}-data-table-base-table-body`, style: this.bodyStyle, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, contentStyle: contentStyle, container: virtualScroll ? this.virtualListContainer : undefined, content: virtualScroll ? this.virtualListContent : undefined, horizontalRailStyle: { zIndex: 3 }, verticalRailStyle: { zIndex: 3 }, xScrollable: xScrollable, onScroll: virtualScroll ? undefined : this.handleTableBodyScroll, internalOnUpdateScrollLeft: setHeaderScrollLeft, onResize: onResize }, {
256
290
  default: () => {
257
291
  // coordinate to pass if there are cells that cross row & col
258
292
  const cordToPass = {};
259
293
  // coordinate to related hover keys
260
294
  const cordKey = {};
261
- const { cols, paginatedData, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId, showHeader, hasChildren, firstContentfulColIndex, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleUpdateExpanded } = this;
295
+ const { cols, paginatedData, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId, hasChildren, firstContentfulColIndex, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleUpdateExpanded } = this;
262
296
  const { length: colCount } = cols;
263
297
  let mergedData;
264
298
  // if there is children in data, we should expand mergedData first
@@ -343,6 +377,7 @@ exports.default = (0, vue_1.defineComponent)({
343
377
  this.hoverKey = rowKey;
344
378
  }, key: rowKey, class: [
345
379
  `${mergedClsPrefix}-data-table-tr`,
380
+ isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
346
381
  striped && `${mergedClsPrefix}-data-table-tr--striped`,
347
382
  mergedRowClassName
348
383
  ] }, props), cols.map((col, colIndex) => {
@@ -441,10 +476,10 @@ exports.default = (0, vue_1.defineComponent)({
441
476
  tableLayout: this.mergedTableLayout
442
477
  } },
443
478
  (0, vue_1.h)("colgroup", null, cols.map((col) => ((0, vue_1.h)("col", { key: col.key, style: col.style })))),
444
- showHeader ? (0, vue_1.h)(Header_1.default, { discrete: false }) : null,
445
- (0, vue_1.h)("tbody", { "data-n-id": componentId, class: `${mergedClsPrefix}-data-table-tbody` }, displayedData.map((rowInfo, rowIndex) => {
479
+ this.showHeader ? (0, vue_1.h)(Header_1.default, { discrete: false }) : null,
480
+ !this.empty ? ((0, vue_1.h)("tbody", { "data-n-id": componentId, class: `${mergedClsPrefix}-data-table-tbody` }, displayedData.map((rowInfo, rowIndex) => {
446
481
  return renderRow(rowInfo, rowIndex, false);
447
- }))));
482
+ }))) : null));
448
483
  }
449
484
  else {
450
485
  return ((0, vue_1.h)(vueuc_1.VirtualList, { ref: "virtualListRef", items: displayedData, itemSize: 28, visibleItemsTag: VirtualListItemWrapper, visibleItemsProps: {
@@ -459,5 +494,22 @@ exports.default = (0, vue_1.defineComponent)({
459
494
  }
460
495
  }
461
496
  }));
497
+ if (this.empty) {
498
+ const createEmptyNode = () => ((0, vue_1.h)("div", { class: [
499
+ `${mergedClsPrefix}-data-table-empty`,
500
+ this.loading && `${mergedClsPrefix}-data-table-empty--hide`
501
+ ], style: this.bodyStyle, ref: "emptyElRef" }, (0, vue_1.renderSlot)(this.dataTableSlots, 'empty', undefined, () => [
502
+ (0, vue_1.h)(empty_1.NEmpty, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
503
+ ])));
504
+ if (this.shouldDisplaySomeTablePart) {
505
+ return ((0, vue_1.h)(vue_1.Fragment, null,
506
+ tableNode,
507
+ createEmptyNode()));
508
+ }
509
+ else {
510
+ return ((0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.onResize }, { default: createEmptyNode }));
511
+ }
512
+ }
513
+ return tableNode;
462
514
  }
463
515
  });
@@ -183,9 +183,9 @@ declare const _default: import("vue").DefineComponent<{
183
183
  fontSizeMedium: string;
184
184
  fontSizeLarge: string;
185
185
  opacityDisabled: string;
186
- colorOpacitySecondary: number;
187
- colorOpacitySecondaryHover: number;
188
- colorOpacitySecondaryPressed: number;
186
+ colorOpacitySecondary: string;
187
+ colorOpacitySecondaryHover: string;
188
+ colorOpacitySecondaryPressed: string;
189
189
  colorSecondary: string;
190
190
  colorSecondaryHover: string;
191
191
  colorSecondaryPressed: string;
@@ -1147,9 +1147,9 @@ declare const _default: import("vue").DefineComponent<{
1147
1147
  fontSizeMedium: string;
1148
1148
  fontSizeLarge: string;
1149
1149
  opacityDisabled: string;
1150
- colorOpacitySecondary: number;
1151
- colorOpacitySecondaryHover: number;
1152
- colorOpacitySecondaryPressed: number;
1150
+ colorOpacitySecondary: string;
1151
+ colorOpacitySecondaryHover: string;
1152
+ colorOpacitySecondaryPressed: string;
1153
1153
  colorSecondary: string;
1154
1154
  colorSecondaryHover: string;
1155
1155
  colorSecondaryPressed: string;
@@ -190,9 +190,9 @@ declare const _default: import("vue").DefineComponent<{
190
190
  fontSizeMedium: string;
191
191
  fontSizeLarge: string;
192
192
  opacityDisabled: string;
193
- colorOpacitySecondary: number;
194
- colorOpacitySecondaryHover: number;
195
- colorOpacitySecondaryPressed: number;
193
+ colorOpacitySecondary: string;
194
+ colorOpacitySecondaryHover: string;
195
+ colorOpacitySecondaryPressed: string;
196
196
  colorSecondary: string;
197
197
  colorSecondaryHover: string;
198
198
  colorSecondaryPressed: string;
@@ -31,7 +31,7 @@ exports.default = (0, vue_1.defineComponent)({
31
31
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
32
32
  } = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
33
33
  function handleCheckboxUpdateChecked() {
34
- if (someRowsCheckedRef.value || allRowsCheckedRef.value) {
34
+ if (allRowsCheckedRef.value) {
35
35
  doUncheckAll();
36
36
  }
37
37
  else {