antdv-next 1.5.6 → 1.7.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 (360) hide show
  1. package/dist/_util/ContextIsolator.js +12 -3
  2. package/dist/_util/PurePanel.js +17 -14
  3. package/dist/_util/fallbackProp.d.ts +13 -0
  4. package/dist/_util/fallbackProp.js +15 -0
  5. package/dist/_util/hooks/useAllowClear.d.ts +35 -0
  6. package/dist/_util/hooks/useAllowClear.js +34 -0
  7. package/dist/_util/hooks/useClosable.js +1 -1
  8. package/dist/_util/hooks/useMergeSemantic.js +3 -2
  9. package/dist/_util/omitUndefined.d.ts +13 -0
  10. package/dist/_util/omitUndefined.js +20 -0
  11. package/dist/_util/tools.d.ts +3 -1
  12. package/dist/_util/tools.js +6 -1
  13. package/dist/_util/wave/index.js +4 -2
  14. package/dist/_util/wave/style.d.ts +5 -1
  15. package/dist/_util/wave/useWave.d.ts +2 -1
  16. package/dist/_util/wave/useWave.js +4 -3
  17. package/dist/affix/style/index.d.ts +5 -1
  18. package/dist/alert/Alert.d.ts +6 -2
  19. package/dist/alert/Alert.js +135 -129
  20. package/dist/alert/style/index.d.ts +7 -4
  21. package/dist/alert/style/index.js +12 -9
  22. package/dist/anchor/style/index.d.ts +5 -1
  23. package/dist/antd-with-locales.esm.js +21947 -18522
  24. package/dist/antd-with-locales.js +82 -82
  25. package/dist/antd.css +1 -1
  26. package/dist/antd.esm.js +19553 -16771
  27. package/dist/antd.js +82 -82
  28. package/dist/app/style/index.d.ts +5 -1
  29. package/dist/auto-complete/index.js +1 -0
  30. package/dist/avatar/Avatar.js +2 -4
  31. package/dist/avatar/AvatarContext.d.ts +2 -2
  32. package/dist/avatar/style/index.d.ts +5 -1
  33. package/dist/badge/index.js +1 -1
  34. package/dist/badge/style/index.d.ts +5 -1
  35. package/dist/badge/style/index.js +2 -9
  36. package/dist/badge/style/ribbon.d.ts +5 -1
  37. package/dist/border-beam/BorderBeam.d.ts +8 -1
  38. package/dist/border-beam/BorderBeam.js +28 -14
  39. package/dist/border-beam/index.d.ts +2 -2
  40. package/dist/border-beam/style/index.d.ts +5 -1
  41. package/dist/breadcrumb/BreadcrumbItem.js +2 -2
  42. package/dist/breadcrumb/style/index.d.ts +5 -1
  43. package/dist/button/style/index.d.ts +5 -1
  44. package/dist/calendar/style/index.d.ts +4 -1
  45. package/dist/card/Card.js +1 -1
  46. package/dist/card/style/index.d.ts +5 -1
  47. package/dist/card/style/index.js +2 -2
  48. package/dist/carousel/index.js +1 -1
  49. package/dist/carousel/style/index.d.ts +5 -1
  50. package/dist/carousel/style/index.js +1 -1
  51. package/dist/cascader/Panel.js +3 -3
  52. package/dist/cascader/index.js +14 -6
  53. package/dist/cascader/style/index.d.ts +5 -1
  54. package/dist/cascader/style/panel.d.ts +5 -1
  55. package/dist/checkbox/Checkbox.js +6 -4
  56. package/dist/checkbox/Group.d.ts +19 -1
  57. package/dist/checkbox/Group.js +34 -5
  58. package/dist/checkbox/GroupContext.d.ts +3 -0
  59. package/dist/checkbox/index.d.ts +2 -2
  60. package/dist/checkbox/style/index.d.ts +4 -1
  61. package/dist/collapse/style/index.d.ts +4 -1
  62. package/dist/color-picker/ColorPicker.js +8 -12
  63. package/dist/color-picker/style/index.d.ts +5 -1
  64. package/dist/color-picker/style/input.js +1 -1
  65. package/dist/components.d.ts +1 -1
  66. package/dist/config-provider/context.d.ts +16 -21
  67. package/dist/config-provider/context.js +32 -38
  68. package/dist/config-provider/define.d.ts +3 -1
  69. package/dist/config-provider/hooks/useCSSVarCls.d.ts +3 -0
  70. package/dist/config-provider/hooks/useCSSVarCls.js +4 -3
  71. package/dist/config-provider/index.d.ts +2 -2
  72. package/dist/config-provider/index.js +24 -1
  73. package/dist/date-picker/generatePicker/generateRangePicker.js +29 -4
  74. package/dist/date-picker/generatePicker/generateSinglePicker.js +32 -6
  75. package/dist/date-picker/generatePicker/interface.d.ts +4 -0
  76. package/dist/date-picker/generatePicker/useComponents.d.ts +3 -3
  77. package/dist/date-picker/style/index.d.ts +5 -1
  78. package/dist/date-picker/style/panel.js +1 -1
  79. package/dist/date-picker/style/util.js +1 -1
  80. package/dist/date-picker/util.d.ts +10 -12
  81. package/dist/date-picker/util.js +14 -7
  82. package/dist/descriptions/Cell.js +80 -75
  83. package/dist/descriptions/Row.js +14 -11
  84. package/dist/descriptions/hooks/useItems.d.ts +10 -10
  85. package/dist/descriptions/style/index.d.ts +5 -1
  86. package/dist/descriptions/style/index.js +11 -13
  87. package/dist/divider/style/index.d.ts +5 -1
  88. package/dist/divider/style/index.js +1 -1
  89. package/dist/drawer/DrawerPanel.js +7 -7
  90. package/dist/drawer/index.d.ts +0 -2
  91. package/dist/drawer/index.js +0 -1
  92. package/dist/drawer/style/index.d.ts +5 -1
  93. package/dist/dropdown/dropdown.d.ts +2 -0
  94. package/dist/dropdown/dropdown.js +11 -3
  95. package/dist/dropdown/style/index.d.ts +5 -1
  96. package/dist/dropdown/style/index.js +1 -1
  97. package/dist/empty/style/index.d.ts +5 -1
  98. package/dist/flex/index.js +1 -1
  99. package/dist/flex/style/index.d.ts +5 -1
  100. package/dist/float-button/FloatButtonGroup.js +1 -1
  101. package/dist/float-button/style/index.d.ts +5 -1
  102. package/dist/form/ErrorList.js +1 -1
  103. package/dist/form/Form.js +1 -1
  104. package/dist/form/FormItem/ItemHolder.js +1 -1
  105. package/dist/form/FormItem/index.js +38 -18
  106. package/dist/form/FormItemInput.js +1 -1
  107. package/dist/form/FormItemLabel.js +1 -1
  108. package/dist/form/context.d.ts +1 -1
  109. package/dist/form/hooks/useVariant.d.ts +1 -1
  110. package/dist/form/hooks/useVariant.js +1 -1
  111. package/dist/form/style/index.d.ts +5 -1
  112. package/dist/grid/style/index.d.ts +5 -2
  113. package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
  114. package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
  115. package/dist/image/hooks/usePreviewConfig.d.ts +9 -9
  116. package/dist/image/style/index.d.ts +4 -1
  117. package/dist/index.d.ts +1 -1
  118. package/dist/input/Group.js +1 -1
  119. package/dist/input/Input.d.ts +2 -1
  120. package/dist/input/Input.js +8 -5
  121. package/dist/input/OTP/OTPInput.d.ts +2 -1
  122. package/dist/input/OTP/OTPInput.js +12 -3
  123. package/dist/input/OTP/index.d.ts +3 -1
  124. package/dist/input/OTP/index.js +15 -6
  125. package/dist/input/Password.js +7 -5
  126. package/dist/input/Search.js +4 -2
  127. package/dist/input/TextArea.d.ts +3 -1
  128. package/dist/input/TextArea.js +13 -8
  129. package/dist/input/style/index.d.ts +5 -2
  130. package/dist/input/style/index.js +1 -1
  131. package/dist/input/style/otp.d.ts +5 -1
  132. package/dist/input/style/search.d.ts +5 -1
  133. package/dist/input/style/textarea.d.ts +5 -1
  134. package/dist/input-number/index.d.ts +3 -6
  135. package/dist/input-number/index.js +8 -3
  136. package/dist/input-number/style/index.d.ts +5 -1
  137. package/dist/input-number/style/index.js +1 -5
  138. package/dist/layout/style/index.d.ts +5 -1
  139. package/dist/layout/style/sider.d.ts +5 -1
  140. package/dist/listy/index.d.ts +1 -1
  141. package/dist/listy/index.js +9 -7
  142. package/dist/listy/interface.d.ts +6 -1
  143. package/dist/listy/style/index.d.ts +5 -1
  144. package/dist/listy/style/index.js +4 -2
  145. package/dist/locale/ar_EG.js +9 -0
  146. package/dist/locale/az_AZ.js +9 -0
  147. package/dist/locale/bg_BG.js +9 -0
  148. package/dist/locale/bn_BD.js +9 -0
  149. package/dist/locale/by_BY.js +9 -0
  150. package/dist/locale/ca_ES.js +9 -0
  151. package/dist/locale/cs_CZ.js +9 -0
  152. package/dist/locale/da_DK.js +9 -0
  153. package/dist/locale/de_DE.js +9 -0
  154. package/dist/locale/el_GR.js +9 -0
  155. package/dist/locale/en_GB.js +11 -1
  156. package/dist/locale/en_US.js +11 -1
  157. package/dist/locale/es_ES.js +9 -0
  158. package/dist/locale/et_EE.js +9 -0
  159. package/dist/locale/eu_ES.js +9 -0
  160. package/dist/locale/fa_IR.js +9 -0
  161. package/dist/locale/fi_FI.js +10 -1
  162. package/dist/locale/fr_BE.js +9 -0
  163. package/dist/locale/fr_CA.js +9 -0
  164. package/dist/locale/fr_FR.js +9 -0
  165. package/dist/locale/ga_IE.js +9 -0
  166. package/dist/locale/gl_ES.js +9 -0
  167. package/dist/locale/he_IL.js +9 -0
  168. package/dist/locale/hi_IN.js +9 -0
  169. package/dist/locale/hr_HR.js +9 -0
  170. package/dist/locale/hu_HU.js +9 -0
  171. package/dist/locale/hy_AM.js +9 -0
  172. package/dist/locale/id_ID.js +9 -0
  173. package/dist/locale/index.d.ts +3 -0
  174. package/dist/locale/is_IS.js +9 -0
  175. package/dist/locale/it_IT.js +9 -0
  176. package/dist/locale/ja_JP.js +9 -0
  177. package/dist/locale/ka_GE.js +9 -0
  178. package/dist/locale/kk_KZ.js +9 -0
  179. package/dist/locale/km_KH.js +9 -0
  180. package/dist/locale/kmr_IQ.js +9 -0
  181. package/dist/locale/kn_IN.js +9 -0
  182. package/dist/locale/ko_KR.js +9 -0
  183. package/dist/locale/ku_IQ.js +9 -0
  184. package/dist/locale/lt_LT.js +9 -0
  185. package/dist/locale/lv_LV.js +9 -0
  186. package/dist/locale/mk_MK.js +9 -0
  187. package/dist/locale/ml_IN.js +9 -0
  188. package/dist/locale/mn_MN.js +9 -0
  189. package/dist/locale/mr_IN.js +9 -0
  190. package/dist/locale/ms_MY.js +9 -0
  191. package/dist/locale/my_MM.js +9 -0
  192. package/dist/locale/nb_NO.js +9 -0
  193. package/dist/locale/ne_NP.js +9 -0
  194. package/dist/locale/nl_BE.js +9 -0
  195. package/dist/locale/nl_NL.js +9 -0
  196. package/dist/locale/pl_PL.js +9 -0
  197. package/dist/locale/pt_BR.js +9 -0
  198. package/dist/locale/pt_PT.js +9 -0
  199. package/dist/locale/ro_RO.js +19 -10
  200. package/dist/locale/ru_RU.js +9 -0
  201. package/dist/locale/si_LK.js +9 -0
  202. package/dist/locale/sk_SK.js +9 -0
  203. package/dist/locale/sl_SI.js +9 -0
  204. package/dist/locale/sq_AL.js +9 -0
  205. package/dist/locale/sr_RS.js +9 -0
  206. package/dist/locale/sv_SE.js +9 -0
  207. package/dist/locale/ta_IN.js +10 -1
  208. package/dist/locale/th_TH.js +9 -0
  209. package/dist/locale/tk_TK.js +9 -0
  210. package/dist/locale/tr_TR.js +9 -0
  211. package/dist/locale/uk_UA.js +9 -0
  212. package/dist/locale/ur_PK.js +9 -0
  213. package/dist/locale/useLocale.d.ts +7 -2
  214. package/dist/locale/useLocale.js +12 -1
  215. package/dist/locale/uz_UZ.js +9 -0
  216. package/dist/locale/vi_VN.js +9 -0
  217. package/dist/locale/zh_CN.js +13 -3
  218. package/dist/locale/zh_HK.js +11 -1
  219. package/dist/locale/zh_TW.js +11 -1
  220. package/dist/masonry/Masonry.js +1 -1
  221. package/dist/masonry/style/index.d.ts +4 -1
  222. package/dist/mentions/index.d.ts +2 -3
  223. package/dist/mentions/index.js +10 -5
  224. package/dist/mentions/style/index.d.ts +5 -1
  225. package/dist/mentions/style/index.js +1 -1
  226. package/dist/menu/MenuContext.d.ts +2 -0
  227. package/dist/menu/MenuItem.js +25 -7
  228. package/dist/menu/index.js +5 -0
  229. package/dist/menu/menu.d.ts +3 -0
  230. package/dist/menu/menu.js +7 -0
  231. package/dist/message/style/index.d.ts +5 -1
  232. package/dist/modal/ConfirmDialog.js +14 -7
  233. package/dist/modal/style/index.d.ts +3 -1
  234. package/dist/notification/PurePanel.js +7 -12
  235. package/dist/notification/interface.d.ts +8 -0
  236. package/dist/notification/style/index.d.ts +4 -1
  237. package/dist/notification/style/index.js +1 -1
  238. package/dist/notification/style/placement.js +10 -7
  239. package/dist/notification/useNotification.js +5 -15
  240. package/dist/package.js +1 -1
  241. package/dist/pagination/Pagination.js +2 -2
  242. package/dist/pagination/style/index.d.ts +5 -1
  243. package/dist/pagination/useShowSizeChanger.d.ts +3 -0
  244. package/dist/pagination/useShowSizeChanger.js +1 -1
  245. package/dist/popconfirm/index.js +5 -5
  246. package/dist/popconfirm/style/index.d.ts +5 -1
  247. package/dist/popconfirm/style/index.js +1 -1
  248. package/dist/popover/index.js +5 -4
  249. package/dist/popover/style/index.d.ts +5 -1
  250. package/dist/popover/style/index.js +2 -2
  251. package/dist/progress/Circle.js +0 -8
  252. package/dist/progress/Line.js +1 -9
  253. package/dist/progress/Steps.js +0 -8
  254. package/dist/progress/progress.js +2 -14
  255. package/dist/progress/style/index.d.ts +5 -1
  256. package/dist/qrcode/index.js +4 -25
  257. package/dist/qrcode/interface.d.ts +1 -1
  258. package/dist/qrcode/style/index.d.ts +5 -1
  259. package/dist/radio/group.js +40 -7
  260. package/dist/radio/index.d.ts +2 -2
  261. package/dist/radio/interface.d.ts +19 -1
  262. package/dist/radio/radio.js +5 -3
  263. package/dist/radio/style/index.d.ts +5 -1
  264. package/dist/rate/style/index.d.ts +5 -1
  265. package/dist/result/index.js +3 -3
  266. package/dist/result/noFound.js +120 -140
  267. package/dist/result/serverError.js +132 -147
  268. package/dist/result/style/index.d.ts +5 -1
  269. package/dist/result/unauthorized.js +115 -129
  270. package/dist/segmented/index.js +1 -1
  271. package/dist/segmented/style/index.d.ts +5 -1
  272. package/dist/select/index.js +12 -5
  273. package/dist/select/style/dropdown.js +1 -1
  274. package/dist/select/style/index.d.ts +5 -1
  275. package/dist/select/style/index.js +2 -2
  276. package/dist/select/style/select-input-multiple.js +1 -1
  277. package/dist/select/usePopupRender.js +4 -1
  278. package/dist/skeleton/style/index.d.ts +5 -1
  279. package/dist/slider/index.d.ts +0 -3
  280. package/dist/slider/index.js +2 -2
  281. package/dist/slider/style/index.d.ts +5 -1
  282. package/dist/space/Compact.d.ts +1 -1
  283. package/dist/space/style/addon.d.ts +5 -1
  284. package/dist/space/style/compact.d.ts +5 -1
  285. package/dist/space/style/index.d.ts +5 -1
  286. package/dist/spin/style/index.d.ts +5 -1
  287. package/dist/splitter/SplitBar.js +9 -3
  288. package/dist/splitter/interface.d.ts +5 -1
  289. package/dist/splitter/style/index.d.ts +5 -1
  290. package/dist/statistic/style/index.d.ts +5 -1
  291. package/dist/steps/style/index.d.ts +5 -1
  292. package/dist/steps/style/index.js +1 -1
  293. package/dist/steps/style/inline.js +1 -1
  294. package/dist/style/motion/collapse.js +4 -10
  295. package/dist/switch/style/index.d.ts +5 -1
  296. package/dist/table/ExpandIcon.d.ts +9 -4
  297. package/dist/table/ExpandIcon.js +42 -20
  298. package/dist/table/InternalTable.js +72 -62
  299. package/dist/table/hooks/useLazyKVMap.js +1 -1
  300. package/dist/table/hooks/useSelection.js +73 -15
  301. package/dist/table/interface.d.ts +8 -0
  302. package/dist/table/style/index.d.ts +5 -1
  303. package/dist/table/style/index.js +1 -1
  304. package/dist/table/style/selection.js +1 -1
  305. package/dist/table/style/sorter.js +2 -2
  306. package/dist/table/util.d.ts +1 -1
  307. package/dist/tabs/index.js +9 -2
  308. package/dist/tabs/style/index.d.ts +5 -1
  309. package/dist/tabs/style/index.js +1 -1
  310. package/dist/tag/CheckableTagGroup.d.ts +2 -2
  311. package/dist/tag/hooks/useColor.d.ts +1 -1
  312. package/dist/tag/style/index.d.ts +5 -1
  313. package/dist/theme/context.js +2 -1
  314. package/dist/theme/useToken.d.ts +6 -2
  315. package/dist/theme/useToken.js +46 -14
  316. package/dist/theme/util/genStyleUtils.d.ts +13 -3
  317. package/dist/theme/util/genStyleUtils.js +42 -28
  318. package/dist/time-picker/index.js +34 -0
  319. package/dist/timeline/Timeline.js +1 -1
  320. package/dist/timeline/style/index.d.ts +5 -1
  321. package/dist/timeline/useItems.d.ts +2 -2
  322. package/dist/timeline/useItems.js +1 -1
  323. package/dist/tooltip/index.js +1 -1
  324. package/dist/tooltip/style/index.d.ts +2 -2
  325. package/dist/tooltip/style/index.js +1 -1
  326. package/dist/tour/panelRender.js +3 -2
  327. package/dist/tour/style/index.d.ts +5 -1
  328. package/dist/transfer/Section.js +2 -1
  329. package/dist/transfer/Transfer.js +3 -1
  330. package/dist/transfer/style/index.d.ts +5 -1
  331. package/dist/tree/DirectoryTree.js +1 -1
  332. package/dist/tree/style/index.d.ts +4 -1
  333. package/dist/tree/style/index.js +1 -1
  334. package/dist/tree-select/index.js +15 -9
  335. package/dist/tree-select/style/index.d.ts +2 -2
  336. package/dist/typography/Base/index.js +23 -2
  337. package/dist/typography/Link.js +5 -0
  338. package/dist/typography/Paragraph.js +5 -0
  339. package/dist/typography/Text.js +5 -0
  340. package/dist/typography/Title.js +5 -0
  341. package/dist/typography/hooks/useMergedConfig.js +1 -1
  342. package/dist/typography/interface.d.ts +8 -1
  343. package/dist/typography/style/index.d.ts +5 -1
  344. package/dist/typography/style/index.js +2 -1
  345. package/dist/typography/style/mixins.d.ts +2 -1
  346. package/dist/typography/style/mixins.js +26 -3
  347. package/dist/upload/Upload.d.ts +1 -0
  348. package/dist/upload/Upload.js +10 -3
  349. package/dist/upload/UploadList/ListItem.js +8 -3
  350. package/dist/upload/interface.d.ts +1 -0
  351. package/dist/upload/style/index.d.ts +5 -1
  352. package/dist/version/token-meta.json +1 -1
  353. package/dist/version/token.json +1 -1
  354. package/dist/watermark/index.js +1 -1
  355. package/global.d.ts +5 -0
  356. package/package.json +17 -17
  357. package/web-tags.json +5053 -3004
  358. package/web-types.json +13207 -7299
  359. package/dist/_util/getAllowClear.d.ts +0 -6
  360. package/dist/_util/getAllowClear.js +0 -11
@@ -1,3 +1,4 @@
1
+ import { NoFormStyle } from "../form/context.js";
1
2
  import { NoCompactStyle } from "../space/Compact.js";
2
3
  import { createVNode, defineComponent, isVNode } from "vue";
3
4
  import { filterEmpty } from "@v-c/util/dist/props-util";
@@ -11,12 +12,20 @@ const ContextIsolator = /* @__PURE__ */ defineComponent((props, { slots }) => {
11
12
  const children = filterEmpty(slots?.default?.());
12
13
  if (children.length === 0) return null;
13
14
  let result = children;
14
- if (form) {}
15
- if (space) {
15
+ if (form) {
16
16
  const _result = function() {
17
17
  return result;
18
18
  }();
19
- result = createVNode(NoCompactStyle, null, _isSlot(result) ? result : { default: () => [_result] });
19
+ result = createVNode(NoFormStyle, {
20
+ "override": true,
21
+ "status": true
22
+ }, _isSlot(result) ? result : { default: () => [_result] });
23
+ }
24
+ if (space) {
25
+ const _result2 = function() {
26
+ return result;
27
+ }();
28
+ result = createVNode(NoCompactStyle, null, _isSlot(result) ? result : { default: () => [_result2] });
20
29
  }
21
30
  return result;
22
31
  };
@@ -82,21 +82,24 @@ function genPurePanel(Component, alignPropName, postProps, defaultPrefixCls, get
82
82
  "style": mergedStyle
83
83
  }, [createVNode(Component, mergeProps(attrs, mergedProps), slots)]);
84
84
  };
85
- }, { props: {
86
- prefixCls: {
87
- type: String,
88
- required: false
89
- },
90
- style: {
91
- type: Object,
92
- required: false
85
+ }, {
86
+ props: {
87
+ prefixCls: {
88
+ type: String,
89
+ required: false
90
+ },
91
+ style: {
92
+ type: Object,
93
+ required: false
94
+ },
95
+ open: {
96
+ type: Boolean,
97
+ required: false,
98
+ default: void 0
99
+ }
93
100
  },
94
- open: {
95
- type: Boolean,
96
- required: false,
97
- default: void 0
98
- }
99
- } }));
101
+ inheritAttrs: false
102
+ }));
100
103
  }
101
104
  //#endregion
102
105
  export { genPurePanel as default, withPureRenderTheme };
@@ -0,0 +1,13 @@
1
+ //#region src/_util/fallbackProp.d.ts
2
+ /**
3
+ * Search for the first non-undefined value in the arguments and return it.
4
+ *
5
+ * ```js
6
+ * const mergedIcon = fallbackProp(propIcon, contextIcon, defaultIcon);
7
+ * ```
8
+ *
9
+ * Note: it is different from `??` operator which skips null
10
+ */
11
+ declare function fallbackProp<T>(...args: T[]): Exclude<T, undefined> | undefined;
12
+ //#endregion
13
+ export { fallbackProp as default };
@@ -0,0 +1,15 @@
1
+ //#region src/_util/fallbackProp.ts
2
+ /**
3
+ * Search for the first non-undefined value in the arguments and return it.
4
+ *
5
+ * ```js
6
+ * const mergedIcon = fallbackProp(propIcon, contextIcon, defaultIcon);
7
+ * ```
8
+ *
9
+ * Note: it is different from `??` operator which skips null
10
+ */
11
+ function fallbackProp(...args) {
12
+ return args.find((arg) => arg !== void 0);
13
+ }
14
+ //#endregion
15
+ export { fallbackProp as default };
@@ -0,0 +1,35 @@
1
+ //#region src/_util/hooks/useAllowClear.d.ts
2
+ interface AllowClearConfig {
3
+ /** Custom clear icon */
4
+ clearIcon?: any;
5
+ /** Disable the clear button */
6
+ disabled?: boolean;
7
+ /** Tab order of the clear button. `-1` excludes it from Tab navigation */
8
+ tabIndex?: number;
9
+ /** Accessible name of the clear button */
10
+ label?: string;
11
+ }
12
+ type AllowClear = boolean | AllowClearConfig;
13
+ /** The hook never returns plain `true`: a truthy allowClear is normalized to the object form. */
14
+ type MergedAllowClear = AllowClearConfig | false;
15
+ interface UseAllowClearOptions {
16
+ allowClear?: AllowClear;
17
+ clearIcon?: any;
18
+ contextAllowClear?: AllowClear;
19
+ contextClearIcon?: any;
20
+ defaultAllowClear?: boolean;
21
+ defaultLabel?: string;
22
+ }
23
+ /**
24
+ * Getter for the localized clear button label (`locale.global.clear`).
25
+ * Reads the locale context lazily so callers can use it inside their own `computed` without extra reactive objects.
26
+ */
27
+ declare function useAllowClearLabel(): () => string | undefined;
28
+ /**
29
+ * Merge component- and ConfigProvider-level `allowClear` / `clearIcon`.
30
+ * Each field is resolved on its own (priority: props → context → default), so `allowClear: true`
31
+ * inherits the global config while `disabled: false` / `tabIndex: 0` / `label: ''` still override it.
32
+ */
33
+ declare function useAllowClear({ allowClear, clearIcon, contextAllowClear, contextClearIcon, defaultAllowClear, defaultLabel }: UseAllowClearOptions): MergedAllowClear;
34
+ //#endregion
35
+ export { AllowClear, AllowClearConfig, MergedAllowClear, UseAllowClearOptions, useAllowClear as default, useAllowClearLabel };
@@ -0,0 +1,34 @@
1
+ import { useLocaleContext } from "../../locale/index.js";
2
+ import fallbackProp from "../fallbackProp.js";
3
+ import { isPlainObject } from "../is.js";
4
+ import localeValues from "../../locale/en_US.js";
5
+ import { createVNode } from "vue";
6
+ import { CloseCircleFilled } from "@antdv-next/icons";
7
+ //#region src/_util/hooks/useAllowClear.tsx
8
+ /** The hook never returns plain `true`: a truthy allowClear is normalized to the object form. */
9
+ /**
10
+ * Getter for the localized clear button label (`locale.global.clear`).
11
+ * Reads the locale context lazily so callers can use it inside their own `computed` without extra reactive objects.
12
+ */
13
+ function useAllowClearLabel() {
14
+ const { locale } = useLocaleContext();
15
+ return () => locale.value?.global?.clear ?? localeValues.global?.clear;
16
+ }
17
+ /**
18
+ * Merge component- and ConfigProvider-level `allowClear` / `clearIcon`.
19
+ * Each field is resolved on its own (priority: props → context → default), so `allowClear: true`
20
+ * inherits the global config while `disabled: false` / `tabIndex: 0` / `label: ''` still override it.
21
+ */
22
+ function useAllowClear({ allowClear, clearIcon, contextAllowClear, contextClearIcon, defaultAllowClear, defaultLabel }) {
23
+ if (!(allowClear ?? contextAllowClear ?? defaultAllowClear)) return false;
24
+ const config = isPlainObject(allowClear) ? allowClear : void 0;
25
+ const contextConfig = isPlainObject(contextAllowClear) ? contextAllowClear : void 0;
26
+ return {
27
+ clearIcon: fallbackProp(config?.clearIcon, clearIcon, contextConfig?.clearIcon, contextClearIcon, createVNode(CloseCircleFilled, null, null)),
28
+ disabled: config?.disabled ?? contextConfig?.disabled,
29
+ tabIndex: config?.tabIndex ?? contextConfig?.tabIndex,
30
+ label: config?.label ?? contextConfig?.label ?? defaultLabel
31
+ };
32
+ }
33
+ //#endregion
34
+ export { useAllowClear as default, useAllowClearLabel };
@@ -1,9 +1,9 @@
1
1
  import { getSlotPropsFnRun } from "../tools.js";
2
- import isNonNullable from "../isNonNullable.js";
3
2
  import localeValues from "../../locale/en_US.js";
4
3
  import useLocale from "../../locale/useLocale.js";
5
4
  import { getVNode } from "../vueNode.js";
6
5
  import mergeProps$1 from "../extendsObject.js";
6
+ import isNonNullable from "../isNonNullable.js";
7
7
  import { computed, createVNode, isVNode, mergeProps, ref, unref } from "vue";
8
8
  import { filterEmpty } from "@v-c/util/dist/props-util";
9
9
  import { CloseOutlined } from "@antdv-next/icons";
@@ -62,11 +62,12 @@ function resolveStyleOrClass(value, info) {
62
62
  * @descZH 合并来自多个来源的 classNames 和 styles,当提供了 `schema` 时,必须提供嵌套的对象结构。
63
63
  */
64
64
  function useMergeSemantic(classNamesList, stylesList, info, schema) {
65
+ const resolveLazy = (value) => typeof value === "function" ? value(info.value) : value;
65
66
  const resolvedClassNamesList = computed(() => {
66
- return classNamesList.value.map((classNames) => classNames ? resolveStyleOrClass(classNames, info.value) : void 0);
67
+ return classNamesList.value.map((classNames) => classNames ? resolveLazy(classNames) : void 0);
67
68
  });
68
69
  const resolvedStylesList = computed(() => {
69
- return stylesList.value.map((styles) => styles ? resolveStyleOrClass(styles, info.value) : void 0);
70
+ return stylesList.value.map((styles) => styles ? resolveLazy(styles) : void 0);
70
71
  });
71
72
  const mergedClassNames = computed(() => useSemanticClassNames(schema?.value, ...resolvedClassNamesList.value));
72
73
  const mergedStyles = computed(() => useSemanticStyles(...resolvedStylesList.value));
@@ -0,0 +1,13 @@
1
+ //#region src/_util/omitUndefined.d.ts
2
+ /**
3
+ * Copy `obj` without the keys whose value is `undefined`.
4
+ *
5
+ * Vue materialises every declared prop on `props` (unset ones as `undefined`),
6
+ * so spreading `props` into a child forwards dozens of empty keys that the
7
+ * child then has to normalise in `initProps` / `setFullProps` on every mount.
8
+ * Boolean props in this code base default to `undefined` rather than `false`,
9
+ * so leaving an unset key out is equivalent to passing it as `undefined`.
10
+ */
11
+ declare function omitUndefined<T extends Record<string, any>>(obj: T, omitKeys?: readonly string[]): Partial<T>;
12
+ //#endregion
13
+ export { omitUndefined };
@@ -0,0 +1,20 @@
1
+ //#region src/_util/omitUndefined.ts
2
+ /**
3
+ * Copy `obj` without the keys whose value is `undefined`.
4
+ *
5
+ * Vue materialises every declared prop on `props` (unset ones as `undefined`),
6
+ * so spreading `props` into a child forwards dozens of empty keys that the
7
+ * child then has to normalise in `initProps` / `setFullProps` on every mount.
8
+ * Boolean props in this code base default to `undefined` rather than `false`,
9
+ * so leaving an unset key out is equivalent to passing it as `undefined`.
10
+ */
11
+ function omitUndefined(obj, omitKeys = []) {
12
+ const result = {};
13
+ for (const key in obj) {
14
+ const value = obj[key];
15
+ if (value !== void 0 && !omitKeys.includes(key)) result[key] = value;
16
+ }
17
+ return result;
18
+ }
19
+ //#endregion
20
+ export { omitUndefined };
@@ -3,6 +3,8 @@ import { classNames } from "@v-c/util";
3
3
  //#region src/_util/tools.d.ts
4
4
  declare function getSlotPropFn(slots: any, props: any, key: string): any;
5
5
  declare function getSlotPropsFnRun(slots: any, props: any, key: string, isNull?: boolean, params?: any): any;
6
+ /** Resolve a slot/prop render prop: slot first, empty slot (undefined / []) falls back to prop; explicit null is kept; function props are invoked, never leaked. */
7
+ declare function getSlotPropsFnRunWithFallback(slots: any, props: any, key: string, params?: any): any;
6
8
  declare function toPropsRefs<T extends Record<string, any>, K extends keyof T>(obj: T, ...args: K[]): { [key in K]-?: Ref<T[key]>; };
7
9
  /**
8
10
  * 返回一个「稳定引用」的事件转发器,调用时实时读取组件当前 vnode 上的监听器。
@@ -19,4 +21,4 @@ declare function toPropsRefs<T extends Record<string, any>, K extends keyof T>(o
19
21
  declare function useLiveListener<Args extends any[] = any[], R = any>(name: string): (...args: Args) => R | undefined;
20
22
  declare const clsx: typeof classNames;
21
23
  //#endregion
22
- export { clsx, getSlotPropFn, getSlotPropsFnRun, toPropsRefs, useLiveListener };
24
+ export { clsx, getSlotPropFn, getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs, useLiveListener };
@@ -1,3 +1,4 @@
1
+ import fallbackProp from "./fallbackProp.js";
1
2
  import { getCurrentInstance, toHandlerKey, toRef } from "vue";
2
3
  import { classNames } from "@v-c/util";
3
4
  import { filterEmpty } from "@v-c/util/dist/props-util";
@@ -22,6 +23,10 @@ function getSlotPropsFnRun(slots, props, key, isNull = true, params) {
22
23
  }
23
24
  return fn;
24
25
  }
26
+ /** Resolve a slot/prop render prop: slot first, empty slot (undefined / []) falls back to prop; explicit null is kept; function props are invoked, never leaked. */
27
+ function getSlotPropsFnRunWithFallback(slots, props, key, params) {
28
+ return fallbackProp(getSlotPropsFnRun(slots, {}, key, false, params), getSlotPropsFnRun({}, props, key, false, params));
29
+ }
25
30
  function toPropsRefs(obj, ...args) {
26
31
  const _res = {};
27
32
  args.forEach((key) => {
@@ -58,4 +63,4 @@ function useLiveListener(name) {
58
63
  }
59
64
  const clsx = classNames;
60
65
  //#endregion
61
- export { clsx, getSlotPropFn, getSlotPropsFnRun, toPropsRefs, useLiveListener };
66
+ export { clsx, getSlotPropFn, getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs, useLiveListener };
@@ -1,4 +1,5 @@
1
1
  import { useConfig } from "../../config-provider/context.js";
2
+ import { useStyleToken } from "../../theme/util/genStyleUtils.js";
2
3
  import style_default from "./style.js";
3
4
  import useWave from "./useWave.js";
4
5
  import { cloneVNode, computed, defineComponent, isVNode, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
@@ -26,9 +27,10 @@ var wave_default = /* @__PURE__ */ defineComponent((props, { slots }) => {
26
27
  const configCtx = useConfig();
27
28
  const containerRef = shallowRef(null);
28
29
  const prefixCls = computed(() => configCtx.value.getPrefixCls("wave"));
29
- const hashId = style_default(prefixCls);
30
+ const tokenResult = useStyleToken();
31
+ const hashId = style_default(prefixCls, void 0, tokenResult);
30
32
  const colorSource = computed(() => props.colorSource);
31
- const showWave = useWave(containerRef, computed(() => classNames(prefixCls.value, hashId.value)), computed(() => props.component), colorSource);
33
+ const showWave = useWave(containerRef, computed(() => classNames(prefixCls.value, hashId.value)), computed(() => props.component), colorSource, tokenResult);
32
34
  const handleEvent = (event) => {
33
35
  const node = containerRef.value;
34
36
  if (!node) return;
@@ -1,8 +1,12 @@
1
+ import { SeedToken } from "../../theme/interface/seeds.js";
2
+ import { AliasToken } from "../../theme/interface/alias.js";
3
+ import { ComponentTokenMap } from "../../theme/interface/components.js";
1
4
  import { FullToken } from "../../theme/interface/cssinjs-utils.js";
5
+ import "../../theme/interface/index.js";
2
6
  import "../../theme/internal.js";
3
7
  //#region src/_util/wave/style.d.ts
4
8
  interface ComponentToken {}
5
9
  interface WaveToken extends FullToken<'Wave'> {}
6
- declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => import("vue").Ref<string, string>;
10
+ declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => import("vue").Ref<string, string>;
7
11
  //#endregion
8
12
  export { ComponentToken, WaveToken, _default as default };
@@ -1,7 +1,8 @@
1
+ import { StyleTokenResult } from "../../theme/util/genStyleUtils.js";
1
2
  import { ShowWave, WaveComponent } from "./interface.js";
2
3
  import { WaveProps } from "./index.js";
3
4
  import { Ref } from "vue";
4
5
  //#region src/_util/wave/useWave.d.ts
5
- declare function useWave(nodeRef: Ref<HTMLElement | null | undefined>, className: string | Ref<string>, component?: WaveComponent | Ref<WaveComponent | undefined>, colorSource?: Ref<WaveProps['colorSource']>): ShowWave;
6
+ declare function useWave(nodeRef: Ref<HTMLElement | null | undefined>, className: string | Ref<string>, component?: WaveComponent | Ref<WaveComponent | undefined>, colorSource?: Ref<WaveProps['colorSource']>, tokenResult?: StyleTokenResult): ShowWave;
6
7
  //#endregion
7
8
  export { useWave as default };
@@ -1,13 +1,14 @@
1
1
  import { useConfig } from "../../config-provider/context.js";
2
- import useToken from "../../theme/useToken.js";
2
+ import { useStyleToken } from "../../theme/util/genStyleUtils.js";
3
3
  import { TARGET_CLS } from "./interface.js";
4
4
  import showWaveEffect from "./WaveEffect.js";
5
5
  import { onBeforeUnmount, ref, unref } from "vue";
6
6
  import raf from "@v-c/util/dist/raf";
7
7
  //#region src/_util/wave/useWave.ts
8
- function useWave(nodeRef, className, component, colorSource) {
8
+ function useWave(nodeRef, className, component, colorSource, tokenResult = useStyleToken()) {
9
9
  const configCtx = useConfig();
10
- const [, token, hashId] = useToken();
10
+ const token = tokenResult.realToken;
11
+ const hashId = tokenResult.hashId;
11
12
  const showWave = (event) => {
12
13
  const node = nodeRef.value;
13
14
  if (!node) return;
@@ -1,4 +1,8 @@
1
+ import { SeedToken } from "../../theme/interface/seeds.js";
2
+ import { AliasToken } from "../../theme/interface/alias.js";
3
+ import { ComponentTokenMap } from "../../theme/interface/components.js";
1
4
  import { GetDefaultToken } from "../../theme/interface/cssinjs-utils.js";
5
+ import "../../theme/interface/index.js";
2
6
  import "../../theme/internal.js";
3
7
  //#region src/affix/style/index.d.ts
4
8
  interface ComponentToken {
@@ -9,6 +13,6 @@ interface ComponentToken {
9
13
  zIndexPopup: number;
10
14
  }
11
15
  declare const prepareComponentToken: GetDefaultToken<'Affix'>;
12
- declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
16
+ declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
13
17
  //#endregion
14
18
  export { ComponentToken, _default as default, prepareComponentToken };
@@ -27,6 +27,10 @@ interface AlertSemanticType {
27
27
  }
28
28
  type AlertClassNamesType = SemanticType<AlertProps, AlertSemanticType['classes']>;
29
29
  type AlertStylesType = SemanticType<AlertProps, AlertSemanticType['styles']>;
30
+ type AlertClosableType = boolean | (Exclude<ClosableType, boolean> & {
31
+ onClose?: (e?: MouseEvent) => void;
32
+ afterClose?: () => void;
33
+ });
30
34
  type AlertVariant = 'filled' | 'outlined';
31
35
  interface AlertProps extends ComponentBaseProps, AlertEmitsProps {
32
36
  /** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
@@ -38,7 +42,7 @@ interface AlertProps extends ComponentBaseProps, AlertEmitsProps {
38
42
  */
39
43
  variant?: AlertVariant;
40
44
  /** Whether Alert can be closed */
41
- closable?: ClosableType;
45
+ closable?: AlertClosableType;
42
46
  /** Content of Alert */
43
47
  title?: VueNode;
44
48
  /**
@@ -84,4 +88,4 @@ interface AlertEmitsProps {
84
88
  }
85
89
  declare const Alert: import("vue").DefineSetupFnComponent<AlertProps, AlertEmits, SlotsType<AlertSlots>, AlertProps, import("vue").PublicProps>;
86
90
  //#endregion
87
- export { AlertClassNamesType, AlertEmits, AlertEmitsProps, AlertProps, AlertSemanticType, AlertSlots, AlertStylesType, AlertVariant, Alert as default };
91
+ export { AlertClassNamesType, AlertClosableType, AlertEmits, AlertEmitsProps, AlertProps, AlertSemanticType, AlertSlots, AlertStylesType, AlertVariant, Alert as default };