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
package/dist/steps/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
|
5
5
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
6
6
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
7
7
|
import InternalTooltip from "../tooltip/index.js";
|
|
8
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
8
9
|
import { TARGET_CLS } from "../_util/wave/interface.js";
|
|
9
10
|
import wave_default from "../_util/wave/index.js";
|
|
10
11
|
import useBreakpoint from "../grid/hooks/useBreakpoint.js";
|
|
@@ -13,7 +14,7 @@ import PanelArrow from "./PanelArrow.js";
|
|
|
13
14
|
import ProgressIcon from "./ProgressIcon.js";
|
|
14
15
|
import style_default from "./style/index.js";
|
|
15
16
|
import useDisplaySteps from "./useDisplaySteps.js";
|
|
16
|
-
import { Fragment, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeDefaults, mergeProps } from "vue";
|
|
17
|
+
import { Fragment, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeDefaults, mergeProps, toRef } from "vue";
|
|
17
18
|
import { clsx } from "@v-c/util";
|
|
18
19
|
import { CheckOutlined, CloseOutlined } from "@antdv-next/icons";
|
|
19
20
|
import VcSteps from "@v-c/steps";
|
|
@@ -27,6 +28,10 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
27
28
|
const internalContent = useInternalContext();
|
|
28
29
|
const { direction: rtlDirection, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, rootPrefixCls } = useComponentBaseConfig("steps", props);
|
|
29
30
|
const { size, items, responsive, type, classes, styles } = toPropsRefs(props, "size", "items", "responsive", "type", "classes", "styles");
|
|
31
|
+
const [mergedVariant] = useVariant("steps", toRef(() => props.variant), {
|
|
32
|
+
variants: ["filled", "outlined"],
|
|
33
|
+
defaultVariant: "filled"
|
|
34
|
+
});
|
|
30
35
|
const components = computed(() => {
|
|
31
36
|
return {
|
|
32
37
|
root: internalContent.value?.rootComponent,
|
|
@@ -64,6 +69,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
64
69
|
const mergedProps = computed(() => {
|
|
65
70
|
return {
|
|
66
71
|
...props,
|
|
72
|
+
variant: mergedVariant.value,
|
|
67
73
|
size: mergedSize.value,
|
|
68
74
|
type: mergedType.value,
|
|
69
75
|
orientation: mergedOrientation.value,
|
|
@@ -85,7 +91,8 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
85
91
|
warning(props.maxCount === void 0 || props.maxCount >= 3, "usage", "`maxCount` should be greater than or equal to 3.");
|
|
86
92
|
}
|
|
87
93
|
return () => {
|
|
88
|
-
const
|
|
94
|
+
const variant = mergedVariant.value;
|
|
95
|
+
const { variant: _variant, onChange, offset, ellipsis, rootClass, classes: _classes, size: _size, type: _type, direction: _direction, labelPlacement: _labelPlacement, progressDot: _progressDot, responsive: _responsive, percent: _percent, current: _current, initial: _initial, maxCount: _maxCount, ...restProps } = props;
|
|
89
96
|
const { className, restAttrs } = getAttrStyleAndClass(attrs);
|
|
90
97
|
const iconRender = slots?.iconRender || props?.iconRender;
|
|
91
98
|
const legacyProgressDotRenderFn = () => {
|
|
@@ -289,7 +296,6 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
289
296
|
required: false
|
|
290
297
|
}
|
|
291
298
|
}, {
|
|
292
|
-
variant: "filled",
|
|
293
299
|
responsive: true,
|
|
294
300
|
offset: 0,
|
|
295
301
|
current: 0
|
package/dist/switch/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import style_default from "./style/index.js";
|
|
|
10
10
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef, watch } from "vue";
|
|
11
11
|
import { clsx } from "@v-c/util";
|
|
12
12
|
import { LoadingOutlined } from "@antdv-next/icons";
|
|
13
|
-
import { omit } from "es-toolkit/compat";
|
|
13
|
+
import { omit as omit$1 } from "es-toolkit/compat";
|
|
14
14
|
import VcSwitch from "@v-c/switch";
|
|
15
15
|
//#region src/switch/index.tsx
|
|
16
16
|
const keys = [
|
|
@@ -93,7 +93,7 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, exp
|
|
|
93
93
|
...mergedStyles.value.root,
|
|
94
94
|
...style
|
|
95
95
|
};
|
|
96
|
-
const restProps = omit(props, keys);
|
|
96
|
+
const restProps = omit$1(props, keys);
|
|
97
97
|
return createVNode(wave_default, {
|
|
98
98
|
"component": "Switch",
|
|
99
99
|
"disabled": mergedDisabled.value
|
|
@@ -30,7 +30,7 @@ import style_default from "./style/index.js";
|
|
|
30
30
|
import { convertColumnsToColumnProps } from "./utils.js";
|
|
31
31
|
import { computed, createVNode, defineComponent, h, inject, isVNode, mergeDefaults, mergeProps, provide, shallowRef, watch, watchEffect } from "vue";
|
|
32
32
|
import { clsx } from "@v-c/util";
|
|
33
|
-
import { omit } from "es-toolkit";
|
|
33
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
34
34
|
import pickAttrs from "@v-c/util/dist/pickAttrs";
|
|
35
35
|
import VcTable, { INTERNAL_HOOKS, VirtualTable } from "@v-c/table";
|
|
36
36
|
//#region src/table/InternalTable.tsx
|
|
@@ -111,7 +111,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
111
111
|
const matched = new Set(Object.keys(screens.value || {}).filter((m) => screens.value?.[m]));
|
|
112
112
|
return baseColumns.value.filter((c) => !c.responsive || c.responsive.some((r) => matched.has(r)));
|
|
113
113
|
});
|
|
114
|
-
const tableProps = computed(() => omit(props, [
|
|
114
|
+
const tableProps = computed(() => omit$1(props, [
|
|
115
115
|
"classes",
|
|
116
116
|
"styles",
|
|
117
117
|
"dataSource",
|
|
@@ -83,6 +83,7 @@ function generateFilterInfo(filterStates) {
|
|
|
83
83
|
return currentFilters;
|
|
84
84
|
}
|
|
85
85
|
function getFilterData(data, filterStates, childrenColumnName) {
|
|
86
|
+
let childrenFiltered = false;
|
|
86
87
|
return filterStates.reduce((currentData, filterState) => {
|
|
87
88
|
const { column: { onFilter, filters }, filteredKeys } = filterState;
|
|
88
89
|
if (onFilter && filteredKeys && filteredKeys.length) {
|
|
@@ -96,12 +97,14 @@ function getFilterData(data, filterStates, childrenColumnName) {
|
|
|
96
97
|
const stringKey = String(key);
|
|
97
98
|
return keyMap.get(stringKey) ?? key;
|
|
98
99
|
});
|
|
99
|
-
|
|
100
|
+
const filteredData = currentData.reduce((records, record) => {
|
|
100
101
|
const currentRecord = { ...record };
|
|
101
|
-
if (currentRecord[childrenColumnName]) currentRecord[childrenColumnName] = getFilterData(currentRecord[childrenColumnName], filterStates, childrenColumnName);
|
|
102
|
+
if (!childrenFiltered && currentRecord[childrenColumnName]) currentRecord[childrenColumnName] = getFilterData(currentRecord[childrenColumnName], filterStates, childrenColumnName);
|
|
102
103
|
if (realKeys.some((realKey) => onFilter(realKey, currentRecord))) records.push(currentRecord);
|
|
103
104
|
return records;
|
|
104
105
|
}, []);
|
|
106
|
+
childrenFiltered = true;
|
|
107
|
+
return filteredData;
|
|
105
108
|
}
|
|
106
109
|
return currentData;
|
|
107
110
|
}, data);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { PaginationOnChangeInfo } from "../../pagination/index.js";
|
|
1
2
|
import { TablePaginationConfig } from "../interface.js";
|
|
2
3
|
import { Ref } from "vue";
|
|
3
4
|
//#region src/table/hooks/usePagination.d.ts
|
|
4
5
|
declare const DEFAULT_PAGE_SIZE = 10;
|
|
5
6
|
declare function getPaginationParam(mergedPagination: TablePaginationConfig, pagination?: TablePaginationConfig | boolean): any;
|
|
6
7
|
type MaybeRef<T> = T | Ref<T>;
|
|
7
|
-
declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number) => void, pagination?: MaybeRef<TablePaginationConfig | false>): readonly [import("vue").ComputedRef<TablePaginationConfig>, (current?: number, pageSize?: number) => void];
|
|
8
|
+
declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number, info?: PaginationOnChangeInfo) => void, pagination?: MaybeRef<TablePaginationConfig | false>): readonly [import("vue").ComputedRef<TablePaginationConfig>, (current?: number, pageSize?: number) => void];
|
|
8
9
|
//#endregion
|
|
9
10
|
export { DEFAULT_PAGE_SIZE, usePagination as default, getPaginationParam };
|
|
@@ -36,10 +36,13 @@ function usePagination(total, onChange, pagination) {
|
|
|
36
36
|
pageSize: pageSize || mergedPagination.value.pageSize
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
const onInternalChange = (current, pageSize) => {
|
|
40
|
-
if (paginationRef.value && typeof paginationRef.value === "object") paginationRef.value.onChange?.(current, pageSize);
|
|
39
|
+
const onInternalChange = (current, pageSize, info) => {
|
|
40
|
+
if (paginationRef.value && typeof paginationRef.value === "object") if (info) paginationRef.value.onChange?.(current, pageSize, info);
|
|
41
|
+
else paginationRef.value.onChange?.(current, pageSize);
|
|
41
42
|
refreshPagination(current, pageSize);
|
|
42
|
-
|
|
43
|
+
const mergedPageSize = pageSize || mergedPagination.value.pageSize || 10;
|
|
44
|
+
if (info) onChange(current, mergedPageSize, info);
|
|
45
|
+
else onChange(current, mergedPageSize);
|
|
43
46
|
};
|
|
44
47
|
return [computed(() => {
|
|
45
48
|
if (paginationRef.value === false) return {};
|
|
@@ -7,7 +7,10 @@ const genExpandStyle = (token) => {
|
|
|
7
7
|
const expandIconLineOffset = calc(paddingXXS).sub(lineWidth).equal();
|
|
8
8
|
return { [`${componentCls}-wrapper`]: {
|
|
9
9
|
[`${componentCls}-expand-icon-col`]: { width: tableExpandColumnWidth },
|
|
10
|
-
[
|
|
10
|
+
[`
|
|
11
|
+
${componentCls}-thead > tr > ${componentCls}-row-expand-icon-cell,
|
|
12
|
+
${componentCls}-row-expand-icon-cell
|
|
13
|
+
`]: {
|
|
11
14
|
textAlign: "center",
|
|
12
15
|
[`${componentCls}-row-expand-icon`]: {
|
|
13
16
|
display: "inline-flex",
|
package/dist/table/util.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare function renderColumnTitle<RecordType extends AnyObject = AnyObject>(tit
|
|
|
11
11
|
* Should filter [object Object]
|
|
12
12
|
*/
|
|
13
13
|
declare function safeColumnTitle<RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>): any;
|
|
14
|
-
declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "
|
|
14
|
+
declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "end" | "start";
|
|
15
15
|
declare function getPaginationSize(paginationSize: SizeType, mergedSize: SizeType): SizeType;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
|
package/dist/tabs/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import style_default from "./style/index.js";
|
|
|
11
11
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef, toRef } from "vue";
|
|
12
12
|
import { clsx } from "@v-c/util";
|
|
13
13
|
import { CloseOutlined, EllipsisOutlined, PlusOutlined } from "@antdv-next/icons";
|
|
14
|
-
import { omit } from "es-toolkit";
|
|
14
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
15
15
|
import VcTabs from "@v-c/tabs";
|
|
16
16
|
//#region src/tabs/index.tsx
|
|
17
17
|
const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expose }) => {
|
|
@@ -19,7 +19,15 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
19
19
|
const more = toRef(props, "more");
|
|
20
20
|
const popupClassName = toRef(props, "popupClassName");
|
|
21
21
|
const indicator = toRef(props, "indicator");
|
|
22
|
-
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls, scrollPosition: contextScrollPosition } = useComponentBaseConfig("tabs", props, [
|
|
22
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls, scrollPosition: contextScrollPosition, indicator: contextIndicator, indicatorSize: contextIndicatorSize, moreIcon: contextMoreIcon, addIcon: contextAddIcon, removeIcon: contextRemoveIcon, more: contextMore } = useComponentBaseConfig("tabs", props, [
|
|
23
|
+
"scrollPosition",
|
|
24
|
+
"indicator",
|
|
25
|
+
"indicatorSize",
|
|
26
|
+
"moreIcon",
|
|
27
|
+
"addIcon",
|
|
28
|
+
"removeIcon",
|
|
29
|
+
"more"
|
|
30
|
+
]);
|
|
23
31
|
const size = useSize(customSize);
|
|
24
32
|
const mergedScrollPosition = computed(() => props.scrollPosition ?? contextScrollPosition.value);
|
|
25
33
|
const mergedPlacement = computed(() => {
|
|
@@ -44,8 +52,8 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
44
52
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
45
53
|
const mergedAnimated = computed(() => useAnimateConfig(prefixCls.value, props.animated));
|
|
46
54
|
const mergedIndicator = computed(() => ({
|
|
47
|
-
align: indicator.value?.align,
|
|
48
|
-
size: indicator.value?.size ?? indicatorSize.value
|
|
55
|
+
align: indicator.value?.align ?? contextIndicator.value?.align,
|
|
56
|
+
size: indicator.value?.size ?? indicatorSize.value ?? contextIndicator.value?.size ?? contextIndicatorSize.value
|
|
49
57
|
}));
|
|
50
58
|
const tabsRef = shallowRef();
|
|
51
59
|
expose({ nativeElement: computed(() => tabsRef.value?.$el ?? tabsRef.value ?? null) });
|
|
@@ -54,7 +62,7 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
54
62
|
warning.deprecated(!popupClassName.value, "popupClassName", "classes.popup");
|
|
55
63
|
warning.deprecated(!tabPosition.value, "tabPosition", "tabPlacement");
|
|
56
64
|
warning(!(attrs.onPrevClick || attrs.onNextClick), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.");
|
|
57
|
-
warning.deprecated(!indicatorSize.value, "indicatorSize", "indicator");
|
|
65
|
+
warning.deprecated(!(indicatorSize.value || contextIndicatorSize.value), "indicatorSize", "indicator");
|
|
58
66
|
warning.deprecated(!(props.destroyInactiveTabPane || props.items?.some((item) => "destroyInactiveTabPane" in item)), "destroyInactiveTabPane", "destroyOnHidden");
|
|
59
67
|
if (more.value) [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach(([deprecatedName, newName]) => {
|
|
60
68
|
warning.deprecated(!(deprecatedName in more.value), `more.${deprecatedName}`, `more.${newName}`);
|
|
@@ -74,9 +82,9 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
74
82
|
};
|
|
75
83
|
return () => {
|
|
76
84
|
const { className: attrClassName, style: attrStyle, restAttrs } = getAttrStyleAndClass(attrs);
|
|
77
|
-
const addIcon = getSlotPropsFnRun(slots, props, "addIcon") ?? createVNode(PlusOutlined, null, null);
|
|
78
|
-
const removeIcon = getSlotPropsFnRun(slots, props, "removeIcon") ?? createVNode(CloseOutlined, null, null);
|
|
79
|
-
const moreIcon = getSlotPropsFnRun(slots, props, "moreIcon")
|
|
85
|
+
const addIcon = (getSlotPropsFnRun(slots, props, "addIcon") ?? contextAddIcon.value) || createVNode(PlusOutlined, null, null);
|
|
86
|
+
const removeIcon = getSlotPropsFnRun(slots, props, "removeIcon") ?? contextRemoveIcon.value ?? createVNode(CloseOutlined, null, null);
|
|
87
|
+
const moreIcon = getSlotPropsFnRun(slots, props, "moreIcon");
|
|
80
88
|
const editableFn = () => {
|
|
81
89
|
if (type.value !== "editable-card") return;
|
|
82
90
|
return {
|
|
@@ -93,12 +101,12 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
93
101
|
const { visible: moreVisible, ...restMoreProps } = more.value ?? {};
|
|
94
102
|
const legacyMoreProps = more.value && !("open" in more.value) && "visible" in more.value ? { open: moreVisible } : {};
|
|
95
103
|
if (!rootPrefixCls) return {
|
|
96
|
-
icon: moreIcon,
|
|
104
|
+
icon: moreIcon ?? contextMore.value?.icon ?? contextMoreIcon.value ?? createVNode(EllipsisOutlined, null, null),
|
|
97
105
|
...restMoreProps,
|
|
98
106
|
...legacyMoreProps
|
|
99
107
|
};
|
|
100
108
|
return {
|
|
101
|
-
icon: moreIcon,
|
|
109
|
+
icon: moreIcon ?? contextMore.value?.icon ?? contextMoreIcon.value ?? createVNode(EllipsisOutlined, null, null),
|
|
102
110
|
transitionName: `${rootPrefixCls}-slide-up`,
|
|
103
111
|
...restMoreProps,
|
|
104
112
|
...legacyMoreProps
|
|
@@ -106,7 +114,7 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
106
114
|
};
|
|
107
115
|
const mergedMore = mergedMoreFn();
|
|
108
116
|
const editable = editableFn();
|
|
109
|
-
const restProps = omit(props, [
|
|
117
|
+
const restProps = omit$1(props, [
|
|
110
118
|
"items",
|
|
111
119
|
"styles",
|
|
112
120
|
"classes",
|
|
@@ -9,6 +9,6 @@ declare function useColor(props: {
|
|
|
9
9
|
color: Ref<TagProps['color']>;
|
|
10
10
|
variant: Ref<TagProps['variant']>;
|
|
11
11
|
bordered: Ref<TagProps['bordered']>;
|
|
12
|
-
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"
|
|
12
|
+
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"outlined" | "solid" | "filled">, import("vue").ComputedRef<string | undefined>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<CSSProperties>];
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useColor as default };
|
package/dist/tag/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ type TagClassNamesType = SemanticClassNamesType<TagProps, TagSemanticClassNames>
|
|
|
26
26
|
type TagStylesType = SemanticStylesType<TagProps, TagSemanticStyles>;
|
|
27
27
|
interface TagProps extends ComponentBaseProps, TagEmitsProps {
|
|
28
28
|
color?: LiteralUnion<PresetColorType | PresetStatusColorType>;
|
|
29
|
-
/**
|
|
29
|
+
/** Configure the close button and its accessibility attributes. */
|
|
30
30
|
closable?: ClosableType;
|
|
31
31
|
closeIcon?: VueNode;
|
|
32
32
|
icon?: VueNode;
|
package/dist/tag/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
|
3
3
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
6
|
-
import
|
|
6
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
7
7
|
import wave_default from "../_util/wave/index.js";
|
|
8
8
|
import { replaceElement } from "../_util/vueNode.js";
|
|
9
9
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
@@ -22,9 +22,17 @@ function _isSlot(s) {
|
|
|
22
22
|
}
|
|
23
23
|
const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
|
|
24
24
|
const configContext = useConfig();
|
|
25
|
-
const { prefixCls, direction, class: contextClassName,
|
|
25
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("tag", props);
|
|
26
26
|
const { variant, href, target, disabled: customDisabled, color, bordered, classes, styles } = toPropsRefs$1(props, "classes", "styles", "variant", "href", "target", "disabled", "color", "bordered");
|
|
27
27
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
28
|
+
const [contextVariant] = useVariant("tag", void 0, {
|
|
29
|
+
variants: [
|
|
30
|
+
"filled",
|
|
31
|
+
"solid",
|
|
32
|
+
"outlined"
|
|
33
|
+
],
|
|
34
|
+
defaultVariant: "filled"
|
|
35
|
+
});
|
|
28
36
|
const [mergedVariant, mergedColor, isPreset, isStatus, customTagStyle] = useColor({
|
|
29
37
|
bordered,
|
|
30
38
|
variant,
|
|
@@ -116,15 +124,15 @@ const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
116
124
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl",
|
|
117
125
|
[`${prefixCls.value}-disabled`]: mergedDisabled.value
|
|
118
126
|
}, attrs.class, props.rootClass, hashId.value, cssVarCls.value);
|
|
119
|
-
const children = filterEmpty(slots?.default?.())
|
|
120
|
-
const isNeedWave = children && children.type === "a" || typeof props.onClick === "function";
|
|
127
|
+
const children = filterEmpty(slots?.default?.());
|
|
128
|
+
const isNeedWave = children.length === 1 && children[0].type === "a" || typeof props.onClick === "function";
|
|
121
129
|
const iconNode = getSlotPropsFnRun(slots, props, "icon");
|
|
122
130
|
let iconNodes = iconNode;
|
|
123
131
|
if (iconNode) iconNodes = createVNode(iconNode, {
|
|
124
132
|
class: mergedClassNames.value?.icon,
|
|
125
133
|
style: mergedStyles.value?.icon
|
|
126
134
|
});
|
|
127
|
-
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes,
|
|
135
|
+
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes, children.length > 0 && createVNode("span", {
|
|
128
136
|
"class": mergedClassNames.value.content,
|
|
129
137
|
"style": mergedStyles.value.content
|
|
130
138
|
}, [children])]) : children;
|
|
@@ -4,7 +4,8 @@ import formatToken from "./util/alias.js";
|
|
|
4
4
|
import { createTheme, getComputedToken } from "@antdv-next/cssinjs";
|
|
5
5
|
//#region src/theme/getDesignToken.ts
|
|
6
6
|
function getDesignToken(config) {
|
|
7
|
-
const
|
|
7
|
+
const algorithm = config?.algorithm;
|
|
8
|
+
const theme = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
8
9
|
return getComputedToken({
|
|
9
10
|
...seedToken,
|
|
10
11
|
...config?.token
|
|
@@ -68,6 +68,7 @@ interface TimeRangePickerEmits<DateType = Dayjs> {
|
|
|
68
68
|
'panelChange': (dates: DateType[], modes: [PickerMode, PickerMode]) => void;
|
|
69
69
|
'openChange': (open: boolean) => void;
|
|
70
70
|
'ok': (dates: DateType[]) => void;
|
|
71
|
+
'clear': () => void;
|
|
71
72
|
'focus': (e: FocusEvent, info: any) => void;
|
|
72
73
|
'blur': (e: FocusEvent, info: any) => void;
|
|
73
74
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
@@ -91,6 +92,8 @@ interface TimePickerSlots {
|
|
|
91
92
|
/** @deprecated Please use `renderExtraFooter` instead */
|
|
92
93
|
addon?: () => any;
|
|
93
94
|
renderExtraFooter?: (mode: PickerMode) => any;
|
|
95
|
+
suffix?: () => any;
|
|
96
|
+
/** @deprecated Please use `suffix` instead */
|
|
94
97
|
suffixIcon?: () => any;
|
|
95
98
|
prefix?: () => any;
|
|
96
99
|
[key: string]: any;
|
|
@@ -102,6 +105,7 @@ interface TimePickerEmits<DateType = Dayjs> {
|
|
|
102
105
|
'panelChange': (date: DateType, mode: PickerMode) => void;
|
|
103
106
|
'openChange': (open: boolean) => void;
|
|
104
107
|
'ok': (date: DateType | DateType[]) => void;
|
|
108
|
+
'clear': () => void;
|
|
105
109
|
'select': (date: DateType) => void;
|
|
106
110
|
'focus': (e: FocusEvent, info: any) => void;
|
|
107
111
|
'blur': (e: FocusEvent, info: any) => void;
|
|
@@ -114,6 +118,7 @@ interface TimeRangePickerEmitsProps<DateType = Dayjs> {
|
|
|
114
118
|
onPanelChange?: TimeRangePickerEmits<DateType>['panelChange'];
|
|
115
119
|
onOpenChange?: TimeRangePickerEmits<DateType>['openChange'];
|
|
116
120
|
onOk?: TimeRangePickerEmits<DateType>['ok'];
|
|
121
|
+
onClear?: TimeRangePickerEmits<DateType>['clear'];
|
|
117
122
|
onFocus?: TimeRangePickerEmits<DateType>['focus'];
|
|
118
123
|
onBlur?: TimeRangePickerEmits<DateType>['blur'];
|
|
119
124
|
onKeydown?: TimeRangePickerEmits<DateType>['keydown'];
|
|
@@ -125,6 +130,7 @@ interface TimePickerEmitsProps<DateType = Dayjs> {
|
|
|
125
130
|
onPanelChange?: TimePickerEmits<DateType>['panelChange'];
|
|
126
131
|
onOpenChange?: TimePickerEmits<DateType>['openChange'];
|
|
127
132
|
onOk?: TimePickerEmits<DateType>['ok'];
|
|
133
|
+
onClear?: TimePickerEmits<DateType>['clear'];
|
|
128
134
|
onSelect?: TimePickerEmits<DateType>['select'];
|
|
129
135
|
onFocus?: TimePickerEmits<DateType>['focus'];
|
|
130
136
|
onBlur?: TimePickerEmits<DateType>['blur'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { toPropsRefs } from "../_util/tools.js";
|
|
3
|
-
import genPurePanel from "../_util/PurePanel.js";
|
|
4
3
|
import { useVariants } from "../form/hooks/useVariant.js";
|
|
4
|
+
import genPurePanel from "../_util/PurePanel.js";
|
|
5
5
|
import useMergedPickerSemantic from "../date-picker/hooks/useMergedPickerSemantic.js";
|
|
6
6
|
import DatePicker from "../date-picker/index.js";
|
|
7
7
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
@@ -25,6 +25,9 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
25
25
|
const onOk = (dates) => {
|
|
26
26
|
emit("ok", dates);
|
|
27
27
|
};
|
|
28
|
+
const onClear = () => {
|
|
29
|
+
emit("clear");
|
|
30
|
+
};
|
|
28
31
|
const onFocus = (e, info) => {
|
|
29
32
|
emit("focus", e, info);
|
|
30
33
|
};
|
|
@@ -49,6 +52,7 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
49
52
|
"onPanelChange": onPanelChange,
|
|
50
53
|
"onOpenChange": onOpenChange,
|
|
51
54
|
"onOk": onOk,
|
|
55
|
+
"onClear": onClear,
|
|
52
56
|
"onFocus": onFocus,
|
|
53
57
|
"onBlur": onBlur,
|
|
54
58
|
"onKeydown": onKeyDown
|
|
@@ -1357,6 +1361,7 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
1357
1361
|
"panelChange",
|
|
1358
1362
|
"openChange",
|
|
1359
1363
|
"ok",
|
|
1364
|
+
"clear",
|
|
1360
1365
|
"focus",
|
|
1361
1366
|
"blur",
|
|
1362
1367
|
"keydown"
|
|
@@ -1389,6 +1394,9 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1389
1394
|
const onOk = (date) => {
|
|
1390
1395
|
emit("ok", date);
|
|
1391
1396
|
};
|
|
1397
|
+
const onClear = () => {
|
|
1398
|
+
emit("clear");
|
|
1399
|
+
};
|
|
1392
1400
|
const onSelect = (date) => {
|
|
1393
1401
|
emit("select", date);
|
|
1394
1402
|
};
|
|
@@ -1431,6 +1439,7 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1431
1439
|
onPanelChange,
|
|
1432
1440
|
onOpenChange,
|
|
1433
1441
|
onOk,
|
|
1442
|
+
onClear,
|
|
1434
1443
|
onSelect,
|
|
1435
1444
|
onFocus,
|
|
1436
1445
|
onBlur,
|
|
@@ -2730,6 +2739,7 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
2730
2739
|
"panelChange",
|
|
2731
2740
|
"openChange",
|
|
2732
2741
|
"ok",
|
|
2742
|
+
"clear",
|
|
2733
2743
|
"select",
|
|
2734
2744
|
"focus",
|
|
2735
2745
|
"blur",
|
|
@@ -3,6 +3,7 @@ import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
|
3
3
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
6
7
|
import { resolveSlotsNode } from "../_util/vnode/index.js";
|
|
7
8
|
import isNonNullable from "../_util/isNonNullable.js";
|
|
8
9
|
import { provideInternalContext } from "../steps/context.js";
|
|
@@ -10,10 +11,10 @@ import Steps from "../steps/index.js";
|
|
|
10
11
|
import style_default from "./style/index.js";
|
|
11
12
|
import { TimelineItem } from "./TimelineItem.js";
|
|
12
13
|
import useItems from "./useItems.js";
|
|
13
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, ref, toRefs } from "vue";
|
|
14
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, ref, toRef, toRefs } 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 { useUnstableProvider } from "@v-c/steps/dist/UnstableContext.js";
|
|
18
19
|
//#region src/timeline/Timeline.tsx
|
|
19
20
|
const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
@@ -27,6 +28,10 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
27
28
|
const { classes: contextClassNames, styles: contextStyles, style: contextStyle, class: contextClassName } = useComponentBaseConfig("timeline", props);
|
|
28
29
|
const { prefixCls, timeline, direction, getPrefixCls } = useBaseConfig("timeline", props);
|
|
29
30
|
const rootPrefixCls = computed(() => getPrefixCls());
|
|
31
|
+
const [mergedVariant] = useVariant("timeline", toRef(() => props.variant), {
|
|
32
|
+
variants: ["filled", "outlined"],
|
|
33
|
+
defaultVariant: "outlined"
|
|
34
|
+
});
|
|
30
35
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
31
36
|
const items = computed(() => props.items || resolveSlotsNode(slots, "default", void 0, "_ANTDV_NEXT_TIMELINE_ITEM"));
|
|
32
37
|
const pending = computed(() => props.pending);
|
|
@@ -73,7 +78,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
73
78
|
const mergedProps = computed(() => {
|
|
74
79
|
return {
|
|
75
80
|
...props,
|
|
76
|
-
variant:
|
|
81
|
+
variant: mergedVariant.value,
|
|
77
82
|
mode: mergedMode.value,
|
|
78
83
|
orientation: orientation.value,
|
|
79
84
|
items: mergedItems.value
|
|
@@ -86,14 +91,18 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
86
91
|
return mergedMode.value === "alternate" || orientation.value === "vertical" && mergedItems.value.some((item) => item.title);
|
|
87
92
|
});
|
|
88
93
|
return () => {
|
|
89
|
-
const {
|
|
94
|
+
const { titleSpan } = props;
|
|
90
95
|
const stepStyle = {};
|
|
91
96
|
if (isNonNullable(titleSpan) && mergedMode.value !== "alternate") if (typeof titleSpan === "number" && !Number.isNaN(titleSpan)) stepStyle[varName("head-span")] = titleSpan;
|
|
92
97
|
else stepStyle[varName("head-span-ptg")] = titleSpan;
|
|
93
|
-
return createVNode(Steps, mergeProps(omit(attrs, ["class", "style"]), omit(props, [
|
|
98
|
+
return createVNode(Steps, mergeProps(omit$1(attrs, ["class", "style"]), omit$1(props, [
|
|
94
99
|
"items",
|
|
95
100
|
"prefixCls",
|
|
96
101
|
"titleSpan",
|
|
102
|
+
"mode",
|
|
103
|
+
"reverse",
|
|
104
|
+
"pending",
|
|
105
|
+
"pendingDot",
|
|
97
106
|
"dotRender",
|
|
98
107
|
"labelRender",
|
|
99
108
|
"contentRender"
|
|
@@ -106,7 +115,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
106
115
|
"classes": mergedClassNames.value,
|
|
107
116
|
"styles": mergedStyles.value,
|
|
108
117
|
"style": stepStyle,
|
|
109
|
-
"variant":
|
|
118
|
+
"variant": mergedVariant.value,
|
|
110
119
|
"orientation": orientation.value,
|
|
111
120
|
"type": "dot",
|
|
112
121
|
"items": mergedItems.value,
|
|
@@ -192,10 +201,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
192
201
|
type: String,
|
|
193
202
|
required: false
|
|
194
203
|
}
|
|
195
|
-
}, {
|
|
196
|
-
variant: "outlined",
|
|
197
|
-
orientation: "vertical"
|
|
198
|
-
}),
|
|
204
|
+
}, { orientation: "vertical" }),
|
|
199
205
|
name: "ATimeline",
|
|
200
206
|
inheritAttrs: false
|
|
201
207
|
});
|
|
@@ -7,7 +7,7 @@ import { parseColor } from "./util.js";
|
|
|
7
7
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps } from "vue";
|
|
8
8
|
import { clsx } from "@v-c/util";
|
|
9
9
|
import { Popup } from "@v-c/tooltip";
|
|
10
|
-
import { omit } from "es-toolkit/compat";
|
|
10
|
+
import { omit as omit$1 } from "es-toolkit/compat";
|
|
11
11
|
//#region src/tooltip/PurePanel.tsx
|
|
12
12
|
function _isSlot(s) {
|
|
13
13
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -33,7 +33,7 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
|
33
33
|
return createVNode("div", {
|
|
34
34
|
"class": clsx(rootCls.value, hashId.value, cssVarCls.value, prefixCls.value, `${prefixCls.value}-pure`, `${prefixCls.value}-placement-${placement.value}`, attrs.class, colorInfo.value.className),
|
|
35
35
|
"style": arrowContentStyle
|
|
36
|
-
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(omit(props, ["class"]), {
|
|
36
|
+
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(omit$1(props, ["class"]), {
|
|
37
37
|
"className": hashId.value,
|
|
38
38
|
"prefixCls": prefixCls.value,
|
|
39
39
|
"classNames": mergedClassNames.value,
|
package/dist/tooltip/index.js
CHANGED
|
@@ -105,8 +105,8 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
105
105
|
"space": true,
|
|
106
106
|
"form": true
|
|
107
107
|
}, _isSlot(memoOverlay) ? memoOverlay : { default: () => [memoOverlay] });
|
|
108
|
-
|
|
109
|
-
child = isVNode(
|
|
108
|
+
const children = filterEmpty(slots.default?.());
|
|
109
|
+
const child = children.length === 1 && isVNode(children[0]) && typeof children[0].type !== "symbol" ? children[0] : createVNode("span", null, [children]);
|
|
110
110
|
const childProps = child?.props ?? {};
|
|
111
111
|
const childCls = !childProps?.class || typeof childProps?.class === "string" ? clsx(childProps.class, openClass || `${prefixCls.value}-open`) : childProps.class;
|
|
112
112
|
const colorInfo = parseColor(rootPrefixCls.value, prefixCls.value, color);
|
|
@@ -150,10 +150,7 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
150
150
|
"onVisibleChange": onInternalOpenChange,
|
|
151
151
|
"afterVisibleChange": afterOpenChange,
|
|
152
152
|
"arrowContent": createVNode("span", { "class": `${prefixCls.value}-arrow-content` }, null),
|
|
153
|
-
"motion": {
|
|
154
|
-
name: getTransitionName(rootPrefixCls.value, "zoom-big-fast", typeof motion?.name === "string" ? motion?.name : void 0),
|
|
155
|
-
duration: 1e3
|
|
156
|
-
},
|
|
153
|
+
"motion": { name: getTransitionName(rootPrefixCls.value, "zoom-big-fast", typeof motion?.name === "string" ? motion?.name : void 0) },
|
|
157
154
|
"destroyOnHidden": destroyOnHidden
|
|
158
155
|
}), { default: () => [tempOpen && !props.disabled ? createVNode(child, { class: childCls }) : child] });
|
|
159
156
|
return createVNode(ZIndexProvider, { "value": contextZIndex.value }, _isSlot(content) ? content : { default: () => [content] });
|
|
@@ -39,6 +39,7 @@ const genTooltipStyle = (token) => {
|
|
|
39
39
|
maxWidth: tooltipMaxWidth,
|
|
40
40
|
visibility: "visible",
|
|
41
41
|
filter: dropShadowPopover,
|
|
42
|
+
willChange: "transform",
|
|
42
43
|
...sharedTransformOrigin,
|
|
43
44
|
"&-hidden": { display: "none" },
|
|
44
45
|
[varName("arrow-background-color")]: tooltipBg,
|
package/dist/tour/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import PurePanel from "./PurePanel.js";
|
|
|
12
12
|
import { computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
13
13
|
import { clsx } from "@v-c/util";
|
|
14
14
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
15
|
-
import { omit } from "es-toolkit";
|
|
15
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
16
16
|
import VcTour from "@v-c/tour";
|
|
17
17
|
//#region src/tour/index.tsx
|
|
18
18
|
const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
@@ -94,7 +94,7 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
94
94
|
"nextButtonProps": slots?.nextButton
|
|
95
95
|
}, null);
|
|
96
96
|
};
|
|
97
|
-
const restProps = omit(props, [
|
|
97
|
+
const restProps = omit$1(props, [
|
|
98
98
|
"prefixCls",
|
|
99
99
|
"type",
|
|
100
100
|
"indicatorsRender",
|
|
@@ -124,7 +124,6 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
124
124
|
},
|
|
125
125
|
"onFinish": () => {
|
|
126
126
|
emit("finish");
|
|
127
|
-
emit("update:open", false);
|
|
128
127
|
},
|
|
129
128
|
"onPopupAlign": (el, info) => {
|
|
130
129
|
emit("popupAlign", el, info);
|
package/dist/tour/panelRender.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
2
|
+
import { isRenderable } from "../_util/is.js";
|
|
2
3
|
import localeValues from "../locale/en_US.js";
|
|
3
4
|
import useLocale from "../locale/useLocale.js";
|
|
4
5
|
import button_default from "../button/index.js";
|
|
5
|
-
import isNonNullable from "../_util/isNonNullable.js";
|
|
6
6
|
import { Fragment, createVNode, defineComponent, mergeProps } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
8
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
@@ -36,7 +36,7 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
|
|
|
36
36
|
nextButtonProps?.onClick?.(e);
|
|
37
37
|
};
|
|
38
38
|
const _title = getSlotPropsFnRun({}, { title }, "title");
|
|
39
|
-
const headerNode =
|
|
39
|
+
const headerNode = isRenderable(_title) ? createVNode("div", {
|
|
40
40
|
"class": clsx(`${prefixCls}-header`, classes.header),
|
|
41
41
|
"style": styles.header
|
|
42
42
|
}, [createVNode("div", {
|
|
@@ -44,12 +44,12 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
|
|
|
44
44
|
"style": styles.title
|
|
45
45
|
}, [_title])]) : null;
|
|
46
46
|
const _description = getSlotPropsFnRun({}, { description }, "description");
|
|
47
|
-
const descriptionNode =
|
|
47
|
+
const descriptionNode = isRenderable(_description) ? createVNode("div", {
|
|
48
48
|
"class": clsx(`${prefixCls}-description`, classes.description),
|
|
49
49
|
"style": styles.description
|
|
50
50
|
}, [_description]) : null;
|
|
51
51
|
const _cover = getSlotPropsFnRun({}, { cover }, "cover");
|
|
52
|
-
const coverNode =
|
|
52
|
+
const coverNode = isRenderable(_cover) ? createVNode("div", {
|
|
53
53
|
"class": clsx(`${prefixCls}-cover`, classes.cover),
|
|
54
54
|
"style": styles.cover
|
|
55
55
|
}, [_cover]) : null;
|