antdv-next 1.7.0 → 1.7.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.
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +11 -1
- package/dist/_util/vueNode.js +17 -1
- package/dist/affix/index.js +12 -9
- package/dist/anchor/Anchor.js +11 -6
- package/dist/anchor/style/index.js +2 -3
- package/dist/antd-with-locales.esm.js +16246 -18306
- package/dist/antd-with-locales.js +80 -87
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14610 -16673
- package/dist/antd.js +80 -87
- package/dist/avatar/Avatar.js +1 -1
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/avatar/AvatarGroup.js +3 -5
- package/dist/breadcrumb/index.d.ts +8 -1
- package/dist/calendar/generateCalendar.d.ts +10 -10
- package/dist/calendar/index.d.ts +1 -1
- package/dist/card/index.d.ts +8 -1
- package/dist/card/style/index.js +3 -7
- package/dist/cascader/hooks/useIcons.js +3 -2
- package/dist/cascader/index.d.ts +2 -0
- package/dist/checkbox/Group.js +4 -4
- package/dist/color-picker/style/input.js +6 -11
- package/dist/components.d.ts +23 -23
- package/dist/components.js +1 -2
- package/dist/config-provider/context.d.ts +3 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -4
- package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -4
- package/dist/date-picker/generatePicker/interface.d.ts +17 -5
- package/dist/date-picker/generatePicker/useComponents.d.ts +1 -14
- package/dist/date-picker/util.d.ts +6 -2
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/dropdown/style/index.js +0 -6
- package/dist/empty/index.js +2 -1
- package/dist/float-button/BackTop.js +2 -1
- package/dist/form/Form.js +8 -7
- package/dist/form/FormItem/index.js +9 -7
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/context.d.ts +2 -2
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/grid/hooks/useBreakpoint.js +12 -6
- package/dist/image/PreviewGroup.d.ts +9 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +7 -7
- package/dist/image/index.d.ts +3 -3
- package/dist/index.d.ts +25 -23
- package/dist/index.js +1 -2
- package/dist/input/style/index.js +2 -15
- package/dist/listy/interface.d.ts +23 -4
- package/dist/listy/style/index.js +1 -0
- package/dist/message/style/index.js +2 -1
- package/dist/modal/PurePanel.js +2 -2
- package/dist/modal/style/confirm.js +1 -1
- package/dist/notification/style/index.d.ts +3 -0
- package/dist/notification/style/index.js +4 -5
- package/dist/package.js +1 -1
- package/dist/pagination/style/index.js +12 -4
- package/dist/popconfirm/index.js +2 -1
- package/dist/progress/Line.js +2 -1
- package/dist/progress/progress.js +1 -1
- package/dist/qrcode/QrcodeStatus.js +2 -1
- package/dist/select/useIcons.d.ts +6 -2
- package/dist/slider/index.d.ts +6 -1
- package/dist/slider/index.js +5 -3
- package/dist/space/Compact.d.ts +1 -1
- package/dist/space/Item.d.ts +1 -0
- package/dist/space/Item.js +6 -2
- package/dist/space/index.js +1 -0
- package/dist/spin/Indicator/index.js +5 -1
- package/dist/splitter/Splitter.js +8 -2
- package/dist/splitter/interface.d.ts +1 -0
- package/dist/statistic/Statistic.d.ts +3 -0
- package/dist/statistic/Statistic.js +2 -1
- package/dist/steps/index.js +9 -7
- package/dist/switch/index.js +8 -2
- package/dist/table/InternalTable.js +20 -5
- package/dist/table/index.d.ts +2 -2
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/style/index.js +2 -6
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/time-picker/index.d.ts +10 -9
- package/dist/time-picker/index.js +20 -83
- package/dist/tooltip/style/index.js +0 -1
- package/dist/tree/DirectoryTree.d.ts +19 -7
- package/dist/tree/Tree.d.ts +73 -58
- package/dist/tree/index.d.ts +8 -5
- package/dist/tree/index.js +4 -3
- package/dist/upload/utils.js +8 -3
- package/dist/version/token.json +1 -1
- package/package.json +20 -20
- package/web-tags.json +6 -2
- package/web-types.json +11 -3
|
@@ -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): "" | "
|
|
6
|
+
declare function getMergedStatus(contextStatus?: ValidateStatus, customStatus?: InputStatus): "" | "success" | "error" | "warning" | "validating" | undefined;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { InputStatus, getMergedStatus, getStatusClassNames };
|
package/dist/_util/vueNode.d.ts
CHANGED
|
@@ -9,10 +9,20 @@ declare function replaceElement(element: VNodeChild, replacement: VNodeChild, pr
|
|
|
9
9
|
declare function cloneElement(element: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}> | import("vue").VNodeArrayChildren | null;
|
|
12
|
+
/**
|
|
13
|
+
* 当传入值是 VNode 时返回一个全新的克隆,数组会逐项处理,其余值原样返回。
|
|
14
|
+
*
|
|
15
|
+
* 用于模块级共享的默认 vnode(图标 / 图片等)。一旦原始 vnode 被真正挂载,
|
|
16
|
+
* Vue 会把 el / component 写回它身上;而模块级常量是常驻的 GC Root,Vue 在
|
|
17
|
+
* unmount 时又不会清空这些字段,于是这条引用会把已卸载页面的整条实例链一直
|
|
18
|
+
* 保留下来,造成内存泄漏。渲染前克隆可让模块原始 vnode 永远保持未挂载
|
|
19
|
+
* (el 恒为 null),从而彻底切断该引用链。
|
|
20
|
+
*/
|
|
21
|
+
declare function cloneIfVNode<T>(node: T): T;
|
|
12
22
|
declare function getVNode(node: VueNode): VNodeChild;
|
|
13
23
|
declare function checkRenderNode(node: any): any;
|
|
14
24
|
declare function getTextByNode(node: any): any;
|
|
15
25
|
declare function getTextNodeArr(nodes: any[]): any[];
|
|
16
26
|
type EmitToProps<T extends Record<string, any>> = { [K in keyof T as `on${Capitalize<K & string>}`]: T[K]; };
|
|
17
27
|
//#endregion
|
|
18
|
-
export { EmitToProps, checkRenderNode, cloneElement, getTextByNode, getTextNodeArr, getVNode, isFragment, replaceElement };
|
|
28
|
+
export { EmitToProps, checkRenderNode, cloneElement, cloneIfVNode, getTextByNode, getTextNodeArr, getVNode, isFragment, replaceElement };
|
package/dist/_util/vueNode.js
CHANGED
|
@@ -9,6 +9,22 @@ function replaceElement(element, replacement, props) {
|
|
|
9
9
|
function cloneElement(element, props) {
|
|
10
10
|
return replaceElement(element, element, props);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* 当传入值是 VNode 时返回一个全新的克隆,数组会逐项处理,其余值原样返回。
|
|
14
|
+
*
|
|
15
|
+
* 用于模块级共享的默认 vnode(图标 / 图片等)。一旦原始 vnode 被真正挂载,
|
|
16
|
+
* Vue 会把 el / component 写回它身上;而模块级常量是常驻的 GC Root,Vue 在
|
|
17
|
+
* unmount 时又不会清空这些字段,于是这条引用会把已卸载页面的整条实例链一直
|
|
18
|
+
* 保留下来,造成内存泄漏。渲染前克隆可让模块原始 vnode 永远保持未挂载
|
|
19
|
+
* (el 恒为 null),从而彻底切断该引用链。
|
|
20
|
+
*/
|
|
21
|
+
function cloneIfVNode(node) {
|
|
22
|
+
if (Array.isArray(node)) return node.map((item) => cloneIfVNode(item));
|
|
23
|
+
if (!isVNode(node)) return node;
|
|
24
|
+
const cloned = cloneVNode(node);
|
|
25
|
+
if (Array.isArray(cloned.children)) cloned.children = cloned.children.map((item) => cloneIfVNode(item));
|
|
26
|
+
return cloned;
|
|
27
|
+
}
|
|
12
28
|
function getVNode(node) {
|
|
13
29
|
if (typeof node === "function") return node?.();
|
|
14
30
|
return node;
|
|
@@ -33,4 +49,4 @@ function getTextNodeArr(nodes) {
|
|
|
33
49
|
return res;
|
|
34
50
|
}
|
|
35
51
|
//#endregion
|
|
36
|
-
export { checkRenderNode, cloneElement, getTextByNode, getTextNodeArr, getVNode, isFragment, replaceElement };
|
|
52
|
+
export { checkRenderNode, cloneElement, cloneIfVNode, getTextByNode, getTextNodeArr, getVNode, isFragment, replaceElement };
|
package/dist/affix/index.js
CHANGED
|
@@ -28,8 +28,8 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
28
28
|
const affixStyle = shallowRef();
|
|
29
29
|
const placeholderStyle = shallowRef();
|
|
30
30
|
const status = shallowRef(AFFIX_STATUS_NONE);
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
let prevTarget = null;
|
|
32
|
+
let prevListener = null;
|
|
33
33
|
const placeholderNodeRef = shallowRef();
|
|
34
34
|
const fixedNodeRef = shallowRef();
|
|
35
35
|
const contextRef = shallowRef();
|
|
@@ -94,17 +94,16 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
94
94
|
const listenerTarget = targetFunc.value();
|
|
95
95
|
if (!listenerTarget) return;
|
|
96
96
|
TRIGGER_EVENTS.forEach((eventName) => {
|
|
97
|
-
if (prevListener
|
|
97
|
+
if (prevListener) prevTarget?.removeEventListener(eventName, prevListener);
|
|
98
98
|
listenerTarget?.addEventListener(eventName, lazyUpdatePosition);
|
|
99
99
|
});
|
|
100
|
-
prevTarget
|
|
101
|
-
prevListener
|
|
100
|
+
prevTarget = listenerTarget;
|
|
101
|
+
prevListener = lazyUpdatePosition;
|
|
102
102
|
};
|
|
103
|
-
const removeListeners = () => {
|
|
104
|
-
const newTarget = targetFunc.value();
|
|
103
|
+
const removeListeners = (newTarget = targetFunc.value()) => {
|
|
105
104
|
TRIGGER_EVENTS.forEach((eventName) => {
|
|
106
105
|
newTarget?.removeEventListener(eventName, lazyUpdatePosition);
|
|
107
|
-
if (prevListener
|
|
106
|
+
if (prevListener) prevTarget?.removeEventListener(eventName, prevListener);
|
|
108
107
|
});
|
|
109
108
|
updatePosition.cancel();
|
|
110
109
|
lazyUpdatePosition.cancel();
|
|
@@ -113,7 +112,9 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
113
112
|
onMounted(() => {
|
|
114
113
|
timer.value = setTimeout(addListeners);
|
|
115
114
|
});
|
|
115
|
+
let unmounted = false;
|
|
116
116
|
onBeforeUnmount(() => {
|
|
117
|
+
unmounted = true;
|
|
117
118
|
if (timer.value) {
|
|
118
119
|
clearTimeout(timer.value);
|
|
119
120
|
timer.value = null;
|
|
@@ -128,8 +129,10 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
128
129
|
() => props.offsetBottom
|
|
129
130
|
], async (_new, _old, onCleanup) => {
|
|
130
131
|
await nextTick();
|
|
132
|
+
if (unmounted) return;
|
|
131
133
|
addListeners();
|
|
132
|
-
|
|
134
|
+
const target = prevTarget;
|
|
135
|
+
onCleanup(() => removeListeners(target));
|
|
133
136
|
});
|
|
134
137
|
watch([
|
|
135
138
|
() => props.target,
|
package/dist/anchor/Anchor.js
CHANGED
|
@@ -36,7 +36,8 @@ function getOffsetTop(element, container) {
|
|
|
36
36
|
}
|
|
37
37
|
const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
38
38
|
const links = ref([]);
|
|
39
|
-
|
|
39
|
+
let linkList = [];
|
|
40
|
+
const linkTargetOffsets = {};
|
|
40
41
|
const activeLink = shallowRef();
|
|
41
42
|
const _activeLink = shallowRef(activeLink.value);
|
|
42
43
|
const activeLinkRef = computed({
|
|
@@ -57,12 +58,16 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
57
58
|
const getCurrentContainer = () => props?.getContainer?.() ?? getTargetContainer?.() ?? getDefaultContainer?.();
|
|
58
59
|
const dependencyListItem = computed(() => JSON.stringify(links.value));
|
|
59
60
|
const registerLink = (link, targetOffset) => {
|
|
60
|
-
if (!
|
|
61
|
-
|
|
61
|
+
if (!linkList.includes(link)) {
|
|
62
|
+
linkList = [...linkList, link];
|
|
63
|
+
links.value = linkList;
|
|
64
|
+
}
|
|
65
|
+
if (targetOffset !== void 0) linkTargetOffsets[link] = targetOffset;
|
|
62
66
|
};
|
|
63
67
|
const unregisterLink = (link) => {
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
linkList = linkList.filter((item) => item !== link);
|
|
69
|
+
links.value = linkList;
|
|
70
|
+
delete linkTargetOffsets[link];
|
|
66
71
|
};
|
|
67
72
|
const updateInk = () => {
|
|
68
73
|
const linkNode = wrapperRef.value?.querySelector(`.${prefixCls.value}-link-title-active`);
|
|
@@ -88,7 +93,7 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
88
93
|
const target = document.getElementById(sharpLinkMatch[1]);
|
|
89
94
|
if (target) {
|
|
90
95
|
const top = getOffsetTop(target, container);
|
|
91
|
-
if (top <= (
|
|
96
|
+
if (top <= (linkTargetOffsets[link] ?? _offsetTop) + _bounds) linkSections.push({
|
|
92
97
|
link,
|
|
93
98
|
top
|
|
94
99
|
});
|
|
@@ -91,12 +91,11 @@ const prepareComponentToken = (token) => ({
|
|
|
91
91
|
linkPaddingInlineStart: token.padding
|
|
92
92
|
});
|
|
93
93
|
var style_default = genStyleHooks("Anchor", (token) => {
|
|
94
|
-
const { fontSize,
|
|
94
|
+
const { fontSize, paddingXXS, calc } = token;
|
|
95
95
|
const anchorToken = mergeToken(token, {
|
|
96
96
|
holderOffsetBlock: paddingXXS,
|
|
97
97
|
anchorPaddingBlockSecondary: calc(paddingXXS).div(2).equal(),
|
|
98
|
-
anchorTitleBlock: calc(fontSize).div(14).mul(3).equal()
|
|
99
|
-
anchorBallSize: calc(fontSizeLG).div(2).equal()
|
|
98
|
+
anchorTitleBlock: calc(fontSize).div(14).mul(3).equal()
|
|
100
99
|
});
|
|
101
100
|
return [genSharedAnchorStyle(anchorToken), genSharedAnchorHorizontalStyle(anchorToken)];
|
|
102
101
|
}, prepareComponentToken);
|