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
@@ -72,40 +72,41 @@ exports.default = (0, cssr_1.cB)('dropdown-menu', `
72
72
  right: 4px;
73
73
  transition: background-color .3s var(--n-bezier);
74
74
  border-radius: var(--n-border-radius);
75
- `), (0, cssr_1.cNotM)('disabled', [(0, cssr_1.cM)('pending', {
76
- color: 'var(--n-option-text-color-hover)'
77
- }, [(0, cssr_1.cE)('prefix, suffix', {
78
- color: 'var(--n-option-text-color-hover)'
79
- }), (0, cssr_1.c)('&::before', 'background-color: var(--n-option-color-hover);')]), (0, cssr_1.cM)('active', {
80
- color: 'var(--n-option-text-color-active)'
81
- }, [(0, cssr_1.cE)('prefix, suffix', {
82
- color: 'var(--n-option-text-color-active)'
83
- }), (0, cssr_1.c)('&::before', 'background-color: var(--n-option-color-active);')]), (0, cssr_1.cM)('child-active', {
84
- color: 'var(--n-option-text-color-child-active)'
85
- }, [(0, cssr_1.cE)('prefix, suffix', {
86
- color: 'var(--n-option-text-color-child-active)'
87
- })])]), (0, cssr_1.cM)('disabled', {
88
- cursor: 'not-allowed',
89
- opacity: 'var(--n-option-opacity-disabled)'
90
- }), (0, cssr_1.cM)('group', {
91
- fontSize: 'calc(var(--n-font-size) - 1px)',
92
- color: 'var(--n-group-header-text-color)'
93
- }, [(0, cssr_1.cE)('prefix', {
94
- width: 'calc(var(--n-option-prefix-width) / 2)'
95
- }, [(0, cssr_1.cM)('show-icon', {
96
- width: 'calc(var(--n-option-icon-prefix-width) / 2)'
97
- })])]), (0, cssr_1.cE)('prefix', `
75
+ `), (0, cssr_1.cNotM)('disabled', [(0, cssr_1.cM)('pending', `
76
+ color: var(--n-option-text-color-hover);
77
+ `, [(0, cssr_1.cE)('prefix, suffix', `
78
+ color: var(--n-option-text-color-hover);
79
+ `), (0, cssr_1.c)('&::before', 'background-color: var(--n-option-color-hover);')]), (0, cssr_1.cM)('active', `
80
+ color: var(--n-option-text-color-active);
81
+ `, [(0, cssr_1.cE)('prefix, suffix', `
82
+ color: var(--n-option-text-color-active);
83
+ `), (0, cssr_1.c)('&::before', 'background-color: var(--n-option-color-active);')]), (0, cssr_1.cM)('child-active', `
84
+ color: var(--n-option-text-color-child-active);
85
+ `, [(0, cssr_1.cE)('prefix, suffix', `
86
+ color: var(--n-option-text-color-child-active);
87
+ `)])]), (0, cssr_1.cM)('disabled', `
88
+ cursor: not-allowed;
89
+ opacity: var(--n-option-opacity-disabled);
90
+ `), (0, cssr_1.cM)('group', `
91
+ font-size: calc(var(--n-font-size) - 1px);
92
+ color: var(--n-group-header-text-color);
93
+ `, [(0, cssr_1.cE)('prefix', `
94
+ width: calc(var(--n-option-prefix-width) / 2);
95
+ `, [(0, cssr_1.cM)('show-icon', `
96
+ width: calc(var(--n-option-icon-prefix-width) / 2);
97
+ `)])]), (0, cssr_1.cE)('prefix', `
98
98
  width: var(--n-option-prefix-width);
99
99
  display: flex;
100
100
  justify-content: center;
101
101
  align-items: center;
102
102
  color: var(--n-prefix-color);
103
103
  transition: color .3s var(--n-bezier);
104
- `, [(0, cssr_1.cM)('show-icon', {
105
- width: 'var(--n-option-icon-prefix-width)'
106
- }), (0, cssr_1.cB)('icon', {
107
- fontSize: 'var(--n-option-icon-size)'
108
- })]), (0, cssr_1.cE)('label', `
104
+ z-index: 1;
105
+ `, [(0, cssr_1.cM)('show-icon', `
106
+ width: var(--n-option-icon-prefix-width);
107
+ `), (0, cssr_1.cB)('icon', `
108
+ font-size: var(--n-option-icon-size);
109
+ `)]), (0, cssr_1.cE)('label', `
109
110
  white-space: nowrap;
110
111
  flex: 1;
111
112
  z-index: 1;
@@ -120,11 +121,12 @@ exports.default = (0, cssr_1.cB)('dropdown-menu', `
120
121
  padding: 0 8px;
121
122
  transition: color .3s var(--n-bezier);
122
123
  color: var(--n-suffix-color);
123
- `, [(0, cssr_1.cM)('has-submenu', {
124
- width: 'var(--n-option-icon-suffix-width)'
125
- }), (0, cssr_1.cB)('icon', {
126
- fontSize: 'var(--n-option-icon-size)'
127
- })]), (0, cssr_1.cB)('dropdown-menu', 'pointer-events: all;')]), (0, cssr_1.cB)('dropdown-offset-container', `
124
+ z-index: 1;
125
+ `, [(0, cssr_1.cM)('has-submenu', `
126
+ width: var(--n-option-icon-suffix-width);
127
+ `), (0, cssr_1.cB)('icon', `
128
+ font-size: var(--n-option-icon-size);
129
+ `)]), (0, cssr_1.cB)('dropdown-menu', 'pointer-events: all;')]), (0, cssr_1.cB)('dropdown-offset-container', `
128
130
  pointer-events: none;
129
131
  position: absolute;
130
132
  left: 0;
@@ -44,6 +44,7 @@ export declare const dynamicInputProps: {
44
44
  actionMarginRtl: string;
45
45
  }, {
46
46
  Input: import("../../_mixins").Theme<"Input", {
47
+ countTextColorDisabled: string;
47
48
  countTextColor: string;
48
49
  heightTiny: string;
49
50
  heightSmall: string;
@@ -313,6 +314,7 @@ export declare const dynamicInputProps: {
313
314
  actionMarginRtl: string;
314
315
  }, {
315
316
  Input: import("../../_mixins").Theme<"Input", {
317
+ countTextColorDisabled: string;
316
318
  countTextColor: string;
317
319
  heightTiny: string;
318
320
  heightSmall: string;
@@ -582,6 +584,7 @@ export declare const dynamicInputProps: {
582
584
  actionMarginRtl: string;
583
585
  }, {
584
586
  Input: import("../../_mixins").Theme<"Input", {
587
+ countTextColorDisabled: string;
585
588
  countTextColor: string;
586
589
  heightTiny: string;
587
590
  heightSmall: string;
@@ -890,6 +893,7 @@ declare const _default: import("vue").DefineComponent<{
890
893
  actionMarginRtl: string;
891
894
  }, {
892
895
  Input: import("../../_mixins").Theme<"Input", {
896
+ countTextColorDisabled: string;
893
897
  countTextColor: string;
894
898
  heightTiny: string;
895
899
  heightSmall: string;
@@ -1159,6 +1163,7 @@ declare const _default: import("vue").DefineComponent<{
1159
1163
  actionMarginRtl: string;
1160
1164
  }, {
1161
1165
  Input: import("../../_mixins").Theme<"Input", {
1166
+ countTextColorDisabled: string;
1162
1167
  countTextColor: string;
1163
1168
  heightTiny: string;
1164
1169
  heightSmall: string;
@@ -1428,6 +1433,7 @@ declare const _default: import("vue").DefineComponent<{
1428
1433
  actionMarginRtl: string;
1429
1434
  }, {
1430
1435
  Input: import("../../_mixins").Theme<"Input", {
1436
+ countTextColorDisabled: string;
1431
1437
  countTextColor: string;
1432
1438
  heightTiny: string;
1433
1439
  heightSmall: string;
@@ -1822,6 +1828,7 @@ declare const _default: import("vue").DefineComponent<{
1822
1828
  };
1823
1829
  peers: {
1824
1830
  Input: import("../../_mixins").Theme<"Input", {
1831
+ countTextColorDisabled: string;
1825
1832
  countTextColor: string;
1826
1833
  heightTiny: string;
1827
1834
  heightSmall: string;
@@ -2147,6 +2154,7 @@ declare const _default: import("vue").DefineComponent<{
2147
2154
  actionMarginRtl: string;
2148
2155
  }, {
2149
2156
  Input: import("../../_mixins").Theme<"Input", {
2157
+ countTextColorDisabled: string;
2150
2158
  countTextColor: string;
2151
2159
  heightTiny: string;
2152
2160
  heightSmall: string;
@@ -2416,6 +2424,7 @@ declare const _default: import("vue").DefineComponent<{
2416
2424
  actionMarginRtl: string;
2417
2425
  }, {
2418
2426
  Input: import("../../_mixins").Theme<"Input", {
2427
+ countTextColorDisabled: string;
2419
2428
  countTextColor: string;
2420
2429
  heightTiny: string;
2421
2430
  heightSmall: string;
@@ -2685,6 +2694,7 @@ declare const _default: import("vue").DefineComponent<{
2685
2694
  actionMarginRtl: string;
2686
2695
  }, {
2687
2696
  Input: import("../../_mixins").Theme<"Input", {
2697
+ countTextColorDisabled: string;
2688
2698
  countTextColor: string;
2689
2699
  heightTiny: string;
2690
2700
  heightSmall: string;
@@ -127,6 +127,7 @@ declare const _default: import("vue").DefineComponent<{
127
127
  };
128
128
  peers: {
129
129
  Input: import("../../_mixins").Theme<"Input", {
130
+ countTextColorDisabled: string;
130
131
  countTextColor: string;
131
132
  heightTiny: string;
132
133
  heightSmall: string;
@@ -136,6 +136,7 @@ declare const _default: import("vue").DefineComponent<{
136
136
  };
137
137
  peers: {
138
138
  Input: import("../../_mixins").Theme<"Input", {
139
+ countTextColorDisabled: string;
139
140
  countTextColor: string;
140
141
  heightTiny: string;
141
142
  heightSmall: string;
@@ -8,6 +8,7 @@ declare const dynamicInputLight: import("../../_mixins").Theme<"DynamicInput", {
8
8
  actionMarginRtl: string;
9
9
  }, {
10
10
  Input: import("../../_mixins").Theme<"Input", {
11
+ countTextColorDisabled: string;
11
12
  countTextColor: string;
12
13
  heightTiny: string;
13
14
  heightSmall: string;
@@ -42,6 +42,7 @@ export declare const dynamicTagsProps: {
42
42
  inputWidth: string;
43
43
  }, {
44
44
  Input: import("../../_mixins").Theme<"Input", {
45
+ countTextColorDisabled: string;
45
46
  countTextColor: string;
46
47
  heightTiny: string;
47
48
  heightSmall: string;
@@ -404,6 +405,7 @@ export declare const dynamicTagsProps: {
404
405
  inputWidth: string;
405
406
  }, {
406
407
  Input: import("../../_mixins").Theme<"Input", {
408
+ countTextColorDisabled: string;
407
409
  countTextColor: string;
408
410
  heightTiny: string;
409
411
  heightSmall: string;
@@ -766,6 +768,7 @@ export declare const dynamicTagsProps: {
766
768
  inputWidth: string;
767
769
  }, {
768
770
  Input: import("../../_mixins").Theme<"Input", {
771
+ countTextColorDisabled: string;
769
772
  countTextColor: string;
770
773
  heightTiny: string;
771
774
  heightSmall: string;
@@ -1166,6 +1169,7 @@ declare const _default: import("vue").DefineComponent<{
1166
1169
  inputWidth: string;
1167
1170
  }, {
1168
1171
  Input: import("../../_mixins").Theme<"Input", {
1172
+ countTextColorDisabled: string;
1169
1173
  countTextColor: string;
1170
1174
  heightTiny: string;
1171
1175
  heightSmall: string;
@@ -1528,6 +1532,7 @@ declare const _default: import("vue").DefineComponent<{
1528
1532
  inputWidth: string;
1529
1533
  }, {
1530
1534
  Input: import("../../_mixins").Theme<"Input", {
1535
+ countTextColorDisabled: string;
1531
1536
  countTextColor: string;
1532
1537
  heightTiny: string;
1533
1538
  heightSmall: string;
@@ -1890,6 +1895,7 @@ declare const _default: import("vue").DefineComponent<{
1890
1895
  inputWidth: string;
1891
1896
  }, {
1892
1897
  Input: import("../../_mixins").Theme<"Input", {
1898
+ countTextColorDisabled: string;
1893
1899
  countTextColor: string;
1894
1900
  heightTiny: string;
1895
1901
  heightSmall: string;
@@ -2389,6 +2395,7 @@ declare const _default: import("vue").DefineComponent<{
2389
2395
  };
2390
2396
  peers: {
2391
2397
  Input: import("../../_mixins").Theme<"Input", {
2398
+ countTextColorDisabled: string;
2392
2399
  countTextColor: string;
2393
2400
  heightTiny: string;
2394
2401
  heightSmall: string;
@@ -2815,6 +2822,7 @@ declare const _default: import("vue").DefineComponent<{
2815
2822
  inputWidth: string;
2816
2823
  }, {
2817
2824
  Input: import("../../_mixins").Theme<"Input", {
2825
+ countTextColorDisabled: string;
2818
2826
  countTextColor: string;
2819
2827
  heightTiny: string;
2820
2828
  heightSmall: string;
@@ -3177,6 +3185,7 @@ declare const _default: import("vue").DefineComponent<{
3177
3185
  inputWidth: string;
3178
3186
  }, {
3179
3187
  Input: import("../../_mixins").Theme<"Input", {
3188
+ countTextColorDisabled: string;
3180
3189
  countTextColor: string;
3181
3190
  heightTiny: string;
3182
3191
  heightSmall: string;
@@ -3539,6 +3548,7 @@ declare const _default: import("vue").DefineComponent<{
3539
3548
  inputWidth: string;
3540
3549
  }, {
3541
3550
  Input: import("../../_mixins").Theme<"Input", {
3551
+ countTextColorDisabled: string;
3542
3552
  countTextColor: string;
3543
3553
  heightTiny: string;
3544
3554
  heightSmall: string;
@@ -2,6 +2,7 @@ declare const dynamicTagsLight: import("../../_mixins").Theme<"DynamicTags", {
2
2
  inputWidth: string;
3
3
  }, {
4
4
  Input: import("../../_mixins").Theme<"Input", {
5
+ countTextColorDisabled: string;
5
6
  countTextColor: string;
6
7
  heightTiny: string;
7
8
  heightSmall: string;
@@ -11,7 +11,7 @@ const self = (vars) => {
11
11
  return Object.assign(Object.assign({}, _common_1.default), { fontSizeSmall,
12
12
  fontSizeMedium,
13
13
  fontSizeLarge,
14
- fontSizeHuge, textColor: textColorDisabled, iconColor: iconColor, extraTextColor: textColor2 });
14
+ fontSizeHuge, textColor: textColorDisabled, iconColor, extraTextColor: textColor2 });
15
15
  };
16
16
  exports.self = self;
17
17
  const emptyLight = {
@@ -2,6 +2,7 @@ import { CSSProperties, PropType, Ref } from 'vue';
2
2
  import { VResizeObserverOnResize } from 'vueuc';
3
3
  import { ExtractPublicPropTypes } from '../../_utils';
4
4
  export declare const gridProps: {
5
+ readonly layoutShiftDisabled: BooleanConstructor;
5
6
  readonly responsive: {
6
7
  readonly type: PropType<"screen" | "self">;
7
8
  readonly default: "self";
@@ -31,9 +32,11 @@ export interface NGridInjection {
31
32
  itemStyleRef: Ref<CSSProperties | string | undefined>;
32
33
  xGapRef: Ref<string | undefined>;
33
34
  overflowRef: Ref<boolean>;
35
+ layoutShiftDisabledRef: Ref<boolean>;
34
36
  }
35
37
  export declare type GridProps = ExtractPublicPropTypes<typeof gridProps>;
36
38
  declare const _default: import("vue").DefineComponent<{
39
+ readonly layoutShiftDisabled: BooleanConstructor;
37
40
  readonly responsive: {
38
41
  readonly type: PropType<"screen" | "self">;
39
42
  readonly default: "self";
@@ -68,6 +71,7 @@ declare const _default: import("vue").DefineComponent<{
68
71
  handleResize: import("vue").ComputedRef<VResizeObserverOnResize | undefined>;
69
72
  overflow: Ref<boolean>;
70
73
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
74
+ readonly layoutShiftDisabled: BooleanConstructor;
71
75
  readonly responsive: {
72
76
  readonly type: PropType<"screen" | "self">;
73
77
  readonly default: "self";
@@ -95,6 +99,7 @@ declare const _default: import("vue").DefineComponent<{
95
99
  readonly cols: string | number;
96
100
  readonly responsive: "screen" | "self";
97
101
  readonly collapsed: boolean;
102
+ readonly layoutShiftDisabled: boolean;
98
103
  readonly itemResponsive: boolean;
99
104
  readonly collapsedRows: number;
100
105
  readonly xGap: string | number;
@@ -12,6 +12,7 @@ const config_2 = require("./config");
12
12
  const defaultCols = 24;
13
13
  const SSR_ATTR_NAME = '__ssr__';
14
14
  exports.gridProps = {
15
+ layoutShiftDisabled: Boolean,
15
16
  responsive: {
16
17
  type: [String, Boolean],
17
18
  default: 'self'
@@ -94,6 +95,7 @@ exports.default = (0, vue_1.defineComponent)({
94
95
  }
95
96
  });
96
97
  (0, vue_1.provide)(config_2.gridInjectionKey, {
98
+ layoutShiftDisabledRef: (0, vue_1.toRef)(props, 'layoutShiftDisabled'),
97
99
  isSsrRef,
98
100
  itemStyleRef: (0, vue_1.toRef)(props, 'itemStyle'),
99
101
  xGapRef: responsiveXGapRef,
@@ -104,6 +106,15 @@ exports.default = (0, vue_1.defineComponent)({
104
106
  contentEl: contentElRef,
105
107
  mergedClsPrefix: mergedClsPrefixRef,
106
108
  style: (0, vue_1.computed)(() => {
109
+ if (props.layoutShiftDisabled) {
110
+ return {
111
+ width: '100%',
112
+ display: 'grid',
113
+ gridTemplateColumns: `repeat(${props.cols}, minmax(0, 1fr))`,
114
+ columnGap: (0, seemly_1.pxfy)(props.xGap),
115
+ rowGap: (0, seemly_1.pxfy)(props.yGap)
116
+ };
117
+ }
107
118
  return {
108
119
  width: '100%',
109
120
  display: 'grid',
@@ -120,6 +131,13 @@ exports.default = (0, vue_1.defineComponent)({
120
131
  };
121
132
  },
122
133
  render() {
134
+ if (this.layoutShiftDisabled) {
135
+ return (0, vue_1.h)('div', (0, vue_1.mergeProps)({
136
+ ref: 'contentEl',
137
+ class: `${this.mergedClsPrefix}-grid`,
138
+ style: this.style
139
+ }, this.$attrs), this.$slots);
140
+ }
123
141
  const renderContent = () => {
124
142
  var _a, _b, _c, _d, _e, _f, _g;
125
143
  this.overflow = false;
@@ -41,6 +41,8 @@ declare const _default: import("vue").DefineComponent<{
41
41
  }, {
42
42
  overflow: import("vue").Ref<boolean>;
43
43
  itemStyle: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
44
+ layoutShiftDisabled: import("vue").Ref<boolean>;
45
+ mergedXGap: import("vue").ComputedRef<string>;
44
46
  deriveStyle: () => {
45
47
  display: string;
46
48
  gridColumn: string;
@@ -32,13 +32,17 @@ exports.default = (0, vue_1.defineComponent)({
32
32
  alias: ['Gi'],
33
33
  props: exports.gridItemProps,
34
34
  setup() {
35
- const { isSsrRef, xGapRef, itemStyleRef, overflowRef
35
+ const { isSsrRef, xGapRef, itemStyleRef, overflowRef, layoutShiftDisabledRef
36
36
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
37
37
  } = (0, vue_1.inject)(config_1.gridInjectionKey);
38
38
  const self = (0, vue_1.getCurrentInstance)();
39
39
  return {
40
40
  overflow: overflowRef,
41
41
  itemStyle: itemStyleRef,
42
+ layoutShiftDisabled: layoutShiftDisabledRef,
43
+ mergedXGap: (0, vue_1.computed)(() => {
44
+ return (0, seemly_1.pxfy)(xGapRef.value || 0);
45
+ }),
42
46
  deriveStyle: () => {
43
47
  void isSsrRef.value;
44
48
  // Here is quite a hack, I hope there is a better way to solve it
@@ -59,6 +63,15 @@ exports.default = (0, vue_1.defineComponent)({
59
63
  },
60
64
  render() {
61
65
  var _a, _b;
66
+ if (this.layoutShiftDisabled) {
67
+ const { span, offset, mergedXGap } = this;
68
+ return ((0, vue_1.h)("div", { style: {
69
+ gridColumn: `span ${span} / span ${span}`,
70
+ marginLeft: offset
71
+ ? `calc((100% - (${span} - 1) * ${mergedXGap}) / ${span} * ${offset} + ${mergedXGap} * ${offset})`
72
+ : ''
73
+ } }, this.$slots));
74
+ }
62
75
  return ((0, vue_1.h)("div", { style: [this.itemStyle, this.deriveStyle()] }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, { overflow: this.overflow })));
63
76
  }
64
77
  });
@@ -1,4 +1,4 @@
1
- import { PropType, InputHTMLAttributes, TextareaHTMLAttributes } from 'vue';
1
+ import { PropType, InputHTMLAttributes, TextareaHTMLAttributes, VNodeChild } from 'vue';
2
2
  import type { FormValidationStatus } from '../../form/src/interface';
3
3
  import { ExtractPublicPropTypes } from '../../_utils';
4
4
  import type { MaybeArray } from '../../_utils';
@@ -62,6 +62,9 @@ export declare const inputProps: {
62
62
  default: undefined;
63
63
  };
64
64
  allowInput: PropType<(value: string) => boolean>;
65
+ renderCount: PropType<(props: {
66
+ value: string;
67
+ }) => VNodeChild>;
65
68
  onMousedown: PropType<(e: MouseEvent) => void>;
66
69
  onKeydown: PropType<(e: KeyboardEvent) => void>;
67
70
  onKeyup: PropType<(e: KeyboardEvent) => void>;
@@ -92,6 +95,7 @@ export declare const inputProps: {
92
95
  /** deprecated */
93
96
  showPasswordToggle: BooleanConstructor;
94
97
  theme: PropType<import("../../_mixins").Theme<"Input", {
98
+ countTextColorDisabled: string;
95
99
  countTextColor: string;
96
100
  heightTiny: string;
97
101
  heightSmall: string;
@@ -152,6 +156,7 @@ export declare const inputProps: {
152
156
  clearSize: string;
153
157
  }, any>>;
154
158
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
159
+ countTextColorDisabled: string;
155
160
  countTextColor: string;
156
161
  heightTiny: string;
157
162
  heightSmall: string;
@@ -212,6 +217,7 @@ export declare const inputProps: {
212
217
  clearSize: string;
213
218
  }, any>>>;
214
219
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
220
+ countTextColorDisabled: string;
215
221
  countTextColor: string;
216
222
  heightTiny: string;
217
223
  heightSmall: string;
@@ -332,6 +338,9 @@ declare const _default: import("vue").DefineComponent<{
332
338
  default: undefined;
333
339
  };
334
340
  allowInput: PropType<(value: string) => boolean>;
341
+ renderCount: PropType<(props: {
342
+ value: string;
343
+ }) => VNodeChild>;
335
344
  onMousedown: PropType<(e: MouseEvent) => void>;
336
345
  onKeydown: PropType<(e: KeyboardEvent) => void>;
337
346
  onKeyup: PropType<(e: KeyboardEvent) => void>;
@@ -362,6 +371,7 @@ declare const _default: import("vue").DefineComponent<{
362
371
  /** deprecated */
363
372
  showPasswordToggle: BooleanConstructor;
364
373
  theme: PropType<import("../../_mixins").Theme<"Input", {
374
+ countTextColorDisabled: string;
365
375
  countTextColor: string;
366
376
  heightTiny: string;
367
377
  heightSmall: string;
@@ -422,6 +432,7 @@ declare const _default: import("vue").DefineComponent<{
422
432
  clearSize: string;
423
433
  }, any>>;
424
434
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
435
+ countTextColorDisabled: string;
425
436
  countTextColor: string;
426
437
  heightTiny: string;
427
438
  heightSmall: string;
@@ -482,6 +493,7 @@ declare const _default: import("vue").DefineComponent<{
482
493
  clearSize: string;
483
494
  }, any>>>;
484
495
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
496
+ countTextColorDisabled: string;
485
497
  countTextColor: string;
486
498
  heightTiny: string;
487
499
  heightSmall: string;
@@ -710,6 +722,7 @@ declare const _default: import("vue").DefineComponent<{
710
722
  name: "common";
711
723
  };
712
724
  self: {
725
+ countTextColorDisabled: string;
713
726
  countTextColor: string;
714
727
  heightTiny: string;
715
728
  heightSmall: string;
@@ -777,6 +790,7 @@ declare const _default: import("vue").DefineComponent<{
777
790
  cssVars: import("vue").ComputedRef<{
778
791
  '--n-bezier': string;
779
792
  '--n-count-text-color': string;
793
+ '--n-count-text-color-disabled': string;
780
794
  '--n-color': string;
781
795
  '--n-font-size': string;
782
796
  '--n-border-radius': string;
@@ -891,6 +905,9 @@ declare const _default: import("vue").DefineComponent<{
891
905
  default: undefined;
892
906
  };
893
907
  allowInput: PropType<(value: string) => boolean>;
908
+ renderCount: PropType<(props: {
909
+ value: string;
910
+ }) => VNodeChild>;
894
911
  onMousedown: PropType<(e: MouseEvent) => void>;
895
912
  onKeydown: PropType<(e: KeyboardEvent) => void>;
896
913
  onKeyup: PropType<(e: KeyboardEvent) => void>;
@@ -921,6 +938,7 @@ declare const _default: import("vue").DefineComponent<{
921
938
  /** deprecated */
922
939
  showPasswordToggle: BooleanConstructor;
923
940
  theme: PropType<import("../../_mixins").Theme<"Input", {
941
+ countTextColorDisabled: string;
924
942
  countTextColor: string;
925
943
  heightTiny: string;
926
944
  heightSmall: string;
@@ -981,6 +999,7 @@ declare const _default: import("vue").DefineComponent<{
981
999
  clearSize: string;
982
1000
  }, any>>;
983
1001
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
1002
+ countTextColorDisabled: string;
984
1003
  countTextColor: string;
985
1004
  heightTiny: string;
986
1005
  heightSmall: string;
@@ -1041,6 +1060,7 @@ declare const _default: import("vue").DefineComponent<{
1041
1060
  clearSize: string;
1042
1061
  }, any>>>;
1043
1062
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Input", {
1063
+ countTextColorDisabled: string;
1044
1064
  countTextColor: string;
1045
1065
  heightTiny: string;
1046
1066
  heightSmall: string;
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
@@ -9,6 +32,7 @@ const vooks_1 = require("vooks");
9
32
  const seemly_1 = require("seemly");
10
33
  const vueuc_1 = require("vueuc");
11
34
  const evtd_1 = require("evtd");
35
+ const browser_1 = require("../../_utils/env/browser");
12
36
  const icons_1 = require("../../_internal/icons");
13
37
  const use_rtl_1 = require("../../_mixins/use-rtl");
14
38
  const _internal_1 = require("../../_internal");
@@ -18,7 +42,7 @@ const styles_1 = require("../styles");
18
42
  const interface_1 = require("./interface");
19
43
  const utils_1 = require("./utils");
20
44
  const WordCount_1 = __importDefault(require("./WordCount"));
21
- const input_cssr_1 = __importDefault(require("./styles/input.cssr"));
45
+ const input_cssr_1 = __importStar(require("./styles/input.cssr"));
22
46
  exports.inputProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { bordered: {
23
47
  type: Boolean,
24
48
  default: undefined
@@ -49,7 +73,7 @@ exports.inputProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
49
73
  }, showCount: Boolean, loading: {
50
74
  type: Boolean,
51
75
  default: undefined
52
- }, allowInput: Function, onMousedown: Function, onKeydown: Function, onKeyup: Function, onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
76
+ }, allowInput: Function, renderCount: Function, onMousedown: Function, onKeydown: Function, onKeyup: Function, onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
53
77
  /** private */
54
78
  textDecoration: [String, Array], attrSize: {
55
79
  type: Number,
@@ -70,6 +94,9 @@ exports.default = (0, vue_1.defineComponent)({
70
94
  }
71
95
  const { mergedClsPrefixRef, mergedBorderedRef, inlineThemeDisabled, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
72
96
  const themeRef = (0, _mixins_1.useTheme)('Input', '-input', input_cssr_1.default, styles_1.inputLight, props, mergedClsPrefixRef);
97
+ if (browser_1.isSafari) {
98
+ (0, _mixins_1.useStyle)('-input-safari', input_cssr_1.safariStyle, mergedClsPrefixRef);
99
+ }
73
100
  // dom refs
74
101
  const wrapperElRef = (0, vue_1.ref)(null);
75
102
  const textareaElRef = (0, vue_1.ref)(null);
@@ -319,6 +346,9 @@ exports.default = (0, vue_1.defineComponent)({
319
346
  function handleInput(e, index = 0, event = 'input') {
320
347
  const targetValue = e.target.value;
321
348
  syncMirror(targetValue);
349
+ if (e instanceof InputEvent && !e.isComposing) {
350
+ isComposingRef.value = false;
351
+ }
322
352
  if (props.type === 'textarea') {
323
353
  const { value: textareaScrollbarInst } = textareaScrollbarInstRef;
324
354
  if (textareaScrollbarInst) {
@@ -453,7 +483,7 @@ exports.default = (0, vue_1.defineComponent)({
453
483
  const { left, top, width, height } = wrapperEl.getBoundingClientRect();
454
484
  const resizeHandleSize = 14;
455
485
  if (left + width - resizeHandleSize < e.clientX &&
456
- e.clientY < left + width &&
486
+ e.clientX < left + width &&
457
487
  top + height - resizeHandleSize < e.clientY &&
458
488
  e.clientY < top + height) {
459
489
  // touching resize handle, just let it go.
@@ -679,11 +709,12 @@ exports.default = (0, vue_1.defineComponent)({
679
709
  const rtlEnabledRef = (0, use_rtl_1.useRtl)('Input', mergedRtlRef, mergedClsPrefixRef);
680
710
  const cssVarsRef = (0, vue_1.computed)(() => {
681
711
  const { value: size } = mergedSizeRef;
682
- const { common: { cubicBezierEaseInOut }, self: { color, borderRadius, textColor, caretColor, caretColorError, caretColorWarning, textDecorationColor, border, borderDisabled, borderHover, borderFocus, placeholderColor, placeholderColorDisabled, lineHeightTextarea, colorDisabled, colorFocus, textColorDisabled, boxShadowFocus, iconSize, colorFocusWarning, boxShadowFocusWarning, borderWarning, borderFocusWarning, borderHoverWarning, colorFocusError, boxShadowFocusError, borderError, borderFocusError, borderHoverError, clearSize, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, suffixTextColor, countTextColor, iconColorHover, iconColorPressed, loadingColor, loadingColorError, loadingColorWarning, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height } } = themeRef.value;
712
+ const { common: { cubicBezierEaseInOut }, self: { color, borderRadius, textColor, caretColor, caretColorError, caretColorWarning, textDecorationColor, border, borderDisabled, borderHover, borderFocus, placeholderColor, placeholderColorDisabled, lineHeightTextarea, colorDisabled, colorFocus, textColorDisabled, boxShadowFocus, iconSize, colorFocusWarning, boxShadowFocusWarning, borderWarning, borderFocusWarning, borderHoverWarning, colorFocusError, boxShadowFocusError, borderError, borderFocusError, borderHoverError, clearSize, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, suffixTextColor, countTextColor, countTextColorDisabled, iconColorHover, iconColorPressed, loadingColor, loadingColorError, loadingColorWarning, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height } } = themeRef.value;
683
713
  const { left: paddingLeft, right: paddingRight } = (0, seemly_1.getPadding)(padding);
684
714
  return {
685
715
  '--n-bezier': cubicBezierEaseInOut,
686
716
  '--n-count-text-color': countTextColor,
717
+ '--n-count-text-color-disabled': countTextColorDisabled,
687
718
  '--n-color': color,
688
719
  '--n-font-size': fontSize,
689
720
  '--n-border-radius': borderRadius,
@@ -890,6 +921,15 @@ exports.default = (0, vue_1.defineComponent)({
890
921
  }))) : null,
891
922
  this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__border` })) : null,
892
923
  this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__state-border` })) : null,
893
- this.showCount && type === 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, { default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } })) : null));
924
+ this.showCount && type === 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, {
925
+ default: (props) => {
926
+ var _a;
927
+ const { renderCount } = this;
928
+ if (renderCount) {
929
+ return renderCount(props);
930
+ }
931
+ return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props);
932
+ }
933
+ })) : null));
894
934
  }
895
935
  });