antdv-next 1.7.0 → 1.8.0
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/useMergeSemantic.js +2 -2
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +11 -1
- package/dist/_util/vueNode.js +17 -1
- package/dist/affix/index.js +12 -9
- package/dist/alert/Alert.js +10 -5
- package/dist/anchor/Anchor.js +11 -6
- package/dist/anchor/style/index.js +2 -3
- package/dist/antd-with-locales.esm.js +16938 -18716
- package/dist/antd-with-locales.js +79 -86
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +15197 -17143
- package/dist/antd.js +80 -87
- package/dist/auto-complete/index.d.ts +2 -0
- package/dist/auto-complete/index.js +28 -23
- package/dist/avatar/Avatar.js +1 -1
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/avatar/AvatarGroup.js +3 -5
- package/dist/badge/style/ribbon.d.ts +1 -0
- package/dist/border-beam/style/index.d.ts +1 -0
- package/dist/breadcrumb/index.d.ts +8 -1
- package/dist/button/Button.js +31 -18
- package/dist/button/style/index.d.ts +1 -0
- package/dist/calendar/Header.js +4 -4
- package/dist/calendar/generateCalendar.d.ts +10 -10
- package/dist/calendar/index.d.ts +1 -1
- package/dist/card/Card.js +1 -1
- package/dist/card/index.d.ts +8 -1
- package/dist/card/style/index.js +3 -7
- package/dist/carousel/index.js +3 -3
- package/dist/cascader/hooks/useIcons.js +3 -2
- package/dist/cascader/index.d.ts +9 -1
- package/dist/cascader/index.js +42 -34
- package/dist/cascader/style/panel.d.ts +1 -0
- package/dist/checkbox/Checkbox.js +5 -2
- package/dist/checkbox/Group.js +6 -6
- package/dist/collapse/Collapse.js +2 -2
- package/dist/color-picker/ColorPicker.js +15 -2
- package/dist/color-picker/components/ColorSlider.js +2 -2
- package/dist/color-picker/interface.d.ts +3 -0
- package/dist/color-picker/style/input.js +6 -11
- package/dist/components.d.ts +24 -24
- package/dist/components.js +1 -2
- package/dist/config-provider/context.d.ts +16 -11
- package/dist/config-provider/define.d.ts +2 -1
- package/dist/config-provider/index.js +9 -0
- package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -0
- package/dist/date-picker/generatePicker/generateRangePicker.js +23 -15
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -0
- package/dist/date-picker/generatePicker/generateSinglePicker.js +18 -14
- package/dist/date-picker/generatePicker/interface.d.ts +17 -5
- package/dist/date-picker/generatePicker/useComponents.d.ts +1 -14
- package/dist/date-picker/generatePicker/useSuffix.d.ts +12 -0
- package/dist/date-picker/generatePicker/useSuffix.js +11 -0
- package/dist/date-picker/style/index.d.ts +1 -0
- package/dist/date-picker/util.d.ts +1 -1
- package/dist/date-picker/util.js +4 -3
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/index.js +2 -2
- package/dist/divider/index.js +14 -4
- package/dist/drawer/index.js +2 -2
- package/dist/dropdown/dropdown.js +6 -6
- package/dist/dropdown/style/index.js +0 -6
- package/dist/empty/index.js +2 -1
- package/dist/empty/style/index.d.ts +1 -0
- package/dist/flex/index.js +2 -2
- package/dist/float-button/BackTop.js +2 -1
- package/dist/float-button/FloatButton.js +2 -2
- package/dist/float-button/FloatButtonGroup.js +2 -2
- package/dist/float-button/PurePanel.js +5 -5
- package/dist/form/Form.js +47 -16
- package/dist/form/FormItem/ItemHolder.d.ts +3 -18
- package/dist/form/FormItem/StatusProvider.js +2 -1
- package/dist/form/FormItem/index.d.ts +1 -0
- package/dist/form/FormItem/index.js +22 -9
- package/dist/form/FormItemInput.js +3 -4
- package/dist/form/FormItemLabel.js +8 -4
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useVariant.d.ts +14 -4
- package/dist/form/hooks/useVariant.js +24 -13
- package/dist/form/interface.d.ts +4 -1
- package/dist/form/style/index.js +1 -1
- package/dist/grid/hooks/useBreakpoint.js +12 -6
- package/dist/image/PreviewGroup.d.ts +9 -2
- package/dist/image/PreviewGroup.js +2 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
- package/dist/image/index.d.ts +3 -3
- package/dist/image/index.js +3 -3
- package/dist/index.d.ts +26 -24
- package/dist/index.js +1 -2
- package/dist/input/Input.js +4 -4
- package/dist/input/OTP/OTPInput.js +31 -30
- package/dist/input/OTP/index.js +10 -2
- package/dist/input/Password.js +7 -3
- package/dist/input/Search.js +5 -5
- package/dist/input/TextArea.js +4 -4
- package/dist/input/style/index.js +2 -15
- package/dist/input/style/otp.d.ts +1 -0
- package/dist/input/style/search.d.ts +1 -0
- package/dist/input/style/textarea.d.ts +1 -0
- package/dist/input-number/index.js +3 -3
- package/dist/input-number/style/index.d.ts +1 -0
- package/dist/layout/Sider.js +2 -2
- package/dist/layout/style/sider.d.ts +1 -0
- package/dist/listy/interface.d.ts +23 -4
- package/dist/listy/style/index.js +1 -0
- package/dist/locale/ar_EG.js +3 -1
- package/dist/locale/az_AZ.js +3 -1
- package/dist/locale/bg_BG.js +3 -1
- package/dist/locale/bn_BD.js +3 -1
- package/dist/locale/by_BY.js +3 -1
- package/dist/locale/ca_ES.js +3 -1
- package/dist/locale/cs_CZ.js +13 -9
- package/dist/locale/da_DK.js +3 -1
- package/dist/locale/de_DE.js +6 -2
- package/dist/locale/el_GR.js +3 -1
- package/dist/locale/en_GB.js +3 -1
- package/dist/locale/en_US.js +5 -2
- package/dist/locale/es_ES.js +3 -1
- package/dist/locale/et_EE.js +3 -1
- package/dist/locale/eu_ES.js +3 -1
- package/dist/locale/fa_IR.js +3 -1
- package/dist/locale/fi_FI.js +3 -1
- package/dist/locale/fr_BE.js +3 -1
- package/dist/locale/fr_CA.js +3 -1
- package/dist/locale/fr_FR.js +6 -2
- package/dist/locale/ga_IE.js +3 -1
- package/dist/locale/gl_ES.js +3 -1
- package/dist/locale/he_IL.js +3 -1
- package/dist/locale/hi_IN.js +3 -1
- package/dist/locale/hr_HR.js +3 -1
- package/dist/locale/hu_HU.js +3 -1
- package/dist/locale/hy_AM.js +5 -13
- package/dist/locale/id_ID.js +3 -1
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/is_IS.js +3 -1
- package/dist/locale/it_IT.js +6 -2
- package/dist/locale/ja_JP.js +3 -1
- package/dist/locale/ka_GE.js +3 -1
- package/dist/locale/kk_KZ.js +3 -1
- package/dist/locale/km_KH.js +3 -1
- package/dist/locale/kmr_IQ.js +3 -1
- package/dist/locale/kn_IN.js +3 -1
- package/dist/locale/ko_KR.js +3 -1
- package/dist/locale/ku_IQ.js +3 -1
- package/dist/locale/lt_LT.js +3 -1
- package/dist/locale/lv_LV.js +3 -1
- package/dist/locale/mk_MK.js +3 -1
- package/dist/locale/ml_IN.js +3 -1
- package/dist/locale/mn_MN.js +3 -1
- package/dist/locale/mr_IN.js +3 -1
- package/dist/locale/ms_MY.js +3 -1
- package/dist/locale/my_MM.js +3 -1
- package/dist/locale/nb_NO.js +3 -1
- package/dist/locale/ne_NP.js +4 -2
- package/dist/locale/nl_BE.js +3 -1
- package/dist/locale/nl_NL.js +3 -1
- package/dist/locale/pl_PL.js +3 -1
- package/dist/locale/pt_BR.js +3 -1
- package/dist/locale/pt_PT.js +3 -1
- package/dist/locale/ro_RO.js +3 -1
- package/dist/locale/ru_RU.js +3 -1
- package/dist/locale/si_LK.js +3 -1
- package/dist/locale/sk_SK.js +3 -1
- package/dist/locale/sl_SI.js +3 -1
- package/dist/locale/sq_AL.js +5 -13
- package/dist/locale/sr_RS.js +3 -1
- package/dist/locale/sv_SE.js +3 -1
- package/dist/locale/ta_IN.js +3 -1
- package/dist/locale/th_TH.js +3 -1
- package/dist/locale/tk_TK.js +3 -1
- package/dist/locale/tr_TR.js +3 -1
- package/dist/locale/uk_UA.js +3 -1
- package/dist/locale/ur_PK.js +3 -1
- package/dist/locale/uz_UZ.js +3 -1
- package/dist/locale/vi_VN.js +3 -1
- package/dist/locale/zh_CN.js +5 -2
- package/dist/locale/zh_HK.js +3 -1
- package/dist/locale/zh_TW.js +3 -1
- package/dist/mentions/index.js +4 -4
- package/dist/menu/MenuItem.js +7 -7
- package/dist/menu/SubMenu.js +5 -4
- package/dist/menu/menu.js +2 -2
- package/dist/message/PurePanel.js +2 -2
- package/dist/message/style/index.d.ts +1 -0
- package/dist/message/style/index.js +2 -1
- package/dist/modal/Modal.js +5 -5
- package/dist/modal/PurePanel.js +2 -2
- package/dist/modal/style/confirm.js +1 -1
- package/dist/notification/PurePanel.js +2 -2
- package/dist/notification/style/index.d.ts +3 -0
- package/dist/notification/style/index.js +4 -5
- package/dist/notification/style/placement.js +3 -6
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +6 -5
- package/dist/pagination/index.d.ts +2 -1
- package/dist/pagination/interface.d.ts +2 -2
- package/dist/pagination/style/index.js +15 -7
- package/dist/popconfirm/index.js +4 -3
- package/dist/popover/PurePanel.js +2 -2
- package/dist/popover/style/index.js +1 -0
- package/dist/progress/Circle.js +3 -3
- package/dist/progress/Line.js +2 -1
- package/dist/progress/progress.js +1 -1
- package/dist/qrcode/QrcodeStatus.js +2 -1
- package/dist/qrcode/index.js +2 -2
- package/dist/qrcode/style/index.js +0 -4
- package/dist/radio/radio.js +2 -2
- package/dist/rate/index.js +2 -2
- package/dist/select/index.d.ts +11 -3
- package/dist/select/index.js +55 -38
- package/dist/select/style/index.d.ts +1 -0
- package/dist/select/useIcons.d.ts +23 -8
- package/dist/select/useIcons.js +34 -13
- package/dist/select/useShowArrow.d.ts +2 -3
- package/dist/select/useShowArrow.js +3 -5
- package/dist/skeleton/Paragraph.js +2 -2
- package/dist/skeleton/Skeleton.js +2 -2
- package/dist/skeleton/Title.js +2 -2
- package/dist/slider/index.d.ts +6 -1
- package/dist/slider/index.js +7 -5
- package/dist/space/Item.d.ts +1 -0
- package/dist/space/Item.js +6 -2
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.js +1 -0
- package/dist/space/style/addon.d.ts +1 -0
- package/dist/space/style/compact.d.ts +1 -0
- package/dist/space/style/index.js +8 -2
- package/dist/spin/Indicator/index.js +5 -1
- package/dist/splitter/SplitBar.js +2 -1
- package/dist/splitter/Splitter.js +10 -4
- package/dist/splitter/interface.d.ts +1 -0
- package/dist/statistic/Number.js +7 -1
- package/dist/statistic/Statistic.d.ts +3 -0
- package/dist/statistic/Statistic.js +2 -1
- package/dist/steps/index.js +16 -8
- package/dist/switch/index.js +10 -4
- package/dist/table/InternalTable.js +22 -7
- package/dist/table/hooks/useFilter/index.js +5 -2
- package/dist/table/hooks/usePagination.d.ts +2 -1
- package/dist/table/hooks/usePagination.js +6 -3
- package/dist/table/index.d.ts +2 -2
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/index.js +19 -11
- package/dist/tabs/style/index.js +2 -6
- package/dist/tag/index.d.ts +1 -1
- package/dist/tag/index.js +13 -5
- package/dist/theme/getDesignToken.js +2 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/time-picker/index.d.ts +16 -9
- package/dist/time-picker/index.js +31 -84
- package/dist/timeline/Timeline.js +16 -10
- package/dist/tooltip/PurePanel.js +2 -2
- package/dist/tooltip/index.js +3 -6
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/index.js +2 -3
- package/dist/tour/panelRender.js +4 -4
- package/dist/transfer/Section.js +2 -2
- package/dist/tree/DirectoryTree.d.ts +19 -7
- package/dist/tree/DirectoryTree.js +2 -2
- package/dist/tree/Tree.d.ts +73 -58
- package/dist/tree/Tree.js +2 -2
- package/dist/tree/index.d.ts +8 -5
- package/dist/tree/index.js +4 -3
- package/dist/tree/style/index.js +6 -1
- package/dist/tree/utils/iconUtil.js +1 -1
- package/dist/tree-select/index.d.ts +32 -2
- package/dist/tree-select/index.js +75 -75
- package/dist/upload/Upload.js +2 -2
- package/dist/upload/utils.js +8 -3
- package/dist/version/token.json +1 -1
- package/dist/watermark/useWatermark.d.ts +1 -7
- package/dist/watermark/useWatermark.js +1 -7
- package/package.json +20 -20
- package/web-tags.json +85 -29
- package/web-types.json +242 -157
- package/dist/date-picker/generatePicker/SuffixIcon.d.ts +0 -12
- package/dist/date-picker/generatePicker/SuffixIcon.js +0 -51
- package/dist/form/style/fallbackCmp.d.ts +0 -14
- package/dist/form/style/fallbackCmp.js +0 -13
|
@@ -98,6 +98,8 @@ interface AutoCompleteEmitsProps {
|
|
|
98
98
|
}
|
|
99
99
|
interface AutoCompleteSlots {
|
|
100
100
|
default?: () => any;
|
|
101
|
+
suffix?: SelectSlots['suffix'];
|
|
102
|
+
/** @deprecated Please use `suffix` slot instead. */
|
|
101
103
|
suffixIcon?: SelectSlots['suffixIcon'];
|
|
102
104
|
prefix?: SelectSlots['prefix'];
|
|
103
105
|
tagRender?: SelectSlots['tagRender'];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
|
-
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
4
|
+
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import genPurePanel from "../_util/PurePanel.js";
|
|
6
|
+
import { getCustomSuffix } from "../select/useIcons.js";
|
|
6
7
|
import Select from "../select/index.js";
|
|
7
8
|
import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps, shallowRef } from "vue";
|
|
8
9
|
import { clsx } from "@v-c/util";
|
|
9
10
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
10
|
-
import { omit } from "es-toolkit";
|
|
11
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
11
12
|
import { toArray } from "es-toolkit/compat";
|
|
12
13
|
import { Option } from "@v-c/select";
|
|
13
14
|
//#region src/auto-complete/index.tsx
|
|
@@ -28,7 +29,9 @@ const omitKeys = [
|
|
|
28
29
|
"styles",
|
|
29
30
|
"popupRender",
|
|
30
31
|
"onOpenChange",
|
|
31
|
-
"onDropdownVisibleChange"
|
|
32
|
+
"onDropdownVisibleChange",
|
|
33
|
+
"suffix",
|
|
34
|
+
"suffixIcon"
|
|
32
35
|
];
|
|
33
36
|
const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
34
37
|
const { prefixCls } = useComponentBaseConfig("select", props);
|
|
@@ -54,14 +57,16 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
54
57
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
55
58
|
return () => {
|
|
56
59
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
57
|
-
const forwardedAttrs = omit(restAttrs, ["onOpenChange", "onDropdownVisibleChange"]);
|
|
60
|
+
const forwardedAttrs = omit$1(restAttrs, ["onOpenChange", "onDropdownVisibleChange"]);
|
|
58
61
|
const childNodes = toArray(filterEmpty(slots.default?.() ?? []));
|
|
59
62
|
const hasSelectOptions = !!childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0]);
|
|
60
63
|
let customizeInput;
|
|
61
64
|
if (childNodes.length === 1 && isVNode(childNodes[0]) && childNodes[0].type !== Text && !isSelectOptionOrSelectOptGroup(childNodes[0])) [customizeInput] = childNodes;
|
|
62
65
|
const getInputElement = customizeInput ? () => customizeInput : void 0;
|
|
63
66
|
const customizeInputPlaceholder = customizeInput?.props?.placeholder;
|
|
64
|
-
const forwardedSlots = Object.fromEntries(Object.entries(slots).filter(([key]) => key !== "default"));
|
|
67
|
+
const forwardedSlots = Object.fromEntries(Object.entries(slots).filter(([key]) => key !== "default" && key !== "suffix" && key !== "suffixIcon"));
|
|
68
|
+
const customSuffix = getCustomSuffix(slots, props);
|
|
69
|
+
const mergedSuffix = customSuffix !== void 0 ? customSuffix : getSlotPropsFnRun(slots, props, "suffixIcon", false) ?? null;
|
|
65
70
|
let optionChildren = [];
|
|
66
71
|
if (hasSelectOptions) optionChildren = childNodes;
|
|
67
72
|
else if (props.dataSource) optionChildren = props.dataSource.map((item) => {
|
|
@@ -91,10 +96,12 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
91
96
|
dropdownClassName: "classes.popup.root",
|
|
92
97
|
popupClassName: "classes.popup.root",
|
|
93
98
|
dropdownRender: "popupRender",
|
|
94
|
-
dataSource: "options"
|
|
99
|
+
dataSource: "options",
|
|
100
|
+
suffixIcon: "suffix"
|
|
95
101
|
}).forEach(([oldProp, newProp]) => {
|
|
96
102
|
warning.deprecated(!props[oldProp], oldProp, newProp);
|
|
97
103
|
});
|
|
104
|
+
warning.deprecated(!slots.suffixIcon, "suffixIcon", "suffix");
|
|
98
105
|
}
|
|
99
106
|
const mergedPopupRender = props.popupRender ?? props.dropdownRender;
|
|
100
107
|
const mergedPopupMatchSelectWidth = props.popupMatchSelectWidth ?? props.dropdownMatchSelectWidth;
|
|
@@ -127,8 +134,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
127
134
|
listItem: mergedStyles.value.popup?.listItem
|
|
128
135
|
}
|
|
129
136
|
};
|
|
130
|
-
const selectProps = omit(props, omitKeys);
|
|
131
|
-
selectProps.allowClear = props.allowClear ?? false;
|
|
137
|
+
const selectProps = omit$1(props, omitKeys);
|
|
132
138
|
if (selectProps.placeholder === void 0 && customizeInputPlaceholder !== void 0) selectProps.placeholder = customizeInputPlaceholder;
|
|
133
139
|
return createVNode(Select, mergeProps(forwardedAttrs, selectProps, {
|
|
134
140
|
onSelect: (value, option) => {
|
|
@@ -188,7 +194,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
188
194
|
"popupRender": mergedPopupRender,
|
|
189
195
|
"popupMatchSelectWidth": mergedPopupMatchSelectWidth,
|
|
190
196
|
"mode": Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
|
|
191
|
-
"
|
|
197
|
+
"suffix": mergedSuffix,
|
|
192
198
|
"onOpenChange": mergedOnOpenChange
|
|
193
199
|
}, { "onUpdate:value": (value) => emit("update:value", value) }), {
|
|
194
200
|
default: () => [optionChildren],
|
|
@@ -260,6 +266,18 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
260
266
|
required: false,
|
|
261
267
|
default: void 0
|
|
262
268
|
},
|
|
269
|
+
suffix: {
|
|
270
|
+
type: [
|
|
271
|
+
Function,
|
|
272
|
+
String,
|
|
273
|
+
Number,
|
|
274
|
+
null,
|
|
275
|
+
Object,
|
|
276
|
+
Boolean
|
|
277
|
+
],
|
|
278
|
+
required: false,
|
|
279
|
+
default: void 0
|
|
280
|
+
},
|
|
263
281
|
suffixIcon: {
|
|
264
282
|
type: [
|
|
265
283
|
Function,
|
|
@@ -483,19 +501,6 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
483
501
|
required: false,
|
|
484
502
|
default: void 0
|
|
485
503
|
},
|
|
486
|
-
suffix: {
|
|
487
|
-
type: [
|
|
488
|
-
Object,
|
|
489
|
-
Function,
|
|
490
|
-
String,
|
|
491
|
-
Number,
|
|
492
|
-
null,
|
|
493
|
-
Boolean,
|
|
494
|
-
Array
|
|
495
|
-
],
|
|
496
|
-
required: false,
|
|
497
|
-
default: void 0
|
|
498
|
-
},
|
|
499
504
|
clearIcon: {
|
|
500
505
|
type: [
|
|
501
506
|
Object,
|
|
@@ -586,7 +591,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
586
591
|
const AutoComplete = InternalAutoComplete;
|
|
587
592
|
/* istanbul ignore next */
|
|
588
593
|
const PurePanel = genPurePanel(InternalAutoComplete, "popupAlign", (props) => {
|
|
589
|
-
return omit(props, ["visible"]);
|
|
594
|
+
return omit$1(props, ["visible"]);
|
|
590
595
|
});
|
|
591
596
|
AutoComplete.Option = Option;
|
|
592
597
|
AutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
package/dist/avatar/Avatar.js
CHANGED
|
@@ -66,7 +66,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, exp
|
|
|
66
66
|
return currentSize ? {
|
|
67
67
|
width: `${currentSize}px`,
|
|
68
68
|
height: `${currentSize}px`,
|
|
69
|
-
fontSize:
|
|
69
|
+
fontSize: hasIcon || children.length ? `${currentSize / 2}px` : "18px"
|
|
70
70
|
} : {};
|
|
71
71
|
};
|
|
72
72
|
const responsiveSizeStyle = responsiveSizeStyleFn();
|
|
@@ -11,7 +11,7 @@ interface AvatarContextType {
|
|
|
11
11
|
shape?: 'circle' | 'square';
|
|
12
12
|
}
|
|
13
13
|
declare function useAvatarContext(): Ref<{
|
|
14
|
-
size?: number |
|
|
14
|
+
size?: number | "default" | SizeType | {
|
|
15
15
|
xxxl?: number | undefined;
|
|
16
16
|
xxl?: number | undefined;
|
|
17
17
|
xl?: number | undefined;
|
|
@@ -22,7 +22,7 @@ declare function useAvatarContext(): Ref<{
|
|
|
22
22
|
};
|
|
23
23
|
shape?: "circle" | "square" | undefined;
|
|
24
24
|
}, AvatarContextType | {
|
|
25
|
-
size?: number |
|
|
25
|
+
size?: number | "default" | SizeType | {
|
|
26
26
|
xxxl?: number | undefined;
|
|
27
27
|
xxl?: number | undefined;
|
|
28
28
|
xl?: number | undefined;
|
|
@@ -33,6 +33,7 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, expo
|
|
|
33
33
|
});
|
|
34
34
|
const mergeCount = max?.count;
|
|
35
35
|
const numOfChildren = childrenWithProps.length;
|
|
36
|
+
let childrenToRender = childrenWithProps;
|
|
36
37
|
if (mergeCount && mergeCount < numOfChildren) {
|
|
37
38
|
const childrenShow = childrenWithProps.slice(0, mergeCount);
|
|
38
39
|
const childrenHidden = childrenWithProps.slice(mergeCount, numOfChildren);
|
|
@@ -50,15 +51,12 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, expo
|
|
|
50
51
|
"key": "avatar-popover-key",
|
|
51
52
|
"destroyOnHidden": true
|
|
52
53
|
}, popoverProps), { default: () => [createVNode(Avatar, { "style": mergeStyle }, { default: () => [`+${numOfChildren - mergeCount}`] })] }));
|
|
53
|
-
|
|
54
|
-
"class": cls,
|
|
55
|
-
"style": style
|
|
56
|
-
}), [childrenShow]);
|
|
54
|
+
childrenToRender = childrenShow;
|
|
57
55
|
}
|
|
58
56
|
return createVNode("div", mergeProps({ "ref": nativeElementRef }, restAttrs, {
|
|
59
57
|
"class": cls,
|
|
60
58
|
"style": style
|
|
61
|
-
}), [
|
|
59
|
+
}), [childrenToRender]);
|
|
62
60
|
};
|
|
63
61
|
}, {
|
|
64
62
|
props: {
|
|
@@ -2,6 +2,7 @@ import { SeedToken } from "../../theme/interface/seeds.js";
|
|
|
2
2
|
import { AliasToken } from "../../theme/interface/alias.js";
|
|
3
3
|
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
4
4
|
import "../../theme/interface/index.js";
|
|
5
|
+
import "../../theme/internal.js";
|
|
5
6
|
//#region src/badge/style/ribbon.d.ts
|
|
6
7
|
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
7
8
|
//#endregion
|
|
@@ -2,6 +2,7 @@ import { SeedToken } from "../../theme/interface/seeds.js";
|
|
|
2
2
|
import { AliasToken } from "../../theme/interface/alias.js";
|
|
3
3
|
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
4
4
|
import "../../theme/interface/index.js";
|
|
5
|
+
import "../../theme/internal.js";
|
|
5
6
|
//#region src/border-beam/style/index.d.ts
|
|
6
7
|
type ComponentToken = object;
|
|
7
8
|
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import _default, { BreadcrumbItemProps, SeparatorType } from "./BreadcrumbItem.js";
|
|
2
2
|
import _default$1 from "./BreadcrumbSeparator.js";
|
|
3
3
|
import Breadcrumb, { BreadcrumbEmits, BreadcrumbItemRenderContext, BreadcrumbProps, BreadcrumbRef, BreadcrumbSlots, ItemType } from "./Breadcrumb.js";
|
|
4
|
-
|
|
4
|
+
//#region src/breadcrumb/index.d.ts
|
|
5
|
+
type CompoundedBreadcrumb = typeof Breadcrumb & {
|
|
6
|
+
Item: typeof _default;
|
|
7
|
+
Separator: typeof _default$1;
|
|
8
|
+
};
|
|
9
|
+
declare const _default$2: CompoundedBreadcrumb;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { type BreadcrumbEmits, _default as BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbItemRenderContext, type ItemType as BreadcrumbItemType, type BreadcrumbProps, type BreadcrumbRef, _default$1 as BreadcrumbSeparator, type BreadcrumbSlots, type SeparatorType, _default$2 as default };
|
package/dist/button/Button.js
CHANGED
|
@@ -4,16 +4,17 @@ import { useCompactItemContext } from "../space/Compact.js";
|
|
|
4
4
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
6
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
7
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
7
8
|
import wave_default from "../_util/wave/index.js";
|
|
8
|
-
import { isTwoCNChar, isUnBorderedButtonVariant, spaceChildren } from "./buttonHelper.js";
|
|
9
|
+
import { _ButtonVariantTypes, isTwoCNChar, isUnBorderedButtonVariant, spaceChildren } from "./buttonHelper.js";
|
|
9
10
|
import IconWrapper from "./IconWrapper.js";
|
|
10
11
|
import DefaultLoadingIcon from "./DefaultLoadingIcon.js";
|
|
11
12
|
import style_default from "./style/index.js";
|
|
12
13
|
import compact_default from "./style/compact.js";
|
|
13
|
-
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch } from "vue";
|
|
14
|
+
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, toRef, watch } from "vue";
|
|
14
15
|
import { classNames } from "@v-c/util";
|
|
15
16
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
16
|
-
import { omit } from "es-toolkit";
|
|
17
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
17
18
|
import { toArray } from "es-toolkit/compat";
|
|
18
19
|
import useDelayState from "@v-c/util/dist/hooks/useDelayState";
|
|
19
20
|
//#region src/button/Button.tsx
|
|
@@ -48,15 +49,18 @@ const ButtonTypeMap = {
|
|
|
48
49
|
};
|
|
49
50
|
const InternalCompoundedButton = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
|
|
50
51
|
const mergedType = computed(() => props.type || "default");
|
|
51
|
-
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, loadingIcon: contextLoadingIcon, shape: contextShape, color: contextColor,
|
|
52
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, loadingIcon: contextLoadingIcon, shape: contextShape, color: contextColor, autoInsertSpace: contextAutoInsertSpace } = useComponentBaseConfig("button", props, [
|
|
52
53
|
"autoInsertSpace",
|
|
53
|
-
"variant",
|
|
54
54
|
"shape",
|
|
55
55
|
"color",
|
|
56
56
|
"loadingIcon"
|
|
57
57
|
], "btn");
|
|
58
58
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
59
59
|
const mergedShape = computed(() => props.shape || contextShape.value || "default");
|
|
60
|
+
const [contextVariant, , isVariantConfigured] = useVariant("button", toRef(() => props.variant), {
|
|
61
|
+
variants: _ButtonVariantTypes,
|
|
62
|
+
defaultVariant: "outlined"
|
|
63
|
+
});
|
|
60
64
|
const parsedColorVariant = computed(() => {
|
|
61
65
|
const { color, variant, type, danger } = props;
|
|
62
66
|
if (color && variant) return [color, variant];
|
|
@@ -66,9 +70,9 @@ const InternalCompoundedButton = /* @__PURE__ */ defineComponent((props, { slots
|
|
|
66
70
|
return colorVariantPair;
|
|
67
71
|
}
|
|
68
72
|
if (variant === "solid") return ["primary", variant];
|
|
69
|
-
if (contextColor?.value &&
|
|
70
|
-
if (contextVariant
|
|
71
|
-
return ["default",
|
|
73
|
+
if (contextColor?.value && isVariantConfigured.value) return [contextColor.value, contextVariant.value];
|
|
74
|
+
if (contextVariant.value === "solid") return ["primary", contextVariant.value];
|
|
75
|
+
return ["default", contextVariant.value];
|
|
72
76
|
});
|
|
73
77
|
const mergedColorVariant = computed(() => {
|
|
74
78
|
const [parsedColor, parsedVariant] = parsedColorVariant.value;
|
|
@@ -211,16 +215,25 @@ const InternalCompoundedButton = /* @__PURE__ */ defineComponent((props, { slots
|
|
|
211
215
|
else iconNode = defaultLoadingIconElement;
|
|
212
216
|
const mergedHref = props.href;
|
|
213
217
|
const htmlType = props.htmlType ?? "button";
|
|
214
|
-
if (mergedHref !== void 0)
|
|
215
|
-
|
|
216
|
-
"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
if (mergedHref !== void 0) {
|
|
219
|
+
const customTabIndex = attrs.tabindex ?? attrs.tabIndex;
|
|
220
|
+
return createVNode("a", mergeProps(omit$1(attrs, [
|
|
221
|
+
"class",
|
|
222
|
+
"style",
|
|
223
|
+
"tabindex",
|
|
224
|
+
"tabIndex"
|
|
225
|
+
]), {
|
|
226
|
+
"ref": buttonRef,
|
|
227
|
+
"class": [cls, { [`${prefixCls.value}-disabled`]: mergedDisabled.value }],
|
|
228
|
+
"style": fullStyle,
|
|
229
|
+
"href": mergedDisabled.value ? void 0 : mergedHref,
|
|
230
|
+
"onClick": handleClick,
|
|
231
|
+
"target": props.target,
|
|
232
|
+
"tabindex": mergedDisabled.value ? -1 : customTabIndex ?? 0,
|
|
233
|
+
"aria-disabled": mergedDisabled.value
|
|
234
|
+
}), [iconNode, kids]);
|
|
235
|
+
}
|
|
236
|
+
let buttonNodes = createVNode("button", mergeProps(omit$1(attrs, ["class", "style"]), {
|
|
224
237
|
"ref": buttonRef,
|
|
225
238
|
"type": htmlType,
|
|
226
239
|
"class": cls,
|
|
@@ -3,6 +3,7 @@ import { AliasToken } from "../../theme/interface/alias.js";
|
|
|
3
3
|
import { ComponentToken } from "./token.js";
|
|
4
4
|
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
5
5
|
import "../../theme/interface/index.js";
|
|
6
|
+
import "../../theme/internal.js";
|
|
6
7
|
//#region src/button/style/index.d.ts
|
|
7
8
|
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
8
9
|
//#endregion
|
package/dist/calendar/Header.js
CHANGED
|
@@ -3,7 +3,7 @@ import Select from "../select/index.js";
|
|
|
3
3
|
import { RadioButton, RadioGroup } from "../radio/index.js";
|
|
4
4
|
import { computed, createVNode, defineComponent, mergeProps, ref } from "vue";
|
|
5
5
|
import { clsx } from "@v-c/util";
|
|
6
|
-
import { omit } from "es-toolkit";
|
|
6
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
7
7
|
//#region src/calendar/Header.tsx
|
|
8
8
|
const YEAR_SELECT_OFFSET = 10;
|
|
9
9
|
const YEAR_SELECT_TOTAL = 20;
|
|
@@ -212,13 +212,13 @@ const CalendarHeader = /* @__PURE__ */ defineComponent((props) => {
|
|
|
212
212
|
"style": style,
|
|
213
213
|
"ref": divRef
|
|
214
214
|
}, [
|
|
215
|
-
createVNode(YearSelect, mergeProps(omit(sharedProps, ["onChange", "onModeChange"]), { "onChange": (value) => {
|
|
215
|
+
createVNode(YearSelect, mergeProps(omit$1(sharedProps, ["onChange", "onModeChange"]), { "onChange": (value) => {
|
|
216
216
|
onChange(value, "year");
|
|
217
217
|
} }), null),
|
|
218
|
-
mode === "month" ? createVNode(MonthSelect, mergeProps(omit(sharedProps, ["onChange", "onModeChange"]), { "onChange": (value) => {
|
|
218
|
+
mode === "month" ? createVNode(MonthSelect, mergeProps(omit$1(sharedProps, ["onChange", "onModeChange"]), { "onChange": (value) => {
|
|
219
219
|
onChange(value, "month");
|
|
220
220
|
} }), null) : null,
|
|
221
|
-
createVNode(ModeSwitch, mergeProps(omit(sharedProps, ["onChange", "onModeChange"]), { "onModeChange": onModeChange }), null)
|
|
221
|
+
createVNode(ModeSwitch, mergeProps(omit$1(sharedProps, ["onChange", "onModeChange"]), { "onModeChange": onModeChange }), null)
|
|
222
222
|
]);
|
|
223
223
|
};
|
|
224
224
|
}, {
|
|
@@ -64,31 +64,31 @@ interface CalendarRef {
|
|
|
64
64
|
nativeElement: HTMLDivElement;
|
|
65
65
|
}
|
|
66
66
|
declare const calendarProps: string[];
|
|
67
|
-
interface CalendarSlots {
|
|
67
|
+
interface CalendarSlots<DateType = AnyObject> {
|
|
68
68
|
dateFullCellRender?: (ctx: {
|
|
69
|
-
date:
|
|
69
|
+
date: DateType;
|
|
70
70
|
}) => any;
|
|
71
71
|
dateCellRender?: (ctx: {
|
|
72
|
-
date:
|
|
72
|
+
date: DateType;
|
|
73
73
|
}) => any;
|
|
74
74
|
monthFullCellRender?: (ctx: {
|
|
75
|
-
date:
|
|
75
|
+
date: DateType;
|
|
76
76
|
}) => any;
|
|
77
77
|
monthCellRender?: (ctx: {
|
|
78
|
-
date:
|
|
78
|
+
date: DateType;
|
|
79
79
|
}) => any;
|
|
80
80
|
cellRender?: (ctx: {
|
|
81
|
-
date:
|
|
81
|
+
date: DateType;
|
|
82
82
|
info: any;
|
|
83
83
|
}) => any;
|
|
84
84
|
fullCellRender?: (ctx: {
|
|
85
|
-
date:
|
|
85
|
+
date: DateType;
|
|
86
86
|
info: any;
|
|
87
87
|
}) => any;
|
|
88
88
|
headerRender?: (config: {
|
|
89
|
-
value:
|
|
89
|
+
value: DateType;
|
|
90
90
|
type: CalendarMode;
|
|
91
|
-
onChange: (date:
|
|
91
|
+
onChange: (date: DateType) => void;
|
|
92
92
|
onTypeChange: (type: CalendarMode) => void;
|
|
93
93
|
}) => any;
|
|
94
94
|
[key: string]: any;
|
|
@@ -105,6 +105,6 @@ interface CalendarEmitsProps<DateType = AnyObject> {
|
|
|
105
105
|
onPanelChange?: CalendarEmits<DateType>['panelChange'];
|
|
106
106
|
onSelect?: CalendarEmits<DateType>['select'];
|
|
107
107
|
}
|
|
108
|
-
declare function generateCalendar<DateType extends AnyObject>(generateConfig: GenerateConfig<DateType>): import("vue").DefineSetupFnComponent<CalendarProps<DateType>, CalendarEmits<DateType>, SlotsType<CalendarSlots
|
|
108
|
+
declare function generateCalendar<DateType extends AnyObject>(generateConfig: GenerateConfig<DateType>): import("vue").DefineSetupFnComponent<CalendarProps<DateType>, CalendarEmits<DateType>, SlotsType<CalendarSlots<DateType>>, CalendarProps<DateType>, import("vue").PublicProps>;
|
|
109
109
|
//#endregion
|
|
110
110
|
export { CalendarClassNamesType, CalendarEmits, CalendarEmitsProps, CalendarMode, CalendarProps, CalendarRef, CalendarSemanticClassNames, CalendarSemanticName, CalendarSemanticStyles, CalendarSlots, CalendarStylesType, HeaderRender, SelectInfo, calendarProps, generateCalendar as default };
|
package/dist/calendar/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import generateCalendar, { CalendarEmits, CalendarMode, CalendarProps, CalendarRef, CalendarSlots } from "./generateCalendar.js";
|
|
2
2
|
import { Dayjs } from "dayjs";
|
|
3
3
|
//#region src/calendar/index.d.ts
|
|
4
|
-
declare const Calendar: import("vue").DefineSetupFnComponent<CalendarProps<Dayjs>, CalendarEmits<Dayjs>, import("vue").SlotsType<CalendarSlots
|
|
4
|
+
declare const Calendar: import("vue").DefineSetupFnComponent<CalendarProps<Dayjs>, CalendarEmits<Dayjs>, import("vue").SlotsType<CalendarSlots<Dayjs>>, CalendarProps<Dayjs>, import("vue").PublicProps>;
|
|
5
5
|
type CalendarType = typeof Calendar & {
|
|
6
6
|
generateCalendar: typeof generateCalendar;
|
|
7
7
|
};
|
package/dist/card/Card.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useSize } from "../config-provider/hooks/useSize.js";
|
|
|
4
4
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
6
|
import { isRenderable } from "../_util/is.js";
|
|
7
|
-
import skeleton_default from "../skeleton/index.js";
|
|
8
7
|
import useVariant from "../form/hooks/useVariant.js";
|
|
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
11
|
import { computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
package/dist/card/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import Card, { CardEmits, CardProps, 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
|
|
5
|
+
type CompoundedCard = typeof Card & {
|
|
6
|
+
Grid: typeof CardGrid;
|
|
7
|
+
Meta: typeof CardMeta;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: CompoundedCard;
|
|
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 };
|
package/dist/card/style/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { mergeToken } from "../../theme/internal.js";
|
|
|
4
4
|
import { unit } from "@antdv-next/cssinjs";
|
|
5
5
|
//#region src/card/style/index.ts
|
|
6
6
|
const genCardHeadStyle = (token) => {
|
|
7
|
-
const { antCls,
|
|
7
|
+
const { antCls, headerHeight, headerPadding, tabsMarginBottom } = token;
|
|
8
8
|
return {
|
|
9
9
|
display: "flex",
|
|
10
10
|
justifyContent: "center",
|
|
@@ -28,10 +28,7 @@ const genCardHeadStyle = (token) => {
|
|
|
28
28
|
display: "inline-block",
|
|
29
29
|
flex: 1,
|
|
30
30
|
...textEllipsis,
|
|
31
|
-
[`
|
|
32
|
-
> ${componentCls}-typography,
|
|
33
|
-
> ${componentCls}-typography-edit-content
|
|
34
|
-
`]: {
|
|
31
|
+
[`> ${antCls}-typography`]: {
|
|
35
32
|
insetInlineStart: 0,
|
|
36
33
|
marginTop: 0,
|
|
37
34
|
marginBottom: 0
|
|
@@ -42,8 +39,7 @@ const genCardHeadStyle = (token) => {
|
|
|
42
39
|
marginBottom: tabsMarginBottom,
|
|
43
40
|
color: token.colorText,
|
|
44
41
|
fontWeight: 400,
|
|
45
|
-
fontSize: token.fontSize
|
|
46
|
-
"&-bar": { borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}` }
|
|
42
|
+
fontSize: token.fontSize
|
|
47
43
|
}
|
|
48
44
|
};
|
|
49
45
|
};
|
package/dist/carousel/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import style_default, { DotDuration } from "./style/index.js";
|
|
|
8
8
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, onMounted, shallowRef, watch } from "vue";
|
|
9
9
|
import { clsx } from "@v-c/util";
|
|
10
10
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
11
|
-
import { omit } from "es-toolkit";
|
|
11
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
12
12
|
import SlickCarousel from "@v-c/slick";
|
|
13
13
|
//#region src/carousel/index.tsx
|
|
14
14
|
function _isSlot(s) {
|
|
@@ -111,7 +111,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
111
111
|
};
|
|
112
112
|
return () => {
|
|
113
113
|
const { dots, rootClass, autoplay, autoplaySpeed, id, arrows, draggable, waitForAnimate } = props;
|
|
114
|
-
const otherProps = omit(props, omitKeys);
|
|
114
|
+
const otherProps = omit$1(props, omitKeys);
|
|
115
115
|
const enableDots = !!dots;
|
|
116
116
|
const dsClass = clsx(dotsClass, `${dotsClass}-${mergedDotPlacement.value}`, typeof dots === "boolean" ? false : dots?.class);
|
|
117
117
|
const { className: customClassName, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
@@ -139,7 +139,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
139
139
|
if (count.value !== childNodes.length) count.value = childNodes.length;
|
|
140
140
|
const prevArrow = getSlotPropsFnRun(slots, props, "prevArrow");
|
|
141
141
|
const nextArrow = getSlotPropsFnRun(slots, props, "nextArrow");
|
|
142
|
-
return createVNode("div", mergeProps({ "ref": nativeElementRef }, omit(restAttrs, ignoredAttrKeys), {
|
|
142
|
+
return createVNode("div", mergeProps({ "ref": nativeElementRef }, omit$1(restAttrs, ignoredAttrKeys), {
|
|
143
143
|
"class": className,
|
|
144
144
|
"id": id,
|
|
145
145
|
"style": dotDurationStyle
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cloneIfVNode } from "../../_util/vueNode.js";
|
|
1
2
|
import { createVNode } from "vue";
|
|
2
3
|
import { LeftOutlined, LoadingOutlined, RightOutlined } from "@antdv-next/icons";
|
|
3
4
|
//#region src/cascader/hooks/useIcons.tsx
|
|
@@ -6,8 +7,8 @@ const defaultExpandIcon = createVNode(RightOutlined, null, null);
|
|
|
6
7
|
const defaultRtlExpandIcon = createVNode(LeftOutlined, null, null);
|
|
7
8
|
function useIcons({ contextExpandIcon, contextLoadingIcon, expandIcon, loadingIcon, isRtl }) {
|
|
8
9
|
return {
|
|
9
|
-
expandIcon: expandIcon ?? contextExpandIcon ?? (isRtl ? defaultRtlExpandIcon : defaultExpandIcon),
|
|
10
|
-
loadingIcon: loadingIcon ?? contextLoadingIcon ?? defaultLoadingIcon
|
|
10
|
+
expandIcon: cloneIfVNode(expandIcon ?? contextExpandIcon ?? (isRtl ? defaultRtlExpandIcon : defaultExpandIcon)),
|
|
11
|
+
loadingIcon: cloneIfVNode(loadingIcon ?? contextLoadingIcon ?? defaultLoadingIcon)
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
//#endregion
|
package/dist/cascader/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import "../_util/hooks/index.js";
|
|
|
4
4
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
5
5
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
6
6
|
import { SelectCommonPlacement } from "../_util/motion.js";
|
|
7
|
+
import { SelectSuffixRenderInfo } from "../select/useIcons.js";
|
|
7
8
|
import { SelectPopupSemanticClassNames, SelectPopupSemanticStyles } from "../select/index.js";
|
|
8
9
|
import CascaderPanel from "./Panel.js";
|
|
9
10
|
import { Variant } from "../config-provider/context.js";
|
|
@@ -23,6 +24,7 @@ interface CascaderSemanticClassNames {
|
|
|
23
24
|
item?: string;
|
|
24
25
|
itemContent?: string;
|
|
25
26
|
itemRemove?: string;
|
|
27
|
+
clear?: string;
|
|
26
28
|
}
|
|
27
29
|
interface CascaderSemanticStyles {
|
|
28
30
|
root?: CSSProperties;
|
|
@@ -34,6 +36,7 @@ interface CascaderSemanticStyles {
|
|
|
34
36
|
item?: CSSProperties;
|
|
35
37
|
itemContent?: CSSProperties;
|
|
36
38
|
itemRemove?: CSSProperties;
|
|
39
|
+
clear?: CSSProperties;
|
|
37
40
|
}
|
|
38
41
|
type CascaderClassNamesType = SemanticClassNamesType<CascaderProps, CascaderSemanticClassNames, {
|
|
39
42
|
popup?: SelectPopupSemanticClassNames;
|
|
@@ -47,13 +50,16 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
|
|
|
47
50
|
size?: SizeType;
|
|
48
51
|
/**
|
|
49
52
|
* @deprecated `showArrow` is deprecated which will be removed in next major version. It will be a
|
|
50
|
-
* default behavior, you can hide it by setting `
|
|
53
|
+
* default behavior, you can hide it by setting `suffix` to null.
|
|
51
54
|
*/
|
|
52
55
|
showArrow?: boolean;
|
|
53
56
|
disabled?: boolean;
|
|
54
57
|
/** @deprecated Use `variant` instead. */
|
|
55
58
|
bordered?: boolean;
|
|
56
59
|
placement?: SelectCommonPlacement;
|
|
60
|
+
/** @since 1.8.0 */
|
|
61
|
+
suffix?: VueNode<[SelectSuffixRenderInfo]>;
|
|
62
|
+
/** @deprecated Please use `suffix` instead. */
|
|
57
63
|
suffixIcon?: VueNode;
|
|
58
64
|
options?: OptionType[];
|
|
59
65
|
status?: InputStatus;
|
|
@@ -79,6 +85,8 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
|
|
|
79
85
|
styles?: CascaderStylesType;
|
|
80
86
|
}
|
|
81
87
|
interface CascaderSlots<OptionType extends DefaultOptionType = DefaultOptionType> {
|
|
88
|
+
suffix?: (info: SelectSuffixRenderInfo) => any;
|
|
89
|
+
/** @deprecated Please use `suffix` slot instead. */
|
|
82
90
|
suffixIcon?: () => any;
|
|
83
91
|
notFoundContent?: () => any;
|
|
84
92
|
popupRender?: (menu: VNode) => VNodeChild;
|