antdv-next 1.0.0-beta.3 → 1.0.0-rc.1

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 (269) hide show
  1. package/dist/_util/PurePanel.mjs +4 -4
  2. package/dist/_util/hooks/useClosable.d.mts +0 -1
  3. package/dist/_util/hooks/useClosable.mjs +1 -1
  4. package/dist/_util/hooks/useMergeSemantic.d.mts +2 -3
  5. package/dist/_util/hooks/useMergeSemantic.mjs +9 -9
  6. package/dist/_util/tools.mjs +1 -1
  7. package/dist/_util/warning.d.mts +0 -1
  8. package/dist/affix/index.d.mts +3 -3
  9. package/dist/alert/Alert.d.mts +24 -7
  10. package/dist/alert/Alert.mjs +91 -28
  11. package/dist/anchor/Anchor.d.mts +18 -7
  12. package/dist/antd.css +1 -1
  13. package/dist/antd.js +101 -112
  14. package/dist/app/App.d.mts +2 -2
  15. package/dist/app/App.mjs +2 -2
  16. package/dist/auto-complete/index.d.mts +23 -11
  17. package/dist/auto-complete/index.mjs +1 -1
  18. package/dist/avatar/Avatar.d.mts +3 -3
  19. package/dist/avatar/AvatarGroup.d.mts +2 -2
  20. package/dist/avatar/style/index.mjs +2 -2
  21. package/dist/badge/Ribbon.d.mts +21 -5
  22. package/dist/badge/Ribbon.mjs +44 -23
  23. package/dist/badge/SingleNumber.mjs +2 -1
  24. package/dist/badge/index.d.mts +14 -7
  25. package/dist/badge/style/ribbon.mjs +1 -1
  26. package/dist/breadcrumb/Breadcrumb.d.mts +17 -6
  27. package/dist/breadcrumb/Breadcrumb.mjs +18 -3
  28. package/dist/breadcrumb/BreadcrumbItem.d.mts +1 -0
  29. package/dist/breadcrumb/BreadcrumbItem.mjs +29 -4
  30. package/dist/breadcrumb/style/index.mjs +5 -5
  31. package/dist/button/Button.d.mts +18 -10
  32. package/dist/button/buttonHelper.d.mts +0 -1
  33. package/dist/button/index.d.mts +1 -1
  34. package/dist/button/style/compact.mjs +28 -19
  35. package/dist/button/style/token.d.mts +0 -5
  36. package/dist/button/style/variant.mjs +27 -3
  37. package/dist/calendar/generateCalendar.d.mts +20 -7
  38. package/dist/calendar/generateCalendar.mjs +1 -1
  39. package/dist/calendar/index.d.mts +3 -3
  40. package/dist/card/Card.d.mts +23 -6
  41. package/dist/card/CardGrid.d.mts +2 -2
  42. package/dist/card/CardMeta.d.mts +20 -7
  43. package/dist/carousel/index.d.mts +3 -3
  44. package/dist/cascader/Panel.d.mts +3 -3
  45. package/dist/cascader/index.d.mts +31 -10
  46. package/dist/checkbox/Checkbox.d.mts +16 -7
  47. package/dist/checkbox/Checkbox.mjs +1 -1
  48. package/dist/checkbox/Group.d.mts +4 -3
  49. package/dist/checkbox/Group.mjs +11 -2
  50. package/dist/collapse/Collapse.d.mts +19 -6
  51. package/dist/collapse/Collapse.mjs +1 -1
  52. package/dist/color-picker/ColorPicker.d.mts +3 -3
  53. package/dist/color-picker/interface.d.mts +15 -7
  54. package/dist/color-picker/style/input.mjs +2 -0
  55. package/dist/components.d.mts +2 -3
  56. package/dist/config-provider/context.d.mts +58 -12
  57. package/dist/config-provider/context.mjs +3 -3
  58. package/dist/config-provider/define.d.mts +7 -1
  59. package/dist/config-provider/index.d.mts +3 -4
  60. package/dist/config-provider/index.mjs +82 -8
  61. package/dist/date-picker/generatePicker/index.d.mts +15 -15
  62. package/dist/date-picker/generatePicker/interface.d.mts +37 -10
  63. package/dist/date-picker/hooks/useMergedPickerSemantic.mjs +2 -2
  64. package/dist/date-picker/index.d.mts +25 -25
  65. package/dist/descriptions/Cell.mjs +5 -5
  66. package/dist/descriptions/DescriptionsContext.d.mts +13 -0
  67. package/dist/descriptions/Item.d.mts +3 -3
  68. package/dist/descriptions/hooks/useRow.mjs +7 -7
  69. package/dist/descriptions/index.d.mts +22 -7
  70. package/dist/divider/index.d.mts +15 -5
  71. package/dist/drawer/DrawerPanel.d.mts +28 -3
  72. package/dist/drawer/DrawerPanel.mjs +3 -3
  73. package/dist/drawer/index.d.mts +4 -4
  74. package/dist/drawer/index.mjs +4 -0
  75. package/dist/drawer/style/index.mjs +9 -2
  76. package/dist/dropdown/dropdown.d.mts +20 -7
  77. package/dist/empty/index.d.mts +18 -7
  78. package/dist/flex/index.d.mts +3 -3
  79. package/dist/float-button/BackTop.d.mts +3 -3
  80. package/dist/float-button/FloatButton.d.mts +6 -7
  81. package/dist/float-button/FloatButtonGroup.d.mts +25 -6
  82. package/dist/form/Form.d.mts +16 -7
  83. package/dist/form/FormItem/index.d.mts +3 -3
  84. package/dist/form/FormItem/index.mjs +1 -1
  85. package/dist/form/FormItemInput.d.mts +0 -1
  86. package/dist/grid/index.d.mts +2 -2
  87. package/dist/grid/row.d.mts +2 -2
  88. package/dist/image/PreviewGroup.d.mts +3 -5
  89. package/dist/image/index.d.mts +34 -14
  90. package/dist/index.d.mts +3 -4
  91. package/dist/input/Input.d.mts +17 -4
  92. package/dist/input/Input.mjs +2 -2
  93. package/dist/input/OTP/index.d.mts +13 -4
  94. package/dist/input/Password.mjs +3 -3
  95. package/dist/input/Search.d.mts +21 -9
  96. package/dist/input/TextArea.d.mts +16 -7
  97. package/dist/input/TextArea.mjs +2 -2
  98. package/dist/input/index.d.mts +11 -11
  99. package/dist/input/style/index.mjs +5 -2
  100. package/dist/input/style/variants.mjs +2 -1
  101. package/dist/input-number/index.d.mts +20 -7
  102. package/dist/layout/index.d.mts +6 -6
  103. package/dist/layout/layout.d.mts +2 -3
  104. package/dist/locale/index.d.mts +0 -1
  105. package/dist/masonry/Masonry.d.mts +14 -7
  106. package/dist/masonry/MasonryItem.mjs +2 -2
  107. package/dist/mentions/index.d.mts +18 -7
  108. package/dist/mentions/index.mjs +2 -2
  109. package/dist/mentions/style/index.mjs +2 -2
  110. package/dist/menu/MenuContext.d.mts +0 -1
  111. package/dist/menu/MenuDivider.d.mts +2 -2
  112. package/dist/menu/MenuItem.d.mts +3 -3
  113. package/dist/menu/MenuItem.mjs +4 -3
  114. package/dist/menu/SubMenu.d.mts +3 -3
  115. package/dist/menu/SubMenu.mjs +5 -0
  116. package/dist/menu/index.d.mts +5 -5
  117. package/dist/menu/menu.d.mts +42 -10
  118. package/dist/menu/menu.mjs +2 -2
  119. package/dist/menu/style/index.d.mts +1 -1
  120. package/dist/menu/style/vertical.mjs +1 -1
  121. package/dist/message/PurePanel.d.mts +5 -7
  122. package/dist/message/index.mjs +2 -2
  123. package/dist/message/interface.d.mts +20 -4
  124. package/dist/message/useMessage.d.mts +0 -1
  125. package/dist/modal/Modal.d.mts +3 -3
  126. package/dist/modal/confirm.mjs +8 -4
  127. package/dist/modal/interface.d.mts +22 -3
  128. package/dist/modal/style/index.mjs +11 -8
  129. package/dist/notification/PurePanel.d.mts +8 -8
  130. package/dist/notification/index.mjs +2 -2
  131. package/dist/notification/interface.d.mts +18 -5
  132. package/dist/notification/style/index.mjs +8 -8
  133. package/dist/notification/useNotification.d.mts +2 -3
  134. package/dist/package.d.mts +4 -0
  135. package/dist/package.mjs +1 -1
  136. package/dist/pagination/Pagination.d.mts +3 -3
  137. package/dist/pagination/Pagination.mjs +11 -10
  138. package/dist/pagination/interface.d.mts +14 -5
  139. package/dist/pagination/style/bordered.mjs +2 -2
  140. package/dist/pagination/style/index.d.mts +10 -5
  141. package/dist/pagination/style/index.mjs +52 -103
  142. package/dist/popconfirm/PurePanel.d.mts +5 -7
  143. package/dist/popconfirm/index.d.mts +8 -6
  144. package/dist/popconfirm/index.mjs +7 -3
  145. package/dist/popover/index.d.mts +16 -9
  146. package/dist/popover/index.mjs +8 -5
  147. package/dist/progress/Line.mjs +3 -3
  148. package/dist/progress/progress.d.mts +20 -7
  149. package/dist/qrcode/index.d.mts +3 -3
  150. package/dist/qrcode/index.mjs +2 -1
  151. package/dist/qrcode/interface.d.mts +11 -3
  152. package/dist/radio/group.mjs +3 -3
  153. package/dist/radio/index.d.mts +5 -5
  154. package/dist/radio/interface.d.mts +13 -3
  155. package/dist/radio/radio.d.mts +3 -3
  156. package/dist/radio/radio.mjs +1 -1
  157. package/dist/rate/index.d.mts +3 -3
  158. package/dist/result/index.d.mts +22 -7
  159. package/dist/result/index.mjs +11 -6
  160. package/dist/result/noFound.d.mts +2 -2
  161. package/dist/result/serverError.d.mts +2 -2
  162. package/dist/result/unauthorized.d.mts +2 -2
  163. package/dist/segmented/index.d.mts +18 -7
  164. package/dist/select/index.d.mts +48 -20
  165. package/dist/skeleton/Avatar.d.mts +2 -2
  166. package/dist/skeleton/Button.d.mts +2 -2
  167. package/dist/skeleton/Image.d.mts +2 -2
  168. package/dist/skeleton/Input.d.mts +2 -2
  169. package/dist/skeleton/Node.d.mts +3 -3
  170. package/dist/skeleton/Skeleton.d.mts +22 -7
  171. package/dist/slider/index.d.mts +19 -6
  172. package/dist/slider/index.mjs +4 -4
  173. package/dist/space/index.d.mts +18 -9
  174. package/dist/spin/Indicator/Progress.mjs +3 -3
  175. package/dist/spin/index.d.mts +19 -6
  176. package/dist/splitter/SplitBar.mjs +12 -12
  177. package/dist/splitter/Splitter.d.mts +3 -3
  178. package/dist/splitter/Splitter.mjs +1 -1
  179. package/dist/splitter/hooks/useItems.mjs +2 -2
  180. package/dist/splitter/hooks/useResizable.mjs +5 -5
  181. package/dist/splitter/hooks/useResize.mjs +2 -2
  182. package/dist/splitter/index.d.mts +2 -2
  183. package/dist/splitter/interface.d.mts +21 -7
  184. package/dist/splitter/style/index.mjs +2 -28
  185. package/dist/statistic/Statistic.d.mts +21 -6
  186. package/dist/statistic/Statistic.mjs +1 -1
  187. package/dist/statistic/Timer.d.mts +5 -5
  188. package/dist/statistic/index.d.mts +5 -5
  189. package/dist/steps/context.mjs +5 -2
  190. package/dist/steps/index.d.mts +31 -9
  191. package/dist/steps/index.mjs +3 -3
  192. package/dist/style/motion/fade.mjs +25 -0
  193. package/dist/switch/index.d.mts +14 -7
  194. package/dist/switch/index.mjs +2 -2
  195. package/dist/table/Column.d.mts +3 -3
  196. package/dist/table/ColumnGroup.d.mts +3 -3
  197. package/dist/table/InternalTable.d.mts +35 -13
  198. package/dist/table/InternalTable.mjs +12 -6
  199. package/dist/table/Table.d.mts +3 -3
  200. package/dist/table/TableMeasureRowContext.mjs +20 -0
  201. package/dist/table/hooks/useFilter/FilterDropdown.mjs +17 -12
  202. package/dist/table/hooks/useSelection.mjs +1 -1
  203. package/dist/table/interface.d.mts +1 -2
  204. package/dist/table/style/virtual.mjs +1 -1
  205. package/dist/tabs/TabPane.d.mts +3 -3
  206. package/dist/tabs/index.d.mts +27 -11
  207. package/dist/tabs/index.mjs +5 -5
  208. package/dist/tag/CheckableTag.d.mts +3 -3
  209. package/dist/tag/CheckableTagGroup.d.mts +3 -3
  210. package/dist/tag/index.d.mts +16 -7
  211. package/dist/tag/index.mjs +1 -1
  212. package/dist/tag/style/index.mjs +1 -1
  213. package/dist/theme/index.d.mts +1 -2
  214. package/dist/theme/interface/maps/index.d.mts +0 -1
  215. package/dist/theme/useToken.mjs +3 -3
  216. package/dist/theme/util/genStyleUtils.mjs +3 -2
  217. package/dist/time-picker/index.d.mts +38 -14
  218. package/dist/time-picker/index.mjs +1 -1
  219. package/dist/timeline/Timeline.d.mts +49 -14
  220. package/dist/timeline/Timeline.mjs +82 -11
  221. package/dist/timeline/index.d.mts +1 -2
  222. package/dist/timeline/style/horizontal.mjs +73 -0
  223. package/dist/timeline/style/index.d.mts +10 -5
  224. package/dist/timeline/style/index.mjs +93 -137
  225. package/dist/timeline/useItems.mjs +52 -0
  226. package/dist/tooltip/PurePanel.d.mts +2 -2
  227. package/dist/tooltip/UniqueProvider/index.d.mts +2 -2
  228. package/dist/tooltip/index.d.mts +17 -8
  229. package/dist/tooltip/index.mjs +11 -3
  230. package/dist/tooltip/style/index.d.mts +7 -1
  231. package/dist/tooltip/style/index.mjs +3 -2
  232. package/dist/tour/index.d.mts +3 -3
  233. package/dist/tour/index.mjs +1 -1
  234. package/dist/tour/interface.d.mts +29 -3
  235. package/dist/transfer/Actions.d.mts +2 -2
  236. package/dist/transfer/ListItem.mjs +4 -4
  237. package/dist/transfer/Section.d.mts +2 -2
  238. package/dist/transfer/Transfer.d.mts +3 -3
  239. package/dist/transfer/Transfer.mjs +4 -4
  240. package/dist/transfer/index.d.mts +1 -1
  241. package/dist/transfer/interface.d.mts +32 -7
  242. package/dist/transfer/search.d.mts +3 -3
  243. package/dist/tree/DirectoryTree.d.mts +3 -3
  244. package/dist/tree/Tree.d.mts +18 -7
  245. package/dist/tree/index.d.mts +0 -1
  246. package/dist/tree-select/index.d.mts +41 -12
  247. package/dist/tree-select/style/index.d.mts +1 -1
  248. package/dist/typography/Editable.mjs +4 -4
  249. package/dist/typography/Link.d.mts +3 -3
  250. package/dist/typography/Paragraph.d.mts +3 -3
  251. package/dist/typography/Text.d.mts +3 -3
  252. package/dist/typography/Title.d.mts +3 -3
  253. package/dist/typography/Typography.d.mts +3 -3
  254. package/dist/typography/Typography.mjs +2 -12
  255. package/dist/typography/index.d.mts +9 -10
  256. package/dist/typography/interface.d.mts +0 -2
  257. package/dist/typography/style/mixins.mjs +3 -3
  258. package/dist/upload/Dragger.d.mts +3 -3
  259. package/dist/upload/Upload.d.mts +3 -4
  260. package/dist/upload/index.d.mts +3 -3
  261. package/dist/upload/interface.d.mts +13 -4
  262. package/dist/watermark/index.d.mts +2 -2
  263. package/dist/watermark/index.mjs +3 -3
  264. package/package.json +45 -41
  265. package/web-tags.json +1918 -1873
  266. package/web-types.json +6815 -7198
  267. package/dist/timeline/TimelineItem.d.mts +0 -20
  268. package/dist/timeline/TimelineItem.mjs +0 -115
  269. package/dist/timeline/TimelineItemList.mjs +0 -158
@@ -3,21 +3,21 @@ import config_provider_default from "../config-provider/index.mjs";
3
3
  import { createVNode, defineComponent, mergeProps, shallowRef, useAttrs, useSlots, watch } from "vue";
4
4
 
5
5
  //#region src/_util/PurePanel.tsx
6
- function withPureRenderTheme(Component$1) {
6
+ function withPureRenderTheme(Component) {
7
7
  return (props) => {
8
8
  const slots = useSlots();
9
9
  const attrs = useAttrs();
10
10
  return createVNode(config_provider_default, { "theme": { token: {
11
11
  motion: false,
12
12
  zIndexPopupBase: 0
13
- } } }, { default: () => [createVNode(Component$1, {
13
+ } } }, { default: () => [createVNode(Component, {
14
14
  ...props,
15
15
  ...attrs
16
16
  }, slots)] });
17
17
  };
18
18
  }
19
19
  /* istanbul ignore next */
20
- function genPurePanel(Component$1, alignPropName, postProps, defaultPrefixCls, getDropdownCls) {
20
+ function genPurePanel(Component, alignPropName, postProps, defaultPrefixCls, getDropdownCls) {
21
21
  return withPureRenderTheme(/* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
22
22
  const holderRef = shallowRef();
23
23
  const popupHeight = shallowRef(0);
@@ -80,7 +80,7 @@ function genPurePanel(Component$1, alignPropName, postProps, defaultPrefixCls, g
80
80
  return createVNode("div", {
81
81
  "ref": holderRef,
82
82
  "style": mergedStyle
83
- }, [createVNode(Component$1, mergeProps(attrs, mergedProps), slots)]);
83
+ }, [createVNode(Component, mergeProps(attrs, mergedProps), slots)]);
84
84
  };
85
85
  }, { props: {
86
86
  prefixCls: {
@@ -2,7 +2,6 @@ import { VueNode } from "../type.mjs";
2
2
  import { AriaAttributes, Ref, VNodeChild } from "vue";
3
3
 
4
4
  //#region src/_util/hooks/useClosable.d.ts
5
-
6
5
  type ClosableType = boolean | ({
7
6
  closeIcon?: VueNode;
8
7
  disabled?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { getSlotPropsFnRun } from "../tools.mjs";
2
- import { getVNode } from "../vueNode.mjs";
3
2
  import en_US_default from "../../locale/en_US.mjs";
4
3
  import useLocale_default from "../../locale/useLocale.mjs";
4
+ import { getVNode } from "../vueNode.mjs";
5
5
  import extendsObject_default from "../extendsObject.mjs";
6
6
  import isNonNullable_default from "../isNonNullable.mjs";
7
7
  import { computed, createVNode, isVNode, mergeProps, ref, unref } from "vue";
@@ -2,13 +2,12 @@ import { AnyObject, EmptyObject } from "../type.mjs";
2
2
  import { CSSProperties, Ref } from "vue";
3
3
 
4
4
  //#region src/_util/hooks/useMergeSemantic.d.ts
5
-
6
5
  type SemanticClassNames<Name extends string> = Partial<Record<Name, string>>;
7
6
  type SemanticStyles<Name extends string> = Partial<Record<Name, CSSProperties>>;
8
7
  type Resolvable<T, P extends AnyObject> = T | ((info: {
9
8
  props: P;
10
9
  }) => T);
11
- type SemanticClassNamesType<Props extends AnyObject, SemanticName extends string, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticClassNames<SemanticName>>, Props> & NestedStructure;
12
- type SemanticStylesType<Props extends AnyObject, SemanticName extends string, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticStyles<SemanticName>>, Props> & NestedStructure;
10
+ type SemanticClassNamesType<Props extends AnyObject, SemanticClassNames extends { [K in keyof SemanticClassNames]?: string }, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticClassNames>, Props> & NestedStructure;
11
+ type SemanticStylesType<Props extends AnyObject, SemanticStyles extends { [K in keyof SemanticStyles]?: CSSProperties }, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticStyles>, Props> & NestedStructure;
13
12
  //#endregion
14
13
  export { Resolvable, SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticStylesType };
@@ -1,11 +1,11 @@
1
1
  import { computed, unref } from "vue";
2
- import { classNames } from "@v-c/util";
2
+ import { classNames as classNames$1 } from "@v-c/util";
3
3
  import { omit } from "es-toolkit";
4
4
 
5
5
  //#region src/_util/hooks/useMergeSemantic.ts
6
- function mergeClassNames(schema, ...classNames$1) {
6
+ function mergeClassNames(schema, ...classNames) {
7
7
  const mergedSchema = schema || {};
8
- return classNames$1.filter(Boolean).reduce((acc, cur) => {
8
+ return classNames.filter(Boolean).reduce((acc, cur) => {
9
9
  Object.keys(cur || {}).forEach((key) => {
10
10
  const keySchema = mergedSchema[key];
11
11
  const curVal = cur[key];
@@ -14,16 +14,16 @@ function mergeClassNames(schema, ...classNames$1) {
14
14
  const { _default: defaultField } = keySchema;
15
15
  if (defaultField) {
16
16
  acc[key] = acc[key] || {};
17
- acc[key][defaultField] = classNames(acc[key][defaultField], curVal);
17
+ acc[key][defaultField] = classNames$1(acc[key][defaultField], curVal);
18
18
  }
19
19
  }
20
- else acc[key] = classNames(acc[key], curVal);
20
+ else acc[key] = classNames$1(acc[key], curVal);
21
21
  });
22
22
  return acc;
23
23
  }, {});
24
24
  }
25
- function useSemanticClassNames(schema, ...classNames$1) {
26
- return mergeClassNames(schema, ...classNames$1);
25
+ function useSemanticClassNames(schema, ...classNames) {
26
+ return mergeClassNames(schema, ...classNames);
27
27
  }
28
28
  function mergeStyles(...styles) {
29
29
  return styles.filter(Boolean).reduce((acc, cur = {}) => {
@@ -63,7 +63,7 @@ function resolveStyleOrClass(value, info) {
63
63
  */
64
64
  function useMergeSemantic(classNamesList, stylesList, info, schema) {
65
65
  const resolvedClassNamesList = computed(() => {
66
- return classNamesList.value.map((classNames$1) => classNames$1 ? resolveStyleOrClass(classNames$1, info.value) : void 0);
66
+ return classNamesList.value.map((classNames) => classNames ? resolveStyleOrClass(classNames, info.value) : void 0);
67
67
  });
68
68
  const resolvedStylesList = computed(() => {
69
69
  return stylesList.value.map((styles) => styles ? resolveStyleOrClass(styles, info.value) : void 0);
@@ -77,7 +77,7 @@ function useMergeSemantic(classNamesList, stylesList, info, schema) {
77
77
  return [computed(() => _merged.value[0]), computed(() => _merged.value[1])];
78
78
  }
79
79
  function useMergeSemanticNoRef(classNamesList, stylesList, info, schema) {
80
- const resolvedClassNamesList = classNamesList.map((classNames$1) => classNames$1 ? resolveStyleOrClass(classNames$1, info) : void 0);
80
+ const resolvedClassNamesList = classNamesList.map((classNames) => classNames ? resolveStyleOrClass(classNames, info) : void 0);
81
81
  const resolvedStylesList = stylesList.map((styles) => styles ? resolveStyleOrClass(styles, info) : void 0);
82
82
  const mergedClassNames = useSemanticClassNames(schema, ...resolvedClassNamesList);
83
83
  const mergedStyles = useSemanticStyles(...resolvedStylesList);
@@ -14,7 +14,7 @@ function getSlotPropsFnRun(slots, props, key, isNull = true, params) {
14
14
  let node = fn?.(params);
15
15
  if (!Array.isArray(node)) node = [node];
16
16
  if (node && node.length === 1 && node[0] === null) return null;
17
- const nodes = filterEmpty(node).filter((node$1) => node$1 !== void 0 && node$1 !== null);
17
+ const nodes = filterEmpty(node).filter((node) => node !== void 0 && node !== null);
18
18
  if (nodes.length) {
19
19
  if (nodes.length === 1) return nodes[0];
20
20
  return nodes;
@@ -1,7 +1,6 @@
1
1
  import { Ref } from "vue";
2
2
 
3
3
  //#region src/_util/warning.d.ts
4
-
5
4
  interface WarningContextProps {
6
5
  /**
7
6
  * @descCN 设置警告等级,设置 `false` 时会将废弃相关信息聚合为单条信息。
@@ -1,5 +1,5 @@
1
1
  import { ComponentBaseProps } from "../config-provider/context.mjs";
2
- import * as vue65 from "vue";
2
+ import * as vue63 from "vue";
3
3
 
4
4
  //#region src/affix/index.d.ts
5
5
  interface AffixProps extends ComponentBaseProps {
@@ -17,10 +17,10 @@ interface AffixEmits {
17
17
  type InternalAffixProps = AffixProps & {
18
18
  onTestUpdatePosition?: any;
19
19
  };
20
- declare const Affix: vue65.DefineSetupFnComponent<InternalAffixProps, AffixEmits, {}, AffixProps & {
20
+ declare const Affix: vue63.DefineSetupFnComponent<InternalAffixProps, AffixEmits, {}, AffixProps & {
21
21
  onTestUpdatePosition?: any;
22
22
  } & {
23
23
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
24
- }, vue65.PublicProps>;
24
+ }, vue63.PublicProps>;
25
25
  //#endregion
26
26
  export { Affix, AffixProps };
@@ -3,13 +3,30 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
3
3
  import "../_util/hooks/index.mjs";
4
4
  import { ClosableType } from "../_util/hooks/useClosable.mjs";
5
5
  import { ComponentBaseProps } from "../config-provider/context.mjs";
6
- import * as vue222 from "vue";
7
- import { SlotsType } from "vue";
6
+ import * as vue293 from "vue";
7
+ import { CSSProperties, SlotsType } from "vue";
8
8
 
9
9
  //#region src/alert/Alert.d.ts
10
- type AlertSemanticName = 'root' | 'icon' | 'section' | 'title' | 'description' | 'actions';
11
- type AlertClassNamesType = SemanticClassNamesType<AlertProps, AlertSemanticName>;
12
- type AlertStylesType = SemanticStylesType<AlertProps, AlertSemanticName>;
10
+ interface AlertSemanticClassNames {
11
+ root?: string;
12
+ icon?: string;
13
+ section?: string;
14
+ title?: string;
15
+ description?: string;
16
+ actions?: string;
17
+ close?: string;
18
+ }
19
+ interface AlertSemanticStyles {
20
+ root?: CSSProperties;
21
+ icon?: CSSProperties;
22
+ section?: CSSProperties;
23
+ title?: CSSProperties;
24
+ description?: CSSProperties;
25
+ actions?: CSSProperties;
26
+ close?: CSSProperties;
27
+ }
28
+ type AlertClassNamesType = SemanticClassNamesType<AlertProps, AlertSemanticClassNames>;
29
+ type AlertStylesType = SemanticStylesType<AlertProps, AlertSemanticStyles>;
13
30
  interface AlertProps extends ComponentBaseProps {
14
31
  /** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
15
32
  type?: 'success' | 'info' | 'warning' | 'error';
@@ -53,8 +70,8 @@ interface AlertEmits {
53
70
  click: (e: any) => any;
54
71
  [key: string]: (e: any) => any;
55
72
  }
56
- declare const Alert: vue222.DefineSetupFnComponent<AlertProps, AlertEmits, SlotsType<AlertSlots>, AlertProps & {
73
+ declare const Alert: vue293.DefineSetupFnComponent<AlertProps, AlertEmits, SlotsType<AlertSlots>, AlertProps & {
57
74
  [x: `on${Capitalize<string>}`]: ((e: any) => any) | undefined;
58
- }, vue222.PublicProps>;
75
+ }, vue293.PublicProps>;
59
76
  //#endregion
60
77
  export { Alert, AlertEmits, AlertProps, AlertSlots };
@@ -2,34 +2,33 @@ import { useComponentBaseConfig } from "../config-provider/context.mjs";
2
2
  import { pureAttrs, useMergeSemanticNoRef } from "../_util/hooks/useMergeSemantic.mjs";
3
3
  import "../_util/hooks/index.mjs";
4
4
  import { getSlotPropFn, getSlotPropsFnRun, toPropsRefs } from "../_util/tools.mjs";
5
- import { replaceElement } from "../_util/vueNode.mjs";
6
5
  import style_default from "./style/index.mjs";
7
6
  import { Transition, computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
8
- import { classNames } from "@v-c/util";
9
- import { filterEmpty } from "@v-c/util/dist/props-util";
7
+ import { classNames, clsx } from "@v-c/util";
8
+ import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
10
9
  import { CheckCircleFilled, CloseCircleFilled, CloseOutlined, ExclamationCircleFilled, InfoCircleFilled } from "@antdv-next/icons";
11
10
 
12
11
  //#region src/alert/Alert.tsx
13
- const iconMapFilled = {
14
- success: CheckCircleFilled,
15
- info: InfoCircleFilled,
16
- error: CloseCircleFilled,
17
- warning: ExclamationCircleFilled
18
- };
19
12
  const alertDefaultProps = { showIcon: void 0 };
20
13
  const IconNode = /* @__PURE__ */ defineComponent((props, { attrs }) => {
21
14
  return () => {
22
- const { type, prefixCls, icon } = props;
23
- const iconType = iconMapFilled[type] || null;
24
- const iconNode = filterEmpty(typeof icon === "function" ? icon() : icon)[0];
25
- if (iconNode) return replaceElement(iconNode, createVNode("span", { "class": [`${prefixCls}-icon`] }, [iconNode]), () => ({
26
- class: classNames(iconNode?.props?.class, `${prefixCls}-icon`, attrs.class),
27
- style: attrs.style
28
- }));
29
- return createVNode(iconType, {
30
- class: `${prefixCls}-icon`,
31
- style: attrs.style
32
- });
15
+ const { type } = props;
16
+ const successIcon = getSlotPropsFnRun({}, props, "successIcon");
17
+ const icon = getSlotPropsFnRun({}, props, "icon");
18
+ const infoIcon = getSlotPropsFnRun({}, props, "infoIcon");
19
+ const warningIcon = getSlotPropsFnRun({}, props, "warningIcon");
20
+ const errorIcon = getSlotPropsFnRun({}, props, "errorIcon");
21
+ const { className, style } = getAttrStyleAndClass(attrs);
22
+ const iconMapFilled = {
23
+ success: successIcon ?? createVNode(CheckCircleFilled, null, null),
24
+ info: infoIcon ?? createVNode(InfoCircleFilled, null, null),
25
+ error: errorIcon ?? createVNode(CloseCircleFilled, null, null),
26
+ warning: warningIcon ?? createVNode(ExclamationCircleFilled, null, null)
27
+ };
28
+ return createVNode("span", {
29
+ "class": clsx(`${props.prefixCls}-icon`, className),
30
+ "style": style
31
+ }, [icon ?? iconMapFilled[type]]);
33
32
  };
34
33
  }, { props: {
35
34
  type: {
@@ -65,18 +64,68 @@ const IconNode = /* @__PURE__ */ defineComponent((props, { attrs }) => {
65
64
  ],
66
65
  required: true,
67
66
  default: void 0
67
+ },
68
+ successIcon: {
69
+ type: [
70
+ Function,
71
+ Boolean,
72
+ String,
73
+ Number,
74
+ null,
75
+ Object
76
+ ],
77
+ required: false,
78
+ default: void 0
79
+ },
80
+ infoIcon: {
81
+ type: [
82
+ Function,
83
+ Boolean,
84
+ String,
85
+ Number,
86
+ null,
87
+ Object
88
+ ],
89
+ required: false,
90
+ default: void 0
91
+ },
92
+ warningIcon: {
93
+ type: [
94
+ Function,
95
+ Boolean,
96
+ String,
97
+ Number,
98
+ null,
99
+ Object
100
+ ],
101
+ required: false,
102
+ default: void 0
103
+ },
104
+ errorIcon: {
105
+ type: [
106
+ Function,
107
+ Boolean,
108
+ String,
109
+ Number,
110
+ null,
111
+ Object
112
+ ],
113
+ required: false,
114
+ default: void 0
68
115
  }
69
116
  } });
70
- const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots }) => {
117
+ const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
71
118
  return () => {
72
119
  const { isClosable, prefixCls, handleClose, ariaProps } = props;
120
+ const { className, style } = getAttrStyleAndClass(attrs);
73
121
  const closeIcon = getSlotPropsFnRun(slots, props, "closeIcon");
74
122
  const mergedCloseIcon = !closeIcon ? createVNode(CloseOutlined, null, null) : closeIcon;
75
123
  return isClosable ? createVNode("button", mergeProps({
76
124
  "type": "button",
77
125
  "onClick": handleClose,
78
- "class": `${prefixCls}-close-icon`,
79
- "tabindex": 0
126
+ "class": clsx(`${prefixCls}-close-icon`, className),
127
+ "tabindex": 0,
128
+ "style": style
80
129
  }, ariaProps), [mergedCloseIcon]) : null;
81
130
  };
82
131
  }, { props: {
@@ -114,7 +163,14 @@ const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots }) => {
114
163
  }
115
164
  } });
116
165
  const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
117
- const { closable: contextClosable, closeIcon: contextCloseIcon, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, direction, prefixCls } = useComponentBaseConfig("alert", props, ["closable", "closeIcon"]);
166
+ const { closable: contextClosable, closeIcon: contextCloseIcon, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, direction, prefixCls, successIcon, errorIcon, infoIcon, warningIcon } = useComponentBaseConfig("alert", props, [
167
+ "closable",
168
+ "closeIcon",
169
+ "successIcon",
170
+ "errorIcon",
171
+ "infoIcon",
172
+ "warningIcon"
173
+ ]);
118
174
  const { classes, styles } = toPropsRefs(props, "classes", "styles");
119
175
  const closed = shallowRef(false);
120
176
  const internalRef = shallowRef();
@@ -135,8 +191,9 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
135
191
  };
136
192
  return () => {
137
193
  const { closable, banner, showIcon, rootClass } = props;
194
+ const { className, style } = getAttrStyleAndClass(attrs);
138
195
  const isClosableFn = () => {
139
- const closeIcon = getSlotPropFn(slots, props, "closeIcon");
196
+ const closeIcon = getSlotPropsFnRun(slots, props, "closeIcon");
140
197
  if (typeof closable === "object" && closable.closeIcon) return true;
141
198
  if (typeof closable === "boolean") return closable;
142
199
  const closeIconNode = typeof closeIcon === "function" ? filterEmpty(closeIcon()) : closeIcon;
@@ -165,7 +222,7 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
165
222
  [`${prefixCls.value}-no-icon`]: !isShowIcon,
166
223
  [`${prefixCls.value}-banner`]: !!banner,
167
224
  [`${prefixCls.value}-rtl`]: direction.value === "rtl"
168
- }, contextClassName.value, attrs.class, rootClass, mergedClassNames.root, cssVarCls.value, hashId.value);
225
+ }, contextClassName.value, className, rootClass, mergedClassNames.root, cssVarCls.value, hashId.value);
169
226
  const mergedCloseIconFn = () => {
170
227
  if (typeof closable === "object" && closable.closeIcon) return closable.closeIcon;
171
228
  const closeIcon = getSlotPropFn(slots, props, "closeIcon");
@@ -200,7 +257,7 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
200
257
  "style": [
201
258
  mergedStyles.root,
202
259
  contextStyle.value,
203
- attrs.style
260
+ style
204
261
  ]
205
262
  }, pureAttrs(attrs)), [
206
263
  isShowIcon ? createVNode(IconNode, {
@@ -209,7 +266,11 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
209
266
  "description": description,
210
267
  "icon": props.icon,
211
268
  "prefixCls": prefixCls.value,
212
- "type": type.value
269
+ "type": type.value,
270
+ "successIcon": successIcon.value,
271
+ "infoIcon": infoIcon.value,
272
+ "warningIcon": warningIcon.value,
273
+ "errorIcon": errorIcon.value
213
274
  }, null) : null,
214
275
  createVNode("div", {
215
276
  "class": [`${prefixCls.value}-section`, mergedClassNames.section],
@@ -226,6 +287,8 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
226
287
  "style": mergedStyles.actions
227
288
  }, [action]) : null,
228
289
  createVNode(CloseIconNode, {
290
+ "class": mergedClassNames.close,
291
+ "style": mergedStyles.close,
229
292
  "isClosable": isClosable,
230
293
  "prefixCls": prefixCls.value,
231
294
  "ariaProps": mergedAriaProps,
@@ -4,8 +4,8 @@ import "../_util/hooks/index.mjs";
4
4
  import { AnchorLinkBaseProps } from "./AnchorLink.mjs";
5
5
  import { ComponentBaseProps } from "../config-provider/context.mjs";
6
6
  import { AffixProps } from "../affix/index.mjs";
7
- import * as vue226 from "vue";
8
- import { SlotsType, VNodeChild } from "vue";
7
+ import * as vue227 from "vue";
8
+ import { CSSProperties, SlotsType, VNodeChild } from "vue";
9
9
  import { Key } from "@v-c/util/dist/type";
10
10
 
11
11
  //#region src/anchor/Anchor.d.ts
@@ -15,9 +15,20 @@ interface AnchorLinkItemProps extends AnchorLinkBaseProps {
15
15
  children?: AnchorLinkItemProps[];
16
16
  }
17
17
  type AnchorDirection = 'vertical' | 'horizontal';
18
- type SemanticName = 'root' | 'item' | 'itemTitle' | 'indicator';
19
- type AnchorClassNamesType = SemanticClassNamesType<AnchorProps, SemanticName>;
20
- type AnchorStylesType = SemanticStylesType<AnchorProps, SemanticName>;
18
+ interface AnchorSemanticClassNames {
19
+ root?: string;
20
+ item?: string;
21
+ itemTitle?: string;
22
+ indicator?: string;
23
+ }
24
+ interface AnchorSemanticStyles {
25
+ root?: CSSProperties;
26
+ item?: CSSProperties;
27
+ itemTitle?: CSSProperties;
28
+ indicator?: CSSProperties;
29
+ }
30
+ type AnchorClassNamesType = SemanticClassNamesType<AnchorProps, AnchorSemanticClassNames>;
31
+ type AnchorStylesType = SemanticStylesType<AnchorProps, AnchorSemanticStyles>;
21
32
  interface AnchorProps extends ComponentBaseProps {
22
33
  classes?: AnchorClassNamesType;
23
34
  styles?: AnchorStylesType;
@@ -45,8 +56,8 @@ interface AnchorEmits {
45
56
  type AnchorSlots = SlotsDefineType<{
46
57
  item: (item: AnchorLinkItemProps) => any;
47
58
  }>;
48
- declare const Anchor: vue226.DefineSetupFnComponent<AnchorProps, AnchorEmits, SlotsType<AnchorSlots>, AnchorProps & {
59
+ declare const Anchor: vue227.DefineSetupFnComponent<AnchorProps, AnchorEmits, SlotsType<AnchorSlots>, AnchorProps & {
49
60
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
50
- }, vue226.PublicProps>;
61
+ }, vue227.PublicProps>;
51
62
  //#endregion
52
63
  export { Anchor, AnchorEmits, AnchorProps, AnchorSlots };