antdv-next 1.0.0-beta.2 → 1.0.0-rc.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/PurePanel.mjs +4 -4
- package/dist/_util/hooks/useClosable.d.mts +0 -1
- package/dist/_util/hooks/useClosable.mjs +1 -1
- package/dist/_util/hooks/useMergeSemantic.d.mts +2 -3
- package/dist/_util/hooks/useMergeSemantic.mjs +9 -9
- package/dist/_util/tools.mjs +1 -1
- package/dist/_util/warning.d.mts +0 -1
- package/dist/affix/index.d.mts +3 -3
- package/dist/alert/Alert.d.mts +24 -7
- package/dist/alert/Alert.mjs +91 -28
- package/dist/anchor/Anchor.d.mts +18 -7
- package/dist/antd.css +1 -1
- package/dist/antd.js +101 -112
- package/dist/app/App.d.mts +2 -2
- package/dist/app/App.mjs +2 -2
- package/dist/auto-complete/index.d.mts +23 -11
- package/dist/auto-complete/index.mjs +1 -1
- package/dist/avatar/Avatar.d.mts +3 -3
- package/dist/avatar/AvatarGroup.d.mts +2 -2
- package/dist/avatar/style/index.mjs +2 -2
- package/dist/badge/Ribbon.d.mts +18 -2
- package/dist/badge/Ribbon.mjs +44 -23
- package/dist/badge/SingleNumber.mjs +2 -1
- package/dist/badge/index.d.mts +14 -7
- package/dist/badge/style/ribbon.mjs +1 -1
- package/dist/breadcrumb/Breadcrumb.d.mts +17 -6
- package/dist/breadcrumb/Breadcrumb.mjs +18 -3
- package/dist/breadcrumb/BreadcrumbItem.d.mts +1 -0
- package/dist/breadcrumb/BreadcrumbItem.mjs +29 -4
- package/dist/breadcrumb/style/index.mjs +5 -5
- package/dist/button/Button.d.mts +18 -10
- package/dist/button/buttonHelper.d.mts +0 -1
- package/dist/button/index.d.mts +1 -1
- package/dist/button/style/compact.mjs +28 -19
- package/dist/button/style/token.d.mts +0 -5
- package/dist/button/style/variant.mjs +27 -3
- package/dist/calendar/generateCalendar.d.mts +20 -7
- package/dist/calendar/generateCalendar.mjs +1 -1
- package/dist/calendar/index.d.mts +3 -3
- package/dist/card/Card.d.mts +23 -6
- package/dist/card/CardGrid.d.mts +2 -2
- package/dist/card/CardMeta.d.mts +20 -7
- package/dist/cascader/index.d.mts +28 -7
- package/dist/checkbox/Checkbox.d.mts +16 -7
- package/dist/checkbox/Checkbox.mjs +1 -1
- package/dist/checkbox/Group.d.mts +4 -3
- package/dist/checkbox/Group.mjs +11 -2
- package/dist/collapse/Collapse.d.mts +19 -6
- package/dist/collapse/Collapse.mjs +1 -1
- package/dist/color-picker/ColorPicker.d.mts +3 -3
- package/dist/color-picker/interface.d.mts +15 -7
- package/dist/color-picker/style/input.mjs +2 -0
- package/dist/components.d.mts +2 -3
- package/dist/config-provider/context.d.mts +58 -12
- package/dist/config-provider/context.mjs +3 -3
- package/dist/config-provider/define.d.mts +7 -1
- package/dist/config-provider/index.d.mts +3 -4
- package/dist/config-provider/index.mjs +82 -8
- package/dist/date-picker/generatePicker/index.d.mts +15 -15
- package/dist/date-picker/generatePicker/interface.d.mts +37 -10
- package/dist/date-picker/hooks/useMergedPickerSemantic.mjs +2 -2
- package/dist/date-picker/index.d.mts +25 -25
- package/dist/descriptions/Cell.mjs +5 -5
- package/dist/descriptions/DescriptionsContext.d.mts +13 -0
- package/dist/descriptions/Item.d.mts +3 -3
- package/dist/descriptions/hooks/useRow.mjs +7 -7
- package/dist/descriptions/index.d.mts +22 -7
- package/dist/divider/index.d.mts +15 -5
- package/dist/drawer/DrawerPanel.d.mts +28 -3
- package/dist/drawer/DrawerPanel.mjs +3 -3
- package/dist/drawer/index.d.mts +4 -4
- package/dist/drawer/index.mjs +4 -0
- package/dist/drawer/style/index.mjs +9 -2
- package/dist/dropdown/dropdown.d.mts +20 -7
- package/dist/empty/index.d.mts +18 -7
- package/dist/flex/index.d.mts +3 -3
- package/dist/float-button/FloatButton.d.mts +3 -4
- package/dist/float-button/FloatButtonGroup.d.mts +22 -3
- package/dist/form/Form.d.mts +16 -7
- package/dist/form/FormItem/index.d.mts +3 -3
- package/dist/form/FormItem/index.mjs +1 -1
- package/dist/form/FormItemInput.d.mts +0 -1
- package/dist/image/PreviewGroup.d.mts +3 -5
- package/dist/image/index.d.mts +34 -14
- package/dist/index.d.mts +3 -4
- package/dist/input/Input.d.mts +17 -4
- package/dist/input/Input.mjs +2 -2
- package/dist/input/OTP/index.d.mts +13 -4
- package/dist/input/Password.mjs +3 -3
- package/dist/input/Search.d.mts +21 -9
- package/dist/input/TextArea.d.mts +16 -7
- package/dist/input/TextArea.mjs +2 -2
- package/dist/input/index.d.mts +11 -11
- package/dist/input/style/index.mjs +5 -2
- package/dist/input/style/variants.mjs +2 -1
- package/dist/input-number/index.d.mts +20 -7
- package/dist/layout/index.d.mts +6 -6
- package/dist/layout/layout.d.mts +0 -1
- package/dist/locale/index.d.mts +0 -1
- package/dist/masonry/Masonry.d.mts +14 -7
- package/dist/masonry/MasonryItem.mjs +2 -2
- package/dist/mentions/index.d.mts +18 -7
- package/dist/mentions/index.mjs +2 -2
- package/dist/mentions/style/index.mjs +2 -2
- package/dist/menu/MenuContext.d.mts +0 -1
- package/dist/menu/MenuDivider.d.mts +2 -2
- package/dist/menu/MenuItem.d.mts +3 -3
- package/dist/menu/MenuItem.mjs +4 -3
- package/dist/menu/SubMenu.d.mts +3 -3
- package/dist/menu/SubMenu.mjs +5 -0
- package/dist/menu/index.d.mts +5 -5
- package/dist/menu/menu.d.mts +42 -10
- package/dist/menu/menu.mjs +2 -2
- package/dist/menu/style/index.d.mts +1 -1
- package/dist/menu/style/vertical.mjs +1 -1
- package/dist/message/PurePanel.d.mts +5 -7
- package/dist/message/index.mjs +2 -2
- package/dist/message/interface.d.mts +20 -4
- package/dist/message/useMessage.d.mts +0 -1
- package/dist/modal/Modal.d.mts +3 -3
- package/dist/modal/confirm.mjs +8 -4
- package/dist/modal/interface.d.mts +22 -3
- package/dist/modal/style/index.mjs +11 -8
- package/dist/notification/PurePanel.d.mts +8 -8
- package/dist/notification/index.mjs +2 -2
- package/dist/notification/interface.d.mts +18 -5
- package/dist/notification/style/index.mjs +8 -8
- package/dist/notification/useNotification.d.mts +2 -3
- package/dist/package.d.mts +4 -0
- package/dist/package.mjs +1 -1
- package/dist/pagination/Pagination.d.mts +3 -3
- package/dist/pagination/Pagination.mjs +11 -10
- package/dist/pagination/interface.d.mts +14 -5
- package/dist/pagination/style/bordered.mjs +2 -2
- package/dist/pagination/style/index.d.mts +10 -5
- package/dist/pagination/style/index.mjs +52 -103
- package/dist/popconfirm/PurePanel.d.mts +5 -7
- package/dist/popconfirm/index.d.mts +8 -6
- package/dist/popconfirm/index.mjs +7 -3
- package/dist/popover/index.d.mts +16 -9
- package/dist/popover/index.mjs +8 -5
- package/dist/progress/Line.mjs +3 -3
- package/dist/progress/progress.d.mts +20 -7
- package/dist/qrcode/index.d.mts +3 -3
- package/dist/qrcode/index.mjs +2 -1
- package/dist/qrcode/interface.d.mts +11 -3
- package/dist/radio/group.mjs +3 -3
- package/dist/radio/index.d.mts +5 -5
- package/dist/radio/interface.d.mts +13 -3
- package/dist/radio/radio.d.mts +3 -3
- package/dist/radio/radio.mjs +1 -1
- package/dist/rate/index.d.mts +3 -3
- package/dist/result/index.d.mts +22 -7
- package/dist/result/index.mjs +11 -6
- package/dist/result/noFound.d.mts +2 -2
- package/dist/result/serverError.d.mts +2 -2
- package/dist/result/unauthorized.d.mts +2 -2
- package/dist/segmented/index.d.mts +18 -7
- package/dist/select/index.d.mts +48 -20
- package/dist/skeleton/Avatar.d.mts +2 -2
- package/dist/skeleton/Button.d.mts +2 -2
- package/dist/skeleton/Image.d.mts +2 -2
- package/dist/skeleton/Input.d.mts +2 -2
- package/dist/skeleton/Node.d.mts +3 -3
- package/dist/skeleton/Skeleton.d.mts +22 -7
- package/dist/slider/index.d.mts +19 -6
- package/dist/slider/index.mjs +4 -4
- package/dist/space/index.d.mts +18 -9
- package/dist/spin/Indicator/Progress.mjs +3 -3
- package/dist/spin/index.d.mts +19 -6
- package/dist/splitter/SplitBar.mjs +12 -12
- package/dist/splitter/Splitter.d.mts +3 -3
- package/dist/splitter/Splitter.mjs +1 -1
- package/dist/splitter/hooks/useItems.mjs +2 -2
- package/dist/splitter/hooks/useResizable.mjs +5 -5
- package/dist/splitter/hooks/useResize.mjs +2 -2
- package/dist/splitter/index.d.mts +2 -2
- package/dist/splitter/interface.d.mts +21 -7
- package/dist/splitter/style/index.mjs +2 -28
- package/dist/statistic/Statistic.d.mts +21 -6
- package/dist/statistic/Statistic.mjs +1 -1
- package/dist/statistic/Timer.d.mts +5 -5
- package/dist/statistic/index.d.mts +5 -5
- package/dist/steps/context.mjs +5 -2
- package/dist/steps/index.d.mts +31 -9
- package/dist/steps/index.mjs +3 -3
- package/dist/style/motion/fade.mjs +25 -0
- package/dist/switch/index.d.mts +14 -7
- package/dist/switch/index.mjs +2 -2
- package/dist/table/Column.d.mts +3 -3
- package/dist/table/ColumnGroup.d.mts +3 -3
- package/dist/table/InternalTable.d.mts +35 -13
- package/dist/table/InternalTable.mjs +12 -6
- package/dist/table/Table.d.mts +3 -3
- package/dist/table/TableMeasureRowContext.mjs +20 -0
- package/dist/table/hooks/useFilter/FilterDropdown.mjs +17 -12
- package/dist/table/hooks/useSelection.mjs +1 -1
- package/dist/table/interface.d.mts +1 -2
- package/dist/table/style/virtual.mjs +1 -1
- package/dist/tabs/TabPane.d.mts +3 -3
- package/dist/tabs/index.d.mts +27 -11
- package/dist/tabs/index.mjs +5 -5
- package/dist/tag/CheckableTag.d.mts +3 -3
- package/dist/tag/CheckableTagGroup.d.mts +3 -3
- package/dist/tag/index.d.mts +16 -7
- package/dist/tag/index.mjs +1 -1
- package/dist/tag/style/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -2
- package/dist/theme/interface/maps/index.d.mts +0 -1
- package/dist/theme/useToken.mjs +3 -3
- package/dist/theme/util/genStyleUtils.mjs +3 -2
- package/dist/time-picker/index.d.mts +38 -14
- package/dist/time-picker/index.mjs +1 -1
- package/dist/timeline/Timeline.d.mts +49 -14
- package/dist/timeline/Timeline.mjs +82 -11
- package/dist/timeline/index.d.mts +1 -2
- package/dist/timeline/style/horizontal.mjs +73 -0
- package/dist/timeline/style/index.d.mts +10 -5
- package/dist/timeline/style/index.mjs +93 -137
- package/dist/timeline/useItems.mjs +52 -0
- package/dist/tooltip/PurePanel.d.mts +2 -2
- package/dist/tooltip/UniqueProvider/index.d.mts +2 -2
- package/dist/tooltip/index.d.mts +17 -8
- package/dist/tooltip/index.mjs +11 -3
- package/dist/tooltip/style/index.d.mts +7 -1
- package/dist/tooltip/style/index.mjs +3 -2
- package/dist/tour/index.d.mts +3 -3
- package/dist/tour/index.mjs +1 -1
- package/dist/tour/interface.d.mts +29 -3
- package/dist/transfer/Actions.d.mts +2 -2
- package/dist/transfer/ListItem.mjs +4 -4
- package/dist/transfer/Section.d.mts +2 -2
- package/dist/transfer/Transfer.d.mts +3 -3
- package/dist/transfer/Transfer.mjs +4 -4
- package/dist/transfer/index.d.mts +1 -1
- package/dist/transfer/interface.d.mts +32 -7
- package/dist/transfer/search.d.mts +3 -3
- package/dist/tree/DirectoryTree.d.mts +3 -3
- package/dist/tree/Tree.d.mts +18 -7
- package/dist/tree/index.d.mts +0 -1
- package/dist/tree-select/index.d.mts +41 -12
- package/dist/tree-select/style/index.d.mts +1 -1
- package/dist/typography/Editable.mjs +4 -4
- package/dist/typography/Link.d.mts +3 -3
- package/dist/typography/Paragraph.d.mts +3 -3
- package/dist/typography/Text.d.mts +3 -3
- package/dist/typography/Title.d.mts +3 -3
- package/dist/typography/Typography.d.mts +3 -3
- package/dist/typography/Typography.mjs +2 -12
- package/dist/typography/index.d.mts +9 -10
- package/dist/typography/interface.d.mts +0 -2
- package/dist/typography/style/mixins.mjs +3 -3
- package/dist/upload/Dragger.d.mts +3 -3
- package/dist/upload/Upload.d.mts +3 -4
- package/dist/upload/index.d.mts +3 -3
- package/dist/upload/interface.d.mts +13 -4
- package/dist/watermark/index.d.mts +2 -2
- package/dist/watermark/index.mjs +3 -3
- package/package.json +45 -41
- package/web-tags.json +1108 -1067
- package/web-types.json +3861 -4257
- package/dist/timeline/TimelineItem.d.mts +0 -20
- package/dist/timeline/TimelineItem.mjs +0 -115
- package/dist/timeline/TimelineItemList.mjs +0 -158
- /package/dist/{reset.css/reset.css → reset.css} +0 -0
|
@@ -5,7 +5,6 @@ import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeS
|
|
|
5
5
|
import { devUseWarning, isDev } from "../_util/warning.mjs";
|
|
6
6
|
import "../_util/hooks/index.mjs";
|
|
7
7
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.mjs";
|
|
8
|
-
import useCSSVarCls_default from "../config-provider/hooks/useCSSVarCls.mjs";
|
|
9
8
|
import { useSize } from "../config-provider/hooks/useSize.mjs";
|
|
10
9
|
import useLocale_default from "../locale/useLocale.mjs";
|
|
11
10
|
import select_default from "../select/index.mjs";
|
|
@@ -35,8 +34,7 @@ const omitKeys = [
|
|
|
35
34
|
const Pagination$1 = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
|
|
36
35
|
const { getPrefixCls, prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, showSizeChanger: contextShowSizeChangerConfig } = useComponentBaseConfig("pagination", props, ["showSizeChanger"]);
|
|
37
36
|
const { size, responsive, classes, styles, showSizeChanger } = toPropsRefs(props, "size", "responsive", "classes", "styles", "showSizeChanger");
|
|
38
|
-
const
|
|
39
|
-
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
37
|
+
const [hashId, cssVarCls] = style_default(prefixCls, prefixCls);
|
|
40
38
|
const [, token] = useToken();
|
|
41
39
|
const mergedSize = useSize(size);
|
|
42
40
|
const screens = useBreakpoint_default(responsive);
|
|
@@ -79,7 +77,7 @@ const Pagination$1 = /* @__PURE__ */ defineComponent((props, { slots, attrs, emi
|
|
|
79
77
|
onSizeChange?.(nextSize);
|
|
80
78
|
propSelectOnChange?.(nextSize, option);
|
|
81
79
|
},
|
|
82
|
-
"size":
|
|
80
|
+
"size": mergedSize.value,
|
|
83
81
|
"class": clsx(sizeChangerClassName, propSelectClass)
|
|
84
82
|
}), null);
|
|
85
83
|
};
|
|
@@ -126,16 +124,19 @@ const Pagination$1 = /* @__PURE__ */ defineComponent((props, { slots, attrs, emi
|
|
|
126
124
|
if (props.current !== page) emit("update:current", page);
|
|
127
125
|
else if (props.pageSize !== pageSize) emit("update:pageSize", pageSize);
|
|
128
126
|
};
|
|
129
|
-
const handleShowSizeChange = (current, size
|
|
130
|
-
emit("showSizeChange", current, size
|
|
127
|
+
const handleShowSizeChange = (current, size) => {
|
|
128
|
+
emit("showSizeChange", current, size);
|
|
131
129
|
};
|
|
132
130
|
return () => {
|
|
131
|
+
const { rootClass, align } = props;
|
|
133
132
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
134
|
-
const
|
|
133
|
+
const extendedClassName = clsx({
|
|
134
|
+
[`${prefixCls.value}-${align}`]: !!align,
|
|
135
|
+
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
135
136
|
[`${prefixCls.value}-mini`]: isSmall.value,
|
|
136
137
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl",
|
|
137
138
|
[`${prefixCls.value}-bordered`]: token.value.wireframe
|
|
138
|
-
}, className);
|
|
139
|
+
}, contextClassName.value, className, rootClass, mergedClassNames.value.root, hashId.value, cssVarCls.value);
|
|
139
140
|
const mergedStyle = {
|
|
140
141
|
...mergedStyles.value?.root,
|
|
141
142
|
...contextStyle.value,
|
|
@@ -145,7 +146,7 @@ const Pagination$1 = /* @__PURE__ */ defineComponent((props, { slots, attrs, emi
|
|
|
145
146
|
return createVNode(Fragment, null, [token.value.wireframe && createVNode(bordered_default, { "prefixCls": prefixCls.value }, null), createVNode(VcPagination, mergeProps(restProps, restAttrs, {
|
|
146
147
|
"prefixCls": prefixCls.value,
|
|
147
148
|
"selectPrefixCls": selectPrefixCls.value,
|
|
148
|
-
"class":
|
|
149
|
+
"class": extendedClassName,
|
|
149
150
|
"style": mergedStyle,
|
|
150
151
|
"classNames": mergedClassNames.value,
|
|
151
152
|
"styles": mergedStyles.value,
|
|
@@ -177,7 +178,7 @@ const Pagination$1 = /* @__PURE__ */ defineComponent((props, { slots, attrs, emi
|
|
|
177
178
|
default: void 0
|
|
178
179
|
},
|
|
179
180
|
size: {
|
|
180
|
-
type: String,
|
|
181
|
+
type: [String, null],
|
|
181
182
|
required: false,
|
|
182
183
|
default: void 0
|
|
183
184
|
},
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { SizeType } from "../config-provider/SizeContext.mjs";
|
|
1
2
|
import { VueNode } from "../_util/type.mjs";
|
|
2
3
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
4
|
import "../_util/hooks/index.mjs";
|
|
4
5
|
import { SelectProps } from "../select/index.mjs";
|
|
6
|
+
import { CSSProperties } from "vue";
|
|
5
7
|
import { PaginationProps } from "@v-c/pagination";
|
|
6
8
|
|
|
7
9
|
//#region src/pagination/interface.d.ts
|
|
@@ -18,14 +20,21 @@ interface PaginationLocale {
|
|
|
18
20
|
next_3?: string;
|
|
19
21
|
page_size?: string;
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
interface PaginationSemanticClassNames {
|
|
24
|
+
root?: string;
|
|
25
|
+
item?: string;
|
|
26
|
+
}
|
|
27
|
+
interface PaginationSemanticStyles {
|
|
28
|
+
root?: CSSProperties;
|
|
29
|
+
item?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
type PaginationClassNamesType = SemanticClassNamesType<PaginationProps$1, PaginationSemanticClassNames>;
|
|
32
|
+
type PaginationStylesType = SemanticStylesType<PaginationProps$1, PaginationSemanticStyles>;
|
|
24
33
|
interface PaginationProps$1 extends Omit<PaginationProps, 'className' | 'style' | 'classNames' | 'styles' | 'locale' | 'showSizeChanger' | 'pageSizeOptions' | 'prevIcon' | 'nextIcon' | 'jumpPrevIcon' | 'jumpNextIcon' | 'onChange' | 'onShowSizeChange'> {
|
|
25
34
|
showQuickJumper?: boolean | {
|
|
26
35
|
goButton?: VueNode;
|
|
27
36
|
};
|
|
28
|
-
size?:
|
|
37
|
+
size?: SizeType;
|
|
29
38
|
responsive?: boolean;
|
|
30
39
|
totalBoundaryShowSizeChanger?: number;
|
|
31
40
|
rootClass?: string;
|
|
@@ -68,4 +77,4 @@ interface PaginationSlots {
|
|
|
68
77
|
jumpNextIcon?: () => any;
|
|
69
78
|
}
|
|
70
79
|
//#endregion
|
|
71
|
-
export { PaginationClassNamesType, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationProps$1 as PaginationProps,
|
|
80
|
+
export { PaginationClassNamesType, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationProps$1 as PaginationProps, PaginationSemanticClassNames, PaginationSemanticStyles, PaginationSlots, PaginationStylesType };
|
|
@@ -7,7 +7,7 @@ import { unit } from "@antdv-next/cssinjs";
|
|
|
7
7
|
const genBorderedStyle = (token) => {
|
|
8
8
|
const { componentCls } = token;
|
|
9
9
|
return {
|
|
10
|
-
[`${componentCls}${componentCls}-bordered${componentCls}-disabled
|
|
10
|
+
[`${componentCls}${componentCls}-bordered${componentCls}-disabled`]: {
|
|
11
11
|
"&, &:hover": { [`${componentCls}-item-link`]: { borderColor: token.colorBorder } },
|
|
12
12
|
"&:focus-visible": { [`${componentCls}-item-link`]: { borderColor: token.colorBorder } },
|
|
13
13
|
[`${componentCls}-item, ${componentCls}-item-link`]: {
|
|
@@ -32,7 +32,7 @@ const genBorderedStyle = (token) => {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
[`${componentCls}${componentCls}-bordered
|
|
35
|
+
[`${componentCls}${componentCls}-bordered`]: {
|
|
36
36
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
37
37
|
"&:hover button": {
|
|
38
38
|
borderColor: token.colorPrimaryHover,
|
|
@@ -14,6 +14,16 @@ interface ComponentToken {
|
|
|
14
14
|
* @descEN Size of Pagination item
|
|
15
15
|
*/
|
|
16
16
|
itemSize: number;
|
|
17
|
+
/**
|
|
18
|
+
* @desc 小号页码尺寸
|
|
19
|
+
* @descEN Size of small Pagination item
|
|
20
|
+
*/
|
|
21
|
+
itemSizeSM: number;
|
|
22
|
+
/**
|
|
23
|
+
* @desc 大号页码尺寸
|
|
24
|
+
* @descEN Size of large Pagination item
|
|
25
|
+
*/
|
|
26
|
+
itemSizeLG: number;
|
|
17
27
|
/**
|
|
18
28
|
* @desc 页码激活态背景色
|
|
19
29
|
* @descEN Background color of active Pagination item
|
|
@@ -29,11 +39,6 @@ interface ComponentToken {
|
|
|
29
39
|
* @descEN Text color of active Pagination item hover
|
|
30
40
|
*/
|
|
31
41
|
itemActiveColorHover: string;
|
|
32
|
-
/**
|
|
33
|
-
* @desc 小号页码尺寸
|
|
34
|
-
* @descEN Size of small Pagination item
|
|
35
|
-
*/
|
|
36
|
-
itemSizeSM: number;
|
|
37
42
|
/**
|
|
38
43
|
* @desc 页码链接背景色
|
|
39
44
|
* @descEN Background color of Pagination item link
|
|
@@ -3,7 +3,7 @@ import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.mjs";
|
|
|
3
3
|
import { mergeToken } from "../../theme/internal.mjs";
|
|
4
4
|
import { initComponentToken, initInputToken } from "../../input/style/token.mjs";
|
|
5
5
|
import { genBaseOutlinedStyle, genDisabledStyle } from "../../input/style/variants.mjs";
|
|
6
|
-
import { genBasicInputStyle, genInputSmallStyle } from "../../input/style/index.mjs";
|
|
6
|
+
import { genBasicInputStyle, genInputLargeStyle, genInputSmallStyle } from "../../input/style/index.mjs";
|
|
7
7
|
import { unit } from "@antdv-next/cssinjs";
|
|
8
8
|
|
|
9
9
|
//#region src/pagination/style/index.ts
|
|
@@ -62,87 +62,45 @@ const genPaginationDisabledStyle = (token) => {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
const
|
|
66
|
-
const { componentCls
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
[`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {
|
|
80
|
-
minWidth: varRef("item-size-actual"),
|
|
81
|
-
height: varRef("item-size-actual"),
|
|
82
|
-
margin: 0,
|
|
83
|
-
lineHeight: varRef("item-size-actual")
|
|
84
|
-
},
|
|
85
|
-
[`&${componentCls}-mini:not(${componentCls}-disabled)`]: { [`${componentCls}-prev, ${componentCls}-next`]: {
|
|
86
|
-
[`&:hover ${componentCls}-item-link`]: { backgroundColor: token.colorBgTextHover },
|
|
87
|
-
[`&:active ${componentCls}-item-link`]: { backgroundColor: token.colorBgTextActive },
|
|
88
|
-
[`&${componentCls}-disabled:hover ${componentCls}-item-link`]: { backgroundColor: "transparent" }
|
|
89
|
-
} },
|
|
90
|
-
[`
|
|
91
|
-
&${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,
|
|
92
|
-
&${componentCls}-mini ${componentCls}-next ${componentCls}-item-link
|
|
93
|
-
`]: {
|
|
94
|
-
"backgroundColor": "transparent",
|
|
95
|
-
"borderColor": "transparent",
|
|
96
|
-
"&::after": {
|
|
97
|
-
height: varRef("item-size-actual"),
|
|
98
|
-
lineHeight: varRef("item-size-actual")
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
[`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {
|
|
102
|
-
height: varRef("item-size-actual"),
|
|
103
|
-
marginInlineEnd: 0,
|
|
104
|
-
lineHeight: varRef("item-size-actual")
|
|
105
|
-
},
|
|
106
|
-
[`&${componentCls}-mini ${componentCls}-options`]: {
|
|
107
|
-
"marginInlineStart": token.paginationMiniOptionsMarginInlineStart,
|
|
108
|
-
"&-size-changer": { top: token.miniOptionsSizeChangerTop },
|
|
109
|
-
"&-quick-jumper": {
|
|
110
|
-
height: varRef("item-size-actual"),
|
|
111
|
-
lineHeight: varRef("item-size-actual"),
|
|
112
|
-
input: {
|
|
113
|
-
...genInputSmallStyle(token),
|
|
114
|
-
width: token.paginationMiniQuickJumperInputWidth,
|
|
115
|
-
height: token.controlHeightSM
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
};
|
|
65
|
+
const genPaginationSmallStyle = (token) => {
|
|
66
|
+
const { componentCls } = token;
|
|
67
|
+
return { [`&${componentCls}-small ${componentCls}-options`]: {
|
|
68
|
+
"marginInlineStart": token.paginationMiniOptionsMarginInlineStart,
|
|
69
|
+
"&-quick-jumper": { input: {
|
|
70
|
+
...genInputSmallStyle(token),
|
|
71
|
+
width: token.paginationMiniQuickJumperInputWidth
|
|
72
|
+
} }
|
|
73
|
+
} };
|
|
74
|
+
};
|
|
75
|
+
const genPaginationLargeStyle = (token) => {
|
|
76
|
+
const { componentCls } = token;
|
|
77
|
+
return { [`&${componentCls}-large ${componentCls}-options`]: { "&-quick-jumper": { input: { ...genInputLargeStyle(token) } } } };
|
|
120
78
|
};
|
|
121
79
|
const genPaginationSimpleStyle = (token) => {
|
|
122
80
|
const { componentCls, antCls } = token;
|
|
123
81
|
const [, varRef] = genCssVar(antCls, "pagination");
|
|
124
82
|
return { [`&${componentCls}-simple`]: {
|
|
125
83
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
126
|
-
height: varRef(
|
|
127
|
-
lineHeight: varRef(
|
|
84
|
+
height: varRef(`item-size-actual`),
|
|
85
|
+
lineHeight: varRef(`item-size-actual`),
|
|
128
86
|
verticalAlign: "top",
|
|
129
87
|
[`${componentCls}-item-link`]: {
|
|
130
|
-
"height": varRef(
|
|
88
|
+
"height": varRef(`item-size-actual`),
|
|
131
89
|
"backgroundColor": "transparent",
|
|
132
90
|
"border": 0,
|
|
133
91
|
"&:hover": { backgroundColor: token.colorBgTextHover },
|
|
134
92
|
"&:active": { backgroundColor: token.colorBgTextActive },
|
|
135
93
|
"&::after": {
|
|
136
|
-
height: varRef(
|
|
137
|
-
lineHeight: varRef(
|
|
94
|
+
height: varRef(`item-size-actual`),
|
|
95
|
+
lineHeight: varRef(`item-size-actual`)
|
|
138
96
|
}
|
|
139
97
|
}
|
|
140
98
|
},
|
|
141
99
|
[`${componentCls}-simple-pager`]: {
|
|
142
100
|
display: "inline-flex",
|
|
143
101
|
alignItems: "center",
|
|
144
|
-
height: varRef(
|
|
145
|
-
marginInlineEnd: varRef(
|
|
102
|
+
height: varRef(`item-size-actual`),
|
|
103
|
+
marginInlineEnd: varRef(`item-spacing-actual`),
|
|
146
104
|
input: {
|
|
147
105
|
"boxSizing": "border-box",
|
|
148
106
|
"height": "100%",
|
|
@@ -169,23 +127,7 @@ const genPaginationSimpleStyle = (token) => {
|
|
|
169
127
|
}
|
|
170
128
|
},
|
|
171
129
|
[`&${componentCls}-disabled`]: { [`${componentCls}-prev, ${componentCls}-next`]: { [`${componentCls}-item-link`]: { "&:hover, &:active": { backgroundColor: "transparent" } } } },
|
|
172
|
-
[`&${componentCls}-
|
|
173
|
-
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
174
|
-
height: varRef("item-size-actual"),
|
|
175
|
-
lineHeight: varRef("item-size-actual"),
|
|
176
|
-
[`${componentCls}-item-link`]: {
|
|
177
|
-
"height": varRef("item-size-actual"),
|
|
178
|
-
"&::after": {
|
|
179
|
-
height: varRef("item-size-actual"),
|
|
180
|
-
lineHeight: varRef("item-size-actual")
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
[`${componentCls}-simple-pager`]: {
|
|
185
|
-
height: varRef("item-size-actual"),
|
|
186
|
-
input: { width: token.paginationMiniQuickJumperInputWidth }
|
|
187
|
-
}
|
|
188
|
-
}
|
|
130
|
+
[`&${componentCls}-small`]: { [`${componentCls}-simple-pager`]: { input: { width: token.paginationMiniQuickJumperInputWidth } } }
|
|
189
131
|
} };
|
|
190
132
|
};
|
|
191
133
|
const genPaginationJumpStyle = (token) => {
|
|
@@ -234,7 +176,7 @@ const genPaginationJumpStyle = (token) => {
|
|
|
234
176
|
${componentCls}-prev,
|
|
235
177
|
${componentCls}-jump-prev,
|
|
236
178
|
${componentCls}-jump-next
|
|
237
|
-
`]: { marginInlineEnd: varRef(
|
|
179
|
+
`]: { marginInlineEnd: varRef(`item-spacing-actual`) },
|
|
238
180
|
[`
|
|
239
181
|
${componentCls}-prev,
|
|
240
182
|
${componentCls}-next,
|
|
@@ -242,11 +184,11 @@ const genPaginationJumpStyle = (token) => {
|
|
|
242
184
|
${componentCls}-jump-next
|
|
243
185
|
`]: {
|
|
244
186
|
display: "inline-block",
|
|
245
|
-
minWidth: varRef(
|
|
246
|
-
height: varRef(
|
|
187
|
+
minWidth: varRef(`item-size-actual`),
|
|
188
|
+
height: varRef(`item-size-actual`),
|
|
247
189
|
color: token.colorText,
|
|
248
190
|
fontFamily: token.fontFamily,
|
|
249
|
-
lineHeight: varRef(
|
|
191
|
+
lineHeight: varRef(`item-size-actual`),
|
|
250
192
|
textAlign: "center",
|
|
251
193
|
verticalAlign: "middle",
|
|
252
194
|
listStyle: "none",
|
|
@@ -289,10 +231,10 @@ const genPaginationJumpStyle = (token) => {
|
|
|
289
231
|
"&-size-changer": { width: "auto" },
|
|
290
232
|
"&-quick-jumper": {
|
|
291
233
|
display: "inline-block",
|
|
292
|
-
height: varRef(
|
|
293
|
-
marginInlineStart:
|
|
294
|
-
lineHeight: varRef(
|
|
295
|
-
verticalAlign: "
|
|
234
|
+
height: varRef(`item-size-actual`),
|
|
235
|
+
marginInlineStart: token.marginXS,
|
|
236
|
+
lineHeight: varRef(`item-size-actual`),
|
|
237
|
+
verticalAlign: "baseline",
|
|
296
238
|
input: {
|
|
297
239
|
...genBasicInputStyle(token),
|
|
298
240
|
...genBaseOutlinedStyle(token, {
|
|
@@ -303,11 +245,11 @@ const genPaginationJumpStyle = (token) => {
|
|
|
303
245
|
}),
|
|
304
246
|
"&[disabled]": { ...genDisabledStyle(token) },
|
|
305
247
|
"width": token.quickJumperInputWidth,
|
|
306
|
-
"height": varRef(
|
|
248
|
+
"height": varRef(`item-size-actual`),
|
|
307
249
|
"boxSizing": "border-box",
|
|
308
250
|
"margin": 0,
|
|
309
|
-
"marginInlineStart": varRef(
|
|
310
|
-
"marginInlineEnd": varRef(
|
|
251
|
+
"marginInlineStart": varRef(`item-spacing-actual`),
|
|
252
|
+
"marginInlineEnd": varRef(`item-spacing-actual`)
|
|
311
253
|
}
|
|
312
254
|
}
|
|
313
255
|
}
|
|
@@ -318,9 +260,9 @@ const genPaginationItemStyle = (token) => {
|
|
|
318
260
|
const [, varRef] = genCssVar(antCls, "pagination");
|
|
319
261
|
return { [`${componentCls}-item`]: {
|
|
320
262
|
"display": "inline-block",
|
|
321
|
-
"minWidth": varRef(
|
|
322
|
-
"height": varRef(
|
|
323
|
-
"marginInlineEnd": varRef(
|
|
263
|
+
"minWidth": varRef(`item-size-actual`),
|
|
264
|
+
"height": varRef(`item-size-actual`),
|
|
265
|
+
"marginInlineEnd": varRef(`item-spacing-actual`),
|
|
324
266
|
"fontFamily": token.fontFamily,
|
|
325
267
|
"lineHeight": unit(token.calc(varRef("item-size-actual")).sub(2).equal()),
|
|
326
268
|
"textAlign": "center",
|
|
@@ -360,14 +302,19 @@ const genPaginationStyle = (token) => {
|
|
|
360
302
|
const [varName, varRef] = genCssVar(antCls, "pagination");
|
|
361
303
|
return {
|
|
362
304
|
[componentCls]: {
|
|
363
|
-
[varName(
|
|
364
|
-
[varName(
|
|
365
|
-
"&-
|
|
366
|
-
[varName(
|
|
367
|
-
[varName(
|
|
305
|
+
[varName(`item-size-actual`)]: unit(token.itemSize),
|
|
306
|
+
[varName(`item-spacing-actual`)]: unit(token.marginXS),
|
|
307
|
+
"&-small": {
|
|
308
|
+
[varName(`item-size-actual`)]: unit(token.itemSizeSM),
|
|
309
|
+
[varName(`item-spacing-actual`)]: unit(token.marginXXS)
|
|
310
|
+
},
|
|
311
|
+
"&-large": {
|
|
312
|
+
[varName(`item-size-actual`)]: unit(token.itemSizeLG),
|
|
313
|
+
[varName(`item-spacing-actual`)]: unit(token.marginSM)
|
|
368
314
|
},
|
|
369
315
|
...resetComponent(token),
|
|
370
316
|
"display": "flex",
|
|
317
|
+
"alignItems": "center",
|
|
371
318
|
"&-start": { justifyContent: "start" },
|
|
372
319
|
"&-center": { justifyContent: "center" },
|
|
373
320
|
"&-end": { justifyContent: "end" },
|
|
@@ -386,15 +333,16 @@ const genPaginationStyle = (token) => {
|
|
|
386
333
|
},
|
|
387
334
|
[`${componentCls}-total-text`]: {
|
|
388
335
|
display: "inline-block",
|
|
389
|
-
height: varRef(
|
|
390
|
-
marginInlineEnd: varRef(
|
|
391
|
-
lineHeight: unit(token.calc(varRef(
|
|
336
|
+
height: varRef(`item-size-actual`),
|
|
337
|
+
marginInlineEnd: varRef(`item-spacing-actual`),
|
|
338
|
+
lineHeight: unit(token.calc(varRef(`item-size-actual`)).sub(2).equal()),
|
|
392
339
|
verticalAlign: "middle"
|
|
393
340
|
},
|
|
394
341
|
...genPaginationItemStyle(token),
|
|
395
342
|
...genPaginationJumpStyle(token),
|
|
396
343
|
...genPaginationSimpleStyle(token),
|
|
397
|
-
...
|
|
344
|
+
...genPaginationSmallStyle(token),
|
|
345
|
+
...genPaginationLargeStyle(token),
|
|
398
346
|
...genPaginationDisabledStyle(token),
|
|
399
347
|
[`@media only screen and (max-width: ${token.screenLG}px)`]: { [`${componentCls}-item`]: { "&-after-jump-prev, &-before-jump-next": { display: "none" } } },
|
|
400
348
|
[`@media only screen and (max-width: ${token.screenSM}px)`]: { [`${componentCls}-options`]: { display: "none" } }
|
|
@@ -418,6 +366,7 @@ const prepareComponentToken = (token) => ({
|
|
|
418
366
|
itemBg: token.colorBgContainer,
|
|
419
367
|
itemSize: token.controlHeight,
|
|
420
368
|
itemSizeSM: token.controlHeightSM,
|
|
369
|
+
itemSizeLG: token.controlHeightLG,
|
|
421
370
|
itemActiveBg: token.colorBgContainer,
|
|
422
371
|
itemActiveColor: token.colorPrimary,
|
|
423
372
|
itemActiveColorHover: token.colorPrimaryHover,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../_util/hooks/index.mjs";
|
|
3
|
-
import { PopoverSemanticName } from "../popover/index.mjs";
|
|
1
|
+
import { PopoverSemanticClassNames, PopoverSemanticStyles } from "../popover/index.mjs";
|
|
4
2
|
import { PopconfirmProps } from "./index.mjs";
|
|
5
|
-
import * as
|
|
3
|
+
import * as vue19 from "vue";
|
|
6
4
|
import { CSSProperties } from "vue";
|
|
7
5
|
|
|
8
6
|
//#region src/popconfirm/PurePanel.d.ts
|
|
@@ -16,13 +14,13 @@ interface OverlayProps extends Pick<PopconfirmProps, 'icon' | 'okButtonProps' |
|
|
|
16
14
|
onConfirm?: (e?: MouseEvent) => void;
|
|
17
15
|
onCancel?: (e?: MouseEvent) => void;
|
|
18
16
|
onPopupClick?: (e: MouseEvent) => void;
|
|
19
|
-
classes?:
|
|
20
|
-
styles?:
|
|
17
|
+
classes?: PopoverSemanticClassNames;
|
|
18
|
+
styles?: PopoverSemanticStyles;
|
|
21
19
|
}
|
|
22
20
|
interface PurePanelProps extends Omit<OverlayProps, 'prefixCls'>, Pick<PopconfirmProps, 'placement'> {
|
|
23
21
|
class?: string;
|
|
24
22
|
style?: CSSProperties;
|
|
25
23
|
}
|
|
26
|
-
declare const PurePanel:
|
|
24
|
+
declare const PurePanel: vue19.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue19.PublicProps>;
|
|
27
25
|
//#endregion
|
|
28
26
|
export { PopconfirmLocale, PurePanel };
|
|
@@ -4,14 +4,16 @@ import "../_util/hooks/index.mjs";
|
|
|
4
4
|
import { TooltipEmits } from "../tooltip/index.mjs";
|
|
5
5
|
import { ButtonProps, LegacyButtonType } from "../button/Button.mjs";
|
|
6
6
|
import "../button/index.mjs";
|
|
7
|
-
import { PopoverProps,
|
|
7
|
+
import { PopoverProps, PopoverSemanticClassNames, PopoverSemanticStyles } from "../popover/index.mjs";
|
|
8
8
|
import { PurePanel } from "./PurePanel.mjs";
|
|
9
|
-
import * as
|
|
9
|
+
import * as vue129 from "vue";
|
|
10
10
|
import { App, SlotsType } from "vue";
|
|
11
11
|
|
|
12
12
|
//#region src/popconfirm/index.d.ts
|
|
13
|
-
type
|
|
14
|
-
type
|
|
13
|
+
type PopconfirmSemanticClassNames = PopoverSemanticClassNames;
|
|
14
|
+
type PopconfirmSemanticStyles = PopoverSemanticStyles;
|
|
15
|
+
type PopconfirmClassNamesType = SemanticClassNamesType<PopconfirmProps, PopconfirmSemanticClassNames>;
|
|
16
|
+
type PopconfirmStylesType = SemanticStylesType<PopconfirmProps, PopconfirmSemanticStyles>;
|
|
15
17
|
interface PopconfirmProps extends Omit<PopoverProps, 'title' | 'content' | 'classes' | 'styles'> {
|
|
16
18
|
title?: VueNode;
|
|
17
19
|
description?: VueNode;
|
|
@@ -40,9 +42,9 @@ interface PopconfirmSlots {
|
|
|
40
42
|
okText?: () => any;
|
|
41
43
|
cancelText?: () => any;
|
|
42
44
|
}
|
|
43
|
-
declare const InternalPopconfirm:
|
|
45
|
+
declare const InternalPopconfirm: vue129.DefineSetupFnComponent<PopconfirmProps, PopconfirmEmits, SlotsType<PopconfirmSlots>, PopconfirmProps & {
|
|
44
46
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
45
|
-
},
|
|
47
|
+
}, vue129.PublicProps>;
|
|
46
48
|
type PopconfirmType = typeof InternalPopconfirm & {
|
|
47
49
|
install: (app: App) => void;
|
|
48
50
|
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
|
@@ -31,10 +31,11 @@ const OMITTED_PROP_KEYS = [
|
|
|
31
31
|
];
|
|
32
32
|
const defaultIcon = createVNode(ExclamationCircleFilled, null, null);
|
|
33
33
|
const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
34
|
-
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, prefixCls } = useComponentBaseConfig("popconfirm", props, ["arrow"]);
|
|
34
|
+
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, prefixCls } = useComponentBaseConfig("popconfirm", props, ["arrow", "trigger"]);
|
|
35
35
|
const { arrow: arrowProp, classes, styles } = toPropsRefs(props, "arrow", "classes", "styles");
|
|
36
36
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
37
37
|
const mergedArrow = useMergedArrow_default(arrowProp, contextArrow);
|
|
38
|
+
const mergedTrigger = computed(() => props?.trigger ?? contextTrigger.value ?? "click");
|
|
38
39
|
const popoverRef = shallowRef();
|
|
39
40
|
const open = shallowRef(props.open ?? props.defaultOpen ?? false);
|
|
40
41
|
watchEffect(() => {
|
|
@@ -67,7 +68,10 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
|
|
|
67
68
|
nativeElement: computed(() => popoverRef.value?.nativeElement),
|
|
68
69
|
popupElement: computed(() => popoverRef.value?.popupElement)
|
|
69
70
|
});
|
|
70
|
-
const mergedProps = computed(() => ({
|
|
71
|
+
const mergedProps = computed(() => ({
|
|
72
|
+
...props,
|
|
73
|
+
trigger: mergedTrigger.value
|
|
74
|
+
}));
|
|
71
75
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
|
|
72
76
|
const rootClassNames = computed(() => clsx(prefixCls.value, hashId.value, cssVarCls.value, contextClassName.value, mergedClassNames.value.root));
|
|
73
77
|
return () => {
|
|
@@ -96,6 +100,7 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
|
|
|
96
100
|
"styles": mergedStyles.value
|
|
97
101
|
}, null);
|
|
98
102
|
return createVNode(popover_default, mergeProps(attrs, removeUndefined(restProps), {
|
|
103
|
+
"trigger": mergedTrigger.value,
|
|
99
104
|
"ref": popoverRef,
|
|
100
105
|
"open": open.value,
|
|
101
106
|
"arrow": mergedArrow.value,
|
|
@@ -341,7 +346,6 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
|
|
|
341
346
|
}
|
|
342
347
|
}, {
|
|
343
348
|
placement: "top",
|
|
344
|
-
trigger: "click",
|
|
345
349
|
okType: "primary"
|
|
346
350
|
}),
|
|
347
351
|
name: "APopconfirm",
|
package/dist/popover/index.d.mts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.mjs";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import * as
|
|
6
|
-
import { App, SlotsType } from "vue";
|
|
4
|
+
import { TooltipEmits, TooltipProps, TooltipSemanticClassNames, TooltipSemanticStyles } from "../tooltip/index.mjs";
|
|
5
|
+
import * as vue131 from "vue";
|
|
6
|
+
import { App, CSSProperties, SlotsType } from "vue";
|
|
7
7
|
|
|
8
8
|
//#region src/popover/index.d.ts
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
type PopoverSemanticClassNames = TooltipSemanticClassNames & {
|
|
10
|
+
title?: string;
|
|
11
|
+
content?: string;
|
|
12
|
+
};
|
|
13
|
+
type PopoverSemanticStyles = TooltipSemanticStyles & {
|
|
14
|
+
title?: CSSProperties;
|
|
15
|
+
content?: CSSProperties;
|
|
16
|
+
};
|
|
17
|
+
type PopoverClassNamesType = SemanticClassNamesType<PopoverProps, PopoverSemanticClassNames>;
|
|
18
|
+
type PopoverStylesType = SemanticStylesType<PopoverProps, PopoverSemanticStyles>;
|
|
12
19
|
interface PopoverProps extends TooltipProps {
|
|
13
20
|
title?: VueNode;
|
|
14
21
|
content?: VueNode;
|
|
@@ -23,12 +30,12 @@ interface PopoverSlots {
|
|
|
23
30
|
content: () => any;
|
|
24
31
|
default: () => any;
|
|
25
32
|
}
|
|
26
|
-
declare const InternalPopover:
|
|
33
|
+
declare const InternalPopover: vue131.DefineSetupFnComponent<PopoverProps, PopoverEmits, SlotsType<PopoverSlots>, PopoverProps & {
|
|
27
34
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
28
|
-
},
|
|
35
|
+
}, vue131.PublicProps>;
|
|
29
36
|
declare const Popover: typeof InternalPopover & {
|
|
30
37
|
install: (app: App) => void;
|
|
31
38
|
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
32
39
|
};
|
|
33
40
|
//#endregion
|
|
34
|
-
export { Popover, PopoverProps,
|
|
41
|
+
export { Popover, PopoverProps, PopoverSemanticClassNames, PopoverSemanticStyles };
|
package/dist/popover/index.mjs
CHANGED
|
@@ -17,11 +17,12 @@ function _isSlot(s) {
|
|
|
17
17
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
18
18
|
}
|
|
19
19
|
const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
20
|
-
const { getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, prefixCls } = useComponentBaseConfig("popover", props, ["arrow"]);
|
|
20
|
+
const { getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, prefixCls } = useComponentBaseConfig("popover", props, ["arrow", "trigger"]);
|
|
21
21
|
const { arrow: popoverArrow, classes, styles } = toPropsRefs(props, "arrow", "classes", "styles");
|
|
22
22
|
const rootCls = computed(() => getPrefixCls());
|
|
23
23
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
24
24
|
const mergedArrow = useMergedArrow_default(popoverArrow, contextArrow);
|
|
25
|
+
const mergedTrigger = computed(() => props?.trigger ?? contextTrigger.value ?? "hover");
|
|
25
26
|
const popoverRef = shallowRef();
|
|
26
27
|
const forceAlign = () => {
|
|
27
28
|
popoverRef.value?.forceAlign?.();
|
|
@@ -31,7 +32,10 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
|
|
|
31
32
|
nativeElement: computed(() => popoverRef.value?.nativeElement),
|
|
32
33
|
popupElement: computed(() => popoverRef.value?.popupElement)
|
|
33
34
|
});
|
|
34
|
-
const mergedProps = computed(() => ({
|
|
35
|
+
const mergedProps = computed(() => ({
|
|
36
|
+
...props,
|
|
37
|
+
trigger: mergedTrigger.value
|
|
38
|
+
}));
|
|
35
39
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
|
|
36
40
|
const open = shallowRef(props?.open ?? props?.defaultOpen ?? false);
|
|
37
41
|
watchEffect(() => {
|
|
@@ -51,7 +55,7 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
|
|
|
51
55
|
return () => {
|
|
52
56
|
let _slot;
|
|
53
57
|
const children = filterEmpty(slots?.default?.() ?? [])?.[0];
|
|
54
|
-
const { placement,
|
|
58
|
+
const { placement, mouseLeaveDelay, mouseEnterDelay, motion, ...restProps } = props;
|
|
55
59
|
const titleNode = getSlotPropsFnRun(slots, props, "title");
|
|
56
60
|
const contentNode = getSlotPropsFnRun(slots, props, "content");
|
|
57
61
|
const rootClassNames = clsx(hashId.value, cssVarCls.value, contextClassName.value, mergedClassNames.value.root);
|
|
@@ -59,7 +63,7 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
|
|
|
59
63
|
"unique": false,
|
|
60
64
|
"arrow": mergedArrow.value,
|
|
61
65
|
"placement": placement,
|
|
62
|
-
"trigger":
|
|
66
|
+
"trigger": mergedTrigger.value,
|
|
63
67
|
"mouseLeaveDelay": mouseLeaveDelay,
|
|
64
68
|
"mouseEnterDelay": mouseEnterDelay
|
|
65
69
|
}, removeUndefined(restProps), {
|
|
@@ -249,7 +253,6 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
|
|
|
249
253
|
}
|
|
250
254
|
}, {
|
|
251
255
|
placement: "top",
|
|
252
|
-
trigger: "hover",
|
|
253
256
|
mouseEnterDelay: .1,
|
|
254
257
|
mouseLeaveDelay: .1
|
|
255
258
|
}),
|
package/dist/progress/Line.mjs
CHANGED
|
@@ -44,10 +44,10 @@ function sortGradient(gradients) {
|
|
|
44
44
|
function handleGradient(strokeColor, directionConfig) {
|
|
45
45
|
const { from = presetPrimaryColors.blue, to = presetPrimaryColors.blue, direction = directionConfig === "rtl" ? "to left" : "to right", ...rest } = strokeColor;
|
|
46
46
|
if (Object.keys(rest).length !== 0) {
|
|
47
|
-
const background
|
|
47
|
+
const background = `linear-gradient(${direction}, ${sortGradient(rest)})`;
|
|
48
48
|
return {
|
|
49
|
-
background
|
|
50
|
-
[LineStrokeColorVar]: background
|
|
49
|
+
background,
|
|
50
|
+
[LineStrokeColorVar]: background
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
const background = `linear-gradient(${direction}, ${from}, ${to})`;
|