antdv-next 1.8.2 → 1.8.4
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/hooks/index.d.ts +2 -1
- package/dist/_util/hooks/index.js +2 -1
- package/dist/_util/hooks/useClosable.d.ts +3 -3
- package/dist/_util/hooks/useClosable.js +9 -9
- package/dist/_util/hooks/useScopeId.d.ts +7 -0
- package/dist/_util/hooks/useScopeId.js +15 -0
- package/dist/_util/scrollTo.js +1 -1
- package/dist/_util/statusUtils.js +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/affix/index.js +2 -7
- package/dist/anchor/Anchor.js +4 -2
- package/dist/antd-with-locales.esm.js +17314 -16799
- package/dist/antd-with-locales.js +81 -81
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14978 -14467
- package/dist/antd.js +81 -81
- package/dist/badge/SingleNumber.js +11 -2
- package/dist/badge/index.d.ts +4 -1
- package/dist/badge/index.js +4 -4
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/button/style/index.js +8 -2
- package/dist/calendar/generateCalendar.d.ts +5 -4
- package/dist/calendar/generateCalendar.js +4 -7
- package/dist/card/Card.d.ts +4 -1
- package/dist/card/Card.js +24 -18
- package/dist/card/index.d.ts +2 -2
- package/dist/cascader/index.d.ts +5 -2
- package/dist/cascader/index.js +10 -7
- package/dist/checkbox/Checkbox.js +3 -0
- package/dist/checkbox/Group.d.ts +2 -1
- package/dist/checkbox/Group.js +3 -7
- package/dist/color-picker/ColorPicker.js +4 -0
- package/dist/color-picker/ColorPickerPanel.js +4 -0
- package/dist/color-picker/components/ColorSlider.js +12 -4
- package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
- package/dist/components.d.ts +13 -9
- package/dist/components.js +3 -3
- package/dist/config-provider/context.d.ts +3 -3
- package/dist/config-provider/context.js +3 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -5
- package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -6
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/hooks/useRow.js +1 -1
- package/dist/float-button/FloatButtonGroup.js +3 -1
- package/dist/float-button/style/button.js +2 -2
- package/dist/form/Form.d.ts +17 -44
- package/dist/form/Form.js +54 -5
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/FormItem/index.js +4 -0
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useForm.d.ts +4 -5
- package/dist/form/index.d.ts +29 -3
- package/dist/form/index.js +6 -6
- package/dist/form/types.d.ts +15 -7
- package/dist/image/hooks/usePreviewConfig.d.ts +6 -6
- package/dist/image/index.d.ts +5 -5
- package/dist/index.d.ts +15 -8
- package/dist/index.js +2 -2
- package/dist/input/Group.d.ts +3 -2
- package/dist/input/Group.js +23 -19
- package/dist/input/Input.d.ts +8 -1
- package/dist/input/Input.js +4 -0
- package/dist/input/OTP/OTPInput.js +4 -0
- package/dist/input/Password.js +4 -0
- package/dist/input/Search.js +4 -0
- package/dist/input/TextArea.d.ts +2 -0
- package/dist/input/TextArea.js +8 -0
- package/dist/input/index.d.ts +2 -2
- package/dist/input-number/style/index.js +3 -2
- package/dist/layout/layout.js +2 -3
- package/dist/listy/index.js +4 -3
- package/dist/locale/ko_KR.js +25 -23
- package/dist/locale/pt_BR.js +9 -7
- package/dist/mentions/index.js +10 -1
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/index.d.ts +2 -1
- package/dist/menu/index.js +29 -5
- package/dist/menu/menu.js +41 -15
- package/dist/message/index.js +11 -9
- package/dist/modal/confirm.js +2 -3
- package/dist/modal/index.d.ts +2 -2
- package/dist/modal/interface.d.ts +1 -1
- package/dist/modal/useModal/index.js +9 -4
- package/dist/notification/index.js +3 -7
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +1 -0
- package/dist/pagination/Pagination.js +3 -1
- package/dist/radio/group.d.ts +1 -0
- package/dist/radio/group.js +2 -5
- package/dist/radio/interface.d.ts +1 -1
- package/dist/segmented/style/index.js +3 -2
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +3 -7
- package/dist/select/useIcons.d.ts +3 -1
- package/dist/select/useIcons.js +5 -2
- package/dist/skeleton/style/index.js +9 -13
- package/dist/slider/SliderTooltip.js +0 -1
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +4 -0
- package/dist/splitter/Splitter.d.ts +2 -3
- package/dist/splitter/Splitter.js +18 -34
- package/dist/splitter/interface.d.ts +17 -8
- package/dist/statistic/Timer.d.ts +2 -2
- package/dist/steps/index.js +2 -1
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/hooks/usePagination.d.ts +1 -2
- package/dist/table/hooks/usePagination.js +1 -3
- package/dist/table/hooks/useSorter.js +4 -8
- package/dist/table/style/index.js +1 -0
- package/dist/table/style/size.js +1 -0
- package/dist/tabs/style/index.js +5 -1
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/theme/themes/dark/colors.d.ts +2 -1
- package/dist/theme/themes/dark/colors.js +19 -3
- package/dist/theme/themes/dark/index.js +2 -3
- package/dist/tour/index.js +4 -1
- package/dist/tour/style/index.js +6 -6
- package/dist/transfer/ListItem.js +1 -0
- package/dist/transfer/Section.js +1 -0
- package/dist/transfer/hooks/useSelection.js +2 -1
- package/dist/tree/DirectoryTree.js +11 -6
- package/dist/tree/utils/dictUtil.js +5 -8
- package/dist/typography/Base/EllipsisTooltip.js +5 -1
- package/dist/typography/Base/index.js +11 -8
- package/dist/typography/Base/util.js +2 -1
- package/dist/upload/Dragger.js +0 -8
- package/dist/upload/Upload.d.ts +2 -0
- package/dist/upload/Upload.js +23 -22
- package/dist/upload/UploadList/ListItem.js +4 -0
- package/dist/upload/UploadList/index.js +6 -1
- package/dist/upload/interface.d.ts +4 -2
- package/dist/version/token.json +1 -1
- package/dist/watermark/utils.js +1 -1
- package/package.json +44 -43
- package/web-tags.json +22 -14
- package/web-types.json +64 -31
|
@@ -2,5 +2,6 @@ import { MaskConfig, MaskType, normalizeMaskConfig, useMergedMask } from "./useM
|
|
|
2
2
|
import { Resolvable, SemanticClassNames, SemanticClassNamesType, SemanticSchema, SemanticStyles, SemanticStylesType, SemanticType, getAttrStyleAndClass, mergeClassNames, mergeStyles, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useSemanticRootStyle, useToArr, useToProps } from "./useMergeSemantic.js";
|
|
3
3
|
import { PrevSelectedIndex, useMultipleSelect } from "./useMultipleSelect.js";
|
|
4
4
|
import { Orientation, useOrientation } from "./useOrientation.js";
|
|
5
|
+
import { useScopeIdAttrs, useScopeIdOnElement } from "./useScopeId.js";
|
|
5
6
|
import { CONTAINER_MAX_OFFSET, ZIndexConsumer, ZIndexContainer, consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from "./useZIndex.js";
|
|
6
|
-
export { CONTAINER_MAX_OFFSET, MaskConfig, MaskType, Orientation, PrevSelectedIndex, Resolvable, SemanticClassNames, SemanticClassNamesType, SemanticSchema, SemanticStyles, SemanticStylesType, SemanticType, ZIndexConsumer, ZIndexContainer, consumerBaseZIndexOffset, containerBaseZIndexOffset, getAttrStyleAndClass, mergeClassNames, mergeStyles, normalizeMaskConfig, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useMergedMask, useMultipleSelect, useOrientation, useSemanticRootStyle, useToArr, useToProps, useZIndex };
|
|
7
|
+
export { CONTAINER_MAX_OFFSET, MaskConfig, MaskType, Orientation, PrevSelectedIndex, Resolvable, SemanticClassNames, SemanticClassNamesType, SemanticSchema, SemanticStyles, SemanticStylesType, SemanticType, ZIndexConsumer, ZIndexContainer, consumerBaseZIndexOffset, containerBaseZIndexOffset, getAttrStyleAndClass, mergeClassNames, mergeStyles, normalizeMaskConfig, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useMergedMask, useMultipleSelect, useOrientation, useScopeIdAttrs, useScopeIdOnElement, useSemanticRootStyle, useToArr, useToProps, useZIndex };
|
|
@@ -2,5 +2,6 @@ import { normalizeMaskConfig, useMergedMask } from "./useMergedMask.js";
|
|
|
2
2
|
import { getAttrStyleAndClass, mergeClassNames, mergeStyles, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useSemanticRootStyle, useToArr, useToProps } from "./useMergeSemantic.js";
|
|
3
3
|
import { useMultipleSelect } from "./useMultipleSelect.js";
|
|
4
4
|
import { useOrientation } from "./useOrientation.js";
|
|
5
|
+
import { useScopeIdAttrs, useScopeIdOnElement } from "./useScopeId.js";
|
|
5
6
|
import { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from "./useZIndex.js";
|
|
6
|
-
export { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, getAttrStyleAndClass, mergeClassNames, mergeStyles, normalizeMaskConfig, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useMergedMask, useMultipleSelect, useOrientation, useSemanticRootStyle, useToArr, useToProps, useZIndex };
|
|
7
|
+
export { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, getAttrStyleAndClass, mergeClassNames, mergeStyles, normalizeMaskConfig, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useMergedMask, useMultipleSelect, useOrientation, useScopeIdAttrs, useScopeIdOnElement, useSemanticRootStyle, useToArr, useToProps, useZIndex };
|
|
@@ -34,11 +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<({} | null)[] | 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, void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
38
38
|
[key: string]: any;
|
|
39
|
-
}
|
|
39
|
+
}> | null | undefined, boolean, {
|
|
40
40
|
readonly 'aria-label': any;
|
|
41
|
-
}]
|
|
41
|
+
}]>;
|
|
42
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];
|
|
43
43
|
//#endregion
|
|
44
44
|
export { BaseContextClosable, ClosableType, ContextClosable, UseClosableParams, computeClosable, useClosable as default, pickClosable };
|
|
@@ -78,16 +78,16 @@ function useClosable(propCloseCollection, contextCloseCollection, fallbackCloseC
|
|
|
78
78
|
"aria-label": mergedCloseIcon.props?.["aria-label"] ?? contextLocale?.value?.close,
|
|
79
79
|
...ariaOrDataProps
|
|
80
80
|
}) : createVNode("span", mergeProps({ "aria-label": contextLocale?.value?.close }, ariaOrDataProps), [mergedCloseIcon]);
|
|
81
|
-
return [
|
|
82
|
-
true,
|
|
83
|
-
mergedCloseIcon,
|
|
84
|
-
closeBtnIsDisabled.value,
|
|
85
|
-
{
|
|
86
|
-
"aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
|
|
87
|
-
...ariaOrDataProps
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
81
|
}
|
|
82
|
+
return [
|
|
83
|
+
true,
|
|
84
|
+
mergedCloseIcon,
|
|
85
|
+
closeBtnIsDisabled.value,
|
|
86
|
+
{
|
|
87
|
+
"aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
|
|
88
|
+
...ariaOrDataProps
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
function computeClosableConfig(closable, closeIcon) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
+
import { useScopeIdAttrs } from "@v-c/util";
|
|
3
|
+
//#region src/_util/hooks/useScopeId.d.ts
|
|
4
|
+
type ScopeElement = HTMLElement | Ref<HTMLElement | undefined> | undefined;
|
|
5
|
+
declare function useScopeIdOnElement(elementRef: MaybeRefOrGetter<ScopeElement>): void;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { useScopeIdAttrs, useScopeIdOnElement };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { onMounted, onUpdated, toValue, unref } from "vue";
|
|
2
|
+
import { useScopeIdAttrs } from "@v-c/util";
|
|
3
|
+
//#region src/_util/hooks/useScopeId.ts
|
|
4
|
+
function useScopeIdOnElement(elementRef) {
|
|
5
|
+
const scopeIdAttrs = useScopeIdAttrs();
|
|
6
|
+
const applyScopeId = () => {
|
|
7
|
+
const element = unref(toValue(elementRef));
|
|
8
|
+
if (!element) return;
|
|
9
|
+
Object.entries(scopeIdAttrs).forEach(([key, value]) => element.setAttribute(key, value));
|
|
10
|
+
};
|
|
11
|
+
onMounted(applyScopeId);
|
|
12
|
+
onUpdated(applyScopeId);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useScopeIdAttrs, useScopeIdOnElement };
|
package/dist/_util/scrollTo.js
CHANGED
|
@@ -7,7 +7,7 @@ function scrollTo(y, options = {}) {
|
|
|
7
7
|
const container = getContainer();
|
|
8
8
|
const scrollTop = getScroll(container);
|
|
9
9
|
const scroll = (top) => {
|
|
10
|
-
if (isWindow(container)) container.scrollTo(
|
|
10
|
+
if (isWindow(container)) container.scrollTo(container.pageXOffset, top);
|
|
11
11
|
else if (isDocument(container)) container.documentElement.scrollTop = top;
|
|
12
12
|
else container.scrollTop = top;
|
|
13
13
|
};
|
|
@@ -10,7 +10,7 @@ function getStatusClassNames(prefixCls, status, hasFeedback) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
function getMergedStatus(contextStatus, customStatus) {
|
|
13
|
-
return customStatus
|
|
13
|
+
return customStatus ?? contextStatus;
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
export { getMergedStatus, getStatusClassNames };
|
package/dist/_util/vueNode.d.ts
CHANGED
|
@@ -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):
|
|
7
|
-
|
|
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
|
/**
|
|
13
9
|
* 当传入值是 VNode 时返回一个全新的克隆,数组会逐项处理,其余值原样返回。
|
|
14
10
|
*
|
package/dist/affix/index.js
CHANGED
|
@@ -20,15 +20,12 @@ const TRIGGER_EVENTS = [
|
|
|
20
20
|
function getDefaultTarget() {
|
|
21
21
|
return typeof window !== "undefined" ? window : null;
|
|
22
22
|
}
|
|
23
|
-
const AFFIX_STATUS_NONE = 0;
|
|
24
|
-
const AFFIX_STATUS_PREPARE = 1;
|
|
25
23
|
const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
26
24
|
const configContext = useConfig();
|
|
27
25
|
const { prefixCls: affixPrefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("affix", props);
|
|
28
26
|
const lastAffix = shallowRef(false);
|
|
29
27
|
const affixStyle = shallowRef();
|
|
30
28
|
const placeholderStyle = shallowRef();
|
|
31
|
-
const status = shallowRef(AFFIX_STATUS_NONE);
|
|
32
29
|
let prevTarget = null;
|
|
33
30
|
let prevListener = null;
|
|
34
31
|
const placeholderNodeRef = shallowRef();
|
|
@@ -42,10 +39,10 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
42
39
|
return offsetBottom === void 0 && offsetTop === void 0 ? 0 : offsetTop;
|
|
43
40
|
});
|
|
44
41
|
const measure = () => {
|
|
45
|
-
if (
|
|
42
|
+
if (!fixedNodeRef.value || !placeholderNodeRef.value) return;
|
|
46
43
|
const targetNode = targetFunc.value();
|
|
47
44
|
if (targetNode) {
|
|
48
|
-
const newState = {
|
|
45
|
+
const newState = {};
|
|
49
46
|
const placeholderRect = getTargetRect(placeholderNodeRef.value);
|
|
50
47
|
const contentHeight = getTargetRect(contextRef.value || fixedNodeRef.value).height || placeholderRect.height;
|
|
51
48
|
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) return;
|
|
@@ -66,14 +63,12 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
|
|
|
66
63
|
}
|
|
67
64
|
newState.lastAffix = !!newState.affixStyle;
|
|
68
65
|
if (lastAffix.value !== newState.lastAffix) emit("change", newState.lastAffix);
|
|
69
|
-
status.value = newState.status;
|
|
70
66
|
affixStyle.value = newState.affixStyle;
|
|
71
67
|
placeholderStyle.value = newState.placeholderStyle;
|
|
72
68
|
lastAffix.value = newState.lastAffix;
|
|
73
69
|
}
|
|
74
70
|
};
|
|
75
71
|
const prepareMeasure = () => {
|
|
76
|
-
status.value = AFFIX_STATUS_PREPARE;
|
|
77
72
|
measure();
|
|
78
73
|
};
|
|
79
74
|
const updatePosition = throttleByAnimationFrame(() => {
|
package/dist/anchor/Anchor.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useScopeIdAttrs } from "../_util/hooks/useScopeId.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { clsx as clsx$1, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
4
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
@@ -48,6 +49,7 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
48
49
|
});
|
|
49
50
|
const rawActiveLink = shallowRef(activeLink.value);
|
|
50
51
|
const wrapperRef = shallowRef();
|
|
52
|
+
const scopeIdAttrs = useScopeIdAttrs();
|
|
51
53
|
const spanLinkNode = shallowRef();
|
|
52
54
|
const animatingRef = shallowRef(false);
|
|
53
55
|
const scrollRequestIdRef = shallowRef(null);
|
|
@@ -209,11 +211,11 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
209
211
|
}), { default: () => [anchorDirection.value === "vertical" && createNestedLink(item.children)] });
|
|
210
212
|
}) : null;
|
|
211
213
|
};
|
|
212
|
-
const anchorContent = createVNode("div", {
|
|
214
|
+
const anchorContent = createVNode("div", mergeProps(scopeIdAttrs, {
|
|
213
215
|
"ref": wrapperRef,
|
|
214
216
|
"class": wrapperClass,
|
|
215
217
|
"style": wrapperStyle
|
|
216
|
-
}, [createVNode("div", { "class": anchorClass }, [createVNode("span", {
|
|
218
|
+
}), [createVNode("div", { "class": anchorClass }, [createVNode("span", {
|
|
217
219
|
"class": inkClass,
|
|
218
220
|
"ref": spanLinkNode,
|
|
219
221
|
"style": mergedStyles.value.indicator
|