antdv-next 1.5.1 → 1.5.3

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 (79) hide show
  1. package/dist/_util/hooks/useClosable.d.ts +4 -2
  2. package/dist/_util/hooks/useClosable.js +9 -3
  3. package/dist/_util/statusUtils.d.ts +1 -1
  4. package/dist/_util/vueNode.d.ts +2 -6
  5. package/dist/anchor/Anchor.js +12 -6
  6. package/dist/antd-with-locales.esm.js +5684 -5361
  7. package/dist/antd-with-locales.js +82 -82
  8. package/dist/antd.css +1 -1
  9. package/dist/antd.esm.js +7613 -7294
  10. package/dist/antd.js +38 -38
  11. package/dist/auto-complete/index.d.ts +1 -1
  12. package/dist/auto-complete/index.js +13 -10
  13. package/dist/breadcrumb/BreadcrumbItem.js +2 -1
  14. package/dist/button/buttonHelper.d.ts +1 -1
  15. package/dist/card/Card.js +5 -4
  16. package/dist/card/CardMeta.js +4 -3
  17. package/dist/carousel/index.js +5 -2
  18. package/dist/checkbox/Checkbox.js +1 -1
  19. package/dist/collapse/Collapse.js +2 -4
  20. package/dist/color-picker/components/ColorTrigger.js +1 -1
  21. package/dist/color-picker/style/index.js +1 -0
  22. package/dist/config-provider/context.d.ts +5 -2
  23. package/dist/date-picker/generatePicker/generateRangePicker.js +4 -2
  24. package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
  25. package/dist/date-picker/util.d.ts +4 -4
  26. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  27. package/dist/float-button/FloatButton.js +2 -1
  28. package/dist/float-button/style/button.js +16 -10
  29. package/dist/form/FormItem/ItemHolder.js +1 -1
  30. package/dist/form/FormItem/index.js +4 -5
  31. package/dist/form/FormItemLabel.js +2 -1
  32. package/dist/form/context.d.ts +1 -1
  33. package/dist/form/hooks/useVariant.d.ts +1 -1
  34. package/dist/form/style/index.js +25 -12
  35. package/dist/grid/row.js +9 -16
  36. package/dist/image/PreviewGroup.js +1 -1
  37. package/dist/listy/style/index.js +5 -1
  38. package/dist/locale/en_US.js +4 -0
  39. package/dist/locale/index.d.ts +4 -0
  40. package/dist/locale/is_IS.js +1 -1
  41. package/dist/locale/mn_MN.js +1 -1
  42. package/dist/locale/zh_CN.js +4 -0
  43. package/dist/menu/MenuItem.js +12 -2
  44. package/dist/menu/SubMenu.d.ts +1 -1
  45. package/dist/menu/style/vertical.js +10 -11
  46. package/dist/notification/index.js +2 -1
  47. package/dist/notification/useNotification.js +8 -4
  48. package/dist/package.js +1 -1
  49. package/dist/package.json.d.ts +4 -0
  50. package/dist/radio/group.js +2 -2
  51. package/dist/segmented/index.js +2 -1
  52. package/dist/select/index.d.ts +2 -2
  53. package/dist/select/index.js +1 -1
  54. package/dist/select/style/index.js +1 -1
  55. package/dist/space/Compact.d.ts +1 -1
  56. package/dist/steps/PanelArrow.js +3 -2
  57. package/dist/table/InternalTable.js +5 -4
  58. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
  59. package/dist/table/hooks/useSorter.js +7 -9
  60. package/dist/table/style/radius.js +4 -0
  61. package/dist/table/util.d.ts +1 -1
  62. package/dist/tag/CheckableTagGroup.d.ts +3 -0
  63. package/dist/tag/CheckableTagGroup.js +2 -2
  64. package/dist/tag/hooks/useColor.d.ts +1 -1
  65. package/dist/tag/index.js +2 -1
  66. package/dist/transfer/ListBody.js +2 -1
  67. package/dist/transfer/ListItem.d.ts +1 -0
  68. package/dist/transfer/ListItem.js +6 -2
  69. package/dist/transfer/Section.js +1 -1
  70. package/dist/transfer/search.js +2 -2
  71. package/dist/tree/utils/dictUtil.js +3 -2
  72. package/dist/upload/UploadList/ListItem.js +2 -1
  73. package/dist/upload/UploadList/index.js +8 -2
  74. package/dist/upload/utils.js +8 -6
  75. package/dist/version/token-meta.json +1 -0
  76. package/dist/version/token.json +1 -0
  77. package/package.json +10 -6
  78. package/web-tags.json +1172 -1168
  79. package/web-types.json +3789 -3806
@@ -34,9 +34,11 @@ interface UseClosableParams {
34
34
  customCloseIconRender?: (closeIcon: VNodeChild) => VNodeChild;
35
35
  context?: ContextClosable;
36
36
  }
37
- declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<readonly [true, import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<({} | null)[] | readonly [true, import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
38
  [key: string]: any;
39
- }>, boolean, Record<string, any>] | ({} | null)[] | undefined>;
39
+ }>, boolean, {
40
+ readonly 'aria-label': any;
41
+ }] | undefined>;
40
42
  declare function computeClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>, closeLabel?: string): [closable: boolean, closeIcon: VueNode, closeBtnIsDisabled: boolean, ariaOrDataProps: AriaAttributes & DataAttributes];
41
43
  //#endregion
42
44
  export { BaseContextClosable, ClosableType, ContextClosable, UseClosableParams, computeClosable, useClosable as default, pickClosable };
@@ -82,7 +82,10 @@ function useClosable(propCloseCollection, contextCloseCollection, fallbackCloseC
82
82
  true,
83
83
  mergedCloseIcon,
84
84
  closeBtnIsDisabled.value,
85
- ariaOrDataProps
85
+ {
86
+ "aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
87
+ ...ariaOrDataProps
88
+ }
86
89
  ];
87
90
  }
88
91
  });
@@ -105,11 +108,14 @@ function computeCloseIcon(mergedConfig, fallbackCloseCollection, closeLabel) {
105
108
  if (isNonNullable(finalCloseIcon)) {
106
109
  if (closeIconRender) finalCloseIcon = closeIconRender(finalCloseIcon);
107
110
  finalCloseIcon = isVNode(finalCloseIcon) ? createVNode(finalCloseIcon, {
108
- "aria-label": closeLabel,
111
+ "aria-label": finalCloseIcon.props?.["aria-label"] ?? closeLabel,
109
112
  ...ariaOrDataProps
110
113
  }) : createVNode("span", mergeProps({ "aria-label": closeLabel }, ariaOrDataProps), [finalCloseIcon]);
111
114
  }
112
- return [finalCloseIcon, ariaOrDataProps];
115
+ return [finalCloseIcon, {
116
+ "aria-label": closeLabel,
117
+ ...ariaOrDataProps
118
+ }];
113
119
  }
114
120
  function mergeClosableConfigs(propConfig, contextConfig, fallbackConfig) {
115
121
  if (propConfig === false) return false;
@@ -3,6 +3,6 @@ import { ValidateStatus } from "../form/FormItem/index.js";
3
3
  declare const _InputStatuses: readonly ["warning", "error", "", "success", "validating"];
4
4
  type InputStatus = (typeof _InputStatuses)[number];
5
5
  declare function getStatusClassNames(prefixCls: string, status?: ValidateStatus, hasFeedback?: boolean): string;
6
- declare function getMergedStatus(contextStatus?: ValidateStatus, customStatus?: InputStatus): "" | "success" | "error" | "warning" | "validating" | undefined;
6
+ declare function getMergedStatus(contextStatus?: ValidateStatus, customStatus?: InputStatus): "" | "success" | "warning" | "error" | "validating" | undefined;
7
7
  //#endregion
8
8
  export { InputStatus, getMergedStatus, getStatusClassNames };
@@ -3,12 +3,8 @@ import { VNodeChild } from "vue";
3
3
  import { isFragment } from "@v-c/util/dist/Children/isFragment";
4
4
  //#region src/_util/vueNode.d.ts
5
5
  type RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | undefined);
6
- declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
- [key: string]: any;
8
- }> | import("vue").VNodeArrayChildren | null;
9
- declare function cloneElement(element: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
- [key: string]: any;
11
- }> | import("vue").VNodeArrayChildren | null;
6
+ declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps): VNodeChild;
7
+ declare function cloneElement(element: VNodeChild, props?: RenderProps): VNodeChild;
12
8
  declare function getVNode(node: VueNode): VNodeChild;
13
9
  declare function checkRenderNode(node: any): any;
14
10
  declare function getTextByNode(node: any): any;
@@ -44,6 +44,7 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
44
44
  _activeLink.value = val;
45
45
  }
46
46
  });
47
+ const rawActiveLink = shallowRef(activeLink.value);
47
48
  const wrapperRef = shallowRef();
48
49
  const spanLinkNode = shallowRef();
49
50
  const animating = shallowRef(false);
@@ -92,12 +93,16 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
92
93
  if (linkSections.length) return linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev).link;
93
94
  return "";
94
95
  };
95
- const setCurrentActiveLink = (link) => {
96
- if (activeLinkRef.value === link) return;
96
+ const setCurrentActiveLink = (link, forceTriggerChange = false) => {
97
+ rawActiveLink.value = link;
97
98
  const getCurrentAnchor = props.getCurrentAnchor;
98
99
  const newLink = typeof getCurrentAnchor === "function" ? getCurrentAnchor(link) : link;
99
- activeLink.value = newLink;
100
- activeLinkRef.value = newLink;
100
+ const isSameLink = activeLinkRef.value === newLink;
101
+ if (isSameLink && !forceTriggerChange) return;
102
+ if (!isSameLink) {
103
+ activeLink.value = newLink;
104
+ activeLinkRef.value = newLink;
105
+ }
101
106
  emit("change", link);
102
107
  };
103
108
  const handleScroll = () => {
@@ -107,7 +112,8 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
107
112
  };
108
113
  const handleScrollTo = (link, linkTargetOffset) => {
109
114
  const { offsetTop, targetOffset } = props;
110
- setCurrentActiveLink(link);
115
+ const previousRawActiveLink = rawActiveLink.value;
116
+ setCurrentActiveLink(link, previousRawActiveLink !== link);
111
117
  const sharpLinkMatch = sharpMatcherRegex.exec(link);
112
118
  if (!sharpLinkMatch) return;
113
119
  const targetElement = document.getElementById(sharpLinkMatch[1]);
@@ -154,7 +160,7 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
154
160
  });
155
161
  }, { immediate: true });
156
162
  watchEffect(() => {
157
- if (typeof props.getCurrentAnchor === "function") setCurrentActiveLink(props?.getCurrentAnchor(activeLinkRef.value || ""));
163
+ if (typeof props.getCurrentAnchor === "function") setCurrentActiveLink(rawActiveLink.value || "");
158
164
  });
159
165
  watch([
160
166
  () => props.direction,