antdv-next 1.4.6 → 1.5.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 (193) hide show
  1. package/dist/_util/hooks/useMergeSemantic.d.ts +7 -4
  2. package/dist/_util/hooks/useMergeSemantic.js +8 -3
  3. package/dist/_util/is.d.ts +9 -1
  4. package/dist/_util/is.js +25 -2
  5. package/dist/_util/scrollTo.d.ts +1 -1
  6. package/dist/_util/scrollTo.js +17 -5
  7. package/dist/_util/vueNode.d.ts +6 -2
  8. package/dist/alert/Alert.js +1 -1
  9. package/dist/alert/style/index.d.ts +5 -0
  10. package/dist/alert/style/index.js +2 -1
  11. package/dist/antd-with-locales.esm.js +12939 -12342
  12. package/dist/antd-with-locales.js +80 -80
  13. package/dist/antd.css +1 -1
  14. package/dist/antd.esm.js +10123 -9740
  15. package/dist/antd.js +55 -55
  16. package/dist/app/App.js +2 -1
  17. package/dist/avatar/AvatarGroup.d.ts +4 -1
  18. package/dist/avatar/AvatarGroup.js +6 -4
  19. package/dist/avatar/index.d.ts +2 -2
  20. package/dist/badge/Ribbon.d.ts +4 -1
  21. package/dist/badge/Ribbon.js +11 -11
  22. package/dist/badge/index.d.ts +3 -2
  23. package/dist/badge/index.js +26 -24
  24. package/dist/border-beam/BorderBeam.d.ts +4 -0
  25. package/dist/border-beam/BorderBeam.js +48 -12
  26. package/dist/border-beam/hooks/useBorderSize.d.ts +3 -7
  27. package/dist/border-beam/hooks/useBorderSize.js +31 -25
  28. package/dist/border-beam/style/index.js +13 -12
  29. package/dist/border-beam/util.d.ts +4 -1
  30. package/dist/border-beam/util.js +7 -2
  31. package/dist/breadcrumb/Breadcrumb.d.ts +4 -1
  32. package/dist/breadcrumb/Breadcrumb.js +12 -7
  33. package/dist/breadcrumb/index.d.ts +2 -2
  34. package/dist/button/Button.js +5 -14
  35. package/dist/button/style/index.js +0 -1
  36. package/dist/calendar/generateCalendar.d.ts +4 -1
  37. package/dist/calendar/generateCalendar.js +8 -5
  38. package/dist/calendar/index.d.ts +2 -2
  39. package/dist/calendar/locale/sq_AL.d.ts +2 -0
  40. package/dist/calendar/locale/sq_AL.js +5 -0
  41. package/dist/card/CardGrid.d.ts +4 -1
  42. package/dist/card/CardGrid.js +7 -4
  43. package/dist/card/CardMeta.d.ts +4 -1
  44. package/dist/card/CardMeta.js +5 -3
  45. package/dist/card/index.d.ts +3 -3
  46. package/dist/carousel/index.d.ts +1 -0
  47. package/dist/carousel/index.js +8 -8
  48. package/dist/checkbox/Group.js +3 -3
  49. package/dist/color-picker/ColorPicker.js +4 -7
  50. package/dist/components.d.ts +27 -21
  51. package/dist/components.js +6 -3
  52. package/dist/config-provider/context.d.ts +28 -8
  53. package/dist/config-provider/define.d.ts +4 -1
  54. package/dist/config-provider/index.js +29 -0
  55. package/dist/date-picker/generatePicker/generateRangePicker.js +2 -5
  56. package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -5
  57. package/dist/date-picker/generatePicker/useComponents.d.ts +1 -1
  58. package/dist/date-picker/hooks/useMergedPickerSemantic.d.ts +1 -1
  59. package/dist/date-picker/hooks/useMergedPickerSemantic.js +7 -3
  60. package/dist/date-picker/locale/sq_AL.d.ts +6 -0
  61. package/dist/date-picker/locale/sq_AL.js +72 -0
  62. package/dist/date-picker/locale/zh_TW.js +2 -2
  63. package/dist/date-picker/util.d.ts +2 -2
  64. package/dist/descriptions/hooks/useItems.d.ts +4 -4
  65. package/dist/descriptions/index.d.ts +4 -1
  66. package/dist/descriptions/index.js +5 -2
  67. package/dist/divider/index.d.ts +4 -1
  68. package/dist/divider/index.js +9 -6
  69. package/dist/drawer/DrawerPanel.js +5 -3
  70. package/dist/drawer/index.js +9 -13
  71. package/dist/drawer/style/index.js +1 -0
  72. package/dist/dropdown/dropdown.js +4 -6
  73. package/dist/empty/index.d.ts +4 -1
  74. package/dist/empty/index.js +5 -2
  75. package/dist/float-button/BackTop.d.ts +2 -0
  76. package/dist/float-button/BackTop.js +27 -44
  77. package/dist/float-button/FloatButtonGroup.d.ts +4 -1
  78. package/dist/float-button/FloatButtonGroup.js +5 -4
  79. package/dist/float-button/hooks/useScroll.d.ts +16 -0
  80. package/dist/float-button/hooks/useScroll.js +80 -0
  81. package/dist/float-button/index.d.ts +2 -2
  82. package/dist/float-button/style/button.js +17 -0
  83. package/dist/form/ErrorList.js +2 -2
  84. package/dist/form/FormItem/index.js +23 -24
  85. package/dist/form/context.d.ts +1 -1
  86. package/dist/form/hooks/useVariant.d.ts +2 -2
  87. package/dist/form/hooks/useVariant.js +15 -5
  88. package/dist/form/types.d.ts +11 -3
  89. package/dist/form/utils/validateUtil.js +4 -0
  90. package/dist/image/hooks/usePreviewConfig.d.ts +6 -5
  91. package/dist/image/index.js +8 -9
  92. package/dist/index.d.ts +27 -21
  93. package/dist/index.js +3 -2
  94. package/dist/input/OTP/index.js +6 -3
  95. package/dist/input/Password.js +4 -1
  96. package/dist/input/Search.js +11 -6
  97. package/dist/input/index.d.ts +1 -1
  98. package/dist/input/style/token.js +2 -1
  99. package/dist/input/style/variants.js +1 -1
  100. package/dist/layout/Sider.d.ts +2 -0
  101. package/dist/layout/Sider.js +14 -2
  102. package/dist/listy/index.d.ts +12 -0
  103. package/dist/listy/index.js +119 -0
  104. package/dist/listy/interface.d.ts +21 -0
  105. package/dist/listy/interface.js +1 -0
  106. package/dist/listy/style/index.d.ts +23 -0
  107. package/dist/listy/style/index.js +57 -0
  108. package/dist/locale/sq_AL.d.ts +5 -0
  109. package/dist/locale/sq_AL.js +151 -0
  110. package/dist/locale/zh_TW.js +41 -41
  111. package/dist/masonry/Masonry.js +4 -4
  112. package/dist/mentions/index.d.ts +1 -0
  113. package/dist/mentions/index.js +4 -0
  114. package/dist/message/useMessage.js +4 -4
  115. package/dist/modal/PurePanel.js +4 -7
  116. package/dist/notification/useNotification.js +4 -5
  117. package/dist/package.js +1 -1
  118. package/dist/package.json.d.ts +1 -0
  119. package/dist/pagination/Pagination.js +14 -6
  120. package/dist/pagination/index.d.ts +2 -2
  121. package/dist/pagination/interface.d.ts +20 -3
  122. package/dist/popconfirm/index.js +17 -8
  123. package/dist/popover/PurePanel.js +10 -0
  124. package/dist/popover/index.js +24 -16
  125. package/dist/qrcode/index.d.ts +4 -1
  126. package/dist/qrcode/index.js +16 -13
  127. package/dist/rate/style/index.js +12 -9
  128. package/dist/result/index.d.ts +4 -1
  129. package/dist/result/index.js +7 -4
  130. package/dist/select/style/dropdown.js +4 -0
  131. package/dist/select/style/select-input.js +1 -1
  132. package/dist/select/style/token.js +4 -2
  133. package/dist/skeleton/Skeleton.d.ts +4 -1
  134. package/dist/skeleton/Skeleton.js +10 -4
  135. package/dist/skeleton/index.d.ts +2 -2
  136. package/dist/slider/SliderTooltip.js +5 -0
  137. package/dist/slider/index.d.ts +5 -1
  138. package/dist/slider/index.js +9 -9
  139. package/dist/space/Compact.d.ts +4 -1
  140. package/dist/space/Compact.js +8 -3
  141. package/dist/space/index.d.ts +2 -2
  142. package/dist/space/index.js +3 -3
  143. package/dist/spin/index.d.ts +4 -1
  144. package/dist/spin/index.js +7 -5
  145. package/dist/splitter/SplitBar.js +1 -12
  146. package/dist/splitter/Splitter.d.ts +4 -1
  147. package/dist/splitter/Splitter.js +4 -2
  148. package/dist/splitter/index.d.ts +2 -2
  149. package/dist/splitter/style/index.js +2 -1
  150. package/dist/statistic/Statistic.d.ts +4 -1
  151. package/dist/statistic/index.d.ts +2 -2
  152. package/dist/steps/index.js +6 -8
  153. package/dist/steps/style/index.js +2 -1
  154. package/dist/table/style/virtual.js +4 -0
  155. package/dist/table/util.d.ts +1 -1
  156. package/dist/tag/hooks/useColor.d.ts +1 -1
  157. package/dist/tag/index.js +3 -3
  158. package/dist/theme/interface/components.d.ts +70 -68
  159. package/dist/theme/interface/seeds.d.ts +8 -0
  160. package/dist/theme/themes/seed.js +1 -0
  161. package/dist/theme/util/alias.js +1 -1
  162. package/dist/time-picker/locale/sq_AL.d.ts +5 -0
  163. package/dist/time-picker/locale/sq_AL.js +7 -0
  164. package/dist/timeline/Timeline.js +5 -7
  165. package/dist/tooltip/PurePanel.js +5 -0
  166. package/dist/tooltip/index.d.ts +1 -0
  167. package/dist/tooltip/index.js +27 -13
  168. package/dist/tour/PurePanel.js +0 -8
  169. package/dist/tour/index.js +10 -13
  170. package/dist/tour/interface.d.ts +4 -6
  171. package/dist/tour/panelRender.js +8 -2
  172. package/dist/transfer/Transfer.d.ts +4 -1
  173. package/dist/transfer/Transfer.js +5 -2
  174. package/dist/transfer/index.d.ts +2 -2
  175. package/dist/tree/index.d.ts +3 -2
  176. package/dist/tree/index.js +3 -2
  177. package/dist/tree/style/index.js +4 -0
  178. package/dist/typography/Base/EllipsisTooltip.d.ts +6 -1
  179. package/dist/typography/Base/EllipsisTooltip.js +2 -2
  180. package/dist/typography/Base/index.js +9 -26
  181. package/dist/typography/hooks/useCopyClick.d.ts +1 -1
  182. package/dist/typography/hooks/useCopyClick.js +5 -15
  183. package/dist/upload/Upload.js +7 -9
  184. package/dist/upload/UploadList/ListItem.js +4 -12
  185. package/dist/upload/index.d.ts +2 -2
  186. package/dist/watermark/index.d.ts +4 -1
  187. package/dist/watermark/index.js +2 -1
  188. package/global.d.ts +1 -0
  189. package/package.json +10 -9
  190. package/web-tags.json +1384 -1338
  191. package/web-types.json +4584 -4467
  192. package/dist/slider/useRafLock.d.ts +0 -5
  193. package/dist/slider/useRafLock.js +0 -23
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../../config-provider/context.js";
2
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
2
+ import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
3
3
  import { toPropsRefs as toPropsRefs$1 } from "../../_util/tools.js";
4
4
  import InternalTooltip from "../../tooltip/index.js";
5
5
  import useLocale from "../../locale/useLocale.js";
@@ -18,6 +18,7 @@ import { Fragment, computed, createVNode, defineComponent, h, mergeProps, nextTi
18
18
  import { classNames } from "@v-c/util";
19
19
  import { filterEmpty } from "@v-c/util/dist/props-util";
20
20
  import { EditOutlined } from "@antdv-next/icons";
21
+ import useDelayState from "@v-c/util/dist/hooks/useDelayState";
21
22
  import ResizeObserver from "@v-c/resize-observer";
22
23
  //#region src/typography/Base/index.tsx
23
24
  const ELLIPSIS_STR = "...";
@@ -62,7 +63,8 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
62
63
  direction: mergedDirection.value
63
64
  };
64
65
  });
65
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
66
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
67
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
66
68
  const [textLocale] = useLocale("Text");
67
69
  const [enableEdit, editConfig] = useMergedConfig(computed(() => props.editable));
68
70
  const editing = shallowRef(editConfig.value.editing ?? false);
@@ -156,8 +158,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
156
158
  ellipsisConfig.value.onExpand?.(e, info);
157
159
  };
158
160
  const ellipsisWidth = shallowRef(0);
159
- const isHoveringOperations = shallowRef(false);
160
- const isHoveringTypography = shallowRef(false);
161
+ const [isHoveringOperations, setIsHoveringOperations] = useDelayState(false);
161
162
  const onResize = ({ offsetWidth }) => {
162
163
  ellipsisWidth.value = offsetWidth;
163
164
  };
@@ -263,12 +264,8 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
263
264
  "key": "operations",
264
265
  "class": classNames(`${prefixCls.value}-actions`, mergedClassNames.value.actions, { [`${prefixCls.value}-actions-start`]: placement.value === "start" }),
265
266
  "style": mergedStyles.value.actions,
266
- "onMouseenter": () => {
267
- isHoveringOperations.value = true;
268
- },
269
- "onMouseleave": () => {
270
- isHoveringOperations.value = false;
271
- }
267
+ "onMouseenter": () => setIsHoveringOperations(true, true),
268
+ "onMouseleave": () => setIsHoveringOperations(false, { ms: 500 })
272
269
  }, [
273
270
  expandNode,
274
271
  editNode,
@@ -291,12 +288,6 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
291
288
  }, mergedClassNames.value.root));
292
289
  return () => {
293
290
  const { className: attrClass, style: attrStyle, restAttrs } = getAttrStyleAndClass$1(attrs);
294
- const onMouseenter = restAttrs.onMouseenter ?? restAttrs.onMouseEnter;
295
- const onMouseleave = restAttrs.onMouseleave ?? restAttrs.onMouseLeave;
296
- delete restAttrs.onMouseenter;
297
- delete restAttrs.onMouseEnter;
298
- delete restAttrs.onMouseleave;
299
- delete restAttrs.onMouseLeave;
300
291
  const children = filterEmpty(slots?.default?.());
301
292
  childrenNodes.value = children;
302
293
  const clickHandler = triggerType.value.includes("text") ? onEditClick : (e) => emit("click", e);
@@ -316,7 +307,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
316
307
  },
317
308
  "prefixCls": prefixCls.value,
318
309
  "className": classNames(attrClass, props.rootClass, contextClassName.value),
319
- "style": [contextStyle.value, attrStyle],
310
+ "style": attrStyle,
320
311
  "direction": mergedDirection.value,
321
312
  "component": props.component,
322
313
  "maxLength": editConfig.value.maxLength,
@@ -332,7 +323,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
332
323
  "tooltipProps": tooltipProps.value,
333
324
  "enableEllipsis": mergedEnableEllipsis.value,
334
325
  "isEllipsis": isMergedEllipsis.value,
335
- "open": isHoveringTypography.value && !isHoveringOperations.value
326
+ "disabled": isHoveringOperations.value
336
327
  }, { default: () => [createVNode(Typography, mergeProps({
337
328
  "class": mergedClassName,
338
329
  "prefixCls": prefixCls.value,
@@ -341,14 +332,6 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
341
332
  "ref": typographyRef,
342
333
  "direction": mergedDirection.value,
343
334
  "onClick": clickHandler,
344
- "onMouseenter": (e) => {
345
- isHoveringTypography.value = true;
346
- onMouseenter?.(e);
347
- },
348
- "onMouseleave": (e) => {
349
- isHoveringTypography.value = false;
350
- onMouseleave?.(e);
351
- },
352
335
  "title": props.title,
353
336
  "aria-label": topAriaLabel.value,
354
337
  "rootClass": props.rootClass
@@ -3,7 +3,7 @@ declare function useCopyClick({ copyConfig, getText }: {
3
3
  copyConfig: any;
4
4
  getText?: () => any;
5
5
  }): {
6
- copied: import("vue").ShallowRef<boolean, boolean>;
6
+ copied: import("vue").Ref<boolean, boolean>;
7
7
  copyLoading: import("vue").ShallowRef<boolean, boolean>;
8
8
  onClick: (e?: MouseEvent) => Promise<void>;
9
9
  };
@@ -1,18 +1,12 @@
1
1
  import { getTextByNode } from "../../_util/vueNode.js";
2
2
  import toList from "../../_util/toList.js";
3
3
  import copy from "../../_util/copy.js";
4
- import { onBeforeUnmount, shallowRef, unref } from "vue";
4
+ import { shallowRef, unref } from "vue";
5
+ import useDelayState from "@v-c/util/dist/hooks/useDelayState";
5
6
  //#region src/typography/hooks/useCopyClick.ts
6
7
  function useCopyClick({ copyConfig, getText }) {
7
- const copied = shallowRef(false);
8
+ const [copied, setCopied] = useDelayState(false);
8
9
  const copyLoading = shallowRef(false);
9
- const copyIdRef = shallowRef(null);
10
- const cleanCopyId = () => {
11
- if (copyIdRef.value) {
12
- clearTimeout(copyIdRef.value);
13
- copyIdRef.value = null;
14
- }
15
- };
16
10
  const getClipboardText = async () => {
17
11
  const config = unref(copyConfig);
18
12
  if (typeof config?.text === "function") return config.text();
@@ -24,7 +18,6 @@ function useCopyClick({ copyConfig, getText }) {
24
18
  return "";
25
19
  }).join("");
26
20
  };
27
- onBeforeUnmount(cleanCopyId);
28
21
  const onClick = async (e) => {
29
22
  e?.preventDefault();
30
23
  e?.stopPropagation();
@@ -36,11 +29,8 @@ function useCopyClick({ copyConfig, getText }) {
36
29
  if (config?.format) copyOptions.format = config.format;
37
30
  await copy(text == null ? "" : String(text), copyOptions);
38
31
  copyLoading.value = false;
39
- copied.value = true;
40
- cleanCopyId();
41
- copyIdRef.value = setTimeout(() => {
42
- copied.value = false;
43
- }, 3e3);
32
+ setCopied(true, true);
33
+ setCopied(false, { ms: 3e3 });
44
34
  unref(copyConfig)?.onCopy?.(e);
45
35
  } catch (error) {
46
36
  copyLoading.value = false;
@@ -1,6 +1,6 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
5
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
6
6
  import { useDisabledContext } from "../config-provider/DisabledContext.js";
@@ -191,7 +191,9 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
191
191
  disabled: mergedDisabled.value
192
192
  };
193
193
  });
194
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
194
+ const contextTriggerStyle = useSemanticRootStyle(contextStyle, "trigger");
195
+ const triggerStyle = useSemanticRootStyle(computed(() => attrs.style), "trigger");
196
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextTriggerStyle, styles, triggerStyle), useToProps(mergedProps));
195
197
  const [contextLocale] = useLocale("Upload");
196
198
  const mergedLocale = computed(() => ({
197
199
  ...contextLocale?.value,
@@ -245,11 +247,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
245
247
  const { type, multiple, action, accept, supportServerRender, hasControlInside, openFileDialogOnClick, withCredentials, id, name } = props;
246
248
  const children = filterEmpty(slots.default?.() ?? []);
247
249
  const hasChildren = children.length > 0;
248
- const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
249
- const mergedStyle = {
250
- ...contextStyle.value,
251
- ...style
252
- };
250
+ const { className, restAttrs } = getAttrStyleAndClass$1(attrs);
253
251
  const rcUploadProps = {
254
252
  onBatchStart,
255
253
  onError,
@@ -305,7 +303,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
305
303
  "style": mergedRootStyle
306
304
  }), [createVNode("div", {
307
305
  "class": dragCls,
308
- "style": [mergedStyle, mergedStyles.value.trigger],
306
+ "style": mergedStyles.value.trigger,
309
307
  "onDrop": onFileDrop,
310
308
  "onDragover": onFileDrop,
311
309
  "onDragleave": onFileDrop
@@ -319,7 +317,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
319
317
  [`${prefixCls.value}-disabled`]: mergedDisabled.value,
320
318
  [`${prefixCls.value}-hidden`]: !hasChildren
321
319
  }, mergedClassNames.value.trigger),
322
- "style": [mergedStyle, mergedStyles.value.trigger]
320
+ "style": mergedStyles.value.trigger
323
321
  }, [createVNode(VcUpload, mergeProps(rcUploadProps, { "ref": upload }), _isSlot(children) ? children : { default: () => [children] })]);
324
322
  if (listType.value === "picture-card" || listType.value === "picture-circle") return createVNode("span", mergeProps(restAttrs, {
325
323
  "class": mergedRootCls,
@@ -2,10 +2,11 @@ import { useComponentBaseConfig } from "../../config-provider/context.js";
2
2
  import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
3
3
  import InternalTooltip from "../../tooltip/index.js";
4
4
  import progress_default from "../../progress/index.js";
5
- import { Transition, computed, createVNode, defineComponent, isVNode, mergeProps, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
5
+ import { Transition, computed, createVNode, defineComponent, isVNode, mergeProps, onMounted, shallowRef, watch } from "vue";
6
6
  import { clsx } from "@v-c/util";
7
7
  import { DeleteOutlined, DownloadOutlined, EyeOutlined } from "@antdv-next/icons";
8
8
  import { getTransitionProps } from "@v-c/util/dist/utils/transition";
9
+ import useDelayState from "@v-c/util/dist/hooks/useDelayState";
9
10
  //#region src/upload/UploadList/ListItem.tsx
10
11
  function _isSlot(s) {
11
12
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
@@ -15,18 +16,9 @@ const ListItem = /* @__PURE__ */ defineComponent((props, { attrs }) => {
15
16
  watch(() => props.file.status, (status) => {
16
17
  if (status !== "removed") mergedStatus.value = status;
17
18
  });
18
- const showProgress = shallowRef(false);
19
- let progressTimer = null;
19
+ const [showProgress, setShowProgress] = useDelayState(false);
20
20
  onMounted(() => {
21
- progressTimer = setTimeout(() => {
22
- showProgress.value = true;
23
- }, 300);
24
- });
25
- onBeforeUnmount(() => {
26
- if (progressTimer) {
27
- clearTimeout(progressTimer);
28
- progressTimer = null;
29
- }
21
+ setShowProgress(true, { ms: 300 });
30
22
  });
31
23
  const { rootPrefixCls } = useComponentBaseConfig("upload");
32
24
  const listType = computed(() => props.listType ?? "text");
@@ -1,7 +1,7 @@
1
1
  import { EmptyEmit } from "../_util/type.js";
2
2
  import { UploadChangeParam, UploadEmits, UploadFile, UploadProps as UploadProps$1, UploadSlots } from "./interface.js";
3
3
  import Dragger, { DraggerProps } from "./Dragger.js";
4
- import InternalUpload, { InternalUploadProps } from "./Upload.js";
4
+ import InternalUpload, { InternalUploadProps, UploadRef } from "./Upload.js";
5
5
  import { InternalUploadListProps } from "./UploadList/index.js";
6
6
  import { App } from "vue";
7
7
  //#region src/upload/index.d.ts
@@ -16,4 +16,4 @@ declare const UploadDragger: import("vue").DefineSetupFnComponent<DraggerProps<a
16
16
  height?: number;
17
17
  }, import("vue").PublicProps>;
18
18
  //#endregion
19
- export { type DraggerProps, type UploadChangeParam, UploadDragger, type UploadEmits, type UploadFile, UploadListProps, UploadProps, type UploadSlots, Upload as default };
19
+ export { type DraggerProps, type UploadChangeParam, UploadDragger, type UploadEmits, type UploadFile, UploadListProps, UploadProps, type UploadRef, type UploadSlots, Upload as default };
@@ -26,6 +26,9 @@ interface WatermarkProps {
26
26
  inherit?: boolean;
27
27
  onRemove?: (() => void) | undefined;
28
28
  }
29
+ interface WatermarkRef {
30
+ nativeElement: HTMLDivElement;
31
+ }
29
32
  declare const Watermark: import("vue").DefineSetupFnComponent<WatermarkProps, {}, {}, WatermarkProps & {}, import("vue").PublicProps>;
30
33
  //#endregion
31
- export { WatermarkContent, WatermarkFont, WatermarkProps, WatermarkText, Watermark as default };
34
+ export { WatermarkContent, WatermarkFont, WatermarkProps, WatermarkRef, WatermarkText, Watermark as default };
@@ -27,7 +27,7 @@ const fixedStyle = {
27
27
  position: "relative",
28
28
  overflow: "hidden"
29
29
  };
30
- const Watermark = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
30
+ const Watermark = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
31
31
  const [, token] = useToken();
32
32
  const mergedZIndex = computed(() => props.zIndex ?? token.value.zIndexPopupBase - WATERMARK_Z_INDEX_OFFSET);
33
33
  const onRemove = computed(() => props.onRemove);
@@ -85,6 +85,7 @@ const Watermark = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
85
85
  return mergedMarkStyle;
86
86
  });
87
87
  const container = shallowRef(null);
88
+ expose({ nativeElement: container });
88
89
  const subElements = ref(/* @__PURE__ */ new Set());
89
90
  const targetElements = computed(() => {
90
91
  return [...container.value ? [container.value] : [], ...Array.from(subElements.value)];
package/global.d.ts CHANGED
@@ -18,6 +18,7 @@ declare module 'vue' {
18
18
  ABadge: typeof import('antdv-next')['Badge']
19
19
  ABadgeRibbon: typeof import('antdv-next')['BadgeRibbon']
20
20
  ATag: typeof import('antdv-next')['Tag']
21
+ ABorderBeam: typeof import('antdv-next')['BorderBeam']
21
22
  ACheckableTag: typeof import('antdv-next')['CheckableTag']
22
23
  ALayout: typeof import('antdv-next')['Layout']
23
24
  ALayoutHeader: typeof import('antdv-next')['LayoutHeader']
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "antdv-next",
3
3
  "type": "module",
4
- "version": "1.4.6",
4
+ "version": "1.5.1",
5
5
  "description": "Ant Design Vue3 Component Library",
6
6
  "author": {
7
7
  "email": "aibayanyu@gamil.com",
@@ -187,36 +187,37 @@
187
187
  "@v-c/dialog": "^1.2.0",
188
188
  "@v-c/drawer": "^1.0.6",
189
189
  "@v-c/dropdown": "^1.0.5",
190
- "@v-c/image": "^1.0.12",
190
+ "@v-c/image": "^1.1.0",
191
191
  "@v-c/input": "^1.1.1",
192
192
  "@v-c/input-number": "^1.0.7",
193
+ "@v-c/listy": "^1.0.2",
193
194
  "@v-c/mentions": "^1.2.0",
194
195
  "@v-c/menu": "^1.3.0",
195
196
  "@v-c/mutate-observer": "^1.0.2",
196
197
  "@v-c/notification": "^2.0.2",
197
198
  "@v-c/pagination": "^1.1.0",
198
- "@v-c/picker": "^1.3.0",
199
+ "@v-c/picker": "^1.3.2",
199
200
  "@v-c/progress": "^1.0.1",
200
201
  "@v-c/qrcode": "^1.0.1",
201
202
  "@v-c/rate": "^1.0.1",
202
203
  "@v-c/resize-observer": "^1.1.3",
203
- "@v-c/segmented": "^1.0.3",
204
- "@v-c/select": "^1.2.0",
204
+ "@v-c/segmented": "^1.0.4",
205
+ "@v-c/select": "^1.2.1",
205
206
  "@v-c/slick": "^1.0.2",
206
207
  "@v-c/slider": "^1.1.0",
207
208
  "@v-c/steps": "^1.0.0",
208
209
  "@v-c/switch": "^1.0.1",
209
- "@v-c/table": "^1.1.8",
210
+ "@v-c/table": "^1.2.0",
210
211
  "@v-c/tabs": "^1.3.0",
211
212
  "@v-c/textarea": "^1.1.0",
212
213
  "@v-c/tooltip": "^1.1.0",
213
214
  "@v-c/tour": "^1.1.1",
214
- "@v-c/tree": "^1.1.3",
215
- "@v-c/tree-select": "^1.1.1",
215
+ "@v-c/tree": "^1.2.0",
216
+ "@v-c/tree-select": "^1.1.2",
216
217
  "@v-c/trigger": "^1.1.0",
217
218
  "@v-c/upload": "^1.0.0",
218
219
  "@v-c/util": "^1.1.0",
219
- "@v-c/virtual-list": "^1.1.0",
220
+ "@v-c/virtual-list": "^1.1.1",
220
221
  "@vueuse/core": "^14.4.0",
221
222
  "dayjs": "^1.11.21",
222
223
  "es-toolkit": "1.50.0",