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
@@ -64,40 +64,41 @@ export default cB('dropdown-menu', `
64
64
  right: 4px;
65
65
  transition: background-color .3s var(--n-bezier);
66
66
  border-radius: var(--n-border-radius);
67
- `), cNotM('disabled', [cM('pending', {
68
- color: 'var(--n-option-text-color-hover)'
69
- }, [cE('prefix, suffix', {
70
- color: 'var(--n-option-text-color-hover)'
71
- }), c('&::before', 'background-color: var(--n-option-color-hover);')]), cM('active', {
72
- color: 'var(--n-option-text-color-active)'
73
- }, [cE('prefix, suffix', {
74
- color: 'var(--n-option-text-color-active)'
75
- }), c('&::before', 'background-color: var(--n-option-color-active);')]), cM('child-active', {
76
- color: 'var(--n-option-text-color-child-active)'
77
- }, [cE('prefix, suffix', {
78
- color: 'var(--n-option-text-color-child-active)'
79
- })])]), cM('disabled', {
80
- cursor: 'not-allowed',
81
- opacity: 'var(--n-option-opacity-disabled)'
82
- }), cM('group', {
83
- fontSize: 'calc(var(--n-font-size) - 1px)',
84
- color: 'var(--n-group-header-text-color)'
85
- }, [cE('prefix', {
86
- width: 'calc(var(--n-option-prefix-width) / 2)'
87
- }, [cM('show-icon', {
88
- width: 'calc(var(--n-option-icon-prefix-width) / 2)'
89
- })])]), cE('prefix', `
67
+ `), cNotM('disabled', [cM('pending', `
68
+ color: var(--n-option-text-color-hover);
69
+ `, [cE('prefix, suffix', `
70
+ color: var(--n-option-text-color-hover);
71
+ `), c('&::before', 'background-color: var(--n-option-color-hover);')]), cM('active', `
72
+ color: var(--n-option-text-color-active);
73
+ `, [cE('prefix, suffix', `
74
+ color: var(--n-option-text-color-active);
75
+ `), c('&::before', 'background-color: var(--n-option-color-active);')]), cM('child-active', `
76
+ color: var(--n-option-text-color-child-active);
77
+ `, [cE('prefix, suffix', `
78
+ color: var(--n-option-text-color-child-active);
79
+ `)])]), cM('disabled', `
80
+ cursor: not-allowed;
81
+ opacity: var(--n-option-opacity-disabled);
82
+ `), cM('group', `
83
+ font-size: calc(var(--n-font-size) - 1px);
84
+ color: var(--n-group-header-text-color);
85
+ `, [cE('prefix', `
86
+ width: calc(var(--n-option-prefix-width) / 2);
87
+ `, [cM('show-icon', `
88
+ width: calc(var(--n-option-icon-prefix-width) / 2);
89
+ `)])]), cE('prefix', `
90
90
  width: var(--n-option-prefix-width);
91
91
  display: flex;
92
92
  justify-content: center;
93
93
  align-items: center;
94
94
  color: var(--n-prefix-color);
95
95
  transition: color .3s var(--n-bezier);
96
- `, [cM('show-icon', {
97
- width: 'var(--n-option-icon-prefix-width)'
98
- }), cB('icon', {
99
- fontSize: 'var(--n-option-icon-size)'
100
- })]), cE('label', `
96
+ z-index: 1;
97
+ `, [cM('show-icon', `
98
+ width: var(--n-option-icon-prefix-width);
99
+ `), cB('icon', `
100
+ font-size: var(--n-option-icon-size);
101
+ `)]), cE('label', `
101
102
  white-space: nowrap;
102
103
  flex: 1;
103
104
  z-index: 1;
@@ -112,11 +113,12 @@ export default cB('dropdown-menu', `
112
113
  padding: 0 8px;
113
114
  transition: color .3s var(--n-bezier);
114
115
  color: var(--n-suffix-color);
115
- `, [cM('has-submenu', {
116
- width: 'var(--n-option-icon-suffix-width)'
117
- }), cB('icon', {
118
- fontSize: 'var(--n-option-icon-size)'
119
- })]), cB('dropdown-menu', 'pointer-events: all;')]), cB('dropdown-offset-container', `
116
+ z-index: 1;
117
+ `, [cM('has-submenu', `
118
+ width: var(--n-option-icon-suffix-width);
119
+ `), cB('icon', `
120
+ font-size: var(--n-option-icon-size);
121
+ `)]), cB('dropdown-menu', 'pointer-events: all;')]), cB('dropdown-offset-container', `
120
122
  pointer-events: none;
121
123
  position: absolute;
122
124
  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;
@@ -5,7 +5,7 @@ export const self = (vars) => {
5
5
  return Object.assign(Object.assign({}, commonVars), { fontSizeSmall,
6
6
  fontSizeMedium,
7
7
  fontSizeLarge,
8
- fontSizeHuge, textColor: textColorDisabled, iconColor: iconColor, extraTextColor: textColor2 });
8
+ fontSizeHuge, textColor: textColorDisabled, iconColor, extraTextColor: textColor2 });
9
9
  };
10
10
  const emptyLight = {
11
11
  name: 'Empty',
@@ -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;
@@ -9,6 +9,7 @@ import { defaultSpan, gridInjectionKey } from './config';
9
9
  const defaultCols = 24;
10
10
  const SSR_ATTR_NAME = '__ssr__';
11
11
  export const gridProps = {
12
+ layoutShiftDisabled: Boolean,
12
13
  responsive: {
13
14
  type: [String, Boolean],
14
15
  default: 'self'
@@ -91,6 +92,7 @@ export default defineComponent({
91
92
  }
92
93
  });
93
94
  provide(gridInjectionKey, {
95
+ layoutShiftDisabledRef: toRef(props, 'layoutShiftDisabled'),
94
96
  isSsrRef,
95
97
  itemStyleRef: toRef(props, 'itemStyle'),
96
98
  xGapRef: responsiveXGapRef,
@@ -101,6 +103,15 @@ export default defineComponent({
101
103
  contentEl: contentElRef,
102
104
  mergedClsPrefix: mergedClsPrefixRef,
103
105
  style: computed(() => {
106
+ if (props.layoutShiftDisabled) {
107
+ return {
108
+ width: '100%',
109
+ display: 'grid',
110
+ gridTemplateColumns: `repeat(${props.cols}, minmax(0, 1fr))`,
111
+ columnGap: pxfy(props.xGap),
112
+ rowGap: pxfy(props.yGap)
113
+ };
114
+ }
104
115
  return {
105
116
  width: '100%',
106
117
  display: 'grid',
@@ -117,6 +128,13 @@ export default defineComponent({
117
128
  };
118
129
  },
119
130
  render() {
131
+ if (this.layoutShiftDisabled) {
132
+ return h('div', mergeProps({
133
+ ref: 'contentEl',
134
+ class: `${this.mergedClsPrefix}-grid`,
135
+ style: this.style
136
+ }, this.$attrs), this.$slots);
137
+ }
120
138
  const renderContent = () => {
121
139
  var _a, _b, _c, _d, _e, _f, _g;
122
140
  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;
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, inject, getCurrentInstance } from 'vue';
1
+ import { h, defineComponent, inject, getCurrentInstance, computed } from 'vue';
2
2
  import { pxfy } from 'seemly';
3
3
  import { keysOf } from '../../_utils';
4
4
  import { gridInjectionKey } from './config';
@@ -29,13 +29,17 @@ export default defineComponent({
29
29
  alias: ['Gi'],
30
30
  props: gridItemProps,
31
31
  setup() {
32
- const { isSsrRef, xGapRef, itemStyleRef, overflowRef
32
+ const { isSsrRef, xGapRef, itemStyleRef, overflowRef, layoutShiftDisabledRef
33
33
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
34
34
  } = inject(gridInjectionKey);
35
35
  const self = getCurrentInstance();
36
36
  return {
37
37
  overflow: overflowRef,
38
38
  itemStyle: itemStyleRef,
39
+ layoutShiftDisabled: layoutShiftDisabledRef,
40
+ mergedXGap: computed(() => {
41
+ return pxfy(xGapRef.value || 0);
42
+ }),
39
43
  deriveStyle: () => {
40
44
  void isSsrRef.value;
41
45
  // Here is quite a hack, I hope there is a better way to solve it
@@ -56,6 +60,15 @@ export default defineComponent({
56
60
  },
57
61
  render() {
58
62
  var _a, _b;
63
+ if (this.layoutShiftDisabled) {
64
+ const { span, offset, mergedXGap } = this;
65
+ return (h("div", { style: {
66
+ gridColumn: `span ${span} / span ${span}`,
67
+ marginLeft: offset
68
+ ? `calc((100% - (${span} - 1) * ${mergedXGap}) / ${span} * ${offset} + ${mergedXGap} * ${offset})`
69
+ : ''
70
+ } }, this.$slots));
71
+ }
59
72
  return (h("div", { style: [this.itemStyle, this.deriveStyle()] }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, { overflow: this.overflow })));
60
73
  }
61
74
  });
@@ -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;
@@ -3,16 +3,17 @@ import { useMergedState, useMemo } from 'vooks';
3
3
  import { getPadding } from 'seemly';
4
4
  import { VResizeObserver } from 'vueuc';
5
5
  import { off, on } from 'evtd';
6
+ import { isSafari } from '../../_utils/env/browser';
6
7
  import { EyeIcon, EyeOffIcon } from '../../_internal/icons';
7
8
  import { useRtl } from '../../_mixins/use-rtl';
8
9
  import { NBaseClear, NBaseIcon, NBaseSuffix, NScrollbar } from '../../_internal';
9
- import { useTheme, useLocale, useFormItem, useConfig, useThemeClass } from '../../_mixins';
10
+ import { useTheme, useLocale, useFormItem, useConfig, useThemeClass, useStyle } from '../../_mixins';
10
11
  import { call, createKey, resolveSlot, resolveWrappedSlot, warnOnce } from '../../_utils';
11
12
  import { inputLight } from '../styles';
12
13
  import { inputInjectionKey } from './interface';
13
14
  import { isEmptyInputValue, useCursor } from './utils';
14
15
  import WordCount from './WordCount';
15
- import style from './styles/input.cssr';
16
+ import style, { safariStyle } from './styles/input.cssr';
16
17
  export const inputProps = Object.assign(Object.assign({}, useTheme.props), { bordered: {
17
18
  type: Boolean,
18
19
  default: undefined
@@ -43,7 +44,7 @@ export const inputProps = Object.assign(Object.assign({}, useTheme.props), { bor
43
44
  }, showCount: Boolean, loading: {
44
45
  type: Boolean,
45
46
  default: undefined
46
- }, 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],
47
+ }, 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],
47
48
  /** private */
48
49
  textDecoration: [String, Array], attrSize: {
49
50
  type: Number,
@@ -64,6 +65,9 @@ export default defineComponent({
64
65
  }
65
66
  const { mergedClsPrefixRef, mergedBorderedRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
66
67
  const themeRef = useTheme('Input', '-input', style, inputLight, props, mergedClsPrefixRef);
68
+ if (isSafari) {
69
+ useStyle('-input-safari', safariStyle, mergedClsPrefixRef);
70
+ }
67
71
  // dom refs
68
72
  const wrapperElRef = ref(null);
69
73
  const textareaElRef = ref(null);
@@ -313,6 +317,9 @@ export default defineComponent({
313
317
  function handleInput(e, index = 0, event = 'input') {
314
318
  const targetValue = e.target.value;
315
319
  syncMirror(targetValue);
320
+ if (e instanceof InputEvent && !e.isComposing) {
321
+ isComposingRef.value = false;
322
+ }
316
323
  if (props.type === 'textarea') {
317
324
  const { value: textareaScrollbarInst } = textareaScrollbarInstRef;
318
325
  if (textareaScrollbarInst) {
@@ -447,7 +454,7 @@ export default defineComponent({
447
454
  const { left, top, width, height } = wrapperEl.getBoundingClientRect();
448
455
  const resizeHandleSize = 14;
449
456
  if (left + width - resizeHandleSize < e.clientX &&
450
- e.clientY < left + width &&
457
+ e.clientX < left + width &&
451
458
  top + height - resizeHandleSize < e.clientY &&
452
459
  e.clientY < top + height) {
453
460
  // touching resize handle, just let it go.
@@ -673,11 +680,12 @@ export default defineComponent({
673
680
  const rtlEnabledRef = useRtl('Input', mergedRtlRef, mergedClsPrefixRef);
674
681
  const cssVarsRef = computed(() => {
675
682
  const { value: size } = mergedSizeRef;
676
- 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, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height } } = themeRef.value;
683
+ 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, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height } } = themeRef.value;
677
684
  const { left: paddingLeft, right: paddingRight } = getPadding(padding);
678
685
  return {
679
686
  '--n-bezier': cubicBezierEaseInOut,
680
687
  '--n-count-text-color': countTextColor,
688
+ '--n-count-text-color-disabled': countTextColorDisabled,
681
689
  '--n-color': color,
682
690
  '--n-font-size': fontSize,
683
691
  '--n-border-radius': borderRadius,
@@ -884,6 +892,15 @@ export default defineComponent({
884
892
  }))) : null,
885
893
  this.mergedBordered ? (h("div", { class: `${mergedClsPrefix}-input__border` })) : null,
886
894
  this.mergedBordered ? (h("div", { class: `${mergedClsPrefix}-input__state-border` })) : null,
887
- this.showCount && type === 'textarea' ? (h(WordCount, null, { default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } })) : null));
895
+ this.showCount && type === 'textarea' ? (h(WordCount, null, {
896
+ default: (props) => {
897
+ var _a;
898
+ const { renderCount } = this;
899
+ if (renderCount) {
900
+ return renderCount(props);
901
+ }
902
+ return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props);
903
+ }
904
+ })) : null));
888
905
  }
889
906
  });