antdv-next 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/wave/index.js +1 -1
- package/dist/antd-with-locales.esm.js +10825 -11352
- package/dist/antd-with-locales.js +80 -80
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +11048 -11427
- package/dist/antd.js +80 -80
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/collapse/style/index.js +1 -1
- package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
- package/dist/date-picker/util.d.ts +4 -4
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/form/Form.js +23 -6
- package/dist/form/FormItem/index.js +25 -2
- package/dist/form/context.d.ts +3 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/form/util.d.ts +7 -1
- package/dist/form/util.js +9 -1
- package/dist/grid/col.js +2 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +14 -12
- package/dist/input/Search.js +19 -13
- package/dist/layout/style/sider.js +1 -1
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +1 -0
- package/dist/radio/style/index.js +1 -5
- package/dist/segmented/style/index.js +2 -7
- package/dist/space/Compact.d.ts +1 -1
- package/dist/splitter/SplitBar.js +12 -1
- package/dist/splitter/Splitter.js +6 -4
- package/dist/tabs/index.d.ts +33 -10
- package/dist/tabs/index.js +3 -2
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +1 -0
- package/dist/timeline/Timeline.d.ts +6 -6
- package/dist/timeline/Timeline.js +21 -4
- package/dist/timeline/useItems.d.ts +7 -2
- package/dist/timeline/useItems.js +14 -4
- package/dist/tree/DirectoryTree.js +4 -4
- package/dist/tree/Tree.d.ts +3 -1
- package/dist/tree/Tree.js +10 -7
- package/dist/tree/style/index.js +4 -4
- package/dist/typography/style/mixins.js +3 -3
- package/package.json +5 -4
- package/web-tags.json +1330 -1334
- package/web-types.json +4812 -4824
|
@@ -12,7 +12,7 @@ interface AvatarContextType {
|
|
|
12
12
|
shape?: 'circle' | 'square';
|
|
13
13
|
}
|
|
14
14
|
declare function useAvatarContext(): Ref<{
|
|
15
|
-
size?: number | "default" |
|
|
15
|
+
size?: number | SizeType | "default" | {
|
|
16
16
|
xxxl?: number | undefined;
|
|
17
17
|
xxl?: number | undefined;
|
|
18
18
|
xl?: number | undefined;
|
|
@@ -23,7 +23,7 @@ declare function useAvatarContext(): Ref<{
|
|
|
23
23
|
};
|
|
24
24
|
shape?: "circle" | "square" | undefined;
|
|
25
25
|
}, AvatarContextType | {
|
|
26
|
-
size?: number | "default" |
|
|
26
|
+
size?: number | SizeType | "default" | {
|
|
27
27
|
xxxl?: number | undefined;
|
|
28
28
|
xxl?: number | undefined;
|
|
29
29
|
xl?: number | undefined;
|
|
@@ -2,7 +2,7 @@ import { CSSProperties, VNodeChild } from "vue";
|
|
|
2
2
|
|
|
3
3
|
//#region src/button/buttonHelper.d.ts
|
|
4
4
|
declare const isTwoCNChar: (string: string) => boolean;
|
|
5
|
-
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "
|
|
5
|
+
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "link" | "text";
|
|
6
6
|
declare function spaceChildren(children: VNodeChild[], needInserted: boolean, style?: CSSProperties, className?: string): VNodeChild[];
|
|
7
7
|
declare const _ButtonTypes: readonly ["default", "primary", "dashed", "link", "text"];
|
|
8
8
|
type ButtonType = (typeof _ButtonTypes)[number];
|
|
@@ -114,7 +114,7 @@ const genBorderlessStyle = (token) => {
|
|
|
114
114
|
return { [`${componentCls}-borderless`]: {
|
|
115
115
|
backgroundColor: headerBg,
|
|
116
116
|
border: 0,
|
|
117
|
-
[`> ${componentCls}-item`]: { borderBottom:
|
|
117
|
+
[`> ${componentCls}-item`]: { borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${colorBorder}` },
|
|
118
118
|
[`
|
|
119
119
|
> ${componentCls}-item:last-child,
|
|
120
120
|
> ${componentCls}-item:last-child ${componentCls}-header
|
|
@@ -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;
|
|
7
9
|
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
8
10
|
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;
|
|
10
11
|
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;
|
|
@@ -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];
|
|
@@ -9,23 +9,23 @@ declare function useItems(screens: Ref<ScreenMap>, items: Ref<DescriptionsItemTy
|
|
|
9
9
|
filled: boolean;
|
|
10
10
|
_$index: number;
|
|
11
11
|
key?: import("@v-c/util/dist/type").Key;
|
|
12
|
+
classes?: CellSemanticClassNames | undefined;
|
|
12
13
|
styles?: CellSemanticStyles | undefined;
|
|
13
14
|
style?: import("vue").CSSProperties | undefined;
|
|
14
|
-
content?: VueNode;
|
|
15
|
-
classes?: CellSemanticClassNames | undefined;
|
|
16
15
|
rootClass?: string | undefined;
|
|
17
16
|
label?: VueNode;
|
|
18
17
|
class?: string | undefined;
|
|
18
|
+
content?: VueNode;
|
|
19
19
|
} | {
|
|
20
20
|
span: number | undefined;
|
|
21
21
|
key?: import("@v-c/util/dist/type").Key;
|
|
22
|
+
classes?: CellSemanticClassNames | undefined;
|
|
22
23
|
styles?: CellSemanticStyles | undefined;
|
|
23
24
|
style?: import("vue").CSSProperties | undefined;
|
|
24
|
-
content?: VueNode;
|
|
25
|
-
classes?: CellSemanticClassNames | undefined;
|
|
26
25
|
rootClass?: string | undefined;
|
|
27
26
|
label?: VueNode;
|
|
28
27
|
class?: string | undefined;
|
|
28
|
+
content?: VueNode;
|
|
29
29
|
_$index: number;
|
|
30
30
|
})[]>;
|
|
31
31
|
//#endregion
|
package/dist/form/Form.js
CHANGED
|
@@ -8,7 +8,7 @@ import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
|
8
8
|
import { useDisabledContext, useDisabledContextProvider } from "../config-provider/DisabledContext.js";
|
|
9
9
|
import useLocale from "../locale/useLocale.js";
|
|
10
10
|
import { NoFormStyle, useFormContextProvider, useVariantContextProvider } from "./context.js";
|
|
11
|
-
import { getFieldId, toArray } from "./util.js";
|
|
11
|
+
import { getFieldId, toArray, toNamePathStr } from "./util.js";
|
|
12
12
|
import { FormHookRegistryKey, FormInstanceContextKey } from "./hooks/useForm.js";
|
|
13
13
|
import style_default from "./style/index.js";
|
|
14
14
|
import { allPromiseFinish } from "./utils/asyncUtil.js";
|
|
@@ -19,6 +19,7 @@ import { computed, createVNode, defineComponent, getCurrentInstance, inject, mer
|
|
|
19
19
|
import { clsx, get, set } from "@v-c/util";
|
|
20
20
|
import { pick } from "es-toolkit";
|
|
21
21
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
22
|
+
import { getDOM } from "@v-c/util/dist/Dom/findDOMNode";
|
|
22
23
|
//#region src/form/Form.tsx
|
|
23
24
|
const InternalForm = /* @__PURE__ */ defineComponent((props, { slots, expose, emit, attrs }) => {
|
|
24
25
|
const contextDisabled = useDisabledContext();
|
|
@@ -81,6 +82,16 @@ const InternalForm = /* @__PURE__ */ defineComponent((props, { slots, expose, em
|
|
|
81
82
|
const removeField = (eventKey) => {
|
|
82
83
|
delete fields.value[eventKey];
|
|
83
84
|
};
|
|
85
|
+
const items = /* @__PURE__ */ new Map();
|
|
86
|
+
const addItem = (namePathStr, instance) => {
|
|
87
|
+
items.set(namePathStr, instance);
|
|
88
|
+
};
|
|
89
|
+
const removeItem = (namePathStr) => {
|
|
90
|
+
items.delete(namePathStr);
|
|
91
|
+
};
|
|
92
|
+
const getFieldInstance = (name) => {
|
|
93
|
+
return items.get(toNamePathStr(getNamePath(name)));
|
|
94
|
+
};
|
|
84
95
|
const getFieldsByNameList = (namePathList, partialMatch = false) => {
|
|
85
96
|
const mergedNamePathList = namePathList?.length ? namePathList : void 0;
|
|
86
97
|
const fieldList = Object.values(fields.value);
|
|
@@ -201,6 +212,8 @@ const InternalForm = /* @__PURE__ */ defineComponent((props, { slots, expose, em
|
|
|
201
212
|
feedbackIcons: feedbackIcons.value,
|
|
202
213
|
addField,
|
|
203
214
|
removeField,
|
|
215
|
+
addItem,
|
|
216
|
+
removeItem,
|
|
204
217
|
onValidate,
|
|
205
218
|
triggerValuesChange,
|
|
206
219
|
triggerFieldsChange,
|
|
@@ -327,16 +340,20 @@ const InternalForm = /* @__PURE__ */ defineComponent((props, { slots, expose, em
|
|
|
327
340
|
scrollToField(getNamePath(name), options);
|
|
328
341
|
},
|
|
329
342
|
focusField: (name) => {
|
|
343
|
+
const instance = getFieldInstance(name);
|
|
344
|
+
if (typeof instance?.focus === "function") {
|
|
345
|
+
try {
|
|
346
|
+
instance.focus();
|
|
347
|
+
} finally {}
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
330
350
|
const targetId = getFieldId(getNamePath(name), props.name);
|
|
331
|
-
const node = targetId ? document.getElementById(targetId) : null;
|
|
351
|
+
const node = getDOM(instance) ?? (targetId ? document.getElementById(targetId) : null);
|
|
332
352
|
if (node) try {
|
|
333
353
|
node.focus?.();
|
|
334
354
|
} finally {}
|
|
335
355
|
},
|
|
336
|
-
getFieldInstance
|
|
337
|
-
const targetId = getFieldId(getNamePath(name), props.name);
|
|
338
|
-
if (targetId) return fields.value?.[targetId];
|
|
339
|
-
}
|
|
356
|
+
getFieldInstance
|
|
340
357
|
};
|
|
341
358
|
expose(formInstance);
|
|
342
359
|
provide(FormInstanceContextKey, formInstance);
|
|
@@ -3,7 +3,7 @@ import { getSlotPropsFnRun } from "../../_util/tools.js";
|
|
|
3
3
|
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
4
4
|
import { checkRenderNode } from "../../_util/vueNode.js";
|
|
5
5
|
import { useFormContext, useFormItemProvider, useNoStyleItemContext } from "../context.js";
|
|
6
|
-
import { getFieldId, initialValueFormat, toArray } from "../util.js";
|
|
6
|
+
import { getFieldId, initialValueFormat, toArray, toNamePathStr } from "../util.js";
|
|
7
7
|
import style_default from "../style/index.js";
|
|
8
8
|
import { getNamePath, getValue, setValue } from "../utils/valueUtil.js";
|
|
9
9
|
import { validateRules } from "../utils/validateUtil.js";
|
|
@@ -250,6 +250,24 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
250
250
|
});
|
|
251
251
|
const rootClassName = computed(() => clsx(cssVarCls.value, rootCls.value, hashId.value, props.rootClass));
|
|
252
252
|
const eventKey = computed(() => `form-item-${fieldId.value || namePath.value.join("-") || Math.random().toString(36).slice(2)}`);
|
|
253
|
+
let itemInstanceKey;
|
|
254
|
+
let itemInstance = null;
|
|
255
|
+
const setItemInstance = (instance) => {
|
|
256
|
+
itemInstance = instance;
|
|
257
|
+
if (!hasName.value) return;
|
|
258
|
+
const nextKey = toNamePathStr(namePath.value);
|
|
259
|
+
if (itemInstanceKey && itemInstanceKey !== nextKey) formContext.value?.removeItem?.(itemInstanceKey);
|
|
260
|
+
itemInstanceKey = nextKey;
|
|
261
|
+
if (instance) formContext.value?.addItem?.(nextKey, instance);
|
|
262
|
+
else formContext.value?.removeItem?.(nextKey);
|
|
263
|
+
};
|
|
264
|
+
watch([namePath, hasName], () => {
|
|
265
|
+
if (itemInstanceKey) {
|
|
266
|
+
formContext.value?.removeItem?.(itemInstanceKey);
|
|
267
|
+
itemInstanceKey = void 0;
|
|
268
|
+
}
|
|
269
|
+
if (itemInstance) setItemInstance(itemInstance);
|
|
270
|
+
}, { flush: "post" });
|
|
253
271
|
watch(hasName, (val, _, onCleanup) => {
|
|
254
272
|
if (val && formContext.value?.addField) {
|
|
255
273
|
formContext.value.addField(eventKey.value, {
|
|
@@ -284,6 +302,10 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
284
302
|
destroy: true
|
|
285
303
|
}, meta.value.name);
|
|
286
304
|
formContext.value?.removeField?.(eventKey.value);
|
|
305
|
+
if (itemInstanceKey) {
|
|
306
|
+
formContext.value?.removeItem?.(itemInstanceKey);
|
|
307
|
+
itemInstanceKey = void 0;
|
|
308
|
+
}
|
|
287
309
|
});
|
|
288
310
|
useFormItemProvider({
|
|
289
311
|
fieldId,
|
|
@@ -318,7 +340,8 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
318
340
|
if (typeof fn === "function") fn(...args);
|
|
319
341
|
});
|
|
320
342
|
else _onFocus?.(...args);
|
|
321
|
-
}
|
|
343
|
+
},
|
|
344
|
+
ref: setItemInstance
|
|
322
345
|
});
|
|
323
346
|
}
|
|
324
347
|
if (props.noStyle && !props.hidden) return createVNode(StatusProvider, {
|
package/dist/form/context.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ interface FormContextProps {
|
|
|
45
45
|
clearOnDestroy?: boolean;
|
|
46
46
|
addField?: (eventKey: string, field: FormFieldRegister) => void;
|
|
47
47
|
removeField?: (eventKey: string) => void;
|
|
48
|
+
addItem?: (namePathStr: string, instance: any) => void;
|
|
49
|
+
removeItem?: (namePathStr: string) => void;
|
|
48
50
|
onValidate?: (name: InternalNamePath, status: boolean, errors: any[] | null) => void;
|
|
49
51
|
triggerValuesChange?: (namePath: InternalNamePath, value: any) => void;
|
|
50
52
|
triggerFieldsChange?: (namePathList?: InternalNamePath[]) => void;
|
|
@@ -69,7 +71,7 @@ declare function useFormItemPrefixContext(): Ref<{
|
|
|
69
71
|
prefixCls: string;
|
|
70
72
|
}>;
|
|
71
73
|
declare function useVariantContextProvider(variant: Ref<Variant | undefined>): void;
|
|
72
|
-
declare function useVariantContext(): Ref<"outlined" | "
|
|
74
|
+
declare function useVariantContext(): Ref<"outlined" | "filled" | "borderless" | "underlined" | undefined, "outlined" | "filled" | "borderless" | "underlined" | undefined>;
|
|
73
75
|
interface FormItemStatusContextProps {
|
|
74
76
|
isFormItemInput?: boolean;
|
|
75
77
|
status?: ValidateStatus;
|
|
@@ -4,7 +4,7 @@ import { Ref } from "vue";
|
|
|
4
4
|
|
|
5
5
|
//#region src/form/hooks/useVariant.d.ts
|
|
6
6
|
type VariantComponents = keyof Pick<ConfigProviderProps, 'input' | 'inputNumber' | 'textArea' | 'mentions' | 'select' | 'cascader' | 'treeSelect' | 'datePicker' | 'timePicker' | 'rangePicker' | 'card'>;
|
|
7
|
-
declare function useVariant(component: VariantComponents, variant?: Ref<Variant | undefined>, legacyBordered?: Ref<boolean | undefined> | boolean): readonly [import("vue").ComputedRef<"outlined" | "
|
|
7
|
+
declare function useVariant(component: VariantComponents, variant?: Ref<Variant | undefined>, legacyBordered?: Ref<boolean | undefined> | boolean): readonly [import("vue").ComputedRef<"outlined" | "filled" | "borderless" | "underlined">, import("vue").ComputedRef<boolean>];
|
|
8
8
|
declare const useVariants: typeof useVariant;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { useVariant as default, useVariants };
|
package/dist/form/util.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ import { ValidateStatus } from "./FormItem/index.js";
|
|
|
3
3
|
|
|
4
4
|
//#region src/form/util.d.ts
|
|
5
5
|
declare function toArray<T>(candidate?: T | T[] | false): T[];
|
|
6
|
+
/**
|
|
7
|
+
* Key used to track the rendered control instance of a Form.Item.
|
|
8
|
+
* Unlike `getFieldId`, this is not prefixed with the form name, so it stays
|
|
9
|
+
* stable no matter whether the Form declares a `name`.
|
|
10
|
+
*/
|
|
11
|
+
declare function toNamePathStr(namePath: InternalNamePath): string;
|
|
6
12
|
declare function getFieldId(namePath: InternalNamePath, formName?: string): string | undefined;
|
|
7
13
|
/**
|
|
8
14
|
* Get merged status by meta or passed `validateStatus`.
|
|
@@ -10,4 +16,4 @@ declare function getFieldId(namePath: InternalNamePath, formName?: string): stri
|
|
|
10
16
|
declare function getStatus<DefaultValue>(errors: any[], warnings: any[], meta: Meta, defaultValidateStatus: ValidateStatus | DefaultValue, hasFeedback?: boolean, validateStatus?: ValidateStatus): ValidateStatus | DefaultValue;
|
|
11
17
|
declare function initialValueFormat(value: any): any;
|
|
12
18
|
//#endregion
|
|
13
|
-
export { getFieldId, getStatus, initialValueFormat, toArray };
|
|
19
|
+
export { getFieldId, getStatus, initialValueFormat, toArray, toNamePathStr };
|
package/dist/form/util.js
CHANGED
|
@@ -10,6 +10,14 @@ function toArray(candidate) {
|
|
|
10
10
|
if (candidate === void 0 || candidate === false) return [];
|
|
11
11
|
return Array.isArray(candidate) ? candidate : [candidate];
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Key used to track the rendered control instance of a Form.Item.
|
|
15
|
+
* Unlike `getFieldId`, this is not prefixed with the form name, so it stays
|
|
16
|
+
* stable no matter whether the Form declares a `name`.
|
|
17
|
+
*/
|
|
18
|
+
function toNamePathStr(namePath) {
|
|
19
|
+
return namePath.join("_");
|
|
20
|
+
}
|
|
13
21
|
function getFieldId(namePath, formName) {
|
|
14
22
|
if (!namePath.length) return;
|
|
15
23
|
const mergedId = namePath.join("_");
|
|
@@ -34,4 +42,4 @@ function initialValueFormat(value) {
|
|
|
34
42
|
return value;
|
|
35
43
|
}
|
|
36
44
|
//#endregion
|
|
37
|
-
export { getFieldId, getStatus, initialValueFormat, toArray };
|
|
45
|
+
export { getFieldId, getStatus, initialValueFormat, toArray, toNamePathStr };
|
package/dist/grid/col.js
CHANGED
|
@@ -40,7 +40,7 @@ const Col = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
40
40
|
[`${prefixCls.value}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
|
|
41
41
|
[`${prefixCls.value}-rtl`]: configCtx.value.direction === "rtl"
|
|
42
42
|
};
|
|
43
|
-
if (sizeProps.flex) {
|
|
43
|
+
if (sizeProps.flex || sizeProps.flex === 0) {
|
|
44
44
|
sizeClassObj[`${prefixCls.value}-${size}-flex`] = true;
|
|
45
45
|
sizeStyle[varName(`${size}-flex`)] = parseFlex(sizeProps.flex);
|
|
46
46
|
}
|
|
@@ -58,7 +58,7 @@ const Col = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
58
58
|
mergedStyle.paddingLeft = `${horizontalGutter}px`;
|
|
59
59
|
mergedStyle.paddingRight = `${horizontalGutter}px`;
|
|
60
60
|
}
|
|
61
|
-
if (flex) {
|
|
61
|
+
if (flex || flex === 0) {
|
|
62
62
|
mergedStyle.flex = parseFlex(flex);
|
|
63
63
|
if (wrap?.value === false && !mergedStyle.minWidth) mergedStyle.minWidth = 0;
|
|
64
64
|
}
|
|
@@ -37,10 +37,10 @@ declare function usePreviewConfig<T extends PreviewConfig | GroupPreviewConfig>(
|
|
|
37
37
|
image: import("@v-c/image").ImgInfo;
|
|
38
38
|
}) => import("@v-c/util").VueNode;
|
|
39
39
|
readonly onChange?: (current: number, prevCurrent: number) => void;
|
|
40
|
-
readonly focusTrap?: boolean;
|
|
41
40
|
readonly afterOpenChange?: (open: boolean) => void;
|
|
42
|
-
readonly maskClosable?: boolean;
|
|
43
41
|
readonly zIndex?: number;
|
|
42
|
+
readonly focusTrap?: boolean;
|
|
43
|
+
readonly maskClosable?: boolean;
|
|
44
44
|
readonly getContainer?: import("@v-c/portal/dist/Portal.js").PortalProps["getContainer"];
|
|
45
45
|
readonly closeIcon?: import("@v-c/util").VueNode | boolean | null;
|
|
46
46
|
readonly motionName?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -154,10 +154,12 @@ import Typography, { TypographyLink, TypographyParagraph, TypographyText, Typogr
|
|
|
154
154
|
import { DraggerProps } from "./upload/Dragger.js";
|
|
155
155
|
import Upload, { UploadDragger, UploadProps } from "./upload/index.js";
|
|
156
156
|
import Watermark, { WatermarkProps } from "./watermark/index.js";
|
|
157
|
-
import { Plugin } from "vue";
|
|
157
|
+
import { App, Plugin } from "vue";
|
|
158
158
|
import { StyleProvider } from "@antdv-next/cssinjs";
|
|
159
159
|
|
|
160
160
|
//#region src/index.d.ts
|
|
161
|
+
declare function setPrefix(newPrefix: string): void;
|
|
162
|
+
declare function install(app: App): void;
|
|
161
163
|
declare const _default$16: Plugin;
|
|
162
164
|
//#endregion
|
|
163
|
-
export { Affix, type AffixEmits, type AffixProps, type AffixRef, Alert, type AlertEmits, type AlertProps, type AlertSemanticType, type AlertSlots, Anchor, type AnchorEmits, type AnchorLinkProps, type AnchorProps, type AnchorSlots, type AntTreeNode, type AntTreeNodeCheckedEvent, type AntTreeNodeExpandedEvent, type AntTreeNodeMouseEvent, type AntTreeNodeProps, type AntTreeNodeSelectedEvent, type AntdTreeNodeAttribute, _default as App, type AppProps, AutoComplete, type AutoCompleteClassNamesType, type AutoCompleteEmits, Option as AutoCompleteOption, type AutoCompleteProps, type AutoCompleteSlots, type AutoCompleteStylesType, Avatar, type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSlots, BackTopWithInstall as BackTop, Badge, type BadgeProps, BadgeRibbon, type RibbonProps as BadgeRibbonProps, type BadgeSlots, type BasicDataNode, BorderBeam, type BorderBeamColor, type BorderBeamGradient, type BorderBeamProps, Breadcrumb, type BreadcrumbEmits, _default$1 as BreadcrumbItem, type BreadcrumbItemProps, type ItemType as BreadcrumbItemType, type BreadcrumbProps, _default$2 as BreadcrumbSeparator, type BreadcrumbSlots, Button, type ButtonColorType, type ButtonEmits, type ButtonHTMLType, type ButtonProps, type ButtonSemanticName, type ButtonShape, type SizeType as ButtonSize, type ButtonSlots, type ButtonType, type ButtonVariantType, _default$3 as Calendar, type CalendarMode, type CalendarProps, Card, type CardEmits, CardGrid, type CardGridProps, CardMeta, type CardMetaProps, type CardProps, type CardSize, type CardSlots, type CardTabListType, Carousel, type CarouselEmits, type CarouselProps, type CarouselRef, type CarouselSlots, Cascader, type CascaderEmits, CascaderPanel, type CascaderPanelEmits, type CascaderPanelProps, type CascaderPanelSlots, type CascaderProps, type CascaderSlots, CheckableTag, CheckableTagGroup, type CheckableTagProps, InternalCheckbox as Checkbox, type CheckboxEmits, CheckboxGroup, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSlots, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, Col, type ColProps, type ColSize, Collapse, CollapsePanel, type CollapsePanelProps, type CollapsePanelSlots, type CollapseProps, type AggregationColor as Color, ColorPicker, type ColorPickerEmits, type ColorPickerProps, type ColorPickerSlots, type ColorValueType, _default$4 as ConfigProvider, type ConfigProviderProps, type DataSourceItemObject, type DataSourceItemType, DateMonthPicker, _default$5 as DatePicker, type DatePickerEmits, type DatePickerProps, type DatePickerSlots, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, type DescriptionsItemType, type DescriptionsProps, type DescriptionsSlots, DirectoryTree, type DirectoryTreeEmits, type ExpandAction as DirectoryTreeExpandAction, type DirectoryTreeProps, type DirectoryTreeSlots, Divider, type DividerProps, Drawer, type DrawerEmits, type DrawerProps, type DrawerResizableConfig, type DrawerSlots, Dropdown, type DropdownArrowOptions, type DropdownEmits, type DropdownProps, type DropdownSlots, _default$6 as Empty, type EmptyProps, type EmptySlots, Flex, type FlexProps, type FlexSlots, FloatButton, FloatButtonGroup, type FloatButtonGroupProps, type FloatButtonProps, type FloatButtonRef, InternalForm as Form, type FormEmits, type FormHookInstance, type FormInstance, InternalFormItem as FormItem, type FormItemEmits, type FormItemProps, type FormItemSlots, type FormProps, type FormSlots, type GlobalToken, _default_1 as Image, type ImageEmits, type PreviewConfig as ImagePreviewConfig, ImagePreviewGroup, type ImagePreviewGroupProps, type ImageProps, type ImageSlots, CompoundedInput as Input, type InputEmits, InputGroup, type InputGroupProps, InputNumber, type InputNumberEmits, type InputNumberProps, type VcInputNumberRef as InputNumberRef, type InputNumberStepContext, type ValueType as InputNumberValueType, InputOTP, type OTPEmits as InputOTPEmits, type OTPProps as InputOTPProps, type OTPSlots as InputOTPSlots, InputPassword, type PasswordProps as InputPasswordProps, type InputPasswordRef, type InputProps, type InputRef, InputSearch, type SearchProps as InputSearchProps, type InputSearchRef, type InputSlots, type InputTextAreaRef, type KeyWise, type KeyWiseTransferItem, Layout, LayoutContent, LayoutFooter, LayoutHeader, type BasicProps as LayoutProps, LayoutSider, type LegacyButtonType, type ListStyle, _default$7 as Masonry, type MasonryEmits, type MasonryProps, type MasonryRef, type MasonrySlots, type MentionPlacement, Mentions, type MentionsClassNamesType, type MentionsEmits, Option$1 as MentionsOption, type MentionsOptionProps, type MentionsProps, type MentionsRef, type MentionsSlots, type MentionsStylesType, _default$8 as Menu, MenuDivider, type MenuEmits, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, type MenuItemType, type MenuProps, type MenuRef, type MenuSlots, _default$9 as Modal, type ModalEmits, type ModalProps, type ModalSlots, type MonthPickerProps, Pagination, type PaginationClassNamesType, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, type PaginationProps, type PaginationSlots, type PaginationStylesType, Popconfirm, type PopconfirmEmits, type PopconfirmProps, type PopconfirmSlots, Popover, type PopoverEmits, type PopoverProps, type PopoverRef, type PopoverSlots, Progress, type ProgressProps, QRCode, type QRCodeEmits, type QRCodeProps, InternalRadio as Radio, RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupEmits, type RadioGroupOptionType, type RadioGroupProps, type RadioGroupSlots, type RadioOptionType, type RadioProps, type RadioSlots, type RangePickerProps, Rate, type RateEmits, type RateProps, type RenderResult, type RenderResultObject, _default$10 as Result, type ResultProps, type ResultSlots, type ResultStatusType, Row, type RowProps, type Rule, type RuleObject, type RuleRender, type RuleType, Segmented, type SegmentedEmits, type SegmentedOptions, type SegmentedProps, type SegmentedSlots, Select, type SelectAllLabel, type SelectEmits, SelectOptGroup, SelectOption, type SelectProps, type SelectSlots, type SelectValue, type SizeType, SkeletonWithSubComponents as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, type SkeletonProps, Slider, type SliderEmits, type SliderProps, Space, SpaceAddon, SpaceCompact, type SpaceProps, type SpaceSize, type SpaceSlots, _default$11 as Spin, type SpinProps, type SpinSlots, Splitter, type SplitterEmits, SplitterPanel, type SplitterProps, type SplitterSlots, _default$12 as Statistic, type StatisticProps, StatisticTimer, type StatisticTimerProps, type StepItem, Steps, type StepsEmits, type StepsProps, type StepsSlots, StyleProvider, SubMenu, type SubMenuProps, Switch, type SwitchEmits, type SwitchProps, type SwitchSize, type SwitchSlots, TabPane, type TabPaneProps, _default$13 as Table, type TableClassNamesType, Column as TableColumn, ColumnGroup as TableColumnGroup, type ColumnType as TableColumnType, type ColumnsType as TableColumnsType, type DataIndex as TableDataIndex, type TableEmits, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type SortOrder as TableSortOrder, type SorterResult as TableSorterResult, type TableStylesType, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, type TabsEmits, type TabsProps, type TabsRef, type TabsSlots, Tag, type TagProps, type TagSlots, InternalTextArea as TextArea, type TextAreaProps, type TextAreaRef, type ThemeConfig, _default$14 as TimePicker, type TimePickerEmits, type TimePickerLocale, type TimePickerProps, type TimePickerSlots, TimeRangePicker, type TimeRangePickerEmits, type TimeRangePickerProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemSlots, type TimelineItemType, type TimelineProps, _default$15 as Tooltip, type TooltipAlignConfig, type TooltipEmits, type TooltipPlacement, type TooltipProps, type TooltipRef, type TooltipSlots, Tour, type TourEmits, type TourLocale, type TourProps, type TourSlots, type TourStepItem, type TourStylesType, InternalTransfer as Transfer, type TransferClassNamesType, type TransferCustomListBodyProps, type TransferDirection, type TransferEmits, type TransferItem, type TransferKey, type TransferListBodyProps, type TransferListProps, type TransferLocale, type TransferOperationProps, type PaginationType as TransferPaginationType, type TransferProps, type TransferRender, type TransferSearchEmits, type TransferSearchOption, type TransferSearchProps, type TransferSearchSlots, type TransferSlots, type TransferStylesType, Tree, type DataNode as TreeDataNode, type TreeEmits, type TreeProps, TreeSelect, type TreeSelectEmits, type TreeSelectNode, type TreeSelectProps, type TreeSelectSlots, type TreeSlots, Typography, type BlockProps as TypographyBaseProps, TypographyLink, type LinkProps as TypographyLinkProps, TypographyParagraph, type ParagraphProps as TypographyParagraphProps, TypographyText, type TextProps as TypographyTextProps, TypographyTitle, type TitleProps as TypographyTitleProps, UniqueProvider, Upload, type UploadChangeParam, UploadDragger, type DraggerProps as UploadDraggerProps, type UploadEmits, type UploadFile, type UploadProps, type UploadSlots, Watermark, type WatermarkProps, type WeekPickerProps, _default$16 as default, staticMethods as message, staticMethods$1 as notification, _default$17 as theme, useBreakpoint, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useResponsive, _version2 as version };
|
|
165
|
+
export { Affix, type AffixEmits, type AffixProps, type AffixRef, Alert, type AlertEmits, type AlertProps, type AlertSemanticType, type AlertSlots, Anchor, type AnchorEmits, type AnchorLinkProps, type AnchorProps, type AnchorSlots, type AntTreeNode, type AntTreeNodeCheckedEvent, type AntTreeNodeExpandedEvent, type AntTreeNodeMouseEvent, type AntTreeNodeProps, type AntTreeNodeSelectedEvent, type AntdTreeNodeAttribute, _default as App, type AppProps, AutoComplete, type AutoCompleteClassNamesType, type AutoCompleteEmits, Option as AutoCompleteOption, type AutoCompleteProps, type AutoCompleteSlots, type AutoCompleteStylesType, Avatar, type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSlots, BackTopWithInstall as BackTop, Badge, type BadgeProps, BadgeRibbon, type RibbonProps as BadgeRibbonProps, type BadgeSlots, type BasicDataNode, BorderBeam, type BorderBeamColor, type BorderBeamGradient, type BorderBeamProps, Breadcrumb, type BreadcrumbEmits, _default$1 as BreadcrumbItem, type BreadcrumbItemProps, type ItemType as BreadcrumbItemType, type BreadcrumbProps, _default$2 as BreadcrumbSeparator, type BreadcrumbSlots, Button, type ButtonColorType, type ButtonEmits, type ButtonHTMLType, type ButtonProps, type ButtonSemanticName, type ButtonShape, type SizeType as ButtonSize, type ButtonSlots, type ButtonType, type ButtonVariantType, _default$3 as Calendar, type CalendarMode, type CalendarProps, Card, type CardEmits, CardGrid, type CardGridProps, CardMeta, type CardMetaProps, type CardProps, type CardSize, type CardSlots, type CardTabListType, Carousel, type CarouselEmits, type CarouselProps, type CarouselRef, type CarouselSlots, Cascader, type CascaderEmits, CascaderPanel, type CascaderPanelEmits, type CascaderPanelProps, type CascaderPanelSlots, type CascaderProps, type CascaderSlots, CheckableTag, CheckableTagGroup, type CheckableTagProps, InternalCheckbox as Checkbox, type CheckboxEmits, CheckboxGroup, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSlots, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, Col, type ColProps, type ColSize, Collapse, CollapsePanel, type CollapsePanelProps, type CollapsePanelSlots, type CollapseProps, type AggregationColor as Color, ColorPicker, type ColorPickerEmits, type ColorPickerProps, type ColorPickerSlots, type ColorValueType, _default$4 as ConfigProvider, type ConfigProviderProps, type DataSourceItemObject, type DataSourceItemType, DateMonthPicker, _default$5 as DatePicker, type DatePickerEmits, type DatePickerProps, type DatePickerSlots, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, type DescriptionsItemType, type DescriptionsProps, type DescriptionsSlots, DirectoryTree, type DirectoryTreeEmits, type ExpandAction as DirectoryTreeExpandAction, type DirectoryTreeProps, type DirectoryTreeSlots, Divider, type DividerProps, Drawer, type DrawerEmits, type DrawerProps, type DrawerResizableConfig, type DrawerSlots, Dropdown, type DropdownArrowOptions, type DropdownEmits, type DropdownProps, type DropdownSlots, _default$6 as Empty, type EmptyProps, type EmptySlots, Flex, type FlexProps, type FlexSlots, FloatButton, FloatButtonGroup, type FloatButtonGroupProps, type FloatButtonProps, type FloatButtonRef, InternalForm as Form, type FormEmits, type FormHookInstance, type FormInstance, InternalFormItem as FormItem, type FormItemEmits, type FormItemProps, type FormItemSlots, type FormProps, type FormSlots, type GlobalToken, _default_1 as Image, type ImageEmits, type PreviewConfig as ImagePreviewConfig, ImagePreviewGroup, type ImagePreviewGroupProps, type ImageProps, type ImageSlots, CompoundedInput as Input, type InputEmits, InputGroup, type InputGroupProps, InputNumber, type InputNumberEmits, type InputNumberProps, type VcInputNumberRef as InputNumberRef, type InputNumberStepContext, type ValueType as InputNumberValueType, InputOTP, type OTPEmits as InputOTPEmits, type OTPProps as InputOTPProps, type OTPSlots as InputOTPSlots, InputPassword, type PasswordProps as InputPasswordProps, type InputPasswordRef, type InputProps, type InputRef, InputSearch, type SearchProps as InputSearchProps, type InputSearchRef, type InputSlots, type InputTextAreaRef, type KeyWise, type KeyWiseTransferItem, Layout, LayoutContent, LayoutFooter, LayoutHeader, type BasicProps as LayoutProps, LayoutSider, type LegacyButtonType, type ListStyle, _default$7 as Masonry, type MasonryEmits, type MasonryProps, type MasonryRef, type MasonrySlots, type MentionPlacement, Mentions, type MentionsClassNamesType, type MentionsEmits, Option$1 as MentionsOption, type MentionsOptionProps, type MentionsProps, type MentionsRef, type MentionsSlots, type MentionsStylesType, _default$8 as Menu, MenuDivider, type MenuEmits, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, type MenuItemType, type MenuProps, type MenuRef, type MenuSlots, _default$9 as Modal, type ModalEmits, type ModalProps, type ModalSlots, type MonthPickerProps, Pagination, type PaginationClassNamesType, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, type PaginationProps, type PaginationSlots, type PaginationStylesType, Popconfirm, type PopconfirmEmits, type PopconfirmProps, type PopconfirmSlots, Popover, type PopoverEmits, type PopoverProps, type PopoverRef, type PopoverSlots, Progress, type ProgressProps, QRCode, type QRCodeEmits, type QRCodeProps, InternalRadio as Radio, RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupEmits, type RadioGroupOptionType, type RadioGroupProps, type RadioGroupSlots, type RadioOptionType, type RadioProps, type RadioSlots, type RangePickerProps, Rate, type RateEmits, type RateProps, type RenderResult, type RenderResultObject, _default$10 as Result, type ResultProps, type ResultSlots, type ResultStatusType, Row, type RowProps, type Rule, type RuleObject, type RuleRender, type RuleType, Segmented, type SegmentedEmits, type SegmentedOptions, type SegmentedProps, type SegmentedSlots, Select, type SelectAllLabel, type SelectEmits, SelectOptGroup, SelectOption, type SelectProps, type SelectSlots, type SelectValue, type SizeType, SkeletonWithSubComponents as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, type SkeletonProps, Slider, type SliderEmits, type SliderProps, Space, SpaceAddon, SpaceCompact, type SpaceProps, type SpaceSize, type SpaceSlots, _default$11 as Spin, type SpinProps, type SpinSlots, Splitter, type SplitterEmits, SplitterPanel, type SplitterProps, type SplitterSlots, _default$12 as Statistic, type StatisticProps, StatisticTimer, type StatisticTimerProps, type StepItem, Steps, type StepsEmits, type StepsProps, type StepsSlots, StyleProvider, SubMenu, type SubMenuProps, Switch, type SwitchEmits, type SwitchProps, type SwitchSize, type SwitchSlots, TabPane, type TabPaneProps, _default$13 as Table, type TableClassNamesType, Column as TableColumn, ColumnGroup as TableColumnGroup, type ColumnType as TableColumnType, type ColumnsType as TableColumnsType, type DataIndex as TableDataIndex, type TableEmits, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type SortOrder as TableSortOrder, type SorterResult as TableSorterResult, type TableStylesType, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, type TabsEmits, type TabsProps, type TabsRef, type TabsSlots, Tag, type TagProps, type TagSlots, InternalTextArea as TextArea, type TextAreaProps, type TextAreaRef, type ThemeConfig, _default$14 as TimePicker, type TimePickerEmits, type TimePickerLocale, type TimePickerProps, type TimePickerSlots, TimeRangePicker, type TimeRangePickerEmits, type TimeRangePickerProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemSlots, type TimelineItemType, type TimelineProps, _default$15 as Tooltip, type TooltipAlignConfig, type TooltipEmits, type TooltipPlacement, type TooltipProps, type TooltipRef, type TooltipSlots, Tour, type TourEmits, type TourLocale, type TourProps, type TourSlots, type TourStepItem, type TourStylesType, InternalTransfer as Transfer, type TransferClassNamesType, type TransferCustomListBodyProps, type TransferDirection, type TransferEmits, type TransferItem, type TransferKey, type TransferListBodyProps, type TransferListProps, type TransferLocale, type TransferOperationProps, type PaginationType as TransferPaginationType, type TransferProps, type TransferRender, type TransferSearchEmits, type TransferSearchOption, type TransferSearchProps, type TransferSearchSlots, type TransferSlots, type TransferStylesType, Tree, type DataNode as TreeDataNode, type TreeEmits, type TreeProps, TreeSelect, type TreeSelectEmits, type TreeSelectNode, type TreeSelectProps, type TreeSelectSlots, type TreeSlots, Typography, type BlockProps as TypographyBaseProps, TypographyLink, type LinkProps as TypographyLinkProps, TypographyParagraph, type ParagraphProps as TypographyParagraphProps, TypographyText, type TextProps as TypographyTextProps, TypographyTitle, type TitleProps as TypographyTitleProps, UniqueProvider, Upload, type UploadChangeParam, UploadDragger, type DraggerProps as UploadDraggerProps, type UploadEmits, type UploadFile, type UploadProps, type UploadSlots, Watermark, type WatermarkProps, type WeekPickerProps, _default$16 as default, install, staticMethods as message, staticMethods$1 as notification, setPrefix, _default$17 as theme, useBreakpoint, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useResponsive, _version2 as version };
|
package/dist/index.js
CHANGED
|
@@ -110,19 +110,21 @@ import theme_default from "./theme/index.js";
|
|
|
110
110
|
import { StyleProvider } from "@antdv-next/cssinjs";
|
|
111
111
|
//#region src/index.ts
|
|
112
112
|
let prefix = "A";
|
|
113
|
+
function setPrefix(newPrefix) {
|
|
114
|
+
prefix = newPrefix;
|
|
115
|
+
}
|
|
116
|
+
function install(app) {
|
|
117
|
+
app.config.globalProperties._ant_prefix = prefix;
|
|
118
|
+
Object.keys(components_exports).forEach((key) => {
|
|
119
|
+
const component = components_exports[key];
|
|
120
|
+
if ("install" in component) app.use(component);
|
|
121
|
+
});
|
|
122
|
+
app.component("AStyleProvider", StyleProvider);
|
|
123
|
+
}
|
|
113
124
|
var src_default = {
|
|
114
|
-
setPrefix
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
install(app) {
|
|
118
|
-
app.config.globalProperties._ant_prefix = prefix;
|
|
119
|
-
Object.keys(components_exports).forEach((key) => {
|
|
120
|
-
const component = components_exports[key];
|
|
121
|
-
if ("install" in component) app.use(component);
|
|
122
|
-
});
|
|
123
|
-
app.component("AStyleProvider", StyleProvider);
|
|
124
|
-
},
|
|
125
|
+
setPrefix,
|
|
126
|
+
install,
|
|
125
127
|
version: version_default
|
|
126
128
|
};
|
|
127
129
|
//#endregion
|
|
128
|
-
export { Affix, alert_default as Alert, anchor_default as Anchor, App, AutoComplete, Option as AutoCompleteOption, Avatar, AvatarGroup, BackTopWithInstall as BackTop, Badge, BadgeRibbon, border_beam_default as BorderBeam, breadcrumb_default as Breadcrumb, BreadcrumbItem, BreadcrumbSeparator, button_default as Button, Calendar, card_default as Card, CardGrid, CardMeta, Carousel, Cascader, CascaderPanel, CheckableTag, CheckableTagGroup, checkbox_default as Checkbox, CheckboxGroup, Col, collapse_default as Collapse, CollapsePanel, color_picker_default as ColorPicker, ConfigProvider, DateMonthPicker, DatePicker, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, DirectoryTree, Divider, Drawer, Dropdown, Empty, Flex, float_button_default as FloatButton, FloatButtonGroup, form_default as Form, InternalFormItem as FormItem, Image, ImagePreviewGroup, CompoundedInput as Input, InputGroup, InputNumber, InputOTP, InputPassword, InputSearch, layout_default as Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, masonry_default as Masonry, Mentions, Option$1 as MentionsOption, Menu, MenuDivider, MenuItem, MenuItemGroup, Modal, pagination_default as Pagination, Popconfirm, Popover, Progress, QRCode, radio_default as Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, SelectOptGroup, SelectOption, skeleton_default as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, Slider, Space, SpaceAddon, SpaceCompact, Spin, splitter_default as Splitter, SplitterPanel, statistic_default as Statistic, StatisticTimer, Steps, StyleProvider, SubMenu, Switch, TabPane, InternalTable as Table, Column as TableColumn, ColumnGroup as TableColumnGroup, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, Tag, InternalTextArea as TextArea, TimePicker, TimeRangePicker, timeline_default as Timeline, TimelineItem, InternalTooltip as Tooltip, Tour, InternalTransfer as Transfer, Tree, TreeSelect, Typography, TypographyLink, TypographyParagraph, TypographyText, TypographyTitle, UniqueProvider, Upload, UploadDragger, Watermark, src_default as default, staticMethods as message, staticMethods$1 as notification, theme_default as theme, useBreakpoint, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useResponsive, version_default as version };
|
|
130
|
+
export { Affix, alert_default as Alert, anchor_default as Anchor, App, AutoComplete, Option as AutoCompleteOption, Avatar, AvatarGroup, BackTopWithInstall as BackTop, Badge, BadgeRibbon, border_beam_default as BorderBeam, breadcrumb_default as Breadcrumb, BreadcrumbItem, BreadcrumbSeparator, button_default as Button, Calendar, card_default as Card, CardGrid, CardMeta, Carousel, Cascader, CascaderPanel, CheckableTag, CheckableTagGroup, checkbox_default as Checkbox, CheckboxGroup, Col, collapse_default as Collapse, CollapsePanel, color_picker_default as ColorPicker, ConfigProvider, DateMonthPicker, DatePicker, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, DirectoryTree, Divider, Drawer, Dropdown, Empty, Flex, float_button_default as FloatButton, FloatButtonGroup, form_default as Form, InternalFormItem as FormItem, Image, ImagePreviewGroup, CompoundedInput as Input, InputGroup, InputNumber, InputOTP, InputPassword, InputSearch, layout_default as Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, masonry_default as Masonry, Mentions, Option$1 as MentionsOption, Menu, MenuDivider, MenuItem, MenuItemGroup, Modal, pagination_default as Pagination, Popconfirm, Popover, Progress, QRCode, radio_default as Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, SelectOptGroup, SelectOption, skeleton_default as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, Slider, Space, SpaceAddon, SpaceCompact, Spin, splitter_default as Splitter, SplitterPanel, statistic_default as Statistic, StatisticTimer, Steps, StyleProvider, SubMenu, Switch, TabPane, InternalTable as Table, Column as TableColumn, ColumnGroup as TableColumnGroup, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, Tag, InternalTextArea as TextArea, TimePicker, TimeRangePicker, timeline_default as Timeline, TimelineItem, InternalTooltip as Tooltip, Tour, InternalTransfer as Transfer, Tree, TreeSelect, Typography, TypographyLink, TypographyParagraph, TypographyText, TypographyTitle, UniqueProvider, Upload, UploadDragger, Watermark, src_default as default, install, staticMethods as message, staticMethods$1 as notification, setPrefix, theme_default as theme, useBreakpoint, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useResponsive, version_default as version };
|
package/dist/input/Search.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useSize } from "../config-provider/hooks/useSize.js";
|
|
|
3
3
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
4
4
|
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
6
|
+
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
6
7
|
import button_default from "../button/index.js";
|
|
7
8
|
import { SpaceCompact } from "../space/index.js";
|
|
8
9
|
import InternalInput from "./Input.js";
|
|
@@ -32,6 +33,8 @@ const InternalSearch = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
32
33
|
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPrefixCls } = useComponentBaseConfig("inputSearch", props, void 0, "input-search");
|
|
33
34
|
const inputPrefixCls = computed(() => getPrefixCls("input", props.inputPrefixCls));
|
|
34
35
|
const { classes, styles, size: customizeSize, disabled: customDisabled, variant } = toPropsRefs(props, "classes", "styles", "size", "disabled", "variant");
|
|
36
|
+
const contextDisabled = useDisabledContext();
|
|
37
|
+
const mergedDisabled = computed(() => customDisabled.value ?? contextDisabled.value);
|
|
35
38
|
const [hashId, cssVarCls] = search_default(prefixCls);
|
|
36
39
|
const { compactSize } = useCompactItemContext(prefixCls, direction);
|
|
37
40
|
const mergedSize = useSize((ctx) => customizeSize.value ?? compactSize.value ?? ctx);
|
|
@@ -101,19 +104,22 @@ const InternalSearch = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
101
104
|
const isButtonVNode = isVNode(enterButtonNode);
|
|
102
105
|
const isAntdButton = isButtonVNode && Boolean(enterButtonNode.type?.__ANT_BUTTON);
|
|
103
106
|
const isNativeButton = isButtonVNode && enterButtonNode.type === "button";
|
|
104
|
-
if (isAntdButton || isNativeButton)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
if (isAntdButton || isNativeButton) {
|
|
108
|
+
const enterButtonProps = enterButtonNode?.props ?? {};
|
|
109
|
+
buttonNode = cloneVNode(enterButtonNode, {
|
|
110
|
+
disabled: mergedDisabled.value || enterButtonProps.disabled || !isAntdButton && props.loading,
|
|
111
|
+
onMousedown: onMouseDown,
|
|
112
|
+
onClick: (e) => {
|
|
113
|
+
enterButtonProps.onClick?.(e);
|
|
114
|
+
onSearchClick(e);
|
|
115
|
+
},
|
|
116
|
+
class: clsx(enterButtonProps.class, btnClassName),
|
|
117
|
+
...isAntdButton ? {
|
|
118
|
+
loading: props.loading || enterButtonProps.loading,
|
|
119
|
+
size: mergedSize.value
|
|
120
|
+
} : {}
|
|
121
|
+
});
|
|
122
|
+
} else buttonNode = createVNode(button_default, {
|
|
117
123
|
"classes": mergedClassNames.value.button,
|
|
118
124
|
"styles": mergedStyles.value.button,
|
|
119
125
|
"class": btnClassName,
|
|
@@ -68,7 +68,7 @@ const genSiderStyle = (token) => {
|
|
|
68
68
|
[`${componentCls}-zero-width-trigger`]: {
|
|
69
69
|
color: lightTriggerColor,
|
|
70
70
|
background: lightTriggerBg,
|
|
71
|
-
border:
|
|
71
|
+
border: `${unit(token.lineWidth)} ${token.lineType} ${bodyBg}`,
|
|
72
72
|
borderInlineStart: 0
|
|
73
73
|
}
|
|
74
74
|
}
|
package/dist/package.js
CHANGED
package/dist/package.json.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { genFocusOutline, resetComponent } from "../../style/index.js";
|
|
2
2
|
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.js";
|
|
4
|
-
import { genNoMotionRawStyle, genNoMotionStyle } from "../../style/motion/util.js";
|
|
5
4
|
import { unit } from "@antdv-next/cssinjs";
|
|
6
5
|
//#region src/radio/style/index.ts
|
|
7
6
|
const getGroupRadioStyle = (token) => {
|
|
@@ -90,7 +89,6 @@ const getRadioBasicStyle = (token) => {
|
|
|
90
89
|
border: `${unit(lineWidth)} ${lineType} ${colorBorder}`,
|
|
91
90
|
borderRadius: "50%",
|
|
92
91
|
transition: `all ${motionDurationMid}`,
|
|
93
|
-
...genNoMotionStyle(),
|
|
94
92
|
"&:after": {
|
|
95
93
|
content: "\"\"",
|
|
96
94
|
position: "absolute",
|
|
@@ -103,8 +101,7 @@ const getRadioBasicStyle = (token) => {
|
|
|
103
101
|
borderRadius: "50%",
|
|
104
102
|
transformOrigin: "50% 50%",
|
|
105
103
|
opacity: 0,
|
|
106
|
-
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}
|
|
107
|
-
...genNoMotionRawStyle()
|
|
104
|
+
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`
|
|
108
105
|
},
|
|
109
106
|
[`${componentCls}-input`]: {
|
|
110
107
|
position: "absolute",
|
|
@@ -170,7 +167,6 @@ const getRadioButtonStyle = (token) => {
|
|
|
170
167
|
`background-color`,
|
|
171
168
|
`box-shadow`
|
|
172
169
|
].map((prop) => `${prop} ${motionDurationMid}`).join(","),
|
|
173
|
-
...genNoMotionStyle(),
|
|
174
170
|
a: { color: buttonColor },
|
|
175
171
|
[`> ${componentCls}-button`]: {
|
|
176
172
|
position: "absolute",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { genFocusOutline, genFocusStyle, resetComponent, textEllipsis } from "../../style/index.js";
|
|
2
2
|
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.js";
|
|
4
|
-
import { genNoMotionRawStyle, genNoMotionStyle } from "../../style/motion/util.js";
|
|
5
4
|
import { unit } from "@antdv-next/cssinjs";
|
|
6
5
|
//#region src/segmented/style/index.ts
|
|
7
6
|
function getItemDisabledStyle(cls, token) {
|
|
@@ -33,7 +32,6 @@ const genSegmentedStyle = (token) => {
|
|
|
33
32
|
background: token.trackBg,
|
|
34
33
|
borderRadius: token.borderRadius,
|
|
35
34
|
transition: `all ${motionDurationMid}`,
|
|
36
|
-
...genNoMotionStyle(),
|
|
37
35
|
...genFocusStyle(token),
|
|
38
36
|
[`${componentCls}-group`]: {
|
|
39
37
|
position: "relative",
|
|
@@ -62,7 +60,6 @@ const genSegmentedStyle = (token) => {
|
|
|
62
60
|
textAlign: "center",
|
|
63
61
|
cursor: "pointer",
|
|
64
62
|
transition: `color ${motionDurationMid}`,
|
|
65
|
-
...genNoMotionStyle(),
|
|
66
63
|
borderRadius: token.borderRadiusSM,
|
|
67
64
|
transform: "translateZ(0)",
|
|
68
65
|
"&-selected": {
|
|
@@ -81,8 +78,7 @@ const genSegmentedStyle = (token) => {
|
|
|
81
78
|
borderRadius: "inherit",
|
|
82
79
|
opacity: 0,
|
|
83
80
|
pointerEvents: "none",
|
|
84
|
-
transition: ["opacity", "background-color"].map((prop) => `${prop} ${motionDurationMid}`).join(", ")
|
|
85
|
-
...genNoMotionRawStyle()
|
|
81
|
+
transition: ["opacity", "background-color"].map((prop) => `${prop} ${motionDurationMid}`).join(", ")
|
|
86
82
|
},
|
|
87
83
|
[`&:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
|
|
88
84
|
"&:hover, &:active": { color: token.itemHoverColor },
|
|
@@ -146,8 +142,7 @@ const genSegmentedStyle = (token) => {
|
|
|
146
142
|
...getItemDisabledStyle(`${componentCls}-item-disabled`, token),
|
|
147
143
|
[`${componentCls}-thumb-motion-appear`]: {
|
|
148
144
|
willChange: "transform, width",
|
|
149
|
-
transition: [`transform`, `width`].map((prop) => `${prop} ${motionDurationSlow} ${motionEaseInOut}`).join(", ")
|
|
150
|
-
...genNoMotionStyle()
|
|
145
|
+
transition: [`transform`, `width`].map((prop) => `${prop} ${motionDurationSlow} ${motionEaseInOut}`).join(", ")
|
|
151
146
|
},
|
|
152
147
|
[`&${componentCls}-shape-round`]: {
|
|
153
148
|
borderRadius: 9999,
|
package/dist/space/Compact.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface SpaceCompactItemContextType {
|
|
|
19
19
|
declare function useSpaceCompactItemContext(): Ref<SpaceCompactItemContextType | null, SpaceCompactItemContextType | null>;
|
|
20
20
|
declare function useCompactItemContext(prefixCls: Ref<string>, direction: Ref<DirectionType>): {
|
|
21
21
|
compactSize: import("vue").ComputedRef<SizeType>;
|
|
22
|
-
compactDirection: import("vue").ComputedRef<"
|
|
22
|
+
compactDirection: import("vue").ComputedRef<"vertical" | "horizontal" | undefined>;
|
|
23
23
|
compactItemClassnames: import("vue").ComputedRef<string>;
|
|
24
24
|
};
|
|
25
25
|
declare const NoCompactStyle: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
|
@@ -215,7 +215,18 @@ const SplitBar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
215
215
|
type: Boolean,
|
|
216
216
|
required: true
|
|
217
217
|
},
|
|
218
|
-
draggerIcon: {
|
|
218
|
+
draggerIcon: {
|
|
219
|
+
type: [
|
|
220
|
+
Function,
|
|
221
|
+
String,
|
|
222
|
+
Number,
|
|
223
|
+
null,
|
|
224
|
+
Object,
|
|
225
|
+
Boolean
|
|
226
|
+
],
|
|
227
|
+
required: false,
|
|
228
|
+
default: void 0
|
|
229
|
+
},
|
|
219
230
|
collapsibleIcon: {
|
|
220
231
|
type: Object,
|
|
221
232
|
required: false
|