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
|
@@ -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 {
|
|
@@ -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 = [
|
|
@@ -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
|
|
@@ -128,6 +128,8 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
128
128
|
}, {
|
|
129
129
|
"name": !skipGroup && checkboxGroup?.value ? checkboxGroup.value?.name : props.name,
|
|
130
130
|
"onClick": onInputClick,
|
|
131
|
+
"onKeydown": (e) => emit("keydown", e),
|
|
132
|
+
"onKeypress": (e) => emit("keypress", e),
|
|
131
133
|
"checked": mergedChecked.value,
|
|
132
134
|
"prefixCls": prefixCls.value,
|
|
133
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
|
});
|
package/dist/components.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ import { CalendarMode, CalendarProps, CalendarRef } from "./calendar/generateCal
|
|
|
65
65
|
import _default$4 from "./calendar/index.js";
|
|
66
66
|
import TabPane, { TabPaneProps } from "./tabs/TabPane.js";
|
|
67
67
|
import Tabs, { TabsEmits, TabsProps, TabsRef, TabsSlots } from "./tabs/index.js";
|
|
68
|
-
import { CardEmits, CardProps, CardSize, CardSlots, CardTabListType } from "./card/Card.js";
|
|
68
|
+
import { CardEmits, CardProps, CardRef, CardSize, CardSlots, CardTabListType } from "./card/Card.js";
|
|
69
69
|
import CardMeta, { CardMetaProps, CardMetaRef } from "./card/CardMeta.js";
|
|
70
70
|
import CascaderPanel, { CascaderPanelEmits, CascaderPanelProps, CascaderPanelSlots } from "./cascader/Panel.js";
|
|
71
71
|
import Cascader, { CascaderEmits, CascaderProps, CascaderSlots } from "./cascader/index.js";
|
|
@@ -172,4 +172,4 @@ import { DraggerProps } from "./upload/Dragger.js";
|
|
|
172
172
|
import { UploadRef } from "./upload/Upload.js";
|
|
173
173
|
import Upload, { UploadDragger, UploadProps } from "./upload/index.js";
|
|
174
174
|
import Watermark, { WatermarkContent, WatermarkEmits, WatermarkFont, WatermarkProps, WatermarkRef, WatermarkSlots, WatermarkText } from "./watermark/index.js";
|
|
175
|
-
export { Affix, type AffixEmits, type AffixProps, type AffixRef, Alert, type AlertEmits, type AlertProps, type AlertSemanticType, type AlertSlots, Anchor, type AnchorEmits, type AnchorLinkProps, type AnchorProps, type AnchorSlots, type AntTreeNode, type AntTreeNodeCheckedEvent, type AntTreeNodeExpandedEvent, type AntTreeNodeMouseEvent, type AntTreeNodeProps, type AntTreeNodeSelectedEvent, type AntdTreeNodeAttribute, _default as App, type AppProps, AutoComplete, type AutoCompleteClassNamesType, type AutoCompleteEmits, Option as AutoCompleteOption, type AutoCompleteProps, type AutoCompleteSlots, type AutoCompleteStylesType, Avatar, type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarSlots, BackTopWithInstall as BackTop, Badge, type BadgeProps, type BadgeRef, BadgeRibbon, type RibbonProps as BadgeRibbonProps, type RibbonRef as BadgeRibbonRef, type BadgeSlots, type BasicDataNode, BorderBeam, type BorderBeamColor, type BorderBeamGradient, type BorderBeamItem, type BorderBeamProps, _default$1 as Breadcrumb, type BreadcrumbEmits, _default$2 as BreadcrumbItem, type BreadcrumbItemProps, type ItemType as BreadcrumbItemType, type BreadcrumbProps, type BreadcrumbRef, _default$3 as BreadcrumbSeparator, type BreadcrumbSlots, Button, type ButtonColorType, type ButtonEmits, type ButtonHTMLType, type ButtonProps, type ButtonSemanticName, type ButtonShape, type SizeType as ButtonSize, type ButtonSlots, type ButtonType, type ButtonVariantType, _default$4 as Calendar, type CalendarMode, type CalendarProps, type CalendarRef, _default$5 as Card, type CardEmits, CardGrid, type CardGridProps, type CardGridRef, CardMeta, type CardMetaProps, type CardMetaRef, type CardProps, type CardSize, type CardSlots, type CardTabListType, Carousel, type CarouselEmits, type CarouselProps, type CarouselRef, type CarouselSlots, Cascader, type CascaderEmits, CascaderPanel, type CascaderPanelEmits, type CascaderPanelProps, type CascaderPanelSlots, type CascaderProps, type CascaderSlots, CheckableTag, CheckableTagGroup, type CheckableTagProps, InternalCheckbox as Checkbox, type CheckboxEmits, CheckboxGroup, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSlots, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, Col, type ColProps, type ColSize, Collapse, CollapsePanel, type CollapsePanelProps, type CollapsePanelSlots, type CollapseProps, type AggregationColor as Color, ColorPicker, type ColorPickerEmits, type ColorPickerProps, type ColorPickerSlots, type ColorValueType, _default$6 as ConfigProvider, type ConfigProviderProps, type DataSourceItemObject, type DataSourceItemType, DateMonthPicker, _default$7 as DatePicker, type DatePickerEmits, type DatePickerProps, type DatePickerSlots, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, type DescriptionsItemType, type DescriptionsProps, type DescriptionsRef, type DescriptionsSlots, DirectoryTree, type DirectoryTreeEmits, type ExpandAction as DirectoryTreeExpandAction, type DirectoryTreeProps, type DirectoryTreeSlots, Divider, type DividerProps, type DividerRef, Drawer, type DrawerEmits, type DrawerProps, type DrawerResizableConfig, type DrawerSlots, Dropdown, type DropdownArrowOptions, type DropdownEmits, type DropdownProps, type DropdownSlots, _default$8 as Empty, type EmptyProps, type EmptyRef, type EmptySlots, Flex, type FlexProps, type FlexSlots, FloatButton, FloatButtonGroup, type FloatButtonGroupProps, type FloatButtonGroupRef, type FloatButtonProps, type FloatButtonRef, Form, type FormConstructor, type FormEmits, type FormHookInstance, type FormInstance, InternalFormItem as FormItem, type FormItemEmits, type FormItemProps, type FormItemSlots, type FormProps, type FormSlots, type FormValues, _default_1 as Image, type ImageEmits, type PreviewConfig as ImagePreviewConfig, ImagePreviewGroup, type ImagePreviewGroupProps, type ImageProps, type ImageSlots, CompoundedInput as Input, type InputEmits, InputGroup, type InputGroupProps, InputNumber, type InputNumberEmits, type InputNumberProps, type VcInputNumberRef as InputNumberRef, type InputNumberStepContext, type ValueType as InputNumberValueType, InputOTP, type OTPEmits as InputOTPEmits, type OTPProps as InputOTPProps, type OTPSlots as InputOTPSlots, InputPassword, type PasswordProps as InputPasswordProps, type InputPasswordRef, type InputProps, type InputRef, InputSearch, type SearchProps as InputSearchProps, type InputSearchRef, type InputSlots, type InputTextAreaRef, type KeyWise, type KeyWiseTransferItem, Layout, LayoutContent, LayoutFooter, LayoutHeader, type BasicProps as LayoutProps, LayoutSider, type LegacyButtonType, type ListStyle, Listy, type ListyClassNames, type ListyProps, type ListyRef, type ListyScrollToConfig, type ListyStyles, _default$9 as Masonry, type MasonryEmits, type MasonryProps, type MasonryRef, type MasonrySlots, type MentionPlacement, Mentions, type MentionsClassNamesType, type MentionsEmits, Option$1 as MentionsOption, type MentionsOptionProps, type MentionsProps, type MentionsRef, type MentionsSlots, type MentionsStylesType, _default$10 as Menu, MenuDivider, type MenuEmits, type MenuInfo, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, type MenuItemType, type MenuProps, type MenuRef, type MenuSlots, type MenuTheme, type ArgsProps as MessageArgsProps, _default$11 as Modal, type ModalEmits, type ModalFuncProps, type ModalLocale, type ModalProps, type ModalSlots, type MonthPickerProps, type ArgsProps$1 as NotificationArgsProps, Pagination, type PaginationClassNamesType, type PaginationComponents, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, type PaginationProps, type PaginationSizeChangerProps, type PaginationSlots, type PaginationStylesType, Popconfirm, type PopconfirmEmits, type PopconfirmProps, type PopconfirmSlots, Popover, type PopoverEmits, type PopoverProps, type PopoverRef, type PopoverSlots, Progress, type ProgressProps, QRCode, type QRCodeEmits, type QRCodeProps, type QRCodeRef, InternalRadio as Radio, RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupEmits, type RadioGroupOptionType, type RadioGroupProps, type RadioGroupSlots, type RadioOptionType, type RadioProps, type RadioSlots, type RangePickerProps, Rate, type RateEmits, type RateProps, type RenderResult, type RenderResultObject, _default$12 as Result, type ResultProps, type ResultRef, type ResultSlots, type ResultStatusType, Row, type RowProps, type Rule, type RuleObject, type RuleRender, type RuleType, Segmented, type SegmentedEmits, type SegmentedOptions, type SegmentedProps, type SegmentedSlots, Select, type SelectAllLabel, type SelectEmits, type SelectInfo, SelectOptGroup, SelectOption, type SelectProps, type SelectSlots, type SelectValue, type SiderProps, SkeletonWithSubComponents as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, type SkeletonProps, type SkeletonRef, Slider, type SliderEmits, type SliderProps, type SliderRef, Space, SpaceAddon, SpaceCompact, type SpaceCompactProps, type SpaceCompactRef, type SpaceProps, type SpaceSize, type SpaceSlots, _default$13 as Spin, type SpinProps, type SpinRef, type SpinSlots, Splitter, type SplitterEmits, SplitterPanel, type SplitterProps, type SplitterRef, type SplitterSlots, _default$14 as Statistic, type StatisticProps, type StatisticRef, StatisticTimer, type StatisticTimerProps, type StepItem, Steps, type StepsEmits, type StepsProps, type StepsSlots, SubMenu, type SubMenuProps, Switch, type SwitchEmits, type SwitchProps, type SwitchSize, type SwitchSlots, TabPane, type TabPaneProps, _default$15 as Table, type TableClassNamesType, Column as TableColumn, ColumnGroup as TableColumnGroup, type ColumnType as TableColumnType, type ColumnsType as TableColumnsType, type DataIndex as TableDataIndex, type TableEmits, type FilterDropdownProps as TableFilterDropdownProps, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type SortOrder as TableSortOrder, type SorterResult as TableSorterResult, type TableStylesType, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, type TabsEmits, type TabsProps, type TabsRef, type TabsSlots, Tag, type TagProps, type TagSlots, InternalTextArea as TextArea, type TextAreaProps, type TextAreaRef, _default$16 as TimePicker, type TimePickerEmits, type TimePickerLocale, type TimePickerProps, type TimePickerSlots, TimeRangePicker, type TimeRangePickerEmits, type TimeRangePickerProps, type TimeRangePickerSlots, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemSlots, type TimelineItemType, type TimelineProps, _default$17 as Tooltip, type TooltipAlignConfig, type TooltipEmits, type TooltipPlacement, type TooltipProps, type TooltipRef, type TooltipSlots, Tour, type TourEmits, type TourLocale, type TourProps, type TourSlots, type TourStepItem, type TourStylesType, InternalTransfer as Transfer, type TransferClassNamesType, type TransferCustomListBodyProps, type TransferDirection, type TransferEmits, type TransferItem, type TransferKey, type TransferListBodyProps, type TransferListProps, type TransferLocale, type TransferOperationProps, type PaginationType as TransferPaginationType, type TransferProps, type TransferRef, type TransferRender, type TransferSearchEmits, type TransferSearchOption, type TransferSearchProps, type TransferSearchSlots, type TransferSlots, type TransferStylesType, Tree, type DataNode as TreeDataNode, type TreeEmits, type TreeInstance, type TreeProps, TreeSelect, type TreeSelectEmits, type TreeSelectNode, type TreeSelectProps, type TreeSelectSlots, type TreeSlots, type UseTreeConfig as TreeUseTreeConfig, Typography, type BlockProps as TypographyBaseProps, TypographyLink, type LinkProps as TypographyLinkProps, TypographyParagraph, type ParagraphProps as TypographyParagraphProps, TypographyText, type TextProps as TypographyTextProps, TypographyTitle, type TitleProps as TypographyTitleProps, UniqueProvider, Upload, type UploadChangeParam, UploadDragger, type DraggerProps as UploadDraggerProps, type UploadEmits, type UploadFile, type UploadProps, type UploadRef, type UploadSlots, Watermark, type WatermarkContent, type WatermarkEmits, type WatermarkFont, type WatermarkProps, type WatermarkRef, type WatermarkSlots, type WatermarkText, type WeekPickerProps, staticMethods as message, staticMethods$1 as notification, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useTree };
|
|
175
|
+
export { Affix, type AffixEmits, type AffixProps, type AffixRef, Alert, type AlertEmits, type AlertProps, type AlertSemanticType, type AlertSlots, Anchor, type AnchorEmits, type AnchorLinkProps, type AnchorProps, type AnchorSlots, type AntTreeNode, type AntTreeNodeCheckedEvent, type AntTreeNodeExpandedEvent, type AntTreeNodeMouseEvent, type AntTreeNodeProps, type AntTreeNodeSelectedEvent, type AntdTreeNodeAttribute, _default as App, type AppProps, AutoComplete, type AutoCompleteClassNamesType, type AutoCompleteEmits, Option as AutoCompleteOption, type AutoCompleteProps, type AutoCompleteSlots, type AutoCompleteStylesType, Avatar, type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarSlots, BackTopWithInstall as BackTop, Badge, type BadgeProps, type BadgeRef, BadgeRibbon, type RibbonProps as BadgeRibbonProps, type RibbonRef as BadgeRibbonRef, type BadgeSlots, type BasicDataNode, BorderBeam, type BorderBeamColor, type BorderBeamGradient, type BorderBeamItem, type BorderBeamProps, _default$1 as Breadcrumb, type BreadcrumbEmits, _default$2 as BreadcrumbItem, type BreadcrumbItemProps, type ItemType as BreadcrumbItemType, type BreadcrumbProps, type BreadcrumbRef, _default$3 as BreadcrumbSeparator, type BreadcrumbSlots, Button, type ButtonColorType, type ButtonEmits, type ButtonHTMLType, type ButtonProps, type ButtonSemanticName, type ButtonShape, type SizeType as ButtonSize, type ButtonSlots, type ButtonType, type ButtonVariantType, _default$4 as Calendar, type CalendarMode, type CalendarProps, type CalendarRef, _default$5 as Card, type CardEmits, CardGrid, type CardGridProps, type CardGridRef, CardMeta, type CardMetaProps, type CardMetaRef, type CardProps, type CardRef, type CardSize, type CardSlots, type CardTabListType, Carousel, type CarouselEmits, type CarouselProps, type CarouselRef, type CarouselSlots, Cascader, type CascaderEmits, CascaderPanel, type CascaderPanelEmits, type CascaderPanelProps, type CascaderPanelSlots, type CascaderProps, type CascaderSlots, CheckableTag, CheckableTagGroup, type CheckableTagProps, InternalCheckbox as Checkbox, type CheckboxEmits, CheckboxGroup, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSlots, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, Col, type ColProps, type ColSize, Collapse, CollapsePanel, type CollapsePanelProps, type CollapsePanelSlots, type CollapseProps, type AggregationColor as Color, ColorPicker, type ColorPickerEmits, type ColorPickerProps, type ColorPickerSlots, type ColorValueType, _default$6 as ConfigProvider, type ConfigProviderProps, type DataSourceItemObject, type DataSourceItemType, DateMonthPicker, _default$7 as DatePicker, type DatePickerEmits, type DatePickerProps, type DatePickerSlots, DateQuarterPicker, DateRangePicker, DateWeekPicker, DateYearPicker, Descriptions, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, type DescriptionsItemType, type DescriptionsProps, type DescriptionsRef, type DescriptionsSlots, DirectoryTree, type DirectoryTreeEmits, type ExpandAction as DirectoryTreeExpandAction, type DirectoryTreeProps, type DirectoryTreeSlots, Divider, type DividerProps, type DividerRef, Drawer, type DrawerEmits, type DrawerProps, type DrawerResizableConfig, type DrawerSlots, Dropdown, type DropdownArrowOptions, type DropdownEmits, type DropdownProps, type DropdownSlots, _default$8 as Empty, type EmptyProps, type EmptyRef, type EmptySlots, Flex, type FlexProps, type FlexSlots, FloatButton, FloatButtonGroup, type FloatButtonGroupProps, type FloatButtonGroupRef, type FloatButtonProps, type FloatButtonRef, Form, type FormConstructor, type FormEmits, type FormHookInstance, type FormInstance, InternalFormItem as FormItem, type FormItemEmits, type FormItemProps, type FormItemSlots, type FormProps, type FormSlots, type FormValues, _default_1 as Image, type ImageEmits, type PreviewConfig as ImagePreviewConfig, ImagePreviewGroup, type ImagePreviewGroupProps, type ImageProps, type ImageSlots, CompoundedInput as Input, type InputEmits, InputGroup, type InputGroupProps, InputNumber, type InputNumberEmits, type InputNumberProps, type VcInputNumberRef as InputNumberRef, type InputNumberStepContext, type ValueType as InputNumberValueType, InputOTP, type OTPEmits as InputOTPEmits, type OTPProps as InputOTPProps, type OTPSlots as InputOTPSlots, InputPassword, type PasswordProps as InputPasswordProps, type InputPasswordRef, type InputProps, type InputRef, InputSearch, type SearchProps as InputSearchProps, type InputSearchRef, type InputSlots, type InputTextAreaRef, type KeyWise, type KeyWiseTransferItem, Layout, LayoutContent, LayoutFooter, LayoutHeader, type BasicProps as LayoutProps, LayoutSider, type LegacyButtonType, type ListStyle, Listy, type ListyClassNames, type ListyProps, type ListyRef, type ListyScrollToConfig, type ListyStyles, _default$9 as Masonry, type MasonryEmits, type MasonryProps, type MasonryRef, type MasonrySlots, type MentionPlacement, Mentions, type MentionsClassNamesType, type MentionsEmits, Option$1 as MentionsOption, type MentionsOptionProps, type MentionsProps, type MentionsRef, type MentionsSlots, type MentionsStylesType, _default$10 as Menu, MenuDivider, type MenuEmits, type MenuInfo, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, type MenuItemType, type MenuProps, type MenuRef, type MenuSlots, type MenuTheme, type ArgsProps as MessageArgsProps, _default$11 as Modal, type ModalEmits, type ModalFuncProps, type ModalLocale, type ModalProps, type ModalSlots, type MonthPickerProps, type ArgsProps$1 as NotificationArgsProps, Pagination, type PaginationClassNamesType, type PaginationComponents, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, type PaginationProps, type PaginationSizeChangerProps, type PaginationSlots, type PaginationStylesType, Popconfirm, type PopconfirmEmits, type PopconfirmProps, type PopconfirmSlots, Popover, type PopoverEmits, type PopoverProps, type PopoverRef, type PopoverSlots, Progress, type ProgressProps, QRCode, type QRCodeEmits, type QRCodeProps, type QRCodeRef, InternalRadio as Radio, RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupEmits, type RadioGroupOptionType, type RadioGroupProps, type RadioGroupSlots, type RadioOptionType, type RadioProps, type RadioSlots, type RangePickerProps, Rate, type RateEmits, type RateProps, type RenderResult, type RenderResultObject, _default$12 as Result, type ResultProps, type ResultRef, type ResultSlots, type ResultStatusType, Row, type RowProps, type Rule, type RuleObject, type RuleRender, type RuleType, Segmented, type SegmentedEmits, type SegmentedOptions, type SegmentedProps, type SegmentedSlots, Select, type SelectAllLabel, type SelectEmits, type SelectInfo, SelectOptGroup, SelectOption, type SelectProps, type SelectSlots, type SelectValue, type SiderProps, SkeletonWithSubComponents as Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, SkeletonNode, type SkeletonProps, type SkeletonRef, Slider, type SliderEmits, type SliderProps, type SliderRef, Space, SpaceAddon, SpaceCompact, type SpaceCompactProps, type SpaceCompactRef, type SpaceProps, type SpaceSize, type SpaceSlots, _default$13 as Spin, type SpinProps, type SpinRef, type SpinSlots, Splitter, type SplitterEmits, SplitterPanel, type SplitterProps, type SplitterRef, type SplitterSlots, _default$14 as Statistic, type StatisticProps, type StatisticRef, StatisticTimer, type StatisticTimerProps, type StepItem, Steps, type StepsEmits, type StepsProps, type StepsSlots, SubMenu, type SubMenuProps, Switch, type SwitchEmits, type SwitchProps, type SwitchSize, type SwitchSlots, TabPane, type TabPaneProps, _default$15 as Table, type TableClassNamesType, Column as TableColumn, ColumnGroup as TableColumnGroup, type ColumnType as TableColumnType, type ColumnsType as TableColumnsType, type DataIndex as TableDataIndex, type TableEmits, type FilterDropdownProps as TableFilterDropdownProps, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type SortOrder as TableSortOrder, type SorterResult as TableSorterResult, type TableStylesType, Summary as TableSummary, SummaryCell as TableSummaryCell, SummaryRow as TableSummaryRow, Tabs, type TabsEmits, type TabsProps, type TabsRef, type TabsSlots, Tag, type TagProps, type TagSlots, InternalTextArea as TextArea, type TextAreaProps, type TextAreaRef, _default$16 as TimePicker, type TimePickerEmits, type TimePickerLocale, type TimePickerProps, type TimePickerSlots, TimeRangePicker, type TimeRangePickerEmits, type TimeRangePickerProps, type TimeRangePickerSlots, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemSlots, type TimelineItemType, type TimelineProps, _default$17 as Tooltip, type TooltipAlignConfig, type TooltipEmits, type TooltipPlacement, type TooltipProps, type TooltipRef, type TooltipSlots, Tour, type TourEmits, type TourLocale, type TourProps, type TourSlots, type TourStepItem, type TourStylesType, InternalTransfer as Transfer, type TransferClassNamesType, type TransferCustomListBodyProps, type TransferDirection, type TransferEmits, type TransferItem, type TransferKey, type TransferListBodyProps, type TransferListProps, type TransferLocale, type TransferOperationProps, type PaginationType as TransferPaginationType, type TransferProps, type TransferRef, type TransferRender, type TransferSearchEmits, type TransferSearchOption, type TransferSearchProps, type TransferSearchSlots, type TransferSlots, type TransferStylesType, Tree, type DataNode as TreeDataNode, type TreeEmits, type TreeInstance, type TreeProps, TreeSelect, type TreeSelectEmits, type TreeSelectNode, type TreeSelectProps, type TreeSelectSlots, type TreeSlots, type UseTreeConfig as TreeUseTreeConfig, Typography, type BlockProps as TypographyBaseProps, TypographyLink, type LinkProps as TypographyLinkProps, TypographyParagraph, type ParagraphProps as TypographyParagraphProps, TypographyText, type TextProps as TypographyTextProps, TypographyTitle, type TitleProps as TypographyTitleProps, UniqueProvider, Upload, type UploadChangeParam, UploadDragger, type DraggerProps as UploadDraggerProps, type UploadEmits, type UploadFile, type UploadProps, type UploadRef, type UploadSlots, Watermark, type WatermarkContent, type WatermarkEmits, type WatermarkFont, type WatermarkProps, type WatermarkRef, type WatermarkSlots, type WatermarkText, type WeekPickerProps, staticMethods as message, staticMethods$1 as notification, useExportConfig as useConfig, useForm, useFormInstance, useLayoutSider, useMessage, useModal, useNotification, useTree };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useScopeIdOnElement } from "../../_util/hooks/useScopeId.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
3
4
|
import { devUseWarning, isDev } from "../../_util/warning.js";
|
|
4
5
|
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
@@ -22,7 +23,7 @@ import { TIME } from "./constant.js";
|
|
|
22
23
|
import useComponents from "./useComponents.js";
|
|
23
24
|
import useSuffix from "./useSuffix.js";
|
|
24
25
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
25
|
-
import { clsx } from "@v-c/util";
|
|
26
|
+
import { clsx, merge } from "@v-c/util";
|
|
26
27
|
import { SwapRightOutlined } from "@antdv-next/icons";
|
|
27
28
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
28
29
|
import { RangePicker } from "@v-c/picker";
|
|
@@ -53,15 +54,13 @@ function generateRangePicker(generateConfig) {
|
|
|
53
54
|
const popupStyle = computed(() => props.popupStyle);
|
|
54
55
|
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType.value, classes, styles, popupClassName, popupStyle, mergedProps, computed(() => contextStyle?.value ?? null));
|
|
55
56
|
const innerRef = shallowRef();
|
|
57
|
+
useScopeIdOnElement(() => innerRef.value?.nativeElement);
|
|
56
58
|
const [variant, enableVariantCls] = useVariants("rangePicker", customVariant, bordered);
|
|
57
59
|
const rootCls = useCSSVarCls(prefixCls);
|
|
58
60
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
59
61
|
const mergedRootClassName = computed(() => clsx(hashId.value, cssVarCls.value, rootCls.value, rootClass.value));
|
|
60
62
|
const [contextLocale] = useLocale("DatePicker", locale);
|
|
61
|
-
const locale$1 = computed(() => ({
|
|
62
|
-
...contextLocale?.value,
|
|
63
|
-
...props.locale ?? {}
|
|
64
|
-
}));
|
|
63
|
+
const locale$1 = computed(() => merge(contextLocale?.value, props.locale || {}));
|
|
65
64
|
const [zIndex] = useZIndex("DatePicker", computed(() => mergedStyles.value?.popup?.root?.zIndex));
|
|
66
65
|
const triggerChange = (dates, dateStrings) => {
|
|
67
66
|
emit("update:value", dates);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useScopeIdOnElement } from "../../_util/hooks/useScopeId.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
3
4
|
import { devUseWarning, isDev } from "../../_util/warning.js";
|
|
4
5
|
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
@@ -22,7 +23,7 @@ import { MONTH, MONTHPICKER, QUARTER, QUARTERPICKER, TIME, TIMEPICKER, WEEK, WEE
|
|
|
22
23
|
import useComponents from "./useComponents.js";
|
|
23
24
|
import useSuffix from "./useSuffix.js";
|
|
24
25
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
25
|
-
import { clsx } from "@v-c/util";
|
|
26
|
+
import { clsx, merge } from "@v-c/util";
|
|
26
27
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
27
28
|
import Picker from "@v-c/picker";
|
|
28
29
|
//#region src/date-picker/generatePicker/generateSinglePicker.tsx
|
|
@@ -53,6 +54,7 @@ function generatePicker(generateConfig) {
|
|
|
53
54
|
const popupStyle = computed(() => props.popupStyle);
|
|
54
55
|
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType, classes, styles, popupClassName, popupStyle, mergedProps, contextStyle);
|
|
55
56
|
const innerRef = shallowRef();
|
|
57
|
+
useScopeIdOnElement(() => innerRef.value?.nativeElement);
|
|
56
58
|
const [variant, enableVariantCls] = useVariants("datePicker", customVariant, bordered);
|
|
57
59
|
const rootCls = useCSSVarCls(prefixCls);
|
|
58
60
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
@@ -60,10 +62,7 @@ function generatePicker(generateConfig) {
|
|
|
60
62
|
const additionalProps = { showToday: true };
|
|
61
63
|
const mergedPicker = computed(() => props.picker || picker);
|
|
62
64
|
const [contextLocale] = useLocale("DatePicker", locale);
|
|
63
|
-
const locale$1 = computed(() => ({
|
|
64
|
-
...contextLocale?.value,
|
|
65
|
-
...props.locale ?? {}
|
|
66
|
-
}));
|
|
65
|
+
const locale$1 = computed(() => merge(contextLocale?.value, props.locale || {}));
|
|
67
66
|
const [zIndex] = useZIndex("DatePicker", computed(() => mergedStyles.value?.popup?.root?.zIndex));
|
|
68
67
|
const triggerChange = (date, dateStr) => {
|
|
69
68
|
emit("update:value", date);
|
|
@@ -71,7 +70,6 @@ function generatePicker(generateConfig) {
|
|
|
71
70
|
};
|
|
72
71
|
const handleCalendarChange = (date, dateStr, info) => {
|
|
73
72
|
emit("calendarChange", date, dateStr, info);
|
|
74
|
-
if (props.multiple && !props.needConfirm) triggerChange(date, dateStr);
|
|
75
73
|
if (picker === TIME && !props.multiple) {
|
|
76
74
|
const selectedDate = Array.isArray(date) ? date[0] : date;
|
|
77
75
|
if (selectedDate) emit("select", selectedDate);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useScopeIdAttrs } from "../_util/hooks/useScopeId.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
4
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
@@ -69,6 +70,7 @@ const FloatButtonGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
69
70
|
emit("openChange", nextOpen);
|
|
70
71
|
};
|
|
71
72
|
const groupRef = shallowRef();
|
|
73
|
+
const scopeIdAttrs = useScopeIdAttrs();
|
|
72
74
|
expose({ nativeElement: groupRef });
|
|
73
75
|
const handleDocClick = (event) => {
|
|
74
76
|
if (!clickTrigger.value) return;
|
|
@@ -180,7 +182,7 @@ const FloatButtonGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
180
182
|
"ariaLabel": props.ariaLabel
|
|
181
183
|
}), null)] });
|
|
182
184
|
};
|
|
183
|
-
return createVNode(GroupContextProvider, { "value": listContext.value }, { default: () => [createVNode("div", mergeProps(pureAttrs(attrs), {
|
|
185
|
+
return createVNode(GroupContextProvider, { "value": listContext.value }, { default: () => [createVNode("div", mergeProps(scopeIdAttrs, pureAttrs(attrs), {
|
|
184
186
|
"ref": groupRef,
|
|
185
187
|
"class": classNames(groupPrefixCls.value, hashId.value, cssVarCls.value, rootCls.value, contextClassName.value, mergedClassNames.value.root, props.rootClass, attrs.class, {
|
|
186
188
|
[`${groupPrefixCls.value}-rtl`]: direction.value === "rtl",
|
|
@@ -4,7 +4,7 @@ import { unit } from "@antdv-next/cssinjs";
|
|
|
4
4
|
const genFloatButtonStyle = (token) => {
|
|
5
5
|
const { componentCls, floatButtonSize, iconCls, antCls, floatButtonIconSize } = token;
|
|
6
6
|
const [varName, varRef] = genCssVar(antCls, "float-btn");
|
|
7
|
-
const [, buttonVarRef] = genCssVar(antCls, "btn");
|
|
7
|
+
const [buttonVarName, buttonVarRef] = genCssVar(antCls, "btn");
|
|
8
8
|
const getProgressBackground = (backgroundColor) => [`linear-gradient(${backgroundColor}, ${backgroundColor})`, `conic-gradient(${token.colorPrimary} ${varRef("progress", "0turn")}, ${token.colorBorderSecondary} 0)`].join(", ");
|
|
9
9
|
const badgeCls = `${componentCls}-badge`;
|
|
10
10
|
const R = Math.SQRT2;
|
|
@@ -36,7 +36,7 @@ const genFloatButtonStyle = (token) => {
|
|
|
36
36
|
"&:empty": { display: "none" },
|
|
37
37
|
[`${componentCls}-icon`]: { lineHeight: 1 },
|
|
38
38
|
[`&${antCls}-btn${componentCls}-progress`]: {
|
|
39
|
-
|
|
39
|
+
[buttonVarName("border-width")]: unit(token.lineWidthBold),
|
|
40
40
|
borderColor: "transparent",
|
|
41
41
|
backgroundImage: getProgressBackground(buttonVarRef("bg-color")),
|
|
42
42
|
backgroundOrigin: "border-box",
|
|
@@ -53,7 +53,7 @@ const ItemHolder = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
|
|
|
53
53
|
"style": style,
|
|
54
54
|
"ref": itemRef
|
|
55
55
|
}, [createVNode(Row, mergeProps({ "class": `${itemPrefixCls.value}-row` }, restAttrs), { default: () => [createVNode(FormItemLabel, mergeProps(props, {
|
|
56
|
-
"htmlFor": props.htmlFor
|
|
56
|
+
"htmlFor": props.htmlFor === void 0 ? fieldId : props.htmlFor,
|
|
57
57
|
"requiredMark": formContext.value?.requiredMark,
|
|
58
58
|
"required": required ?? isRequired,
|
|
59
59
|
"prefixCls": prefixCls,
|
|
@@ -333,6 +333,7 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
333
333
|
return renderLayout(filterEmpty(slots.default?.() ?? []), fieldId.value, isRequired.value);
|
|
334
334
|
};
|
|
335
335
|
function renderLayout(baseChildren, currentFieldId, isRequiredMark) {
|
|
336
|
+
let controlId;
|
|
336
337
|
if (Array.isArray(baseChildren) && baseChildren.length === 1 && isVNode(baseChildren[0])) {
|
|
337
338
|
const child = baseChildren[0];
|
|
338
339
|
const childProps = child.props || {};
|
|
@@ -369,6 +370,7 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
369
370
|
}
|
|
370
371
|
if (itemErrors.length > 0) newChildProps["aria-invalid"] = "true";
|
|
371
372
|
if (props.required ?? isRequiredMark) newChildProps["aria-required"] = "true";
|
|
373
|
+
controlId = newChildProps.id;
|
|
372
374
|
baseChildren = [createVNode(child, newChildProps)];
|
|
373
375
|
}
|
|
374
376
|
if (props.noStyle && !props.hidden) return createVNode(StatusProvider, {
|
|
@@ -391,7 +393,9 @@ const InternalFormItem = /* @__PURE__ */ defineComponent((props, { slots, attrs
|
|
|
391
393
|
title: tooltipSlotValue
|
|
392
394
|
};
|
|
393
395
|
else mergedTooltip = tooltipSlotValue;
|
|
396
|
+
const mergedHtmlFor = props.htmlFor === void 0 ? controlId ?? currentFieldId : props.htmlFor;
|
|
394
397
|
return createVNode(ItemHolder, mergeProps(omit(props, ["preserve"]), {
|
|
398
|
+
"htmlFor": mergedHtmlFor,
|
|
395
399
|
"tooltip": mergedTooltip,
|
|
396
400
|
"label": getSlotPropsFnRun(slots, props, "label"),
|
|
397
401
|
"extra": getSlotPropsFnRun(slots, props, "extra"),
|
package/dist/form/context.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare function useFormItemPrefixContext(): Ref<{
|
|
|
71
71
|
prefixCls: string;
|
|
72
72
|
}>;
|
|
73
73
|
declare function useVariantContextProvider(variant: Ref<Variant | undefined>): void;
|
|
74
|
-
declare function useVariantContext(): Ref<"
|
|
74
|
+
declare function useVariantContext(): Ref<"outlined" | "filled" | "borderless" | "underlined" | undefined, "outlined" | "filled" | "borderless" | "underlined" | undefined>;
|
|
75
75
|
interface FormItemStatusContextProps {
|
|
76
76
|
isFormItemInput?: boolean;
|
|
77
77
|
status?: ValidateStatus;
|
|
@@ -43,10 +43,10 @@ declare function usePreviewConfig<T extends PreviewConfig | GroupPreviewConfig>(
|
|
|
43
43
|
readonly zIndex?: number;
|
|
44
44
|
readonly getContainer?: import("@v-c/portal/dist/Portal.js").PortalProps["getContainer"];
|
|
45
45
|
readonly closeIcon?: import("@v-c/util").VueNode | boolean | null;
|
|
46
|
-
readonly
|
|
46
|
+
readonly icons?: import("@v-c/image/dist/Preview/index.js").OperationIcons;
|
|
47
47
|
readonly src?: string;
|
|
48
48
|
readonly alt?: string;
|
|
49
|
-
readonly
|
|
49
|
+
readonly motionName?: string;
|
|
50
50
|
readonly countRender?: (current: number, total: number) => import("@v-c/util").VueNode;
|
|
51
51
|
readonly scaleStep?: number;
|
|
52
52
|
readonly minScale?: number;
|