antdv-next 1.8.2 → 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/useClosable.d.ts +3 -3
- package/dist/_util/hooks/useClosable.js +9 -9
- 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/affix/index.js +2 -7
- package/dist/anchor/Anchor.js +4 -2
- package/dist/antd-with-locales.esm.js +17314 -16799
- package/dist/antd-with-locales.js +81 -81
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14978 -14467
- package/dist/antd.js +81 -81
- package/dist/badge/SingleNumber.js +11 -2
- package/dist/badge/index.d.ts +4 -1
- package/dist/badge/index.js +4 -4
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/button/style/index.js +8 -2
- package/dist/calendar/generateCalendar.d.ts +5 -4
- package/dist/calendar/generateCalendar.js +4 -7
- 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 +3 -0
- package/dist/checkbox/Group.d.ts +2 -1
- package/dist/checkbox/Group.js +3 -7
- package/dist/color-picker/ColorPicker.js +4 -0
- package/dist/color-picker/ColorPickerPanel.js +4 -0
- package/dist/color-picker/components/ColorSlider.js +12 -4
- package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
- package/dist/components.d.ts +13 -9
- package/dist/components.js +3 -3
- package/dist/config-provider/context.d.ts +3 -3
- package/dist/config-provider/context.js +3 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -5
- package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -6
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/hooks/useRow.js +1 -1
- package/dist/float-button/FloatButtonGroup.js +3 -1
- package/dist/float-button/style/button.js +2 -2
- package/dist/form/Form.d.ts +17 -44
- package/dist/form/Form.js +54 -5
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/FormItem/index.js +4 -0
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useForm.d.ts +4 -5
- package/dist/form/index.d.ts +29 -3
- package/dist/form/index.js +6 -6
- package/dist/form/types.d.ts +15 -7
- package/dist/image/hooks/usePreviewConfig.d.ts +6 -6
- package/dist/image/index.d.ts +5 -5
- package/dist/index.d.ts +15 -8
- package/dist/index.js +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/input-number/style/index.js +3 -2
- package/dist/layout/layout.js +2 -3
- 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 +10 -1
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/index.d.ts +2 -1
- package/dist/menu/index.js +29 -5
- package/dist/menu/menu.js +41 -15
- package/dist/message/index.js +11 -9
- package/dist/modal/confirm.js +2 -3
- package/dist/modal/index.d.ts +2 -2
- package/dist/modal/interface.d.ts +1 -1
- package/dist/modal/useModal/index.js +9 -4
- package/dist/notification/index.js +3 -7
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +1 -0
- 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/segmented/style/index.js +3 -2
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +3 -7
- package/dist/select/useIcons.d.ts +3 -1
- package/dist/select/useIcons.js +5 -2
- package/dist/skeleton/style/index.js +9 -13
- package/dist/slider/SliderTooltip.js +0 -1
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +4 -0
- 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/statistic/Timer.d.ts +2 -2
- package/dist/steps/index.js +2 -1
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/hooks/usePagination.d.ts +1 -2
- package/dist/table/hooks/usePagination.js +1 -3
- package/dist/table/hooks/useSorter.js +4 -8
- package/dist/table/style/index.js +1 -0
- package/dist/table/style/size.js +1 -0
- package/dist/tabs/style/index.js +5 -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/index.js +4 -1
- package/dist/tour/style/index.js +6 -6
- package/dist/transfer/ListItem.js +1 -0
- package/dist/transfer/Section.js +1 -0
- package/dist/transfer/hooks/useSelection.js +2 -1
- package/dist/tree/DirectoryTree.js +11 -6
- package/dist/tree/utils/dictUtil.js +5 -8
- package/dist/typography/Base/EllipsisTooltip.js +5 -1
- package/dist/typography/Base/index.js +11 -8
- package/dist/typography/Base/util.js +2 -1
- package/dist/upload/Dragger.js +0 -8
- package/dist/upload/Upload.d.ts +2 -0
- package/dist/upload/Upload.js +23 -22
- package/dist/upload/UploadList/ListItem.js +4 -0
- package/dist/upload/UploadList/index.js +6 -1
- package/dist/upload/interface.d.ts +4 -2
- package/dist/version/token.json +1 -1
- package/dist/watermark/utils.js +1 -1
- package/package.json +44 -43
- package/web-tags.json +22 -14
- package/web-types.json +64 -31
|
@@ -20,11 +20,20 @@ var SingleNumber_default = /* @__PURE__ */ defineComponent((props) => {
|
|
|
20
20
|
prevValue.value = valueNumber.value;
|
|
21
21
|
prevCount.value = countNumber.value;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
const isUnchanged = computed(() => prevValue.value === valueNumber.value || Number.isNaN(valueNumber.value) || Number.isNaN(prevValue.value));
|
|
24
|
+
watch([
|
|
25
|
+
valueNumber,
|
|
26
|
+
countNumber,
|
|
27
|
+
isUnchanged
|
|
28
|
+
], () => {
|
|
24
29
|
if (fallbackTimer.value) {
|
|
25
30
|
clearTimeout(fallbackTimer.value);
|
|
26
31
|
fallbackTimer.value = null;
|
|
27
32
|
}
|
|
33
|
+
if (isUnchanged.value) {
|
|
34
|
+
onTransitionEnd();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
28
37
|
fallbackTimer.value = setTimeout(onTransitionEnd, 1e3);
|
|
29
38
|
}, { immediate: true });
|
|
30
39
|
onBeforeUnmount(() => {
|
|
@@ -53,7 +62,7 @@ var SingleNumber_default = /* @__PURE__ */ defineComponent((props) => {
|
|
|
53
62
|
};
|
|
54
63
|
let unitNodes;
|
|
55
64
|
let offsetStyle;
|
|
56
|
-
if (
|
|
65
|
+
if (isUnchanged.value) {
|
|
57
66
|
unitNodes = [renderUnit(props.value, 0, true, value)];
|
|
58
67
|
offsetStyle = { transition: "none" };
|
|
59
68
|
} else {
|
package/dist/badge/index.d.ts
CHANGED
|
@@ -45,6 +45,9 @@ interface BadgeSlots {
|
|
|
45
45
|
count?: () => any;
|
|
46
46
|
text?: () => any;
|
|
47
47
|
}
|
|
48
|
+
interface BadgeRef {
|
|
49
|
+
nativeElement: HTMLSpanElement;
|
|
50
|
+
}
|
|
48
51
|
declare const InternalBadge: import("vue").DefineSetupFnComponent<BadgeProps, EmptyEmit, SlotsType<BadgeSlots>, BadgeProps, import("vue").PublicProps>;
|
|
49
52
|
declare const Badge: typeof InternalBadge & {
|
|
50
53
|
Ribbon: typeof _default;
|
|
@@ -53,4 +56,4 @@ declare const BadgeRibbon: import("vue").DefineSetupFnComponent<RibbonProps, Emp
|
|
|
53
56
|
type BadgeRibbonProps = RibbonProps;
|
|
54
57
|
type BadgeRibbonRef = RibbonRef;
|
|
55
58
|
//#endregion
|
|
56
|
-
export { BadgeClassNamesType, BadgeProps, BadgeRibbon, BadgeRibbonProps, BadgeRibbonRef, BadgeSemanticClassNames, BadgeSemanticName, BadgeSemanticStyles, BadgeSlots, BadgeStylesType, Badge as default };
|
|
59
|
+
export { BadgeClassNamesType, BadgeProps, BadgeRef, BadgeRibbon, BadgeRibbonProps, BadgeRibbonRef, BadgeSemanticClassNames, BadgeSemanticName, BadgeSemanticStyles, BadgeSlots, BadgeStylesType, Badge as default };
|
package/dist/badge/index.js
CHANGED
|
@@ -20,8 +20,8 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
20
20
|
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, direction, getPrefixCls } = useComponentBaseConfig("badge", props);
|
|
21
21
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
22
22
|
const mergedProps = computed(() => props);
|
|
23
|
-
const
|
|
24
|
-
expose({
|
|
23
|
+
const nativeElementRef = shallowRef();
|
|
24
|
+
expose({ nativeElement: nativeElementRef });
|
|
25
25
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
26
26
|
if (isDev) devUseWarning("Badge").deprecated(props.size !== "default", "size=\"default\"", "size=\"medium\"");
|
|
27
27
|
const numberedDisplayCount = computed(() => {
|
|
@@ -117,7 +117,7 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
117
117
|
if (isStatusBadge.value) {
|
|
118
118
|
const statusTextColor = mergedStyles.value.root?.color;
|
|
119
119
|
return createVNode("span", mergeProps(restAttrs, {
|
|
120
|
-
"ref":
|
|
120
|
+
"ref": nativeElementRef,
|
|
121
121
|
"class": badgeClassName,
|
|
122
122
|
"style": [offsetStyle.value, mergedStyles.value.root]
|
|
123
123
|
}), [createVNode("span", {
|
|
@@ -139,7 +139,7 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
139
139
|
const scrollNumberStyle = {};
|
|
140
140
|
if (props.color && !isInternalColor.value) scrollNumberStyle.background = props.color;
|
|
141
141
|
return createVNode("span", mergeProps(restAttrs, {
|
|
142
|
-
"ref":
|
|
142
|
+
"ref": nativeElementRef,
|
|
143
143
|
"class": badgeClassName,
|
|
144
144
|
"style": mergedStyles.value.root
|
|
145
145
|
}), [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, VNodeChild } from "vue";
|
|
2
2
|
//#region src/button/buttonHelper.d.ts
|
|
3
3
|
declare const isTwoCNChar: (string: string) => boolean;
|
|
4
|
-
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "
|
|
4
|
+
declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "link" | "text";
|
|
5
5
|
declare function spaceChildren(children: VNodeChild[], needInserted: boolean, style?: CSSProperties, className?: string): VNodeChild[];
|
|
6
6
|
declare const _ButtonTypes: readonly ["default", "primary", "dashed", "link", "text"];
|
|
7
7
|
type ButtonType = (typeof _ButtonTypes)[number];
|
|
@@ -8,7 +8,7 @@ import genVariantStyle from "./variant.js";
|
|
|
8
8
|
import { unit } from "@antdv-next/cssinjs";
|
|
9
9
|
//#region src/button/style/index.ts
|
|
10
10
|
const genSharedButtonStyle = (token) => {
|
|
11
|
-
const { componentCls, iconCls, fontWeight, opacityLoading, motionDurationSlow, motionEaseInOut, iconGap, calc } = token;
|
|
11
|
+
const { componentCls, iconCls, fontWeight, opacityLoading, motionDurationMid, motionDurationSlow, motionEaseInOut, iconGap, calc } = token;
|
|
12
12
|
return { [componentCls]: {
|
|
13
13
|
outline: "none",
|
|
14
14
|
position: "relative",
|
|
@@ -21,7 +21,13 @@ const genSharedButtonStyle = (token) => {
|
|
|
21
21
|
textAlign: "center",
|
|
22
22
|
backgroundImage: "none",
|
|
23
23
|
cursor: "pointer",
|
|
24
|
-
transition:
|
|
24
|
+
transition: [
|
|
25
|
+
"color",
|
|
26
|
+
"background-color",
|
|
27
|
+
"border-color",
|
|
28
|
+
"box-shadow",
|
|
29
|
+
"opacity"
|
|
30
|
+
].map((prop) => `${prop} ${motionDurationMid} ${motionEaseInOut}`).join(","),
|
|
25
31
|
userSelect: "none",
|
|
26
32
|
touchAction: "manipulation",
|
|
27
33
|
...genNoMotionStyle(),
|
|
@@ -5,6 +5,7 @@ import locale from "../date-picker/locale/en_US.js";
|
|
|
5
5
|
import "./locale/en_US.js";
|
|
6
6
|
import { CSSProperties, SlotsType } from "vue";
|
|
7
7
|
import { GenerateConfig } from "@v-c/picker/generate/index";
|
|
8
|
+
import { CellRenderInfo } from "@v-c/picker/dist/interface";
|
|
8
9
|
//#region src/calendar/generateCalendar.d.ts
|
|
9
10
|
type CalendarMode = 'year' | 'month';
|
|
10
11
|
type HeaderRender<DateType> = (config: {
|
|
@@ -51,8 +52,8 @@ interface CalendarProps<DateType> extends CalendarEmitsProps<DateType> {
|
|
|
51
52
|
monthFullCellRender?: (date: DateType) => VueNode;
|
|
52
53
|
/** @deprecated Please use cellRender instead. */
|
|
53
54
|
monthCellRender?: (date: DateType) => VueNode;
|
|
54
|
-
cellRender?: (date: DateType, info:
|
|
55
|
-
fullCellRender?: (date: DateType, info:
|
|
55
|
+
cellRender?: (date: DateType, info: CellRenderInfo<DateType>) => VueNode;
|
|
56
|
+
fullCellRender?: (date: DateType, info: CellRenderInfo<DateType>) => VueNode;
|
|
56
57
|
headerRender?: HeaderRender<DateType>;
|
|
57
58
|
value?: DateType;
|
|
58
59
|
defaultValue?: DateType;
|
|
@@ -79,11 +80,11 @@ interface CalendarSlots<DateType = AnyObject> {
|
|
|
79
80
|
}) => any;
|
|
80
81
|
cellRender?: (ctx: {
|
|
81
82
|
date: DateType;
|
|
82
|
-
info:
|
|
83
|
+
info: CellRenderInfo<DateType>;
|
|
83
84
|
}) => any;
|
|
84
85
|
fullCellRender?: (ctx: {
|
|
85
86
|
date: DateType;
|
|
86
|
-
info:
|
|
87
|
+
info: CellRenderInfo<DateType>;
|
|
87
88
|
}) => any;
|
|
88
89
|
headerRender?: (config: {
|
|
89
90
|
value: DateType;
|
|
@@ -7,7 +7,7 @@ import useLocale from "../locale/useLocale.js";
|
|
|
7
7
|
import CalendarHeader from "./Header.js";
|
|
8
8
|
import style_default from "./style/index.js";
|
|
9
9
|
import { computed, createVNode, defineComponent, mergeProps, ref, shallowRef, watch } from "vue";
|
|
10
|
-
import { clsx } from "@v-c/util";
|
|
10
|
+
import { clsx, merge } from "@v-c/util";
|
|
11
11
|
import { PickerPanel } from "@v-c/picker";
|
|
12
12
|
//#region src/calendar/generateCalendar.tsx
|
|
13
13
|
const calendarProps = [
|
|
@@ -82,7 +82,7 @@ function generateCalendar(generateConfig) {
|
|
|
82
82
|
const panelMode = computed(() => mergedMode.value === "year" ? "month" : "date");
|
|
83
83
|
const mergedDisabledDate = computed(() => {
|
|
84
84
|
return (date) => {
|
|
85
|
-
return (props.validRange ? generateConfig.isAfter(props.validRange[0], date) || generateConfig.isAfter(date, props.validRange[1]) : false) || !!props.disabledDate?.(date);
|
|
85
|
+
return (props.validRange ? generateConfig.isAfter(props.validRange[0], date) && !isSameDate(date, props.validRange[0], generateConfig) || generateConfig.isAfter(date, props.validRange[1]) && !isSameDate(date, props.validRange[1], generateConfig) : false) || !!props.disabledDate?.(date);
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
const triggerPanelChange = (date, newMode) => {
|
|
@@ -133,7 +133,7 @@ function generateCalendar(generateConfig) {
|
|
|
133
133
|
info
|
|
134
134
|
});
|
|
135
135
|
if (slots.monthFullCellRender || props.monthFullCellRender) return resolveRender("monthFullCellRender", [date], { date });
|
|
136
|
-
const months = info.locale
|
|
136
|
+
const months = info.locale.shortMonths || generateConfig.locale.getShortMonths(info.locale.locale);
|
|
137
137
|
const cellContent = slots.cellRender || props.cellRender ? resolveRender("cellRender", [date, info], {
|
|
138
138
|
date,
|
|
139
139
|
info
|
|
@@ -144,10 +144,7 @@ function generateCalendar(generateConfig) {
|
|
|
144
144
|
}, [cellContent])]);
|
|
145
145
|
};
|
|
146
146
|
const [contextLocale] = useLocale("Calendar", en_US_default);
|
|
147
|
-
const locale = computed(() => ({
|
|
148
|
-
...contextLocale?.value,
|
|
149
|
-
...props.locale ?? {}
|
|
150
|
-
}));
|
|
147
|
+
const locale = computed(() => merge(contextLocale?.value, props.locale || {}));
|
|
151
148
|
const mergedCellRender = (current, info) => {
|
|
152
149
|
if (info.type === "date") return dateRender(current, info);
|
|
153
150
|
if (info.type === "month") return monthRender(current, {
|
package/dist/card/Card.d.ts
CHANGED
|
@@ -83,6 +83,9 @@ interface CardSlots {
|
|
|
83
83
|
tabLabelRender?: TabsSlots['labelRender'];
|
|
84
84
|
tabBarExtraContent?: () => any;
|
|
85
85
|
}
|
|
86
|
+
interface CardRef {
|
|
87
|
+
nativeElement: HTMLDivElement;
|
|
88
|
+
}
|
|
86
89
|
declare const Card: import("vue").DefineSetupFnComponent<CardProps, CardEmits, SlotsType<CardSlots>, CardProps, import("vue").PublicProps>;
|
|
87
90
|
//#endregion
|
|
88
|
-
export { CardClassNamesType, CardEmits, CardEmitsProps, CardProps, CardSemanticClassNames, CardSemanticName, CardSemanticStyles, CardSize, CardSlots, CardStylesType, CardTabListType, CardType, Card as default };
|
|
91
|
+
export { CardClassNamesType, CardEmits, CardEmitsProps, CardProps, CardRef, CardSemanticClassNames, CardSemanticName, CardSemanticStyles, CardSize, CardSlots, CardStylesType, CardTabListType, CardType, Card as default };
|
package/dist/card/Card.js
CHANGED
|
@@ -8,7 +8,7 @@ import useVariant from "../form/hooks/useVariant.js";
|
|
|
8
8
|
import skeleton_default from "../skeleton/index.js";
|
|
9
9
|
import Tabs from "../tabs/index.js";
|
|
10
10
|
import style_default from "./style/index.js";
|
|
11
|
-
import { computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
|
11
|
+
import { computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef } from "vue";
|
|
12
12
|
import { clsx } from "@v-c/util";
|
|
13
13
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
14
14
|
//#region src/card/Card.tsx
|
|
@@ -46,7 +46,7 @@ const ActionNode = /* @__PURE__ */ defineComponent((props) => {
|
|
|
46
46
|
required: false
|
|
47
47
|
}
|
|
48
48
|
} });
|
|
49
|
-
const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
49
|
+
const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
50
50
|
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("card", props);
|
|
51
51
|
const { styles, classes, size: customizeSize, variant: customVariant, bordered } = toPropsRefs$1(props, "bordered", "variant", "classes", "styles", "size");
|
|
52
52
|
const [variant] = useVariant("card", customVariant, bordered);
|
|
@@ -76,6 +76,8 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
76
76
|
emit("update:activeTabKey", key);
|
|
77
77
|
};
|
|
78
78
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
79
|
+
const nativeElementRef = shallowRef();
|
|
80
|
+
expose({ nativeElement: nativeElementRef });
|
|
79
81
|
return () => {
|
|
80
82
|
const { activeTabKey, tabProps, defaultActiveTabKey, tabList, headStyle, bodyStyle, loading, rootClass, hoverable, type } = props;
|
|
81
83
|
const { style, className, restAttrs } = getAttrStyleAndClass(attrs);
|
|
@@ -150,24 +152,28 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
150
152
|
"actionStyle": mergedStyles.value.actions,
|
|
151
153
|
"actions": actions
|
|
152
154
|
}, null) : null;
|
|
153
|
-
|
|
155
|
+
const divProps = {
|
|
154
156
|
...restAttrs,
|
|
155
157
|
id: props.id
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
};
|
|
159
|
+
const classString = clsx(prefixCls.value, contextClassName.value, {
|
|
160
|
+
[`${prefixCls.value}-loading`]: loading,
|
|
161
|
+
[`${prefixCls.value}-bordered`]: variant.value !== "borderless",
|
|
162
|
+
[`${prefixCls.value}-hoverable`]: hoverable,
|
|
163
|
+
[`${prefixCls.value}-contain-grid`]: isContainGrid,
|
|
164
|
+
[`${prefixCls.value}-contain-tabs`]: tabList?.length,
|
|
165
|
+
[`${prefixCls.value}-small`]: mergedSize.value === "small",
|
|
166
|
+
[`${prefixCls.value}-type-${type}`]: !!type,
|
|
167
|
+
[`${prefixCls.value}-rtl`]: direction.value === "rtl"
|
|
168
|
+
}, className, rootClass, hashId.value, cssVarCls.value, mergedClassNames.value.root);
|
|
169
|
+
const mergedStyle = {
|
|
170
|
+
...mergedStyles.value.root,
|
|
171
|
+
...style
|
|
172
|
+
};
|
|
173
|
+
return createVNode("div", mergeProps(divProps, {
|
|
174
|
+
"ref": nativeElementRef,
|
|
175
|
+
"class": classString,
|
|
176
|
+
"style": mergedStyle
|
|
171
177
|
}), [
|
|
172
178
|
head,
|
|
173
179
|
coverDom,
|
package/dist/card/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Card, { CardEmits, CardProps, CardSize, CardSlots, CardTabListType } from "./Card.js";
|
|
1
|
+
import Card, { CardEmits, CardProps, CardRef, CardSize, CardSlots, CardTabListType } from "./Card.js";
|
|
2
2
|
import CardMeta, { CardMetaProps, CardMetaRef } from "./CardMeta.js";
|
|
3
3
|
import CardGrid, { CardGridProps, CardGridRef } from "./CardGrid.js";
|
|
4
4
|
//#region src/card/index.d.ts
|
|
@@ -8,4 +8,4 @@ type CompoundedCard = typeof Card & {
|
|
|
8
8
|
};
|
|
9
9
|
declare const _default: CompoundedCard;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { type CardEmits, CardGrid, type CardGridProps, type CardGridRef, CardMeta, type CardMetaProps, type CardMetaRef, type CardProps, type CardSize, type CardSlots, type CardTabListType, _default as default };
|
|
11
|
+
export { type CardEmits, CardGrid, type CardGridProps, type CardGridRef, CardMeta, type CardMetaProps, type CardMetaRef, type CardProps, type CardRef, type CardSize, type CardSlots, type CardTabListType, _default as default };
|
package/dist/cascader/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { SelectPopupSemanticClassNames, SelectPopupSemanticStyles } from "../sel
|
|
|
9
9
|
import CascaderPanel from "./Panel.js";
|
|
10
10
|
import { Variant } from "../config-provider/context.js";
|
|
11
11
|
import { App, CSSProperties, PublicProps, VNode, VNodeChild } from "vue";
|
|
12
|
-
import { CascaderProps as CascaderProps$1, DefaultOptionType, FieldNames, SHOW_CHILD, SHOW_PARENT } from "@v-c/cascader";
|
|
12
|
+
import { CascaderProps as CascaderProps$1, DefaultOptionType, FieldNames, SHOW_CHILD, SHOW_PARENT, SearchConfig } from "@v-c/cascader";
|
|
13
13
|
//#region src/cascader/index.d.ts
|
|
14
14
|
type FieldNamesType = FieldNames;
|
|
15
15
|
type FilledFieldNamesType = Required<FieldNamesType>;
|
|
@@ -44,7 +44,7 @@ type CascaderClassNamesType = SemanticClassNamesType<CascaderProps, CascaderSema
|
|
|
44
44
|
type CascaderStylesType = SemanticStylesType<CascaderProps, CascaderSemanticStyles, {
|
|
45
45
|
popup?: SelectPopupSemanticStyles;
|
|
46
46
|
}>;
|
|
47
|
-
interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> extends Omit<CascaderProps$1<OptionType, ValueField, Multiple>, 'checkable' | 'className' | 'style' | 'classNames' | 'styles' | 'onChange' | 'onSearch' | 'onPopupVisibleChange' | 'popupRender' | 'multiple' | 'value'>, CascaderEmitsProps<OptionType, ValueField, Multiple> {
|
|
47
|
+
interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> extends Omit<CascaderProps$1<OptionType, ValueField, Multiple>, 'checkable' | 'className' | 'style' | 'classNames' | 'styles' | 'onChange' | 'onSearch' | 'onPopupVisibleChange' | 'popupRender' | 'multiple' | 'showSearch' | 'value'>, CascaderEmitsProps<OptionType, ValueField, Multiple> {
|
|
48
48
|
value?: any;
|
|
49
49
|
multiple?: boolean;
|
|
50
50
|
size?: SizeType;
|
|
@@ -61,6 +61,9 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
|
|
|
61
61
|
suffix?: VueNode<[SelectSuffixRenderInfo]>;
|
|
62
62
|
/** @deprecated Please use `suffix` instead. */
|
|
63
63
|
suffixIcon?: VueNode;
|
|
64
|
+
showSearch?: boolean | (SearchConfig<OptionType, keyof OptionType> & {
|
|
65
|
+
searchIcon?: VueNode;
|
|
66
|
+
});
|
|
64
67
|
options?: OptionType[];
|
|
65
68
|
status?: InputStatus;
|
|
66
69
|
rootClass?: string;
|
package/dist/cascader/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { useCompactItemContext } from "../space/Compact.js";
|
|
|
8
8
|
import { getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs } from "../_util/tools.js";
|
|
9
9
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
10
10
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
11
|
+
import { isPlainObject } from "../_util/is.js";
|
|
11
12
|
import { useVariants } from "../form/hooks/useVariant.js";
|
|
12
13
|
import { useLocaleGetter } from "../locale/useLocale.js";
|
|
13
14
|
import genPurePanel from "../_util/PurePanel.js";
|
|
@@ -68,7 +69,7 @@ const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
|
|
|
68
69
|
return optionList;
|
|
69
70
|
};
|
|
70
71
|
const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots, expose }) => {
|
|
71
|
-
const { getPopupContainer: getContextPopupContainer, popupOverflow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPrefixCls, expandIcon: contextExpandIcon, loadingIcon: contextLoadingIcon, searchIcon:
|
|
72
|
+
const { getPopupContainer: getContextPopupContainer, popupOverflow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPrefixCls, expandIcon: contextExpandIcon, loadingIcon: contextLoadingIcon, searchIcon: contextSearchIcon, clearIcon: contextClearIcon, allowClear: contextAllowClear, removeIcon: contextRemoveIcon, suffix: contextSuffix, suffixIcon: contextSuffixIcon } = useComponentBaseConfig("cascader", props, [
|
|
72
73
|
"expandIcon",
|
|
73
74
|
"loadingIcon",
|
|
74
75
|
"searchIcon",
|
|
@@ -168,7 +169,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
168
169
|
blur: () => cascaderRef.value?.blur?.()
|
|
169
170
|
});
|
|
170
171
|
return () => {
|
|
171
|
-
const { popupClassName, dropdownClassName, rootClass, dropdownRender, popupRender, dropdownMenuColumnStyle, popupMenuColumnStyle, showArrow, allowClear, expandIcon, loadingIcon, transitionName, choiceTransitionName, builtinPlacements, getPopupContainer, displayRender, optionRender, multiple, prefixCls: _prefixCls, direction: _direction, size: _size, disabled: _disabled, status: _status, bordered: _bordered, variant: _variant, classes: _classes, styles: _styles, popupStyle: _popupStyle, dropdownStyle: _dropdownStyle, ...rest } = props;
|
|
172
|
+
const { popupClassName, dropdownClassName, rootClass, dropdownRender, popupRender, dropdownMenuColumnStyle, popupMenuColumnStyle, showArrow, showSearch, allowClear, expandIcon, loadingIcon, transitionName, choiceTransitionName, builtinPlacements, getPopupContainer, displayRender, optionRender, multiple, prefixCls: _prefixCls, direction: _direction, size: _size, disabled: _disabled, status: _status, bordered: _bordered, variant: _variant, classes: _classes, styles: _styles, popupStyle: _popupStyle, dropdownStyle: _dropdownStyle, ...rest } = props;
|
|
172
173
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
173
174
|
const customSuffix = getCustomSuffix(slots, props);
|
|
174
175
|
const mergedCustomSuffix = customSuffix !== void 0 ? customSuffix : getSlotPropsFnRun(slots, props, "suffixIcon", false);
|
|
@@ -183,6 +184,8 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
183
184
|
showArrow,
|
|
184
185
|
suffix: mergedCustomSuffix,
|
|
185
186
|
contextSuffix: contextSuffix.value !== void 0 ? contextSuffix.value : contextSuffixIcon.value,
|
|
187
|
+
searchIcon: isPlainObject(showSearch) ? showSearch.searchIcon : void 0,
|
|
188
|
+
contextSearchIcon: contextSearchIcon.value,
|
|
186
189
|
removeIcon: rest.removeIcon ?? contextRemoveIcon.value,
|
|
187
190
|
clearIcon: rest.clearIcon,
|
|
188
191
|
prefixCls: prefixCls.value,
|
|
@@ -321,6 +324,11 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
321
324
|
required: false,
|
|
322
325
|
default: void 0
|
|
323
326
|
},
|
|
327
|
+
showSearch: {
|
|
328
|
+
type: [Boolean, Object],
|
|
329
|
+
required: false,
|
|
330
|
+
default: void 0
|
|
331
|
+
},
|
|
324
332
|
options: {
|
|
325
333
|
type: Array,
|
|
326
334
|
required: false
|
|
@@ -410,11 +418,6 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
410
418
|
required: false,
|
|
411
419
|
default: void 0
|
|
412
420
|
},
|
|
413
|
-
showSearch: {
|
|
414
|
-
type: [Boolean, Object],
|
|
415
|
-
required: false,
|
|
416
|
-
default: void 0
|
|
417
|
-
},
|
|
418
421
|
searchValue: {
|
|
419
422
|
type: String,
|
|
420
423
|
required: false
|
|
@@ -109,6 +109,7 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
109
109
|
"onClick": onLabelClick
|
|
110
110
|
}, restAttrs), [createVNode(VcCheckbox, mergeProps(omit$1(props, keys), {
|
|
111
111
|
"onChange": (e) => {
|
|
112
|
+
if (checkboxRef.value?.input) checkboxRef.value.input.indeterminate = !!props.indeterminate;
|
|
112
113
|
emit("change", e);
|
|
113
114
|
},
|
|
114
115
|
"onUpdate:checked": (checked) => {
|
|
@@ -127,6 +128,8 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
127
128
|
}, {
|
|
128
129
|
"name": !skipGroup && checkboxGroup?.value ? checkboxGroup.value?.name : props.name,
|
|
129
130
|
"onClick": onInputClick,
|
|
131
|
+
"onKeydown": (e) => emit("keydown", e),
|
|
132
|
+
"onKeypress": (e) => emit("keypress", e),
|
|
130
133
|
"checked": mergedChecked.value,
|
|
131
134
|
"prefixCls": prefixCls.value,
|
|
132
135
|
"class": checkboxClass,
|
package/dist/checkbox/Group.d.ts
CHANGED
|
@@ -45,13 +45,14 @@ interface CheckboxGroupProps extends AbstractCheckboxGroupProps, CheckboxGroupEm
|
|
|
45
45
|
role?: string;
|
|
46
46
|
classes?: CheckboxGroupClassNamesType;
|
|
47
47
|
styles?: CheckboxGroupStylesType;
|
|
48
|
-
'onUpdate:value'?: (value: any[]) => void;
|
|
49
48
|
}
|
|
50
49
|
interface CheckboxGroupEmits {
|
|
51
50
|
'change': (checkedValue: any[]) => void;
|
|
51
|
+
'update:value': (value: any[]) => void;
|
|
52
52
|
}
|
|
53
53
|
interface CheckboxGroupEmitsProps {
|
|
54
54
|
onChange?: CheckboxGroupEmits['change'];
|
|
55
|
+
'onUpdate:value'?: CheckboxGroupEmits['update:value'];
|
|
55
56
|
}
|
|
56
57
|
interface CheckboxGroupSlots {
|
|
57
58
|
default: () => any;
|
package/dist/checkbox/Group.js
CHANGED
|
@@ -43,7 +43,7 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
43
43
|
return memoizedOptions.value.findIndex((opt) => opt.value === a) - memoizedOptions.value.findIndex((opt) => opt.value === b);
|
|
44
44
|
});
|
|
45
45
|
emit("change", sortVals);
|
|
46
|
-
|
|
46
|
+
emit("update:value", sortVals);
|
|
47
47
|
if (props.value === void 0) value.value = newValue;
|
|
48
48
|
};
|
|
49
49
|
const groupPrefixCls = computed(() => `${prefixCls.value}-group`);
|
|
@@ -97,7 +97,7 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
97
97
|
}) : option.label;
|
|
98
98
|
return createVNode(InternalCheckbox, mergeProps({
|
|
99
99
|
"prefixCls": prefixCls.value,
|
|
100
|
-
"key": option.value.
|
|
100
|
+
"key": `${typeof option.value}:${String(option.value)}`,
|
|
101
101
|
"disabled": "disabled" in option ? option.disabled : restProps.disabled,
|
|
102
102
|
"value": option.value,
|
|
103
103
|
"checked": value.value.includes(option.value)
|
|
@@ -145,10 +145,6 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
145
145
|
type: [Object, Function],
|
|
146
146
|
required: false
|
|
147
147
|
},
|
|
148
|
-
"onUpdate:value": {
|
|
149
|
-
type: Function,
|
|
150
|
-
required: false
|
|
151
|
-
},
|
|
152
148
|
options: {
|
|
153
149
|
type: Array,
|
|
154
150
|
required: false
|
|
@@ -170,7 +166,7 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
170
166
|
options: [],
|
|
171
167
|
role: "group"
|
|
172
168
|
}),
|
|
173
|
-
emits: ["change"],
|
|
169
|
+
emits: ["change", "update:value"],
|
|
174
170
|
name: "ACheckboxGroup",
|
|
175
171
|
inheritAttrs: false
|
|
176
172
|
});
|
|
@@ -123,15 +123,19 @@ const GradientColorSlider = /* @__PURE__ */ defineComponent((props) => {
|
|
|
123
123
|
},
|
|
124
124
|
min: {
|
|
125
125
|
type: Number,
|
|
126
|
-
required:
|
|
126
|
+
required: false
|
|
127
127
|
},
|
|
128
128
|
max: {
|
|
129
129
|
type: Number,
|
|
130
|
-
required:
|
|
130
|
+
required: false
|
|
131
131
|
},
|
|
132
132
|
disabled: {
|
|
133
133
|
type: Boolean,
|
|
134
134
|
required: true
|
|
135
|
+
},
|
|
136
|
+
"aria-label": {
|
|
137
|
+
type: String,
|
|
138
|
+
required: false
|
|
135
139
|
}
|
|
136
140
|
},
|
|
137
141
|
name: "GradientColorSlider",
|
|
@@ -160,11 +164,11 @@ const SingleColorSlider = /* @__PURE__ */ defineComponent((props) => {
|
|
|
160
164
|
},
|
|
161
165
|
min: {
|
|
162
166
|
type: Number,
|
|
163
|
-
required:
|
|
167
|
+
required: false
|
|
164
168
|
},
|
|
165
169
|
max: {
|
|
166
170
|
type: Number,
|
|
167
|
-
required:
|
|
171
|
+
required: false
|
|
168
172
|
},
|
|
169
173
|
value: {
|
|
170
174
|
type: Number,
|
|
@@ -189,6 +193,10 @@ const SingleColorSlider = /* @__PURE__ */ defineComponent((props) => {
|
|
|
189
193
|
color: {
|
|
190
194
|
type: Object,
|
|
191
195
|
required: true
|
|
196
|
+
},
|
|
197
|
+
"aria-label": {
|
|
198
|
+
type: String,
|
|
199
|
+
required: false
|
|
192
200
|
}
|
|
193
201
|
},
|
|
194
202
|
name: "ColorSlider",
|
|
@@ -46,8 +46,10 @@ var GradientColorBar_default = /* @__PURE__ */ defineComponent((props) => {
|
|
|
46
46
|
props.onChange?.(new AggregationColor(nextColors), true);
|
|
47
47
|
};
|
|
48
48
|
const onKeyDelete = (index) => {
|
|
49
|
+
if (colorList.value.length <= 2) return;
|
|
49
50
|
const nextColors = [...colorList.value];
|
|
50
51
|
nextColors.splice(index, 1);
|
|
52
|
+
if (props.activeIndex >= nextColors.length) props.onActive(nextColors.length - 1);
|
|
51
53
|
const nextColor = new AggregationColor(nextColors);
|
|
52
54
|
props.onChange?.(nextColor);
|
|
53
55
|
props.onChangeComplete?.(nextColor);
|