antdv-next 1.5.1 → 1.5.2
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/useClosable.d.ts +4 -2
- package/dist/_util/hooks/useClosable.js +9 -3
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/anchor/Anchor.js +12 -6
- package/dist/antd-with-locales.esm.js +10739 -10434
- package/dist/antd-with-locales.js +82 -82
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +7777 -7476
- package/dist/antd.js +36 -36
- package/dist/carousel/index.js +5 -2
- package/dist/collapse/Collapse.js +2 -4
- package/dist/color-picker/components/ColorTrigger.js +1 -1
- package/dist/color-picker/style/index.js +1 -0
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -2
- package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/float-button/style/button.js +16 -10
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +4 -5
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/form/style/index.js +25 -12
- package/dist/image/hooks/usePreviewConfig.d.ts +4 -4
- package/dist/listy/style/index.js +5 -1
- package/dist/locale/en_US.js +4 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/is_IS.js +1 -1
- package/dist/locale/mn_MN.js +1 -1
- package/dist/locale/zh_CN.js +4 -0
- package/dist/menu/MenuItem.js +12 -2
- package/dist/menu/SubMenu.d.ts +1 -1
- package/dist/menu/style/vertical.js +2 -6
- package/dist/notification/index.js +2 -1
- package/dist/notification/useNotification.js +8 -4
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +4 -0
- package/dist/radio/group.js +2 -2
- package/dist/select/index.js +1 -1
- package/dist/select/style/index.js +1 -1
- package/dist/space/Compact.d.ts +1 -1
- package/dist/table/InternalTable.js +5 -4
- package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
- package/dist/table/style/radius.js +4 -0
- package/dist/table/util.d.ts +1 -1
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tour/panelRender.js +2 -8
- package/dist/transfer/ListBody.js +2 -1
- package/dist/transfer/ListItem.d.ts +1 -0
- package/dist/transfer/ListItem.js +6 -2
- package/dist/transfer/search.js +2 -2
- package/dist/tree/utils/dictUtil.js +3 -2
- package/dist/upload/UploadList/ListItem.js +2 -1
- package/dist/upload/UploadList/index.js +8 -2
- package/dist/version/token-meta.json +1 -0
- package/dist/version/token.json +1 -0
- package/package.json +8 -4
- package/web-tags.json +1609 -1605
- package/web-types.json +4395 -4382
package/dist/carousel/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import { devUseWarning, isDev } from "../_util/warning.js";
|
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { getAttrStyleAndClass as getAttrStyleAndClass$1 } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
5
|
+
import localeValues from "../locale/en_US.js";
|
|
6
|
+
import useLocale from "../locale/useLocale.js";
|
|
5
7
|
import style_default, { DotDuration } from "./style/index.js";
|
|
6
8
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, onMounted, shallowRef, watch } from "vue";
|
|
7
9
|
import { clsx } from "@v-c/util";
|
|
@@ -59,6 +61,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
59
61
|
});
|
|
60
62
|
const mergedVertical = computed(() => props?.vertical ?? (mergedDotPlacement.value === "start" || mergedDotPlacement.value === "end"));
|
|
61
63
|
const { prefixCls, direction, class: contextClassName, style: contextStyle } = useComponentBaseConfig("carousel", props);
|
|
64
|
+
const [contextLocale] = useLocale("Carousel", localeValues.Carousel);
|
|
62
65
|
const slickRef = shallowRef();
|
|
63
66
|
const nativeElementRef = shallowRef();
|
|
64
67
|
const goTo = (slide, dontAnimate = false) => {
|
|
@@ -140,8 +143,8 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
140
143
|
"dots": enableDots,
|
|
141
144
|
"dotsClass": dsClass,
|
|
142
145
|
"arrows": arrows,
|
|
143
|
-
"prevArrow": prevArrow ?? createVNode(ArrowButton, { "aria-label": isRTL.value ?
|
|
144
|
-
"nextArrow": nextArrow ?? createVNode(ArrowButton, { "aria-label": isRTL.value ?
|
|
146
|
+
"prevArrow": prevArrow ?? createVNode(ArrowButton, { "aria-label": isRTL.value ? contextLocale.value.nextSlide : contextLocale.value.prevSlide }, null),
|
|
147
|
+
"nextArrow": nextArrow ?? createVNode(ArrowButton, { "aria-label": isRTL.value ? contextLocale.value.prevSlide : contextLocale.value.nextSlide }, null),
|
|
145
148
|
"draggable": draggable,
|
|
146
149
|
"verticalSwiping": mergedVertical.value,
|
|
147
150
|
"autoplaySpeed": autoplaySpeed,
|
|
@@ -30,10 +30,8 @@ const Collapse = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots })
|
|
|
30
30
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
|
|
31
31
|
const renderExpandIcon = (panelProps = {}) => {
|
|
32
32
|
const mergedExpandIcon = slots?.expandIcon ?? props?.expandIcon ?? expandIcon.value;
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
"aria-label": panelProps.isActive ? "expanded" : "collapsed"
|
|
36
|
-
}, null);
|
|
33
|
+
const iconIsInteractive = panelProps.collapsible === "header" || panelProps.collapsible === "icon";
|
|
34
|
+
const icon = typeof mergedExpandIcon === "function" ? mergedExpandIcon?.(panelProps) : createVNode(RightOutlined, mergeProps({ "rotate": panelProps.isActive ? direction.value === "rtl" ? -90 : 90 : void 0 }, iconIsInteractive ? { "aria-label": panelProps.isActive ? "expanded" : "collapsed" } : { "aria-hidden": "true" }), null);
|
|
37
35
|
return cloneElement(icon, () => {
|
|
38
36
|
return { class: classNames(icon.props?.class, `${prefixCls.value}-arrow`) };
|
|
39
37
|
});
|
|
@@ -55,7 +55,7 @@ var ColorTrigger_default = /* @__PURE__ */ defineComponent((props, { attrs }) =>
|
|
|
55
55
|
"style": [styles.root, style]
|
|
56
56
|
}), [containerNode.value, props.showText && createVNode("div", {
|
|
57
57
|
"class": [colorTextPrefixCls.value, classes.description],
|
|
58
|
-
"style":
|
|
58
|
+
"style": styles.description
|
|
59
59
|
}, [desc.value])]);
|
|
60
60
|
};
|
|
61
61
|
}, {
|
|
@@ -10,6 +10,7 @@ import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
|
10
10
|
import { useDisabledContext } from "../../config-provider/DisabledContext.js";
|
|
11
11
|
import locale from "../locale/en_US.js";
|
|
12
12
|
import useLocale from "../../locale/useLocale.js";
|
|
13
|
+
import { isNonNullable } from "../../_util/is.js";
|
|
13
14
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
14
15
|
import { useFormItemInputContext } from "../../form/context.js";
|
|
15
16
|
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
@@ -142,12 +143,13 @@ function generateRangePicker(generateConfig) {
|
|
|
142
143
|
const inputRender = slots.inputRender || props.inputRender ? (inputProps) => resolveRender("inputRender", [inputProps], inputProps) : void 0;
|
|
143
144
|
const _contextSeparator = getSlotPropsFnRun({}, { separator: contextSeparator?.value }, "separator", false);
|
|
144
145
|
const mergedSeparator = (getSlotPropsFnRun(slots, props, "separator", false) || _contextSeparator) ?? _contextSeparator;
|
|
146
|
+
const hasCustomSeparator = isNonNullable(mergedSeparator);
|
|
145
147
|
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(RangePicker, mergeProps(restAttrs, restProps, {
|
|
146
148
|
"ref": innerRef,
|
|
147
149
|
"separator": createVNode("span", {
|
|
148
|
-
"aria-
|
|
150
|
+
"aria-hidden": hasCustomSeparator ? void 0 : true,
|
|
149
151
|
"class": `${prefixCls.value}-separator`
|
|
150
|
-
}, [mergedSeparator
|
|
152
|
+
}, [hasCustomSeparator ? mergedSeparator : createVNode(SwapRightOutlined, null, null)]),
|
|
151
153
|
"disabled": mergedDisabled.value,
|
|
152
154
|
"placement": placement,
|
|
153
155
|
"placeholder": getRangePlaceholder(locale$1.value, props.picker, placeholder),
|
|
@@ -4,11 +4,11 @@ import { Components } from "@v-c/picker";
|
|
|
4
4
|
//#region src/date-picker/generatePicker/useComponents.d.ts
|
|
5
5
|
declare function useComponents(components?: Components): {
|
|
6
6
|
time?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
7
|
-
year?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
8
|
-
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
7
|
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
10
8
|
week?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
|
+
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
10
|
quarter?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
|
+
year?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
12
12
|
decade?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
13
13
|
datetime?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
14
14
|
button: string | import("vue").DefineSetupFnComponent<ButtonProps, {}, {}, ButtonProps & {}, import("vue").PublicProps> | import("vue").DefineComponent;
|
|
@@ -8,21 +8,21 @@ declare function useItems(screens: Ref<ScreenMap>, items: Ref<DescriptionsItemTy
|
|
|
8
8
|
filled: boolean;
|
|
9
9
|
_$index: number;
|
|
10
10
|
key?: import("@v-c/util/dist/type").Key;
|
|
11
|
-
classes?: CellSemanticClassNames | undefined;
|
|
12
11
|
styles?: CellSemanticStyles | undefined;
|
|
13
12
|
style?: import("vue").CSSProperties | undefined;
|
|
14
|
-
rootClass?: string | undefined;
|
|
15
13
|
class?: string | undefined;
|
|
14
|
+
rootClass?: string | undefined;
|
|
15
|
+
classes?: CellSemanticClassNames | undefined;
|
|
16
16
|
label?: VueNode;
|
|
17
17
|
content?: VueNode;
|
|
18
18
|
} | {
|
|
19
19
|
span: number | undefined;
|
|
20
20
|
key?: import("@v-c/util/dist/type").Key;
|
|
21
|
-
classes?: CellSemanticClassNames | undefined;
|
|
22
21
|
styles?: CellSemanticStyles | undefined;
|
|
23
22
|
style?: import("vue").CSSProperties | undefined;
|
|
24
|
-
rootClass?: string | undefined;
|
|
25
23
|
class?: string | undefined;
|
|
24
|
+
rootClass?: string | undefined;
|
|
25
|
+
classes?: CellSemanticClassNames | undefined;
|
|
26
26
|
label?: VueNode;
|
|
27
27
|
content?: VueNode;
|
|
28
28
|
_$index: number;
|
|
@@ -4,7 +4,7 @@ import { unit } from "@antdv-next/cssinjs";
|
|
|
4
4
|
const genFloatButtonStyle = (token) => {
|
|
5
5
|
const { componentCls, floatButtonSize, iconCls, antCls, floatButtonIconSize } = token;
|
|
6
6
|
const [varName, varRef] = genCssVar(antCls, "float-btn");
|
|
7
|
-
const [
|
|
7
|
+
const [, buttonVarRef] = genCssVar(antCls, "btn");
|
|
8
8
|
const getProgressBackground = (backgroundColor) => [`linear-gradient(${backgroundColor}, ${backgroundColor})`, `conic-gradient(${token.colorPrimary} ${varRef("progress", "0turn")}, ${token.colorBorderSecondary} 0)`].join(", ");
|
|
9
9
|
const badgeCls = `${componentCls}-badge`;
|
|
10
10
|
const R = Math.SQRT2;
|
|
@@ -35,20 +35,26 @@ const genFloatButtonStyle = (token) => {
|
|
|
35
35
|
},
|
|
36
36
|
"&:empty": { display: "none" },
|
|
37
37
|
[`${componentCls}-icon`]: { lineHeight: 1 },
|
|
38
|
-
[`&${componentCls}-progress`]: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[buttonVarName("border-color-hover")]: "transparent",
|
|
42
|
-
[buttonVarName("border-color-active")]: "transparent",
|
|
43
|
-
[buttonVarName("border-color-disabled")]: "transparent",
|
|
38
|
+
[`&${antCls}-btn${componentCls}-progress`]: {
|
|
39
|
+
borderWidth: unit(token.lineWidthBold),
|
|
40
|
+
borderColor: "transparent",
|
|
44
41
|
backgroundImage: getProgressBackground(buttonVarRef("bg-color")),
|
|
45
42
|
backgroundOrigin: "border-box",
|
|
46
43
|
backgroundClip: "padding-box, border-box",
|
|
47
44
|
[`&:not(:disabled):not(${antCls}-btn-disabled)`]: {
|
|
48
|
-
"&:hover": {
|
|
49
|
-
|
|
45
|
+
"&:hover": {
|
|
46
|
+
borderColor: "transparent",
|
|
47
|
+
backgroundImage: getProgressBackground(buttonVarRef("bg-color-hover"))
|
|
48
|
+
},
|
|
49
|
+
"&:active": {
|
|
50
|
+
borderColor: "transparent",
|
|
51
|
+
backgroundImage: getProgressBackground(buttonVarRef("bg-color-active"))
|
|
52
|
+
}
|
|
50
53
|
},
|
|
51
|
-
[`&:disabled, &${antCls}-btn-disabled`]: {
|
|
54
|
+
[`&:disabled, &${antCls}-btn-disabled`]: {
|
|
55
|
+
borderColor: "transparent",
|
|
56
|
+
backgroundImage: getProgressBackground(buttonVarRef("bg-color-disabled"))
|
|
57
|
+
}
|
|
52
58
|
},
|
|
53
59
|
[`&${componentCls}-icon-only`]: { [iconCls]: { fontSize: floatButtonIconSize } },
|
|
54
60
|
[`${componentCls}-content`]: { fontSize: token.fontSizeSM },
|
|
@@ -28,7 +28,7 @@ const ItemHolder = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
|
|
|
28
28
|
}
|
|
29
29
|
}, { immediate: true });
|
|
30
30
|
const onErrorVisibleChanged = (visible) => {
|
|
31
|
-
if (!visible) marginBottom.value = null;
|
|
31
|
+
if (!visible && !hasError.value) marginBottom.value = null;
|
|
32
32
|
};
|
|
33
33
|
function getValidateState(isDebounce = false) {
|
|
34
34
|
return getStatus(isDebounce ? props?.errors : props?.meta?.errors, isDebounce ? props?.warnings : props?.meta?.warnings, props?.meta, "", !!props?.hasFeedback, props?.validateStatus);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
2
2
|
import { getSlotPropsFnRun } from "../../_util/tools.js";
|
|
3
3
|
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
4
|
-
import { checkRenderNode } from "../../_util/vueNode.js";
|
|
5
4
|
import { useFormContext, useFormItemProvider, useNoStyleItemContext } from "../context.js";
|
|
6
5
|
import { getFieldId, initialValueFormat, toArray, toNamePathStr } from "../util.js";
|
|
7
6
|
import { useFormInstance } from "../hooks/useForm.js";
|
|
@@ -302,11 +301,11 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
302
301
|
triggerFocus: onFieldFocus
|
|
303
302
|
});
|
|
304
303
|
return () => {
|
|
305
|
-
return renderLayout(
|
|
304
|
+
return renderLayout(filterEmpty(slots.default?.() ?? []), fieldId.value, isRequired.value);
|
|
306
305
|
};
|
|
307
306
|
function renderLayout(baseChildren, currentFieldId, isRequiredMark) {
|
|
308
|
-
if (Array.isArray(baseChildren) && baseChildren.length === 1 && isVNode(baseChildren[0])
|
|
309
|
-
const child =
|
|
307
|
+
if (Array.isArray(baseChildren) && baseChildren.length === 1 && isVNode(baseChildren[0])) {
|
|
308
|
+
const child = baseChildren[0];
|
|
310
309
|
const childProps = child.props || {};
|
|
311
310
|
const _onBlur = childProps.onBlur;
|
|
312
311
|
const _onFocus = childProps.onFocus;
|
|
@@ -341,7 +340,7 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
341
340
|
}
|
|
342
341
|
if (itemErrors.length > 0) newChildProps["aria-invalid"] = "true";
|
|
343
342
|
if (props.required ?? isRequiredMark) newChildProps["aria-required"] = "true";
|
|
344
|
-
baseChildren = createVNode(child, newChildProps);
|
|
343
|
+
baseChildren = [createVNode(child, newChildProps)];
|
|
345
344
|
}
|
|
346
345
|
if (props.noStyle && !props.hidden) return createVNode(StatusProvider, {
|
|
347
346
|
"prefixCls": prefixCls.value,
|
package/dist/form/context.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare function useFormItemPrefixContext(): Ref<{
|
|
|
71
71
|
prefixCls: string;
|
|
72
72
|
}>;
|
|
73
73
|
declare function useVariantContextProvider(variant: Ref<Variant | undefined>): void;
|
|
74
|
-
declare function useVariantContext(): Ref<"outlined" | "
|
|
74
|
+
declare function useVariantContext(): Ref<"outlined" | "borderless" | "filled" | "underlined" | undefined, "outlined" | "borderless" | "filled" | "underlined" | undefined>;
|
|
75
75
|
interface FormItemStatusContextProps {
|
|
76
76
|
isFormItemInput?: boolean;
|
|
77
77
|
status?: ValidateStatus;
|
|
@@ -3,7 +3,7 @@ import { Variant } from "../../config-provider/context.js";
|
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
//#region src/form/hooks/useVariant.d.ts
|
|
5
5
|
type VariantComponents = keyof Pick<ConfigProviderProps, 'input' | 'inputPassword' | 'inputSearch' | 'otp' | 'inputNumber' | 'textArea' | 'mentions' | 'select' | 'cascader' | 'treeSelect' | 'datePicker' | 'timePicker' | 'rangePicker' | 'card'>;
|
|
6
|
-
declare function useVariant(component: VariantComponents, variant?: Ref<Variant | undefined>, legacyBordered?: Ref<boolean | undefined> | boolean, fallbackComponent?: VariantComponents): readonly [import("vue").ComputedRef<"outlined" | "
|
|
6
|
+
declare function useVariant(component: VariantComponents, variant?: Ref<Variant | undefined>, legacyBordered?: Ref<boolean | undefined> | boolean, fallbackComponent?: VariantComponents): readonly [import("vue").ComputedRef<"outlined" | "borderless" | "filled" | "underlined">, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<boolean>];
|
|
7
7
|
declare const useVariants: typeof useVariant;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { useVariant as default, useVariants };
|
package/dist/form/style/index.js
CHANGED
|
@@ -194,9 +194,8 @@ const genFormItemStyle = (token) => {
|
|
|
194
194
|
}
|
|
195
195
|
} };
|
|
196
196
|
};
|
|
197
|
-
const
|
|
197
|
+
const makeVerticalLayoutLabelBase = (token) => ({
|
|
198
198
|
padding: token.verticalLabelPadding,
|
|
199
|
-
margin: token.verticalLabelMargin,
|
|
200
199
|
whiteSpace: "initial",
|
|
201
200
|
textAlign: "start",
|
|
202
201
|
"> label": {
|
|
@@ -204,6 +203,17 @@ const makeVerticalLayoutLabel = (token) => ({
|
|
|
204
203
|
"&::after": { visibility: "hidden" }
|
|
205
204
|
}
|
|
206
205
|
});
|
|
206
|
+
const makeVerticalLayoutLabel = (token) => ({
|
|
207
|
+
...makeVerticalLayoutLabelBase(token),
|
|
208
|
+
margin: token.verticalLabelMargin
|
|
209
|
+
});
|
|
210
|
+
const makeVerticalLayoutLabelWithOffset = (token) => {
|
|
211
|
+
const [formVarName] = genCssVar(token.antCls, "form");
|
|
212
|
+
return {
|
|
213
|
+
...makeVerticalLayoutLabelBase(token),
|
|
214
|
+
[formVarName("item-label-margin")]: token.verticalLabelMargin
|
|
215
|
+
};
|
|
216
|
+
};
|
|
207
217
|
const genHorizontalStyle = (token) => {
|
|
208
218
|
const { antCls, formItemCls } = token;
|
|
209
219
|
return { [`${formItemCls}-horizontal`]: {
|
|
@@ -213,8 +223,8 @@ const genHorizontalStyle = (token) => {
|
|
|
213
223
|
minWidth: 0
|
|
214
224
|
},
|
|
215
225
|
[`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: { [`& + ${formItemCls}-control`]: { minWidth: "unset" } },
|
|
216
|
-
[
|
|
217
|
-
${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
226
|
+
[`> ${formItemCls}-row > ${antCls}-col-24${formItemCls}-label,
|
|
227
|
+
> ${formItemCls}-row > ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
218
228
|
} };
|
|
219
229
|
};
|
|
220
230
|
const genInlineStyle = (token) => {
|
|
@@ -241,7 +251,7 @@ const genInlineStyle = (token) => {
|
|
|
241
251
|
const makeVerticalLayout = (token) => {
|
|
242
252
|
const { componentCls, formItemCls, rootPrefixCls } = token;
|
|
243
253
|
return {
|
|
244
|
-
[`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
|
|
254
|
+
[`${formItemCls}:not(${formItemCls}-vertical) > ${formItemCls}-row > ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
|
|
245
255
|
[`${componentCls}:not(${componentCls}-inline)`]: { [formItemCls]: {
|
|
246
256
|
flexWrap: "wrap",
|
|
247
257
|
[`${formItemCls}-label, ${formItemCls}-control`]: { [`&:not([class*=" ${rootPrefixCls}-col-xs"])`]: {
|
|
@@ -253,19 +263,22 @@ const makeVerticalLayout = (token) => {
|
|
|
253
263
|
};
|
|
254
264
|
const genVerticalStyle = (token) => {
|
|
255
265
|
const { componentCls, formItemCls, antCls, verticalLabelHeight } = token;
|
|
266
|
+
const [formVarName, formVarRef] = genCssVar(antCls, "form");
|
|
256
267
|
return {
|
|
268
|
+
[formItemCls]: { [formVarName("item-label-margin")]: "initial" },
|
|
269
|
+
[`${formItemCls}-label`]: { margin: formVarRef("item-label-margin") },
|
|
257
270
|
[`${formItemCls}-vertical`]: {
|
|
258
271
|
[`${formItemCls}-row`]: { flexDirection: "column" },
|
|
259
272
|
[`${formItemCls}-label > label`]: { height: verticalLabelHeight },
|
|
260
273
|
[`${formItemCls}-control`]: { width: "100%" },
|
|
261
|
-
[
|
|
262
|
-
${antCls}-col-24${formItemCls}-label,
|
|
263
|
-
${antCls}-col-xl-24${formItemCls}-label`]:
|
|
274
|
+
[`> ${formItemCls}-row > ${formItemCls}-label,
|
|
275
|
+
> ${formItemCls}-row > ${antCls}-col-24${formItemCls}-label,
|
|
276
|
+
> ${formItemCls}-row > ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabelWithOffset(token)
|
|
264
277
|
},
|
|
265
|
-
[`@media (max-width: ${unit(token.screenXSMax)})`]: [makeVerticalLayout(token), { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal)`]: { [
|
|
266
|
-
[`@media (max-width: ${unit(token.screenSMMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal)`]: { [
|
|
267
|
-
[`@media (max-width: ${unit(token.screenMDMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal)`]: { [
|
|
268
|
-
[`@media (max-width: ${unit(token.screenLGMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal)`]: { [
|
|
278
|
+
[`@media (max-width: ${unit(token.screenXSMax)})`]: [makeVerticalLayout(token), { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: { [`> ${formItemCls}-row > ${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token) } } }],
|
|
279
|
+
[`@media (max-width: ${unit(token.screenSMMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: { [`> ${formItemCls}-row > ${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token) } } },
|
|
280
|
+
[`@media (max-width: ${unit(token.screenMDMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: { [`> ${formItemCls}-row > ${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token) } } },
|
|
281
|
+
[`@media (max-width: ${unit(token.screenLGMax)})`]: { [componentCls]: { [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: { [`> ${formItemCls}-row > ${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token) } } }
|
|
269
282
|
};
|
|
270
283
|
};
|
|
271
284
|
const prepareComponentToken = (token) => ({
|
|
@@ -36,17 +36,17 @@ declare function usePreviewConfig<T extends PreviewConfig | GroupPreviewConfig>(
|
|
|
36
36
|
image: import("@v-c/image").ImgInfo;
|
|
37
37
|
}) => import("@v-c/util").VueNode;
|
|
38
38
|
readonly onChange?: (current: number, prevCurrent: number) => void;
|
|
39
|
-
readonly focusTrap?: boolean;
|
|
40
|
-
readonly afterOpenChange?: (open: boolean) => void;
|
|
41
39
|
readonly maskClosable?: boolean;
|
|
40
|
+
readonly focusTrap?: boolean;
|
|
42
41
|
readonly zIndex?: number;
|
|
42
|
+
readonly afterOpenChange?: (open: boolean) => void;
|
|
43
43
|
readonly getContainer?: import("@v-c/portal/dist/Portal.js").PortalProps["getContainer"];
|
|
44
44
|
readonly closeIcon?: import("@v-c/util").VueNode | boolean | null;
|
|
45
45
|
readonly wheel?: boolean;
|
|
46
|
-
readonly
|
|
46
|
+
readonly icons?: import("@v-c/image/dist/Preview/index.js").OperationIcons;
|
|
47
47
|
readonly src?: string;
|
|
48
48
|
readonly alt?: string;
|
|
49
|
-
readonly
|
|
49
|
+
readonly motionName?: string;
|
|
50
50
|
readonly countRender?: (current: number, total: number) => import("@v-c/util").VueNode;
|
|
51
51
|
readonly scaleStep?: number;
|
|
52
52
|
readonly minScale?: number;
|
|
@@ -44,7 +44,11 @@ const genListyStyle = (token) => {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
[`${componentCls}-group-section`]: { position: "relative" },
|
|
47
|
-
[`${componentCls}-scrollbar`]: {
|
|
47
|
+
[`${componentCls}-scrollbar`]: {
|
|
48
|
+
zIndex: 1,
|
|
49
|
+
cursor: "pointer",
|
|
50
|
+
"&:hover": { backgroundColor: token.colorFillQuaternary }
|
|
51
|
+
},
|
|
48
52
|
"&-rtl": { direction: "rtl" }
|
|
49
53
|
} };
|
|
50
54
|
};
|
package/dist/locale/en_US.js
CHANGED
package/dist/locale/index.d.ts
CHANGED
package/dist/locale/is_IS.js
CHANGED
|
@@ -104,7 +104,7 @@ const localeValues = {
|
|
|
104
104
|
},
|
|
105
105
|
number: {
|
|
106
106
|
len: "${label} verður að vera jafngildi ${len}",
|
|
107
|
-
min: "Lágmarksgildi ${label} er ${
|
|
107
|
+
min: "Lágmarksgildi ${label} er ${min}",
|
|
108
108
|
max: "Hámarksgildi ${label} er ${max}",
|
|
109
109
|
range: "${label} verður að vera á milli ${min}-${max}"
|
|
110
110
|
},
|
package/dist/locale/mn_MN.js
CHANGED
|
@@ -118,7 +118,7 @@ const localeValues = {
|
|
|
118
118
|
},
|
|
119
119
|
array: {
|
|
120
120
|
len: "${len} ${label} байх ёстой",
|
|
121
|
-
min: "Дор хаяж ${
|
|
121
|
+
min: "Дор хаяж ${min} ${label}",
|
|
122
122
|
max: "Хамгийн ихдээ ${max} ${label}",
|
|
123
123
|
range: "${label}-н хэмжээ ${min}-${max} хооронд байх ёстой"
|
|
124
124
|
},
|
package/dist/locale/zh_CN.js
CHANGED
package/dist/menu/MenuItem.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
|
3
3
|
import InternalTooltip from "../tooltip/index.js";
|
|
4
4
|
import { useSiderCtx } from "../layout/Sider.js";
|
|
5
5
|
import { useMenuContext } from "./MenuContext.js";
|
|
6
|
-
import { createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
|
6
|
+
import { computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef, watch } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
8
|
import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
9
9
|
import { omit } from "es-toolkit/compat";
|
|
@@ -15,6 +15,11 @@ function _isSlot(s) {
|
|
|
15
15
|
const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
16
16
|
const menuContext = useMenuContext();
|
|
17
17
|
const { siderCollapsed } = useSiderCtx();
|
|
18
|
+
const mergedCollapsed = computed(() => !!(siderCollapsed?.value || menuContext.value.inlineCollapsed));
|
|
19
|
+
const tooltipOpen = shallowRef(false);
|
|
20
|
+
watch(mergedCollapsed, () => {
|
|
21
|
+
tooltipOpen.value = false;
|
|
22
|
+
});
|
|
18
23
|
return () => {
|
|
19
24
|
const extra = getSlotPropsFnRun(slots, props, "extra");
|
|
20
25
|
const icon = getSlotPropsFnRun(slots, props, "icon");
|
|
@@ -39,9 +44,14 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
39
44
|
if (typeof title === "undefined") tooltipTitle = firstLevel ? children : "";
|
|
40
45
|
else if (title === false) tooltipTitle = "";
|
|
41
46
|
const tooltipProps = { title: tooltipTitle };
|
|
42
|
-
if (!
|
|
47
|
+
if (!mergedCollapsed.value) {
|
|
43
48
|
tooltipProps.title = null;
|
|
44
49
|
tooltipProps.open = false;
|
|
50
|
+
} else {
|
|
51
|
+
tooltipProps.open = tooltipOpen.value;
|
|
52
|
+
tooltipProps.onOpenChange = (open) => {
|
|
53
|
+
tooltipOpen.value = open;
|
|
54
|
+
};
|
|
45
55
|
}
|
|
46
56
|
const childrenLength = children.length;
|
|
47
57
|
let returnNode = createVNode(Item, mergeProps(omit(pureAttrs(attrs), ["itemData"]), omit(props, [
|
package/dist/menu/SubMenu.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EmptyEmit, VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SubMenuType } from "./interface.js";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
//#region src/menu/SubMenu.d.ts
|
|
5
|
-
interface SubMenuProps extends Omit<SubMenuType, 'key' | 'label' | 'children'> {
|
|
5
|
+
interface SubMenuProps extends Omit<SubMenuType, 'key' | 'label' | 'children' | 'title'> {
|
|
6
6
|
title?: VueNode;
|
|
7
7
|
}
|
|
8
8
|
interface SubMenuSlots {
|
|
@@ -29,7 +29,7 @@ const getVerticalInlineStyle = (token) => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
const getVerticalStyle = (token) => {
|
|
32
|
-
const { componentCls, iconCls, itemHeight, colorTextLightSolid, dropdownWidth, controlHeightLG,
|
|
32
|
+
const { componentCls, iconCls, itemHeight, colorTextLightSolid, dropdownWidth, controlHeightLG, padding, paddingXL, itemMarginInline, fontSizeLG, motionDurationSlow, paddingXS, boxShadowSecondary, collapsedWidth, collapsedIconSize } = token;
|
|
33
33
|
const inlineItemStyle = {
|
|
34
34
|
height: itemHeight,
|
|
35
35
|
lineHeight: unit(itemHeight),
|
|
@@ -63,11 +63,7 @@ const getVerticalStyle = (token) => {
|
|
|
63
63
|
[`&${componentCls}-root`]: { [`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
64
64
|
display: "flex",
|
|
65
65
|
alignItems: "center",
|
|
66
|
-
transition: [
|
|
67
|
-
`border-color ${motionDurationSlow}`,
|
|
68
|
-
`background-color ${motionDurationSlow}`,
|
|
69
|
-
`padding ${motionDurationFast} ${motionEaseOut}`
|
|
70
|
-
].join(","),
|
|
66
|
+
transition: [`border-color ${motionDurationSlow}`, `background-color ${motionDurationSlow}`].join(","),
|
|
71
67
|
[`> ${componentCls}-title-content`]: {
|
|
72
68
|
flex: "auto",
|
|
73
69
|
minWidth: 0,
|
|
@@ -93,7 +93,8 @@ const GlobalHolderWrapper = /* @__PURE__ */ defineComponent((props) => {
|
|
|
93
93
|
const configHolderNode = createVNode(ConfigProvider, {
|
|
94
94
|
"prefixCls": global.getRootPrefixCls(),
|
|
95
95
|
"iconPrefixCls": global.getIconPrefixCls(),
|
|
96
|
-
"theme": global.theme.value
|
|
96
|
+
"theme": global.theme.value,
|
|
97
|
+
"locale": globalConfig().locale
|
|
97
98
|
}, _isSlot(holderNode) ? holderNode : { default: () => [holderNode] });
|
|
98
99
|
return global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
|
|
99
100
|
};
|
|
@@ -6,6 +6,8 @@ import { toPropsRefs } from "../_util/tools.js";
|
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import style_default from "./style/index.js";
|
|
8
8
|
import { getCloseIconConfig, getMotion, getPlacementStyle } from "./util.js";
|
|
9
|
+
import localeValues from "../locale/en_US.js";
|
|
10
|
+
import useLocale from "../locale/useLocale.js";
|
|
9
11
|
import { computeClosable, pickClosable } from "../_util/hooks/useClosable.js";
|
|
10
12
|
import { getCloseIcon, getIconWrapperClassName, resolveIconNode } from "./PurePanel.js";
|
|
11
13
|
import { isRenderable } from "../_util/is.js";
|
|
@@ -41,6 +43,7 @@ const renderNotifications = (node, { prefixCls, key }) => {
|
|
|
41
43
|
};
|
|
42
44
|
const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
43
45
|
const { getPrefixCls, getPopupContainer, notification, direction } = useBaseConfig("notification");
|
|
46
|
+
const [contextLocale] = useLocale("global", localeValues.global);
|
|
44
47
|
const { classes: contextClassNames, style: contextStyle, styles: contextStyles } = useComponentBaseConfig("notification", props);
|
|
45
48
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
46
49
|
const [, token] = useToken();
|
|
@@ -49,7 +52,7 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
49
52
|
return typeof props.duration === "number" && props.duration > 0 ? props.duration : false;
|
|
50
53
|
});
|
|
51
54
|
const getStyle = (placement) => {
|
|
52
|
-
return getPlacementStyle(placement, props?.top ?? DEFAULT_OFFSET, props?.bottom ??
|
|
55
|
+
return getPlacementStyle(placement, props?.top ?? DEFAULT_OFFSET, props?.bottom ?? DEFAULT_OFFSET);
|
|
53
56
|
};
|
|
54
57
|
const getClassName = () => clsx({ [`${prefixCls.value}-rtl`]: props.rtl ?? direction.value === "rtl" });
|
|
55
58
|
const getNotificationMotion = () => getMotion(prefixCls.value);
|
|
@@ -80,7 +83,8 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
80
83
|
prefixCls,
|
|
81
84
|
notification,
|
|
82
85
|
classNames: mergedClassNames,
|
|
83
|
-
styles: mergedStyles
|
|
86
|
+
styles: mergedStyles,
|
|
87
|
+
closeLabel: computed(() => contextLocale.value?.close ?? localeValues.global?.close ?? "Close")
|
|
84
88
|
});
|
|
85
89
|
return () => {
|
|
86
90
|
return holder?.();
|
|
@@ -174,7 +178,7 @@ function useInternalNotification(notificationConfig) {
|
|
|
174
178
|
warning(false, "usage", "You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");
|
|
175
179
|
return;
|
|
176
180
|
}
|
|
177
|
-
const { open: originOpen, prefixCls, notification, classNames: originClassNames, styles: originStyles } = holderRef.value;
|
|
181
|
+
const { open: originOpen, prefixCls, notification, classNames: originClassNames, styles: originStyles, closeLabel } = holderRef.value;
|
|
178
182
|
const contextClassName = notification?.class || {};
|
|
179
183
|
const noticePrefixCls = `${prefixCls}-notice`;
|
|
180
184
|
const { title, description, icon, type, actions, class: className, style, role = "alert", closeIcon, closable, classes: configClassNames = {}, styles = {}, ...restConfig } = config;
|
|
@@ -188,7 +192,7 @@ function useInternalNotification(notificationConfig) {
|
|
|
188
192
|
}))), pickClosable(notificationContext), computed(() => ({
|
|
189
193
|
closable: true,
|
|
190
194
|
closeIcon: realCloseIcon
|
|
191
|
-
})));
|
|
195
|
+
})), closeLabel);
|
|
192
196
|
const mergedClosable = rawClosable ? {
|
|
193
197
|
onClose: closable && typeof closable === "object" ? closable.onClose : void 0,
|
|
194
198
|
closeIcon: mergedCloseIcon,
|
package/dist/package.js
CHANGED
package/dist/package.json.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ declare const _exports: {
|
|
|
21
21
|
import: string;
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
|
+
"./version/token.json": string;
|
|
25
|
+
"./version/token-meta.json": string;
|
|
26
|
+
"./dist/version/token.json": string;
|
|
27
|
+
"./dist/version/token-meta.json": string;
|
|
24
28
|
"./dist/*": {
|
|
25
29
|
types: string[];
|
|
26
30
|
import: string[];
|
package/dist/radio/group.js
CHANGED
|
@@ -84,7 +84,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
84
84
|
item: option,
|
|
85
85
|
index
|
|
86
86
|
}) : option.label;
|
|
87
|
-
return createVNode(InternalRadio, {
|
|
87
|
+
return createVNode(InternalRadio, mergeProps({
|
|
88
88
|
"key": `radio-group-value-options-${option.value}`,
|
|
89
89
|
"prefixCls": prefixCls.value,
|
|
90
90
|
"disabled": option.disabled || disabled,
|
|
@@ -95,7 +95,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
95
95
|
"class": option.class,
|
|
96
96
|
"id": option.id,
|
|
97
97
|
"required": option.required
|
|
98
|
-
}, _isSlot(_label) ? _label : { default: () => [_label] });
|
|
98
|
+
}, { onChange: option.onChange }), _isSlot(_label) ? _label : { default: () => [_label] });
|
|
99
99
|
});
|
|
100
100
|
return createVNode("div", mergeProps(pickAttrs(restAttrs, {
|
|
101
101
|
aria: true,
|
package/dist/select/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const genBaseStyle = (token) => {
|
|
|
14
14
|
opacity: 0,
|
|
15
15
|
pointerEvents: "none"
|
|
16
16
|
},
|
|
17
|
-
[`&${componentCls}-allow-clear:not(${componentCls}-show-arrow) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
|
|
17
|
+
[`&${componentCls}-allow-clear:not(${componentCls}-show-arrow):not(${componentCls}-customize) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
|
|
18
18
|
};
|
|
19
19
|
return {
|
|
20
20
|
[componentCls]: {
|
package/dist/space/Compact.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface SpaceCompactItemContextType {
|
|
|
21
21
|
declare function useSpaceCompactItemContext(): Ref<SpaceCompactItemContextType | null, SpaceCompactItemContextType | null>;
|
|
22
22
|
declare function useCompactItemContext(prefixCls: Ref<string>, direction: Ref<DirectionType>): {
|
|
23
23
|
compactSize: import("vue").ComputedRef<SizeType>;
|
|
24
|
-
compactDirection: import("vue").ComputedRef<"
|
|
24
|
+
compactDirection: import("vue").ComputedRef<"horizontal" | "vertical" | undefined>;
|
|
25
25
|
compactItemClassnames: import("vue").ComputedRef<string>;
|
|
26
26
|
};
|
|
27
27
|
declare const NoCompactStyle: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|