antdv-next 1.8.3 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/hooks/index.d.ts +2 -1
- package/dist/_util/hooks/index.js +2 -1
- package/dist/_util/hooks/useScopeId.d.ts +7 -0
- package/dist/_util/hooks/useScopeId.js +15 -0
- package/dist/_util/scrollTo.js +1 -1
- package/dist/_util/statusUtils.js +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/anchor/Anchor.js +4 -2
- package/dist/antd-with-locales.esm.js +8501 -8316
- package/dist/antd-with-locales.js +80 -80
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +11314 -11133
- package/dist/antd.js +80 -80
- package/dist/badge/SingleNumber.js +11 -2
- package/dist/calendar/generateCalendar.d.ts +5 -4
- package/dist/calendar/generateCalendar.js +3 -6
- package/dist/card/Card.d.ts +4 -1
- package/dist/card/Card.js +24 -18
- package/dist/card/index.d.ts +2 -2
- package/dist/cascader/index.d.ts +5 -2
- package/dist/cascader/index.js +10 -7
- package/dist/checkbox/Checkbox.js +2 -0
- package/dist/checkbox/Group.d.ts +2 -1
- package/dist/checkbox/Group.js +3 -7
- package/dist/components.d.ts +2 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -5
- package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -6
- package/dist/float-button/FloatButtonGroup.js +3 -1
- package/dist/float-button/style/button.js +2 -2
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +4 -0
- package/dist/form/context.d.ts +1 -1
- package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/input/Group.d.ts +3 -2
- package/dist/input/Group.js +23 -19
- package/dist/input/Input.d.ts +8 -1
- package/dist/input/Input.js +4 -0
- package/dist/input/OTP/OTPInput.js +4 -0
- package/dist/input/Password.js +4 -0
- package/dist/input/Search.js +4 -0
- package/dist/input/TextArea.d.ts +2 -0
- package/dist/input/TextArea.js +8 -0
- package/dist/input/index.d.ts +2 -2
- package/dist/listy/index.js +4 -3
- package/dist/locale/ko_KR.js +25 -23
- package/dist/locale/pt_BR.js +9 -7
- package/dist/mentions/index.js +8 -0
- package/dist/menu/menu.js +2 -0
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +3 -1
- package/dist/radio/group.d.ts +1 -0
- package/dist/radio/group.js +2 -5
- package/dist/radio/interface.d.ts +1 -1
- package/dist/select/index.js +2 -6
- package/dist/select/useIcons.d.ts +3 -1
- package/dist/select/useIcons.js +5 -2
- package/dist/splitter/Splitter.d.ts +2 -3
- package/dist/splitter/Splitter.js +18 -34
- package/dist/splitter/interface.d.ts +17 -8
- package/dist/table/util.d.ts +1 -1
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/theme/themes/dark/colors.d.ts +2 -1
- package/dist/theme/themes/dark/colors.js +19 -3
- package/dist/theme/themes/dark/index.js +2 -3
- package/dist/tour/style/index.js +6 -6
- package/dist/transfer/ListItem.js +1 -0
- package/dist/transfer/Section.js +1 -0
- package/dist/tree/DirectoryTree.js +7 -3
- package/dist/typography/Base/EllipsisTooltip.js +5 -1
- package/dist/typography/Base/index.js +8 -7
- package/dist/upload/Dragger.js +0 -8
- package/dist/upload/Upload.d.ts +2 -0
- package/dist/upload/Upload.js +9 -12
- package/dist/upload/UploadList/index.js +6 -1
- package/dist/upload/interface.d.ts +4 -2
- package/package.json +19 -19
- package/web-tags.json +7 -3
- package/web-types.json +33 -14
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { SplitterEmits, SplitterProps, SplitterSlots } from "./interface.js";
|
|
1
|
+
import { SplitterEmits, SplitterEmitsProps, SplitterProps, SplitterSlots } from "./interface.js";
|
|
2
2
|
import { SlotsType } from "vue";
|
|
3
3
|
//#region src/splitter/Splitter.d.ts
|
|
4
4
|
interface InternalSplitterProps extends SplitterProps, SplitterEmitsProps {}
|
|
5
|
-
interface SplitterEmitsProps {}
|
|
6
5
|
interface SplitterRef {
|
|
7
6
|
nativeElement: HTMLDivElement;
|
|
8
7
|
}
|
|
9
8
|
declare const Splitter: import("vue").DefineSetupFnComponent<InternalSplitterProps, SplitterEmits, SlotsType<SplitterSlots>, InternalSplitterProps, import("vue").PublicProps>;
|
|
10
9
|
//#endregion
|
|
11
|
-
export { InternalSplitterProps,
|
|
10
|
+
export { InternalSplitterProps, SplitterRef, Splitter as default };
|
|
@@ -16,7 +16,7 @@ import { clsx } from "@v-c/util";
|
|
|
16
16
|
import { omit as omit$1 } from "es-toolkit";
|
|
17
17
|
import ResizeObserver from "@v-c/resize-observer";
|
|
18
18
|
//#region src/splitter/Splitter.tsx
|
|
19
|
-
const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
19
|
+
const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
20
20
|
const { prefixCls, rootPrefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("splitter", props);
|
|
21
21
|
const { classes, styles, orientation, layout, vertical } = toPropsRefs(props, "classes", "styles", "orientation", "layout", "vertical");
|
|
22
22
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -45,24 +45,24 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
45
45
|
const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] = useResize(items, resizableInfos, itemPtgSizes, containerSize, updateSizes, isRTL);
|
|
46
46
|
const onInternalResizeStart = (index) => {
|
|
47
47
|
onOffsetStart(index);
|
|
48
|
-
|
|
48
|
+
emit("resizeStart", itemPxSizes.value);
|
|
49
49
|
};
|
|
50
50
|
const onInternalResizeUpdate = (index, offset, lazyEnd) => {
|
|
51
51
|
const nextSizes = onOffsetUpdate(index, offset);
|
|
52
|
-
if (lazyEnd)
|
|
53
|
-
else
|
|
52
|
+
if (lazyEnd) emit("resizeEnd", nextSizes);
|
|
53
|
+
else emit("resize", nextSizes);
|
|
54
54
|
};
|
|
55
55
|
const onInternalResizeEnd = (lazyEnd) => {
|
|
56
56
|
onOffsetEnd();
|
|
57
|
-
if (!lazyEnd)
|
|
57
|
+
if (!lazyEnd) emit("resizeEnd", itemPxSizes.value);
|
|
58
58
|
};
|
|
59
59
|
const onInternalCollapse = (index, type) => {
|
|
60
60
|
const nextSizes = onCollapse(index, type);
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
emit("resize", nextSizes);
|
|
62
|
+
emit("resizeEnd", nextSizes);
|
|
63
63
|
const collapsed = nextSizes.map((size) => Math.abs(size) < Number.EPSILON);
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
emit("collapse", collapsed, nextSizes);
|
|
65
|
+
emit("update:collapse", collapsed);
|
|
66
66
|
};
|
|
67
67
|
const mergedProps = computed(() => {
|
|
68
68
|
return {
|
|
@@ -141,7 +141,7 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
141
141
|
"endCollapsible": resizableInfo.endCollapsible,
|
|
142
142
|
"showStartCollapsibleIcon": resizableInfo.showStartCollapsibleIcon,
|
|
143
143
|
"showEndCollapsibleIcon": resizableInfo.showEndCollapsibleIcon,
|
|
144
|
-
"onDraggerDoubleClick":
|
|
144
|
+
"onDraggerDoubleClick": (index) => emit("draggerDoubleClick", index),
|
|
145
145
|
"onOffsetStart": onInternalResizeStart,
|
|
146
146
|
"onOffsetUpdate": (index, offsetX, offsetY, lazyEnd) => {
|
|
147
147
|
let offset = isVertical.value ? offsetY : offsetX;
|
|
@@ -207,30 +207,6 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
207
207
|
type: Object,
|
|
208
208
|
required: false
|
|
209
209
|
},
|
|
210
|
-
onDraggerDoubleClick: {
|
|
211
|
-
type: Function,
|
|
212
|
-
required: false
|
|
213
|
-
},
|
|
214
|
-
onResizeStart: {
|
|
215
|
-
type: Function,
|
|
216
|
-
required: false
|
|
217
|
-
},
|
|
218
|
-
onResize: {
|
|
219
|
-
type: Function,
|
|
220
|
-
required: false
|
|
221
|
-
},
|
|
222
|
-
onResizeEnd: {
|
|
223
|
-
type: Function,
|
|
224
|
-
required: false
|
|
225
|
-
},
|
|
226
|
-
onCollapse: {
|
|
227
|
-
type: Function,
|
|
228
|
-
required: false
|
|
229
|
-
},
|
|
230
|
-
"onUpdate:collapse": {
|
|
231
|
-
type: Function,
|
|
232
|
-
required: false
|
|
233
|
-
},
|
|
234
210
|
lazy: {
|
|
235
211
|
type: Boolean,
|
|
236
212
|
required: false,
|
|
@@ -245,6 +221,14 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
245
221
|
required: false
|
|
246
222
|
}
|
|
247
223
|
},
|
|
224
|
+
emits: [
|
|
225
|
+
"resizeStart",
|
|
226
|
+
"resize",
|
|
227
|
+
"resizeEnd",
|
|
228
|
+
"collapse",
|
|
229
|
+
"update:collapse",
|
|
230
|
+
"draggerDoubleClick"
|
|
231
|
+
],
|
|
248
232
|
name: "ASplitter",
|
|
249
233
|
inheritAttrs: false
|
|
250
234
|
});
|
|
@@ -67,15 +67,24 @@ interface SplitterProps extends ComponentBaseProps {
|
|
|
67
67
|
start?: VueNode;
|
|
68
68
|
end?: VueNode;
|
|
69
69
|
};
|
|
70
|
-
onDraggerDoubleClick?: (index: number) => void;
|
|
71
|
-
onResizeStart?: (sizes: number[]) => void;
|
|
72
|
-
onResize?: (sizes: number[]) => void;
|
|
73
|
-
onResizeEnd?: (sizes: number[]) => void;
|
|
74
|
-
onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
|
|
75
|
-
'onUpdate:collapse'?: (collapsed: boolean[]) => void;
|
|
76
70
|
lazy?: boolean;
|
|
77
71
|
}
|
|
78
|
-
interface SplitterEmits {
|
|
72
|
+
interface SplitterEmits {
|
|
73
|
+
'resizeStart': (sizes: number[]) => void;
|
|
74
|
+
'resize': (sizes: number[]) => void;
|
|
75
|
+
'resizeEnd': (sizes: number[]) => void;
|
|
76
|
+
'collapse': (collapsed: boolean[], sizes: number[]) => void;
|
|
77
|
+
'update:collapse': (collapsed: boolean[]) => void;
|
|
78
|
+
'draggerDoubleClick': (index: number) => void;
|
|
79
|
+
}
|
|
80
|
+
interface SplitterEmitsProps {
|
|
81
|
+
onDraggerDoubleClick?: SplitterEmits['draggerDoubleClick'];
|
|
82
|
+
onResizeStart?: SplitterEmits['resizeStart'];
|
|
83
|
+
onResize?: SplitterEmits['resize'];
|
|
84
|
+
onResizeEnd?: SplitterEmits['resizeEnd'];
|
|
85
|
+
onCollapse?: SplitterEmits['collapse'];
|
|
86
|
+
'onUpdate:collapse'?: SplitterEmits['update:collapse'];
|
|
87
|
+
}
|
|
79
88
|
interface SplitterSlots {
|
|
80
89
|
draggerIcon?: () => any;
|
|
81
90
|
collapsibleIconStart?: () => any;
|
|
@@ -151,4 +160,4 @@ interface UseCollapsible {
|
|
|
151
160
|
setOldBasics: () => void;
|
|
152
161
|
}
|
|
153
162
|
//#endregion
|
|
154
|
-
export { DraggerSemantic, DraggerSemanticClassNames, DraggerSemanticStyles, InternalPanelProps, PanelProps, SplitterClassNamesType, SplitterEmits, SplitterLocale, SplitterProps, SplitterSemanticClassNames, SplitterSemanticDraggerClassNames, SplitterSemanticName, SplitterSemanticStyles, SplitterSlots, SplitterStylesType, UseCollapsible, UseCollapsibleProps, UseHandle, UseHandleProps, UseResize, UseResizeProps };
|
|
163
|
+
export { DraggerSemantic, DraggerSemanticClassNames, DraggerSemanticStyles, InternalPanelProps, PanelProps, SplitterClassNamesType, SplitterEmits, SplitterEmitsProps, SplitterLocale, SplitterProps, SplitterSemanticClassNames, SplitterSemanticDraggerClassNames, SplitterSemanticName, SplitterSemanticStyles, SplitterSlots, SplitterStylesType, UseCollapsible, UseCollapsibleProps, UseHandle, UseHandleProps, UseResize, UseResizeProps };
|
package/dist/table/util.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare function renderColumnTitle<RecordType extends AnyObject = AnyObject>(tit
|
|
|
11
11
|
* Should filter [object Object]
|
|
12
12
|
*/
|
|
13
13
|
declare function safeColumnTitle<RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>): any;
|
|
14
|
-
declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "
|
|
14
|
+
declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "end" | "start";
|
|
15
15
|
declare function getPaginationSize(paginationSize: SizeType, mergedSize: SizeType): SizeType;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
|
|
@@ -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<"outlined" | "solid" | "filled">, 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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GenerateColorMap, GenerateNeutralColorMap } from "../ColorMap.js";
|
|
2
2
|
//#region src/theme/themes/dark/colors.d.ts
|
|
3
|
+
declare function generateDarkPalette(baseColor: string): string[];
|
|
3
4
|
declare const generateColorPalettes: GenerateColorMap;
|
|
4
5
|
declare const generateNeutralColorPalettes: GenerateNeutralColorMap;
|
|
5
6
|
//#endregion
|
|
6
|
-
export { generateColorPalettes, generateNeutralColorPalettes };
|
|
7
|
+
export { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes };
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { getAlphaColor, getSolidColor } from "./colorAlgorithm.js";
|
|
2
|
-
import { generate } from "@ant-design/colors";
|
|
2
|
+
import { generate, presetDarkPalettes, presetPrimaryColors } from "@ant-design/colors";
|
|
3
3
|
//#region src/theme/themes/dark/colors.ts
|
|
4
|
+
let presetDarkPaletteMap;
|
|
5
|
+
function generateDarkPalette(baseColor) {
|
|
6
|
+
if (!presetDarkPaletteMap) {
|
|
7
|
+
presetDarkPaletteMap = /* @__PURE__ */ new Map();
|
|
8
|
+
const map = presetDarkPaletteMap;
|
|
9
|
+
Object.keys(presetPrimaryColors).forEach((colorKey) => {
|
|
10
|
+
const primaryColor = presetPrimaryColors[colorKey];
|
|
11
|
+
const darkPalette = presetDarkPalettes[colorKey];
|
|
12
|
+
if (!primaryColor || !darkPalette) return;
|
|
13
|
+
const palette = [...darkPalette];
|
|
14
|
+
map.set(primaryColor, palette);
|
|
15
|
+
map.set(primaryColor.toLowerCase(), palette);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return presetDarkPaletteMap.get(baseColor) ?? generate(baseColor, { theme: "dark" });
|
|
19
|
+
}
|
|
4
20
|
const generateColorPalettes = (baseColor) => {
|
|
5
|
-
const colors =
|
|
21
|
+
const colors = generateDarkPalette(baseColor);
|
|
6
22
|
return {
|
|
7
23
|
1: colors[0],
|
|
8
24
|
2: colors[1],
|
|
@@ -45,4 +61,4 @@ const generateNeutralColorPalettes = (bgBaseColor, textBaseColor, shadowColor) =
|
|
|
45
61
|
};
|
|
46
62
|
};
|
|
47
63
|
//#endregion
|
|
48
|
-
export { generateColorPalettes, generateNeutralColorPalettes };
|
|
64
|
+
export { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes };
|
|
@@ -2,12 +2,11 @@ import { PresetColors } from "../../interface/presetColors.js";
|
|
|
2
2
|
import { defaultPresetColors } from "../seed.js";
|
|
3
3
|
import genColorMapToken from "../shared/genColorMapToken.js";
|
|
4
4
|
import derivative$1 from "../default/index.js";
|
|
5
|
-
import { generateColorPalettes, generateNeutralColorPalettes } from "./colors.js";
|
|
6
|
-
import { generate } from "@ant-design/colors";
|
|
5
|
+
import { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes } from "./colors.js";
|
|
7
6
|
//#region src/theme/themes/dark/index.ts
|
|
8
7
|
const derivative = (token, mapToken) => {
|
|
9
8
|
const colorPalettes = Object.keys(defaultPresetColors).map((colorKey) => {
|
|
10
|
-
const colors =
|
|
9
|
+
const colors = generateDarkPalette(token[colorKey]);
|
|
11
10
|
return Array.from({ length: 10 }, () => 1).reduce((prev, _, i) => {
|
|
12
11
|
prev[`${colorKey}-${i + 1}`] = colors[i];
|
|
13
12
|
prev[`${colorKey}${i + 1}`] = colors[i];
|
package/dist/tour/style/index.js
CHANGED
|
@@ -128,12 +128,12 @@ const genBaseStyle = (token) => {
|
|
|
128
128
|
},
|
|
129
129
|
[`${componentCls}-mask`]: { [`${componentCls}-placeholder-animated`]: { transition: `all ${motionDurationSlow}` } },
|
|
130
130
|
[[
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
`${componentCls}-placement-left`,
|
|
132
|
+
`${componentCls}-placement-leftTop`,
|
|
133
|
+
`${componentCls}-placement-leftBottom`,
|
|
134
|
+
`${componentCls}-placement-right`,
|
|
135
|
+
`${componentCls}-placement-rightTop`,
|
|
136
|
+
`${componentCls}-placement-rightBottom`
|
|
137
137
|
].join(",")]: { [`${componentCls}-section`]: { borderRadius: token.min(tourBorderRadius, 8) } }
|
|
138
138
|
}, getArrowStyle(token, varRef("arrow-background-color"))];
|
|
139
139
|
};
|
|
@@ -37,6 +37,7 @@ const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
|
37
37
|
"title": title,
|
|
38
38
|
"onClick": mergedDisabled ? void 0 : (event) => onClick(item, event)
|
|
39
39
|
}, [createVNode(checkbox_default, {
|
|
40
|
+
"skipGroup": true,
|
|
40
41
|
"class": clsx(`${prefixCls}-checkbox`, classNames.itemIcon),
|
|
41
42
|
"style": styles.itemIcon,
|
|
42
43
|
"checked": checked,
|
package/dist/transfer/Section.js
CHANGED
|
@@ -140,6 +140,7 @@ const TransferSection = /* @__PURE__ */ defineComponent((props) => {
|
|
|
140
140
|
};
|
|
141
141
|
return () => {
|
|
142
142
|
const checkBox = createVNode(checkbox_default, {
|
|
143
|
+
"skipGroup": true,
|
|
143
144
|
"disabled": !filteredItems.value.filterItems.some((d) => !d.disabled) || props.disabled,
|
|
144
145
|
"checked": checkStatus.value === "all",
|
|
145
146
|
"indeterminate": checkStatus.value === "part",
|
|
@@ -29,10 +29,14 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
29
29
|
...props,
|
|
30
30
|
children: _children
|
|
31
31
|
}), { fieldNames: props.fieldNames });
|
|
32
|
+
if (props.expandedKeys !== void 0) {
|
|
33
|
+
const controlledKeys = props.expandedKeys ?? [];
|
|
34
|
+
return props.autoExpandParent || defaultExpandParent ? conductExpandParent(controlledKeys, keyEntities) : controlledKeys;
|
|
35
|
+
}
|
|
32
36
|
let initExpandedKeys;
|
|
33
37
|
if (defaultExpandAll) initExpandedKeys = Object.values(keyEntities).map(({ key }) => key);
|
|
34
|
-
else if (defaultExpandParent) initExpandedKeys = conductExpandParent(props.
|
|
35
|
-
else initExpandedKeys = props
|
|
38
|
+
else if (defaultExpandParent) initExpandedKeys = conductExpandParent(props.defaultExpandedKeys || [], keyEntities);
|
|
39
|
+
else initExpandedKeys = props.defaultExpandedKeys || [];
|
|
36
40
|
return initExpandedKeys;
|
|
37
41
|
};
|
|
38
42
|
const selectedKeys = shallowRef(props?.defaultSelectedKeys || []);
|
|
@@ -99,7 +103,7 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
99
103
|
const { showIcon = true, expandAction = "click", ...otherProps } = props;
|
|
100
104
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
101
105
|
const connectClassName = clsx(`${prefixCls.value}-directory`, { [`${prefixCls.value}-directory-rtl`]: direction.value === "rtl" }, className);
|
|
102
|
-
return createVNode(Tree, mergeProps({ "ref": treeRef }, restAttrs, omit$1(otherProps, ["prefixCls"]), {
|
|
106
|
+
return createVNode(Tree, mergeProps({ "ref": treeRef }, restAttrs, omit$1(otherProps, ["prefixCls", "defaultExpandAll"]), {
|
|
103
107
|
onCheck(checked, info) {
|
|
104
108
|
emit("check", checked, info);
|
|
105
109
|
emit("update:checkedKeys", Array.isArray(checked) ? checked : checked?.checked ?? []);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import InternalTooltip from "../../tooltip/index.js";
|
|
2
2
|
import { createVNode, defineComponent, mergeProps } from "vue";
|
|
3
|
+
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
3
4
|
//#region src/typography/Base/EllipsisTooltip.tsx
|
|
4
5
|
const EllipsisTooltip = /* @__PURE__ */ defineComponent({
|
|
5
6
|
props: {
|
|
@@ -25,7 +26,10 @@ const EllipsisTooltip = /* @__PURE__ */ defineComponent({
|
|
|
25
26
|
inheritAttrs: false,
|
|
26
27
|
setup(props, { slots }) {
|
|
27
28
|
return () => {
|
|
28
|
-
if (!props.tooltipProps?.title || !props.enableEllipsis)
|
|
29
|
+
if (!props.tooltipProps?.title || !props.enableEllipsis) {
|
|
30
|
+
const children = filterEmpty(slots.default?.() ?? []);
|
|
31
|
+
return children.length === 1 ? children[0] : children;
|
|
32
|
+
}
|
|
29
33
|
return createVNode(InternalTooltip, mergeProps(props.tooltipProps, { "disabled": !props.isEllipsis || props.disabled }), { default: () => [slots.default?.()] });
|
|
30
34
|
};
|
|
31
35
|
}
|
|
@@ -20,7 +20,7 @@ import { classNames } from "@v-c/util";
|
|
|
20
20
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
21
21
|
import { EditOutlined } from "@antdv-next/icons";
|
|
22
22
|
import useDelayState from "@v-c/util/dist/hooks/useDelayState";
|
|
23
|
-
import
|
|
23
|
+
import { useResizeObserver } from "@v-c/resize-observer";
|
|
24
24
|
//#region src/typography/Base/index.tsx
|
|
25
25
|
const ELLIPSIS_STR = "...";
|
|
26
26
|
const DEFAULT_SHIMMER_DURATION = 1;
|
|
@@ -51,6 +51,9 @@ function wrapperDecorations(props, content) {
|
|
|
51
51
|
}
|
|
52
52
|
const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
|
|
53
53
|
const typographyRef = shallowRef();
|
|
54
|
+
const setTypographyRef = (instance) => {
|
|
55
|
+
typographyRef.value = instance;
|
|
56
|
+
};
|
|
54
57
|
const typographyDom = computed(() => {
|
|
55
58
|
const val = typographyRef.value;
|
|
56
59
|
if (val && typeof val === "object" && "el" in val) return val.el;
|
|
@@ -168,6 +171,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
168
171
|
const onResize = ({ offsetWidth }) => {
|
|
169
172
|
ellipsisWidth.value = offsetWidth;
|
|
170
173
|
};
|
|
174
|
+
useResizeObserver(mergedEnableEllipsis, typographyDom, onResize);
|
|
171
175
|
const onJsEllipsis = (jsEllipsis) => {
|
|
172
176
|
const changed = isJsEllipsis.value !== jsEllipsis;
|
|
173
177
|
isJsEllipsis.value = jsEllipsis;
|
|
@@ -335,10 +339,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
335
339
|
"classes": mergedClassNames.value,
|
|
336
340
|
"styles": mergedStyles.value
|
|
337
341
|
}, null);
|
|
338
|
-
return createVNode(
|
|
339
|
-
"onResize": onResize,
|
|
340
|
-
"disabled": !mergedEnableEllipsis.value
|
|
341
|
-
}, { default: () => [createVNode(EllipsisTooltip, {
|
|
342
|
+
return createVNode(EllipsisTooltip, {
|
|
342
343
|
"tooltipProps": tooltipProps.value,
|
|
343
344
|
"enableEllipsis": mergedEnableEllipsis.value,
|
|
344
345
|
"isEllipsis": isMergedEllipsis.value,
|
|
@@ -348,7 +349,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
348
349
|
"prefixCls": prefixCls.value,
|
|
349
350
|
"style": mergedStyle,
|
|
350
351
|
"component": props.component,
|
|
351
|
-
"ref":
|
|
352
|
+
"ref": setTypographyRef,
|
|
352
353
|
"direction": mergedDirection.value,
|
|
353
354
|
"onClick": clickHandler,
|
|
354
355
|
"title": props.title,
|
|
@@ -382,7 +383,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
382
383
|
createVNode(Fragment, null, [renderEllipsis(canEllipsis)]),
|
|
383
384
|
placement.value === "start" ? null : renderOperations(canEllipsis)
|
|
384
385
|
]));
|
|
385
|
-
} })] })] })
|
|
386
|
+
} })] })] });
|
|
386
387
|
};
|
|
387
388
|
}, {
|
|
388
389
|
props: {
|
package/dist/upload/Dragger.js
CHANGED
|
@@ -163,14 +163,6 @@ const Dragger = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }
|
|
|
163
163
|
type: Function,
|
|
164
164
|
required: false
|
|
165
165
|
},
|
|
166
|
-
onPreview: {
|
|
167
|
-
type: Function,
|
|
168
|
-
required: false
|
|
169
|
-
},
|
|
170
|
-
onDownload: {
|
|
171
|
-
type: Function,
|
|
172
|
-
required: false
|
|
173
|
-
},
|
|
174
166
|
capture: {
|
|
175
167
|
type: [String, Boolean],
|
|
176
168
|
required: false,
|
package/dist/upload/Upload.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ interface UploadEmitsProps {
|
|
|
22
22
|
onChange?: UploadEmits['change'];
|
|
23
23
|
onDrop?: UploadEmits['drop'];
|
|
24
24
|
onFocus?: UploadEmits['focus'];
|
|
25
|
+
onPreview?: UploadEmits['preview'];
|
|
26
|
+
onDownload?: UploadEmits['download'];
|
|
25
27
|
'onUpdate:fileList'?: UploadEmits['update:fileList'];
|
|
26
28
|
}
|
|
27
29
|
declare const InternalUpload: import("vue").DefineSetupFnComponent<InternalUploadProps, UploadEmits<any>, SlotsType<UploadSlots<any>>, InternalUploadProps, import("vue").PublicProps>;
|
package/dist/upload/Upload.js
CHANGED
|
@@ -9,7 +9,7 @@ import useLocale from "../locale/useLocale.js";
|
|
|
9
9
|
import style_default from "./style/index.js";
|
|
10
10
|
import { file2Obj, getFileItem, removeFileItem, updateFileList } from "./utils.js";
|
|
11
11
|
import UploadList from "./UploadList/index.js";
|
|
12
|
-
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, nextTick, shallowRef, watch } from "vue";
|
|
12
|
+
import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeDefaults, mergeProps, nextTick, shallowRef, watch } from "vue";
|
|
13
13
|
import { clsx } from "@v-c/util";
|
|
14
14
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
15
15
|
import { omit as omit$1 } from "es-toolkit";
|
|
@@ -20,6 +20,7 @@ function _isSlot(s) {
|
|
|
20
20
|
}
|
|
21
21
|
const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;
|
|
22
22
|
const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
23
|
+
const instance = getCurrentInstance();
|
|
23
24
|
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, customRequest: contextCustomRequest, progress: contextProgress, accept: contextAccept } = useComponentBaseConfig("upload", props, [
|
|
24
25
|
"customRequest",
|
|
25
26
|
"progress",
|
|
@@ -230,10 +231,12 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
230
231
|
"listType": listType.value,
|
|
231
232
|
"items": mergedFileList.value,
|
|
232
233
|
"previewFile": props.previewFile,
|
|
233
|
-
"
|
|
234
|
+
"hasPreview": !!(instance?.vnode.props?.onPreview || instance?.vnode.props?.onPreviewOnce),
|
|
235
|
+
"onPreview": (file) => emit("preview", file),
|
|
234
236
|
"onDownload": (file) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
const hasDownloadListener = !!(instance?.vnode.props?.onDownload || instance?.vnode.props?.onDownloadOnce);
|
|
238
|
+
emit("download", file);
|
|
239
|
+
if (!hasDownloadListener && file.url) window.open(file.url, "_blank", "noopener");
|
|
237
240
|
},
|
|
238
241
|
"onRemove": handleRemove,
|
|
239
242
|
"showRemoveIcon": realShowRemoveIcon,
|
|
@@ -483,14 +486,6 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
483
486
|
type: Function,
|
|
484
487
|
required: false
|
|
485
488
|
},
|
|
486
|
-
onPreview: {
|
|
487
|
-
type: Function,
|
|
488
|
-
required: false
|
|
489
|
-
},
|
|
490
|
-
onDownload: {
|
|
491
|
-
type: Function,
|
|
492
|
-
required: false
|
|
493
|
-
},
|
|
494
489
|
capture: {
|
|
495
490
|
type: [String, Boolean],
|
|
496
491
|
required: false,
|
|
@@ -520,6 +515,8 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
520
515
|
"change",
|
|
521
516
|
"drop",
|
|
522
517
|
"focus",
|
|
518
|
+
"preview",
|
|
519
|
+
"download",
|
|
523
520
|
"update:fileList"
|
|
524
521
|
],
|
|
525
522
|
name: "AUpload",
|
|
@@ -12,7 +12,7 @@ const UploadList = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
12
12
|
const forceUpdate = shallowRef(0);
|
|
13
13
|
const motionAppear = shallowRef(false);
|
|
14
14
|
const instance = getCurrentInstance();
|
|
15
|
-
const hasPreviewListener = computed(() => !!instance?.vnode.props?.onPreview);
|
|
15
|
+
const hasPreviewListener = computed(() => props.hasPreview ?? !!instance?.vnode.props?.onPreview);
|
|
16
16
|
onMounted(() => {
|
|
17
17
|
motionAppear.value = true;
|
|
18
18
|
});
|
|
@@ -290,6 +290,11 @@ const UploadList = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
290
290
|
onDownload: {
|
|
291
291
|
type: Function,
|
|
292
292
|
required: false
|
|
293
|
+
},
|
|
294
|
+
hasPreview: {
|
|
295
|
+
type: Boolean,
|
|
296
|
+
required: false,
|
|
297
|
+
default: void 0
|
|
293
298
|
}
|
|
294
299
|
}, {
|
|
295
300
|
listType: "text",
|
|
@@ -121,8 +121,6 @@ interface UploadProps<T = any> {
|
|
|
121
121
|
/** Config max count of `fileList`. Will replace current one when `maxCount` is 1 */
|
|
122
122
|
maxCount?: number;
|
|
123
123
|
onRemove?: (file: UploadFile<T>) => void | boolean | Promise<void | boolean>;
|
|
124
|
-
onPreview?: (file: UploadFile<T>) => void;
|
|
125
|
-
onDownload?: (file: UploadFile<T>) => void;
|
|
126
124
|
capture?: string | boolean;
|
|
127
125
|
hasControlInside?: boolean;
|
|
128
126
|
pastable?: boolean;
|
|
@@ -131,6 +129,8 @@ interface UploadEmits<T = any> {
|
|
|
131
129
|
'change': (info: UploadChangeParam<UploadFile<T>>) => void;
|
|
132
130
|
'drop': (event: DragEvent) => void;
|
|
133
131
|
'focus': (event: FocusEvent) => void;
|
|
132
|
+
'preview': (file: UploadFile<T>) => void;
|
|
133
|
+
'download': (file: UploadFile<T>) => void;
|
|
134
134
|
'update:fileList': (fileList: UploadFile<T>[]) => void;
|
|
135
135
|
}
|
|
136
136
|
interface UploadSlots<T = any> {
|
|
@@ -182,6 +182,8 @@ interface UploadListProps<T = any> {
|
|
|
182
182
|
onRemove?: (file: UploadFile<T>) => void | boolean;
|
|
183
183
|
onPreview?: (file: UploadFile<T>) => void;
|
|
184
184
|
onDownload?: (file: UploadFile<T>) => void;
|
|
185
|
+
/** @internal Only used internally by Upload to pass whether a preview listener is registered */
|
|
186
|
+
hasPreview?: boolean;
|
|
185
187
|
}
|
|
186
188
|
interface UploadListEmits {}
|
|
187
189
|
interface UploadListSlots<T = any> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antdv-next",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.4",
|
|
5
5
|
"description": "Ant Design Vue3 Component Library",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "aibayanyu@gmail.com",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
"./time-picker/locale/*": {
|
|
92
|
-
"types": "./dist/
|
|
93
|
-
"import": "./dist/
|
|
94
|
-
"default": "./dist/
|
|
92
|
+
"types": "./dist/time-picker/locale/*.d.ts",
|
|
93
|
+
"import": "./dist/time-picker/locale/*.js",
|
|
94
|
+
"default": "./dist/time-picker/locale/*.js"
|
|
95
95
|
},
|
|
96
96
|
"./date-picker/generate": {
|
|
97
97
|
"types": "./dist/date-picker/generate/index.d.ts",
|
|
@@ -184,50 +184,50 @@
|
|
|
184
184
|
"@ant-design/fast-color": "^3.0.1",
|
|
185
185
|
"@antdv-next/icons": "^1.1.2",
|
|
186
186
|
"@v-c/async-validator": "^1.0.3",
|
|
187
|
-
"@v-c/cascader": "^1.1.
|
|
187
|
+
"@v-c/cascader": "^1.1.8",
|
|
188
188
|
"@v-c/checkbox": "^1.0.3",
|
|
189
189
|
"@v-c/collapse": "^1.0.4",
|
|
190
190
|
"@v-c/color-picker": "^1.1.0",
|
|
191
191
|
"@v-c/dialog": "^1.2.4",
|
|
192
192
|
"@v-c/drawer": "^1.0.10",
|
|
193
193
|
"@v-c/dropdown": "^1.1.2",
|
|
194
|
-
"@v-c/image": "^1.1.
|
|
195
|
-
"@v-c/input": "^1.3.
|
|
196
|
-
"@v-c/input-number": "^1.2.
|
|
197
|
-
"@v-c/listy": "^1.2.
|
|
194
|
+
"@v-c/image": "^1.1.6",
|
|
195
|
+
"@v-c/input": "^1.3.3",
|
|
196
|
+
"@v-c/input-number": "^1.2.2",
|
|
197
|
+
"@v-c/listy": "^1.2.2",
|
|
198
198
|
"@v-c/mentions": "^1.3.1",
|
|
199
199
|
"@v-c/menu": "^1.4.9",
|
|
200
200
|
"@v-c/mutate-observer": "^1.0.4",
|
|
201
201
|
"@v-c/notification": "^2.0.8",
|
|
202
|
-
"@v-c/pagination": "^1.3.
|
|
202
|
+
"@v-c/pagination": "^1.3.3",
|
|
203
203
|
"@v-c/picker": "^1.7.3",
|
|
204
204
|
"@v-c/progress": "^1.1.1",
|
|
205
205
|
"@v-c/qrcode": "^1.0.3",
|
|
206
206
|
"@v-c/rate": "^1.0.2",
|
|
207
|
-
"@v-c/resize-observer": "^1.1.
|
|
207
|
+
"@v-c/resize-observer": "^1.1.5",
|
|
208
208
|
"@v-c/segmented": "^1.0.7",
|
|
209
|
-
"@v-c/select": "^1.3.
|
|
209
|
+
"@v-c/select": "^1.3.5",
|
|
210
210
|
"@v-c/slick": "^1.0.4",
|
|
211
211
|
"@v-c/slider": "^1.1.7",
|
|
212
|
-
"@v-c/steps": "^1.0.
|
|
212
|
+
"@v-c/steps": "^1.0.7",
|
|
213
213
|
"@v-c/switch": "^1.0.2",
|
|
214
214
|
"@v-c/table": "^1.3.8",
|
|
215
|
-
"@v-c/tabs": "^1.4.
|
|
216
|
-
"@v-c/textarea": "^1.2.
|
|
215
|
+
"@v-c/tabs": "^1.4.6",
|
|
216
|
+
"@v-c/textarea": "^1.2.2",
|
|
217
217
|
"@v-c/tooltip": "^1.1.5",
|
|
218
218
|
"@v-c/tour": "^1.1.7",
|
|
219
|
-
"@v-c/tree": "^1.2.
|
|
219
|
+
"@v-c/tree": "^1.2.7",
|
|
220
220
|
"@v-c/tree-select": "^1.1.4",
|
|
221
|
-
"@v-c/trigger": "^1.1.
|
|
221
|
+
"@v-c/trigger": "^1.1.8",
|
|
222
222
|
"@v-c/upload": "^1.1.3",
|
|
223
|
-
"@v-c/util": "^1.4.
|
|
223
|
+
"@v-c/util": "^1.4.4",
|
|
224
224
|
"@v-c/virtual-list": "^1.1.8",
|
|
225
225
|
"@vueuse/core": "^14.4.0",
|
|
226
226
|
"dayjs": "^1.11.23",
|
|
227
227
|
"es-toolkit": "1.52.0",
|
|
228
228
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
229
229
|
"throttle-debounce": "^5.0.2",
|
|
230
|
-
"@antdv-next/cssinjs": "^1.2.
|
|
230
|
+
"@antdv-next/cssinjs": "^1.2.1"
|
|
231
231
|
},
|
|
232
232
|
"web-types": "web-types.json",
|
|
233
233
|
"browserslist": [
|
package/web-tags.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.8.
|
|
2
|
+
"version": "1.8.4",
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "a-affix",
|
|
@@ -3667,9 +3667,13 @@
|
|
|
3667
3667
|
"name": "a-input-group",
|
|
3668
3668
|
"description": "(ZH) 输入框组合。已废弃,请使用 Space.Compact 代替。\n\n(EN) Input group. Deprecated, use Space.Compact instead.",
|
|
3669
3669
|
"attributes": [
|
|
3670
|
+
{
|
|
3671
|
+
"name": "compact",
|
|
3672
|
+
"description": "Default: false\n\nWhether to use compact style."
|
|
3673
|
+
},
|
|
3670
3674
|
{
|
|
3671
3675
|
"name": "size",
|
|
3672
|
-
"description": "Default:
|
|
3676
|
+
"description": "Default: default\n\nSize of the group. Applied by style only, not forwarded to the grouped controls."
|
|
3673
3677
|
}
|
|
3674
3678
|
]
|
|
3675
3679
|
},
|
|
@@ -4645,7 +4649,7 @@
|
|
|
4645
4649
|
},
|
|
4646
4650
|
{
|
|
4647
4651
|
"name": "hoverable",
|
|
4648
|
-
"description": "Default:
|
|
4652
|
+
"description": "Default: true\n\n(ZH) 鼠标移过时可浮起\n\n(EN) Lift up when hovering card"
|
|
4649
4653
|
}
|
|
4650
4654
|
]
|
|
4651
4655
|
},
|