naive-ui 2.18.1 → 2.19.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 (394) hide show
  1. package/es/_internal/clear/src/Clear.d.ts +1 -4
  2. package/es/_internal/clear/src/Clear.js +1 -4
  3. package/es/_internal/icons/Checkmark.js +3 -2
  4. package/es/_internal/select-menu/src/SelectMenu.d.ts +173 -0
  5. package/es/_internal/select-menu/src/SelectMenu.js +9 -6
  6. package/es/_internal/select-menu/src/SelectOption.js +2 -1
  7. package/es/_internal/select-menu/src/styles/index.cssr.js +32 -28
  8. package/es/_internal/select-menu/styles/light.d.ts +2 -0
  9. package/es/_internal/select-menu/styles/light.js +1 -1
  10. package/es/_internal/selection/src/Selection.d.ts +64 -56
  11. package/es/_internal/selection/src/Selection.js +34 -14
  12. package/es/_internal/selection/src/styles/index.cssr.js +16 -14
  13. package/es/_internal/selection/styles/_common.d.ts +1 -8
  14. package/es/_internal/selection/styles/_common.js +2 -9
  15. package/es/_internal/selection/styles/dark.js +10 -2
  16. package/es/_internal/selection/styles/light.d.ts +18 -16
  17. package/es/_internal/selection/styles/light.js +10 -2
  18. package/es/_mixins/use-rtl.js +1 -1
  19. package/es/_styles/common/light.js +1 -1
  20. package/es/_utils/naive/mutable.d.ts +2 -2
  21. package/es/alert/src/Alert.js +15 -16
  22. package/es/anchor/src/AnchorAdapter.d.ts +13 -8
  23. package/es/anchor/src/AnchorAdapter.js +3 -5
  24. package/es/anchor/src/BaseAnchor.d.ts +14 -1
  25. package/es/anchor/src/BaseAnchor.js +20 -7
  26. package/es/anchor/src/Link.js +5 -5
  27. package/es/anchor/src/styles/index.cssr.js +25 -16
  28. package/es/auto-complete/index.d.ts +1 -0
  29. package/es/auto-complete/src/AutoComplete.d.ts +10 -0
  30. package/es/auto-complete/src/interface.d.ts +1 -1
  31. package/es/auto-complete/styles/light.d.ts +1 -0
  32. package/es/badge/src/styles/index.cssr.js +1 -0
  33. package/es/card/src/Card.d.ts +17 -1
  34. package/es/card/src/Card.js +3 -2
  35. package/es/card/styles/dark.js +6 -1
  36. package/es/card/styles/light.d.ts +1 -0
  37. package/es/card/styles/light.js +2 -2
  38. package/es/cascader/src/Cascader.d.ts +100 -80
  39. package/es/cascader/src/Cascader.js +28 -19
  40. package/es/cascader/src/CascaderMenu.js +17 -15
  41. package/es/cascader/src/CascaderOption.d.ts +10 -8
  42. package/es/cascader/src/CascaderSelectMenu.d.ts +10 -8
  43. package/es/cascader/src/CascaderSubmenu.d.ts +10 -8
  44. package/es/cascader/src/interface.d.ts +2 -2
  45. package/es/cascader/src/styles/index.cssr.js +6 -1
  46. package/es/cascader/styles/light.d.ts +10 -8
  47. package/es/checkbox/src/Checkbox.d.ts +1 -0
  48. package/es/checkbox/src/Checkbox.js +5 -3
  49. package/es/checkbox/src/CheckboxGroup.js +1 -1
  50. package/es/composables/use-theme-vars.js +5 -5
  51. package/es/config-provider/src/internal-interface.d.ts +2 -0
  52. package/es/data-table/src/DataTable.d.ts +110 -88
  53. package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
  54. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
  55. package/es/data-table/src/TableParts/Body.d.ts +20 -16
  56. package/es/data-table/src/TableParts/Cell.d.ts +40 -32
  57. package/es/data-table/src/TableParts/Header.d.ts +20 -16
  58. package/es/data-table/styles/light.d.ts +10 -8
  59. package/es/date-picker/src/DatePicker.d.ts +8 -3
  60. package/es/date-picker/src/DatePicker.js +2 -2
  61. package/es/date-picker/src/panel/date.d.ts +3 -3
  62. package/es/date-picker/src/panel/date.js +10 -1
  63. package/es/date-picker/src/panel/daterange.js +10 -1
  64. package/es/date-picker/src/panel/datetimerange.js +10 -1
  65. package/es/descriptions/src/Descriptions.d.ts +4 -17
  66. package/es/descriptions/src/Descriptions.js +2 -8
  67. package/es/dialog/src/DialogProvider.d.ts +20 -20
  68. package/es/drawer/src/styles/index.cssr.js +2 -0
  69. package/es/dropdown/src/Dropdown.d.ts +9 -23
  70. package/es/dynamic-tags/src/DynamicTags.js +2 -1
  71. package/es/empty/src/Empty.d.ts +6 -1
  72. package/es/empty/src/Empty.js +16 -4
  73. package/es/form/src/FormItemGridItem.d.ts +1 -1
  74. package/es/form/src/FormItemGridItem.js +2 -2
  75. package/es/global-style/src/GlobalStyle.js +13 -3
  76. package/es/grid/src/GridItem.d.ts +2 -2
  77. package/es/grid/src/GridItem.js +1 -1
  78. package/es/input-number/src/InputNumber.d.ts +8 -3
  79. package/es/input-number/src/InputNumber.js +4 -4
  80. package/es/jest-setup.js +3 -1
  81. package/es/layout/src/Layout.d.ts +18 -4
  82. package/es/layout/src/LayoutContent.d.ts +9 -2
  83. package/es/layout/src/LayoutFooter.d.ts +9 -0
  84. package/es/layout/src/LayoutHeader.d.ts +6 -0
  85. package/es/layout/src/LayoutSider.d.ts +11 -0
  86. package/es/layout/src/LayoutSider.js +4 -2
  87. package/es/layout/src/ToggleButton.js +7 -3
  88. package/es/layout/src/styles/layout-sider.cssr.js +31 -15
  89. package/es/layout/styles/dark.js +3 -2
  90. package/es/layout/styles/light.d.ts +2 -0
  91. package/es/layout/styles/light.js +3 -2
  92. package/es/locales/common/enUS.js +1 -1
  93. package/es/locales/common/ruRU.js +1 -1
  94. package/es/locales/common/ukUA.d.ts +3 -0
  95. package/es/locales/common/ukUA.js +92 -0
  96. package/es/locales/common/zhCN.js +1 -1
  97. package/es/locales/date/ukUA.d.ts +3 -0
  98. package/es/locales/date/ukUA.js +6 -0
  99. package/es/locales/index.d.ts +2 -0
  100. package/es/locales/index.js +2 -0
  101. package/es/mention/src/Mention.d.ts +10 -0
  102. package/es/mention/styles/light.d.ts +1 -0
  103. package/es/menu/src/Menu.d.ts +6 -1
  104. package/es/menu/src/Menu.js +10 -1
  105. package/es/menu/src/MenuOption.d.ts +3 -1
  106. package/es/menu/src/MenuOptionContent.d.ts +3 -1
  107. package/es/menu/src/Submenu.d.ts +3 -1
  108. package/es/modal/src/BodyWrapper.d.ts +5 -0
  109. package/es/modal/src/Modal.d.ts +36 -55
  110. package/es/modal/src/Modal.js +18 -39
  111. package/es/modal/src/presetProps.d.ts +2 -1
  112. package/es/modal/styles/light.d.ts +1 -0
  113. package/es/notification/src/Notification.d.ts +1 -1
  114. package/es/notification/src/NotificationEnvironment.d.ts +1 -1
  115. package/es/notification/src/NotificationProvider.d.ts +16 -16
  116. package/es/page-header/src/PageHeader.d.ts +1 -0
  117. package/es/page-header/src/PageHeader.js +8 -2
  118. package/es/page-header/src/styles/rtl.cssr.d.ts +2 -0
  119. package/es/page-header/src/styles/rtl.cssr.js +19 -0
  120. package/es/page-header/styles/index.d.ts +1 -0
  121. package/es/page-header/styles/index.js +1 -0
  122. package/es/page-header/styles/rtl.d.ts +5 -0
  123. package/es/page-header/styles/rtl.js +5 -0
  124. package/es/pagination/src/Pagination.d.ts +111 -100
  125. package/es/pagination/styles/light.d.ts +10 -8
  126. package/es/popconfirm/src/Popconfirm.d.ts +8 -22
  127. package/es/popover/src/Popover.d.ts +12 -32
  128. package/es/popover/src/Popover.js +25 -18
  129. package/es/popover/src/PopoverBody.d.ts +2 -2
  130. package/es/popover/src/PopoverBody.js +4 -2
  131. package/es/popselect/src/Popselect.d.ts +18 -22
  132. package/es/popselect/src/PopselectPanel.d.ts +1 -0
  133. package/es/popselect/src/PopselectPanel.js +38 -19
  134. package/es/popselect/styles/light.d.ts +1 -0
  135. package/es/select/src/Select.d.ts +111 -83
  136. package/es/select/src/Select.js +55 -56
  137. package/es/select/src/interface.d.ts +2 -2
  138. package/es/select/styles/light.d.ts +10 -8
  139. package/es/spin/src/Spin.d.ts +34 -25
  140. package/es/spin/src/Spin.js +27 -20
  141. package/es/spin/src/styles/index.cssr.js +23 -9
  142. package/es/spin/styles/light.d.ts +2 -0
  143. package/es/spin/styles/light.js +3 -1
  144. package/es/styles.d.ts +1 -0
  145. package/es/styles.js +1 -0
  146. package/es/tabs/src/Tab.d.ts +1 -1
  147. package/es/tabs/src/Tab.js +4 -6
  148. package/es/tabs/src/Tabs.d.ts +133 -42
  149. package/es/tabs/src/Tabs.js +37 -38
  150. package/es/tabs/src/interface.d.ts +2 -1
  151. package/es/tabs/src/styles/index.cssr.js +34 -10
  152. package/es/tabs/styles/_common.d.ts +6 -0
  153. package/es/tabs/styles/_common.js +6 -0
  154. package/es/tabs/styles/dark.js +7 -1
  155. package/es/tabs/styles/light.d.ts +13 -0
  156. package/es/tabs/styles/light.js +3 -3
  157. package/es/tag/src/styles/index.cssr.js +1 -1
  158. package/es/time/src/Time.d.ts +14 -22
  159. package/es/time/src/Time.js +32 -18
  160. package/es/time-picker/src/TimePicker.d.ts +5 -0
  161. package/es/time-picker/src/TimePicker.js +2 -2
  162. package/es/tooltip/src/Tooltip.d.ts +8 -22
  163. package/es/transfer/src/TransferList.d.ts +1 -1
  164. package/es/tree/src/Tree.d.ts +25 -10
  165. package/es/tree/src/Tree.js +34 -11
  166. package/es/tree/src/TreeNode.js +5 -2
  167. package/es/tree/src/interface.d.ts +2 -2
  168. package/es/tree-select/src/TreeSelect.d.ts +103 -81
  169. package/es/tree-select/src/TreeSelect.js +36 -40
  170. package/es/tree-select/src/interface.d.ts +2 -2
  171. package/es/tree-select/styles/light.d.ts +9 -8
  172. package/es/typography/src/blockquote.d.ts +2 -8
  173. package/es/typography/src/blockquote.js +1 -4
  174. package/es/typography/src/ol.d.ts +2 -8
  175. package/es/typography/src/ol.js +1 -4
  176. package/es/typography/src/p.d.ts +2 -2
  177. package/es/typography/src/p.js +1 -1
  178. package/es/typography/src/text.d.ts +14 -58
  179. package/es/typography/src/text.js +2 -23
  180. package/es/typography/src/ul.d.ts +2 -8
  181. package/es/typography/src/ul.js +1 -4
  182. package/es/upload/index.d.ts +2 -0
  183. package/es/upload/index.js +2 -0
  184. package/es/upload/src/Upload.d.ts +16 -68
  185. package/es/upload/src/Upload.js +71 -98
  186. package/es/upload/src/UploadDragger.js +7 -1
  187. package/es/upload/src/UploadFileList.d.ts +2 -0
  188. package/es/upload/src/UploadFileList.js +34 -0
  189. package/es/upload/src/UploadProgress.d.ts +0 -7
  190. package/es/upload/src/UploadProgress.js +1 -5
  191. package/es/upload/src/UploadTrigger.d.ts +12 -0
  192. package/es/upload/src/UploadTrigger.js +63 -0
  193. package/es/upload/src/interface.d.ts +13 -2
  194. package/es/upload/src/styles/index.cssr.js +40 -32
  195. package/es/version.d.ts +1 -1
  196. package/es/version.js +1 -1
  197. package/lib/_internal/clear/src/Clear.d.ts +1 -4
  198. package/lib/_internal/clear/src/Clear.js +1 -4
  199. package/lib/_internal/icons/Checkmark.js +3 -2
  200. package/lib/_internal/select-menu/src/SelectMenu.d.ts +173 -0
  201. package/lib/_internal/select-menu/src/SelectMenu.js +9 -6
  202. package/lib/_internal/select-menu/src/SelectOption.js +2 -1
  203. package/lib/_internal/select-menu/src/styles/index.cssr.js +32 -28
  204. package/lib/_internal/select-menu/styles/light.d.ts +2 -0
  205. package/lib/_internal/select-menu/styles/light.js +1 -1
  206. package/lib/_internal/selection/src/Selection.d.ts +64 -56
  207. package/lib/_internal/selection/src/Selection.js +34 -14
  208. package/lib/_internal/selection/src/styles/index.cssr.js +16 -14
  209. package/lib/_internal/selection/styles/_common.d.ts +1 -8
  210. package/lib/_internal/selection/styles/_common.js +2 -9
  211. package/lib/_internal/selection/styles/dark.js +10 -2
  212. package/lib/_internal/selection/styles/light.d.ts +18 -16
  213. package/lib/_internal/selection/styles/light.js +10 -2
  214. package/lib/_mixins/use-rtl.js +1 -1
  215. package/lib/_styles/common/light.js +1 -1
  216. package/lib/_utils/naive/mutable.d.ts +2 -2
  217. package/lib/alert/src/Alert.js +15 -16
  218. package/lib/anchor/src/AnchorAdapter.d.ts +13 -8
  219. package/lib/anchor/src/AnchorAdapter.js +3 -5
  220. package/lib/anchor/src/BaseAnchor.d.ts +14 -1
  221. package/lib/anchor/src/BaseAnchor.js +19 -6
  222. package/lib/anchor/src/Link.js +5 -5
  223. package/lib/anchor/src/styles/index.cssr.js +25 -16
  224. package/lib/auto-complete/index.d.ts +1 -0
  225. package/lib/auto-complete/src/AutoComplete.d.ts +10 -0
  226. package/lib/auto-complete/src/interface.d.ts +1 -1
  227. package/lib/auto-complete/styles/light.d.ts +1 -0
  228. package/lib/badge/src/styles/index.cssr.js +1 -0
  229. package/lib/card/src/Card.d.ts +17 -1
  230. package/lib/card/src/Card.js +3 -2
  231. package/lib/card/styles/dark.js +6 -1
  232. package/lib/card/styles/light.d.ts +1 -0
  233. package/lib/card/styles/light.js +2 -2
  234. package/lib/cascader/src/Cascader.d.ts +100 -80
  235. package/lib/cascader/src/Cascader.js +28 -19
  236. package/lib/cascader/src/CascaderMenu.js +16 -14
  237. package/lib/cascader/src/CascaderOption.d.ts +10 -8
  238. package/lib/cascader/src/CascaderSelectMenu.d.ts +10 -8
  239. package/lib/cascader/src/CascaderSubmenu.d.ts +10 -8
  240. package/lib/cascader/src/interface.d.ts +2 -2
  241. package/lib/cascader/src/styles/index.cssr.js +6 -1
  242. package/lib/cascader/styles/light.d.ts +10 -8
  243. package/lib/checkbox/src/Checkbox.d.ts +1 -0
  244. package/lib/checkbox/src/Checkbox.js +5 -3
  245. package/lib/checkbox/src/CheckboxGroup.js +1 -1
  246. package/lib/composables/use-theme-vars.js +5 -5
  247. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  248. package/lib/data-table/src/DataTable.d.ts +110 -88
  249. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
  250. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
  251. package/lib/data-table/src/TableParts/Body.d.ts +20 -16
  252. package/lib/data-table/src/TableParts/Cell.d.ts +40 -32
  253. package/lib/data-table/src/TableParts/Header.d.ts +20 -16
  254. package/lib/data-table/styles/light.d.ts +10 -8
  255. package/lib/date-picker/src/DatePicker.d.ts +8 -3
  256. package/lib/date-picker/src/DatePicker.js +2 -2
  257. package/lib/date-picker/src/panel/date.d.ts +3 -3
  258. package/lib/date-picker/src/panel/date.js +9 -0
  259. package/lib/date-picker/src/panel/daterange.js +9 -0
  260. package/lib/date-picker/src/panel/datetimerange.js +9 -0
  261. package/lib/descriptions/src/Descriptions.d.ts +4 -17
  262. package/lib/descriptions/src/Descriptions.js +2 -8
  263. package/lib/dialog/src/DialogProvider.d.ts +20 -20
  264. package/lib/drawer/src/styles/index.cssr.js +2 -0
  265. package/lib/dropdown/src/Dropdown.d.ts +9 -23
  266. package/lib/dynamic-tags/src/DynamicTags.js +2 -1
  267. package/lib/empty/src/Empty.d.ts +6 -1
  268. package/lib/empty/src/Empty.js +15 -3
  269. package/lib/form/src/FormItemGridItem.d.ts +1 -1
  270. package/lib/form/src/FormItemGridItem.js +2 -2
  271. package/lib/global-style/src/GlobalStyle.js +13 -3
  272. package/lib/grid/src/GridItem.d.ts +2 -2
  273. package/lib/grid/src/GridItem.js +1 -1
  274. package/lib/input-number/src/InputNumber.d.ts +8 -3
  275. package/lib/input-number/src/InputNumber.js +4 -4
  276. package/lib/jest-setup.js +3 -1
  277. package/lib/layout/src/Layout.d.ts +18 -4
  278. package/lib/layout/src/LayoutContent.d.ts +9 -2
  279. package/lib/layout/src/LayoutFooter.d.ts +9 -0
  280. package/lib/layout/src/LayoutHeader.d.ts +6 -0
  281. package/lib/layout/src/LayoutSider.d.ts +11 -0
  282. package/lib/layout/src/LayoutSider.js +4 -2
  283. package/lib/layout/src/ToggleButton.js +7 -3
  284. package/lib/layout/src/styles/layout-sider.cssr.js +31 -15
  285. package/lib/layout/styles/dark.js +3 -2
  286. package/lib/layout/styles/light.d.ts +2 -0
  287. package/lib/layout/styles/light.js +3 -2
  288. package/lib/locales/common/enUS.js +1 -1
  289. package/lib/locales/common/ruRU.js +1 -1
  290. package/lib/locales/common/ukUA.d.ts +3 -0
  291. package/lib/locales/common/ukUA.js +94 -0
  292. package/lib/locales/common/zhCN.js +1 -1
  293. package/lib/locales/date/ukUA.d.ts +3 -0
  294. package/lib/locales/date/ukUA.js +8 -0
  295. package/lib/locales/index.d.ts +2 -0
  296. package/lib/locales/index.js +5 -1
  297. package/lib/mention/src/Mention.d.ts +10 -0
  298. package/lib/mention/styles/light.d.ts +1 -0
  299. package/lib/menu/src/Menu.d.ts +6 -1
  300. package/lib/menu/src/Menu.js +10 -1
  301. package/lib/menu/src/MenuOption.d.ts +3 -1
  302. package/lib/menu/src/MenuOptionContent.d.ts +3 -1
  303. package/lib/menu/src/Submenu.d.ts +3 -1
  304. package/lib/modal/src/BodyWrapper.d.ts +5 -0
  305. package/lib/modal/src/Modal.d.ts +36 -55
  306. package/lib/modal/src/Modal.js +17 -38
  307. package/lib/modal/src/presetProps.d.ts +2 -1
  308. package/lib/modal/styles/light.d.ts +1 -0
  309. package/lib/notification/src/Notification.d.ts +1 -1
  310. package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
  311. package/lib/notification/src/NotificationProvider.d.ts +16 -16
  312. package/lib/page-header/src/PageHeader.d.ts +1 -0
  313. package/lib/page-header/src/PageHeader.js +8 -2
  314. package/lib/page-header/src/styles/rtl.cssr.d.ts +2 -0
  315. package/lib/page-header/src/styles/rtl.cssr.js +26 -0
  316. package/lib/page-header/styles/index.d.ts +1 -0
  317. package/lib/page-header/styles/index.js +3 -1
  318. package/lib/page-header/styles/rtl.d.ts +5 -0
  319. package/lib/page-header/styles/rtl.js +7 -0
  320. package/lib/pagination/src/Pagination.d.ts +111 -100
  321. package/lib/pagination/styles/light.d.ts +10 -8
  322. package/lib/popconfirm/src/Popconfirm.d.ts +8 -22
  323. package/lib/popover/src/Popover.d.ts +12 -32
  324. package/lib/popover/src/Popover.js +23 -16
  325. package/lib/popover/src/PopoverBody.d.ts +2 -2
  326. package/lib/popover/src/PopoverBody.js +4 -2
  327. package/lib/popselect/src/Popselect.d.ts +18 -22
  328. package/lib/popselect/src/PopselectPanel.d.ts +1 -0
  329. package/lib/popselect/src/PopselectPanel.js +38 -19
  330. package/lib/popselect/styles/light.d.ts +1 -0
  331. package/lib/select/src/Select.d.ts +111 -83
  332. package/lib/select/src/Select.js +55 -56
  333. package/lib/select/src/interface.d.ts +2 -2
  334. package/lib/select/styles/light.d.ts +10 -8
  335. package/lib/spin/src/Spin.d.ts +34 -25
  336. package/lib/spin/src/Spin.js +25 -18
  337. package/lib/spin/src/styles/index.cssr.js +23 -9
  338. package/lib/spin/styles/light.d.ts +2 -0
  339. package/lib/spin/styles/light.js +3 -1
  340. package/lib/styles.d.ts +1 -0
  341. package/lib/styles.js +63 -61
  342. package/lib/tabs/src/Tab.d.ts +1 -1
  343. package/lib/tabs/src/Tab.js +4 -6
  344. package/lib/tabs/src/Tabs.d.ts +133 -42
  345. package/lib/tabs/src/Tabs.js +36 -37
  346. package/lib/tabs/src/interface.d.ts +2 -1
  347. package/lib/tabs/src/styles/index.cssr.js +34 -10
  348. package/lib/tabs/styles/_common.d.ts +6 -0
  349. package/lib/tabs/styles/_common.js +6 -0
  350. package/lib/tabs/styles/dark.js +7 -1
  351. package/lib/tabs/styles/light.d.ts +13 -0
  352. package/lib/tabs/styles/light.js +3 -3
  353. package/lib/tag/src/styles/index.cssr.js +1 -1
  354. package/lib/time/src/Time.d.ts +14 -22
  355. package/lib/time/src/Time.js +31 -17
  356. package/lib/time-picker/src/TimePicker.d.ts +5 -0
  357. package/lib/time-picker/src/TimePicker.js +2 -2
  358. package/lib/tooltip/src/Tooltip.d.ts +8 -22
  359. package/lib/transfer/src/TransferList.d.ts +1 -1
  360. package/lib/tree/src/Tree.d.ts +25 -10
  361. package/lib/tree/src/Tree.js +34 -11
  362. package/lib/tree/src/TreeNode.js +5 -2
  363. package/lib/tree/src/interface.d.ts +2 -2
  364. package/lib/tree-select/src/TreeSelect.d.ts +103 -81
  365. package/lib/tree-select/src/TreeSelect.js +36 -40
  366. package/lib/tree-select/src/interface.d.ts +2 -2
  367. package/lib/tree-select/styles/light.d.ts +9 -8
  368. package/lib/typography/src/blockquote.d.ts +2 -8
  369. package/lib/typography/src/blockquote.js +1 -4
  370. package/lib/typography/src/ol.d.ts +2 -8
  371. package/lib/typography/src/ol.js +1 -4
  372. package/lib/typography/src/p.d.ts +2 -2
  373. package/lib/typography/src/p.js +1 -1
  374. package/lib/typography/src/text.d.ts +14 -58
  375. package/lib/typography/src/text.js +2 -23
  376. package/lib/typography/src/ul.d.ts +2 -8
  377. package/lib/typography/src/ul.js +1 -4
  378. package/lib/upload/index.d.ts +2 -0
  379. package/lib/upload/index.js +5 -1
  380. package/lib/upload/src/Upload.d.ts +16 -68
  381. package/lib/upload/src/Upload.js +68 -95
  382. package/lib/upload/src/UploadDragger.js +7 -1
  383. package/lib/upload/src/UploadFileList.d.ts +2 -0
  384. package/lib/upload/src/UploadFileList.js +36 -0
  385. package/lib/upload/src/UploadProgress.d.ts +0 -7
  386. package/lib/upload/src/UploadProgress.js +1 -5
  387. package/lib/upload/src/UploadTrigger.d.ts +12 -0
  388. package/lib/upload/src/UploadTrigger.js +65 -0
  389. package/lib/upload/src/interface.d.ts +13 -2
  390. package/lib/upload/src/styles/index.cssr.js +40 -32
  391. package/lib/version.d.ts +1 -1
  392. package/lib/version.js +1 -1
  393. package/package.json +9 -7
  394. package/web-types.json +239 -13
@@ -6,7 +6,7 @@ import { RenderTag } from '../../_internal/selection/src/interface';
6
6
  import { ExtractPublicPropTypes } from '../../_utils';
7
7
  import type { MaybeArray } from '../../_utils';
8
8
  import { defaultFilter } from './utils';
9
- import type { SelectMixedOption, SelectBaseOption, SelectGroupOption, SelectIgnoredOption, OnUpdateValue, Value, Size } from './interface';
9
+ import type { SelectMixedOption, SelectBaseOption, SelectGroupOption, SelectIgnoredOption, OnUpdateValue, Value, Size, ValueAtom } from './interface';
10
10
  declare const selectProps: {
11
11
  readonly to: {
12
12
  type: PropType<string | boolean | HTMLElement>;
@@ -90,6 +90,8 @@ declare const selectProps: {
90
90
  readonly onFocus: PropType<MaybeArray<(e: FocusEvent) => void> | undefined>;
91
91
  readonly onScroll: PropType<MaybeArray<(e: Event) => void> | undefined>;
92
92
  readonly onSearch: PropType<MaybeArray<(value: string) => void> | undefined>;
93
+ readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
94
+ readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
93
95
  /** deprecated */
94
96
  readonly onChange: {
95
97
  readonly type: PropType<MaybeArray<OnUpdateValue> | undefined>;
@@ -109,6 +111,14 @@ declare const selectProps: {
109
111
  menuBoxShadow: string;
110
112
  }, {
111
113
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
114
+ fontSizeTiny: string;
115
+ fontSizeSmall: string;
116
+ fontSizeMedium: string;
117
+ fontSizeLarge: string;
118
+ heightTiny: string;
119
+ heightSmall: string;
120
+ heightMedium: string;
121
+ heightLarge: string;
112
122
  borderRadius: string;
113
123
  textColor: string;
114
124
  textColorDisabled: string;
@@ -149,16 +159,9 @@ declare const selectProps: {
149
159
  clearColor: string;
150
160
  clearColorHover: string;
151
161
  clearColorPressed: string;
152
- heightTiny: string;
153
- heightSmall: string;
154
- heightMedium: string;
155
- heightLarge: string;
156
- fontSizeTiny: string;
157
- fontSizeSmall: string;
158
- fontSizeMedium: string;
159
- fontSizeLarge: string;
160
162
  paddingSingle: string;
161
163
  clearSize: string;
164
+ arrowSize: string;
162
165
  }, {
163
166
  Popover: import("../../_mixins").Theme<"Popover", {
164
167
  fontSize: string;
@@ -195,6 +198,7 @@ declare const selectProps: {
195
198
  optionOpacityDisabled: string;
196
199
  optionCheckColor: string;
197
200
  optionColorPending: string;
201
+ optionColorActive: string;
198
202
  actionTextColor: string;
199
203
  loadingColor: string;
200
204
  height: string;
@@ -231,6 +235,14 @@ declare const selectProps: {
231
235
  menuBoxShadow: string;
232
236
  }, {
233
237
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
238
+ fontSizeTiny: string;
239
+ fontSizeSmall: string;
240
+ fontSizeMedium: string;
241
+ fontSizeLarge: string;
242
+ heightTiny: string;
243
+ heightSmall: string;
244
+ heightMedium: string;
245
+ heightLarge: string;
234
246
  borderRadius: string;
235
247
  textColor: string;
236
248
  textColorDisabled: string;
@@ -271,16 +283,9 @@ declare const selectProps: {
271
283
  clearColor: string;
272
284
  clearColorHover: string;
273
285
  clearColorPressed: string;
274
- heightTiny: string;
275
- heightSmall: string;
276
- heightMedium: string;
277
- heightLarge: string;
278
- fontSizeTiny: string;
279
- fontSizeSmall: string;
280
- fontSizeMedium: string;
281
- fontSizeLarge: string;
282
286
  paddingSingle: string;
283
287
  clearSize: string;
288
+ arrowSize: string;
284
289
  }, {
285
290
  Popover: import("../../_mixins").Theme<"Popover", {
286
291
  fontSize: string;
@@ -317,6 +322,7 @@ declare const selectProps: {
317
322
  optionOpacityDisabled: string;
318
323
  optionCheckColor: string;
319
324
  optionColorPending: string;
325
+ optionColorActive: string;
320
326
  actionTextColor: string;
321
327
  loadingColor: string;
322
328
  height: string;
@@ -353,6 +359,14 @@ declare const selectProps: {
353
359
  menuBoxShadow: string;
354
360
  }, {
355
361
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
362
+ fontSizeTiny: string;
363
+ fontSizeSmall: string;
364
+ fontSizeMedium: string;
365
+ fontSizeLarge: string;
366
+ heightTiny: string;
367
+ heightSmall: string;
368
+ heightMedium: string;
369
+ heightLarge: string;
356
370
  borderRadius: string;
357
371
  textColor: string;
358
372
  textColorDisabled: string;
@@ -393,16 +407,9 @@ declare const selectProps: {
393
407
  clearColor: string;
394
408
  clearColorHover: string;
395
409
  clearColorPressed: string;
396
- heightTiny: string;
397
- heightSmall: string;
398
- heightMedium: string;
399
- heightLarge: string;
400
- fontSizeTiny: string;
401
- fontSizeSmall: string;
402
- fontSizeMedium: string;
403
- fontSizeLarge: string;
404
410
  paddingSingle: string;
405
411
  clearSize: string;
412
+ arrowSize: string;
406
413
  }, {
407
414
  Popover: import("../../_mixins").Theme<"Popover", {
408
415
  fontSize: string;
@@ -439,6 +446,7 @@ declare const selectProps: {
439
446
  optionOpacityDisabled: string;
440
447
  optionCheckColor: string;
441
448
  optionColorPending: string;
449
+ optionColorActive: string;
442
450
  actionTextColor: string;
443
451
  loadingColor: string;
444
452
  height: string;
@@ -556,6 +564,8 @@ declare const _default: import("vue").DefineComponent<{
556
564
  readonly onFocus: PropType<MaybeArray<(e: FocusEvent) => void> | undefined>;
557
565
  readonly onScroll: PropType<MaybeArray<(e: Event) => void> | undefined>;
558
566
  readonly onSearch: PropType<MaybeArray<(value: string) => void> | undefined>;
567
+ readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
568
+ readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
559
569
  /** deprecated */
560
570
  readonly onChange: {
561
571
  readonly type: PropType<MaybeArray<OnUpdateValue> | undefined>;
@@ -575,6 +585,14 @@ declare const _default: import("vue").DefineComponent<{
575
585
  menuBoxShadow: string;
576
586
  }, {
577
587
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
588
+ fontSizeTiny: string;
589
+ fontSizeSmall: string;
590
+ fontSizeMedium: string;
591
+ fontSizeLarge: string;
592
+ heightTiny: string;
593
+ heightSmall: string;
594
+ heightMedium: string;
595
+ heightLarge: string;
578
596
  borderRadius: string;
579
597
  textColor: string;
580
598
  textColorDisabled: string;
@@ -615,16 +633,9 @@ declare const _default: import("vue").DefineComponent<{
615
633
  clearColor: string;
616
634
  clearColorHover: string;
617
635
  clearColorPressed: string;
618
- heightTiny: string;
619
- heightSmall: string;
620
- heightMedium: string;
621
- heightLarge: string;
622
- fontSizeTiny: string;
623
- fontSizeSmall: string;
624
- fontSizeMedium: string;
625
- fontSizeLarge: string;
626
636
  paddingSingle: string;
627
637
  clearSize: string;
638
+ arrowSize: string;
628
639
  }, {
629
640
  Popover: import("../../_mixins").Theme<"Popover", {
630
641
  fontSize: string;
@@ -661,6 +672,7 @@ declare const _default: import("vue").DefineComponent<{
661
672
  optionOpacityDisabled: string;
662
673
  optionCheckColor: string;
663
674
  optionColorPending: string;
675
+ optionColorActive: string;
664
676
  actionTextColor: string;
665
677
  loadingColor: string;
666
678
  height: string;
@@ -697,6 +709,14 @@ declare const _default: import("vue").DefineComponent<{
697
709
  menuBoxShadow: string;
698
710
  }, {
699
711
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
712
+ fontSizeTiny: string;
713
+ fontSizeSmall: string;
714
+ fontSizeMedium: string;
715
+ fontSizeLarge: string;
716
+ heightTiny: string;
717
+ heightSmall: string;
718
+ heightMedium: string;
719
+ heightLarge: string;
700
720
  borderRadius: string;
701
721
  textColor: string;
702
722
  textColorDisabled: string;
@@ -737,16 +757,9 @@ declare const _default: import("vue").DefineComponent<{
737
757
  clearColor: string;
738
758
  clearColorHover: string;
739
759
  clearColorPressed: string;
740
- heightTiny: string;
741
- heightSmall: string;
742
- heightMedium: string;
743
- heightLarge: string;
744
- fontSizeTiny: string;
745
- fontSizeSmall: string;
746
- fontSizeMedium: string;
747
- fontSizeLarge: string;
748
760
  paddingSingle: string;
749
761
  clearSize: string;
762
+ arrowSize: string;
750
763
  }, {
751
764
  Popover: import("../../_mixins").Theme<"Popover", {
752
765
  fontSize: string;
@@ -783,6 +796,7 @@ declare const _default: import("vue").DefineComponent<{
783
796
  optionOpacityDisabled: string;
784
797
  optionCheckColor: string;
785
798
  optionColorPending: string;
799
+ optionColorActive: string;
786
800
  actionTextColor: string;
787
801
  loadingColor: string;
788
802
  height: string;
@@ -819,6 +833,14 @@ declare const _default: import("vue").DefineComponent<{
819
833
  menuBoxShadow: string;
820
834
  }, {
821
835
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
836
+ fontSizeTiny: string;
837
+ fontSizeSmall: string;
838
+ fontSizeMedium: string;
839
+ fontSizeLarge: string;
840
+ heightTiny: string;
841
+ heightSmall: string;
842
+ heightMedium: string;
843
+ heightLarge: string;
822
844
  borderRadius: string;
823
845
  textColor: string;
824
846
  textColorDisabled: string;
@@ -859,16 +881,9 @@ declare const _default: import("vue").DefineComponent<{
859
881
  clearColor: string;
860
882
  clearColorHover: string;
861
883
  clearColorPressed: string;
862
- heightTiny: string;
863
- heightSmall: string;
864
- heightMedium: string;
865
- heightLarge: string;
866
- fontSizeTiny: string;
867
- fontSizeSmall: string;
868
- fontSizeMedium: string;
869
- fontSizeLarge: string;
870
884
  paddingSingle: string;
871
885
  clearSize: string;
886
+ arrowSize: string;
872
887
  }, {
873
888
  Popover: import("../../_mixins").Theme<"Popover", {
874
889
  fontSize: string;
@@ -905,6 +920,7 @@ declare const _default: import("vue").DefineComponent<{
905
920
  optionOpacityDisabled: string;
906
921
  optionCheckColor: string;
907
922
  optionColorPending: string;
923
+ optionColorActive: string;
908
924
  actionTextColor: string;
909
925
  loadingColor: string;
910
926
  height: string;
@@ -958,8 +974,8 @@ declare const _default: import("vue").DefineComponent<{
958
974
  uncontrolledShow: import("vue").Ref<boolean>;
959
975
  mergedShow: import("vue").ComputedRef<boolean>;
960
976
  adjustedTo: import("vue").ComputedRef<string | HTMLElement>;
961
- uncontrolledValue: import("vue").Ref<string[] | number[] | import("./interface").ValueAtom | import("./interface").ValueAtom[] | null>;
962
- mergedValue: import("vue").ComputedRef<string[] | number[] | import("./interface").ValueAtom | import("./interface").ValueAtom[] | null>;
977
+ uncontrolledValue: import("vue").Ref<string[] | number[] | ValueAtom | ValueAtom[] | null>;
978
+ mergedValue: import("vue").ComputedRef<string[] | number[] | ValueAtom | ValueAtom[] | null>;
963
979
  followerRef: import("vue").Ref<{
964
980
  syncPosition: () => void;
965
981
  } | null>;
@@ -1093,6 +1109,14 @@ declare const _default: import("vue").DefineComponent<{
1093
1109
  };
1094
1110
  peers: {
1095
1111
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
1112
+ fontSizeTiny: string;
1113
+ fontSizeSmall: string;
1114
+ fontSizeMedium: string;
1115
+ fontSizeLarge: string;
1116
+ heightTiny: string;
1117
+ heightSmall: string;
1118
+ heightMedium: string;
1119
+ heightLarge: string;
1096
1120
  borderRadius: string;
1097
1121
  textColor: string;
1098
1122
  textColorDisabled: string;
@@ -1133,16 +1157,9 @@ declare const _default: import("vue").DefineComponent<{
1133
1157
  clearColor: string;
1134
1158
  clearColorHover: string;
1135
1159
  clearColorPressed: string;
1136
- heightTiny: string;
1137
- heightSmall: string;
1138
- heightMedium: string;
1139
- heightLarge: string;
1140
- fontSizeTiny: string;
1141
- fontSizeSmall: string;
1142
- fontSizeMedium: string;
1143
- fontSizeLarge: string;
1144
1160
  paddingSingle: string;
1145
1161
  clearSize: string;
1162
+ arrowSize: string;
1146
1163
  }, {
1147
1164
  Popover: import("../../_mixins").Theme<"Popover", {
1148
1165
  fontSize: string;
@@ -1179,6 +1196,7 @@ declare const _default: import("vue").DefineComponent<{
1179
1196
  optionOpacityDisabled: string;
1180
1197
  optionCheckColor: string;
1181
1198
  optionColorPending: string;
1199
+ optionColorActive: string;
1182
1200
  actionTextColor: string;
1183
1201
  loadingColor: string;
1184
1202
  height: string;
@@ -1291,6 +1309,8 @@ declare const _default: import("vue").DefineComponent<{
1291
1309
  readonly onFocus?: unknown;
1292
1310
  readonly onScroll?: unknown;
1293
1311
  readonly onSearch?: unknown;
1312
+ readonly onUpdateShow?: unknown;
1313
+ readonly 'onUpdate:show'?: unknown;
1294
1314
  readonly onChange?: unknown;
1295
1315
  readonly items?: unknown;
1296
1316
  readonly displayDirective?: unknown;
@@ -1330,6 +1350,14 @@ declare const _default: import("vue").DefineComponent<{
1330
1350
  menuBoxShadow: string;
1331
1351
  }, {
1332
1352
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
1353
+ fontSizeTiny: string;
1354
+ fontSizeSmall: string;
1355
+ fontSizeMedium: string;
1356
+ fontSizeLarge: string;
1357
+ heightTiny: string;
1358
+ heightSmall: string;
1359
+ heightMedium: string;
1360
+ heightLarge: string;
1333
1361
  borderRadius: string;
1334
1362
  textColor: string;
1335
1363
  textColorDisabled: string;
@@ -1370,16 +1398,9 @@ declare const _default: import("vue").DefineComponent<{
1370
1398
  clearColor: string;
1371
1399
  clearColorHover: string;
1372
1400
  clearColorPressed: string;
1373
- heightTiny: string;
1374
- heightSmall: string;
1375
- heightMedium: string;
1376
- heightLarge: string;
1377
- fontSizeTiny: string;
1378
- fontSizeSmall: string;
1379
- fontSizeMedium: string;
1380
- fontSizeLarge: string;
1381
1401
  paddingSingle: string;
1382
1402
  clearSize: string;
1403
+ arrowSize: string;
1383
1404
  }, {
1384
1405
  Popover: import("../../_mixins").Theme<"Popover", {
1385
1406
  fontSize: string;
@@ -1416,6 +1437,7 @@ declare const _default: import("vue").DefineComponent<{
1416
1437
  optionOpacityDisabled: string;
1417
1438
  optionCheckColor: string;
1418
1439
  optionColorPending: string;
1440
+ optionColorActive: string;
1419
1441
  actionTextColor: string;
1420
1442
  loadingColor: string;
1421
1443
  height: string;
@@ -1452,6 +1474,14 @@ declare const _default: import("vue").DefineComponent<{
1452
1474
  menuBoxShadow: string;
1453
1475
  }, {
1454
1476
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
1477
+ fontSizeTiny: string;
1478
+ fontSizeSmall: string;
1479
+ fontSizeMedium: string;
1480
+ fontSizeLarge: string;
1481
+ heightTiny: string;
1482
+ heightSmall: string;
1483
+ heightMedium: string;
1484
+ heightLarge: string;
1455
1485
  borderRadius: string;
1456
1486
  textColor: string;
1457
1487
  textColorDisabled: string;
@@ -1492,16 +1522,9 @@ declare const _default: import("vue").DefineComponent<{
1492
1522
  clearColor: string;
1493
1523
  clearColorHover: string;
1494
1524
  clearColorPressed: string;
1495
- heightTiny: string;
1496
- heightSmall: string;
1497
- heightMedium: string;
1498
- heightLarge: string;
1499
- fontSizeTiny: string;
1500
- fontSizeSmall: string;
1501
- fontSizeMedium: string;
1502
- fontSizeLarge: string;
1503
1525
  paddingSingle: string;
1504
1526
  clearSize: string;
1527
+ arrowSize: string;
1505
1528
  }, {
1506
1529
  Popover: import("../../_mixins").Theme<"Popover", {
1507
1530
  fontSize: string;
@@ -1538,6 +1561,7 @@ declare const _default: import("vue").DefineComponent<{
1538
1561
  optionOpacityDisabled: string;
1539
1562
  optionCheckColor: string;
1540
1563
  optionColorPending: string;
1564
+ optionColorActive: string;
1541
1565
  actionTextColor: string;
1542
1566
  loadingColor: string;
1543
1567
  height: string;
@@ -1574,6 +1598,14 @@ declare const _default: import("vue").DefineComponent<{
1574
1598
  menuBoxShadow: string;
1575
1599
  }, {
1576
1600
  InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
1601
+ fontSizeTiny: string;
1602
+ fontSizeSmall: string;
1603
+ fontSizeMedium: string;
1604
+ fontSizeLarge: string;
1605
+ heightTiny: string;
1606
+ heightSmall: string;
1607
+ heightMedium: string;
1608
+ heightLarge: string;
1577
1609
  borderRadius: string;
1578
1610
  textColor: string;
1579
1611
  textColorDisabled: string;
@@ -1614,16 +1646,9 @@ declare const _default: import("vue").DefineComponent<{
1614
1646
  clearColor: string;
1615
1647
  clearColorHover: string;
1616
1648
  clearColorPressed: string;
1617
- heightTiny: string;
1618
- heightSmall: string;
1619
- heightMedium: string;
1620
- heightLarge: string;
1621
- fontSizeTiny: string;
1622
- fontSizeSmall: string;
1623
- fontSizeMedium: string;
1624
- fontSizeLarge: string;
1625
1649
  paddingSingle: string;
1626
1650
  clearSize: string;
1651
+ arrowSize: string;
1627
1652
  }, {
1628
1653
  Popover: import("../../_mixins").Theme<"Popover", {
1629
1654
  fontSize: string;
@@ -1660,6 +1685,7 @@ declare const _default: import("vue").DefineComponent<{
1660
1685
  optionOpacityDisabled: string;
1661
1686
  optionCheckColor: string;
1662
1687
  optionColorPending: string;
1688
+ optionColorActive: string;
1663
1689
  actionTextColor: string;
1664
1690
  loadingColor: string;
1665
1691
  height: string;
@@ -1696,6 +1722,8 @@ declare const _default: import("vue").DefineComponent<{
1696
1722
  bordered?: boolean | undefined;
1697
1723
  renderLabel?: RenderLabel | undefined;
1698
1724
  renderOption?: RenderOption | undefined;
1725
+ "onUpdate:show"?: MaybeArray<(value: boolean) => void> | undefined;
1726
+ onUpdateShow?: MaybeArray<(value: boolean) => void> | undefined;
1699
1727
  onClear?: MaybeArray<() => void> | undefined;
1700
1728
  renderTag?: RenderTag | undefined;
1701
1729
  maxTagCount?: number | "responsive" | undefined;
@@ -57,7 +57,7 @@ const selectProps = Object.assign(Object.assign({}, useTheme.props), { to: useAd
57
57
  default: true
58
58
  }, renderLabel: Function, renderOption: Function, renderTag: Function, 'onUpdate:value': [Function, Array],
59
59
  // for jsx
60
- onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array],
60
+ onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:show': [Function, Array],
61
61
  /** deprecated */
62
62
  onChange: {
63
63
  type: [Function, Array],
@@ -137,68 +137,60 @@ export default defineComponent({
137
137
  }
138
138
  }
139
139
  });
140
+ function getMergedOptions(values) {
141
+ const remote = props.remote;
142
+ const { value: memoValOptMap } = memoValOptMapRef;
143
+ const { value: valOptMap } = valOptMapRef;
144
+ const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
145
+ const options = [];
146
+ values.forEach((value) => {
147
+ if (valOptMap.has(value)) {
148
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
149
+ options.push(valOptMap.get(value));
150
+ }
151
+ else if (remote && memoValOptMap.has(value)) {
152
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
153
+ options.push(memoValOptMap.get(value));
154
+ }
155
+ else if (wrappedFallbackOption) {
156
+ const option = wrappedFallbackOption(value);
157
+ if (option) {
158
+ options.push(option);
159
+ }
160
+ }
161
+ });
162
+ return options;
163
+ }
140
164
  const selectedOptionsRef = computed(() => {
141
165
  if (props.multiple) {
142
166
  const { value: values } = mergedValueRef;
143
167
  if (!Array.isArray(values))
144
168
  return [];
145
- const remote = props.remote;
146
- const { value: memoValOptMap } = memoValOptMapRef;
147
- const { value: valOptMap } = valOptMapRef;
148
- const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
149
- const options = [];
150
- values.forEach((value) => {
151
- if (valOptMap.has(value)) {
152
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
153
- options.push(valOptMap.get(value));
154
- }
155
- else if (remote && memoValOptMap.has(value)) {
156
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
157
- options.push(memoValOptMap.get(value));
158
- }
159
- else if (wrappedFallbackOption) {
160
- const option = wrappedFallbackOption(value);
161
- if (option) {
162
- options.push(option);
163
- }
164
- }
165
- });
166
- return options;
169
+ return getMergedOptions(values);
167
170
  }
168
171
  return null;
169
172
  });
170
173
  const selectedOptionRef = computed(() => {
171
174
  const { value: mergedValue } = mergedValueRef;
172
175
  if (!props.multiple && !Array.isArray(mergedValue)) {
173
- const { value: valOptMap } = valOptMapRef;
174
- const { value: wrappedFallbackOption } = wrappedFallbackOptionRef;
175
176
  if (mergedValue === null)
176
177
  return null;
177
- let selectedOption = null;
178
- if (valOptMap.has(mergedValue)) {
179
- selectedOption = valOptMap.get(mergedValue);
180
- }
181
- else if (props.remote) {
182
- selectedOption = memoValOptMapRef.value.get(mergedValue);
183
- }
184
- return (selectedOption ||
185
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
186
- (wrappedFallbackOption && wrappedFallbackOption(mergedValue)) ||
187
- null);
178
+ return getMergedOptions([mergedValue])[0] || null;
188
179
  }
189
180
  return null;
190
181
  });
191
182
  const formItem = useFormItem(props);
192
183
  const { mergedSizeRef, mergedDisabledRef } = formItem;
193
- function doUpdateValue(value) {
184
+ function doUpdateValue(value, option) {
194
185
  const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
195
186
  const { nTriggerFormChange, nTriggerFormInput } = formItem;
196
187
  if (onChange)
197
- call(onChange, value);
188
+ call(onChange, value, option);
198
189
  if (onUpdateValue)
199
- call(onUpdateValue, value);
200
- if (_onUpdateValue)
201
- call(_onUpdateValue, value);
190
+ call(onUpdateValue, value, option);
191
+ if (_onUpdateValue) {
192
+ call(_onUpdateValue, value, option);
193
+ }
202
194
  uncontrolledValueRef.value = value;
203
195
  nTriggerFormChange();
204
196
  nTriggerFormInput();
@@ -252,9 +244,18 @@ export default defineComponent({
252
244
  }
253
245
  }
254
246
  // menu related methods
247
+ function doUpdateShow(value) {
248
+ const { onUpdateShow, 'onUpdate:show': _onUpdateShow } = props;
249
+ if (onUpdateShow)
250
+ call(onUpdateShow, value);
251
+ if (_onUpdateShow)
252
+ call(_onUpdateShow, value);
253
+ uncontrolledShowRef.value = value;
254
+ }
255
255
  function openMenu() {
256
256
  if (!mergedDisabledRef.value) {
257
257
  patternRef.value = '';
258
+ doUpdateShow(true);
258
259
  uncontrolledShowRef.value = true;
259
260
  if (props.filterable) {
260
261
  focusSelectionInput();
@@ -262,7 +263,7 @@ export default defineComponent({
262
263
  }
263
264
  }
264
265
  function closeMenu() {
265
- uncontrolledShowRef.value = false;
266
+ doUpdateShow(false);
266
267
  }
267
268
  function handleMenuLeave() {
268
269
  patternRef.value = '';
@@ -375,8 +376,7 @@ export default defineComponent({
375
376
  changedValue.push(option.value);
376
377
  patternRef.value = '';
377
378
  }
378
- focusSelectionInput();
379
- doUpdateValue(changedValue);
379
+ doUpdateValue(changedValue, getMergedOptions(changedValue));
380
380
  }
381
381
  else {
382
382
  if (tag && !remote) {
@@ -392,7 +392,7 @@ export default defineComponent({
392
392
  }
393
393
  focusSelection();
394
394
  closeMenu();
395
- doUpdateValue(option.value);
395
+ doUpdateValue(option.value, option);
396
396
  }
397
397
  }
398
398
  function getCreatedOptionIndex(optionValue) {
@@ -430,10 +430,10 @@ export default defineComponent({
430
430
  }
431
431
  doClear();
432
432
  if (multiple) {
433
- doUpdateValue([]);
433
+ doUpdateValue([], []);
434
434
  }
435
435
  else {
436
- doUpdateValue(null);
436
+ doUpdateValue(null, null);
437
437
  }
438
438
  }
439
439
  function handleMenuMousedown(e) {
@@ -447,7 +447,7 @@ export default defineComponent({
447
447
  // keyboard events
448
448
  // also for menu keyup
449
449
  function handleKeyUp(e) {
450
- var _a, _b, _c;
450
+ var _a, _b, _c, _d;
451
451
  switch (e.code) {
452
452
  case 'Space':
453
453
  if (props.filterable)
@@ -456,12 +456,11 @@ export default defineComponent({
456
456
  case 'Enter':
457
457
  case 'NumpadEnter':
458
458
  if (mergedShowRef.value) {
459
- const menu = menuRef.value;
460
- const pendingOptionData = menu === null || menu === void 0 ? void 0 : menu.getPendingTmNode();
461
- if (pendingOptionData) {
462
- handleToggleByTmNode(pendingOptionData);
459
+ const pendingTmNode = (_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.getPendingTmNode();
460
+ if (pendingTmNode) {
461
+ handleToggleByTmNode(pendingTmNode);
463
462
  }
464
- else {
463
+ else if (!props.filterable) {
465
464
  closeMenu();
466
465
  focusSelection();
467
466
  }
@@ -475,14 +474,14 @@ export default defineComponent({
475
474
  if (props.loading)
476
475
  return;
477
476
  if (mergedShowRef.value) {
478
- (_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.prev();
477
+ (_b = menuRef.value) === null || _b === void 0 ? void 0 : _b.prev();
479
478
  }
480
479
  break;
481
480
  case 'ArrowDown':
482
481
  if (props.loading)
483
482
  return;
484
483
  if (mergedShowRef.value) {
485
- (_b = menuRef.value) === null || _b === void 0 ? void 0 : _b.next();
484
+ (_c = menuRef.value) === null || _c === void 0 ? void 0 : _c.next();
486
485
  }
487
486
  else {
488
487
  openMenu();
@@ -490,7 +489,7 @@ export default defineComponent({
490
489
  break;
491
490
  case 'Escape':
492
491
  closeMenu();
493
- (_c = triggerRef.value) === null || _c === void 0 ? void 0 : _c.focus();
492
+ (_d = triggerRef.value) === null || _d === void 0 ? void 0 : _d.focus();
494
493
  break;
495
494
  }
496
495
  }
@@ -31,8 +31,8 @@ export interface SelectIgnoredOption {
31
31
  }
32
32
  export declare type ValueAtom = string | number;
33
33
  export declare type Value = ValueAtom | string[] | number[] | ValueAtom[];
34
- export declare type OnUpdateValue = (value: string & number & ValueAtom & string[] & number[] & ValueAtom[] & (ValueAtom | null) & (string[] | null) & (number[] | null) & (ValueAtom[] | null)) => void;
35
- export declare type OnUpdateValueImpl = (value: ValueAtom | string[] | number[] | ValueAtom[] | (ValueAtom | null) | (string[] | null) | (number[] | null) | (ValueAtom[] | null)) => void;
34
+ export declare type OnUpdateValue = (value: string & number & ValueAtom & string[] & number[] & ValueAtom[] & (ValueAtom | null) & (string[] | null) & (number[] | null) & (ValueAtom[] | null), option: SelectBaseOption & null & SelectBaseOption[]) => void;
35
+ export declare type OnUpdateValueImpl = (value: ValueAtom | string[] | number[] | ValueAtom[] | (ValueAtom | null) | (string[] | null) | (number[] | null) | (ValueAtom[] | null), option: SelectBaseOption | null | SelectBaseOption[]) => void;
36
36
  export declare type SelectTreeMate = TreeMate<SelectBaseOption, SelectGroupOption, SelectIgnoredOption>;
37
37
  export declare type Size = 'small' | 'medium' | 'large';
38
38
  export declare type SelectOption = SelectBaseOption<string | number>;