antdv-next 1.7.1 → 1.8.1
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/vueNode.d.ts +2 -6
- package/dist/alert/Alert.js +10 -5
- package/dist/antd-with-locales.esm.js +14360 -11910
- package/dist/antd-with-locales.js +82 -79
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +13203 -10918
- package/dist/antd.js +82 -79
- package/dist/auto-complete/index.d.ts +2 -0
- package/dist/auto-complete/index.js +28 -23
- package/dist/button/Button.js +31 -18
- package/dist/calendar/Header.js +4 -4
- package/dist/card/Card.js +1 -1
- package/dist/carousel/index.js +3 -3
- package/dist/cascader/index.d.ts +7 -1
- package/dist/cascader/index.js +42 -34
- package/dist/checkbox/Checkbox.js +5 -2
- package/dist/checkbox/Group.js +2 -2
- 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/components.d.ts +1 -1
- package/dist/config-provider/context.d.ts +13 -9
- 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 +19 -11
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -0
- package/dist/date-picker/generatePicker/generateSinglePicker.js +14 -10
- package/dist/date-picker/generatePicker/useComponents.js +2 -2
- package/dist/date-picker/generatePicker/useSuffix.d.ts +12 -0
- package/dist/date-picker/generatePicker/useSuffix.js +11 -0
- package/dist/date-picker/style/panel.js +11 -8
- package/dist/date-picker/util.d.ts +2 -6
- 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/flex/index.js +2 -2
- 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 +40 -10
- 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 +13 -2
- package/dist/form/FormItemInput.js +3 -4
- package/dist/form/FormItemLabel.js +7 -3
- 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/image/PreviewGroup.js +2 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +7 -7
- package/dist/image/index.js +3 -3
- package/dist/index.d.ts +1 -1
- 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-number/index.js +3 -3
- package/dist/layout/Sider.js +2 -2
- 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/modal/Modal.js +5 -5
- package/dist/notification/PurePanel.js +2 -2
- 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 +3 -3
- package/dist/popconfirm/index.js +2 -2
- package/dist/popover/PurePanel.js +2 -2
- package/dist/popover/style/index.js +1 -0
- package/dist/progress/Circle.js +3 -3
- 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/useIcons.d.ts +23 -12
- 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.js +2 -2
- package/dist/space/Compact.d.ts +1 -1
- package/dist/space/index.d.ts +1 -1
- package/dist/space/style/index.js +8 -2
- package/dist/splitter/SplitBar.js +2 -1
- package/dist/splitter/Splitter.js +2 -2
- package/dist/statistic/Number.js +7 -1
- package/dist/steps/index.js +9 -3
- package/dist/switch/index.js +2 -2
- package/dist/table/InternalTable.js +2 -2
- 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/style/expand.js +4 -1
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/index.js +19 -11
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.d.ts +1 -1
- package/dist/tag/index.js +13 -5
- package/dist/theme/getDesignToken.js +2 -1
- package/dist/time-picker/index.d.ts +6 -0
- package/dist/time-picker/index.js +11 -1
- 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 -0
- 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.js +2 -2
- package/dist/tree/Tree.js +2 -2
- 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/version/token.json +1 -1
- package/dist/watermark/useWatermark.d.ts +1 -7
- package/dist/watermark/useWatermark.js +1 -7
- package/package.json +6 -6
- package/web-tags.json +87 -31
- package/web-types.json +246 -161
- 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/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,
|
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
|
}, {
|
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/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
|
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";
|
|
@@ -49,13 +50,16 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
|
|
|
49
50
|
size?: SizeType;
|
|
50
51
|
/**
|
|
51
52
|
* @deprecated `showArrow` is deprecated which will be removed in next major version. It will be a
|
|
52
|
-
* default behavior, you can hide it by setting `
|
|
53
|
+
* default behavior, you can hide it by setting `suffix` to null.
|
|
53
54
|
*/
|
|
54
55
|
showArrow?: boolean;
|
|
55
56
|
disabled?: boolean;
|
|
56
57
|
/** @deprecated Use `variant` instead. */
|
|
57
58
|
bordered?: boolean;
|
|
58
59
|
placement?: SelectCommonPlacement;
|
|
60
|
+
/** @since 1.8.0 */
|
|
61
|
+
suffix?: VueNode<[SelectSuffixRenderInfo]>;
|
|
62
|
+
/** @deprecated Please use `suffix` instead. */
|
|
59
63
|
suffixIcon?: VueNode;
|
|
60
64
|
options?: OptionType[];
|
|
61
65
|
status?: InputStatus;
|
|
@@ -81,6 +85,8 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
|
|
|
81
85
|
styles?: CascaderStylesType;
|
|
82
86
|
}
|
|
83
87
|
interface CascaderSlots<OptionType extends DefaultOptionType = DefaultOptionType> {
|
|
88
|
+
suffix?: (info: SelectSuffixRenderInfo) => any;
|
|
89
|
+
/** @deprecated Please use `suffix` slot instead. */
|
|
84
90
|
suffixIcon?: () => any;
|
|
85
91
|
notFoundContent?: () => any;
|
|
86
92
|
popupRender?: (menu: VNode) => VNodeChild;
|
package/dist/cascader/index.js
CHANGED
|
@@ -8,14 +8,15 @@ import { useZIndex } from "../_util/hooks/useZIndex.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 { useVariants } from "../form/hooks/useVariant.js";
|
|
11
12
|
import { useLocaleGetter } from "../locale/useLocale.js";
|
|
12
13
|
import genPurePanel from "../_util/PurePanel.js";
|
|
14
|
+
import useAllowClear from "../_util/hooks/useAllowClear.js";
|
|
13
15
|
import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
|
|
14
16
|
import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
|
|
15
|
-
import { useVariants } from "../form/hooks/useVariant.js";
|
|
16
17
|
import mergedBuiltinPlacements from "../select/mergedBuiltinPlacements.js";
|
|
17
18
|
import style_default from "../select/style/index.js";
|
|
18
|
-
import useIcons from "../select/useIcons.js";
|
|
19
|
+
import useIcons, { getCustomSuffix } from "../select/useIcons.js";
|
|
19
20
|
import usePopupRender from "../select/usePopupRender.js";
|
|
20
21
|
import useShowArrow from "../select/useShowArrow.js";
|
|
21
22
|
import useBase from "./hooks/useBase.js";
|
|
@@ -26,7 +27,7 @@ import CascaderPanel from "./Panel.js";
|
|
|
26
27
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
27
28
|
import { clsx } from "@v-c/util";
|
|
28
29
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
29
|
-
import { omit } from "es-toolkit";
|
|
30
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
30
31
|
import VcCascader, { SHOW_CHILD, SHOW_PARENT } from "@v-c/cascader";
|
|
31
32
|
//#region src/cascader/index.tsx
|
|
32
33
|
function highlightKeyword(str, lowerKeyword, prefixCls) {
|
|
@@ -67,12 +68,14 @@ const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
|
|
|
67
68
|
return optionList;
|
|
68
69
|
};
|
|
69
70
|
const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots, expose }) => {
|
|
70
|
-
const { getPopupContainer: getContextPopupContainer, popupOverflow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPrefixCls, expandIcon: contextExpandIcon, loadingIcon: contextLoadingIcon, searchIcon: _contextSearchIcon, clearIcon: contextClearIcon, removeIcon: contextRemoveIcon, suffixIcon: contextSuffixIcon } = useComponentBaseConfig("cascader", props, [
|
|
71
|
+
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, [
|
|
71
72
|
"expandIcon",
|
|
72
73
|
"loadingIcon",
|
|
73
74
|
"searchIcon",
|
|
74
75
|
"clearIcon",
|
|
76
|
+
"allowClear",
|
|
75
77
|
"removeIcon",
|
|
78
|
+
"suffix",
|
|
76
79
|
"suffixIcon"
|
|
77
80
|
]);
|
|
78
81
|
const getGlobalLocale = useLocaleGetter("global");
|
|
@@ -113,11 +116,13 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
113
116
|
dropdownRender: "popupRender",
|
|
114
117
|
dropdownMenuColumnStyle: "styles.popup.listItem",
|
|
115
118
|
popupMenuColumnStyle: "styles.popup.listItem",
|
|
116
|
-
bordered: "variant"
|
|
119
|
+
bordered: "variant",
|
|
120
|
+
suffixIcon: "suffix"
|
|
117
121
|
}).forEach(([oldProp, newProp]) => {
|
|
118
122
|
warning.deprecated(!(props[oldProp] !== void 0), oldProp, newProp);
|
|
119
123
|
});
|
|
120
|
-
warning(!
|
|
124
|
+
warning.deprecated(!slots.suffixIcon, "suffixIcon", "suffix");
|
|
125
|
+
warning(!(props.showArrow !== void 0), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffix` to null.");
|
|
121
126
|
}
|
|
122
127
|
const mergedPopupStyle = computed(() => {
|
|
123
128
|
const { popupStyle, dropdownStyle } = props;
|
|
@@ -165,28 +170,32 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
165
170
|
return () => {
|
|
166
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;
|
|
167
172
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
168
|
-
const
|
|
169
|
-
const
|
|
173
|
+
const customSuffix = getCustomSuffix(slots, props);
|
|
174
|
+
const mergedCustomSuffix = customSuffix !== void 0 ? customSuffix : getSlotPropsFnRun(slots, props, "suffixIcon", false);
|
|
175
|
+
const showSuffix = useShowArrow(mergedCustomSuffix, showArrow);
|
|
170
176
|
const { hasFeedback, isFormItemInput, feedbackIcon } = formItemInputContext.value || {};
|
|
171
|
-
const {
|
|
177
|
+
const { suffix: mergedSuffix, removeIcon } = useIcons({
|
|
172
178
|
...rest,
|
|
173
179
|
multiple,
|
|
174
180
|
hasFeedback,
|
|
175
181
|
feedbackIcon,
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
showSuffix,
|
|
183
|
+
showArrow,
|
|
184
|
+
suffix: mergedCustomSuffix,
|
|
185
|
+
contextSuffix: contextSuffix.value !== void 0 ? contextSuffix.value : contextSuffixIcon.value,
|
|
178
186
|
removeIcon: rest.removeIcon ?? contextRemoveIcon.value,
|
|
179
187
|
clearIcon: rest.clearIcon,
|
|
180
188
|
prefixCls: prefixCls.value,
|
|
181
189
|
componentName: "Cascader"
|
|
182
190
|
});
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
const mergedAllowClear = useAllowClear({
|
|
192
|
+
allowClear,
|
|
193
|
+
contextAllowClear: contextAllowClear.value,
|
|
194
|
+
defaultAllowClear: true,
|
|
195
|
+
clearIcon: rest.clearIcon,
|
|
196
|
+
contextClearIcon: contextClearIcon.value,
|
|
197
|
+
defaultLabel: getGlobalLocale().clear
|
|
198
|
+
});
|
|
190
199
|
const mergedPopupRender = usePopupRender((slots.popupRender ?? popupRender) || dropdownRender);
|
|
191
200
|
const mergedPopupMenuColumnStyle = popupMenuColumnStyle ?? dropdownMenuColumnStyle;
|
|
192
201
|
const customExpandIcon = getSlotPropsFnRunWithFallback(slots, props, "expandIcon");
|
|
@@ -215,7 +224,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
215
224
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value,
|
|
216
225
|
[`${prefixCls.value}-in-form-item`]: isFormItemInput
|
|
217
226
|
}, getStatusClassNames(prefixCls.value, mergedStatus.value, hasFeedback), compactItemClassnames.value, contextClassName.value, rootClass, mergedClassNames.value?.root, rootCls.value, cascaderRootCls.value, hashId.value, cssVarCls.value, className);
|
|
218
|
-
return createVNode(VcCascader, mergeProps(restAttrs, omit(rest, ["suffixIcon"]), {
|
|
227
|
+
return createVNode(VcCascader, mergeProps(restAttrs, omit$1(rest, ["suffix", "suffixIcon"]), {
|
|
219
228
|
"ref": cascaderRef,
|
|
220
229
|
"classNames": mergedClassNames.value,
|
|
221
230
|
"styles": mergedStyles.value,
|
|
@@ -241,7 +250,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
241
250
|
"expandIcon": mergedExpandIcon,
|
|
242
251
|
"loadingIcon": mergedLoadingIcon,
|
|
243
252
|
"checkable": checkable,
|
|
244
|
-
"
|
|
253
|
+
"suffix": mergedSuffix,
|
|
245
254
|
"removeIcon": removeIcon,
|
|
246
255
|
"getPopupContainer": getPopupContainer || getContextPopupContainer,
|
|
247
256
|
"popupRender": mergedPopupRender,
|
|
@@ -288,6 +297,18 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
288
297
|
type: String,
|
|
289
298
|
required: false
|
|
290
299
|
},
|
|
300
|
+
suffix: {
|
|
301
|
+
type: [
|
|
302
|
+
Function,
|
|
303
|
+
String,
|
|
304
|
+
Number,
|
|
305
|
+
null,
|
|
306
|
+
Object,
|
|
307
|
+
Boolean
|
|
308
|
+
],
|
|
309
|
+
required: false,
|
|
310
|
+
default: void 0
|
|
311
|
+
},
|
|
291
312
|
suffixIcon: {
|
|
292
313
|
type: [
|
|
293
314
|
Function,
|
|
@@ -574,19 +595,6 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
574
595
|
required: false,
|
|
575
596
|
default: void 0
|
|
576
597
|
},
|
|
577
|
-
suffix: {
|
|
578
|
-
type: [
|
|
579
|
-
Object,
|
|
580
|
-
Function,
|
|
581
|
-
String,
|
|
582
|
-
Number,
|
|
583
|
-
null,
|
|
584
|
-
Boolean,
|
|
585
|
-
Array
|
|
586
|
-
],
|
|
587
|
-
required: false,
|
|
588
|
-
default: void 0
|
|
589
|
-
},
|
|
590
598
|
clearIcon: {
|
|
591
599
|
type: [
|
|
592
600
|
Object,
|
|
@@ -706,6 +714,6 @@ Cascader.install = (app) => {
|
|
|
706
714
|
app.component(InternalCascader.name, Cascader);
|
|
707
715
|
app.component(CascaderPanel.name, CascaderPanel);
|
|
708
716
|
};
|
|
709
|
-
Cascader._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(Cascader, "popupAlign", (props) => omit(props, ["visible"]));
|
|
717
|
+
Cascader._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(Cascader, "popupAlign", (props) => omit$1(props, ["visible"]));
|
|
710
718
|
//#endregion
|
|
711
719
|
export { CascaderPanel, SHOW_CHILD, SHOW_PARENT, Cascader as default };
|
|
@@ -15,7 +15,7 @@ import { isValueEqual } from "../_util/isEqual.js";
|
|
|
15
15
|
import { useGroupContext } from "./GroupContext.js";
|
|
16
16
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, nextTick, shallowRef, toRef, watch } from "vue";
|
|
17
17
|
import { clsx } from "@v-c/util";
|
|
18
|
-
import { omit } from "es-toolkit";
|
|
18
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
19
19
|
import VcCheckbox from "@v-c/checkbox";
|
|
20
20
|
//#region src/checkbox/Checkbox.tsx
|
|
21
21
|
const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
@@ -107,7 +107,7 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
107
107
|
"onMouseenter": (e) => emit("mouseenter", e),
|
|
108
108
|
"onMouseleave": (e) => emit("mouseleave", e),
|
|
109
109
|
"onClick": onLabelClick
|
|
110
|
-
}, restAttrs), [createVNode(VcCheckbox, mergeProps(omit(props, keys), {
|
|
110
|
+
}, restAttrs), [createVNode(VcCheckbox, mergeProps(omit$1(props, keys), {
|
|
111
111
|
"onChange": (e) => {
|
|
112
112
|
emit("change", e);
|
|
113
113
|
},
|
|
@@ -132,6 +132,9 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
132
132
|
"class": checkboxClass,
|
|
133
133
|
"style": mergedStyles.value.icon,
|
|
134
134
|
"disabled": mergedDisabled.value,
|
|
135
|
+
"onFocus": (e) => {
|
|
136
|
+
emit("focus", e);
|
|
137
|
+
},
|
|
135
138
|
"onBlur": (e) => {
|
|
136
139
|
formItemContext?.triggerBlur?.();
|
|
137
140
|
emit("blur", e);
|
package/dist/checkbox/Group.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useGroupContextProvider } from "./GroupContext.js";
|
|
|
7
7
|
import InternalCheckbox from "./Checkbox.js";
|
|
8
8
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef, toRef, watch } from "vue";
|
|
9
9
|
import { clsx } from "@v-c/util";
|
|
10
|
-
import { omit } from "es-toolkit";
|
|
10
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
11
11
|
//#region src/checkbox/Group.tsx
|
|
12
12
|
function _isSlot(s) {
|
|
13
13
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -79,7 +79,7 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
79
79
|
}));
|
|
80
80
|
return () => {
|
|
81
81
|
const { rootClass, role } = props;
|
|
82
|
-
const restProps = omit(props, [
|
|
82
|
+
const restProps = omit$1(props, [
|
|
83
83
|
"options",
|
|
84
84
|
"rootClass",
|
|
85
85
|
"defaultValue",
|
|
@@ -10,7 +10,7 @@ import style_default from "./style/index.js";
|
|
|
10
10
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
11
11
|
import { classNames } from "@v-c/util";
|
|
12
12
|
import { RightOutlined } from "@antdv-next/icons";
|
|
13
|
-
import { omit } from "es-toolkit";
|
|
13
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
14
14
|
import VcCollapse from "@v-c/collapse";
|
|
15
15
|
//#region src/collapse/Collapse.tsx
|
|
16
16
|
const Collapse = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }) => {
|
|
@@ -80,7 +80,7 @@ const Collapse = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots })
|
|
|
80
80
|
if (children) _item.children = children;
|
|
81
81
|
return _item;
|
|
82
82
|
});
|
|
83
|
-
return createVNode(VcCollapse, mergeProps({ "openMotion": openMotion.value }, omit(attrs, ["class", "style"]), omit(props, [
|
|
83
|
+
return createVNode(VcCollapse, mergeProps({ "openMotion": openMotion.value }, omit$1(attrs, ["class", "style"]), omit$1(props, [
|
|
84
84
|
"rootClass",
|
|
85
85
|
"items",
|
|
86
86
|
"expandIconPlacement",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
1
2
|
import { useFormItemInputContext } from "../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
@@ -47,6 +48,12 @@ const ColorPicker = /* @__PURE__ */ defineComponent((props, { slots, expose, emi
|
|
|
47
48
|
});
|
|
48
49
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
49
50
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
51
|
+
if (isDev) {
|
|
52
|
+
const warning = devUseWarning("ColorPicker");
|
|
53
|
+
watch(() => mergedStyles.value?.popupOverlayInner, (popupOverlayInner) => {
|
|
54
|
+
warning.deprecated(!popupOverlayInner, "styles.popupOverlayInner", "styles.popup.container");
|
|
55
|
+
}, { immediate: true });
|
|
56
|
+
}
|
|
50
57
|
const internalPopupOpen = shallowRef(open.value ?? false);
|
|
51
58
|
watch(open, (val) => {
|
|
52
59
|
internalPopupOpen.value = val ?? false;
|
|
@@ -186,10 +193,16 @@ const ColorPicker = /* @__PURE__ */ defineComponent((props, { slots, expose, emi
|
|
|
186
193
|
"styles": mergedStyles.value
|
|
187
194
|
}), null);
|
|
188
195
|
return createVNode(Popover, mergeProps({
|
|
189
|
-
"classes": {
|
|
196
|
+
"classes": {
|
|
197
|
+
root: mergedPopupCls,
|
|
198
|
+
container: mergedClassNames.value?.popup?.container
|
|
199
|
+
},
|
|
190
200
|
"styles": {
|
|
191
201
|
root: mergedStyles.value?.popup?.root,
|
|
192
|
-
container:
|
|
202
|
+
container: {
|
|
203
|
+
...mergedStyles.value?.popupOverlayInner,
|
|
204
|
+
...mergedStyles.value?.popup?.container
|
|
205
|
+
}
|
|
193
206
|
},
|
|
194
207
|
"onOpenChange": triggerOpenChange,
|
|
195
208
|
"content": panelNode
|
|
@@ -3,7 +3,7 @@ import { useSliderInternalContextProvider } from "../../slider/Context.js";
|
|
|
3
3
|
import Slider from "../../slider/index.js";
|
|
4
4
|
import { cloneVNode, computed, createVNode, defineComponent, mergeProps } 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
|
import { UnstableProvider } from "@v-c/slider";
|
|
8
8
|
//#region src/color-picker/components/ColorSlider.tsx
|
|
9
9
|
const GradientColorSlider = /* @__PURE__ */ defineComponent((props) => {
|
|
@@ -142,7 +142,7 @@ const SingleColorSlider = /* @__PURE__ */ defineComponent((props) => {
|
|
|
142
142
|
const onChangeComplete = (v) => props.onChangeComplete?.(v[0]);
|
|
143
143
|
return () => {
|
|
144
144
|
const { value, ...restProps } = props;
|
|
145
|
-
return createVNode(GradientColorSlider, mergeProps(omit(restProps, ["onChange", "onChangeComplete"]), {
|
|
145
|
+
return createVNode(GradientColorSlider, mergeProps(omit$1(restProps, ["onChange", "onChangeComplete"]), {
|
|
146
146
|
"value": [value],
|
|
147
147
|
"onChange": onChange,
|
|
148
148
|
"onChangeComplete": onChangeComplete
|
|
@@ -56,12 +56,15 @@ interface ColorPickerSemanticStyles {
|
|
|
56
56
|
type ColorPickerClassNamesType = SemanticClassNamesType<ColorPickerProps, ColorPickerSemanticClassNames, {
|
|
57
57
|
popup?: {
|
|
58
58
|
root?: string;
|
|
59
|
+
container?: string;
|
|
59
60
|
};
|
|
60
61
|
}>;
|
|
61
62
|
type ColorPickerStylesType = SemanticStylesType<ColorPickerProps, ColorPickerSemanticStyles, {
|
|
62
63
|
popup?: {
|
|
63
64
|
root?: CSSProperties;
|
|
65
|
+
container?: CSSProperties;
|
|
64
66
|
};
|
|
67
|
+
/** @deprecated Will be removed in v7. Please use `popup.container` instead. */
|
|
65
68
|
popupOverlayInner?: CSSProperties;
|
|
66
69
|
}>;
|
|
67
70
|
type ColorPickerProps = Omit<ColorPickerProps$1, 'onChange' | 'onChangeComplete' | 'value' | 'defaultValue' | 'valueFormat' | 'panelRender' | 'disabledAlpha' | 'components'> & {
|