antdv-next 1.5.2 → 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.
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/antd-with-locales.esm.js +8866 -8848
- package/dist/antd-with-locales.js +11 -11
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +4273 -4255
- package/dist/antd.js +11 -11
- package/dist/auto-complete/index.d.ts +1 -1
- package/dist/auto-complete/index.js +13 -10
- package/dist/breadcrumb/BreadcrumbItem.js +2 -1
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/card/Card.js +5 -4
- package/dist/card/CardMeta.js +4 -3
- package/dist/checkbox/Checkbox.js +1 -1
- package/dist/config-provider/context.d.ts +5 -2
- package/dist/date-picker/util.d.ts +4 -4
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/float-button/FloatButton.js +2 -1
- package/dist/form/FormItemLabel.js +2 -1
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/grid/row.js +9 -16
- package/dist/image/PreviewGroup.js +1 -1
- package/dist/image/hooks/usePreviewConfig.d.ts +4 -4
- package/dist/menu/style/vertical.js +8 -5
- package/dist/package.js +1 -1
- package/dist/segmented/index.js +2 -1
- package/dist/select/index.d.ts +2 -2
- package/dist/steps/PanelArrow.js +3 -2
- package/dist/table/hooks/useSorter.js +7 -9
- package/dist/tag/CheckableTagGroup.d.ts +3 -0
- package/dist/tag/CheckableTagGroup.js +2 -2
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +2 -1
- package/dist/tour/panelRender.js +8 -2
- package/dist/transfer/Section.js +1 -1
- package/dist/upload/utils.js +8 -6
- package/package.json +3 -3
- package/web-tags.json +1681 -1681
- package/web-types.json +5390 -5420
|
@@ -33,7 +33,7 @@ type AutoCompleteClassNamesType = SemanticClassNamesType<AutoCompleteProps, Auto
|
|
|
33
33
|
type AutoCompleteStylesType = SemanticStylesType<AutoCompleteProps, AutoCompleteSemanticStyles, {
|
|
34
34
|
popup?: SelectPopupSemanticStyles;
|
|
35
35
|
}>;
|
|
36
|
-
type RcEventKeys = 'onClear' | 'onKeyUp' | 'onKeyDown' | 'onBlur' | 'onClick' | 'onActive' | 'onChange' | 'onDeselect' | 'onInputKeyDown' | 'onMouseDown' | 'onMouseLeave' | 'onMouseEnter' | 'onFocus' | 'onPopupScroll' | '
|
|
36
|
+
type RcEventKeys = 'onClear' | 'onKeyUp' | 'onKeyDown' | 'onBlur' | 'onClick' | 'onActive' | 'onChange' | 'onDeselect' | 'onInputKeyDown' | 'onMouseDown' | 'onMouseLeave' | 'onMouseEnter' | 'onFocus' | 'onPopupScroll' | 'onSelect' | 'onSearch';
|
|
37
37
|
interface AutoCompleteProps extends Omit<InternalSelectProps, 'loading' | 'mode' | 'optionLabelProp' | 'labelInValue' | 'classes' | 'styles' | 'getInputElement' | 'getRawInputElement' | 'showSearch' | 'optionFilterProp' | 'filterSort' | RcEventKeys>, AutoCompleteEmitsProps {
|
|
38
38
|
/** @deprecated Please use `options` instead */
|
|
39
39
|
dataSource?: DataSourceItemType[];
|
|
@@ -4,7 +4,7 @@ import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useTo
|
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import genPurePanel from "../_util/PurePanel.js";
|
|
6
6
|
import Select from "../select/index.js";
|
|
7
|
-
import { Text, computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
|
7
|
+
import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps } from "vue";
|
|
8
8
|
import { clsx } from "@v-c/util";
|
|
9
9
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
10
10
|
import { omit } from "es-toolkit";
|
|
@@ -26,11 +26,18 @@ const omitKeys = [
|
|
|
26
26
|
"dropdownStyle",
|
|
27
27
|
"classes",
|
|
28
28
|
"styles",
|
|
29
|
-
"popupRender"
|
|
29
|
+
"popupRender",
|
|
30
|
+
"onOpenChange",
|
|
31
|
+
"onDropdownVisibleChange"
|
|
30
32
|
];
|
|
31
33
|
const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
32
34
|
const { prefixCls } = useComponentBaseConfig("select", props);
|
|
33
35
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
36
|
+
const instance = getCurrentInstance();
|
|
37
|
+
const mergedOnOpenChange = (open) => {
|
|
38
|
+
if (instance?.vnode.props?.onOpenChange) emit("openChange", open);
|
|
39
|
+
else emit("dropdownVisibleChange", open);
|
|
40
|
+
};
|
|
34
41
|
const mergedProps = computed(() => {
|
|
35
42
|
return {
|
|
36
43
|
...props,
|
|
@@ -41,6 +48,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
41
48
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
42
49
|
return () => {
|
|
43
50
|
const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
|
|
51
|
+
const forwardedAttrs = omit(restAttrs, ["onOpenChange", "onDropdownVisibleChange"]);
|
|
44
52
|
const childNodes = toArray(filterEmpty(slots.default?.() ?? []));
|
|
45
53
|
const hasSelectOptions = !!childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0]);
|
|
46
54
|
let customizeInput;
|
|
@@ -115,7 +123,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
115
123
|
};
|
|
116
124
|
const selectProps = omit(props, omitKeys);
|
|
117
125
|
if (selectProps.placeholder === void 0 && customizeInputPlaceholder !== void 0) selectProps.placeholder = customizeInputPlaceholder;
|
|
118
|
-
return createVNode(Select, mergeProps(
|
|
126
|
+
return createVNode(Select, mergeProps(forwardedAttrs, selectProps, {
|
|
119
127
|
onSelect: (value, option) => {
|
|
120
128
|
emit("select", value, option);
|
|
121
129
|
},
|
|
@@ -163,12 +171,6 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
163
171
|
},
|
|
164
172
|
onSearch: (value) => {
|
|
165
173
|
emit("search", value);
|
|
166
|
-
},
|
|
167
|
-
onOpenChange: (open) => {
|
|
168
|
-
emit("openChange", open);
|
|
169
|
-
},
|
|
170
|
-
onDropdownVisibleChange: (open) => {
|
|
171
|
-
emit("dropdownVisibleChange", open);
|
|
172
174
|
}
|
|
173
175
|
}, getInputElement ? { getInputElement } : {}, {
|
|
174
176
|
"prefixCls": prefixCls.value,
|
|
@@ -178,7 +180,8 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
178
180
|
"popupRender": mergedPopupRender,
|
|
179
181
|
"popupMatchSelectWidth": mergedPopupMatchSelectWidth,
|
|
180
182
|
"mode": Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
|
|
181
|
-
"suffixIcon": null
|
|
183
|
+
"suffixIcon": null,
|
|
184
|
+
"onOpenChange": mergedOnOpenChange
|
|
182
185
|
}, { "onUpdate:value": (value) => emit("update:value", value) }), {
|
|
183
186
|
default: () => [optionChildren],
|
|
184
187
|
...forwardedSlots
|
|
@@ -2,6 +2,7 @@ import { useBaseConfig } from "../config-provider/context.js";
|
|
|
2
2
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
3
|
import isNonNullable from "../_util/isNonNullable.js";
|
|
4
4
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
5
|
+
import { isRenderable } from "../_util/is.js";
|
|
5
6
|
import { useBreadcrumbContext } from "./BreadcrumbContext.js";
|
|
6
7
|
import Dropdown from "../dropdown/index.js";
|
|
7
8
|
import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
|
|
@@ -53,7 +54,7 @@ const InternalBreadcrumbItem = /* @__PURE__ */ defineComponent((props, { slots }
|
|
|
53
54
|
if (isNonNullable(link)) return createVNode(Fragment, null, [createVNode("li", {
|
|
54
55
|
"class": clsx(`${prefixCls}-item`, mergedClassNames?.item),
|
|
55
56
|
"style": mergedStyles?.item
|
|
56
|
-
}, [link]),
|
|
57
|
+
}, [link]), isRenderable(separator) && createVNode(BreadcrumbSeparator, null, _isSlot(separator) ? separator : { default: () => [separator] })]);
|
|
57
58
|
return null;
|
|
58
59
|
};
|
|
59
60
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, VNodeChild } from "vue";
|
|
2
2
|
//#region src/button/buttonHelper.d.ts
|
|
3
3
|
declare const isTwoCNChar: (string: string) => boolean;
|
|
4
|
-
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "
|
|
4
|
+
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "link" | "text";
|
|
5
5
|
declare function spaceChildren(children: VNodeChild[], needInserted: boolean, style?: CSSProperties, className?: string): VNodeChild[];
|
|
6
6
|
declare const _ButtonTypes: readonly ["default", "primary", "dashed", "link", "text"];
|
|
7
7
|
type ButtonType = (typeof _ButtonTypes)[number];
|
package/dist/card/Card.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useSize } from "../config-provider/hooks/useSize.js";
|
|
|
4
4
|
import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
6
|
import skeleton_default from "../skeleton/index.js";
|
|
7
|
+
import { isRenderable } from "../_util/is.js";
|
|
7
8
|
import useVariant from "../form/hooks/useVariant.js";
|
|
8
9
|
import Tabs from "../tabs/index.js";
|
|
9
10
|
import style_default from "./style/index.js";
|
|
@@ -109,7 +110,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
109
110
|
...item
|
|
110
111
|
};
|
|
111
112
|
}) }), tabsSlots) : null;
|
|
112
|
-
if (title || extra || tabs) {
|
|
113
|
+
if (isRenderable(title) || isRenderable(extra) || tabs) {
|
|
113
114
|
const headClasses = clsx(`${prefixCls.value}-head`, mergedClassNames.value.header);
|
|
114
115
|
const titleClasses = clsx(`${prefixCls.value}-head-title`, mergedClassNames.value.title);
|
|
115
116
|
const extraClasses = clsx(`${prefixCls.value}-extra`, mergedClassNames.value.extra);
|
|
@@ -119,16 +120,16 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
119
120
|
...headStyle,
|
|
120
121
|
...mergedStyles.value.header
|
|
121
122
|
}
|
|
122
|
-
}, [createVNode("div", { "class": `${prefixCls.value}-head-wrapper` }, [
|
|
123
|
+
}, [createVNode("div", { "class": `${prefixCls.value}-head-wrapper` }, [isRenderable(title) && createVNode("div", {
|
|
123
124
|
"class": titleClasses,
|
|
124
125
|
"style": mergedStyles.value.title
|
|
125
|
-
}, [title]),
|
|
126
|
+
}, [title]), isRenderable(extra) && createVNode("div", {
|
|
126
127
|
"class": extraClasses,
|
|
127
128
|
"style": mergedStyles.value.extra
|
|
128
129
|
}, [extra])]), tabs]);
|
|
129
130
|
}
|
|
130
131
|
const coverClasses = clsx(`${prefixCls.value}-cover`, mergedClassNames.value.cover);
|
|
131
|
-
const coverDom = cover ? createVNode("div", {
|
|
132
|
+
const coverDom = isRenderable(cover) ? createVNode("div", {
|
|
132
133
|
"class": coverClasses,
|
|
133
134
|
"style": mergedStyles.value.cover
|
|
134
135
|
}, [cover]) : null;
|
package/dist/card/CardMeta.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
4
|
+
import { isRenderable } from "../_util/is.js";
|
|
4
5
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
5
6
|
import { clsx } from "@v-c/util";
|
|
6
7
|
//#region src/card/CardMeta.tsx
|
|
@@ -27,15 +28,15 @@ const CardMeta = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
27
28
|
const avatar = getSlotPropsFnRun(slots, props, "avatar");
|
|
28
29
|
const title = getSlotPropsFnRun(slots, props, "title");
|
|
29
30
|
const description = getSlotPropsFnRun(slots, props, "description");
|
|
30
|
-
const avatarDom = avatar ? createVNode("div", {
|
|
31
|
+
const avatarDom = isRenderable(avatar) ? createVNode("div", {
|
|
31
32
|
"class": avatarClassNames,
|
|
32
33
|
"style": mergedStyles.value.avatar
|
|
33
34
|
}, [avatar]) : null;
|
|
34
|
-
const titleDom = title ? createVNode("div", {
|
|
35
|
+
const titleDom = isRenderable(title) ? createVNode("div", {
|
|
35
36
|
"class": titleClassNames,
|
|
36
37
|
"style": mergedStyles.value.title
|
|
37
38
|
}, [title]) : null;
|
|
38
|
-
const descriptionDom = description ? createVNode("div", {
|
|
39
|
+
const descriptionDom = isRenderable(description) ? createVNode("div", {
|
|
39
40
|
"class": descriptionClassNames,
|
|
40
41
|
"style": mergedStyles.value.description
|
|
41
42
|
}, [description]) : null;
|
|
@@ -26,7 +26,7 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
26
26
|
const formItemInputContext = useFormItemInputContext();
|
|
27
27
|
const formItemContext = useFormItemContext();
|
|
28
28
|
const contextDisabled = useDisabledContext();
|
|
29
|
-
const mergedDisabled = computed(() =>
|
|
29
|
+
const mergedDisabled = computed(() => props.disabled ?? checkboxGroup?.value?.disabled ?? contextDisabled.value);
|
|
30
30
|
const mergedCheckedValue = computed(() => props.checkedValue ?? true);
|
|
31
31
|
const mergedUnCheckedValue = computed(() => props.unCheckedValue ?? false);
|
|
32
32
|
const currentValue = shallowRef(props?.checked ?? props?.defaultChecked ?? mergedUnCheckedValue.value);
|
|
@@ -90,7 +90,7 @@ import { TreeSelectProps } from "../tree-select/index.js";
|
|
|
90
90
|
import { BlockProps } from "../typography/interface.js";
|
|
91
91
|
import { ButtonProps } from "../button/Button.js";
|
|
92
92
|
import "../button/index.js";
|
|
93
|
-
import { CSSProperties, Ref } from "vue";
|
|
93
|
+
import { AriaAttributes, CSSProperties, Ref } from "vue";
|
|
94
94
|
import { DerivativeFunc } from "@antdv-next/cssinjs";
|
|
95
95
|
import { MoreProps } from "@v-c/tabs";
|
|
96
96
|
//#region src/config-provider/context.d.ts
|
|
@@ -235,7 +235,10 @@ type ButtonConfig = ComponentStyleConfig & Pick<ButtonProps, 'classes' | 'styles
|
|
|
235
235
|
loadingIcon?: VueNode;
|
|
236
236
|
};
|
|
237
237
|
type FlexConfig = ComponentStyleConfig & Pick<FlexProps, 'vertical'>;
|
|
238
|
-
type AlertConfig = ComponentStyleConfig & Pick<AlertProps, 'variant' | '
|
|
238
|
+
type AlertConfig = ComponentStyleConfig & Pick<AlertProps, 'variant' | 'closeIcon' | 'classes' | 'styles'> & {
|
|
239
|
+
closable?: boolean | ({
|
|
240
|
+
closeIcon?: VueNode;
|
|
241
|
+
} & AriaAttributes);
|
|
239
242
|
successIcon?: VueNode;
|
|
240
243
|
infoIcon?: VueNode;
|
|
241
244
|
warningIcon?: VueNode;
|
|
@@ -6,14 +6,14 @@ import { PickerMode } from "@v-c/picker";
|
|
|
6
6
|
declare function getPlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: string): string;
|
|
7
7
|
declare function getRangePlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: [string, string]): [string, string] | undefined;
|
|
8
8
|
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'removeIcon'>, prefixCls: string): readonly [false, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null] | readonly [{
|
|
9
|
-
clearIcon: string | number | boolean | import("vue").
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}> | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions> | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
9
|
+
clearIcon: string | number | boolean | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions> | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
12
10
|
new (...args: any[]): any;
|
|
13
11
|
__isFragment?: never;
|
|
14
12
|
__isTeleport?: never;
|
|
15
13
|
__isSuspense?: never;
|
|
16
|
-
} |
|
|
14
|
+
} | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}> | RenderNodeFn<any[]> | (string | number | boolean | void | import("vue").Component | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
}> | null | undefined)[] | null | undefined;
|
|
19
19
|
}, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null];
|
|
@@ -10,20 +10,20 @@ declare function useItems(screens: Ref<ScreenMap>, items: Ref<DescriptionsItemTy
|
|
|
10
10
|
key?: import("@v-c/util/dist/type").Key;
|
|
11
11
|
styles?: CellSemanticStyles | undefined;
|
|
12
12
|
style?: import("vue").CSSProperties | undefined;
|
|
13
|
+
label?: VueNode;
|
|
13
14
|
class?: string | undefined;
|
|
14
|
-
rootClass?: string | undefined;
|
|
15
15
|
classes?: CellSemanticClassNames | undefined;
|
|
16
|
-
|
|
16
|
+
rootClass?: string | undefined;
|
|
17
17
|
content?: VueNode;
|
|
18
18
|
} | {
|
|
19
19
|
span: number | undefined;
|
|
20
20
|
key?: import("@v-c/util/dist/type").Key;
|
|
21
21
|
styles?: CellSemanticStyles | undefined;
|
|
22
22
|
style?: import("vue").CSSProperties | undefined;
|
|
23
|
+
label?: VueNode;
|
|
23
24
|
class?: string | undefined;
|
|
24
|
-
rootClass?: string | undefined;
|
|
25
25
|
classes?: CellSemanticClassNames | undefined;
|
|
26
|
-
|
|
26
|
+
rootClass?: string | undefined;
|
|
27
27
|
content?: VueNode;
|
|
28
28
|
_$index: number;
|
|
29
29
|
})[]>;
|
|
@@ -5,6 +5,7 @@ import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.
|
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import InternalTooltip from "../tooltip/index.js";
|
|
7
7
|
import button_default from "../button/index.js";
|
|
8
|
+
import { isRenderable } from "../_util/is.js";
|
|
8
9
|
import Badge from "../badge/index.js";
|
|
9
10
|
import { useGroupContext } from "./context.js";
|
|
10
11
|
import convertToTooltipProps from "../_util/convertToTooltipProps.js";
|
|
@@ -52,7 +53,7 @@ const FloatButton = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
52
53
|
if (slotContent.length) contentNodes = slotContent;
|
|
53
54
|
else if (props.content !== void 0) contentNodes = props.content;
|
|
54
55
|
else if (props.description !== void 0) contentNodes = props.description;
|
|
55
|
-
const hasContent = Array.isArray(contentNodes) ? contentNodes.length > 0 : contentNodes
|
|
56
|
+
const hasContent = Array.isArray(contentNodes) ? contentNodes.length > 0 : isRenderable(contentNodes);
|
|
56
57
|
const mergedIcon = getSlotPropsFnRun(slots, props, "icon") ?? props.icon ?? (!hasContent ? createVNode(FileTextOutlined, null, null) : null);
|
|
57
58
|
const tooltipSlotNodes = filterEmpty(slots.tooltip?.() ?? []);
|
|
58
59
|
const tooltipNode = tooltipSlotNodes.length ? tooltipSlotNodes.length === 1 ? tooltipSlotNodes[0] : tooltipSlotNodes : void 0;
|
|
@@ -2,6 +2,7 @@ import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
|
2
2
|
import InternalTooltip from "../tooltip/index.js";
|
|
3
3
|
import localeValues from "../locale/en_US.js";
|
|
4
4
|
import useLocale from "../locale/useLocale.js";
|
|
5
|
+
import { isRenderable } from "../_util/is.js";
|
|
5
6
|
import { useFormContext } from "./context.js";
|
|
6
7
|
import Col from "../grid/col.js";
|
|
7
8
|
import convertToTooltipProps from "../_util/convertToTooltipProps.js";
|
|
@@ -17,7 +18,7 @@ const FormItemLabel = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
17
18
|
const { labelCol, labelAlign, prefixCls, required, colon, vertical, tooltip, requiredMark, htmlFor } = props;
|
|
18
19
|
const { labelAlign: contextLabelAlign, labelCol: contextLabelCol, labelWrap, colon: contextColon, classes: contextClassNames, styles: contextStyles, tooltip: contextTooltip } = formContext.value;
|
|
19
20
|
const label = getSlotPropsFnRun(slots, props, "label");
|
|
20
|
-
if (!label) return null;
|
|
21
|
+
if (!isRenderable(label)) return null;
|
|
21
22
|
const mergedLabelCol = labelCol || contextLabelCol || {};
|
|
22
23
|
const mergedLabelAlign = labelAlign || contextLabelAlign;
|
|
23
24
|
const labelClsBasic = `${prefixCls}-item-label`;
|
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<"
|
|
74
|
+
declare function useVariantContext(): Ref<"filled" | "outlined" | "borderless" | "underlined" | undefined, "filled" | "outlined" | "borderless" | "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<"
|
|
6
|
+
declare function useVariant(component: VariantComponents, variant?: Ref<Variant | undefined>, legacyBordered?: Ref<boolean | undefined> | boolean, fallbackComponent?: VariantComponents): readonly [import("vue").ComputedRef<"filled" | "outlined" | "borderless" | "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/grid/row.js
CHANGED
|
@@ -4,29 +4,22 @@ import { responsiveArray } from "../_util/responsiveObserver.js";
|
|
|
4
4
|
import useBreakpoint from "./hooks/useBreakpoint.js";
|
|
5
5
|
import { useRowContextProvider } from "./RowContext.js";
|
|
6
6
|
import useGutter from "./hooks/useGutter.js";
|
|
7
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps
|
|
7
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
8
8
|
import { classNames } from "@v-c/util";
|
|
9
9
|
import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
10
10
|
//#region src/grid/row.tsx
|
|
11
11
|
function useMergedPropByScreen(oriProp, screen) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (typeof
|
|
15
|
-
if (typeof
|
|
16
|
-
for (let i = 0; i < responsiveArray.length; i++) {
|
|
12
|
+
return computed(() => {
|
|
13
|
+
const value = oriProp.value;
|
|
14
|
+
if (typeof value === "string") return value;
|
|
15
|
+
if (typeof value === "object") for (let i = 0; i < responsiveArray.length; i++) {
|
|
17
16
|
const breakpoint = responsiveArray[i];
|
|
18
17
|
if (!screen.value || !screen.value[breakpoint]) continue;
|
|
19
|
-
const curVal =
|
|
20
|
-
if (curVal !== void 0)
|
|
21
|
-
prop.value = curVal;
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
18
|
+
const curVal = value[breakpoint];
|
|
19
|
+
if (curVal !== void 0) return curVal;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
calcMergedAlignOrJustify();
|
|
28
|
-
}, { immediate: true });
|
|
29
|
-
return prop;
|
|
21
|
+
return "";
|
|
22
|
+
});
|
|
30
23
|
}
|
|
31
24
|
const Row = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
32
25
|
const configCtx = useConfig();
|
|
@@ -46,7 +46,7 @@ const InternalPreviewGroup = /* @__PURE__ */ defineComponent((props, { attrs, sl
|
|
|
46
46
|
right: direction.value === "rtl" ? createVNode(LeftOutlined, null, null) : createVNode(RightOutlined, null, null)
|
|
47
47
|
};
|
|
48
48
|
});
|
|
49
|
-
const mergedPreview = useMergedPreviewConfig(previewConfig, contextPreviewConfig, prefixCls, mergedRootClassName, getContextPopupContainer,
|
|
49
|
+
const mergedPreview = useMergedPreviewConfig(previewConfig, contextPreviewConfig, prefixCls, mergedRootClassName, getContextPopupContainer, memoizedIcons);
|
|
50
50
|
const mergedMask = computed(() => mergedPreview.value?.mask);
|
|
51
51
|
const blurClassName = computed(() => mergedPreview.value?.blurClassName);
|
|
52
52
|
const mergedProps = computed(() => {
|
|
@@ -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 maskClosable?: boolean;
|
|
40
39
|
readonly focusTrap?: boolean;
|
|
41
|
-
readonly zIndex?: number;
|
|
42
40
|
readonly afterOpenChange?: (open: boolean) => void;
|
|
41
|
+
readonly maskClosable?: boolean;
|
|
42
|
+
readonly zIndex?: number;
|
|
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 motionName?: string;
|
|
47
47
|
readonly src?: string;
|
|
48
48
|
readonly alt?: string;
|
|
49
|
-
readonly
|
|
49
|
+
readonly icons?: import("@v-c/image/dist/Preview/index.js").OperationIcons;
|
|
50
50
|
readonly countRender?: (current: number, total: number) => import("@v-c/util").VueNode;
|
|
51
51
|
readonly scaleStep?: number;
|
|
52
52
|
readonly minScale?: number;
|
|
@@ -84,11 +84,14 @@ const getVerticalStyle = (token) => {
|
|
|
84
84
|
} },
|
|
85
85
|
{ [`${componentCls}-inline-collapsed`]: {
|
|
86
86
|
width: collapsedWidth,
|
|
87
|
-
[`&${componentCls}-root`]: { [`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
[`&${componentCls}-root`]: { [`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
|
|
88
|
+
transition: [`border-color`, `background-color`].map((property) => `${property} ${motionDurationSlow}`).join(","),
|
|
89
|
+
[`> ${componentCls}-inline-collapsed-noicon`]: {
|
|
90
|
+
fontSize: fontSizeLG,
|
|
91
|
+
textAlign: "center",
|
|
92
|
+
width: "100%"
|
|
93
|
+
}
|
|
94
|
+
} },
|
|
92
95
|
[`> ${componentCls}-item,
|
|
93
96
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
|
|
94
97
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
|
package/dist/package.js
CHANGED
package/dist/segmented/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useSize } from "../config-provider/hooks/useSize.js";
|
|
|
4
4
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
6
|
import InternalTooltip from "../tooltip/index.js";
|
|
7
|
+
import { isRenderable } from "../_util/is.js";
|
|
7
8
|
import style_default from "./style/index.js";
|
|
8
9
|
import { Fragment, computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, useId } from "vue";
|
|
9
10
|
import { clsx } from "@v-c/util";
|
|
@@ -43,7 +44,7 @@ const InternalSegmented = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
43
44
|
if (hasIcon || hasCustomLabel) {
|
|
44
45
|
const { label, icon: _icon, ...restOption } = _option;
|
|
45
46
|
const mergedLabel = labelFromSlot.length > 0 ? labelFromSlot : label;
|
|
46
|
-
const showLabel =
|
|
47
|
+
const showLabel = labelFromSlot.length > 0 || isRenderable(label);
|
|
47
48
|
const icon = getSlotPropsFnRun({}, option, "icon") ?? iconFromSlot;
|
|
48
49
|
return {
|
|
49
50
|
...restOption,
|
package/dist/select/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface LabeledValue {
|
|
|
15
15
|
label: VueNode;
|
|
16
16
|
}
|
|
17
17
|
type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;
|
|
18
|
-
interface InternalSelectProps extends ComponentBaseProps, Omit<SelectProps$1, 'mode' | 'classNames' | 'className' | 'style' | 'prefix' | 'styles'> {
|
|
18
|
+
interface InternalSelectProps extends ComponentBaseProps, Omit<SelectProps$1, 'mode' | 'classNames' | 'className' | 'style' | 'prefix' | 'styles' | 'onPopupVisibleChange'> {
|
|
19
19
|
prefix?: VueNode;
|
|
20
20
|
suffixIcon?: VueNode;
|
|
21
21
|
size?: SizeType;
|
|
@@ -76,7 +76,7 @@ type SelectClassNamesType = SemanticClassNamesType<SelectProps, SelectSemanticCl
|
|
|
76
76
|
type SelectStylesType = SemanticStylesType<SelectProps, SelectSemanticStyles, {
|
|
77
77
|
popup?: SelectPopupSemanticStyles;
|
|
78
78
|
}>;
|
|
79
|
-
type RcEventKeys = 'onClear' | 'onKeyUp' | 'onKeyDown' | 'onBlur' | 'onClick' | 'onActive' | 'onChange' | 'onDeselect' | 'onInputKeyDown' | 'onMouseDown' | 'onMouseLeave' | 'onMouseEnter' | 'onFocus' | 'onPopupScroll' | '
|
|
79
|
+
type RcEventKeys = 'onClear' | 'onKeyUp' | 'onKeyDown' | 'onBlur' | 'onClick' | 'onActive' | 'onChange' | 'onDeselect' | 'onInputKeyDown' | 'onMouseDown' | 'onMouseLeave' | 'onMouseEnter' | 'onFocus' | 'onPopupScroll' | 'onSelect' | 'optionRender';
|
|
80
80
|
interface SelectProps extends Omit<InternalSelectProps, 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill' | 'placement' | 'dropdownClassName' | 'dropdownStyle' | 'classes' | 'styles' | RcEventKeys>, SelectEmitsProps {
|
|
81
81
|
placement?: SelectCommonPlacement;
|
|
82
82
|
mode?: 'multiple' | 'tags';
|
package/dist/steps/PanelArrow.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createVNode, defineComponent } from "vue";
|
|
2
2
|
//#region src/steps/PanelArrow.tsx
|
|
3
3
|
const PanelArrow = /* @__PURE__ */ defineComponent((props) => {
|
|
4
4
|
return () => {
|
|
5
5
|
const { prefixCls } = props;
|
|
6
6
|
return createVNode("svg", {
|
|
7
|
+
"aria-hidden": "true",
|
|
7
8
|
"class": `${prefixCls}-panel-arrow`,
|
|
8
9
|
"viewBox": "0 0 100 100",
|
|
9
10
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
10
11
|
"preserveAspectRatio": "none"
|
|
11
|
-
}, [createVNode("
|
|
12
|
+
}, [createVNode("path", { "d": "M 0 0 L 100 50 L 0 100" }, null)]);
|
|
12
13
|
};
|
|
13
14
|
}, {
|
|
14
15
|
props: { prefixCls: {
|
|
@@ -106,15 +106,13 @@ function injectSorter(prefixCls, columns, sorterStates, triggerSorter, defaultSo
|
|
|
106
106
|
originOnClick?.(event);
|
|
107
107
|
};
|
|
108
108
|
cell.onKeydown = (event) => {
|
|
109
|
-
if (event.keyCode === KeyCode.ENTER) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
originOnKeydown?.(event);
|
|
117
|
-
}
|
|
109
|
+
if (event.keyCode === KeyCode.ENTER) triggerSorter({
|
|
110
|
+
column,
|
|
111
|
+
key: columnKey,
|
|
112
|
+
sortOrder: nextSortOrder,
|
|
113
|
+
multiplePriority: getMultiplePriority(column)
|
|
114
|
+
});
|
|
115
|
+
originOnKeydown?.(event);
|
|
118
116
|
};
|
|
119
117
|
const renderTitle = safeColumnTitle(column.title, {});
|
|
120
118
|
const displayTitle = renderTitle?.toString();
|
|
@@ -2,12 +2,15 @@ import { VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SemanticClassNames, SemanticStyles } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
5
|
+
import { CSSProperties } from "vue";
|
|
5
6
|
//#region src/tag/CheckableTagGroup.d.ts
|
|
6
7
|
type CheckableTagDefaultValue = string | number;
|
|
7
8
|
interface CheckableTagOption<CheckableTagValue = CheckableTagDefaultValue> {
|
|
8
9
|
value: CheckableTagValue;
|
|
9
10
|
label: VueNode;
|
|
10
11
|
disabled?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
11
14
|
}
|
|
12
15
|
interface CheckableTagGroupSingleProps<CheckableTagValue = CheckableTagDefaultValue> {
|
|
13
16
|
multiple?: false;
|
|
@@ -58,8 +58,8 @@ const CheckableTagGroup = /* @__PURE__ */ defineComponent((props, { emit, attrs,
|
|
|
58
58
|
}), [parsedOptions.value.map((option) => {
|
|
59
59
|
return createVNode(CheckableTag, {
|
|
60
60
|
"key": option.value,
|
|
61
|
-
"class": clsx(`${groupPrefixCls.value}-item`, mergedClassNames.value.item),
|
|
62
|
-
"style": mergedStyles.value.item,
|
|
61
|
+
"class": clsx(`${groupPrefixCls.value}-item`, mergedClassNames.value.item, option.class),
|
|
62
|
+
"style": [mergedStyles.value.item, option.style],
|
|
63
63
|
"checked": multiple ? (mergedValue.value || []).includes(option.value) : mergedValue.value === option.value,
|
|
64
64
|
"onChange": (checked) => handleChange(checked, option),
|
|
65
65
|
"disabled": option.disabled ?? disabled
|
|
@@ -9,6 +9,6 @@ declare function useColor(props: {
|
|
|
9
9
|
color: Ref<TagProps['color']>;
|
|
10
10
|
variant: Ref<TagProps['variant']>;
|
|
11
11
|
bordered: Ref<TagProps['bordered']>;
|
|
12
|
-
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"
|
|
12
|
+
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"solid" | "filled" | "outlined">, import("vue").ComputedRef<string | undefined>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<CSSProperties>];
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useColor as default };
|
package/dist/tag/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
|
5
5
|
import wave_default from "../_util/wave/index.js";
|
|
6
6
|
import { replaceElement } from "../_util/vueNode.js";
|
|
7
7
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
8
|
+
import { isRenderable } from "../_util/is.js";
|
|
8
9
|
import style_default from "./style/index.js";
|
|
9
10
|
import CheckableTag from "./CheckableTag.js";
|
|
10
11
|
import CheckableTagGroup from "./CheckableTagGroup.js";
|
|
@@ -122,7 +123,7 @@ const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
122
123
|
class: mergedClassNames.value?.icon,
|
|
123
124
|
style: mergedStyles.value?.icon
|
|
124
125
|
});
|
|
125
|
-
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes, children && createVNode("span", {
|
|
126
|
+
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes, isRenderable(children) && createVNode("span", {
|
|
126
127
|
"class": mergedClassNames.value.content,
|
|
127
128
|
"style": mergedStyles.value.content
|
|
128
129
|
}, [children])]) : children;
|
package/dist/tour/panelRender.js
CHANGED
|
@@ -135,8 +135,14 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
|
|
|
135
135
|
type: Function,
|
|
136
136
|
required: false
|
|
137
137
|
},
|
|
138
|
-
classes: {
|
|
139
|
-
|
|
138
|
+
classes: {
|
|
139
|
+
type: [Object, Function],
|
|
140
|
+
required: false
|
|
141
|
+
},
|
|
142
|
+
styles: {
|
|
143
|
+
type: [Object, Function],
|
|
144
|
+
required: false
|
|
145
|
+
},
|
|
140
146
|
actionsRender: {
|
|
141
147
|
type: Function,
|
|
142
148
|
required: false
|
package/dist/transfer/Section.js
CHANGED
|
@@ -138,7 +138,7 @@ const TransferSection = /* @__PURE__ */ defineComponent((props) => {
|
|
|
138
138
|
};
|
|
139
139
|
return () => {
|
|
140
140
|
const checkBox = createVNode(checkbox_default, {
|
|
141
|
-
"disabled": !
|
|
141
|
+
"disabled": !filteredItems.value.filterItems.some((d) => !d.disabled) || props.disabled,
|
|
142
142
|
"checked": checkStatus.value === "all",
|
|
143
143
|
"indeterminate": checkStatus.value === "part",
|
|
144
144
|
"class": `${listPrefixCls.value}-checkbox`,
|
package/dist/upload/utils.js
CHANGED
|
@@ -52,6 +52,14 @@ function previewImage(file) {
|
|
|
52
52
|
resolve("");
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
+
if (file.type.startsWith("image/gif")) {
|
|
56
|
+
const reader = new FileReader();
|
|
57
|
+
reader.onload = () => {
|
|
58
|
+
if (reader.result) resolve(reader.result);
|
|
59
|
+
};
|
|
60
|
+
reader.readAsDataURL(file);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
55
63
|
const canvas = document.createElement("canvas");
|
|
56
64
|
canvas.width = MEASURE_SIZE;
|
|
57
65
|
canvas.height = MEASURE_SIZE;
|
|
@@ -85,12 +93,6 @@ function previewImage(file) {
|
|
|
85
93
|
if (reader.result && typeof reader.result === "string") img.src = reader.result;
|
|
86
94
|
};
|
|
87
95
|
reader.readAsDataURL(file);
|
|
88
|
-
} else if (file.type.startsWith("image/gif")) {
|
|
89
|
-
const reader = new FileReader();
|
|
90
|
-
reader.onload = () => {
|
|
91
|
-
if (reader.result) resolve(reader.result);
|
|
92
|
-
};
|
|
93
|
-
reader.readAsDataURL(file);
|
|
94
96
|
} else img.src = window.URL.createObjectURL(file);
|
|
95
97
|
});
|
|
96
98
|
}
|