antdv-next 1.4.1 → 1.4.3
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/useClosable.d.ts +5 -5
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +8 -4
- package/dist/alert/Alert.d.ts +7 -7
- package/dist/antd-with-locales.esm.js +13344 -11050
- package/dist/antd-with-locales.js +80 -80
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +10337 -9090
- package/dist/antd.js +74 -74
- package/dist/auto-complete/index.d.ts +4 -4
- package/dist/avatar/Avatar.d.ts +3 -3
- package/dist/badge/Ribbon.d.ts +2 -2
- package/dist/badge/index.d.ts +3 -3
- package/dist/border-beam/style/index.js +2 -2
- package/dist/breadcrumb/Breadcrumb.d.ts +4 -4
- package/dist/breadcrumb/BreadcrumbItem.d.ts +4 -4
- package/dist/button/Button.d.ts +2 -2
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/button/style/index.js +13 -0
- package/dist/calendar/generateCalendar.d.ts +8 -8
- package/dist/card/Card.d.ts +9 -9
- package/dist/card/CardMeta.d.ts +4 -4
- package/dist/carousel/index.d.ts +3 -3
- package/dist/cascader/Panel.js +26 -2
- package/dist/cascader/index.d.ts +53 -21
- package/dist/cascader/index.js +33 -5
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.js +4 -4
- package/dist/checkbox/Group.d.ts +2 -2
- package/dist/checkbox/style/index.js +3 -3
- package/dist/collapse/Collapse.d.ts +3 -3
- package/dist/collapse/CollapsePanel.d.ts +3 -3
- package/dist/color-picker/hooks/useModeColor.d.ts +2 -2
- package/dist/color-picker/interface.d.ts +2 -2
- package/dist/config-provider/context.d.ts +20 -14
- package/dist/config-provider/index.js +1 -1
- package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +112 -10
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +101 -11
- package/dist/date-picker/util.d.ts +10 -1
- package/dist/descriptions/Item.d.ts +3 -3
- package/dist/descriptions/hooks/useItems.d.ts +11 -11
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/descriptions/style/index.js +2 -3
- package/dist/drawer/DrawerPanel.d.ts +5 -5
- package/dist/empty/index.d.ts +3 -3
- package/dist/float-button/FloatButton.d.ts +5 -5
- package/dist/float-button/FloatButton.js +1 -1
- package/dist/float-button/FloatButtonGroup.d.ts +2 -2
- package/dist/form/ErrorList.d.ts +2 -2
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/image/index.d.ts +2 -2
- package/dist/input/Input.d.ts +5 -5
- package/dist/input/OTP/index.d.ts +2 -2
- package/dist/input/Password.d.ts +2 -2
- package/dist/input/Search.d.ts +3 -3
- package/dist/input/TextArea.js +1 -1
- package/dist/input/style/search.js +1 -0
- package/dist/input-number/index.d.ts +8 -8
- package/dist/input-number/index.js +0 -4
- package/dist/layout/layout.js +54 -48
- package/dist/locale/ar_EG.js +18 -4
- package/dist/locale/az_AZ.js +2 -1
- package/dist/locale/bg_BG.js +44 -3
- package/dist/locale/bn_BD.js +20 -4
- package/dist/locale/by_BY.js +17 -3
- package/dist/locale/ca_ES.js +22 -4
- package/dist/locale/cs_CZ.js +6 -3
- package/dist/locale/da_DK.js +34 -3
- package/dist/locale/de_DE.js +14 -4
- package/dist/locale/el_GR.js +4 -2
- package/dist/locale/en_GB.js +6 -3
- package/dist/locale/en_US.js +2 -1
- package/dist/locale/es_ES.js +17 -3
- package/dist/locale/et_EE.js +17 -3
- package/dist/locale/eu_ES.js +8 -4
- package/dist/locale/fa_IR.js +2 -1
- package/dist/locale/fi_FI.js +35 -4
- package/dist/locale/fr_BE.js +20 -3
- package/dist/locale/fr_CA.js +20 -3
- package/dist/locale/fr_FR.js +20 -3
- package/dist/locale/ga_IE.js +24 -5
- package/dist/locale/gl_ES.js +36 -5
- package/dist/locale/he_IL.js +30 -5
- package/dist/locale/hi_IN.js +20 -4
- package/dist/locale/hr_HR.js +21 -4
- package/dist/locale/hu_HU.js +43 -3
- package/dist/locale/hy_AM.js +33 -4
- package/dist/locale/id_ID.js +2 -1
- package/dist/locale/is_IS.js +44 -3
- package/dist/locale/it_IT.js +6 -3
- package/dist/locale/ja_JP.js +2 -1
- package/dist/locale/ka_GE.js +20 -4
- package/dist/locale/kk_KZ.js +22 -5
- package/dist/locale/km_KH.js +35 -4
- package/dist/locale/kmr_IQ.js +45 -4
- package/dist/locale/kn_IN.js +18 -3
- package/dist/locale/ko_KR.js +8 -4
- package/dist/locale/ku_IQ.js +45 -4
- package/dist/locale/lt_LT.js +8 -4
- package/dist/locale/lv_LV.js +45 -4
- package/dist/locale/mk_MK.js +36 -4
- package/dist/locale/ml_IN.js +20 -4
- package/dist/locale/mn_MN.js +17 -3
- package/dist/locale/mr_IN.js +13 -1
- package/dist/locale/ms_MY.js +8 -4
- package/dist/locale/my_MM.js +18 -5
- package/dist/locale/ne_NP.js +2 -1
- package/dist/locale/nl_BE.js +20 -4
- package/dist/locale/nl_NL.js +20 -4
- package/dist/locale/pl_PL.js +17 -3
- package/dist/locale/pt_BR.js +6 -3
- package/dist/locale/pt_PT.js +2 -1
- package/dist/locale/ro_RO.js +20 -4
- package/dist/locale/ru_RU.js +4 -2
- package/dist/locale/si_LK.js +17 -3
- package/dist/locale/sk_SK.js +17 -3
- package/dist/locale/sl_SI.js +45 -4
- package/dist/locale/sr_RS.js +20 -4
- package/dist/locale/sv_SE.js +14 -4
- package/dist/locale/ta_IN.js +23 -5
- package/dist/locale/th_TH.js +2 -1
- package/dist/locale/tk_TK.js +21 -5
- package/dist/locale/tr_TR.js +17 -2
- package/dist/locale/uk_UA.js +12 -3
- package/dist/locale/ur_PK.js +20 -4
- package/dist/locale/uz_UZ.js +14 -4
- package/dist/locale/vi_VN.js +2 -1
- package/dist/locale/zh_CN.js +2 -1
- package/dist/locale/zh_HK.js +4 -2
- package/dist/locale/zh_TW.js +4 -2
- package/dist/masonry/Masonry.d.ts +18 -10
- package/dist/masonry/MasonryItem.d.ts +2 -2
- package/dist/mentions/index.d.ts +4 -4
- package/dist/mentions/index.js +62 -1
- package/dist/menu/MenuItem.d.ts +3 -3
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/MenuItemGroup.d.ts +2 -2
- package/dist/menu/OverrideContext.d.ts +2 -2
- package/dist/menu/SubMenu.d.ts +2 -2
- package/dist/message/PureList.d.ts +3 -1
- package/dist/message/PureList.js +4 -0
- package/dist/message/interface.d.ts +3 -3
- package/dist/modal/ConfirmDialog.d.ts +5 -1
- package/dist/modal/ConfirmDialog.js +40 -19
- package/dist/modal/Modal.d.ts +12 -3
- package/dist/modal/Modal.js +24 -7
- package/dist/modal/interface.d.ts +14 -14
- package/dist/notification/PureList.d.ts +3 -1
- package/dist/notification/PureList.js +4 -0
- package/dist/notification/interface.d.ts +8 -8
- package/dist/notification/util.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +1 -1
- package/dist/pagination/interface.d.ts +7 -7
- package/dist/pagination/style/index.js +1 -1
- package/dist/popconfirm/index.d.ts +6 -6
- package/dist/popover/index.d.ts +4 -4
- package/dist/radio/radio.js +4 -4
- package/dist/radio/radioButton.js +4 -4
- package/dist/radio/style/index.js +2 -2
- package/dist/result/index.d.ts +5 -5
- package/dist/segmented/index.d.ts +38 -20
- package/dist/segmented/index.js +5 -10
- package/dist/segmented/style/index.js +2 -2
- package/dist/select/index.d.ts +4 -4
- package/dist/select/style/select-input-customize.js +1 -0
- package/dist/slider/index.js +1 -1
- package/dist/space/Compact.d.ts +1 -1
- package/dist/space/index.d.ts +2 -2
- package/dist/spin/index.d.ts +5 -5
- package/dist/splitter/interface.d.ts +6 -6
- package/dist/statistic/Statistic.d.ts +4 -4
- package/dist/steps/index.d.ts +6 -6
- package/dist/style/motion/index.d.ts +2 -2
- package/dist/style/motion/index.js +2 -2
- package/dist/style/motion/util.d.ts +8 -1
- package/dist/style/motion/util.js +13 -1
- package/dist/switch/index.d.ts +4 -4
- package/dist/switch/index.js +7 -7
- package/dist/switch/style/index.js +5 -3
- package/dist/table/InternalTable.js +8 -25
- package/dist/table/Table.d.ts +20 -9
- package/dist/table/hooks/useColumnTitleProps.d.ts +8 -0
- package/dist/table/hooks/useColumnTitleProps.js +16 -0
- package/dist/table/hooks/useFilter/FilterDropdown.js +2 -1
- package/dist/table/hooks/useSpinProps.d.ts +7 -0
- package/dist/table/hooks/useSpinProps.js +14 -0
- package/dist/table/util.d.ts +5 -2
- package/dist/table/util.js +10 -1
- package/dist/tabs/index.d.ts +5 -5
- package/dist/tag/CheckableTag.d.ts +2 -2
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.d.ts +3 -3
- package/dist/time-picker/index.d.ts +2 -2
- package/dist/time-picker/index.js +211 -19
- package/dist/timeline/Timeline.d.ts +9 -9
- package/dist/tooltip/PurePanel.js +1 -1
- package/dist/tooltip/index.d.ts +3 -3
- package/dist/tour/interface.d.ts +4 -4
- package/dist/transfer/Actions.d.ts +2 -2
- package/dist/transfer/Transfer.d.ts +2 -2
- package/dist/transfer/index.d.ts +27 -6
- package/dist/transfer/interface.d.ts +17 -17
- package/dist/transfer/search.d.ts +2 -2
- package/dist/tree/Tree.d.ts +6 -6
- package/dist/tree-select/index.d.ts +57 -28
- package/dist/tree-select/index.js +4 -3
- package/dist/typography/Base/Ellipsis.d.ts +2 -2
- package/dist/typography/Editable.d.ts +2 -2
- package/dist/typography/interface.d.ts +8 -8
- package/dist/upload/UploadList/index.js +1 -1
- package/package.json +10 -10
- package/web-tags.json +1301 -1285
- package/web-types.json +3864 -3812
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { Orientation } from "../_util/hooks/useOrientation.js";
|
|
4
4
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
5
5
|
import { TooltipProps } from "../tooltip/index.js";
|
|
6
|
-
import { App, CSSProperties,
|
|
6
|
+
import { App, CSSProperties, PublicProps } from "vue";
|
|
7
7
|
import { SegmentedLabeledOption as SegmentedLabeledOption$1, SegmentedProps as SegmentedProps$1, SegmentedRawOption, SegmentedValue } from "@v-c/segmented";
|
|
8
8
|
|
|
9
9
|
//#region src/segmented/index.d.ts
|
|
@@ -27,15 +27,17 @@ interface SegmentedLabeledOptionWithoutIcon<ValueType = SegmentedValue> extends
|
|
|
27
27
|
interface SegmentedLabeledOptionWithIcon<ValueType = SegmentedValue> extends Omit<SegmentedLabeledOption$1<ValueType>, 'label'> {
|
|
28
28
|
label?: SegmentedLabeledOption$1['label'];
|
|
29
29
|
/** Set icon for Segmented item */
|
|
30
|
-
icon?: VueNode
|
|
30
|
+
icon?: VueNode;
|
|
31
31
|
tooltip?: string | TooltipProps;
|
|
32
32
|
}
|
|
33
33
|
type SegmentedLabeledOption<ValueType = SegmentedValue> = SegmentedLabeledOptionWithIcon<ValueType> | SegmentedLabeledOptionWithoutIcon<ValueType>;
|
|
34
34
|
type SegmentedOptions<T = SegmentedRawOption> = (T | SegmentedLabeledOption<T>)[];
|
|
35
35
|
type SegmentedClassNamesType = SemanticClassNamesType<SegmentedProps, SegmentedSemanticClassNames>;
|
|
36
36
|
type SegmentedStylesType = SemanticStylesType<SegmentedProps, SegmentedSemanticStyles>;
|
|
37
|
-
interface SegmentedProps extends Omit<SegmentedProps$1, 'size' | 'options' | 'itemRender' | 'styles' | 'classNames' | 'onChange'>, SegmentedEmitsProps {
|
|
38
|
-
|
|
37
|
+
interface SegmentedProps<ValueType extends SegmentedValue = SegmentedValue> extends Omit<SegmentedProps$1, 'size' | 'options' | 'itemRender' | 'styles' | 'classNames' | 'onChange' | 'value' | 'defaultValue'>, SegmentedEmitsProps<ValueType> {
|
|
38
|
+
value?: ValueType;
|
|
39
|
+
defaultValue?: ValueType;
|
|
40
|
+
options: SegmentedOptions<ValueType>;
|
|
39
41
|
rootClass?: string;
|
|
40
42
|
/** Option to fit width to its parent's width */
|
|
41
43
|
block?: boolean;
|
|
@@ -46,24 +48,40 @@ interface SegmentedProps extends Omit<SegmentedProps$1, 'size' | 'options' | 'it
|
|
|
46
48
|
classes?: SegmentedClassNamesType;
|
|
47
49
|
styles?: SegmentedStylesType;
|
|
48
50
|
shape?: 'default' | 'round';
|
|
49
|
-
iconRender?: (option: SegmentedLabeledOption) => any;
|
|
50
|
-
labelRender?: (option: SegmentedLabeledOption) => any;
|
|
51
|
+
iconRender?: (option: SegmentedLabeledOption<ValueType>) => any;
|
|
52
|
+
labelRender?: (option: SegmentedLabeledOption<ValueType>) => any;
|
|
51
53
|
}
|
|
52
|
-
interface SegmentedEmits {
|
|
53
|
-
'change': (value:
|
|
54
|
-
'update:value': (value:
|
|
54
|
+
interface SegmentedEmits<ValueType extends SegmentedValue = SegmentedValue> {
|
|
55
|
+
'change': (value: ValueType) => void;
|
|
56
|
+
'update:value': (value: ValueType) => void;
|
|
55
57
|
}
|
|
56
|
-
interface SegmentedEmitsProps {
|
|
57
|
-
onChange?: SegmentedEmits['change'];
|
|
58
|
-
'onUpdate:value'?: SegmentedEmits['update:value'];
|
|
58
|
+
interface SegmentedEmitsProps<ValueType extends SegmentedValue = SegmentedValue> {
|
|
59
|
+
onChange?: SegmentedEmits<ValueType>['change'];
|
|
60
|
+
'onUpdate:value'?: SegmentedEmits<ValueType>['update:value'];
|
|
59
61
|
}
|
|
60
|
-
interface SegmentedSlots {
|
|
61
|
-
iconRender: (option: SegmentedLabeledOption) => any;
|
|
62
|
-
labelRender: (option: SegmentedLabeledOption) => any;
|
|
62
|
+
interface SegmentedSlots<ValueType extends SegmentedValue = SegmentedValue> {
|
|
63
|
+
iconRender: (option: SegmentedLabeledOption<ValueType>) => any;
|
|
64
|
+
labelRender: (option: SegmentedLabeledOption<ValueType>) => any;
|
|
63
65
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
interface SegmentedInstance<ValueType extends SegmentedValue = SegmentedValue> {
|
|
67
|
+
$props: SegmentedProps<ValueType> & PublicProps;
|
|
68
|
+
$emit: {
|
|
69
|
+
(event: 'change', value: ValueType): void;
|
|
70
|
+
(event: 'update:value', value: ValueType): void;
|
|
71
|
+
};
|
|
72
|
+
$slots: SegmentedSlots<ValueType>;
|
|
73
|
+
}
|
|
74
|
+
interface SegmentedConstructor {
|
|
75
|
+
new <ValueType extends SegmentedValue = SegmentedValue>(props: SegmentedProps<ValueType>): SegmentedInstance<ValueType>;
|
|
76
|
+
/**
|
|
77
|
+
* Non-generic fallback signature. TypeScript infers from the last overload,
|
|
78
|
+
* so this keeps render-function usage like `h(Segmented, props)` resolvable
|
|
79
|
+
* against Vue's `Constructor<P>` overload of `h` (see #634), while the
|
|
80
|
+
* generic signature above still drives template/Volar inference.
|
|
81
|
+
*/
|
|
82
|
+
new (props: SegmentedProps<any>): SegmentedInstance<any>;
|
|
66
83
|
install: (app: App) => void;
|
|
67
|
-
}
|
|
84
|
+
}
|
|
85
|
+
declare const Segmented: SegmentedConstructor;
|
|
68
86
|
//#endregion
|
|
69
|
-
export { SegmentedClassNamesType, SegmentedEmits, SegmentedEmitsProps, SegmentedLabeledOption, SegmentedOptions, SegmentedProps, SegmentedSemanticClassNames, SegmentedSemanticName, SegmentedSemanticStyles, SegmentedSlots, SegmentedStylesType, Segmented as default };
|
|
87
|
+
export { SegmentedClassNamesType, SegmentedConstructor, SegmentedEmits, SegmentedEmitsProps, SegmentedLabeledOption, SegmentedOptions, SegmentedProps, SegmentedSemanticClassNames, SegmentedSemanticName, SegmentedSemanticStyles, SegmentedSlots, SegmentedStylesType, Segmented as default };
|
package/dist/segmented/index.js
CHANGED
|
@@ -16,7 +16,7 @@ function _isSlot(s) {
|
|
|
16
16
|
function isSegmentedLabeledOptionWithIcon(option, iconFromSlot) {
|
|
17
17
|
return typeof option === "object" && !!(option?.icon || iconFromSlot?.length);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const InternalSegmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }) => {
|
|
20
20
|
const defaultName = useId();
|
|
21
21
|
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("segmented");
|
|
22
22
|
const { classes, styles, size: customSize, orientation, vertical } = toPropsRefs$1(props, "classes", "styles", "size", "orientation", "vertical");
|
|
@@ -88,6 +88,8 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
|
|
|
88
88
|
};
|
|
89
89
|
}, {
|
|
90
90
|
props: /*@__PURE__*/ mergeDefaults({
|
|
91
|
+
value: { required: false },
|
|
92
|
+
defaultValue: { required: false },
|
|
91
93
|
options: {
|
|
92
94
|
type: Array,
|
|
93
95
|
required: true
|
|
@@ -134,14 +136,6 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
|
|
|
134
136
|
type: Function,
|
|
135
137
|
required: false
|
|
136
138
|
},
|
|
137
|
-
defaultValue: {
|
|
138
|
-
type: [String, Number],
|
|
139
|
-
required: false
|
|
140
|
-
},
|
|
141
|
-
value: {
|
|
142
|
-
type: [String, Number],
|
|
143
|
-
required: false
|
|
144
|
-
},
|
|
145
139
|
disabled: {
|
|
146
140
|
type: Boolean,
|
|
147
141
|
required: false,
|
|
@@ -171,8 +165,9 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
|
|
|
171
165
|
name: "ASegmented",
|
|
172
166
|
inheritAttrs: false
|
|
173
167
|
});
|
|
168
|
+
const Segmented = InternalSegmented;
|
|
174
169
|
Segmented.install = (app) => {
|
|
175
|
-
app.component(
|
|
170
|
+
app.component(InternalSegmented.name, Segmented);
|
|
176
171
|
};
|
|
177
172
|
//#endregion
|
|
178
173
|
export { Segmented as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { genFocusOutline, genFocusStyle, resetComponent, textEllipsis } from "../../style/index.js";
|
|
2
2
|
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.js";
|
|
4
|
-
import { genNoMotionStyle } from "../../style/motion/util.js";
|
|
4
|
+
import { genNoMotionRawStyle, genNoMotionStyle } from "../../style/motion/util.js";
|
|
5
5
|
import { unit } from "@antdv-next/cssinjs";
|
|
6
6
|
//#region src/segmented/style/index.ts
|
|
7
7
|
function getItemDisabledStyle(cls, token) {
|
|
@@ -82,7 +82,7 @@ const genSegmentedStyle = (token) => {
|
|
|
82
82
|
opacity: 0,
|
|
83
83
|
pointerEvents: "none",
|
|
84
84
|
transition: ["opacity", "background-color"].map((prop) => `${prop} ${motionDurationMid}`).join(", "),
|
|
85
|
-
...
|
|
85
|
+
...genNoMotionRawStyle()
|
|
86
86
|
},
|
|
87
87
|
[`&:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
|
|
88
88
|
"&:hover, &:active": { color: token.itemHoverColor },
|
package/dist/select/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
4
4
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
@@ -12,12 +12,12 @@ type RawValue = string | number;
|
|
|
12
12
|
interface LabeledValue {
|
|
13
13
|
key?: string;
|
|
14
14
|
value: RawValue;
|
|
15
|
-
label: VueNode
|
|
15
|
+
label: VueNode;
|
|
16
16
|
}
|
|
17
17
|
type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;
|
|
18
18
|
interface InternalSelectProps extends ComponentBaseProps, Omit<SelectProps$1, 'mode' | 'classNames' | 'className' | 'style' | 'prefix' | 'styles'> {
|
|
19
|
-
prefix?: VueNode
|
|
20
|
-
suffixIcon?: VueNode
|
|
19
|
+
prefix?: VueNode;
|
|
20
|
+
suffixIcon?: VueNode;
|
|
21
21
|
size?: SizeType;
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE' | 'combobox';
|
|
@@ -20,6 +20,7 @@ const genSelectInputCustomizeStyle = (token) => {
|
|
|
20
20
|
padding: 0,
|
|
21
21
|
"&-value": { display: "none" }
|
|
22
22
|
},
|
|
23
|
+
[`&${componentCls}-filled ${componentCls}-content`]: { [`${antCls}-input-filled`]: transparentBackground },
|
|
23
24
|
[`&${componentCls}-disabled ${componentCls}-content`]: {
|
|
24
25
|
[disabledCustomizedInputSelector]: transparentBackground,
|
|
25
26
|
"input[disabled], textarea[disabled]": transparentBackground
|
package/dist/slider/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import useRafLock from "./useRafLock.js";
|
|
|
10
10
|
import { cloneVNode, computed, createVNode, defineComponent, isVNode, mergeProps, onMounted, onUnmounted, shallowRef } from "vue";
|
|
11
11
|
import { clsx } from "@v-c/util";
|
|
12
12
|
import raf from "@v-c/util/dist/raf";
|
|
13
|
-
import { omit } from "es-toolkit";
|
|
13
|
+
import { omit } from "es-toolkit/compat";
|
|
14
14
|
import VcSlider from "@v-c/slider";
|
|
15
15
|
//#region src/slider/index.tsx
|
|
16
16
|
function _isSlot(s) {
|
package/dist/space/Compact.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface SpaceCompactItemContextType {
|
|
|
19
19
|
declare function useSpaceCompactItemContext(): Ref<SpaceCompactItemContextType | null, SpaceCompactItemContextType | null>;
|
|
20
20
|
declare function useCompactItemContext(prefixCls: Ref<string>, direction: Ref<DirectionType>): {
|
|
21
21
|
compactSize: import("vue").ComputedRef<SizeType>;
|
|
22
|
-
compactDirection: import("vue").ComputedRef<"
|
|
22
|
+
compactDirection: import("vue").ComputedRef<"horizontal" | "vertical" | undefined>;
|
|
23
23
|
compactItemClassnames: import("vue").ComputedRef<string>;
|
|
24
24
|
};
|
|
25
25
|
declare const NoCompactStyle: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
package/dist/space/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmptyEmit, VueNode
|
|
1
|
+
import { EmptyEmit, VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { Orientation } from "../_util/hooks/useOrientation.js";
|
|
4
4
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
@@ -29,7 +29,7 @@ interface SpaceProps extends ComponentBaseProps {
|
|
|
29
29
|
orientation?: Orientation;
|
|
30
30
|
vertical?: boolean;
|
|
31
31
|
align?: 'start' | 'end' | 'center' | 'baseline';
|
|
32
|
-
separator?: VueNode
|
|
32
|
+
separator?: VueNode;
|
|
33
33
|
wrap?: boolean;
|
|
34
34
|
classes?: SpaceClassNamesType;
|
|
35
35
|
styles?: SpaceStylesType;
|
package/dist/spin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmptyEmit, VueNode
|
|
1
|
+
import { EmptyEmit, VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
@@ -39,15 +39,15 @@ interface SpinProps extends ComponentBaseProps {
|
|
|
39
39
|
size?: SizeType | 'default';
|
|
40
40
|
/** Customize description content when Spin has children */
|
|
41
41
|
/** @deprecated Please use `description` instead */
|
|
42
|
-
tip?: VueNode
|
|
43
|
-
description?: VueNode
|
|
42
|
+
tip?: VueNode;
|
|
43
|
+
description?: VueNode;
|
|
44
44
|
/** Specifies a delay in milliseconds for loading state (prevent flush) */
|
|
45
45
|
delay?: number;
|
|
46
46
|
/** The className of wrapper when Spin has children */
|
|
47
47
|
/** @deprecated Please use `classes.root` instead */
|
|
48
48
|
wrapperClassName?: string;
|
|
49
49
|
/** React node of the spinning indicator */
|
|
50
|
-
indicator?: VueNode
|
|
50
|
+
indicator?: VueNode;
|
|
51
51
|
/** Display a backdrop with the `Spin` component */
|
|
52
52
|
fullscreen?: boolean;
|
|
53
53
|
percent?: number | 'auto';
|
|
@@ -63,7 +63,7 @@ interface SpinSlots {
|
|
|
63
63
|
}
|
|
64
64
|
declare const Spin: import("vue").DefineSetupFnComponent<SpinProps, EmptyEmit, SlotsType<SpinSlots>, SpinProps, import("vue").PublicProps>;
|
|
65
65
|
declare const _default: typeof Spin & {
|
|
66
|
-
setDefaultIndicator: (indicator: VueNode
|
|
66
|
+
setDefaultIndicator: (indicator: VueNode) => void;
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
69
69
|
export { SpinClassNamesType, SpinProps, SpinSemanticClassNames, SpinSemanticName, SpinSemanticStyles, SpinSlots, SpinStylesType, _default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { Orientation } from "../_util/hooks/useOrientation.js";
|
|
4
4
|
import { ShowCollapsibleIconMode } from "./SplitBar.js";
|
|
@@ -44,22 +44,22 @@ interface SplitterProps extends ComponentBaseProps {
|
|
|
44
44
|
layout?: Orientation;
|
|
45
45
|
orientation?: Orientation;
|
|
46
46
|
vertical?: boolean;
|
|
47
|
-
draggerIcon?: VueNode
|
|
47
|
+
draggerIcon?: VueNode;
|
|
48
48
|
/**
|
|
49
49
|
* Collapse configuration. ant-design 6.4.0 PR #57044.
|
|
50
50
|
*/
|
|
51
51
|
collapsible?: {
|
|
52
52
|
icon?: {
|
|
53
|
-
start?: VueNode
|
|
54
|
-
end?: VueNode
|
|
53
|
+
start?: VueNode;
|
|
54
|
+
end?: VueNode;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* @deprecated please use `collapsible.icon`
|
|
59
59
|
*/
|
|
60
60
|
collapsibleIcon?: {
|
|
61
|
-
start?: VueNode
|
|
62
|
-
end?: VueNode
|
|
61
|
+
start?: VueNode;
|
|
62
|
+
end?: VueNode;
|
|
63
63
|
};
|
|
64
64
|
onDraggerDoubleClick?: (index: number) => void;
|
|
65
65
|
onResizeStart?: (sizes: number[]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { FormatConfig, valueType } from "./utils.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
@@ -30,9 +30,9 @@ type StatisticRectProps = FormatConfig & ComponentBaseProps & {
|
|
|
30
30
|
value?: valueType;
|
|
31
31
|
valueStyle?: CSSProperties;
|
|
32
32
|
valueRender?: (node: any) => VNodeChild;
|
|
33
|
-
title?: VueNode
|
|
34
|
-
prefix?: VueNode
|
|
35
|
-
suffix?: VueNode
|
|
33
|
+
title?: VueNode;
|
|
34
|
+
prefix?: VueNode;
|
|
35
|
+
suffix?: VueNode;
|
|
36
36
|
loading?: boolean;
|
|
37
37
|
classes?: StatisticClassNamesType;
|
|
38
38
|
styles?: StatisticStylesType;
|
package/dist/steps/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
4
4
|
import { CSSProperties, SlotsType } from "vue";
|
|
@@ -44,14 +44,14 @@ interface StepItem {
|
|
|
44
44
|
classes?: NonNullable<StepsProps$1['items']>[number]['classNames'];
|
|
45
45
|
styles?: NonNullable<StepsProps$1['items']>[number]['styles'];
|
|
46
46
|
/** @deprecated Please use `content` instead */
|
|
47
|
-
description?: VueNode
|
|
48
|
-
content?: VueNode
|
|
49
|
-
icon?: VueNode
|
|
47
|
+
description?: VueNode;
|
|
48
|
+
content?: VueNode;
|
|
49
|
+
icon?: VueNode;
|
|
50
50
|
onClick?: (e: MouseEvent) => void;
|
|
51
51
|
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
52
52
|
disabled?: boolean;
|
|
53
|
-
title?: VueNode
|
|
54
|
-
subTitle?: VueNode
|
|
53
|
+
title?: VueNode;
|
|
54
|
+
subTitle?: VueNode;
|
|
55
55
|
}
|
|
56
56
|
type ProgressDotRender = (params: {
|
|
57
57
|
iconDot: any;
|
|
@@ -2,6 +2,6 @@ import genCollapseMotion from "./collapse.js";
|
|
|
2
2
|
import { fadeIn, fadeOut, initFadeMotion } from "./fade.js";
|
|
3
3
|
import { initMoveMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut } from "./move.js";
|
|
4
4
|
import { initSlideMotion, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut } from "./slide.js";
|
|
5
|
-
import { genNoMotionStyle } from "./util.js";
|
|
5
|
+
import { genNoMotionRawStyle, genNoMotionStyle } from "./util.js";
|
|
6
6
|
import { initZoomMotion, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut } from "./zoom.js";
|
|
7
|
-
export { fadeIn, fadeOut, genCollapseMotion, genNoMotionStyle, initFadeMotion, initMoveMotion, initSlideMotion, initZoomMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut };
|
|
7
|
+
export { fadeIn, fadeOut, genCollapseMotion, genNoMotionRawStyle, genNoMotionStyle, initFadeMotion, initMoveMotion, initSlideMotion, initZoomMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut };
|
|
@@ -2,6 +2,6 @@ import genCollapseMotion from "./collapse.js";
|
|
|
2
2
|
import { fadeIn, fadeOut, initFadeMotion } from "./fade.js";
|
|
3
3
|
import { initMoveMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut } from "./move.js";
|
|
4
4
|
import { initSlideMotion, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut } from "./slide.js";
|
|
5
|
-
import { genNoMotionStyle } from "./util.js";
|
|
5
|
+
import { genNoMotionRawStyle, genNoMotionStyle } from "./util.js";
|
|
6
6
|
import { initZoomMotion, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut } from "./zoom.js";
|
|
7
|
-
export { fadeIn, fadeOut, genCollapseMotion, genNoMotionStyle, initFadeMotion, initMoveMotion, initSlideMotion, initZoomMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut };
|
|
7
|
+
export { fadeIn, fadeOut, genCollapseMotion, genNoMotionRawStyle, genNoMotionStyle, initFadeMotion, initMoveMotion, initSlideMotion, initZoomMotion, moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut, slideDownIn, slideDownOut, slideLeftIn, slideLeftOut, slideRightIn, slideRightOut, slideUpIn, slideUpOut, zoomBigIn, zoomBigOut, zoomDownIn, zoomDownOut, zoomIn, zoomLeftIn, zoomLeftOut, zoomOut, zoomRightIn, zoomRightOut, zoomUpIn, zoomUpOut };
|
|
@@ -2,5 +2,12 @@ import { CSSObject } from "@antdv-next/cssinjs";
|
|
|
2
2
|
|
|
3
3
|
//#region src/style/motion/util.d.ts
|
|
4
4
|
declare function genNoMotionStyle(): CSSObject;
|
|
5
|
+
/**
|
|
6
|
+
* Flat variant for call sites already nested inside a pseudo-element
|
|
7
|
+
* selector, where the `&::before` expansion of `genNoMotionStyle` would
|
|
8
|
+
* emit invalid selectors like `.foo::before::before` (rejected by
|
|
9
|
+
* lightningcss during the docs build).
|
|
10
|
+
*/
|
|
11
|
+
declare function genNoMotionRawStyle(): CSSObject;
|
|
5
12
|
//#endregion
|
|
6
|
-
export { genNoMotionStyle };
|
|
13
|
+
export { genNoMotionRawStyle, genNoMotionStyle };
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
//#region src/style/motion/util.ts
|
|
2
2
|
function genNoMotionStyle() {
|
|
3
|
+
return { "@media (prefers-reduced-motion: reduce)": { "&, &::before, &::after": {
|
|
4
|
+
transition: "none",
|
|
5
|
+
animation: "none"
|
|
6
|
+
} } };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Flat variant for call sites already nested inside a pseudo-element
|
|
10
|
+
* selector, where the `&::before` expansion of `genNoMotionStyle` would
|
|
11
|
+
* emit invalid selectors like `.foo::before::before` (rejected by
|
|
12
|
+
* lightningcss during the docs build).
|
|
13
|
+
*/
|
|
14
|
+
function genNoMotionRawStyle() {
|
|
3
15
|
return { "@media (prefers-reduced-motion: reduce)": {
|
|
4
16
|
transition: "none",
|
|
5
17
|
animation: "none"
|
|
6
18
|
} };
|
|
7
19
|
}
|
|
8
20
|
//#endregion
|
|
9
|
-
export { genNoMotionStyle };
|
|
21
|
+
export { genNoMotionRawStyle, genNoMotionStyle };
|
package/dist/switch/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VueNode
|
|
1
|
+
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
@@ -20,7 +20,7 @@ interface SwitchSemanticStyles {
|
|
|
20
20
|
}
|
|
21
21
|
type SwitchClassNamesType = SemanticClassNamesType<SwitchProps, SwitchSemanticClassNames>;
|
|
22
22
|
type SwitchStylesType = SemanticStylesType<SwitchProps, SwitchSemanticStyles>;
|
|
23
|
-
type CheckedValueType =
|
|
23
|
+
type CheckedValueType = boolean | string | number | object;
|
|
24
24
|
interface SwitchProps extends ComponentBaseProps, SwitchEmitsProps {
|
|
25
25
|
size?: SwitchSize;
|
|
26
26
|
checked?: CheckedValueType;
|
|
@@ -43,8 +43,8 @@ interface SwitchProps extends ComponentBaseProps, SwitchEmitsProps {
|
|
|
43
43
|
* 非选中时的值
|
|
44
44
|
*/
|
|
45
45
|
unCheckedValue?: CheckedValueType;
|
|
46
|
-
checkedChildren?: VueNode
|
|
47
|
-
unCheckedChildren?: VueNode
|
|
46
|
+
checkedChildren?: VueNode;
|
|
47
|
+
unCheckedChildren?: VueNode;
|
|
48
48
|
disabled?: boolean;
|
|
49
49
|
loading?: boolean;
|
|
50
50
|
autoFocus?: boolean;
|
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";
|
|
13
|
+
import { omit } from "es-toolkit/compat";
|
|
14
14
|
import VcSwitch from "@v-c/switch";
|
|
15
15
|
//#region src/switch/index.tsx
|
|
16
16
|
const keys = [
|
|
@@ -114,9 +114,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
114
114
|
},
|
|
115
115
|
checked: {
|
|
116
116
|
type: [
|
|
117
|
+
Boolean,
|
|
117
118
|
String,
|
|
118
119
|
Number,
|
|
119
|
-
Boolean,
|
|
120
120
|
Object
|
|
121
121
|
],
|
|
122
122
|
required: false,
|
|
@@ -124,9 +124,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
124
124
|
},
|
|
125
125
|
defaultChecked: {
|
|
126
126
|
type: [
|
|
127
|
+
Boolean,
|
|
127
128
|
String,
|
|
128
129
|
Number,
|
|
129
|
-
Boolean,
|
|
130
130
|
Object
|
|
131
131
|
],
|
|
132
132
|
required: false,
|
|
@@ -134,9 +134,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
134
134
|
},
|
|
135
135
|
value: {
|
|
136
136
|
type: [
|
|
137
|
+
Boolean,
|
|
137
138
|
String,
|
|
138
139
|
Number,
|
|
139
|
-
Boolean,
|
|
140
140
|
Object
|
|
141
141
|
],
|
|
142
142
|
required: false,
|
|
@@ -144,9 +144,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
144
144
|
},
|
|
145
145
|
defaultValue: {
|
|
146
146
|
type: [
|
|
147
|
+
Boolean,
|
|
147
148
|
String,
|
|
148
149
|
Number,
|
|
149
|
-
Boolean,
|
|
150
150
|
Object
|
|
151
151
|
],
|
|
152
152
|
required: false,
|
|
@@ -154,9 +154,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
154
154
|
},
|
|
155
155
|
checkedValue: {
|
|
156
156
|
type: [
|
|
157
|
+
Boolean,
|
|
157
158
|
String,
|
|
158
159
|
Number,
|
|
159
|
-
Boolean,
|
|
160
160
|
Object
|
|
161
161
|
],
|
|
162
162
|
required: false,
|
|
@@ -164,9 +164,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
164
164
|
},
|
|
165
165
|
unCheckedValue: {
|
|
166
166
|
type: [
|
|
167
|
+
Boolean,
|
|
167
168
|
String,
|
|
168
169
|
Number,
|
|
169
|
-
Boolean,
|
|
170
170
|
Object
|
|
171
171
|
],
|
|
172
172
|
required: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { genFocusStyle, resetComponent } from "../../style/index.js";
|
|
2
2
|
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.js";
|
|
4
|
-
import { genNoMotionStyle } from "../../style/motion/util.js";
|
|
4
|
+
import { genNoMotionRawStyle, genNoMotionStyle } from "../../style/motion/util.js";
|
|
5
5
|
import { unit } from "@antdv-next/cssinjs";
|
|
6
6
|
import { FastColor } from "@ant-design/fast-color";
|
|
7
7
|
//#region src/switch/style/index.ts
|
|
@@ -98,7 +98,7 @@ const genSwitchHandleStyle = (token) => {
|
|
|
98
98
|
boxShadow: handleShadow,
|
|
99
99
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
100
100
|
content: "\"\"",
|
|
101
|
-
...
|
|
101
|
+
...genNoMotionRawStyle()
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
[`&${componentCls}-checked ${switchHandleCls}`]: { insetInlineStart: `calc(100% - ${unit(calc(handleSize).add(trackPadding).equal())})` },
|
|
@@ -130,7 +130,9 @@ const genSwitchInnerStyle = (token) => {
|
|
|
130
130
|
transition: [`padding-inline-start`, `padding-inline-end`].map((prop) => `${prop} ${switchDuration} ease-in-out`).join(", "),
|
|
131
131
|
...genNoMotionStyle(),
|
|
132
132
|
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
|
|
133
|
-
display: "
|
|
133
|
+
display: "flex",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
justifyContent: "center",
|
|
134
136
|
color: token.colorTextLightSolid,
|
|
135
137
|
fontSize: token.fontSizeSM,
|
|
136
138
|
pointerEvents: "none",
|
|
@@ -16,12 +16,15 @@ import Spin from "../spin/index.js";
|
|
|
16
16
|
import pagination_default from "../pagination/index.js";
|
|
17
17
|
import useSelection from "./hooks/useSelection.js";
|
|
18
18
|
import renderExpandIcon from "./ExpandIcon.js";
|
|
19
|
+
import useColumnTitleProps from "./hooks/useColumnTitleProps.js";
|
|
19
20
|
import useContainerWidth from "./hooks/useContainerWidth.js";
|
|
20
21
|
import useFilledColumns from "./hooks/useFilledColumns.js";
|
|
22
|
+
import { getPaginationSize, normalizePlacement } from "./util.js";
|
|
21
23
|
import useFilter, { collectFilterStates, generateFilterInfo, getFilterData, getMergedFilterStates } from "./hooks/useFilter/index.js";
|
|
22
24
|
import useLazyKVMap from "./hooks/useLazyKVMap.js";
|
|
23
25
|
import usePagination, { getPaginationParam } from "./hooks/usePagination.js";
|
|
24
26
|
import useSorter, { getSortData } from "./hooks/useSorter.js";
|
|
27
|
+
import useSpinProps from "./hooks/useSpinProps.js";
|
|
25
28
|
import useTitleColumns from "./hooks/useTitleColumns.js";
|
|
26
29
|
import style_default from "./style/index.js";
|
|
27
30
|
import { convertColumnsToColumnProps } from "./utils.js";
|
|
@@ -261,13 +264,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
261
264
|
return rootRef.value;
|
|
262
265
|
}
|
|
263
266
|
});
|
|
264
|
-
const spinProps = computed(() =>
|
|
265
|
-
if (typeof props.loading === "boolean") return { spinning: props.loading };
|
|
266
|
-
if (typeof props.loading === "object" && props.loading !== null) return {
|
|
267
|
-
spinning: true,
|
|
268
|
-
...props.loading
|
|
269
|
-
};
|
|
270
|
-
});
|
|
267
|
+
const spinProps = useSpinProps(computed(() => props.loading));
|
|
271
268
|
const mergedVirtual = computed(() => props.virtual ?? contextVirtual.value);
|
|
272
269
|
const TableComponent = computed(() => mergedVirtual.value ? VirtualTable : VcTable);
|
|
273
270
|
const listItemHeight = computed(() => {
|
|
@@ -295,18 +292,9 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
295
292
|
}
|
|
296
293
|
return node;
|
|
297
294
|
};
|
|
295
|
+
const columnTitleProps = useColumnTitleProps(sorterTitleProps, filters);
|
|
298
296
|
return () => {
|
|
299
|
-
const
|
|
300
|
-
const mergedFilters = {};
|
|
301
|
-
Object.keys(filters.value).forEach((filterKey) => {
|
|
302
|
-
if (filters.value[filterKey] !== null) mergedFilters[filterKey] = filters.value[filterKey];
|
|
303
|
-
});
|
|
304
|
-
return {
|
|
305
|
-
...sorterTitleProps.value,
|
|
306
|
-
filters: mergedFilters
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
const [transformTitleColumns] = useTitleColumns(columnTitlePropsFn());
|
|
297
|
+
const [transformTitleColumns] = useTitleColumns(columnTitleProps.value);
|
|
310
298
|
const renderExpandedRow = slots.expandedRowRender ? (record, index, indent, expanded) => getSlotPropsFnRun(slots, props, "expandedRowRender", true, {
|
|
311
299
|
record,
|
|
312
300
|
index,
|
|
@@ -355,8 +343,8 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
355
343
|
const renderPagination = (placement = "end") => createVNode(pagination_default, mergeProps(mergedPagination.value, {
|
|
356
344
|
"classes": mergedClassNames.value.pagination,
|
|
357
345
|
"styles": mergedStyles.value.pagination,
|
|
358
|
-
"class": clsx(`${prefixCls.value}-pagination
|
|
359
|
-
"size": mergedPagination.value.size
|
|
346
|
+
"class": clsx(`${prefixCls.value}-pagination`, `${prefixCls.value}-pagination-${placement}`, mergedPagination.value.class, mergedPagination.value.className),
|
|
347
|
+
"size": getPaginationSize(mergedPagination.value.size, mergedSize.value)
|
|
360
348
|
}), null);
|
|
361
349
|
const paginationNodes = (() => {
|
|
362
350
|
if (props.pagination === false || !mergedPagination.value.total) return {
|
|
@@ -367,11 +355,6 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
367
355
|
let bottomPaginationNode = null;
|
|
368
356
|
const { placement, position } = mergedPagination.value;
|
|
369
357
|
const mergedPlacement = placement ?? position;
|
|
370
|
-
const normalizePlacement = (pos) => {
|
|
371
|
-
const lowerPos = pos.toLowerCase();
|
|
372
|
-
if (lowerPos.includes("center")) return "center";
|
|
373
|
-
return lowerPos.includes("left") || lowerPos.includes("start") ? "start" : "end";
|
|
374
|
-
};
|
|
375
358
|
if (Array.isArray(mergedPlacement)) {
|
|
376
359
|
const [topPos, bottomPos] = ["top", "bottom"].map((dir) => mergedPlacement.find((p) => p.includes(dir)));
|
|
377
360
|
const isDisable = mergedPlacement.every((p) => `${p}` === "none");
|
package/dist/table/Table.d.ts
CHANGED
|
@@ -3,21 +3,32 @@ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } fro
|
|
|
3
3
|
import { TableEmits, TableExpose, TableProps as TableProps$1, TableSlots } from "./InternalTable.js";
|
|
4
4
|
import Column from "./Column.js";
|
|
5
5
|
import ColumnGroup from "./ColumnGroup.js";
|
|
6
|
+
import { PublicProps } from "vue";
|
|
6
7
|
import { EXPAND_COLUMN, Summary } from "@v-c/table";
|
|
7
8
|
|
|
8
9
|
//#region src/table/Table.d.ts
|
|
9
10
|
type TableEmitsProps<RecordType = AnyObject> = { [K in keyof TableEmits<RecordType> as `on${Capitalize<string & K>}`]?: TableEmits<RecordType>[K] };
|
|
10
11
|
interface InternalTableProps<RecordType = AnyObject> extends TableProps$1<RecordType>, TableEmitsProps<RecordType> {}
|
|
12
|
+
type TableInstance<RecordType = AnyObject> = {
|
|
13
|
+
$props: InternalTableProps<RecordType> & PublicProps;
|
|
14
|
+
$emit: {
|
|
15
|
+
(event: 'change', ...args: Parameters<TableEmits<RecordType>['change']>): void;
|
|
16
|
+
(event: 'update:expandedRowKeys', ...args: Parameters<TableEmits<RecordType>['update:expandedRowKeys']>): void;
|
|
17
|
+
(event: 'scroll', ...args: Parameters<TableEmits<RecordType>['scroll']>): void;
|
|
18
|
+
};
|
|
19
|
+
$slots: TableSlots<RecordType>;
|
|
20
|
+
} & TableExpose;
|
|
11
21
|
interface ForwardTableType {
|
|
12
|
-
new <RecordType = AnyObject>(props: InternalTableProps<RecordType>):
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
new <RecordType = AnyObject>(props: InternalTableProps<RecordType>): TableInstance<RecordType>;
|
|
23
|
+
/**
|
|
24
|
+
* Non-generic fallback signature. TypeScript infers from the last overload,
|
|
25
|
+
* so this keeps render-function usage like `h(Table, props)` resolvable
|
|
26
|
+
* against Vue's `Constructor<P>` overload of `h` (see #634), while the
|
|
27
|
+
* generic signature above still drives template/Volar inference.
|
|
28
|
+
* `any` (not `AnyObject`) because record callbacks are contravariant:
|
|
29
|
+
* `TableProps<DataType>` is not assignable to `TableProps<AnyObject>`.
|
|
30
|
+
*/
|
|
31
|
+
new (props: InternalTableProps<any>): TableInstance<any>;
|
|
21
32
|
displayName?: string;
|
|
22
33
|
SELECTION_COLUMN: typeof SELECTION_COLUMN;
|
|
23
34
|
EXPAND_COLUMN: typeof EXPAND_COLUMN;
|