naive-ui 2.24.7 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/es/_internal/clear/src/Clear.js +3 -2
  2. package/es/_internal/close/src/Close.js +1 -1
  3. package/es/_internal/icon/src/Icon.js +1 -1
  4. package/es/_internal/icons/ArrowUp.d.ts +2 -0
  5. package/es/_internal/icons/ArrowUp.js +9 -0
  6. package/es/_internal/icons/index.d.ts +1 -0
  7. package/es/_internal/icons/index.js +1 -0
  8. package/es/_internal/loading/src/Loading.js +1 -1
  9. package/es/_internal/menu-mask/src/MenuMask.js +1 -1
  10. package/es/_internal/scrollbar/src/ScrollBar.js +1 -1
  11. package/es/_internal/select-menu/src/SelectMenu.d.ts +5 -5
  12. package/es/_internal/select-menu/src/SelectMenu.js +32 -16
  13. package/es/_internal/selection/src/Selection.d.ts +13 -5
  14. package/es/_internal/selection/src/Selection.js +24 -15
  15. package/es/_internal/selection/src/interface.d.ts +2 -2
  16. package/es/_internal/selection/src/styles/index.cssr.js +16 -31
  17. package/es/_internal/slot-machine/src/SlotMachine.js +1 -1
  18. package/es/_internal/wave/src/Wave.js +1 -1
  19. package/es/_mixins/use-config.js +1 -1
  20. package/es/_mixins/use-css-vars-class.d.ts +4 -2
  21. package/es/_mixins/use-css-vars-class.js +26 -11
  22. package/es/_mixins/use-form-item.d.ts +4 -0
  23. package/es/_mixins/use-form-item.js +7 -0
  24. package/es/_mixins/use-hljs.js +1 -1
  25. package/es/_mixins/use-locale.js +1 -1
  26. package/es/_mixins/use-style.js +1 -1
  27. package/es/_mixins/use-theme.d.ts +1 -1
  28. package/es/_mixins/use-theme.js +2 -2
  29. package/es/_utils/cssr/index.d.ts +1 -2
  30. package/es/_utils/cssr/index.js +1 -14
  31. package/es/_utils/index.d.ts +1 -1
  32. package/es/_utils/index.js +1 -1
  33. package/es/_utils/vue/index.d.ts +1 -1
  34. package/es/_utils/vue/index.js +1 -1
  35. package/es/_utils/vue/resolve-slot.d.ts +8 -2
  36. package/es/_utils/vue/resolve-slot.js +18 -1
  37. package/es/affix/src/Affix.js +1 -1
  38. package/es/alert/src/Alert.d.ts +4 -4
  39. package/es/alert/src/Alert.js +1 -1
  40. package/es/anchor/src/AnchorAdapter.js +1 -1
  41. package/es/auto-complete/src/AutoComplete.d.ts +17 -2
  42. package/es/auto-complete/src/AutoComplete.js +9 -5
  43. package/es/avatar/src/Avatar.js +2 -2
  44. package/es/avatar/src/AvatarGroup.d.ts +0 -1
  45. package/es/avatar/src/AvatarGroup.js +2 -3
  46. package/es/avatar/src/context.d.ts +2 -0
  47. package/es/avatar/src/context.js +2 -0
  48. package/es/back-top/src/BackTop.js +1 -1
  49. package/es/badge/src/Badge.d.ts +4 -4
  50. package/es/badge/src/Badge.js +1 -1
  51. package/es/breadcrumb/src/Breadcrumb.js +1 -1
  52. package/es/button/src/Button.d.ts +4 -3
  53. package/es/button/src/Button.js +265 -229
  54. package/es/button/src/ButtonGroup.js +1 -1
  55. package/es/button/src/styles/button.cssr.js +1 -0
  56. package/es/calendar/src/Calendar.js +1 -1
  57. package/es/card/src/Card.d.ts +5 -1
  58. package/es/card/src/Card.js +3 -2
  59. package/es/carousel/src/Carousel.js +4 -1
  60. package/es/carousel/src/CarouselArrow.js +6 -9
  61. package/es/carousel/src/styles/index.cssr.js +59 -48
  62. package/es/carousel/styles/light.js +2 -2
  63. package/es/cascader/src/Cascader.d.ts +6 -4
  64. package/es/cascader/src/Cascader.js +6 -6
  65. package/es/checkbox/src/Checkbox.js +1 -1
  66. package/es/code/src/Code.js +1 -1
  67. package/es/collapse/src/Collapse.js +1 -1
  68. package/es/collapse-transition/src/CollapseTransition.js +1 -1
  69. package/es/color-picker/src/ColorInputUnit.js +1 -1
  70. package/es/color-picker/src/ColorPicker.d.ts +24 -17
  71. package/es/color-picker/src/ColorPicker.js +7 -4
  72. package/es/color-picker/src/ColorPickerTrigger.js +1 -1
  73. package/es/color-picker/src/context.d.ts +9 -0
  74. package/es/color-picker/src/context.js +2 -0
  75. package/es/color-picker/src/styles/index.cssr.js +1 -0
  76. package/es/components.d.ts +2 -1
  77. package/es/components.js +2 -1
  78. package/es/composables/use-theme-vars.js +1 -1
  79. package/es/config-provider/src/ConfigProvider.d.ts +15 -3
  80. package/es/config-provider/src/ConfigProvider.js +29 -3
  81. package/es/config-provider/src/context.d.ts +2 -0
  82. package/es/config-provider/src/context.js +2 -0
  83. package/es/config-provider/src/interface.d.ts +2 -1
  84. package/es/config-provider/src/internal-interface.d.ts +4 -0
  85. package/es/data-table/src/DataTable.d.ts +1 -1
  86. package/es/data-table/src/DataTable.js +1 -1
  87. package/es/data-table/src/interface.d.ts +2 -2
  88. package/es/data-table/src/use-check.d.ts +2 -2
  89. package/es/data-table/src/use-group-header.d.ts +1 -1
  90. package/es/data-table/src/use-scroll.d.ts +1 -1
  91. package/es/data-table/src/use-scroll.js +3 -3
  92. package/es/data-table/src/use-sorter.d.ts +1 -1
  93. package/es/data-table/src/use-table-data.d.ts +1 -1
  94. package/es/data-table/src/utils.d.ts +2 -1
  95. package/es/data-table/src/utils.js +13 -3
  96. package/es/date-picker/src/DatePicker.d.ts +2 -1
  97. package/es/date-picker/src/DatePicker.js +6 -6
  98. package/es/descriptions/src/Descriptions.d.ts +2 -2
  99. package/es/descriptions/src/Descriptions.js +1 -1
  100. package/es/dialog/index.d.ts +3 -3
  101. package/es/dialog/index.js +2 -2
  102. package/es/dialog/src/Dialog.d.ts +28 -61
  103. package/es/dialog/src/Dialog.js +4 -31
  104. package/es/dialog/src/DialogEnvironment.d.ts +12 -13
  105. package/es/dialog/src/DialogEnvironment.js +3 -2
  106. package/es/dialog/src/DialogProvider.d.ts +4 -6
  107. package/es/dialog/src/DialogProvider.js +5 -6
  108. package/es/dialog/src/context.d.ts +3 -0
  109. package/es/dialog/src/context.js +3 -0
  110. package/es/dialog/src/dialogProps.d.ts +32 -0
  111. package/es/dialog/src/dialogProps.js +29 -0
  112. package/es/dialog/src/use-dialog.js +1 -1
  113. package/es/divider/src/Divider.js +1 -1
  114. package/es/drawer/index.d.ts +1 -0
  115. package/es/drawer/src/Drawer.js +1 -1
  116. package/es/dropdown/src/Dropdown.d.ts +17 -5
  117. package/es/dropdown/src/Dropdown.js +6 -5
  118. package/es/dropdown/src/DropdownGroup.js +1 -0
  119. package/es/dropdown/src/DropdownGroupHeader.js +1 -2
  120. package/es/dropdown/src/DropdownMenu.d.ts +0 -1
  121. package/es/dropdown/src/DropdownMenu.js +4 -4
  122. package/es/dropdown/src/DropdownOption.d.ts +3 -0
  123. package/es/dropdown/src/DropdownOption.js +4 -4
  124. package/es/dropdown/src/context.d.ts +6 -0
  125. package/es/dropdown/src/context.js +4 -0
  126. package/es/dropdown/src/interface.d.ts +1 -1
  127. package/es/dynamic-input/src/DynamicInput.d.ts +10 -1
  128. package/es/dynamic-input/src/DynamicInput.js +61 -18
  129. package/es/dynamic-tags/src/DynamicTags.d.ts +11 -20
  130. package/es/dynamic-tags/src/DynamicTags.js +14 -16
  131. package/es/element/src/Element.js +1 -1
  132. package/es/ellipsis/src/Ellipsis.js +1 -1
  133. package/es/empty/src/Empty.js +2 -2
  134. package/es/form/src/Form.d.ts +1 -1
  135. package/es/form/src/Form.js +2 -2
  136. package/es/form/src/FormItem.d.ts +5 -5
  137. package/es/form/src/FormItem.js +3 -2
  138. package/es/form/src/FormItemCol.d.ts +4 -4
  139. package/es/form/src/FormItemGridItem.d.ts +5 -5
  140. package/es/form/src/FormItemRow.d.ts +3 -3
  141. package/es/form/src/context.d.ts +3 -0
  142. package/es/form/src/context.js +3 -0
  143. package/es/form/src/interface.d.ts +4 -3
  144. package/es/form/src/interface.js +1 -3
  145. package/es/form/src/styles/form-item.cssr.js +6 -5
  146. package/es/form/src/utils.d.ts +1 -1
  147. package/es/form/src/utils.js +1 -1
  148. package/es/global-style/src/GlobalStyle.js +1 -1
  149. package/es/gradient-text/src/GradientText.d.ts +5 -5
  150. package/es/gradient-text/src/GradientText.js +1 -1
  151. package/es/grid/src/Grid.d.ts +0 -1
  152. package/es/grid/src/Grid.js +2 -3
  153. package/es/grid/src/GridItem.js +1 -1
  154. package/es/grid/src/config.d.ts +3 -0
  155. package/es/grid/src/config.js +3 -0
  156. package/es/icon/index.d.ts +1 -1
  157. package/es/icon/index.js +1 -1
  158. package/es/icon/src/Icon.d.ts +1 -2
  159. package/es/icon/src/Icon.js +2 -2
  160. package/es/icon-wrapper/index.d.ts +1 -0
  161. package/es/icon-wrapper/index.js +1 -0
  162. package/es/icon-wrapper/src/IconWrapper.d.ts +50 -0
  163. package/es/icon-wrapper/src/IconWrapper.js +48 -0
  164. package/es/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
  165. package/es/icon-wrapper/src/styles/index.cssr.js +16 -0
  166. package/es/icon-wrapper/styles/dark.d.ts +3 -0
  167. package/es/icon-wrapper/styles/dark.js +8 -0
  168. package/es/icon-wrapper/styles/index.d.ts +3 -0
  169. package/es/icon-wrapper/styles/index.js +2 -0
  170. package/es/icon-wrapper/styles/light.d.ts +10 -0
  171. package/es/icon-wrapper/styles/light.js +14 -0
  172. package/es/image/src/ImagePreview.js +1 -1
  173. package/es/input/src/Input.d.ts +7 -2
  174. package/es/input/src/Input.js +21 -17
  175. package/es/input/src/InputGroup.js +1 -1
  176. package/es/input/src/InputGroupLabel.js +1 -1
  177. package/es/input/src/WordCount.js +9 -8
  178. package/es/input/src/styles/input.cssr.js +5 -5
  179. package/es/input-number/src/InputNumber.d.ts +3 -2
  180. package/es/input-number/src/InputNumber.js +23 -21
  181. package/es/layout/src/Layout.js +1 -1
  182. package/es/layout/src/LayoutFooter.js +1 -1
  183. package/es/layout/src/LayoutHeader.js +1 -1
  184. package/es/layout/src/LayoutSider.js +1 -1
  185. package/es/legacy-grid/src/Col.js +0 -3
  186. package/es/legacy-grid/src/Row.js +1 -1
  187. package/es/list/src/List.js +1 -1
  188. package/es/loading-bar/src/LoadingBar.js +2 -2
  189. package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -8
  190. package/es/loading-bar/src/LoadingBarProvider.js +1 -3
  191. package/es/loading-bar/src/context.d.ts +7 -0
  192. package/es/loading-bar/src/context.js +3 -0
  193. package/es/loading-bar/src/use-loading-bar.js +1 -1
  194. package/es/log/index.d.ts +1 -1
  195. package/es/log/src/Log.d.ts +17 -12
  196. package/es/log/src/Log.js +10 -17
  197. package/es/log/src/LogLine.js +1 -1
  198. package/es/log/src/context.d.ts +2 -0
  199. package/es/log/src/context.js +2 -0
  200. package/es/log/src/styles/index.cssr.js +2 -3
  201. package/es/mention/src/Mention.d.ts +17 -2
  202. package/es/mention/src/Mention.js +7 -3
  203. package/es/menu/src/Menu.d.ts +2 -4
  204. package/es/menu/src/Menu.js +3 -3
  205. package/es/menu/src/MenuDivider.js +1 -1
  206. package/es/menu/src/MenuOption.d.ts +1 -2
  207. package/es/menu/src/MenuOption.js +1 -1
  208. package/es/menu/src/MenuOptionContent.js +1 -1
  209. package/es/menu/src/MenuOptionGroup.d.ts +1 -4
  210. package/es/menu/src/MenuOptionGroup.js +4 -5
  211. package/es/menu/src/Submenu.d.ts +1 -4
  212. package/es/menu/src/Submenu.js +3 -4
  213. package/es/menu/src/context.d.ts +4 -0
  214. package/es/menu/src/context.js +4 -0
  215. package/es/menu/src/use-menu-child.js +1 -3
  216. package/es/menu/src/useCheckDeprecated.d.ts +1 -1
  217. package/es/menu/src/utils.d.ts +1 -1
  218. package/es/menu/src/utils.js +5 -3
  219. package/es/message/src/Message.d.ts +2 -158
  220. package/es/message/src/Message.js +2 -2
  221. package/es/message/src/MessageProvider.d.ts +4 -9
  222. package/es/message/src/MessageProvider.js +2 -3
  223. package/es/message/src/context.d.ts +7 -0
  224. package/es/message/src/context.js +3 -0
  225. package/es/message/src/types.d.ts +1 -1
  226. package/es/message/src/use-message.js +1 -1
  227. package/es/modal/src/BodyWrapper.d.ts +6 -4
  228. package/es/modal/src/BodyWrapper.js +2 -2
  229. package/es/modal/src/Modal.d.ts +8 -5
  230. package/es/modal/src/Modal.js +2 -2
  231. package/es/modal/src/presetProps.d.ts +3 -2
  232. package/es/modal/src/presetProps.js +1 -1
  233. package/es/notification/index.d.ts +1 -1
  234. package/es/notification/src/Notification.d.ts +5 -6
  235. package/es/notification/src/Notification.js +3 -5
  236. package/es/notification/src/NotificationContainer.d.ts +1 -2
  237. package/es/notification/src/NotificationContainer.js +2 -2
  238. package/es/notification/src/NotificationEnvironment.d.ts +7 -8
  239. package/es/notification/src/NotificationEnvironment.js +3 -3
  240. package/es/notification/src/NotificationProvider.d.ts +11 -7
  241. package/es/notification/src/NotificationProvider.js +6 -6
  242. package/es/notification/src/context.d.ts +2 -0
  243. package/es/notification/src/context.js +2 -0
  244. package/es/page-header/src/PageHeader.js +1 -1
  245. package/es/pagination/src/Pagination.js +1 -1
  246. package/es/popconfirm/src/Popconfirm.d.ts +21 -8
  247. package/es/popconfirm/src/Popconfirm.js +1 -1
  248. package/es/popover/index.d.ts +1 -0
  249. package/es/popover/src/Popover.d.ts +21 -4
  250. package/es/popover/src/Popover.js +9 -2
  251. package/es/popover/src/PopoverBody.d.ts +4 -0
  252. package/es/popover/src/PopoverBody.js +13 -11
  253. package/es/popover/src/styles/index.cssr.js +2 -2
  254. package/es/popselect/src/Popselect.d.ts +18 -5
  255. package/es/popselect/src/Popselect.js +5 -2
  256. package/es/popselect/src/PopselectPanel.d.ts +2 -2
  257. package/es/popselect/src/PopselectPanel.js +4 -1
  258. package/es/progress/src/Progress.d.ts +1 -1
  259. package/es/progress/src/Progress.js +1 -1
  260. package/es/radio/src/Radio.js +1 -1
  261. package/es/radio/src/RadioGroup.js +1 -1
  262. package/es/rate/src/Rate.js +1 -1
  263. package/es/result/src/Result.d.ts +4 -4
  264. package/es/result/src/Result.js +1 -1
  265. package/es/select/index.d.ts +2 -0
  266. package/es/select/src/Select.d.ts +27 -24
  267. package/es/select/src/Select.js +71 -41
  268. package/es/select/src/interface.d.ts +2 -0
  269. package/es/skeleton/src/Skeleton.js +1 -1
  270. package/es/slider/src/Slider.js +1 -1
  271. package/es/space/src/Space.js +1 -1
  272. package/es/spin/src/Spin.js +1 -1
  273. package/es/statistic/src/Statistic.js +1 -1
  274. package/es/steps/src/Steps.js +1 -1
  275. package/es/switch/src/Switch.js +1 -1
  276. package/es/table/src/Table.js +1 -1
  277. package/es/tabs/src/Tabs.d.ts +7 -4
  278. package/es/tabs/src/Tabs.js +12 -4
  279. package/es/tag/src/Tag.d.ts +4 -4
  280. package/es/tag/src/Tag.js +1 -1
  281. package/es/tag/src/common-props.d.ts +1 -1
  282. package/es/tag/src/styles/index.cssr.js +5 -17
  283. package/es/themes/dark.js +3 -0
  284. package/es/themes/light.js +3 -0
  285. package/es/themes/utils.d.ts +2 -1
  286. package/es/themes/utils.js +16 -4
  287. package/es/thing/src/Thing.js +1 -1
  288. package/es/time-picker/src/TimePicker.d.ts +7 -5
  289. package/es/time-picker/src/TimePicker.js +5 -5
  290. package/es/timeline/src/Timeline.js +1 -1
  291. package/es/timeline/src/TimelineItem.d.ts +4 -4
  292. package/es/tooltip/src/Tooltip.d.ts +20 -7
  293. package/es/tooltip/src/Tooltip.js +1 -1
  294. package/es/transfer/src/Transfer.d.ts +1 -1
  295. package/es/transfer/src/Transfer.js +1 -1
  296. package/es/tree/src/Tree.d.ts +6 -2
  297. package/es/tree/src/Tree.js +15 -8
  298. package/es/tree/src/TreeNode.d.ts +2 -0
  299. package/es/tree/src/TreeNode.js +37 -10
  300. package/es/tree/src/TreeNodeContent.d.ts +3 -1
  301. package/es/tree/src/TreeNodeContent.js +4 -3
  302. package/es/tree/src/interface.d.ts +5 -1
  303. package/es/tree-select/src/TreeSelect.d.ts +16 -14
  304. package/es/tree-select/src/TreeSelect.js +8 -5
  305. package/es/typography/src/a.js +1 -1
  306. package/es/typography/src/blockquote.js +1 -1
  307. package/es/typography/src/create-header.d.ts +4 -4
  308. package/es/typography/src/create-header.js +1 -1
  309. package/es/typography/src/headers.d.ts +18 -18
  310. package/es/typography/src/hr.js +1 -1
  311. package/es/typography/src/ol.js +1 -1
  312. package/es/typography/src/p.js +1 -1
  313. package/es/typography/src/text.js +1 -1
  314. package/es/typography/src/ul.js +1 -1
  315. package/es/upload/src/Upload.js +1 -1
  316. package/es/upload/src/UploadFile.d.ts +1 -1
  317. package/es/upload/src/UploadProgress.d.ts +2 -2
  318. package/es/version.d.ts +1 -1
  319. package/es/version.js +1 -1
  320. package/lib/_internal/clear/src/Clear.js +3 -2
  321. package/lib/_internal/close/src/Close.js +1 -1
  322. package/lib/_internal/icon/src/Icon.js +1 -1
  323. package/lib/_internal/icons/ArrowUp.d.ts +2 -0
  324. package/lib/_internal/icons/ArrowUp.js +11 -0
  325. package/lib/_internal/icons/index.d.ts +1 -0
  326. package/lib/_internal/icons/index.js +3 -1
  327. package/lib/_internal/loading/src/Loading.js +1 -1
  328. package/lib/_internal/menu-mask/src/MenuMask.js +1 -1
  329. package/lib/_internal/scrollbar/src/ScrollBar.js +1 -1
  330. package/lib/_internal/select-menu/src/SelectMenu.d.ts +5 -5
  331. package/lib/_internal/select-menu/src/SelectMenu.js +31 -15
  332. package/lib/_internal/selection/src/Selection.d.ts +13 -5
  333. package/lib/_internal/selection/src/Selection.js +24 -15
  334. package/lib/_internal/selection/src/interface.d.ts +2 -2
  335. package/lib/_internal/selection/src/styles/index.cssr.js +15 -30
  336. package/lib/_internal/slot-machine/src/SlotMachine.js +1 -1
  337. package/lib/_internal/wave/src/Wave.js +1 -1
  338. package/lib/_mixins/use-config.js +2 -2
  339. package/lib/_mixins/use-css-vars-class.d.ts +4 -2
  340. package/lib/_mixins/use-css-vars-class.js +25 -13
  341. package/lib/_mixins/use-form-item.d.ts +4 -0
  342. package/lib/_mixins/use-form-item.js +7 -0
  343. package/lib/_mixins/use-hljs.js +2 -2
  344. package/lib/_mixins/use-locale.js +2 -2
  345. package/lib/_mixins/use-style.js +1 -1
  346. package/lib/_mixins/use-theme.d.ts +1 -1
  347. package/lib/_mixins/use-theme.js +3 -3
  348. package/lib/_utils/cssr/index.d.ts +1 -2
  349. package/lib/_utils/cssr/index.js +1 -15
  350. package/lib/_utils/index.d.ts +1 -1
  351. package/lib/_utils/index.js +5 -1
  352. package/lib/_utils/vue/index.d.ts +1 -1
  353. package/lib/_utils/vue/index.js +4 -1
  354. package/lib/_utils/vue/resolve-slot.d.ts +8 -2
  355. package/lib/_utils/vue/resolve-slot.js +22 -2
  356. package/lib/affix/src/Affix.js +1 -1
  357. package/lib/alert/src/Alert.d.ts +4 -4
  358. package/lib/alert/src/Alert.js +1 -1
  359. package/lib/anchor/src/AnchorAdapter.js +1 -1
  360. package/lib/auto-complete/src/AutoComplete.d.ts +17 -2
  361. package/lib/auto-complete/src/AutoComplete.js +9 -5
  362. package/lib/avatar/src/Avatar.js +3 -3
  363. package/lib/avatar/src/AvatarGroup.d.ts +0 -1
  364. package/lib/avatar/src/AvatarGroup.js +3 -5
  365. package/lib/avatar/src/context.d.ts +2 -0
  366. package/lib/avatar/src/context.js +5 -0
  367. package/lib/back-top/src/BackTop.js +1 -1
  368. package/lib/badge/src/Badge.d.ts +4 -4
  369. package/lib/badge/src/Badge.js +1 -1
  370. package/lib/breadcrumb/src/Breadcrumb.js +1 -1
  371. package/lib/button/src/Button.d.ts +4 -3
  372. package/lib/button/src/Button.js +264 -228
  373. package/lib/button/src/ButtonGroup.js +1 -1
  374. package/lib/button/src/styles/button.cssr.js +1 -0
  375. package/lib/calendar/src/Calendar.js +1 -1
  376. package/lib/card/src/Card.d.ts +5 -1
  377. package/lib/card/src/Card.js +3 -2
  378. package/lib/carousel/src/Carousel.js +4 -1
  379. package/lib/carousel/src/CarouselArrow.js +5 -8
  380. package/lib/carousel/src/styles/index.cssr.js +59 -48
  381. package/lib/carousel/styles/light.js +2 -2
  382. package/lib/cascader/src/Cascader.d.ts +6 -4
  383. package/lib/cascader/src/Cascader.js +6 -6
  384. package/lib/checkbox/src/Checkbox.js +1 -1
  385. package/lib/code/src/Code.js +1 -1
  386. package/lib/collapse/src/Collapse.js +1 -1
  387. package/lib/collapse-transition/src/CollapseTransition.js +1 -1
  388. package/lib/color-picker/src/ColorInputUnit.js +2 -2
  389. package/lib/color-picker/src/ColorPicker.d.ts +24 -17
  390. package/lib/color-picker/src/ColorPicker.js +8 -5
  391. package/lib/color-picker/src/ColorPickerTrigger.js +2 -2
  392. package/lib/color-picker/src/context.d.ts +9 -0
  393. package/lib/color-picker/src/context.js +5 -0
  394. package/lib/color-picker/src/styles/index.cssr.js +1 -0
  395. package/lib/components.d.ts +2 -1
  396. package/lib/components.js +2 -1
  397. package/lib/composables/use-theme-vars.js +2 -2
  398. package/lib/config-provider/src/ConfigProvider.d.ts +15 -3
  399. package/lib/config-provider/src/ConfigProvider.js +31 -5
  400. package/lib/config-provider/src/context.d.ts +2 -0
  401. package/lib/config-provider/src/context.js +5 -0
  402. package/lib/config-provider/src/interface.d.ts +2 -1
  403. package/lib/config-provider/src/internal-interface.d.ts +4 -0
  404. package/lib/data-table/src/DataTable.d.ts +1 -1
  405. package/lib/data-table/src/DataTable.js +1 -1
  406. package/lib/data-table/src/interface.d.ts +2 -2
  407. package/lib/data-table/src/use-check.d.ts +2 -2
  408. package/lib/data-table/src/use-group-header.d.ts +1 -1
  409. package/lib/data-table/src/use-scroll.d.ts +1 -1
  410. package/lib/data-table/src/use-scroll.js +2 -2
  411. package/lib/data-table/src/use-sorter.d.ts +1 -1
  412. package/lib/data-table/src/use-table-data.d.ts +1 -1
  413. package/lib/data-table/src/utils.d.ts +2 -1
  414. package/lib/data-table/src/utils.js +15 -4
  415. package/lib/date-picker/src/DatePicker.d.ts +2 -1
  416. package/lib/date-picker/src/DatePicker.js +6 -6
  417. package/lib/descriptions/src/Descriptions.d.ts +2 -2
  418. package/lib/descriptions/src/Descriptions.js +1 -1
  419. package/lib/dialog/index.d.ts +3 -3
  420. package/lib/dialog/index.js +2 -5
  421. package/lib/dialog/src/Dialog.d.ts +28 -61
  422. package/lib/dialog/src/Dialog.js +5 -32
  423. package/lib/dialog/src/DialogEnvironment.d.ts +12 -13
  424. package/lib/dialog/src/DialogEnvironment.js +6 -24
  425. package/lib/dialog/src/DialogProvider.d.ts +4 -6
  426. package/lib/dialog/src/DialogProvider.js +8 -12
  427. package/lib/dialog/src/context.d.ts +3 -0
  428. package/lib/dialog/src/context.js +6 -0
  429. package/lib/dialog/src/dialogProps.d.ts +32 -0
  430. package/lib/dialog/src/dialogProps.js +32 -0
  431. package/lib/dialog/src/use-dialog.js +2 -2
  432. package/lib/divider/src/Divider.js +1 -1
  433. package/lib/drawer/index.d.ts +1 -0
  434. package/lib/drawer/src/Drawer.js +1 -1
  435. package/lib/dropdown/src/Dropdown.d.ts +17 -5
  436. package/lib/dropdown/src/Dropdown.js +6 -6
  437. package/lib/dropdown/src/DropdownGroup.js +1 -0
  438. package/lib/dropdown/src/DropdownGroupHeader.js +3 -4
  439. package/lib/dropdown/src/DropdownMenu.d.ts +0 -1
  440. package/lib/dropdown/src/DropdownMenu.js +6 -7
  441. package/lib/dropdown/src/DropdownOption.d.ts +3 -0
  442. package/lib/dropdown/src/DropdownOption.js +9 -25
  443. package/lib/dropdown/src/context.d.ts +6 -0
  444. package/lib/dropdown/src/context.js +7 -0
  445. package/lib/dropdown/src/interface.d.ts +1 -1
  446. package/lib/dynamic-input/src/DynamicInput.d.ts +10 -1
  447. package/lib/dynamic-input/src/DynamicInput.js +59 -16
  448. package/lib/dynamic-tags/src/DynamicTags.d.ts +11 -20
  449. package/lib/dynamic-tags/src/DynamicTags.js +12 -14
  450. package/lib/element/src/Element.js +1 -1
  451. package/lib/ellipsis/src/Ellipsis.js +1 -1
  452. package/lib/empty/src/Empty.js +3 -3
  453. package/lib/form/src/Form.d.ts +1 -1
  454. package/lib/form/src/Form.js +4 -4
  455. package/lib/form/src/FormItem.d.ts +5 -5
  456. package/lib/form/src/FormItem.js +5 -4
  457. package/lib/form/src/FormItemCol.d.ts +4 -4
  458. package/lib/form/src/FormItemGridItem.d.ts +5 -5
  459. package/lib/form/src/FormItemRow.d.ts +3 -3
  460. package/lib/form/src/context.d.ts +3 -0
  461. package/lib/form/src/context.js +6 -0
  462. package/lib/form/src/interface.d.ts +4 -3
  463. package/lib/form/src/interface.js +0 -4
  464. package/lib/form/src/styles/form-item.cssr.js +3 -2
  465. package/lib/form/src/utils.d.ts +1 -1
  466. package/lib/form/src/utils.js +4 -4
  467. package/lib/global-style/src/GlobalStyle.js +2 -2
  468. package/lib/gradient-text/src/GradientText.d.ts +5 -5
  469. package/lib/gradient-text/src/GradientText.js +1 -1
  470. package/lib/grid/src/Grid.d.ts +0 -1
  471. package/lib/grid/src/Grid.js +4 -6
  472. package/lib/grid/src/GridItem.js +2 -2
  473. package/lib/grid/src/config.d.ts +3 -0
  474. package/lib/grid/src/config.js +6 -0
  475. package/lib/icon/index.d.ts +1 -1
  476. package/lib/icon/index.js +1 -4
  477. package/lib/icon/src/Icon.d.ts +1 -2
  478. package/lib/icon/src/Icon.js +3 -2
  479. package/lib/icon-wrapper/index.d.ts +1 -0
  480. package/lib/icon-wrapper/index.js +5 -0
  481. package/lib/icon-wrapper/src/IconWrapper.d.ts +50 -0
  482. package/lib/icon-wrapper/src/IconWrapper.js +54 -0
  483. package/lib/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
  484. package/lib/icon-wrapper/src/styles/index.cssr.js +23 -0
  485. package/lib/icon-wrapper/styles/dark.d.ts +3 -0
  486. package/lib/icon-wrapper/styles/dark.js +10 -0
  487. package/lib/icon-wrapper/styles/index.d.ts +3 -0
  488. package/lib/icon-wrapper/styles/index.js +10 -0
  489. package/lib/icon-wrapper/styles/light.d.ts +10 -0
  490. package/lib/icon-wrapper/styles/light.js +18 -0
  491. package/lib/image/src/ImagePreview.js +1 -1
  492. package/lib/input/src/Input.d.ts +7 -2
  493. package/lib/input/src/Input.js +20 -16
  494. package/lib/input/src/InputGroup.js +1 -1
  495. package/lib/input/src/InputGroupLabel.js +1 -1
  496. package/lib/input/src/WordCount.js +9 -8
  497. package/lib/input/src/styles/input.cssr.js +4 -4
  498. package/lib/input-number/src/InputNumber.d.ts +3 -2
  499. package/lib/input-number/src/InputNumber.js +23 -21
  500. package/lib/layout/src/Layout.js +1 -1
  501. package/lib/layout/src/LayoutFooter.js +1 -1
  502. package/lib/layout/src/LayoutHeader.js +1 -1
  503. package/lib/layout/src/LayoutSider.js +1 -1
  504. package/lib/legacy-grid/src/Col.js +0 -6
  505. package/lib/legacy-grid/src/Row.js +1 -1
  506. package/lib/list/src/List.js +1 -1
  507. package/lib/loading-bar/src/LoadingBar.js +3 -3
  508. package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -8
  509. package/lib/loading-bar/src/LoadingBarProvider.js +3 -6
  510. package/lib/loading-bar/src/context.d.ts +7 -0
  511. package/lib/loading-bar/src/context.js +6 -0
  512. package/lib/loading-bar/src/use-loading-bar.js +2 -2
  513. package/lib/log/index.d.ts +1 -1
  514. package/lib/log/src/Log.d.ts +17 -12
  515. package/lib/log/src/Log.js +10 -18
  516. package/lib/log/src/LogLine.js +2 -2
  517. package/lib/log/src/context.d.ts +2 -0
  518. package/lib/log/src/context.js +5 -0
  519. package/lib/log/src/styles/index.cssr.js +2 -3
  520. package/lib/mention/src/Mention.d.ts +17 -2
  521. package/lib/mention/src/Mention.js +7 -3
  522. package/lib/menu/src/Menu.d.ts +2 -4
  523. package/lib/menu/src/Menu.js +3 -4
  524. package/lib/menu/src/MenuDivider.js +2 -2
  525. package/lib/menu/src/MenuOption.d.ts +1 -2
  526. package/lib/menu/src/MenuOption.js +2 -2
  527. package/lib/menu/src/MenuOptionContent.js +2 -2
  528. package/lib/menu/src/MenuOptionGroup.d.ts +1 -4
  529. package/lib/menu/src/MenuOptionGroup.js +7 -8
  530. package/lib/menu/src/Submenu.d.ts +1 -4
  531. package/lib/menu/src/Submenu.js +6 -7
  532. package/lib/menu/src/context.d.ts +4 -0
  533. package/lib/menu/src/context.js +7 -0
  534. package/lib/menu/src/use-menu-child.js +4 -6
  535. package/lib/menu/src/useCheckDeprecated.d.ts +1 -1
  536. package/lib/menu/src/utils.d.ts +1 -1
  537. package/lib/menu/src/utils.js +8 -25
  538. package/lib/message/src/Message.d.ts +2 -158
  539. package/lib/message/src/Message.js +3 -3
  540. package/lib/message/src/MessageProvider.d.ts +4 -9
  541. package/lib/message/src/MessageProvider.js +3 -5
  542. package/lib/message/src/context.d.ts +7 -0
  543. package/lib/message/src/context.js +6 -0
  544. package/lib/message/src/types.d.ts +1 -1
  545. package/lib/message/src/use-message.js +2 -2
  546. package/lib/modal/src/BodyWrapper.d.ts +6 -4
  547. package/lib/modal/src/BodyWrapper.js +3 -3
  548. package/lib/modal/src/Modal.d.ts +8 -5
  549. package/lib/modal/src/Modal.js +3 -3
  550. package/lib/modal/src/presetProps.d.ts +3 -2
  551. package/lib/modal/src/presetProps.js +2 -2
  552. package/lib/notification/index.d.ts +1 -1
  553. package/lib/notification/src/Notification.d.ts +5 -6
  554. package/lib/notification/src/Notification.js +5 -7
  555. package/lib/notification/src/NotificationContainer.d.ts +1 -2
  556. package/lib/notification/src/NotificationContainer.js +4 -3
  557. package/lib/notification/src/NotificationEnvironment.d.ts +7 -8
  558. package/lib/notification/src/NotificationEnvironment.js +4 -23
  559. package/lib/notification/src/NotificationProvider.d.ts +11 -7
  560. package/lib/notification/src/NotificationProvider.js +9 -9
  561. package/lib/notification/src/context.d.ts +2 -0
  562. package/lib/notification/src/context.js +5 -0
  563. package/lib/page-header/src/PageHeader.js +1 -1
  564. package/lib/pagination/src/Pagination.js +1 -1
  565. package/lib/popconfirm/src/Popconfirm.d.ts +21 -8
  566. package/lib/popconfirm/src/Popconfirm.js +1 -1
  567. package/lib/popover/index.d.ts +1 -0
  568. package/lib/popover/src/Popover.d.ts +21 -4
  569. package/lib/popover/src/Popover.js +9 -2
  570. package/lib/popover/src/PopoverBody.d.ts +4 -0
  571. package/lib/popover/src/PopoverBody.js +11 -9
  572. package/lib/popover/src/styles/index.cssr.js +2 -2
  573. package/lib/popselect/src/Popselect.d.ts +18 -5
  574. package/lib/popselect/src/Popselect.js +5 -2
  575. package/lib/popselect/src/PopselectPanel.d.ts +2 -2
  576. package/lib/popselect/src/PopselectPanel.js +4 -1
  577. package/lib/progress/src/Progress.d.ts +1 -1
  578. package/lib/progress/src/Progress.js +1 -1
  579. package/lib/radio/src/Radio.js +1 -1
  580. package/lib/radio/src/RadioGroup.js +1 -1
  581. package/lib/rate/src/Rate.js +1 -1
  582. package/lib/result/src/Result.d.ts +4 -4
  583. package/lib/result/src/Result.js +1 -1
  584. package/lib/select/index.d.ts +2 -0
  585. package/lib/select/src/Select.d.ts +27 -24
  586. package/lib/select/src/Select.js +71 -41
  587. package/lib/select/src/interface.d.ts +2 -0
  588. package/lib/skeleton/src/Skeleton.js +1 -1
  589. package/lib/slider/src/Slider.js +1 -1
  590. package/lib/space/src/Space.js +1 -1
  591. package/lib/spin/src/Spin.js +1 -1
  592. package/lib/statistic/src/Statistic.js +1 -1
  593. package/lib/steps/src/Steps.js +1 -1
  594. package/lib/switch/src/Switch.js +1 -1
  595. package/lib/table/src/Table.js +1 -1
  596. package/lib/tabs/src/Tabs.d.ts +7 -4
  597. package/lib/tabs/src/Tabs.js +12 -4
  598. package/lib/tag/src/Tag.d.ts +4 -4
  599. package/lib/tag/src/Tag.js +1 -1
  600. package/lib/tag/src/common-props.d.ts +1 -1
  601. package/lib/tag/src/styles/index.cssr.js +5 -17
  602. package/lib/themes/dark.js +87 -84
  603. package/lib/themes/light.js +87 -84
  604. package/lib/themes/utils.d.ts +2 -1
  605. package/lib/themes/utils.js +16 -4
  606. package/lib/thing/src/Thing.js +1 -1
  607. package/lib/time-picker/src/TimePicker.d.ts +7 -5
  608. package/lib/time-picker/src/TimePicker.js +5 -5
  609. package/lib/timeline/src/Timeline.js +1 -1
  610. package/lib/timeline/src/TimelineItem.d.ts +4 -4
  611. package/lib/tooltip/src/Tooltip.d.ts +20 -7
  612. package/lib/tooltip/src/Tooltip.js +1 -1
  613. package/lib/transfer/src/Transfer.d.ts +1 -1
  614. package/lib/transfer/src/Transfer.js +1 -1
  615. package/lib/tree/src/Tree.d.ts +6 -2
  616. package/lib/tree/src/Tree.js +15 -8
  617. package/lib/tree/src/TreeNode.d.ts +2 -0
  618. package/lib/tree/src/TreeNode.js +37 -10
  619. package/lib/tree/src/TreeNodeContent.d.ts +3 -1
  620. package/lib/tree/src/TreeNodeContent.js +4 -3
  621. package/lib/tree/src/interface.d.ts +5 -1
  622. package/lib/tree-select/src/TreeSelect.d.ts +16 -14
  623. package/lib/tree-select/src/TreeSelect.js +8 -5
  624. package/lib/typography/src/a.js +1 -1
  625. package/lib/typography/src/blockquote.js +1 -1
  626. package/lib/typography/src/create-header.d.ts +4 -4
  627. package/lib/typography/src/create-header.js +1 -1
  628. package/lib/typography/src/headers.d.ts +18 -18
  629. package/lib/typography/src/hr.js +1 -1
  630. package/lib/typography/src/ol.js +1 -1
  631. package/lib/typography/src/p.js +1 -1
  632. package/lib/typography/src/text.js +1 -1
  633. package/lib/typography/src/ul.js +1 -1
  634. package/lib/upload/src/Upload.js +1 -1
  635. package/lib/upload/src/UploadFile.d.ts +1 -1
  636. package/lib/upload/src/UploadProgress.d.ts +2 -2
  637. package/lib/version.d.ts +1 -1
  638. package/lib/version.js +1 -1
  639. package/package.json +7 -8
  640. package/volar.d.ts +1 -0
  641. package/web-types.json +425 -220
@@ -15,7 +15,7 @@ export default defineComponent({
15
15
  onClear: Function
16
16
  },
17
17
  setup(props) {
18
- useStyle('BaseClear', style, toRef(props, 'clsPrefix'));
18
+ useStyle('-base-clear', style, toRef(props, 'clsPrefix'));
19
19
  const { NConfigProvider } = useConfig();
20
20
  return {
21
21
  NConfigProvider,
@@ -29,9 +29,10 @@ export default defineComponent({
29
29
  return (h("div", { class: `${clsPrefix}-base-clear` },
30
30
  h(NIconSwitchTransition, null, {
31
31
  default: () => {
32
+ var _a, _b;
32
33
  return this.show ? (h(NBaseIcon, { clsPrefix: clsPrefix, key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onClick: this.onClear, onMousedown: this.handleMouseDown, "data-clear": true }, {
33
34
  default: () => h(ClearIcon, null)
34
- })) : (h("div", { key: "icon", class: `${clsPrefix}-base-clear__placeholder` }, this.$slots));
35
+ })) : (h("div", { key: "icon", class: `${clsPrefix}-base-clear__placeholder` }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)));
35
36
  }
36
37
  })));
37
38
  }
@@ -17,7 +17,7 @@ export default defineComponent({
17
17
  onClick: Function
18
18
  },
19
19
  setup(props) {
20
- useStyle('BaseClose', style, toRef(props, 'clsPrefix'));
20
+ useStyle('-base-close', style, toRef(props, 'clsPrefix'));
21
21
  return () => {
22
22
  const { clsPrefix, disabled } = props;
23
23
  return (h(NBaseIcon, { role: "button", ariaDisabled: disabled, ariaLabel: "close", clsPrefix: clsPrefix, class: [
@@ -23,7 +23,7 @@ export default defineComponent({
23
23
  onMouseup: Function
24
24
  },
25
25
  setup(props) {
26
- useStyle('BaseIcon', style, toRef(props, 'clsPrefix'));
26
+ useStyle('-base-icon', style, toRef(props, 'clsPrefix'));
27
27
  },
28
28
  render() {
29
29
  return (h("i", { class: `${this.clsPrefix}-base-icon`, onClick: this.onClick, onMousedown: this.onMousedown, onMouseup: this.onMouseup, role: this.role, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "aria-disabled": this.ariaDisabled }, this.$slots));
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { h, defineComponent } from 'vue';
2
+ export default defineComponent({
3
+ name: 'ArrowUp',
4
+ render() {
5
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" },
6
+ h("g", { fill: "none" },
7
+ h("path", { d: "M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z", fill: "currentColor" }))));
8
+ }
9
+ });
@@ -1,5 +1,6 @@
1
1
  export { default as AddIcon } from './Add';
2
2
  export { default as ArrowDownIcon } from './ArrowDown';
3
+ export { default as ArrowUpIcon } from './ArrowUp';
3
4
  export { default as AttachIcon } from './Attach';
4
5
  export { default as BackwardIcon } from './Backward';
5
6
  export { default as DateIcon } from './Date';
@@ -1,5 +1,6 @@
1
1
  export { default as AddIcon } from './Add';
2
2
  export { default as ArrowDownIcon } from './ArrowDown';
3
+ export { default as ArrowUpIcon } from './ArrowUp';
3
4
  export { default as AttachIcon } from './Attach';
4
5
  export { default as BackwardIcon } from './Backward';
5
6
  export { default as DateIcon } from './Date';
@@ -33,7 +33,7 @@ export default defineComponent({
33
33
  }
34
34
  },
35
35
  setup(props) {
36
- useStyle('BaseLoading', style, toRef(props, 'clsPrefix'));
36
+ useStyle('-base-loading', style, toRef(props, 'clsPrefix'));
37
37
  },
38
38
  render() {
39
39
  const { clsPrefix, radius, strokeWidth, stroke, scale } = this;
@@ -10,7 +10,7 @@ export default defineComponent({
10
10
  }
11
11
  },
12
12
  setup(props) {
13
- useStyle('BaseMenuMask', style, toRef(props, 'clsPrefix'));
13
+ useStyle('-base-menu-mask', style, toRef(props, 'clsPrefix'));
14
14
  const messageRef = ref(null);
15
15
  let timerId = null;
16
16
  const uncontrolledShowRef = ref(false);
@@ -454,7 +454,7 @@ const Scrollbar = defineComponent({
454
454
  off('mousemove', window, handleYScrollMouseMove, true);
455
455
  off('mouseup', window, handleYScrollMouseUp, true);
456
456
  });
457
- const themeRef = useTheme('Scrollbar', 'Scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
457
+ const themeRef = useTheme('Scrollbar', '-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
458
458
  const exposedMethods = {
459
459
  scrollTo,
460
460
  sync,
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { TreeNode } from 'treemate';
3
- import type { SelectBaseOption, SelectGroupOption, SelectIgnoredOption, Value, SelectTreeMate } from '../../../select/src/interface';
3
+ import type { SelectOption, SelectGroupOption, SelectIgnoredOption, Value, SelectTreeMate } from '../../../select/src/interface';
4
4
  import type { RenderLabel, Size, RenderOption } from './interface';
5
5
  declare const _default: import("vue").DefineComponent<{
6
6
  clsPrefix: {
@@ -51,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
51
51
  type: BooleanConstructor;
52
52
  default: boolean;
53
53
  };
54
- onToggle: PropType<(tmNode: TreeNode<SelectBaseOption>) => void>;
54
+ onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
55
55
  theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
56
56
  optionFontSizeSmall: string;
57
57
  optionFontSizeMedium: string;
@@ -210,7 +210,7 @@ declare const _default: import("vue").DefineComponent<{
210
210
  }>>>;
211
211
  }, {
212
212
  selfRef: import("vue").Ref<HTMLElement | null>;
213
- getPendingTmNode: () => TreeNode<SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>> | null;
213
+ getPendingTmNode: () => TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>> | null;
214
214
  prev: () => void;
215
215
  next: () => void;
216
216
  mergedTheme: import("vue").ComputedRef<{
@@ -425,7 +425,7 @@ declare const _default: import("vue").DefineComponent<{
425
425
  })[]>;
426
426
  itemSize: import("vue").ComputedRef<number>;
427
427
  padding: import("vue").ComputedRef<import("seemly").Margin>;
428
- flattenedNodes: import("vue").ComputedRef<TreeNode<SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>[]>;
428
+ flattenedNodes: import("vue").ComputedRef<TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>[]>;
429
429
  empty: import("vue").ComputedRef<boolean>;
430
430
  virtualListContainer(): HTMLElement;
431
431
  virtualListContent(): HTMLElement;
@@ -486,7 +486,7 @@ declare const _default: import("vue").DefineComponent<{
486
486
  type: BooleanConstructor;
487
487
  default: boolean;
488
488
  };
489
- onToggle: PropType<(tmNode: TreeNode<SelectBaseOption>) => void>;
489
+ onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
490
490
  theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
491
491
  optionFontSizeSmall: string;
492
492
  optionFontSizeMedium: string;
@@ -4,16 +4,16 @@ import { VirtualList } from 'vueuc';
4
4
  import { depx, getPadding, happensIn } from 'seemly';
5
5
  import { NEmpty } from '../../../empty';
6
6
  import { NScrollbar } from '../../scrollbar';
7
- import { formatLength } from '../../../_utils';
7
+ import { formatLength, resolveSlot, resolveWrappedSlot } from '../../../_utils';
8
8
  import { createKey } from '../../../_utils/cssr';
9
9
  import { useTheme } from '../../../_mixins';
10
10
  import NInternalLoading from '../../loading';
11
11
  import NFocusDetector from '../../focus-detector';
12
+ import { internalSelectMenuLight } from '../styles';
12
13
  import NSelectOption from './SelectOption';
13
14
  import NSelectGroupHeader from './SelectGroupHeader';
14
- import style from './styles/index.cssr';
15
- import { internalSelectMenuLight } from '../styles';
16
15
  import { internalSelectionMenuInjectionKey, internalSelectionMenuBodyInjectionKey } from './interface';
16
+ import style from './styles/index.cssr';
17
17
  export default defineComponent({
18
18
  name: 'InternalSelectMenu',
19
19
  props: Object.assign(Object.assign({}, useTheme.props), { clsPrefix: {
@@ -46,7 +46,7 @@ export default defineComponent({
46
46
  // deprecated
47
47
  onToggle: Function }),
48
48
  setup(props) {
49
- const themeRef = useTheme('InternalSelectMenu', 'InternalSelectMenu', style, internalSelectMenuLight, props, toRef(props, 'clsPrefix'));
49
+ const themeRef = useTheme('InternalSelectMenu', '-internal-select-menu', style, internalSelectMenuLight, props, toRef(props, 'clsPrefix'));
50
50
  const selfRef = ref(null);
51
51
  const virtualListRef = ref(null);
52
52
  const scrollbarRef = ref(null);
@@ -55,15 +55,27 @@ export default defineComponent({
55
55
  const pendingNodeRef = ref(null);
56
56
  function initPendingNode() {
57
57
  const { treeMate } = props;
58
- setPendingTmNode(props.autoPending
59
- ? props.value === null
60
- ? treeMate.getFirstAvailableNode()
61
- : props.multiple
62
- ? treeMate.getNode((props.value || [])[(props.value || [])
63
- .length - 1]) || treeMate.getFirstAvailableNode()
64
- : treeMate.getNode(props.value) ||
65
- treeMate.getFirstAvailableNode()
66
- : null);
58
+ let defaultPendingNode = null;
59
+ if (props.autoPending) {
60
+ const { value } = props;
61
+ if (value === null) {
62
+ defaultPendingNode = treeMate.getFirstAvailableNode();
63
+ }
64
+ else {
65
+ if (props.multiple) {
66
+ defaultPendingNode = treeMate.getNode((value || [])[(value || []).length - 1]);
67
+ }
68
+ else {
69
+ defaultPendingNode = treeMate.getNode(value);
70
+ }
71
+ if (!defaultPendingNode || defaultPendingNode.disabled) {
72
+ defaultPendingNode = treeMate.getFirstAvailableNode();
73
+ }
74
+ }
75
+ if (defaultPendingNode) {
76
+ setPendingTmNode(defaultPendingNode);
77
+ }
78
+ }
67
79
  }
68
80
  let initPendingNodeWatchStopHandle;
69
81
  watch(toRef(props, 'show'), (value) => {
@@ -290,8 +302,12 @@ export default defineComponent({
290
302
  paddingBottom: this.padding.bottom
291
303
  } }, this.flattenedNodes.map((tmNode) => tmNode.isGroup ? (h(NSelectGroupHeader, { key: tmNode.key, clsPrefix: clsPrefix, tmNode: tmNode })) : (h(NSelectOption, { clsPrefix: clsPrefix, key: tmNode.key, tmNode: tmNode })))));
292
304
  }
293
- })) : (h("div", { class: `${clsPrefix}-base-select-menu__empty` }, $slots.empty ? ($slots.empty()) : (h(NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty })))),
294
- $slots.action && (h("div", { class: `${clsPrefix}-base-select-menu__action`, "data-action": true }, $slots.action())),
295
- $slots.action && h(NFocusDetector, { onFocus: this.onTabOut })));
305
+ })) : (h("div", { class: `${clsPrefix}-base-select-menu__empty` }, resolveSlot($slots.empty, () => [
306
+ h(NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty })
307
+ ]))),
308
+ resolveWrappedSlot($slots.action, (children) => [
309
+ h("div", { class: `${clsPrefix}-base-select-menu__action`, "data-action": true, key: "action" }, children),
310
+ h(NFocusDetector, { onFocus: this.onTabOut, key: "focus-detector" })
311
+ ])));
296
312
  }
297
313
  });
@@ -1,8 +1,10 @@
1
1
  import { PropType, InputHTMLAttributes } from 'vue';
2
2
  import type { SelectBaseOption } from '../../../select/src/interface';
3
- import { RenderTag } from './interface';
3
+ import type { FormValidationStatus } from '../../../form/src/interface';
4
+ import type { RenderTag } from './interface';
4
5
  import type { RenderLabel, RenderLabelImpl } from '../../select-menu/src/interface';
5
6
  export interface InternalSelectionInst {
7
+ isCompositing: boolean;
6
8
  focus: () => void;
7
9
  focusInput: () => void;
8
10
  blur: () => void;
@@ -20,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
20
22
  active: BooleanConstructor;
21
23
  pattern: {
22
24
  type: StringConstructor;
23
- default: null;
25
+ default: string;
24
26
  };
25
27
  placeholder: StringConstructor;
26
28
  selectedOption: {
@@ -57,7 +59,10 @@ declare const _default: import("vue").DefineComponent<{
57
59
  maxTagCount: PropType<number | "responsive">;
58
60
  onClear: PropType<(e: MouseEvent) => void>;
59
61
  onPatternInput: PropType<(e: InputEvent) => void>;
62
+ onPatternFocus: PropType<(e: FocusEvent) => void>;
63
+ onPatternBlur: PropType<(e: FocusEvent) => void>;
60
64
  renderLabel: PropType<RenderLabel>;
65
+ status: PropType<FormValidationStatus>;
61
66
  theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
62
67
  fontSizeTiny: string;
63
68
  fontSizeSmall: string;
@@ -479,7 +484,7 @@ declare const _default: import("vue").DefineComponent<{
479
484
  handlePatternKeyDown: (e: KeyboardEvent) => void;
480
485
  handlePatternInputInput: (e: InputEvent) => void;
481
486
  handlePatternInputBlur: (e: FocusEvent) => void;
482
- handlePatternInputFocus: () => void;
487
+ handlePatternInputFocus: (e: FocusEvent) => void;
483
488
  handleMouseEnterCounter: () => void;
484
489
  handleMouseLeaveCounter: () => void;
485
490
  handleFocusout: (e: FocusEvent) => void;
@@ -553,7 +558,7 @@ declare const _default: import("vue").DefineComponent<{
553
558
  active: BooleanConstructor;
554
559
  pattern: {
555
560
  type: StringConstructor;
556
- default: null;
561
+ default: string;
557
562
  };
558
563
  placeholder: StringConstructor;
559
564
  selectedOption: {
@@ -590,7 +595,10 @@ declare const _default: import("vue").DefineComponent<{
590
595
  maxTagCount: PropType<number | "responsive">;
591
596
  onClear: PropType<(e: MouseEvent) => void>;
592
597
  onPatternInput: PropType<(e: InputEvent) => void>;
598
+ onPatternFocus: PropType<(e: FocusEvent) => void>;
599
+ onPatternBlur: PropType<(e: FocusEvent) => void>;
593
600
  renderLabel: PropType<RenderLabel>;
601
+ status: PropType<FormValidationStatus>;
594
602
  theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
595
603
  fontSizeTiny: string;
596
604
  fontSizeSmall: string;
@@ -805,8 +813,8 @@ declare const _default: import("vue").DefineComponent<{
805
813
  active: boolean;
806
814
  disabled: boolean;
807
815
  autofocus: boolean;
808
- loading: boolean;
809
816
  bordered: boolean | undefined;
817
+ loading: boolean;
810
818
  showArrow: boolean;
811
819
  selectedOption: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)> | null;
812
820
  selectedOptions: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>[] | null;
@@ -18,7 +18,7 @@ export default defineComponent({
18
18
  default: undefined
19
19
  }, active: Boolean, pattern: {
20
20
  type: String,
21
- default: null
21
+ default: ''
22
22
  }, placeholder: String, selectedOption: {
23
23
  type: Object,
24
24
  default: null
@@ -31,7 +31,7 @@ export default defineComponent({
31
31
  }, loading: Boolean, autofocus: Boolean, showArrow: {
32
32
  type: Boolean,
33
33
  default: true
34
- }, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, renderLabel: Function }),
34
+ }, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, onPatternFocus: Function, onPatternBlur: Function, renderLabel: Function, status: String }),
35
35
  setup(props) {
36
36
  const patternInputMirrorRef = ref(null);
37
37
  const patternInputRef = ref(null);
@@ -46,7 +46,7 @@ export default defineComponent({
46
46
  const showTagsPopoverRef = ref(false);
47
47
  const patternInputFocusedRef = ref(false);
48
48
  const hoverRef = ref(false);
49
- const themeRef = useTheme('InternalSelection', 'InternalSelection', style, internalSelectionLight, props, toRef(props, 'clsPrefix'));
49
+ const themeRef = useTheme('InternalSelection', '-internal-selection', style, internalSelectionLight, props, toRef(props, 'clsPrefix'));
50
50
  const mergedClearableRef = computed(() => {
51
51
  return (props.clearable && !props.disabled && (hoverRef.value || props.active));
52
52
  });
@@ -166,7 +166,7 @@ export default defineComponent({
166
166
  doDeleteOption(option);
167
167
  }
168
168
  function handlePatternKeyDown(e) {
169
- if (e.code === 'Backspace') {
169
+ if (e.code === 'Backspace' && !isCompositingRef.value) {
170
170
  if (!props.pattern.length) {
171
171
  const { selectedOptions } = props;
172
172
  if (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) {
@@ -202,11 +202,15 @@ export default defineComponent({
202
202
  doPatternInput(cachedInputEvent);
203
203
  cachedInputEvent = null;
204
204
  }
205
- function handlePatternInputFocus() {
205
+ function handlePatternInputFocus(e) {
206
+ var _a;
206
207
  patternInputFocusedRef.value = true;
208
+ (_a = props.onPatternFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
207
209
  }
208
210
  function handlePatternInputBlur(e) {
211
+ var _a;
209
212
  patternInputFocusedRef.value = false;
213
+ (_a = props.onPatternBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
210
214
  }
211
215
  function blur() {
212
216
  var _a, _b;
@@ -404,7 +408,7 @@ export default defineComponent({
404
408
  };
405
409
  },
406
410
  render() {
407
- const { multiple, size, disabled, filterable, maxTagCount, bordered, clsPrefix, renderTag, renderLabel } = this;
411
+ const { status, multiple, size, disabled, filterable, maxTagCount, bordered, clsPrefix, renderTag, renderLabel } = this;
408
412
  const maxTagCountResponsive = maxTagCount === 'responsive';
409
413
  const maxTagCountNumeric = typeof maxTagCount === 'number';
410
414
  const useMaxTagCount = maxTagCountResponsive || maxTagCountNumeric;
@@ -426,7 +430,7 @@ export default defineComponent({
426
430
  : this.selectedOptions).map(createTag);
427
431
  const input = filterable ? (h("div", { class: `${clsPrefix}-base-selection-input-tag`, ref: "inputTagElRef", key: "__input-tag__" },
428
432
  h("input", Object.assign({}, this.inputProps, { ref: "patternInputRef", tabindex: -1, disabled: disabled, value: this.pattern, autofocus: this.autofocus, class: `${clsPrefix}-base-selection-input-tag__input`, onBlur: this.handlePatternInputBlur, onFocus: this.handlePatternInputFocus, onKeydown: this.handlePatternKeyDown, onInput: this.handlePatternInputInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd })),
429
- h("span", { ref: "patternInputMirrorRef", class: `${clsPrefix}-base-selection-input-tag__mirror` }, this.pattern ? this.pattern : ''))) : null;
433
+ h("span", { ref: "patternInputMirrorRef", class: `${clsPrefix}-base-selection-input-tag__mirror` }, this.pattern))) : null;
430
434
  // May Overflow
431
435
  const renderCounter = maxTagCountResponsive
432
436
  ? () => (h("div", { class: `${clsPrefix}-base-selection-tag-wrapper`, ref: "counterWrapperRef" },
@@ -475,7 +479,12 @@ export default defineComponent({
475
479
  themeOverrides: this.mergedTheme.peerOverrides.Popover
476
480
  }
477
481
  : null;
478
- const placeholder = !this.selected && !this.pattern && !this.isCompositing ? (h("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay` }, this.placeholder)) : null;
482
+ const showPlaceholder = this.selected
483
+ ? false
484
+ : this.active
485
+ ? !this.pattern && !this.isCompositing
486
+ : true;
487
+ const placeholder = showPlaceholder ? (h("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay` }, this.placeholder)) : null;
479
488
  if (filterable) {
480
489
  const popoverTrigger = (h("div", { ref: "patternInputWrapperRef", class: `${clsPrefix}-base-selection-tags` },
481
490
  tags,
@@ -502,13 +511,12 @@ export default defineComponent({
502
511
  }
503
512
  else {
504
513
  if (filterable) {
505
- const showPlaceholder = !this.pattern &&
506
- (this.active || !this.selected) &&
507
- !this.isCompositing;
514
+ const hasInput = this.pattern || this.isCompositing;
515
+ const showPlaceholder = this.active ? !hasInput : !this.selected;
516
+ const showSelectedLabel = this.active ? false : this.selected;
508
517
  body = (h("div", { ref: "patternInputWrapperRef", class: `${clsPrefix}-base-selection-label` },
509
- h("input", Object.assign({}, this.inputProps, { ref: "patternInputRef", class: `${clsPrefix}-base-selection-input`, value: this.patternInputFocused && this.active ? this.pattern : '', placeholder: "", readonly: disabled, disabled: disabled, tabindex: -1, autofocus: this.autofocus, onFocus: this.handlePatternInputFocus, onBlur: this.handlePatternInputBlur, onInput: this.handlePatternInputInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd })),
510
- showPlaceholder ? null : this.patternInputFocused &&
511
- this.active ? null : (h("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`, key: "input" },
518
+ h("input", Object.assign({}, this.inputProps, { ref: "patternInputRef", class: `${clsPrefix}-base-selection-input`, value: this.active ? this.pattern : '', placeholder: "", readonly: disabled, disabled: disabled, tabindex: -1, autofocus: this.autofocus, onFocus: this.handlePatternInputFocus, onBlur: this.handlePatternInputBlur, onInput: this.handlePatternInputInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd })),
519
+ showSelectedLabel ? (h("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`, key: "input" },
512
520
  h("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` }, renderTag
513
521
  ? renderTag({
514
522
  option: this.selectedOption,
@@ -516,7 +524,7 @@ export default defineComponent({
516
524
  })
517
525
  : renderLabel
518
526
  ? renderLabel(this.selectedOption, true)
519
- : render(this.label, this.selectedOption, true)))),
527
+ : render(this.label, this.selectedOption, true)))) : null,
520
528
  showPlaceholder ? (h("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`, key: "placeholder" },
521
529
  h("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` }, this.filterablePlaceholder))) : null,
522
530
  suffix));
@@ -537,6 +545,7 @@ export default defineComponent({
537
545
  }
538
546
  return (h("div", { ref: "selfRef", class: [
539
547
  `${clsPrefix}-base-selection`,
548
+ status && `${clsPrefix}-base-selection--${status}-status`,
540
549
  {
541
550
  [`${clsPrefix}-base-selection--active`]: this.active,
542
551
  [`${clsPrefix}-base-selection--selected`]: this.selected || (this.active && this.pattern),
@@ -1,6 +1,6 @@
1
1
  import { VNodeChild } from 'vue';
2
- import type { SelectBaseOption } from '../../../select/src/interface';
2
+ import type { SelectOption } from '../../../select/src/interface';
3
3
  export declare type RenderTag = (props: {
4
- option: SelectBaseOption;
4
+ option: SelectOption;
5
5
  handleClose: () => void;
6
6
  }) => VNodeChild;
@@ -1,4 +1,4 @@
1
- import { c, cB, cE, cM, cNotM, insideFormItem } from '../../../../_utils/cssr'; // vars:
1
+ import { c, cB, cE, cM, cNotM } from '../../../../_utils/cssr'; // vars:
2
2
  // --n-bezier
3
3
  // --n-border
4
4
  // --n-border-active
@@ -40,9 +40,7 @@ export default c([cB('base-selection', `
40
40
  font-size: var(--n-font-size);
41
41
  `, [cB('base-loading', `
42
42
  color: var(--n-loading-color);
43
- `), cB('base-selection-tags', {
44
- minHeight: 'var(--n-height)'
45
- }), cE('border, state-border', `
43
+ `), cB('base-selection-tags', 'min-height: var(--n-height);'), cE('border, state-border', `
46
44
  position: absolute;
47
45
  left: 0;
48
46
  right: 0;
@@ -148,13 +146,7 @@ export default c([cB('base-selection', `
148
146
  `)]), cM('active', [cE('state-border', `
149
147
  box-shadow: var(--n-box-shadow-active);
150
148
  border: var(--n-border-active);
151
- `), cB('base-selection-label', {
152
- backgroundColor: 'var(--n-color-active)'
153
- }), cB('base-selection-tags', {
154
- backgroundColor: 'var(--n-color-active)'
155
- })])]), cM('disabled', {
156
- cursor: 'not-allowed'
157
- }, [cE('arrow', `
149
+ `), cB('base-selection-label', 'background-color: var(--n-color-active);'), cB('base-selection-tags', 'background-color: var(--n-color-active);')])]), cM('disabled', 'cursor: not-allowed;', [cE('arrow', `
158
150
  color: var(--n-arrow-color-disabled);
159
151
  `), cB('base-selection-label', `
160
152
  cursor: not-allowed;
@@ -200,7 +192,16 @@ export default c([cB('base-selection', `
200
192
  visibility: hidden;
201
193
  user-select: none;
202
194
  opacity: 0;
203
- `)])]), cB('base-selection-popover', `
195
+ `)]), ['warning', 'error'].map(status => cM(`${status}-status`, [cE('state-border', `border: var(--n-border-${status});`), cNotM('disabled', [c('&:hover', [cE('state-border', `
196
+ box-shadow: var(--n-box-shadow-hover-${status});
197
+ border: var(--n-border-hover-${status});
198
+ `)]), cM('active', [cE('state-border', `
199
+ box-shadow: var(--n-box-shadow-active-${status});
200
+ border: var(--n-border-active-${status});
201
+ `), cB('base-selection-label', `background-color: var(--n-color-active-${status});`), cB('base-selection-tags', `background-color: var(--n-color-active-${status});`)]), cM('focus', [cE('state-border', `
202
+ box-shadow: var(--n-box-shadow-focus-${status});
203
+ border: var(--n-border-focus-${status});
204
+ `)])])]))]), cB('base-selection-popover', `
204
205
  margin-bottom: -3px;
205
206
  display: flex;
206
207
  flex-wrap: wrap;
@@ -208,27 +209,11 @@ export default c([cB('base-selection', `
208
209
  max-width: 100%;
209
210
  display: inline-flex;
210
211
  padding: 0 7px 3px 0;
211
- `, [c('&:last-child', {
212
- paddingRight: 0
213
- }), cB('tag', `
212
+ `, [c('&:last-child', 'padding-right: 0;'), cB('tag', `
214
213
  font-size: 14px;
215
214
  max-width: 100%;
216
215
  `, [cE('content', `
216
+ line-height: 1.25;
217
217
  text-overflow: ellipsis;
218
218
  overflow: hidden;
219
- `)])]), ['warning', 'error'].map(status => insideFormItem(status, cB('base-selection', [cE('state-border', {
220
- border: `var(--n-border-${status})`
221
- }), cNotM('disabled', [c('&:hover', [cE('state-border', `
222
- box-shadow: var(--n-box-shadow-hover-${status});
223
- border: var(--n-border-hover-${status});
224
- `)]), cM('active', [cE('state-border', `
225
- box-shadow: var(--n-box-shadow-active-${status});
226
- border: var(--n-border-active-${status});
227
- `), cB('base-selection-label', {
228
- backgroundColor: `var(--n-color-active-${status})`
229
- }), cB('base-selection-tags', {
230
- backgroundColor: `var(--n-box-shadow-active-${status})`
231
- })]), cM('focus', [cE('state-border', `
232
- box-shadow: var(--n-box-shadow-focus-${status});
233
- border: var(--n-border-focus-${status});
234
- `)])])])))]);
219
+ `)])])]);
@@ -24,7 +24,7 @@ export default defineComponent({
24
24
  }
25
25
  },
26
26
  setup(props) {
27
- useStyle('BaseSlotMachine', style, toRef(props, 'clsPrefix'));
27
+ useStyle('-base-slot-machine', style, toRef(props, 'clsPrefix'));
28
28
  const oldValueRef = ref();
29
29
  const newValueRef = ref();
30
30
  const numbersRef = computed(() => {
@@ -10,7 +10,7 @@ export default defineComponent({
10
10
  }
11
11
  },
12
12
  setup(props) {
13
- useStyle('BaseWave', style, toRef(props, 'clsPrefix'));
13
+ useStyle('-base-wave', style, toRef(props, 'clsPrefix'));
14
14
  const selfRef = ref(null);
15
15
  const activeRef = ref(false);
16
16
  let animationTimerId = null;
@@ -1,5 +1,5 @@
1
1
  import { inject, computed } from 'vue';
2
- import { configProviderInjectionKey } from '../config-provider/src/ConfigProvider';
2
+ import { configProviderInjectionKey } from '../config-provider/src/context';
3
3
  export const defaultClsPrefix = 'n';
4
4
  export default function useConfig(props = {}, options = {
5
5
  defaultBordered: true
@@ -1,2 +1,4 @@
1
- import { Ref } from 'vue';
2
- export declare function useCssVarsClass(cssVarsRef: Ref<Record<string, string>>): Ref<string>;
1
+ import { ComputedRef, Ref } from 'vue';
2
+ export declare function useCssVarsClass(componentName: string, hashRef: Ref<string> | undefined, cssVarsRef: ComputedRef<Record<string, string>> | undefined, props: {
3
+ themeOverrides?: unknown;
4
+ }): Ref<string>;
@@ -1,22 +1,37 @@
1
- import { ref, watchEffect } from 'vue';
2
- import hash from '@emotion/hash';
1
+ import { ref, inject, watchEffect } from 'vue';
2
+ import { hash } from 'css-render';
3
+ import { configProviderInjectionKey } from '../config-provider/src/context';
4
+ import { throwError } from '../_utils';
3
5
  import { c } from '../_utils/cssr';
4
- // window.xxx = 0
5
- export function useCssVarsClass(cssVarsRef) {
6
+ export function useCssVarsClass(componentName, hashRef, cssVarsRef, props) {
7
+ var _a;
8
+ if (!cssVarsRef)
9
+ throwError('useCssVarsClass', 'cssVarsRef is not passed');
10
+ const mergedThemeHashRef = (_a = inject(configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedThemeHashRef;
6
11
  const cssVarsClassRef = ref('');
7
- watchEffect(() => {
8
- // window.xxx -= performance.now()
12
+ const mountStyle = () => {
9
13
  const cssVars = cssVarsRef.value;
10
14
  let style = '';
11
15
  for (const key in cssVars) {
12
16
  style += `${key}: ${cssVars[key]};`;
13
17
  }
14
- const styleHash = hash(style);
15
- cssVarsClassRef.value = `c${styleHash}`;
16
- c(`.c${styleHash}`, style).mount({
17
- id: styleHash
18
+ let finalThemeHash = componentName;
19
+ const hashValue = hashRef ? hashRef.value : undefined;
20
+ const themeHash = mergedThemeHashRef === null || mergedThemeHashRef === void 0 ? void 0 : mergedThemeHashRef.value;
21
+ if (themeHash)
22
+ finalThemeHash += '-' + themeHash;
23
+ if (hashValue)
24
+ finalThemeHash += '-' + hashValue;
25
+ if (props.themeOverrides) {
26
+ finalThemeHash += '-' + hash(JSON.stringify(props.themeOverrides));
27
+ }
28
+ cssVarsClassRef.value = finalThemeHash;
29
+ c(`.${finalThemeHash}`, style).mount({
30
+ id: finalThemeHash
18
31
  });
19
- // window.xxx += performance.now()
32
+ };
33
+ watchEffect(() => {
34
+ mountStyle();
20
35
  });
21
36
  return cssVarsClassRef;
22
37
  }
@@ -1,10 +1,12 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
+ import { FormValidationStatus } from '../form/src/interface';
2
3
  declare type FormItemSize = 'small' | 'medium' | 'large';
3
4
  declare type AllowedSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | number;
4
5
  export interface FormItemInjection {
5
6
  path: Ref<string | undefined>;
6
7
  disabled: Ref<boolean>;
7
8
  mergedSize: ComputedRef<FormItemSize>;
9
+ mergedValidationStatus: ComputedRef<FormValidationStatus | undefined>;
8
10
  restoreValidation: () => void;
9
11
  handleContentBlur: () => void;
10
12
  handleContentFocus: () => void;
@@ -20,10 +22,12 @@ interface UseFormItemOptions<T> {
20
22
  interface UseFormItemProps<T> {
21
23
  size?: T;
22
24
  disabled?: boolean;
25
+ status?: FormValidationStatus;
23
26
  }
24
27
  export interface UseFormItem<T> {
25
28
  mergedSizeRef: ComputedRef<T>;
26
29
  mergedDisabledRef: ComputedRef<boolean>;
30
+ mergedStatusRef: ComputedRef<FormValidationStatus | undefined>;
27
31
  nTriggerFormBlur: () => void;
28
32
  nTriggerFormChange: () => void;
29
33
  nTriggerFormFocus: () => void;