antdv-next 1.5.4 → 1.5.6
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/PurePanel.js +2 -1
- package/dist/_util/hooks/useMergeSemantic.js +3 -2
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/styleUtils.d.ts +19 -1
- package/dist/_util/styleUtils.js +24 -1
- package/dist/_util/vnode/index.js +5 -5
- package/dist/_util/warning.d.ts +0 -1
- package/dist/affix/index.js +7 -18
- package/dist/alert/Alert.js +11 -12
- package/dist/anchor/Anchor.d.ts +1 -1
- package/dist/anchor/Anchor.js +16 -7
- package/dist/anchor/AnchorLink.js +3 -2
- package/dist/antd-with-locales.esm.js +17656 -16491
- package/dist/antd-with-locales.js +80 -80
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +15077 -14114
- package/dist/antd.js +81 -81
- package/dist/app/App.js +1 -1
- package/dist/app/index.js +0 -3
- package/dist/auto-complete/index.js +11 -4
- package/dist/avatar/Avatar.d.ts +4 -1
- package/dist/avatar/Avatar.js +21 -13
- package/dist/avatar/AvatarGroup.js +2 -2
- package/dist/avatar/index.d.ts +2 -2
- package/dist/badge/Ribbon.js +3 -4
- package/dist/badge/index.js +11 -9
- package/dist/breadcrumb/Breadcrumb.js +6 -3
- package/dist/breadcrumb/BreadcrumbItem.js +4 -3
- package/dist/breadcrumb/useItemRender.js +5 -8
- package/dist/button/Button.js +2 -0
- package/dist/card/Card.js +6 -7
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +7 -8
- package/dist/cascader/Panel.d.ts +1 -0
- package/dist/cascader/Panel.js +2 -1
- package/dist/cascader/index.d.ts +5 -4
- package/dist/cascader/index.js +8 -6
- package/dist/checkbox/Checkbox.js +14 -28
- package/dist/collapse/Collapse.d.ts +2 -3
- package/dist/collapse/Collapse.js +7 -4
- package/dist/color-picker/ColorPicker.js +2 -2
- package/dist/color-picker/components/ColorClear.d.ts +1 -0
- package/dist/color-picker/components/ColorClear.js +14 -4
- package/dist/color-picker/components/ColorPresets.js +4 -4
- package/dist/color-picker/components/ColorSlider.js +8 -2
- package/dist/color-picker/components/ColorTrigger.js +3 -2
- package/dist/color-picker/interface.d.ts +0 -2
- package/dist/color-picker/style/index.js +5 -6
- package/dist/components.d.ts +3 -3
- package/dist/config-provider/context.d.ts +2 -5
- package/dist/config-provider/index.d.ts +2 -2
- package/dist/date-picker/generatePicker/generateRangePicker.d.ts +4 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +3 -1
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +1 -0
- package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -1
- package/dist/date-picker/generatePicker/index.d.ts +1 -1
- package/dist/date-picker/generatePicker/interface.d.ts +0 -2
- package/dist/date-picker/generatePicker/useComponents.d.ts +3 -3
- package/dist/date-picker/index.d.ts +3 -2
- package/dist/date-picker/locale/bn_BD.js +1 -0
- package/dist/date-picker/locale/et_EE.js +8 -0
- package/dist/date-picker/locale/eu_ES.js +8 -0
- package/dist/date-picker/locale/ga_IE.js +1 -0
- package/dist/date-picker/locale/is_IS.js +8 -0
- package/dist/date-picker/locale/ka_GE.js +1 -0
- package/dist/date-picker/locale/kk_KZ.js +1 -0
- package/dist/date-picker/locale/km_KH.js +1 -0
- package/dist/date-picker/locale/kmr_IQ.js +8 -0
- package/dist/date-picker/locale/lv_LV.js +8 -0
- package/dist/date-picker/locale/mk_MK.js +8 -0
- package/dist/date-picker/locale/ml_IN.js +1 -0
- package/dist/date-picker/locale/mn_MN.js +8 -0
- package/dist/date-picker/locale/sl_SI.js +8 -0
- package/dist/date-picker/locale/ta_IN.js +1 -0
- package/dist/date-picker/locale/ur_PK.js +1 -0
- package/dist/date-picker/locale/uz_UZ.js +1 -0
- package/dist/date-picker/util.d.ts +2 -2
- package/dist/descriptions/Row.js +3 -2
- package/dist/descriptions/hooks/useItems.d.ts +8 -8
- package/dist/descriptions/index.js +6 -3
- package/dist/divider/index.d.ts +0 -1
- package/dist/drawer/DrawerPanel.js +4 -1
- package/dist/drawer/index.d.ts +0 -3
- package/dist/drawer/index.js +15 -3
- package/dist/dropdown/index.js +0 -3
- package/dist/float-button/BackTop.d.ts +4 -2
- package/dist/float-button/BackTop.js +12 -4
- package/dist/float-button/FloatButton.d.ts +2 -2
- package/dist/float-button/FloatButton.js +10 -3
- package/dist/float-button/FloatButtonGroup.d.ts +2 -2
- package/dist/float-button/FloatButtonGroup.js +10 -3
- package/dist/float-button/PurePanel.js +20 -8
- package/dist/form/FormItem/index.js +4 -3
- package/dist/form/FormItemInput.js +4 -2
- package/dist/grid/col.js +1 -1
- package/dist/grid/row.js +1 -1
- package/dist/image/PreviewGroup.js +7 -5
- package/dist/image/hooks/usePreviewConfig.d.ts +9 -9
- package/dist/image/hooks/usePreviewConfig.js +1 -1
- package/dist/image/index.js +3 -4
- package/dist/index.d.ts +3 -3
- package/dist/input/Input.d.ts +0 -1
- package/dist/input/Input.js +16 -4
- package/dist/input/OTP/OTPInput.js +16 -4
- package/dist/input/Password.js +12 -3
- package/dist/input/Search.js +16 -4
- package/dist/input/TextArea.d.ts +0 -1
- package/dist/input/TextArea.js +17 -2
- package/dist/input/style/index.d.ts +2 -1
- package/dist/input/style/index.js +12 -11
- package/dist/input/style/variants.js +1 -4
- package/dist/input-number/index.d.ts +0 -1
- package/dist/input-number/index.js +30 -9
- package/dist/input-number/style/index.js +13 -39
- package/dist/listy/index.js +13 -8
- package/dist/listy/interface.d.ts +2 -2
- package/dist/locale/az_AZ.js +4 -0
- package/dist/locale/bn_BD.js +4 -0
- package/dist/locale/by_BY.js +4 -0
- package/dist/locale/eu_ES.js +4 -0
- package/dist/locale/ga_IE.js +4 -0
- package/dist/locale/hy_AM.js +20 -2
- package/dist/locale/is_IS.js +4 -0
- package/dist/locale/ka_GE.js +4 -0
- package/dist/locale/kk_KZ.js +4 -0
- package/dist/locale/km_KH.js +4 -0
- package/dist/locale/kmr_IQ.js +4 -0
- package/dist/locale/kn_IN.js +4 -0
- package/dist/locale/ku_IQ.js +4 -0
- package/dist/locale/mk_MK.js +4 -0
- package/dist/locale/ml_IN.js +4 -0
- package/dist/locale/mn_MN.js +4 -0
- package/dist/locale/mr_IN.js +4 -0
- package/dist/locale/my_MM.js +4 -0
- package/dist/locale/ne_NP.js +4 -0
- package/dist/locale/si_LK.js +4 -0
- package/dist/locale/sq_AL.js +4 -0
- package/dist/locale/ta_IN.js +4 -0
- package/dist/locale/tk_TK.js +4 -0
- package/dist/locale/ur_PK.js +4 -0
- package/dist/locale/uz_UZ.js +4 -0
- package/dist/masonry/Masonry.js +9 -1
- package/dist/mentions/index.d.ts +1 -1
- package/dist/mentions/index.js +7 -3
- package/dist/menu/MenuContext.js +4 -1
- package/dist/menu/MenuItem.js +2 -2
- package/dist/menu/OverrideContext.js +4 -1
- package/dist/menu/index.d.ts +2 -2
- package/dist/message/PurePanel.js +2 -1
- package/dist/message/index.js +14 -9
- package/dist/message/interface.d.ts +8 -0
- package/dist/message/useMessage.d.ts +1 -1
- package/dist/message/useMessage.js +26 -32
- package/dist/modal/ConfirmDialog.js +1 -1
- package/dist/modal/Modal.js +3 -2
- package/dist/modal/PurePanel.js +2 -2
- package/dist/modal/interface.d.ts +0 -6
- package/dist/modal/shared.js +2 -1
- package/dist/notification/PurePanel.d.ts +1 -1
- package/dist/notification/PurePanel.js +12 -10
- package/dist/notification/index.js +4 -1
- package/dist/notification/interface.d.ts +4 -0
- package/dist/notification/useNotification.js +19 -21
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +3 -4
- package/dist/popconfirm/index.js +4 -1
- package/dist/popover/PurePanel.js +8 -2
- package/dist/popover/index.js +4 -1
- package/dist/qrcode/QrcodeStatus.js +4 -1
- package/dist/qrcode/index.js +2 -1
- package/dist/radio/group.js +2 -2
- package/dist/radio/radio.js +2 -2
- package/dist/rate/index.d.ts +1 -1
- package/dist/rate/index.js +1 -5
- package/dist/result/index.js +4 -3
- package/dist/segmented/index.js +8 -2
- package/dist/select/index.d.ts +2 -3
- package/dist/select/index.js +2 -2
- package/dist/skeleton/Element.js +2 -2
- package/dist/slider/SliderTooltip.js +4 -1
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +5 -3
- package/dist/space/Compact.d.ts +1 -1
- package/dist/spin/index.js +2 -2
- package/dist/splitter/Panel.js +12 -3
- package/dist/splitter/SplitBar.js +12 -1
- package/dist/splitter/Splitter.js +2 -1
- package/dist/splitter/hooks/sizeUtil.js +17 -1
- package/dist/splitter/interface.d.ts +3 -1
- package/dist/splitter/style/index.js +6 -1
- package/dist/statistic/Number.js +2 -1
- package/dist/statistic/Statistic.js +2 -2
- package/dist/steps/index.js +3 -4
- package/dist/switch/index.d.ts +0 -2
- package/dist/table/Column.d.ts +5 -1
- package/dist/table/Column.js +10 -1
- package/dist/table/ColumnGroup.js +5 -0
- package/dist/table/InternalTable.d.ts +4 -1
- package/dist/table/InternalTable.js +28 -18
- package/dist/table/Table.js +16 -5
- package/dist/table/hooks/useFilter/index.d.ts +3 -1
- package/dist/table/hooks/useFilter/index.js +2 -2
- package/dist/table/hooks/useSelection.js +7 -3
- package/dist/table/interface.d.ts +10 -3
- package/dist/table/style/index.js +30 -2
- package/dist/table/util.d.ts +1 -1
- package/dist/table/utils.js +20 -2
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +11 -6
- package/dist/tag/CheckableTag.d.ts +0 -3
- package/dist/tag/CheckableTagGroup.js +18 -2
- package/dist/tag/index.js +2 -1
- package/dist/theme/context.d.ts +0 -1
- package/dist/theme/util/alias.js +3 -0
- package/dist/theme/util/genStyleUtils.d.ts +4 -0
- package/dist/time-picker/index.d.ts +8 -3
- package/dist/time-picker/index.js +46 -8
- package/dist/timeline/TimelineItem.js +4 -1
- package/dist/timeline/useItems.js +2 -1
- package/dist/tooltip/PurePanel.js +4 -1
- package/dist/tooltip/index.d.ts +5 -2
- package/dist/tooltip/index.js +4 -1
- package/dist/tooltip/style/index.d.ts +0 -1
- package/dist/tour/index.js +2 -3
- package/dist/tour/interface.d.ts +7 -5
- package/dist/tour/panelRender.js +6 -6
- package/dist/transfer/ListBody.js +1 -1
- package/dist/transfer/Section.js +3 -2
- package/dist/transfer/Transfer.js +37 -13
- package/dist/transfer/hooks/useSelection.js +1 -1
- package/dist/transfer/interface.d.ts +1 -1
- package/dist/tree/DirectoryTree.js +2 -1
- package/dist/tree/Tree.js +6 -6
- package/dist/tree/utils/dictUtil.js +2 -2
- package/dist/tree-select/index.d.ts +2 -3
- package/dist/tree-select/index.js +16 -8
- package/dist/typography/Base/Ellipsis.js +2 -1
- package/dist/typography/Base/index.js +6 -3
- package/dist/typography/Editable.js +2 -1
- package/dist/upload/Dragger.js +2 -4
- package/dist/upload/Upload.d.ts +0 -1
- package/dist/upload/Upload.js +2 -2
- package/dist/upload/UploadList/ListItem.d.ts +1 -0
- package/dist/upload/UploadList/ListItem.js +15 -9
- package/dist/upload/UploadList/index.js +1 -0
- package/dist/upload/interface.d.ts +6 -7
- package/dist/version/token.json +1 -1
- package/package.json +26 -26
- package/web-tags.json +1383 -1377
- package/web-types.json +4046 -4165
package/dist/table/Table.js
CHANGED
|
@@ -16,13 +16,20 @@ const ForwardTable = /* @__PURE__ */ defineComponent((props, { slots, attrs, exp
|
|
|
16
16
|
return tableRef.value?.nativeElement;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
return () => createVNode(InternalTable, mergeProps(omit(props, [
|
|
19
|
+
return () => createVNode(InternalTable, mergeProps(omit(props, [
|
|
20
|
+
"onUpdate:expandedRowKeys",
|
|
21
|
+
"onChange",
|
|
22
|
+
"onResizeColumn"
|
|
23
|
+
]), attrs, {
|
|
20
24
|
"onChange": (pagination, filters, sorter, extra) => {
|
|
21
25
|
emit("change", pagination, filters, sorter, extra);
|
|
22
26
|
},
|
|
23
27
|
"onUpdate:expandedRowKeys": (keys) => {
|
|
24
28
|
emit("update:expandedRowKeys", keys);
|
|
25
29
|
},
|
|
30
|
+
"onResizeColumn": (width, column, columnKey) => {
|
|
31
|
+
emit("resizeColumn", width, column, columnKey);
|
|
32
|
+
},
|
|
26
33
|
"_renderTimes": renderTimesRef.value,
|
|
27
34
|
"ref": tableRef
|
|
28
35
|
}), slots);
|
|
@@ -110,9 +117,12 @@ const ForwardTable = /* @__PURE__ */ defineComponent((props, { slots, attrs, exp
|
|
|
110
117
|
required: false
|
|
111
118
|
},
|
|
112
119
|
rowKey: {
|
|
113
|
-
type: [
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
type: [
|
|
121
|
+
String,
|
|
122
|
+
Number,
|
|
123
|
+
Function
|
|
124
|
+
],
|
|
125
|
+
required: false
|
|
116
126
|
},
|
|
117
127
|
tableLayout: {
|
|
118
128
|
type: String,
|
|
@@ -249,7 +259,8 @@ const ForwardTable = /* @__PURE__ */ defineComponent((props, { slots, attrs, exp
|
|
|
249
259
|
emits: [
|
|
250
260
|
"change",
|
|
251
261
|
"update:expandedRowKeys",
|
|
252
|
-
"scroll"
|
|
262
|
+
"scroll",
|
|
263
|
+
"resizeColumn"
|
|
253
264
|
],
|
|
254
265
|
name: "ATable",
|
|
255
266
|
inheritAttrs: false
|
|
@@ -30,7 +30,9 @@ interface FilterConfig<RecordType = AnyObject> {
|
|
|
30
30
|
getPopupContainer?: GetPopupContainer;
|
|
31
31
|
rootClassName?: string;
|
|
32
32
|
}
|
|
33
|
-
declare function getMergedFilterStates<RecordType extends AnyObject = AnyObject>(rawMergedColumns: ColumnsType<RecordType>, filterStates: FilterState<RecordType>[], warning?: ReturnType<typeof devUseWarning
|
|
33
|
+
declare function getMergedFilterStates<RecordType extends AnyObject = AnyObject>(rawMergedColumns: ColumnsType<RecordType>, filterStates: FilterState<RecordType>[], warning?: ReturnType<typeof devUseWarning>,
|
|
34
|
+
/** Columns before applying the responsive filter. */
|
|
35
|
+
baseColumns?: ColumnsType<RecordType>): FilterState<RecordType>[];
|
|
34
36
|
declare function useFilter<RecordType extends AnyObject = AnyObject>(props: FilterConfig<RecordType>): readonly [TransformColumns<RecordType>, FilterState<RecordType>[], Record<string, FilterValue | null>];
|
|
35
37
|
//#endregion
|
|
36
38
|
export { FilterConfig, FilterState, collectFilterStates, useFilter as default, flattenKeys, generateFilterInfo, getFilterData, getMergedFilterStates };
|
|
@@ -112,8 +112,8 @@ function getMergedColumns(rawMergedColumns) {
|
|
|
112
112
|
return [column];
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
function getMergedFilterStates(rawMergedColumns, filterStates, warning) {
|
|
116
|
-
const mergedColumns = getMergedColumns(rawMergedColumns
|
|
115
|
+
function getMergedFilterStates(rawMergedColumns, filterStates, warning, baseColumns) {
|
|
116
|
+
const mergedColumns = getMergedColumns(baseColumns ?? rawMergedColumns ?? []);
|
|
117
117
|
const collectedStates = collectFilterStates(mergedColumns, false);
|
|
118
118
|
if (collectedStates.length === 0) return collectedStates;
|
|
119
119
|
let filteredKeysIsAllNotControlled = true;
|
|
@@ -55,14 +55,18 @@ function useSelection(config, rowSelection) {
|
|
|
55
55
|
keys.forEach((key) => {
|
|
56
56
|
let record = getRecordByKey(key);
|
|
57
57
|
if (!record && preserveRecordsRef.value.has(key)) record = preserveRecordsRef.value.get(key);
|
|
58
|
-
newCache.set(key, record);
|
|
58
|
+
if (record !== void 0) newCache.set(key, record);
|
|
59
59
|
});
|
|
60
60
|
preserveRecordsRef.value = newCache;
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
watch(
|
|
63
|
+
watch([
|
|
64
|
+
mergedSelectedKeys,
|
|
65
|
+
data,
|
|
66
|
+
preserveSelectedRowKeys
|
|
67
|
+
], ([nextKeys]) => {
|
|
64
68
|
updatePreserveRecordsCache(nextKeys);
|
|
65
|
-
});
|
|
69
|
+
}, { immediate: true });
|
|
66
70
|
const flattedData = computed(() => flattenData(childrenColumnName.value, pageData.value));
|
|
67
71
|
const keyEntities = computed(() => {
|
|
68
72
|
if (checkStrictly.value) return { keyEntities: null };
|
|
@@ -95,6 +95,14 @@ interface CoverableDropdownProps extends DropdownProps {
|
|
|
95
95
|
}
|
|
96
96
|
interface ColumnType<RecordType = AnyObject> extends Omit<ColumnType$1<RecordType>, 'title'> {
|
|
97
97
|
title?: ColumnTitle<RecordType>;
|
|
98
|
+
/**
|
|
99
|
+
* @version >= 1.5.5
|
|
100
|
+
* @nameZH 是否可以拖动调整列宽
|
|
101
|
+
* @nameEN Whether the column width can be resized
|
|
102
|
+
* @desc 在表头边缘拖动时显示代理线,松开后更新列宽并触发 `resizeColumn`;拖动下限为 `minWidth`(默认 40)。
|
|
103
|
+
* @descEN Shows a proxy line while dragging the header edge; on release the width is applied and `resizeColumn` fires. `minWidth` (default 40) is the lower bound.
|
|
104
|
+
*/
|
|
105
|
+
resizable?: boolean;
|
|
98
106
|
sorter?: boolean | CompareFn<RecordType> | {
|
|
99
107
|
compare?: CompareFn<RecordType>;
|
|
100
108
|
/** Config multiple sorter order priority */
|
|
@@ -120,19 +128,16 @@ interface ColumnType<RecordType = AnyObject> extends Omit<ColumnType$1<RecordTyp
|
|
|
120
128
|
onFilter?: (value: Key | boolean, record: RecordType) => boolean;
|
|
121
129
|
/**
|
|
122
130
|
* Can cover `<Dropdown>` props
|
|
123
|
-
* @since 5.22.0
|
|
124
131
|
*/
|
|
125
132
|
filterDropdownProps?: CoverableDropdownProps;
|
|
126
133
|
filterResetToDefaultFilteredValue?: boolean;
|
|
127
134
|
responsive?: Breakpoint[];
|
|
128
135
|
/**
|
|
129
136
|
* @deprecated Please use `filterDropdownProps.open` instead.
|
|
130
|
-
* @since 4.23.0
|
|
131
137
|
*/
|
|
132
138
|
filterDropdownOpen?: boolean;
|
|
133
139
|
/**
|
|
134
140
|
* @deprecated Please use `filterDropdownProps.onOpenChange` instead.
|
|
135
|
-
* @since 4.23.0
|
|
136
141
|
*/
|
|
137
142
|
onFilterDropdownOpenChange?: (open: boolean) => void;
|
|
138
143
|
}
|
|
@@ -146,6 +151,8 @@ interface ColumnGroupType<RecordType = AnyObject> extends Omit<ColumnType<Record
|
|
|
146
151
|
* actual value. Narrow to a group with `'children' in column`. See #673.
|
|
147
152
|
*/
|
|
148
153
|
dataIndex?: never;
|
|
154
|
+
/** Group headers are not resizable; resize their leaf columns instead. Kept as `never` for the same reason as `dataIndex`. */
|
|
155
|
+
resizable?: never;
|
|
149
156
|
}
|
|
150
157
|
type ColumnsType<RecordType = AnyObject> = (ColumnGroupType<RecordType> | ColumnType<RecordType>)[];
|
|
151
158
|
interface SelectionItem {
|
|
@@ -20,7 +20,7 @@ import { unit } from "@antdv-next/cssinjs";
|
|
|
20
20
|
import { FastColor } from "@ant-design/fast-color";
|
|
21
21
|
//#region src/table/style/index.ts
|
|
22
22
|
const genTableStyle = (token) => {
|
|
23
|
-
const { componentCls, fontWeightStrong, tablePaddingVertical, tablePaddingHorizontal, tableExpandColumnWidth, lineWidth, lineType, tableBorderColor, tableFontSize, tableBg, tableRadius, tableHeaderTextColor, motionDurationMid, tableHeaderBg, tableHeaderCellSplitColor, tableFooterTextColor, tableFooterBg, calc } = token;
|
|
23
|
+
const { componentCls, fontWeightStrong, tablePaddingVertical, tablePaddingHorizontal, tableExpandColumnWidth, lineWidth, lineType, tableBorderColor, tableFontSize, tableBg, tableRadius, tableHeaderTextColor, motionDurationMid, tableHeaderBg, tableHeaderCellSplitColor, tableFooterTextColor, tableFooterBg, zIndexTableFixed, calc } = token;
|
|
24
24
|
const tableBorder = `${unit(lineWidth)} ${lineType} ${tableBorderColor}`;
|
|
25
25
|
return { [`${componentCls}-wrapper`]: {
|
|
26
26
|
clear: "both",
|
|
@@ -29,11 +29,16 @@ const genTableStyle = (token) => {
|
|
|
29
29
|
...clearFix(),
|
|
30
30
|
[componentCls]: {
|
|
31
31
|
...resetComponent(token),
|
|
32
|
+
position: "relative",
|
|
32
33
|
fontSize: tableFontSize,
|
|
33
34
|
background: tableBg,
|
|
34
35
|
borderRadius: `${unit(tableRadius)} ${unit(tableRadius)} 0 0`,
|
|
35
36
|
scrollbarColor: `${token.tableScrollThumbBg} ${token.tableScrollBg}`
|
|
36
37
|
},
|
|
38
|
+
[`${componentCls}-resize-proxy`]: {
|
|
39
|
+
borderLeft: `${unit(lineWidth)} solid ${token.colorPrimary}`,
|
|
40
|
+
zIndex: `calc(var(--columns-count, 0) * 2 + ${zIndexTableFixed} + 2)`
|
|
41
|
+
},
|
|
37
42
|
table: {
|
|
38
43
|
width: "100%",
|
|
39
44
|
textAlign: "start",
|
|
@@ -79,7 +84,30 @@ const genTableStyle = (token) => {
|
|
|
79
84
|
content: "\"\""
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
|
-
"> tr:not(:last-child) > th[colspan]": { borderBottom: 0 }
|
|
87
|
+
"> tr:not(:last-child) > th[colspan]": { borderBottom: 0 },
|
|
88
|
+
[`${componentCls}-resize-handle`]: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
top: 0,
|
|
91
|
+
insetInlineEnd: calc(lineWidth).mul(-4).equal(),
|
|
92
|
+
width: calc(lineWidth).mul(8).equal(),
|
|
93
|
+
height: "100%",
|
|
94
|
+
cursor: "col-resize",
|
|
95
|
+
userSelect: "none",
|
|
96
|
+
zIndex: 1,
|
|
97
|
+
"&::after": {
|
|
98
|
+
position: "absolute",
|
|
99
|
+
top: 0,
|
|
100
|
+
bottom: 0,
|
|
101
|
+
insetInlineStart: calc(lineWidth).mul(3).equal(),
|
|
102
|
+
width: calc(lineWidth).mul(2).equal(),
|
|
103
|
+
background: token.colorPrimary,
|
|
104
|
+
opacity: 0,
|
|
105
|
+
transition: `opacity ${motionDurationMid}`,
|
|
106
|
+
content: "\"\""
|
|
107
|
+
},
|
|
108
|
+
"&:hover::after": { opacity: 1 }
|
|
109
|
+
},
|
|
110
|
+
[`> tr > th:last-child > ${componentCls}-resize-handle, > tr > ${componentCls}-cell-ellipsis > ${componentCls}-resize-handle`]: { insetInlineEnd: 0 }
|
|
83
111
|
},
|
|
84
112
|
[`${componentCls}-tbody`]: { "> tr": {
|
|
85
113
|
"> th, > td": {
|
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): "
|
|
14
|
+
declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "start" | "end" | "center";
|
|
15
15
|
declare function getPaginationSize(paginationSize: SizeType, mergedSize: SizeType): SizeType;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
|
package/dist/table/utils.js
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
import { isVNode } from "vue";
|
|
1
|
+
import { camelize, isVNode } from "vue";
|
|
2
2
|
import { flattenChildren } from "@v-c/util/dist/props-util";
|
|
3
3
|
//#region src/table/utils.ts
|
|
4
|
+
const COLUMN_BOOLEAN_PROPS = {
|
|
5
|
+
hidden: () => true,
|
|
6
|
+
ellipsis: () => true,
|
|
7
|
+
sorter: () => true,
|
|
8
|
+
resizable: () => true,
|
|
9
|
+
fixed: () => "left"
|
|
10
|
+
};
|
|
11
|
+
function camelizeProps(props) {
|
|
12
|
+
const result = {};
|
|
13
|
+
for (const key in props) {
|
|
14
|
+
let value = props[key];
|
|
15
|
+
const camelKey = key.includes("-") ? camelize(key) : key;
|
|
16
|
+
const cast = COLUMN_BOOLEAN_PROPS[camelKey];
|
|
17
|
+
if (cast && (value === "" || value === key)) value = cast();
|
|
18
|
+
result[camelKey] = value;
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
4
22
|
function convertColumnsToColumnProps(children) {
|
|
5
23
|
return flattenChildren(children).filter((node) => isVNode(node)).map((node) => {
|
|
6
24
|
const { key, props, children: nodeChildren } = node;
|
|
7
25
|
const column = {
|
|
8
26
|
key,
|
|
9
|
-
...props
|
|
27
|
+
...props ? camelizeProps(props) : {}
|
|
10
28
|
};
|
|
11
29
|
if (nodeChildren?.default) column.children = convertColumnsToColumnProps(nodeChildren.default());
|
|
12
30
|
return column;
|
package/dist/tabs/index.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ interface BaseTabsProps<Item extends Tab = TabItem> extends ComponentBaseProps {
|
|
|
61
61
|
/** @deprecated please use `tabPlacement` instead */
|
|
62
62
|
tabPosition?: TabPosition;
|
|
63
63
|
tabPlacement?: TabPlacement;
|
|
64
|
+
/** Scroll alignment of the active tab when switching. `auto` keeps the legacy edge-aligned behavior. */
|
|
65
|
+
scrollPosition?: TabsProps$1['scrollPosition'];
|
|
64
66
|
/** @deprecated Please use `indicator={{ size: ... }}` instead */
|
|
65
67
|
indicatorSize?: GetIndicatorSize;
|
|
66
68
|
items?: Item[];
|
package/dist/tabs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
|
-
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
-
import { getSlotPropsFnRun, toPropsRefs
|
|
4
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
+
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import useAnimateConfig from "./hooks/useAnimateConfig.js";
|
|
8
8
|
import TabPane from "./TabPane.js";
|
|
@@ -10,18 +10,18 @@ import useLegacyItems from "./hooks/useLegacyItems.js";
|
|
|
10
10
|
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
|
-
import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
14
13
|
import { CloseOutlined, EllipsisOutlined, PlusOutlined } from "@antdv-next/icons";
|
|
15
14
|
import { omit } from "es-toolkit";
|
|
16
15
|
import VcTabs from "@v-c/tabs";
|
|
17
16
|
//#region src/tabs/index.tsx
|
|
18
17
|
const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expose }) => {
|
|
19
|
-
const { classes, styles, type, size: customSize, tabPlacement: tabPlacementProp, tabPosition, hideAdd, centered, indicatorSize } = toPropsRefs
|
|
18
|
+
const { classes, styles, type, size: customSize, tabPlacement: tabPlacementProp, tabPosition, hideAdd, centered, indicatorSize } = toPropsRefs(props, "classes", "styles", "type", "size", "tabPlacement", "tabPosition", "hideAdd", "centered", "indicatorSize");
|
|
20
19
|
const more = toRef(props, "more");
|
|
21
20
|
const popupClassName = toRef(props, "popupClassName");
|
|
22
21
|
const indicator = toRef(props, "indicator");
|
|
23
|
-
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls } = useComponentBaseConfig("tabs", props);
|
|
22
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls, scrollPosition: contextScrollPosition } = useComponentBaseConfig("tabs", props, ["scrollPosition"]);
|
|
24
23
|
const size = useSize(customSize);
|
|
24
|
+
const mergedScrollPosition = computed(() => props.scrollPosition ?? contextScrollPosition.value);
|
|
25
25
|
const mergedPlacement = computed(() => {
|
|
26
26
|
const placement = tabPlacementProp.value ?? tabPosition.value;
|
|
27
27
|
const isRTL = direction.value === "rtl";
|
|
@@ -155,7 +155,6 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
155
155
|
}
|
|
156
156
|
return createVNode(VcTabs, mergeProps({
|
|
157
157
|
"ref": tabsRef,
|
|
158
|
-
"direction": direction.value,
|
|
159
158
|
"getPopupContainer": getPopupContainer
|
|
160
159
|
}, restAttrs, restProps, {
|
|
161
160
|
"items": mergedItems.value,
|
|
@@ -176,8 +175,10 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
176
175
|
"prefixCls": prefixCls.value,
|
|
177
176
|
"animated": mergedAnimated.value,
|
|
178
177
|
"indicator": mergedIndicator.value,
|
|
178
|
+
"scrollPosition": mergedScrollPosition.value,
|
|
179
179
|
"destroyOnHidden": props.destroyOnHidden ?? props.destroyInactiveTabPane,
|
|
180
180
|
"tabPosition": mergedPlacement.value,
|
|
181
|
+
"direction": props.direction ?? direction.value,
|
|
181
182
|
"onChange": onInternalChange,
|
|
182
183
|
"onTabClick": onInternalTabClick,
|
|
183
184
|
"onTabScroll": onInternalTabScroll
|
|
@@ -267,6 +268,10 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
|
|
|
267
268
|
type: String,
|
|
268
269
|
required: false
|
|
269
270
|
},
|
|
271
|
+
scrollPosition: {
|
|
272
|
+
type: [String, Number],
|
|
273
|
+
required: false
|
|
274
|
+
},
|
|
270
275
|
indicatorSize: {
|
|
271
276
|
type: [Number, Function],
|
|
272
277
|
required: false
|
|
@@ -106,8 +106,24 @@ const CheckableTagGroup = /* @__PURE__ */ defineComponent((props, { emit, attrs,
|
|
|
106
106
|
required: false,
|
|
107
107
|
default: void 0
|
|
108
108
|
},
|
|
109
|
-
value: {
|
|
110
|
-
|
|
109
|
+
value: {
|
|
110
|
+
type: [
|
|
111
|
+
String,
|
|
112
|
+
Number,
|
|
113
|
+
null,
|
|
114
|
+
Array
|
|
115
|
+
],
|
|
116
|
+
required: false
|
|
117
|
+
},
|
|
118
|
+
defaultValue: {
|
|
119
|
+
type: [
|
|
120
|
+
String,
|
|
121
|
+
Number,
|
|
122
|
+
null,
|
|
123
|
+
Array
|
|
124
|
+
],
|
|
125
|
+
required: false
|
|
126
|
+
},
|
|
111
127
|
onChange: {
|
|
112
128
|
type: Function,
|
|
113
129
|
required: false
|
package/dist/tag/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
2
|
+
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
2
3
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
4
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
4
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -100,7 +101,7 @@ const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
100
101
|
const tagStyle = computed(() => {
|
|
101
102
|
let nextTagStyle = {
|
|
102
103
|
...mergedStyles.value?.root,
|
|
103
|
-
...attrs.style
|
|
104
|
+
...normalizeStyle$1(attrs.style) || {}
|
|
104
105
|
};
|
|
105
106
|
if (!mergedDisabled.value) nextTagStyle = {
|
|
106
107
|
...customTagStyle.value,
|
package/dist/theme/context.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ interface DesignTokenProviderProps {
|
|
|
34
34
|
* @descCN 开启零运行时模式,不会在运行时产生样式,需要手动引入 CSS 文件。
|
|
35
35
|
* @descEN Enable zero-runtime mode, which will not generate style at runtime, need to import additional CSS file.
|
|
36
36
|
* @default true
|
|
37
|
-
* @since 6.0.0
|
|
38
37
|
* @example
|
|
39
38
|
* ```tsx
|
|
40
39
|
* import { ConfigProvider } from 'antd';
|
package/dist/theme/util/alias.js
CHANGED
|
@@ -56,6 +56,9 @@ function formatToken(derivativeToken) {
|
|
|
56
56
|
colorWarningOutline: getAlphaColor(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
|
|
57
57
|
colorErrorAffix: mergedToken.colorError,
|
|
58
58
|
colorWarningAffix: mergedToken.colorWarning,
|
|
59
|
+
fontHeight: Math.round(mergedToken.fontSize * mergedToken.lineHeight),
|
|
60
|
+
fontHeightSM: Math.round(mergedToken.fontSizeSM * mergedToken.lineHeightSM),
|
|
61
|
+
fontHeightLG: Math.round(mergedToken.fontSizeLG * mergedToken.lineHeightLG),
|
|
59
62
|
fontSizeIcon: mergedToken.fontSizeSM,
|
|
60
63
|
lineWidthFocus: mergedToken.focusOutline === false ? 0 : mergedToken.lineWidth * 3,
|
|
61
64
|
lineWidth: mergedToken.lineWidth,
|
|
@@ -18,6 +18,10 @@ declare const genComponentStyleHook: <C extends keyof ComponentTokenMap>(compone
|
|
|
18
18
|
clientOnly?: boolean;
|
|
19
19
|
order?: number;
|
|
20
20
|
injectStyle?: boolean;
|
|
21
|
+
extraCssVarPrefixCls?: string[] | ((info: {
|
|
22
|
+
prefixCls: string;
|
|
23
|
+
rootCls: string;
|
|
24
|
+
}) => string[]);
|
|
21
25
|
} | undefined) => (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>], genSubStyleComponent: <C extends keyof ComponentTokenMap>(componentName: C | [C, string], styleFn: import("@antdv-next/cssinjs").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("@antdv-next/cssinjs").GetDefaultToken<ComponentTokenMap, AliasToken, C> | undefined, options?: {
|
|
22
26
|
resetStyle?: boolean;
|
|
23
27
|
resetFont?: boolean;
|
|
@@ -4,6 +4,7 @@ import "../_util/hooks/index.js";
|
|
|
4
4
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
5
5
|
import "../date-picker/generatePicker/index.js";
|
|
6
6
|
import { PickerProps as PickerProps$1, RangePickerProps as RangePickerProps$1 } from "../date-picker/generatePicker/interface.js";
|
|
7
|
+
import { RangePickerSlots } from "../date-picker/generatePicker/generateRangePicker.js";
|
|
7
8
|
import { CSSProperties, SlotsType } from "vue";
|
|
8
9
|
import { PickerMode } from "@v-c/picker";
|
|
9
10
|
//#region src/time-picker/index.d.ts
|
|
@@ -70,9 +71,11 @@ interface TimeRangePickerEmits<DateType = AnyObject> {
|
|
|
70
71
|
'blur': (e: FocusEvent, info: any) => void;
|
|
71
72
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
interface TimeRangePickerSlots extends RangePickerSlots<number> {}
|
|
75
|
+
declare const RangePicker$1: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>, SlotsType<TimeRangePickerSlots>, TimeRangePickerProps, import("vue").PublicProps>;
|
|
74
76
|
type BaseTimePickerProps = Omit<PickerTimeProps<AnyObject>, 'picker' | 'classes' | 'styles' | 'onKeydown'>;
|
|
75
77
|
interface TimePickerProps extends BaseTimePickerProps, Omit<TimePickerEmitsProps, keyof BaseTimePickerProps> {
|
|
78
|
+
/** @deprecated Please use `renderExtraFooter` instead */
|
|
76
79
|
addon?: () => VueNode;
|
|
77
80
|
status?: InputStatus;
|
|
78
81
|
/** @deprecated Please use `classes.popup` instead */
|
|
@@ -84,9 +87,11 @@ interface TimePickerProps extends BaseTimePickerProps, Omit<TimePickerEmitsProps
|
|
|
84
87
|
styles?: TimePickerStyles;
|
|
85
88
|
}
|
|
86
89
|
interface TimePickerSlots {
|
|
90
|
+
/** @deprecated Please use `renderExtraFooter` instead */
|
|
87
91
|
addon?: () => any;
|
|
88
92
|
renderExtraFooter?: (mode: PickerMode) => any;
|
|
89
93
|
suffixIcon?: () => any;
|
|
94
|
+
prefix?: () => any;
|
|
90
95
|
[key: string]: any;
|
|
91
96
|
}
|
|
92
97
|
interface TimePickerEmits<DateType = AnyObject> {
|
|
@@ -130,6 +135,6 @@ type MergedTimePicker = typeof TimePicker & {
|
|
|
130
135
|
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
131
136
|
};
|
|
132
137
|
declare const _default: MergedTimePicker;
|
|
133
|
-
declare const TimeRangePicker: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>,
|
|
138
|
+
declare const TimeRangePicker: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>, SlotsType<TimeRangePickerSlots>, TimeRangePickerProps, import("vue").PublicProps>;
|
|
134
139
|
//#endregion
|
|
135
|
-
export { MergedTimePicker, PickerTimeProps, RangePickerTimeProps, TimePickerClassNames, TimePickerEmits, TimePickerEmitsProps, TimePickerLocale, TimePickerPanelSemanticClassNames, TimePickerPanelSemanticName, TimePickerPanelSemanticStyles, TimePickerProps, TimePickerSemanticClassNames, TimePickerSemanticName, TimePickerSemanticStyles, TimePickerSlots, TimePickerStyles, TimeRangePicker, TimeRangePickerEmits, TimeRangePickerEmitsProps, TimeRangePickerProps, _default as default };
|
|
140
|
+
export { MergedTimePicker, PickerTimeProps, RangePickerTimeProps, TimePickerClassNames, TimePickerEmits, TimePickerEmitsProps, TimePickerLocale, TimePickerPanelSemanticClassNames, TimePickerPanelSemanticName, TimePickerPanelSemanticStyles, TimePickerProps, TimePickerSemanticClassNames, TimePickerSemanticName, TimePickerSemanticStyles, TimePickerSlots, TimePickerStyles, TimeRangePicker, TimeRangePickerEmits, TimeRangePickerEmitsProps, TimeRangePickerProps, TimeRangePickerSlots, _default as default };
|
|
@@ -1374,7 +1374,7 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
1374
1374
|
});
|
|
1375
1375
|
const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, attrs }) => {
|
|
1376
1376
|
const { variant, bordered, classes, styles, popupClassName, popupStyle } = toPropsRefs(props, "variant", "bordered", "classes", "styles", "popupClassName", "popupStyle");
|
|
1377
|
-
if (isDev) devUseWarning("TimePicker").deprecated(!props.addon, "addon", "renderExtraFooter");
|
|
1377
|
+
if (isDev) devUseWarning("TimePicker").deprecated(!props.addon && !slots.addon, "addon", "renderExtraFooter");
|
|
1378
1378
|
const [mergedVariant] = useVariants("timePicker", variant, bordered);
|
|
1379
1379
|
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic("timePicker", classes, styles, popupClassName, popupStyle, computed(() => ({
|
|
1380
1380
|
...props,
|
|
@@ -1523,14 +1523,43 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1523
1523
|
type: Function,
|
|
1524
1524
|
required: false
|
|
1525
1525
|
},
|
|
1526
|
-
value: {
|
|
1527
|
-
|
|
1526
|
+
value: {
|
|
1527
|
+
type: [
|
|
1528
|
+
Object,
|
|
1529
|
+
Array,
|
|
1530
|
+
String,
|
|
1531
|
+
null
|
|
1532
|
+
],
|
|
1533
|
+
required: false
|
|
1534
|
+
},
|
|
1535
|
+
defaultValue: {
|
|
1536
|
+
type: [
|
|
1537
|
+
Object,
|
|
1538
|
+
Array,
|
|
1539
|
+
String
|
|
1540
|
+
],
|
|
1541
|
+
required: false
|
|
1542
|
+
},
|
|
1528
1543
|
placeholder: {
|
|
1529
1544
|
type: String,
|
|
1530
1545
|
required: false
|
|
1531
1546
|
},
|
|
1532
|
-
defaultPickerValue: {
|
|
1533
|
-
|
|
1547
|
+
defaultPickerValue: {
|
|
1548
|
+
type: [
|
|
1549
|
+
Object,
|
|
1550
|
+
String,
|
|
1551
|
+
null
|
|
1552
|
+
],
|
|
1553
|
+
required: false
|
|
1554
|
+
},
|
|
1555
|
+
pickerValue: {
|
|
1556
|
+
type: [
|
|
1557
|
+
Object,
|
|
1558
|
+
String,
|
|
1559
|
+
null
|
|
1560
|
+
],
|
|
1561
|
+
required: false
|
|
1562
|
+
},
|
|
1534
1563
|
onPickerValueChange: {
|
|
1535
1564
|
type: Function,
|
|
1536
1565
|
required: false
|
|
@@ -1645,9 +1674,18 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1645
1674
|
type: Function,
|
|
1646
1675
|
required: false
|
|
1647
1676
|
},
|
|
1648
|
-
minDate: {
|
|
1649
|
-
|
|
1650
|
-
|
|
1677
|
+
minDate: {
|
|
1678
|
+
type: Object,
|
|
1679
|
+
required: false
|
|
1680
|
+
},
|
|
1681
|
+
maxDate: {
|
|
1682
|
+
type: Object,
|
|
1683
|
+
required: false
|
|
1684
|
+
},
|
|
1685
|
+
defaultOpenValue: {
|
|
1686
|
+
type: Object,
|
|
1687
|
+
required: false
|
|
1688
|
+
},
|
|
1651
1689
|
defaultOpen: {
|
|
1652
1690
|
type: Boolean,
|
|
1653
1691
|
required: false,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
2
|
+
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
2
3
|
import { computed, createVNode } from "vue";
|
|
3
4
|
import { classNames } from "@v-c/util";
|
|
4
5
|
import { LoadingOutlined } from "@antdv-next/icons";
|
|
@@ -23,7 +24,7 @@ function useItems(rootPrefixCls, prefixCls, mode, items, pending, pendingDot, re
|
|
|
23
24
|
].includes(color)) mergedClass = classNames(className, `${itemCls.value}-color-${color}`);
|
|
24
25
|
else mergedStyle = {
|
|
25
26
|
[varName("item-icon-dot-color")]: color,
|
|
26
|
-
...style
|
|
27
|
+
...normalizeStyle$1(style) || {}
|
|
27
28
|
};
|
|
28
29
|
const mergedPlacement = placement ?? position ?? (mode.value === "alternate" ? index % 2 === 0 ? "start" : "end" : mode.value);
|
|
29
30
|
mergedClass = classNames(mergedClass, `${itemCls.value}-placement-${mergedPlacement}`);
|
|
@@ -156,7 +156,10 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
|
156
156
|
type: Function,
|
|
157
157
|
required: false
|
|
158
158
|
},
|
|
159
|
-
motion: {
|
|
159
|
+
motion: {
|
|
160
|
+
type: Object,
|
|
161
|
+
required: false
|
|
162
|
+
},
|
|
160
163
|
rootClass: {
|
|
161
164
|
type: String,
|
|
162
165
|
required: false
|
package/dist/tooltip/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import PurePanel from "./PurePanel.js";
|
|
|
7
7
|
import UniqueProvider from "./UniqueProvider/index.js";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
9
9
|
import { CSSProperties, SlotsType } from "vue";
|
|
10
|
-
import {
|
|
10
|
+
import { placements } from "@v-c/tooltip";
|
|
11
11
|
import { ActionType, AlignType } from "@v-c/trigger";
|
|
12
12
|
import { LiteralUnion } from "@v-c/util/dist/type";
|
|
13
13
|
//#region src/tooltip/index.d.ts
|
|
@@ -67,7 +67,10 @@ interface TriggerCommonApi extends ComponentBaseProps {
|
|
|
67
67
|
classes?: TooltipClassNamesType;
|
|
68
68
|
styles?: TooltipStylesType;
|
|
69
69
|
getTooltipContainer?: (node: HTMLElement) => HTMLElement;
|
|
70
|
-
motion
|
|
70
|
+
/** Only the transition `name` is honoured; the rest of the motion config is managed internally */
|
|
71
|
+
motion?: {
|
|
72
|
+
name?: string;
|
|
73
|
+
};
|
|
71
74
|
}
|
|
72
75
|
interface TooltipProps extends TriggerCommonApi, TooltipEmitsProps {
|
|
73
76
|
afterOpenChange?: (open: boolean) => void;
|
package/dist/tooltip/index.js
CHANGED
|
@@ -279,7 +279,10 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
279
279
|
type: Function,
|
|
280
280
|
required: false
|
|
281
281
|
},
|
|
282
|
-
motion: {
|
|
282
|
+
motion: {
|
|
283
|
+
type: Object,
|
|
284
|
+
required: false
|
|
285
|
+
},
|
|
283
286
|
rootClass: {
|
|
284
287
|
type: String,
|
|
285
288
|
required: false
|
package/dist/tour/index.js
CHANGED
|
@@ -241,9 +241,8 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
241
241
|
default: void 0
|
|
242
242
|
},
|
|
243
243
|
builtinPlacements: {
|
|
244
|
-
type: Function,
|
|
245
|
-
required: false
|
|
246
|
-
skipCheck: true
|
|
244
|
+
type: [Object, Function],
|
|
245
|
+
required: false
|
|
247
246
|
},
|
|
248
247
|
disabledInteraction: {
|
|
249
248
|
type: Boolean,
|
package/dist/tour/interface.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ButtonProps } from "../button/Button.js";
|
|
6
|
+
import "../button/index.js";
|
|
7
|
+
import { CSSProperties, StyleValue } from "vue";
|
|
6
8
|
import { TourProps as TourProps$1, TourStepProps as TourStepProps$1 } from "@v-c/tour";
|
|
7
9
|
//#region src/tour/interface.d.ts
|
|
8
10
|
type TourSemanticName = keyof TourSemanticClassNames & keyof TourSemanticStyles;
|
|
@@ -90,15 +92,15 @@ interface TourStepProps extends Omit<TourStepProps$1, 'className'> {
|
|
|
90
92
|
cover?: VueNode;
|
|
91
93
|
nextButtonProps?: {
|
|
92
94
|
children?: VueNode;
|
|
93
|
-
onClick?:
|
|
95
|
+
onClick?: ButtonProps['onClick'];
|
|
94
96
|
class?: string;
|
|
95
|
-
style?:
|
|
97
|
+
style?: StyleValue;
|
|
96
98
|
};
|
|
97
99
|
prevButtonProps?: {
|
|
98
100
|
children?: VueNode;
|
|
99
|
-
onClick?:
|
|
101
|
+
onClick?: ButtonProps['onClick'];
|
|
100
102
|
class?: string;
|
|
101
|
-
style?:
|
|
103
|
+
style?: StyleValue;
|
|
102
104
|
};
|
|
103
105
|
type?: 'default' | 'primary';
|
|
104
106
|
classes?: SemanticClassNames<TourSemanticName>;
|