antdv-next 1.5.1 → 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/hooks/useClosable.d.ts +4 -2
- package/dist/_util/hooks/useClosable.js +9 -3
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/anchor/Anchor.js +12 -6
- package/dist/antd-with-locales.esm.js +5684 -5361
- package/dist/antd-with-locales.js +82 -82
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +7613 -7294
- package/dist/antd.js +38 -38
- 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/carousel/index.js +5 -2
- package/dist/checkbox/Checkbox.js +1 -1
- package/dist/collapse/Collapse.js +2 -4
- package/dist/color-picker/components/ColorTrigger.js +1 -1
- package/dist/color-picker/style/index.js +1 -0
- package/dist/config-provider/context.d.ts +5 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -2
- 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 +6 -6
- package/dist/float-button/FloatButton.js +2 -1
- package/dist/float-button/style/button.js +16 -10
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +4 -5
- package/dist/form/FormItemLabel.js +2 -1
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/form/style/index.js +25 -12
- package/dist/grid/row.js +9 -16
- package/dist/image/PreviewGroup.js +1 -1
- package/dist/listy/style/index.js +5 -1
- package/dist/locale/en_US.js +4 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/is_IS.js +1 -1
- package/dist/locale/mn_MN.js +1 -1
- package/dist/locale/zh_CN.js +4 -0
- package/dist/menu/MenuItem.js +12 -2
- package/dist/menu/SubMenu.d.ts +1 -1
- package/dist/menu/style/vertical.js +10 -11
- package/dist/notification/index.js +2 -1
- package/dist/notification/useNotification.js +8 -4
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +4 -0
- package/dist/radio/group.js +2 -2
- package/dist/segmented/index.js +2 -1
- package/dist/select/index.d.ts +2 -2
- package/dist/select/index.js +1 -1
- package/dist/select/style/index.js +1 -1
- package/dist/space/Compact.d.ts +1 -1
- package/dist/steps/PanelArrow.js +3 -2
- package/dist/table/InternalTable.js +5 -4
- package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
- package/dist/table/hooks/useSorter.js +7 -9
- package/dist/table/style/radius.js +4 -0
- package/dist/table/util.d.ts +1 -1
- 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/transfer/ListBody.js +2 -1
- package/dist/transfer/ListItem.d.ts +1 -0
- package/dist/transfer/ListItem.js +6 -2
- package/dist/transfer/Section.js +1 -1
- package/dist/transfer/search.js +2 -2
- package/dist/tree/utils/dictUtil.js +3 -2
- package/dist/upload/UploadList/ListItem.js +2 -1
- package/dist/upload/UploadList/index.js +8 -2
- package/dist/upload/utils.js +8 -6
- package/dist/version/token-meta.json +1 -0
- package/dist/version/token.json +1 -0
- package/package.json +10 -6
- package/web-tags.json +1172 -1168
- package/web-types.json +3789 -3806
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(() => {
|
|
@@ -44,7 +44,11 @@ const genListyStyle = (token) => {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
[`${componentCls}-group-section`]: { position: "relative" },
|
|
47
|
-
[`${componentCls}-scrollbar`]: {
|
|
47
|
+
[`${componentCls}-scrollbar`]: {
|
|
48
|
+
zIndex: 1,
|
|
49
|
+
cursor: "pointer",
|
|
50
|
+
"&:hover": { backgroundColor: token.colorFillQuaternary }
|
|
51
|
+
},
|
|
48
52
|
"&-rtl": { direction: "rtl" }
|
|
49
53
|
} };
|
|
50
54
|
};
|
package/dist/locale/en_US.js
CHANGED
package/dist/locale/index.d.ts
CHANGED
package/dist/locale/is_IS.js
CHANGED
|
@@ -104,7 +104,7 @@ const localeValues = {
|
|
|
104
104
|
},
|
|
105
105
|
number: {
|
|
106
106
|
len: "${label} verður að vera jafngildi ${len}",
|
|
107
|
-
min: "Lágmarksgildi ${label} er ${
|
|
107
|
+
min: "Lágmarksgildi ${label} er ${min}",
|
|
108
108
|
max: "Hámarksgildi ${label} er ${max}",
|
|
109
109
|
range: "${label} verður að vera á milli ${min}-${max}"
|
|
110
110
|
},
|
package/dist/locale/mn_MN.js
CHANGED
|
@@ -118,7 +118,7 @@ const localeValues = {
|
|
|
118
118
|
},
|
|
119
119
|
array: {
|
|
120
120
|
len: "${len} ${label} байх ёстой",
|
|
121
|
-
min: "Дор хаяж ${
|
|
121
|
+
min: "Дор хаяж ${min} ${label}",
|
|
122
122
|
max: "Хамгийн ихдээ ${max} ${label}",
|
|
123
123
|
range: "${label}-н хэмжээ ${min}-${max} хооронд байх ёстой"
|
|
124
124
|
},
|
package/dist/locale/zh_CN.js
CHANGED
package/dist/menu/MenuItem.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
|
3
3
|
import InternalTooltip from "../tooltip/index.js";
|
|
4
4
|
import { useSiderCtx } from "../layout/Sider.js";
|
|
5
5
|
import { useMenuContext } from "./MenuContext.js";
|
|
6
|
-
import { createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
|
6
|
+
import { computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef, watch } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
8
|
import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
9
9
|
import { omit } from "es-toolkit/compat";
|
|
@@ -15,6 +15,11 @@ function _isSlot(s) {
|
|
|
15
15
|
const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
16
16
|
const menuContext = useMenuContext();
|
|
17
17
|
const { siderCollapsed } = useSiderCtx();
|
|
18
|
+
const mergedCollapsed = computed(() => !!(siderCollapsed?.value || menuContext.value.inlineCollapsed));
|
|
19
|
+
const tooltipOpen = shallowRef(false);
|
|
20
|
+
watch(mergedCollapsed, () => {
|
|
21
|
+
tooltipOpen.value = false;
|
|
22
|
+
});
|
|
18
23
|
return () => {
|
|
19
24
|
const extra = getSlotPropsFnRun(slots, props, "extra");
|
|
20
25
|
const icon = getSlotPropsFnRun(slots, props, "icon");
|
|
@@ -39,9 +44,14 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
39
44
|
if (typeof title === "undefined") tooltipTitle = firstLevel ? children : "";
|
|
40
45
|
else if (title === false) tooltipTitle = "";
|
|
41
46
|
const tooltipProps = { title: tooltipTitle };
|
|
42
|
-
if (!
|
|
47
|
+
if (!mergedCollapsed.value) {
|
|
43
48
|
tooltipProps.title = null;
|
|
44
49
|
tooltipProps.open = false;
|
|
50
|
+
} else {
|
|
51
|
+
tooltipProps.open = tooltipOpen.value;
|
|
52
|
+
tooltipProps.onOpenChange = (open) => {
|
|
53
|
+
tooltipOpen.value = open;
|
|
54
|
+
};
|
|
45
55
|
}
|
|
46
56
|
const childrenLength = children.length;
|
|
47
57
|
let returnNode = createVNode(Item, mergeProps(omit(pureAttrs(attrs), ["itemData"]), omit(props, [
|
package/dist/menu/SubMenu.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EmptyEmit, VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SubMenuType } from "./interface.js";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
//#region src/menu/SubMenu.d.ts
|
|
5
|
-
interface SubMenuProps extends Omit<SubMenuType, 'key' | 'label' | 'children'> {
|
|
5
|
+
interface SubMenuProps extends Omit<SubMenuType, 'key' | 'label' | 'children' | 'title'> {
|
|
6
6
|
title?: VueNode;
|
|
7
7
|
}
|
|
8
8
|
interface SubMenuSlots {
|
|
@@ -29,7 +29,7 @@ const getVerticalInlineStyle = (token) => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
const getVerticalStyle = (token) => {
|
|
32
|
-
const { componentCls, iconCls, itemHeight, colorTextLightSolid, dropdownWidth, controlHeightLG,
|
|
32
|
+
const { componentCls, iconCls, itemHeight, colorTextLightSolid, dropdownWidth, controlHeightLG, padding, paddingXL, itemMarginInline, fontSizeLG, motionDurationSlow, paddingXS, boxShadowSecondary, collapsedWidth, collapsedIconSize } = token;
|
|
33
33
|
const inlineItemStyle = {
|
|
34
34
|
height: itemHeight,
|
|
35
35
|
lineHeight: unit(itemHeight),
|
|
@@ -63,11 +63,7 @@ const getVerticalStyle = (token) => {
|
|
|
63
63
|
[`&${componentCls}-root`]: { [`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
64
64
|
display: "flex",
|
|
65
65
|
alignItems: "center",
|
|
66
|
-
transition: [
|
|
67
|
-
`border-color ${motionDurationSlow}`,
|
|
68
|
-
`background-color ${motionDurationSlow}`,
|
|
69
|
-
`padding ${motionDurationFast} ${motionEaseOut}`
|
|
70
|
-
].join(","),
|
|
66
|
+
transition: [`border-color ${motionDurationSlow}`, `background-color ${motionDurationSlow}`].join(","),
|
|
71
67
|
[`> ${componentCls}-title-content`]: {
|
|
72
68
|
flex: "auto",
|
|
73
69
|
minWidth: 0,
|
|
@@ -88,11 +84,14 @@ const getVerticalStyle = (token) => {
|
|
|
88
84
|
} },
|
|
89
85
|
{ [`${componentCls}-inline-collapsed`]: {
|
|
90
86
|
width: collapsedWidth,
|
|
91
|
-
[`&${componentCls}-root`]: { [`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
+
} },
|
|
96
95
|
[`> ${componentCls}-item,
|
|
97
96
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
|
|
98
97
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
|
|
@@ -93,7 +93,8 @@ const GlobalHolderWrapper = /* @__PURE__ */ defineComponent((props) => {
|
|
|
93
93
|
const configHolderNode = createVNode(ConfigProvider, {
|
|
94
94
|
"prefixCls": global.getRootPrefixCls(),
|
|
95
95
|
"iconPrefixCls": global.getIconPrefixCls(),
|
|
96
|
-
"theme": global.theme.value
|
|
96
|
+
"theme": global.theme.value,
|
|
97
|
+
"locale": globalConfig().locale
|
|
97
98
|
}, _isSlot(holderNode) ? holderNode : { default: () => [holderNode] });
|
|
98
99
|
return global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
|
|
99
100
|
};
|
|
@@ -6,6 +6,8 @@ import { toPropsRefs } from "../_util/tools.js";
|
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import style_default from "./style/index.js";
|
|
8
8
|
import { getCloseIconConfig, getMotion, getPlacementStyle } from "./util.js";
|
|
9
|
+
import localeValues from "../locale/en_US.js";
|
|
10
|
+
import useLocale from "../locale/useLocale.js";
|
|
9
11
|
import { computeClosable, pickClosable } from "../_util/hooks/useClosable.js";
|
|
10
12
|
import { getCloseIcon, getIconWrapperClassName, resolveIconNode } from "./PurePanel.js";
|
|
11
13
|
import { isRenderable } from "../_util/is.js";
|
|
@@ -41,6 +43,7 @@ const renderNotifications = (node, { prefixCls, key }) => {
|
|
|
41
43
|
};
|
|
42
44
|
const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
43
45
|
const { getPrefixCls, getPopupContainer, notification, direction } = useBaseConfig("notification");
|
|
46
|
+
const [contextLocale] = useLocale("global", localeValues.global);
|
|
44
47
|
const { classes: contextClassNames, style: contextStyle, styles: contextStyles } = useComponentBaseConfig("notification", props);
|
|
45
48
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
46
49
|
const [, token] = useToken();
|
|
@@ -49,7 +52,7 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
49
52
|
return typeof props.duration === "number" && props.duration > 0 ? props.duration : false;
|
|
50
53
|
});
|
|
51
54
|
const getStyle = (placement) => {
|
|
52
|
-
return getPlacementStyle(placement, props?.top ?? DEFAULT_OFFSET, props?.bottom ??
|
|
55
|
+
return getPlacementStyle(placement, props?.top ?? DEFAULT_OFFSET, props?.bottom ?? DEFAULT_OFFSET);
|
|
53
56
|
};
|
|
54
57
|
const getClassName = () => clsx({ [`${prefixCls.value}-rtl`]: props.rtl ?? direction.value === "rtl" });
|
|
55
58
|
const getNotificationMotion = () => getMotion(prefixCls.value);
|
|
@@ -80,7 +83,8 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
80
83
|
prefixCls,
|
|
81
84
|
notification,
|
|
82
85
|
classNames: mergedClassNames,
|
|
83
|
-
styles: mergedStyles
|
|
86
|
+
styles: mergedStyles,
|
|
87
|
+
closeLabel: computed(() => contextLocale.value?.close ?? localeValues.global?.close ?? "Close")
|
|
84
88
|
});
|
|
85
89
|
return () => {
|
|
86
90
|
return holder?.();
|
|
@@ -174,7 +178,7 @@ function useInternalNotification(notificationConfig) {
|
|
|
174
178
|
warning(false, "usage", "You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");
|
|
175
179
|
return;
|
|
176
180
|
}
|
|
177
|
-
const { open: originOpen, prefixCls, notification, classNames: originClassNames, styles: originStyles } = holderRef.value;
|
|
181
|
+
const { open: originOpen, prefixCls, notification, classNames: originClassNames, styles: originStyles, closeLabel } = holderRef.value;
|
|
178
182
|
const contextClassName = notification?.class || {};
|
|
179
183
|
const noticePrefixCls = `${prefixCls}-notice`;
|
|
180
184
|
const { title, description, icon, type, actions, class: className, style, role = "alert", closeIcon, closable, classes: configClassNames = {}, styles = {}, ...restConfig } = config;
|
|
@@ -188,7 +192,7 @@ function useInternalNotification(notificationConfig) {
|
|
|
188
192
|
}))), pickClosable(notificationContext), computed(() => ({
|
|
189
193
|
closable: true,
|
|
190
194
|
closeIcon: realCloseIcon
|
|
191
|
-
})));
|
|
195
|
+
})), closeLabel);
|
|
192
196
|
const mergedClosable = rawClosable ? {
|
|
193
197
|
onClose: closable && typeof closable === "object" ? closable.onClose : void 0,
|
|
194
198
|
closeIcon: mergedCloseIcon,
|
package/dist/package.js
CHANGED
package/dist/package.json.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ declare const _exports: {
|
|
|
21
21
|
import: string;
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
|
+
"./version/token.json": string;
|
|
25
|
+
"./version/token-meta.json": string;
|
|
26
|
+
"./dist/version/token.json": string;
|
|
27
|
+
"./dist/version/token-meta.json": string;
|
|
24
28
|
"./dist/*": {
|
|
25
29
|
types: string[];
|
|
26
30
|
import: string[];
|
package/dist/radio/group.js
CHANGED
|
@@ -84,7 +84,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
84
84
|
item: option,
|
|
85
85
|
index
|
|
86
86
|
}) : option.label;
|
|
87
|
-
return createVNode(InternalRadio, {
|
|
87
|
+
return createVNode(InternalRadio, mergeProps({
|
|
88
88
|
"key": `radio-group-value-options-${option.value}`,
|
|
89
89
|
"prefixCls": prefixCls.value,
|
|
90
90
|
"disabled": option.disabled || disabled,
|
|
@@ -95,7 +95,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
95
95
|
"class": option.class,
|
|
96
96
|
"id": option.id,
|
|
97
97
|
"required": option.required
|
|
98
|
-
}, _isSlot(_label) ? _label : { default: () => [_label] });
|
|
98
|
+
}, { onChange: option.onChange }), _isSlot(_label) ? _label : { default: () => [_label] });
|
|
99
99
|
});
|
|
100
100
|
return createVNode("div", mergeProps(pickAttrs(restAttrs, {
|
|
101
101
|
aria: true,
|
package/dist/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/select/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const genBaseStyle = (token) => {
|
|
|
14
14
|
opacity: 0,
|
|
15
15
|
pointerEvents: "none"
|
|
16
16
|
},
|
|
17
|
-
[`&${componentCls}-allow-clear:not(${componentCls}-show-arrow) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
|
|
17
|
+
[`&${componentCls}-allow-clear:not(${componentCls}-show-arrow):not(${componentCls}-customize) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
|
|
18
18
|
};
|
|
19
19
|
return {
|
|
20
20
|
[componentCls]: {
|
package/dist/space/Compact.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface SpaceCompactItemContextType {
|
|
|
21
21
|
declare function useSpaceCompactItemContext(): Ref<SpaceCompactItemContextType | null, SpaceCompactItemContextType | null>;
|
|
22
22
|
declare function useCompactItemContext(prefixCls: Ref<string>, direction: Ref<DirectionType>): {
|
|
23
23
|
compactSize: import("vue").ComputedRef<SizeType>;
|
|
24
|
-
compactDirection: import("vue").ComputedRef<"
|
|
24
|
+
compactDirection: import("vue").ComputedRef<"horizontal" | "vertical" | undefined>;
|
|
25
25
|
compactItemClassnames: import("vue").ComputedRef<string>;
|
|
26
26
|
};
|
|
27
27
|
declare const NoCompactStyle: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
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: {
|
|
@@ -374,15 +374,16 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
374
374
|
...mergedStyles.value.root,
|
|
375
375
|
...style
|
|
376
376
|
};
|
|
377
|
+
const title = resolvePanelRender(slots, props, "title");
|
|
378
|
+
const footer = resolvePanelRender(slots, props, "footer");
|
|
379
|
+
const summary = resolvePanelRender(slots, props, "summary");
|
|
377
380
|
const tableClassName = clsx({
|
|
378
381
|
[`${prefixCls.value}-medium`]: mergedSize.value === "middle" || mergedSize.value === "medium",
|
|
379
382
|
[`${prefixCls.value}-small`]: mergedSize.value === "small",
|
|
380
383
|
[`${prefixCls.value}-bordered`]: props.bordered,
|
|
381
|
-
[`${prefixCls.value}-empty`]: rawData.value.length === 0
|
|
384
|
+
[`${prefixCls.value}-empty`]: rawData.value.length === 0,
|
|
385
|
+
[`${prefixCls.value}-no-header`]: !title && props.showHeader === false
|
|
382
386
|
}, cssVarCls.value, rootCls.value, hashId.value);
|
|
383
|
-
const title = resolvePanelRender(slots, props, "title");
|
|
384
|
-
const footer = resolvePanelRender(slots, props, "footer");
|
|
385
|
-
const summary = resolvePanelRender(slots, props, "summary");
|
|
386
387
|
const TableComp = TableComponent.value;
|
|
387
388
|
const virtualProps = mergedVirtual.value ? { listItemHeight: listItemHeight.value } : {};
|
|
388
389
|
const mergedScroll = props.scroll ?? contextScroll.value;
|
|
@@ -163,8 +163,8 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
163
163
|
const onVisibleChange = (newVisible, info) => {
|
|
164
164
|
if (info?.source === "trigger") {
|
|
165
165
|
if (newVisible && propFilteredKeys.value !== void 0) setFilteredKeysSync(wrapStringListType(propFilteredKeys.value));
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
if (!newVisible && !hasPropDropdownRender && !column.value.filterDropdown && props.filterOnClose) onConfirm();
|
|
167
|
+
else triggerVisible(newVisible);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
const dropdownMenuClass = computed(() => clsx({ [`${props.dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column?.value?.filters || []) }));
|
|
@@ -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();
|
|
@@ -10,6 +10,10 @@ const genRadiusStyle = (token) => {
|
|
|
10
10
|
[`${componentCls}-header, table`]: { borderRadius: 0 },
|
|
11
11
|
"table > thead > tr:first-child": { "th:first-child, th:last-child, td:first-child, td:last-child": { borderRadius: 0 } }
|
|
12
12
|
},
|
|
13
|
+
[`&${componentCls}-bordered${componentCls}-no-header`]: { [`> ${componentCls}-container`]: { [`> ${componentCls}-content, > ${componentCls}-body`]: { "> table > tbody > tr:first-child": {
|
|
14
|
+
"> *:first-child": { borderStartStartRadius: tableRadius },
|
|
15
|
+
"> *:last-child": { borderStartEndRadius: tableRadius }
|
|
16
|
+
} } } },
|
|
13
17
|
"&-container": {
|
|
14
18
|
borderStartStartRadius: tableRadius,
|
|
15
19
|
borderStartEndRadius: tableRadius,
|
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): "
|
|
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 };
|
|
@@ -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;
|
|
@@ -54,7 +54,7 @@ const TransferListBody = /* @__PURE__ */ defineComponent((props, { expose }) =>
|
|
|
54
54
|
pageSize.value = size;
|
|
55
55
|
};
|
|
56
56
|
return () => {
|
|
57
|
-
const { classes = {}, styles = {}, prefixCls, showRemove, filteredRenderItems, disabled, onScroll, selectedKeys } = props;
|
|
57
|
+
const { classes = {}, styles = {}, prefixCls, showRemove, filteredRenderItems, disabled, onScroll, selectedKeys, remove } = props;
|
|
58
58
|
const paginationNode = mergedPagination.value ? createVNode(pagination_default, {
|
|
59
59
|
"size": "small",
|
|
60
60
|
"disabled": disabled,
|
|
@@ -83,6 +83,7 @@ const TransferListBody = /* @__PURE__ */ defineComponent((props, { expose }) =>
|
|
|
83
83
|
"showRemove": showRemove,
|
|
84
84
|
"onClick": onInternalClick,
|
|
85
85
|
"onRemove": onRemove,
|
|
86
|
+
"removeLabel": remove,
|
|
86
87
|
"checked": selectedKeys.includes(item.key),
|
|
87
88
|
"disabled": disabled
|
|
88
89
|
}, null))]), paginationNode]);
|
|
@@ -13,6 +13,7 @@ interface ListItemProps<RecordType> {
|
|
|
13
13
|
onRemove?: (item: RecordType) => void;
|
|
14
14
|
item: RecordType;
|
|
15
15
|
showRemove?: boolean;
|
|
16
|
+
removeLabel?: string;
|
|
16
17
|
}
|
|
17
18
|
declare const ListItem: import("vue").DefineSetupFnComponent<ListItemProps<KeyWiseTransferItem>, {}, {}, ListItemProps<KeyWiseTransferItem> & {}, import("vue").PublicProps>;
|
|
18
19
|
//#endregion
|
|
@@ -8,7 +8,7 @@ import { DeleteOutlined } from "@antdv-next/icons";
|
|
|
8
8
|
const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
9
9
|
const [contextLocale] = useLocale("Transfer", localeValues.Transfer);
|
|
10
10
|
return () => {
|
|
11
|
-
const { prefixCls, classes: classNames, styles, renderedText, renderedEl, item, checked, disabled, onClick, onRemove, showRemove } = props;
|
|
11
|
+
const { prefixCls, classes: classNames, styles, renderedText, renderedEl, item, checked, disabled, onClick, onRemove, showRemove, removeLabel } = props;
|
|
12
12
|
const mergedDisabled = disabled || item?.disabled;
|
|
13
13
|
const classes = clsx(`${prefixCls}-content-item`, classNames.item, {
|
|
14
14
|
[`${prefixCls}-content-item-disabled`]: mergedDisabled,
|
|
@@ -28,7 +28,7 @@ const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
|
28
28
|
"type": "button",
|
|
29
29
|
"disabled": mergedDisabled,
|
|
30
30
|
"class": `${prefixCls}-content-item-remove`,
|
|
31
|
-
"aria-label": contextLocale?.value?.remove,
|
|
31
|
+
"aria-label": removeLabel ?? contextLocale?.value?.remove,
|
|
32
32
|
"onClick": () => onRemove?.(item)
|
|
33
33
|
}, [createVNode(DeleteOutlined, null, null)])]);
|
|
34
34
|
return createVNode("li", {
|
|
@@ -98,6 +98,10 @@ const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
|
98
98
|
type: Boolean,
|
|
99
99
|
required: false,
|
|
100
100
|
default: void 0
|
|
101
|
+
},
|
|
102
|
+
removeLabel: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: false
|
|
101
105
|
}
|
|
102
106
|
},
|
|
103
107
|
name: "ATransferListItem",
|
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/transfer/search.js
CHANGED
|
@@ -4,8 +4,8 @@ import { SearchOutlined } from "@antdv-next/icons";
|
|
|
4
4
|
//#region src/transfer/search.tsx
|
|
5
5
|
const Search = /* @__PURE__ */ defineComponent((props, { emit, slots }) => {
|
|
6
6
|
const handleChange = (e) => {
|
|
7
|
-
emit("
|
|
8
|
-
|
|
7
|
+
if (e.type === "click") emit("clear");
|
|
8
|
+
else emit("change", e);
|
|
9
9
|
};
|
|
10
10
|
return () => createVNode(InternalInput, {
|
|
11
11
|
"placeholder": props.placeholder || "",
|